PageSourceSearch

https://www.illinoisbead.org/assets/index-Cklwbprc.js

js illinoisbead.org collected 2026-10-05 05:44:22 UTC 1,417,061 bytes, 845 lines download raw bytes

vendor: 3,648 bytes, lines 1-8
1(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const y of document.querySelectorAll('link[rel="modulepreload"]'))d(y);new MutationObserver(y=>{for(const w of y)if(w.type==="childList")for(const v of w.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&d(v)}).observe(document,{childList:!0,subtree:!0});function u(y){const w={};return y.integrity&&(w.integrity=y.integrity),y.referrerPolicy&&(w.referrerPolicy=y.referrerPolicy),y.crossOrigin==="use-credentials"?w.credentials="include":y.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}function d(y){if(y.ep)return;y.ep=!0;const w=u(y);fetch(y.href,w)}})();/**
2* @vue/shared v3.5.21
3* (c) 2018-present Yuxi (Evan) You and Vue contributors
4* @license MIT
5**/function N0(i){const o=Object.create(null);for(const u of i.split(","))o[u]=1;return u=>u in o}const ki={},mc=[],Ls=()=>{},bb=()=>!1,Rd=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),$0=i=>i.startsWith("onUpdate:"),Lr=Object.assign,U0=(i,o)=>{const u=i.indexOf(o);u>-1&&i.splice(u,1)},f4=Object.prototype.hasOwnProperty,Ci=(i,o)=>f4.call(i,o),Gt=Array.isArray,gc=i=>Dd(i)==="[object Map]",xb=i=>Dd(i)==="[object Set]",Qt=i=>typeof i=="function",ar=i=>typeof i=="string",vo=i=>typeof i=="symbol",Ki=i=>i!==null&&typeof i=="object",vb=i=>(Ki(i)||Qt(i))&&Qt(i.then)&&Qt(i.catch),wb=Object.prototype.toString,Dd=i=>wb.call(i),m4=i=>Dd(i).slice(8,-1),Bb=i=>Dd(i)==="[object Object]",V0=i=>ar(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,rh=N0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ld=i=>{const o=Object.create(null);return(u=>o[u]||(o[u]=i(u)))},g4=/-\w/g,es=Ld(i=>i.replace(g4,o=>o.slice(1).toUpperCase())),_4=/\B([A-Z])/g,nl=Ld(i=>i.replace(_4,"-$1").toLowerCase()),zd=Ld(i=>i.charAt(0).toUpperCase()+i.slice(1)),Sm=Ld(i=>i?`on${zd(i)}`:""),ia=(i,o)=>!Object.is(i,o),sd=(i,...o)=>{for(let u=0;u<i.length;u++)i[u](...o)},Tb=(i,o,u,d=!1)=>{Object.defineProperty(i,o,{configurable:!0,enumerable:!1,writable:d,value:u})},i0=i=>{const o=parseFloat(i);return isNaN(o)?i:o},y4=i=>{const o=ar(i)?Number(i):NaN;return isNaN(o)?i:o};let my;const Fd=()=>my||(my=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Yr(i){if(Gt(i)){const o={};for(let u=0;u<i.length;u++){const d=i[u],y=ar(d)?w4(d):Yr(d);if(y)for(const w in y)o[w]=y[w]}return o}else if(ar(i)||Ki(i))return i}const b4=/;(?![^(]*\))/g,x4=/:([^]+)/,v4=/\/\*[^]*?\*\//g;function w4(i){const o={};return i.replace(v4,"").split(b4).forEach(u=>{if(u){const d=u.split(x4);d.length>1&&(o[d[0].trim()]=d[1].trim())}}),o}function kn(i){let o="";if(ar(i))o=i;else if(Gt(i))for(let u=0;u<i.length;u++){const d=kn(i[u]);d&&(o+=d+" ")}else if(Ki(i))for(const u in i)i[u]&&(o+=u+" ");return o.trim()}const B4="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",T4=N0(B4);function Sb(i){return!!i||i===""}const Ob=i=>!!(i&&i.__v_isRef===!0),Jt=i=>ar(i)?i:i==null?"":Gt(i)||Ki(i)&&(i.toString===wb||!Qt(i.toString))?Ob(i)?Jt(i.value):JSON.stringify(i,Pb,2):String(i),Pb=(i,o)=>Ob(o)?Pb(i,o.value):gc(o)?{[`Map(${o.size})`]:[...o.entries()].reduce((u,[d,y],w)=>(u[Om(d,w)+" =>"]=y,u),{})}:xb(o)?{[`Set(${o.size})`]:[...o.values()].map(u=>Om(u))}:vo(o)?Om(o):Ki(o)&&!Gt(o)&&!Bb(o)?String(o):o,Om=(i,o="")=>{var u;return vo(i)?`Symbol(${(u=i.description)!=null?u:o})`:i};/**
6* @vue/reactivity v3.5.21
7* (c) 2018-present Yuxi (Evan) You and Vue contributors
8* @license MIT
vendor: 14,464 bytes, line 9
9**/let Xr;class Cb{constructor(o=!1){this.detached=o,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Xr,!o&&Xr&&(this.index=(Xr.scopes||(Xr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let o,u;if(this.scopes)for(o=0,u=this.scopes.length;o<u;o++)this.scopes[o].pause();for(o=0,u=this.effects.length;o<u;o++)this.effects[o].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let o,u;if(this.scopes)for(o=0,u=this.scopes.length;o<u;o++)this.scopes[o].resume();for(o=0,u=this.effects.length;o<u;o++)this.effects[o].resume()}}run(o){if(this._active){const u=Xr;try{return Xr=this,o()}finally{Xr=u}}}on(){++this._on===1&&(this.prevScope=Xr,Xr=this)}off(){this._on>0&&--this._on===0&&(Xr=this.prevScope,this.prevScope=void 0)}stop(o){if(this._active){this._active=!1;let u,d;for(u=0,d=this.effects.length;u<d;u++)this.effects[u].stop();for(this.effects.length=0,u=0,d=this.cleanups.length;u<d;u++)this.cleanups[u]();if(this.cleanups.length=0,this.scopes){for(u=0,d=this.scopes.length;u<d;u++)this.scopes[u].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!o){const y=this.parent.scopes.pop();y&&y!==this&&(this.parent.scopes[this.index]=y,y.index=this.index)}this.parent=void 0}}}function Eb(i){return new Cb(i)}function Mb(){return Xr}function S4(i,o=!1){Xr&&Xr.cleanups.push(i)}let Ni;const Pm=new WeakSet;class Ib{constructor(o){this.fn=o,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Xr&&Xr.active&&Xr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Pm.has(this)&&(Pm.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jb(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gy(this),kb(this);const o=Ni,u=ms;Ni=this,ms=!0;try{return this.fn()}finally{Rb(this),Ni=o,ms=u,this.flags&=-3}}stop(){if(this.flags&1){for(let o=this.deps;o;o=o.nextDep)Z0(o);this.deps=this.depsTail=void 0,gy(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Pm.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){r0(this)&&this.run()}get dirty(){return r0(this)}}let Ab=0,nh,sh;function jb(i,o=!1){if(i.flags|=8,o){i.next=sh,sh=i;return}i.next=nh,nh=i}function G0(){Ab++}function H0(){if(--Ab>0)return;if(sh){let o=sh;for(sh=void 0;o;){const u=o.next;o.next=void 0,o.flags&=-9,o=u}}let i;for(;nh;){let o=nh;for(nh=void 0;o;){const u=o.next;if(o.next=void 0,o.flags&=-9,o.flags&1)try{o.trigger()}catch(d){i||(i=d)}o=u}}if(i)throw i}function kb(i){for(let o=i.deps;o;o=o.nextDep)o.version=-1,o.prevActiveLink=o.dep.activeLink,o.dep.activeLink=o}function Rb(i){let o,u=i.depsTail,d=u;for(;d;){const y=d.prevDep;d.version===-1?(d===u&&(u=y),Z0(d),O4(d)):o=d,d.dep.activeLink=d.prevActiveLink,d.prevActiveLink=void 0,d=y}i.deps=o,i.depsTail=u}function r0(i){for(let o=i.deps;o;o=o.nextDep)if(o.dep.version!==o.version||o.dep.computed&&(Db(o.dep.computed)||o.dep.version!==o.version))return!0;return!!i._dirty}function Db(i){if(i.flags&4&&!(i.flags&16)||(i.flags&=-17,i.globalVersion===gh)||(i.globalVersion=gh,!i.isSSR&&i.flags&128&&(!i.deps&&!i._dirty||!r0(i))))return;i.flags|=2;const o=i.dep,u=Ni,d=ms;Ni=i,ms=!0;try{kb(i);const y=i.fn(i._value);(o.version===0||ia(y,i._value))&&(i.flags|=128,i._value=y,o.version++)}catch(y){throw o.version++,y}finally{Ni=u,ms=d,Rb(i),i.flags&=-3}}function Z0(i,o=!1){const{dep:u,prevSub:d,nextSub:y}=i;if(d&&(d.nextSub=y,i.prevSub=void 0),y&&(y.prevSub=d,i.nextSub=void 0),u.subs===i&&(u.subs=d,!d&&u.computed)){u.computed.flags&=-5;for(let w=u.computed.deps;w;w=w.nextDep)Z0(w,!0)}!o&&!--u.sc&&u.map&&u.map.delete(u.key)}function O4(i){const{prevDep:o,nextDep:u}=i;o&&(o.nextDep=u,i.prevDep=void 0),u&&(u.prevDep=o,i.nextDep=void 0)}let ms=!0;const Lb=[];function bo(){Lb.push(ms),ms=!1}function xo(){const i=Lb.pop();ms=i===void 0?!0:i}function gy(i){const{cleanup:o}=i;if(i.cleanup=void 0,o){const u=Ni;Ni=void 0;try{o()}finally{Ni=u}}}let gh=0;class P4{constructor(o,u){this.sub=o,this.dep=u,this.version=u.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class q0{constructor(o){this.computed=o,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(o){if(!Ni||!ms||Ni===this.computed)return;let u=this.activeLink;if(u===void 0||u.sub!==Ni)u=this.activeLink=new P4(Ni,this),Ni.deps?(u.prevDep=Ni.depsTail,Ni.depsTail.nextDep=u,Ni.depsTail=u):Ni.deps=Ni.depsTail=u,zb(u);else if(u.version===-1&&(u.version=this.version,u.nextDep)){const d=u.nextDep;d.prevDep=u.prevDep,u.prevDep&&(u.prevDep.nextDep=d),u.prevDep=Ni.depsTail,u.nextDep=void 0,Ni.depsTail.nextDep=u,Ni.depsTail=u,Ni.deps===u&&(Ni.deps=d)}return u}trigger(o){this.version++,gh++,this.notify(o)}notify(o){G0();try{for(let u=this.subs;u;u=u.prevSub)u.sub.notify()&&u.sub.dep.notify()}finally{H0()}}}function zb(i){if(i.dep.sc++,i.sub.flags&4){const o=i.dep.computed;if(o&&!i.dep.subs){o.flags|=20;for(let d=o.deps;d;d=d.nextDep)zb(d)}const u=i.dep.subs;u!==i&&(i.prevSub=u,u&&(u.nextSub=i)),i.dep.subs=i}}const _d=new WeakMap,Qa=Symbol(""),n0=Symbol(""),_h=Symbol("");function Jr(i,o,u){if(ms&&Ni){let d=_d.get(i);d||_d.set(i,d=new Map);let y=d.get(u);y||(d.set(u,y=new q0),y.map=d,y.key=u),y.track()}}function go(i,o,u,d,y,w){const v=_d.get(i);if(!v){gh++;return}const a=M=>{M&&M.trigger()};if(G0(),o==="clear")v.forEach(a);else{const M=Gt(i),D=M&&V0(u);if(M&&u==="length"){const F=Number(d);v.forEach((H,W)=>{(W==="length"||W===_h||!vo(W)&&W>=F)&&a(H)})}else switch((u!==void 0||v.has(void 0))&&a(v.get(u)),D&&a(v.get(_h)),o){case"add":M?D&&a(v.get("length")):(a(v.get(Qa)),gc(i)&&a(v.get(n0)));break;case"delete":M||(a(v.get(Qa)),gc(i)&&a(v.get(n0)));break;case"set":gc(i)&&a(v.get(Qa));break}}H0()}function C4(i,o){const u=_d.get(i);return u&&u.get(o)}function ac(i){const o=xi(i);return o===i?o:(Jr(o,"iterate",_h),Yn(i)?o:o.map(Gr))}function Nd(i){return Jr(i=xi(i),"iterate",_h),i}const E4={__proto__:null,[Symbol.iterator](){return Cm(this,Symbol.iterator,Gr)},concat(...i){return ac(this).concat(...i.map(o=>Gt(o)?ac(o):o))},entries(){return Cm(this,"entries",i=>(i[1]=Gr(i[1]),i))},every(i,o){return co(this,"every",i,o,void 0,arguments)},filter(i,o){return co(this,"filter",i,o,u=>u.map(Gr),arguments)},find(i,o){return co(this,"find",i,o,Gr,arguments)},findIndex(i,o){return co(this,"findIndex",i,o,void 0,arguments)},findLast(i,o){return co(this,"findLast",i,o,Gr,arguments)},findLastIndex(i,o){return co(this,"findLastIndex",i,o,void 0,arguments)},forEach(i,o){return co(this,"forEach",i,o,void 0,arguments)},includes(...i){return Em(this,"includes",i)},indexOf(...i){return Em(this,"indexOf",i)},join(i){return ac(this).join(i)},lastIndexOf(...i){return Em(this,"lastIndexOf",i)},map(i,o){return co(this,"map",i,o,void 0,arguments)},pop(){return Ku(this,"pop")},push(...i){return Ku(this,"push",i)},reduce(i,...o){return _y(this,"reduce",i,o)},reduceRight(i,...o){return _y(this,"reduceRight",i,o)},shift(){return Ku(this,"shift")},some(i,o){return co(this,"some",i,o,void 0,arguments)},splice(...i){return Ku(this,"splice",i)},toReversed(){return ac(this).toReversed()},toSorted(i){return ac(this).toSorted(i)},toSpliced(...i){return ac(this).toSpliced(...i)},unshift(...i){return Ku(this,"unshift",i)},values(){return Cm(this,"values",Gr)}};function Cm(i,o,u){const d=Nd(i),y=d[o]();return d!==i&&!Yn(i)&&(y._next=y.next,y.next=()=>{const w=y._next();return w.value&&(w.value=u(w.value)),w}),y}const M4=Array.prototype;function co(i,o,u,d,y,w){const v=Nd(i),a=v!==i&&!Yn(i),M=v[o];if(M!==M4[o]){const H=M.apply(i,w);return a?Gr(H):H}let D=u;v!==i&&(a?D=function(H,W){return u.call(this,Gr(H),W,i)}:u.length>2&&(D=function(H,W){return u.call(this,H,W,i)}));const F=M.call(v,D,d);return a&&y?y(F):F}function _y(i,o,u,d){const y=Nd(i);let w=u;return y!==i&&(Yn(i)?u.length>3&&(w=function(v,a,M){return u.call(this,v,a,M,i)}):w=function(v,a,M){return u.call(this,v,Gr(a),M,i)}),y[o](w,...d)}function Em(i,o,u){const d=xi(i);Jr(d,"iterate",_h);const y=d[o](...u);return(y===-1||y===!1)&&X0(u[0])?(u[0]=xi(u[0]),d[o](...u)):y}function Ku(i,o,u=[]){bo(),G0();const d=xi(i)[o].apply(i,u);return H0(),xo(),d}const I4=N0("__proto__,__v_isRef,__isVue"),Fb=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(vo));function A4(i){vo(i)||(i=String(i));const o=xi(this);return Jr(o,"has",i),o.hasOwnProperty(i)}class Nb{constructor(o=!1,u=!1){this._isReadonly=o,this._isShallow=u}get(o,u,d){if(u==="__v_skip")return o.__v_skip;const y=this._isReadonly,w=this._isShallow;if(u==="__v_isReactive")return!y;if(u==="__v_isReadonly")return y;if(u==="__v_isShallow")return w;if(u==="__v_raw")return d===(y?w?U4:Gb:w?Vb:Ub).get(o)||Object.getPrototypeOf(o)===Object.getPrototypeOf(d)?o:void 0;const v=Gt(o);if(!y){let M;if(v&&(M=E4[u]))return M;if(u==="hasOwnProperty")return A4}const a=Reflect.get(o,u,fr(o)?o:d);return(vo(u)?Fb.has(u):I4(u))||(y||Jr(o,"get",u),w)?a:fr(a)?v&&V0(u)?a:a.value:Ki(a)?y?Zb(a):Mh(a):a}}class $b extends Nb{constructor(o=!1){super(!1,o)}set(o,u,d,y){let w=o[u];if(!this._isShallow){const M=oa(w);if(!Yn(d)&&!oa(d)&&(w=xi(w),d=xi(d)),!Gt(o)&&fr(w)&&!fr(d))return M||(w.value=d),!0}const v=Gt(o)&&V0(u)?Number(u)<o.length:Ci(o,u),a=Reflect.set(o,u,d,fr(o)?o:y);return o===xi(y)&&(v?ia(d,w)&&go(o,"set",u,d):go(o,"add",u,d)),a}deleteProperty(o,u){const d=Ci(o,u);o[u];const y=Reflect.deleteProperty(o,u);return y&&d&&go(o,"delete",u,void 0),y}has(o,u){const d=Reflect.has(o,u);return(!vo(u)||!Fb.has(u))&&Jr(o,"has",u),d}ownKeys(o){return Jr(o,"iterate",Gt(o)?"length":Qa),Reflect.ownKeys(o)}}class j4 extends Nb{constructor(o=!1){super(!0,o)}set(o,u){return!0}deleteProperty(o,u){return!0}}const k4=new $b,R4=new j4,D4=new $b(!0);const s0=i=>i,Kp=i=>Reflect.getPrototypeOf(i);function L4(i,o,u){return function(...d){const y=this.__v_raw,w=xi(y),v=gc(w),a=i==="entries"||i===Symbol.iterator&&v,M=i==="keys"&&v,D=y[i](...d),F=u?s0:o?yd:Gr;return!o&&Jr(w,"iterate",M?n0:Qa),{next(){const{value:H,done:W}=D.next();return W?{value:H,done:W}:{value:a?[F(H[0]),F(H[1])]:F(H),done:W}},[Symbol.iterator](){return this}}}}function Xp(i){return function(...o){return i==="delete"?!1:i==="clear"?void 0:this}}function z4(i,o){const u={get(y){const w=this.__v_raw,v=xi(w),a=xi(y);i||(ia(y,a)&&Jr(v,"get",y),Jr(v,"get",a));const{has:M}=Kp(v),D=o?s0:i?yd:Gr;if(M.call(v,y))return D(w.get(y));if(M.call(v,a))return D(w.get(a));w!==v&&w.get(y)},get size(){const y=this.__v_raw;return!i&&Jr(xi(y),"iterate",Qa),y.size},has(y){const w=this.__v_raw,v=xi(w),a=xi(y);return i||(ia(y,a)&&Jr(v,"has",y),Jr(v,"has",a)),y===a?w.has(y):w.has(y)||w.has(a)},forEach(y,w){const v=this,a=v.__v_raw,M=xi(a),D=o?s0:i?yd:Gr;return!i&&Jr(M,"iterate",Qa),a.forEach((F,H)=>y.call(w,D(F),D(H),v))}};return Lr(u,i?{add:Xp("add"),set:Xp("set"),delete:Xp("delete"),clear:Xp("clear")}:{add(y){!o&&!Yn(y)&&!oa(y)&&(y=xi(y));const w=xi(this);return Kp(w).has.call(w,y)||(w.add(y),go(w,"add",y,y)),this},set(y,w){!o&&!Yn(w)&&!oa(w)&&(w=xi(w));const v=xi(this),{has:a,get:M}=Kp(v);let D=a.call(v,y);D||(y=xi(y),D=a.call(v,y));const F=M.call(v,y);return v.set(y,w),D?ia(w,F)&&go(v,"set",y,w):go(v,"add",y,w),this},delete(y){const w=xi(this),{has:v,get:a}=Kp(w);let M=v.call(w,y);M||(y=xi(y),M=v.call(w,y)),a&&a.call(w,y);const D=w.delete(y);return M&&go(w,"delete",y,void 0),D},clear(){const y=xi(this),w=y.size!==0,v=y.clear();return w&&go(y,"clear",void 0,void 0),v}}),["keys","values","entries",Symbol.iterator].forEach(y=>{u[y]=L4(y,i,o)}),u}function W0(i,o){const u=z4(i,o);return(d,y,w)=>y==="__v_isReactive"?!i:y==="__v_isReadonly"?i:y==="__v_raw"?d:Reflect.get(Ci(u,y)&&y in d?u:d,y,w)}const F4={get:W0(!1,!1)},N4={get:W0(!1,!0)},$4={get:W0(!0,!1)};const Ub=new WeakMap,Vb=new WeakMap,Gb=new WeakMap,U4=new WeakMap;function V4(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function G4(i){return i.__v_skip||!Object.isExtensible(i)?0:V4(m4(i))}function Mh(i){return oa(i)?i:K0(i,!1,k4,F4,Ub)}function Hb(i){return K0(i,!1,D4,N4,Vb)}function Zb(i){return K0(i,!0,R4,$4,Gb)}function K0(i,o,u,d,y){if(!Ki(i)||i.__v_raw&&!(o&&i.__v_isReactive))return i;const w=G4(i);if(w===0)return i;const v=y.get(i);if(v)return v;const a=new Proxy(i,w===2?d:u);return y.set(i,a),a}function ra(i){return oa(i)?ra(i.__v_raw):!!(i&&i.__v_isReactive)}function oa(i){return!!(i&&i.__v_isReadonly)}function Yn(i){return!!(i&&i.__v_isShallow)}function X0(i){return i?!!i.__v_raw:!1}function xi(i){const o=i&&i.__v_raw;return o?xi(o):i}function Y0(i){return!Ci(i,"__v_skip")&&Object.isExtensible(i)&&Tb(i,"__v_skip",!0),i}const Gr=i=>Ki(i)?Mh(i):i,yd=i=>Ki(i)?Zb(i):i;function fr(i){return i?i.__v_isRef===!0:!1}function vi(i){return Wb(i,!1)}function qb(i){return Wb(i,!0)}function Wb(i,o){return fr(i)?i:new H4(i,o)}class H4{constructor(o,u){this.dep=new q0,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=u?o:xi(o),this._value=u?o:Gr(o),this.__v_isShallow=u}get value(){return this.dep.track(),this._value}set value(o){const u=this._rawValue,d=this.__v_isShallow||Yn(o)||oa(o);o=d?o:xi(o),ia(o,u)&&(this._rawValue=o,this._value=d?o:Gr(o),this.dep.trigger())}}function wi(i){return fr(i)?i.value:i}const Z4={get:(i,o,u)=>o==="__v_raw"?i:wi(Reflect.get(i,o,u)),set:(i,o,u,d)=>{const y=i[o];return fr(y)&&!fr(u)?(y.value=u,!0):Reflect.set(i,o,u,d)}};function Kb(i){return ra(i)?i:new Proxy(i,Z4)}function q4(i){const o=Gt(i)?new Array(i.length):{};for(const u in i)o[u]=K4(i,u);return o}class W4{constructor(o,u,d){this._object=o,this._key=u,this._defaultValue=d,this.__v_isRef=!0,this._value=void 0}get value(){const o=this._object[this._key];return this._value=o===void 0?this._defaultValue:o}set value(o){this._object[this._key]=o}get dep(){return C4(xi(this._object),this._key)}}function K4(i,o,u){const d=i[o];return fr(d)?d:new W4(i,o,u)}class X4{constructor(o,u,d){this.fn=o,this.setter=u,this._value=void 0,this.dep=new q0(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gh-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!u,this.isSSR=d}notify(){if(this.flags|=16,!(this.flags&8)&&Ni!==this)return jb(this,!0),!0}get value(){const o=this.dep.track();return Db(this),o&&(o.version=this.dep.version),this._value}
vendor: 1,995 bytes, lines 9-12
9set value(o){this.setter&&this.setter(o)}}function Y4(i,o,u=!1){let d,y;return Qt(i)?d=i:(d=i.get,y=i.set),new X4(d,y,u)}const Yp={},bd=new WeakMap;let Xa;function J4(i,o=!1,u=Xa){if(u){let d=bd.get(u);d||bd.set(u,d=[]),d.push(i)}}function Q4(i,o,u=ki){const{immediate:d,deep:y,once:w,scheduler:v,augmentJob:a,call:M}=u,D=Te=>y?Te:Yn(Te)||y===!1||y===0?_o(Te,1):_o(Te);let F,H,W,G,Pe=!1,Ie=!1;if(fr(i)?(H=()=>i.value,Pe=Yn(i)):ra(i)?(H=()=>D(i),Pe=!0):Gt(i)?(Ie=!0,Pe=i.some(Te=>ra(Te)||Yn(Te)),H=()=>i.map(Te=>{if(fr(Te))return Te.value;if(ra(Te))return D(Te);if(Qt(Te))return M?M(Te,2):Te()})):Qt(i)?o?H=M?()=>M(i,2):i:H=()=>{if(W){bo();try{W()}finally{xo()}}const Te=Xa;Xa=F;try{return M?M(i,3,[G]):i(G)}finally{Xa=Te}}:H=Ls,o&&y){const Te=H,je=y===!0?1/0:y;H=()=>_o(Te(),je)}const rt=Mb(),nt=()=>{F.stop(),rt&&rt.active&&U0(rt.effects,F)};if(w&&o){const Te=o;o=(...je)=>{Te(...je),nt()}}let Ae=Ie?new Array(i.length).fill(Yp):Yp;const ke=Te=>{if(!(!(F.flags&1)||!F.dirty&&!Te))if(o){const je=F.run();if(y||Pe||(Ie?je.some((Ce,Re)=>ia(Ce,Ae[Re])):ia(je,Ae))){W&&W();const Ce=Xa;Xa=F;try{const Re=[je,Ae===Yp?void 0:Ie&&Ae[0]===Yp?[]:Ae,G];Ae=je,M?M(o,3,Re):o(...Re)}finally{Xa=Ce}}}else F.run()};return a&&a(ke),F=new Ib(H),F.scheduler=v?()=>v(ke,!1):ke,G=Te=>J4(Te,!1,F),W=F.onStop=()=>{const Te=bd.get(F);if(Te){if(M)M(Te,4);else for(const je of Te)je();bd.delete(F)}},o?d?ke(!0):Ae=F.run():v?v(ke.bind(null,!0),!0):F.run(),nt.pause=F.pause.bind(F),nt.resume=F.resume.bind(F),nt.stop=nt,nt}function _o(i,o=1/0,u){if(o<=0||!Ki(i)||i.__v_skip||(u=u||new Map,(u.get(i)||0)>=o))return i;if(u.set(i,o),o--,fr(i))_o(i.value,o,u);else if(Gt(i))for(let d=0;d<i.length;d++)_o(i[d],o,u);else if(xb(i)||gc(i))i.forEach(d=>{_o(d,o,u)});else if(Bb(i)){for(const d in i)_o(i[d],o,u);for(const d of Object.getOwnPropertySymbols(i))Object.prototype.propertyIsEnumerable.call(i,d)&&_o(i[d],o,u)}return i}/**
10* @vue/runtime-core v3.5.21
11* (c) 2018-present Yuxi (Evan) You and Vue contributors
12* @license MIT
13**/function Ih(i,o,u,d){try{return d?i(...d):i()}catch(y){$d(y,o,u)}}function _s(i,o,u,d){if(Qt(i)){const y=Ih(i,o,u,d);return y&&vb(y)&&y.catch(w=>{$d(w,o,u)}),y}if(Gt(i)){const y=[];for(let w=0;w<i.length;w++)y.push(_s(i[w],o,u,d));return y}}function $d(i,o,u,d=!0){const y=o?o.vnode:null,{errorHandler:w,throwUnhandledErrorInProduction:v}=o&&o.appContext.config||ki;if(o){let a=o.parent;const M=o.proxy,D=`https://vuejs.org/error-reference/#runtime-${u}`;for(;a;){const F=a.ec;if(F){for(let H=0;H<F.length;H++)if(F[H](i,M,D)===!1)return}a=a.parent}if(w){bo(),Ih(w,null,10,[i,M,D]),xo();return}}e3(i,u,y,d,v)}function e3(i,o,u,d=!0,y=!1){if(y)throw i;console.error(i)}const hn=[];let Rs=-1;const _c=[];let Qo=null,cc=0;const Xb=Promise.resolve();let xd=null;function J0(i){const o=xd||Xb;return i?o.then(this?i.bind(this):i):o}function t3(i){let o=Rs+1,u=hn.length;for(;o<u;){const d=o+u>>>1,y=hn[d],w=yh(y);w<i||w===i&&y.flags&2?o=d+1:u=d}return o}function Q0(i){if(!(i.flags&1)){const o=yh(i),u=hn[hn.length-1];!u||!(i.flags&2)&&o>=yh(u)?hn.push(i):hn.splice(t3(o),0,i),i.flags|=1,Yb()}}function Yb(){xd||(xd=Xb.then(Qb))}function i3(i){Gt(i)?_c.push(...i):Qo&&i.id===-1?Qo.splice(cc+1,0,i):i.flags&1||(_c.push(i),i.flags|=1),Yb()}function yy(i,o,u=Rs+1){for(;u<hn.length;u++){const d=hn[u];if(d&&d.flags&2){if(i&&d.id!==i.uid)continue;hn.splice(u,1),u--,d.flags&4&&(d.flags&=-2),d(),d.flags&4||(d.flags&=-2)}}}function Jb(i){if(_c.length){const o=[...new Set(_c)].sort((u,d)=>yh(u)-yh(d));if(_c.length=0,Qo){Qo.push(...o);return}for(Qo=o,cc=0;cc<Qo.length;cc++){const u=Qo[cc];u.flags&4&&(u.flags&=-2),u.flags&8||u(),u.flags&=-2}Qo=null,cc=0}}const yh=i=>i.id==null?i.flags&2?-1:1/0:i.id;function Qb(i){try{for(Rs=0;Rs<hn.length;Rs++){const o=hn[Rs];o&&!(o.flags&8)&&(o.flags&4&&(o.flags&=-2),Ih(o,o.i,o.i?15:14),o.flags&4||(o.flags&=-2))}}finally{for(;Rs<hn.length;Rs++){const o=hn[Rs];o&&(o.flags&=-2)}Rs=-1,hn.length=0,Jb(),xd=null,(hn.length||_c.length)&&Qb()}}let Hr=null,e2=null;function vd(i){const o=Hr;return Hr=i,e2=i&&i.type.__scopeId||null,o}function eg(i,o=Hr,u){if(!o||i._n)return i;const d=(...y)=>{d._d&&Td(-1);const w=vd(o);let v;try{v=i(...y)}finally{vd(w),d._d&&Td(1)}return v};return d._n=!0,d._c=!0,d._d=!0,d}function od(i,o){if(Hr===null)return i;const u=qd(Hr),d=i.dirs||(i.dirs=[]);for(let y=0;y<o.length;y++){let[w,v,a,M=ki]=o[y];w&&(Qt(w)&&(w={mounted:w,updated:w}),w.deep&&_o(v),d.push({dir:w,instance:u,value:v,oldValue:void 0,arg:a,modifiers:M}))}return i}function Za(i,o,u,d){const y=i.dirs,w=o&&o.dirs;for(let v=0;v<y.length;v++){const a=y[v];w&&(a.oldValue=w[v].value);let M=a.dir[d];M&&(bo(),_s(M,u,8,[i.el,a,i,o]),xo())}}const r3=Symbol("_vte"),t2=i=>i.__isTeleport,mo=Symbol("_leaveCb"),Jp=Symbol("_enterCb");function n3(){const i={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Cc(()=>{i.isMounted=!0}),c2(()=>{i.isUnmounting=!0}),i}const qn=[Function,Array],i2={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:qn,onEnter:qn,onAfterEnter:qn,onEnterCancelled:qn,onBeforeLeave:qn,onLeave:qn,onAfterLeave:qn,onLeaveCancelled:qn,onBeforeAppear:qn,onAppear:qn,onAfterAppear:qn,onAppearCancelled:qn},r2=i=>{const o=i.subTree;return o.component?r2(o.component):o},s3={name:"BaseTransition",props:i2,setup(i,{slots:o}){const u=Zd(),d=n3();return()=>{const y=o.default&&o2(o.default(),!0);if(!y||!y.length)return;const w=n2(y),v=xi(i),{mode:a}=v;if(d.isLeaving)return Mm(w);const M=by(w);if(!M)return Mm(w);let D=o0(M,v,d,u,H=>D=H);M.type!==Qr&&bh(M,D);let F=u.subTree&&by(u.subTree);if(F&&F.type!==Qr&&!Ya(F,M)&&r2(u).type!==Qr){let H=o0(F,v,d,u);if(bh(F,H),a==="out-in"&&M.type!==Qr)return d.isLeaving=!0,H.afterLeave=()=>{d.isLeaving=!1,u.job.flags&8||u.update(),delete H.afterLeave,F=void 0},Mm(w);a==="in-out"&&M.type!==Qr?H.delayLeave=(W,G,Pe)=>{const Ie=s2(d,F);Ie[String(F.key)]=F,W[mo]=()=>{G(),W[mo]=void 0,delete D.delayedLeave,F=void 0},D.delayedLeave=()=>{Pe(),delete D.delayedLeave,F=void 0}}:F=void 0}else F&&(F=void 0);return w}}};function n2(i){let o=i[0];if(i.length>1){for(const u of i)if(u.type!==Qr){o=u;break}}return o}const o3=s3;
vendor: 14,380 bytes, line 13
13function s2(i,o){const{leavingVNodes:u}=i;let d=u.get(o.type);return d||(d=Object.create(null),u.set(o.type,d)),d}function o0(i,o,u,d,y){const{appear:w,mode:v,persisted:a=!1,onBeforeEnter:M,onEnter:D,onAfterEnter:F,onEnterCancelled:H,onBeforeLeave:W,onLeave:G,onAfterLeave:Pe,onLeaveCancelled:Ie,onBeforeAppear:rt,onAppear:nt,onAfterAppear:Ae,onAppearCancelled:ke}=o,Te=String(i.key),je=s2(u,i),Ce=(Ge,dt)=>{Ge&&_s(Ge,d,9,dt)},Re=(Ge,dt)=>{const _t=dt[1];Ce(Ge,dt),Gt(Ge)?Ge.every(Xe=>Xe.length<=1)&&_t():Ge.length<=1&&_t()},pt={mode:v,persisted:a,beforeEnter(Ge){let dt=M;if(!u.isMounted)if(w)dt=rt||M;else return;Ge[mo]&&Ge[mo](!0);const _t=je[Te];_t&&Ya(i,_t)&&_t.el[mo]&&_t.el[mo](),Ce(dt,[Ge])},enter(Ge){let dt=D,_t=F,Xe=H;if(!u.isMounted)if(w)dt=nt||D,_t=Ae||F,Xe=ke||H;else return;let Et=!1;const di=Ge[Jp]=yi=>{Et||(Et=!0,yi?Ce(Xe,[Ge]):Ce(_t,[Ge]),pt.delayedLeave&&pt.delayedLeave(),Ge[Jp]=void 0)};dt?Re(dt,[Ge,di]):di()},leave(Ge,dt){const _t=String(i.key);if(Ge[Jp]&&Ge[Jp](!0),u.isUnmounting)return dt();Ce(W,[Ge]);let Xe=!1;const Et=Ge[mo]=di=>{Xe||(Xe=!0,dt(),di?Ce(Ie,[Ge]):Ce(Pe,[Ge]),Ge[mo]=void 0,je[_t]===i&&delete je[_t])};je[_t]=i,G?Re(G,[Ge,Et]):Et()},clone(Ge){const dt=o0(Ge,o,u,d,y);return y&&y(dt),dt}};return pt}function Mm(i){if(Ud(i))return i=aa(i),i.children=null,i}function by(i){if(!Ud(i))return t2(i.type)&&i.children?n2(i.children):i;if(i.component)return i.component.subTree;const{shapeFlag:o,children:u}=i;if(u){if(o&16)return u[0];if(o&32&&Qt(u.default))return u.default()}}function bh(i,o){i.shapeFlag&6&&i.component?(i.transition=o,bh(i.component.subTree,o)):i.shapeFlag&128?(i.ssContent.transition=o.clone(i.ssContent),i.ssFallback.transition=o.clone(i.ssFallback)):i.transition=o}function o2(i,o=!1,u){let d=[],y=0;for(let w=0;w<i.length;w++){let v=i[w];const a=u==null?v.key:String(u)+String(v.key!=null?v.key:w);v.type===Zi?(v.patchFlag&128&&y++,d=d.concat(o2(v.children,o,a))):(o||v.type!==Qr)&&d.push(a!=null?aa(v,{key:a}):v)}if(y>1)for(let w=0;w<d.length;w++)d[w].patchFlag=-2;return d}function zn(i,o){return Qt(i)?Lr({name:i.name},o,{setup:i}):i}function a2(i){i.ids=[i.ids[0]+i.ids[2]+++"-",0,0]}function a3(i){const o=Zd(),u=qb(null);if(o){const y=o.refs===ki?o.refs={}:o.refs;Object.defineProperty(y,i,{enumerable:!0,get:()=>u.value,set:w=>u.value=w})}return u}const wd=new WeakMap;function oh(i,o,u,d,y=!1){if(Gt(i)){i.forEach((Pe,Ie)=>oh(Pe,o&&(Gt(o)?o[Ie]:o),u,d,y));return}if(yc(d)&&!y){d.shapeFlag&512&&d.type.__asyncResolved&&d.component.subTree.component&&oh(i,o,u,d.component.subTree);return}const w=d.shapeFlag&4?qd(d.component):d.el,v=y?null:w,{i:a,r:M}=i,D=o&&o.r,F=a.refs===ki?a.refs={}:a.refs,H=a.setupState,W=xi(H),G=H===ki?bb:Pe=>Ci(W,Pe);if(D!=null&&D!==M){if(xy(o),ar(D))F[D]=null,G(D)&&(H[D]=null);else if(fr(D)){D.value=null;const Pe=o;Pe.k&&(F[Pe.k]=null)}}if(Qt(M))Ih(M,a,12,[v,F]);else{const Pe=ar(M),Ie=fr(M);if(Pe||Ie){const rt=()=>{if(i.f){const nt=Pe?G(M)?H[M]:F[M]:M.value;if(y)Gt(nt)&&U0(nt,w);else if(Gt(nt))nt.includes(w)||nt.push(w);else if(Pe)F[M]=[w],G(M)&&(H[M]=F[M]);else{const Ae=[w];M.value=Ae,i.k&&(F[i.k]=Ae)}}else Pe?(F[M]=v,G(M)&&(H[M]=v)):Ie&&(M.value=v,i.k&&(F[i.k]=v))};if(v){const nt=()=>{rt(),wd.delete(i)};nt.id=-1,wd.set(i,nt),An(nt,u)}else xy(i),rt()}}}function xy(i){const o=wd.get(i);o&&(o.flags|=8,wd.delete(i))}Fd().requestIdleCallback;Fd().cancelIdleCallback;const yc=i=>!!i.type.__asyncLoader,Ud=i=>i.type.__isKeepAlive;function l3(i,o){l2(i,"a",o)}function c3(i,o){l2(i,"da",o)}function l2(i,o,u=en){const d=i.__wdc||(i.__wdc=()=>{let y=u;for(;y;){if(y.isDeactivated)return;y=y.parent}return i()});if(Vd(o,d,u),u){let y=u.parent;for(;y&&y.parent;)Ud(y.parent.vnode)&&u3(d,o,u,y),y=y.parent}}function u3(i,o,u,d){const y=Vd(o,i,d,!0);tg(()=>{U0(d[o],y)},u)}function Vd(i,o,u=en,d=!1){if(u){const y=u[i]||(u[i]=[]),w=o.__weh||(o.__weh=(...v)=>{bo();const a=Ah(u),M=_s(o,u,i,v);return a(),xo(),M});return d?y.unshift(w):y.push(w),w}}const wo=i=>(o,u=en)=>{(!wh||i==="sp")&&Vd(i,(...d)=>o(...d),u)},h3=wo("bm"),Cc=wo("m"),p3=wo("bu"),d3=wo("u"),c2=wo("bum"),tg=wo("um"),f3=wo("sp"),m3=wo("rtg"),g3=wo("rtc");function _3(i,o=en){Vd("ec",i,o)}const y3="components",u2=Symbol.for("v-ndc");function b3(i){return ar(i)?x3(y3,i,!1)||i:i||u2}function x3(i,o,u=!0,d=!1){const y=Hr||en;if(y){const w=y.type;{const a=c9(w,!1);if(a&&(a===o||a===es(o)||a===zd(es(o))))return w}const v=vy(y[i]||w[i],o)||vy(y.appContext[i],o);return!v&&d?w:v}}function vy(i,o){return i&&(i[o]||i[es(o)]||i[zd(es(o))])}function Kn(i,o,u,d){let y;const w=u,v=Gt(i);if(v||ar(i)){const a=v&&ra(i);let M=!1,D=!1;a&&(M=!Yn(i),D=oa(i),i=Nd(i)),y=new Array(i.length);for(let F=0,H=i.length;F<H;F++)y[F]=o(M?D?yd(Gr(i[F])):Gr(i[F]):i[F],F,void 0,w)}else if(typeof i=="number"){y=new Array(i);for(let a=0;a<i;a++)y[a]=o(a+1,a,void 0,w)}else if(Ki(i))if(i[Symbol.iterator])y=Array.from(i,(a,M)=>o(a,M,void 0,w));else{const a=Object.keys(i);y=new Array(a.length);for(let M=0,D=a.length;M<D;M++){const F=a[M];y[M]=o(i[F],F,M,w)}}else y=[];return y}function v3(i,o,u={},d,y){if(Hr.ce||Hr.parent&&yc(Hr.parent)&&Hr.parent.ce)return Pt(),xc(Zi,null,[Wi("slot",u,d)],64);let w=i[o];w&&w._c&&(w._d=!1),Pt();const v=w&&h2(w(u)),a=u.key||v&&v.key,M=xc(Zi,{key:(a&&!vo(a)?a:`_${o}`)+(!v&&d?"_fb":"")},v||[],v&&i._===1?64:-2);return M.scopeId&&(M.slotScopeIds=[M.scopeId+"-s"]),w&&w._c&&(w._d=!0),M}function h2(i){return i.some(o=>vh(o)?!(o.type===Qr||o.type===Zi&&!h2(o.children)):!0)?i:null}const a0=i=>i?I2(i)?qd(i):a0(i.parent):null,ah=Lr(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>a0(i.parent),$root:i=>a0(i.root),$host:i=>i.ce,$emit:i=>i.emit,$options:i=>d2(i),$forceUpdate:i=>i.f||(i.f=()=>{Q0(i.update)}),$nextTick:i=>i.n||(i.n=J0.bind(i.proxy)),$watch:i=>V3.bind(i)}),Im=(i,o)=>i!==ki&&!i.__isScriptSetup&&Ci(i,o),w3={get({_:i},o){if(o==="__v_skip")return!0;const{ctx:u,setupState:d,data:y,props:w,accessCache:v,type:a,appContext:M}=i;let D;if(o[0]!=="$"){const G=v[o];if(G!==void 0)switch(G){case 1:return d[o];case 2:return y[o];case 4:return u[o];case 3:return w[o]}else{if(Im(d,o))return v[o]=1,d[o];if(y!==ki&&Ci(y,o))return v[o]=2,y[o];if((D=i.propsOptions[0])&&Ci(D,o))return v[o]=3,w[o];if(u!==ki&&Ci(u,o))return v[o]=4,u[o];l0&&(v[o]=0)}}const F=ah[o];let H,W;if(F)return o==="$attrs"&&Jr(i.attrs,"get",""),F(i);if((H=a.__cssModules)&&(H=H[o]))return H;if(u!==ki&&Ci(u,o))return v[o]=4,u[o];if(W=M.config.globalProperties,Ci(W,o))return W[o]},set({_:i},o,u){const{data:d,setupState:y,ctx:w}=i;return Im(y,o)?(y[o]=u,!0):d!==ki&&Ci(d,o)?(d[o]=u,!0):Ci(i.props,o)||o[0]==="$"&&o.slice(1)in i?!1:(w[o]=u,!0)},has({_:{data:i,setupState:o,accessCache:u,ctx:d,appContext:y,propsOptions:w,type:v}},a){let M,D;return!!(u[a]||i!==ki&&a[0]!=="$"&&Ci(i,a)||Im(o,a)||(M=w[0])&&Ci(M,a)||Ci(d,a)||Ci(ah,a)||Ci(y.config.globalProperties,a)||(D=v.__cssModules)&&D[a])},defineProperty(i,o,u){return u.get!=null?i._.accessCache[o]=0:Ci(u,"value")&&this.set(i,o,u.value,null),Reflect.defineProperty(i,o,u)}};function wy(i){return Gt(i)?i.reduce((o,u)=>(o[u]=null,o),{}):i}let l0=!0;function B3(i){const o=d2(i),u=i.proxy,d=i.ctx;l0=!1,o.beforeCreate&&By(o.beforeCreate,i,"bc");const{data:y,computed:w,methods:v,watch:a,provide:M,inject:D,created:F,beforeMount:H,mounted:W,beforeUpdate:G,updated:Pe,activated:Ie,deactivated:rt,beforeDestroy:nt,beforeUnmount:Ae,destroyed:ke,unmounted:Te,render:je,renderTracked:Ce,renderTriggered:Re,errorCaptured:pt,serverPrefetch:Ge,expose:dt,inheritAttrs:_t,components:Xe,directives:Et,filters:di}=o;if(D&&T3(D,d,null),v)for(const It in v){const ni=v[It];Qt(ni)&&(d[It]=ni.bind(u))}if(y){const It=y.call(u,u);Ki(It)&&(i.data=Mh(It))}if(l0=!0,w)for(const It in w){const ni=w[It],Ft=Qt(ni)?ni.bind(u,u):Qt(ni.get)?ni.get.bind(u,u):Ls,ir=!Qt(ni)&&Qt(ni.set)?ni.set.bind(u):Ls,bi=_i({get:Ft,set:ir});Object.defineProperty(d,It,{enumerable:!0,configurable:!0,get:()=>bi.value,set:Bi=>bi.value=Bi})}if(a)for(const It in a)p2(a[It],d,u,It);if(M){const It=Qt(M)?M.call(u):M;Reflect.ownKeys(It).forEach(ni=>{ad(ni,It[ni])})}F&&By(F,i,"c");function qt(It,ni){Gt(ni)?ni.forEach(Ft=>It(Ft.bind(u))):ni&&It(ni.bind(u))}if(qt(h3,H),qt(Cc,W),qt(p3,G),qt(d3,Pe),qt(l3,Ie),qt(c3,rt),qt(_3,pt),qt(g3,Ce),qt(m3,Re),qt(c2,Ae),qt(tg,Te),qt(f3,Ge),Gt(dt))if(dt.length){const It=i.exposed||(i.exposed={});dt.forEach(ni=>{Object.defineProperty(It,ni,{get:()=>u[ni],set:Ft=>u[ni]=Ft,enumerable:!0})})}else i.exposed||(i.exposed={});je&&i.render===Ls&&(i.render=je),_t!=null&&(i.inheritAttrs=_t),Xe&&(i.components=Xe),Et&&(i.directives=Et),Ge&&a2(i)}function T3(i,o,u=Ls){Gt(i)&&(i=c0(i));for(const d in i){const y=i[d];let w;Ki(y)?"default"in y?w=zs(y.from||d,y.default,!0):w=zs(y.from||d):w=zs(y),fr(w)?Object.defineProperty(o,d,{enumerable:!0,configurable:!0,get:()=>w.value,set:v=>w.value=v}):o[d]=w}}function By(i,o,u){_s(Gt(i)?i.map(d=>d.bind(o.proxy)):i.bind(o.proxy),o,u)}function p2(i,o,u,d){let y=d.includes(".")?O2(u,d):()=>u[d];if(ar(i)){const w=o[i];Qt(w)&&na(y,w)}else if(Qt(i))na(y,i.bind(u));else if(Ki(i))if(Gt(i))i.forEach(w=>p2(w,o,u,d));else{const w=Qt(i.handler)?i.handler.bind(u):o[i.handler];Qt(w)&&na(y,w,i)}}function d2(i){const o=i.type,{mixins:u,extends:d}=o,{mixins:y,optionsCache:w,config:{optionMergeStrategies:v}}=i.appContext,a=w.get(o);let M;return a?M=a:!y.length&&!u&&!d?M=o:(M={},y.length&&y.forEach(D=>Bd(M,D,v,!0)),Bd(M,o,v)),Ki(o)&&w.set(o,M),M}function Bd(i,o,u,d=!1){const{mixins:y,extends:w}=o;w&&Bd(i,w,u,!0),y&&y.forEach(v=>Bd(i,v,u,!0));for(const v in o)if(!(d&&v==="expose")){const a=S3[v]||u&&u[v];i[v]=a?a(i[v],o[v]):o[v]}return i}const S3={data:Ty,props:Sy,emits:Sy,methods:th,computed:th,beforeCreate:un,created:un,beforeMount:un,mounted:un,beforeUpdate:un,updated:un,beforeDestroy:un,beforeUnmount:un,destroyed:un,unmounted:un,activated:un,deactivated:un,errorCaptured:un,serverPrefetch:un,components:th,directives:th,watch:P3,provide:Ty,inject:O3};function Ty(i,o){return o?i?function(){return Lr(Qt(i)?i.call(this,this):i,Qt(o)?o.call(this,this):o)}:o:i}function O3(i,o){return th(c0(i),c0(o))}function c0(i){if(Gt(i)){const o={};for(let u=0;u<i.length;u++)o[i[u]]=i[u];return o}return i}function un(i,o){return i?[...new Set([].concat(i,o))]:o}function th(i,o){return i?Lr(Object.create(null),i,o):o}function Sy(i,o){return i?Gt(i)&&Gt(o)?[...new Set([...i,...o])]:Lr(Object.create(null),wy(i),wy(o??{})):o}function P3(i,o){if(!i)return o;if(!o)return i;const u=Lr(Object.create(null),i);for(const d in o)u[d]=un(i[d],o[d]);return u}function f2(){return{app:null,config:{isNativeTag:bb,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let C3=0;function E3(i,o){return function(d,y=null){Qt(d)||(d=Lr({},d)),y!=null&&!Ki(y)&&(y=null);const w=f2(),v=new WeakSet,a=[];let M=!1;const D=w.app={_uid:C3++,_component:d,_props:y,_container:null,_context:w,_instance:null,version:h9,get config(){return w.config},set config(F){},use(F,...H){return v.has(F)||(F&&Qt(F.install)?(v.add(F),F.install(D,...H)):Qt(F)&&(v.add(F),F(D,...H))),D},mixin(F){return w.mixins.includes(F)||w.mixins.push(F),D},component(F,H){return H?(w.components[F]=H,D):w.components[F]},directive(F,H){return H?(w.directives[F]=H,D):w.directives[F]},mount(F,H,W){if(!M){const G=D._ceVNode||Wi(d,y);return G.appContext=w,W===!0?W="svg":W===!1&&(W=void 0),i(G,F,W),M=!0,D._container=F,F.__vue_app__=D,qd(G.component)}},onUnmount(F){a.push(F)},unmount(){M&&(_s(a,D._instance,16),i(null,D._container),delete D._container.__vue_app__)},provide(F,H){return w.provides[F]=H,D},runWithContext(F){const H=el;el=D;try{return F()}finally{el=H}}};return D}}let el=null;function ad(i,o){if(en){let u=en.provides;const d=en.parent&&en.parent.provides;d===u&&(u=en.provides=Object.create(d)),u[i]=o}}function zs(i,o,u=!1){const d=Zd();if(d||el){let y=el?el._context.provides:d?d.parent==null||d.ce?d.vnode.appContext&&d.vnode.appContext.provides:d.parent.provides:void 0;if(y&&i in y)return y[i];if(arguments.length>1)return u&&Qt(o)?o.call(d&&d.proxy):o}}function M3(){return!!(Zd()||el)}const m2={},g2=()=>Object.create(m2),_2=i=>Object.getPrototypeOf(i)===m2;function I3(i,o,u,d=!1){const y={},w=g2();i.propsDefaults=Object.create(null),y2(i,o,y,w);for(const v in i.propsOptions[0])v in y||(y[v]=void 0);u?i.props=d?y:Hb(y):i.type.props?i.props=y:i.props=w,i.attrs=w}function A3(i,o,u,d){const{props:y,attrs:w,vnode:{patchFlag:v}}=i,a=xi(y),[M]=i.propsOptions;let D=!1;if((d||v>0)&&!(v&16)){if(v&8){const F=i.vnode.dynamicProps;for(let H=0;H<F.length;H++){let W=F[H];if(Gd(i.emitsOptions,W))continue;const G=o[W];if(M)if(Ci(w,W))G!==w[W]&&(w[W]=G,D=!0);else{const Pe=es(W);y[Pe]=u0(M,a,Pe,G,i,!1)}else G!==w[W]&&(w[W]=G,D=!0)}}}else{y2(i,o,y,w)&&(D=!0);let F;for(const H in a)(!o||!Ci(o,H)&&((F=nl(H))===H||!Ci(o,F)))&&(M?u&&(u[H]!==void 0||u[F]!==void 0)&&(y[H]=u0(M,a,H,void 0,i,!0)):delete y[H]);if(w!==a)for(const H in w)(!o||!Ci(o,H))&&(delete w[H],D=!0)}D&&go(i.attrs,"set","")}function y2(i,o,u,d){const[y,w]=i.propsOptions;let v=!1,a;if(o)for(let M in o){if(rh(M))continue;const D=o[M];let F;y&&Ci(y,F=es(M))?!w||!w.includes(F)?u[F]=D:(a||(a={}))[F]=D:Gd(i.emitsOptions,M)||(!(M in d)||D!==d[M])&&(d[M]=D,v=!0)}if(w){const M=xi(u),D=a||ki;for(let F=0;F<w.length;F++){const H=w[F];u[H]=u0(y,M,H,D[H],i,!Ci(D,H))}}return v}function u0(i,o,u,d,y,w){const v=i[u];if(v!=null){const a=Ci(v,"default");if(a&&d===void 0){const M=v.default;if(v.type!==Function&&!v.skipFactory&&Qt(M)){const{propsDefaults:D}=y;if(u in D)d=D[u];else{const F=Ah(y);d=D[u]=M.call(null,o),F()}}else d=M;y.ce&&y.ce._setProp(u,d)}v[0]&&(w&&!a?d=!1:v[1]&&(d===""||d===nl(u))&&(d=!0))}return d}const j3=new WeakMap;function b2(i,o,u=!1){const d=u?j3:o.propsCache,y=d.get(i);if(y)return y;const w=i.props,v={},a=[];let M=!1;if(!Qt(i)){const F=H=>{M=!0;const[W,G]=b2(H,o,!0);Lr(v,W),G&&a.push(...G)};!u&&o.mixins.length&&o.mixins.forEach(F),i.extends&&F(i.extends),i.mixins&&i.mixins.forEach(F)}if(!w&&!M)return Ki(i)&&d.set(i,mc),mc;if(Gt(w))for(let F=0;F<w.length;F++){const H=es(w[F]);Oy(H)&&(v[H]=ki)}else if(w)for(const F in w){const H=es(F);if(Oy(H)){const W=w[F],G=v[H]=Gt(W)||Qt(W)?{type:W}:Lr({},W),Pe=G.type;let Ie=!1,rt=!0;
vendor: 18,977 bytes, line 13
13if(Gt(Pe))for(let nt=0;nt<Pe.length;++nt){const Ae=Pe[nt],ke=Qt(Ae)&&Ae.name;if(ke==="Boolean"){Ie=!0;break}else ke==="String"&&(rt=!1)}else Ie=Qt(Pe)&&Pe.name==="Boolean";G[0]=Ie,G[1]=rt,(Ie||Ci(G,"default"))&&a.push(H)}}const D=[v,a];return Ki(i)&&d.set(i,D),D}function Oy(i){return i[0]!=="$"&&!rh(i)}const ig=i=>i==="_"||i==="_ctx"||i==="$stable",rg=i=>Gt(i)?i.map(Ds):[Ds(i)],k3=(i,o,u)=>{if(o._n)return o;const d=eg((...y)=>rg(o(...y)),u);return d._c=!1,d},x2=(i,o,u)=>{const d=i._ctx;for(const y in i){if(ig(y))continue;const w=i[y];if(Qt(w))o[y]=k3(y,w,d);else if(w!=null){const v=rg(w);o[y]=()=>v}}},v2=(i,o)=>{const u=rg(o);i.slots.default=()=>u},w2=(i,o,u)=>{for(const d in o)(u||!ig(d))&&(i[d]=o[d])},R3=(i,o,u)=>{const d=i.slots=g2();if(i.vnode.shapeFlag&32){const y=o._;y?(w2(d,o,u),u&&Tb(d,"_",y,!0)):x2(o,d)}else o&&v2(i,o)},D3=(i,o,u)=>{const{vnode:d,slots:y}=i;let w=!0,v=ki;if(d.shapeFlag&32){const a=o._;a?u&&a===1?w=!1:w2(y,o,u):(w=!o.$stable,x2(o,y)),v=o}else o&&(v2(i,o),v={default:1});if(w)for(const a in y)!ig(a)&&v[a]==null&&delete y[a]},An=Y3;function L3(i){return z3(i)}function z3(i,o){const u=Fd();u.__VUE__=!0;const{insert:d,remove:y,patchProp:w,createElement:v,createText:a,createComment:M,setText:D,setElementText:F,parentNode:H,nextSibling:W,setScopeId:G=Ls,insertStaticContent:Pe}=i,Ie=(re,ae,be,Fe=null,Ue=null,Ne=null,ht=void 0,ot=null,at=!!ae.dynamicChildren)=>{if(re===ae)return;re&&!Ya(re,ae)&&(Fe=De(re),Bi(re,Ue,Ne,!0),re=null),ae.patchFlag===-2&&(at=!1,ae.dynamicChildren=null);const{type:qe,ref:Ct,shapeFlag:mt}=ae;switch(qe){case Hd:rt(re,ae,be,Fe);break;case Qr:nt(re,ae,be,Fe);break;case ld:re==null&&Ae(ae,be,Fe,ht);break;case Zi:Xe(re,ae,be,Fe,Ue,Ne,ht,ot,at);break;default:mt&1?je(re,ae,be,Fe,Ue,Ne,ht,ot,at):mt&6?Et(re,ae,be,Fe,Ue,Ne,ht,ot,at):(mt&64||mt&128)&&qe.process(re,ae,be,Fe,Ue,Ne,ht,ot,at,vt)}Ct!=null&&Ue?oh(Ct,re&&re.ref,Ne,ae||re,!ae):Ct==null&&re&&re.ref!=null&&oh(re.ref,null,Ne,re,!0)},rt=(re,ae,be,Fe)=>{if(re==null)d(ae.el=a(ae.children),be,Fe);else{const Ue=ae.el=re.el;ae.children!==re.children&&D(Ue,ae.children)}},nt=(re,ae,be,Fe)=>{re==null?d(ae.el=M(ae.children||""),be,Fe):ae.el=re.el},Ae=(re,ae,be,Fe)=>{[re.el,re.anchor]=Pe(re.children,ae,be,Fe,re.el,re.anchor)},ke=({el:re,anchor:ae},be,Fe)=>{let Ue;for(;re&&re!==ae;)Ue=W(re),d(re,be,Fe),re=Ue;d(ae,be,Fe)},Te=({el:re,anchor:ae})=>{let be;for(;re&&re!==ae;)be=W(re),y(re),re=be;y(ae)},je=(re,ae,be,Fe,Ue,Ne,ht,ot,at)=>{ae.type==="svg"?ht="svg":ae.type==="math"&&(ht="mathml"),re==null?Ce(ae,be,Fe,Ue,Ne,ht,ot,at):Ge(re,ae,Ue,Ne,ht,ot,at)},Ce=(re,ae,be,Fe,Ue,Ne,ht,ot)=>{let at,qe;const{props:Ct,shapeFlag:mt,transition:Ot,dirs:Dt}=re;if(at=re.el=v(re.type,Ne,Ct&&Ct.is,Ct),mt&8?F(at,re.children):mt&16&&pt(re.children,at,null,Fe,Ue,Am(re,Ne),ht,ot),Dt&&Za(re,null,Fe,"created"),Re(at,re,re.scopeId,ht,Fe),Ct){for(const pi in Ct)pi!=="value"&&!rh(pi)&&w(at,pi,null,Ct[pi],Ne,Fe);"value"in Ct&&w(at,"value",null,Ct.value,Ne),(qe=Ct.onVnodeBeforeMount)&&ks(qe,Fe,re)}Dt&&Za(re,null,Fe,"beforeMount");const Yt=F3(Ue,Ot);Yt&&Ot.beforeEnter(at),d(at,ae,be),((qe=Ct&&Ct.onVnodeMounted)||Yt||Dt)&&An(()=>{qe&&ks(qe,Fe,re),Yt&&Ot.enter(at),Dt&&Za(re,null,Fe,"mounted")},Ue)},Re=(re,ae,be,Fe,Ue)=>{if(be&&G(re,be),Fe)for(let Ne=0;Ne<Fe.length;Ne++)G(re,Fe[Ne]);if(Ue){let Ne=Ue.subTree;if(ae===Ne||C2(Ne.type)&&(Ne.ssContent===ae||Ne.ssFallback===ae)){const ht=Ue.vnode;Re(re,ht,ht.scopeId,ht.slotScopeIds,Ue.parent)}}},pt=(re,ae,be,Fe,Ue,Ne,ht,ot,at=0)=>{for(let qe=at;qe<re.length;qe++){const Ct=re[qe]=ot?ea(re[qe]):Ds(re[qe]);Ie(null,Ct,ae,be,Fe,Ue,Ne,ht,ot)}},Ge=(re,ae,be,Fe,Ue,Ne,ht)=>{const ot=ae.el=re.el;let{patchFlag:at,dynamicChildren:qe,dirs:Ct}=ae;at|=re.patchFlag&16;const mt=re.props||ki,Ot=ae.props||ki;let Dt;if(be&&qa(be,!1),(Dt=Ot.onVnodeBeforeUpdate)&&ks(Dt,be,ae,re),Ct&&Za(ae,re,be,"beforeUpdate"),be&&qa(be,!0),(mt.innerHTML&&Ot.innerHTML==null||mt.textContent&&Ot.textContent==null)&&F(ot,""),qe?dt(re.dynamicChildren,qe,ot,be,Fe,Am(ae,Ue),Ne):ht||ni(re,ae,ot,null,be,Fe,Am(ae,Ue),Ne,!1),at>0){if(at&16)_t(ot,mt,Ot,be,Ue);else if(at&2&&mt.class!==Ot.class&&w(ot,"class",null,Ot.class,Ue),at&4&&w(ot,"style",mt.style,Ot.style,Ue),at&8){const Yt=ae.dynamicProps;for(let pi=0;pi<Yt.length;pi++){const hi=Yt[pi],de=mt[hi],$=Ot[hi];($!==de||hi==="value")&&w(ot,hi,de,$,Ue,be)}}at&1&&re.children!==ae.children&&F(ot,ae.children)}else!ht&&qe==null&&_t(ot,mt,Ot,be,Ue);((Dt=Ot.onVnodeUpdated)||Ct)&&An(()=>{Dt&&ks(Dt,be,ae,re),Ct&&Za(ae,re,be,"updated")},Fe)},dt=(re,ae,be,Fe,Ue,Ne,ht)=>{for(let ot=0;ot<ae.length;ot++){const at=re[ot],qe=ae[ot],Ct=at.el&&(at.type===Zi||!Ya(at,qe)||at.shapeFlag&198)?H(at.el):be;Ie(at,qe,Ct,null,Fe,Ue,Ne,ht,!0)}},_t=(re,ae,be,Fe,Ue)=>{if(ae!==be){if(ae!==ki)for(const Ne in ae)!rh(Ne)&&!(Ne in be)&&w(re,Ne,ae[Ne],null,Ue,Fe);for(const Ne in be){if(rh(Ne))continue;const ht=be[Ne],ot=ae[Ne];ht!==ot&&Ne!=="value"&&w(re,Ne,ot,ht,Ue,Fe)}"value"in be&&w(re,"value",ae.value,be.value,Ue)}},Xe=(re,ae,be,Fe,Ue,Ne,ht,ot,at)=>{const qe=ae.el=re?re.el:a(""),Ct=ae.anchor=re?re.anchor:a("");let{patchFlag:mt,dynamicChildren:Ot,slotScopeIds:Dt}=ae;Dt&&(ot=ot?ot.concat(Dt):Dt),re==null?(d(qe,be,Fe),d(Ct,be,Fe),pt(ae.children||[],be,Ct,Ue,Ne,ht,ot,at)):mt>0&&mt&64&&Ot&&re.dynamicChildren?(dt(re.dynamicChildren,Ot,be,Ue,Ne,ht,ot),(ae.key!=null||Ue&&ae===Ue.subTree)&&B2(re,ae,!0)):ni(re,ae,be,Ct,Ue,Ne,ht,ot,at)},Et=(re,ae,be,Fe,Ue,Ne,ht,ot,at)=>{ae.slotScopeIds=ot,re==null?ae.shapeFlag&512?Ue.ctx.activate(ae,be,Fe,ht,at):di(ae,be,Fe,Ue,Ne,ht,at):yi(re,ae,at)},di=(re,ae,be,Fe,Ue,Ne,ht)=>{const ot=re.component=n9(re,Fe,Ue);if(Ud(re)&&(ot.ctx.renderer=vt),s9(ot,!1,ht),ot.asyncDep){if(Ue&&Ue.registerDep(ot,qt,ht),!re.el){const at=ot.subTree=Wi(Qr);nt(null,at,ae,be),re.placeholder=at.el}}else qt(ot,re,ae,be,Ue,Ne,ht)},yi=(re,ae,be)=>{const Fe=ae.component=re.component;if(K3(re,ae,be))if(Fe.asyncDep&&!Fe.asyncResolved){It(Fe,ae,be);return}else Fe.next=ae,Fe.update();else ae.el=re.el,Fe.vnode=ae},qt=(re,ae,be,Fe,Ue,Ne,ht)=>{const ot=()=>{if(re.isMounted){let{next:mt,bu:Ot,u:Dt,parent:Yt,vnode:pi}=re;{const q=T2(re);if(q){mt&&(mt.el=pi.el,It(re,mt,ht)),q.asyncDep.then(()=>{re.isUnmounted||ot()});return}}let hi=mt,de;qa(re,!1),mt?(mt.el=pi.el,It(re,mt,ht)):mt=pi,Ot&&sd(Ot),(de=mt.props&&mt.props.onVnodeBeforeUpdate)&&ks(de,Yt,mt,pi),qa(re,!0);const $=Cy(re),U=re.subTree;re.subTree=$,Ie(U,$,H(U.el),De(U),re,Ue,Ne),mt.el=$.el,hi===null&&X3(re,$.el),Dt&&An(Dt,Ue),(de=mt.props&&mt.props.onVnodeUpdated)&&An(()=>ks(de,Yt,mt,pi),Ue)}else{let mt;const{el:Ot,props:Dt}=ae,{bm:Yt,m:pi,parent:hi,root:de,type:$}=re,U=yc(ae);qa(re,!1),Yt&&sd(Yt),!U&&(mt=Dt&&Dt.onVnodeBeforeMount)&&ks(mt,hi,ae),qa(re,!0);{de.ce&&de.ce._def.shadowRoot!==!1&&de.ce._injectChildStyle($);const q=re.subTree=Cy(re);Ie(null,q,be,Fe,re,Ue,Ne),ae.el=q.el}if(pi&&An(pi,Ue),!U&&(mt=Dt&&Dt.onVnodeMounted)){const q=ae;An(()=>ks(mt,hi,q),Ue)}(ae.shapeFlag&256||hi&&yc(hi.vnode)&&hi.vnode.shapeFlag&256)&&re.a&&An(re.a,Ue),re.isMounted=!0,ae=be=Fe=null}};re.scope.on();const at=re.effect=new Ib(ot);re.scope.off();const qe=re.update=at.run.bind(at),Ct=re.job=at.runIfDirty.bind(at);Ct.i=re,Ct.id=re.uid,at.scheduler=()=>Q0(Ct),qa(re,!0),qe()},It=(re,ae,be)=>{ae.component=re;const Fe=re.vnode.props;re.vnode=ae,re.next=null,A3(re,ae.props,Fe,be),D3(re,ae.children,be),bo(),yy(re),xo()},ni=(re,ae,be,Fe,Ue,Ne,ht,ot,at=!1)=>{const qe=re&&re.children,Ct=re?re.shapeFlag:0,mt=ae.children,{patchFlag:Ot,shapeFlag:Dt}=ae;if(Ot>0){if(Ot&128){ir(qe,mt,be,Fe,Ue,Ne,ht,ot,at);return}else if(Ot&256){Ft(qe,mt,be,Fe,Ue,Ne,ht,ot,at);return}}Dt&8?(Ct&16&&At(qe,Ue,Ne),mt!==qe&&F(be,mt)):Ct&16?Dt&16?ir(qe,mt,be,Fe,Ue,Ne,ht,ot,at):At(qe,Ue,Ne,!0):(Ct&8&&F(be,""),Dt&16&&pt(mt,be,Fe,Ue,Ne,ht,ot,at))},Ft=(re,ae,be,Fe,Ue,Ne,ht,ot,at)=>{re=re||mc,ae=ae||mc;const qe=re.length,Ct=ae.length,mt=Math.min(qe,Ct);let Ot;for(Ot=0;Ot<mt;Ot++){const Dt=ae[Ot]=at?ea(ae[Ot]):Ds(ae[Ot]);Ie(re[Ot],Dt,be,null,Ue,Ne,ht,ot,at)}qe>Ct?At(re,Ue,Ne,!0,!1,mt):pt(ae,be,Fe,Ue,Ne,ht,ot,at,mt)},ir=(re,ae,be,Fe,Ue,Ne,ht,ot,at)=>{let qe=0;const Ct=ae.length;let mt=re.length-1,Ot=Ct-1;for(;qe<=mt&&qe<=Ot;){const Dt=re[qe],Yt=ae[qe]=at?ea(ae[qe]):Ds(ae[qe]);if(Ya(Dt,Yt))Ie(Dt,Yt,be,null,Ue,Ne,ht,ot,at);else break;qe++}for(;qe<=mt&&qe<=Ot;){const Dt=re[mt],Yt=ae[Ot]=at?ea(ae[Ot]):Ds(ae[Ot]);if(Ya(Dt,Yt))Ie(Dt,Yt,be,null,Ue,Ne,ht,ot,at);else break;mt--,Ot--}if(qe>mt){if(qe<=Ot){const Dt=Ot+1,Yt=Dt<Ct?ae[Dt].el:Fe;for(;qe<=Ot;)Ie(null,ae[qe]=at?ea(ae[qe]):Ds(ae[qe]),be,Yt,Ue,Ne,ht,ot,at),qe++}}else if(qe>Ot)for(;qe<=mt;)Bi(re[qe],Ue,Ne,!0),qe++;else{const Dt=qe,Yt=qe,pi=new Map;for(qe=Yt;qe<=Ot;qe++){const fe=ae[qe]=at?ea(ae[qe]):Ds(ae[qe]);fe.key!=null&&pi.set(fe.key,qe)}let hi,de=0;const $=Ot-Yt+1;let U=!1,q=0;const se=new Array($);for(qe=0;qe<$;qe++)se[qe]=0;for(qe=Dt;qe<=mt;qe++){const fe=re[qe];if(de>=$){Bi(fe,Ue,Ne,!0);continue}let xe;if(fe.key!=null)xe=pi.get(fe.key);else for(hi=Yt;hi<=Ot;hi++)if(se[hi-Yt]===0&&Ya(fe,ae[hi])){xe=hi;break}xe===void 0?Bi(fe,Ue,Ne,!0):(se[xe-Yt]=qe+1,xe>=q?q=xe:U=!0,Ie(fe,ae[xe],be,null,Ue,Ne,ht,ot,at),de++)}const ce=U?N3(se):mc;for(hi=ce.length-1,qe=$-1;qe>=0;qe--){const fe=Yt+qe,xe=ae[fe],ge=ae[fe+1],Me=fe+1<Ct?ge.el||ge.placeholder:Fe;se[qe]===0?Ie(null,xe,be,Me,Ue,Ne,ht,ot,at):U&&(hi<0||qe!==ce[hi]?bi(xe,be,Me,2):hi--)}}},bi=(re,ae,be,Fe,Ue=null)=>{const{el:Ne,type:ht,transition:ot,children:at,shapeFlag:qe}=re;if(qe&6){bi(re.component.subTree,ae,be,Fe);return}if(qe&128){re.suspense.move(ae,be,Fe);return}if(qe&64){ht.move(re,ae,be,vt);return}if(ht===Zi){d(Ne,ae,be);for(let mt=0;mt<at.length;mt++)bi(at[mt],ae,be,Fe);d(re.anchor,ae,be);return}if(ht===ld){ke(re,ae,be);return}if(Fe!==2&&qe&1&&ot)if(Fe===0)ot.beforeEnter(Ne),d(Ne,ae,be),An(()=>ot.enter(Ne),Ue);else{const{leave:mt,delayLeave:Ot,afterLeave:Dt}=ot,Yt=()=>{re.ctx.isUnmounted?y(Ne):d(Ne,ae,be)},pi=()=>{Ne._isLeaving&&Ne[mo](!0),mt(Ne,()=>{Yt(),Dt&&Dt()})};Ot?Ot(Ne,Yt,pi):pi()}else d(Ne,ae,be)},Bi=(re,ae,be,Fe=!1,Ue=!1)=>{const{type:Ne,props:ht,ref:ot,children:at,dynamicChildren:qe,shapeFlag:Ct,patchFlag:mt,dirs:Ot,cacheIndex:Dt}=re;if(mt===-2&&(Ue=!1),ot!=null&&(bo(),oh(ot,null,be,re,!0),xo()),Dt!=null&&(ae.renderCache[Dt]=void 0),Ct&256){ae.ctx.deactivate(re);return}const Yt=Ct&1&&Ot,pi=!yc(re);let hi;if(pi&&(hi=ht&&ht.onVnodeBeforeUnmount)&&ks(hi,ae,re),Ct&6)ct(re.component,be,Fe);else{if(Ct&128){re.suspense.unmount(be,Fe);return}Yt&&Za(re,null,ae,"beforeUnmount"),Ct&64?re.type.remove(re,ae,be,vt,Fe):qe&&!qe.hasOnce&&(Ne!==Zi||mt>0&&mt&64)?At(qe,ae,be,!1,!0):(Ne===Zi&&mt&384||!Ue&&Ct&16)&&At(at,ae,be),Fe&&Ye(re)}(pi&&(hi=ht&&ht.onVnodeUnmounted)||Yt)&&An(()=>{hi&&ks(hi,ae,re),Yt&&Za(re,null,ae,"unmounted")},be)},Ye=re=>{const{type:ae,el:be,anchor:Fe,transition:Ue}=re;if(ae===Zi){gt(be,Fe);return}if(ae===ld){Te(re);return}const Ne=()=>{y(be),Ue&&!Ue.persisted&&Ue.afterLeave&&Ue.afterLeave()};if(re.shapeFlag&1&&Ue&&!Ue.persisted){const{leave:ht,delayLeave:ot}=Ue,at=()=>ht(be,Ne);ot?ot(re.el,Ne,at):at()}else Ne()},gt=(re,ae)=>{let be;for(;re!==ae;)be=W(re),y(re),re=be;y(ae)},ct=(re,ae,be)=>{const{bum:Fe,scope:Ue,job:Ne,subTree:ht,um:ot,m:at,a:qe}=re;Py(at),Py(qe),Fe&&sd(Fe),Ue.stop(),Ne&&(Ne.flags|=8,Bi(ht,re,ae,be)),ot&&An(ot,ae),An(()=>{re.isUnmounted=!0},ae)},At=(re,ae,be,Fe=!1,Ue=!1,Ne=0)=>{for(let ht=Ne;ht<re.length;ht++)Bi(re[ht],ae,be,Fe,Ue)},De=re=>{if(re.shapeFlag&6)return De(re.component.subTree);if(re.shapeFlag&128)return re.suspense.next();const ae=W(re.anchor||re.el),be=ae&&ae[r3];return be?W(be):ae};let ut=!1;const st=(re,ae,be)=>{re==null?ae._vnode&&Bi(ae._vnode,null,null,!0):Ie(ae._vnode||null,re,ae,null,null,null,be),ae._vnode=re,ut||(ut=!0,yy(),Jb(),ut=!1)},vt={p:Ie,um:Bi,m:bi,r:Ye,mt:di,mc:pt,pc:ni,pbc:dt,n:De,o:i};return{render:st,hydrate:void 0,createApp:E3(st)}}function Am({type:i,props:o},u){return u==="svg"&&i==="foreignObject"||u==="mathml"&&i==="annotation-xml"&&o&&o.encoding&&o.encoding.includes("html")?void 0:u}function qa({effect:i,job:o},u){u?(i.flags|=32,o.flags|=4):(i.flags&=-33,o.flags&=-5)}function F3(i,o){return(!i||i&&!i.pendingBranch)&&o&&!o.persisted}function B2(i,o,u=!1){const d=i.children,y=o.children;if(Gt(d)&&Gt(y))for(let w=0;w<d.length;w++){const v=d[w];let a=y[w];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=y[w]=ea(y[w]),a.el=v.el),!u&&a.patchFlag!==-2&&B2(v,a)),a.type===Hd&&a.patchFlag!==-1&&(a.el=v.el),a.type===Qr&&!a.el&&(a.el=v.el)}}function N3(i){const o=i.slice(),u=[0];let d,y,w,v,a;const M=i.length;for(d=0;d<M;d++){const D=i[d];if(D!==0){if(y=u[u.length-1],i[y]<D){o[d]=y,u.push(d);continue}for(w=0,v=u.length-1;w<v;)a=w+v>>1,i[u[a]]<D?w=a+1:v=a;D<i[u[w]]&&(w>0&&(o[d]=u[w-1]),u[w]=d)}}for(w=u.length,v=u[w-1];w-- >0;)u[w]=v,v=o[v];return u}function T2(i){const o=i.subTree.component;if(o)return o.asyncDep&&!o.asyncResolved?o:T2(o)}function Py(i){if(i)for(let o=0;o<i.length;o++)i[o].flags|=8}const $3=Symbol.for("v-scx"),U3=()=>zs($3);function na(i,o,u){return S2(i,o,u)}function S2(i,o,u=ki){const{immediate:d,deep:y,flush:w,once:v}=u,a=Lr({},u),M=o&&d||!o&&w!=="post";let D;if(wh){if(w==="sync"){const G=U3();D=G.__watcherHandles||(G.__watcherHandles=[])}else if(!M){const G=()=>{};return G.stop=Ls,G.resume=Ls,G.pause=Ls,G}}const F=en;a.call=(G,Pe,Ie)=>_s(G,F,Pe,Ie);let H=!1;w==="post"?a.scheduler=G=>{An(G,F&&F.suspense)}:w!=="sync"&&(H=!0,a.scheduler=(G,Pe)=>{Pe?G():Q0(G)}),a.augmentJob=G=>{o&&(G.flags|=4),H&&(G.flags|=2,F&&(G.id=F.uid,G.i=F))};const W=Q4(i,o,a);return wh&&(D?D.push(W):M&&W()),W}function V3(i,o,u){const d=this.proxy,y=ar(i)?i.includes(".")?O2(d,i):()=>d[i]:i.bind(d,d);let w;Qt(o)?w=o:(w=o.handler,u=o);const v=Ah(this),a=S2(y,w.bind(d),u);return v(),a}function O2(i,o){const u=o.split(".");return()=>{let d=i;for(let y=0;y<u.length&&d;y++)d=d[u[y]];return d}}const G3=(i,o)=>o==="modelValue"||o==="model-value"?i.modelModifiers:i[`${o}Modifiers`]||i[`${es(o)}Modifiers`]||i[`${nl(o)}Modifiers`];function H3(i,o,...u){if(i.isUnmounted)return;const d=i.vnode.props||ki;let y=u;const w=o.startsWith("update:"),v=w&&G3(d,o.slice(7));v&&(v.trim&&(y=u.map(F=>ar(F)?F.trim():F)),v.number&&(y=u.map(i0)));let a,M=d[a=Sm(o)]||d[a=Sm(es(o))];!M&&w&&(M=d[a=Sm(nl(o))]),M&&_s(M,i,6,y);const D=d[a+"Once"];if(D){if(!i.emitted)i.emitted={};else if(i.emitted[a])return;i.emitted[a]=!0,_s(D,i,6,y)}}const Z3=new WeakMap;function P2(i,o,u=!1){const d=u?Z3:o.emitsCache,y=d.get(i);if(y!==void 0)return y;const w=i.emits;let v={},a=!1;if(!Qt(i)){const M=D=>{const F=P2(D,o,!0);F&&(a=!0,Lr(v,F))};!u&&o.mixins.length&&o.mixins.forEach(M),i.extends&&M(i.extends),i.mixins&&i.mixins.forEach(M)}return!w&&!a?(Ki(i)&&d.set(i,null),null):(Gt(w)?w.forEach(M=>v[M]=null):Lr(v,w),Ki(i)&&d.set(i,v),v)}function Gd(i,o){return!i||!Rd(o)?!1:(o=o.slice(2).replace(/Once$/,""),Ci(i,o[0].toLowerCase()+o.slice(1))||Ci(i,nl(o))||Ci(i,o))}function Cy(i){const{type:o,vnode:u,proxy:d,withProxy:y,propsOptions:[w],slots:v,attrs:a,emit:M,render:D,renderCache:F,props:H,data:W,setupState:G,ctx:Pe,inheritAttrs:Ie}=i,rt=vd(i);let nt,Ae;try{if(u.shapeFlag&4){const Te=y||d,je=Te;nt=Ds(D.call(je,Te,F,H,G,W,Pe)),Ae=a}else{const Te=o;nt=Ds(Te.length>1?Te(H,{attrs:a,slots:v,emit:M}):Te(H,null)),Ae=o.props?a:q3(a)}}catch(Te){lh.length=0,$d(Te,i,1),nt=Wi(Qr)}let ke=nt;if(Ae&&Ie!==!1){const Te=Object.keys(Ae),{shapeFlag:je}=ke;Te.length&&je&7&&(w&&Te.some($0)&&(Ae=W3(Ae,w)),ke=aa(ke,Ae,!1,!0))}return u.dirs&&(ke=aa(ke,null,!1,!0),ke.dirs=ke.dirs?ke.dirs.concat(u.dirs):u.dirs),u.transition&&bh(ke,u.transition),nt=ke,vd(rt),nt}const q3=i=>{let o;for(const u in i)(u==="class"||u==="style"||Rd(u))&&((o||(o={}))[u]=i[u]);return o},W3=(i,o)=>{const u={};for(const d in i)(!$0(d)||!(d.slice(9)in o))&&(u[d]=i[d]);return u};function K3(i,o,u){const{props:d,children:y,component:w}=i,{props:v,children:a,patchFlag:M}=o,D=w.emitsOptions;if(o.dirs||o.transition)return!0;if(u&&M>=0){if(M&1024)return!0;if(M&16)return d?Ey(d,v,D):!!v;if(M&8){const F=o.dynamicProps;for(let H=0;H<F.length;H++){const W=F[H];if(v[W]!==d[W]&&!Gd(D,W))return!0}}}else return(y||a)&&(!a||!a.$stable)?!0:d===v?!1:d?v?Ey(d,v,D):!0:!!v;return!1}function Ey(i,o,u){const d=Object.keys(o);if(d.length!==Object.keys(i).length)return!0;for(let y=0;y<d.length;y++){const w=d[y];if(o[w]!==i[w]&&!Gd(u,w))return!0}return!1}function X3({vnode:i,parent:o},u){for(;o;){const d=o.subTree;if(d.suspense&&d.suspense.activeBranch===i&&(d.el=i.el),d===i)(i=o.vnode).el=u,o=o.parent;else break}}const C2=i=>i.__isSuspense;function Y3(i,o){o&&o.pendingBranch?Gt(i)?o.effects.push(...i):o.effects.push(i):i3(i)}const Zi=Symbol.for("v-fgt"),Hd=Symbol.for("v-txt"),Qr=Symbol.for("v-cmt"),ld=Symbol.for("v-stc"),lh=[];let Dn=null;function Pt(i=!1){lh.push(Dn=i?null:[])}function J3(){lh.pop(),Dn=lh[lh.length-1]||null}let xh=1;function Td(i,o=!1){xh+=i,i<0&&Dn&&o&&(Dn.hasOnce=!0)}function E2(i){return i.dynamicChildren=xh>0?Dn||mc:null,J3(),xh>0&&Dn&&Dn.push(i),i}function Lt(i,o,u,d,y,w){return E2(ue(i,o,u,d,y,w,!0))}function xc(i,o,u,d,y){return E2(Wi(i,o,u,d,y,!0))}function vh(i){return i?i.__v_isVNode===!0:!1}function Ya(i,o){return i.type===o.type&&i.key===o.key}const M2=({key:i})=>i??null,cd=({ref:i,ref_key:o,ref_for:u})=>(typeof i=="number"&&(i=""+i),i!=null?ar(i)||fr(i)||Qt(i)?{i:Hr,r:i,k:o,f:!!u}:i:null);function ue(i,o=null,u=null,d=0,y=null,w=i===Zi?0:1,v=!1,a=!1){const M={__v_isVNode:!0,__v_skip:!0,type:i,props:o,key:o&&M2(o),ref:o&&cd(o),scopeId:e2,slotScopeIds:null,children:u,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:w,patchFlag:d,dynamicProps:y,dynamicChildren:null,appContext:null,ctx:Hr};return a?(ng(M,u),w&128&&i.normalize(M)):u&&(M.shapeFlag|=ar(u)?8:16),xh>0&&!v&&Dn&&(M.patchFlag>0||w&6)&&M.patchFlag!==32&&Dn.push(M),M}const Wi=Q3;function Q3(i,o=null,u=null,d=0,y=null,w=!1){if((!i||i===u2)&&(i=Qr),vh(i)){const a=aa(i,o,!0);return u&&ng(a,u),xh>0&&!w&&Dn&&(a.shapeFlag&6?Dn[Dn.indexOf(i)]=a:Dn.push(a)),a.patchFlag=-2,a}if(u9(i)&&(i=i.__vccOpts),o){o=e9(o);let{class:a,style:M}=o;a&&!ar(a)&&(o.class=kn(a)),Ki(M)&&(X0(M)&&!Gt(M)&&(M=Lr({},M)),o.style=Yr(M))}const v=ar(i)?1:C2(i)?128:t2(i)?64:Ki(i)?4:Qt(i)?2:0;return ue(i,o,u,d,y,v,w,!0)}function e9(i){return i?X0(i)||_2(i)?Lr({},i):i:null}function aa(i,o,u=!1,d=!1){const{props:y,ref:w,patchFlag:v,children:a,transition:M}=i,D=o?t9(y||{},o):y,F={__v_isVNode:!0,__v_skip:!0,type:i.type,props:D,key:D&&M2(D),ref:o&&o.ref?u&&w?Gt(w)?w.concat(cd(o)):[w,cd(o)]:cd(o):w,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:a,target:i.target,targetStart:i.targetStart,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:o&&i.type!==Zi?v===-1?16:v|16:v,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:M,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&aa(i.ssContent),ssFallback:i.ssFallback&&aa(i.ssFallback),placeholder:i.placeholder,el:i.el,anchor:i.anch
vendor: 4,106 bytes, lines 13-16
13or,ctx:i.ctx,ce:i.ce};return M&&d&&bh(F,M.clone(F)),F}function Xn(i=" ",o=0){return Wi(Hd,null,i,o)}function My(i,o){const u=Wi(ld,null,i);return u.staticCount=o,u}function or(i="",o=!1){return o?(Pt(),xc(Qr,null,i)):Wi(Qr,null,i)}function Ds(i){return i==null||typeof i=="boolean"?Wi(Qr):Gt(i)?Wi(Zi,null,i.slice()):vh(i)?ea(i):Wi(Hd,null,String(i))}function ea(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:aa(i)}function ng(i,o){let u=0;const{shapeFlag:d}=i;if(o==null)o=null;else if(Gt(o))u=16;else if(typeof o=="object")if(d&65){const y=o.default;y&&(y._c&&(y._d=!1),ng(i,y()),y._c&&(y._d=!0));return}else{u=32;const y=o._;!y&&!_2(o)?o._ctx=Hr:y===3&&Hr&&(Hr.slots._===1?o._=1:(o._=2,i.patchFlag|=1024))}else Qt(o)?(o={default:o,_ctx:Hr},u=32):(o=String(o),d&64?(u=16,o=[Xn(o)]):u=8);i.children=o,i.shapeFlag|=u}function t9(...i){const o={};for(let u=0;u<i.length;u++){const d=i[u];for(const y in d)if(y==="class")o.class!==d.class&&(o.class=kn([o.class,d.class]));else if(y==="style")o.style=Yr([o.style,d.style]);else if(Rd(y)){const w=o[y],v=d[y];v&&w!==v&&!(Gt(w)&&w.includes(v))&&(o[y]=w?[].concat(w,v):v)}else y!==""&&(o[y]=d[y])}return o}function ks(i,o,u,d=null){_s(i,o,7,[u,d])}const i9=f2();let r9=0;function n9(i,o,u){const d=i.type,y=(o?o.appContext:i.appContext)||i9,w={uid:r9++,vnode:i,type:d,parent:o,appContext:y,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Cb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:o?o.provides:Object.create(y.provides),ids:o?o.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:b2(d,y),emitsOptions:P2(d,y),emit:null,emitted:null,propsDefaults:ki,inheritAttrs:d.inheritAttrs,ctx:ki,data:ki,props:ki,attrs:ki,slots:ki,refs:ki,setupState:ki,setupContext:null,suspense:u,suspenseId:u?u.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return w.ctx={_:w},w.root=o?o.root:w,w.emit=H3.bind(null,w),i.ce&&i.ce(w),w}let en=null;const Zd=()=>en||Hr;let Sd,h0;{const i=Fd(),o=(u,d)=>{let y;return(y=i[u])||(y=i[u]=[]),y.push(d),w=>{y.length>1?y.forEach(v=>v(w)):y[0](w)}};Sd=o("__VUE_INSTANCE_SETTERS__",u=>en=u),h0=o("__VUE_SSR_SETTERS__",u=>wh=u)}const Ah=i=>{const o=en;return Sd(i),i.scope.on(),()=>{i.scope.off(),Sd(o)}},Iy=()=>{en&&en.scope.off(),Sd(null)};function I2(i){return i.vnode.shapeFlag&4}let wh=!1;function s9(i,o=!1,u=!1){o&&h0(o);const{props:d,children:y}=i.vnode,w=I2(i);I3(i,d,w,o),R3(i,y,u||o);const v=w?o9(i,o):void 0;return o&&h0(!1),v}function o9(i,o){const u=i.type;i.accessCache=Object.create(null),i.proxy=new Proxy(i.ctx,w3);const{setup:d}=u;if(d){bo();const y=i.setupContext=d.length>1?l9(i):null,w=Ah(i),v=Ih(d,i,0,[i.props,y]),a=vb(v);if(xo(),w(),(a||i.sp)&&!yc(i)&&a2(i),a){if(v.then(Iy,Iy),o)return v.then(M=>{Ay(i,M)}).catch(M=>{$d(M,i,0)});i.asyncDep=v}else Ay(i,v)}else A2(i)}function Ay(i,o,u){Qt(o)?i.type.__ssrInlineRender?i.ssrRender=o:i.render=o:Ki(o)&&(i.setupState=Kb(o)),A2(i)}function A2(i,o,u){const d=i.type;i.render||(i.render=d.render||Ls);{const y=Ah(i);bo();try{B3(i)}finally{xo(),y()}}}const a9={get(i,o){return Jr(i,"get",""),i[o]}};function l9(i){const o=u=>{i.exposed=u||{}};return{attrs:new Proxy(i.attrs,a9),slots:i.slots,emit:i.emit,expose:o}}function qd(i){return i.exposed?i.exposeProxy||(i.exposeProxy=new Proxy(Kb(Y0(i.exposed)),{get(o,u){if(u in o)return o[u];if(u in ah)return ah[u](i)},has(o,u){return u in o||u in ah}})):i.proxy}function c9(i,o=!0){return Qt(i)?i.displayName||i.name:i.name||o&&i.__name}function u9(i){return Qt(i)&&"__vccOpts"in i}const _i=(i,o)=>Y4(i,o,wh);function la(i,o,u){const d=(w,v,a)=>{Td(-1);try{return Wi(w,v,a)}finally{Td(1)}},y=arguments.length;return y===2?Ki(o)&&!Gt(o)?vh(o)?d(i,null,[o]):d(i,o):d(i,null,o):(y>3?u=Array.prototype.slice.call(arguments,2):y===3&&vh(u)&&(u=[u]),d(i,o,u))}const h9="3.5.21";/**
14* @vue/runtime-dom v3.5.21
15* (c) 2018-present Yuxi (Evan) You and Vue contributors
16* @license MIT
17**/let p0;const jy=typeof window<"u"&&window.trustedTypes;if(jy)try{p0=jy.createPolicy("vue",{createHTML:i=>i})}catch{}const j2=p0?i=>p0.createHTML(i):i=>i,p9="http://www.w3.org/2000/svg",d9="http://www.w3.org/1998/Math/MathML",po=typeof document<"u"?document:null,ky=po&&po.createElement("template"),f9={insert:(i,o,u)=>{o.insertBefore(i,u||null)},remove:i=>{const o=i.parentNode;o&&o.removeChild(i)},createElement:(i,o,u,d)=>{const y=o==="svg"?po.createElementNS(p9,i):o==="mathml"?po.createElementNS(d9,i):u?po.createElement(i,{is:u}):po.createElement(i);return i==="select"&&d&&d.multiple!=null&&y.setAttribute("multiple",d.multiple),y},createText:i=>po.createTextNode(i),createComment:i=>po.createComment(i),setText:(i,o)=>{i.nodeValue=o},setElementText:(i,o)=>{i.textContent=o},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>po.querySelector(i),setScopeId(i,o){i.setAttribute(o,"")},insertStaticContent(i,o,u,d,y,w){const v=u?u.previousSibling:o.lastChild;if(y&&(y===w||y.nextSibling))for(;o.insertBefore(y.cloneNode(!0),u),!(y===w||!(y=y.nextSibling)););else{ky.innerHTML=j2(d==="svg"?`<svg>${i}</svg>`:d==="mathml"?`<math>${i}</math>`:i);const a=ky.content;if(d==="svg"||d==="mathml"){const M=a.firstChild;for(;M.firstChild;)a.appendChild(M.firstChild);a.removeChild(M)}o.insertBefore(a,u)}return[v?v.nextSibling:o.firstChild,u?u.previousSibling:o.lastChild]}},Ko="transition",Xu="animation",Bh=Symbol("_vtc"),k2={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},m9=Lr({},i2,k2),g9=i=>(i.displayName="Transition",i.props=m9,i),_9=g9((i,{slots:o})=>la(o3,y9(i),o)),Wa=(i,o=[])=>{Gt(i)?i.forEach(u=>u(...o)):i&&i(...o)},Ry=i=>i?Gt(i)?i.some(o=>o.length>1):i.length>1:!1;function y9(i){const o={};for(const Xe in i)Xe in k2||(o[Xe]=i[Xe]);if(i.css===!1)return o;const{name:u="v",type:d,duration:y,enterFromClass:w=`${u}-enter-from`,enterActiveClass:v=`${u}-enter-active`,enterToClass:a=`${u}-enter-to`,appearFromClass:M=w,appearActiveClass:D=v,appearToClass:F=a,leaveFromClass:H=`${u}-leave-from`,leaveActiveClass:W=`${u}-leave-active`,leaveToClass:G=`${u}-leave-to`}=i,Pe=b9(y),Ie=Pe&&Pe[0],rt=Pe&&Pe[1],{onBeforeEnter:nt,onEnter:Ae,onEnterCancelled:ke,onLeave:Te,onLeaveCancelled:je,onBeforeAppear:Ce=nt,onAppear:Re=Ae,onAppearCancelled:pt=ke}=o,Ge=(Xe,Et,di,yi)=>{Xe._enterCancelled=yi,Ka(Xe,Et?F:a),Ka(Xe,Et?D:v),di&&di()},dt=(Xe,Et)=>{Xe._isLeaving=!1,Ka(Xe,H),Ka(Xe,G),Ka(Xe,W),Et&&Et()},_t=Xe=>(Et,di)=>{const yi=Xe?Re:Ae,qt=()=>Ge(Et,Xe,di);Wa(yi,[Et,qt]),Dy(()=>{Ka(Et,Xe?M:w),uo(Et,Xe?F:a),Ry(yi)||Ly(Et,d,Ie,qt)})};return Lr(o,{onBeforeEnter(Xe){Wa(nt,[Xe]),uo(Xe,w),uo(Xe,v)},onBeforeAppear(Xe){Wa(Ce,[Xe]),uo(Xe,M),uo(Xe,D)},onEnter:_t(!1),onAppear:_t(!0),onLeave(Xe,Et){Xe._isLeaving=!0;const di=()=>dt(Xe,Et);uo(Xe,H),Xe._enterCancelled?(uo(Xe,W),Ny()):(Ny(),uo(Xe,W)),Dy(()=>{Xe._isLeaving&&(Ka(Xe,H),uo(Xe,G),Ry(Te)||Ly(Xe,d,rt,di))}),Wa(Te,[Xe,di])},onEnterCancelled(Xe){Ge(Xe,!1,void 0,!0),Wa(ke,[Xe])},onAppearCancelled(Xe){Ge(Xe,!0,void 0,!0),Wa(pt,[Xe])},onLeaveCancelled(Xe){dt(Xe),Wa(je,[Xe])}})}function b9(i){if(i==null)return null;if(Ki(i))return[jm(i.enter),jm(i.leave)];{const o=jm(i);return[o,o]}}function jm(i){return y4(i)}function uo(i,o){o.split(/\s+/).forEach(u=>u&&i.classList.add(u)),(i[Bh]||(i[Bh]=new Set)).add(o)}function Ka(i,o){o.split(/\s+/).forEach(d=>d&&i.classList.remove(d));const u=i[Bh];u&&(u.delete(o),u.size||(i[Bh]=void 0))}function Dy(i){requestAnimationFrame(()=>{requestAnimationFrame(i)})}let x9=0;function Ly(i,o,u,d){const y=i._endId=++x9,w=()=>{y===i._endId&&d()};if(u!=null)return setTimeout(w,u);const{type:v,timeout:a,propCount:M}=v9(i,o);if(!v)return d();const D=v+"end";let F=0;const H=()=>{i.removeEventListener(D,W),w()},W=G=>{G.target===i&&++F>=M&&H()};setTimeout(()=>{F<M&&H()},a+1),i.addEventListener(D,W)}function v9(i,o){const u=window.getComputedStyle(i),d=Pe=>(u[Pe]||"").split(", "),y=d(`${Ko}Delay`),w=d(`${Ko}Duration`),v=zy(y,w),a=d(`${Xu}Delay`),M=d(`${Xu}Duration`),D=zy(a,M);let F=null,H=0,W=0;o===Ko?v>0&&(F=Ko,H=v,W=w.length):o===Xu?D>0&&(F=Xu,H=D,W=M.length):(H=Math.max(v,D),F=H>0?v>D?Ko:Xu:null,W=F?F===Ko?w.length:M.length:0);const G=F===Ko&&/\b(?:transform|all)(?:,|$)/.test(d(`${Ko}
17Property`).toString());return{type:F,timeout:H,propCount:W,hasTransform:G}}function zy(i,o){for(;i.length<o.length;)i=i.concat(i);return Math.max(...o.map((u,d)=>Fy(u)+Fy(i[d])))}function Fy(i){return i==="auto"?0:Number(i.slice(0,-1).replace(",","."))*1e3}function Ny(){return document.body.offsetHeight}function w9(i,o,u){const d=i[Bh];d&&(o=(o?[o,...d]:[...d]).join(" ")),o==null?i.removeAttribute("class"):u?i.setAttribute("class",o):i.className=o}const Od=Symbol("_vod"),R2=Symbol("_vsh"),B9={name:"show",beforeMount(i,{value:o},{transition:u}){i[Od]=i.style.display==="none"?"":i.style.display,u&&o?u.beforeEnter(i):Yu(i,o)},mounted(i,{value:o},{transition:u}){u&&o&&u.enter(i)},updated(i,{value:o,oldValue:u},{transition:d}){!o!=!u&&(d?o?(d.beforeEnter(i),Yu(i,!0),d.enter(i)):d.leave(i,()=>{Yu(i,!1)}):Yu(i,o))},beforeUnmount(i,{value:o}){Yu(i,o)}};function Yu(i,o){i.style.display=o?i[Od]:"none",i[R2]=!o}const T9=Symbol(""),S9=/(?:^|;)\s*display\s*:/;function O9(i,o,u){const d=i.style,y=ar(u);let w=!1;if(u&&!y){if(o)if(ar(o))for(const v of o.split(";")){const a=v.slice(0,v.indexOf(":")).trim();u[a]==null&&ud(d,a,"")}else for(const v in o)u[v]==null&&ud(d,v,"");for(const v in u)v==="display"&&(w=!0),ud(d,v,u[v])}else if(y){if(o!==u){const v=d[T9];v&&(u+=";"+v),d.cssText=u,w=S9.test(u)}}else o&&i.removeAttribute("style");Od in i&&(i[Od]=w?d.display:"",i[R2]&&(d.display="none"))}const $y=/\s*!important$/;function ud(i,o,u){if(Gt(u))u.forEach(d=>ud(i,o,d));else if(u==null&&(u=""),o.startsWith("--"))i.setProperty(o,u);else{const d=P9(i,o);$y.test(u)?i.setProperty(nl(d),u.replace($y,""),"important"):i[d]=u}}const Uy=["Webkit","Moz","ms"],km={};function P9(i,o){const u=km[o];if(u)return u;let d=es(o);if(d!=="filter"&&d in i)return km[o]=d;d=zd(d);for(let y=0;y<Uy.length;y++){const w=Uy[y]+d;if(w in i)return km[o]=w}return o}const Vy="http://www.w3.org/1999/xlink";function Gy(i,o,u,d,y,w=T4(o)){d&&o.startsWith("xlink:")?u==null?i.removeAttributeNS(Vy,o.slice(6,o.length)):i.setAttributeNS(Vy,o,u):u==null||w&&!Sb(u)?i.removeAttribute(o):i.setAttribute(o,w?"":vo(u)?String(u):u)}function Hy(i,o,u,d,y){if(o==="innerHTML"||o==="textContent"){u!=null&&(i[o]=o==="innerHTML"?j2(u):u);return}const w=i.tagName;if(o==="value"&&w!=="PROGRESS"&&!w.includes("-")){const a=w==="OPTION"?i.getAttribute("value")||"":i.value,M=u==null?i.type==="checkbox"?"on":"":String(u);(a!==M||!("_value"in i))&&(i.value=M),u==null&&i.removeAttribute(o),i._value=u;return}let v=!1;if(u===""||u==null){const a=typeof i[o];a==="boolean"?u=Sb(u):u==null&&a==="string"?(u="",v=!0):a==="number"&&(u=0,v=!0)}try{i[o]=u}catch{}v&&i.removeAttribute(y||o)}function uc(i,o,u,d){i.addEventListener(o,u,d)}function C9(i,o,u,d){i.removeEventListener(o,u,d)}const Zy=Symbol("_vei");function E9(i,o,u,d,y=null){const w=i[Zy]||(i[Zy]={}),v=w[o];if(d&&v)v.value=d;else{const[a,M]=M9(o);if(d){const D=w[o]=j9(d,y);uc(i,a,D,M)}else v&&(C9(i,a,v,M),w[o]=void 0)}}const qy=/(?:Once|Passive|Capture)$/;function M9(i){let o;if(qy.test(i)){o={};let d;for(;d=i.match(qy);)i=i.slice(0,i.length-d[0].length),o[d[0].toLowerCase()]=!0}return[i[2]===":"?i.slice(3):nl(i.slice(2)),o]}let Rm=0;const I9=Promise.resolve(),A9=()=>Rm||(I9.then(()=>Rm=0),Rm=Date.now());function j9(i,o){const u=d=>{if(!d._vts)d._vts=Date.now();else if(d._vts<=u.attached)return;_s(k9(d,u.value),o,5,[d])};return u.value=i,u.attached=A9(),u}function k9(i,o){if(Gt(o)){const u=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{u.call(i),i._stopped=!0},o.map(d=>y=>!y._stopped&&d&&d(y))}else return o}const Wy=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,R9=(i,o,u,d,y,w)=>{const v=y==="svg";o==="class"?w9(i,d,v):o==="style"?O9(i,u,d):Rd(o)?$0(o)||E9(i,o,u,d,w):(o[0]==="."?(o=o.slice(1),!0):o[0]==="^"?(o=o.slice(1),!1):D9(i,o,d,v))?(Hy(i,o,d),!i.tagName.includes("-")&&(o==="value"||o==="checked"||o==="selected")&&Gy(i,o,d,v,w,o!=="value")):i._isVueCE&&(/[A-Z]/.test(o)||!ar(d))?Hy(i,es(o),d,w,o):(o==="true-value"?i._trueValue=d:o==="false-value"&&(i._falseValue=d),Gy(i,o,d,v))};function D9(i,o,u,d){if(d)return!!(o==="innerHTML"||o==="textContent"||o in i&&Wy(o)&&Qt(u));if(o==="spellcheck"||o==="draggable"||o==="translate"||o==="autocorrect"||o==="form"||o==="list"&&i.tagName==="INPUT"||o==="type"&&i.tagName==="TEXTAREA")return!1;if(o==="width"||o==="height"){const y=i.tagName;if(y==="IMG"||y==="VIDEO"||y==="CANVAS"||y==="SOURCE")return!1}return Wy(o)&&ar(u)?!1:o in i}const Ky=i=>{const o=i.props["onUpdate:modelValue"]||!1;return Gt(o)?u=>sd(o,u):o};function L9(i){i.target.composing=!0}function Xy(i){const o=i.target;o.composing&&(o.composing=!1,o.dispatchEvent(new Event("input")))}const Dm=Symbol("_assign"),Lm={created(i,{modifiers:{lazy:o,trim:u,number:d}},y){i[Dm]=Ky(y);const w=d||y.props&&y.props.type==="number";uc(i,o?"change":"input",v=>{if(v.target.composing)return;let a=i.value;u&&(a=a.trim()),w&&(a=i0(a)),i[Dm](a)}),u&&uc(i,"change",()=>{i.value=i.value.trim()}),o||(uc(i,"compositionstart",L9),uc(i,"compositionend",Xy),uc(i,"change",Xy))},mounted(i,{value:o}){i.value=o??""},beforeUpdate(i,{value:o,oldValue:u,modifiers:{lazy:d,trim:y,number:w}},v){if(i[Dm]=Ky(v),i.composing)return;const a=(w||i.type==="number")&&!/^0\d/.test(i.value)?i0(i.value):i.value,M=o??"";a!==M&&(document.activeElement===i&&i.type!=="range"&&(d&&o===u||y&&i.value.trim()===M)||(i.value=M))}},z9=["ctrl","shift","alt","meta"],F9={stop:i=>i.stopPropagation(),prevent:i=>i.preventDefault(),self:i=>i.target!==i.currentTarget,ctrl:i=>!i.ctrlKey,shift:i=>!i.shiftKey,alt:i=>!i.altKey,meta:i=>!i.metaKey,left:i=>"button"in i&&i.button!==0,middle:i=>"button"in i&&i.button!==1,right:i=>"button"in i&&i.button!==2,exact:(i,o)=>z9.some(u=>i[`${u}Key`]&&!o.includes(u))},zm=(i,o)=>{const u=i._withMods||(i._withMods={}),d=o.join(".");return u[d]||(u[d]=((y,...w)=>{for(let v=0;v<o.length;v++){const a=F9[o[v]];if(a&&a(y,o))return}return i(y,...w)}))},N9=Lr({patchProp:R9},f9);let Yy;function D2(){return Yy||(Yy=L3(N9))}const Jy=((...i)=>{D2().render(...i)}),$9=((...i)=>{const o=D2().createApp(...i),{mount:u}=o;return o.mount=d=>{const y=V9(d);if(!y)return;const w=o._component;!Qt(w)&&!w.render&&!w.template&&(w.template=y.innerHTML),y.nodeType===1&&(y.textContent="");const v=u(y,!1,U9(y));return y instanceof Element&&(y.removeAttribute("v-cloak"),y.setAttribute("data-v-app","")),v},o});function U9(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function V9(i){return ar(i)?document.querySelector(i):i}/*!
18 * pinia v3.0.3
19 * (c) 2025 Eduardo San Martin Morote
20 * @license MIT
21 */let L2;const Wd=i=>L2=i,z2=Symbol();function d0(i){return i&&typeof i=="object"&&Object.prototype.toString.call(i)==="[object Object]"&&typeof i.toJSON!="function"}var ch;(function(i){i.direct="direct",i.patchObject="patch object",i.patchFunction="patch function"})(ch||(ch={}));function G9(){const i=Eb(!0),o=i.run(()=>vi({}));let u=[],d=[];const y=Y0({install(w){Wd(y),y._a=w,w.provide(z2,y),w.config.globalProperties.$pinia=y,d.forEach(v=>u.push(v)),d=[]},use(w){return this._a?u.push(w):d.push(w),this},_p:u,_a:null,_e:i,_s:new Map,state:o});return y}const F2=()=>{};function Qy(i,o,u,d=F2){i.push(o);const y=()=>{const w=i.indexOf(o);w>-1&&(i.splice(w,1),d())};return!u&&Mb()&&S4(y),y}
21function lc(i,...o){i.slice().forEach(u=>{u(...o)})}const H9=i=>i(),e1=Symbol(),Fm=Symbol();function f0(i,o){i instanceof Map&&o instanceof Map?o.forEach((u,d)=>i.set(d,u)):i instanceof Set&&o instanceof Set&&o.forEach(i.add,i);for(const u in o){if(!o.hasOwnProperty(u))continue;const d=o[u],y=i[u];d0(y)&&d0(d)&&i.hasOwnProperty(u)&&!fr(d)&&!ra(d)?i[u]=f0(y,d):i[u]=d}return i}const Z9=Symbol();function q9(i){return!d0(i)||!Object.prototype.hasOwnProperty.call(i,Z9)}const{assign:Jo}=Object;function W9(i){return!!(fr(i)&&i.effect)}function K9(i,o,u,d){const{state:y,actions:w,getters:v}=o,a=u.state.value[i];let M;function D(){a||(u.state.value[i]=y?y():{});const F=q4(u.state.value[i]);return Jo(F,w,Object.keys(v||{}).reduce((H,W)=>(H[W]=Y0(_i(()=>{Wd(u);const G=u._s.get(i);return v[W].call(G,G)})),H),{}))}return M=N2(i,D,o,u,d,!0),M}function N2(i,o,u={},d,y,w){let v;const a=Jo({actions:{}},u),M={deep:!0};let D,F,H=[],W=[],G;const Pe=d.state.value[i];!w&&!Pe&&(d.state.value[i]={}),vi({});let Ie;function rt(pt){let Ge;D=F=!1,typeof pt=="function"?(pt(d.state.value[i]),Ge={type:ch.patchFunction,storeId:i,events:G}):(f0(d.state.value[i],pt),Ge={type:ch.patchObject,payload:pt,storeId:i,events:G});const dt=Ie=Symbol();J0().then(()=>{Ie===dt&&(D=!0)}),F=!0,lc(H,Ge,d.state.value[i])}const nt=w?function(){const{state:Ge}=u,dt=Ge?Ge():{};this.$patch(_t=>{Jo(_t,dt)})}:F2;function Ae(){v.stop(),H=[],W=[],d._s.delete(i)}const ke=(pt,Ge="")=>{if(e1 in pt)return pt[Fm]=Ge,pt;const dt=function(){Wd(d);const _t=Array.from(arguments),Xe=[],Et=[];function di(It){Xe.push(It)}function yi(It){Et.push(It)}lc(W,{args:_t,name:dt[Fm],store:je,after:di,onError:yi});let qt;try{qt=pt.apply(this&&this.$id===i?this:je,_t)}catch(It){throw lc(Et,It),It}return qt instanceof Promise?qt.then(It=>(lc(Xe,It),It)).catch(It=>(lc(Et,It),Promise.reject(It))):(lc(Xe,qt),qt)};return dt[e1]=!0,dt[Fm]=Ge,dt},Te={_p:d,$id:i,$onAction:Qy.bind(null,W),$patch:rt,$reset:nt,$subscribe(pt,Ge={}){const dt=Qy(H,pt,Ge.detached,()=>_t()),_t=v.run(()=>na(()=>d.state.value[i],Xe=>{(Ge.flush==="sync"?F:D)&&pt({storeId:i,type:ch.direct,events:G},Xe)},Jo({},M,Ge)));return dt},$dispose:Ae},je=Mh(Te);d._s.set(i,je);const Re=(d._a&&d._a.runWithContext||H9)(()=>d._e.run(()=>(v=Eb()).run(()=>o({action:ke}))));for(const pt in Re){const Ge=Re[pt];if(fr(Ge)&&!W9(Ge)||ra(Ge))w||(Pe&&q9(Ge)&&(fr(Ge)?Ge.value=Pe[pt]:f0(Ge,Pe[pt])),d.state.value[i][pt]=Ge);else if(typeof Ge=="function"){const dt=ke(Ge,pt);Re[pt]=dt,a.actions[pt]=Ge}}return Jo(je,Re),Jo(xi(je),Re),Object.defineProperty(je,"$state",{get:()=>d.state.value[i],set:pt=>{rt(Ge=>{Jo(Ge,pt)})}}),d._p.forEach(pt=>{Jo(je,v.run(()=>pt({store:je,app:d._a,pinia:d,options:a})))}),Pe&&w&&u.hydrate&&u.hydrate(je.$state,Pe),D=!0,F=!0,je}/*! #__NO_SIDE_EFFECTS__ */function Kd(i,o,u){let d;const y=typeof o=="function";d=y?u:o;function w(v,a){const M=M3();return v=v||(M?zs(z2,null):null),v&&Wd(v),v=L2,v._s.has(i)||(y?N2(i,o,d,v):K9(i,d,v)),v._s.get(i)}return w.$id=i,w}const $t=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ri=globalThis,tl="10.13.0";function Ec(){return Xd(Ri),Ri}function Xd(i){const o=i.__SENTRY__=i.__SENTRY__||{};return o.version=o.version||tl,o[tl]=o[tl]||{}}function jh(i,o,u=Ri){const d=u.__SENTRY__=u.__SENTRY__||{},y=d[tl]=d[tl]||{};return y[i]||(y[i]=o())}const X9=["debug","info","warn","error","log","assert","trace"],Y9="Sentry Logger ",Pd={};function ha(i){if(!("console"in Ri))return i();const o=Ri.console,u={},d=Object.keys(Pd);d.forEach(y=>{const w=Pd[y];u[y]=o[y],o[y]=w});try{return i()}finally{d.forEach(y=>{o[y]=u[y]})}}function J9(){og().enabled=!0}function Q9(){og().enabled=!1}function $2(){return og().enabled}function e6(...i){sg("log",...i)}function t6(...i){sg("warn",...i)}function i6(...i){sg("error",...i)}function sg(i,...o){$t&&$2()&&ha(()=>{Ri.console[i](`${Y9}[${i}]:`,...o)})}function og(){return $t?jh("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const jt={enable:J9,disable:Q9,isEnabled:$2,log:e6,warn:t6,error:i6},U2=50,il="?",t1=/\(error: (.*)\)/,i1=/captureMessage|captureException/;function V2(...i){const o=i.sort((u,d)=>u[0]-d[0]).map(u=>u[1]);return(u,d=0,y=0)=>{const w=[],v=u.split(`
22`);for(let a=d;a<v.length;a++){let M=v[a];M.length>1024&&(M=M.slice(0,1024));const D=t1.test(M)?M.replace(t1,"$1"):M;if(!D.match(/\S*Error: /)){for(const F of o){const H=F(D);if(H){w.push(H);break}}if(w.length>=U2+y)break}}return n6(w.slice(y))}}
vendor: 5,716 bytes, lines 22-25
22function r6(i){return Array.isArray(i)?V2(...i):i}function n6(i){if(!i.length)return[];const o=Array.from(i);return/sentryWrapped/.test(Qp(o).function||"")&&o.pop(),o.reverse(),i1.test(Qp(o).function||"")&&(o.pop(),i1.test(Qp(o).function||"")&&o.pop()),o.slice(0,U2).map(u=>({...u,filename:u.filename||Qp(o).filename,function:u.function||il}))}function Qp(i){return i[i.length-1]||{}}const Nm="<anonymous>";function ca(i){try{return!i||typeof i!="function"?Nm:i.name||Nm}catch{return Nm}}function r1(i){const o=i.exception;if(o){const u=[];try{return o.values.forEach(d=>{d.stacktrace.frames&&u.push(...d.stacktrace.frames)}),u}catch{return}}}const hd={},n1={};function sl(i,o){hd[i]=hd[i]||[],hd[i].push(o)}function ol(i,o){if(!n1[i]){n1[i]=!0;try{o()}catch(u){$t&&jt.error(`Error while instrumenting ${i}`,u)}}}function gs(i,o){const u=i&&hd[i];if(u)for(const d of u)try{d(o)}catch(y){$t&&jt.error(`Error while triggering instrumentation handler.
23Type: ${i}
24Name: ${ca(d)}
25Error:`,y)}}let $m=null;function s6(i){const o="error";sl(o,i),ol(o,o6)}function o6(){$m=Ri.onerror,Ri.onerror=function(i,o,u,d,y){return gs("error",{column:d,error:y,line:u,msg:i,url:o}),$m?$m.apply(this,arguments):!1},Ri.onerror.__SENTRY_INSTRUMENTED__=!0}let Um=null;function a6(i){const o="unhandledrejection";sl(o,i),ol(o,l6)}function l6(){Um=Ri.onunhandledrejection,Ri.onunhandledrejection=function(i){return gs("unhandledrejection",i),Um?Um.apply(this,arguments):!0},Ri.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const G2=Object.prototype.toString;function ag(i){switch(G2.call(i)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ua(i,Error)}}function Mc(i,o){return G2.call(i)===`[object ${o}]`}function H2(i){return Mc(i,"ErrorEvent")}function s1(i){return Mc(i,"DOMError")}function c6(i){return Mc(i,"DOMException")}function yo(i){return Mc(i,"String")}function lg(i){return typeof i=="object"&&i!==null&&"__sentry_template_string__"in i&&"__sentry_template_values__"in i}function cg(i){return i===null||lg(i)||typeof i!="object"&&typeof i!="function"}function Th(i){return Mc(i,"Object")}function Yd(i){return typeof Event<"u"&&ua(i,Event)}function u6(i){return typeof Element<"u"&&ua(i,Element)}function h6(i){return Mc(i,"RegExp")}function kh(i){return!!(i?.then&&typeof i.then=="function")}function p6(i){return Th(i)&&"nativeEvent"in i&&"preventDefault"in i&&"stopPropagation"in i}function ua(i,o){try{return i instanceof o}catch{return!1}}function Z2(i){return!!(typeof i=="object"&&i!==null&&(i.__isVue||i._isVue))}function d6(i){return typeof Request<"u"&&ua(i,Request)}const ug=Ri,f6=80;function q2(i,o={}){if(!i)return"<unknown>";try{let u=i;const d=5,y=[];let w=0,v=0;const a=" > ",M=a.length;let D;const F=Array.isArray(o)?o:o.keyAttrs,H=!Array.isArray(o)&&o.maxStringLength||f6;for(;u&&w++<d&&(D=m6(u,F),!(D==="html"||w>1&&v+y.length*M+D.length>=H));)y.push(D),v+=D.length,u=u.parentNode;return y.reverse().join(a)}catch{return"<unknown>"}}function m6(i,o){const u=i,d=[];if(!u?.tagName)return"";if(ug.HTMLElement&&u instanceof HTMLElement&&u.dataset){if(u.dataset.sentryComponent)return u.dataset.sentryComponent;if(u.dataset.sentryElement)return u.dataset.sentryElement}d.push(u.tagName.toLowerCase());const y=o?.length?o.filter(v=>u.getAttribute(v)).map(v=>[v,u.getAttribute(v)]):null;if(y?.length)y.forEach(v=>{d.push(`[${v[0]}="${v[1]}"]`)});else{u.id&&d.push(`#${u.id}`);const v=u.className;if(v&&yo(v)){const a=v.split(/\s+/);for(const M of a)d.push(`.${M}`)}}const w=["aria-label","type","name","title","alt"];for(const v of w){const a=u.getAttribute(v);a&&d.push(`[${v}="${a}"]`)}return d.join("")}function hg(){try{return ug.document.location.href}catch{return""}}function g6(i){if(!ug.HTMLElement)return null;let o=i;const u=5;for(let d=0;d<u;d++){if(!o)return null;if(o instanceof HTMLElement){if(o.dataset.sentryComponent)return o.dataset.sentryComponent;if(o.dataset.sentryElement)return o.dataset.sentryElement}o=o.parentNode}return null}function Cd(i,o=0){return typeof i!="string"||o===0||i.length<=o?i:`${i.slice(0,o)}...`}function o1(i,o){if(!Array.isArray(i))return"";const u=[];for(let d=0;d<i.length;d++){const y=i[d];try{Z2(y)?u.push("[VueViewModel]"):u.push(String(y))}catch{u.push("[value cannot be serialized]")}}return u.join(o)}function pd(i,o,u=!1){return yo(i)?h6(o)?o.test(i):yo(o)?u?i===o:i.includes(o):!1:!1}function Jd(i,o=[],u=!1){return o.some(d=>pd(i,d,u))}function Ln(i,o,u){if(!(o in i))return;const d=i[o];if(typeof d!="function")return;const y=u(d);typeof y=="function"&&W2(y,d);try{i[o]=y}catch{$t&&jt.log(`Failed to replace method "${o}" in object`,i)}}function ts(i,o,u){try{Object.defineProperty(i,o,{value:u,writable:!0,configurable:!0})}catch{$t&&jt.log(`Failed to add non-enumerable property "${o}" to object`,i)}}function W2(i,o){try{const u=o.prototype||{};i.prototype=o.prototype=u,ts(i,"__sentry_original__",o)}catch{}}function pg(i){return i.__sentry_original__}function K2(i){if(ag(i))return{message:i.message,name:i.name,stack:i.stack,...l1(i)};if(Yd(i)){const o={type:i.type,target:a1(i.target),currentTarget:a1(i.currentTarget),...l1(i)};return typeof CustomEvent<"u"&&ua(i,CustomEvent)&&(o.detail=i.detail),o}else return i}function a1(i){try{return u6(i)?q2(i):Object.prototype.toString.call(i)}catch{return"<unknown>"}}function l1(i){if(typeof i=="object"&&i!==null){const o={};for(const u in i)Object.prototype.hasOwnProperty.call(i,u)&&(o[u]=i[u]);return o}else return{}}function _6(i,o=40){const u=Object.keys(K2(i));u.sort();const d=u[0];if(!d)return"[object has no keys]";if(d.length>=o)return Cd(d,o);for(let y=u.length;y>0;y--){const w=u.slice(0,y).join(", ");
25if(!(w.length>o))return y===u.length?w:Cd(w,o)}return""}function y6(){const i=Ri;return i.crypto||i.msCrypto}function Jn(i=y6()){let o=()=>Math.random()*16;try{if(i?.randomUUID)return i.randomUUID().replace(/-/g,"");i?.getRandomValues&&(o=()=>{const u=new Uint8Array(1);return i.getRandomValues(u),u[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,u=>(u^(o()&15)>>u/4).toString(16))}function X2(i){return i.exception?.values?.[0]}function Ja(i){const{message:o,event_id:u}=i;if(o)return o;const d=X2(i);return d?d.type&&d.value?`${d.type}: ${d.value}`:d.type||d.value||u||"<unknown>":u||"<unknown>"}function m0(i,o,u){const d=i.exception=i.exception||{},y=d.values=d.values||[],w=y[0]=y[0]||{};w.value||(w.value=o||""),w.type||(w.type="Error")}function vc(i,o){const u=X2(i);if(!u)return;const d={type:"generic",handled:!0},y=u.mechanism;if(u.mechanism={...d,...y,...o},o&&"data"in o){const w={...y?.data,...o.data};u.mechanism.data=w}}function c1(i){if(b6(i))return!0;try{ts(i,"__sentry_captured__",!0)}catch{}return!1}function b6(i){try{return i.__sentry_captured__}catch{}}const Y2=1e3;function Rh(){return Date.now()/Y2}function x6(){const{performance:i}=Ri;if(!i?.now||!i.timeOrigin)return Rh;const o=i.timeOrigin;return()=>(o+i.now())/Y2}let u1;function mn(){return(u1??(u1=x6()))()}function v6(i){const o=mn(),u={sid:Jn(),init:!0,timestamp:o,started:o,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>B6(u)};return i&&wc(u,i),u}function wc(i,o={}){if(o.user&&(!i.ipAddress&&o.user.ip_address&&(i.ipAddress=o.user.ip_address),!i.did&&!o.did&&(i.did=o.user.id||o.user.email||o.user.username)),i.timestamp=o.timestamp||mn(),o.abnormal_mechanism&&(i.abnormal_mechanism=o.abnormal_mechanism),o.ignoreDuration&&(i.ignoreDuration=o.ignoreDuration),o.sid&&(i.sid=o.sid.length===32?o.sid:Jn()),o.init!==void 0&&(i.init=o.init),!i.did&&o.did&&(i.did=`${o.did}`),typeof o.started=="number"&&(i.started=o.started),i.ignoreDuration)i.duration=void 0;else if(typeof o.duration=="number")i.duration=o.duration;else{const u=i.timestamp-i.started;i.duration=u>=0?u:0}o.release&&(i.release=o.release),o.environment&&(i.environment=o.environment),!i.ipAddress&&o.ipAddress&&(i.ipAddress=o.ipAddress),!i.userAgent&&o.userAgent&&(i.userAgent=o.userAgent),typeof o.errors=="number"&&(i.errors=o.errors),o.status&&(i.status=o.status)}function w6(i,o){let u={};i.status==="ok"&&(u={status:"exited"}),wc(i,u)}function B6(i){return{sid:`${i.sid}`,init:i.init,started:new Date(i.started*1e3).toISOString(),timestamp:new Date(i.timestamp*1e3).toISOString(),status:i.status,errors:i.errors,did:typeof i.did=="number"||typeof i.did=="string"?`${i.did}`:void 0,duration:i.duration,abnormal_mechanism:i.abnormal_mechanism,attrs:{release:i.release,environment:i.environment,ip_address:i.ipAddress,user_agent:i.userAgent}}}function Dh(i,o,u=2){if(!o||typeof o!="object"||u<=0)return o;if(i&&Object.keys(o).length===0)return i;const d={...i};for(const y in o)Object.prototype.hasOwnProperty.call(o,y)&&(d[y]=Dh(d[y],o[y],u-1));return d}function Ed(){return Jn()}function Qd(){return Jn().substring(16)}const g0="_sentrySpan";function _0(i,o){o?ts(i,g0,o):delete i[g0]}function Md(i){return i[g0]}const T6=100;class Fs{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ed(),sampleRand:Math.random()}}clone(){const o=new Fs;return o._breadcrumbs=[...this._breadcrumbs],o._tags={...this._tags},o._extra={...this._extra},o._contexts={...this._contexts},this._contexts.flags&&(o._contexts.flags={values:[...this._contexts.flags.values]}),o._user=this._user,o._level=this._level,o._session=this._session,o._transactionName=this._transactionName,o._fingerprint=this._fingerprint,o._eventProcessors=[...this._eventProcessors],o._attachments=[...this._attachments],o._sdkProcessingMetadata={...this._sdkProcessingMetadata},o._propagationContext={...this._propagationContext},o._client=this._client,o._lastEventId=this._lastEventId,_0(o,Md(this)),o}setClient(o){this._client=o}setLastEventId(o){this._lastEventId=o}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(o){this._scopeListeners.push(o)}addEventProcessor(o){return this._eventProcessors.push(o),this}setUser(o){return this._user=o||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&wc(this._session,{user:o}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(o){return this._tags={...this._tags,...o},this._notifyScopeListeners(),this}
vendor: 4,086 bytes, line 25
25setTag(o,u){return this._tags={...this._tags,[o]:u},this._notifyScopeListeners(),this}setExtras(o){return this._extra={...this._extra,...o},this._notifyScopeListeners(),this}setExtra(o,u){return this._extra={...this._extra,[o]:u},this._notifyScopeListeners(),this}setFingerprint(o){return this._fingerprint=o,this._notifyScopeListeners(),this}setLevel(o){return this._level=o,this._notifyScopeListeners(),this}setTransactionName(o){return this._transactionName=o,this._notifyScopeListeners(),this}setContext(o,u){return u===null?delete this._contexts[o]:this._contexts[o]=u,this._notifyScopeListeners(),this}setSession(o){return o?this._session=o:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(o){if(!o)return this;const u=typeof o=="function"?o(this):o,d=u instanceof Fs?u.getScopeData():Th(u)?o:void 0,{tags:y,extra:w,user:v,contexts:a,level:M,fingerprint:D=[],propagationContext:F}=d||{};return this._tags={...this._tags,...y},this._extra={...this._extra,...w},this._contexts={...this._contexts,...a},v&&Object.keys(v).length&&(this._user=v),M&&(this._level=M),D.length&&(this._fingerprint=D),F&&(this._propagationContext=F),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,_0(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ed(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(o,u){const d=typeof u=="number"?u:T6;if(d<=0)return this;const y={timestamp:Rh(),...o,message:o.message?Cd(o.message,2048):o.message};return this._breadcrumbs.push(y),this._breadcrumbs.length>d&&(this._breadcrumbs=this._breadcrumbs.slice(-d),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(o){return this._attachments.push(o),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Md(this)}}setSDKProcessingMetadata(o){return this._sdkProcessingMetadata=Dh(this._sdkProcessingMetadata,o,2),this}setPropagationContext(o){return this._propagationContext=o,this}getPropagationContext(){return this._propagationContext}captureException(o,u){const d=u?.event_id||Jn();if(!this._client)return $t&&jt.warn("No client configured on scope - will not capture exception!"),d;const y=new Error("Sentry syntheticException");return this._client.captureException(o,{originalException:o,syntheticException:y,...u,event_id:d},this),d}captureMessage(o,u,d){const y=d?.event_id||Jn();if(!this._client)return $t&&jt.warn("No client configured on scope - will not capture message!"),y;const w=new Error(o);return this._client.captureMessage(o,u,{originalException:o,syntheticException:w,...d,event_id:y},this),y}captureEvent(o,u){const d=u?.event_id||Jn();return this._client?(this._client.captureEvent(o,{...u,event_id:d},this),d):($t&&jt.warn("No client configured on scope - will not capture event!"),d)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(o=>{o(this)}),this._notifyingListeners=!1)}}function S6(){return jh("defaultCurrentScope",()=>new Fs)}function O6(){return jh("defaultIsolationScope",()=>new Fs)}class P6{constructor(o,u){let d;o?d=o:d=new Fs;let y;u?y=u:y=new Fs,this._stack=[{scope:d}],this._isolationScope=y}withScope(o){const u=this._pushScope();let d;try{d=o(u)}catch(y){throw this._popScope(),y}return kh(d)?d.then(y=>(this._popScope(),y),y=>{throw this._popScope(),y}):(this._popScope(),d)}
25getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const o=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:o}),o}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Bc(){const i=Ec(),o=Xd(i);return o.stack=o.stack||new P6(S6(),O6())}function C6(i){return Bc().withScope(i)}function E6(i,o){const u=Bc();return u.withScope(()=>(u.getStackTop().scope=i,o(i)))}function h1(i){return Bc().withScope(()=>i(Bc().getIsolationScope()))}function M6(){return{withIsolationScope:h1,withScope:C6,withSetScope:E6,withSetIsolationScope:(i,o)=>h1(o),getCurrentScope:()=>Bc().getScope(),getIsolationScope:()=>Bc().getIsolationScope()}}function Lh(i){const o=Xd(i);return o.acs?o.acs:M6()}function bs(){const i=Ec();return Lh(i).getCurrentScope()}function Ic(){const i=Ec();return Lh(i).getIsolationScope()}function I6(){return jh("globalScope",()=>new Fs)}function dg(...i){const o=Ec(),u=Lh(o);if(i.length===2){const[d,y]=i;return d?u.withSetScope(d,y):u.withScope(y)}return u.withScope(i[0])}function Sr(){return bs().getClient()}function A6(i){const o=i.getPropagationContext(),{traceId:u,parentSpanId:d,propagationSpanId:y}=o,w={trace_id:u,span_id:y||Qd()};return d&&(w.parent_span_id=d),w}const Id="sentry.source",J2="sentry.sample_rate",j6="sentry.previous_trace_sample_rate",y0="sentry.op",Sh="sentry.origin",k6="sentry.measurement_unit",R6="sentry.measurement_value",p1="sentry.custom_span_name",fg="sentry.profile_id",mg="sentry.exclusive_time",D6=0,L6=1,Q2="_sentryScope",e8="_sentryIsolationScope";function z6(i,o,u){i&&(ts(i,e8,u),ts(i,Q2,o))}function Ad(i){return{scope:i[Q2],isolationScope:i[e8]}}const F6="sentry-",N6=/^sentry-/;function $6(i){const o=U6(i);if(!o)return;const u=Object.entries(o).reduce((d,[y,w])=>{if(y.match(N6)){const v=y.slice(F6.length);d[v]=w}return d},{});if(Object.keys(u).length>0)return u}function U6(i){if(!(!i||!yo(i)&&!Array.isArray(i)))return Array.isArray(i)?i.reduce((o,u)=>{const d=d1(u);return Object.entries(d).forEach(([y,w])=>{o[y]=w}),o},{}):d1(i)}function d1(i){return i.split(",").map(o=>o.split("=").map(u=>{try{return decodeURIComponent(u.trim())}catch{return}})).reduce((o,[u,d])=>(u&&d&&(o[u]=d),o),{})}const V6=/^o(\d+)\./,G6=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function H6(i){return i==="http"||i==="https"}function zh(i,o=!1){const{host:u,path:d,pass:y,port:w,projectId:v,protocol:a,publicKey:M}=i;return`${a}://${M}${o&&y?`:${y}`:""}@${u}${w?`:${w}`:""}/${d&&`${d}/`}${v}`}function Z6(i){const o=G6.exec(i);if(!o){ha(()=>{console.error(`Invalid Sentry Dsn: ${i}`)});return}const[u,d,y="",w="",v="",a=""]=o.slice(1);let M="",D=a;const F=D.split("/");if(F.length>1&&(M=F.slice(0,-1).join("/"),D=F.pop()),D){const H=D.match(/^\d+/);H&&(D=H[0])}return t8({host:w,pass:y,path:M,projectId:D,port:v,protocol:u,publicKey:d})}function t8(i){return{protocol:i.protocol,publicKey:i.publicKey||"",pass:i.pass||"",host:i.host,port:i.port||"",path:i.path||"",projectId:i.projectId}}function q6(i){if(!$t)return!0;const{port:o,projectId:u,protocol:d}=i;return["protocol","publicKey","host","projectId"].find(v=>i[v]?!1:(jt.error(`Invalid Sentry Dsn: ${v} missing`),!0))?!1:u.match(/^\d+$/)?H6(d)?o&&isNaN(parseInt(o,10))?(jt.error(`Invalid Sentry Dsn: Invalid port ${o}`),!1):!0:(jt.error(`Invalid Sentry Dsn: Invalid protocol ${d}`),!1):(jt.error(`Invalid Sentry Dsn: Invalid projectId ${u}`),!1)}function W6(i){return i.match(V6)?.[1]}function K6(i){const o=i.getOptions(),{host:u}=i.getDsn()||{};let d;return o.orgId?d=String(o.orgId):u&&(d=W6(u)),d}function X6(i){const o=typeof i=="string"?Z6(i):t8(i);if(!(!o||!q6(o)))return o}function gg(i){if(typeof i=="boolean")return Number(i);const o=typeof i=="string"?parseFloat(i):i;if(!(typeof o!="number"||isNaN(o)||o<0||o>1))return o}const i8=0,_g=1;let f1=!1;function Y6(i){const{spanId:o,traceId:u}=i.spanContext(),{data:d,op:y,parent_span_id:w,status:v,origin:a,links:M}=Qn(i);return{parent_span_id:w,span_id:o,trace_id:u,data:d,op:y,status:v,origin:a,links:M}}function J6(i){const{spanId:o,traceId:u,isRemote:d}=i.spanContext(),y=d?o:Qn(i).parent_span_id,w=Ad(i).scope,v=d?w?.getPropagationContext().propagationSpanId||Qd():o;return{parent_span_id:y,span_id:v,trace_id:u}}function r8(i){if(i&&i.length>0)return i.map(({context:{spanId:o,traceId:u,traceFlags:d,...y},attributes:w})=>
25({span_id:o,trace_id:u,sampled:d===_g,attributes:w,...y}))}function bc(i){return typeof i=="number"?m1(i):Array.isArray(i)?i[0]+i[1]/1e9:i instanceof Date?m1(i.getTime()):mn()}function m1(i){return i>9999999999?i/1e3:i}function Qn(i){if(e5(i))return i.getSpanJSON();const{spanId:o,traceId:u}=i.spanContext();if(Q6(i)){const{attributes:d,startTime:y,name:w,endTime:v,status:a,links:M}=i,D="parentSpanId"in i?i.parentSpanId:"parentSpanContext"in i?i.parentSpanContext?.spanId:void 0;return{span_id:o,trace_id:u,data:d,description:w,parent_span_id:D,start_timestamp:bc(y),timestamp:bc(v)||void 0,status:n8(a),op:d[y0],origin:d[Sh],links:r8(M)}}return{span_id:o,trace_id:u,start_timestamp:0,data:{}}}function Q6(i){const o=i;return!!o.attributes&&!!o.startTime&&!!o.name&&!!o.endTime&&!!o.status}function e5(i){return typeof i.getSpanJSON=="function"}function Fh(i){const{traceFlags:o}=i.spanContext();return o===_g}function n8(i){if(!(!i||i.code===D6))return i.code===L6?"ok":i.message||"unknown_error"}const uh="_sentryChildSpans",b0="_sentryRootSpan";function s8(i,o){const u=i[b0]||i;ts(o,b0,u),i[uh]?i[uh].add(o):ts(i,uh,new Set([o]))}function t5(i){const o=new Set;function u(d){if(!o.has(d)&&Fh(d)){o.add(d);const y=d[uh]?Array.from(d[uh]):[];for(const w of y)u(w)}}return u(i),Array.from(o)}function sa(i){return i[b0]||i}function i5(){const i=Ec(),o=Lh(i);return o.getActiveSpan?o.getActiveSpan():Md(bs())}function x0(){f1||(ha(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),f1=!0)}function ef(i){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const o=i||Sr()?.getOptions();return!!o&&(o.tracesSampleRate!=null||!!o.tracesSampler)}function g1(i){jt.log(`Ignoring span ${i.op} - ${i.description} because it matches \`ignoreSpans\`.`)}function v0(i,o){if(!o?.length||!i.description)return!1;for(const u of o){if(n5(u)){if(pd(i.description,u))return $t&&g1(i),!0;continue}if(!u.name&&!u.op)continue;const d=u.name?pd(i.description,u.name):!0,y=u.op?i.op&&pd(i.op,u.op):!0;if(d&&y)return $t&&g1(i),!0}return!1}function r5(i,o){const u=o.parent_span_id,d=o.span_id;if(u)for(const y of i)y.parent_span_id===d&&(y.parent_span_id=u)}function n5(i){return typeof i=="string"||i instanceof RegExp}const yg="production",o8="_frozenDsc";function Vm(i,o){ts(i,o8,o)}function a8(i,o){const u=o.getOptions(),{publicKey:d}=o.getDsn()||{},y={environment:u.environment||yg,release:u.release,public_key:d,trace_id:i,org_id:K6(o)};return o.emit("createDsc",y),y}function s5(i,o){const u=o.getPropagationContext();return u.dsc||a8(u.traceId,i)}function Oh(i){const o=Sr();if(!o)return{};const u=sa(i),d=Qn(u),y=d.data,w=u.spanContext().traceState,v=w?.get("sentry.sample_rate")??y[J2]??y[j6];function a(Pe){return(typeof v=="number"||typeof v=="string")&&(Pe.sample_rate=`${v}`),Pe}const M=u[o8];if(M)return a(M);const D=w?.get("sentry.dsc"),F=D&&$6(D);if(F)return a(F);const H=a8(i.spanContext().traceId,o),W=y[Id],G=d.description;return W!=="url"&&G&&(H.transaction=G),ef()&&(H.sampled=String(Fh(u)),H.sample_rand=w?.get("sentry.sample_rand")??Ad(u).scope?.getPropagationContext().sampleRand.toString()),a(H),o.emit("createDsc",H,u),H}class bg{constructor(o={}){this._traceId=o.traceId||Ed(),this._spanId=o.spanId||Qd()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:i8}}end(o){}setAttribute(o,u){return this}setAttributes(o){return this}setStatus(o){return this}updateName(o){return this}isRecording(){return!1}addEvent(o,u,d){return this}addLink(o){return this}addLinks(o){return this}recordException(o,u){}}function fo(i,o=100,u=1/0){try{return w0("",i,o,u)}catch(d){return{ERROR:`**non-serializable** (${d})`}}}function l8(i,o=3,u=100*1024){const d=fo(i,o);return c5(d)>u?l8(i,o-1,u):d}function w0(i,o,u=1/0,d=1/0,y=u5()){const[w,v]=y;if(o==null||["boolean","string"].includes(typeof o)||typeof o=="number"&&Number.isFinite(o))return o;const a=o5(i,o);if(!a.startsWith("[object "))return a;if(o.__sentry_skip_normalization__)return o;const M=typeof o.__sentry_override_normalization_depth__=="number"?o.__sentry_override_normalization_depth__:u;if(M===0)return a.replace("object ","");if(w(o))return"[Circular ~]";const D=o;if(D&&typeof D.toJSON=="function")try{const G=D.toJSON();return w0("",G,M-1,d,y)}catch{}const F=Array.isArray(o)?[]:{};let H=0;const W=K2(o);for(const G in W){if(!Object.prototype.hasOwnProperty.call(W,G))continue;if(H>=d){F[G]="[MaxProperties ~]";break}const Pe=W[G];F[G]=w0(G,Pe,M-1,d,y),H++}return v(o),F}function o5(i,o){try{if(i==="domain"&&o&&typeof o=="object"&&o._events)return"[Domain]";if(i==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&o===global)return"[Global]";if(typeof window<"u"&&o===window)return"[Window]";if(typeof document<"u"&&o===document)return"[Document]";if(Z2(o))return"[VueViewModel]";if(p6(o))return"[SyntheticEvent]";if(typeof o=="number"&&!Number.isFinite(o))return`[${o}]`;if(typeof o=="function")return`[Function: ${ca(o)}]`;if(typeof o=="symbol")return`[${String(o)}]`;if(typeof o=="bigint")return`[BigInt: ${String(o)}]`;const u=a5(o);return/^HTML(\w*)Element$/.test(u)?`[HTMLElement: ${u}]`:`[object ${u}]`}catch(u){return`**non-serializable** (${u})`}}function a5(i){const o=Object.getPrototypeOf(i);return o?.constructor?o.constructor.name:"null prototype"}function l5(i){return~-encodeURI(i).split(/%..|./).length}function c5(i){return l5(JSON.stringify(i))}function u5(){const i=new WeakSet;function o(d){return i.has(d)?!0:(i.add(d),!1)}
25function u(d){i.delete(d)}return[o,u]}function Ac(i,o=[]){return[i,o]}function h5(i,o){const[u,d]=i;return[u,[...d,o]]}function _1(i,o){const u=i[1];for(const d of u){const y=d[0].type;if(o(d,y))return!0}return!1}function B0(i){const o=Xd(Ri);return o.encodePolyfill?o.encodePolyfill(i):new TextEncoder().encode(i)}function p5(i){const[o,u]=i;let d=JSON.stringify(o);function y(w){typeof d=="string"?d=typeof w=="string"?d+w:[B0(d),w]:d.push(typeof w=="string"?B0(w):w)}for(const w of u){const[v,a]=w;if(y(`
26${JSON.stringify(v)}
27`),typeof a=="string"||a instanceof Uint8Array)y(a);else{let M;try{M=JSON.stringify(a)}catch{M=JSON.stringify(fo(a))}y(M)}}return typeof d=="string"?d:d5(d)}function d5(i){const o=i.reduce((y,w)=>y+w.length,0),u=new Uint8Array(o);let d=0;for(const y of i)u.set(y,d),d+=y.length;return u}function f5(i){return[{type:"span"},i]}function m5(i){const o=typeof i.data=="string"?B0(i.data):i.data;return[{type:"attachment",length:o.length,filename:i.filename,content_type:i.contentType,attachment_type:i.attachmentType},o]}const g5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function y1(i){return g5[i]}function c8(i){if(!i?.sdk)return;const{name:o,version:u}=i.sdk;return{name:o,version:u}}function _5(i,o,u,d){const y=i.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:i.event_id,sent_at:new Date().toISOString(),...o&&{sdk:o},...!!u&&d&&{dsn:zh(d)},...y&&{trace:y}}}function y5(i,o){if(!o)return i;const u=i.sdk||{};return i.sdk={...u,name:u.name||o.name,version:u.version||o.version,integrations:[...i.sdk?.integrations||[],...o.integrations||[]],packages:[...i.sdk?.packages||[],...o.packages||[]],settings:i.sdk?.settings||o.settings?{...i.sdk?.settings,...o.settings}:void 0},i}function b5(i,o,u,d){const y=c8(u),w={sent_at:new Date().toISOString(),...y&&{sdk:y},...!!d&&o&&{dsn:zh(o)}},v="aggregates"in i?[{type:"sessions"},i]:[{type:"session"},i.toJSON()];return Ac(w,[v])}function x5(i,o,u,d){const y=c8(u),w=i.type&&i.type!=="replay_event"?i.type:"event";y5(i,u?.sdk);const v=_5(i,y,d,o);return delete i.sdkProcessingMetadata,Ac(v,[[{type:w},i]])}function v5(i,o){function u(G){return!!G.trace_id&&!!G.public_key}const d=Oh(i[0]),y=o?.getDsn(),w=o?.getOptions().tunnel,v={sent_at:new Date().toISOString(),...u(d)&&{trace:d},...!!w&&y&&{dsn:zh(y)}},{beforeSendSpan:a,ignoreSpans:M}=o?.getOptions()||{}
27,D=M?.length?i.filter(G=>!v0(Qn(G),M)):i,F=i.length-D.length;F&&o?.recordDroppedEvent("before_send","span",F);const H=a?G=>{const Pe=Qn(G),Ie=a(Pe);return Ie||(x0(),Pe)}:Qn,W=[];for(const G of D){const Pe=H(G);Pe&&W.push(f5(Pe))}return Ac(v,W)}function w5(i){if(!$t)return;const{description:o="< unknown name >",op:u="< unknown op >",parent_span_id:d}=Qn(i),{spanId:y}=i.spanContext(),w=Fh(i),v=sa(i),a=v===i,M=`[Tracing] Starting ${w?"sampled":"unsampled"} ${a?"root ":""}span`,D=[`op: ${u}`,`name: ${o}`,`ID: ${y}`];if(d&&D.push(`parent ID: ${d}`),!a){const{op:F,description:H}=Qn(v);D.push(`root ID: ${v.spanContext().spanId}`),F&&D.push(`root op: ${F}`),H&&D.push(`root description: ${H}`)}jt.log(`${M}
28  ${D.join(`
29  `)}`)}function B5(i){if(!$t)return;const{description:o="< unknown name >",op:u="< unknown op >"}=Qn(i),{spanId:d}=i.spanContext(),w=sa(i)===i,v=`[Tracing] Finishing "${u}" ${w?"root ":""}span "${o}" with ID ${d}`;jt.log(v)}function b1(i){if(!i||i.length===0)return;const o={};return i.forEach(u=>{const d=u.attributes||{},y=d[k6],w=d[R6];typeof y=="string"&&typeof w=="number"&&(o[u.name]={value:w,unit:y})}),o}const x1=1e3;class xg{constructor(o={}){this._traceId=o.traceId||Ed(),this._spanId=o.spanId||Qd(),this._startTime=o.startTimestamp||mn(),this._links=o.links,this._attributes={},this.setAttributes({[Sh]:"manual",[y0]:o.op,...o.attributes}),this._name=o.name,o.parentSpanId&&(this._parentSpanId=o.parentSpanId),"sampled"in o&&(this._sampled=o.sampled),o.endTimestamp&&(this._endTime=o.endTimestamp),this._events=[],this._isStandaloneSpan=o.isStandalone,this._endTime&&this._onSpanEnded()}addLink(o){return this._links?this._links.push(o):this._links=[o],this}addLinks(o){return this._links?this._links.push(...o):this._links=o,this}recordException(o,u){}spanContext(){const{_spanId:o,_traceId:u,_sampled:d}=this;return{spanId:o,traceId:u,traceFlags:d?_g:i8}}setAttribute(o,u){return u===void 0?delete this._attributes[o]:this._attributes[o]=u,this}setAttributes(o){return Object.keys(o).forEach(u=>this.setAttribute(u,o[u])),this}updateStartTime(o){this._startTime=bc(o)}setStatus(o){return this._status=o,this}updateName(o){return this._name=o,this.setAttribute(Id,"custom"),this}end(o){this._endTime||(this._endTime=bc(o),B5(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[y0],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:n8(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Sh],profile_id:this._attributes[fg],exclusive_time:this._attributes[mg],measurements:b1(this._events),is_segment:this._isStandaloneSpan&&sa(this)===this||void 0,segment_id:this._isStandaloneSpan?sa(this).spanContext().spanId:void 0,links:r8(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(o,u,d){$t&&jt.log("[Tracing] Adding an event to span:",o);const y=v1(u)?u:d||mn(),w=v1(u)?{}:u||{},v={name:o,time:bc(y),attributes:w};return this._events.push(v),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const o=Sr();if(o&&o.emit("spanEnd",this),!(this._isStandaloneSpan||this===sa(this)))return;if(this._isStandaloneSpan){this._sampled?S5(v5([this],o)):($t&&jt.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),o&&o.recordDroppedEvent("sample_rate","span"));return}const d=this._convertSpanToTransaction();d&&(Ad(this).scope||bs()).captureEvent(d)}_convertSpanToTransaction(){if(!w1(Qn(this)))return;this._name||($t&&jt.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:o,isolationScope:u}=Ad(this),d=o?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const w=t5(this).filter(F=>F!==this&&!T5(F)).map(F=>Qn(F)).filter(w1),v=this._attributes[Id];
29delete this._attributes[p1],w.forEach(F=>{delete F.data[p1]});const a={contexts:{trace:Y6(this)},spans:w.length>x1?w.sort((F,H)=>F.start_timestamp-H.start_timestamp).slice(0,x1):w,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:o,capturedSpanIsolationScope:u,dynamicSamplingContext:Oh(this)},request:d,...v&&{transaction_info:{source:v}}},M=b1(this._events);return M&&Object.keys(M).length&&($t&&jt.log("[Measurements] Adding measurements to transaction event",JSON.stringify(M,void 0,2)),a.measurements=M),a}}function v1(i){return i&&typeof i=="number"||i instanceof Date||Array.isArray(i)}function w1(i){return!!i.start_timestamp&&!!i.timestamp&&!!i.span_id&&!!i.trace_id}function T5(i){return i instanceof xg&&i.isStandaloneSpan()}function S5(i){const o=Sr();if(!o)return;const u=i[1];if(!u||u.length===0){o.recordDroppedEvent("before_send","span");return}o.sendEnvelope(i)}function O5(i,o,u){if(!ef(i))return[!1];let d,y;typeof i.tracesSampler=="function"?(y=i.tracesSampler({...o,inheritOrSampleWith:a=>typeof o.parentSampleRate=="number"?o.parentSampleRate:typeof o.parentSampled=="boolean"?Number(o.parentSampled):a}),d=!0):o.parentSampled!==void 0?y=o.parentSampled:typeof i.tracesSampleRate<"u"&&(y=i.tracesSampleRate,d=!0);const w=gg(y);if(w===void 0)return $t&&jt.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(y)} of type ${JSON.stringify(typeof y)}.`),[!1];if(!w)return $t&&jt.log(`[Tracing] Discarding transaction because ${typeof i.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,w,d];const v=u<w;return v||$t&&jt.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(y)})`),[v,w,d]}const u8="__SENTRY_SUPPRESS_TRACING__";function B1(i){const o=h8();if(o.startInactiveSpan)return o.startInactiveSpan(i);const u=E5(i),{forceTransaction:d,parentSpan:y}=i;return(i.scope?v=>dg(i.scope,v):y!==void 0?v=>P5(y,v):v=>v())(()=>{const v=bs(),a=I5(v,y);return i.onlyIfParent&&!a?new bg:C5({parentSpan:a,spanArguments:u,forceTransaction:d,scope:v})})}function P5(i,o){const u=h8();return u.withActiveSpan?u.withActiveSpan(i,o):dg(d=>(_0(d,i||void 0),o(d)))}function C5({parentSpan:i,spanArguments:o,forceTransaction:u,scope:d}){if(!ef()){const v=new bg;if(u||!i){const a={sampled:"false",sample_rate:"0",transaction:o.name,...Oh(v)};Vm(v,a)}return v}const y=Ic();let w;if(i&&!u)w=M5(i,d,o),s8(i,w);else if(i){const v=Oh(i),{traceId:a,spanId:M}=i.spanContext(),D=Fh(i);w=T1({traceId:a,parentSpanId:M,...o},d,D),Vm(w,v)}else{const{traceId:v,dsc:a,parentSpanId:M,sampled:D}={...y.getPropagationContext(),...d.getPropagationContext()};w=T1({traceId:v,parentSpanId:M,...o},d,D),a&&Vm(w,a)}return w5(w),z6(w,d,y),w}function E5(i){const u={isStandalone:(i.experimental||{}).standalone,...i};if(i.startTime){const d={...u};return d.startTimestamp=bc(i.startTime),delete d.startTime,d}return u}function h8(){const i=Ec();return Lh(i)}function T1(i,o,u){const d=Sr(),y=d?.getOptions()||{},{name:w=""}=i,v={spanAttributes:{...i.attributes},spanName:w,parentSampled:u};d?.emit("beforeSampling",v,{decision:!1});const a=v.parentSampled??u,M=v.spanAttributes,D=o.getPropagationContext(),[F,H,W]=o.getScopeData().sdkProcessingMetadata[u8]?[!1]:O5(y,{name:w,parentSampled:a,attributes:M,parentSampleRate:gg(D.dsc?.sample_rate)},D.sampleRand),G=new xg({...i,attributes:{[Id]:"custom",[J2]:H!==void 0&&W?H:void 0,...M},sampled:F});return!F&&d&&($t&&jt.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),d.recordDroppedEvent("sample_rate","transaction")),d&&d.emit("spanStart",G),G}function M5(i,o,u){const{spanId:d,traceId:y}=i.spanContext(),w=o.getScopeData().sdkProcessingMetadata[u8]?!1:Fh(i),v=w?new xg({...u,parentSpanId:d,traceId:y,sampled:w}):new bg({traceId:y});s8(i,v);const a=Sr();return a&&(a.emit("spanStart",v),u.endTimestamp&&a.emit("spanEnd",v)),v}function I5(i,o){if(o)return o;if(o===null)return;const u=Md(i);if(!u)return;const d=Sr();return(d?d.getOptions():{}).parentSpanIsAlwaysRootSpan?sa(u):u}const Gm=0,S1=1,O1=2;function tf(i){return new Tc(o=>{o(i)})}function vg(i){return new Tc((o,u)=>{u(i)})}class Tc{constructor(o){this._state=Gm,this._handlers=[],this._runExecutor(o)}then(o,u){return new Tc((d,y)=>{this._handlers.push([!1,w=>
vendor: 4,423 bytes, line 29
29{if(!o)d(w);else try{d(o(w))}catch(v){y(v)}},w=>{if(!u)y(w);else try{d(u(w))}catch(v){y(v)}}]),this._executeHandlers()})}catch(o){return this.then(u=>u,o)}finally(o){return new Tc((u,d)=>{let y,w;return this.then(v=>{w=!1,y=v,o&&o()},v=>{w=!0,y=v,o&&o()}).then(()=>{if(w){d(y);return}u(y)})})}_executeHandlers(){if(this._state===Gm)return;const o=this._handlers.slice();this._handlers=[],o.forEach(u=>{u[0]||(this._state===S1&&u[1](this._value),this._state===O1&&u[2](this._value),u[0]=!0)})}_runExecutor(o){const u=(w,v)=>{if(this._state===Gm){if(kh(v)){v.then(d,y);return}this._state=w,this._value=v,this._executeHandlers()}},d=w=>{u(S1,w)},y=w=>{u(O1,w)};try{o(d,y)}catch(w){y(w)}}}function A5(i,o,u,d=0){try{const y=T0(o,u,i,d);return kh(y)?y:tf(y)}catch(y){return vg(y)}}function T0(i,o,u,d){const y=u[d];if(!i||!y)return i;const w=y({...i},o);return $t&&w===null&&jt.log(`Event processor "${y.id||"?"}" dropped event`),kh(w)?w.then(v=>T0(v,o,u,d+1)):T0(w,o,u,d+1)}function j5(i,o){const{fingerprint:u,span:d,breadcrumbs:y,sdkProcessingMetadata:w}=o;k5(i,o),d&&L5(i,d),z5(i,u),R5(i,y),D5(i,w)}function P1(i,o){const{extra:u,tags:d,user:y,contexts:w,level:v,sdkProcessingMetadata:a,breadcrumbs:M,fingerprint:D,eventProcessors:F,attachments:H,propagationContext:W,transactionName:G,span:Pe}=o;ed(i,"extra",u),ed(i,"tags",d),ed(i,"user",y),ed(i,"contexts",w),i.sdkProcessingMetadata=Dh(i.sdkProcessingMetadata,a,2),v&&(i.level=v),G&&(i.transactionName=G),Pe&&(i.span=Pe),M.length&&(i.breadcrumbs=[...i.breadcrumbs,...M]),D.length&&(i.fingerprint=[...i.fingerprint,...D]),F.length&&(i.eventProcessors=[...i.eventProcessors,...F]),H.length&&(i.attachments=[...i.attachments,...H]),i.propagationContext={...i.propagationContext,...W}}function ed(i,o,u){i[o]=Dh(i[o],u,1)}function k5(i,o){const{extra:u,tags:d,user:y,contexts:w,level:v,transactionName:a}=o;Object.keys(u).length&&(i.extra={...u,...i.extra}),Object.keys(d).length&&(i.tags={...d,...i.tags}),Object.keys(y).length&&(i.user={...y,...i.user}),Object.keys(w).length&&(i.contexts={...w,...i.contexts}),v&&(i.level=v),a&&i.type!=="transaction"&&(i.transaction=a)}function R5(i,o){const u=[...i.breadcrumbs||[],...o];i.breadcrumbs=u.length?u:void 0}function D5(i,o){i.sdkProcessingMetadata={...i.sdkProcessingMetadata,...o}}function L5(i,o){i.contexts={trace:J6(o),...i.contexts},i.sdkProcessingMetadata={dynamicSamplingContext:Oh(o),...i.sdkProcessingMetadata};const u=sa(o),d=Qn(u).description;d&&!i.transaction&&i.type==="transaction"&&(i.transaction=d)}function z5(i,o){i.fingerprint=i.fingerprint?Array.isArray(i.fingerprint)?i.fingerprint:[i.fingerprint]:[],o&&(i.fingerprint=i.fingerprint.concat(o)),i.fingerprint.length||delete i.fingerprint}let td,C1,id;function F5(i){const o=Ri._sentryDebugIds;if(!o)return{};const u=Object.keys(o);return id&&u.length===C1||(C1=u.length,id=u.reduce((d,y)=>{td||(td={});const w=td[y];if(w)d[w[0]]=w[1];else{const v=i(y);for(let a=v.length-1;a>=0;a--){const D=v[a]?.filename,F=o[y];if(D&&F){d[D]=F,td[y]=[D,F];break}}}return d},{})),id}function N5(i,o,u,d,y,w){const{normalizeDepth:v=3,normalizeMaxBreadth:a=1e3}=i,M={...o,event_id:o.event_id||u.event_id||Jn(),timestamp:o.timestamp||Rh()},D=u.integrations||i.integrations.map(rt=>rt.name);$5(M,i),G5(M,D),y&&y.emit("applyFrameMetadata",o),o.type===void 0&&U5(M,i.stackParser);const F=Z5(d,u.captureContext);u.mechanism&&vc(M,u.mechanism);const H=y?y.getEventProcessors():[],W=I6().getScopeData();if(w){const rt=w.getScopeData();P1(W,rt)}if(F){const rt=F.getScopeData();P1(W,rt)}const G=[...u.attachments||[],...W.attachments];G.length&&(u.attachments=G),j5(M,W);const Pe=[...H,...W.eventProcessors];return A5(Pe,M,u).then(rt=>(rt&&V5(rt),typeof v=="number"&&v>0?H5(rt,v,a):rt))}function $5(i,o){const{environment:u,release:d,dist:y,maxValueLength:w=250}=o;i.environment=i.environment||u||yg,!i.release&&d&&(i.release=d),!i.dist&&y&&(i.dist=y);const v=i.request;v?.url&&(v.url=Cd(v.url,w))}function U5(i,o){const u=F5(o);i.exception?.values?.forEach(d=>{d.stacktrace?.frames?.forEach(y=>{y.filename&&(y.debug_id=u[y.filename])})})}function V5(i){const o={};if(i.exception?.values?.forEach(d=>{d.stacktrace?.frames?.forEach(y=>{y.debug_id&&(y.abs_path?o[y.abs_path]=y.debug_id:y.filename&&(o[y.filename]=y.debug_id),delete y.debug_id)})}),Object.keys(o).length===0)return;i.debug_meta=i.debug_meta||{},i.debug_meta.images=i.debug_meta.images||[];const u=i.debug_meta.images;
29Object.entries(o).forEach(([d,y])=>{u.push({type:"sourcemap",code_file:d,debug_id:y})})}function G5(i,o){o.length>0&&(i.sdk=i.sdk||{},i.sdk.integrations=[...i.sdk.integrations||[],...o])}function H5(i,o,u){if(!i)return null;const d={...i,...i.breadcrumbs&&{breadcrumbs:i.breadcrumbs.map(y=>({...y,...y.data&&{data:fo(y.data,o,u)}}))},...i.user&&{user:fo(i.user,o,u)},...i.contexts&&{contexts:fo(i.contexts,o,u)},...i.extra&&{extra:fo(i.extra,o,u)}};return i.contexts?.trace&&d.contexts&&(d.contexts.trace=i.contexts.trace,i.contexts.trace.data&&(d.contexts.trace.data=fo(i.contexts.trace.data,o,u))),i.spans&&(d.spans=i.spans.map(y=>({...y,...y.data&&{data:fo(y.data,o,u)}}))),i.contexts?.flags&&d.contexts&&(d.contexts.flags=fo(i.contexts.flags,3,u)),d}function Z5(i,o){if(!o)return i;const u=i?i.clone():new Fs;return u.update(o),u}function q5(i){if(i)return W5(i)?{captureContext:i}:X5(i)?{captureContext:i}:i}function W5(i){return i instanceof Fs||typeof i=="function"}const K5=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function X5(i){return Object.keys(i).some(o=>K5.includes(o))}function p8(i,o){return bs().captureException(i,q5(o))}function d8(i,o){return bs().captureEvent(i,o)}function E1(i){const o=Ic(),u=bs(),{userAgent:d}=Ri.navigator||{},y=v6({user:u.getUser()||o.getUser(),...d&&{userAgent:d},...i}),w=o.getSession();return w?.status==="ok"&&wc(w,{status:"exited"}),f8(),o.setSession(y),y}function f8(){const i=Ic(),u=bs().getSession()||i.getSession();u&&w6(u),m8(),i.setSession()}function m8(){const i=Ic(),o=Sr(),u=i.getSession();u&&o&&o.captureSession(u)}function M1(i=!1){if(i){f8();return}m8()}const Y5="7";function J5(i){const o=i.protocol?`${i.protocol}:`:"",u=i.port?`:${i.port}`:"";return`${o}//${i.host}${u}${i.path?`/${i.path}`:""}/api/`}function Q5(i){return`${J5(i)}${i.projectId}/envelope/`}function e7(i,o){const u={sentry_version:Y5};return i.publicKey&&(u.sentry_key=i.publicKey),o&&(u.sentry_client=`${o.name}/${o.version}`),new URLSearchParams(u).toString()}function t7(i,o,u){return o||`${Q5(i)}?${e7(i,u)}`}const I1=[];function i7(i){const o={};return i.forEach(u=>{const{name:d}=u,y=o[d];y&&!y.isDefaultInstance&&u.isDefaultInstance||(o[d]=u)}),Object.values(o)}function r7(i){const o=i.defaultIntegrations||[],u=i.integrations;o.forEach(y=>{y.isDefaultInstance=!0});let d;if(Array.isArray(u))d=[...o,...u];else if(typeof u=="function"){const y=u(o);d=Array.isArray(y)?y:[y]}else d=o;return i7(d)}function n7(i,o){const u={};return o.forEach(d=>{d&&g8(i,d,u)}),u}function A1(i,o){for(const u of o)u?.afterAllSetup&&u.afterAllSetup(i)}function g8(i,o,u){if(u[o.name]){$t&&jt.log(`Integration skipped because it was already installed: ${o.name}`);return}if(u[o.name]=o,I1.indexOf(o.name)===-1&&typeof o.setupOnce=="function"&&(o.setupOnce(),I1.push(o.name)),o.setup&&typeof o.setup=="function"&&o.setup(i),typeof o.preprocessEvent=="function"){const d=o.preprocessEvent.bind(o);i.on("preprocessEvent",(y,w)=>d(y,w,i))}if(typeof o.processEvent=="function"){const d=o.processEvent.bind(o),y=Object.assign((w,v)=>d(w,v,i),{id:o.name});i.addEventProcessor(y)}$t&&jt.log(`Integration installed: ${o.name}`)}function s7(i,o,u){const d=[{type:"client_report"},{timestamp:Rh(),discarded_events:i}];return Ac(o?{dsn:o}:{},[d])}function _8(i){const o=[];i.message&&o.push(i.message);try{const u=i.exception.values[i.exception.values.length-1];u?.value&&(o.push(u.value),u.type&&o.push(`${u.type}: ${u.value}`))}catch{}return o}function o7(i){const{trace_id:o,parent_span_id:u,span_id:d,status:y,origin:w,data:v,op:a}=i.contexts?.trace??{};return{data:v??{},description:i.transaction,op:a,parent_span_id:u,span_id:d??"",start_timestamp:i.start_timestamp??0,status:y,timestamp:i.timestamp,trace_id:o??"",origin:w,profile_id:v?.[fg],exclusive_time:v?.[mg],measurements:i.measurements,is_segment:!0}}function a7(i){return{type:"transaction",timestamp:i.timestamp,start_timestamp:i.start_timestamp,transaction:i.description,contexts:{trace:{trace_id:i.trace_id,span_id:i.span_id,parent_span_id:i.parent_span_id,op:i.op,status:i.status,origin:i.origin,data:{...i.data,...i.profile_id&&{[fg]:i.profile_id},...i.exclusive_time&&{[mg]:i.exclusive_time}}}},measurements:i.measurements}}const j1="Not capturing exception because it's already been captured.",k1="Discarded session because of missing or non-string release",y8=Symbol.for("SentryInternalError"),b8=Symbol.for("SentryDoNotSendEventError");function dd(i){return{message:i,[y8]:!0}}function Hm(i){return{message:i,[b8]:!0}}
29function R1(i){return!!i&&typeof i=="object"&&y8 in i}function D1(i){return!!i&&typeof i=="object"&&b8 in i}class l7{constructor(o){if(this._options=o,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],o.dsn?this._dsn=X6(o.dsn):$t&&jt.warn("No DSN provided, client will not send events."),this._dsn){const u=t7(this._dsn,o.tunnel,o._metadata?o._metadata.sdk:void 0);this._transport=o.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...o.transportOptions,url:u})}}captureException(o,u,d){const y=Jn();if(c1(o))return $t&&jt.log(j1),y;const w={event_id:y,...u};return this._process(this.eventFromException(o,w).then(v=>this._captureEvent(v,w,d))),w.event_id}captureMessage(o,u,d,y){const w={event_id:Jn(),...d},v=lg(o)?o:String(o),a=cg(o)?this.eventFromMessage(v,u,w):this.eventFromException(o,w);return this._process(a.then(M=>this._captureEvent(M,w,y))),w.event_id}captureEvent(o,u,d){const y=Jn();if(u?.originalException&&c1(u.originalException))return $t&&jt.log(j1),y;const w={event_id:y,...u},v=o.sdkProcessingMetadata||{},a=v.capturedSpanScope,M=v.capturedSpanIsolationScope;return this._process(this._captureEvent(o,w,a||d,M)),w.event_id}captureSession(o){this.sendSession(o),wc(o,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(o){const u=this._transport;if(!u)return!0;this.emit("flush");const d=await this._isClientDoneProcessing(o),y=await u.flush(o);return d&&y}async close(o){const u=await this.flush(o);return this.getOptions().enabled=!1,this.emit("close"),u}getEventProcessors(){return this._eventProcessors}addEventProcessor(o){this._eventProcessors.push(o)}init(){(this._isEnabled()||this._options.integrations.some(({name:o})=>o.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(o){return this._integrations[o]}addIntegration(o){const u=this._integrations[o.name];g8(this,o,this._integrations),u||A1(this,[o])}sendEvent(o,u={}){this.emit("beforeSendEvent",o,u);let d=x5(o,this._dsn,this._options._metadata,this._options.tunnel);for(const y of u.attachments||[])d=h5(d,m5(y));this.sendEnvelope(d).then(y=>this.emit("afterSendEvent",o,y))}sendSession(o){const{release:u,environment:d=yg}=this._options;if("aggregates"in o){const w=o.attrs||{};if(!w.release&&!u){$t&&jt.warn(k1);return}w.release=w.release||u,w.environment=w.environment||d,o.attrs=w}else{if(!o.release&&!u){$t&&jt.warn(k1);return}o.release=o.release||u,o.environment=o.environment||d}this.emit("beforeSendSession",o);const y=b5(o,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(y)}recordDroppedEvent(o,u,d=1){if(this._options.sendClientReports){const y=`${o}:${u}`;$t&&jt.log(`Recording outcome: "${y}"${d>1?` (${d} times)`:""}`),this._outcomes[y]=(this._outcomes[y]||0)+d}}on(o,u){const d=this._hooks[o]=this._hooks[o]||new Set,y=(...w)=>u(...w);return d.add(y),()=>{d.delete(y)}}emit(o,...u){const d=this._hooks[o];d&&d.forEach(y=>y(...u))}async sendEnvelope(o){if(this.emit("beforeEnvelope",o),this._isEnabled()&&this._transport)try{return await this._transport.send(o)}catch(u){return $t&&jt.error("Error while sending envelope:",u),{}}return $t&&jt.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:o}=this._options;this._integrations=n7(this,o),A1(this,o)}_updateSessionFromEvent(o,u){let d=u.level==="fatal",y=!1;const w=u.exception?.values;if(w){y=!0;for(const M of w)if(M.mechanism?.handled===!1){d=!0;break}}const v=o.status==="ok";(v&&o.errors===0||v&&d)&&(wc(o,{...d&&{status:"crashed"},errors:o.errors||Number(y||d)}),this.captureSession(o))}async _isClientDoneProcessing(o){let u=0;for(;!o||u<o;){if(await new Promise(d=>setTimeout(d,1)),!this._numProcessing)return!0;u++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(o,u,d,y){const w=this.getOptions(),v=Object.keys(this._integrations);return!u.integrations&&v?.length&&(u.integrations=v),this.emit("preprocessEvent",o,u),o.type||y.setLastEventId(o.event_id||u.event_id),N5(w,o,u,d,this,y).then(a=>{if(a===null)return a;
29this.emit("postprocessEvent",a,u),a.contexts={trace:A6(d),...a.contexts};const M=s5(this,d);return a.sdkProcessingMetadata={dynamicSamplingContext:M,...a.sdkProcessingMetadata},a})}_captureEvent(o,u={},d=bs(),y=Ic()){return $t&&S0(o)&&jt.log(`Captured error event \`${_8(o)[0]||"<unknown>"}\``),this._processEvent(o,u,d,y).then(w=>w.event_id,w=>{$t&&(D1(w)?jt.log(w.message):R1(w)?jt.warn(w.message):jt.warn(w))})}_processEvent(o,u,d,y){const w=this.getOptions(),{sampleRate:v}=w,a=x8(o),M=S0(o),D=o.type||"error",F=`before send for type \`${D}\``,H=typeof v>"u"?void 0:gg(v);if(M&&typeof H=="number"&&Math.random()>H)return this.recordDroppedEvent("sample_rate","error"),vg(Hm(`Discarding event because it's not included in the random sample (sampling rate = ${v})`));const W=D==="replay_event"?"replay":D;return this._prepareEvent(o,u,d,y).then(G=>{if(G===null)throw this.recordDroppedEvent("event_processor",W),Hm("An event processor returned `null`, will not send event.");if(u.data&&u.data.__sentry__===!0)return G;const Ie=u7(this,w,G,u);return c7(Ie,F)}).then(G=>{if(G===null){if(this.recordDroppedEvent("before_send",W),a){const nt=1+(o.spans||[]).length;this.recordDroppedEvent("before_send","span",nt)}throw Hm(`${F} returned \`null\`, will not send event.`)}const Pe=d.getSession()||y.getSession();if(M&&Pe&&this._updateSessionFromEvent(Pe,G),a){const rt=G.sdkProcessingMetadata?.spanCountBeforeProcessing||0,nt=G.spans?G.spans.length:0,Ae=rt-nt;Ae>0&&this.recordDroppedEvent("before_send","span",Ae)}const Ie=G.transaction_info;if(a&&Ie&&G.transaction!==o.transaction){const rt="custom";G.transaction_info={...Ie,source:rt}}return this.sendEvent(G,u),G}).then(null,G=>{throw D1(G)||R1(G)?G:(this.captureException(G,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:G}),dd(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
30Reason: ${G}`))})}_process(o){this._numProcessing++,o.then(u=>(this._numProcessing--,u),u=>(this._numProcessing--,u))}_clearOutcomes(){const o=this._outcomes;return this._outcomes={},Object.entries(o).map(([u,d])=>{const[y,w]=u.split(":");return{reason:y,category:w,quantity:d}})}_flushOutcomes(){$t&&jt.log("Flushing outcomes...");const o=this._clearOutcomes();if(o.length===0){$t&&jt.log("No outcomes to send");return}if(!this._dsn){$t&&jt.log("No dsn provided, will not send outcomes");return}$t&&jt.log("Sending outcomes:",o);const u=s7(o,this._options.tunnel&&zh(this._dsn));this.sendEnvelope(u)}}function c7(i,o){const u=`${o} must return \`null\` or a valid event.`;if(kh(i))return i.then(d=>{if(!Th(d)&&d!==null)throw dd(u);return d},d=>{throw dd(`${o} rejected with ${d}`)});if(!Th(i)&&i!==null)throw dd(u);return i}function u7(i,o,u,d){const{beforeSend:y,beforeSendTransaction:w,beforeSendSpan:v,ignoreSpans:a}=o;let M=u;if(S0(M)&&y)return y(M,d);if(x8(M)){if(v||a){const D=o7(M);if(a?.length&&v0(D,a))return null;if(v){const F=v(D);F?M=Dh(u,a7(F)):x0()}if(M.spans){const F=[],H=M.spans;for(const G of H){if(a?.length&&v0(G,a)){r5(H,G);continue}if(v){const Pe=v(G);Pe?F.push(Pe):(x0(),F.push(G))}else F.push(G)}const W=M.spans.length-F.length;W&&i.recordDroppedEvent("before_send","span",W),M.spans=F}}if(w){if(M.spans){const D=M.spans.length;M.sdkProcessingMetadata={...u.sdkProcessingMetadata,spanCountBeforeProcessing:D}}return w(M,d)}}return M}function S0(i){return i.type===void 0}function x8(i){return i.type==="transaction"}function h7(i){return[{type:"log",item_count:i.length,content_type:"application/vnd.sentry.items.log+json"},{items:i}]}function p7(i,o,u,d){const y={};return o?.sdk&&(y.sdk={name:o.sdk.name,version:o.sdk.version}),u&&d&&(y.dsn=zh(d)),Ac(y,[h7(i)])}function Zm(i,o){const u=d7(i)??[];if(u.length===0)return;const d=i.getOptions(),y=p7(u,d._metadata,d.tunnel,i.getDsn());v8().set(i,[]),i.emit("flushLogs"),i.sendEnvelope(y)}function d7(i){return v8().get(i)}function v8(){return jh("clientToLogBufferMap",()=>new WeakMap)}function f7(i,o){o.debug===!0&&($t?jt.enable():ha(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),bs().update(o.initialScope);const d=new i(o);return m7(d),d.init(),d}function m7(i){bs().setClient(i)}const w8=Symbol.for("SentryBufferFullError");function g7(i){const o=[];function u(){return i===void 0||o.length<i}function d(v){return o.splice(o.indexOf(v),1)[0]||Promise.resolve(void 0)}function y(v){if(!u())return vg(w8);const a=v();return o.indexOf(a)===-1&&o.push(a),a.then(()=>d(a)).then(null,()=>d(a).then(null,()=>{})),a}function w(v){return new Tc((a,M)=>{let D=o.length;if(!D)return a(!0);const F=setTimeout(()=>{v&&v>0&&a(!1)},v);o.forEach(H=>{tf(H).then(()=>{--D||(clearTimeout(F),a(!0))},M)})})}return{$:o,add:y,drain:w}}const _7=60*1e3;function y7(i,o=Date.now()){const u=parseInt(`${i}`,10);if(!isNaN(u))return u*1e3;
vendor: 4,208 bytes, lines 30-35
30const d=Date.parse(`${i}`);return isNaN(d)?_7:d-o}function b7(i,o){return i[o]||i.all||0}function x7(i,o,u=Date.now()){return b7(i,o)>u}function v7(i,{statusCode:o,headers:u},d=Date.now()){const y={...i},w=u?.["x-sentry-rate-limits"],v=u?.["retry-after"];if(w)for(const a of w.trim().split(",")){const[M,D,,,F]=a.split(":",5),H=parseInt(M,10),W=(isNaN(H)?60:H)*1e3;if(!D)y.all=d+W;else for(const G of D.split(";"))G==="metric_bucket"?(!F||F.split(";").includes("custom"))&&(y[G]=d+W):y[G]=d+W}else v?y.all=d+y7(v,d):o===429&&(y.all=d+60*1e3);return y}const w7=64;function B7(i,o,u=g7(i.bufferSize||w7)){let d={};const y=v=>u.drain(v);function w(v){const a=[];if(_1(v,(H,W)=>{const G=y1(W);x7(d,G)?i.recordDroppedEvent("ratelimit_backoff",G):a.push(H)}),a.length===0)return Promise.resolve({});const M=Ac(v[0],a),D=H=>{_1(M,(W,G)=>{i.recordDroppedEvent(H,y1(G))})},F=()=>o({body:p5(M)}).then(H=>(H.statusCode!==void 0&&(H.statusCode<200||H.statusCode>=300)&&$t&&jt.warn(`Sentry responded with status code ${H.statusCode} to sent event.`),d=v7(d,H),H),H=>{throw D("network_error"),$t&&jt.error("Encountered error running transport request:",H),H});return u.add(F).then(H=>H,H=>{if(H===w8)return $t&&jt.error("Skipped sending event because buffer is full."),D("queue_overflow"),Promise.resolve({});throw H})}return{send:w,flush:y}}function qm(i){if(!i)return{};const o=i.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!o)return{};const u=o[6]||"",d=o[8]||"";return{host:o[4],path:o[5],protocol:o[2],search:u,hash:d,relative:o[5]+u+d}}function T7(i){"aggregates"in i?i.attrs?.ip_address===void 0&&(i.attrs={...i.attrs,ip_address:"{{auto}}"}):i.ipAddress===void 0&&(i.ipAddress="{{auto}}")}function B8(i,o,u=[o],d="npm"){const y=i._metadata||{};y.sdk||(y.sdk={name:`sentry.javascript.${o}`,packages:u.map(w=>({name:`${d}:@sentry/${w}`,version:tl})),version:tl}),i._metadata=y}const S7=100;function rl(i,o){const u=Sr(),d=Ic();if(!u)return;const{beforeBreadcrumb:y=null,maxBreadcrumbs:w=S7}=u.getOptions();if(w<=0)return;const a={timestamp:Rh(),...i},M=y?ha(()=>y(a,o)):a;M!==null&&(u.emit&&u.emit("beforeAddBreadcrumb",M,o),d.addBreadcrumb(M,w))}let L1;const O7="FunctionToString",z1=new WeakMap,P7=(()=>({name:O7,setupOnce(){L1=Function.prototype.toString;try{Function.prototype.toString=function(...i){const o=pg(this),u=z1.has(Sr())&&o!==void 0?o:this;return L1.apply(u,i)}}catch{}},setup(i){z1.set(i,!0)}})),C7=P7,E7=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],M7="EventFilters",I7=(i={})=>{let o;return{name:M7,setup(u){const d=u.getOptions();o=F1(i,d)},processEvent(u,d,y){if(!o){const w=y.getOptions();o=F1(i,w)}return j7(u,o)?null:u}}},A7=((i={})=>({...I7(i),name:"InboundFilters"}));function F1(i={},o={}){return{allowUrls:[...i.allowUrls||[],...o.allowUrls||[]],denyUrls:[...i.denyUrls||[],...o.denyUrls||[]],ignoreErrors:[...i.ignoreErrors||[],...o.ignoreErrors||[],...i.disableErrorDefaults?[]:E7],ignoreTransactions:[...i.ignoreTransactions||[],...o.ignoreTransactions||[]]}}function j7(i,o){if(i.type){if(i.type==="transaction"&&R7(i,o.ignoreTransactions))return $t&&jt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
31Event: ${Ja(i)}`),!0}else{if(k7(i,o.ignoreErrors))return $t&&jt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
32Event: ${Ja(i)}`),!0;if(F7(i))return $t&&jt.warn(`Event dropped due to not having an error message, error type or stacktrace.
33Event: ${Ja(i)}`),!0;if(D7(i,o.denyUrls))return $t&&jt.warn(`Event dropped due to being matched by \`denyUrls\` option.
34Event: ${Ja(i)}.
35Url: ${jd(i)}`),!0;
35if(!L7(i,o.allowUrls))return $t&&jt.warn(`Event dropped due to not being matched by \`allowUrls\` option.
36Event: ${Ja(i)}.
37Url: ${jd(i)}`),!0}return!1}function k7(i,o){return o?.length?_8(i).some(u=>Jd(u,o)):!1}function R7(i,o){if(!o?.length)return!1;const u=i.transaction;return u?Jd(u,o):!1}function D7(i,o){if(!o?.length)return!1;const u=jd(i);return u?Jd(u,o):!1}function L7(i,o){if(!o?.length)return!0;const u=jd(i);return u?Jd(u,o):!0}function z7(i=[]){for(let o=i.length-1;o>=0;o--){const u=i[o];if(u&&u.filename!=="<anonymous>"&&u.filename!=="[native code]")return u.filename||null}return null}function jd(i){try{const u=[...i.exception?.values??[]].reverse().find(d=>d.mechanism?.parent_id===void 0&&d.stacktrace?.frames?.length)?.stacktrace?.frames;return u?z7(u):null}catch{return $t&&jt.error(`Cannot extract url for event ${Ja(i)}`),null}}function F7(i){return i.exception?.values?.length?!i.message&&!i.exception.values.some(o=>o.stacktrace||o.type&&o.type!=="Error"||o.value):!1}function N7(i,o,u,d,y,w){if(!y.exception?.values||!w||!ua(w.originalException,Error))return;const v=y.exception.values.length>0?y.exception.values[y.exception.values.length-1]:void 0;v&&(y.exception.values=O0(i,o,d,w.originalException,u,y.exception.values,v,0))}function O0(i,o,u,d,y,w,v,a){if(w.length>=u+1)return w;let M=[...w];if(ua(d[y],Error)){N1(v,a);const D=i(o,d[y]),F=M.length;$1(D,y,F,a),M=O0(i,o,u,d[y],y,[D,...M],D,F)}return Array.isArray(d.errors)&&d.errors.forEach((D,F)=>{if(ua(D,Error)){N1(v,a);const H=i(o,D),W=M.length;$1(H,`errors[${F}]`,W,a),M=O0(i,o,u,D,y,[H,...M],H,W)}}),M}function N1(i,o){i.mechanism={handled:!0,type:"auto.core.linked_errors",...i.mechanism,...i.type==="AggregateError"&&{is_exception_group:!0},exception_id:o}}function $1(i,o,u,d){i.mechanism={handled:!0,...i.mechanism,type:"chained",source:o,exception_id:u,parent_id:d}}function $7(i){const o="console";sl(o,i),ol(o,U7)}function U7(){"console"in Ri&&X9.forEach(function(i){i in Ri.console&&Ln(Ri.console,i,function(o){return Pd[i]=o,function(...u){gs("console",{args:u,level:i}),Pd[i]?.apply(Ri.console,u)}})})}function V7(i){return i==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(i)?i:"log"}const G7="Dedupe",H7=(()=>{let i;return{name:G7,processEvent(o){if(o.type)return o;try{if(q7(o,i))return $t&&jt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return i=o}}}),Z7=H7;function q7(i,o){return o?!!(W7(i,o)||K7(i,o)):!1}function W7(i,o){const u=i.message,d=o.message;return!(!u&&!d||u&&!d||!u&&d||u!==d||!S8(i,o)||!T8(i,o))}function K7(i,o){const u=U1(o),d=U1(i);return!(!u||!d||u.type!==d.type||u.value!==d.value||!S8(i,o)||!T8(i,o))}function T8(i,o){let u=r1(i),d=r1(o);if(!u&&!d)return!0;if(u&&!d||!u&&d||(u=u,d=d,d.length!==u.length))return!1;for(let y=0;y<d.length;y++){const w=d[y],v=u[y];if(w.filename!==v.filename||w.lineno!==v.lineno||w.colno!==v.colno||w.function!==v.function)return!1}return!0}function S8(i,o){let u=i.fingerprint,d=o.fingerprint;if(!u&&!d)return!0;if(u&&!d||!u&&d)return!1;u=u,d=d;try{return u.join("")===d.join("")}catch{return!1}}function U1(i){return i.exception?.values?.[0]}function O8(i){if(i!==void 0)return i>=400&&i<500?"warning":i>=500?"error":void 0}const Ph=Ri;function X7(){return"history"in Ph&&!!Ph.history}function Y7(){if(!("fetch"in Ph))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function P0(i){return i&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(i.toString())}function J7(){if(typeof EdgeRuntime=="string")return!0;if(!Y7())return!1;if(P0(Ph.fetch))return!0;let i=!1;const o=Ph.document;if(o&&typeof o.createElement=="function")try{const u=o.createElement("iframe");u.hidden=!0,o.head.appendChild(u),u.contentWindow?.fetch&&(i=P0(u.contentWindow.fetch)),o.head.removeChild(u)}catch(u){$t&&jt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",u)}return i}function Q7(i,o){const u="fetch";sl(u,i),ol(u,()=>ew(void 0,o))}function ew(i,o=!1){o&&!J7()||Ln(Ri,"fetch",function(u){return function(...d){const y=new Error,{method:w,url:v}=tw(d),a={args:d,fetchData:{method:w,url:v},startTimestamp:mn()*1e3,virtualError:y,headers:iw(d)};return gs("fetch",{...a}),u.apply(Ri,d).then(async M=>(gs("fetch",{...a,endTimestamp:mn()*1e3,response:M}),M),M=>{if(gs("fetch",{...a,endTimestamp:mn()*1e3,error:M}),ag(M)&&M.stack===void 0&&(M.stack=y.stack,ts(M,"framesToPop",1)),M instanceof TypeError&&(M.message==="Failed to fetch"||M.message==="Load failed"||M.message==="NetworkError when attempting to fetch resource."))try{const D=new URL(a.fetchData.url);M.message=`${M.message} (${D.host})`}catch{}throw M})}})}
37function C0(i,o){return!!i&&typeof i=="object"&&!!i[o]}function V1(i){return typeof i=="string"?i:i?C0(i,"url")?i.url:i.toString?i.toString():"":""}function tw(i){if(i.length===0)return{method:"GET",url:""};if(i.length===2){const[u,d]=i;return{url:V1(u),method:C0(d,"method")?String(d.method).toUpperCase():"GET"}}const o=i[0];return{url:V1(o),method:C0(o,"method")?String(o.method).toUpperCase():"GET"}}function iw(i){const[o,u]=i;try{if(typeof u=="object"&&u!==null&&"headers"in u&&u.headers)return new Headers(u.headers);if(d6(o))return new Headers(o.headers)}catch{}}function rw(){return"npm"}const dr=Ri;let E0=0;function P8(){return E0>0}function nw(){E0++,setTimeout(()=>{E0--})}function Sc(i,o={}){function u(y){return typeof y=="function"}if(!u(i))return i;try{const y=i.__sentry_wrapped__;if(y)return typeof y=="function"?y:i;if(pg(i))return i}catch{return i}const d=function(...y){try{const w=y.map(v=>Sc(v,o));return i.apply(this,w)}catch(w){throw nw(),dg(v=>{v.addEventProcessor(a=>(o.mechanism&&(m0(a,void 0),vc(a,o.mechanism)),a.extra={...a.extra,arguments:y},a)),p8(w)}),w}};try{for(const y in i)Object.prototype.hasOwnProperty.call(i,y)&&(d[y]=i[y])}catch{}W2(d,i),ts(i,"__sentry_wrapped__",d);try{Object.getOwnPropertyDescriptor(d,"name").configurable&&Object.defineProperty(d,"name",{get(){return i.name}})}catch{}return d}function sw(){const i=hg(),{referrer:o}=dr.document||{},{userAgent:u}=dr.navigator||{},d={...o&&{Referer:o},...u&&{"User-Agent":u}};return{url:i,headers:d}}function wg(i,o){const u=Bg(i,o),d={type:uw(o),value:hw(o)};return u.length&&(d.stacktrace={frames:u}),d.type===void 0&&d.value===""&&(d.value="Unrecoverable error caught"),d}function ow(i,o,u,d){const w=Sr()?.getOptions().normalizeDepth,v=gw(o),a={__serialized__:l8(o,w)};if(v)return{exception:{values:[wg(i,v)]},extra:a};const M={exception:{values:[{type:Yd(o)?o.constructor.name:d?"UnhandledRejection":"Error",value:fw(o,{isUnhandledRejection:d})}]},extra:a};if(u){const D=Bg(i,u);D.length&&(M.exception.values[0].stacktrace={frames:D})}return M}function Wm(i,o){return{exception:{values:[wg(i,o)]}}}function Bg(i,o){const u=o.stacktrace||o.stack||"",d=lw(o),y=cw(o);try{return i(u,d,y)}catch{}return[]}const aw=/Minified React error #\d+;/i;function lw(i){return i&&aw.test(i.message)?1:0}function cw(i){return typeof i.framesToPop=="number"?i.framesToPop:0}function C8(i){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?i instanceof WebAssembly.Exception:!1}function uw(i){const o=i?.name;return!o&&C8(i)?i.message&&Array.isArray(i.message)&&i.message.length==2?i.message[0]:"WebAssembly.Exception":o}function hw(i){const o=i?.message;return C8(i)?Array.isArray(i.message)&&i.message.length==2?i.message[1]:"wasm exception":o?o.error&&typeof o.error.message=="string"?o.error.message:o:"No error message"}function pw(i,o,u,d){const y=u?.syntheticException||void 0,w=Tg(i,o,y,d);return vc(w),w.level="error",u?.event_id&&(w.event_id=u.event_id),tf(w)}function dw(i,o,u="info",d,y){const w=d?.syntheticException||void 0,v=M0(i,o,w,y);return v.level=u,d?.event_id&&(v.event_id=d.event_id),tf(v)}function Tg(i,o,u,d,y){let w;if(H2(o)&&o.error)return Wm(i,o.error);if(s1(o)||c6(o)){const v=o;if("stack"in o)w=Wm(i,o);else{const a=v.name||(s1(v)?"DOMError":"DOMException"),M=v.message?`${a}: ${v.message}`:a;w=M0(i,M,u,d),m0(w,M)}return"code"in v&&(w.tags={...w.tags,"DOMException.code":`${v.code}`}),w}return ag(o)?Wm(i,o):Th(o)||Yd(o)?(w=ow(i,o,u,y),vc(w,{synthetic:!0}),w):(w=M0(i,o,u,d),m0(w,`${o}`),vc(w,{synthetic:!0}),w)}function M0(i,o,u,d){const y={};if(d&&u){const w=Bg(i,u);w.length&&(y.exception={values:[{value:o,stacktrace:{frames:w}}]}),vc(y,{synthetic:!0})}if(lg(o)){const{__sentry_template_string__:w,__sentry_template_values__:v}=o;return y.logentry={message:w,params:v},y}return y.message=o,y}function fw(i,{isUnhandledRejection:o}){const u=_6(i),d=o?"promise rejection":"exception";return H2(i)?`Event \`ErrorEvent\` captured as ${d} with message \`${i.message}\``:Yd(i)?`Event \`${mw(i)}\` (type=${i.type}) captured as ${d}`:`Object captured as ${d} with keys: ${u}`}function mw(i){try{const o=Object.getPrototypeOf(i);return o?o.constructor.name:void 0}catch{}}function gw(i){for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)){const u=i[o];if(u instanceof Error)return u}}const _w=5e3;class yw extends l7{constructor(o){const u=bw(o),d=dr.SENTRY_SDK_SOURCE||rw();B8(u,"browser",["browser"],d),u._metadata?.sdk&&(u._metadata.sdk.settings={infer_ip:u.sendDefaultPii?"auto":"never",...u._metadata.sdk.settings}),super(u);const{sendDefaultPii:y,sendClientReports:w,enableLogs:v}=this._options;dr.document&&(w||v)&&dr.document.addEventListener("visibilitychange",()=>{dr.document.visibilityState==="hidden"&&(w&&this._flushOutcomes(),v&&Zm(this))}),v&&(this.on("flush",()=>{Zm(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Zm(this)},_w)})),y&&this.on("beforeSendSession",T7)}eventFromException(o,u){return pw(this._options.stackParser,o,u,this._options.attachStacktrace)}eventFromMessage(o,u="info",d){return dw(this._options.stackParser,o,u,d,this._options.attachStacktrace)}_prepareEvent(o,u,d,y){return o.platform=o.platform||"javascript",super._prepareEvent(o,u,d,y)}}function bw(i){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:dr.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...i}}const xw=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pn=Ri,vw=1e3;let G1,I0,A0;function ww(i){sl("dom",i),ol("dom",Bw)}function Bw(){if(!pn.document)return;const i=gs.bind(null,"dom"),o=H1(i,!0);pn.document.addEventListener("click",o,!1),pn.document.addEventListener("keypress",o,!1),["EventTarget","Node"].forEach(u=>{const y=pn[u]?.prototype;y?.hasOwnProperty?.("addEventListener")&&(Ln(y,"addEventListener",function(w){return function(v,a,M){if(v==="click"||v=="keypress")try{const D=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},F=D[v]=D[v]||{refCount:0};if(!F.handler){const H=H1(i);F.handler=H,w.call(this,v,H,M)}F.refCount++}catch{}return w.call(this,v,a,M)}}),Ln(y,"removeEventListener",function(w){return function(v,a,M){if(v==="click"||v=="keypress")try{const D=this.__sentry_instrumentation_handlers__||{},F=D[v];F&&(F.refCount--,F.refCount<=0&&(w.call(this,v,F.handler,M),F.handler=void 0,delete D[v]),Object.keys(D).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return w.call(this,v,a,M)}}))})}function Tw(i){if(i.type!==I0)return!1;try{if(!i.target||i.target._sentryId!==A0)return!1}catch{}return!0}function Sw(i,o){return i!=="keypress"?!1:o?.tagName?!(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable):!0}function H1(i,o=!1){return u=>{if(!u||u._sentryCaptured)return;const d=Ow(u);if(Sw(u.type,d))return;ts(u,"_sentryCaptured",!0),d&&!d._sentryId&&ts(d,"_sentryId",Jn());
37const y=u.type==="keypress"?"input":u.type;Tw(u)||(i({event:u,name:y,global:o}),I0=u.type,A0=d?d._sentryId:void 0),clearTimeout(G1),G1=pn.setTimeout(()=>{A0=void 0,I0=void 0},vw)}}function Ow(i){try{return i.target}catch{return null}}let rd;function E8(i){const o="history";sl(o,i),ol(o,Pw)}function Pw(){if(pn.addEventListener("popstate",()=>{const o=pn.location.href,u=rd;if(rd=o,u===o)return;gs("history",{from:u,to:o})}),!X7())return;function i(o){return function(...u){const d=u.length>2?u[2]:void 0;if(d){const y=rd,w=Cw(String(d));if(rd=w,y===w)return o.apply(this,u);gs("history",{from:y,to:w})}return o.apply(this,u)}}Ln(pn.history,"pushState",i),Ln(pn.history,"replaceState",i)}function Cw(i){try{return new URL(i,pn.location.origin).toString()}catch{return i}}const fd={};function Ew(i){const o=fd[i];if(o)return o;let u=pn[i];if(P0(u))return fd[i]=u.bind(pn);const d=pn.document;if(d&&typeof d.createElement=="function")try{const y=d.createElement("iframe");y.hidden=!0,d.head.appendChild(y);const w=y.contentWindow;w?.[i]&&(u=w[i]),d.head.removeChild(y)}catch(y){xw&&jt.warn(`Could not create sandbox iframe for ${i} check, bailing to window.${i}: `,y)}return u&&(fd[i]=u.bind(pn))}function Mw(i){fd[i]=void 0}const ih="__sentry_xhr_v3__";function Iw(i){sl("xhr",i),ol("xhr",Aw)}function Aw(){if(!pn.XMLHttpRequest)return;const i=XMLHttpRequest.prototype;i.open=new Proxy(i.open,{apply(o,u,d){const y=new Error,w=mn()*1e3,v=yo(d[0])?d[0].toUpperCase():void 0,a=jw(d[1]);if(!v||!a)return o.apply(u,d);u[ih]={method:v,url:a,request_headers:{}},v==="POST"&&a.match(/sentry_key/)&&(u.__sentry_own_request__=!0);const M=()=>{const D=u[ih];if(D&&u.readyState===4){try{D.status_code=u.status}catch{}const F={endTimestamp:mn()*1e3,startTimestamp:w,xhr:u,virtualError:y};gs("xhr",F)}};return"onreadystatechange"in u&&typeof u.onreadystatechange=="function"?u.onreadystatechange=new Proxy(u.onreadystatechange,{apply(D,F,H){return M(),D.apply(F,H)}}):u.addEventListener("readystatechange",M),u.setRequestHeader=new Proxy(u.setRequestHeader,{apply(D,F,H){const[W,G]=H,Pe=F[ih];return Pe&&yo(W)&&yo(G)&&(Pe.request_headers[W.toLowerCase()]=G),D.apply(F,H)}}),o.apply(u,d)}}),i.send=new Proxy(i.send,{apply(o,u,d){const y=u[ih];if(!y)return o.apply(u,d);d[0]!==void 0&&(y.body=d[0]);const w={startTimestamp:mn()*1e3,xhr:u};return gs("xhr",w),o.apply(u,d)}})}function jw(i){if(yo(i))return i;try{return i.toString()}catch{}}function kw(i,o=Ew("fetch")){let u=0,d=0;async function y(w){const v=w.body.length;u+=v,d++;const a={body:w.body,method:"POST",referrerPolicy:"strict-origin",headers:i.headers,keepalive:u<=6e4&&d<15,...i.fetchOptions};try{const M=await o(i.url,a);return{statusCode:M.status,headers:{"x-sentry-rate-limits":M.headers.get("X-Sentry-Rate-Limits"),"retry-after":M.headers.get("Retry-After")}}}catch(M){throw Mw("fetch"),M}finally{u-=v,d--}}return B7(i,y)}const Rw=30,Dw=50;function j0(i,o,u,d){const y={filename:i,function:o==="<anonymous>"?il:o,in_app:!0};return u!==void 0&&(y.lineno=u),d!==void 0&&(y.colno=d),y}const Lw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,zw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fw=/\((\S*)(?::(\d+))(?::(\d+))\)/,Nw=/at (.+?) ?\(data:(.+?),/,$w=i=>{const o=i.match(Nw);if(o)return{filename:`<data:${o[2]}>`,function:o[1]};const u=Lw.exec(i);if(u){const[,y,w,v]=u;return j0(y,il,+w,+v)}const d=zw.exec(i);if(d){if(d[2]&&d[2].indexOf("eval")===0){const a=Fw.exec(d[2]);a&&(d[2]=a[1],d[3]=a[2],d[4]=a[3])}const[w,v]=M8(d[1]||il,d[2]);return j0(v,w,d[3]?+d[3]:void 0,d[4]?+d[4]:void 0)}},Uw=[Rw,$w],Vw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gw=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hw=i=>{const o=Vw.exec(i);if(o){if(o[3]&&o[3].indexOf(" > eval")>-1){const w=Gw.exec(o[3]);w&&(o[1]=o[1]||"eval",o[3]=w[1],o[4]=w[2],o[5]="")}let d=o[3],y=o[1]||il;return[y,d]=M8(y,d),j0(d,y,o[4]?+o[4]:void 0,o[5]?+o[5]:void 0)}},Zw=[Dw,Hw],qw=[Uw,Zw],Ww=V2(...qw),M8=(i,o)=>{const u=i.indexOf("safari-extension")!==-1,d=i.indexOf("safari-web-extension")!==-1;return u||d?[i.indexOf("@")!==-1?i.split("@")[0]:il,u?`safari-extension:${o}`:`safari-web-extension:${o}`]:[i,o]},rf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nd=1024,Kw="Breadcrumbs",Xw=((i={})=>{const o={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...i};
37return{name:Kw,setup(u){o.console&&$7(eB(u)),o.dom&&ww(Qw(u,o.dom)),o.xhr&&Iw(tB(u)),o.fetch&&Q7(iB(u)),o.history&&E8(rB(u)),o.sentry&&u.on("beforeSendEvent",Jw(u))}}}),Yw=Xw;function Jw(i){return function(u){Sr()===i&&rl({category:`sentry.${u.type==="transaction"?"transaction":"event"}`,event_id:u.event_id,level:u.level,message:Ja(u)},{event:u})}}function Qw(i,o){return function(d){if(Sr()!==i)return;let y,w,v=typeof o=="object"?o.serializeAttribute:void 0,a=typeof o=="object"&&typeof o.maxStringLength=="number"?o.maxStringLength:void 0;a&&a>nd&&(rf&&jt.warn(`\`dom.maxStringLength\` cannot exceed ${nd}, but a value of ${a} was configured. Sentry will use ${nd} instead.`),a=nd),typeof v=="string"&&(v=[v]);try{const D=d.event,F=nB(D)?D.target:D;y=q2(F,{keyAttrs:v,maxStringLength:a}),w=g6(F)}catch{y="<unknown>"}if(y.length===0)return;const M={category:`ui.${d.name}`,message:y};w&&(M.data={"ui.component_name":w}),rl(M,{event:d.event,name:d.name,global:d.global})}}function eB(i){return function(u){if(Sr()!==i)return;const d={category:"console",data:{arguments:u.args,logger:"console"},level:V7(u.level),message:o1(u.args," ")};if(u.level==="assert")if(u.args[0]===!1)d.message=`Assertion failed: ${o1(u.args.slice(1)," ")||"console.assert"}`,d.data.arguments=u.args.slice(1);else return;rl(d,{input:u.args,level:u.level})}}function tB(i){return function(u){if(Sr()!==i)return;const{startTimestamp:d,endTimestamp:y}=u,w=u.xhr[ih];if(!d||!y||!w)return;const{method:v,url:a,status_code:M,body:D}=w,F={method:v,url:a,status_code:M},H={xhr:u.xhr,input:D,startTimestamp:d,endTimestamp:y},W={category:"xhr",data:F,type:"http",level:O8(M)};i.emit("beforeOutgoingRequestBreadcrumb",W,H),rl(W,H)}}function iB(i){return function(u){if(Sr()!==i)return;const{startTimestamp:d,endTimestamp:y}=u;if(y&&!(u.fetchData.url.match(/sentry_key/)&&u.fetchData.method==="POST"))if(u.fetchData.method,u.fetchData.url,u.error){const w=u.fetchData,v={data:u.error,input:u.args,startTimestamp:d,endTimestamp:y},a={category:"fetch",data:w,level:"error",type:"http"};i.emit("beforeOutgoingRequestBreadcrumb",a,v),rl(a,v)}else{const w=u.response,v={...u.fetchData,status_code:w?.status};u.fetchData.request_body_size,u.fetchData.response_body_size,w?.status;const a={input:u.args,response:w,startTimestamp:d,endTimestamp:y},M={category:"fetch",data:v,type:"http",level:O8(v.status_code)};i.emit("beforeOutgoingRequestBreadcrumb",M,a),rl(M,a)}}}function rB(i){return function(u){if(Sr()!==i)return;let d=u.from,y=u.to;const w=qm(dr.location.href);let v=d?qm(d):void 0;const a=qm(y);v?.path||(v=w),w.protocol===a.protocol&&w.host===a.host&&(y=a.relative),w.protocol===v.protocol&&w.host===v.host&&(d=v.relative),rl({category:"navigation",data:{from:d,to:y}})}}function nB(i){return!!i&&!!i.target}const sB=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],oB="BrowserApiErrors",aB=((i={})=>{const o={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...i};return{name:oB,setupOnce(){o.setTimeout&&Ln(dr,"setTimeout",Z1),o.setInterval&&Ln(dr,"setInterval",Z1),o.requestAnimationFrame&&Ln(dr,"requestAnimationFrame",cB),o.XMLHttpRequest&&"XMLHttpRequest"in dr&&Ln(XMLHttpRequest.prototype,"send",uB);const u=o.eventTarget;u&&(Array.isArray(u)?u:sB).forEach(y=>hB(y,o))}}}),lB=aB;function Z1(i){return function(...o){const u=o[0];return o[0]=Sc(u,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ca(i)}`}}),i.apply(this,o)}}function cB(i){return function(o){return i.apply(this,[Sc(o,{mechanism:{data:{handler:ca(i)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function uB(i){return function(...o){const u=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(y=>{y in u&&typeof u[y]=="function"&&Ln(u,y,function(w){const v={mechanism:{data:{handler:ca(w)},handled:!1,type:`auto.browser.browserapierrors.xhr.${y}`}},a=pg(w);
37return a&&(v.mechanism.data.handler=ca(a)),Sc(w,v)})}),i.apply(this,o)}}function hB(i,o){const d=dr[i]?.prototype;d?.hasOwnProperty?.("addEventListener")&&(Ln(d,"addEventListener",function(y){return function(w,v,a){try{pB(v)&&(v.handleEvent=Sc(v.handleEvent,{mechanism:{data:{handler:ca(v),target:i},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return o.unregisterOriginalCallbacks&&dB(this,w,v),y.apply(this,[w,Sc(v,{mechanism:{data:{handler:ca(v),target:i},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ln(d,"removeEventListener",function(y){return function(w,v,a){try{const M=v.__sentry_wrapped__;M&&y.call(this,w,M,a)}catch{}return y.call(this,w,v,a)}}))}function pB(i){return typeof i.handleEvent=="function"}function dB(i,o,u){i&&typeof i=="object"&&"removeEventListener"in i&&typeof i.removeEventListener=="function"&&i.removeEventListener(o,u)}const fB=()=>({name:"BrowserSession",setupOnce(){if(typeof dr.document>"u"){rf&&jt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}E1({ignoreDuration:!0}),M1(),E8(({from:i,to:o})=>{i!==void 0&&i!==o&&(E1({ignoreDuration:!0}),M1())})}}),mB="GlobalHandlers",gB=((i={})=>{const o={onerror:!0,onunhandledrejection:!0,...i};return{name:mB,setupOnce(){Error.stackTraceLimit=50},setup(u){o.onerror&&(yB(u),q1("onerror")),o.onunhandledrejection&&(bB(u),q1("onunhandledrejection"))}}}),_B=gB;function yB(i){s6(o=>{const{stackParser:u,attachStacktrace:d}=I8();if(Sr()!==i||P8())return;const{msg:y,url:w,line:v,column:a,error:M}=o,D=wB(Tg(u,M||y,void 0,d,!1),w,v,a);D.level="error",d8(D,{originalException:M,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function bB(i){a6(o=>{const{stackParser:u,attachStacktrace:d}=I8();if(Sr()!==i||P8())return;const y=xB(o),w=cg(y)?vB(y):Tg(u,y,void 0,d,!0);w.level="error",d8(w,{originalException:y,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function xB(i){if(cg(i))return i;try{if("reason"in i)return i.reason;if("detail"in i&&"reason"in i.detail)return i.detail.reason}catch{}return i}function vB(i){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}}function wB(i,o,u,d){const y=i.exception=i.exception||{},w=y.values=y.values||[],v=w[0]=w[0]||{},a=v.stacktrace=v.stacktrace||{},M=a.frames=a.frames||[],D=d,F=u,H=BB(o)??hg();return M.length===0&&M.push({colno:D,filename:H,function:il,in_app:!0,lineno:F}),i}function q1(i){rf&&jt.log(`Global Handler attached: ${i}`)}function I8(){return Sr()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function BB(i){if(!(!yo(i)||i.length===0)){if(i.startsWith("data:")){const o=i.match(/^data:([^;]+)/),u=o?o[1]:"text/javascript",d=i.includes("base64,");return`<data:${u}${d?",base64":""}>`}return i.slice(0,1024)}}const TB=()=>({name:"HttpContext",preprocessEvent(i){if(!dr.navigator&&!dr.location&&!dr.document)return;const o=sw(),u={...o.headers,...i.request?.headers};i.request={...o,...i.request,headers:u}}}),SB="cause",OB=5,PB="LinkedErrors",CB=((i={})=>{const o=i.limit||OB,u=i.key||SB;return{name:PB,preprocessEvent(d,y,w){const v=w.getOptions();N7(wg,v.stackParser,u,o,d,y)}}}),EB=CB;function MB(){return IB()?(rf&&ha(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function IB(){if(typeof dr.window>"u")return!1;const i=dr;if(i.nw||!(i.chrome||i.browser)?.runtime?.id)return!1;const u=hg(),d=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(dr===dr.top&&d.some(w=>u.startsWith(`${w}://`)))}function A8(i){return[A7(),C7(),lB(),Yw(),_B(),EB(),Z7(),TB(),fB()]}function AB(i={}){const o=!i.skipBrowserExtensionCheck&&MB(),u={...i,enabled:o?!1:i.enabled,stackParser:r6(i.stackParser||Ww),integrations:r7({integrations:i.integrations,defaultIntegrations:i.defaultIntegrations==null?A8():i.defaultIntegrations}),transport:i.transport||kw};return f7(yw,u)}const j8=["activate","mount"],k8=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,jB=/(?:^|[-_])(\w)/g,kB=i=>i.replace(jB,o=>o.toUpperCase()).replace(/[-_]/g,""),RB="<Root>",Km="<Anonymous>",DB=(i,o)=>i.repeat(o),hh=(i,o)=>
37{if(!i)return Km;if(i.$root===i)return RB;if(!i.$options)return Km;const u=i.$options;let d=u.name||u._componentTag||u.__name;const y=u.__file;if(!d&&y){const w=y.match(/([^/\\]+)\.vue$/);w&&(d=w[1])}return(d?`<${kB(d)}>`:Km)+(y&&o!==!1?` at ${y}`:"")},LB=i=>{if(i&&(i._isVue||i.__isVue)&&i.$parent){const o=[];let u=0;for(;i;){if(o.length>0){const y=o[o.length-1];if(y.constructor===i.constructor){u++,i=i.$parent;continue}else u>0&&(o[o.length-1]=[y,u],u=0)}o.push(i),i=i.$parent}return`
38
39found in
40
41${o.map((y,w)=>`${(w===0?"---> ":DB(" ",5+w*2))+(Array.isArray(y)?`${hh(y[0])}... (${y[1]} recursive calls)`:hh(y))}`).join(`
42`)}`}return`
43
44(found in ${hh(i)})`},zB=(i,o)=>{const{errorHandler:u}=i.config;i.config.errorHandler=(d,y,w)=>{const v=hh(y,!1),a=y?LB(y):"",M={componentName:v,lifecycleHook:w,trace:a};if(o.attachProps&&y&&(y.$options?.propsData?M.propsData=y.$options.propsData:y.$props&&(M.propsData=y.$props)),setTimeout(()=>{p8(d,{captureContext:{contexts:{vue:M}},mechanism:{handled:!!u,type:"auto.function.vue.error_handler"}})}),typeof u=="function"&&i.config.errorHandler)u.call(i,d,y,w);else throw d}},W1="ui.vue",FB={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Xm(i,o,u){i.$_sentryRootComponentSpanTimer&&clearTimeout(i.$_sentryRootComponentSpanTimer),i.$_sentryRootComponentSpanTimer=setTimeout(()=>{i.$root?.$_sentryRootComponentSpan&&(i.$root.$_sentryRootComponentSpan.end(o),i.$root.$_sentryRootComponentSpan=void 0)},u)}function NB(i,o){function u(y){return y.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return i.some(y=>u(o)===u(y))}const $B=(i={})=>{const o=(i.hooks||[]).concat(j8).filter((y,w,v)=>v.indexOf(y)===w),u={},d=i.timeout||2e3;for(const y of o){const w=FB[y];if(!w){k8&&jt.warn(`Unknown hook: ${y}`);continue}for(const v of w)u[v]=function(){const a=this.$root===this;a&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||B1({name:"Application Render",op:`${W1}.render`,attributes:{[Sh]:"auto.ui.vue"},onlyIfParent:!0}),Xm(this,mn(),d));const M=hh(this,!1);if(!(a||(Array.isArray(i.trackComponents)?NB(i.trackComponents,M):i.trackComponents))){Xm(this,mn(),d);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const F=v===w[0],H=this.$root?.$_sentryRootComponentSpan||i5();if(F){if(H){const W=this.$_sentryComponentSpans[y];W&&W.end(),this.$_sentryComponentSpans[y]=B1({name:`Vue ${M}`,op:`${W1}.${y}`,attributes:{[Sh]:"auto.ui.vue"},onlyIfParent:!0})}}else{const W=this.$_sentryComponentSpans[y];if(!W)return;W.end(),Xm(this,mn(),d)}}}return u},UB=Ri,VB={Vue:UB.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:j8,timeout:2e3,trackComponents:!1}},GB="Vue",HB=(i={})=>({name:GB,setup(o){const u={...VB,...o.getOptions(),...i};if(!u.Vue&&!u.app){ha(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}u.app?(Array.isArray(u.app)?u.app:[u.app]).forEach(y=>K1(y,u)):u.Vue&&K1(u.Vue,u)}}),K1=(i,o)=>{k8&&i._instance?.isMounted===!0&&ha(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),o.attachErrorHandler&&zB(i,o),ef(o)&&i.mixin($B(o.tracingOptions))};function ZB(i={}){const o={defaultIntegrations:[...A8(),HB()],...i};return B8(o,"vue"),AB(o)}const qB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAEz0lEQVR4nO2dXYhVVRTHf+NcAk1mps+xIisLkSxGKHBIzNAgooRAgqBIsSeh7IugjxdfhAJ96KG3woICi5ACiYqykFAyxT4ItZAMRaohmWyaSW1meliJd27juXPunL3W3uvuH5yX4d773+v8Z+29z/46kMlkMplMxgUd1gVooA/YAVxc97c/gLGC74wCJ5v87gjwd8PfepD4Lyr43nLg6ya/7Z4rgAPAeATXksCxJsNsYB/2hlwaOtBGZmgLTpEh4DXrQgAntAVjNQRgF8VthwZLjfWjYwnwKXZV1tbwIabJs9gYMgb0K8SXHAuwy5JBoDt8iGnRCfyFnSl3hw9RiLlRr+cqYJah/l1aQqkYMt9Yf4WWUCqGWHc/bwB6jcsQBT3A+9i1HfXXq4FjTYKl2Btx9tobOFYg/irrNusC1DGuIRKzIfOBe6wLUYfKME5NQ6QEM4DnkAb0fmCObXEmoJIhlobUkAe+ecAiZALpYeA+wzIV4d6QbcBKQ/2yqFRZVm1IB3CnkXaruG7UlwMzjbRbxbUhvyELD1LCdZX1HbAG+NNIvxVcZwjAO8DLhvplcW8IwHFj/TK4rrLOEtODXzPcZ8hs4hoaaYZ7Q14BbjHUL4trQ25ChklSwnUbcgz7RXBlcZ0hqw21W8Xd4OJMpJrqBx5U1K0KV/MhlwF7gGuV9ELgqsoaQjbWpIwrQ0ZIbzCxEVe9rF5sVx5WgZsM6QA+QaZqU8aNIQuRB8HUcVNl3aygoYGbDLlaQUMDN4acVtDQwI0hXyhoaOCmDdkLfKygExo3GQLwlZJOSFwZcoD0h07cVFkAbwEfKGmFwlWGABxW1AqBO0OeAbYo6lWNqyoL4B/gEeANRc0qcZchIEE9ATyvrFsFLg0BOariJeB7A+3p4K7KqmcMuAN410i/FVQyxJoOYANikPW256JrgInnQLrnSexvetE1CFweLPoIuRD7m150HaQNj2j6Hfsbf75rWcC4o8XyKL9m15corWGLaTnnBdYFKKAPpXvVqSEyRa5EdueOI5Nac4nn5O0a0hP8PLRQTBnyHjLduwm4HVkc8RQwbFmoOrxMRZeil///k1yDZ
44Ix1O/J29eGmySxgN/aGDBNXjWLG69ib8QuwNnCcQHzHM01G42smtDkEPA58pCGWQgpa/9NsQMmMFOgHTmFXVf2Actc79gxZj90D4yDwJmJMBtkG9yt22bEzfIhpsQU7M04gZz5m6vgRGzMGkNdjmGDdgyniMHLEtyYngetIfz9kEPqAn9HNjjPAYo3gzkfMvaxvgMfQ7eXUyIfuN2UhYo5GhuwAunTCSpsu5EjAAcIaslkrIC/sQ+YlQpgxRFoHO0fBIuQkuheo3pDPaLO1V1XzKNUacgi4VTUCZ/Qg58ePUo0hPwGXqEbglKeZvhlHEIPNifk5ZKoMVPAbIzR/J7sKHgypYpvAAmSHlzkeDPmQ6b9mO/X9j9GxhnJtxhlgO/AiskAvGmIe7S1D2eGOncC9IQqSkeU5ZXtV60xK2ibMRdbcNt70UeBbJp8G3k8864ZdspGJN3yYcy+m70SG8RtXr1yvX8z2oRuZzBpGusHrJ/lMF/AQcPS/z+V5j8BsA1YBu5p8rhu4MXxxMjVk+vUB8qhtJpPJZNqQfwFpahnhJQsREQAAAABJRU5ErkJggg==";/*!
45  * vue-router v4.5.1
46  * (c) 2025 Eduardo San Martin Morote
47  * @license MIT
48  */const hc=typeof document<"u";function R8(i){return typeof i=="object"||"displayName"in i||"props"in i||"__vccOpts"in i}function WB(i){return i.__esModule||i[Symbol.toStringTag]==="Module"||i.default&&R8(i.default)}const Pi=Object.assign;function Ym(i,o){const u={};for(const d in o){const y=o[d];u[d]=ys(y)?y.map(i):i(y)}return u}const ph=()=>{},ys=Array.isArray,D8=/#/g,KB=/&/g,XB=/\//g,YB=/=/g,JB=/\?/g,L8=/\+/g,QB=/%5B/g,eT=/%5D/g,z8=/%5E/g,tT=/%60/g,F8=/%7B/g,iT=/%7C/g,N8=/%7D/g,rT=/%20/g;function Sg(i){return encodeURI(""+i).replace(iT,"|").replace(QB,"[").replace(eT,"]")}function nT(i){return Sg(i).replace(F8,"{").replace(N8,"}").replace(z8,"^")}function k0(i){return Sg(i).replace(L8,"%2B").replace(rT,"+").replace(D8,"%23").replace(KB,"%26").replace(tT,"`").replace(F8,"{").replace(N8,"}").replace(z8,"^")}function sT(i){return k0(i).replace(YB,"%3D")}function oT(i){return Sg(i).replace(D8,"%23").replace(JB,"%3F")}function aT(i){return i==null?"":oT(i).replace(XB,"%2F")}function Ch(i){try{return decodeURIComponent(""+i)}catch{}return""+i}const lT=/\/$/,cT=i=>i.replace(lT,"");function Jm(i,o,u="/"){let d,y={},w="",v="";const a=o.indexOf("#");let M=o.indexOf("?");return a<M&&a>=0&&(M=-1),M>-1&&(d=o.slice(0,M),w=o.slice(M+1,a>-1?a:o.length),y=i(w)),a>-1&&(d=d||o.slice(0,a),v=o.slice(a,o.length)),d=dT(d??o,u),{fullPath:d+(w&&"?")+w+v,path:d,query:y,hash:Ch(v)}}function uT(i,o){const u=o.query?i(o.query):"";return o.path+(u&&"?")+u+(o.hash||"")}function X1(i,o){return!o||!i.toLowerCase().startsWith(o.toLowerCase())?i:i.slice(o.length)||"/"}function hT(i,o,u){const d=o.matched.length-1,y=u.matched.length-1;return d>-1&&d===y&&Oc(o.matched[d],u.matched[y])&&$8(o.params,u.params)&&i(o.query)===i(u.query)&&o.hash===u.hash}function Oc(i,o){return(i.aliasOf||i)===(o.aliasOf||o)}function $8(i,o){if(Object.keys(i).length!==Object.keys(o).length)return!1;for(const u in i)if(!pT(i[u],o[u]))return!1;return!0}function pT(i,o){return ys(i)?Y1(i,o):ys(o)?Y1(o,i):i===o}function Y1(i,o){return ys(o)?i.length===o.length&&i.every((u,d)=>u===o[d]):i.length===1&&i[0]===o}function dT(i,o){if(i.startsWith("/"))return i;if(!i)return o;const u=o.split("/"),d=i.split("/"),y=d[d.length-1];(y===".."||y===".")&&d.push("");let w=u.length-1,v,a;for(v=0;v<d.length;v++)if(a=d[v],a!==".")if(a==="..")w>1&&w--;else break;return u.slice(0,w).join("/")+"/"+d.slice(v).join("/")}const Xo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Eh;(function(i){i.pop="pop",i.push="push"})(Eh||(Eh={}));var dh;(function(i){i.back="back",i.forward="forward",i.unknown=""})(dh||(dh={}));function fT(i){if(!i)if(hc){const o=document.querySelector("base");i=o&&o.getAttribute("href")||"/",i=i.replace(/^\w+:\/\/[^\/]+/,"")}else i="/";return i[0]!=="/"&&i[0]!=="#"&&(i="/"+i),cT(i)}const mT=/^[^#]+#/;function gT(i,o){return i.replace(mT,"#")+o}function _T(i,o){const u=document.documentElement.getBoundingClientRect(),d=i.getBoundingClientRect();return{behavior:o.behavior,left:d.left-u.left-(o.left||0),top:d.top-u.top-(o.top||0)}}const nf=()=>({left:window.scrollX,top:window.scrollY});function yT(i){let o;if("el"in i){const u=i.el,d=typeof u=="string"&&u.startsWith("#"),y=typeof u=="string"?d?document.getElementById(u.slice(1)):document.querySelector(u):u;if(!y)return;o=_T(y,i)}else o=i;"scrollBehavior"in document.documentElement.style?window.scrollTo(o):window.scrollTo(o.left!=null?o.left:window.scrollX,o.top!=null?o.top:window.scrollY)}
vendor: 6,605 bytes, line 48
48function J1(i,o){return(history.state?history.state.position-o:-1)+i}const R0=new Map;function bT(i,o){R0.set(i,o)}function xT(i){const o=R0.get(i);return R0.delete(i),o}let vT=()=>location.protocol+"//"+location.host;function U8(i,o){const{pathname:u,search:d,hash:y}=o,w=i.indexOf("#");if(w>-1){let a=y.includes(i.slice(w))?i.slice(w).length:1,M=y.slice(a);return M[0]!=="/"&&(M="/"+M),X1(M,"")}return X1(u,i)+d+y}function wT(i,o,u,d){let y=[],w=[],v=null;const a=({state:W})=>{const G=U8(i,location),Pe=u.value,Ie=o.value;let rt=0;if(W){if(u.value=G,o.value=W,v&&v===Pe){v=null;return}rt=Ie?W.position-Ie.position:0}else d(G);y.forEach(nt=>{nt(u.value,Pe,{delta:rt,type:Eh.pop,direction:rt?rt>0?dh.forward:dh.back:dh.unknown})})};function M(){v=u.value}function D(W){y.push(W);const G=()=>{const Pe=y.indexOf(W);Pe>-1&&y.splice(Pe,1)};return w.push(G),G}function F(){const{history:W}=window;W.state&&W.replaceState(Pi({},W.state,{scroll:nf()}),"")}function H(){for(const W of w)W();w=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",F)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",F,{passive:!0}),{pauseListeners:M,listen:D,destroy:H}}function Q1(i,o,u,d=!1,y=!1){return{back:i,current:o,forward:u,replaced:d,position:window.history.length,scroll:y?nf():null}}function BT(i){const{history:o,location:u}=window,d={value:U8(i,u)},y={value:o.state};y.value||w(d.value,{back:null,current:d.value,forward:null,position:o.length-1,replaced:!0,scroll:null},!0);function w(M,D,F){const H=i.indexOf("#"),W=H>-1?(u.host&&document.querySelector("base")?i:i.slice(H))+M:vT()+i+M;try{o[F?"replaceState":"pushState"](D,"",W),y.value=D}catch(G){console.error(G),u[F?"replace":"assign"](W)}}function v(M,D){const F=Pi({},o.state,Q1(y.value.back,M,y.value.forward,!0),D,{position:y.value.position});w(M,F,!0),d.value=M}function a(M,D){const F=Pi({},y.value,o.state,{forward:M,scroll:nf()});w(F.current,F,!0);const H=Pi({},Q1(d.value,M,null),{position:F.position+1},D);w(M,H,!1),d.value=M}return{location:d,state:y,push:a,replace:v}}function TT(i){i=fT(i);const o=BT(i),u=wT(i,o.state,o.location,o.replace);function d(w,v=!0){v||u.pauseListeners(),history.go(w)}const y=Pi({location:"",base:i,go:d,createHref:gT.bind(null,i)},o,u);return Object.defineProperty(y,"location",{enumerable:!0,get:()=>o.location.value}),Object.defineProperty(y,"state",{enumerable:!0,get:()=>o.state.value}),y}function ST(i){return i=location.host?i||location.pathname+location.search:"",i.includes("#")||(i+="#"),TT(i)}function OT(i){return typeof i=="string"||i&&typeof i=="object"}function V8(i){return typeof i=="string"||typeof i=="symbol"}const G8=Symbol("");var eb;(function(i){i[i.aborted=4]="aborted",i[i.cancelled=8]="cancelled",i[i.duplicated=16]="duplicated"})(eb||(eb={}));function Pc(i,o){return Pi(new Error,{type:i,[G8]:!0},o)}function ho(i,o){return i instanceof Error&&G8 in i&&(o==null||!!(i.type&o))}const tb="[^/]+?",PT={sensitive:!1,strict:!1,start:!0,end:!0},CT=/[.+*?^${}()[\]/\\]/g;function ET(i,o){const u=Pi({},PT,o),d=[];let y=u.start?"^":"";const w=[];for(const D of i){const F=D.length?[]:[90];u.strict&&!D.length&&(y+="/");for(let H=0;H<D.length;H++){const W=D[H];let G=40+(u.sensitive?.25:0);if(W.type===0)H||(y+="/"),y+=W.value.replace(CT,"\\$&"),G+=40;else if(W.type===1){const{value:Pe,repeatable:Ie,optional:rt,regexp:nt}=W;w.push({name:Pe,repeatable:Ie,optional:rt});const Ae=nt||tb;if(Ae!==tb){G+=10;try{new RegExp(`(${Ae})`)}catch(Te){throw new Error(`Invalid custom RegExp for param "${Pe}" (${Ae}): `+Te.message)}}let ke=Ie?`((?:${Ae})(?:/(?:${Ae}))*)`:`(${Ae})`;H||(ke=rt&&D.length<2?`(?:/${ke})`:"/"+ke),rt&&(ke+="?"),y+=ke,G+=20,rt&&(G+=-8),Ie&&(G+=-20),Ae===".*"&&(G+=-50)}F.push(G)}d.push(F)}if(u.strict&&u.end){const D=d.length-1;d[D][d[D].length-1]+=.7000000000000001}u.strict||(y+="/?"),u.end?y+="$":u.strict&&!y.endsWith("/")&&(y+="(?:/|$)");const v=new RegExp(y,u.sensitive?"":"i");function a(D){const F=D.match(v),H={};if(!F)return null;for(let W=1;W<F.length;W++){const G=F[W]||"",Pe=w[W-1];H[Pe.name]=G&&Pe.repeatable?G.split("/"):G}return H}function M(D){let F="",H=!1;for(const W of i){(!H||!F.endsWith("/"))&&(F+="/"),H=!1;for(const G of W)if(G.type===0)F+=G.value;else if(G.type===1){const{value:Pe,repeatable:Ie,optional:rt}=G,nt=Pe in D?D[Pe]:"";if(ys(nt)&&!Ie)throw new Error(`Provided param "${Pe}" is an array but it is not repeatable (* or + modifiers)`);const Ae=ys(nt)?nt.join("/"):nt;if(!Ae)if(rt)W.length<2&&(F.endsWith("/")?F=F.slice(0,-1):H=!0);else throw new Error(`Missing required param "${Pe}"`);F+=Ae}}return F||"/"}return{re:v,score:d,keys:w,parse:a,stringify:M}}function MT(i,o){let u=0;for(;u<i.length&&u<o.length;){const d=o[u]-i[u];if(d)return d;u++}return i.length<o.length?i.length===1&&i[0]===80?-1:1:i.length>o.length?o.length===1&&o[0]===80?1:-1:0}function H8(i,o){let u=0;const d=i.score,y=o.score;for(;u<d.length&&u<y.length;){const w=MT(d[u],y[u]);if(w)return w;u++}if(Math.abs(y.length-d.length)===1){if(ib(d))return 1;if(ib(y))return-1}return y.length-d.length}function ib(i){const o=i[i.length-1];return i.length>0&&o[o.length-1]<0}const IT={type:0,value:""},AT=/[a-zA-Z0-9_]/;function jT(i){if(!i)return[[]];if(i==="/")return[[IT]];if(!i.startsWith("/"))throw new Error(`Invalid path "${i}"`);function o(G){throw new Error(`ERR (${u})/"${D}": ${G}`)}let u=0,d=u;const y=[];let w;function v(){w&&y.push(w),w=[]}let a=0,M,D="",F="";function H(){D&&(u===0?w.push({type:0,value:D}):u===1||u===2||u===3?(w.length>1&&(M==="*"||M==="+")&&o(`A repeatable param (${D}) must be alone in its segment. eg: '/:ids+.`),w.push({type:1,value:D,regexp:F,repeatable:M==="*"||M==="+",optional:M==="*"||M==="?"})):o("Invalid state to consume buffer"),D="")}function W(){D+=M}for(;a<i.length;){if(M=i[a++],M==="\\"&&u!==2){d=u,u=4;continue}switch(u){case 0:M==="/"?(D&&H(),v()):M===":"?(H(),u=1):W();break;case 4:W(),u=d;break;case 1:M==="("?u=2:AT.test(M)?W():(H(),u=0,M!=="*"&&M!=="?"&&M!=="+"&&a--);break;case 2:M===")"?F[F.length-1]=="\\"?F=F.slice(0,-1)+M:u=3:F+=M;break;case 3:H(),u=0,M!=="*"&&M!=="?"&&M!=="+"&&a--,F="";break;default:o("Unknown state");break}}return u===2&&o(`Unfinished custom RegExp for param "${D}"`),H(),v(),y}function kT(i,o,u){const d=ET(jT(i.path),u),y=Pi(d,{record:i,parent:o,children:[],alias:[]});return o&&!y.record.aliasOf==!o.record.aliasOf&&o.children.push(y),y}function RT(i,o){const u=[],d=new Map;o=ob({strict:!1,end:!0,sensitive:!1},o);function y(H){return d.get(H)}function w(H,W,G){const Pe=!G,Ie=nb(H);Ie.aliasOf=G&&G.record;const rt=ob(o,H),nt=[Ie];
vendor: 11,299 bytes, line 48
48if("alias"in H){const Te=typeof H.alias=="string"?[H.alias]:H.alias;for(const je of Te)nt.push(nb(Pi({},Ie,{components:G?G.record.components:Ie.components,path:je,aliasOf:G?G.record:Ie})))}let Ae,ke;for(const Te of nt){const{path:je}=Te;if(W&&je[0]!=="/"){const Ce=W.record.path,Re=Ce[Ce.length-1]==="/"?"":"/";Te.path=W.record.path+(je&&Re+je)}if(Ae=kT(Te,W,rt),G?G.alias.push(Ae):(ke=ke||Ae,ke!==Ae&&ke.alias.push(Ae),Pe&&H.name&&!sb(Ae)&&v(H.name)),Z8(Ae)&&M(Ae),Ie.children){const Ce=Ie.children;for(let Re=0;Re<Ce.length;Re++)w(Ce[Re],Ae,G&&G.children[Re])}G=G||Ae}return ke?()=>{v(ke)}:ph}function v(H){if(V8(H)){const W=d.get(H);W&&(d.delete(H),u.splice(u.indexOf(W),1),W.children.forEach(v),W.alias.forEach(v))}else{const W=u.indexOf(H);W>-1&&(u.splice(W,1),H.record.name&&d.delete(H.record.name),H.children.forEach(v),H.alias.forEach(v))}}function a(){return u}function M(H){const W=zT(H,u);u.splice(W,0,H),H.record.name&&!sb(H)&&d.set(H.record.name,H)}function D(H,W){let G,Pe={},Ie,rt;if("name"in H&&H.name){if(G=d.get(H.name),!G)throw Pc(1,{location:H});rt=G.record.name,Pe=Pi(rb(W.params,G.keys.filter(ke=>!ke.optional).concat(G.parent?G.parent.keys.filter(ke=>ke.optional):[]).map(ke=>ke.name)),H.params&&rb(H.params,G.keys.map(ke=>ke.name))),Ie=G.stringify(Pe)}else if(H.path!=null)Ie=H.path,G=u.find(ke=>ke.re.test(Ie)),G&&(Pe=G.parse(Ie),rt=G.record.name);else{if(G=W.name?d.get(W.name):u.find(ke=>ke.re.test(W.path)),!G)throw Pc(1,{location:H,currentLocation:W});rt=G.record.name,Pe=Pi({},W.params,H.params),Ie=G.stringify(Pe)}const nt=[];let Ae=G;for(;Ae;)nt.unshift(Ae.record),Ae=Ae.parent;return{name:rt,path:Ie,params:Pe,matched:nt,meta:LT(nt)}}i.forEach(H=>w(H));function F(){u.length=0,d.clear()}return{addRoute:w,resolve:D,removeRoute:v,clearRoutes:F,getRoutes:a,getRecordMatcher:y}}function rb(i,o){const u={};for(const d of o)d in i&&(u[d]=i[d]);return u}function nb(i){const o={path:i.path,redirect:i.redirect,name:i.name,meta:i.meta||{},aliasOf:i.aliasOf,beforeEnter:i.beforeEnter,props:DT(i),children:i.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in i?i.components||null:i.component&&{default:i.component}};return Object.defineProperty(o,"mods",{value:{}}),o}function DT(i){const o={},u=i.props||!1;if("component"in i)o.default=u;else for(const d in i.components)o[d]=typeof u=="object"?u[d]:u;return o}function sb(i){for(;i;){if(i.record.aliasOf)return!0;i=i.parent}return!1}function LT(i){return i.reduce((o,u)=>Pi(o,u.meta),{})}function ob(i,o){const u={};for(const d in i)u[d]=d in o?o[d]:i[d];return u}function zT(i,o){let u=0,d=o.length;for(;u!==d;){const w=u+d>>1;H8(i,o[w])<0?d=w:u=w+1}const y=FT(i);return y&&(d=o.lastIndexOf(y,d-1)),d}function FT(i){let o=i;for(;o=o.parent;)if(Z8(o)&&H8(i,o)===0)return o}function Z8({record:i}){return!!(i.name||i.components&&Object.keys(i.components).length||i.redirect)}function NT(i){const o={};if(i===""||i==="?")return o;const d=(i[0]==="?"?i.slice(1):i).split("&");for(let y=0;y<d.length;++y){const w=d[y].replace(L8," "),v=w.indexOf("="),a=Ch(v<0?w:w.slice(0,v)),M=v<0?null:Ch(w.slice(v+1));if(a in o){let D=o[a];ys(D)||(D=o[a]=[D]),D.push(M)}else o[a]=M}return o}function ab(i){let o="";for(let u in i){const d=i[u];if(u=sT(u),d==null){d!==void 0&&(o+=(o.length?"&":"")+u);continue}(ys(d)?d.map(w=>w&&k0(w)):[d&&k0(d)]).forEach(w=>{w!==void 0&&(o+=(o.length?"&":"")+u,w!=null&&(o+="="+w))})}return o}function $T(i){const o={};for(const u in i){const d=i[u];d!==void 0&&(o[u]=ys(d)?d.map(y=>y==null?null:""+y):d==null?d:""+d)}return o}const UT=Symbol(""),lb=Symbol(""),Og=Symbol(""),q8=Symbol(""),D0=Symbol("");function Ju(){let i=[];function o(d){return i.push(d),()=>{const y=i.indexOf(d);y>-1&&i.splice(y,1)}}function u(){i=[]}return{add:o,list:()=>i.slice(),reset:u}}function ta(i,o,u,d,y,w=v=>v()){const v=d&&(d.enterCallbacks[y]=d.enterCallbacks[y]||[]);return()=>new Promise((a,M)=>{const D=W=>{W===!1?M(Pc(4,{from:u,to:o})):W instanceof Error?M(W):OT(W)?M(Pc(2,{from:o,to:W})):(v&&d.enterCallbacks[y]===v&&typeof W=="function"&&v.push(W),a())},F=w(()=>i.call(d&&d.instances[y],o,u,D));let H=Promise.resolve(F);i.length<3&&(H=H.then(D)),H.catch(W=>M(W))})}function Qm(i,o,u,d,y=w=>w()){const w=[];for(const v of i)for(const a in v.components){let M=v.components[a];if(!(o!=="beforeRouteEnter"&&!v.instances[a]))if(R8(M)){const F=(M.__vccOpts||M)[o];F&&w.push(ta(F,u,d,v,a,y))}else{let D=M();w.push(()=>D.then(F=>{if(!F)throw new Error(`Couldn't resolve component "${a}" at "${v.path}"`);const H=WB(F)?F.default:F;v.mods[a]=F,v.components[a]=H;const G=(H.__vccOpts||H)[o];return G&&ta(G,u,d,v,a,y)()}))}}return w}function cb(i){const o=zs(Og),u=zs(q8),d=_i(()=>{const M=wi(i.to);return o.resolve(M)}),y=_i(()=>{const{matched:M}=d.value,{length:D}=M,F=M[D-1],H=u.matched;if(!F||!H.length)return-1;const W=H.findIndex(Oc.bind(null,F));if(W>-1)return W;const G=ub(M[D-2]);return D>1&&ub(F)===G&&H[H.length-1].path!==G?H.findIndex(Oc.bind(null,M[D-2])):W}),w=_i(()=>y.value>-1&&qT(u.params,d.value.params)),v=_i(()=>y.value>-1&&y.value===u.matched.length-1&&$8(u.params,d.value.params));function a(M={}){if(ZT(M)){const D=o[wi(i.replace)?"replace":"push"](wi(i.to)).catch(ph);return i.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>D),D}return Promise.resolve()}return{route:d,href:_i(()=>d.value.href),isActive:w,isExactActive:v,navigate:a}}function VT(i){return i.length===1?i[0]:i}const GT=zn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:cb,setup(i,{slots:o}){const u=Mh(cb(i)),{options:d}=zs(Og),y=_i(()=>({[hb(i.activeClass,d.linkActiveClass,"router-link-active")]:u.isActive,[hb(i.exactActiveClass,d.linkExactActiveClass,"router-link-exact-active")]:u.isExactActive}));return()=>{const w=o.default&&VT(o.default(u));return i.custom?w:la("a",{"aria-current":u.isExactActive?i.ariaCurrentValue:null,href:u.href,onClick:u.navigate,class:y.value},w)}}}),HT=GT;function ZT(i){if(!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)&&!i.defaultPrevented&&!(i.button!==void 0&&i.button!==0)){if(i.currentTarget&&i.currentTarget.getAttribute){const o=i.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(o))return}return i.preventDefault&&i.preventDefault(),!0}}function qT(i,o){for(const u in o){const d=o[u],y=i[u];if(typeof d=="string"){if(d!==y)return!1}else if(!ys(y)||y.length!==d.length||d.some((w,v)=>w!==y[v]))return!1}return!0}function ub(i){return i?i.aliasOf?i.aliasOf.path:i.path:""}const hb=(i,o,u)=>i??o??u,WT=zn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(i,{attrs:o,slots:u}){const d=zs(D0),y=_i(()=>i.route||d.value),w=zs(lb,0),v=_i(()=>{let D=wi(w);const{matched:F}=y.value;let H;for(;(H=F[D])&&!H.components;)D++;return D}),a=_i(()=>y.value.matched[v.value]);ad(lb,_i(()=>v.value+1)),ad(UT,a),ad(D0,y);const M=vi();return na(()=>[M.value,a.value,i.name],([D,F,H],[W,G,Pe])=>{F&&(F.instances[H]=D,G&&G!==F&&D&&D===W&&(F.leaveGuards.size||(F.leaveGuards=G.leaveGuards),F.updateGuards.size||(F.updateGuards=G.updateGuards))),D&&F&&(!G||!Oc(F,G)||!W)&&(F.enterCallbacks[H]||[]).forEach(Ie=>Ie(D))},{flush:"post"}),()=>{const D=y.value,F=i.name,H=a.value,W=H&&H.components[F];if(!W)return pb(u.default,{Component:W,route:D});const G=H.props[F],Pe=G?G===!0?D.params:typeof G=="function"?G(D):G:null,rt=la(W,Pi({},Pe,o,{onVnodeUnmounted:nt=>{nt.component.isUnmounted&&(H.instances[F]=null)},ref:M}));return pb(u.default,{Component:rt,route:D})||rt}}});function pb(i,o){if(!i)return null;const u=i(o);return u.length===1?u[0]:u}const W8=WT;function KT(i){const o=RT(i.routes,i),u=i.parseQuery||NT,d=i.stringifyQuery||ab,y=i.history,w=Ju(),v=Ju(),a=Ju(),M=qb(Xo);let D=Xo;hc&&i.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const F=Ym.bind(null,De=>""+De),H=Ym.bind(null,aT),W=Ym.bind(null,Ch);function G(De,ut){let st,vt;return V8(De)?(st=o.getRecordMatcher(De),vt=ut):vt=De,o.addRoute(vt,st)}function Pe(De){const ut=o.getRecordMatcher(De);ut&&o.removeRoute(ut)}function Ie(){return o.getRoutes().map(De=>De.record)}function rt(De){return!!o.getRecordMatcher(De)}function nt(De,ut){if(ut=Pi({},ut||M.value),typeof De=="string"){const be=Jm(u,De,ut.path),Fe=o.resolve({path:be.path},ut),Ue=y.createHref(be.fullPath);return Pi(be,Fe,{params:W(Fe.params),hash:Ch(be.hash),redirectedFrom:void 0,href:Ue})}let st;if(De.path!=null)st=Pi({},De,{path:Jm(u,De.path,ut.path).path});else{const be=Pi({},De.params);for(const Fe in be)be[Fe]==null&&delete be[Fe];st=Pi({},De,{params:H(be)}),ut.params=H(ut.params)}const vt=o.resolve(st,ut),Ht=De.hash||"";vt.params=F(W(vt.params));const re=uT(d,Pi({},De,{hash:nT(Ht),path:vt.path})),ae=y.createHref(re);return Pi({fullPath:re,hash:Ht,query:d===ab?$T(De.query):De.query||{}},vt,{redirectedFrom:void 0,href:ae})}function Ae(De){return typeof De=="string"?Jm(u,De,M.value.path):Pi({},De)}function ke(De,ut){if(D!==De)return Pc(8,{from:ut,to:De})}function Te(De){return Re(De)}function je(De){return Te(Pi(Ae(De),{replace:!0}))}function Ce(De){const ut=De.matched[De.matched.length-1];if(ut&&ut.redirect){const{redirect:st}=ut;let vt=typeof st=="function"?st(De):st;return typeof vt=="string"&&(vt=vt.includes("?")||vt.includes("#")?vt=Ae(vt):{path:vt},vt.params={}),Pi({query:De.query,hash:De.hash,params:vt.path!=null?{}:De.params},vt)}}function Re(De,ut){const st=D=nt(De),vt=M.value,Ht=De.state,re=De.force,ae=De.replace===!0,be=Ce(st);if(be)return Re(Pi(Ae(be),{state:typeof be=="object"?Pi({},Ht,be.state):Ht,force:re,replace:ae}),ut||st);const Fe=st;Fe.redirectedFrom=ut;let Ue;return!re&&hT(d,vt,st)&&(Ue=Pc(16,{to:Fe,from:vt}),bi(vt,vt,!0,!1)),(Ue?Promise.resolve(Ue):dt(Fe,vt)).catch(Ne=>ho(Ne)?ho(Ne,2)?Ne:ir(Ne):ni(Ne,Fe,vt)).then(Ne=>{if(Ne){if(ho(Ne,2))return Re(Pi({replace:ae},Ae(Ne.to),{state:typeof Ne.to=="object"?Pi({},Ht,Ne.to.state):Ht,force:re}),ut||Fe)}else Ne=Xe(Fe,vt,!0,ae,Ht);return _t(Fe,vt,Ne),Ne})}function pt(De,ut){const st=ke(De,ut);return st?Promise.reject(st):Promise.resolve()}function Ge(De){const ut=gt.values().next().value;return ut&&typeof ut.runWithContext=="function"?ut.runWithContext(De):De()}function dt(De,ut){let st;const[vt,Ht,re]=XT(De,ut);st=Qm(vt.reverse(),"beforeRouteLeave",De,ut);for(const be of vt)be.leaveGuards.forEach(Fe=>{st.push(ta(Fe,De,ut))});const ae=pt.bind(null,De,ut);return st.push(ae),At(st).then(()=>{st=[];for(const be of w.list())st.push(ta(be,De,ut));return st.push(ae),At(st)}).then(()=>{st=Qm(Ht,"beforeRouteUpdate",De,ut);for(const be of Ht)be.updateGuards.forEach(Fe=>{st.push(ta(Fe,De,ut))});return st.push(ae),At(st)}).then(()=>{st=[];for(const be of re)if(be.beforeEnter)if(ys(be.beforeEnter))for(const Fe of be.beforeEnter)st.push(ta(Fe,De,ut));else st.push(ta(be.beforeEnter,De,ut));return st.push(ae),At(st)}).then(()=>(De.matched.forEach(be=>be.enterCallbacks={}),st=Qm(re,"beforeRouteEnter",De,ut,Ge),st.push(ae),At(st))).then(()=>{st=[];for(const be of v.list())st.push(ta(be,De,ut));return st.push(ae),At(st)}).catch(be=>ho(be,8)?be:Promise.reject(be))}
48function _t(De,ut,st){a.list().forEach(vt=>Ge(()=>vt(De,ut,st)))}function Xe(De,ut,st,vt,Ht){const re=ke(De,ut);if(re)return re;const ae=ut===Xo,be=hc?history.state:{};st&&(vt||ae?y.replace(De.fullPath,Pi({scroll:ae&&be&&be.scroll},Ht)):y.push(De.fullPath,Ht)),M.value=De,bi(De,ut,st,ae),ir()}let Et;function di(){Et||(Et=y.listen((De,ut,st)=>{if(!ct.listening)return;const vt=nt(De),Ht=Ce(vt);if(Ht){Re(Pi(Ht,{replace:!0,force:!0}),vt).catch(ph);return}D=vt;const re=M.value;hc&&bT(J1(re.fullPath,st.delta),nf()),dt(vt,re).catch(ae=>ho(ae,12)?ae:ho(ae,2)?(Re(Pi(Ae(ae.to),{force:!0}),vt).then(be=>{ho(be,20)&&!st.delta&&st.type===Eh.pop&&y.go(-1,!1)}).catch(ph),Promise.reject()):(st.delta&&y.go(-st.delta,!1),ni(ae,vt,re))).then(ae=>{ae=ae||Xe(vt,re,!1),ae&&(st.delta&&!ho(ae,8)?y.go(-st.delta,!1):st.type===Eh.pop&&ho(ae,20)&&y.go(-1,!1)),_t(vt,re,ae)}).catch(ph)}))}let yi=Ju(),qt=Ju(),It;function ni(De,ut,st){ir(De);const vt=qt.list();return vt.length?vt.forEach(Ht=>Ht(De,ut,st)):console.error(De),Promise.reject(De)}function Ft(){return It&&M.value!==Xo?Promise.resolve():new Promise((De,ut)=>{yi.add([De,ut])})}function ir(De){return It||(It=!De,di(),yi.list().forEach(([ut,st])=>De?st(De):ut()),yi.reset()),De}function bi(De,ut,st,vt){const{scrollBehavior:Ht}=i;if(!hc||!Ht)return Promise.resolve();const re=!st&&xT(J1(De.fullPath,0))||(vt||!st)&&history.state&&history.state.scroll||null;return J0().then(()=>Ht(De,ut,re)).then(ae=>ae&&yT(ae)).catch(ae=>ni(ae,De,ut))}const Bi=De=>y.go(De);let Ye;const gt=new Set,ct={currentRoute:M,listening:!0,addRoute:G,removeRoute:Pe,clearRoutes:o.clearRoutes,hasRoute:rt,getRoutes:Ie,resolve:nt,options:i,push:Te,replace:je,go:Bi,back:()=>Bi(-1),forward:()=>Bi(1),beforeEach:w.add,beforeResolve:v.add,afterEach:a.add,onError:qt.add,isReady:Ft,install(De){const ut=this;De.component("RouterLink",HT),De.component("RouterView",W8),De.config.globalProperties.$router=ut,Object.defineProperty(De.config.globalProperties,"$route",{enumerable:!0,get:()=>wi(M)}),hc&&!Ye&&M.value===Xo&&(Ye=!0,Te(y.location).catch(Ht=>{}));const st={};for(const Ht in Xo)Object.defineProperty(st,Ht,{get:()=>M.value[Ht],enumerable:!0});De.provide(Og,ut),De.provide(q8,Hb(st)),De.provide(D0,M);const vt=De.unmount;gt.add(De),De.unmount=function(){gt.delete(De),gt.size<1&&(D=Xo,Et&&Et(),Et=null,M.value=Xo,Ye=!1,It=!1),vt()}}};function At(De){return De.reduce((ut,st)=>ut.then(()=>Ge(st)),Promise.resolve())}return ct}function XT(i,o){const u=[],d=[],y=[],w=Math.max(o.matched.length,i.matched.length);for(let v=0;v<w;v++){const a=o.matched[v];a&&(i.matched.find(D=>Oc(D,a))?d.push(a):u.push(a));const M=i.matched[v];M&&(o.matched.find(D=>Oc(D,M))||y.push(M))}return[u,d,y]}/**
49 * @license lucide-vue-next v0.544.0 - ISC
50 *
51 * This source code is licensed under the ISC license.
52 * See the LICENSE file in the root directory of this source tree.
53 */const db=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YT=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,u,d)=>d?d.toUpperCase():u.toLowerCase()),JT=i=>{const o=YT(i);return o.charAt(0).toUpperCase()+o.slice(1)},QT=(...i)=>i.filter((o,u,d)=>!!o&&o.trim()!==""&&d.indexOf(o)===u).join(" ").trim(),fb=i=>i==="";/**
54 * @license lucide-vue-next v0.544.0 - ISC
55 *
56 * This source code is licensed under the ISC license.
57 * See the LICENSE file in the root directory of this source tree.
58 */var Qu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
59 * @license lucide-vue-next v0.544.0 - ISC
60 *
61 * This source code is licensed under the ISC license.
62 * See the LICENSE file in the root directory of this source tree.
63 */const eS=({name:i,iconNode:o,absoluteStrokeWidth:u,"absolute-stroke-width":d,strokeWidth:y,"stroke-width":w,size:v=Qu.width,color:a=Qu.stroke,...M},{slots:D})=>la("svg",{...Qu,...M,width:v,height:v,stroke:a,"stroke-width":fb(u)||fb(d)||u===!0||d===!0?Number(y||w||Qu["stroke-width"])*24/Number(v):y||w||Qu["stroke-width"],class:QT("lucide",M.class,...i?[`lucide-${db(JT(i))}-icon`,`lucide-${db(i)}`]:["lucide-icon"])},[...o.map(F=>la(...F)),...D.default?[D.default()]:[]]);/**
64 * @license lucide-vue-next v0.544.0 - ISC
65 *
66 * This source code is licensed under the ISC license.
67 * See the LICENSE file in the root directory of this source tree.
68 */const sf=(i,o)=>(u,{slots:d,attrs:y})=>la(eS,{...y,...u,iconNode:o,name:i},d);/**
69 * @license lucide-vue-next v0.544.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const tS=sf("construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
74 * @license lucide-vue-next v0.544.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */const iS=sf("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
79 * @license lucide-vue-next v0.544.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const rS=sf("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
84 * @license lucide-vue-next v0.544.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const md=sf("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),nS=zn({__name:"ExplainerModal",setup(i){const o=vi(),u=()=>{o.value?.showModal()};return(d,y)=>(Pt(),Lt("div",null,[ue("button",{class:"btn btn-primary btn-md",onClick:u},"How do I use this site?"),ue("dialog",{ref_key:"modal",ref:o,class:"modal"},[...y[0]||(y[0]=[ue("div",{class:"modal-box max-w-3xl max-h-[80vh] overflow-y-auto"},[ue("form",{method:"dialog"},[ue("button",{class:"btn btn-sm btn-circle btn-ghost absolute right-2 top-2"},"✕")]),ue("div",{class:"space-y-6"},[ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"},"What does this map show?"),ue("p",{class:"text-base-content/80 leading-relaxed"},[Xn(" Each dot on the map is a location that has received an award under the "),ue("a",{class:"link",href:"https://dceo.illinois.gov/broadband/bead.html"},"BEAD Connect Illinois Round 4"),Xn(" broadband funding program. Please refer to the legend in the bottom-left corner to get to know the symbols and colors used on the map. ")])]),ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"},"How do I navigate the map?"),ue("p",{class:"text-base-content/80 leading-relaxed"}," You can zoom in and out using your mouse wheel, or the plus (+) and minus (-) buttons in the top-right corner. Click and drag the map to move it. ")]),ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"},"How do I change the map colors?"),ue("p",{class:"text-base-content/80 leading-relaxed"},' Use the dropdown menu in the top left ("Color the map by") to choose a color scheme for the map. You can color the locations based on location type, broadband provider, or technology. ')]),ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"},"How do I learn more about a location?"),ue("p",{class:"text-base-content/80 leading-relaxed"}," When you hover your mouse over a location, you'll see details such as the broadband provider who received the award, the technology to be deployed, and expected maximum speeds. If you don't see a popup when hovering over a location, you may need to how in more. ")]),ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"},'What are the two "location types"?'),ue("p",{class:"text-base-content/80 leading-relaxed"}," Broadband serviceable locations (BSLs) are residences and businesses, while community anchor institutions (CAIs) are entities that serve the public, such as schools, libraries, and health facilities. ")]),ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"}," I don't recognize all of the broadband providers. "),ue("p",{class:"text-base-content/80 leading-relaxed"}," Some providers with an award may have a different legal name than you're used to, for example Illinois Bell Telephone Company is commonly known as AT&T, and Citizens Telecommunications Company as Frontier Internet. Others represent a group of providers working together, for example Strategic Management is made up of Shawnee Communications, Mosaic Technologies, Adams Telephone C
88ooperative, WK&T, and Peninsula Fiber Network. ")]),ue("div",null,[ue("h4",{class:"font-semibold text-lg mb-2"}," Where can I send a question or comment about this site? "),ue("p",{class:"text-base-content/80 leading-relaxed"},[Xn(" Please email "),ue("a",{class:"link",href:"mailto:[email protected]"},"[email protected]"),Xn(". ")])])]),ue("div",{class:"modal-action"},[ue("form",{method:"dialog"},[ue("button",{class:"btn btn-primary"},"Got it!")])])],-1),ue("form",{method:"dialog",class:"modal-backdrop"},[ue("button",null,"close")],-1)])],512)]))}}),sS={class:"text-xs flex-1"},oS=zn({__name:"AppBanner",props:{alertStyle:{default:"info"},icon:{},dismissible:{type:Boolean,default:!0}},setup(i){const o=vi(!0),u=()=>{o.value=!1};return(d,y)=>(Pt(),xc(_9,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 -translate-y-full","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 translate-y-0 max-h-20","leave-to-class":"opacity-0 -translate-y-full max-h-0"},{default:eg(()=>[o.value?(Pt(),Lt("div",{key:0,class:kn(`block alert alert-${d.alertStyle} text-sm py-2 px-3 flex items-center gap-2 rounded-none border-0`),role:"alert"},[d.icon?(Pt(),xc(b3(d.icon),{key:0,class:"w-4 h-4 flex-shrink-0"})):or("",!0),ue("span",sS,[v3(d.$slots,"default")]),d.dismissible?(Pt(),Lt("button",{key:1,onClick:u,class:"ml-auto flex-shrink-0 p-1 hover:bg-black/10 rounded transition-colors duration-200","aria-label":"Dismiss banner"},[Wi(wi(md),{class:"w-3 h-3"})])):or("",!0)],2)):or("",!0)]),_:3}))}}),Pg=Kd("app",()=>{const i=vi(!1),o=()=>{const w=window.innerWidth;i.value=w<1024},u=()=>{o(),window.addEventListener("resize",o)},d=_i(()=>i.value?5.5:6.25);return{isSmallScreen:i,mapZoom:d,initializeScreenSize:u,cleanup:()=>{window.removeEventListener("resize",o)}}}),aS={class:"h-screen flex flex-col bg-base-100"},lS={class:"bg-base-300 text-white p-3 flex items-center justify-between flex-shrink-0"},cS={class:"flex-1 min-h-0 flex"},uS=zn({__name:"App",setup(i){const o=Pg();return Cc(()=>{o.initializeScreenSize()}),tg(()=>{o.cleanup()}),(u,d)=>(Pt(),Lt("div",aS,[Wi(oS,{class:"lg:hidden","alert-style":"warning",icon:wi(rS)},{default:eg(()=>[...d[0]||(d[0]=[Xn(" This site works best on larger screens. ",-1)])]),_:1},8,["icon"]),ue("header",lS,[d[1]||(d[1]=ue("div",{class:"flex items-center"},[ue("img",{alt:"Illinois logo",class:"invert w-8 h-8 mr-2",src:qB}),ue("div",{class:"font-bold text-2xl"},"BEAD Connect Illinois Round 4: Award Map")],-1)),Wi(nS)]),ue("div",cS,[Wi(wi(W8),{class:"flex-1"})])]))}});var gd={exports:{}};/**
89 * MapLibre GL JS
90 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.7.2/LICENSE.txt
91 */var hS=gd.exports,mb;function pS(){return mb||(mb=1,(function(i,o){(function(u,d){i.exports=d()})(hS,(function(){var u={},d={};function y(v,a,M){if(d[v]=M,v==="index"){var D="var sharedModule = {}; ("+d.shared+")(sharedModule); ("+d.worker+")(sharedModule);",F={};return d.shared(F),d.index(u,F),typeof window<"u"&&u.setWorkerUrl(window.URL.createObjectURL(new Blob([D],{type:"text/javascript"}))),u}}y("shared",["exports"],(function(v){function a(n,t,r,l){return new(r||(r=Promise))((function(h,m){function _(O){try{B(l.next(O))}catch(P){m(P)}}function x(O){try{B(l.throw(O))}catch(P){m(P)}}function B(O){var P;O.done?h(O.value):(P=O.value,P instanceof r?P:new r((function(I){I(P)}))).then(_,x)}B((l=l.apply(n,t||[])).next())}))}function M(n,t){this.x=n,this.y=t}function D(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var F,H;typeof SuppressedError=="function"&&SuppressedError,M.prototype={clone(){return new M(this.x,this.y)},add(n){return this.clone()._add(n)},sub(n){return this.clone()._sub(n)},multByPoint(n){return this.clone()._multByPoint(n)},divByPoint(n){return this.clone()._divByPoint(n)},mult(n){return this.clone()._mult(n)},div(n){return this.clone()._div(n)},rotate(n){return this.clone()._rotate(n)}
vendor: 13,060 bytes, line 91
91,rotateAround(n,t){return this.clone()._rotateAround(n,t)},matMult(n){return this.clone()._matMult(n)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(n){return this.x===n.x&&this.y===n.y},dist(n){return Math.sqrt(this.distSqr(n))},distSqr(n){const t=n.x-this.x,r=n.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(n){return Math.atan2(this.y-n.y,this.x-n.x)},angleWith(n){return this.angleWithSep(n.x,n.y)},angleWithSep(n,t){return Math.atan2(this.x*t-this.y*n,this.x*n+this.y*t)},_matMult(n){const t=n[2]*this.x+n[3]*this.y;return this.x=n[0]*this.x+n[1]*this.y,this.y=t,this},_add(n){return this.x+=n.x,this.y+=n.y,this},_sub(n){return this.x-=n.x,this.y-=n.y,this},_mult(n){return this.x*=n,this.y*=n,this},_div(n){return this.x/=n,this.y/=n,this},_multByPoint(n){return this.x*=n.x,this.y*=n.y,this},_divByPoint(n){return this.x/=n.x,this.y/=n.y,this},_unit(){return this._div(this.mag()),this},_perp(){const n=this.y;return this.y=this.x,this.x=-n,this},_rotate(n){const t=Math.cos(n),r=Math.sin(n),l=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=l,this},_rotateAround(n,t){const r=Math.cos(n),l=Math.sin(n),h=t.y+l*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-l*(this.y-t.y),this.y=h,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:M},M.convert=function(n){if(n instanceof M)return n;if(Array.isArray(n))return new M(+n[0],+n[1]);if(n.x!==void 0&&n.y!==void 0)return new M(+n.x,+n.y);throw new Error("Expected [x, y] or {x, y} point format")};var W=(function(){if(H)return F;function n(t,r,l,h){this.cx=3*t,this.bx=3*(l-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(h-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=l,this.p2y=h}return H=1,F=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var l=t,h=0;h<8;h++){var m=this.sampleCurveX(l)-t;if(Math.abs(m)<r)return l;var _=this.sampleCurveDerivativeX(l);if(Math.abs(_)<1e-6)break;l-=m/_}var x=0,B=1;for(l=t,h=0;h<20&&(m=this.sampleCurveX(l),!(Math.abs(m-t)<r));h++)t>m?x=l:B=l,l=.5*(B-x)+x;return l},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},F})(),G=D(W);let Pe,Ie;function rt(){return Pe==null&&(Pe=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Pe}function nt(){if(Ie==null&&(Ie=!1,rt())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let l=0;l<25;l++){const h=4*l;t.fillStyle=`rgb(${h},${h+1},${h+2})`,t.fillRect(l%5,Math.floor(l/5),1,1)}const r=t.getImageData(0,0,5,5).data;for(let l=0;l<100;l++)if(l%4!=3&&r[l]!==l){Ie=!0;break}}}return Ie||!1}var Ae=1e-6,ke=typeof Float32Array<"u"?Float32Array:Array;function Te(){var n=new ke(9);return ke!=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}function je(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function Ce(){var n=new ke(3);return ke!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function Re(n){var t=n[0],r=n[1],l=n[2];return Math.sqrt(t*t+r*r+l*l)}function pt(n,t,r){var l=new ke(3);return l[0]=n,l[1]=t,l[2]=r,l}function Ge(n,t,r){return n[0]=t[0]+r[0],n[1]=t[1]+r[1],n[2]=t[2]+r[2],n}function dt(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n}function _t(n,t,r){var l=t[0],h=t[1],m=t[2],_=r[0],x=r[1],B=r[2];return n[0]=h*B-m*x,n[1]=m*_-l*B,n[2]=l*x-h*_,n}var Xe,Et=Re;function di(n,t,r){var l=t[0],h=t[1],m=t[2],_=t[3];return n[0]=r[0]*l+r[4]*h+r[8]*m+r[12]*_,n[1]=r[1]*l+r[5]*h+r[9]*m+r[13]*_,n[2]=r[2]*l+r[6]*h+r[10]*m+r[14]*_,n[3]=r[3]*l+r[7]*h+r[11]*m+r[15]*_,n}function yi(){var n=new ke(4);return ke!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function qt(n,t,r,l){var h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",m=Math.PI/360;t*=m,l*=m,r*=m;var _=Math.sin(t),x=Math.cos(t),B=Math.sin(r),O=Math.cos(r),P=Math.sin(l),I=Math.cos(l);switch(h){case"xyz":n[0]=_*O*I+x*B*P,n[1]=x*B*I-_*O*P,n[2]=x*O*P+_*B*I,n[3]=x*O*I-_*B*P;break;case"xzy":n[0]=_*O*I-x*B*P,n[1]=x*B*I-_*O*P,n[2]=x*O*P+_*B*I,n[3]=x*O*I+_*B*P;break;case"yxz":n[0]=_*O*I+x*B*P,n[1]=x*B*I-_*O*P,n[2]=x*O*P-_*B*I,n[3]=x*O*I+_*B*P;break;case"yzx":n[0]=_*O*I+x*B*P,n[1]=x*B*I+_*O*P,n[2]=x*O*P-_*B*I,n[3]=x*O*I-_*B*P;break;case"zxy":n[0]=_*O*I-x*B*P,n[1]=x*B*I+_*O*P,n[2]=x*O*P+_*B*I,n[3]=x*O*I-_*B*P;break;case"zyx":n[0]=_*O*I-x*B*P,n[1]=x*B*I+_*O*P,n[2]=x*O*P-_*B*I,n[3]=x*O*I+_*B*P;break;default:throw new Error("Unknown angle order "+h)}return n}function It(){var n=new ke(2);return ke!=Float32Array&&(n[0]=0,n[1]=0),n}function ni(n,t){var r=new ke(2);return r[0]=n,r[1]=t,r}Ce(),Xe=new ke(4),ke!=Float32Array&&(Xe[0]=0,Xe[1]=0,Xe[2]=0,Xe[3]=0),Ce(),pt(1,0,0),pt(0,1,0),yi(),yi(),Te(),It();const Ft=8192;function ir(n,t,r){return t*(Ft/(n.tileSize*Math.pow(2,r-n.tileID.overscaledZ)))}function bi(n,t){return(n%t+t)%t}function Bi(n,t,r){return n*(1-r)+t*r}function Ye(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,r=t*n;return 4*(n<.5?r:3*(n-t)+r-.75)}function gt(n,t,r,l){const h=new G(n,t,r,l);return m=>h.solve(m)}const ct=gt(.25,.1,.25,1);function At(n,t,r){return Math.min(r,Math.max(t,n))}function De(n,t,r){const l=r-t,h=((n-t)%l+l)%l+t;return h===t?r:h}function ut(n,...t){for(const r of t)for(const l in r)n[l]=r[l];return n}let st=1;function vt(n,t,r){const l={};for(const h in n)l[h]=t.call(this,n[h],h,n);return l}function Ht(n,t,r){const l={};for(const h in n)t.call(this,n[h],h,n)&&(l[h]=n[h]);return l}function re(n){return Array.isArray(n)?n.map(re):typeof n=="object"&&n?vt(n,re):n}const ae={};function be(n){ae[n]||(typeof console<"u"&&console.warn(n),ae[n]=!0)}function Fe(n,t,r){return(r.y-n.y)*(t.x-n.x)>(t.y-n.y)*(r.x-n.x)}function Ue(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let Ne=null;function ht(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function at(n,t,r,l,h){return a(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const m=new VideoFrame(n,{timestamp:0});try{const _=m?.format;if(!_||!_.startsWith("BGR")&&!_.startsWith("RGB"))throw new Error(`Unrecognized format ${_}`);const x=_.startsWith("BGR"),B=new Uint8ClampedArray(l*h*4);if(yield m.copyTo(B,(function(O,P,I,k,z){const N=4*Math.max(-P,0),Z=(Math.max(0,I)-I)*k*4+N,K=4*k,ee=Math.max(0,P),_e=Math.max(0,I);return{rect:{x:ee,y:_e,width:Math.min(O.width,P+k)-ee,height:Math.min(O.height,I+z)-_e},layout:[{offset:Z,stride:K}]}})(n,t,r,l,h)),x)for(let O=0;O<B.length;O+=4){const P=B[O];B[O]=B[O+2],B[O+2]=P}return B}finally{m.close()}}))}let qe,Ct;function mt(n,t,r,l){return n.addEventListener(t,r,l),{unsubscribe:()=>{n.removeEventListener(t,r,l)}}}function Ot(n){return n*Math.PI/180}function Dt(n){return n/Math.PI*180}const Yt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},pi={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},hi="AbortError";function de(){return new Error(hi)}const $={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function U(n){return $.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const q="global-dispatcher";class se extends Error{constructor(t,r,l,h){super(`AJAXError: ${r} (${t}): ${l}`),this.status=t,this.statusText=r,this.url=l,this.body=h}}const ce=()=>Ue(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,fe=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const l=U(n.url);if(l)return l(n,t);if(Ue(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:q},t)}if(!(/^file:/.test(r=n.url)||/^file:/.test(ce())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(l,h){return a(this,void 0,void 0,(function*(){const m=new Request(l.url,{method:l.method||"GET",body:l.body,credentials:l.credentials,headers:l.headers,cache:l.cache,referrer:ce(),signal:h.signal});let _,x;l.type!=="json"||m.headers.has("Accept")||m.headers.set("Accept","application/json");try{_=yield fetch(m)}catch(O){throw new se(0,O.message,l.url,new Blob)}if(!_.ok){const O=yield _.blob();throw new se(_.status,_.statusText,l.url,O)}x=l.type==="arrayBuffer"||l.type==="image"?_.arrayBuffer():l.type==="json"?_.json():_.text();const B=yield x;if(h.signal.aborted)throw de();return{data:B,cacheControl:_.headers.get("Cache-Control"),expires:_.headers.get("Expires")}}))})(n,t);if(Ue(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:q},t)}var r;return(function(l,h){return new Promise(((m,_)=>{var x;const B=new XMLHttpRequest;B.open(l.method||"GET",l.url,!0),l.type!=="arrayBuffer"&&l.type!=="image"||(B.responseType="arraybuffer");for(const O in l.headers)B.setRequestHeader(O,l.headers[O]);l.type==="json"&&(B.responseType="text",!((x=l.headers)===null||x===void 0)&&x.Accept||B.setRequestHeader("Accept","application/json")),B.withCredentials=l.credentials==="include",B.onerror=()=>{_(new Error(B.statusText))},B.onload=()=>{if(!h.signal.aborted)if((B.status>=200&&B.status<300||B.status===0)&&B.response!==null){let O=B.response;if(l.type==="json")try{O=JSON.parse(B.response)}catch(P){return void _(P)}m({data:O,cacheControl:B.getResponseHeader("Cache-Control"),expires:B.getResponseHeader("Expires")})}else{const O=new Blob([B.response],{type:B.getResponseHeader("Content-Type")});_(new se(B.status,B.statusText,l.url,O))}},h.signal.addEventListener("abort",(()=>{B.abort(),_(de())})),B.send(l.body)}))})(n,t)};function xe(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function ge(n,t,r){r[n]&&r[n].indexOf(t)!==-1||(r[n]=r[n]||[],r[n].push(t))}function Me(n,t,r){if(r&&r[n]){const l=r[n].indexOf(t);l!==-1&&r[n].splice(l,1)}}class He{constructor(t,r={}){ut(this,r),this.type=t}}class ze extends He{constructor(t,r={}){super("error",ut({error:t},r))}}class yt{on(t,r){return this._listeners=this._listeners||{},ge(t,r,this._listeners),{unsubscribe:()=>{this.off(t,r)}}}off(t,r){return Me(t,r,this._listeners),Me(t,r,this._oneTimeListeners),this}once(t,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},ge(t,r,this._oneTimeListeners),this):new Promise((l=>this.once(t,l)))}fire(t,r){typeof t=="string"&&(t=new He(t,r||{}));const l=t.type;if(this.listens(l)){t.target=this;const h=this._listeners&&this._listeners[l]?this._listeners[l].slice():[];for(const x of h)x.call(this,t);const m=this._oneTimeListeners&&this._oneTimeListeners[l]?this._oneTimeListeners[l].slice():[];for(const x of m)Me(l,x,this._oneTimeListeners),x.call(this,t);const _=this._eventedParent;_&&(ut(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),_.fire(t))}else t instanceof ze&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,r){return this._eventedParent=t,this._eventedParentData=r,this}}var ye={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"array",value:"fontFaces"},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:{}}
vendor: 2,860 bytes, line 91
91,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:{},"color-relief":{},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_color-relief
vendor: 8,509 bytes, line 91
91","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"}
vendor: 9,097 bytes, line 91
91,"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"}},"layout_color-relief":{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":{}}},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},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",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-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-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}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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"}
vendor: 7,960 bytes, line 91
91,"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
91Array",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},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 Nt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ei(n,t){const r={};for(const l in n)l!=="ref"&&(r[l]=n[l]);return Nt.forEach((l=>{l in t&&(r[l]=t[l])})),r}function Tt(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let r=0;r<n.length;r++)if(!Tt(n[r],t[r]))return!1;return!0}if(typeof n=="object"&&n!==null&&t!==null){if(typeof t!="object"||Object.keys(n).length!==Object.keys(t).length)return!1;for(const r in n)if(!Tt(n[r],t[r]))return!1;return!0}return n===t}function Zt(n,t){n.push(t)}function Ei(n,t,r){Zt(r,{command:"addSource",args:[n,t[n]]})}function lr(n,t,r){Zt(t,{command:"removeSource",args:[n]}),r[n]=!0}function cr(n,t,r,l){lr(n,r,l),Ei(n,t,r)}function Qi(n,t,r){let l;for(l in n[r])if(Object.prototype.hasOwnProperty.call(n[r],l)&&l!=="data"&&!Tt(n[r][l],t[r][l]))return!1;for(l in t[r])if(Object.prototype.hasOwnProperty.call(t[r],l)&&l!=="data"&&!Tt(n[r][l],t[r][l]))return!1;return!0}function si(n,t,r,l,h,m){n=n||{},t=t||{};for(const _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(Tt(n[_],t[_])||r.push({command:m,args:[l,_,t[_],h]}));for(const _ in t)Object.prototype.hasOwnProperty.call(t,_)&&!Object.prototype.hasOwnProperty.call(n,_)&&(Tt(n[_],t[_])||r.push({command:m,args:[l,_,t[_],h]}))}function ci(n){return n.id}function rr(n,t){return n[t.id]=t,n}class We{constructor(t,r,l,h){this.message=(t?`${t}: `:"")+l,h&&(this.identifier=h),r!=null&&r.__line__&&(this.line=r.__line__)}}function Ir(n,...t){for(const r of t)for(const l in r)n[l]=r[l];return n}
vendor: 82,993 bytes, line 91
91class $i extends Error{constructor(t,r){super(r),this.message=r,this.key=t}}class xs{constructor(t,r=[]){this.parent=t,this.bindings={};for(const[l,h]of r)this.bindings[l]=h}concat(t){return new xs(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const Bo={kind:"null"},lt={kind:"number"},ti={kind:"string"},Kt={kind:"boolean"},Or={kind:"color"},$s={kind:"projectionDefinition"},vs={kind:"object"},Wt={kind:"value"},al={kind:"collator"},ws={kind:"formatted"},ll={kind:"padding"},Fn={kind:"colorArray"},To={kind:"numberArray"},Xi={kind:"resolvedImage"},cl={kind:"variableAnchorOffsetCollection"};function Zr(n,t){return{kind:"array",itemType:n,N:t}}function Ti(n){if(n.kind==="array"){const t=Ti(n.itemType);return typeof n.N=="number"?`array<${t}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const Uh=[Bo,lt,ti,Kt,Or,$s,ws,vs,Zr(Wt),ll,To,Fn,Xi,cl];function pa(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!pa(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const r of Uh)if(!pa(r,t))return null}}return`Expected ${Ti(n)} but found ${Ti(t)} instead.`}function jc(n,t){return t.some((r=>r.kind===n.kind))}function Bs(n,t){return t.some((r=>r==="null"?n===null:r==="array"?Array.isArray(n):r==="object"?n&&!Array.isArray(n)&&typeof n=="object":r===typeof n))}function Ts(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const kc=.96422,Vh=.82521,Gh=4/29,So=6/29,Hh=3*So*So,cf=So*So*So,uf=Math.PI/180,hf=180/Math.PI;function Rc(n){return(n%=360)<0&&(n+=360),n}function Oo([n,t,r,l]){let h,m;const _=Lc((.2225045*(n=Dc(n))+.7168786*(t=Dc(t))+.0606169*(r=Dc(r)))/1);n===t&&t===r?h=m=_:(h=Lc((.4360747*n+.3850649*t+.1430804*r)/kc),m=Lc((.0139322*n+.0971045*t+.7141733*r)/Vh));const x=116*_-16;return[x<0?0:x,500*(h-_),200*(_-m),l]}function Dc(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Lc(n){return n>cf?Math.pow(n,1/3):n/Hh+Gh}function Po([n,t,r,l]){let h=(n+16)/116,m=isNaN(t)?h:h+t/500,_=isNaN(r)?h:h-r/200;return h=1*Fc(h),m=kc*Fc(m),_=Vh*Fc(_),[zc(3.1338561*m-1.6168667*h-.4906146*_),zc(-.9787684*m+1.9161415*h+.033454*_),zc(.0719453*m-.2289914*h+1.4052427*_),l]}function zc(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function Fc(n){return n>So?n*n*n:Hh*(n-Gh)}const pf=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function Co(n,t){return pf(n,t)?n[t]:void 0}function da(n){return parseInt(n.padEnd(2,n),16)/255}function gn(n,t){return ii(t?n/100:n,0,1)}function ii(n,t,r){return Math.min(Math.max(t,n),r)}function Us(n){return!n.some(Number.isNaN)}const Ss={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]};function is(n,t,r){return n+r*(t-n)}function Vs(n,t,r){return n.map(((l,h)=>is(l,t[h],r)))}class ri{constructor(t,r,l,h=1,m=!0){this.r=t,this.g=r,this.b=l,this.a=h,m||(this.r*=h,this.g*=h,this.b*=h,h||this.overwriteGetter("rgb",[t,r,l,h]))}static parse(t){if(t instanceof ri)return t;if(typeof t!="string")return;const r=(function(l){if((l=l.toLowerCase().trim())==="transparent")return[0,0,0,0];const h=Co(Ss,l);if(h){const[_,x,B]=h;return[_/255,x/255,B/255,1]}if(l.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(l)){const _=l.length<6?1:2;let x=1;return[da(l.slice(x,x+=_)),da(l.slice(x,x+=_)),da(l.slice(x,x+=_)),da(l.slice(x,x+_)||"ff")]}if(l.startsWith("rgb")){const _=l.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(_){const[x,B,O,P,I,k,z,N,Z,K,ee,_e]=_,oe=[P||" ",z||" ",K].join("");if(oe==="  "||oe==="  /"||oe===",,"||oe===",,,"){const he=[O,k,Z].join(""),Be=he==="%%%"?100:he===""?255:0;if(Be){const Ee=[ii(+B/Be,0,1),ii(+I/Be,0,1),ii(+N/Be,0,1),ee?gn(+ee,_e):1];if(Us(Ee))return Ee}}return}}const m=l.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(m){const[_,x,B,O,P,I,k,z,N]=m,Z=[B||" ",P||" ",k].join("");if(Z==="  "||Z==="  /"||Z===",,"||Z===",,,"){const K=[+x,ii(+O,0,100),ii(+I,0,100),z?gn(+z,N):1];if(Us(K))return(function([ee,_e,oe,he]){function Be(Ee){const Ve=(Ee+ee/30)%12,it=_e*Math.min(oe,1-oe);return oe-it*Math.max(-1,Math.min(Ve-3,9-Ve,1))}return ee=Rc(ee),_e/=100,oe/=100,[Be(0),Be(8),Be(4),he]})(K)}}})(t);return r?new ri(...r,!1):void 0}get rgb(){const{r:t,g:r,b:l,a:h}=this,m=h||1/0;return this.overwriteGetter("rgb",[t/m,r/m,l/m,h])}get hcl(){return this.overwriteGetter("hcl",(function(t){const[r,l,h,m]=Oo(t),_=Math.sqrt(l*l+h*h);return[Math.round(1e4*_)?Rc(Math.atan2(h,l)*hf):NaN,_,r,m]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Oo(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){const[t,r,l,h]=this.rgb;return`rgba(${[t,r,l].map((m=>Math.round(255*m))).join(",")},${h})`}static interpolate(t,r,l,h="rgb"){switch(h){case"rgb":{const[m,_,x,B]=Vs(t.rgb,r.rgb,l);return new ri(m,_,x,B,!1)}case"hcl":{const[m,_,x,B]=t.hcl,[O,P,I,k]=r.hcl;let z,N;if(isNaN(m)||isNaN(O))isNaN(m)?isNaN(O)?z=NaN:(z=O,x!==1&&x!==0||(N=P)):(z=m,I!==1&&I!==0||(N=_));else{let oe=O-m;O>m&&oe>180?oe-=360:O<m&&m-O>180&&(oe+=360),z=m+l*oe}const[Z,K,ee,_e]=(function([oe,he,Be,Ee]){return oe=isNaN(oe)?0:oe*uf,Po([Be,Math.cos(oe)*he,Math.sin(oe)*he,Ee])})([z,N??is(_,P,l),is(x,I,l),is(B,k,l)]);return new ri(Z,K,ee,_e,!1)}case"lab":{const[m,_,x,B]=Po(Vs(t.lab,r.lab,l));return new ri(m,_,x,B,!1)}}}}ri.black=new ri(0,0,0,1),ri.white=new ri(1,1,1,1),ri.transparent=new ri(0,0,0,0),ri.red=new ri(1,0,0,1);class Gs{constructor(t,r,l){this.sensitivity=t?r?"variant":"case":r?"accent":"base",this.locale=l,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,r){return this.collator.compare(t,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const ul=["bottom","center","top"];class hl{constructor(t,r,l,h,m,_){this.text=t,this.image=r,this.scale=l,this.fontStack=h,this.textColor=m,this.verticalAlign=_}}class zr{constructor(t){this.sections=t}static fromString(t){return new zr([new hl(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((t=>t.text.length!==0||t.image&&t.image.name.length!==0))}static factory(t){return t instanceof zr?t:zr.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map((t=>t.text)).join("")}}class mr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof mr)return t;if(typeof t=="number")return new mr([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new mr(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,l){return new mr(Vs(t.values,r.values,l))}}class Fr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Fr)return t;if(typeof t=="number")return new Fr([t]);if(Array.isArray(t)){for(const r of t)if(typeof r!="number")return;return new Fr(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,l){return new Fr(Vs(t.values,r.values,l))}}class nr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof nr)return t;if(typeof t=="string"){const l=ri.parse(t);return l?new nr([l]):void 0}if(!Array.isArray(t))return;const r=[];for(const l of t){if(typeof l!="string")return;const h=ri.parse(l);if(!h)return;r.push(h)}return new nr(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,l,h="rgb"){const m=[];if(t.values.length!=r.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let _=0;_<t.values.length;_++)m.push(ri.interpolate(t.values[_],r.values[_],l,h));return new nr(m)}}class Si extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const Zh=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Nr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Nr)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let r=0;r<t.length;r+=2){const l=t[r],h=t[r+1];if(typeof l!="string"||!Zh.has(l)||!Array.isArray(h)||h.length!==2||typeof h[0]!="number"||typeof h[1]!="number")return}return new Nr(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,l){const h=t.values,m=r.values;if(h.length!==m.length)throw new Si(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`);const _=[];for(let x=0;x<h.length;x+=2){if(h[x]!==m[x])throw new Si(`Cannot interpolate values containing mismatched anchors. from[${x}]: ${h[x]}, to[${x}]: ${m[x]}`);_.push(h[x]);const[B,O]=h[x+1],[P,I]=m[x+1];_.push([is(B,P,l),is(O,I,l)])}return new Nr(_)}}class tn{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new tn({name:t,available:!1}):null}}class Ar{constructor(t,r,l){this.from=t,this.to=r,this.transition=l}static interpolate(t,r,l){return new Ar(t,r,l)}static parse(t){return t instanceof Ar?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new Ar(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new Ar(t.from,t.to,t.transition):typeof t=="string"?new Ar(t,t,1):void 0}}function Ii(n,t,r,l){return typeof n=="number"&&n>=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?l===void 0||typeof l=="number"&&l>=0&&l<=1?null:`Invalid rgba value [${[n,t,r,l].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof l=="number"?[n,t,r,l]:[n,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Hs(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof Ar||n instanceof ri||n instanceof Gs||n instanceof zr||n instanceof mr||n instanceof Fr||n instanceof nr||n instanceof Nr||n instanceof tn)return!0;if(Array.isArray(n)){for(const t of n)if(!Hs(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!Hs(n[t]))return!1;return!0}return!1}function kt(n){if(n===null)return Bo;if(typeof n=="string")return ti;if(typeof n=="boolean")return Kt;if(typeof n=="number")return lt;if(n instanceof ri)return Or;if(n instanceof Ar)return $s;if(n instanceof Gs)return al;if(n instanceof zr)return ws;if(n instanceof mr)return ll;if(n instanceof Fr)return To;if(n instanceof nr)return Fn;if(n instanceof Nr)return cl;if(n instanceof tn)return Xi;if(Array.isArray(n)){const t=n.length;let r;for(const l of n){const h=kt(l);if(r){if(r===h)continue;r=Wt;break}r=h}return Zr(r||Wt,t)}return vs}function Ut(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof ri||n instanceof Ar||n instanceof zr||n instanceof mr||n instanceof Fr||n instanceof nr||n instanceof Nr||n instanceof tn?n.toString():JSON.stringify(n)}class rs{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Hs(t[1]))return r.error("invalid value");const l=t[1];let h=kt(l);const m=r.expectedType;return h.kind!=="array"||h.N!==0||!m||m.kind!=="array"||typeof m.N=="number"&&m.N!==0||(h=m),new rs(h,l)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const ui={string:ti,number:lt,boolean:Kt,object:vs};class rn{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let l,h=1;const m=t[0];if(m==="array"){let x,B;if(t.length>2){const O=t[1];if(typeof O!="string"||!(O in ui)||O==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);x=ui[O],h++}else x=Wt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);B=t[2],h++}l=Zr(x,B)}else{if(!ui[m])throw new Error(`Types doesn't contain name = ${m}`);l=ui[m]}const _=[];for(;h<t.length;h++){const x=r.parse(t[h],h,Wt);if(!x)return null;_.push(x)}return new rn(l,_)}evaluate(t){for(let r=0;r<this.args.length;r++){const l=this.args[r].evaluate(t);if(!pa(this.type,kt(l)))return l;if(r===this.args.length-1)throw new Si(`Expected value to be of type ${Ti(this.type)}, but found ${Ti(kt(l))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const Nn={"to-boolean":Kt,"to-color":Or,"to-number":lt,"to-string":ti};class $n{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const l=t[0];if(!Nn[l])throw new Error(`Can't parse ${l} as it is not part of the known types`);if((l==="to-boolean"||l==="to-string")&&t.length!==2)return r.error("Expected one argument.");const h=Nn[l],m=[];for(let _=1;_<t.length;_++){const x=r.parse(t[_],_,Wt);if(!x)return null;m.push(x)}return new $n(h,m)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let r,l;for(const h of this.args){if(r=h.evaluate(t),l=null,r instanceof ri)return r;if(typeof r=="string"){const m=t.parseColor(r);if(m)return m}else if(Array.isArray(r)&&(l=r.length<3||r.length>4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Ii(r[0],r[1],r[2],r[3]),!l))return new ri(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Si(l||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const l of this.args){r=l.evaluate(t);const h=mr.parse(r);if(h)return h}throw new Si(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"numberArray":{let r;for(const l of this.args){r=l.evaluate(t);const h=Fr.parse(r);if(h)return h}throw new Si(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"colorArray":{let r;for(const l of this.args){r=l.evaluate(t);const h=nr.parse(r);if(h)return h}throw new Si(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const l of this.args){r=l.evaluate(t);const h=Nr.parse(r);if(h)return h}throw new Si(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const l of this.args){if(r=l.evaluate(t),r===null)return 0;const h=Number(r);if(!isNaN(h))return h}throw new Si(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return zr.fromString(Ut(this.args[0].evaluate(t)));case"resolvedImage":return tn.fromString(Ut(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return Ut(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const pl=["Unknown","Point","LineString","Polygon"];class Nc{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,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"?pl[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(t){let r=this._parseColorCache.get(t);return r||(r=ri.parse(t),this._parseColorCache.set(t,r)),r}}class Eo{constructor(t,r,l=[],h,m=new xs,_=[]){this.registry=t,this.path=l,this.key=l.map((x=>`[${x}]`)).join(""),this.scope=m,this.errors=_,this.expectedType=h,this._isConstant=r}parse(t,r,l,h,m={}){return r?this.concat(r,l,h)._parse(t,m):this._parse(t,m)}_parse(t,r){function l(h,m,_){return _==="assert"?new rn(m,[h]):_==="coerce"?new $n(m,[h]):h}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const h=t[0];if(typeof h!="string")return this.error(`Expression name must be a string, but found ${typeof h} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const m=this.registry[h];if(m){let _=m.parse(t,this);if(!_)return null;if(this.expectedType){const x=this.expectedType,B=_.type;if(x.kind!=="string"&&x.kind!=="number"&&x.kind!=="boolean"&&x.kind!=="object"&&x.kind!=="array"||B.kind!=="value"){if(x.kind==="projectionDefinition"&&["string","array"].includes(B.kind)||["color","formatted","resolvedImage"].includes(x.kind)&&["value","string"].includes(B.kind)||["padding","numberArray"].includes(x.kind)&&["value","number","array"].includes(B.kind)||x.kind==="colorArray"&&["value","string","array"].includes(B.kind)||x.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(B.kind))_=l(_,x,r.typeAnnotation||"coerce");else if(this.checkSubtype(x,B))return null}else _=l(_,x,r.typeAnnotation||"assert")}if(!(_ instanceof rs)&&_.type.kind!=="resolvedImage"&&this._isConstant(_)){const x=new Nc;try{_=new rs(_.type,_.evaluate(x))}catch(B){return this.error(B.message),null}}return _}return this.error(`Unknown expression "${h}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,r,l){const h=typeof t=="number"?this.path.concat(t):this.path,m=l?this.scope.concat(l):this.scope;return new Eo(this.registry,this._isConstant,h,r||null,m,this.errors)}error(t,...r){const l=`${this.key}${r.map((h=>`[${h}]`)).join("")}`;this.errors.push(new $i(l,t))}checkSubtype(t,r){const l=pa(t,r);return l&&this.error(l),l}}class fa{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const l=[];for(let m=1;m<t.length-1;m+=2){const _=t[m];if(typeof _!="string")return r.error(`Expected string, but found ${typeof _} instead.`,m);if(/[^a-zA-Z0-9_]/.test(_))return r.error("Variable names must contain only alphanumeric characters or '_'.",m);const x=r.parse(t[m+1],m+1);if(!x)return null;l.push([_,x])}const h=r.parse(t[t.length-1],t.length-1,r.expectedType,l);return h?new fa(l,h):null}outputDefined(){return this.result.outputDefined()}}class dl{constructor(t,r){this.type=r.type,this.name=t,this.boundExpression=r}static parse(t,r){if(t.length!==2||typeof t[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");const l=t[1];return r.scope.has(l)?new dl(l,r.scope.get(l)):r.error(`Unknown variable "${l}". Make sure "${l}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class fl{constructor(t,r,l){this.type=t,this.index=r,this.input=l}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const l=r.parse(t[1],1,lt),h=r.parse(t[2],2,Zr(r.expectedType||Wt));return l&&h?new fl(h.type.itemType,l,h):null}evaluate(t){const r=this.index.evaluate(t),l=this.input.evaluate(t);if(r<0)throw new Si(`Array index out of bounds: ${r} < 0.`);if(r>=l.length)throw new Si(`Array index out of bounds: ${r} > ${l.length-1}.`);if(r!==Math.floor(r))throw new Si(`Array index must be an integer, but found ${r} instead.`);return l[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class ml{constructor(t,r){this.type=Kt,this.needle=t,this.haystack=r}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const l=r.parse(t[1],1,Wt),h=r.parse(t[2],2,Wt);return l&&h?jc(l.type,[Kt,ti,lt,Bo,Wt])?new ml(l,h):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(l.type)} instead`):null}evaluate(t){const r=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!l)return!1;if(!Bs(r,["boolean","string","number","null"]))throw new Si(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(kt(r))} instead.`);if(!Bs(l,["string","array"]))throw new Si(`Expected second argument to be of type array or string, but found ${Ti(kt(l))} instead.`);return l.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class _n{constructor(t,r,l){this.type=lt,this.needle=t,this.haystack=r,this.fromIndex=l}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const l=r.parse(t[1],1,Wt),h=r.parse(t[2],2,Wt);if(!l||!h)return null;if(!jc(l.type,[Kt,ti,lt,Bo,Wt]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(l.type)} instead`);if(t.length===4){const m=r.parse(t[3],3,lt);return m?new _n(l,h,m):null}return new _n(l,h)}evaluate(t){const r=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!Bs(r,["boolean","string","number","null"]))throw new Si(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(kt(r))} instead.`);let h;if(this.fromIndex&&(h=this.fromIndex.evaluate(t)),Bs(l,["string"])){const m=l.indexOf(r,h);return m===-1?-1:[...l.slice(0,m)].length}if(Bs(l,["array"]))return l.indexOf(r,h);throw new Si(`Expected second argument to be of type array or string, but found ${Ti(kt(l))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class gr{constructor(t,r,l,h,m,_){this.inputType=t,this.type=r,this.input=l,this.cases=h,this.outputs=m,this.otherwise=_}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let l,h;r.expectedType&&r.expectedType.kind!=="value"&&(h=r.expectedType);const m={},_=[];for(let O=2;O<t.length-1;O+=2){let P=t[O];const I=t[O+1];Array.isArray(P)||(P=[P]);const k=r.concat(O);if(P.length===0)return k.error("Expected at least one branch label.");for(const N of P){if(typeof N!="number"&&typeof N!="string")return k.error("Branch labels must be numbers or strings.");if(typeof N=="number"&&Math.abs(N)>Number.MAX_SAFE_INTEGER)return k.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof N=="number"&&Math.floor(N)!==N)return k.error("Numeric branch labels must be integer values.");if(l){if(k.checkSubtype(l,kt(N)))return null}else l=kt(N);if(m[String(N)]!==void 0)return k.error("Branch labels must be unique.");m[String(N)]=_.length}const z=r.parse(I,O,h);if(!z)return null;h=h||z.type,_.push(z)}const x=r.parse(t[1],1,Wt);if(!x)return null;const B=r.parse(t[t.length-1],t.length-1,h);return B?x.type.kind!=="value"&&r.concat(1).checkSubtype(l,x.type)?null:new gr(l,h,x,m,_,B):null}evaluate(t){const r=this.input.evaluate(t);return(kt(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}}class Mo{constructor(t,r,l){this.type=t,this.branches=r,this.otherwise=l}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let l;r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);const h=[];for(let _=1;_<t.length-1;_+=2){const x=r.parse(t[_],_,Kt);if(!x)return null;const B=r.parse(t[_+1],_+1,l);if(!B)return null;h.push([x,B]),l=l||B.type}const m=r.parse(t[t.length-1],t.length-1,l);if(!m)return null;if(!l)throw new Error("Can't infer output type");return new Mo(l,h,m)}evaluate(t){for(const[r,l]of this.branches)if(r.evaluate(t))return l.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[r,l]of this.branches)t(r),t(l);t(this.otherwise)}outputDefined(){return this.branches.every((([t,r])=>r.outputDefined()))&&this.otherwise.outputDefined()}}class ma{constructor(t,r,l,h){this.type=t,this.input=r,this.beginIndex=l,this.endIndex=h}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const l=r.parse(t[1],1,Wt),h=r.parse(t[2],2,lt);if(!l||!h)return null;if(!jc(l.type,[Zr(Wt),ti,Wt]))return r.error(`Expected first argument to be of type array or string, but found ${Ti(l.type)} instead`);if(t.length===4){const m=r.parse(t[3],3,lt);return m?new ma(l.type,l,h,m):null}return new ma(l.type,l,h)}evaluate(t){const r=this.input.evaluate(t),l=this.beginIndex.evaluate(t);let h;if(this.endIndex&&(h=this.endIndex.evaluate(t)),Bs(r,["string"]))return[...r].slice(l,h).join("");if(Bs(r,["array"]))return r.slice(l,h);throw new Si(`Expected first argument to be of type array or string, but found ${Ti(kt(r))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function Zs(n,t){const r=n.length-1;let l,h,m=0,_=r,x=0;for(;m<=_;)if(x=Math.floor((m+_)/2),l=n[x],h=n[x+1],l<=t){if(x===r||t<h)return x;m=x+1}else{if(!(l>t))throw new Si("Input is not a number.");_=x-1}return 0}class Yi{constructor(t,r,l){this.type=t,this.input=r,this.labels=[],this.outputs=[];for(const[h,m]of l)this.labels.push(h),this.outputs.push(m)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");const l=r.parse(t[1],1,lt);if(!l)return null;const h=[];let m=null;r.expectedType&&r.expectedType.kind!=="value"&&(m=r.expectedType);for(let _=1;_<t.length;_+=2){const x=_===1?-1/0:t[_],B=t[_+1],O=_,P=_+1;if(typeof x!="number")return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',O);if(h.length&&h[h.length-1][0]>=x)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',O);const I=r.parse(B,P,m);if(!I)return null;m=m||I.type,h.push([x,I])}return new Yi(m,l,h)}evaluate(t){const r=this.labels,l=this.outputs;if(r.length===1)return l[0].evaluate(t);const h=this.input.evaluate(t);if(h<=r[0])return l[0].evaluate(t);const m=r.length;return h>=r[m-1]?l[m-1].evaluate(t):l[Zs(r,h)].evaluate(t)}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function qh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ga,$c,df=(function(){if($c)return ga;function n(t,r,l,h){this.cx=3*t,this.bx=3*(l-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(h-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=l,this.p2y=h}return $c=1,ga=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var l=t,h=0;h<8;h++){var m=this.sampleCurveX(l)-t;if(Math.abs(m)<r)return l;var _=this.sampleCurveDerivativeX(l);if(Math.abs(_)<1e-6)break;l-=m/_}var x=0,B=1;for(l=t,h=0;h<20&&(m=this.sampleCurveX(l),!(Math.abs(m-t)<r));h++)t>m?x=l:B=l,l=.5*(B-x)+x;return l},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},ga})(),Io=qh(df);class Pr{constructor(t,r,l,h,m){this.type=t,this.operator=r,this.interpolation=l,this.input=h,this.labels=[],this.outputs=[];for(const[_,x]of m)this.labels.push(_),this.outputs.push(x)}static interpolationFactor(t,r,l,h){let m=0;if(t.name==="exponential")m=_a(r,t.base,l,h);else if(t.name==="linear")m=_a(r,1,l,h);else if(t.name==="cubic-bezier"){const _=t.controlPoints;m=new Io(_[0],_[1],_[2],_[3]).solve(_a(r,1,l,h))}return m}static parse(t,r){let[l,h,m,..._]=t;if(!Array.isArray(h)||h.length===0)return r.error("Expected an interpolation type expression.",1);if(h[0]==="linear")h={name:"linear"};else if(h[0]==="exponential"){const O=h[1];if(typeof O!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);h={name:"exponential",base:O}}else{if(h[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(h[0])}`,1,0);{const O=h.slice(1);if(O.length!==4||O.some((P=>typeof P!="number"||P<0||P>1)))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);h={name:"cubic-bezier",controlPoints:O}}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(m=r.parse(m,2,lt),!m)return null;const x=[];let B=null;l!=="interpolate-hcl"&&l!=="interpolate-lab"||r.expectedType==Fn?r.expectedType&&r.expectedType.kind!=="value"&&(B=r.expectedType):B=Or;for(let O=0;O<_.length;O+=2){const P=_[O],I=_[O+1],k=O+3,z=O+4;if(typeof P!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',k);if(x.length&&x[x.length-1][0]>=P)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',k);const N=r.parse(I,z,B);if(!N)return null;B=B||N.type,x.push([P,N])}return Ts(B,lt)||Ts(B,$s)||Ts(B,Or)||Ts(B,ll)||Ts(B,To)||Ts(B,Fn)||Ts(B,cl)||Ts(B,Zr(lt))?new Pr(B,l,h,m,x):r.error(`Type ${Ti(B)} is not interpolatable.`)}evaluate(t){const r=this.labels,l=this.outputs;if(r.length===1)return l[0].evaluate(t);const h=this.input.evaluate(t);if(h<=r[0])return l[0].evaluate(t);const m=r.length;if(h>=r[m-1])return l[m-1].evaluate(t);const _=Zs(r,h),x=Pr.interpolationFactor(this.interpolation,h,r[_],r[_+1]),B=l[_].evaluate(t),O=l[_+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return is(B,O,x);case"color":return ri.interpolate(B,O,x);case"padding":return mr.interpolate(B,O,x);case"colorArray":return nr.interpolate(B,O,x);case"numberArray":return Fr.interpolate(B,O,x);case"variableAnchorOffsetCollection":return Nr.interpolate(B,O,x);case"array":return Vs(B,O,x);case"projectionDefinition":return Ar.interpolate(B,O,x)}case"interpolate-hcl":switch(this.type.kind){case"color":return ri.interpolate(B,O,x,"hcl");case"colorArray":return nr.interpolate(B,O,x,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ri.interpolate(B,O,x,"lab");case"colorArray":return nr.interpolate(B,O,x,"lab")}}}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function _a(n,t,r,l){const h=l-r,m=n-r;return h===0?0:t===1?m/h:(Math.pow(t,m)-1)/(Math.pow(t,h)-1)}const Un={color:ri.interpolate,number:is,padding:mr.interpolate,numberArray:Fr.interpolate,colorArray:nr.interpolate,variableAnchorOffsetCollection:Nr.interpolate,array:Vs};class ya{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let l=null;const h=r.expectedType;h&&h.kind!=="value"&&(l=h);const m=[];for(const x of t.slice(1)){const B=r.parse(x,1+m.length,l,void 0,{typeAnnotation:"omit"});if(!B)return null;l=l||B.type,m.push(B)}if(!l)throw new Error("No output type");const _=h&&m.some((x=>pa(h,x.type)));return new ya(_?Wt:l,m)}evaluate(t){let r,l=null,h=0;for(const m of this.args)if(h++,l=m.evaluate(t),l&&l instanceof tn&&!l.available&&(r||(r=l.name),l=null,h===this.args.length&&(l=r)),l!==null)break;return l}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}function ba(n,t){return n==="=="||n==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function xa(n,t,r,l){return l.compare(t,r)===0}function jr(n,t,r){const l=n!=="=="&&n!=="!=";return class K8{constructor(m,_,x){this.type=Kt,this.lhs=m,this.rhs=_,this.collator=x,this.hasUntypedArgument=m.type.kind==="value"||_.type.kind==="value"}static parse(m,_){if(m.length!==3&&m.length!==4)return _.error("Expected two or three arguments.");const x=m[0];let B=_.parse(m[1],1,Wt);if(!B)return null;if(!ba(x,B.type))return _.concat(1).error(`"${x}" comparisons are not supported for type '${Ti(B.type)}'.`);let O=_.parse(m[2],2,Wt);if(!O)return null;if(!ba(x,O.type))return _.concat(2).error(`"${x}" comparisons are not supported for type '${Ti(O.type)}'.`);if(B.type.kind!==O.type.kind&&B.type.kind!=="value"&&O.type.kind!=="value")return _.error(`Cannot compare types '${Ti(B.type)}' and '${Ti(O.type)}'.`);l&&(B.type.kind==="value"&&O.type.kind!=="value"?B=new rn(O.type,[B]):B.type.kind!=="value"&&O.type.kind==="value"&&(O=new rn(B.type,[O])));let P=null;if(m.length===4){if(B.type.kind!=="string"&&O.type.kind!=="string"&&B.type.kind!=="value"&&O.type.kind!=="value")return _.error("Cannot use collator to compare non-string types.");if(P=_.parse(m[3],3,al),!P)return null}return new K8(B,O,P)}evaluate(m){const _=this.lhs.evaluate(m),x=this.rhs.evaluate(m);if(l&&this.hasUntypedArgument){const B=kt(_),O=kt(x);if(B.kind!==O.kind||B.kind!=="string"&&B.kind!=="number")throw new Si(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${B.kind}, ${O.kind}) instead.`)}if(this.collator&&!l&&this.hasUntypedArgument){const B=kt(_),O=kt(x);if(B.kind!=="string"||O.kind!=="string")return t(m,_,x)}return this.collator?r(m,_,x,this.collator.evaluate(m)):t(m,_,x)}eachChild(m){m(this.lhs),m(this.rhs),this.collator&&m(this.collator)}outputDefined(){return!0}}}const Wh=jr("==",(function(n,t,r){return t===r}),xa),gl=jr("!=",(function(n,t,r){return t!==r}),(function(n,t,r,l){return!xa(0,t,r,l)})),ff=jr("<",(function(n,t,r){return t<r}),(function(n,t,r,l){return l.compare(t,r)<0})),Uc=jr(">",(function(n,t,r){return t>r}),(function(n,t,r,l){return l.compare(t,r)>0})),mf=jr("<=",(function(n,t,r){return t<=r}),(function(n,t,r,l){return l.compare(t,r)<=0})),gf=jr(">=",(function(n,t,r){return t>=r}),(function(n,t,r,l){return l.compare(t,r)>=0}));class _l{constructor(t,r,l){this.type=al,this.locale=l,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");const l=t[1];if(typeof l!="object"||Array.isArray(l))return r.error("Collator options argument must be an object.");const h=r.parse(l["case-sensitive"]!==void 0&&l["case-sensitive"],1,Kt);if(!h)return null;const m=r.parse(l["diacritic-sensitive"]!==void 0&&l["diacritic-sensitive"],1,Kt);if(!m)return null;let _=null;return l.locale&&(_=r.parse(l.locale,1,ti),!_)?null:new _l(h,m,_)}evaluate(t){return new Gs(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class Vc{constructor(t,r,l,h,m){this.type=ti,this.number=t,this.locale=r,this.currency=l,this.minFractionDigits=h,this.maxFractionDigits=m}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");const l=r.parse(t[1],1,lt);if(!l)return null;const h=t[2];if(typeof h!="object"||Array.isArray(h))return r.error("NumberFormat options argument must be an object.");let m=null;if(h.locale&&(m=r.parse(h.locale,1,ti),!m))return null;let _=null;if(h.currency&&(_=r.parse(h.currency,1,ti),!_))return null;let x=null;if(h["min-fraction-digits"]&&(x=r.parse(h["min-fraction-digits"],1,lt),!x))return null;let B=null;return h["max-fraction-digits"]&&(B=r.parse(h["max-fraction-digits"],1,lt),!B)?null:new Vc(l,m,_,x,B)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class qs{constructor(t){this.type=ws,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const l=t[1];if(!Array.isArray(l)&&typeof l=="object")return r.error("First argument must be an image or text section.");const h=[];let m=!1;for(let _=1;_<=t.length-1;++_){const x=t[_];if(m&&typeof x=="object"&&!Array.isArray(x)){m=!1;let B=null;if(x["font-scale"]&&(B=r.parse(x["font-scale"],1,lt),!B))return null;let O=null;if(x["text-font"]&&(O=r.parse(x["text-font"],1,Zr(ti)),!O))return null;let P=null;if(x["text-color"]&&(P=r.parse(x["text-color"],1,Or),!P))return null;let I=null;if(x["vertical-align"]){if(typeof x["vertical-align"]=="string"&&!ul.includes(x["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${x["vertical-align"]}' instead.`);if(I=r.parse(x["vertical-align"],1,ti),!I)return null}const k=h[h.length-1];k.scale=B,k.font=O,k.textColor=P,k.verticalAlign=I}else{const B=r.parse(t[_],1,Wt);if(!B)return null;const O=B.type.kind;if(O!=="string"&&O!=="value"&&O!=="null"&&O!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");m=!0,h.push({content:B,scale:null,font:null,textColor:null,verticalAlign:null})}}return new qs(h)}evaluate(t){return new zr(this.sections.map((r=>{const l=r.content.evaluate(t);return kt(l)===Xi?new hl("",l,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new hl(Ut(l),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)})))}eachChild(t){for(const r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}}class Gc{constructor(t){this.type=Xi,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");const l=r.parse(t[1],1,ti);return l?new Gc(l):r.error("No image name provided.")}evaluate(t){const r=this.input.evaluate(t),l=tn.fromString(r);return l&&t.availableImages&&(l.available=t.availableImages.indexOf(r)>-1),l}eachChild(t){t(this.input)}outputDefined(){return!1}}class yl{constructor(t){this.type=lt,this.input=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const l=r.parse(t[1],1);return l?l.type.kind!=="array"&&l.type.kind!=="string"&&l.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${Ti(l.type)} instead.`):new yl(l):null}evaluate(t){const r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new Si(`Expected value to be of type string or array, but found ${Ti(kt(r))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const yn=8192;function _f(n,t){const r=(180+n[0])/360,l=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,h=Math.pow(2,t.z);return[Math.round(r*h*yn),Math.round(l*h*yn)]}function bl(n,t){const r=Math.pow(2,t.z);return[(h=(n[0]/yn+t.x)/r,360*h-180),(l=(n[1]/yn+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90)];var l,h}function va(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function wa(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function yf(n,t,r){const l=n[0]-t[0],h=n[1]-t[1],m=n[0]-r[0],_=n[1]-r[1];return l*_-m*h==0&&l*m<=0&&h*_<=0}function xl(n,t,r,l){return(h=[l[0]-r[0],l[1]-r[1]])[0]*(m=[t[0]-n[0],t[1]-n[1]])[1]-h[1]*m[0]!=0&&!(!Xh(n,t,r,l)||!Xh(r,l,n,t));var h,m}function bf(n,t,r){for(const l of r)for(let h=0;h<l.length-1;++h)if(xl(n,t,l[h],l[h+1]))return!0;return!1}function Ws(n,t,r=!1){let l=!1;for(const x of t)for(let B=0;B<x.length-1;B++){if(yf(n,x[B],x[B+1]))return r;(m=x[B])[1]>(h=n)[1]!=(_=x[B+1])[1]>h[1]&&h[0]<(_[0]-m[0])*(h[1]-m[1])/(_[1]-m[1])+m[0]&&(l=!l)}var h,m,_;return l}function Kh(n,t){for(const r of t)if(Ws(n,r))return!0;return!1}function Hc(n,t){for(const r of n)if(!Ws(r,t))return!1;for(let r=0;r<n.length-1;++r)if(bf(n[r],n[r+1],t))return!1;return!0}function xf(n,t){for(const r of t)if(Hc(n,r))return!0;return!1}function Xh(n,t,r,l){const h=l[0]-r[0],m=l[1]-r[1],_=(n[0]-r[0])*m-h*(n[1]-r[1]),x=(t[0]-r[0])*m-h*(t[1]-r[1]);return _>0&&x<0||_<0&&x>0}function Zc(n,t,r){const l=[];for(let h=0;h<n.length;h++){const m=[];for(let _=0;_<n[h].length;_++){const x=_f(n[h][_],r);va(t,x),m.push(x)}l.push(m)}return l}function Yh(n,t,r){const l=[];for(let h=0;h<n.length;h++){const m=Zc(n[h],t,r);l.push(m)}return l}function vl(n,t,r,l){if(n[0]<r[0]||n[0]>r[2]){const h=.5*l;let m=n[0]-r[0]>h?-l:r[0]-n[0]>h?l:0;m===0&&(m=n[0]-r[2]>h?-l:r[2]-n[0]>h?l:0),n[0]+=m}va(t,n)}function Jh(n,t,r,l){const h=Math.pow(2,l.z)*yn,m=[l.x*yn,l.y*yn],_=[];for(const x of n)for(const B of x){const O=[B.x+m[0],B.y+m[1]];vl(O,t,r,h),_.push(O)}return _}function Qh(n,t,r,l){const h=Math.pow(2,l.z)*yn,m=[l.x*yn,l.y*yn],_=[];for(const B of n){const O=[];for(const P of B){const I=[P.x+m[0],P.y+m[1]];va(t,I),O.push(I)}_.push(O)}if(t[2]-t[0]<=h/2){(x=t)[0]=x[1]=1/0,x[2]=x[3]=-1/0;for(const B of _)for(const O of B)vl(O,t,r,h)}var x;return _}class Ks{constructor(t,r){this.type=Kt,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Hs(t[1])){const l=t[1];if(l.type==="FeatureCollection"){const h=[];for(const m of l.features){const{type:_,coordinates:x}=m.geometry;_==="Polygon"&&h.push(x),_==="MultiPolygon"&&h.push(...x)}if(h.length)return new Ks(l,{type:"MultiPolygon",coordinates:h})}else if(l.type==="Feature"){const h=l.geometry.type;if(h==="Polygon"||h==="MultiPolygon")return new Ks(l,l.geometry)}else if(l.type==="Polygon"||l.type==="MultiPolygon")return new Ks(l,l)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return(function(r,l){const h=[1/0,1/0,-1/0,-1/0],m=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(l.type==="Polygon"){const x=Zc(l.coordinates,m,_),B=Jh(r.geometry(),h,m,_);if(!wa(h,m))return!1;for(const O of B)if(!Ws(O,x))return!1}if(l.type==="MultiPolygon"){const x=Yh(l.coordinates,m,_),B=Jh(r.geometry(),h,m,_);if(!wa(h,m))return!1;for(const O of B)if(!Kh(O,x))return!1}return!0})(t,this.geometries);if(t.geometryType()==="LineString")return(function(r,l){const h=[1/0,1/0,-1/0,-1/0],m=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(l.type==="Polygon"){const x=Zc(l.coordinates,m,_),B=Qh(r.geometry(),h,m,_);if(!wa(h,m))return!1;for(const O of B)if(!Hc(O,x))return!1}if(l.type==="MultiPolygon"){const x=Yh(l.coordinates,m,_),B=Qh(r.geometry(),h,m,_);if(!wa(h,m))return!1;for(const O of B)if(!xf(O,x))return!1}return!0})(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let qc=class{constructor(n=[],t=(r,l)=>r<l?-1:r>l?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:r}=this,l=t[n];for(;n>0;){const h=n-1>>1,m=t[h];if(r(l,m)>=0)break;t[n]=m,n=h}t[n]=l}_down(n){const{data:t,compare:r}=this,l=this.length>>1,h=t[n];for(;n<l;){let m=1+(n<<1);const _=m+1;if(_<this.length&&r(t[_],t[m])<0&&(m=_),r(t[m],h)>=0)break;t[n]=t[m],n=m}t[n]=h}};function Wc(n,t,r=0,l=n.length-1,h=vf){for(;l>r;){if(l-r>600){const B=l-r+1,O=t-r+1,P=Math.log(B),I=.5*Math.exp(2*P/3),k=.5*Math.sqrt(P*I*(B-I)/B)*(O-B/2<0?-1:1);Wc(n,t,Math.max(r,Math.floor(t-O*I/B+k)),Math.min(l,Math.floor(t+(B-O)*I/B+k)),h)}const m=n[t];let _=r,x=l;for(Ba(n,r,t),h(n[l],m)>0&&Ba(n,r,l);_<x;){for(Ba(n,_,x),_++,x--;h(n[_],m)<0;)_++;for(;h(n[x],m)>0;)x--}h(n[r],m)===0?Ba(n,r,x):(x++,Ba(n,x,l)),x<=t&&(r=x+1),t<=x&&(l=x-1)}}function Ba(n,t,r){const l=n[t];n[t]=n[r],n[r]=l}function vf(n,t){return n<t?-1:n>t?1:0}function Ta(n,t){if(n.length<=1)return[n];const r=[];let l,h;for(const m of n){const _=wf(m);_!==0&&(m.area=Math.abs(_),h===void 0&&(h=_<0),h===_<0?(l&&r.push(l),l=[m]):l.push(m))}if(l&&r.push(l),t>1)for(let m=0;m<r.length;m++)r[m].length<=t||(Wc(r[m],t,1,r[m].length-1,ep),r[m]=r[m].slice(0,t));return r}function ep(n,t){return t.area-n.area}function wf(n){let t=0;for(let r,l,h=0,m=n.length,_=m-1;h<m;_=h++)r=n[h],l=n[_],t+=(l.x-r.x)*(r.y+l.y);return t}const tp=1/298.257223563,ip=tp*(2-tp),Kc=Math.PI/180;class Xc{constructor(t){const r=6378.137*Kc*1e3,l=Math.cos(t*Kc),h=1/(1-ip*(1-l*l)),m=Math.sqrt(h);this.kx=r*m*l,this.ky=r*m*h*(1-ip)}distance(t,r){const l=this.wrap(t[0]-r[0])*this.kx,h=(t[1]-r[1])*this.ky;return Math.sqrt(l*l+h*h)}pointOnLine(t,r){let l,h,m,_,x=1/0;for(let B=0;B<t.length-1;B++){let O=t[B][0],P=t[B][1],I=this.wrap(t[B+1][0]-O)*this.kx,k=(t[B+1][1]-P)*this.ky,z=0;I===0&&k===0||(z=(this.wrap(r[0]-O)*this.kx*I+(r[1]-P)*this.ky*k)/(I*I+k*k),z>1?(O=t[B+1][0],P=t[B+1][1]):z>0&&(O+=I/this.kx*z,P+=k/this.ky*z)),I=this.wrap(r[0]-O)*this.kx,k=(r[1]-P)*this.ky;const N=I*I+k*k;N<x&&(x=N,l=O,h=P,m=B,_=z)}return{point:[l,h],index:m,t:Math.max(0,Math.min(1,_))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function rp(n,t){return t[0]-n[0]}function wl(n){return n[1]-n[0]+1}function ns(n,t){return n[1]>=n[0]&&n[1]<t}function fi(n,t){if(n[0]>n[1])return[null,null];const r=wl(n);if(t){if(r===2)return[n,null];const h=Math.floor(r/2);return[[n[0],n[0]+h],[n[0]+h,n[1]]]}if(r===1)return[n,null];const l=Math.floor(r/2)-1;return[[n[0],n[0]+l],[n[0]+l+1,n[1]]]}function Yc(n,t){if(!ns(t,n.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let l=t[0];l<=t[1];++l)va(r,n[l]);return r}function Jc(n){const t=[1/0,1/0,-1/0,-1/0];for(const r of n)for(const l of r)va(t,l);return t}function np(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function Qc(n,t,r){if(!np(n)||!np(t))return NaN;let l=0,h=0;return n[2]<t[0]&&(l=t[0]-n[2]),n[0]>t[2]&&(l=n[0]-t[2]),n[1]>t[3]&&(h=n[1]-t[3]),n[3]<t[1]&&(h=t[1]-n[3]),r.distance([0,0],[l,h])}function Xs(n,t,r){const l=r.pointOnLine(t,n);return r.distance(n,l.point)}function eu(n,t,r,l,h){const m=Math.min(Xs(n,[r,l],h),Xs(t,[r,l],h)),_=Math.min(Xs(r,[n,t],h),Xs(l,[n,t],h));return Math.min(m,_)}function Bf(n,t,r,l,h){if(!ns(t,n.length)||!ns(l,r.length))return 1/0;let m=1/0;for(let _=t[0];_<t[1];++_){const x=n[_],B=n[_+1];for(let O=l[0];O<l[1];++O){const P=r[O],I=r[O+1];if(xl(x,B,P,I))return 0;m=Math.min(m,eu(x,B,P,I,h))}}return m}function Tf(n,t,r,l,h){if(!ns(t,n.length)||!ns(l,r.length))return NaN;let m=1/0;for(let _=t[0];_<=t[1];++_)for(let x=l[0];x<=l[1];++x)if(m=Math.min(m,h.distance(n[_],r[x])),m===0)return m;return m}function Sf(n,t,r){if(Ws(n,t,!0))return 0;let l=1/0;for(const h of t){const m=h[0],_=h[h.length-1];if(m!==_&&(l=Math.min(l,Xs(n,[_,m],r)),l===0))return l;const x=r.pointOnLine(h,n);if(l=Math.min(l,r.distance(n,x.point)),l===0)return l}return l}function Of(n,t,r,l){if(!ns(t,n.length))return NaN;for(let m=t[0];m<=t[1];++m)if(Ws(n[m],r,!0))return 0;let h=1/0;for(let m=t[0];m<t[1];++m){const _=n[m],x=n[m+1];for(const B of r)for(let O=0,P=B.length,I=P-1;O<P;I=O++){const k=B[I],z=B[O];if(xl(_,x,k,z))return 0;h=Math.min(h,eu(_,x,k,z,l))}}return h}function sp(n,t){for(const r of n)for(const l of r)if(Ws(l,t,!0))return!0;return!1}function Pf(n,t,r,l=1/0){const h=Jc(n),m=Jc(t);if(l!==1/0&&Qc(h,m,r)>=l)return l;if(wa(h,m)){if(sp(n,t))return 0}else if(sp(t,n))return 0;let _=1/0;for(const x of n)for(let B=0,O=x.length,P=O-1;B<O;P=B++){const I=x[P],k=x[B];for(const z of t)for(let N=0,Z=z.length,K=Z-1;N<Z;K=N++){const ee=z[K],_e=z[N];if(xl(I,k,ee,_e))return 0;_=Math.min(_,eu(I,k,ee,_e,r))}}return _}function op(n,t,r,l,h,m){if(!m)return;const _=Qc(Yc(l,m),h,r);_<t&&n.push([_,m,[0,0]])}function Bl(n,t,r,l,h,m,_){if(!m||!_)return;const x=Qc(Yc(l,m),Yc(h,_),r);x<t&&n.push([x,m,_])}function Tl(n,t,r,l,h=1/0){let m=Math.min(l.distance(n[0],r[0][0]),h);if(m===0)return m;const _=new qc([[0,[0,n.length-1],[0,0]]],rp),x=Jc(r);for(;_.length>0;){const B=_.pop();if(B[0]>=m)continue;const O=B[1],P=t?50:100;if(wl(O)<=P){if(!ns(O,n.length))return NaN;if(t){const I=Of(n,O,r,l);if(isNaN(I)||I===0)return I;m=Math.min(m,I)}else for(let I=O[0];I<=O[1];++I){const k=Sf(n[I],r,l);if(m=Math.min(m,k),m===0)return 0}}else{const I=fi(O,t);op(_,m,l,n,x,I[0]),op(_,m,l,n,x,I[1])}}return m}function Sl(n,t,r,l,h,m=1/0){let _=Math.min(m,h.distance(n[0],r[0]));if(_===0)return _;const x=new qc([[0,[0,n.length-1],[0,r.length-1]]],rp);for(;x.length>0;){const B=x.pop();if(B[0]>=_)continue;const O=B[1],P=B[2],I=t?50:100,k=l?50:100;if(wl(O)<=I&&wl(P)<=k){if(!ns(O,n.length)&&ns(P,r.length))return NaN;let z;if(t&&l)z=Bf(n,O,r,P,h),_=Math.min(_,z);else if(t&&!l){const N=n.slice(O[0],O[1]+1);for(let Z=P[0];Z<=P[1];++Z)if(z=Xs(r[Z],N,h),_=Math.min(_,z),_===0)return _}else if(!t&&l){const N=r.slice(P[0],P[1]+1);for(let Z=O[0];Z<=O[1];++Z)if(z=Xs(n[Z],N,h),_=Math.min(_,z),_===0)return _}else z=Tf(n,O,r,P,h),_=Math.min(_,z)}else{const z=fi(O,t),N=fi(P,l);Bl(x,_,h,n,r,z[0],N[0]),Bl(x,_,h,n,r,z[0],N[1]),Bl(x,_,h,n,r,z[1],N[0]),Bl(x,_,h,n,r,z[1],N[1])}}return _}function tu(n){return n.type==="MultiPolygon"?n.coordinates.map((t=>({type:"Polygon",coordinates:t}))):n.type==="MultiLineString"?n.coordinates.map((t=>({type:"LineString",coordinates:t}))):n.type==="MultiPoint"?n.coordinates.map((t=>({type:"Point",coordinates:t}))):[n]}class Ys{constructor(t,r){this.type=lt,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Hs(t[1])){const l=t[1];if(l.type==="FeatureCollection")return new Ys(l,l.features.map((h=>tu(h.geometry))).flat());if(l.type==="Feature")return new Ys(l,tu(l.geometry));if("type"in l&&"coordinates"in l)return new Ys(l,tu(l))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return(function(r,l){const h=r.geometry(),m=h.flat().map((B=>bl([B.x,B.y],r.canonical)));if(h.length===0)return NaN;const _=new Xc(m[0][1]);let x=1/0;for(const B of l){switch(B.type){case"Point":x=Math.min(x,Sl(m,!1,[B.coordinates],!1,_,x));break;case"LineString":x=Math.min(x,Sl(m,!1,B.coordinates,!0,_,x));break;case"Polygon":x=Math.min(x,Tl(m,!1,B.coordinates,_,x))}if(x===0)return x}return x})(t,this.geometries);if(t.geometryType()==="LineString")return(function(r,l){const h=r.geometry(),m=h.flat().map((B=>bl([B.x,B.y],r.canonical)));if(h.length===0)return NaN;const _=new Xc(m[0][1]);let x=1/0;for(const B of l){switch(B.type){case"Point":x=Math.min(x,Sl(m,!0,[B.coordinates],!1,_,x));break;case"LineString":x=Math.min(x,Sl(m,!0,B.coordinates,!0,_,x));break;case"Polygon":x=Math.min(x,Tl(m,!0,B.coordinates,_,x))}if(x===0)return x}return x})(t,this.geometries);if(t.geometryType()==="Polygon")return(function(r,l){const h=r.geometry();if(h.length===0||h[0].length===0)return NaN;const m=Ta(h,0).map((B=>B.map((O=>O.map((P=>bl([P.x,P.y],r.canonical))))))),_=new Xc(m[0][0][0][1]);let x=1/0;for(const B of l)for(const O of m){switch(B.type){case"Point":x=Math.min(x,Tl([B.coordinates],!1,O,_,x));break;case"LineString":x=Math.min(x,Tl(B.coordinates,!0,O,_,x));break;case"Polygon":x=Math.min(x,Pf(O,B.coordinates,_,x))}if(x===0)return x}return x})(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Sa{constructor(t){this.type=Wt,this.key=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const l=t[1];return l==null?r.error("Global state property must be defined."):typeof l!="string"?r.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new Sa(l)}evaluate(t){var r;const l=(r=t.globals)===null||r===void 0?void 0:r.globalState;return l&&Object.keys(l).length!==0?Co(l,this.key):null}eachChild(){}outputDefined(){return!1}}const Ao={"==":Wh,"!=":gl,">":Uc,"<":ff,">=":gf,"<=":mf,array:rn,at:fl,boolean:rn,case:Mo,coalesce:ya,collator:_l,format:qs,image:Gc,in:ml,"index-of":_n,interpolate:Pr,"interpolate-hcl":Pr,"interpolate-lab":Pr,length:yl,let:fa,literal:rs,match:gr,number:rn,"number-format":Vc,object:rn,slice:ma,step:Yi,string:rn,"to-boolean":$n,"to-color":$n,"to-number":$n,"to-string":$n,var:dl,within:Ks,distance:Ys,"global-state":Sa};class dn{constructor(t,r,l,h){this.name=t,this.type=r,this._evaluate=l,this.args=h}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){const l=t[0],h=dn.definitions[l];if(!h)return r.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0);const m=Array.isArray(h)?h[0]:h.type,_=Array.isArray(h)?[[h[1],h[2]]]:h.overloads,x=_.filter((([O])=>!Array.isArray(O)||O.length===t.length-1));let B=null;for(const[O,P]of x){B=new Eo(r.registry,Ol,r.path,null,r.scope);const I=[];let k=!1;for(let z=1;z<t.length;z++){const N=t[z],Z=Array.isArray(O)?O[z-1]:O.type,K=B.parse(N,1+I.length,Z);if(!K){k=!0;break}I.push(K)}if(!k)if(Array.isArray(O)&&O.length!==I.length)B.error(`Expected ${O.length} arguments, but found ${I.length} instead.`);else{for(let z=0;z<I.length;z++){const N=Array.isArray(O)?O[z]:O.type,Z=I[z];B.concat(z+1).checkSubtype(N,Z.type)}if(B.errors.length===0)return new dn(l,m,P,I)}}if(x.length===1)r.errors.push(...B.errors);else{const O=(x.length?x:_).map((([I])=>{return k=I,Array.isArray(k)?`(${k.map(Ti).join(", ")})`:`(${Ti(k.type)}...)`;var k})).join(" | "),P=[];for(let I=1;I<t.length;I++){const k=r.parse(t[I],1+P.length);if(!k)return null;P.push(Ti(k.type))}r.error(`Expected arguments of type ${O}, but found (${P.join(", ")}) instead.`)}return null}static register(t,r){dn.definitions=r;for(const l in r)t[l]=dn}}function ap(n,[t,r,l,h]){t=t.evaluate(n),r=r.evaluate(n),l=l.evaluate(n);const m=h?h.evaluate(n):1,_=Ii(t,r,l,m);if(_)throw new Si(_);return new ri(t/255,r/255,l/255,m,!1)}function lp(n,t){return n in t}function iu(n,t){const r=t[n];return r===void 0?null:r}function Js(n){return{type:n}}function Ol(n){if(n instanceof dl)return Ol(n.boundExpression);if(n instanceof dn&&n.name==="error"||n instanceof _l||n instanceof Ks||n instanceof Ys||n instanceof Sa)return!1;const t=n instanceof $n||n instanceof rn;let r=!0;return n.eachChild((l=>{r=t?r&&Ol(l):r&&l instanceof rs})),!!r&&Pl(n)&&Cl(n,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Pl(n){if(n instanceof dn&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof Ks||n instanceof Ys)return!1;let t=!0;return n.eachChild((r=>{t&&!Pl(r)&&(t=!1)})),t}function Oa(n){if(n instanceof dn&&n.name==="feature-state")return!1;let t=!0;return n.eachChild((r=>{t&&!Oa(r)&&(t=!1)})),t}function Cl(n,t){if(n instanceof dn&&t.indexOf(n.name)>=0)return!1;let r=!0;return n.eachChild((l=>{r&&!Cl(l,t)&&(r=!1)})),r}function cp(n){return{result:"success",value:n}}function jo(n){return{result:"error",value:n}}function Os(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function up(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function ru(n){return!!n.expression&&n.expression.interpolated}function oi(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function Pa(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&kt(n)===vs}function Cf(n){return n}function hp(n,t){const r=n.stops&&typeof n.stops[0][0]=="object",l=r||!(r||n.property!==void 0),h=n.type||(ru(t)?"exponential":"interval"),m=(function(P){switch(P.type){case"color":return ri.parse;case"padding":return mr.parse;case"numberArray":return Fr.parse;case"colorArray":return nr.parse;default:return null}})(t);if(m&&((n=Ir({},n)).stops&&(n.stops=n.stops.map((P=>[P[0],m(P[1])]))),n.default=m(n.default?n.default:t.default)),n.colorSpace&&(_=n.colorSpace)!=="rgb"&&_!=="hcl"&&_!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var _;const x=(function(P){switch(P){case"exponential":return dp;case"interval":return Ef;case"categorical":return pp;case"identity":return Mf;default:throw new Error(`Unknown function type "${P}"`)}})(h);let B,O;if(h==="categorical"){B=Object.create(null);for(const P of n.stops)B[P[0]]=P[1];O=typeof n.stops[0][0]}if(r){const P={},I=[];for(let N=0;N<n.stops.length;N++){const Z=n.stops[N],K=Z[0].zoom;P[K]===void 0&&(P[K]={zoom:K,type:n.type,property:n.property,default:n.default,stops:[]},I.push(K)),P[K].stops.push([Z[0].value,Z[1]])}const k=[];for(const N of I)k.push([P[N].zoom,hp(P[N],t)]);const z={name:"linear"};return{kind:"composite",interpolationType:z,interpolationFactor:Pr.interpolationFactor.bind(void 0,z),zoomStops:k.map((N=>N[0])),evaluate:({zoom:N},Z)=>dp({stops:k,base:n.base},t,N).evaluate(N,Z)}}if(l){const P=h==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:P,interpolationFactor:Pr.interpolationFactor.bind(void 0,P),zoomStops:n.stops.map((I=>I[0])),evaluate:({zoom:I})=>x(n,t,I,B,O)}}return{kind:"source",evaluate(P,I){const k=I&&I.properties?I.properties[n.property]:void 0;return k===void 0?Ps(n.default,t.default):x(n,t,k,B,O)}}}function Ps(n,t,r){return n!==void 0?n:t!==void 0?t:r!==void 0?r:void 0}function pp(n,t,r,l,h){return Ps(typeof r===h?l[r]:void 0,n.default,t.default)}function Ef(n,t,r){if(oi(r)!=="number")return Ps(n.default,t.default);const l=n.stops.length;if(l===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[l-1][0])return n.stops[l-1][1];const h=Zs(n.stops.map((m=>m[0])),r);return n.stops[h][1]}function dp(n,t,r){const l=n.base!==void 0?n.base:1;if(oi(r)!=="number")return Ps(n.default,t.default);const h=n.stops.length;if(h===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[h-1][0])return n.stops[h-1][1];const m=Zs(n.stops.map((P=>P[0])),r),_=(function(P,I,k,z){const N=z-k,Z=P-k;return N===0?0:I===1?Z/N:(Math.pow(I,Z)-1)/(Math.pow(I,N)-1)})(r,l,n.stops[m][0],n.stops[m+1][0]),x=n.stops[m][1],B=n.stops[m+1][1],O=Un[t.type]||Cf;return typeof x.evaluate=="function"?{evaluate(...P){const I=x.evaluate.apply(void 0,P),k=B.evaluate.apply(void 0,P);if(I!==void 0&&k!==void 0)return O(I,k,_,n.colorSpace)}}:O(x,B,_,n.colorSpace)}function Mf(n,t,r){switch(t.type){case"color":r=ri.parse(r);break;case"formatted":r=zr.fromString(r.toString());break;case"resolvedImage":r=tn.fromString(r.toString());break;case"padding":r=mr.parse(r);break;case"colorArray":r=nr.parse(r);break;case"numberArray":r=Fr.parse(r);break;default:oi(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0)}return Ps(r,n.default,t.default)}dn.register(Ao,{error:[{kind:"error"},[ti],(n,[t])=>{throw new Si(t.evaluate(n))}],typeof:[ti,[Wt],(n,[t])=>Ti(kt(t.evaluate(n)))],"to-rgba":[Zr(lt,4),[Or],(n,[t])=>{const[r,l,h,m]=t.evaluate(n).rgb;return[255*r,255*l,255*h,m]}],rgb:[Or,[lt,lt,lt],ap],rgba:[Or,[lt,lt,lt,lt],ap],has:{type:Kt,overloads:[[[ti],(n,[t])=>lp(t.evaluate(n),n.properties())],[[ti,vs],(n,[t,r])=>lp(t.evaluate(n),r.evaluate(n))]]},get:{type:Wt,overloads:[[[ti],(n,[t])=>iu(t.evaluate(n),n.properties())],[[ti,vs],(n,[t,r])=>iu(t.evaluate(n),r.evaluate(n))]]},"feature-state":[Wt,[ti],(n,[t])=>iu(t.evaluate(n),n.featureState||{})],properties:[vs,[],n=>n.properties()],"geometry-type":[ti,[],n=>n.geometryType()],id:[Wt,[],n=>n.id()],zoom:[lt,[],n=>n.globals.zoom],"heatmap-density":[lt,[],n=>n.globals.heatmapDensity||0],elevation:[lt,[],n=>n.globals.elevation||0],"line-progress":[lt,[],n=>n.globals.lineProgress||0],accumulated:[Wt,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[lt,Js(lt),(n,t)=>{let r=0;for(const l of t)r+=l.evaluate(n);return r}],"*":[lt,Js(lt),(n,t)=>{let r=1;for(const l of t)r*=l.evaluate(n);return r}],"-":{type:lt,overloads:[[[lt,lt],(n,[t,r])=>t.evaluate(n)-r.evaluate(n)],[[lt],(n,[t])=>-t.evaluate(n)]]},"/":[lt,[lt,lt],(n,[t,r])=>t.evaluate(n)/r.evaluate(n)],"%":[lt,[lt,lt],(n,[t,r])=>t.evaluate(n)%r.evaluate(n)],ln2:[lt,[],()=>Math.LN2],pi:[lt,[],()=>Math.PI],e:[lt,[],()=>Math.E],"^":[lt,[lt,lt],(n,[t,r])=>Math.pow(t.evaluate(n),r.evaluate(n))],sqrt:[lt,[lt],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[lt,[lt],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[lt,[lt],(n,[t])=>Math.log(t.evaluate(n))],log2:[lt,[lt],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[lt,[lt],(n,[t])=>Math.sin(t.evaluate(n))],cos:[lt,[lt],(n,[t])=>Math.cos(t.evaluate(n))],tan:[lt,[lt],(n,[t])=>Math.tan(t.evaluate(n))],asin:[lt,[lt],(n,[t])=>Math.asin(t.evaluate(n))],acos:[lt,[lt],(n,[t])=>Math.acos(t.evaluate(n))],atan:[lt,[lt],(n,[t])=>Math.atan(t.evaluate(n))],min:[lt,Js(lt),(n,t)=>Math.min(...t.map((r=>r.evaluate(n))))],max:[lt,Js(lt),(n,t)=>Math.max(...t.map((r=>r.evaluate(n))))],abs:[lt,[lt],(n,[t])=>Math.abs(t.evaluate(n))],round:[lt,[lt],(n,[t])=>{const r=t.evaluate(n);return r<0?-Math.round(-r):Math.round(r)}],floor:[lt,[lt],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[lt,[lt],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[Kt,[ti,Wt],(n,[t,r])=>n.properties()[t.value]===r.value],"filter-id-==":[Kt,[Wt],(n,[t])=>n.id()===t.value],"filter-type-==":[Kt,[ti],(n,[t])=>n.geometryType()===t.value],"filter-<":[Kt,[ti,Wt],(n,[t,r])=>{const l=n.properties()[t.value],h=r.value;return typeof l==typeof h&&l<h}],"filter-id-<":[Kt,[Wt],(n,[t])=>{const r=n.id(),l=t.value;return typeof r==typeof l&&r<l}],"filter->":[Kt,[ti,Wt],(n,[t,r])=>{const l=n.properties()[t.value],h=r.value;return typeof l==typeof h&&l>h}],"filter-id->":[Kt,[Wt],(n,[t])=>{const r=n.id(),l=t.value;return typeof r==typeof l&&r>l}],"filter-<=":[Kt,[ti,Wt],(n,[t,r])=>{const l=n.properties()[t.value],h=r.value;return typeof l==typeof h&&l<=h}],"filter-id-<=":[Kt,[Wt],(n,[t])=>{const r=n.id(),l=t.value;return typeof r==typeof l&&r<=l}],"filter->=":[Kt,[ti,Wt],(n,[t,r])=>{const l=n.properties()[t.value],h=r.value;return typeof l==typeof h&&l>=h}],"filter-id->=":[Kt,[Wt],(n,[t])=>{const r=n.id(),l=t.value;return typeof r==typeof l&&r>=l}],"filter-has":[Kt,[Wt],(n,[t])=>t.value in n.properties()],"filter-has-id":[Kt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Kt,[Zr(ti)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[Kt,[Zr(Wt)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[Kt,[ti,Zr(Wt)],(n,[t,r])=>r.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[Kt,[ti,Zr(Wt)],(n,[t,r])=>(function(l,h,m,_){for(;m<=_;){const x=m+_>>1;if(h[x]===l)return!0;h[x]>l?_=x-1:m=x+1}return!1})(n.properties()[t.value],r.value,0,r.value.length-1)],all:{type:Kt,overloads:[[[Kt,Kt],(n,[t,r])=>t.evaluate(n)&&r.evaluate(n)],[Js(Kt),(n,t)=>{for(const r of t)if(!r.evaluate(n))return!1;return!0}]]},any:{type:Kt,overloads:[[[Kt,Kt],(n,[t,r])=>t.evaluate(n)||r.evaluate(n)],[Js(Kt),(n,t)=>{for(const r of t)if(r.evaluate(n))return!0;return!1}]]},"!":[Kt,[Kt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[Kt,[ti],(n,[t])=>{const r=n.globals&&n.globals.isSupportedScript;return!r||r(t.evaluate(n))}],upcase:[ti,[ti],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[ti,[ti],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[ti,Js(Wt),(n,t)=>t.map((r=>Ut(r.evaluate(n)))).join("")],"resolved-locale":[ti,[al],(n,[t])=>t.evaluate(n).resolvedLocale()]});class nu{constructor(t,r,l){this.expression=t,this._warningHistory={},this._evaluator=new Nc,this._defaultValue=r?(function(h){if(h.type==="color"&&Pa(h.default))return new ri(0,0,0,0);switch(h.type){case"color":return ri.parse(h.default)||null;case"padding":return mr.parse(h.default)||null;case"numberArray":return Fr.parse(h.default)||null;case"colorArray":return nr.parse(h.default)||null;case"variableAnchorOffsetCollection":return Nr.parse(h.default)||null;case"projectionDefinition":return Ar.parse(h.default)||null;default:return h.default===void 0?null:h.default}})(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=l}evaluateWithoutErrorHandling(t,r,l,h,m,_){return this._globalState&&(t={...t,globalState:this._globalState}),this._evaluator.globals=t,this._evaluator.feature=r,this._evaluator.featureState=l,this._evaluator.canonical=h,this._evaluator.availableImages=m||null,this._evaluator.formattedSection=_,this.expression.evaluate(this._evaluator)}evaluate(t,r,l,h,m,_){this._globalState&&(t={...t,globalState:this._globalState}),this._evaluator.globals=t,this._evaluator.feature=r||null,this._evaluator.featureState=l||null,this._evaluator.canonical=h,this._evaluator.availableImages=m||null,this._evaluator.formattedSection=_||null;try{const x=this.expression.evaluate(this._evaluator);if(x==null||typeof x=="number"&&x!=x)return this._defaultValue;if(this._enumValues&&!(x in this._enumValues))throw new Si(`Expected value to be one of ${Object.keys(this._enumValues).map((B=>JSON.stringify(B))).join(", ")}, but found ${JSON.stringify(x)} instead.`);return x}catch(x){return this._warningHistory[x.message]||(this._warningHistory[x.message]=!0,typeof console<"u"&&console.warn(x.message)),this._defaultValue}}}function El(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Ao}function Ca(n,t,r){const l=new Eo(Ao,Ol,[],t?(function(m){const _={color:Or,string:ti,number:lt,enum:ti,boolean:Kt,formatted:ws,padding:ll,numberArray:To,colorArray:Fn,projectionDefinition:$s,resolvedImage:Xi,variableAnchorOffsetCollection:cl};return m.type==="array"?Zr(_[m.value]||Wt,m.length):_[m.type]})(t):void 0),h=l.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return h?cp(new nu(h,t,r)):jo(l.errors)}class Ea{constructor(t,r,l){this.kind=t,this._styleExpression=r,this.isStateDependent=t!=="constant"&&!Oa(r.expression),this.globalStateRefs=Aa(r.expression),this._globalState=l}evaluateWithoutErrorHandling(t,r,l,h,m,_){return this._globalState&&(t={...t,globalState:this._globalState}),this._styleExpression.evaluateWithoutErrorHandling(t,r,l,h,m,_)}evaluate(t,r,l,h,m,_){return this._globalState&&(t={...t,globalState:this._globalState}),this._styleExpression.evaluate(t,r,l,h,m,_)}}class su{constructor(t,r,l,h,m){this.kind=t,this.zoomStops=l,this._styleExpression=r,this.isStateDependent=t!=="camera"&&!Oa(r.expression),this.globalStateRefs=Aa(r.expression),this.interpolationType=h,this._globalState=m}evaluateWithoutErrorHandling(t,r,l,h,m,_){return this._globalState&&(t={...t,globalState:this._globalState}),this._styleExpression.evaluateWithoutErrorHandling(t,r,l,h,m,_)}evaluate(t,r,l,h,m,_){return this._globalState&&(t={...t,globalState:this._globalState}),this._styleExpression.evaluate(t,r,l,h,m,_)}interpolationFactor(t,r,l){return this.interpolationType?Pr.interpolationFactor(this.interpolationType,t,r,l):0}}function fp(n,t,r){const l=Ca(n,t,r);if(l.result==="error")return l;const h=l.value.expression,m=Pl(h);if(!m&&!Os(t))return jo([new $i("","data expressions not supported")]);const _=Cl(h,["zoom"]);if(!_&&!up(t))return jo([new $i("","zoom expressions not supported")]);const x=Ia(h);return x||_?x instanceof $i?jo([x]):x instanceof Pr&&!ru(t)?jo([new $i("",'"interpolate" expressions cannot be used with this property')]):cp(x?new su(m?"camera":"composite",l.value,x.labels,x instanceof Pr?x.interpolation:void 0,r):new Ea(m?"constant":"source",l.value,r)):jo([new $i("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ma{constructor(t,r){this._parameters=t,this._specification=r,Ir(this,hp(this._parameters,this._specification))}static deserialize(t){return new Ma(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Ia(n){let t=null;if(n instanceof fa)t=Ia(n.result);else if(n instanceof ya){for(const r of n.args)if(t=Ia(r),t)break}else(n instanceof Yi||n instanceof Pr)&&n.input instanceof dn&&n.input.name==="zoom"&&(t=n);return t instanceof $i||n.eachChild((r=>{const l=Ia(r);l instanceof $i?t=l:!t&&l?t=new $i("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&l&&t!==l&&(t=new $i("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function Aa(n,t=new Set){return n instanceof Sa&&t.add(n.key),n.eachChild((r=>{Aa(r,t)})),t}function Ml(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!Ml(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const ou={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Qs(n,t){if(n==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ml(n)||(n=eo(n));const r=Ca(n,ou,t);if(r.result==="error")throw new Error(r.value.map((l=>`${l.key}: ${l.message}`)).join(", "));return{filter:(l,h,m)=>r.value.evaluate(l,h,{},m),needGeometry:Il(n),getGlobalStateRefs:()=>Aa(r.value.expression)}}function au(n,t){return n<t?-1:n>t?1:0}function Il(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t<n.length;t++)if(Il(n[t]))return!0;return!1}function eo(n){if(!n)return!0;const t=n[0];return n.length<=1?t!=="any":t==="=="?lu(n[1],n[2],"=="):t==="!="?Al(lu(n[1],n[2],"==")):t==="<"||t===">"||t==="<="||t===">="?lu(n[1],n[2],t):t==="any"?(r=n.slice(1),["any"].concat(r.map(eo))):t==="all"?["all"].concat(n.slice(1).map(eo)):t==="none"?["all"].concat(n.slice(1).map(eo).map(Al)):t==="in"?mp(n[1],n.slice(2)):t==="!in"?Al(mp(n[1],n.slice(2))):t==="has"?gp(n[1]):t!=="!has"||Al(gp(n[1]));var r}function lu(n,t,r){switch(n){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,n,t]}}function mp(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((r=>typeof r!=typeof t[0]))?["filter-in-large",n,["literal",t.sort(au)]]:["filter-in-small",n,["literal",t]]}}function gp(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function Al(n){return["!",n]}function cu(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let h="[";for(const m of n)h+=`${cu(m)},`;return`${h}]`}const r=Object.keys(n).sort();let l="{";for(let h=0;h<r.length;h++)l+=`${JSON.stringify(r[h])}:${cu(n[r[h]])},`;return`${l}}`}function If(n){let t="";for(const r of Nt)t+=`/${cu(n[r])}`;return t}function uu(n){const t=n.value;return t?[new We(n.key,t,"constants have been deprecated as of v8")]:[]}function Ui(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function Vn(n){if(Array.isArray(n))return n.map(Vn);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const t={};for(const r in n)t[r]=Vn(n[r]);return t}return Ui(n)}function fn(n){const t=n.key,r=n.value,l=n.valueSpec||{},h=n.objectElementValidators||{},m=n.style,_=n.styleSpec,x=n.validateSpec;let B=[];const O=oi(r);if(O!=="object")return[new We(t,r,`object expected, ${O} found`)];for(const P in r){const I=P.split(".")[0],k=Co(l,I)||l["*"];let z;if(Co(h,I))z=h[I];else if(Co(l,I))z=x;else if(h["*"])z=h["*"];else{if(!l["*"]){B.push(new We(t,r[P],`unknown property "${P}"`));continue}z=x}B=B.concat(z({key:(t&&`${t}.`)+P,value:r[P],valueSpec:k,style:m,styleSpec:_,object:r,objectKey:P,validateSpec:x},r))}for(const P in l)h[P]||l[P].required&&l[P].default===void 0&&r[P]===void 0&&B.push(new We(t,r,`missing required property "${P}"`));return B}function jl(n){const t=n.value,r=n.valueSpec,l=n.style,h=n.styleSpec,m=n.key,_=n.arrayElementValidator||n.validateSpec;if(oi(t)!=="array")return[new We(m,t,`array expected, ${oi(t)} found`)];if(r.length&&t.length!==r.length)return[new We(m,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.length<r["min-length"])return[new We(m,t,`array length at least ${r["min-length"]} expected, length ${t.length} found`)];let x={type:r.value,values:r.values};h.$version<7&&(x.function=r.function),oi(r.value)==="object"&&(x=r.value);let B=[];for(let O=0;O<t.length;O++)B=B.concat(_({array:t,arrayIndex:O,value:t[O],valueSpec:x,validateSpec:n.validateSpec,style:l,styleSpec:h,key:`${m}[${O}]`}));return B}function ja(n){const t=n.key,r=n.value,l=n.valueSpec;let h=oi(r);return h==="number"&&r!=r&&(h="NaN"),h!=="number"?[new We(t,r,`number expected, ${h} found`)]:"minimum"in l&&r<l.minimum?[new We(t,r,`${r} is less than the minimum value ${l.minimum}`)]:"maximum"in l&&r>l.maximum?[new We(t,r,`${r} is greater than the maximum value ${l.maximum}`)]:[]}function _p(n){const t=n.valueSpec,r=Ui(n.value.type);let l,h,m,_={};const x=r!=="categorical"&&n.value.property===void 0,B=!x,O=oi(n.value.stops)==="array"&&oi(n.value.stops[0])==="array"&&oi(n.value.stops[0][0])==="object",P=fn({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(z){if(r==="identity")return[new We(z.key,z.value,'identity function may not have a "stops" property')];let N=[];const Z=z.value;return N=N.concat(jl({key:z.key,value:Z,valueSpec:z.valueSpec,validateSpec:z.validateSpec,style:z.style,styleSpec:z.styleSpec,arrayElementValidator:I})),oi(Z)==="array"&&Z.length===0&&N.push(new We(z.key,Z,"array must have at least one stop")),N},default:function(z){return z.validateSpec({key:z.key,value:z.value,valueSpec:t,validateSpec:z.validateSpec,style:z.style,styleSpec:z.styleSpec})}}});return r==="identity"&&x&&P.push(new We(n.key,n.value,'missing required property "property"')),r==="identity"||n.value.stops||P.push(new We(n.key,n.value,'missing required property "stops"')),r==="exponential"&&n.valueSpec.expression&&!ru(n.valueSpec)&&P.push(new We(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(B&&!Os(n.valueSpec)?P.push(new We(n.key,n.value,"property functions not supported")):x&&!up(n.valueSpec)&&P.push(new We(n.key,n.value,"zoom functions not supported"))),r!=="categorical"&&!O||n.value.property!==void 0||P.push(new We(n.key,n.value,'"property" property is required')),P;function I(z){let N=[];const Z=z.value,K=z.key;if(oi(Z)!=="array")return[new We(K,Z,`array expected, ${oi(Z)} found`)];if(Z.length!==2)return[new We(K,Z,`array length 2 expected, length ${Z.length} found`)];if(O){if(oi(Z[0])!=="object")return[new We(K,Z,`object expected, ${oi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new We(K,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new We(K,Z,"object stop key must have value")];if(m&&m>Ui(Z[0].zoom))return[new We(K,Z[0].zoom,"stop zoom values must appear in ascending order")];Ui(Z[0].zoom)!==m&&(m=Ui(Z[0].zoom),h=void 0,_={}),N=N.concat(fn({key:`${K}[0]`,value:Z[0],valueSpec:{zoom:{}},validateSpec:z.validateSpec,style:z.style,styleSpec:z.styleSpec,objectElementValidators:{zoom:ja,value:k}}))}else N=N.concat(k({key:`${K}[0]`,value:Z[0],validateSpec:z.validateSpec,style:z.style,styleSpec:z.styleSpec},Z));return El(Vn(Z[1]))?N.concat([new We(`${K}[1]`,Z[1],"expressions are not allowed in function stops.")]):N.concat(z.validateSpec({key:`${K}[1]`,value:Z[1],valueSpec:t,validateSpec:z.validateSpec,style:z.style,styleSpec:z.styleSpec}))}function k(z,N){const Z=oi(z.value),K=Ui(z.value),ee=z.value!==null?z.value:N;if(l){if(Z!==l)return[new We(z.key,ee,`${Z} stop domain type must match previous stop domain type ${l}`)]}else l=Z;if(Z!=="number"&&Z!=="string"&&Z!=="boolean")return[new We(z.key,ee,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&r!=="categorical"){let _e=`number expected, ${Z} found`;return Os(t)&&r===void 0&&(_e+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new We(z.key,ee,_e)]}return r!=="categorical"||Z!=="number"||isFinite(K)&&Math.floor(K)===K?r!=="categorical"&&Z==="number"&&h!==void 0&&K<h?[new We(z.key,ee,"stop domain values must appear in ascending order")]:(h=K,r==="categorical"&&K in _?[new We(z.key,ee,"stop domain values must be unique")]:(_[K]=!0,[])):[new We(z.key,ee,`integer expected, found ${K}`)]}}function to(n){const t=(n.expressionContext==="property"?fp:Ca)(Vn(n.value),n.valueSpec);if(t.result==="error")return t.value.map((l=>new We(`${n.key}${l.key}`,n.value,l.message)));const r=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!r.outputDefined())return[new We(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!Oa(r))return[new We(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!Oa(r))return[new We(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!Cl(r,["zoom","feature-state"]))return[new We(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!Pl(r))return[new We(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function kl(n){const t=n.key,r=n.value,l=oi(r);return l!=="string"?[new We(t,r,`color expected, ${l}
91 found`)]:ri.parse(String(r))?[]:[new We(t,r,`color expected, "${r}" found`)]}function ss(n){const t=n.key,r=n.value,l=n.valueSpec,h=[];return Array.isArray(l.values)?l.values.indexOf(Ui(r))===-1&&h.push(new We(t,r,`expected one of [${l.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(l.values).indexOf(Ui(r))===-1&&h.push(new We(t,r,`expected one of [${Object.keys(l.values).join(", ")}], ${JSON.stringify(r)} found`)),h}function hu(n){return Ml(Vn(n.value))?to(Ir({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):yp(n)}function yp(n){const t=n.value,r=n.key;if(oi(t)!=="array")return[new We(r,t,`array expected, ${oi(t)} found`)];const l=n.styleSpec;let h,m=[];if(t.length<1)return[new We(r,t,"filter array must have at least 1 element")];switch(m=m.concat(ss({key:`${r}[0]`,value:t[0],valueSpec:l.filter_operator,style:n.style,styleSpec:n.styleSpec})),Ui(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Ui(t[1])==="$type"&&m.push(new We(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&m.push(new We(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(h=oi(t[1]),h!=="string"&&m.push(new We(`${r}[1]`,t[1],`string expected, ${h} found`)));for(let _=2;_<t.length;_++)h=oi(t[_]),Ui(t[1])==="$type"?m=m.concat(ss({key:`${r}[${_}]`,value:t[_],valueSpec:l.geometry_type,style:n.style,styleSpec:n.styleSpec})):h!=="string"&&h!=="number"&&h!=="boolean"&&m.push(new We(`${r}[${_}]`,t[_],`string, number, or boolean expected, ${h} found`));break;case"any":case"all":case"none":for(let _=1;_<t.length;_++)m=m.concat(yp({key:`${r}[${_}]`,value:t[_],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":h=oi(t[1]),t.length!==2?m.push(new We(r,t,`filter array for "${t[0]}" operator must have 2 elements`)):h!=="string"&&m.push(new We(`${r}[1]`,t[1],`string expected, ${h} found`))}return m}function bp(n,t){const r=n.key,l=n.validateSpec,h=n.style,m=n.styleSpec,_=n.value,x=n.objectKey,B=m[`${t}_${n.layerType}`];if(!B)return[];const O=x.match(/^(.*)-transition$/);if(t==="paint"&&O&&B[O[1]]&&B[O[1]].transition)return l({key:r,value:_,valueSpec:m.transition,style:h,styleSpec:m});const P=n.valueSpec||B[x];if(!P)return[new We(r,_,`unknown property "${x}"`)];let I;if(oi(_)==="string"&&Os(P)&&!P.tokens&&(I=/^{([^}]+)}$/.exec(_)))return[new We(r,_,`"${x}" does not support interpolation syntax
92Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(I[1])} }\`.`)];const k=[];return n.layerType==="symbol"&&(x==="text-field"&&h&&!h.glyphs&&k.push(new We(r,_,'use of "text-field" requires a style "glyphs" property')),x==="text-font"&&Pa(Vn(_))&&Ui(_.type)==="identity"&&k.push(new We(r,_,'"text-font" does not support identity functions'))),k.concat(l({key:n.key,value:_,valueSpec:P,style:h,styleSpec:m,expressionContext:"property",propertyType:t,propertyKey:x}))}function xp(n){return bp(n,"paint")}function vp(n){return bp(n,"layout")}function wp(n){let t=[];const r=n.value,l=n.key,h=n.style,m=n.styleSpec;if(oi(r)!=="object")return[new We(l,r,`object expected, ${oi(r)} found`)];r.type||r.ref||t.push(new We(l,r,'either "type" or "ref" is required'));let _=Ui(r.type);const x=Ui(r.ref);if(r.id){const B=Ui(r.id);for(let O=0;O<n.arrayIndex;O++){const P=h.layers[O];Ui(P.id)===B&&t.push(new We(l,r.id,`duplicate layer id "${r.id}", previously used at line ${P.id.__line__}`))}}if("ref"in r){let B;["type","source","source-layer","filter","layout"].forEach((O=>{O in r&&t.push(new We(l,r[O],`"${O}" is prohibited for ref layers`))})),h.layers.forEach((O=>{Ui(O.id)===x&&(B=O)})),B?B.ref?t.push(new We(l,r.ref,"ref cannot reference another ref layer")):_=Ui(B.type):t.push(new We(l,r.ref,`ref layer "${x}" not found`))}else if(_!=="background")if(r.source){const B=h.sources&&h.sources[r.source],O=B&&Ui(B.type);B?O==="vector"&&_==="raster"?t.push(new We(l,r.source,`layer "${r.id}" requires a raster source`)):O!=="raster-dem"&&_==="hillshade"||O!=="raster-dem"&&_==="color-relief"?t.push(new We(l,r.source,`layer "${r.id}" requires a raster-dem source`)):O==="raster"&&_!=="raster"?t.pu
vendor: 14,509 bytes, line 92
92sh(new We(l,r.source,`layer "${r.id}" requires a vector source`)):O!=="vector"||r["source-layer"]?O==="raster-dem"&&_!=="hillshade"&&_!=="color-relief"?t.push(new We(l,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):_!=="line"||!r.paint||!r.paint["line-gradient"]||O==="geojson"&&B.lineMetrics||t.push(new We(l,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new We(l,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new We(l,r.source,`source "${r.source}" not found`))}else t.push(new We(l,r,'missing required property "source"'));return t=t.concat(fn({key:l,value:r,valueSpec:m.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*":()=>[],type:()=>n.validateSpec({key:`${l}.type`,value:r.type,valueSpec:m.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:r,objectKey:"type"}),filter:hu,layout:B=>fn({layer:r,key:B.key,value:B.value,style:B.style,styleSpec:B.styleSpec,validateSpec:B.validateSpec,objectElementValidators:{"*":O=>vp(Ir({layerType:_},O))}}),paint:B=>fn({layer:r,key:B.key,value:B.value,style:B.style,styleSpec:B.styleSpec,validateSpec:B.validateSpec,objectElementValidators:{"*":O=>xp(Ir({layerType:_},O))}})}})),t}function bn(n){const t=n.value,r=n.key,l=oi(t);return l!=="string"?[new We(r,t,`string expected, ${l} found`)]:[]}const ko={promoteId:function({key:n,value:t}){if(oi(t)==="string")return bn({key:n,value:t});{const r=[];for(const l in t)r.push(...bn({key:`${n}.${l}`,value:t[l]}));return r}}};function qr(n){const t=n.value,r=n.key,l=n.styleSpec,h=n.style,m=n.validateSpec;if(!t.type)return[new We(r,t,'"type" is required')];const _=Ui(t.type);let x;switch(_){case"vector":case"raster":return x=fn({key:r,value:t,valueSpec:l[`source_${_.replace("-","_")}`],style:n.style,styleSpec:l,objectElementValidators:ko,validateSpec:m}),x;case"raster-dem":return x=(function(B){var O;const P=(O=B.sourceName)!==null&&O!==void 0?O:"",I=B.value,k=B.styleSpec,z=k.source_raster_dem,N=B.style;let Z=[];const K=oi(I);if(I===void 0)return Z;if(K!=="object")return Z.push(new We("source_raster_dem",I,`object expected, ${K} found`)),Z;const ee=Ui(I.encoding)==="custom",_e=["redFactor","greenFactor","blueFactor","baseShift"],oe=B.value.encoding?`"${B.value.encoding}"`:"Default";for(const he in I)!ee&&_e.includes(he)?Z.push(new We(he,I[he],`In "${P}": "${he}" is only valid when "encoding" is set to "custom". ${oe} encoding found`)):z[he]?Z=Z.concat(B.validateSpec({key:he,value:I[he],valueSpec:z[he],validateSpec:B.validateSpec,style:N,styleSpec:k})):Z.push(new We(he,I[he],`unknown property "${he}"`));return Z})({sourceName:r,value:t,style:n.style,styleSpec:l,validateSpec:m}),x;case"geojson":if(x=fn({key:r,value:t,valueSpec:l.source_geojson,style:h,styleSpec:l,validateSpec:m,objectElementValidators:ko}),t.cluster)for(const B in t.clusterProperties){const[O,P]=t.clusterProperties[B],I=typeof O=="string"?[O,["accumulated"],["get",B]]:O;x.push(...to({key:`${r}.${B}.map`,value:P,expressionContext:"cluster-map"})),x.push(...to({key:`${r}.${B}.reduce`,value:I,expressionContext:"cluster-reduce"}))}return x;case"video":return fn({key:r,value:t,valueSpec:l.source_video,style:h,validateSpec:m,styleSpec:l});case"image":return fn({key:r,value:t,valueSpec:l.source_image,style:h,validateSpec:m,styleSpec:l});case"canvas":return[new We(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ss({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Ro(n){const t=n.value,r=n.styleSpec,l=r.light,h=n.style;let m=[];const _=oi(t);if(t===void 0)return m;if(_!=="object")return m=m.concat([new We("light",t,`object expected, ${_} found`)]),m;for(const x in t){const B=x.match(/^(.*)-transition$/);m=m.concat(B&&l[B[1]]&&l[B[1]].transition?n.validateSpec({key:x,value:t[x],valueSpec:r.transition,validateSpec:n.validateSpec,style:h,styleSpec:r}):l[x]?n.validateSpec({key:x,value:t[x],valueSpec:l[x],validateSpec:n.validateSpec,style:h,styleSpec:r}):[new We(x,t[x],`unknown property "${x}"`)])}return m}function pu(n){const t=n.value,r=n.styleSpec,l=r.sky,h=n.style,m=oi(t);if(t===void 0)return[];if(m!=="object")return[new We("sky",t,`object expected, ${m} found`)];let _=[];for(const x in t)_=_.concat(l[x]?n.validateSpec({key:x,value:t[x],valueSpec:l[x],style:h,styleSpec:r}):[new We(x,t[x],`unknown property "${x}"`)]);return _}function Bp(n){const t=n.value,r=n.styleSpec,l=r.terrain,h=n.style;let m=[];const _=oi(t);if(t===void 0)return m;if(_!=="object")return m=m.concat([new We("terrain",t,`object expected, ${_} found`)]),m;for(const x in t)m=m.concat(l[x]?n.validateSpec({key:x,value:t[x],valueSpec:l[x],validateSpec:n.validateSpec,style:h,styleSpec:r}):[new We(x,t[x],`unknown property "${x}"`)]);return m}function Tp(n){let t=[];const r=n.value,l=n.key;if(Array.isArray(r)){const h=[],m=[];for(const _ in r)r[_].id&&h.includes(r[_].id)&&t.push(new We(l,r,`all the sprites' ids must be unique, but ${r[_].id} is duplicated`)),h.push(r[_].id),r[_].url&&m.includes(r[_].url)&&t.push(new We(l,r,`all the sprites' URLs must be unique, but ${r[_].url} is duplicated`)),m.push(r[_].url),t=t.concat(fn({key:`${l}[${_}]`,value:r[_],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:n.validateSpec}));return t}return bn({key:l,value:r})}function Do(n){return t=n.value,t&&t.constructor===Object?[]:[new We(n.key,n.value,`object expected, ${oi(n.value)} found`)];var t}const du={"*":()=>[],array:jl,boolean:function(n){const t=n.value,r=n.key,l=oi(t);return l!=="boolean"?[new We(r,t,`boolean expected, ${l} found`)]:[]},number:ja,color:kl,constants:uu,enum:ss,filter:hu,function:_p,layer:wp,object:fn,source:qr,light:Ro,sky:pu,terrain:Bp,projection:function(n){const t=n.value,r=n.styleSpec,l=r.projection,h=n.style,m=oi(t);if(t===void 0)return[];if(m!=="object")return[new We("projection",t,`object expected, ${m} found`)];let _=[];for(const x in t)_=_.concat(l[x]?n.validateSpec({key:x,value:t[x],valueSpec:l[x],style:h,styleSpec:r}):[new We(x,t[x],`unknown property "${x}"`)]);return _},projectionDefinition:function(n){const t=n.key;let r=n.value;r=r instanceof String?r.valueOf():r;const l=oi(r);return l!=="array"||(function(h){return Array.isArray(h)&&h.length===3&&typeof h[0]=="string"&&typeof h[1]=="string"&&typeof h[2]=="number"})(r)||(function(h){return!!["interpolate","step","literal"].includes(h[0])})(r)?["array","string"].includes(l)?[]:[new We(t,r,`projection expected, invalid type "${l}" found`)]:[new We(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:bn,formatted:function(n){return bn(n).length===0?[]:to(n)},resolvedImage:function(n){return bn(n).length===0?[]:to(n)},padding:function(n){const t=n.key,r=n.value;if(oi(r)==="array"){if(r.length<1||r.length>4)return[new We(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];const l={type:"number"};let h=[];for(let m=0;m<r.length;m++)h=h.concat(n.validateSpec({key:`${t}[${m}]`,value:r[m],validateSpec:n.validateSpec,valueSpec:l}));return h}return ja({key:t,value:r,valueSpec:{}})},numberArray:function(n){const t=n.key,r=n.value;if(oi(r)==="array"){const l={type:"number"};if(r.length<1)return[new We(t,r,"array length at least 1 expected, length 0 found")];let h=[];for(let m=0;m<r.length;m++)h=h.concat(n.validateSpec({key:`${t}[${m}]`,value:r[m],validateSpec:n.validateSpec,valueSpec:l}));return h}return ja({key:t,value:r,valueSpec:{}})},colorArray:function(n){const t=n.key,r=n.value;if(oi(r)==="array"){if(r.length<1)return[new We(t,r,"array length at least 1 expected, length 0 found")];let l=[];for(let h=0;h<r.length;h++)l=l.concat(kl({key:`${t}[${h}]`,value:r[h]}));return l}return kl({key:t,value:r})},variableAnchorOffsetCollection:function(n){const t=n.key,r=n.value,l=oi(r),h=n.styleSpec;if(l!=="array"||r.length<1||r.length%2!=0)return[new We(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let m=[];for(let _=0;_<r.length;_+=2)m=m.concat(ss({key:`${t}[${_}]`,value:r[_],valueSpec:h.layout_symbol["text-anchor"]})),m=m.concat(jl({key:`${t}[${_+1}]`,value:r[_+1],valueSpec:{length:2,value:"number"},validateSpec:n.validateSpec,style:n.style,styleSpec:h}));return m},sprite:Tp,state:Do};function Lo(n){const t=n.value,r=n.valueSpec,l=n.styleSpec;return n.validateSpec=Lo,r.expression&&Pa(Ui(t))?_p(n):r.expression&&El(Vn(t))?to(n):r.type&&du[r.type]?du[r.type](n):fn(Ir({},n,{valueSpec:r.type?l[r.type]:r}))}function Sp(n){const t=n.value,r=n.key,l=bn(n);return l.length||(t.indexOf("{fontstack}")===-1&&l.push(new We(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&l.push(new We(r,t,'"glyphs" url must include a "{range}" token'))),l}function Wr(n,t=ye){let r=[];return r=r.concat(Lo({key:"",value:n,valueSpec:t.$root,styleSpec:t,style:n,validateSpec:Lo,objectElementValidators:{glyphs:Sp,"*":()=>[]}})),n.constants&&(r=r.concat(uu({key:"constants",value:n.constants}))),zo(r)}function xn(n){return function(t){return n({...t,validateSpec:Lo})}}function zo(n){return[].concat(n).sort(((t,r)=>t.line-r.line))}function vn(n){return function(...t){return zo(n.apply(this,t))}}Wr.source=vn(xn(qr)),Wr.sprite=vn(xn(Tp)),Wr.glyphs=vn(xn(Sp)),Wr.light=vn(xn(Ro)),Wr.sky=vn(xn(pu)),Wr.terrain=vn(xn(Bp)),Wr.state=vn(xn(Do)),Wr.layer=vn(xn(wp)),Wr.filter=vn(xn(hu)),Wr.paintProperty=vn(xn(xp)),Wr.layoutProperty=vn(xn(vp));const Fo=Wr,Af=Fo.light,ka=Fo.sky,jf=Fo.paintProperty,kf=Fo.layoutProperty;function Ra(n,t){let r=!1;if(t&&t.length)for(const l of t)n.fire(new ze(new Error(l.message))),r=!0;return r}class Da{constructor(t,r,l){const h=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const _=new Int32Array(this.arrayBuffer);t=_[0],this.d=(r=_[1])+2*(l=_[2]);for(let B=0;B<this.d*this.d;B++){const O=_[3+B],P=_[3+B+1];h.push(O===P?null:_.subarray(O,P))}const x=_[3+h.length+1];this.keys=_.subarray(_[3+h.length],x),this.bboxes=_.subarray(x),this.insert=this._insertReadonly}else{this.d=r+2*l;for(let _=0;_<this.d*this.d;_++)h.push([]);this.keys=[],this.bboxes=[]}this.n=r,this.extent=t,this.padding=l,this.scale=r/t,this.uid=0;const m=l/r*t;this.min=-m,this.max=t+m}insert(t,r,l,h,m){this._forEachCell(r,l,h,m,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(r),this.bboxes.push(l),this.bboxes.push(h),this.bboxes.push(m)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,r,l,h,m,_){this.cells[m].push(_)}query(t,r,l,h,m){const _=this.min,x=this.max;if(t<=_&&r<=_&&x<=l&&x<=h&&!m)return Array.prototype.slice.call(this.keys);{const B=[];return this._forEachCell(t,r,l,h,this._queryCell,B,{},m),B}}_queryCell(t,r,l,h,m,_,x,B){const O=this.cells[m];if(O!==null){const P=this.keys,I=this.bboxes;for(let k=0;k<O.length;k++){const z=O[k];if(x[z]===void 0){const N=4*z;(B?B(I[N+0],I[N+1],I[N+2],I[N+3]):t<=I[N+2]&&r<=I[N+3]&&l>=I[N+0]&&h>=I[N+1])?(x[z]=!0,_.push(P[z])):x[z]=!1}}}}_forEachCell(t,r,l,h,m,_,x,B){const O=this._convertToCellCoord(t),P=this._convertToCellCoord(r),I=this._convertToCellCoord(l),k=this._convertToCellCoord(h);for(let z=O;z<=I;z++)for(let N=P;N<=k;N++){const Z=this.d*N+z;if((!B||B(this._convertFromCellCoord(z),this._convertFromCellCoord(N),this._convertFromCellCoord(z+1),this._convertFromCellCoord(N+1)))&&m.call(this,t,r,l,h,Z,_,x,B))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,r=3+this.cells.length+1+1;let l=0;for(let _=0;_<this.cells.length;_++)l+=this.cells[_].length;const h=new Int32Array(r+l+this.keys.length+this.bboxes.length);h[0]=this.extent,h[1]=this.n,h[2]=this.padding;let m=r;for(let _=0;_<t.length;_++){const x=t[_];h[3+_]=m,h.set(x,m),m+=x.length}return h[3+t.length]=m,h.set(this.keys,m),m+=this.keys.length,h[3+t.length+1]=m,h.set(this.bboxes,m),m+=this.bboxes.length,h.buffer}static serialize(t,r){const l=t.toArrayBuffer();return r&&r.push(l),{buffer:l}}static deserialize(t){return new Da(t.buffer)}}const wn={};function ft(n,t,r={}){if(wn[n])throw new Error(`${n} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:n,writeable:!1}),wn[n]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}ft("Object",Object),ft("Set",Set),ft("TransferableGridIndex",Da),ft("Color",ri),ft("Error",Error),ft("AJAXError",se),ft("ResolvedImage",tn),ft("StylePropertyFunction",Ma),ft("StyleExpression",nu,{omit:["_evaluator"]}),ft("ZoomDependentExpression",su),ft("ZoomConstantExpression",Ea),ft("CompoundExpression",dn,{omit:["_evaluate"]});for(const n in Ao)Ao[n]._classRegistryKey||ft(`Expression_${n}`,Ao[n]);function fu(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}function Rl(n){return n.$name||n.constructor._classRegistryKey}function mu(n){return!(function(t){if(t===null||typeof t!="object")return!1;const r=Rl(t);return!(!r||r==="Object")})(n)&&(n==null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp||n instanceof Blob||n instanceof Error||fu(n)||ht(n)||ArrayBuffer.isView(n)||n instanceof ImageData)}function No(n,t){if(mu(n))return(fu(n)||ht(n))&&t&&t.push(n),ArrayBuffer.isView(n)&&t&&t.push(n.buffer),n instanceof ImageData&&t&&t.push(n.data.buffer),n;if(Array.isArray(n)){const m=[];for(const _ of n)m.push(No(_,t));return m}if(typeof n!="object")throw new Error("can't serialize object of type "+typeof n);const r=Rl(n);if(!r)throw new Error(`can't serialize object of unregistered class ${n.constructor.name}`);if(!wn[r])throw new Error(`${r} is not registered.`);const{klass:l}=wn[r],h=l.serialize?l.serialize(n,t):{};if(l.serialize){if(t&&h===t[t.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const m in n){if(!n.hasOwnProperty(m)||wn[r].omit.indexOf(m)>=0)continue;const _=n[m];h[m]=wn[r].shallow.indexOf(m)>=0?_:No(_,t)}n instanceof Error&&(h.message=n.message)}if(h.$name)throw new Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(h.$name=r),h}
92function io(n){if(mu(n))return n;if(Array.isArray(n))return n.map(io);if(typeof n!="object")throw new Error("can't deserialize object of type "+typeof n);const t=Rl(n)||"Object";if(!wn[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:r}=wn[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(n);const l=Object.create(r.prototype);for(const h of Object.keys(n)){if(h==="$name")continue;const m=n[h];l[h]=wn[t].shallow.indexOf(h)>=0?m:io(m)}return l}class Dl{constructor(){this.first=!0}update(t,r){const l=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=l,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=l,!0):(this.lastFloorZoom>l?(this.lastIntegerZoom=l+1,this.lastIntegerZoomTime=r):this.lastFloorZoom<l&&(this.lastIntegerZoom=l,this.lastIntegerZoomTime=r),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=l,!0))}}const ai={"Latin-1 Supplement":n=>n>=128&&n<=255,"Hangul Jamo":n=>n>=4352&&n<=4607,Khmer:n=>n>=6016&&n<=6143,"General Punctuation":n=>n>=8192&&n<=8303,"Letterlike Symbols":n=>n>=8448&&n<=8527,"Number Forms":n=>n>=8528&&n<=8591,"Miscellaneous Technical":n=>n>=8960&&n<=9215,"Control Pictures":n=>n>=9216&&n<=9279,"Optical Character Recognition":n=>n>=9280&&n<=9311,"Enclosed Alphanumerics":n=>n>=9312&&n<=9471,"Geometric Shapes":n=>n>=9632&&n<=9727,"Miscellaneous Symbols":n=>n>=9728&&n<=9983,"Miscellaneous Symbols and Arrows":n=>n>=11008&&n<=11263,"Ideographic Description Characters":n=>n>=12272&&n<=12287,"CJK Symbols and Punctuation":n=>n>=12288&&n<=12351,Hiragana:n=>n>=12352&&n<=12447,Katakana:n=>n>=12448&&n<=12543,Kanbun:n=>n>=12688&&n<=12703,"CJK Strokes":n=>n>=12736&&n<=12783,"Enclosed CJK Letters and Months":n=>n>=12800&&n<=13055,"CJK Compatibility":n=>n>=13056&&n<=13311,"Yijing Hexagram Symbols":n=>n>=19904&&n<=19967,"CJK Unified Ideographs":n=>n>=19968&&n<=40959,"Hangul Syllables":n=>n>=44032&&n<=55215,"Private Use Area":n=>n>=57344&&n<=63743,"Vertical Forms":n=>n>=65040&&n<=65055,"CJK Compatibility Forms":n=>n>=65072&&n<=65103,"Small Form Variants":n=>n>=65104&&n<=65135,"Halfwidth and Fullwidth Forms":n=>n>=65280&&n<=65519};function Ll(n){for(const t of n)if(_u(t.charCodeAt(0)))return!0;return!1}function Rf(n){for(const t of n)if(!Op(t.charCodeAt(0)))return!1;return!0}function zl(n){const t=n.map((r=>{try{return new RegExp(`\\p{sc=${r}}`,"u").source}catch{return null}})).filter((r=>r));return new RegExp(t.join("|"),"u")}const Df=zl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Op(n){return!Df.test(String.fromCodePoint(n))}const gu=zl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function _u(n){return!(n!==746&&n!==747&&(n<4352||!(ai["CJK Compatibility Forms"](n)&&!(n>=65097&&n<=65103)||ai["CJK Compatibility"](n)||ai["CJK Strokes"](n)||!(!ai["CJK Symbols and Punctuation"](n)||n>=12296&&n<=12305||n>=12308&&n<=12319||n===12336)||ai["Enclosed CJK Letters and Months"](n)||ai["Ideographic Description Characters"](n)||ai.Kanbun(n)||ai.Katakana(n)&&n!==12540||!(!ai["Halfwidth and Fullwidth Forms"](n)||n===65288||n===65289||n===65293||n>=65306&&n<=65310||n===65339||n===65341||n===65343||n>=65371&&n<=65503||n===65507||n>=65512&&n<=65519)||!(!ai["Small Form Variants"](n)||n>=65112&&n<=65118||n>=65123&&n<=65126)||ai["Vertical Forms"](n)||ai["Yijing Hexagram Symbols"](n)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(n))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(n))||gu.test(String.fromCodePoint(n)))))}function Pp(n){return!(_u(n)||(function(t){return!!(ai["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||ai["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||ai["Letterlike Symbols"](t)||ai["Number Forms"](t)||ai["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||ai["Control Pictures"](t)&&t!==9251||ai["Optical Character Recognition"](t)||ai["Enclosed Alphanumerics"](t)||ai["Geometric Shapes"](t)||ai["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||ai["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||ai["CJK Symbols and Punctuation"](t)||ai.Katakana(t)||ai["Private Use Area"](t)||ai["CJK Compatibility Forms"](t)||ai["Small Form Variants"](t)||ai["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)})(n))}
vendor: 11,945 bytes, line 92
92const Cp=zl(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function yu(n){return Cp.test(String.fromCodePoint(n))}function Ep(n,t){return!(!t&&yu(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||ai.Khmer(n))}function Mp(n){for(const t of n)if(yu(t.charCodeAt(0)))return!0;return!1}const Bn=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(n){this.pluginStatus=n.pluginStatus,this.pluginURL=n.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(n){if(Bn.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=n.applyArabicShaping,this.processBidirectionalText=n.processBidirectionalText,this.processStyledBidirectionalText=n.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(n,t){return a(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(n.pluginStatus!=="loading")return this.setState(n),n;const r=n.pluginURL,l=new Promise((m=>{this.loadScriptResolve=m}));t(r);const h=new Promise((m=>setTimeout((()=>m()),this.TIMEOUT)));if(yield Promise.race([l,h]),this.isParsed()){const m={pluginStatus:"loaded",pluginURL:r};return this.setState(m),m}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${r}`)}))}};class Oi{constructor(t,r){this.isSupportedScript=bu,this.zoom=t,r?(this.now=r.now||0,this.fadeDuration=r.fadeDuration||0,this.zoomHistory=r.zoomHistory||new Dl,this.transition=r.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Dl,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,r=t-Math.floor(t),l=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*l}:{fromScale:.5,toScale:1,t:1-(1-l)*r}}}function bu(n){return(function(t,r){for(const l of t)if(!Ep(l.charCodeAt(0),r))return!1;return!0})(n,Bn.getRTLTextPluginStatus()==="loaded")}class Fl{constructor(t,r,l){this.property=t,this.value=r,this.expression=(function(h,m,_){if(Pa(h))return new Ma(h,m);if(El(h)){const x=fp(h,m,_);if(x.result==="error")throw new Error(x.value.map((B=>`${B.key}: ${B.message}`)).join(", "));return x.value}{let x=h;return m.type==="color"&&typeof h=="string"?x=ri.parse(h):m.type!=="padding"||typeof h!="number"&&!Array.isArray(h)?m.type!=="numberArray"||typeof h!="number"&&!Array.isArray(h)?m.type!=="colorArray"||typeof h!="string"&&!Array.isArray(h)?m.type==="variableAnchorOffsetCollection"&&Array.isArray(h)?x=Nr.parse(h):m.type==="projectionDefinition"&&typeof h=="string"&&(x=Ar.parse(h)):x=nr.parse(h):x=Fr.parse(h):x=mr.parse(h),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>x}}})(r===void 0?t.specification.default:r,t.specification,l)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,r,l){return this.property.possiblyEvaluate(this,t,r,l)}}class xu{constructor(t,r){this.property=t,this.value=new Fl(t,void 0,r)}transitioned(t,r){return new wu(this.property,this.value,r,ut({},t.transition,this.transition),t.now)}untransitioned(){return new wu(this.property,this.value,null,{},0)}}class vu{constructor(t,r){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=r}getValue(t){return re(this._values[t].value.value)}setValue(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new xu(this._values[t].property,this._globalState)),this._values[t].value=new Fl(this._values[t].property,r===null?void 0:re(r),this._globalState)}getTransition(t){return re(this._values[t].transition)}setTransition(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new xu(this._values[t].property,this._globalState)),this._values[t].transition=re(r)||void 0}serialize(){const t={};for(const r of Object.keys(this._values)){const l=this.getValue(r);l!==void 0&&(t[r]=l);const h=this.getTransition(r);h!==void 0&&(t[`${r}-transition`]=h)}return t}transitioned(t,r){const l=new Bu(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].transitioned(t,r._values[h]);return l}untransitioned(){const t=new Bu(this._properties);for(const r of Object.keys(this._values))t._values[r]=this._values[r].untransitioned();return t}}class wu{constructor(t,r,l,h,m){this.property=t,this.value=r,this.begin=m+h.delay||0,this.end=this.begin+h.duration||0,t.specification.transition&&(h.delay||h.duration)&&(this.prior=l)}possiblyEvaluate(t,r,l){const h=t.now||0,m=this.value.possiblyEvaluate(t,r,l),_=this.prior;if(_){if(h>this.end)return this.prior=null,m;if(this.value.isDataDriven())return this.prior=null,m;if(h<this.begin)return _.possiblyEvaluate(t,r,l);{const x=(h-this.begin)/(this.end-this.begin);return this.property.interpolate(_.possiblyEvaluate(t,r,l),m,Ye(x))}}return m}}class Bu{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,r,l){const h=new Nl(this._properties);for(const m of Object.keys(this._values))h._values[m]=this._values[m].possiblyEvaluate(t,r,l);return h}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class Lf{constructor(t,r){this._properties=t,this._values=Object.create(t.defaultPropertyValues),this._globalState=r}hasValue(t){return this._values[t].value!==void 0}getValue(t){return re(this._values[t].value)}setValue(t,r){this._values[t]=new Fl(this._values[t].property,r===null?void 0:re(r),this._globalState)}serialize(){const t={};for(const r of Object.keys(this._values)){const l=this.getValue(r);l!==void 0&&(t[r]=l)}return t}possiblyEvaluate(t,r,l){const h=new Nl(this._properties);for(const m of Object.keys(this._values))h._values[m]=this._values[m].possiblyEvaluate(t,r,l);return h}}class Gn{constructor(t,r,l){this.property=t,this.value=r,this.parameters=l}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,r,l,h){return this.property.evaluate(this.value,this.parameters,t,r,l,h)}}class Nl{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class wt{constructor(t){this.specification=t}possiblyEvaluate(t,r){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(r)}interpolate(t,r,l){const h=Un[this.specification.type];return h?h(t,r,l):t}}class Mt{constructor(t,r){this.specification=t,this.overrides=r}possiblyEvaluate(t,r,l,h){return new Gn(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(r,null,{},l,h)}:t.expression,r)}interpolate(t,r,l){if(t.value.kind!=="constant"||r.value.kind!=="constant")return t;if(t.value.value===void 0||r.value.value===void 0)return new Gn(this,{kind:"constant",value:void 0},t.parameters);const h=Un[this.specification.type];if(h){const m=h(t.value.value,r.value.value,l);return new Gn(this,{kind:"constant",value:m},t.parameters)}return t}evaluate(t,r,l,h,m,_){return t.kind==="constant"?t.value:t.evaluate(r,l,h,m,_)}}class os extends Mt{possiblyEvaluate(t,r,l,h){if(t.value===void 0)return new Gn(this,{kind:"constant",value:void 0},r);if(t.expression.kind==="constant"){const m=t.expression.evaluate(r,null,{},l,h),_=t.property.specification.type==="resolvedImage"&&typeof m!="string"?m.name:m,x=this._calculate(_,_,_,r);return new Gn(this,{kind:"constant",value:x},r)}if(t.expression.kind==="camera"){const m=this._calculate(t.expression.evaluate({zoom:r.zoom-1}),t.expression.evaluate({zoom:r.zoom}),t.expression.evaluate({zoom:r.zoom+1}),r);return new Gn(this,{kind:"constant",value:m},r)}return new Gn(this,t.expression,r)}evaluate(t,r,l,h,m,_){if(t.kind==="source"){const x=t.evaluate(r,l,h,m,_);return this._calculate(x,x,x,r)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(r.zoom)-1},l,h),t.evaluate({zoom:Math.floor(r.zoom)},l,h),t.evaluate({zoom:Math.floor(r.zoom)+1},l,h),r):t.value}_calculate(t,r,l,h){return h.zoom>h.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:l,to:r}}interpolate(t){return t}}class Tu{constructor(t){this.specification=t}possiblyEvaluate(t,r,l,h){if(t.value!==void 0){if(t.expression.kind==="constant"){const m=t.expression.evaluate(r,null,{},l,h);return this._calculate(m,m,m,r)}return this._calculate(t.expression.evaluate(new Oi(Math.floor(r.zoom-1),r)),t.expression.evaluate(new Oi(Math.floor(r.zoom),r)),t.expression.evaluate(new Oi(Math.floor(r.zoom+1),r)),r)}}_calculate(t,r,l,h){return h.zoom>h.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:l,to:r}}interpolate(t){return t}}class $l{constructor(t){this.specification=t}possiblyEvaluate(t,r,l,h){return!!t.expression.evaluate(r,null,{},l,h)}interpolate(){return!1}}class $r{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in t){const l=t[r];l.specification.overridable&&this.overridableProperties.push(r);const h=this.defaultPropertyValues[r]=new Fl(l,void 0,void 0),m=this.defaultTransitionablePropertyValues[r]=new xu(l,void 0);this.defaultTransitioningPropertyValues[r]=m.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=h.possiblyEvaluate({})}}}ft("DataDrivenProperty",Mt),ft("DataConstantProperty",wt),ft("CrossFadedDataDrivenProperty",os),ft("CrossFadedProperty",Tu),ft("ColorRampProperty",$l);const Su="-transition";class Tn extends yt{constructor(t,r,l){if(super(),this.id=t.id,this.type=t.type,this._globalState=l,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=Qs(t.filter,l)),r.layout&&(this._unevaluatedLayout=new Lf(r.layout,l)),r.paint)){this._transitionablePaint=new vu(r.paint,l);for(const h in t.paint)this.setPaintProperty(h,t.paint[h],{validate:!1});for(const h in t.layout)this.setLayoutProperty(h,t.layout[h],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Nl(r.paint)}}setFilter(t){this.filter=t,this._featureFilter=Qs(t,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;if(this._unevaluatedLayout)for(const r in this._unevaluatedLayout._values){const l=this._unevaluatedLayout._values[r];for(const h of l.getGlobalStateRefs())t.add(h)}for(const r of this._featureFilter.getGlobalStateRefs())t.add(r);return t}getPaintAffectingGlobalStateRefs(){var t;const r=new globalThis.Map;if(this._transitionablePaint)for(const l in this._transitionablePaint._values){const h=this._transitionablePaint._values[l].value;for(const m of h.getGlobalStateRefs()){const _=(t=r.get(m))!==null&&t!==void 0?t:[];_.push({name:l,value:h.value}),r.set(m,_)}}return r}setLayoutProperty(t,r,l={}
92){r!=null&&this._validate(kf,`layers.${this.id}.layout.${t}`,t,r,l)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,r):this.visibility=r)}getPaintProperty(t){return t.endsWith(Su)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,r,l={}){if(r!=null&&this._validate(jf,`layers.${this.id}.paint.${t}`,t,r,l))return!1;if(t.endsWith(Su))return this._transitionablePaint.setTransition(t.slice(0,-11),r||void 0),!1;{const h=this._transitionablePaint._values[t],m=h.property.specification["property-type"]==="cross-faded-data-driven",_=h.value.isDataDriven(),x=h.value;this._transitionablePaint.setValue(t,r),this._handleSpecialPaintPropertyUpdate(t);const B=this._transitionablePaint._values[t].value;return B.isDataDriven()||_||m||this._handleOverridablePaintPropertyUpdate(t,x,B)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,r,l){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,r){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,r)}
vendor: 7,062 bytes, line 92
92serialize(){const t={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&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),Ht(t,((r,l)=>!(r===void 0||l==="layout"&&!Object.keys(r).length||l==="paint"&&!Object.keys(r).length)))}_validate(t,r,l,h,m={}){return(!m||m.validate!==!1)&&Ra(this,t.call(Fo,{key:r,layerType:this.type,objectKey:l,value:h,styleSpec:ye,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const r=this.paint.get(t);if(r instanceof Gn&&Os(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const zf={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Sn{constructor(t,r){this._structArray=t,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Li{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,r){return t._trim(),r&&(t.isTransferred=!0,r.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const r=Object.create(this.prototype);return r.arrayBuffer=t.arrayBuffer,r.length=t.length,r.capacity=t.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Vi(n,t=1){let r=0,l=0;return{members:n.map((h=>{const m=zf[h.type].BYTES_PER_ELEMENT,_=r=Ou(r,Math.max(t,m)),x=h.components||1;return l=Math.max(l,m),r+=m*x,{name:h.name,type:h.type,components:x,offset:_}})),size:Ou(r,Math.max(l,t)),alignment:t}}function Ou(n,t){return Math.ceil(n/t)*t}class ro extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r){const l=this.length;return this.resize(l+1),this.emplace(l,t,r)}emplace(t,r,l){const h=2*t;return this.int16[h+0]=r,this.int16[h+1]=l,t}}ro.prototype.bytesPerElement=4,ft("StructArrayLayout2i4",ro);class Ul extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l){const h=this.length;return this.resize(h+1),this.emplace(h,t,r,l)}emplace(t,r,l,h){const m=3*t;return this.int16[m+0]=r,this.int16[m+1]=l,this.int16[m+2]=h,t}}Ul.prototype.bytesPerElement=6,ft("StructArrayLayout3i6",Ul);class $o extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l,h){const m=this.length;return this.resize(m+1),this.emplace(m,t,r,l,h)}emplace(t,r,l,h,m){const _=4*t;return this.int16[_+0]=r,this.int16[_+1]=l,this.int16[_+2]=h,this.int16[_+3]=m,t}}$o.prototype.bytesPerElement=8,ft("StructArrayLayout4i8",$o);class no extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m,_){const x=this.length;return this.resize(x+1),this.emplace(x,t,r,l,h,m,_)}emplace(t,r,l,h,m,_,x){const B=6*t;return this.int16[B+0]=r,this.int16[B+1]=l,this.int16[B+2]=h,this.int16[B+3]=m,this.int16[B+4]=_,this.int16[B+5]=x,t}}no.prototype.bytesPerElement=12,ft("StructArrayLayout2i4i12",no);class Pu extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m,_){const x=this.length;return this.resize(x+1),this.emplace(x,t,r,l,h,m,_)}emplace(t,r,l,h,m,_,x){const B=4*t,O=8*t;return this.int16[B+0]=r,this.int16[B+1]=l,this.uint8[O+4]=h,this.uint8[O+5]=m,this.uint8[O+6]=_,this.uint8[O+7]=x,t}}Pu.prototype.bytesPerElement=8,ft("StructArrayLayout2i4ub8",Pu);class Uo extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r){const l=this.length;return this.resize(l+1),this.emplace(l,t,r)}emplace(t,r,l){const h=2*t;return this.float32[h+0]=r,this.float32[h+1]=l,t}}Uo.prototype.bytesPerElement=8,ft("StructArrayLayout2f8",Uo);class so extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m,_,x,B,O,P){const I=this.length;return this.resize(I+1),this.emplace(I,t,r,l,h,m,_,x,B,O,P)}emplace(t,r,l,h,m,_,x,B,O,P,I){const k=10*t;return this.uint16[k+0]=r,this.uint16[k+1]=l,this.uint16[k+2]=h,this.uint16[k+3]=m,this.uint16[k+4]=_,this.uint16[k+5]=x,this.uint16[k+6]=B,this.uint16[k+7]=O,this.uint16[k+8]=P,this.uint16[k+9]=I,t}}so.prototype.bytesPerElement=20,ft("StructArrayLayout10ui20",so);class Cu extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m,_,x,B,O,P,I,k){const z=this.length;return this.resize(z+1),this.emplace(z,t,r,l,h,m,_,x,B,O,P,I,k)}emplace(t,r,l,h,m,_,x,B,O,P,I,k,z){const N=12*t;return this.int16[N+0]=r,this.int16[N+1]=l,this.int16[N+2]=h,this.int16[N+3]=m,this.uint16[N+4]=_,this.uint16[N+5]=x,this.uint16[N+6]=B,this.uint16[N+7]=O,this.int16[N+8]=P,this.int16[N+9]=I,this.int16[N+10]=k,this.int16[N+11]=z,t}}Cu.prototype.bytesPerElement=24,ft("StructArrayLayout4i4ui4i24",Cu);class Eu extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,l){const h=this.length;return this.resize(h+1),this.emplace(h,t,r,l)}emplace(t,r,l,h){const m=3*t;return this.float32[m+0]=r,this.float32[m+1]=l,this.float32[m+2]=h,t}}Eu.prototype.bytesPerElement=12,ft("StructArrayLayout3f12",Eu);class Vl extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint32[1*t+0]=r,t}}Vl.prototype.bytesPerElement=4,ft("StructArrayLayout1ul4",Vl);class Mu extends Li{_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(t,r,l,h,m,_,x,B,O){const P=this.length;return this.resize(P+1),this.emplace(P,t,r,l,h,m,_,x,B,O)}emplace(t,r,l,h,m,_,x,B,O,P){const I=10*t,k=5*t;
vendor: 10,820 bytes, line 92
92return this.int16[I+0]=r,this.int16[I+1]=l,this.int16[I+2]=h,this.int16[I+3]=m,this.int16[I+4]=_,this.int16[I+5]=x,this.uint32[k+3]=B,this.uint16[I+8]=O,this.uint16[I+9]=P,t}}Mu.prototype.bytesPerElement=20,ft("StructArrayLayout6i1ul2ui20",Mu);class f extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m,_){const x=this.length;return this.resize(x+1),this.emplace(x,t,r,l,h,m,_)}emplace(t,r,l,h,m,_,x){const B=6*t;return this.int16[B+0]=r,this.int16[B+1]=l,this.int16[B+2]=h,this.int16[B+3]=m,this.int16[B+4]=_,this.int16[B+5]=x,t}}f.prototype.bytesPerElement=12,ft("StructArrayLayout2i2i2i12",f);class e extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m){const _=this.length;return this.resize(_+1),this.emplace(_,t,r,l,h,m)}emplace(t,r,l,h,m,_){const x=4*t,B=8*t;return this.float32[x+0]=r,this.float32[x+1]=l,this.float32[x+2]=h,this.int16[B+6]=m,this.int16[B+7]=_,t}}e.prototype.bytesPerElement=16,ft("StructArrayLayout2f1f2i16",e);class s extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,l,h,m,_){const x=this.length;return this.resize(x+1),this.emplace(x,t,r,l,h,m,_)}emplace(t,r,l,h,m,_,x){const B=16*t,O=4*t,P=8*t;return this.uint8[B+0]=r,this.uint8[B+1]=l,this.float32[O+1]=h,this.float32[O+2]=m,this.int16[P+6]=_,this.int16[P+7]=x,t}}s.prototype.bytesPerElement=16,ft("StructArrayLayout2ub2f2i16",s);class c extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,l){const h=this.length;return this.resize(h+1),this.emplace(h,t,r,l)}emplace(t,r,l,h){const m=3*t;return this.uint16[m+0]=r,this.uint16[m+1]=l,this.uint16[m+2]=h,t}}c.prototype.bytesPerElement=6,ft("StructArrayLayout3ui6",c);class p extends Li{_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(t,r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee){const _e=this.length;return this.resize(_e+1),this.emplace(_e,t,r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee)}emplace(t,r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee,_e){const oe=24*t,he=12*t,Be=48*t;return this.int16[oe+0]=r,this.int16[oe+1]=l,this.uint16[oe+2]=h,this.uint16[oe+3]=m,this.uint32[he+2]=_,this.uint32[he+3]=x,this.uint32[he+4]=B,this.uint16[oe+10]=O,this.uint16[oe+11]=P,this.uint16[oe+12]=I,this.float32[he+7]=k,this.float32[he+8]=z,this.uint8[Be+36]=N,this.uint8[Be+37]=Z,this.uint8[Be+38]=K,this.uint32[he+10]=ee,this.int16[oe+22]=_e,t}}p.prototype.bytesPerElement=48,ft("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",p);class g extends Li{_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(t,r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee,_e,oe,he,Be,Ee,Ve,it,Ke,et,Bt,Qe){const tt=this.length;return this.resize(tt+1),this.emplace(tt,t,r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee,_e,oe,he,Be,Ee,Ve,it,Ke,et,Bt,Qe)}emplace(t,r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee,_e,oe,he,Be,Ee,Ve,it,Ke,et,Bt,Qe,tt){const Le=32*t,Rt=16*t;return this.int16[Le+0]=r,this.int16[Le+1]=l,this.int16[Le+2]=h,this.int16[Le+3]=m,this.int16[Le+4]=_,this.int16[Le+5]=x,this.int16[Le+6]=B,this.int16[Le+7]=O,this.uint16[Le+8]=P,this.uint16[Le+9]=I,this.uint16[Le+10]=k,this.uint16[Le+11]=z,this.uint16[Le+12]=N,this.uint16[Le+13]=Z,this.uint16[Le+14]=K,this.uint16[Le+15]=ee,this.uint16[Le+16]=_e,this.uint16[Le+17]=oe,this.uint16[Le+18]=he,this.uint16[Le+19]=Be,this.uint16[Le+20]=Ee,this.uint16[Le+21]=Ve,this.uint16[Le+22]=it,this.uint32[Rt+12]=Ke,this.float32[Rt+13]=et,this.float32[Rt+14]=Bt,this.uint16[Le+30]=Qe,this.uint16[Le+31]=tt,t}}g.prototype.bytesPerElement=64,ft("StructArrayLayout8i15ui1ul2f2ui64",g);class b extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.float32[1*t+0]=r,t}}b.prototype.bytesPerElement=4,ft("StructArrayLayout1f4",b);class T extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,l){const h=this.length;return this.resize(h+1),this.emplace(h,t,r,l)}emplace(t,r,l,h){const m=3*t;return this.uint16[6*t+0]=r,this.float32[m+1]=l,this.float32[m+2]=h,t}}T.prototype.bytesPerElement=12,ft("StructArrayLayout1ui2f12",T);class S extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,l){const h=this.length;return this.resize(h+1),this.emplace(h,t,r,l)}emplace(t,r,l,h){const m=4*t;return this.uint32[2*t+0]=r,this.uint16[m+2]=l,this.uint16[m+3]=h,t}}S.prototype.bytesPerElement=8,ft("StructArrayLayout1ul2ui8",S);class C extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r){const l=this.length;return this.resize(l+1),this.emplace(l,t,r)}emplace(t,r,l){const h=2*t;return this.uint16[h+0]=r,this.uint16[h+1]=l,t}}C.prototype.bytesPerElement=4,ft("StructArrayLayout2ui4",C);class E extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint16[1*t+0]=r,t}}E.prototype.bytesPerElement=2,ft("StructArrayLayout1ui2",E);class j extends Li{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,l,h){const m=this.length;return this.resize(m+1),this.emplace(m,t,r,l,h)}emplace(t,r,l,h,m){const _=4*t;return this.float32[_+0]=r,this.float32[_+1]=l,this.float32[_+2]=h,this.float32[_+3]=m,t}}j.prototype.bytesPerElement=16,ft("StructArrayLayout4f16",j);class A extends Sn{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 M(this.anchorPointX,this.anchorPointY)}}A.prototype.size=20;class R extends Mu{get(t){return new A(this,t)}}ft("CollisionBoxArray",R);class V extends Sn{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}V.prototype.size=48;class Y extends p{get(t){return new V(this,t)}}ft("PlacedSymbolArray",Y);class X extends Sn{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(t){this._structArray.uint32[this._pos4+12]=t}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]}}X.prototype.size=64;class J extends g{get(t){return new X(this,t)}}ft("SymbolInstanceArray",J);class Q extends b{getoffsetX(t){return this.float32[1*t+0]}}ft("GlyphOffsetArray",Q);
vendor: 8,443 bytes, line 92
92class ne extends Ul{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}ft("SymbolLineVertexArray",ne);class te extends Sn{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]}}te.prototype.size=12;class le extends T{get(t){return new te(this,t)}}ft("TextAnchorOffsetArray",le);class pe extends Sn{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]}}pe.prototype.size=8;class ie extends S{get(t){return new pe(this,t)}}ft("FeatureIndexArray",ie);class me extends ro{}class Oe extends ro{}class ve extends ro{}class we extends no{}class Se extends Pu{}class Je extends Uo{}class Ze extends so{}class $e extends Cu{}class bt extends Eu{}class Xt extends Vl{}class mi extends f{}class zi extends s{}class gi extends c{}class Ai extends C{}const Gi=Vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Mi}=Gi;class Vt{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,r,l,h){const m=this.segments[this.segments.length-1];return t>Vt.MAX_VERTEX_ARRAY_LENGTH&&be(`Max vertices per segment is ${Vt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Vt.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!m||m.vertexLength+t>Vt.MAX_VERTEX_ARRAY_LENGTH||m.sortKey!==h?this.createNewSegment(r,l,h):m}createNewSegment(t,r,l){const h={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return l!==void 0&&(h.sortKey=l),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(h),h}getOrCreateLatestSegment(t,r,l){return this.prepareSegment(0,t,r,l)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,l,h){return new Vt([{vertexOffset:t,primitiveOffset:r,vertexLength:l,primitiveLength:h,vaos:{},sortKey:0}])}}function _r(n,t){return 256*(n=At(Math.floor(n),0,255))+At(Math.floor(t),0,255)}Vt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ft("SegmentVector",Vt);const er=Vi([{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 yr,Ur,Cs,On={exports:{}},Es={exports:{}},oo={exports:{}},Gl=(function(){if(Cs)return On.exports;Cs=1;var n=(yr||(yr=1,Es.exports=function(r,l){var h,m,_,x,B,O,P,I;for(m=r.length-(h=3&r.length),_=l,B=3432918353,O=461845907,I=0;I<m;)P=255&r.charCodeAt(I)|(255&r.charCodeAt(++I))<<8|(255&r.charCodeAt(++I))<<16|(255&r.charCodeAt(++I))<<24,++I,_=27492+(65535&(x=5*(65535&(_=(_^=P=(65535&(P=(P=(65535&P)*B+(((P>>>16)*B&65535)<<16)&4294967295)<<15|P>>>17))*O+(((P>>>16)*O&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(P=0,h){case 3:P^=(255&r.charCodeAt(I+2))<<16;case 2:P^=(255&r.charCodeAt(I+1))<<8;case 1:_^=P=(65535&(P=(P=(65535&(P^=255&r.charCodeAt(I)))*B+(((P>>>16)*B&65535)<<16)&4294967295)<<15|P>>>17))*O+(((P>>>16)*O&65535)<<16)&4294967295}return _^=r.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0}),Es.exports),t=(Ur||(Ur=1,oo.exports=function(r,l){for(var h,m=r.length,_=l^m,x=0;m>=4;)h=1540483477*(65535&(h=255&r.charCodeAt(x)|(255&r.charCodeAt(++x))<<8|(255&r.charCodeAt(++x))<<16|(255&r.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)),m-=4,++x;switch(m){case 3:_^=(255&r.charCodeAt(x+2))<<16;case 2:_^=(255&r.charCodeAt(x+1))<<8;case 1:_=1540483477*(65535&(_^=255&r.charCodeAt(x)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0}),oo.exports);return On.exports=n,On.exports.murmur3=n,On.exports.murmur2=t,On.exports})(),Vo=D(Gl);class as{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,l,h){this.ids.push(nn(t)),this.positions.push(r,l,h)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=nn(t);let l=0,h=this.ids.length-1;for(;l<h;){const _=l+h>>1;this.ids[_]>=r?h=_:l=_+1}const m=[];for(;this.ids[l]===r;)m.push({index:this.positions[3*l],start:this.positions[3*l+1],end:this.positions[3*l+2]}),l++;return m}static serialize(t,r){const l=new Float64Array(t.ids),h=new Uint32Array(t.positions);return Hn(l,h,0,l.length-1),r&&r.push(l.buffer,h.buffer),{ids:l,positions:h}}static deserialize(t){const r=new as;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}}function nn(n){const t=+n;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Vo(String(n))}function Hn(n,t,r,l){for(;r<l;){const h=n[r+l>>1];let m=r-1,_=l+1;for(;;){do m++;while(n[m]<h);do _--;while(n[_]>h);if(m>=_)break;Zn(n,m,_),Zn(t,3*m,3*_),Zn(t,3*m+1,3*_+1),Zn(t,3*m+2,3*_+2)}_-r<l-_?(Hn(n,t,r,_),r=_+1):(Hn(n,t,_+1,l),l=_)}}function Zn(n,t,r){const l=n[t];n[t]=n[r],n[r]=l}ft("FeaturePositionMap",as);class sn{constructor(t,r){this.gl=t.gl,this.location=r}}class Ji extends sn{constructor(t,r){super(t,r),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class ur extends sn{constructor(t,r){super(t,r),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class on extends sn{constructor(t,r){super(t,r),this.current=ri.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const br=new Float32Array(16);function Iu(n){return[_r(255*n.r,255*n.g),_r(255*n.b,255*n.a)]}class La{constructor(t,r,l){this.value=t,this.uniformNames=r.map((h=>`u_${h}`)),this.type=l}setUniform(t,r,l){t.set(l.constantOr(this.value))}getBinding(t,r,l){return this.type==="color"?new on(t,r):new Ji(t,r)}}class Go{constructor(t,r){this.uniformNames=r.map((l=>`u_${l}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=t.tlbr}setUniform(t,r,l,h){const m=h==="u_pattern_to"?this.patternTo:h==="u_pattern_from"?this.patternFrom:h==="u_pixel_ratio_to"?this.pixelRatioTo:h==="u_pixel_ratio_from"?this.pixelRatioFrom:null;m&&t.set(m)}getBinding(t,r,l){return l.substr(0,9)==="u_pattern"?new ur(t,r):new Ji(t,r)}}class ls{constructor(t,r,l,h){this.expression=t,this.type=l,this.maxValue=0,this.paintVertexAttributes=r.map((m=>({name:`a_${m}`,type:"Float32",components:l==="color"?2:1,offset:0}))),this.paintVertexArray=new h}populatePaintArray(t,r,l){const h=this.paintVertexArray.length,m=this.expression.evaluate(new Oi(0,l),r,{},l.canonical,[],l.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(h,t,m)}updatePaintArray(t,r,l,h,m){const _=this.expression.evaluate(new Oi(0,m),l,h);this._setPaintValue(t,r,_)}_setPaintValue(t,r,l){if(this.type==="color"){const h=Iu(l);for(let m=t;m<r;m++)this.paintVertexArray.emplace(m,h[0],h[1])}else{for(let h=t;h<r;h++)this.paintVertexArray.emplace(h,l);this.maxValue=Math.max(this.maxValue,Math.abs(l))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Pn{constructor(t,r,l,h,m,_){this.expression=t,this.uniformNames=r.map((x=>`u_${x}_t`)),this.type=l,this.useIntegerZoom=h,this.zoom=m,this.maxValue=0,this.paintVertexAttributes=r.map((x=>({name:`a_${x}
92`,type:"Float32",components:l==="color"?4:2,offset:0}))),this.paintVertexArray=new _}populatePaintArray(t,r,l){const h=this.expression.evaluate(new Oi(this.zoom,l),r,{},l.canonical,[],l.formattedSection),m=this.expression.evaluate(new Oi(this.zoom+1,l),r,{},l.canonical,[],l.formattedSection),_=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(_,t,h,m)}updatePaintArray(t,r,l,h,m){const _=this.expression.evaluate(new Oi(this.zoom,m),l,h),x=this.expression.evaluate(new Oi(this.zoom+1,m),l,h);this._setPaintValue(t,r,_,x)}_setPaintValue(t,r,l,h){if(this.type==="color"){const m=Iu(l),_=Iu(h);for(let x=t;x<r;x++)this.paintVertexArray.emplace(x,m[0],m[1],_[0],_[1])}else{for(let m=t;m<r;m++)this.paintVertexArray.emplace(m,l,h);this.maxValue=Math.max(this.maxValue,Math.abs(l),Math.abs(h))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,r){const l=this.useIntegerZoom?Math.floor(r.zoom):r.zoom,h=At(this.expression.interpolationFactor(l,this.zoom,this.zoom+1),0,1);t.set(h)}getBinding(t,r,l){return new Ji(t,r)}}class Ms{constructor(t,r,l,h,m,_){this.expression=t,this.type=r,this.useIntegerZoom=l,this.zoom=h,this.layerId=_,this.zoomInPaintVertexArray=new m,this.zoomOutPaintVertexArray=new m}populatePaintArray(t,r,l){const h=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(h,t,r.patterns&&r.patterns[this.layerId],l.imagePositions)}updatePaintArray(t,r,l,h,m){this._setPaintValues(t,r,l.patterns&&l.patterns[this.layerId],m.imagePositions)}_setPaintValues(t,r,l,h){if(!h||!l)return;const{min:m,mid:_,max:x}=l,B=h[m],O=h[_],P=h[x];if(B&&O&&P)for(let I=t;I<r;I++)this.zoomInPaintVertexArray.emplace(I,O.tl[0],O.tl[1],O.br[0],O.br[1],B.tl[0],B.tl[1],B.br[0],B.br[1],O.pixelRatio,B.pixelRatio),this.zoomOutPaintVertexArray.emplace(I,O.tl[0],O.tl[1],O.br[0],O.br[1],P.tl[0],P.tl[1],P.br[0],P.br[1],O.pixelRatio,P.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,er.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,er.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Is{constructor(t,r,l){this.binders={},this._buffers=[];const h=[];for(const m in t.paint._values){if(!l(m))continue;const _=t.paint.get(m);if(!(_ instanceof Gn&&Os(_.property.specification)))continue;const x=Ip(m,t.type),B=_.value,O=_.property.specification.type,P=_.property.useIntegerZoom,I=_.property.specification["property-type"],k=I==="cross-faded"||I==="cross-faded-data-driven";if(B.kind==="constant")this.binders[m]=k?new Go(B.value,x):new La(B.value,x,O),h.push(`/u_${m}`);else if(B.kind==="source"||k){const z=Au(m,O,"source");this.binders[m]=k?new Ms(B,O,P,r,z,t.id):new ls(B,x,O,z),h.push(`/a_${m}`)}else{const z=Au(m,O,"composite");this.binders[m]=new Pn(B,x,O,P,r,z),h.push(`/z_${m}`)}}this.cacheKey=h.sort().join("")}getMaxValue(t){const r=this.binders[t];return r instanceof ls||r instanceof Pn?r.maxValue:0}populatePaintArrays(t,r,l){for(const h in this.binders){const m=this.binders[h];(m instanceof ls||m instanceof Pn||m instanceof Ms)&&m.populatePaintArray(t,r,l)}}setConstantPatternPositions(t,r){for(const l in this.binders){const h=this.binders[l];h instanceof Go&&h.setConstantPatternPositions(t,r)}}updatePaintArrays(t,r,l,h,m){let _=!1;for(const x in t){const B=r.getPositions(x);for(const O of B){const P=l.feature(O.index);for(const I in this.binders){const k=this.binders[I];if((k instanceof ls||k instanceof Pn||k instanceof Ms)&&k.expression.isStateDependent===!0){const z=h.paint.get(I);k.expression=z.value,k.updatePaintArray(O.start,O.end,P,t[x],m),_=!0}}}}return _}defines(){const t=[];for(const r in this.binders){const l=this.binders[r];(l instanceof La||l instanceof Go)&&t.push(...l.uniformNames.map((h=>`#define HAS_UNIFORM_${h}`)))}return t}getBinderAttributes(){const t=[];for(const r in this.binders){const l=this.binders[r];
vendor: 224,814 bytes, line 92
92if(l instanceof ls||l instanceof Pn)for(let h=0;h<l.paintVertexAttributes.length;h++)t.push(l.paintVertexAttributes[h].name);else if(l instanceof Ms)for(let h=0;h<er.members.length;h++)t.push(er.members[h].name)}return t}getBinderUniforms(){const t=[];for(const r in this.binders){const l=this.binders[r];if(l instanceof La||l instanceof Go||l instanceof Pn)for(const h of l.uniformNames)t.push(h)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,r){const l=[];for(const h in this.binders){const m=this.binders[h];if(m instanceof La||m instanceof Go||m instanceof Pn){for(const _ of m.uniformNames)if(r[_]){const x=m.getBinding(t,r[_],_);l.push({name:_,property:h,binding:x})}}}return l}setUniforms(t,r,l,h){for(const{name:m,property:_,binding:x}of r)this.binders[_].setUniform(x,h,l.get(_),m)}updatePaintBuffers(t){this._buffers=[];for(const r in this.binders){const l=this.binders[r];if(t&&l instanceof Ms){const h=t.fromScale===2?l.zoomInPaintVertexBuffer:l.zoomOutPaintVertexBuffer;h&&this._buffers.push(h)}else(l instanceof ls||l instanceof Pn)&&l.paintVertexBuffer&&this._buffers.push(l.paintVertexBuffer)}}upload(t){for(const r in this.binders){const l=this.binders[r];(l instanceof ls||l instanceof Pn||l instanceof Ms)&&l.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const r=this.binders[t];(r instanceof ls||r instanceof Pn||r instanceof Ms)&&r.destroy()}}}class As{constructor(t,r,l=()=>!0){this.programConfigurations={};for(const h of t)this.programConfigurations[h.id]=new Is(h,r,l);this.needsUpload=!1,this._featureMap=new as,this._bufferOffset=0}populatePaintArrays(t,r,l,h){for(const m in this.programConfigurations)this.programConfigurations[m].populatePaintArrays(t,r,h);r.id!==void 0&&this._featureMap.add(r.id,l,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,r,l,h){for(const m of l)this.needsUpload=this.programConfigurations[m.id].updatePaintArrays(t,this._featureMap,r,m,h)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function Ip(n,t){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"]}[n]||[n.replace(`${t}-`,"").replace(/-/g,"_")]}function Au(n,t,r){const l={color:{source:Uo,composite:j},number:{source:b,composite:Uo}},h=(function(m){return{"line-pattern":{source:Ze,composite:Ze},"fill-pattern":{source:Ze,composite:Ze},"fill-extrusion-pattern":{source:Ze,composite:Ze}}[m]})(n);return h&&h[r]||l[t][r]}ft("ConstantBinder",La),ft("CrossFadedConstantBinder",Go),ft("SourceExpressionBinder",ls),ft("CrossFadedCompositeBinder",Ms),ft("CompositeExpressionBinder",Pn),ft("ProgramConfiguration",Is,{omit:["_buffers"]}),ft("ProgramConfigurationSet",As);const za=Math.pow(2,14)-1,ju=-za-1;function cs(n){const t=Ft/n.extent,r=n.loadGeometry();for(let l=0;l<r.length;l++){const h=r[l];for(let m=0;m<h.length;m++){const _=h[m],x=Math.round(_.x*t),B=Math.round(_.y*t);_.x=At(x,ju,za),_.y=At(B,ju,za),(x<_.x||x>_.x+1||B<_.y||B>_.y+1)&&be("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Fa(n,t){return{type:n.type,id:n.id,properties:n.properties,geometry:t?cs(n):[]}}const Rg=-32768;function _x(n,t,r,l,h){n.emplaceBack(Rg+8*t+l,Rg+8*r+h)}class Ff{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Oe,this.indexArray=new gi,this.segments=new Vt,this.programConfigurations=new As(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,l){const h=this.layers[0],m=[];let _=null,x=!1,B=h.type==="heatmap";if(h.type==="circle"){const P=h;_=P.layout.get("circle-sort-key"),x=!_.isConstant(),B=B||P.paint.get("circle-pitch-alignment")==="map"}const O=B?r.subdivisionGranularity.circle:1;for(const{feature:P,id:I,index:k,sourceLayerIndex:z}of t){const N=this.layers[0]._featureFilter.needGeometry,Z=Fa(P,N);if(!this.layers[0]._featureFilter.filter(new Oi(this.zoom),Z,l))continue;const K=x?_.evaluate(Z,{},l):void 0,ee={id:I,properties:P.properties,type:P.type,sourceLayerIndex:z,index:k,geometry:N?Z.geometry:cs(P),patterns:{},sortKey:K};m.push(ee)}x&&m.sort(((P,I)=>P.sortKey-I.sortKey));for(const P of m){const{geometry:I,index:k,sourceLayerIndex:z}=P,N=t[k].feature;this.addFeature(P,I,k,l,O),r.featureIndex.insert(N,I,k,z,this.index)}}update(t,r,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,{imagePositions:l})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Mi),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,r,l,h,m=1){let _;switch(m){case 1:_=[0,7];break;case 3:_=[0,2,5,7];break;case 5:_=[0,1,3,4,6,7];break;case 7:_=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${m}; valid values are 1, 3, 5, 7.`)}const x=_.length;for(const B of r)for(const O of B){const P=O.x,I=O.y;if(P<0||P>=Ft||I<0||I>=Ft)continue;const k=this.segments.prepareSegment(x*x,this.layoutVertexArray,this.indexArray,t.sortKey),z=k.vertexLength;for(let N=0;N<x;N++)for(let Z=0;Z<x;Z++)_x(this.layoutVertexArray,P,I,_[Z],_[N]);for(let N=0;N<x-1;N++)for(let Z=0;Z<x-1;Z++){const K=z+N*x+Z,ee=z+(N+1)*x+Z;this.indexArray.emplaceBack(K,ee+1,K+1),this.indexArray.emplaceBack(K,ee,ee+1)}k.vertexLength+=x*x,k.primitiveLength+=(x-1)*(x-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:{},canonical:h})}}function Dg(n,t){for(let r=0;r<n.length;r++)if(Hl(t,n[r]))return!0;for(let r=0;r<t.length;r++)if(Hl(n,t[r]))return!0;return!!Nf(n,t)}function Ap(n,t,r){return!!Hl(n,t)||!!$f(t,n,r)}function Lg(n,t){if(n.length===1)return Fg(t,n[0]);for(let r=0;r<t.length;r++){const l=t[r];for(let h=0;h<l.length;h++)if(Hl(n,l[h]))return!0}for(let r=0;r<n.length;r++)if(Fg(t,n[r]))return!0;for(let r=0;r<t.length;r++)if(Nf(n,t[r]))return!0;return!1}function yx(n,t,r){if(n.length>1){if(Nf(n,t))return!0;for(let l=0;l<t.length;l++)if($f(t[l],n,r))return!0}for(let l=0;l<n.length;l++)if($f(n[l],t,r))return!0;return!1}function Nf(n,t){if(n.length===0||t.length===0)return!1;for(let r=0;r<n.length-1;r++){const l=n[r],h=n[r+1];for(let m=0;m<t.length-1;m++)if(bx(l,h,t[m],t[m+1]))return!0}return!1}function bx(n,t,r,l){return Fe(n,r,l)!==Fe(t,r,l)&&Fe(n,t,r)!==Fe(n,t,l)}function $f(n,t,r){const l=r*r;if(t.length===1)return n.distSqr(t[0])<l;for(let h=1;h<t.length;h++)if(zg(n,t[h-1],t[h])<l)return!0;return!1}function zg(n,t,r){const l=t.distSqr(r);if(l===0)return n.distSqr(t);const h=((n.x-t.x)*(r.x-t.x)+(n.y-t.y)*(r.y-t.y))/l;return n.distSqr(h<0?t:h>1?r:r.sub(t)._mult(h)._add(t))}function Fg(n,t){let r,l,h,m=!1;for(let _=0;_<n.length;_++){r=n[_];for(let x=0,B=r.length-1;x<r.length;B=x++)l=r[x],h=r[B],l.y>t.y!=h.y>t.y&&t.x<(h.x-l.x)*(t.y-l.y)/(h.y-l.y)+l.x&&(m=!m)}return m}function Hl(n,t){let r=!1;for(let l=0,h=n.length-1;l<n.length;h=l++){const m=n[l],_=n[h];m.y>t.y!=_.y>t.y&&t.x<(_.x-m.x)*(t.y-m.y)/(_.y-m.y)+m.x&&(r=!r)}return r}function xx(n,t,r){const l=r[0],h=r[2];if(n.x<l.x&&t.x<l.x||n.x>h.x&&t.x>h.x||n.y<l.y&&t.y<l.y||n.y>h.y&&t.y>h.y)return!1;const m=Fe(n,t,r[0]);return m!==Fe(n,t,r[1])||m!==Fe(n,t,r[2])||m!==Fe(n,t,r[3])}function Zl(n,t,r){const l=t.paint.get(n).value;return l.kind==="constant"?l.value:r.programConfigurations.get(t.id).getMaxValue(n)}function jp(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function kp(n,t,r,l,h){if(!t[0]&&!t[1])return n;const m=M.convert(t)._mult(h);r==="viewport"&&m._rotate(-l);const _=[];for(let x=0;x<n.length;x++)_.push(n[x].sub(m));return _}function vx({queryGeometry:n,size:t},r){return Ap(n,r,t)}function wx({queryGeometry:n,size:t,transform:r,unwrappedTileID:l,getElevation:h},m){return Ap(n,m,t*(r.projectTileCoordinates(m.x,m.y,l,h).signedDistanceFromCamera/r.cameraToCenterDistance))}function Bx({queryGeometry:n,size:t,transform:r,unwrappedTileID:l,getElevation:h},m){const _=r.projectTileCoordinates(m.x,m.y,l,h).signedDistanceFromCamera,x=t*(r.cameraToCenterDistance/_);return Ap(n,Uf(m,r,l,h),x)}function Tx({queryGeometry:n,size:t,transform:r,unwrappedTileID:l,getElevation:h},m){return Ap(n,Uf(m,r,l,h),t)}function Ng({queryGeometry:n,size:t,transform:r,unwrappedTileID:l,getElevation:h,pitchAlignment:m="map",pitchScale:_="map"},x){const B=m==="map"?_==="map"?vx:wx:_==="map"?Bx:Tx,O={queryGeometry:n,size:t,transform:r,unwrappedTileID:l,getElevation:h};for(const P of x)for(const I of P)if(B(O,I))return!0;return!1}function Uf(n,t,r,l){const h=t.projectTileCoordinates(n.x,n.y,r,l).point;return new M((.5*h.x+.5)*t.width,(.5*-h.y+.5)*t.height)}let $g,Ug;ft("CircleBucket",Ff,{omit:["layers"]});var Sx={get paint(){return Ug=Ug||new $r({"circle-radius":new Mt(ye.paint_circle["circle-radius"]),"circle-color":new Mt(ye.paint_circle["circle-color"]),"circle-blur":new Mt(ye.paint_circle["circle-blur"]),"circle-opacity":new Mt(ye.paint_circle["circle-opacity"]),"circle-translate":new wt(ye.paint_circle["circle-translate"]),"circle-translate-anchor":new wt(ye.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new wt(ye.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new wt(ye.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Mt(ye.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Mt(ye.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Mt(ye.paint_circle["circle-stroke-opacity"])})},get layout(){return $g=$g||new $r({"circle-sort-key":new Mt(ye.layout_circle["circle-sort-key"])})}};class Ox extends Tn{constructor(t,r){super(t,Sx,r)}createBucket(t){return new Ff(t)}queryRadius(t){const r=t;return Zl("circle-radius",this,r)+Zl("circle-stroke-width",this,r)+jp(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:l,geometry:h,transform:m,pixelsToTileUnits:_,unwrappedTileID:x,getElevation:B}){const O=kp(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-m.bearingInRadians,_),P=this.paint.get("circle-radius").evaluate(r,l)+this.paint.get("circle-stroke-width").evaluate(r,l),I=this.paint.get("circle-pitch-scale"),k=this.paint.get("circle-pitch-alignment");let z,N;return k==="map"?(z=O,N=P*_):(z=(function(Z,K,ee,_e){return Z.map((oe=>Uf(oe,K,ee,_e)))})(O,m,x,B),N=P),Ng({queryGeometry:z,size:N,transform:m,unwrappedTileID:x,getElevation:B,pitchAlignment:k,pitchScale:I},h)}}class Vg extends Ff{}let Gg;ft("HeatmapBucket",Vg,{omit:["layers"]});var Px={get paint(){return Gg=Gg||new $r({"heatmap-radius":new Mt(ye.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Mt(ye.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new wt(ye.paint_heatmap["heatmap-intensity"]),"heatmap-color":new $l(ye.paint_heatmap["heatmap-color"]),"heatmap-opacity":new wt(ye.paint_heatmap["heatmap-opacity"])})}};function Vf(n,{width:t,height:r},l,h){if(h){if(h instanceof Uint8ClampedArray)h=new Uint8Array(h.buffer);else if(h.length!==t*r*l)throw new RangeError(`mismatched image size. expected: ${h.length} but got: ${t*r*l}`)}else h=new Uint8Array(t*r*l);return n.width=t,n.height=r,n.data=h,n}function Hg(n,{width:t,height:r},l){if(t===n.width&&r===n.height)return;const h=Vf({},{width:t,height:r},l);Gf(n,h,{x:0,y:0},{x:0,y:0},{width:Math.min(n.width,t),height:Math.min(n.height,r)},l),n.width=t,n.height=r,n.data=h.data}function Gf(n,t,r,l,h,m){if(h.width===0||h.height===0)return t;if(h.width>n.width||h.height>n.height||r.x>n.width-h.width||r.y>n.height-h.height)throw new RangeError("out of range source coordinates for image copy");if(h.width>t.width||h.height>t.height||l.x>t.width-h.width||l.y>t.height-h.height)throw new RangeError("out of range destination coordinates for image copy");const _=n.data,x=t.data;if(_===x)throw new Error("srcData equals dstData, so image is already copied");for(let B=0;B<h.height;B++){const O=((r.y+B)*n.width+r.x)*m,P=((l.y+B)*t.width+l.x)*m;for(let I=0;I<h.width*m;I++)x[P+I]=_[O+I]}return t}class ku{constructor(t,r){Vf(this,t,1,r)}resize(t){Hg(this,t,1)}clone(){return new ku({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,l,h,m){Gf(t,r,l,h,m,1)}}class an{constructor(t,r){Vf(this,t,4,r)}resize(t){Hg(this,t,4)}replace(t,r){r?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new an({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,l,h,m){Gf(t,r,l,h,m,4)}setPixel(t,r,l){const h=4*(t*this.width+r);this.data[h+0]=Math.round(255*l.r/l.a),this.data[h+1]=Math.round(255*l.g/l.a),this.data[h+2]=Math.round(255*l.b/l.a),this.data[h+3]=Math.round(255*l.a)}}function Zg(n){const t={},r=n.resolution||256,l=n.clips?n.clips.length:1,h=n.image||new an({width:r,height:l});if(Math.log(r)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${r}`);const m=(_,x,B)=>{t[n.evaluationKey]=B;const O=n.expression.evaluate(t);h.setPixel(_/4/r,x/4,O)};if(n.clips)for(let _=0,x=0;_<l;++_,x+=4*r)for(let B=0,O=0;B<r;B++,O+=4){const P=B/(r-1),{start:I,end:k}=n.clips[_];m(x,O,I*(1-P)+k*P)}else for(let _=0,x=0;_<r;_++,x+=4)m(0,x,_/(r-1));return h}ft("AlphaImage",ku),ft("RGBAImage",an);const Hf="big-fb";class Cx extends Tn{createBucket(t){return new Vg(t)}constructor(t,r){super(t,Px,r),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Zg({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Hf)&&this.heatmapFbos.delete(Hf)}queryRadius(t){return Zl("heatmap-radius",this,t)}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:l,geometry:h,transform:m,pixelsToTileUnits:_,unwrappedTileID:x,getElevation:B}){return Ng({queryGeometry:t,size:this.paint.get("heatmap-radius").evaluate(r,l)*_,transform:m,unwrappedTileID:x,getElevation:B},h)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let qg;var Ex={get paint(){return qg=qg||new $r({"hillshade-illumination-direction":new wt(ye.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new wt(ye.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new wt(ye.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new wt(ye.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new wt(ye.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new wt(ye.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new wt(ye.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new wt(ye.paint_hillshade["hillshade-method"])})}};class Mx extends Tn{constructor(t,r){super(t,Ex,r),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,r=this.paint.get("hillshade-illumination-altitude").values,l=this.paint.get("hillshade-highlight-color").values,h=this.paint.get("hillshade-shadow-color").values;const m=Math.max(t.length,r.length,l.length,h.length);t=t.concat(Array(m-t.length).fill(t.at(-1))),r=r.concat(Array(m-r.length).fill(r.at(-1))),l=l.concat(Array(m-l.length).fill(l.at(-1))),h=h.concat(Array(m-h.length).fill(h.at(-1)));const _=r.map(Ot);return{directionRadians:t.map(Ot),altitudeRadians:_,shadowColor:h,highlightColor:l}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let Wg;var Ix={get paint(){return Wg=Wg||new $r({"color-relief-opacity":new wt(ye["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new $l(ye["paint_color-relief"]["color-relief-color"])})}};class Zf{constructor(t,r,l,h){this.context=t,this.format=l,this.texture=t.gl.createTexture(),this.update(r,h)}update(t,r,l){const{width:h,height:m}=t,_=!(this.size&&this.size[0]===h&&this.size[1]===m||l),{context:x}=this,{gl:B}=x;if(this.useMipmap=!!(r&&r.useMipmap),B.bindTexture(B.TEXTURE_2D,this.texture),x.pixelStoreUnpackFlipY.set(!1),x.pixelStoreUnpack.set(1),x.pixelStoreUnpackPremultiplyAlpha.set(this.format===B.RGBA&&(!r||r.premultiply!==!1)),_)this.size=[h,m],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||ht(t)?B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,B.UNSIGNED_BYTE,t):B.texImage2D(B.TEXTURE_2D,0,this.format,h,m,0,this.format,B.UNSIGNED_BYTE,t.data);else{const{x:O,y:P}=l||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||ht(t)?B.texSubImage2D(B.TEXTURE_2D,0,O,P,B.RGBA,B.UNSIGNED_BYTE,t):B.texSubImage2D(B.TEXTURE_2D,0,O,P,h,m,B.RGBA,B.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&B.generateMipmap(B.TEXTURE_2D),x.pixelStoreUnpackFlipY.setDefault(),x.pixelStoreUnpack.setDefault(),x.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(t,r,l){const{context:h}=this,{gl:m}=h;m.bindTexture(m.TEXTURE_2D,this.texture),l!==m.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(l=m.LINEAR),t!==this.filter&&(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,t),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,l||t),this.filter=t),r!==this.wrap&&(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,r),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,r),this.wrap=r)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}class Kg{constructor(t,r,l,h=1,m=1,_=1,x=0){if(this.uid=t,r.height!==r.width)throw new RangeError("DEM tiles must be square");if(l&&!["mapbox","terrarium","custom"].includes(l))return void be(`"${l}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=r.height;const B=this.dim=r.height-2;switch(this.data=new Uint32Array(r.data.buffer),l){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=h,this.greenFactor=m,this.blueFactor=_,this.baseShift=x;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let O=0;O<B;O++)this.data[this._idx(-1,O)]=this.data[this._idx(0,O)],this.data[this._idx(B,O)]=this.data[this._idx(B-1,O)],this.data[this._idx(O,-1)]=this.data[this._idx(O,0)],this.data[this._idx(O,B)]=this.data[this._idx(O,B-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(B,-1)]=this.data[this._idx(B-1,0)],this.data[this._idx(-1,B)]=this.data[this._idx(0,B-1)],this.data[this._idx(B,B)]=this.data[this._idx(B-1,B-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let O=0;O<B;O++)for(let P=0;P<B;P++){const I=this.get(O,P);I>this.max&&(this.max=I),I<this.min&&(this.min=I)}}get(t,r){const l=new Uint8Array(this.data.buffer),h=4*this._idx(t,r);return this.unpack(l[h],l[h+1],l[h+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,r){if(t<-1||t>=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(t+1)}unpack(t,r,l){return t*this.redFactor+r*this.greenFactor+l*this.blueFactor-this.baseShift}pack(t){return Xg(t,this.getUnpackVector())}getPixels(){return new an({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,r,l){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let h=r*this.dim,m=r*this.dim+this.dim,_=l*this.dim,x=l*this.dim+this.dim;switch(r){case-1:h=m-1;break;case 1:m=h+1}switch(l){case-1:_=x-1;break;case 1:x=_+1}const B=-r*this.dim,O=-l*this.dim;for(let P=_;P<x;P++)for(let I=h;I<m;I++)this.data[this._idx(I,P)]=t.data[this._idx(I+B,P+O)]}}function Xg(n,t){const r=t[0],l=t[1],h=t[2],m=t[3],_=Math.min(r,l,h),x=Math.round((n+m)/_);return{r:Math.floor(x*_/r)%256,g:Math.floor(x*_/l)%256,b:Math.floor(x*_/h)%256}}ft("DEMData",Kg);class Ax extends Tn{constructor(t,r){super(t,Ix,r)}_createColorRamp(t){const r={elevationStops:[],colorStops:[]},l=this._transitionablePaint._values["color-relief-color"].value.expression;if(l instanceof Ea&&l._styleExpression.expression instanceof Pr){this.colorRampExpression=l;const _=l._styleExpression.expression;r.elevationStops=_.labels,r.colorStops=[];for(const x of r.elevationStops)r.colorStops.push(_.evaluate({globals:{elevation:x}}))}if(r.elevationStops.length<1&&(r.elevationStops=[0],r.colorStops=[ri.transparent]),r.elevationStops.length<2&&(r.elevationStops.push(r.elevationStops[0]+1),r.colorStops.push(r.colorStops[0])),r.elevationStops.length<=t)return r;const h={elevationStops:[],colorStops:[]},m=(r.elevationStops.length-1)/(t-1);for(let _=0;_<r.elevationStops.length-.5;_+=m)h.elevationStops.push(r.elevationStops[Math.round(_)]),h.colorStops.push(r.colorStops[Math.round(_)]);return be(`Too many colors in specification of ${this.id} color-relief layer, may not render properly.`),h}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(t,r,l){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;const h=this._createColorRamp(r),m=new an({width:h.colorStops.length,height:1}),_=new an({width:h.colorStops.length,height:1});for(let x=0;x<h.elevationStops.length;x++){const B=Xg(h.elevationStops[x],l);_.setPixel(0,x,new ri(B.r/255,B.g/255,B.b/255,1)),m.setPixel(0,x,h.colorStops[x])}return this.colorRampTextures={elevationTexture:new Zf(t,_,t.gl.RGBA),colorTexture:new Zf(t,m,t.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return this.visibility!=="none"&&!!this.colorRampTextures}}const jx=Vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:kx}=jx;function qf(n,t,r){const l=r.patternDependencies;let h=!1;for(const m of t){const _=m.paint.get(`${n}-pattern`);_.isConstant()||(h=!0);const x=_.constantOr(null);x&&(h=!0,l[x.to]=!0,l[x.from]=!0)}return h}function Wf(n,t,r,l,h){const{zoom:m}=l,_=h.patternDependencies;for(const x of t){const B=x.paint.get(`${n}-pattern`).value;if(B.kind!=="constant"){let O=B.evaluate({zoom:m-1},r,{},h.availableImages),P=B.evaluate({zoom:m},r,{},h.availableImages),I=B.evaluate({zoom:m+1},r,{},h.availableImages);O=O&&O.name?O.name:O,P=P&&P.name?P.name:P,I=I&&I.name?I.name:I,_[O]=!0,_[P]=!0,_[I]=!0,r.patterns[x.id]={min:O,mid:P,max:I}}}return r}function Yg(n,t,r,l,h){let m;if(h===(function(_,x,B,O){let P=0;for(let I=x,k=B-O;I<B;I+=O)P+=(_[k]-_[I])*(_[I+1]+_[k+1]),k=I;return P})(n,t,r,l)>0)for(let _=t;_<r;_+=l)m=t_(_/l|0,n[_],n[_+1],m);else for(let _=r-l;_>=t;_-=l)m=t_(_/l|0,n[_],n[_+1],m);return m&&ql(m,m.next)&&(zu(m),m=m.next),m}function Na(n,t){if(!n)return n;t||(t=n);let r,l=n;do if(r=!1,l.steiner||!ql(l,l.next)&&tr(l.prev,l,l.next)!==0)l=l.next;else{if(zu(l),l=t=l.prev,l===l.next)break;r=!0}while(r||l!==t);return t}function Ru(n,t,r,l,h,m,_){if(!n)return;!_&&m&&(function(B,O,P,I){let k=B;do k.z===0&&(k.z=Kf(k.x,k.y,O,P,I)),k.prevZ=k.prev,k.nextZ=k.next,k=k.next;while(k!==B);k.prevZ.nextZ=null,k.prevZ=null,(function(z){let N,Z=1;do{let K,ee=z;z=null;let _e=null;for(N=0;ee;){N++;let oe=ee,he=0;for(let Ee=0;Ee<Z&&(he++,oe=oe.nextZ,oe);Ee++);let Be=Z;for(;he>0||Be>0&&oe;)he!==0&&(Be===0||!oe||ee.z<=oe.z)?(K=ee,ee=ee.nextZ,he--):(K=oe,oe=oe.nextZ,Be--),_e?_e.nextZ=K:z=K,K.prevZ=_e,_e=K;ee=oe}_e.nextZ=null,Z*=2}while(N>1)})(k)})(n,l,h,m);let x=n;for(;n.prev!==n.next;){const B=n.prev,O=n.next;if(m?Dx(n,l,h,m):Rx(n))t.push(B.i,n.i,O.i),zu(n),n=O.next,x=O.next;else if((n=O)===x){_?_===1?Ru(n=Lx(Na(n),t),t,r,l,h,m,2):_===2&&zx(n,t,r,l,h,m):Ru(Na(n),t,r,l,h,m,1);break}}}function Rx(n){const t=n.prev,r=n,l=n.next;if(tr(t,r,l)>=0)return!1;const h=t.x,m=r.x,_=l.x,x=t.y,B=r.y,O=l.y,P=Math.min(h,m,_),I=Math.min(x,B,O),k=Math.max(h,m,_),z=Math.max(x,B,O);let N=l.next;for(;N!==t;){if(N.x>=P&&N.x<=k&&N.y>=I&&N.y<=z&&Du(h,x,m,B,_,O,N.x,N.y)&&tr(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function Dx(n,t,r,l){const h=n.prev,m=n,_=n.next;if(tr(h,m,_)>=0)return!1;const x=h.x,B=m.x,O=_.x,P=h.y,I=m.y,k=_.y,z=Math.min(x,B,O),N=Math.min(P,I,k),Z=Math.max(x,B,O),K=Math.max(P,I,k),ee=Kf(z,N,t,r,l),_e=Kf(Z,K,t,r,l);let oe=n.prevZ,he=n.nextZ;for(;oe&&oe.z>=ee&&he&&he.z<=_e;){if(oe.x>=z&&oe.x<=Z&&oe.y>=N&&oe.y<=K&&oe!==h&&oe!==_&&Du(x,P,B,I,O,k,oe.x,oe.y)&&tr(oe.prev,oe,oe.next)>=0||(oe=oe.prevZ,he.x>=z&&he.x<=Z&&he.y>=N&&he.y<=K&&he!==h&&he!==_&&Du(x,P,B,I,O,k,he.x,he.y)&&tr(he.prev,he,he.next)>=0))return!1;he=he.nextZ}for(;oe&&oe.z>=ee;){if(oe.x>=z&&oe.x<=Z&&oe.y>=N&&oe.y<=K&&oe!==h&&oe!==_&&Du(x,P,B,I,O,k,oe.x,oe.y)&&tr(oe.prev,oe,oe.next)>=0)return!1;oe=oe.prevZ}for(;he&&he.z<=_e;){if(he.x>=z&&he.x<=Z&&he.y>=N&&he.y<=K&&he!==h&&he!==_&&Du(x,P,B,I,O,k,he.x,he.y)&&tr(he.prev,he,he.next)>=0)return!1;he=he.nextZ}return!0}function Lx(n,t){let r=n;do{const l=r.prev,h=r.next.next;!ql(l,h)&&Qg(l,r,r.next,h)&&Lu(l,h)&&Lu(h,l)&&(t.push(l.i,r.i,h.i),zu(r),zu(r.next),r=n=h),r=r.next}while(r!==n);return Na(r)}function zx(n,t,r,l,h,m){let _=n;do{let x=_.next.next;for(;x!==_.prev;){if(_.i!==x.i&&Vx(_,x)){let B=e_(_,x);return _=Na(_,_.next),B=Na(B,B.next),Ru(_,t,r,l,h,m,0),void Ru(B,t,r,l,h,m,0)}x=x.next}_=_.next}while(_!==n)}function Fx(n,t){let r=n.x-t.x;return r===0&&(r=n.y-t.y,r===0)&&(r=(n.next.y-n.y)/(n.next.x-n.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function Nx(n,t){const r=(function(h,m){let _=m;const x=h.x,B=h.y;let O,P=-1/0;if(ql(h,_))return _;do{if(ql(h,_.next))return _.next;if(B<=_.y&&B>=_.next.y&&_.next.y!==_.y){const Z=_.x+(B-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(Z<=x&&Z>P&&(P=Z,O=_.x<_.next.x?_:_.next,Z===x))return O}_=_.next}while(_!==m);if(!O)return null;const I=O,k=O.x,z=O.y;let N=1/0;_=O;do{if(x>=_.x&&_.x>=k&&x!==_.x&&Jg(B<z?x:P,B,k,z,B<z?P:x,B,_.x,_.y)){const Z=Math.abs(B-_.y)/(x-_.x);Lu(_,h)&&(Z<N||Z===N&&(_.x>O.x||_.x===O.x&&$x(O,_)))&&(O=_,N=Z)}_=_.next}while(_!==I);return O})(n,t);if(!r)return t;const l=e_(r,n);return Na(l,l.next),Na(r,r.next)}function $x(n,t){return tr(n.prev,n,t.prev)<0&&tr(t.next,n,n.next)<0}function Kf(n,t,r,l,h){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-r)*h|0)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-l)*h|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Ux(n){let t=n,r=n;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==n);return r}function Jg(n,t,r,l,h,m,_,x){return(h-_)*(t-x)>=(n-_)*(m-x)&&(n-_)*(l-x)>=(r-_)*(t-x)&&(r-_)*(m-x)>=(h-_)*(l-x)}function Du(n,t,r,l,h,m,_,x){return!(n===_&&t===x)&&Jg(n,t,r,l,h,m,_,x)}function Vx(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!(function(r,l){let h=r;do{if(h.i!==r.i&&h.next.i!==r.i&&h.i!==l.i&&h.next.i!==l.i&&Qg(h,h.next,r,l))return!0;h=h.next}while(h!==r);return!1})(n,t)&&(Lu(n,t)&&Lu(t,n)&&(function(r,l){let h=r,m=!1;const _=(r.x+l.x)/2,x=(r.y+l.y)/2;do h.y>x!=h.next.y>x&&h.next.y!==h.y&&_<(h.next.x-h.x)*(x-h.y)/(h.next.y-h.y)+h.x&&(m=!m),h=h.next;while(h!==r);return m})(n,t)&&(tr(n.prev,n,t.prev)||tr(n,t.prev,t))||ql(n,t)&&tr(n.prev,n,n.next)>0&&tr(t.prev,t,t.next)>0)}function tr(n,t,r){return(t.y-n.y)*(r.x-t.x)-(t.x-n.x)*(r.y-t.y)}function ql(n,t){return n.x===t.x&&n.y===t.y}function Qg(n,t,r,l){const h=Dp(tr(n,t,r)),m=Dp(tr(n,t,l)),_=Dp(tr(r,l,n)),x=Dp(tr(r,l,t));return h!==m&&_!==x||!(h!==0||!Rp(n,r,t))||!(m!==0||!Rp(n,l,t))||!(_!==0||!Rp(r,n,l))||!(x!==0||!Rp(r,t,l))}function Rp(n,t,r){return t.x<=Math.max(n.x,r.x)&&t.x>=Math.min(n.x,r.x)&&t.y<=Math.max(n.y,r.y)&&t.y>=Math.min(n.y,r.y)}function Dp(n){return n>0?1:n<0?-1:0}function Lu(n,t){return tr(n.prev,n,n.next)<0?tr(n,t,n.next)>=0&&tr(n,n.prev,t)>=0:tr(n,t,n.prev)<0||tr(n,n.next,t)<0}function e_(n,t){const r=Xf(n.i,n.x,n.y),l=Xf(t.i,t.x,t.y),h=n.next,m=t.prev;return n.next=t,t.prev=n,r.next=h,h.prev=r,l.next=r,r.prev=l,m.next=l,l.prev=m,l}function t_(n,t,r,l){const h=Xf(n,t,r);return l?(h.next=l.next,h.prev=l,l.next.prev=h,l.next=h):(h.prev=h,h.next=h),h}function zu(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Xf(n,t,r){return{i:n,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Wl{constructor(t,r){if(r>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=r}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<<t)),this._minGranularity,1)}}class Lp{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}}Lp.noSubdivision=new Lp({fill:new Wl(0,0),line:new Wl(0,0),tile:new Wl(0,0),stencil:new Wl(0,0),circle:1}),ft("SubdivisionGranularityExpression",Wl),ft("SubdivisionGranularitySetting",Lp);const Kl=-32768,Fu=32767;class Gx{constructor(t,r){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=Ft/t,this._canonical=r}_getKey(t,r){return(t+=32768)<<16|r+32768}_vertexToIndex(t,r){if(t<-32768||r<-32768||t>32767||r>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const l=0|Math.round(t),h=0|Math.round(r),m=this._getKey(l,h);if(this._vertexDictionary.has(m))return this._vertexDictionary.get(m);const _=this._vertexBuffer.length/2;return this._vertexDictionary.set(m,_),this._vertexBuffer.push(l,h),_}_subdivideTrianglesScanline(t){if(this._granularity<2)return(function(h,m){const _=[];for(let x=0;x<m.length;x+=3){const B=m[x],O=m[x+1],P=m[x+2],I=h[2*B],k=h[2*B+1];(h[2*O]-I)*(h[2*P+1]-k)-(h[2*O+1]-k)*(h[2*P]-I)>0?(_.push(B),_.push(P),_.push(O)):(_.push(B),_.push(O),_.push(P))}return _})(this._vertexBuffer,t);const r=[],l=t.length;for(let h=0;h<l;h+=3){const m=[t[h+0],t[h+1],t[h+2]],_=[this._vertexBuffer[2*t[h+0]+0],this._vertexBuffer[2*t[h+0]+1],this._vertexBuffer[2*t[h+1]+0],this._vertexBuffer[2*t[h+1]+1],this._vertexBuffer[2*t[h+2]+0],this._vertexBuffer[2*t[h+2]+1]];let x=1/0,B=1/0,O=-1/0,P=-1/0;for(let Z=0;Z<3;Z++){const K=_[2*Z],ee=_[2*Z+1];x=Math.min(x,K),O=Math.max(O,K),B=Math.min(B,ee),P=Math.max(P,ee)}if(x===O||B===P)continue;const I=Math.floor(x/this._granularityCellSize),k=Math.ceil(O/this._granularityCellSize),z=Math.floor(B/this._granularityCellSize),N=Math.ceil(P/this._granularityCellSize);if(I!==k||z!==N)for(let Z=z;Z<N;Z++){const K=this._scanlineGenerateVertexRingForCellRow(Z,_,m);Hx(this._vertexBuffer,K,r)}else r.push(...m)}return r}_scanlineGenerateVertexRingForCellRow(t,r,l){const h=t*this._granularityCellSize,m=h+this._granularityCellSize,_=[];for(let x=0;x<3;x++){const B=r[2*x],O=r[2*x+1],P=r[2*(x+1)%6],I=r[(2*(x+1)+1)%6],k=r[2*(x+2)%6],z=r[(2*(x+2)+1)%6],N=P-B,Z=I-O,K=N===0,ee=Z===0,_e=(h-O)/Z,oe=(m-O)/Z,he=Math.min(_e,oe),Be=Math.max(_e,oe);if(!ee&&(he>=1||Be<=0)||ee&&(O<h||O>m)){I>=h&&I<=m&&_.push(l[(x+1)%3]);continue}!ee&&he>0&&_.push(this._vertexToIndex(B+N*he,O+Z*he));const Ee=B+N*Math.max(he,0),Ve=B+N*Math.min(Be,1);K||this._generateIntraEdgeVertices(_,B,O,P,I,Ee,Ve),!ee&&Be<1&&_.push(this._vertexToIndex(B+N*Be,O+Z*Be)),(ee||I>=h&&I<=m)&&_.push(l[(x+1)%3]),!ee&&(I<=h||I>=m)&&this._generateInterEdgeVertices(_,B,O,P,I,k,z,Ve,h,m)}return _}_generateIntraEdgeVertices(t,r,l,h,m,_,x){const B=h-r,O=m-l,P=O===0,I=P?Math.min(r,h):Math.min(_,x),k=P?Math.max(r,h):Math.max(_,x),z=Math.floor(I/this._granularityCellSize)+1,N=Math.ceil(k/this._granularityCellSize)-1;if(P?r<h:_<x)for(let Z=z;Z<=N;Z++){const K=Z*this._granularityCellSize;t.push(this._vertexToIndex(K,l+O*(K-r)/B))}else for(let Z=N;Z>=z;Z--){const K=Z*this._granularityCellSize;t.push(this._vertexToIndex(K,l+O*(K-r)/B))}}_generateInterEdgeVertices(t,r,l,h,m,_,x,B,O,P){const I=m-l,k=_-h,z=x-m,N=(O-m)/z,Z=(P-m)/z,K=Math.min(N,Z),ee=Math.max(N,Z),_e=h+k*K;let oe=Math.floor(Math.min(_e,B)/this._granularityCellSize)+1,he=Math.ceil(Math.max(_e,B)/this._granularityCellSize)-1,Be=B<_e;const Ee=z===0;if(Ee&&(x===O||x===P))return;if(Ee||K>=1||ee<=0){const it=l-x,Ke=_+(r-_)*Math.min((O-x)/it,(P-x)/it);oe=Math.floor(Math.min(Ke,B)/this._granularityCellSize)+1,he=Math.ceil(Math.max(Ke,B)/this._granularityCellSize)-1,Be=B<Ke}const Ve=I>0?P:O;if(Be)for(let it=oe;it<=he;it++)t.push(this._vertexToIndex(it*this._granularityCellSize,Ve));else for(let it=he;it>=oe;it--)t.push(this._vertexToIndex(it*this._granularityCellSize,Ve))}_generateOutline(t){const r=[];for(const l of t){const h=$a(l,this._granularity,!0),m=this._pointArrayToIndices(h),_=[];for(let x=1;x<m.length;x++)_.push(m[x-1]),_.push(m[x]);r.push(_)}return r}_handlePoles(t){let r=!1,l=!1;this._canonical&&(this._canonical.y===0&&(r=!0),this._canonical.y===(1<<this._canonical.z)-1&&(l=!0)),(r||l)&&this._fillPoles(t,r,l)}_ensureNoPoleVertices(){const t=this._vertexBuffer;for(let r=0;r<t.length;r+=2){const l=t[r+1];l===Kl&&(t[r+1]=-32767),l===Fu&&(t[r+1]=32766)}}_generatePoleQuad(t,r,l,h,m,_){h>m!=(_===Kl)?(t.push(r),t.push(l),t.push(this._vertexToIndex(h,_)),t.push(l),t.push(this._vertexToIndex(m,_)),t.push(this._vertexToIndex(h,_))):(t.push(l),t.push(r),t.push(this._vertexToIndex(h,_)),t.push(this._vertexToIndex(m,_)),t.push(l),t.push(this._vertexToIndex(h,_)))}_fillPoles(t,r,l){const h=this._vertexBuffer,m=Ft,_=t.length;for(let x=2;x<_;x+=3){const B=t[x-2],O=t[x-1],P=t[x],I=h[2*B],k=h[2*B+1],z=h[2*O],N=h[2*O+1],Z=h[2*P],K=h[2*P+1];r&&(k===0&&N===0&&this._generatePoleQuad(t,B,O,I,z,Kl),N===0&&K===0&&this._generatePoleQuad(t,O,P,z,Z,Kl),K===0&&k===0&&this._generatePoleQuad(t,P,B,Z,I,Kl)),l&&(k===m&&N===m&&this._generatePoleQuad(t,B,O,I,z,Fu),N===m&&K===m&&this._generatePoleQuad(t,O,P,z,Z,Fu),K===m&&k===m&&this._generatePoleQuad(t,P,B,Z,I,Fu))}}_initializeVertices(t){for(let r=0;r<t.length;r+=2)this._vertexToIndex(t[r],t[r+1])}subdividePolygonInternal(t,r){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:l,holeIndices:h}=(function(x){const B=[],O=[];for(const P of x)if(P.length!==0){P!==x[0]&&B.push(O.length/2);for(let I=0;I<P.length;I++)O.push(P[I].x),O.push(P[I].y)}return{flattened:O,holeIndices:B}})(t);let m;this._initializeVertices(l);try{const x=(function(O,P,I=2){const k=P&&P.length,z=k?P[0]*I:O.length;let N=Yg(O,0,z,I,!0);const Z=[];if(!N||N.next===N.prev)return Z;let K,ee,_e;if(k&&(N=(function(oe,he,Be,Ee){const Ve=[];for(let it=0,Ke=he.length;it<Ke;it++){const et=Yg(oe,he[it]*Ee,it<Ke-1?he[it+1]*Ee:oe.length,Ee,!1);et===et.next&&(et.steiner=!0),Ve.push(Ux(et))}Ve.sort(Fx);for(let it=0;it<Ve.length;it++)Be=Nx(Ve[it],Be);return Be})(O,P,N,I)),O.length>80*I){K=O[0],ee=O[1];let oe=K,he=ee;for(let Be=I;Be<z;Be+=I){const Ee=O[Be],Ve=O[Be+1];Ee<K&&(K=Ee),Ve<ee&&(ee=Ve),Ee>oe&&(oe=Ee),Ve>he&&(he=Ve)}_e=Math.max(oe-K,he-ee),_e=_e!==0?32767/_e:0}return Ru(N,Z,I,K,ee,_e,0),Z})(l,h),B=this._convertIndices(l,x);m=this._subdivideTrianglesScanline(B)}catch(x){console.error(x)}let _=[];return r&&(_=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(m),{verticesFlattened:this._vertexBuffer,indicesTriangles:m,indicesLineList:_}}_convertIndices(t,r){const l=[];for(let h=0;h<r.length;h++)l.push(this._vertexToIndex(t[2*r[h]],t[2*r[h]+1]));return l}_pointArrayToIndices(t){const r=[];for(let l=0;l<t.length;l++){const h=t[l];r.push(this._vertexToIndex(h.x,h.y))}return r}}function i_(n,t,r,l=!0){return new Gx(r,t).subdividePolygonInternal(n,l)}function $a(n,t,r=!1){if(!n||n.length<1)return[];if(n.length<2)return[];const l=n[0],h=n[n.length-1],m=r&&(l.x!==h.x||l.y!==h.y);if(t<2)return m?[...n,n[0]]:[...n];const _=Math.floor(Ft/t),x=[];x.push(new M(n[0].x,n[0].y));const B=n.length,O=m?B:B-1;for(let P=0;P<O;P++){const I=n[P],k=P<B-1?n[P+1]:n[0],z=I.x,N=I.y,Z=k.x,K=k.y,ee=z!==Z,_e=N!==K;if(!ee&&!_e)continue;const oe=Z-z,he=K-N,Be=Math.abs(oe),Ee=Math.abs(he);let Ve=z,it=N;for(;;){const et=oe>0?(Math.floor(Ve/_)+1)*_:(Math.ceil(Ve/_)-1)*_,Bt=he>0?(Math.floor(it/_)+1)*_:(Math.ceil(it/_)-1)*_,Qe=Math.abs(Ve-et),tt=Math.abs(it-Bt),Le=Math.abs(Ve-Z),Rt=Math.abs(it-K),zt=ee?Qe/Be:Number.POSITIVE_INFINITY,St=_e?tt/Ee:Number.POSITIVE_INFINITY;if((Le<=Qe||!ee)&&(Rt<=tt||!_e))break;if(zt<St&&ee||!_e){Ve=et,it+=he*zt;const xt=new M(Ve,Math.round(it));x[x.length-1].x===xt.x&&x[x.length-1].y===xt.y||x.push(xt)}else{Ve+=oe*St,it=Bt;const xt=new M(Math.round(Ve),it);x[x.length-1].x===xt.x&&x[x.length-1].y===xt.y||x.push(xt)}}const Ke=new M(Z,K);x[x.length-1].x===Ke.x&&x[x.length-1].y===Ke.y||x.push(Ke)}return x}function Hx(n,t,r){if(t.length===0)throw new Error("Subdivision vertex ring is empty.");let l=0,h=n[2*t[0]];for(let B=1;B<t.length;B++){const O=n[2*t[B]];O<h&&(h=O,l=B)}const m=t.length;let _=l,x=(_+1)%m;for(;;){const B=_-1>=0?_-1:m-1,O=(x+1)%m,P=n[2*t[B]],I=n[2*t[O]],k=n[2*t[_]],z=n[2*t[_]+1],N=n[2*t[x]+1];let Z=!1;if(P<I)Z=!0;else if(P>I)Z=!1;else{const K=N-z,ee=-(n[2*t[x]]-k),_e=z<N?1:-1;((P-k)*K+(n[2*t[B]+1]-z)*ee)*_e>((I-k)*K+(n[2*t[O]+1]-z)*ee)*_e&&(Z=!0)}if(Z){const K=t[B],ee=t[_],_e=t[x];K!==ee&&K!==_e&&ee!==_e&&r.push(_e,ee,K),_--,_<0&&(_=m-1)}else{const K=t[O],ee=t[_],_e=t[x];K!==ee&&K!==_e&&ee!==_e&&r.push(_e,ee,K),x++,x>=m&&(x=0)}if(B===O)break}}function r_(n,t,r,l,h,m,_,x,B){const O=h.length/2,P=_&&x&&B;if(O<Vt.MAX_VERTEX_ARRAY_LENGTH){const I=t.prepareSegment(O,r,l),k=I.vertexLength;for(let Z=0;Z<m.length;Z+=3)l.emplaceBack(k+m[Z],k+m[Z+1],k+m[Z+2]);let z,N;I.vertexLength+=O,I.primitiveLength+=m.length/3,P&&(N=_.prepareSegment(O,r,x),z=N.vertexLength,N.vertexLength+=O);for(let Z=0;Z<h.length;Z+=2)n(h[Z],h[Z+1]);if(P)for(let Z=0;Z<B.length;Z++){const K=B[Z];for(let ee=1;ee<K.length;ee+=2)x.emplaceBack(z+K[ee-1],z+K[ee]);N.primitiveLength+=K.length/2}}else(function(I,k,z,N,Z,K){const ee=[];for(let Ee=0;Ee<N.length/2;Ee++)ee.push(-1);const _e={count:0};let oe=0,he=I.getOrCreateLatestSegment(k,z),Be=he.vertexLength;for(let Ee=2;Ee<Z.length;Ee+=3){const Ve=Z[Ee-2],it=Z[Ee-1],Ke=Z[Ee];let et=ee[Ve]<oe,Bt=ee[it]<oe,Qe=ee[Ke]<oe;he.vertexLength+((et?1:0)+(Bt?1:0)+(Qe?1:0))>Vt.MAX_VERTEX_ARRAY_LENGTH&&(he=I.createNewSegment(k,z),oe=_e.count,et=!0,Bt=!0,Qe=!0,Be=0);const tt=Nu(ee,N,K,_e,Ve,et,he),Le=Nu(ee,N,K,_e,it,Bt,he),Rt=Nu(ee,N,K,_e,Ke,Qe,he);z.emplaceBack(Be+tt-oe,Be+Le-oe,Be+Rt-oe),he.primitiveLength++}})(t,r,l,h,m,n),P&&(function(I,k,z,N,Z,K){const ee=[];for(let Ee=0;Ee<N.length/2;Ee++)ee.push(-1);const _e={count:0};let oe=0,he=I.getOrCreateLatestSegment(k,z),Be=he.vertexLength;for(let Ee=0;Ee<Z.length;Ee++){const Ve=Z[Ee];for(let it=1;it<Z[Ee].length;it+=2){const Ke=Ve[it-1],et=Ve[it];let Bt=ee[Ke]<oe,Qe=ee[et]<oe;he.vertexLength+((Bt?1:0)+(Qe?1:0))>Vt.MAX_VERTEX_ARRAY_LENGTH&&(he=I.createNewSegment(k,z),oe=_e.count,Bt=!0,Qe=!0,Be=0);const tt=Nu(ee,N,K,_e,Ke,Bt,he),Le=Nu(ee,N,K,_e,et,Qe,he);z.emplaceBack(Be+tt-oe,Be+Le-oe),he.primitiveLength++}}})(_,r,x,h,B,n),t.forceNewSegmentOnNextPrepare(),_?.forceNewSegmentOnNextPrepare()}function Nu(n,t,r,l,h,m,_){if(m){const x=l.count;return r(t[2*h],t[2*h+1]),n[h]=l.count,l.count++,_.vertexLength++,x}return n[h]}class Yf{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ve,this.indexArray=new gi,this.indexArray2=new Ai,this.programConfigurations=new As(t.layers,t.zoom),this.segments=new Vt,this.segments2=new Vt,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,l){this.hasPattern=qf("fill",this.layers,r);const h=this.layers[0].layout.get("fill-sort-key"),m=!h.isConstant(),_=[];for(const{feature:x,id:B,index:O,sourceLayerIndex:P}of t){const I=this.layers[0]._featureFilter.needGeometry,k=Fa(x,I);if(!this.layers[0]._featureFilter.filter(new Oi(this.zoom),k,l))continue;const z=m?h.evaluate(k,{},l,r.availableImages):void 0,N={id:B,properties:x.properties,type:x.type,sourceLayerIndex:P,index:O,geometry:I?k.geometry:cs(x),patterns:{},sortKey:z};_.push(N)}m&&_.sort(((x,B)=>x.sortKey-B.sortKey));for(const x of _){const{geometry:B,index:O,sourceLayerIndex:P}=x;if(this.hasPattern){const I=Wf("fill",this.layers,x,{zoom:this.zoom},r);this.patternFeatures.push(I)}else this.addFeature(x,B,O,l,{},r.subdivisionGranularity);r.featureIndex.insert(t[O].feature,B,O,P,this.index)}}update(t,r,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,{imagePositions:l})}addFeatures(t,r,l){for(const h of this.patternFeatures)this.addFeature(h,h.geometry,h.index,r,l,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,kx),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,r,l,h,m,_){for(const x of Ta(r,500)){const B=i_(x,h,_.fill.getGranularityForZoomLevel(h.z)),O=this.layoutVertexArray;r_(((P,I)=>{O.emplaceBack(P,I)}),this.segments,this.layoutVertexArray,this.indexArray,B.verticesFlattened,B.indicesTriangles,this.segments2,this.indexArray2,B.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:m,canonical:h})}}let n_,s_;ft("FillBucket",Yf,{omit:["layers","patternFeatures"]});var Zx={get paint(){return s_=s_||new $r({"fill-antialias":new wt(ye.paint_fill["fill-antialias"]),"fill-opacity":new Mt(ye.paint_fill["fill-opacity"]),"fill-color":new Mt(ye.paint_fill["fill-color"]),"fill-outline-color":new Mt(ye.paint_fill["fill-outline-color"]),"fill-translate":new wt(ye.paint_fill["fill-translate"]),"fill-translate-anchor":new wt(ye.paint_fill["fill-translate-anchor"]),"fill-pattern":new os(ye.paint_fill["fill-pattern"])})},get layout(){return n_=n_||new $r({"fill-sort-key":new Mt(ye.layout_fill["fill-sort-key"])})}};class qx extends Tn{constructor(t,r){super(t,Zx,r)}recalculate(t,r){super.recalculate(t,r);const l=this.paint._values["fill-outline-color"];l.value.kind==="constant"&&l.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new Yf(t)}queryRadius(){return jp(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:r,transform:l,pixelsToTileUnits:h}){return Lg(kp(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-l.bearingInRadians,h),r)}isTileClipped(){return!0}}const Wx=Vi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Kx=Vi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Xx}=Wx;class Xl{constructor(t,r,l,h,m){this.properties={},this.extent=l,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=h,this._values=m,t.readFields(Yx,this,r)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const r=t.readVarint()+t.pos,l=[];let h,m=1,_=0,x=0,B=0;for(;t.pos<r;){if(_<=0){const O=t.readVarint();m=7&O,_=O>>3}if(_--,m===1||m===2)x+=t.readSVarint(),B+=t.readSVarint(),m===1&&(h&&l.push(h),h=[]),h&&h.push(new M(x,B));else{if(m!==7)throw new Error(`unknown command ${m}`);h&&h.push(h[0].clone())}}return h&&l.push(h),l}bbox(){const t=this._pbf;t.pos=this._geometry;const r=t.readVarint()+t.pos;let l=1,h=0,m=0,_=0,x=1/0,B=-1/0,O=1/0,P=-1/0;for(;t.pos<r;){if(h<=0){const I=t.readVarint();l=7&I,h=I>>3}if(h--,l===1||l===2)m+=t.readSVarint(),_+=t.readSVarint(),m<x&&(x=m),m>B&&(B=m),_<O&&(O=_),_>P&&(P=_);else if(l!==7)throw new Error(`unknown command ${l}`)}return[x,O,B,P]}toGeoJSON(t,r,l){const h=this.extent*Math.pow(2,l),m=this.extent*t,_=this.extent*r,x=this.loadGeometry();function B(k){return[360*(k.x+m)/h-180,360/Math.PI*Math.atan(Math.exp((1-2*(k.y+_)/h)*Math.PI))-90]}function O(k){return k.map(B)}let P;if(this.type===1){const k=[];for(const N of x)k.push(N[0]);const z=O(k);P=k.length===1?{type:"Point",coordinates:z[0]}:{type:"MultiPoint",coordinates:z}}else if(this.type===2){const k=x.map(O);P=k.length===1?{type:"LineString",coordinates:k[0]}:{type:"MultiLineString",coordinates:k}}else{if(this.type!==3)throw new Error("unknown feature type");{const k=(function(N){const Z=N.length;if(Z<=1)return[N];const K=[];let ee,_e;for(let oe=0;oe<Z;oe++){const he=Jx(N[oe]);he!==0&&(_e===void 0&&(_e=he<0),_e===he<0?(ee&&K.push(ee),ee=[N[oe]]):ee&&ee.push(N[oe]))}return ee&&K.push(ee),K})(x),z=[];for(const N of k)z.push(N.map(O));P=z.length===1?{type:"Polygon",coordinates:z[0]}:{type:"MultiPolygon",coordinates:z}}}const I={type:"Feature",geometry:P,properties:this.properties};return this.id!=null&&(I.id=this.id),I}}function Yx(n,t,r){n===1?t.id=r.readVarint():n===2?(function(l,h){const m=l.readVarint()+l.pos;for(;l.pos<m;){const _=h._keys[l.readVarint()],x=h._values[l.readVarint()];h.properties[_]=x}})(r,t):n===3?t.type=r.readVarint():n===4&&(t._geometry=r.pos)}function Jx(n){let t=0;for(let r,l,h=0,m=n.length,_=m-1;h<m;_=h++)r=n[h],l=n[_],t+=(l.x-r.x)*(r.y+l.y);return t}Xl.types=["Unknown","Point","LineString","Polygon"];class o_{constructor(t,r){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Qx,this,r),this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const r=this._pbf.readVarint()+this._pbf.pos;return new Xl(this._pbf,r,this.extent,this._keys,this._values)}}function Qx(n,t,r){n===15?t.version=r.readVarint():n===1?t.name=r.readString():n===5?t.extent=r.readVarint():n===2?t._features.push(r.pos):n===3?t._keys.push(r.readString()):n===4&&t._values.push((function(l){let h=null;const m=l.readVarint()+l.pos;for(;l.pos<m;){const _=l.readVarint()>>3;h=_===1?l.readString():_===2?l.readFloat():_===3?l.readDouble():_===4?l.readVarint64():_===5?l.readVarint():_===6?l.readSVarint():_===7?l.readBoolean():null}if(h==null)throw new Error("unknown feature value");return h})(r))}class a_{constructor(t,r){this.layers=t.readFields(ev,{},r)}}function ev(n,t,r){if(n===3){const l=new o_(r,r.readVarint()+r.pos);l.length&&(t[l.name]=l)}}const Jf=Math.pow(2,13);function $u(n,t,r,l,h,m,_,x){n.emplaceBack(t,r,2*Math.floor(l*Jf)+_,h*Jf*2,m*Jf*2,Math.round(x))}class Qf{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new we,this.centroidVertexArray=new me,this.indexArray=new gi,this.programConfigurations=new As(t.layers,t.zoom),this.segments=new Vt,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,l){this.features=[],this.hasPattern=qf("fill-extrusion",this.layers,r);for(const{feature:h,id:m,index:_,sourceLayerIndex:x}of t){const B=this.layers[0]._featureFilter.needGeometry,O=Fa(h,B);if(!this.layers[0]._featureFilter.filter(new Oi(this.zoom),O,l))continue;const P={id:m,sourceLayerIndex:x,index:_,geometry:B?O.geometry:cs(h),properties:h.properties,type:h.type,patterns:{}};this.hasPattern?this.features.push(Wf("fill-extrusion",this.layers,P,{zoom:this.zoom},r)):this.addFeature(P,P.geometry,_,l,{},r.subdivisionGranularity),r.featureIndex.insert(h,P.geometry,_,x,this.index,!0)}}addFeatures(t,r,l){for(const h of this.features){const{geometry:m}=h;this.addFeature(h,m,h.index,r,l,t.subdivisionGranularity)}}update(t,r,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,{imagePositions:l})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Xx),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Kx.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,r,l,h,m,_){for(const x of Ta(r,500)){const B={x:0,y:0,sampleCount:0},O=this.layoutVertexArray.length;this.processPolygon(B,h,t,x,_);const P=this.layoutVertexArray.length-O,I=Math.floor(B.x/B.sampleCount),k=Math.floor(B.y/B.sampleCount);for(let z=0;z<P;z++)this.centroidVertexArray.emplaceBack(I,k)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:m,canonical:h})}processPolygon(t,r,l,h,m){if(h.length<1||l_(h[0]))return;for(const I of h)I.length!==0&&tv(t,I);const _={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},x=m.fill.getGranularityForZoomLevel(r.z),B=Xl.types[l.type]==="Polygon";for(const I of h){if(I.length===0||l_(I))continue;const k=$a(I,x,B);this._generateSideFaces(k,_)}if(!B)return;const O=i_(h,r,x,!1),P=this.layoutVertexArray;r_(((I,k)=>{$u(P,I,k,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,O.verticesFlattened,O.indicesTriangles)}_generateSideFaces(t,r){let l=0;for(let h=1;h<t.length;h++){const m=t[h],_=t[h-1];if(iv(m,_))continue;r.segment.vertexLength+4>Vt.MAX_VERTEX_ARRAY_LENGTH&&(r.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const x=m.sub(_)._perp()._unit(),B=_.dist(m);l+B>32768&&(l=0),$u(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,0,l),$u(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,1,l),l+=B,$u(this.layoutVertexArray,_.x,_.y,x.x,x.y,0,0,l),$u(this.layoutVertexArray,_.x,_.y,x.x,x.y,0,1,l);const O=r.segment.vertexLength;this.indexArray.emplaceBack(O,O+2,O+1),this.indexArray.emplaceBack(O+1,O+2,O+3),r.segment.vertexLength+=4,r.segment.primitiveLength+=2}}}function tv(n,t){for(let r=0;r<t.length;r++){const l=t[r];r===t.length-1&&t[0].x===l.x&&t[0].y===l.y||(n.x+=l.x,n.y+=l.y,n.sampleCount++)}}function iv(n,t){return n.x===t.x&&(n.x<0||n.x>Ft)||n.y===t.y&&(n.y<0||n.y>Ft)}function l_(n){return n.every((t=>t.x<0))||n.every((t=>t.x>Ft))||n.every((t=>t.y<0))||n.every((t=>t.y>Ft))}let c_;ft("FillExtrusionBucket",Qf,{omit:["layers","features"]});var rv={get paint(){return c_=c_||new $r({"fill-extrusion-opacity":new wt(ye["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Mt(ye["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wt(ye["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wt(ye["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new os(ye["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Mt(ye["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Mt(ye["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wt(ye["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class nv extends Tn{constructor(t,r){super(t,rv,r)}createBucket(t){return new Qf(t)}queryRadius(){return jp(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:l,geometry:h,transform:m,pixelsToTileUnits:_,pixelPosMatrix:x}){const B=kp(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-m.bearingInRadians,_),O=this.paint.get("fill-extrusion-height").evaluate(r,l),P=this.paint.get("fill-extrusion-base").evaluate(r,l),I=(function(z,N){const Z=[];for(const K of z){const ee=[K.x,K.y,0,1];di(ee,ee,N),Z.push(new M(ee[0]/ee[3],ee[1]/ee[3]))}return Z})(B,x),k=(function(z,N,Z,K){const ee=[],_e=[],oe=K[8]*N,he=K[9]*N,Be=K[10]*N,Ee=K[11]*N,Ve=K[8]*Z,it=K[9]*Z,Ke=K[10]*Z,et=K[11]*Z;for(const Bt of z){const Qe=[],tt=[];for(const Le of Bt){const Rt=Le.x,zt=Le.y,St=K[0]*Rt+K[4]*zt+K[12],xt=K[1]*Rt+K[5]*zt+K[13],li=K[2]*Rt+K[6]*zt+K[14],Hi=K[3]*Rt+K[7]*zt+K[15],hr=li+Be,Rr=Hi+Ee,En=St+Ve,ln=xt+it,Cr=li+Ke,Fi=Hi+et,vr=new M((St+oe)/Rr,(xt+he)/Rr);vr.z=hr/Rr,Qe.push(vr);const Er=new M(En/Fi,ln/Fi);Er.z=Cr/Fi,tt.push(Er)}ee.push(Qe),_e.push(tt)}return[ee,_e]})(h,P,O,x);return(function(z,N,Z){let K=1/0;Lg(Z,N)&&(K=u_(Z,N[0]));for(let ee=0;ee<N.length;ee++){const _e=N[ee],oe=z[ee];for(let he=0;he<_e.length-1;he++){const Be=_e[he],Ee=[Be,_e[he+1],oe[he+1],oe[he],Be];Dg(Z,Ee)&&(K=Math.min(K,u_(Z,Ee)))}}return K!==1/0&&K})(k[0],k[1],I)}}function Uu(n,t){return n.x*t.x+n.y*t.y}function u_(n,t){if(n.length===1){let r=0;const l=t[r++];let h;for(;!h||l.equals(h);)if(h=t[r++],!h)return 1/0;for(;r<t.length;r++){const m=t[r],_=n[0],x=h.sub(l),B=m.sub(l),O=_.sub(l),P=Uu(x,x),I=Uu(x,B),k=Uu(B,B),z=Uu(O,x),N=Uu(O,B),Z=P*k-I*I,K=(k*z-I*N)/Z,ee=(P*N-I*z)/Z,_e=l.z*(1-K-ee)+h.z*K+m.z*ee;if(isFinite(_e))return _e}return 1/0}{let r=1/0;for(const l of t)r=Math.min(r,l.z);return r}}const sv=Vi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:ov}=sv,av=Vi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:lv}=av,cv=Math.cos(Math.PI/180*37.5),h_=Math.pow(2,14)/.5;class em{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((r=>{this.gradients[r.id]={}})),this.layoutVertexArray=new Se,this.layoutVertexArray2=new Je,this.indexArray=new gi,this.programConfigurations=new As(t.layers,t.zoom),this.segments=new Vt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,l){this.hasPattern=qf("line",this.layers,r);const h=this.layers[0].layout.get("line-sort-key"),m=!h.isConstant(),_=[];for(const{feature:x,id:B,index:O,sourceLayerIndex:P}of t){const I=this.layers[0]._featureFilter.needGeometry,k=Fa(x,I);if(!this.layers[0]._featureFilter.filter(new Oi(this.zoom),k,l))continue;const z=m?h.evaluate(k,{},l):void 0,N={id:B,properties:x.properties,type:x.type,sourceLayerIndex:P,index:O,geometry:I?k.geometry:cs(x),patterns:{},sortKey:z};_.push(N)}m&&_.sort(((x,B)=>x.sortKey-B.sortKey));for(const x of _){const{geometry:B,index:O,sourceLayerIndex:P}=x;if(this.hasPattern){const I=Wf("line",this.layers,x,{zoom:this.zoom},r);this.patternFeatures.push(I)}else this.addFeature(x,B,O,l,{},r.subdivisionGranularity);r.featureIndex.insert(t[O].feature,B,O,P,this.index)}}update(t,r,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,{imagePositions:l})}addFeatures(t,r,l){for(const h of this.patternFeatures)this.addFeature(h,h.geometry,h.index,r,l,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,lv)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ov),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,r,l,h,m,_){const x=this.layers[0].layout,B=x.get("line-join").evaluate(t,{}),O=x.get("line-cap"),P=x.get("line-miter-limit"),I=x.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const k of r)this.addLine(k,t,B,O,P,I,h,_);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:m,canonical:h})}addLine(t,r,l,h,m,_,x,B){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=$a(t,x?B.line.getGranularityForZoomLevel(x.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let oe=0;oe<t.length-1;oe++)this.totalDistance+=t[oe].dist(t[oe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const O=Xl.types[r.type]==="Polygon";let P=t.length;for(;P>=2&&t[P-1].equals(t[P-2]);)P--;let I=0;for(;I<P-1&&t[I].equals(t[I+1]);)I++;if(P<(O?3:2))return;l==="bevel"&&(m=1.05);const k=this.overscaling<=16?122880/(512*this.overscaling):0,z=this.segments.prepareSegment(10*P,this.layoutVertexArray,this.indexArray);let N,Z,K,ee,_e;this.e1=this.e2=-1,O&&(N=t[P-2],_e=t[I].sub(N)._unit()._perp());for(let oe=I;oe<P;oe++){if(K=oe===P-1?O?t[I+1]:void 0:t[oe+1],K&&t[oe].equals(K))continue;_e&&(ee=_e),N&&(Z=N),N=t[oe],_e=K?K.sub(N)._unit()._perp():ee,ee=ee||_e;let he=ee.add(_e);he.x===0&&he.y===0||he._unit();const Be=ee.x*_e.x+ee.y*_e.y,Ee=he.x*_e.x+he.y*_e.y,Ve=Ee!==0?1/Ee:1/0,it=2*Math.sqrt(2-2*Ee),Ke=Ee<cv&&Z&&K,et=ee.x*_e.y-ee.y*_e.x>0;if(Ke&&oe>I){const tt=N.dist(Z);if(tt>2*k){const Le=N.sub(N.sub(Z)._mult(k/tt)._round());this.updateDistance(Z,Le),this.addCurrentVertex(Le,ee,0,0,z),Z=Le}}const Bt=Z&&K;let Qe=Bt?l:O?"butt":h;if(Bt&&Qe==="round"&&(Ve<_?Qe="miter":Ve<=2&&(Qe="fakeround")),Qe==="miter"&&Ve>m&&(Qe="bevel"),Qe==="bevel"&&(Ve>2&&(Qe="flipbevel"),Ve<m&&(Qe="miter")),Z&&this.updateDistance(Z,N),Qe==="miter")he._mult(Ve),this.addCurrentVertex(N,he,0,0,z);else if(Qe==="flipbevel"){if(Ve>100)he=_e.mult(-1);else{const tt=Ve*ee.add(_e).mag()/ee.sub(_e).mag();he._perp()._mult(tt*(et?-1:1))}this.addCurrentVertex(N,he,0,0,z),this.addCurrentVertex(N,he.mult(-1),0,0,z)}else if(Qe==="bevel"||Qe==="fakeround"){const tt=-Math.sqrt(Ve*Ve-1),Le=et?tt:0,Rt=et?0:tt;if(Z&&this.addCurrentVertex(N,ee,Le,Rt,z),Qe==="fakeround"){const zt=Math.round(180*it/Math.PI/20);for(let St=1;St<zt;St++){let xt=St/zt;if(xt!==.5){const Hi=xt-.5;xt+=xt*Hi*(xt-1)*((1.0904+Be*(Be*(3.55645-1.43519*Be)-3.2452))*Hi*Hi+(.848013+Be*(.215638*Be-1.06021)))}const li=_e.sub(ee)._mult(xt)._add(ee)._unit()._mult(et?-1:1);this.addHalfVertex(N,li.x,li.y,!1,et,0,z)}}K&&this.addCurrentVertex(N,_e,-Le,-Rt,z)}else if(Qe==="butt")this.addCurrentVertex(N,he,0,0,z);else if(Qe==="square"){const tt=Z?1:-1;this.addCurrentVertex(N,he,tt,tt,z)}else Qe==="round"&&(Z&&(this.addCurrentVertex(N,ee,0,0,z),this.addCurrentVertex(N,ee,1,1,z,!0)),K&&(this.addCurrentVertex(N,_e,-1,-1,z,!0),this.addCurrentVertex(N,_e,0,0,z)));if(Ke&&oe<P-1){const tt=N.dist(K);if(tt>2*k){const Le=N.add(K.sub(N)._mult(k/tt)._round());this.updateDistance(N,Le),this.addCurrentVertex(Le,_e,0,0,z),N=Le}}}}addCurrentVertex(t,r,l,h,m,_=!1){const x=r.y*h-r.x,B=-r.y-r.x*h;this.addHalfVertex(t,r.x+r.y*l,r.y-r.x*l,_,!1,l,m),this.addHalfVertex(t,x,B,_,!0,-h,m),this.distance>h_/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,r,l,h,m,_))}addHalfVertex({x:t,y:r},l,h,m,_,x,B){const O=.5*(this.lineClips?this.scaledDistance*(h_-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(m?1:0),(r<<1)+(_?1:0),Math.round(63*l)+128,Math.round(63*h)+128,1+(x===0?0:x<0?-1:1)|(63&O)<<2,O>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const P=B.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,P,this.e2),B.primitiveLength++),_?this.e2=P:this.e1=P}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,r){this.distance+=t.dist(r),this.updateScaledDistance()}}let p_,d_;ft("LineBucket",em,{omit:["layers","patternFeatures"]});var f_={get paint(){return d_=d_||new $r({"line-opacity":new Mt(ye.paint_line["line-opacity"]),"line-color":new Mt(ye.paint_line["line-color"]),"line-translate":new wt(ye.paint_line["line-translate"]),"line-translate-anchor":new wt(ye.paint_line["line-translate-anchor"]),"line-width":new Mt(ye.paint_line["line-width"]),"line-gap-width":new Mt(ye.paint_line["line-gap-width"]),"line-offset":new Mt(ye.paint_line["line-offset"]),"line-blur":new Mt(ye.paint_line["line-blur"]),"line-dasharray":new Tu(ye.paint_line["line-dasharray"]),"line-pattern":new os(ye.paint_line["line-pattern"]),"line-gradient":new $l(ye.paint_line["line-gradient"])})},get layout(){return p_=p_||new $r({"line-cap":new wt(ye.layout_line["line-cap"]),"line-join":new Mt(ye.layout_line["line-join"]),"line-miter-limit":new wt(ye.layout_line["line-miter-limit"]),"line-round-limit":new wt(ye.layout_line["line-round-limit"]),"line-sort-key":new Mt(ye.layout_line["line-sort-key"])})}};class uv extends Mt{possiblyEvaluate(t,r){return r=new Oi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(t,r)}evaluate(t,r,l,h){return r=ut({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(t,r,l,h)}}let zp;class hv extends Tn{constructor(t,r){super(t,f_,r),this.gradientVersion=0,zp||(zp=new uv(f_.paint.properties["line-width"].specification),zp.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const r=this.gradientExpression();this.stepInterpolant=!!(function(l){return l._styleExpression!==void 0})(r)&&r._styleExpression.expression instanceof Yi,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,r){super.recalculate(t,r),this.paint._values["line-floorwidth"]=zp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new em(t)}queryRadius(t){const r=t,l=m_(Zl("line-width",this,r),Zl("line-gap-width",this,r)),h=Zl("line-offset",this,r);return l/2+Math.abs(h)+jp(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:l,geometry:h,transform:m,pixelsToTileUnits:_}){const x=kp(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-m.bearingInRadians,_),B=_/2*m_(this.paint.get("line-width").evaluate(r,l),this.paint.get("line-gap-width").evaluate(r,l)),O=this.paint.get("line-offset").evaluate(r,l);return O&&(h=(function(P,I){const k=[];for(let z=0;z<P.length;z++){const N=P[z],Z=[];for(let K=0;K<N.length;K++){const ee=N[K-1],_e=N[K],oe=N[K+1],he=K===0?new M(0,0):_e.sub(ee)._unit()._perp(),Be=K===N.length-1?new M(0,0):oe.sub(_e)._unit()._perp(),Ee=he._add(Be)._unit(),Ve=Ee.x*Be.x+Ee.y*Be.y;Ve!==0&&Ee._mult(1/Ve),Z.push(Ee._mult(I)._add(_e))}k.push(Z)}return k})(h,O*_)),(function(P,I,k){for(let z=0;z<I.length;z++){const N=I[z];if(P.length>=3){for(let Z=0;Z<N.length;Z++)if(Hl(P,N[Z]))return!0}if(yx(P,N,k))return!0}return!1})(x,h,B)}isTileClipped(){return!0}}function m_(n,t){return t>0?t+2*n:n}const pv=Vi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dv=Vi([{name:"a_projected_pos",components:3,type:"Float32"}],4);Vi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const fv=Vi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Vi([{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 g_=Vi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),mv=Vi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function gv(n,t,r){return n.sections.forEach((l=>{l.text=(function(h,m,_){const x=m.layout.get("text-transform").evaluate(_,{});return x==="uppercase"?h=h.toLocaleUpperCase():x==="lowercase"&&(h=h.toLocaleLowerCase()),Bn.applyArabicShaping&&(h=Bn.applyArabicShaping(h)),h})(l.text,t,r)})),n}Vi([{name:"triangle",components:3,type:"Uint16"}]),Vi([{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"}]),Vi([{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"}]),Vi([{type:"Float32",name:"offsetX"}]),Vi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Vi([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Vu={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var xr=24;const tm=4294967296,__=1/tm,y_=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class im{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,r,l=this.length){for(;this.pos<l;){const h=this.readVarint(),m=h>>3,_=this.pos;this.type=7&h,t(m,r,this),this.pos===_&&this.skip(h)}return r}readMessage(t,r){return this.readFields(t,r,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*tm;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*tm;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const r=this.buf;let l,h;return h=r[this.pos++],l=127&h,h<128?l:(h=r[this.pos++],l|=(127&h)<<7,h<128?l:(h=r[this.pos++],l|=(127&h)<<14,h<128?l:(h=r[this.pos++],l|=(127&h)<<21,h<128?l:(h=r[this.pos],l|=(15&h)<<28,(function(m,_,x){const B=x.buf;let O,P;if(P=B[x.pos++],O=(112&P)>>4,P<128||(P=B[x.pos++],O|=(127&P)<<3,P<128)||(P=B[x.pos++],O|=(127&P)<<10,P<128)||(P=B[x.pos++],O|=(127&P)<<17,P<128)||(P=B[x.pos++],O|=(127&P)<<24,P<128)||(P=B[x.pos++],O|=(1&P)<<31,P<128))return Yl(m,O,_);throw new Error("Expected varint not more than 10 bytes")})(l,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){const t=this.readVarint()+this.pos,r=this.pos;return this.pos=t,t-r>=12&&y_?y_.decode(this.buf.subarray(r,t)):(function(l,h,m){let _="",x=h;for(;x<m;){const B=l[x];let O,P,I,k=null,z=B>239?4:B>223?3:B>191?2:1;if(x+z>m)break;z===1?B<128&&(k=B):z===2?(O=l[x+1],(192&O)==128&&(k=(31&B)<<6|63&O,k<=127&&(k=null))):z===3?(O=l[x+1],P=l[x+2],(192&O)==128&&(192&P)==128&&(k=(15&B)<<12|(63&O)<<6|63&P,(k<=2047||k>=55296&&k<=57343)&&(k=null))):z===4&&(O=l[x+1],P=l[x+2],I=l[x+3],(192&O)==128&&(192&P)==128&&(192&I)==128&&(k=(15&B)<<18|(63&O)<<12|(63&P)<<6|63&I,(k<=65535||k>=1114112)&&(k=null))),k===null?(k=65533,z=1):k>65535&&(k-=65536,_+=String.fromCharCode(k>>>10&1023|55296),k=56320|1023&k),_+=String.fromCharCode(k),x+=z}return _})(this.buf,r,t)}readBytes(){const t=this.readVarint()+this.pos,r=this.buf.subarray(this.pos,t);return this.pos=t,r}readPackedVarint(t=[],r){const l=this.readPackedEnd();for(;this.pos<l;)t.push(this.readVarint(r));return t}readPackedSVarint(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readSVarint());return t}readPackedBoolean(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readBoolean());return t}readPackedFloat(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readFloat());return t}readPackedDouble(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readDouble());return t}readPackedFixed32(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readFixed32());return t}readPackedSFixed32(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readSFixed32());return t}readPackedFixed64(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readFixed64());return t}readPackedSFixed64(t=[]){const r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readSFixed64());return t}readPackedEnd(){return this.type===2?this.readVarint()+this.pos:this.pos+1}skip(t){const r=7&t;if(r===0)for(;this.buf[this.pos++]>127;);else if(r===2)this.pos=this.readVarint()+this.pos;else if(r===5)this.pos+=4;else{if(r!==1)throw new Error(`Unimplemented type: ${r}`);this.pos+=8}}writeTag(t,r){this.writeVarint(t<<3|r)}realloc(t){let r=this.length||16;for(;r<this.pos+t;)r*=2;if(r!==this.length){const l=new Uint8Array(r);l.set(this.buf),this.buf=l,this.dataView=new DataView(l.buffer),this.length=r}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeSFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,-1&t,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*__),!0),this.pos+=8}writeSFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,-1&t,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*__),!0),this.pos+=8}writeVarint(t){(t=+t||0)>268435455||t<0?(function(r,l){let h,m;if(r>=0?(h=r%4294967296|0,m=r/4294967296|0):(h=~(-r%4294967296),m=~(-r/4294967296),4294967295^h?h=h+1|0:(h=0,m=m+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");l.realloc(10),(function(_,x,B){B.buf[B.pos++]=127&_|128,_>>>=7,B.buf[B.pos++]=127&_|128,_>>>=7,B.buf[B.pos++]=127&_|128,_>>>=7,B.buf[B.pos++]=127&_|128,B.buf[B.pos]=127&(_>>>=7)})(h,0,l),(function(_,x){const B=(7&_)<<4;x.buf[x.pos++]|=B|((_>>>=3)?128:0),_&&(x.buf[x.pos++]=127&_|((_>>>=7)?128:0),_&&(x.buf[x.pos++]=127&_|((_>>>=7)?128:0),_&&(x.buf[x.pos++]=127&_|((_>>>=7)?128:0),_&&(x.buf[x.pos++]=127&_|((_>>>=7)?128:0),_&&(x.buf[x.pos++]=127&_)))))})(m,l)})(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))}writeSVarint(t){this.writeVarint(t<0?2*-t-1:2*t)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;const r=this.pos;this.pos=(function(h,m,_){for(let x,B,O=0;O<m.length;O++){if(x=m.charCodeAt(O),x>55295&&x<57344){if(!B){x>56319||O+1===m.length?(h[_++]=239,h[_++]=191,h[_++]=189):B=x;continue}if(x<56320){h[_++]=239,h[_++]=191,h[_++]=189,B=x;continue}x=B-55296<<10|x-56320|65536,B=null}else B&&(h[_++]=239,h[_++]=191,h[_++]=189,B=null);x<128?h[_++]=x:(x<2048?h[_++]=x>>6|192:(x<65536?h[_++]=x>>12|224:(h[_++]=x>>18|240,h[_++]=x>>12&63|128),h[_++]=x>>6&63|128),h[_++]=63&x|128)}return _})(this.buf,t,this.pos);const l=this.pos-r;l>=128&&b_(r,l,this),this.pos=r-1,this.writeVarint(l),this.pos+=l}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){const r=t.length;this.writeVarint(r),this.realloc(r);for(let l=0;l<r;l++)this.buf[this.pos++]=t[l]}writeRawMessage(t,r){this.pos++;const l=this.pos;t(r,this);const h=this.pos-l;h>=128&&b_(l,h,this),this.pos=l-1,this.writeVarint(h),this.pos+=h}writeMessage(t,r,l){this.writeTag(t,2),this.writeRawMessage(r,l)}writePackedVarint(t,r){r.length&&this.writeMessage(t,_v,r)}writePackedSVarint(t,r){r.length&&this.writeMessage(t,yv,r)}writePackedBoolean(t,r){r.length&&this.writeMessage(t,vv,r)}writePackedFloat(t,r){r.length&&this.writeMessage(t,bv,r)}writePackedDouble(t,r){r.length&&this.writeMessage(t,xv,r)}writePackedFixed32(t,r){r.length&&this.writeMessage(t,wv,r)}writePackedSFixed32(t,r){r.length&&this.writeMessage(t,Bv,r)}writePackedFixed64(t,r){r.length&&this.writeMessage(t,Tv,r)}writePackedSFixed64(t,r){r.length&&this.writeMessage(t,Sv,r)}writeBytesField(t,r){this.writeTag(t,2),this.writeBytes(r)}writeFixed32Field(t,r){this.writeTag(t,5),this.writeFixed32(r)}writeSFixed32Field(t,r){this.writeTag(t,5),this.writeSFixed32(r)}writeFixed64Field(t,r){this.writeTag(t,1),this.writeFixed64(r)}writeSFixed64Field(t,r){this.writeTag(t,1),this.writeSFixed64(r)}writeVarintField(t,r){this.writeTag(t,0),this.writeVarint(r)}writeSVarintField(t,r){this.writeTag(t,0),this.writeSVarint(r)}writeStringField(t,r){this.writeTag(t,2),this.writeString(r)}writeFloatField(t,r){this.writeTag(t,5),this.writeFloat(r)}writeDoubleField(t,r){this.writeTag(t,1),this.writeDouble(r)}writeBooleanField(t,r){this.writeVarintField(t,+r)}}function Yl(n,t,r){return r?4294967296*t+(n>>>0):4294967296*(t>>>0)+(n>>>0)}function b_(n,t,r){const l=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(l);for(let h=r.pos-1;h>=n;h--)r.buf[h+l]=r.buf[h]}function _v(n,t){for(let r=0;r<n.length;r++)t.writeVarint(n[r])}function yv(n,t){for(let r=0;r<n.length;r++)t.writeSVarint(n[r])}function bv(n,t){for(let r=0;r<n.length;r++)t.writeFloat(n[r])}function xv(n,t){for(let r=0;r<n.length;r++)t.writeDouble(n[r])}function vv(n,t){for(let r=0;r<n.length;r++)t.writeBoolean(n[r])}function wv(n,t){for(let r=0;r<n.length;r++)t.writeFixed32(n[r])}function Bv(n,t){for(let r=0;r<n.length;r++)t.writeSFixed32(n[r])}function Tv(n,t){for(let r=0;r<n.length;r++)t.writeFixed64(n[r])}function Sv(n,t){for(let r=0;r<n.length;r++)t.writeSFixed64(n[r])}function Ov(n,t,r){n===1&&r.readMessage(Pv,t)}function Pv(n,t,r){if(n===3){const{id:l,bitmap:h,width:m,height:_,left:x,top:B,advance:O}=r.readMessage(Cv,{});t.push({id:l,bitmap:new ku({width:m+6,height:_+6},h),metrics:{width:m,height:_,left:x,top:B,advance:O}})}}function Cv(n,t,r){n===1?t.id=r.readVarint():n===2?t.bitmap=r.readBytes():n===3?t.width=r.readVarint():n===4?t.height=r.readVarint():n===5?t.left=r.readSVarint():n===6?t.top=r.readSVarint():n===7&&(t.advance=r.readVarint())}function x_(n){let t=0,r=0;for(const _ of n)t+=_.w*_.h,r=Math.max(r,_.w);n.sort(((_,x)=>x.h-_.h));const l=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}];let h=0,m=0;for(const _ of n)for(let x=l.length-1;x>=0;x--){const B=l[x];if(!(_.w>B.w||_.h>B.h)){if(_.x=B.x,_.y=B.y,m=Math.max(m,_.y+_.h),h=Math.max(h,_.x+_.w),_.w===B.w&&_.h===B.h){const O=l.pop();O&&x<l.length&&(l[x]=O)}else _.h===B.h?(B.x+=_.w,B.w-=_.w):_.w===B.w?(B.y+=_.h,B.h-=_.h):(l.push({x:B.x+_.w,y:B.y,w:B.w-_.w,h:_.h}),B.y+=_.h,B.h-=_.h);break}}return{w:h,h:m,fill:t/(h*m)||0}}class rm{constructor(t,{pixelRatio:r,version:l,stretchX:h,stretchY:m,content:_,textFitWidth:x,textFitHeight:B}){this.paddedRect=t,this.pixelRatio=r,this.stretchX=h,this.stretchY=m,this.content=_,this.version=l,this.textFitWidth=x,this.textFitHeight=B}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class v_{constructor(t,r){const l={},h={};this.haveRenderCallbacks=[];const m=[];this.addImages(t,l,m),this.addImages(r,h,m);const{w:_,h:x}=x_(m),B=new an({width:_||1,height:x||1});for(const O in t){const P=t[O],I=l[O].paddedRect;an.copy(P.data,B,{x:0,y:0},{x:I.x+1,y:I.y+1},P.data)}for(const O in r){const P=r[O],I=h[O].paddedRect,k=I.x+1,z=I.y+1,N=P.data.width,Z=P.data.height;an.copy(P.data,B,{x:0,y:0},{x:k,y:z},P.data),an.copy(P.data,B,{x:0,y:Z-1},{x:k,y:z-1},{width:N,height:1}),an.copy(P.data,B,{x:0,y:0},{x:k,y:z+Z},{width:N,height:1}),an.copy(P.data,B,{x:N-1,y:0},{x:k-1,y:z},{width:1,height:Z}),an.copy(P.data,B,{x:0,y:0},{x:k+N,y:z},{width:1,height:Z})}this.image=B,this.iconPositions=l,this.patternPositions=h}addImages(t,r,l){for(const h in t){const m=t[h],_={x:0,y:0,w:m.data.width+2,h:m.data.height+2};l.push(_),r[h]=new rm(_,m),m.hasRenderCallback&&this.haveRenderCallbacks.push(h)}}patchUpdatedImages(t,r){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const l in t.updatedImages)this.patchUpdatedImage(this.iconPositions[l],t.getImage(l),r),this.patchUpdatedImage(this.patternPositions[l],t.getImage(l),r)}patchUpdatedImage(t,r,l){if(!t||!r||t.version===r.version)return;t.version=r.version;const[h,m]=t.tl;l.update(r.data,void 0,{x:h,y:m})}}var Ho;ft("ImagePosition",rm),ft("ImageAtlas",v_),v.ao=void 0,(Ho=v.ao||(v.ao={}))[Ho.none=0]="none",Ho[Ho.horizontal=1]="horizontal",Ho[Ho.vertical=2]="vertical",Ho[Ho.horizontalOnly=3]="horizontalOnly";class Gu{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(t,r,l){const h=new Gu;return h.scale=t||1,h.fontStack=r,h.verticalAlign=l||"bottom",h}static forImage(t,r){const l=new Gu;return l.imageName=t,l.verticalAlign=r||"bottom",l}}class Jl{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,r){const l=new Jl;for(let h=0;h<t.sections.length;h++){const m=t.sections[h];m.image?l.addImageSection(m):l.addTextSection(m,r)}return l}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(){this.text=(function(t){let r="";for(let l=0;l<t.length;l++){const h=t.charCodeAt(l+1)||null,m=t.charCodeAt(l-1)||null;r+=h&&Pp(h)&&!Vu[t[l+1]]||m&&Pp(m)&&!Vu[t[l-1]]||!Vu[t[l]]?t[l]:Vu[t[l]]}return r})(this.text)}trim(){let t=0;for(let l=0;l<this.text.length&&Np[this.text.charCodeAt(l)];l++)t++;let r=this.text.length;for(let l=this.text.length-1;l>=0&&l>=t&&Np[this.text.charCodeAt(l)];l--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)}substring(t,r){const l=new Jl;return l.text=this.text.substring(t,r),l.sectionIndex=this.sectionIndex.slice(t,r),l.sections=this.sections,l}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,r)=>Math.max(t,this.sections[r].scale)),0)}getMaxImageSize(t){let r=0,l=0;for(let h=0;h<this.length();h++){const m=this.getSection(h);if(m.imageName){const _=t[m.imageName];if(!_)continue;const x=_.displaySize;r=Math.max(r,x[0]),l=Math.max(l,x[1])}}return{maxImageWidth:r,maxImageHeight:l}}addTextSection(t,r){this.text+=t.text,this.sections.push(Gu.forText(t.scale,t.fontStack||r,t.verticalAlign));const l=this.sections.length-1;for(let h=0;h<t.text.length;++h)this.sectionIndex.push(l)}addImageSection(t){const r=t.image?t.image.name:"";if(r.length===0)return void be("Can't add FormattedSection with an empty image.");const l=this.getNextImageSectionCharCode();l?(this.text+=String.fromCharCode(l),this.sections.push(Gu.forImage(r,t.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):be("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Fp(n,t,r,l,h,m,_,x,B,O,P,I,k,z,N){const Z=Jl.fromFeature(n,h);let K;I===v.ao.vertical&&Z.verticalizePunctuation();const{processBidirectionalText:ee,processStyledBidirectionalText:_e}=Bn;if(ee&&Z.sections.length===1){K=[];const Be=ee(Z.toString(),nm(Z,O,m,t,l,z));for(const Ee of Be){const Ve=new Jl;Ve.text=Ee,Ve.sections=Z.sections;for(let it=0;it<Ee.length;it++)Ve.sectionIndex.push(0);K.push(Ve)}}else if(_e){K=[];const Be=_e(Z.text,Z.sectionIndex,nm(Z,O,m,t,l,z));for(const Ee of Be){const Ve=new Jl;Ve.text=Ee[0],Ve.sectionIndex=Ee[1],Ve.sections=Z.sections,K.push(Ve)}}else K=(function(Be,Ee){const Ve=[],it=Be.text;let Ke=0;for(const et of Ee)Ve.push(Be.substring(Ke,et)),Ke=et;return Ke<it.length&&Ve.push(Be.substring(Ke,it.length)),Ve})(Z,nm(Z,O,m,t,l,z));const oe=[],he={positionedLines:oe,text:Z.toString(),top:P[1],bottom:P[1],left:P[0],right:P[0],writingMode:I,iconsInText:!1,verticalizable:!1};return(function(Be,Ee,Ve,it,Ke,et,Bt,Qe,tt,Le,Rt,zt){let St=0,xt=0,li=0,Hi=0;const hr=Qe==="right"?1:Qe==="left"?0:.5,Rr=xr/zt;let En=0;for(const Fi of Ke){Fi.trim();const vr=Fi.getMaxScale(),Er={positionedGlyphs:[],lineOffset:0};Be.positionedLines[En]=Er;const Mr=Er.positionedGlyphs;let Kr=0;if(!Fi.length()){xt+=et,++En;continue}const Mn=Av(it,Fi,Rr);for(let cn=0;cn<Fi.length();cn++){const pr=Fi.getSection(cn),Br=Fi.getSectionIndex(cn),Tr=Fi.getCharCode(cn),sr=jv(tt,Rt,Tr);let ji;if(pr.imageName){if(Be.iconsInText=!0,pr.scale=pr.scale*Rr,ji=Rv(pr,sr,vr,Mn,it),!ji)continue;Kr=Math.max(Kr,ji.imageOffset)}else if(ji=kv(pr,Tr,sr,Mn,Ee,Ve),!ji)continue;const{rect:us,metrics:ic,baselineOffset:hs}=ji;Mr.push({glyph:Tr,imageName:pr.imageName,x:St,y:xt+hs+-17,vertical:sr,scale:pr.scale,fontStack:pr.fontStack,sectionIndex:Br,metrics:ic,rect:us}),sr?(Be.verticalizable=!0,St+=(pr.imageName?ic.advance:xr)*pr.scale+Le):St+=ic.advance*pr.scale+Le}Mr.length!==0&&(li=Math.max(St-Le,li),Dv(Mr,0,Mr.length-1,hr)),St=0,Er.lineOffset=Math.max(Kr,(vr-1)*xr);const wr=et*vr+Kr;xt+=wr,Hi=Math.max(wr,Hi),++En}const{horizontalAlign:ln,verticalAlign:Cr}=sm(Bt);(function(Fi,vr,Er,Mr,Kr,Mn,wr,cn,pr){const Br=(vr-Er)*Kr;let Tr=0;Tr=Mn!==wr?-cn*Mr- -17:-Mr*pr*wr+.5*wr;for(const sr of Fi)for(const ji of sr.positionedGlyphs)ji.x+=Br,ji.y+=Tr})(Be.positionedLines,hr,ln,Cr,li,Hi,et,xt,Ke.length),Be.top+=-Cr*xt,Be.bottom=Be.top+xt,Be.left+=-ln*li,Be.right=Be.left+li})(he,t,r,l,K,_,x,B,I,O,k,N),!(function(Be){for(const Ee of Be)if(Ee.positionedGlyphs.length!==0)return!1;return!0})(oe)&&he}const Np={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ev={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Mv={40:!0};function w_(n,t,r,l,h,m){if(t.imageName){const _=l[t.imageName];return _?_.displaySize[0]*t.scale*xr/m+h:0}{const _=r[t.fontStack],x=_&&_[n];return x?x.metrics.advance*t.scale+h:0}}function B_(n,t,r,l){const h=Math.pow(n-t,2);return l?n<t?h/2:2*h:h+Math.abs(r)*r}function Iv(n,t,r){let l=0;return n===10&&(l-=1e4),r&&(l+=150),n!==40&&n!==65288||(l+=50),t!==41&&t!==65289||(l+=50),l}function T_(n,t,r,l,h,m){let _=null,x=B_(t,r,h,m);for(const B of l){const O=B_(t-B.x,r,h,m)+B.badness;O<=x&&(_=B,x=O)}return{index:n,x:t,priorBreak:_,badness:x}}function S_(n){return n?S_(n.priorBreak).concat(n.index):[]}function nm(n,t,r,l,h,m){if(!n)return[];const _=[],x=(function(I,k,z,N,Z,K){let ee=0;for(let _e=0;_e<I.length();_e++){const oe=I.getSection(_e);ee+=w_(I.getCharCode(_e),oe,N,Z,k,K)}return ee/Math.max(1,Math.ceil(ee/z))})(n,t,r,l,h,m),B=n.text.indexOf("​")>=0;let O=0;for(let I=0;I<n.length();I++){const k=n.getSection(I),z=n.getCharCode(I);if(Np[z]||(O+=w_(z,k,l,h,t,m)),I<n.length()-1){const N=!((P=z)<11904)&&(!!ai["CJK Compatibility Forms"](P)||!!ai["CJK Compatibility"](P)||!!ai["CJK Strokes"](P)||!!ai["CJK Symbols and Punctuation"](P)||!!ai["Enclosed CJK Letters and Months"](P)||!!ai["Halfwidth and Fullwidth Forms"](P)||!!ai["Ideographic Description Characters"](P)||!!ai["Vertical Forms"](P)||gu.test(String.fromCodePoint(P)));(Ev[z]||N||k.imageName||I!==n.length()-2&&Mv[n.getCharCode(I+1)])&&_.push(T_(I+1,O,x,_,Iv(z,n.getCharCode(I+1),N&&B),!1))}}var P;return S_(T_(n.length(),O,x,_,0,!0))}function sm(n){let t=.5,r=.5;switch(n){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(n){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function Av(n,t,r){const l=t.getMaxScale()*xr,{maxImageWidth:h,maxImageHeight:m}=t.getMaxImageSize(n),_=Math.max(l,m*r);return{verticalLineContentWidth:Math.max(l,h*r),horizontalLineContentHeight:_}}function O_(n){switch(n){case"top":return 0;case"center":return .5;default:return 1}}function jv(n,t,r){return!(n===v.ao.horizontal||!t&&!_u(r)||t&&(Np[r]||(l=r,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(l)))));var l}function kv(n,t,r,l,h,m){const _=m[n.fontStack],x=(function(O,P,I,k){if(O&&O.rect)return O;const z=P[I.fontStack],N=z&&z[k];return N?{rect:null,metrics:N.metrics}:null})(_&&_[t],h,n,t);if(x===null)return null;let B;if(r)B=l.verticalLineContentWidth-n.scale*xr;else{const O=O_(n.verticalAlign);B=(l.horizontalLineContentHeight-n.scale*xr)*O}return{rect:x.rect,metrics:x.metrics,baselineOffset:B}}function Rv(n,t,r,l,h){const m=h[n.imageName];if(!m)return null;const _=m.paddedRect,x=m.displaySize,B={width:x[0],height:x[1],left:1,top:-3,advance:t?x[1]:x[0]};let O;if(t)O=l.verticalLineContentWidth-x[1]*n.scale;else{const P=O_(n.verticalAlign);O=(l.horizontalLineContentHeight-x[1]*n.scale)*P}return{rect:_,metrics:B,baselineOffset:O,imageOffset:(t?x[0]:x[1])*n.scale-xr*r}}function Dv(n,t,r,l){if(l===0)return;const h=n[r],m=(n[r].x+h.metrics.advance*h.scale)*l;for(let _=t;_<=r;_++)n[_].x-=m}function Lv(n,t,r){const{horizontalAlign:l,verticalAlign:h}=sm(r),m=t[0]-n.displaySize[0]*l,_=t[1]-n.displaySize[1]*h;return{image:n,top:_,bottom:_+n.displaySize[1],left:m,right:m+n.displaySize[0]}}function P_(n){var t,r;let l=n.left,h=n.top,m=n.right-l,_=n.bottom-h;const x=(t=n.image.textFitWidth)!==null&&t!==void 0?t:"stretchOrShrink",B=(r=n.image.textFitHeight)!==null&&r!==void 0?r:"stretchOrShrink",O=(n.image.content[2]-n.image.content[0])/(n.image.content[3]-n.image.content[1]);if(B==="proportional"){if(x==="stretchOnly"&&m/_<O||x==="proportional"){const P=Math.ceil(_*O);l*=P/m,m=P}}else if(x==="proportional"&&B==="stretchOnly"&&O!==0&&m/_>O){const P=Math.ceil(m/O);h*=P/_,_=P}return{x1:l,y1:h,x2:l+m,y2:h+_}}function C_(n,t,r,l,h,m){const _=n.image;let x;if(_.content){const K=_.content,ee=_.pixelRatio||1;x=[K[0]/ee,K[1]/ee,_.displaySize[0]-K[2]/ee,_.displaySize[1]-K[3]/ee]}const B=t.left*m,O=t.right*m;let P,I,k,z;r==="width"||r==="both"?(z=h[0]+B-l[3],I=h[0]+O+l[1]):(z=h[0]+(B+O-_.displaySize[0])/2,I=z+_.displaySize[0]);const N=t.top*m,Z=t.bottom*m;return r==="height"||r==="both"?(P=h[1]+N-l[0],k=h[1]+Z+l[2]):(P=h[1]+(N+Z-_.displaySize[1])/2,k=P+_.displaySize[1]),{image:_,top:P,right:I,bottom:k,left:z,collisionPadding:x}}const ao=128,Zo=32640;function E_(n,t){const{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Oi(n+1))};if(r.kind==="source")return{kind:"source"};{const{zoomStops:l,interpolationType:h}=r;let m=0;for(;m<l.length&&l[m]<=n;)m++;m=Math.max(0,m-1);let _=m;for(;_<l.length&&l[_]<n+1;)_++;_=Math.min(l.length-1,_);const x=l[m],B=l[_];return r.kind==="composite"?{kind:"composite",minZoom:x,maxZoom:B,interpolationType:h}:{kind:"camera",minZoom:x,maxZoom:B,minSize:r.evaluate(new Oi(x)),maxSize:r.evaluate(new Oi(B)),interpolationType:h}}}function om(n,t,r){let l="never";const h=n.get(t);return h?l=h:n.get(r)&&(l="always"),l}const zv=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function $p(n,t,r,l,h,m,_,x,B,O,P,I,k){const z=x?Math.min(Zo,Math.round(x[0])):0,N=x?Math.min(Zo,Math.round(x[1])):0;n.emplaceBack(t,r,Math.round(32*l),Math.round(32*h),m,_,(z<<1)+(B?1:0),N,16*O,16*P,256*I,256*k)}function am(n,t,r){n.emplaceBack(t.x,t.y,r),n.emplaceBack(t.x,t.y,r),n.emplaceBack(t.x,t.y,r),n.emplaceBack(t.x,t.y,r)}function Fv(n){for(const t of n.sections)if(Mp(t.text))return!0;return!1}class lm{constructor(t){this.layoutVertexArray=new $e,this.indexArray=new gi,this.programConfigurations=t,this.segments=new Vt,this.dynamicLayoutVertexArray=new bt,this.opacityVertexArray=new Xt,this.hasVisibleVertices=!1,this.placedSymbolArray=new Y}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,r,l,h){this.isEmpty()||(l&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,pv.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,r),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,dv.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,zv,!0),this.opacityVertexBuffer.itemSize=1),(l||h)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}ft("SymbolBuffers",lm);class cm{constructor(t,r,l){this.layoutVertexArray=new t,this.layoutAttributes=r,this.indexArray=new l,this.segments=new Vt,this.collisionVertexArray=new zi}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,fv.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}ft("CollisionBuffers",cm);class Ql{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((_=>_.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=E_(this.zoom,r["text-size"]),this.iconSizeData=E_(this.zoom,r["icon-size"]);const l=this.layers[0].layout,h=l.get("symbol-sort-key"),m=l.get("symbol-z-order");this.canOverlap=om(l,"text-overlap","text-allow-overlap")!=="never"||om(l,"icon-overlap","icon-allow-overlap")!=="never"||l.get("text-ignore-placement")||l.get("icon-ignore-placement"),this.sortFeaturesByKey=m!=="viewport-y"&&!h.isConstant(),this.sortFeaturesByY=(m==="viewport-y"||m==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,l.get("symbol-placement")==="point"&&(this.writingModes=l.get("text-writing-mode").map((_=>v.ao[_]))),this.stateDependentLayerIds=this.layers.filter((_=>_.isStateDependent())).map((_=>_.id)),this.sourceID=t.sourceID}createArrays(){this.text=new lm(new As(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new lm(new As(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new Q,this.lineVertexArray=new ne,this.symbolInstances=new J,this.textAnchorOffsets=new le}calculateGlyphDependencies(t,r,l,h,m){for(let _=0;_<t.length;_++)if(r[t.charCodeAt(_)]=!0,(l||h)&&m){const x=Vu[t.charAt(_)];x&&(r[x.charCodeAt(0)]=!0)}}populate(t,r,l){const h=this.layers[0],m=h.layout,_=m.get("text-font"),x=m.get("text-field"),B=m.get("icon-image"),O=(x.value.kind!=="constant"||x.value.value instanceof zr&&!x.value.value.isEmpty()||x.value.value.toString().length>0)&&(_.value.kind!=="constant"||_.value.value.length>0),P=B.value.kind!=="constant"||!!B.value.value||Object.keys(B.parameters).length>0,I=m.get("symbol-sort-key");if(this.features=[],!O&&!P)return;const k=r.iconDependencies,z=r.glyphDependencies,N=r.availableImages,Z=new Oi(this.zoom);for(const{feature:K,id:ee,index:_e,sourceLayerIndex:oe}of t){const he=h._featureFilter.needGeometry,Be=Fa(K,he);if(!h._featureFilter.filter(Z,Be,l))continue;let Ee,Ve;if(he||(Be.geometry=cs(K)),O){const Ke=h.getValueAndResolveTokens("text-field",Be,l,N),et=zr.factory(Ke),Bt=this.hasRTLText=this.hasRTLText||Fv(et);(!Bt||Bn.getRTLTextPluginStatus()==="unavailable"||Bt&&Bn.isParsed())&&(Ee=gv(et,h,Be))}if(P){const Ke=h.getValueAndResolveTokens("icon-image",Be,l,N);Ve=Ke instanceof tn?Ke:tn.fromString(Ke)}if(!Ee&&!Ve)continue;const it=this.sortFeaturesByKey?I.evaluate(Be,{},l):void 0;if(this.features.push({id:ee,text:Ee,icon:Ve,index:_e,sourceLayerIndex:oe,geometry:Be.geometry,properties:K.properties,type:Xl.types[K.type],sortKey:it}),Ve&&(k[Ve.name]=!0),Ee){const Ke=_.evaluate(Be,{},l).join(","),et=m.get("text-rotation-alignment")!=="viewport"&&m.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(v.ao.vertical)>=0;for(const Bt of Ee.sections)if(Bt.image)k[Bt.image.name]=!0;else{const Qe=Ll(Ee.toString()),tt=Bt.fontStack||Ke,Le=z[tt]=z[tt]||{};this.calculateGlyphDependencies(Bt.text,Le,et,this.allowVerticalPlacement,Qe)}}}m.get("symbol-placement")==="line"&&(this.features=(function(K){const ee={},_e={},oe=[];let he=0;function Be(Ke){oe.push(K[Ke]),he++}function Ee(Ke,et,Bt){const Qe=_e[Ke];return delete _e[Ke],_e[et]=Qe,oe[Qe].geometry[0].pop(),oe[Qe].geometry[0]=oe[Qe].geometry[0].concat(Bt[0]),Qe}function Ve(Ke,et,Bt){const Qe=ee[et];return delete ee[et],ee[Ke]=Qe,oe[Qe].geometry[0].shift(),oe[Qe].geometry[0]=Bt[0].concat(oe[Qe].geometry[0]),Qe}function it(Ke,et,Bt){const Qe=Bt?et[0][et[0].length-1]:et[0][0];return`${Ke}:${Qe.x}:${Qe.y}`}for(let Ke=0;Ke<K.length;Ke++){const et=K[Ke],Bt=et.geometry,Qe=et.text?et.text.toString():null;if(!Qe){Be(Ke);continue}const tt=it(Qe,Bt),Le=it(Qe,Bt,!0);if(tt in _e&&Le in ee&&_e[tt]!==ee[Le]){const Rt=Ve(tt,Le,Bt),zt=Ee(tt,Le,oe[Rt].geometry);delete ee[tt],delete _e[Le],_e[it(Qe,oe[zt].geometry,!0)]=zt,oe[Rt].geometry=null}else tt in _e?Ee(tt,Le,Bt):Le in ee?Ve(tt,Le,Bt):(Be(Ke),ee[tt]=he-1,_e[Le]=he-1)}return oe.filter((Ke=>Ke.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((K,ee)=>K.sortKey-ee.sortKey))}update(t,r,l){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,r,this.layers,{imagePositions:l}),this.icon.programConfigurations.updatePaintArrays(t,r,this.layers,{imagePositions:l}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,r){const l=this.lineVertexArray.length;if(t.segment!==void 0){let h=t.dist(r[t.segment+1]),m=t.dist(r[t.segment]);const _={};for(let x=t.segment+1;x<r.length;x++)_[x]={x:r[x].x,y:r[x].y,tileUnitDistanceFromAnchor:h},x<r.length-1&&(h+=r[x+1].dist(r[x]));for(let x=t.segment||0;x>=0;x--)_[x]={x:r[x].x,y:r[x].y,tileUnitDistanceFromAnchor:m},x>0&&(m+=r[x-1].dist(r[x]));for(let x=0;x<r.length;x++){const B=_[x];this.lineVertexArray.emplaceBack(B.x,B.y,B.tileUnitDistanceFromAnchor)}}return{lineStartIndex:l,lineLength:this.lineVertexArray.length-l}}addSymbols(t,r,l,h,m,_,x,B,O,P,I,k){const z=t.indexArray,N=t.layoutVertexArray,Z=t.segments.prepareSegment(4*r.length,N,z,this.canOverlap?_.sortKey:void 0),K=this.glyphOffsetArray.length,ee=Z.vertexLength,_e=this.allowVerticalPlacement&&x===v.ao.vertical?Math.PI/2:0,oe=_.text&&_.text.sections;for(let he=0;he<r.length;he++){const{tl:Be,tr:Ee,bl:Ve,br:it,tex:Ke,pixelOffsetTL:et,pixelOffsetBR:Bt,minFontScaleX:Qe,minFontScaleY:tt,glyphOffset:Le,isSDF:Rt,sectionIndex:zt}=r[he],St=Z.vertexLength,xt=Le[1];$p(N,B.x,B.y,Be.x,xt+Be.y,Ke.x,Ke.y,l,Rt,et.x,et.y,Qe,tt),$p(N,B.x,B.y,Ee.x,xt+Ee.y,Ke.x+Ke.w,Ke.y,l,Rt,Bt.x,et.y,Qe,tt),$p(N,B.x,B.y,Ve.x,xt+Ve.y,Ke.x,Ke.y+Ke.h,l,Rt,et.x,Bt.y,Qe,tt),$p(N,B.x,B.y,it.x,xt+it.y,Ke.x+Ke.w,Ke.y+Ke.h,l,Rt,Bt.x,Bt.y,Qe,tt),am(t.dynamicLayoutVertexArray,B,_e),z.emplaceBack(St,St+2,St+1),z.emplaceBack(St+1,St+2,St+3),Z.vertexLength+=4,Z.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Le[0]),he!==r.length-1&&zt===r[he+1].sectionIndex||t.programConfigurations.populatePaintArrays(N.length,_,_.index,{imagePositions:{},canonical:k,formattedSection:oe&&oe[zt]})}t.placedSymbolArray.emplaceBack(B.x,B.y,K,this.glyphOffsetArray.length-K,ee,O,P,B.segment,l?l[0]:0,l?l[1]:0,h[0],h[1],x,0,!1,0,I)}_addCollisionDebugVertex(t,r,l,h,m,_){return r.emplaceBack(0,0),t.emplaceBack(l.x,l.y,h,m,Math.round(_.x),Math.round(_.y))}addCollisionDebugVertices(t,r,l,h,m,_,x){const B=m.segments.prepareSegment(4,m.layoutVertexArray,m.indexArray),O=B.vertexLength,P=m.layoutVertexArray,I=m.collisionVertexArray,k=x.anchorX,z=x.anchorY;this._addCollisionDebugVertex(P,I,_,k,z,new M(t,r)),this._addCollisionDebugVertex(P,I,_,k,z,new M(l,r)),this._addCollisionDebugVertex(P,I,_,k,z,new M(l,h)),this._addCollisionDebugVertex(P,I,_,k,z,new M(t,h)),B.vertexLength+=4;const N=m.indexArray;N.emplaceBack(O,O+1),N.emplaceBack(O+1,O+2),N.emplaceBack(O+2,O+3),N.emplaceBack(O+3,O),B.primitiveLength+=4}addDebugCollisionBoxes(t,r,l,h){for(let m=t;m<r;m++){const _=this.collisionBoxArray.get(m);this.addCollisionDebugVertices(_.x1,_.y1,_.x2,_.y2,h?this.textCollisionBox:this.iconCollisionBox,_.anchorPoint,l)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new cm(mi,g_.members,Ai),this.iconCollisionBox=new cm(mi,g_.members,Ai);for(let t=0;t<this.symbolInstances.length;t++){const r=this.symbolInstances.get(t);this.addDebugCollisionBoxes(r.textBoxStartIndex,r.textBoxEndIndex,r,!0),this.addDebugCollisionBoxes(r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r,!0),this.addDebugCollisionBoxes(r.iconBoxStartIndex,r.iconBoxEndIndex,r,!1),this.addDebugCollisionBoxes(r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex,r,!1)}}_deserializeCollisionBoxesForSymbol(t,r,l,h,m,_,x,B,O){const P={};for(let I=r;I<l;I++){const k=t.get(I);P.textBox={x1:k.x1,y1:k.y1,x2:k.x2,y2:k.y2,anchorPointX:k.anchorPointX,anchorPointY:k.anchorPointY},P.textFeatureIndex=k.featureIndex;break}for(let I=h;I<m;I++){const k=t.get(I);P.verticalTextBox={x1:k.x1,y1:k.y1,x2:k.x2,y2:k.y2,anchorPointX:k.anchorPointX,anchorPointY:k.anchorPointY},P.verticalTextFeatureIndex=k.featureIndex;break}for(let I=_;I<x;I++){const k=t.get(I);P.iconBox={x1:k.x1,y1:k.y1,x2:k.x2,y2:k.y2,anchorPointX:k.anchorPointX,anchorPointY:k.anchorPointY},P.iconFeatureIndex=k.featureIndex;break}for(let I=B;I<O;I++){const k=t.get(I);P.verticalIconBox={x1:k.x1,y1:k.y1,x2:k.x2,y2:k.y2,anchorPointX:k.anchorPointX,anchorPointY:k.anchorPointY},P.verticalIconFeatureIndex=k.featureIndex;break}return P}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let r=0;r<this.symbolInstances.length;r++){const l=this.symbolInstances.get(r);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,l.textBoxStartIndex,l.textBoxEndIndex,l.verticalTextBoxStartIndex,l.verticalTextBoxEndIndex,l.iconBoxStartIndex,l.iconBoxEndIndex,l.verticalIconBoxStartIndex,l.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(t,r){const l=t.placedSymbolArray.get(r),h=l.vertexStartIndex+4*l.numGlyphs;for(let m=l.vertexStartIndex;m<h;m+=4)t.indexArray.emplaceBack(m,m+2,m+1),t.indexArray.emplaceBack(m+1,m+2,m+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const r=Math.sin(t),l=Math.cos(t),h=[],m=[],_=[];for(let x=0;x<this.symbolInstances.length;++x){_.push(x);const B=this.symbolInstances.get(x);h.push(0|Math.round(r*B.anchorX+l*B.anchorY)),m.push(B.featureIndex)}return _.sort(((x,B)=>h[x]-h[B]||m[B]-m[x])),_}addToSortKeyRanges(t,r){const l=this.sortKeyRanges[this.sortKeyRanges.length-1];l&&l.sortKey===r?l.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const r of this.symbolInstanceIndexes){const l=this.symbolInstances.get(r);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach(((h,m,_)=>{h>=0&&_.indexOf(h)===m&&this.addIndicesForPlacedSymbol(this.text,h)})),l.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,l.verticalPlacedTextSymbolIndex),l.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.placedIconSymbolIndex),l.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let M_,I_;ft("SymbolBucket",Ql,{omit:["layers","collisionBoxArray","features","compareText"]}),Ql.MAX_GLYPHS=65535,Ql.addDynamicAttributes=am;var um={get paint(){return I_=I_||new $r({"icon-opacity":new Mt(ye.paint_symbol["icon-opacity"]),"icon-color":new Mt(ye.paint_symbol["icon-color"]),"icon-halo-color":new Mt(ye.paint_symbol["icon-halo-color"]),"icon-halo-width":new Mt(ye.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Mt(ye.paint_symbol["icon-halo-blur"]),"icon-translate":new wt(ye.paint_symbol["icon-translate"]),"icon-translate-anchor":new wt(ye.paint_symbol["icon-translate-anchor"]),"text-opacity":new Mt(ye.paint_symbol["text-opacity"]),"text-color":new Mt(ye.paint_symbol["text-color"],{runtimeType:Or,getOverride:n=>n.textColor,hasOverride:n=>!!n.textColor}),"text-halo-color":new Mt(ye.paint_symbol["text-halo-color"]),"text-halo-width":new Mt(ye.paint_symbol["text-halo-width"]),"text-halo-blur":new Mt(ye.paint_symbol["text-halo-blur"]),"text-translate":new wt(ye.paint_symbol["text-translate"]),"text-translate-anchor":new wt(ye.paint_symbol["text-translate-anchor"])})},get layout(){return M_=M_||new $r({"symbol-placement":new wt(ye.layout_symbol["symbol-placement"]),"symbol-spacing":new wt(ye.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wt(ye.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Mt(ye.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wt(ye.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wt(ye.layout_symbol["icon-allow-overlap"]),"icon-overlap":new wt(ye.layout_symbol["icon-overlap"]),"icon-ignore-placement":new wt(ye.layout_symbol["icon-ignore-placement"]),"icon-optional":new wt(ye.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wt(ye.layout_symbol["icon-rotation-alignment"]),"icon-size":new Mt(ye.layout_symbol["icon-size"]),"icon-text-fit":new wt(ye.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wt(ye.layout_symbol["icon-text-fit-padding"]),"icon-image":new Mt(ye.layout_symbol["icon-image"]),"icon-rotate":new Mt(ye.layout_symbol["icon-rotate"]),"icon-padding":new Mt(ye.layout_symbol["icon-padding"]),"icon-keep-upright":new wt(ye.layout_symbol["icon-keep-upright"]),"icon-offset":new Mt(ye.layout_symbol["icon-offset"]),"icon-anchor":new Mt(ye.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wt(ye.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wt(ye.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wt(ye.layout_symbol["text-rotation-alignment"]),"text-field":new Mt(ye.layout_symbol["text-field"]),"text-font":new Mt(ye.layout_symbol["text-font"]),"text-size":new Mt(ye.layout_symbol["text-size"]),"text-max-width":new Mt(ye.layout_symbol["text-max-width"]),"text-line-height":new wt(ye.layout_symbol["text-line-height"]),"text-letter-spacing":new Mt(ye.layout_symbol["text-letter-spacing"]),"text-justify":new Mt(ye.layout_symbol["text-justify"]),"text-radial-offset":new Mt(ye.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wt(ye.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Mt(ye.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Mt(ye.layout_symbol["text-anchor"]),"text-max-angle":new wt(ye.layout_symbol["text-max-angle"]),"text-writing-mode":new wt(ye.layout_symbol["text-writing-mode"]),"text-rotate":new Mt(ye.layout_symbol["text-rotate"]),"text-padding":new wt(ye.layout_symbol["text-padding"]),"text-keep-upright":new wt(ye.layout_symbol["text-keep-upright"]),"text-transform":new Mt(ye.layout_symbol["text-transform"]),"text-offset":new Mt(ye.layout_symbol["text-offset"]),"text-allow-overlap":new wt(ye.layout_symbol["text-allow-overlap"]),"text-overlap":new wt(ye.layout_symbol["text-overlap"]),"text-ignore-placement":new wt(ye.layout_symbol["text-ignore-placement"]),"text-optional":new wt(ye.layout_symbol["text-optional"])})}};class A_{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:Bo,this.defaultValue=t}evaluate(t){if(t.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(t.formattedSection))return r.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ft("FormatSectionOverride",A_,{omit:["defaultValue"]});class Up extends Tn{constructor(t,r){super(t,um,r)}recalculate(t,r){if(super.recalculate(t,r),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 l=this.layout.get("text-writing-mode");if(l){const h=[];for(const m of l)h.indexOf(m)<0&&h.push(m);this.layout._values["text-writing-mode"]=h}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,l,h){const m=this.layout.get(t).evaluate(r,{},l,h),_=this._unevaluatedLayout._values[t];return _.isDataDriven()||El(_.value)||!m?m:(function(x,B){return B.replace(/{([^{}]+)}/g,((O,P)=>x&&P in x?String(x[P]):""))})(r.properties,m)}createBucket(t){return new Ql(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of um.paint.overridableProperties){if(!Up.hasPaintOverride(this.layout,t))continue;const r=this.paint.get(t),l=new A_(r),h=new nu(l,r.property.specification);let m=null;m=r.value.kind==="constant"||r.value.kind==="source"?new Ea("source",h):new su("composite",h,r.value.zoomStops),this.paint._values[t]=new Gn(r.property,m,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,l){return!(!this.layout||r.isDataDriven()||l.isDataDriven())&&Up.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){const l=t.get("text-field"),h=um.paint.properties[r];let m=!1;const _=x=>{for(const B of x)if(h.overrides&&h.overrides.hasOverride(B))return void(m=!0)};if(l.value.kind==="constant"&&l.value.value instanceof zr)_(l.value.value.sections);else if(l.value.kind==="source"||l.value.kind==="composite"){const x=O=>{m||(O instanceof rs&&kt(O.value)===ws?_(O.value.sections):O instanceof qs?_(O.sections):O.eachChild(x))},B=l.value;B._styleExpression&&x(B._styleExpression.expression)}return m}}let j_;var Nv={get paint(){return j_=j_||new $r({"background-color":new wt(ye.paint_background["background-color"]),"background-pattern":new Tu(ye.paint_background["background-pattern"]),"background-opacity":new wt(ye.paint_background["background-opacity"])})}};class $v extends Tn{constructor(t,r){super(t,Nv,r)}}let k_;var Uv={get paint(){return k_=k_||new $r({"raster-opacity":new wt(ye.paint_raster["raster-opacity"]),"raster-hue-rotate":new wt(ye.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new wt(ye.paint_raster["raster-brightness-min"]),"raster-brightness-max":new wt(ye.paint_raster["raster-brightness-max"]),"raster-saturation":new wt(ye.paint_raster["raster-saturation"]),"raster-contrast":new wt(ye.paint_raster["raster-contrast"]),"raster-resampling":new wt(ye.paint_raster["raster-resampling"]),"raster-fade-duration":new wt(ye.paint_raster["raster-fade-duration"])})}};class Vv extends Tn{constructor(t,r){super(t,Uv,r)}}class Gv extends Tn{constructor(t,r){super(t,{},r),this.onAdd=l=>{this.implementation.onAdd&&this.implementation.onAdd(l,l.painter.context.gl)},this.onRemove=l=>{this.implementation.onRemove&&this.implementation.onRemove(l,l.painter.context.gl)},this.implementation=t}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 Hv{constructor(t){this._methodToThrottle=t,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 Zv={once:!0},hm=63710088e-1;class qo{constructor(t,r){if(isNaN(t)||isNaN(r))throw new Error(`Invalid LngLat object: (${t}, ${r})`);if(this.lng=+t,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new qo(De(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const r=Math.PI/180,l=this.lat*r,h=t.lat*r,m=Math.sin(l)*Math.sin(h)+Math.cos(l)*Math.cos(h)*Math.cos((t.lng-this.lng)*r);return hm*Math.acos(Math.min(m,1))}static convert(t){if(t instanceof qo)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new qo(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new qo(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const R_=2*Math.PI*hm;function D_(n){return R_*Math.cos(n*Math.PI/180)}function L_(n){return(180+n)/360}function z_(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function F_(n,t){return n/D_(t)}function pm(n){return 360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90}function N_(n,t){return n*D_(pm(t))}class Hu{constructor(t,r,l=0){this.x=+t,this.y=+r,this.z=+l}static fromLngLat(t,r=0){const l=qo.convert(t);return new Hu(L_(l.lng),z_(l.lat),F_(r,l.lat))}toLngLat(){return new qo(360*this.x-180,pm(this.y))}toAltitude(){return N_(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/R_*(t=pm(this.y),1/Math.cos(t*Math.PI/180));var t}}function $_(n,t,r){var l=2*Math.PI*6378137/256/Math.pow(2,r);return[n*l-2*Math.PI*6378137/2,t*l-2*Math.PI*6378137/2]}class dm{constructor(t,r,l){if(!(function(h,m,_){return!(h<0||h>25||_<0||_>=Math.pow(2,h)||m<0||m>=Math.pow(2,h))})(t,r,l))throw new Error(`x=${r}, y=${l}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=r,this.y=l,this.key=ec(0,t,t,r,l)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,r,l){const h=(_=this.y,x=this.z,B=$_(256*(m=this.x),256*(_=Math.pow(2,x)-_-1),x),O=$_(256*(m+1),256*(_+1),x),B[0]+","+B[1]+","+O[0]+","+O[1]);var m,_,x,B,O;const P=(function(I,k,z){let N,Z="";for(let K=I;K>0;K--)N=1<<K-1,Z+=(k&N?1:0)+(z&N?2:0);return Z})(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(l==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,r>1?"@2x":"").replace(/{quadkey}/g,P).replace(/{bbox-epsg-3857}/g,h)}isChildOf(t){const r=this.z-t.z;return r>0&&t.x===this.x>>r&&t.y===this.y>>r}getTilePoint(t){const r=Math.pow(2,this.z);return new M((t.x*r-this.x)*Ft,(t.y*r-this.y)*Ft)}toString(){return`${this.z}/${this.x}/${this.y}`}}class U_{constructor(t,r){this.wrap=t,this.canonical=r,this.key=ec(t,r.z,r.z,r.x,r.y)}}class Cn{constructor(t,r,l,h,m){if(this.terrainRttPosMatrix32f=null,t<l)throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${l}`);this.overscaledZ=t,this.wrap=r,this.canonical=new dm(l,+h,+m),this.key=ec(r,t,l,h,m)}clone(){return new Cn(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-t;return t>this.canonical.z?new Cn(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Cn(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(t,r){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const l=this.canonical.z-t;return t>this.canonical.z?ec(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):ec(this.wrap*+r,t,t,this.canonical.x>>l,this.canonical.y>>l)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const r=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new Cn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,l=2*this.canonical.x,h=2*this.canonical.y;return[new Cn(r,this.wrap,r,l,h),new Cn(r,this.wrap,r,l+1,h),new Cn(r,this.wrap,r,l,h+1),new Cn(r,this.wrap,r,l+1,h+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new Cn(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new Cn(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new U_(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new Hu(t.x-this.wrap,t.y))}}function ec(n,t,r,l,h){(n*=2)<0&&(n=-1*n-1);const m=1<<r;return(m*m*n+m*h+l).toString(36)+r.toString(36)+t.toString(36)}function Zu(n,t){return t?n.properties[t]:n.id}ft("CanonicalTileID",dm),ft("OverscaledTileID",Cn,{omit:["terrainRttPosMatrix32f"]});class Ua{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){const r=new Ua;return r.extend(t(new M(this.minX,this.minY))),r.extend(t(new M(this.maxX,this.minY))),r.extend(t(new M(this.minX,this.maxY))),r.extend(t(new M(this.maxX,this.maxY))),r}static fromPoints(t){const r=new Ua;for(const l of t)r.extend(l);return r}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}}class V_{constructor(t){this._stringToNumber={},this._numberToString=[];for(let r=0;r<t.length;r++){const l=t[r];this._stringToNumber[l]=r,this._numberToString[r]=l}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class G_{constructor(t,r,l,h,m){this.type="Feature",this._vectorTileFeature=t,t._z=r,t._x=l,t._y=h,this.properties=t.properties,this.id=m}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(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(t[r]=this[r]);return t}}class H_{constructor(t,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Da(Ft,16,0),this.grid3D=new Da(Ft,16,0),this.featureIndexArray=new ie,this.promoteId=r}insert(t,r,l,h,m,_){const x=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(l,h,m);const B=_?this.grid3D:this.grid;for(let O=0;O<r.length;O++){const P=r[O],I=[1/0,1/0,-1/0,-1/0];for(let k=0;k<P.length;k++){const z=P[k];I[0]=Math.min(I[0],z.x),I[1]=Math.min(I[1],z.y),I[2]=Math.max(I[2],z.x),I[3]=Math.max(I[3],z.y)}I[0]<Ft&&I[1]<Ft&&I[2]>=0&&I[3]>=0&&B.insert(x,I[0],I[1],I[2],I[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new a_(new im(this.rawTileData)).layers,this.sourceLayerCoder=new V_(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,r,l,h){this.loadVTLayers();const m=t.params,_=Ft/t.tileSize/t.scale,x=Qs(m.filter,m.globalState),B=t.queryGeometry,O=t.queryPadding*_,P=Ua.fromPoints(B),I=this.grid.query(P.minX-O,P.minY-O,P.maxX+O,P.maxY+O),k=Ua.fromPoints(t.cameraQueryGeometry).expandBy(O),z=this.grid3D.query(k.minX,k.minY,k.maxX,k.maxY,((K,ee,_e,oe)=>(function(he,Be,Ee,Ve,it){for(const et of he)if(Be<=et.x&&Ee<=et.y&&Ve>=et.x&&it>=et.y)return!0;const Ke=[new M(Be,Ee),new M(Be,it),new M(Ve,it),new M(Ve,Ee)];if(he.length>2){for(const et of Ke)if(Hl(he,et))return!0}for(let et=0;et<he.length-1;et++)if(xx(he[et],he[et+1],Ke))return!0;return!1})(t.cameraQueryGeometry,K-O,ee-O,_e+O,oe+O)));for(const K of z)I.push(K);I.sort(qv);const N={};let Z;for(let K=0;K<I.length;K++){const ee=I[K];if(ee===Z)continue;Z=ee;const _e=this.featureIndexArray.get(ee);let oe=null;this.loadMatchingFeature(N,_e.bucketIndex,_e.sourceLayerIndex,_e.featureIndex,x,m.layers,m.availableImages,r,l,h,((he,Be,Ee)=>(oe||(oe=cs(he)),Be.queryIntersectsFeature({queryGeometry:B,feature:he,featureState:Ee,geometry:oe,zoom:this.z,transform:t.transform,pixelsToTileUnits:_,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation}))))}return N}loadMatchingFeature(t,r,l,h,m,_,x,B,O,P,I){const k=this.bucketLayerIDs[r];if(_&&!k.some((K=>_.has(K))))return;const z=this.sourceLayerCoder.decode(l),N=this.vtLayers[z].feature(h);if(m.needGeometry){const K=Fa(N,!0);if(!m.filter(new Oi(this.tileID.overscaledZ),K,this.tileID.canonical))return}else if(!m.filter(new Oi(this.tileID.overscaledZ),N))return;const Z=this.getId(N,z);for(let K=0;K<k.length;K++){const ee=k[K];if(_&&!_.has(ee))continue;const _e=B[ee];if(!_e)continue;let oe={};Z&&P&&(oe=P.getState(_e.sourceLayer||"_geojsonTileLayer",Z));const he=ut({},O[ee]);he.paint=Z_(he.paint,_e.paint,N,oe,x),he.layout=Z_(he.layout,_e.layout,N,oe,x);const Be=!I||I(N,_e,oe);if(!Be)continue;const Ee=new G_(N,this.z,this.x,this.y,Z);Ee.layer=he;let Ve=t[ee];Ve===void 0&&(Ve=t[ee]=[]),Ve.push({featureIndex:h,feature:Ee,intersectionZ:Be})}}lookupSymbolFeatures(t,r,l,h,m,_,x,B){const O={};this.loadVTLayers();const P=Qs(m.filterSpec,m.globalState);for(const I of t)this.loadMatchingFeature(O,l,h,I,P,_,x,B,r);return O}hasLayer(t){for(const r of this.bucketLayerIDs)for(const l of r)if(t===l)return!0;return!1}getId(t,r){var l;let h=t.id;return this.promoteId&&(h=t.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[r]],typeof h=="boolean"&&(h=Number(h)),h===void 0&&(!((l=t.properties)===null||l===void 0)&&l.cluster)&&this.promoteId&&(h=Number(t.properties.cluster_id))),h}}function Z_(n,t,r,l,h){return vt(n,((m,_)=>{const x=t instanceof Nl?t.get(_):null;return x&&x.evaluate?x.evaluate(r,l,h):x}))}function qv(n,t){return t-n}function q_(n,t,r,l,h){const m=[];for(let _=0;_<n.length;_++){const x=n[_];let B;for(let O=0;O<x.length-1;O++){let P=x[O],I=x[O+1];P.x<t&&I.x<t||(P.x<t?P=new M(t,P.y+(t-P.x)/(I.x-P.x)*(I.y-P.y))._round():I.x<t&&(I=new M(t,P.y+(t-P.x)/(I.x-P.x)*(I.y-P.y))._round()),P.y<r&&I.y<r||(P.y<r?P=new M(P.x+(r-P.y)/(I.y-P.y)*(I.x-P.x),r)._round():I.y<r&&(I=new M(P.x+(r-P.y)/(I.y-P.y)*(I.x-P.x),r)._round()),P.x>=l&&I.x>=l||(P.x>=l?P=new M(l,P.y+(l-P.x)/(I.x-P.x)*(I.y-P.y))._round():I.x>=l&&(I=new M(l,P.y+(l-P.x)/(I.x-P.x)*(I.y-P.y))._round()),P.y>=h&&I.y>=h||(P.y>=h?P=new M(P.x+(h-P.y)/(I.y-P.y)*(I.x-P.x),h)._round():I.y>=h&&(I=new M(P.x+(h-P.y)/(I.y-P.y)*(I.x-P.x),h)._round()),B&&P.equals(B[B.length-1])||(B=[P],m.push(B)),B.push(I)))))}}return m}ft("FeatureIndex",H_,{omit:["rawTileData","sourceLayerCoder"]});class Wo extends M{constructor(t,r,l,h){super(t,r),this.angle=l,h!==void 0&&(this.segment=h)}clone(){return new Wo(this.x,this.y,this.angle,this.segment)}}function W_(n,t,r,l,h){if(t.segment===void 0||r===0)return!0;let m=t,_=t.segment+1,x=0;for(;x>-r/2;){if(_--,_<0)return!1;x-=n[_].dist(m),m=n[_]}x+=n[_].dist(n[_+1]),_++;const B=[];let O=0;for(;x<r/2;){const P=n[_],I=n[_+1];if(!I)return!1;let k=n[_-1].angleTo(P)-P.angleTo(I);for(k=Math.abs((k+3*Math.PI)%(2*Math.PI)-Math.PI),B.push({distance:x,angleDelta:k}),O+=k;x-B[0].distance>l;)O-=B.shift().angleDelta;if(O>h)return!1;_++,x+=P.dist(I)}return!0}function K_(n){let t=0;for(let r=0;r<n.length-1;r++)t+=n[r].dist(n[r+1]);return t}function X_(n,t,r){return n?.6*t*r:0}function Y_(n,t){return Math.max(n?n.right-n.left:0,t?t.right-t.left:0)}function Wv(n,t,r,l,h,m){const _=X_(r,h,m),x=Y_(r,l)*m;let B=0;const O=K_(n)/2;for(let P=0;P<n.length-1;P++){const I=n[P],k=n[P+1],z=I.dist(k);if(B+z>O){const N=(O-B)/z,Z=Un.number(I.x,k.x,N),K=Un.number(I.y,k.y,N),ee=new Wo(Z,K,k.angleTo(I),P);return ee._round(),!_||W_(n,ee,x,_,t)?ee:void 0}B+=z}}function Kv(n,t,r,l,h,m,_,x,B){const O=X_(l,m,_),P=Y_(l,h),I=P*_,k=n[0].x===0||n[0].x===B||n[0].y===0||n[0].y===B;return t-I<t/4&&(t=I+t/4),J_(n,k?t/2*x%t:(P/2+2*m)*_*x%t,t,O,r,I,k,!1,B)}function J_(n,t,r,l,h,m,_,x,B){const O=m/2,P=K_(n);let I=0,k=t-r,z=[];for(let N=0;N<n.length-1;N++){const Z=n[N],K=n[N+1],ee=Z.dist(K),_e=K.angleTo(Z);for(;k+r<I+ee;){k+=r;const oe=(k-I)/ee,he=Un.number(Z.x,K.x,oe),Be=Un.number(Z.y,K.y,oe);if(he>=0&&he<B&&Be>=0&&Be<B&&k-O>=0&&k+O<=P){const Ee=new Wo(he,Be,_e,N);Ee._round(),l&&!W_(n,Ee,m,l,h)||z.push(Ee)}}I+=ee}return x||z.length||_||(z=J_(n,I/2,r,l,h,m,_,!0,B)),z}function Q_(n,t,r,l){const h=[],m=n.image,_=m.pixelRatio,x=m.paddedRect.w-2,B=m.paddedRect.h-2;let O={x1:n.left,y1:n.top,x2:n.right,y2:n.bottom};const P=m.stretchX||[[0,x]],I=m.stretchY||[[0,B]],k=(Le,Rt)=>Le+Rt[1]-Rt[0],z=P.reduce(k,0),N=I.reduce(k,0),Z=x-z,K=B-N;let ee=0,_e=z,oe=0,he=N,Be=0,Ee=Z,Ve=0,it=K;if(m.content&&l){const Le=m.content,Rt=Le[2]-Le[0],zt=Le[3]-Le[1];(m.textFitWidth||m.textFitHeight)&&(O=P_(n)),ee=Vp(P,0,Le[0]),oe=Vp(I,0,Le[1]),_e=Vp(P,Le[0],Le[2]),he=Vp(I,Le[1],Le[3]),Be=Le[0]-ee,Ve=Le[1]-oe,Ee=Rt-_e,it=zt-he}const Ke=O.x1,et=O.y1,Bt=O.x2-Ke,Qe=O.y2-et,tt=(Le,Rt,zt,St)=>{const xt=Gp(Le.stretch-ee,_e,Bt,Ke),li=Hp(Le.fixed-Be,Ee,Le.stretch,z),Hi=Gp(Rt.stretch-oe,he,Qe,et),hr=Hp(Rt.fixed-Ve,it,Rt.stretch,N),Rr=Gp(zt.stretch-ee,_e,Bt,Ke),En=Hp(zt.fixed-Be,Ee,zt.stretch,z),ln=Gp(St.stretch-oe,he,Qe,et),Cr=Hp(St.fixed-Ve,it,St.stretch,N),Fi=new M(xt,Hi),vr=new M(Rr,Hi),Er=new M(Rr,ln),Mr=new M(xt,ln),Kr=new M(li/_,hr/_),Mn=new M(En/_,Cr/_),wr=t*Math.PI/180;if(wr){const Br=Math.sin(wr),Tr=Math.cos(wr),sr=[Tr,-Br,Br,Tr];Fi._matMult(sr),vr._matMult(sr),Mr._matMult(sr),Er._matMult(sr)}const cn=Le.stretch+Le.fixed,pr=Rt.stretch+Rt.fixed;return{tl:Fi,tr:vr,bl:Mr,br:Er,tex:{x:m.paddedRect.x+1+cn,y:m.paddedRect.y+1+pr,w:zt.stretch+zt.fixed-cn,h:St.stretch+St.fixed-pr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Kr,pixelOffsetBR:Mn,minFontScaleX:Ee/_/Bt,minFontScaleY:it/_/Qe,isSDF:r}};if(l&&(m.stretchX||m.stretchY)){const Le=ey(P,Z,z),Rt=ey(I,K,N);for(let zt=0;zt<Le.length-1;zt++){const St=Le[zt],xt=Le[zt+1];for(let li=0;li<Rt.length-1;li++)h.push(tt(St,Rt[li],xt,Rt[li+1]))}}else h.push(tt({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:x+1},{fixed:0,stretch:B+1}));return h}function Vp(n,t,r){let l=0;for(const h of n)l+=Math.max(t,Math.min(r,h[1]))-Math.max(t,Math.min(r,h[0]));return l}function ey(n,t,r){const l=[{fixed:-1,stretch:0}];for(const[h,m]of n){const _=l[l.length-1];l.push({fixed:h-_.stretch,stretch:_.stretch}),l.push({fixed:h-_.stretch,stretch:_.stretch+(m-h)})}return l.push({fixed:t+1,stretch:r}),l}function Gp(n,t,r,l){return n/t*r+l}function Hp(n,t,r,l){return n-t*r/l}ft("Anchor",Wo);class Zp{constructor(t,r,l,h,m,_,x,B,O,P){var I;if(this.boxStartIndex=t.length,O){let k=_.top,z=_.bottom;const N=_.collisionPadding;N&&(k-=N[1],z+=N[3]);let Z=z-k;Z>0&&(Z=Math.max(10,Z),this.circleDiameter=Z)}else{const k=!((I=_.image)===null||I===void 0)&&I.content&&(_.image.textFitWidth||_.image.textFitHeight)?P_(_):{x1:_.left,y1:_.top,x2:_.right,y2:_.bottom};k.y1=k.y1*x-B[0],k.y2=k.y2*x+B[2],k.x1=k.x1*x-B[3],k.x2=k.x2*x+B[1];const z=_.collisionPadding;if(z&&(k.x1-=z[0]*x,k.y1-=z[1]*x,k.x2+=z[2]*x,k.y2+=z[3]*x),P){const N=new M(k.x1,k.y1),Z=new M(k.x2,k.y1),K=new M(k.x1,k.y2),ee=new M(k.x2,k.y2),_e=P*Math.PI/180;N._rotate(_e),Z._rotate(_e),K._rotate(_e),ee._rotate(_e),k.x1=Math.min(N.x,Z.x,K.x,ee.x),k.x2=Math.max(N.x,Z.x,K.x,ee.x),k.y1=Math.min(N.y,Z.y,K.y,ee.y),k.y2=Math.max(N.y,Z.y,K.y,ee.y)}t.emplaceBack(r.x,r.y,k.x1,k.y1,k.x2,k.y2,l,h,m)}this.boxEndIndex=t.length}}class Xv{constructor(t=[],r=(l,h)=>l<h?-1:l>h?1:0){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let l=(this.length>>1)-1;l>=0;l--)this._down(l)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:l}=this,h=r[t];for(;t>0;){const m=t-1>>1,_=r[m];if(l(h,_)>=0)break;r[t]=_,t=m}r[t]=h}_down(t){const{data:r,compare:l}=this,h=this.length>>1,m=r[t];for(;t<h;){let _=1+(t<<1);const x=_+1;if(x<this.length&&l(r[x],r[_])<0&&(_=x),l(r[_],m)>=0)break;r[t]=r[_],t=_}r[t]=m}}function Yv(n,t=1,r=!1){const l=Ua.fromPoints(n[0]),h=Math.min(l.width(),l.height());let m=h/2;const _=new Xv([],Jv),{minX:x,minY:B,maxX:O,maxY:P}=l;if(h===0)return new M(x,B);for(let z=x;z<O;z+=h)for(let N=B;N<P;N+=h)_.push(new tc(z+m,N+m,m,n));let I=(function(z){let N=0,Z=0,K=0;const ee=z[0];for(let _e=0,oe=ee.length,he=oe-1;_e<oe;he=_e++){const Be=ee[_e],Ee=ee[he],Ve=Be.x*Ee.y-Ee.x*Be.y;Z+=(Be.x+Ee.x)*Ve,K+=(Be.y+Ee.y)*Ve,N+=3*Ve}return new tc(Z/N,K/N,0,z)})(n),k=_.length;for(;_.length;){const z=_.pop();(z.d>I.d||!I.d)&&(I=z,r&&console.log("found best %d after %d probes",Math.round(1e4*z.d)/1e4,k)),z.max-I.d<=t||(m=z.h/2,_.push(new tc(z.p.x-m,z.p.y-m,m,n)),_.push(new tc(z.p.x+m,z.p.y-m,m,n)),_.push(new tc(z.p.x-m,z.p.y+m,m,n)),_.push(new tc(z.p.x+m,z.p.y+m,m,n)),k+=4)}return r&&(console.log(`num probes: ${k}`),console.log(`best distance: ${I.d}`)),I.p}function Jv(n,t){return t.max-n.max}function tc(n,t,r,l){this.p=new M(n,t),this.h=r,this.d=(function(h,m){let _=!1,x=1/0;for(let B=0;B<m.length;B++){const O=m[B];for(let P=0,I=O.length,k=I-1;P<I;k=P++){const z=O[P],N=O[k];z.y>h.y!=N.y>h.y&&h.x<(N.x-z.x)*(h.y-z.y)/(N.y-z.y)+z.x&&(_=!_),x=Math.min(x,zg(h,z,N))}}return(_?1:-1)*Math.sqrt(x)})(this.p,l),this.max=this.d+this.h*Math.SQRT2}var kr;v.aE=void 0,(kr=v.aE||(v.aE={}))[kr.center=1]="center",kr[kr.left=2]="left",kr[kr.right=3]="right",kr[kr.top=4]="top",kr[kr.bottom=5]="bottom",kr[kr["top-left"]=6]="top-left",kr[kr["top-right"]=7]="top-right",kr[kr["bottom-left"]=8]="bottom-left",kr[kr["bottom-right"]=9]="bottom-right";const fm=Number.POSITIVE_INFINITY;function ty(n,t){return t[1]!==fm?(function(r,l,h){let m=0,_=0;switch(l=Math.abs(l),h=Math.abs(h),r){case"top-right":case"top-left":case"top":_=h-7;break;case"bottom-right":case"bottom-left":case"bottom":_=7-h}switch(r){case"top-right":case"bottom-right":case"right":m=-l;break;case"top-left":case"bottom-left":case"left":m=l}return[m,_]})(n,t[0],t[1]):(function(r,l){let h=0,m=0;l<0&&(l=0);const _=l/Math.SQRT2;switch(r){case"top-right":case"top-left":m=_-7;break;case"bottom-right":case"bottom-left":m=7-_;break;case"bottom":m=7-l;break;case"top":m=l-7}switch(r){case"top-right":case"bottom-right":h=-_;break;case"top-left":case"bottom-left":h=_;break;case"left":h=l;break;case"right":h=-l}return[h,m]})(n,t[0])}function iy(n,t,r){var l;const h=n.layout,m=(l=h.get("text-variable-anchor-offset"))===null||l===void 0?void 0:l.evaluate(t,{},r);if(m){const x=m.values,B=[];for(let O=0;O<x.length;O+=2){const P=B[O]=x[O],I=x[O+1].map((k=>k*xr));P.startsWith("top")?I[1]-=7:P.startsWith("bottom")&&(I[1]+=7),B[O+1]=I}return new Nr(B)}const _=h.get("text-variable-anchor");if(_){let x;x=n._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[h.get("text-radial-offset").evaluate(t,{},r)*xr,fm]:h.get("text-offset").evaluate(t,{},r).map((O=>O*xr));const B=[];for(const O of _)B.push(O,ty(O,x));return new Nr(B)}return null}function mm(n){switch(n){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Qv(n,t,r,l,h,m,_,x,B,O,P,I){let k=m.textMaxSize.evaluate(t,{});k===void 0&&(k=_);const z=n.layers[0].layout,N=z.get("icon-offset").evaluate(t,{},P),Z=ny(r.horizontal),K=_/24,ee=n.tilePixelRatio*K,_e=n.tilePixelRatio*k/24,oe=n.tilePixelRatio*x,he=n.tilePixelRatio*z.get("symbol-spacing"),Be=z.get("text-padding")*n.tilePixelRatio,Ee=(function(zt,St,xt,li=1){const Hi=zt.get("icon-padding").evaluate(St,{},xt),hr=Hi&&Hi.values;return[hr[0]*li,hr[1]*li,hr[2]*li,hr[3]*li]})(z,t,P,n.tilePixelRatio),Ve=z.get("text-max-angle")/180*Math.PI,it=z.get("text-rotation-alignment")!=="viewport"&&z.get("symbol-placement")!=="point",Ke=z.get("icon-rotation-alignment")==="map"&&z.get("symbol-placement")!=="point",et=z.get("symbol-placement"),Bt=he/2,Qe=z.get("icon-text-fit");let tt;l&&Qe!=="none"&&(n.allowVerticalPlacement&&r.vertical&&(tt=C_(l,r.vertical,Qe,z.get("icon-text-fit-padding"),N,K)),Z&&(l=C_(l,Z,Qe,z.get("icon-text-fit-padding"),N,K)));const Le=P?I.line.getGranularityForZoomLevel(P.z):1,Rt=(zt,St)=>{St.x<0||St.x>=Ft||St.y<0||St.y>=Ft||(function(xt,li,Hi,hr,Rr,En,ln,Cr,Fi,vr,Er,Mr,Kr,Mn,wr,cn,pr,Br,Tr,sr,ji,us,ic,hs,i4){const rc=xt.addToLineVertexArray(li,Hi);let Va,nc,sc,oc,ly=0,cy=0,uy=0,hy=0,Bm=-1,Tm=-1;const lo={};let py=Vo("");if(xt.allowVerticalPlacement&&hr.vertical){const Vr=Cr.layout.get("text-rotate").evaluate(ji,{},hs)+90;sc=new Zp(Fi,li,vr,Er,Mr,hr.vertical,Kr,Mn,wr,Vr),ln&&(oc=new Zp(Fi,li,vr,Er,Mr,ln,pr,Br,wr,Vr))}if(Rr){const Vr=Cr.layout.get("icon-rotate").evaluate(ji,{}),In=Cr.layout.get("icon-text-fit")!=="none",Ga=Q_(Rr,Vr,ic,In),ds=ln?Q_(ln,Vr,ic,In):void 0;nc=new Zp(Fi,li,vr,Er,Mr,Rr,pr,Br,!1,Vr),ly=4*Ga.length;const Ha=xt.iconSizeData;let js=null;Ha.kind==="source"?(js=[ao*Cr.layout.get("icon-size").evaluate(ji,{})],js[0]>Zo&&be(`${xt.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Ha.kind==="composite"&&(js=[ao*us.compositeIconSizes[0].evaluate(ji,{},hs),ao*us.compositeIconSizes[1].evaluate(ji,{},hs)],(js[0]>Zo||js[1]>Zo)&&be(`${xt.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),xt.addSymbols(xt.icon,Ga,js,sr,Tr,ji,v.ao.none,li,rc.lineStartIndex,rc.lineLength,-1,hs),Bm=xt.icon.placedSymbolArray.length-1,ds&&(cy=4*ds.length,xt.addSymbols(xt.icon,ds,js,sr,Tr,ji,v.ao.vertical,li,rc.lineStartIndex,rc.lineLength,-1,hs),Tm=xt.icon.placedSymbolArray.length-1)}const dy=Object.keys(hr.horizontal);for(const Vr of dy){const In=hr.horizontal[Vr];if(!Va){py=Vo(In.text);const ds=Cr.layout.get("text-rotate").evaluate(ji,{},hs);Va=new Zp(Fi,li,vr,Er,Mr,In,Kr,Mn,wr,ds)}const Ga=In.positionedLines.length===1;if(uy+=ry(xt,li,In,En,Cr,wr,ji,cn,rc,hr.vertical?v.ao.horizontal:v.ao.horizontalOnly,Ga?dy:[Vr],lo,Bm,us,hs),Ga)break}hr.vertical&&(hy+=ry(xt,li,hr.vertical,En,Cr,wr,ji,cn,rc,v.ao.vertical,["vertical"],lo,Tm,us,hs));const r4=Va?Va.boxStartIndex:xt.collisionBoxArray.length,n4=Va?Va.boxEndIndex:xt.collisionBoxArray.length,s4=sc?sc.boxStartIndex:xt.collisionBoxArray.length,o4=sc?sc.boxEndIndex:xt.collisionBoxArray.length,a4=nc?nc.boxStartIndex:xt.collisionBoxArray.length,l4=nc?nc.boxEndIndex:xt.collisionBoxArray.length,c4=oc?oc.boxStartIndex:xt.collisionBoxArray.length,u4=oc?oc.boxEndIndex:xt.collisionBoxArray.length;let ps=-1;const Wp=(Vr,In)=>Vr&&Vr.circleDiameter?Math.max(Vr.circleDiameter,In):In;ps=Wp(Va,ps),ps=Wp(sc,ps),ps=Wp(nc,ps),ps=Wp(oc,ps);const fy=ps>-1?1:0;fy&&(ps*=i4/xr),xt.glyphOffsetArray.length>=Ql.MAX_GLYPHS&&be("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ji.sortKey!==void 0&&xt.addToSortKeyRanges(xt.symbolInstances.length,ji.sortKey);const h4=iy(Cr,ji,hs),[p4,d4]=(function(Vr,In){const Ga=Vr.length,ds=In?.values;if(ds?.length>0)for(let Ha=0;Ha<ds.length;Ha+=2){const js=ds[Ha+1];Vr.emplaceBack(v.aE[ds[Ha]],js[0],js[1])}return[Ga,Vr.length]})(xt.textAnchorOffsets,h4);xt.symbolInstances.emplaceBack(li.x,li.y,lo.right>=0?lo.right:-1,lo.center>=0?lo.center:-1,lo.left>=0?lo.left:-1,lo.vertical||-1,Bm,Tm,py,r4,n4,s4,o4,a4,l4,c4,u4,vr,uy,hy,ly,cy,fy,0,Kr,ps,p4,d4)})(n,St,zt,r,l,h,tt,n.layers[0],n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,ee,[Be,Be,Be,Be],it,B,oe,Ee,Ke,N,t,m,O,P,_)};if(et==="line")for(const zt of q_(t.geometry,0,0,Ft,Ft)){const St=$a(zt,Le),xt=Kv(St,he,Ve,r.vertical||Z,l,24,_e,n.overscaling,Ft);for(const li of xt)Z&&e4(n,Z.text,Bt,li)||Rt(St,li)}else if(et==="line-center"){for(const zt of t.geometry)if(zt.length>1){const St=$a(zt,Le),xt=Wv(St,Ve,r.vertical||Z,l,24,_e);xt&&Rt(St,xt)}}else if(t.type==="Polygon")for(const zt of Ta(t.geometry,0)){const St=Yv(zt,16);Rt($a(zt[0],Le,!0),new Wo(St.x,St.y,0))}else if(t.type==="LineString")for(const zt of t.geometry){const St=$a(zt,Le);Rt(St,new Wo(St[0].x,St[0].y,0))}else if(t.type==="Point")for(const zt of t.geometry)for(const St of zt)Rt([St],new Wo(St.x,St.y,0))}function ry(n,t,r,l,h,m,_,x,B,O,P,I,k,z,N){const Z=(function(_e,oe,he,Be,Ee,Ve,it,Ke){const et=Be.layout.get("text-rotate").evaluate(Ve,{})*Math.PI/180,Bt=[];for(const Qe of oe.positionedLines)for(const tt of Qe.positionedGlyphs){if(!tt.rect)continue;const Le=tt.rect||{};let Rt=4,zt=!0,St=1,xt=0;const li=(Ee||Ke)&&tt.vertical,Hi=tt.metrics.advance*tt.scale/2;if(Ke&&oe.verticalizable&&(xt=Qe.lineOffset/2-(tt.imageName?-(xr-tt.metrics.width*tt.scale)/2:(tt.scale-1)*xr)),tt.imageName){const Br=it[tt.imageName];zt=Br.sdf,St=Br.pixelRatio,Rt=1/St}const hr=Ee?[tt.x+Hi,tt.y]:[0,0];let Rr=Ee?[0,0]:[tt.x+Hi+he[0],tt.y+he[1]-xt],En=[0,0];li&&(En=Rr,Rr=[0,0]);const ln=tt.metrics.isDoubleResolution?2:1,Cr=(tt.metrics.left-Rt)*tt.scale-Hi+Rr[0],Fi=(-tt.metrics.top-Rt)*tt.scale+Rr[1],vr=Cr+Le.w/ln*tt.scale/St,Er=Fi+Le.h/ln*tt.scale/St,Mr=new M(Cr,Fi),Kr=new M(vr,Fi),Mn=new M(Cr,Er),wr=new M(vr,Er);if(li){const Br=new M(-Hi,Hi- -17),Tr=-Math.PI/2,sr=12-Hi,ji=new M(22-sr,-(tt.imageName?sr:0)),us=new M(...En);Mr._rotateAround(Tr,Br)._add(ji)._add(us),Kr._rotateAround(Tr,Br)._add(ji)._add(us),Mn._rotateAround(Tr,Br)._add(ji)._add(us),wr._rotateAround(Tr,Br)._add(ji)._add(us)}if(et){const Br=Math.sin(et),Tr=Math.cos(et),sr=[Tr,-Br,Br,Tr];Mr._matMult(sr),Kr._matMult(sr),Mn._matMult(sr),wr._matMult(sr)}const cn=new M(0,0),pr=new M(0,0);Bt.push({tl:Mr,tr:Kr,bl:Mn,br:wr,tex:Le,writingMode:oe.writingMode,glyphOffset:hr,sectionIndex:tt.sectionIndex,isSDF:zt,pixelOffsetTL:cn,pixelOffsetBR:pr,minFontScaleX:0,minFontScaleY:0})}return Bt})(0,r,x,h,m,_,l,n.allowVerticalPlacement),K=n.textSizeData;let ee=null;K.kind==="source"?(ee=[ao*h.layout.get("text-size").evaluate(_,{})],ee[0]>Zo&&be(`${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):K.kind==="composite"&&(ee=[ao*z.compositeTextSizes[0].evaluate(_,{},N),ao*z.compositeTextSizes[1].evaluate(_,{},N)],(ee[0]>Zo||ee[1]>Zo)&&be(`${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),n.addSymbols(n.text,Z,ee,x,m,_,O,t,B.lineStartIndex,B.lineLength,k,N);for(const _e of P)I[_e]=n.text.placedSymbolArray.length-1;return 4*Z.length}function ny(n){for(const t in n)return n[t];return null}function e4(n,t,r,l){const h=n.compareText;if(t in h){const m=h[t];for(let _=m.length-1;_>=0;_--)if(l.dist(m[_])<r)return!0}else h[t]=[];return h[t].push(l),!1}const sy=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class gm{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,l]=new Uint8Array(t,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const h=l>>4;if(h!==1)throw new Error(`Got v${h} data when expected v1.`);const m=sy[15&l];if(!m)throw new Error("Unrecognized array type.");const[_]=new Uint16Array(t,2,1),[x]=new Uint32Array(t,4,1);return new gm(x,_,m,t)}constructor(t,r=64,l=Float64Array,h){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=l,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const m=sy.indexOf(this.ArrayType),_=2*t*this.ArrayType.BYTES_PER_ELEMENT,x=t*this.IndexArrayType.BYTES_PER_ELEMENT,B=(8-x%8)%8;if(m<0)throw new Error(`Unexpected typed array class: ${l}.`);h&&h instanceof ArrayBuffer?(this.data=h,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+x+B,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+_+x+B),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+x+B,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+m]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=t)}add(t,r){const l=this._pos>>1;return this.ids[l]=l,this.coords[this._pos++]=t,this.coords[this._pos++]=r,l}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return _m(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,l,h){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:m,coords:_,nodeSize:x}=this,B=[0,m.length-1,0],O=[];for(;B.length;){const P=B.pop()||0,I=B.pop()||0,k=B.pop()||0;if(I-k<=x){for(let K=k;K<=I;K++){const ee=_[2*K],_e=_[2*K+1];ee>=t&&ee<=l&&_e>=r&&_e<=h&&O.push(m[K])}continue}const z=k+I>>1,N=_[2*z],Z=_[2*z+1];N>=t&&N<=l&&Z>=r&&Z<=h&&O.push(m[z]),(P===0?t<=N:r<=Z)&&(B.push(k),B.push(z-1),B.push(1-P)),(P===0?l>=N:h>=Z)&&(B.push(z+1),B.push(I),B.push(1-P))}return O}within(t,r,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:h,coords:m,nodeSize:_}=this,x=[0,h.length-1,0],B=[],O=l*l;for(;x.length;){const P=x.pop()||0,I=x.pop()||0,k=x.pop()||0;if(I-k<=_){for(let K=k;K<=I;K++)ay(m[2*K],m[2*K+1],t,r)<=O&&B.push(h[K]);continue}const z=k+I>>1,N=m[2*z],Z=m[2*z+1];ay(N,Z,t,r)<=O&&B.push(h[z]),(P===0?t-l<=N:r-l<=Z)&&(x.push(k),x.push(z-1),x.push(1-P)),(P===0?t+l>=N:r+l>=Z)&&(x.push(z+1),x.push(I),x.push(1-P))}return B}}function _m(n,t,r,l,h,m){if(h-l<=r)return;const _=l+h>>1;oy(n,t,_,l,h,m),_m(n,t,r,l,_-1,1-m),_m(n,t,r,_+1,h,1-m)}function oy(n,t,r,l,h,m){for(;h>l;){if(h-l>600){const O=h-l+1,P=r-l+1,I=Math.log(O),k=.5*Math.exp(2*I/3),z=.5*Math.sqrt(I*k*(O-k)/O)*(P-O/2<0?-1:1);oy(n,t,r,Math.max(l,Math.floor(r-P*k/O+z)),Math.min(h,Math.floor(r+(O-P)*k/O+z)),m)}const _=t[2*r+m];let x=l,B=h;for(qu(n,t,l,r),t[2*h+m]>_&&qu(n,t,l,h);x<B;){for(qu(n,t,x,B),x++,B--;t[2*x+m]<_;)x++;for(;t[2*B+m]>_;)B--}t[2*l+m]===_?qu(n,t,l,B):(B++,qu(n,t,B,h)),B<=r&&(l=B+1),r<=B&&(h=B-1)}}function qu(n,t,r,l){ym(n,r,l),ym(t,2*r,2*l),ym(t,2*r+1,2*l+1)}function ym(n,t,r){const l=n[t];n[t]=n[r],n[r]=l}function ay(n,t,r,l){const h=n-r,m=t-l;return h*h+m*m}var bm;v.cx=void 0,(bm=v.cx||(v.cx={})).create="create",bm.load="load",bm.fullLoad="fullLoad";let qp=null,Wu=[];const xm=1e3/60,vm="loadTime",wm="fullLoadTime",t4={mark(n){performance.mark(n)},frame(n){const t=n;qp!=null&&Wu.push(t-qp),qp=t},clearMetrics(){qp=null,Wu=[],performance.clearMeasures(vm),performance.clearMeasures(wm);for(const n in v.cx)performance.clearMarks(v.cx[n])},getPerformanceMetrics(){performance.measure(vm,v.cx.create,v.cx.load),performance.measure(wm,v.cx.create,v.cx.fullLoad);const n=performance.getEntriesByName(vm)[0].duration,t=performance.getEntriesByName(wm)[0].duration,r=Wu.length,l=1/(Wu.reduce(((m,_)=>m+_),0)/r/1e3),h=Wu.filter((m=>m>xm)).reduce(((m,_)=>m+(_-xm)/xm),0);return{loadTime:n,fullLoadTime:t,fps:l,percentDroppedFrames:h/(r+h)*100,totalFrames:r}}};v.$=Ft,v.A=ke,v.B=function([n,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,{x:n*Math.cos(t)*Math.sin(r),y:n*Math.sin(t)*Math.sin(r),z:n*Math.cos(r)}},v.C=Un,v.D=wt,v.E=yt,v.F=Oi,v.G=ka,v.H=function(n){if(Ne==null){const t=n.navigator?n.navigator.userAgent:null;Ne=!!n.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Ne},v.I=rm,v.J=class{constructor(n,t){this.target=n,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Hv((()=>this.process())),this.subscription=mt(this.target,"message",(r=>this.receive(r)),!1),this.globalScope=Ue(self)?n:window}registerMessageHandler(n,t){this.messageHandlers[n]=t}sendAsync(n,t){return new Promise(((r,l)=>{const h=Math.round(1e18*Math.random()).toString(36).substring(0,10),m=t?mt(t.signal,"abort",(()=>{m?.unsubscribe(),delete this.resolveRejects[h];const B={id:h,type:"<cancel>",origin:location.origin,targetMapId:n.targetMapId,sourceMapId:this.mapId};this.target.postMessage(B)}),Zv):null;this.resolveRejects[h]={resolve:B=>{m?.unsubscribe(),r(B)},reject:B=>{m?.unsubscribe(),l(B)}};const _=[],x=Object.assign(Object.assign({},n),{id:h,sourceMapId:this.mapId,origin:location.origin,data:No(n.data,_)});this.target.postMessage(x,{transfer:_})}))}receive(n){const t=n.data,r=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[r];const l=this.abortControllers[r];return delete this.abortControllers[r],void(l&&l.abort())}if(Ue(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(this.taskQueue.length===0)return;const n=this.taskQueue.shift(),t=this.tasks[n];delete this.tasks[n],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(n,t)}processTask(n,t){return a(this,void 0,void 0,(function*(){if(t.type==="<response>"){const h=this.resolveRejects[n];return delete this.resolveRejects[n],h?void(t.error?h.reject(io(t.error)):h.resolve(io(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(n,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const r=io(t.data),l=new AbortController;this.abortControllers[n]=l;try{const h=yield this.messageHandlers[t.type](t.sourceMapId,r,l);this.completeTask(n,null,h)}catch(h){this.completeTask(n,h)}}))}completeTask(n,t,r){const l=[];delete this.abortControllers[n];const h={id:n,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?No(t):null,data:No(r,l)};this.target.postMessage(h,{transfer:l})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},v.K=q,v.L=function(){var n=new ke(16);return ke!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n},v.M=function(n,t,r){var l,h,m,_,x,B,O,P,I,k,z,N,Z=r[0],K=r[1],ee=r[2];return t===n?(n[12]=t[0]*Z+t[4]*K+t[8]*ee+t[12],n[13]=t[1]*Z+t[5]*K+t[9]*ee+t[13],n[14]=t[2]*Z+t[6]*K+t[10]*ee+t[14],n[15]=t[3]*Z+t[7]*K+t[11]*ee+t[15]):(h=t[1],m=t[2],_=t[3],x=t[4],B=t[5],O=t[6],P=t[7],I=t[8],k=t[9],z=t[10],N=t[11],n[0]=l=t[0],n[1]=h,n[2]=m,n[3]=_,n[4]=x,n[5]=B,n[6]=O,n[7]=P,n[8]=I,n[9]=k,n[10]=z,n[11]=N,n[12]=l*Z+x*K+I*ee+t[12],n[13]=h*Z+B*K+k*ee+t[13],n[14]=m*Z+O*K+z*ee+t[14],n[15]=_*Z+P*K+N*ee+t[15]),n},v.N=function(n,t,r){var l=r[0],h=r[1],m=r[2];return n[0]=t[0]*l,n[1]=t[1]*l,n[2]=t[2]*l,n[3]=t[3]*l,n[4]=t[4]*h,n[5]=t[5]*h,n[6]=t[6]*h,n[7]=t[7]*h,n[8]=t[8]*m,n[9]=t[9]*m,n[10]=t[10]*m,n[11]=t[11]*m,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},v.O=function(n,t,r){var l=t[0],h=t[1],m=t[2],_=t[3],x=t[4],B=t[5],O=t[6],P=t[7],I=t[8],k=t[9],z=t[10],N=t[11],Z=t[12],K=t[13],ee=t[14],_e=t[15],oe=r[0],he=r[1],Be=r[2],Ee=r[3];return n[0]=oe*l+he*x+Be*I+Ee*Z,n[1]=oe*h+he*B+Be*k+Ee*K,n[2]=oe*m+he*O+Be*z+Ee*ee,n[3]=oe*_+he*P+Be*N+Ee*_e,n[4]=(oe=r[4])*l+(he=r[5])*x+(Be=r[6])*I+(Ee=r[7])*Z,n[5]=oe*h+he*B+Be*k+Ee*K,n[6]=oe*m+he*O+Be*z+Ee*ee,n[7]=oe*_+he*P+Be*N+Ee*_e,n[8]=(oe=r[8])*l+(he=r[9])*x+(Be=r[10])*I+(Ee=r[11])*Z,n[9]=oe*h+he*B+Be*k+Ee*K,n[10]=oe*m+he*O+Be*z+Ee*ee,n[11]=oe*_+he*P+Be*N+Ee*_e,n[12]=(oe=r[12])*l+(he=r[13])*x+(Be=r[14])*I+(Ee=r[15])*Z,n[13]=oe*h+he*B+Be*k+Ee*K,n[14]=oe*m+he*O+Be*z+Ee*ee,n[15]=oe*_+he*P+Be*N+Ee*_e,n},v.P=M,v.Q=function(n,t){const r={};for(let l=0;l<t.length;l++){const h=t[l];h in n&&(r[h]=n[h])}return r},v.R=an,v.S=qo,v.T=Zf,v.U=z_,v.V=L_,v.W=rt,v.X=nt,v.Y=at,v.Z=Cn,v._=a,v.a=$,v.a$=Et,v.a0=function(n,t){var r,l,h,m,_;if(!n)return t??{};if(!t)return n;let x=Object.assign({},n);if(t.removeAll&&(x={removeAll:!0}),t.remove){const B=new Set(t.remove);x.add&&(x.add=x.add.filter((P=>!B.has(P.id)))),x.update&&(x.update=x.update.filter((P=>!B.has(P.id))));const O=new Set(((r=n.add)!==null&&r!==void 0?r:[]).map((P=>P.id)));t.remove=t.remove.filter((P=>!O.has(P)))}if(t.remove){const B=new Set(x.remove?x.remove.concat(t.remove):t.remove);x.remove=Array.from(B.values())}if(t.add){const B=x.add?x.add.concat(t.add):t.add,O=new Map(B.map((P=>[P.id,P])));x.add=Array.from(O.values())}if(t.update){const B=new Map((l=x.update)===null||l===void 0?void 0:l.map((O=>[O.id,O])));for(const O of t.update){const P=(h=B.get(O.id))!==null&&h!==void 0?h:{id:O.id};O.newGeometry&&(P.newGeometry=O.newGeometry),O.addOrUpdateProperties&&(P.addOrUpdateProperties=((m=P.addOrUpdateProperties)!==null&&m!==void 0?m:[]).concat(O.addOrUpdateProperties)),O.removeProperties&&(P.removeProperties=((_=P.removeProperties)!==null&&_!==void 0?_:[]).concat(O.removeProperties)),O.removeAllProperties&&(P.removeAllProperties=!0),B.set(O.id,P)}x.update=Array.from(B.values())}return x.remove&&x.add&&(x.remove=x.remove.filter((B=>x.add.findIndex((O=>O.id===B))===-1))),x},v.a1=Hu,v.a2=Ua,v.a3=25,v.a4=dm,v.a5=n=>{const t=window.document.createElement("video");return t.muted=!0,new Promise((r=>{t.onloadstart=()=>{r(t)};for(const l of n){const h=window.document.createElement("source");xe(l)||(t.crossOrigin="Anonymous"),h.src=l,t.appendChild(h)}}))},v.a6=We,v.a7=function(){return st++},v.a8=R,v.a9=Ql,v.aA=function(n){let t=1/0,r=1/0,l=-1/0,h=-1/0;for(const m of n)t=Math.min(t,m.x),r=Math.min(r,m.y),l=Math.max(l,m.x),h=Math.max(h,m.y);return[t,r,l,h]},v.aB=xr,v.aC=ir,v.aD=function(n,t,r,l,h=!1){if(!r[0]&&!r[1])return[0,0];const m=h?l==="map"?-n.bearingInRadians:0:l==="viewport"?n.bearingInRadians:0;if(m){const _=Math.sin(m),x=Math.cos(m);r=[r[0]*x-r[1]*_,r[0]*_+r[1]*x]}return[h?r[0]:ir(t,r[0],n.zoom),h?r[1]:ir(t,r[1],n.zoom)]},v.aF=om,v.aG=mm,v.aH=sm,v.aI=gm,v.aJ=Vi,v.aK=Lp,v.aL=me,v.aM=Vt,v.aN=gi,v.aO=De,v.aP=Dt,v.aQ=N_,v.aR=dt,v.aS=Ge,v.aT=function(n){var t=new ke(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},v.aU=function(n,t,r){return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],n},v.aV=function(n,t){var r=t[0],l=t[1],h=t[2],m=r*r+l*l+h*h;return m>0&&(m=1/Math.sqrt(m)),n[0]=t[0]*m,n[1]=t[1]*m,n[2]=t[2]*m,n},v.aW=_t,v.aX=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]},v.aY=function(n,t,r){return n[0]=t[0]*r[0],n[1]=t[1]*r[1],n[2]=t[2]*r[2],n[3]=t[3]*r[3],n},v.aZ=Re,v.a_=function(n,t,r){const l=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return l===0?null:(-(n[0]*r[0]+n[1]*r[1]+n[2]*r[2])-r[3])/l},v.aa=Qs,v.ab=Fa,v.ac=G_,v.ad=function(n){const t={};if(n.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((r,l,h,m)=>{const _=h||m;return t[l]=!_||_.toLowerCase(),""})),t["max-age"]){const r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t},v.ae=Ot,v.af=function(n){return Math.pow(2,n)},v.ag=je,v.ah=At,v.ai=85.051129,v.aj=F_,v.ak=function(n){return Math.log(n)/Math.LN2},v.al=function(n){var t=n[0],r=n[1];return t*t+r*r},v.am=function(n,t){const r=[];for(const l in n)l in t||r.push(l);return r},v.an=function(n,t){let r=0,l=0;if(n.kind==="constant")l=n.layoutSize;else if(n.kind!=="source"){const{interpolationType:h,minZoom:m,maxZoom:_}=n,x=h?At(Pr.interpolationFactor(h,t,m,_),0,1):0;n.kind==="camera"?l=Un.number(n.minSize,n.maxSize,x):r=x}return{uSizeT:r,uSize:l}},v.ap=function(n,{uSize:t,uSizeT:r},{lowerSize:l,upperSize:h}){return n.kind==="source"?l/ao:n.kind==="composite"?Un.number(l/ao,h/ao,r):t},v.aq=function(n,t){var r=t[0],l=t[1],h=t[2],m=t[3],_=t[4],x=t[5],B=t[6],O=t[7],P=t[8],I=t[9],k=t[10],z=t[11],N=t[12],Z=t[13],K=t[14],ee=t[15],_e=r*x-l*_,oe=r*B-h*_,he=r*O-m*_,Be=l*B-h*x,Ee=l*O-m*x,Ve=h*O-m*B,it=P*Z-I*N,Ke=P*K-k*N,et=P*ee-z*N,Bt=I*K-k*Z,Qe=I*ee-z*Z,tt=k*ee-z*K,Le=_e*tt-oe*Qe+he*Bt+Be*et-Ee*Ke+Ve*it;return Le?(n[0]=(x*tt-B*Qe+O*Bt)*(Le=1/Le),n[1]=(h*Qe-l*tt-m*Bt)*Le,n[2]=(Z*Ve-K*Ee+ee*Be)*Le,n[3]=(k*Ee-I*Ve-z*Be)*Le,n[4]=(B*et-_*tt-O*Ke)*Le,n[5]=(r*tt-h*et+m*Ke)*Le,n[6]=(K*he-N*Ve-ee*oe)*Le,n[7]=(P*Ve-k*he+z*oe)*Le,n[8]=(_*Qe-x*et+O*it)*Le,n[9]=(l*et-r*Qe-m*it)*Le,n[10]=(N*Ee-Z*he+ee*_e)*Le,n[11]=(I*he-P*Ee-z*_e)*Le,n[12]=(x*Ke-_*Bt-B*it)*Le,n[13]=(r*Bt-l*Ke+h*it)*Le,n[14]=(Z*oe-N*Be-K*_e)*Le,n[15]=(P*Be-I*oe+k*_e)*Le,n):null},v.ar=It,v.as=function(n){var t=n[0],r=n[1];return Math.sqrt(t*t+r*r)},v.at=function(n){return n[0]=0,n[1]=0,n},v.au=function(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n},v.av=am,v.aw=di,v.ax=function(n,t,r,l){const h=t.y-n.y,m=t.x-n.x,_=l.y-r.y,x=l.x-r.x,B=_*m-x*h;if(B===0)return null;const O=(x*(n.y-r.y)-_*(n.x-r.x))/B;return new M(n.x+O*m,n.y+O*h)},v.ay=q_,v.az=Dg,v.b=ht,v.b$=class extends e{},v.b0=function(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3]*r,n},v.b1=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]},v.b2=U_,v.b3=ec,v.b4=function(n,t,r,l,h){var m=1/Math.tan(t/2);if(n[0]=m/r,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=m,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,h!=null&&h!==1/0){var _=1/(l-h);n[10]=(h+l)*_,n[14]=2*h*l*_}else n[10]=-1,n[14]=-2*l;return n},v.b5=function(n){var t=new ke(16);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},v.b6=function(n,t,r){var l=Math.sin(r),h=Math.cos(r),m=t[0],_=t[1],x=t[2],B=t[3],O=t[4],P=t[5],I=t[6],k=t[7];return t!==n&&(n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=m*h+O*l,n[1]=_*h+P*l,n[2]=x*h+I*l,n[3]=B*h+k*l,n[4]=O*h-m*l,n[5]=P*h-_*l,n[6]=I*h-x*l,n[7]=k*h-B*l,n},v.b7=function(n,t,r){var l=Math.sin(r),h=Math.cos(r),m=t[4],_=t[5],x=t[6],B=t[7],O=t[8],P=t[9],I=t[10],k=t[11];return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[4]=m*h+O*l,n[5]=_*h+P*l,n[6]=x*h+I*l,n[7]=B*h+k*l,n[8]=O*h-m*l,n[9]=P*h-_*l,n[10]=I*h-x*l,n[11]=k*h-B*l,n},v.b8=function(){const n=new Float32Array(16);return je(n),n},v.b9=function(){const n=new Float64Array(16);return je(n),n},v.bA=function(n,t){const r=bi(n,360),l=bi(t,360),h=l-r,m=l>r?h-360:h+360;return Math.abs(h)<Math.abs(m)?h:m},v.bB=function(n){return n[0]=0,n[1]=0,n[2]=0,n},v.bC=function(n,t,r,l){const h=Math.sqrt(n*n+t*t),m=Math.sqrt(r*r+l*l);n/=h,t/=h,r/=m,l/=m;const _=Math.acos(n*r+t*l);return-t*r+n*l>0?_:-_},v.bD=function(n,t){const r=bi(n,2*Math.PI),l=bi(t,2*Math.PI);return Math.min(Math.abs(r-l),Math.abs(r-l+2*Math.PI),Math.abs(r-l-2*Math.PI))},v.bE=function(){const n={},t=ye.$version;for(const r in ye.$root){const l=ye.$root[r];if(l.required){let h=null;h=r==="version"?t:l.type==="array"?[]:{},h!=null&&(n[r]=h)}}return n},v.bF=Dl,v.bG=ce,v.bH=function n(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let l=0;l<t.length;l++)if(!n(t[l],r[l]))return!1;return!0}if(typeof t=="object"&&t!==null&&r!==null){if(typeof r!="object"||Object.keys(t).length!==Object.keys(r).length)return!1;for(const l in t)if(!n(t[l],r[l]))return!1;return!0}return t===r},v.bI=function(n){n=n.slice();const t=Object.create(null);for(let r=0;r<n.length;r++)t[n[r].id]=n[r];for(let r=0;r<n.length;r++)"ref"in n[r]&&(n[r]=ei(n[r],t[n[r].ref]));return n},v.bJ=function(n,t){if(n.type==="custom")return new Gv(n,t);switch(n.type){case"background":return new $v(n,t);case"circle":return new Ox(n,t);case"color-relief":return new Ax(n,t);case"fill":return new qx(n,t);case"fill-extrusion":return new nv(n,t);case"heatmap":return new Cx(n,t);case"hillshade":return new Mx(n,t);case"line":return new hv(n,t);case"raster":return new Vv(n,t);case"symbol":return new Up(n,t)}},v.bK=re,v.bL=function(n,t){if(!n)return[{command:"setStyle",args:[t]}];let r=[];try{if(!Tt(n.version,t.version))return[{command:"setStyle",args:[t]}];Tt(n.center,t.center)||r.push({command:"setCenter",args:[t.center]}),Tt(n.state,t.state)||r.push({command:"setGlobalState",args:[t.state]}),Tt(n.centerAltitude,t.centerAltitude)||r.push({command:"setCenterAltitude",args:[t.centerAltitude]}),Tt(n.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),Tt(n.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),Tt(n.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),Tt(n.roll,t.roll)||r.push({command:"setRoll",args:[t.roll]}),Tt(n.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),Tt(n.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),Tt(n.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),Tt(n.light,t.light)||r.push({command:"setLight",args:[t.light]}),Tt(n.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),Tt(n.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),Tt(n.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});const l={},h=[];(function(_,x,B,O){let P;for(P in x=x||{},_=_||{})Object.prototype.hasOwnProperty.call(_,P)&&(Object.prototype.hasOwnProperty.call(x,P)||lr(P,B,O));for(P in x)Object.prototype.hasOwnProperty.call(x,P)&&(Object.prototype.hasOwnProperty.call(_,P)?Tt(_[P],x[P])||(_[P].type==="geojson"&&x[P].type==="geojson"&&Qi(_,x,P)?Zt(B,{command:"setGeoJSONSourceData",args:[P,x[P].data]}):cr(P,x,B,O)):Ei(P,x,B))})(n.sources,t.sources,h,l);const m=[];n.layers&&n.layers.forEach((_=>{"source"in _&&l[_.source]?r.push({command:"removeLayer",args:[_.id]}):m.push(_)})),r=r.concat(h),(function(_,x,B){x=x||[];const O=(_=_||[]).map(ci),P=x.map(ci),I=_.reduce(rr,{}),k=x.reduce(rr,{}),z=O.slice(),N=Object.create(null);let Z,K,ee,_e,oe;for(let he=0,Be=0;he<O.length;he++)Z=O[he],Object.prototype.hasOwnProperty.call(k,Z)?Be++:(Zt(B,{command:"removeLayer",args:[Z]}),z.splice(z.indexOf(Z,Be),1));for(let he=0,Be=0;he<P.length;he++)Z=P[P.length-1-he],z[z.length-1-he]!==Z&&(Object.prototype.hasOwnProperty.call(I,Z)?(Zt(B,{command:"removeLayer",args:[Z]}),z.splice(z.lastIndexOf(Z,z.length-Be),1)):Be++,_e=z[z.length-he],Zt(B,{command:"addLayer",args:[k[Z],_e]}),z.splice(z.length-he,0,Z),N[Z]=!0);for(let he=0;he<P.length;he++)if(Z=P[he],K=I[Z],ee=k[Z],!N[Z]&&!Tt(K,ee))if(Tt(K.source,ee.source)&&Tt(K["source-layer"],ee["source-layer"])&&Tt(K.type,ee.type)){for(oe in si(K.layout,ee.layout,B,Z,null,"setLayoutProperty"),si(K.paint,ee.paint,B,Z,null,"setPaintProperty"),Tt(K.filter,ee.filter)||Zt(B,{command:"setFilter",args:[Z,ee.filter]}),Tt(K.minzoom,ee.minzoom)&&Tt(K.maxzoom,ee.maxzoom)||Zt(B,{command:"setLayerZoomRange",args:[Z,ee.minzoom,ee.maxzoom]}),K)Object.prototype.hasOwnProperty.call(K,oe)&&oe!=="layout"&&oe!=="paint"&&oe!=="filter"&&oe!=="metadata"&&oe!=="minzoom"&&oe!=="maxzoom"&&(oe.indexOf("paint.")===0?si(K[oe],ee[oe],B,Z,oe.slice(6),"setPaintProperty"):Tt(K[oe],ee[oe])||Zt(B,{command:"setLayerProperty",args:[Z,oe,ee[oe]]}));for(oe in ee)Object.prototype.hasOwnProperty.call(ee,oe)&&!Object.prototype.hasOwnProperty.call(K,oe)&&oe!=="layout"&&oe!=="paint"&&oe!=="filter"&&oe!=="metadata"&&oe!=="minzoom"&&oe!=="maxzoom"&&(oe.indexOf("paint.")===0?si(K[oe],ee[oe],B,Z,oe.slice(6),"setPaintProperty"):Tt(K[oe],ee[oe])||Zt(B,{command:"setLayerProperty",args:[Z,oe,ee[oe]]}))}else Zt(B,{command:"removeLayer",args:[Z]}),_e=z[z.lastIndexOf(Z)+1],Zt(B,{command:"addLayer",args:[ee,_e]})})(m,t.layers,r)}catch(l){console.warn("Unable to compute style diff:",l),r=[{command:"setStyle",args:[t]}]}return r},v.bM=function(n){const t=[],r=n.id;return r===void 0&&t.push({message:`layers.${r}: missing required property "id"`}),n.render===void 0&&t.push({message:`layers.${r}: missing required method "render"`}),n.renderingMode&&n.renderingMode!=="2d"&&n.renderingMode!=="3d"&&t.push({message:`layers.${r}: property "renderingMode" must be either "2d" or "3d"`}),t},v.bN=vt,v.bO=Ht,v.bP=class extends sn{constructor(n,t){super(n,t),this.current=0}set(n){this.current!==n&&(this.current=n,this.gl.uniform1i(this.location,n))}},v.bQ=on,v.bR=class extends sn{constructor(n,t){super(n,t),this.current=br}set(n){if(n[12]!==this.current[12]||n[0]!==this.current[0])return this.current=n,void this.gl.uniformMatrix4fv(this.location,!1,n);for(let t=1;t<16;t++)if(n[t]!==this.current[t]){this.current=n,this.gl.uniformMatrix4fv(this.location,!1,n);break}}},v.bS=ur,v.bT=class extends sn{constructor(n,t){super(n,t),this.current=[0,0,0]}set(n){n[0]===this.current[0]&&n[1]===this.current[1]&&n[2]===this.current[2]||(this.current=n,this.gl.uniform3f(this.location,n[0],n[1],n[2]))}},v.bU=class extends sn{constructor(n,t){super(n,t),this.current=[0,0]}set(n){n[0]===this.current[0]&&n[1]===this.current[1]||(this.current=n,this.gl.uniform2f(this.location,n[0],n[1]))}},v.bV=Te,v.bW=function(n,t){var r=Math.sin(t),l=Math.cos(t);return n[0]=l,n[1]=r,n[2]=0,n[3]=-r,n[4]=l,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n},v.bX=function(n,t,r){var l=t[0],h=t[1],m=t[2];return n[0]=l*r[0]+h*r[3]+m*r[6],n[1]=l*r[1]+h*r[4]+m*r[7],n[2]=l*r[2]+h*r[5]+m*r[8],n},v.bY=function(n,t,r,l,h,m,_){var x=1/(t-r),B=1/(l-h),O=1/(m-_);return n[0]=-2*x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*B,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=2*O,n[11]=0,n[12]=(t+r)*x,n[13]=(h+l)*B,n[14]=(_+m)*O,n[15]=1,n},v.bZ=class extends sn{constructor(n,t){super(n,t),this.current=new Array}set(n){if(n!=this.current){this.current=n;const t=new Float32Array(4*n.length);for(let r=0;r<n.length;r++)t[4*r]=n[r].r,t[4*r+1]=n[r].g,t[4*r+2]=n[r].b,t[4*r+3]=n[r].a;this.gl.uniform4fv(this.location,t)}}},v.b_=class extends sn{constructor(n,t){super(n,t),this.current=new Array}set(n){if(n!=this.current){this.current=n;const t=new Float32Array(n);this.gl.uniform1fv(this.location,t)}}},v.ba=function(){return new Float64Array(16)},v.bb=function(n,t,r){const l=new Float64Array(4);return qt(l,n,t-90,r),l},v.bc=function(n,t,r,l){var h,m,_,x,B,O=t[0],P=t[1],I=t[2],k=t[3],z=r[0],N=r[1],Z=r[2],K=r[3];return(m=O*z+P*N+I*Z+k*K)<0&&(m=-m,z=-z,N=-N,Z=-Z,K=-K),1-m>Ae?(h=Math.acos(m),_=Math.sin(h),x=Math.sin((1-l)*h)/_,B=Math.sin(l*h)/_):(x=1-l,B=l),n[0]=x*O+B*z,n[1]=x*P+B*N,n[2]=x*I+B*Z,n[3]=x*k+B*K,n},v.bd=function(n){const t=new Float64Array(9);var r,l,h,m,_,x,B,O,P,I,k,z,N,Z,K,ee,_e,oe;I=(h=(l=n)[0])*(B=h+h),k=(m=l[1])*B,N=(_=l[2])*B,Z=_*(O=m+m),ee=(x=l[3])*B,_e=x*O,oe=x*(P=_+_),(r=t)[0]=1-(z=m*O)-(K=_*P),r[3]=k-oe,r[6]=N+_e,r[1]=k+oe,r[4]=1-I-K,r[7]=Z-ee,r[2]=N-_e,r[5]=Z+ee,r[8]=1-I-z;const he=Dt(-Math.asin(At(t[2],-1,1)));let Be,Ee;return Math.hypot(t[5],t[8])<.001?(Be=0,Ee=-Dt(Math.atan2(t[3],t[4]))):(Be=Dt(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),Ee=Dt(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:Be,pitch:he+90,bearing:Ee}},v.be=function(n,t){return n.roll==t.roll&&n.pitch==t.pitch&&n.bearing==t.bearing},v.bf=ri,v.bg=Ji,v.bh=Kl,v.bi=Fu,v.bj=Wl,v.bk=Bi,v.bl=Ye,v.bm=Ar,v.bn=function(n,t,r,l,h){return Bi(l,h,At((n-t)/(r-t),0,1))},v.bo=bi,v.bp=function(){return new Float64Array(3)},v.bq=function(n,t,r,l){return n[0]=t[0]+r[0]*l,n[1]=t[1]+r[1]*l,n[2]=t[2]+r[2]*l,n},v.br=qt,v.bs=function(n,t,r){var l=r[0],h=r[1],m=r[2],_=r[3],x=t[0],B=t[1],O=t[2],P=h*O-m*B,I=m*x-l*O,k=l*B-h*x;return n[0]=x+_*(P+=P)+h*(k+=k)-m*(I+=I),n[1]=B+_*I+m*P-l*k,n[2]=O+_*k+l*I-h*P,n},v.bt=function(n,t,r){const l=(h=[n[0],n[1],n[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((P=h[8])*(_=h[4])-(x=h[5])*(O=h[7]))+h[1]*(-P*(m=h[3])+x*(B=h[6]))+h[2]*(O*m-_*B);var h,m,_,x,B,O,P;if(l===0)return null;const I=_t([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),k=_t([],[r[0],r[1],r[2]],[n[0],n[1],n[2]]),z=_t([],[n[0],n[1],n[2]],[t[0],t[1],t[2]]),N=dt([],I,-n[3]);return Ge(N,N,dt([],k,-t[3])),Ge(N,N,dt([],z,-r[3])),dt(N,N,1/l),N},v.bu=hm,v.bv=function(){return new Float64Array(4)},v.bw=function(n,t,r,l){var h=[],m=[];return h[0]=t[0]-r[0],h[1]=t[1]-r[1],h[2]=t[2]-r[2],m[0]=h[0]*Math.cos(l)-h[1]*Math.sin(l),m[1]=h[0]*Math.sin(l)+h[1]*Math.cos(l),m[2]=h[2],n[0]=m[0]+r[0],n[1]=m[1]+r[1],n[2]=m[2]+r[2],n},v.bx=function(n,t,r,l){var h=[],m=[];return h[0]=t[0]-r[0],h[1]=t[1]-r[1],h[2]=t[2]-r[2],m[0]=h[0],m[1]=h[1]*Math.cos(l)-h[2]*Math.sin(l),m[2]=h[1]*Math.sin(l)+h[2]*Math.cos(l),n[0]=m[0]+r[0],n[1]=m[1]+r[1],n[2]=m[2]+r[2],n},v.by=function(n,t,r,l){var h=[],m=[];return h[0]=t[0]-r[0],h[1]=t[1]-r[1],h[2]=t[2]-r[2],m[0]=h[2]*Math.sin(l)+h[0]*Math.cos(l),m[1]=h[1],m[2]=h[2]*Math.cos(l)-h[0]*Math.sin(l),n[0]=m[0]+r[0],n[1]=m[1]+r[1],n[2]=m[2]+r[2],n},v.bz=function(n,t,r){var l=Math.sin(r),h=Math.cos(r),m=t[0],_=t[1],x=t[2],B=t[3],O=t[8],P=t[9],I=t[10],k=t[11];return t!==n&&(n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=m*h-O*l,n[1]=_*h-P*l,n[2]=x*h-I*l,n[3]=B*h-k*l,n[8]=m*l+O*h,n[9]=_*l+P*h,n[10]=x*l+I*h,n[11]=B*l+k*h,n},v.c=de,v.c0=mv,v.c1=class extends c{},v.c2=Hf,v.c3=function(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))},v.c4=Zg,v.c5=function(n,t,r){var l=t[0],h=t[1],m=t[2],_=r[3]*l+r[7]*h+r[11]*m+r[15];return n[0]=(r[0]*l+r[4]*h+r[8]*m+r[12])/(_=_||1),n[1]=(r[1]*l+r[5]*h+r[9]*m+r[13])/_,n[2]=(r[2]*l+r[6]*h+r[10]*m+r[14])/_,n},v.c6=class extends $o{},v.c7=class extends E{},v.c8=function(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]&&n[9]===t[9]&&n[10]===t[10]&&n[11]===t[11]&&n[12]===t[12]&&n[13]===t[13]&&n[14]===t[14]&&n[15]===t[15]},v.c9=function(n,t){var r=n[0],l=n[1],h=n[2],m=n[3],_=n[4],x=n[5],B=n[6],O=n[7],P=n[8],I=n[9],k=n[10],z=n[11],N=n[12],Z=n[13],K=n[14],ee=n[15],_e=t[0],oe=t[1],he=t[2],Be=t[3],Ee=t[4],Ve=t[5],it=t[6],Ke=t[7],et=t[8],Bt=t[9],Qe=t[10],tt=t[11],Le=t[12],Rt=t[13],zt=t[14],St=t[15];return Math.abs(r-_e)<=Ae*Math.max(1,Math.abs(r),Math.abs(_e))&&Math.abs(l-oe)<=Ae*Math.max(1,Math.abs(l),Math.abs(oe))&&Math.abs(h-he)<=Ae*Math.max(1,Math.abs(h),Math.abs(he))&&Math.abs(m-Be)<=Ae*Math.max(1,Math.abs(m),Math.abs(Be))&&Math.abs(_-Ee)<=Ae*Math.max(1,Math.abs(_),Math.abs(Ee))&&Math.abs(x-Ve)<=Ae*Math.max(1,Math.abs(x),Math.abs(Ve))&&Math.abs(B-it)<=Ae*Math.max(1,Math.abs(B),Math.abs(it))&&Math.abs(O-Ke)<=Ae*Math.max(1,Math.abs(O),Math.abs(Ke))&&Math.abs(P-et)<=Ae*Math.max(1,Math.abs(P),Math.abs(et))&&Math.abs(I-Bt)<=Ae*Math.max(1,Math.abs(I),Math.abs(Bt))&&Math.abs(k-Qe)<=Ae*Math.max(1,Math.abs(k),Math.abs(Qe))&&Math.abs(z-tt)<=Ae*Math.max(1,Math.abs(z),Math.abs(tt))&&Math.abs(N-Le)<=Ae*Math.max(1,Math.abs(N),Math.abs(Le))&&Math.abs(Z-Rt)<=Ae*Math.max(1,Math.abs(Z),Math.abs(Rt))&&Math.abs(K-zt)<=Ae*Math.max(1,Math.abs(K),Math.abs(zt))&&Math.abs(ee-St)<=Ae*Math.max(1,Math.abs(ee),Math.abs(St))},v.cA=function(n,t){$.REGISTERED_PROTOCOLS[n]=t},v.cB=function(n){delete $.REGISTERED_PROTOCOLS[n]},v.cC=function(n,t){const r={};for(let h=0;h<n.length;h++){const m=t&&t[n[h].id]||If(n[h]);t&&(t[n[h].id]=m);let _=r[m];_||(_=r[m]=[]),_.push(n[h])}const l=[];for(const h in r)l.push(r[h]);return l},v.cD=ft,v.cE=V_,v.cF=H_,v.cG=v_,v.cH=function(n){n.bucket.createArrays(),n.bucket.tilePixelRatio=Ft/(512*n.bucket.overscaling),n.bucket.compareText={},n.bucket.iconsNeedLinear=!1;const t=n.bucket.layers[0],r=t.layout,l=t._unevaluatedLayout._values,h={layoutIconSize:l["icon-size"].possiblyEvaluate(new Oi(n.bucket.zoom+1),n.canonical),layoutTextSize:l["text-size"].possiblyEvaluate(new Oi(n.bucket.zoom+1),n.canonical),textMaxSize:l["text-size"].possiblyEvaluate(new Oi(18))};if(n.bucket.textSizeData.kind==="composite"){const{minZoom:O,maxZoom:P}=n.bucket.textSizeData;h.compositeTextSizes=[l["text-size"].possiblyEvaluate(new Oi(O),n.canonical),l["text-size"].possiblyEvaluate(new Oi(P),n.canonical)]}if(n.bucket.iconSizeData.kind==="composite"){const{minZoom:O,maxZoom:P}=n.bucket.iconSizeData;h.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new Oi(O),n.canonical),l["icon-size"].possiblyEvaluate(new Oi(P),n.canonical)]}const m=r.get("text-line-height")*xr,_=r.get("text-rotation-alignment")!=="viewport"&&r.get("symbol-placement")!=="point",x=r.get("text-keep-upright"),B=r.get("text-size");for(const O of n.bucket.features){const P=r.get("text-font").evaluate(O,{},n.canonical).join(","),I=B.evaluate(O,{},n.canonical),k=h.layoutTextSize.evaluate(O,{},n.canonical),z=h.layoutIconSize.evaluate(O,{},n.canonical),N={horizontal:{},vertical:void 0},Z=O.text;let K,ee=[0,0];if(Z){const he=Z.toString(),Be=r.get("text-letter-spacing").evaluate(O,{},n.canonical)*xr,Ee=Rf(he)?Be:0,Ve=r.get("text-anchor").evaluate(O,{},n.canonical),it=iy(t,O,n.canonical);if(!it){const Qe=r.get("text-radial-offset").evaluate(O,{},n.canonical);ee=Qe?ty(Ve,[Qe*xr,fm]):r.get("text-offset").evaluate(O,{},n.canonical).map((tt=>tt*xr))}let Ke=_?"center":r.get("text-justify").evaluate(O,{},n.canonical);const et=r.get("symbol-placement")==="point"?r.get("text-max-width").evaluate(O,{},n.canonical)*xr:1/0,Bt=()=>{n.bucket.allowVerticalPlacement&&Ll(he)&&(N.vertical=Fp(Z,n.glyphMap,n.glyphPositions,n.imagePositions,P,et,m,Ve,"left",Ee,ee,v.ao.vertical,!0,k,I))};if(!_&&it){const Qe=new Set;if(Ke==="auto")for(let Le=0;Le<it.values.length;Le+=2)Qe.add(mm(it.values[Le]));else Qe.add(Ke);let tt=!1;for(const Le of Qe)if(!N.horizontal[Le])if(tt)N.horizontal[Le]=N.horizontal[0];else{const Rt=Fp(Z,n.glyphMap,n.glyphPositions,n.imagePositions,P,et,m,"center",Le,Ee,ee,v.ao.horizontal,!1,k,I);Rt&&(N.horizontal[Le]=Rt,tt=Rt.positionedLines.length===1)}Bt()}else{Ke==="auto"&&(Ke=mm(Ve));const Qe=Fp(Z,n.glyphMap,n.glyphPositions,n.imagePositions,P,et,m,Ve,Ke,Ee,ee,v.ao.horizontal,!1,k,I);Qe&&(N.horizontal[Ke]=Qe),Bt(),Ll(he)&&_&&x&&(N.vertical=Fp(Z,n.glyphMap,n.glyphPositions,n.imagePositions,P,et,m,Ve,Ke,Ee,ee,v.ao.vertical,!1,k,I))}}let _e=!1;if(O.icon&&O.icon.name){const he=n.imageMap[O.icon.name];he&&(K=Lv(n.imagePositions[O.icon.name],r.get("icon-offset").evaluate(O,{},n.canonical),r.get("icon-anchor").evaluate(O,{},n.canonical)),_e=!!he.sdf,n.bucket.sdfIcons===void 0?n.bucket.sdfIcons=_e:n.bucket.sdfIcons!==_e&&be("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(he.pixelRatio!==n.bucket.pixelRatio||r.get("icon-rotate").constantOr(1)!==0)&&(n.bucket.iconsNeedLinear=!0))}const oe=ny(N.horizontal)||N.vertical;n.bucket.iconsInText=!!oe&&oe.iconsInText,(oe||K)&&Qv(n.bucket,O,N,K,n.imageMap,h,k,z,ee,_e,n.canonical,n.subdivisionGranularity)}n.showCollisionBoxes&&n.bucket.generateCollisionDebugBuffers()},v.cI=em,v.cJ=Yf,v.cK=Qf,v.cL=a_,v.cM=im,v.cN=class{constructor(n){this._marks={start:[n.url,"start"].join("#"),end:[n.url,"end"].join("#"),measure:n.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let n=performance.getEntriesByName(this._marks.measure);return n.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),n=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),n}},v.cO=function(n,t,r,l,h){return a(this,void 0,void 0,(function*(){if(nt())try{return yield at(n,t,r,l,h)}catch{}return(function(m,_,x,B,O){const P=m.width,I=m.height;qe&&Ct||(qe=new OffscreenCanvas(P,I),Ct=qe.getContext("2d",{willReadFrequently:!0})),qe.width=P,qe.height=I,Ct.drawImage(m,0,0,P,I);const k=Ct.getImageData(_,x,B,O);return Ct.clearRect(0,0,P,I),k.data})(n,t,r,l,h)}))},v.cP=Kg,v.cQ=D,v.cR=o_,v.cS=Xl,v.cT=Ca,v.cU=function(n,t){const r=new Map;if(n!=null)if(n.type==="Feature")r.set(Zu(n,t),n);else for(const l of n.features)r.set(Zu(l,t),l);return r},v.cV=function(n,t){if(n==null)return!0;if(n.type==="Feature")return Zu(n,t)!=null;if(n.type==="FeatureCollection"){const r=new Set;for(const l of n.features){const h=Zu(l,t);if(h==null||r.has(h))return!1;r.add(h)}return!0}return!1},v.cW=function(n,t,r){var l,h,m,_;if(t.removeAll&&n.clear(),t.remove)for(const x of t.remove)n.delete(x);if(t.add)for(const x of t.add){const B=Zu(x,r);B!=null&&n.set(B,x)}if(t.update)for(const x of t.update){let B=n.get(x.id);if(B==null)continue;const O=!x.removeAllProperties&&(((l=x.removeProperties)===null||l===void 0?void 0:l.length)>0||((h=x.addOrUpdateProperties)===null||h===void 0?void 0:h.length)>0);if((x.newGeometry||x.removeAllProperties||O)&&(B=Object.assign({},B),n.set(x.id,B),O&&(B.properties=Object.assign({},B.properties))),x.newGeometry&&(B.geometry=x.newGeometry),x.removeAllProperties)B.properties={};else if(((m=x.removeProperties)===null||m===void 0?void 0:m.length)>0)for(const P of x.removeProperties)Object.prototype.hasOwnProperty.call(B.properties,P)&&delete B.properties[P];if(((_=x.addOrUpdateProperties)===null||_===void 0?void 0:_.length)>0)for(const{key:P,value:I}of x.addOrUpdateProperties)B.properties[P]=I}},v.cX=Bn,v.ca=function(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},v.cb=n=>n.type==="symbol",v.cc=n=>n.type==="circle",v.cd=n=>n.type==="heatmap",v.ce=n=>n.type==="line",v.cf=n=>n.type==="fill",v.cg=n=>n.type==="fill-extrusion",v.ch=n=>n.type==="hillshade",v.ci=n=>n.type==="color-relief",v.cj=n=>n.type==="raster",v.ck=n=>n.type==="background",v.cl=n=>n.type==="custom",v.cm=gt,v.cn=function(n,t,r){const l=ni(t.x-r.x,t.y-r.y),h=ni(n.x-r.x,n.y-r.y);var m,_;return Dt(Math.atan2(l[0]*h[1]-l[1]*h[0],(m=l)[0]*(_=h)[0]+m[1]*_[1]))},v.co=ct,v.cp=function(n,t){return pi[t]&&(n instanceof MouseEvent||n instanceof WheelEvent)},v.cq=function(n,t){return Yt[t]&&"touches"in n},v.cr=function(n){return Yt[n]||pi[n]},v.cs=function(n,t,r){var l=t[0],h=t[1];return n[0]=r[0]*l+r[4]*h+r[12],n[1]=r[1]*l+r[5]*h+r[13],n},v.ct=function(n,t){const{x:r,y:l}=Hu.fromLngLat(t);return!(n<0||n>25||l<0||l>=1||r<0||r>=1)},v.cu=function(n,t){return n[0]=t[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},v.cv=class extends Ul{},v.cw=t4,v.cy=function(n){return n.message===hi},v.cz=se,v.d=xe,v.e=ut,v.f=n=>a(void 0,void 0,void 0,(function*(){if(n.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(n)],{type:"image/png"});try{return createImageBitmap(t)}catch(r){throw new Error(`Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),v.g=U,v.h=n=>new Promise(((t,r)=>{const l=new Image;l.onload=()=>{t(l),URL.revokeObjectURL(l.src),l.onload=null,window.requestAnimationFrame((()=>{l.src=ot}))},l.onerror=()=>r(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 h=new Blob([new Uint8Array(n)],{type:"image/png"});l.src=n.byteLength?URL.createObjectURL(h):ot})),v.i=Ue,v.j=(n,t)=>fe(ut(n,{type:"json"}),t),v.k=ze,v.l=He,v.m=fe,v.n=(n,t)=>fe(ut(n,{type:"arrayBuffer"}),t),v.o=function(n){return new im(n).readFields(Ov,[])},v.p=x_,v.q=ku,v.r=$r,v.s=mt,v.t=vu,v.u=ai,v.v=ye,v.w=be,v.x=Af,v.y=Ra,v.z=Fo})),y("worker",["./shared"],(function(v){class a{constructor($,U){this.keyCache={},$&&this.replace($,U)}replace($,U){this._layerConfigs={},this._layers={},this.update($,[],U)}update($,U,q){for(const ce of $){this._layerConfigs[ce.id]=ce;const fe=this._layers[ce.id]=v.bJ(ce,q);fe._featureFilter=v.aa(fe.filter,q),this.keyCache[ce.id]&&delete this.keyCache[ce.id]}for(const ce of U)delete this.keyCache[ce],delete this._layerConfigs[ce],delete this._layers[ce];this.familiesBySource={};const se=v.cC(Object.values(this._layerConfigs),this.keyCache);for(const ce of se){const fe=ce.map((yt=>this._layers[yt.id])),xe=fe[0];if(xe.visibility==="none")continue;const ge=xe.source||"";let Me=this.familiesBySource[ge];Me||(Me=this.familiesBySource[ge]={});const He=xe.sourceLayer||"_geojsonTileLayer";let ze=Me[He];ze||(ze=Me[He]=[]),ze.push(fe)}}}class M{constructor($){const U={},q=[];for(const xe in $){const ge=$[xe],Me=U[xe]={};for(const He in ge){const ze=ge[+He];if(!ze||ze.bitmap.width===0||ze.bitmap.height===0)continue;const yt={x:0,y:0,w:ze.bitmap.width+2,h:ze.bitmap.height+2};q.push(yt),Me[He]={rect:yt,metrics:ze.metrics}}}const{w:se,h:ce}=v.p(q),fe=new v.q({width:se||1,height:ce||1});for(const xe in $){const ge=$[xe];for(const Me in ge){const He=ge[+Me];if(!He||He.bitmap.width===0||He.bitmap.height===0)continue;const ze=U[xe][Me].rect;v.q.copy(He.bitmap,fe,{x:0,y:0},{x:ze.x+1,y:ze.y+1},He.bitmap)}}this.image=fe,this.positions=U}}v.cD("GlyphAtlas",M);class D{constructor($){this.tileID=new v.Z($.tileID.overscaledZ,$.tileID.wrap,$.tileID.canonical.z,$.tileID.canonical.x,$.tileID.canonical.y),this.uid=$.uid,this.zoom=$.zoom,this.pixelRatio=$.pixelRatio,this.tileSize=$.tileSize,this.source=$.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=$.showCollisionBoxes,this.collectResourceTiming=!!$.collectResourceTiming,this.returnDependencies=!!$.returnDependencies,this.promoteId=$.promoteId,this.inFlightDependencies=[]}parse($,U,q,se,ce){return v._(this,void 0,void 0,(function*(){this.status="parsing",this.data=$,this.collisionBoxArray=new v.a8;const fe=new v.cE(Object.keys($.layers).sort()),xe=new v.cF(this.tileID,this.promoteId);xe.bucketLayerIDs=[];const ge={},Me={featureIndex:xe,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:q,subdivisionGranularity:ce},He=U.familiesBySource[this.source];for(const si in He){const ci=$.layers[si];if(!ci)continue;ci.version===1&&v.w(`Vector tile source "${this.source}" layer "${si}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const rr=fe.encode(si),We=[];for(let Ir=0;Ir<ci.length;Ir++){const $i=ci.feature(Ir),xs=xe.getId($i,si);We.push({feature:$i,id:xs,index:Ir,sourceLayerIndex:rr})}for(const Ir of He[si]){const $i=Ir[0];$i.source!==this.source&&v.w(`layer.source = ${$i.source} does not equal this.source = ${this.source}`),$i.minzoom&&this.zoom<Math.floor($i.minzoom)||$i.maxzoom&&this.zoom>=$i.maxzoom||$i.visibility!=="none"&&(F(Ir,this.zoom,q),(ge[$i.id]=$i.createBucket({index:xe.bucketLayerIDs.length,layers:Ir,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:rr,sourceID:this.source})).populate(We,Me,this.tileID.canonical),xe.bucketLayerIDs.push(Ir.map((xs=>xs.id))))}}const ze=v.bN(Me.glyphDependencies,(si=>Object.keys(si).map(Number)));this.inFlightDependencies.forEach((si=>si?.abort())),this.inFlightDependencies=[];let yt=Promise.resolve({});if(Object.keys(ze).length){const si=new AbortController;this.inFlightDependencies.push(si),yt=se.sendAsync({type:"GG",data:{stacks:ze,source:this.source,tileID:this.tileID,type:"glyphs"}},si)}const ye=Object.keys(Me.iconDependencies);let Nt=Promise.resolve({});if(ye.length){const si=new AbortController;this.inFlightDependencies.push(si),Nt=se.sendAsync({type:"GI",data:{icons:ye,source:this.source,tileID:this.tileID,type:"icons"}},si)}const ei=Object.keys(Me.patternDependencies);let Tt=Promise.resolve({});if(ei.length){const si=new AbortController;this.inFlightDependencies.push(si),Tt=se.sendAsync({type:"GI",data:{icons:ei,source:this.source,tileID:this.tileID,type:"patterns"}},si)}const[Zt,Ei,lr]=yield Promise.all([yt,Nt,Tt]),cr=new M(Zt),Qi=new v.cG(Ei,lr);for(const si in ge){const ci=ge[si];ci instanceof v.a9?(F(ci.layers,this.zoom,q),v.cH({bucket:ci,glyphMap:Zt,glyphPositions:cr.positions,imageMap:Ei,imagePositions:Qi.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Me.subdivisionGranularity})):ci.hasPattern&&(ci instanceof v.cI||ci instanceof v.cJ||ci instanceof v.cK)&&(F(ci.layers,this.zoom,q),ci.addFeatures(Me,this.tileID.canonical,Qi.patternPositions))}return this.status="done",{buckets:Object.values(ge).filter((si=>!si.isEmpty())),featureIndex:xe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:cr.image,imageAtlas:Qi,glyphMap:this.returnDependencies?Zt:null,iconMap:this.returnDependencies?Ei:null,glyphPositions:this.returnDependencies?cr.positions:null}}))}}function F(de,$,U){const q=new v.F($);for(const se of de)se.recalculate(q,U)}class H{constructor($,U,q){this.actor=$,this.layerIndex=U,this.availableImages=q,this.fetching={},this.loading={},this.loaded={}}loadVectorTile($,U){return v._(this,void 0,void 0,(function*(){const q=yield v.n($.request,U);try{return{vectorTile:new v.cL(new v.cM(q.data)),rawData:q.data,cacheControl:q.cacheControl,expires:q.expires}}catch(se){const ce=new Uint8Array(q.data);let fe=`Unable to parse the tile at ${$.request.url}, `;throw fe+=ce[0]===31&&ce[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${se.message}`,new Error(fe)}}))}loadTile($){return v._(this,void 0,void 0,(function*(){const U=$.uid,q=!!($&&$.request&&$.request.collectResourceTiming)&&new v.cN($.request),se=new D($);this.loading[U]=se;const ce=new AbortController;se.abort=ce;try{const fe=yield this.loadVectorTile($,ce);if(delete this.loading[U],!fe)return null;const xe=fe.rawData,ge={};fe.expires&&(ge.expires=fe.expires),fe.cacheControl&&(ge.cacheControl=fe.cacheControl);const Me={};if(q){const ze=q.finish();ze&&(Me.resourceTiming=JSON.parse(JSON.stringify(ze)))}se.vectorTile=fe.vectorTile;const He=se.parse(fe.vectorTile,this.layerIndex,this.availableImages,this.actor,$.subdivisionGranularity);this.loaded[U]=se,this.fetching[U]={rawTileData:xe,cacheControl:ge,resourceTiming:Me};try{const ze=yield He;return v.e({rawTileData:xe.slice(0)},ze,ge,Me)}finally{delete this.fetching[U]}}catch(fe){throw delete this.loading[U],se.status="done",this.loaded[U]=se,fe}}))}reloadTile($){return v._(this,void 0,void 0,(function*(){const U=$.uid;if(!this.loaded||!this.loaded[U])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const q=this.loaded[U];if(q.showCollisionBoxes=$.showCollisionBoxes,q.status==="parsing"){const se=yield q.parse(q.vectorTile,this.layerIndex,this.availableImages,this.actor,$.subdivisionGranularity);let ce;if(this.fetching[U]){const{rawTileData:fe,cacheControl:xe,resourceTiming:ge}=this.fetching[U];delete this.fetching[U],ce=v.e({rawTileData:fe.slice(0)},se,xe,ge)}else ce=se;return ce}if(q.status==="done"&&q.vectorTile)return q.parse(q.vectorTile,this.layerIndex,this.availableImages,this.actor,$.subdivisionGranularity)}))}abortTile($){return v._(this,void 0,void 0,(function*(){const U=this.loading,q=$.uid;U&&U[q]&&U[q].abort&&(U[q].abort.abort(),delete U[q])}))}removeTile($){return v._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[$.uid]&&delete this.loaded[$.uid]}))}}class W{constructor(){this.loaded={}}loadTile($){return v._(this,void 0,void 0,(function*(){const{uid:U,encoding:q,rawImageData:se,redFactor:ce,greenFactor:fe,blueFactor:xe,baseShift:ge}=$,Me=se.width+2,He=se.height+2,ze=v.b(se)?new v.R({width:Me,height:He},yield v.cO(se,-1,-1,Me,He)):se,yt=new v.cP(U,ze,q,ce,fe,xe,ge);return this.loaded=this.loaded||{},this.loaded[U]=yt,yt}))}removeTile($){const U=this.loaded,q=$.uid;U&&U[q]&&delete U[q]}}var G,Pe,Ie=(function(){if(Pe)return G;function de(U,q){if(U.length!==0){$(U[0],q);for(var se=1;se<U.length;se++)$(U[se],!q)}}function $(U,q){for(var se=0,ce=0,fe=0,xe=U.length,ge=xe-1;fe<xe;ge=fe++){var Me=(U[fe][0]-U[ge][0])*(U[ge][1]+U[fe][1]),He=se+Me;ce+=Math.abs(se)>=Math.abs(Me)?se-He+Me:Me-He+se,se=He}se+ce>=0!=!!q&&U.reverse()}return Pe=1,G=function U(q,se){var ce,fe=q&&q.type;if(fe==="FeatureCollection")for(ce=0;ce<q.features.length;ce++)U(q.features[ce],se);else if(fe==="GeometryCollection")for(ce=0;ce<q.geometries.length;ce++)U(q.geometries[ce],se);else if(fe==="Feature")U(q.geometry,se);else if(fe==="Polygon")de(q.coordinates,se);else if(fe==="MultiPolygon")for(ce=0;ce<q.coordinates.length;ce++)de(q.coordinates[ce],se);return q}})(),rt=v.cQ(Ie);class nt extends v.cS{constructor($,U){super(new v.cM,0,U,[],[]),this.feature=$,this.type=$.type,this.properties=$.tags?$.tags:{},"id"in $&&(typeof $.id=="string"?this.id=parseInt($.id,10):typeof $.id!="number"||isNaN($.id)||(this.id=$.id))}loadGeometry(){const $=[],U=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(const q of U){const se=[];for(const ce of q)se.push(new v.P(ce[0],ce[1]));$.push(se)}return $}}class Ae extends v.cR{constructor($,U){super(new v.cM),this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.version=U?U.version:1,this.extent=U?U.extent:4096,this.length=$.length,this.features=$}feature($){return new nt(this.features[$],this.extent)}}function ke(de,$){$.writeVarintField(15,de.version||1),$.writeStringField(1,de.name||""),$.writeVarintField(5,de.extent||4096);const U={keys:[],values:[],keycache:{},valuecache:{}};for(let ce=0;ce<de.length;ce++)U.feature=de.feature(ce),$.writeMessage(2,Te,U);const q=U.keys;for(const ce of q)$.writeStringField(3,ce);const se=U.values;for(const ce of se)$.writeMessage(4,Ge,ce)}function Te(de,$){if(!de.feature)return;const U=de.feature;U.id!==void 0&&$.writeVarintField(1,U.id),$.writeMessage(2,je,de),$.writeVarintField(3,U.type),$.writeMessage(4,pt,U)}function je(de,$){for(const U in de.feature?.properties){let q=de.feature.properties[U],se=de.keycache[U];if(q===null)continue;se===void 0&&(de.keys.push(U),se=de.keys.length-1,de.keycache[U]=se),$.writeVarint(se),typeof q!="string"&&typeof q!="boolean"&&typeof q!="number"&&(q=JSON.stringify(q));const ce=typeof q+":"+q;let fe=de.valuecache[ce];fe===void 0&&(de.values.push(q),fe=de.values.length-1,de.valuecache[ce]=fe),$.writeVarint(fe)}}function Ce(de,$){return($<<3)+(7&de)}function Re(de){return de<<1^de>>31}function pt(de,$){const U=de.loadGeometry(),q=de.type;let se=0,ce=0;for(const fe of U){let xe=1;q===1&&(xe=fe.length),$.writeVarint(Ce(1,xe));const ge=q===3?fe.length-1:fe.length;for(let Me=0;Me<ge;Me++){Me===1&&q!==1&&$.writeVarint(Ce(2,ge-1));const He=fe[Me].x-se,ze=fe[Me].y-ce;$.writeVarint(Re(He)),$.writeVarint(Re(ze)),se+=He,ce+=ze}de.type===3&&$.writeVarint(Ce(7,1))}}function Ge(de,$){const U=typeof de;U==="string"?$.writeStringField(1,de):U==="boolean"?$.writeBooleanField(7,de):U==="number"&&(de%1!=0?$.writeDoubleField(3,de):de<0?$.writeSVarintField(6,de):$.writeVarintField(5,de))}const dt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:de=>de},_t=Math.fround||(Xe=new Float32Array(1),de=>(Xe[0]=+de,Xe[0]));var Xe;class Et{constructor($){this.options=Object.assign(Object.create(dt),$),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load($){const{log:U,minZoom:q,maxZoom:se}=this.options;U&&console.time("total time");const ce=`prepare ${$.length} points`;U&&console.time(ce),this.points=$;const fe=[];for(let ge=0;ge<$.length;ge++){const Me=$[ge];if(!Me.geometry)continue;const[He,ze]=Me.geometry.coordinates,yt=_t(qt(He)),ye=_t(It(ze));fe.push(yt,ye,1/0,ge,-1,1),this.options.reduce&&fe.push(0)}let xe=this.trees[se+1]=this._createTree(fe);U&&console.timeEnd(ce);for(let ge=se;ge>=q;ge--){const Me=+Date.now();xe=this.trees[ge]=this._createTree(this._cluster(xe,ge)),U&&console.log("z%d: %d clusters in %dms",ge,xe.numItems,+Date.now()-Me)}return U&&console.timeEnd("total time"),this}getClusters($,U){let q=(($[0]+180)%360+360)%360-180;const se=Math.max(-90,Math.min(90,$[1]));let ce=$[2]===180?180:(($[2]+180)%360+360)%360-180;const fe=Math.max(-90,Math.min(90,$[3]));if($[2]-$[0]>=360)q=-180,ce=180;else if(q>ce){const ze=this.getClusters([q,se,180,fe],U),yt=this.getClusters([-180,se,ce,fe],U);return ze.concat(yt)}const xe=this.trees[this._limitZoom(U)],ge=xe.range(qt(q),It(fe),qt(ce),It(se)),Me=xe.data,He=[];for(const ze of ge){const yt=this.stride*ze;He.push(Me[yt+5]>1?di(Me,yt,this.clusterProps):this.points[Me[yt+3]])}return He}getChildren($){const U=this._getOriginId($),q=this._getOriginZoom($),se="No cluster with the specified id.",ce=this.trees[q];if(!ce)throw new Error(se);const fe=ce.data;if(U*this.stride>=fe.length)throw new Error(se);const xe=this.options.radius/(this.options.extent*Math.pow(2,q-1)),ge=ce.within(fe[U*this.stride],fe[U*this.stride+1],xe),Me=[];for(const He of ge){const ze=He*this.stride;fe[ze+4]===$&&Me.push(fe[ze+5]>1?di(fe,ze,this.clusterProps):this.points[fe[ze+3]])}if(Me.length===0)throw new Error(se);return Me}getLeaves($,U,q){const se=[];return this._appendLeaves(se,$,U=U||10,q=q||0,0),se}getTile($,U,q){const se=this.trees[this._limitZoom($)],ce=Math.pow(2,$),{extent:fe,radius:xe}=this.options,ge=xe/fe,Me=(q-ge)/ce,He=(q+1+ge)/ce,ze={features:[]};return this._addTileFeatures(se.range((U-ge)/ce,Me,(U+1+ge)/ce,He),se.data,U,q,ce,ze),U===0&&this._addTileFeatures(se.range(1-ge/ce,Me,1,He),se.data,ce,q,ce,ze),U===ce-1&&this._addTileFeatures(se.range(0,Me,ge/ce,He),se.data,-1,q,ce,ze),ze.features.length?ze:null}getClusterExpansionZoom($){let U=this._getOriginZoom($)-1;for(;U<=this.options.maxZoom;){const q=this.getChildren($);if(U++,q.length!==1)break;$=q[0].properties.cluster_id}return U}_appendLeaves($,U,q,se,ce){const fe=this.getChildren(U);for(const xe of fe){const ge=xe.properties;if(ge&&ge.cluster?ce+ge.point_count<=se?ce+=ge.point_count:ce=this._appendLeaves($,ge.cluster_id,q,se,ce):ce<se?ce++:$.push(xe),$.length===q)break}return ce}_createTree($){const U=new v.aI($.length/this.stride|0,this.options.nodeSize,Float32Array);for(let q=0;q<$.length;q+=this.stride)U.add($[q],$[q+1]);return U.finish(),U.data=$,U}_addTileFeatures($,U,q,se,ce,fe){for(const xe of $){const ge=xe*this.stride,Me=U[ge+5]>1;let He,ze,yt;if(Me)He=yi(U,ge,this.clusterProps),ze=U[ge],yt=U[ge+1];else{const ei=this.points[U[ge+3]];He=ei.properties;const[Tt,Zt]=ei.geometry.coordinates;ze=qt(Tt),yt=It(Zt)}const ye={type:1,geometry:[[Math.round(this.options.extent*(ze*ce-q)),Math.round(this.options.extent*(yt*ce-se))]],tags:He};let Nt;Nt=Me||this.options.generateId?U[ge+3]:this.points[U[ge+3]].id,Nt!==void 0&&(ye.id=Nt),fe.features.push(ye)}}_limitZoom($){return Math.max(this.options.minZoom,Math.min(Math.floor(+$),this.options.maxZoom+1))}_cluster($,U){const{radius:q,extent:se,reduce:ce,minPoints:fe}=this.options,xe=q/(se*Math.pow(2,U)),ge=$.data,Me=[],He=this.stride;for(let ze=0;ze<ge.length;ze+=He){if(ge[ze+2]<=U)continue;ge[ze+2]=U;const yt=ge[ze],ye=ge[ze+1],Nt=$.within(ge[ze],ge[ze+1],xe),ei=ge[ze+5];let Tt=ei;for(const Zt of Nt){const Ei=Zt*He;ge[Ei+2]>U&&(Tt+=ge[Ei+5])}if(Tt>ei&&Tt>=fe){let Zt,Ei=yt*ei,lr=ye*ei,cr=-1;const Qi=(ze/He<<5)+(U+1)+this.points.length;for(const si of Nt){const ci=si*He;if(ge[ci+2]<=U)continue;ge[ci+2]=U;const rr=ge[ci+5];Ei+=ge[ci]*rr,lr+=ge[ci+1]*rr,ge[ci+4]=Qi,ce&&(Zt||(Zt=this._map(ge,ze,!0),cr=this.clusterProps.length,this.clusterProps.push(Zt)),ce(Zt,this._map(ge,ci)))}ge[ze+4]=Qi,Me.push(Ei/Tt,lr/Tt,1/0,Qi,-1,Tt),ce&&Me.push(cr)}else{for(let Zt=0;Zt<He;Zt++)Me.push(ge[ze+Zt]);if(Tt>1)for(const Zt of Nt){const Ei=Zt*He;if(!(ge[Ei+2]<=U)){ge[Ei+2]=U;for(let lr=0;lr<He;lr++)Me.push(ge[Ei+lr])}}}}return Me}_getOriginId($){return $-this.points.length>>5}_getOriginZoom($){return($-this.points.length)%32}_map($,U,q){if($[U+5]>1){const fe=this.clusterProps[$[U+6]];return q?Object.assign({},fe):fe}const se=this.points[$[U+3]].properties,ce=this.options.map(se);return q&&ce===se?Object.assign({},ce):ce}}function di(de,$,U){return{type:"Feature",id:de[$+3],properties:yi(de,$,U),geometry:{type:"Point",coordinates:[(q=de[$],360*(q-.5)),ni(de[$+1])]}};var q}function yi(de,$,U){const q=de[$+5],se=q>=1e4?`${Math.round(q/1e3)}k`:q>=1e3?Math.round(q/100)/10+"k":q,ce=de[$+6],fe=ce===-1?{}:Object.assign({},U[ce]);return Object.assign(fe,{cluster:!0,cluster_id:de[$+3],point_count:q,point_count_abbreviated:se})}function qt(de){return de/360+.5}function It(de){const $=Math.sin(de*Math.PI/180),U=.5-.25*Math.log((1+$)/(1-$))/Math.PI;return U<0?0:U>1?1:U}function ni(de){const $=(180-360*de)*Math.PI/180;return 360*Math.atan(Math.exp($))/Math.PI-90}function Ft(de,$,U,q){let se=q;const ce=$+(U-$>>1);let fe,xe=U-$;const ge=de[$],Me=de[$+1],He=de[U],ze=de[U+1];for(let yt=$+3;yt<U;yt+=3){const ye=ir(de[yt],de[yt+1],ge,Me,He,ze);if(ye>se)fe=yt,se=ye;else if(ye===se){const Nt=Math.abs(yt-ce);Nt<xe&&(fe=yt,xe=Nt)}}se>q&&(fe-$>3&&Ft(de,$,fe,q),de[fe+2]=se,U-fe>3&&Ft(de,fe,U,q))}function ir(de,$,U,q,se,ce){let fe=se-U,xe=ce-q;if(fe!==0||xe!==0){const ge=((de-U)*fe+($-q)*xe)/(fe*fe+xe*xe);ge>1?(U=se,q=ce):ge>0&&(U+=fe*ge,q+=xe*ge)}return fe=de-U,xe=$-q,fe*fe+xe*xe}function bi(de,$,U,q){const se={id:de??null,type:$,geometry:U,tags:q,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if($==="Point"||$==="MultiPoint"||$==="LineString")Bi(se,U);else if($==="Polygon")Bi(se,U[0]);else if($==="MultiLineString")for(const ce of U)Bi(se,ce);else if($==="MultiPolygon")for(const ce of U)Bi(se,ce[0]);return se}function Bi(de,$){for(let U=0;U<$.length;U+=3)de.minX=Math.min(de.minX,$[U]),de.minY=Math.min(de.minY,$[U+1]),de.maxX=Math.max(de.maxX,$[U]),de.maxY=Math.max(de.maxY,$[U+1])}function Ye(de,$,U,q){if(!$.geometry)return;const se=$.geometry.coordinates;if(se&&se.length===0)return;const ce=$.geometry.type,fe=Math.pow(U.tolerance/((1<<U.maxZoom)*U.extent),2);let xe=[],ge=$.id;if(U.promoteId?ge=$.properties[U.promoteId]:U.generateId&&(ge=q||0),ce==="Point")gt(se,xe);else if(ce==="MultiPoint")for(const Me of se)gt(Me,xe);else if(ce==="LineString")ct(se,xe,fe,!1);else if(ce==="MultiLineString"){if(U.lineMetrics){for(const Me of se)xe=[],ct(Me,xe,fe,!1),de.push(bi(ge,"LineString",xe,$.properties));return}At(se,xe,fe,!1)}else if(ce==="Polygon")At(se,xe,fe,!0);else{if(ce!=="MultiPolygon"){if(ce==="GeometryCollection"){for(const Me of $.geometry.geometries)Ye(de,{id:ge,geometry:Me,properties:$.properties},U,q);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Me of se){const He=[];At(Me,He,fe,!0),xe.push(He)}}de.push(bi(ge,ce,xe,$.properties))}function gt(de,$){$.push(De(de[0]),ut(de[1]),0)}function ct(de,$,U,q){let se,ce,fe=0;for(let ge=0;ge<de.length;ge++){const Me=De(de[ge][0]),He=ut(de[ge][1]);$.push(Me,He,0),ge>0&&(fe+=q?(se*He-Me*ce)/2:Math.sqrt(Math.pow(Me-se,2)+Math.pow(He-ce,2))),se=Me,ce=He}const xe=$.length-3;$[2]=1,Ft($,0,xe,U),$[xe+2]=1,$.size=Math.abs(fe),$.start=0,$.end=$.size}function At(de,$,U,q){for(let se=0;se<de.length;se++){const ce=[];ct(de[se],ce,U,q),$.push(ce)}}function De(de){return de/360+.5}function ut(de){const $=Math.sin(de*Math.PI/180),U=.5-.25*Math.log((1+$)/(1-$))/Math.PI;return U<0?0:U>1?1:U}function st(de,$,U,q,se,ce,fe,xe){if(q/=$,ce>=(U/=$)&&fe<q)return de;if(fe<U||ce>=q)return null;const ge=[];for(const Me of de){const He=Me.geometry;let ze=Me.type;const yt=se===0?Me.minX:Me.minY,ye=se===0?Me.maxX:Me.maxY;if(yt>=U&&ye<q){ge.push(Me);continue}if(ye<U||yt>=q)continue;let Nt=[];if(ze==="Point"||ze==="MultiPoint")vt(He,Nt,U,q,se);else if(ze==="LineString")Ht(He,Nt,U,q,se,!1,xe.lineMetrics);else if(ze==="MultiLineString")ae(He,Nt,U,q,se,!1);else if(ze==="Polygon")ae(He,Nt,U,q,se,!0);else if(ze==="MultiPolygon")for(const ei of He){const Tt=[];ae(ei,Tt,U,q,se,!0),Tt.length&&Nt.push(Tt)}if(Nt.length){if(xe.lineMetrics&&ze==="LineString"){for(const ei of Nt)ge.push(bi(Me.id,ze,ei,Me.tags));continue}ze!=="LineString"&&ze!=="MultiLineString"||(Nt.length===1?(ze="LineString",Nt=Nt[0]):ze="MultiLineString"),ze!=="Point"&&ze!=="MultiPoint"||(ze=Nt.length===3?"Point":"MultiPoint"),ge.push(bi(Me.id,ze,Nt,Me.tags))}}return ge.length?ge:null}function vt(de,$,U,q,se){for(let ce=0;ce<de.length;ce+=3){const fe=de[ce+se];fe>=U&&fe<=q&&be($,de[ce],de[ce+1],de[ce+2])}}function Ht(de,$,U,q,se,ce,fe){let xe=re(de);const ge=se===0?Fe:Ue;let Me,He,ze=de.start;for(let Tt=0;Tt<de.length-3;Tt+=3){const Zt=de[Tt],Ei=de[Tt+1],lr=de[Tt+2],cr=de[Tt+3],Qi=de[Tt+4],si=se===0?Zt:Ei,ci=se===0?cr:Qi;let rr=!1;fe&&(Me=Math.sqrt(Math.pow(Zt-cr,2)+Math.pow(Ei-Qi,2))),si<U?ci>U&&(He=ge(xe,Zt,Ei,cr,Qi,U),fe&&(xe.start=ze+Me*He)):si>q?ci<q&&(He=ge(xe,Zt,Ei,cr,Qi,q),fe&&(xe.start=ze+Me*He)):be(xe,Zt,Ei,lr),ci<U&&si>=U&&(He=ge(xe,Zt,Ei,cr,Qi,U),rr=!0),ci>q&&si<=q&&(He=ge(xe,Zt,Ei,cr,Qi,q),rr=!0),!ce&&rr&&(fe&&(xe.end=ze+Me*He),$.push(xe),xe=re(de)),fe&&(ze+=Me)}let yt=de.length-3;const ye=de[yt],Nt=de[yt+1],ei=se===0?ye:Nt;ei>=U&&ei<=q&&be(xe,ye,Nt,de[yt+2]),yt=xe.length-3,ce&&yt>=3&&(xe[yt]!==xe[0]||xe[yt+1]!==xe[1])&&be(xe,xe[0],xe[1],xe[2]),xe.length&&$.push(xe)}function re(de){const $=[];return $.size=de.size,$.start=de.start,$.end=de.end,$}function ae(de,$,U,q,se,ce){for(const fe of de)Ht(fe,$,U,q,se,ce,!1)}function be(de,$,U,q){de.push($,U,q)}function Fe(de,$,U,q,se,ce){const fe=(ce-$)/(q-$);return be(de,ce,U+(se-U)*fe,1),fe}function Ue(de,$,U,q,se,ce){const fe=(ce-U)/(se-U);return be(de,$+(q-$)*fe,ce,1),fe}function Ne(de,$){const U=[];for(let q=0;q<de.length;q++){const se=de[q],ce=se.type;let fe;if(ce==="Point"||ce==="MultiPoint"||ce==="LineString")fe=ht(se.geometry,$);else if(ce==="MultiLineString"||ce==="Polygon"){fe=[];for(const xe of se.geometry)fe.push(ht(xe,$))}else if(ce==="MultiPolygon"){fe=[];for(const xe of se.geometry){const ge=[];for(const Me of xe)ge.push(ht(Me,$));fe.push(ge)}}U.push(bi(se.id,ce,fe,se.tags))}return U}function ht(de,$){const U=[];U.size=de.size,de.start!==void 0&&(U.start=de.start,U.end=de.end);for(let q=0;q<de.length;q+=3)U.push(de[q]+$,de[q+1],de[q+2]);return U}function ot(de,$){if(de.transformed)return de;const U=1<<de.z,q=de.x,se=de.y;for(const ce of de.features){const fe=ce.geometry,xe=ce.type;if(ce.geometry=[],xe===1)for(let ge=0;ge<fe.length;ge+=2)ce.geometry.push(at(fe[ge],fe[ge+1],$,U,q,se));else for(let ge=0;ge<fe.length;ge++){const Me=[];for(let He=0;He<fe[ge].length;He+=2)Me.push(at(fe[ge][He],fe[ge][He+1],$,U,q,se));ce.geometry.push(Me)}}return de.transformed=!0,de}function at(de,$,U,q,se,ce){return[Math.round(U*(de*q-se)),Math.round(U*($*q-ce))]}function qe(de,$,U,q,se){const ce=$===se.maxZoom?0:se.tolerance/((1<<$)*se.extent),fe={features:[],numPoints:0,numSimplified:0,numFeatures:de.length,source:null,x:U,y:q,z:$,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const xe of de)Ct(fe,xe,ce,se);return fe}function Ct(de,$,U,q){const se=$.geometry,ce=$.type,fe=[];if(de.minX=Math.min(de.minX,$.minX),de.minY=Math.min(de.minY,$.minY),de.maxX=Math.max(de.maxX,$.maxX),de.maxY=Math.max(de.maxY,$.maxY),ce==="Point"||ce==="MultiPoint")for(let xe=0;xe<se.length;xe+=3)fe.push(se[xe],se[xe+1]),de.numPoints++,de.numSimplified++;else if(ce==="LineString")mt(fe,se,de,U,!1,!1);else if(ce==="MultiLineString"||ce==="Polygon")for(let xe=0;xe<se.length;xe++)mt(fe,se[xe],de,U,ce==="Polygon",xe===0);else if(ce==="MultiPolygon")for(let xe=0;xe<se.length;xe++){const ge=se[xe];for(let Me=0;Me<ge.length;Me++)mt(fe,ge[Me],de,U,!0,Me===0)}if(fe.length){let xe=$.tags||null;if(ce==="LineString"&&q.lineMetrics){xe={};for(const Me in $.tags)xe[Me]=$.tags[Me];xe.mapbox_clip_start=se.start/se.size,xe.mapbox_clip_end=se.end/se.size}const ge={geometry:fe,type:ce==="Polygon"||ce==="MultiPolygon"?3:ce==="LineString"||ce==="MultiLineString"?2:1,tags:xe};$.id!==null&&(ge.id=$.id),de.features.push(ge)}}function mt(de,$,U,q,se,ce){const fe=q*q;if(q>0&&$.size<(se?fe:q))return void(U.numPoints+=$.length/3);const xe=[];for(let ge=0;ge<$.length;ge+=3)(q===0||$[ge+2]>fe)&&(U.numSimplified++,xe.push($[ge],$[ge+1])),U.numPoints++;se&&(function(ge,Me){let He=0;for(let ze=0,yt=ge.length,ye=yt-2;ze<yt;ye=ze,ze+=2)He+=(ge[ze]-ge[ye])*(ge[ze+1]+ge[ye+1]);if(He>0===Me)for(let ze=0,yt=ge.length;ze<yt/2;ze+=2){const ye=ge[ze],Nt=ge[ze+1];ge[ze]=ge[yt-2-ze],ge[ze+1]=ge[yt-1-ze],ge[yt-2-ze]=ye,ge[yt-1-ze]=Nt}})(xe,ce),de.push(xe)}const Ot={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Dt{constructor($,U){const q=(U=this.options=(function(ce,fe){for(const xe in fe)ce[xe]=fe[xe];return ce})(Object.create(Ot),U)).debug;if(q&&console.time("preprocess data"),U.maxZoom<0||U.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(U.promoteId&&U.generateId)throw new Error("promoteId and generateId cannot be used together.");let se=(function(ce,fe){const xe=[];if(ce.type==="FeatureCollection")for(let ge=0;ge<ce.features.length;ge++)Ye(xe,ce.features[ge],fe,ge);else Ye(xe,ce.type==="Feature"?ce:{geometry:ce},fe);return xe})($,U);this.tiles={},this.tileCoords=[],q&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",U.indexMaxZoom,U.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),se=(function(ce,fe){const xe=fe.buffer/fe.extent;let ge=ce;const Me=st(ce,1,-1-xe,xe,0,-1,2,fe),He=st(ce,1,1-xe,2+xe,0,-1,2,fe);return(Me||He)&&(ge=st(ce,1,-xe,1+xe,0,-1,2,fe)||[],Me&&(ge=Ne(Me,1).concat(ge)),He&&(ge=ge.concat(Ne(He,-1)))),ge})(se,U),se.length&&this.splitTile(se,0,0,0),q&&(se.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile($,U,q,se,ce,fe,xe){const ge=[$,U,q,se],Me=this.options,He=Me.debug;for(;ge.length;){se=ge.pop(),q=ge.pop(),U=ge.pop(),$=ge.pop();const ze=1<<U,yt=Yt(U,q,se);let ye=this.tiles[yt];if(!ye&&(He>1&&console.time("creation"),ye=this.tiles[yt]=qe($,U,q,se,Me),this.tileCoords.push({z:U,x:q,y:se}),He)){He>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",U,q,se,ye.numFeatures,ye.numPoints,ye.numSimplified),console.timeEnd("creation"));const rr=`z${U}`;this.stats[rr]=(this.stats[rr]||0)+1,this.total++}if(ye.source=$,ce==null){if(U===Me.indexMaxZoom||ye.numPoints<=Me.indexMaxPoints)continue}else{if(U===Me.maxZoom||U===ce)continue;if(ce!=null){const rr=ce-U;if(q!==fe>>rr||se!==xe>>rr)continue}}if(ye.source=null,$.length===0)continue;He>1&&console.time("clipping");const Nt=.5*Me.buffer/Me.extent,ei=.5-Nt,Tt=.5+Nt,Zt=1+Nt;let Ei=null,lr=null,cr=null,Qi=null,si=st($,ze,q-Nt,q+Tt,0,ye.minX,ye.maxX,Me),ci=st($,ze,q+ei,q+Zt,0,ye.minX,ye.maxX,Me);$=null,si&&(Ei=st(si,ze,se-Nt,se+Tt,1,ye.minY,ye.maxY,Me),lr=st(si,ze,se+ei,se+Zt,1,ye.minY,ye.maxY,Me),si=null),ci&&(cr=st(ci,ze,se-Nt,se+Tt,1,ye.minY,ye.maxY,Me),Qi=st(ci,ze,se+ei,se+Zt,1,ye.minY,ye.maxY,Me),ci=null),He>1&&console.timeEnd("clipping"),ge.push(Ei||[],U+1,2*q,2*se),ge.push(lr||[],U+1,2*q,2*se+1),ge.push(cr||[],U+1,2*q+1,2*se),ge.push(Qi||[],U+1,2*q+1,2*se+1)}}getTile($,U,q){$=+$,U=+U,q=+q;const se=this.options,{extent:ce,debug:fe}=se;if($<0||$>24)return null;const xe=1<<$,ge=Yt($,U=U+xe&xe-1,q);if(this.tiles[ge])return ot(this.tiles[ge],ce);fe>1&&console.log("drilling down to z%d-%d-%d",$,U,q);let Me,He=$,ze=U,yt=q;for(;!Me&&He>0;)He--,ze>>=1,yt>>=1,Me=this.tiles[Yt(He,ze,yt)];return Me&&Me.source?(fe>1&&(console.log("found parent tile z%d-%d-%d",He,ze,yt),console.time("drilling down")),this.splitTile(Me.source,He,ze,yt,$,U,q),fe>1&&console.timeEnd("drilling down"),this.tiles[ge]?ot(this.tiles[ge],ce):null):null}}function Yt(de,$,U){return 32*((1<<de)*U+$)+de}class pi extends H{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile($,U){return v._(this,void 0,void 0,(function*(){const q=$.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const se=this._geoJSONIndex.getTile(q.z,q.x,q.y);if(!se)return null;const ce=new Ae(se.features,{version:2,extent:v.$});let fe=(function(xe){const ge=new v.cM;return(function(Me,He){for(const ze in Me.layers)He.writeMessage(3,ke,Me.layers[ze])})(xe,ge),ge.finish()})(ce);return fe.byteOffset===0&&fe.byteLength===fe.buffer.byteLength||(fe=new Uint8Array(fe)),{vectorTile:ce,rawData:fe.buffer}}))}loadData($){return v._(this,void 0,void 0,(function*(){var U;(U=this._pendingRequest)===null||U===void 0||U.abort();const q=!!($&&$.request&&$.request.collectResourceTiming)&&new v.cN($.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON($,this._pendingRequest);const se=yield this._pendingData;this._geoJSONIndex=$.cluster?new Et((function({superclusterOptions:fe,clusterProperties:xe}){if(!xe||!fe)return fe;const ge={},Me={},He={accumulated:null,zoom:0},ze={properties:null},yt=Object.keys(xe);for(const ye of yt){const[Nt,ei]=xe[ye],Tt=v.cT(ei),Zt=v.cT(typeof Nt=="string"?[Nt,["accumulated"],["get",ye]]:Nt);ge[ye]=Tt.value,Me[ye]=Zt.value}return fe.map=ye=>{ze.properties=ye;const Nt={};for(const ei of yt)Nt[ei]=ge[ei].evaluate(He,ze);return Nt},fe.reduce=(ye,Nt)=>{ze.properties=Nt;for(const ei of yt)He.accumulated=ye[ei],ye[ei]=Me[ei].evaluate(He,ze)},fe})($)).load(se.features):(function(fe,xe){return new Dt(fe,xe)})(se,$.geojsonVtOptions),this.loaded={};const ce={data:se};if(q){const fe=q.finish();fe&&(ce.resourceTiming={},ce.resourceTiming[$.source]=JSON.parse(JSON.stringify(fe)))}return ce}catch(se){if(delete this._pendingRequest,v.cy(se))return{abandoned:!0};throw se}}))}getData(){return v._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile($){const U=this.loaded;return U&&U[$.uid]?super.reloadTile($):this.loadTile($)}loadAndProcessGeoJSON($,U){return v._(this,void 0,void 0,(function*(){let q=yield this.loadGeoJSON($,U);if(delete this._pendingRequest,typeof q!="object")throw new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`);if(rt(q,!0),$.filter){const se=v.cT($.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(se.result==="error")throw new Error(se.value.map((fe=>`${fe.key}: ${fe.message}`)).join(", "));q={type:"FeatureCollection",features:q.features.filter((fe=>se.value.evaluate({zoom:0},fe)))}}return q}))}loadGeoJSON($,U){return v._(this,void 0,void 0,(function*(){const{promoteId:q}=$;if($.request){const se=yield v.j($.request,U);return this._dataUpdateable=v.cV(se.data,q)?v.cU(se.data,q):void 0,se.data}if(typeof $.data=="string")try{const se=JSON.parse($.data);return this._dataUpdateable=v.cV(se,q)?v.cU(se,q):void 0,se}catch{throw new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`)}if(!$.dataDiff)throw new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${$.source}`);return v.cW(this._dataUpdateable,$.dataDiff,q),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource($){return v._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom($){return this._geoJSONIndex.getClusterExpansionZoom($.clusterId)}getClusterChildren($){return this._geoJSONIndex.getChildren($.clusterId)}getClusterLeaves($){return this._geoJSONIndex.getLeaves($.clusterId,$.limit,$.offset)}}class hi{constructor($){this.self=$,this.actor=new v.J($),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(U,q)=>{if(this.externalWorkerSourceTypes[U])throw new Error(`Worker source with name "${U}" already registered.`);this.externalWorkerSourceTypes[U]=q},this.self.addProtocol=v.cA,this.self.removeProtocol=v.cB,this.self.registerRTLTextPlugin=U=>{v.cX.setMethods(U)},this.actor.registerMessageHandler("LDT",((U,q)=>this._getDEMWorkerSource(U,q.source).loadTile(q))),this.actor.registerMessageHandler("RDT",((U,q)=>v._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(U,q.source).removeTile(q)})))),this.actor.registerMessageHandler("GCEZ",((U,q)=>v._(this,void 0,void 0,(function*(){return this._getWorkerSource(U,q.type,q.source).getClusterExpansionZoom(q)})))),this.actor.registerMessageHandler("GCC",((U,q)=>v._(this,void 0,void 0,(function*(){return this._getWorkerSource(U,q.type,q.source).getClusterChildren(q)})))),this.actor.registerMessageHandler("GCL",((U,q)=>v._(this,void 0,void 0,(function*(){return this._getWorkerSource(U,q.type,q.source).getClusterLeaves(q)})))),this.actor.registerMessageHandler("LD",((U,q)=>this._getWorkerSource(U,q.type,q.source).loadData(q))),this.actor.registerMessageHandler("GD",((U,q)=>this._getWorkerSource(U,q.type,q.source).getData())),this.actor.registerMessageHandler("LT",((U,q)=>this._getWorkerSource(U,q.type,q.source).loadTile(q))),this.actor.registerMessageHandler("RT",((U,q)=>this._getWorkerSource(U,q.type,q.source).reloadTile(q))),this.actor.registerMessageHandler("AT",((U,q)=>this._getWorkerSource(U,q.type,q.source).abortTile(q))),this.actor.registerMessageHandler("RMT",((U,q)=>this._getWorkerSource(U,q.type,q.source).removeTile(q))),this.actor.registerMessageHandler("RS",((U,q)=>v._(this,void 0,void 0,(function*(){if(!this.workerSources[U]||!this.workerSources[U][q.type]||!this.workerSources[U][q.type][q.source])return;const se=this.workerSources[U][q.type][q.source];delete this.workerSources[U][q.type][q.source],se.removeSource!==void 0&&se.removeSource(q)})))),this.actor.registerMessageHandler("RM",(U=>v._(this,void 0,void 0,(function*(){delete this.layerIndexes[U],delete this.availableImages[U],delete this.workerSources[U],delete this.demWorkerSources[U],this.globalStates.delete(U)})))),this.actor.registerMessageHandler("SR",((U,q)=>v._(this,void 0,void 0,(function*(){this.referrer=q})))),this.actor.registerMessageHandler("SRPS",((U,q)=>this._syncRTLPluginState(U,q))),this.actor.registerMessageHandler("IS",((U,q)=>v._(this,void 0,void 0,(function*(){this.self.importScripts(q)})))),this.actor.registerMessageHandler("SI",((U,q)=>this._setImages(U,q))),this.actor.registerMessageHandler("UL",((U,q)=>v._(this,void 0,void 0,(function*(){this._getLayerIndex(U).update(q.layers,q.removedIds,this._getGlobalState(U))})))),this.actor.registerMessageHandler("UGS",((U,q)=>v._(this,void 0,void 0,(function*(){const se=this._getGlobalState(U);for(const ce in q)se[ce]=q[ce]})))),this.actor.registerMessageHandler("SL",((U,q)=>v._(this,void 0,void 0,(function*(){this._getLayerIndex(U).replace(q,this._getGlobalState(U))}))))}_getGlobalState($){let U=this.globalStates.get($);return U||(U={},this.globalStates.set($,U)),U}_setImages($,U){return v._(this,void 0,void 0,(function*(){this.availableImages[$]=U;for(const q in this.workerSources[$]){const se=this.workerSources[$][q];for(const ce in se)se[ce].availableImages=U}}))}_syncRTLPluginState($,U){return v._(this,void 0,void 0,(function*(){return yield v.cX.syncState(U,this.self.importScripts)}))}_getAvailableImages($){let U=this.availableImages[$];return U||(U=[]),U}_getLayerIndex($){let U=this.layerIndexes[$];return U||(U=this.layerIndexes[$]=new a),U}_getWorkerSource($,U,q){if(this.workerSources[$]||(this.workerSources[$]={}),this.workerSources[$][U]||(this.workerSources[$][U]={}),!this.workerSources[$][U][q]){const se={sendAsync:(ce,fe)=>(ce.targetMapId=$,this.actor.sendAsync(ce,fe))};switch(U){case"vector":this.workerSources[$][U][q]=new H(se,this._getLayerIndex($),this._getAvailableImages($));break;case"geojson":this.workerSources[$][U][q]=new pi(se,this._getLayerIndex($),this._getAvailableImages($));break;default:this.workerSources[$][U][q]=new this.externalWorkerSourceTypes[U](se,this._getLayerIndex($),this._getAvailableImages($))}}return this.workerSources[$][U][q]}_getDEMWorkerSource($,U){return this.demWorkerSources[$]||(this.demWorkerSources[$]={}),this.demWorkerSources[$][U]||(this.demWorkerSources[$][U]=new W),this.demWorkerSources[$][U]}}return v.i(self)&&(self.worker=new hi(self)),hi})),y("index",["exports","./shared"],(function(v,a){var M="5.7.2";function D(){var f=new a.A(4);return a.A!=Float32Array&&(f[1]=0,f[2]=0),f[0]=1,f[3]=1,f}let F,H;const W={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(f,e,s){const c=requestAnimationFrame((g=>{p(),e(g)})),{unsubscribe:p}=a.s(f.signal,"abort",(()=>{p(),cancelAnimationFrame(c),s(a.c())}),!1)},frameAsync(f){return new Promise(((e,s)=>{this.frame(f,e,s)}))},getImageData(f,e=0){return this.getImageCanvasContext(f).getImageData(-e,-e,f.width+2*e,f.height+2*e)},getImageCanvasContext(f){const e=window.document.createElement("canvas"),s=e.getContext("2d",{willReadFrequently:!0});if(!s)throw new Error("failed to create canvas 2d context");return e.width=f.width,e.height=f.height,s.drawImage(f,0,0,f.width,f.height),s},resolveURL:f=>(F||(F=document.createElement("a")),F.href=f,F.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(H==null&&(H=matchMedia("(prefers-reduced-motion: reduce)")),H.matches)}};class G{static testProp(e){if(!G.docStyle)return e[0];for(let s=0;s<e.length;s++)if(e[s]in G.docStyle)return e[s];return e[0]}static create(e,s,c){const p=window.document.createElement(e);return s!==void 0&&(p.className=s),c&&c.appendChild(p),p}static createNS(e,s){return window.document.createElementNS(e,s)}static disableDrag(){G.docStyle&&G.selectProp&&(G.userSelect=G.docStyle[G.selectProp],G.docStyle[G.selectProp]="none")}static enableDrag(){G.docStyle&&G.selectProp&&(G.docStyle[G.selectProp]=G.userSelect)}static setTransform(e,s){e.style[G.transformProp]=s}static addEventListener(e,s,c,p={}){e.addEventListener(s,c,"passive"in p?p:p.capture)}static removeEventListener(e,s,c,p={}){e.removeEventListener(s,c,"passive"in p?p:p.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",G.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",G.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",G.suppressClickInternal,!0)}),0)}static getScale(e){const s=e.getBoundingClientRect();return{x:s.width/e.offsetWidth||1,y:s.height/e.offsetHeight||1,boundingClientRect:s}}static getPoint(e,s,c){const p=s.boundingClientRect;return new a.P((c.clientX-p.left)/s.x-e.clientLeft,(c.clientY-p.top)/s.y-e.clientTop)}static mousePos(e,s){const c=G.getScale(e);return G.getPoint(e,c,s)}static touchPos(e,s){const c=[],p=G.getScale(e);for(let g=0;g<s.length;g++)c.push(G.getPoint(e,p,s[g]));return c}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}static sanitize(e){const s=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),c=s.querySelectorAll("script");for(const p of c)p.remove();return G.clean(s),s.innerHTML}static isPossiblyDangerous(e,s){const c=s.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!c.includes("javascript:")&&!c.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){const s=e.children;for(const c of s)G.removeAttributes(c),G.clean(c)}static removeAttributes(e){for(const{name:s,value:c}of e.attributes)G.isPossiblyDangerous(s,c)&&e.removeAttribute(s)}}G.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,G.selectProp=G.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),G.transformProp=G.testProp(["transform","WebkitTransform"]);const Pe={supported:!1,testSupport:function(f){!nt&&rt&&(Ae?ke(f):Ie=f)}};let Ie,rt,nt=!1,Ae=!1;function ke(f){const e=f.createTexture();f.bindTexture(f.TEXTURE_2D,e);try{if(f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,rt),f.isContextLost())return;Pe.supported=!0}catch{}f.deleteTexture(e),nt=!0}var Te;typeof document<"u"&&(rt=document.createElement("img"),rt.onload=()=>{Ie&&ke(Ie),Ie=null,Ae=!0},rt.onerror=()=>{nt=!0,Ie=null},rt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(f){let e,s,c,p;f.resetRequestQueue=()=>{e=[],s=0,c=0,p={}},f.addThrottleControl=S=>{const C=c++;return p[C]=S,C},f.removeThrottleControl=S=>{delete p[S],b()},f.getImage=(S,C,E=!0)=>new Promise(((j,A)=>{Pe.supported&&(S.headers||(S.headers={}),S.headers.accept="image/webp,*/*"),a.e(S,{type:"image"}),e.push({abortController:C,requestParameters:S,supportImageRefresh:E,state:"queued",onError:R=>{A(R)},onSuccess:R=>{j(R)}}),b()}));const g=S=>a._(this,void 0,void 0,(function*(){S.state="running";const{requestParameters:C,supportImageRefresh:E,onError:j,onSuccess:A,abortController:R}=S,V=E===!1&&!a.i(self)&&!a.g(C.url)&&(!C.headers||Object.keys(C.headers).reduce(((J,Q)=>J&&Q==="accept"),!0));s++;const Y=V?T(C,R):a.m(C,R);try{const J=yield Y;delete S.abortController,S.state="completed",J.data instanceof HTMLImageElement||a.b(J.data)?A(J):J.data&&A({data:yield(X=J.data,typeof createImageBitmap=="function"?a.f(X):a.h(X)),cacheControl:J.cacheControl,expires:J.expires})}catch(J){delete S.abortController,j(J)}finally{s--,b()}var X})),b=()=>{const S=(()=>{for(const C of Object.keys(p))if(p[C]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let C=s;C<S&&e.length>0;C++){const E=e.shift();E.abortController.signal.aborted?C--:g(E)}},T=(S,C)=>new Promise(((E,j)=>{const A=new Image,R=S.url,V=S.credentials;V&&V==="include"?A.crossOrigin="use-credentials":(V&&V==="same-origin"||!a.d(R))&&(A.crossOrigin="anonymous"),C.signal.addEventListener("abort",(()=>{A.src="",j(a.c())})),A.fetchPriority="high",A.onload=()=>{A.onerror=A.onload=null,E({data:A})},A.onerror=()=>{A.onerror=A.onload=null,C.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."))},A.src=R}))})(Te||(Te={})),Te.resetRequestQueue();class je{constructor(e){this._transformRequestFn=e??null}transformRequest(e,s){return this._transformRequestFn&&this._transformRequestFn(e,s)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function Ce(f){const e=[];if(typeof f=="string")e.push({id:"default",url:f});else if(f&&f.length>0){const s=[];for(const{id:c,url:p}of f){const g=`${c}${p}`;s.indexOf(g)===-1&&(s.push(g),e.push({id:c,url:p}))}}return e}function Re(f,e,s){try{const c=new URL(f);return c.pathname+=`${e}${s}`,c.toString()}catch{throw new Error(`Invalid sprite URL "${f}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function pt(f){const{userImage:e}=f;return!!(e&&e.render&&e.render())&&(f.data.replace(new Uint8Array(e.data.buffer)),!0)}class Ge extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:s,promiseResolve:c}of this.requestors)c(this._getImagesForIds(s));this.requestors=[]}}getImage(e){const s=this.images[e];if(s&&!s.data&&s.spriteData){const c=s.spriteData;s.data=new a.R({width:c.width,height:c.height},c.context.getImageData(c.x,c.y,c.width,c.height).data),s.spriteData=null}return s}addImage(e,s){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,s)&&(this.images[e]=s)}_validate(e,s){let c=!0;const p=s.data||s.spriteData;return this._validateStretch(s.stretchX,p&&p.width)||(this.fire(new a.k(new Error(`Image "${e}" has invalid "stretchX" value`))),c=!1),this._validateStretch(s.stretchY,p&&p.height)||(this.fire(new a.k(new Error(`Image "${e}" has invalid "stretchY" value`))),c=!1),this._validateContent(s.content,s)||(this.fire(new a.k(new Error(`Image "${e}" has invalid "content" value`))),c=!1),c}_validateStretch(e,s){if(!e)return!0;let c=0;for(const p of e){if(p[0]<c||p[1]<p[0]||s<p[1])return!1;c=p[1]}return!0}_validateContent(e,s){if(!e)return!0;if(e.length!==4)return!1;const c=s.spriteData,p=c&&c.width||s.data.width,g=c&&c.height||s.data.height;return!(e[0]<0||p<e[0]||e[1]<0||g<e[1]||e[2]<0||p<e[2]||e[3]<0||g<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,s,c=!0){const p=this.getImage(e);if(c&&(p.data.width!==s.data.width||p.data.height!==s.data.height))throw new Error(`size mismatch between old image (${p.data.width}x${p.data.height}) and new image (${s.data.width}x${s.data.height}).`);s.version=p.version+1,this.images[e]=s,this.updatedImages[e]=!0}removeImage(e){const s=this.images[e];delete this.images[e],delete this.patterns[e],s.userImage&&s.userImage.onRemove&&s.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise(((s,c)=>{let p=!0;if(!this.isLoaded())for(const g of e)this.images[g]||(p=!1);this.isLoaded()||p?s(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:s})}))}_getImagesForIds(e){const s={};for(const c of e){let p=this.getImage(c);p||(this.fire(new a.l("styleimagemissing",{id:c})),p=this.getImage(c)),p?s[c]={data:p.data.clone(),pixelRatio:p.pixelRatio,sdf:p.sdf,version:p.version,stretchX:p.stretchX,stretchY:p.stretchY,content:p.content,textFitWidth:p.textFitWidth,textFitHeight:p.textFitHeight,hasRenderCallback:!!(p.userImage&&p.userImage.render)}:a.w(`Image "${c}" 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 s}getPixelSize(){const{width:e,height:s}=this.atlasImage;return{width:e,height:s}}getPattern(e){const s=this.patterns[e],c=this.getImage(e);if(!c)return null;if(s&&s.position.version===c.version)return s.position;if(s)s.position.version=c.version;else{const p={w:c.data.width+2,h:c.data.height+2,x:0,y:0},g=new a.I(p,c);this.patterns[e]={bin:p,position:g}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const s=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new a.T(e,this.atlasImage,s.RGBA),this.atlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const g in this.patterns)e.push(this.patterns[g].bin);const{w:s,h:c}=a.p(e),p=this.atlasImage;p.resize({width:s||1,height:c||1});for(const g in this.patterns){const{bin:b}=this.patterns[g],T=b.x+1,S=b.y+1,C=this.getImage(g).data,E=C.width,j=C.height;a.R.copy(C,p,{x:0,y:0},{x:T,y:S},{width:E,height:j}),a.R.copy(C,p,{x:0,y:j-1},{x:T,y:S-1},{width:E,height:1}),a.R.copy(C,p,{x:0,y:0},{x:T,y:S+j},{width:E,height:1}),a.R.copy(C,p,{x:E-1,y:0},{x:T-1,y:S},{width:1,height:j}),a.R.copy(C,p,{x:0,y:0},{x:T+E,y:S},{width:1,height:j})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}
vendor: 4,440 bytes, line 92
92dispatchRenderCallbacks(e){for(const s of e){if(this.callbackDispatchedThisFrame[s])continue;this.callbackDispatchedThisFrame[s]=!0;const c=this.getImage(s);c||a.w(`Image with ID: "${s}" was not found`),pt(c)&&this.updateImage(s,c)}}}const dt=1e20;function _t(f,e,s,c,p,g,b,T,S){for(let C=e;C<e+c;C++)Xe(f,s*g+C,g,p,b,T,S);for(let C=s;C<s+p;C++)Xe(f,C*g+e,1,c,b,T,S)}function Xe(f,e,s,c,p,g,b){g[0]=0,b[0]=-dt,b[1]=dt,p[0]=f[e];for(let T=1,S=0,C=0;T<c;T++){p[T]=f[e+T*s];const E=T*T;do{const j=g[S];C=(p[T]-p[j]+E-j*j)/(T-j)/2}while(C<=b[S]&&--S>-1);S++,g[S]=T,b[S]=C,b[S+1]=dt}for(let T=0,S=0;T<c;T++){for(;b[S+1]<T;)S++;const C=g[S],E=T-C;f[e+T*s]=p[C]+E*E}}class Et{constructor(e,s,c){this.requestManager=e,this.localIdeographFontFamily=s,this.entries={},this.lang=c}setURL(e){this.url=e}getGlyphs(e){return a._(this,void 0,void 0,(function*(){const s=[];for(const g in e)for(const b of e[g])s.push(this._getAndCacheGlyphsPromise(g,b));const c=yield Promise.all(s),p={};for(const{stack:g,id:b,glyph:T}of c)p[g]||(p[g]={}),p[g][b]=T&&{id:T.id,bitmap:T.bitmap.clone(),metrics:T.metrics};return p}))}_getAndCacheGlyphsPromise(e,s){return a._(this,void 0,void 0,(function*(){let c=this.entries[e];c||(c=this.entries[e]={glyphs:{},requests:{},ranges:{}});let p=c.glyphs[s];if(p!==void 0)return{stack:e,id:s,glyph:p};if(p=this._tinySDF(c,e,s),p)return c.glyphs[s]=p,{stack:e,id:s,glyph:p};const g=Math.floor(s/256);if(256*g>65535)throw new Error("glyphs > 65535 not supported");if(c.ranges[g])return{stack:e,id:s,glyph:p};if(!this.url)throw new Error("glyphsUrl is not set");if(!c.requests[g]){const T=Et.loadGlyphRange(e,g,this.url,this.requestManager);c.requests[g]=T}const b=yield c.requests[g];for(const T in b)this._doesCharSupportLocalGlyph(+T)||(c.glyphs[+T]=b[+T]);return c.ranges[g]=!0,{stack:e,id:s,glyph:b[s]||null}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))||a.u["CJK Unified Ideographs"](e)||a.u["Hangul Syllables"](e)||a.u.Hiragana(e)||a.u.Katakana(e)||a.u["CJK Symbols and Punctuation"](e)||a.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,s,c){const p=this.localIdeographFontFamily;if(!p||!this._doesCharSupportLocalGlyph(c))return;let g=e.tinySDF;if(!g){let T="400";/bold/i.test(s)?T="900":/medium/i.test(s)?T="500":/light/i.test(s)&&(T="200"),g=e.tinySDF=new Et.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,lang:this.lang,fontFamily:p,fontWeight:T})}const b=g.draw(String.fromCharCode(c));return{id:c,bitmap:new a.q({width:b.width||60,height:b.height||60},b.data),metrics:{width:b.glyphWidth/2||24,height:b.glyphHeight/2||24,left:b.glyphLeft/2+.5||0,top:b.glyphTop/2-27.5||-8,advance:b.glyphAdvance/2||24,isDoubleResolution:!0}}}}Et.loadGlyphRange=function(f,e,s,c){return a._(this,void 0,void 0,(function*(){const p=256*e,g=p+255,b=c.transformRequest(s.replace("{fontstack}",f).replace("{range}",`${p}-${g}`),"Glyphs"),T=yield a.n(b,new AbortController);if(!T||!T.data)throw new Error(`Could not load glyph range. range: ${e}, ${p}-${g}`);const S={};for(const C of a.o(T.data))S[C.id]=C;return S}))},Et.TinySDF=class{constructor({fontSize:f=24,buffer:e=3,radius:s=8,cutoff:c=.25,fontFamily:p="sans-serif",fontWeight:g="normal",fontStyle:b="normal",lang:T=null}={}){this.buffer=e,this.cutoff=c,this.radius=s,this.lang=T;const S=this.size=f+4*e,C=this._createCanvas(S),E=this.ctx=C.getContext("2d",{willReadFrequently:!0});E.font=`${b} ${g} ${f}px ${p}`,E.textBaseline="alphabetic",E.textAlign="left",E.fillStyle="black",this.gridOuter=new Float64Array(S*S),this.gridInner=new Float64Array(S*S),this.f=new Float64Array(S),this.z=new Float64Array(S+1),this.v=new Uint16Array(S)}_createCanvas(f){const e=document.createElement("canvas");return e.width=e.height=f,e}draw(f){const{width:e,actualBoundingBoxAscent:s,actualBoundingBoxDescent:c,actualBoundingBoxLeft:p,actualBoundingBoxRight:g}=this.ctx.measureText(f),b=Math.ceil(s),T=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(g-p))),S=Math.min(this.size-this.buffer,b+Math.ceil(c)),C=T+2*this.buffer,E=S+2*this.buffer,j=Math.max(C*E,0),A=new Uint8ClampedArray(j),R={data:A,width:C,height:E,glyphWidth:T,glyphHeight:S,glyphTop:b,glyphLeft:0,glyphAdvance:e};if(T===0||S===0)return R;const{ctx:V,buffer:Y,gridInner:X,gridOuter:J}=this;this.lang&&(V.lang=this.lang),V.clearRect(Y,Y,T,S),V.fillText(f,Y,Y+b);const Q=V.getImageData(Y,Y,T,S);
vendor: 19,750 bytes, line 92
92J.fill(dt,0,j),X.fill(0,0,j);for(let ne=0;ne<S;ne++)for(let te=0;te<T;te++){const le=Q.data[4*(ne*T+te)+3]/255;if(le===0)continue;const pe=(ne+Y)*C+te+Y;if(le===1)J[pe]=0,X[pe]=dt;else{const ie=.5-le;J[pe]=ie>0?ie*ie:0,X[pe]=ie<0?ie*ie:0}}_t(J,0,0,C,E,C,this.f,this.v,this.z),_t(X,Y,Y,T,S,C,this.f,this.v,this.z);for(let ne=0;ne<j;ne++){const te=Math.sqrt(J[ne])-Math.sqrt(X[ne]);A[ne]=Math.round(255-255*(te/this.radius+this.cutoff))}return R}};class di{constructor(){this.specification=a.v.light.position}possiblyEvaluate(e,s){return a.B(e.expression.evaluate(s))}interpolate(e,s,c){return{x:a.C.number(e.x,s.x,c),y:a.C.number(e.y,s.y,c),z:a.C.number(e.z,s.z,c)}}}let yi;class qt extends a.E{constructor(e){super(),yi=yi||new a.r({anchor:new a.D(a.v.light.anchor),position:new di,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.t(yi,void 0),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,s={}){if(!this._validate(a.x,e,s))for(const c in e){const p=e[c];c.endsWith("-transition")?this._transitionable.setTransition(c.slice(0,-11),p):this._transitionable.setValue(c,p)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,s,c){return(!c||c.validate!==!1)&&a.y(this,e.call(a.z,{value:s,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}const It=new a.r({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class ni extends a.E{constructor(e){super(),this._transitionable=new a.t(It,void 0),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.F(0))}setSky(e,s={}){if(!this._validate(a.G,e,s)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const c in e){const p=e[c];c.endsWith("-transition")?this._transitionable.setTransition(c.slice(0,-11),p):this._transitionable.setValue(c,p)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,s,c={}){return c?.validate!==!1&&a.y(this,e.call(a.z,a.e({value:s,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class Ft{constructor(e,s){this.width=e,this.height=s,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,s){const c=e.join(",")+String(s);return this.dashEntry[c]||(this.dashEntry[c]=this.addDash(e,s)),this.dashEntry[c]}getDashRanges(e,s,c){const p=[];let g=e.length%2==1?-e[e.length-1]*c:0,b=e[0]*c,T=!0;p.push({left:g,right:b,isDash:T,zeroLength:e[0]===0});let S=e[0];for(let C=1;C<e.length;C++){T=!T;const E=e[C];g=S*c,S+=E,b=S*c,p.push({left:g,right:b,isDash:T,zeroLength:E===0})}return p}addRoundDash(e,s,c){const p=s/2;for(let g=-c;g<=c;g++){const b=this.width*(this.nextRow+c+g);let T=0,S=e[T];for(let C=0;C<this.width;C++){C/S.right>1&&(S=e[++T]);const E=Math.abs(C-S.left),j=Math.abs(C-S.right),A=Math.min(E,j);let R;const V=g/c*(p+1);if(S.isDash){const Y=p-Math.abs(V);R=Math.sqrt(A*A+Y*Y)}else R=p-Math.sqrt(A*A+V*V);this.data[b+C]=Math.max(0,Math.min(255,R+128))}}}addRegularDash(e){for(let T=e.length-1;T>=0;--T){const S=e[T],C=e[T+1];S.zeroLength?e.splice(T,1):C&&C.isDash===S.isDash&&(C.left=S.left,e.splice(T,1))}const s=e[0],c=e[e.length-1];s.isDash===c.isDash&&(s.left=c.left-this.width,c.right=s.right+this.width);const p=this.width*this.nextRow;let g=0,b=e[g];for(let T=0;T<this.width;T++){T/b.right>1&&(b=e[++g]);const S=Math.abs(T-b.left),C=Math.abs(T-b.right),E=Math.min(S,C);this.data[p+T]=Math.max(0,Math.min(255,(b.isDash?E:-E)+128))}}addDash(e,s){const c=s?7:0,p=2*c+1;if(this.nextRow+p>this.height)return a.w("LineAtlas out of space"),null;let g=0;for(let T=0;T<e.length;T++)g+=e[T];if(g!==0){const T=this.width/g,S=this.getDashRanges(e,this.width,T);s?this.addRoundDash(S,T,c):this.addRegularDash(S)}const b={y:(this.nextRow+c+.5)/this.height,height:2*c/this.height,width:g};return this.nextRow+=p,this.dirty=!0,b}bind(e){const s=e.gl;this.texture?(s.bindTexture(s.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,s.texSubImage2D(s.TEXTURE_2D,0,0,0,this.width,this.height,s.ALPHA,s.UNSIGNED_BYTE,this.data))):(this.texture=s.createTexture(),s.bindTexture(s.TEXTURE_2D,this.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texImage2D(s.TEXTURE_2D,0,s.ALPHA,this.width,this.height,0,s.ALPHA,s.UNSIGNED_BYTE,this.data))}}const ir="maplibre_preloaded_worker_pool";class bi{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<bi.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],this.numActive()===0&&(this.workers.forEach((s=>{s.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[ir]}numActive(){return Object.keys(this.active).length}}const Bi=Math.floor(W.hardwareConcurrency/2);let Ye,gt;function ct(){return Ye||(Ye=new bi),Ye}bi.workerCount=a.H(globalThis)?Math.max(Math.min(Bi,3),1):1;class At{constructor(e,s){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=s;const c=this.workerPool.acquire(s);for(let p=0;p<c.length;p++){const g=new a.J(c[p],s);g.name=`Worker ${p}`,this.actors.push(g)}if(!this.actors.length)throw new Error("No actors found")}broadcast(e,s){const c=[];for(const p of this.actors)c.push(p.sendAsync({type:e,data:s}));return Promise.all(c)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach((s=>{s.remove()})),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,s){for(const c of this.actors)c.registerMessageHandler(e,s)}}function De(){return gt||(gt=new At(ct(),a.K),gt.registerMessageHandler("GR",((f,e,s)=>a.m(e,s)))),gt}function ut(f,e){const s=a.L();return a.M(s,s,[1,1,0]),a.N(s,s,[.5*f.width,.5*f.height,1]),f.calculatePosMatrix?a.O(s,s,f.calculatePosMatrix(e.toUnwrapped())):s}function st(f,e,s,c,p,g,b){var T;const S=(function(A,R,V){if(A)for(const Y of A){const X=R[Y];if(X&&X.source===V&&X.type==="fill-extrusion")return!0}else for(const Y in R){const X=R[Y];if(X.source===V&&X.type==="fill-extrusion")return!0}return!1})((T=p?.layers)!==null&&T!==void 0?T:null,e,f.id),C=g.maxPitchScaleFactor(),E=f.tilesIn(c,C,S);E.sort(vt);const j=[];for(const A of E)j.push({wrappedTileID:A.tileID.wrapped().key,queryResults:A.tile.queryRenderedFeatures(e,s,f._state,A.queryGeometry,A.cameraQueryGeometry,A.scale,p,g,C,ut(f.transform,A.tileID),b?(R,V)=>b(A.tileID,R,V):void 0)});return(function(A,R){for(const V in A)for(const Y of A[V])Ht(Y,R);return A})((function(A){const R={},V={};for(const Y of A){const X=Y.queryResults,J=Y.wrappedTileID,Q=V[J]=V[J]||{};for(const ne in X){const te=X[ne],le=Q[ne]=Q[ne]||{},pe=R[ne]=R[ne]||[];for(const ie of te)le[ie.featureIndex]||(le[ie.featureIndex]=!0,pe.push(ie))}}return R})(j),f)}function vt(f,e){const s=f.tileID,c=e.tileID;return s.overscaledZ-c.overscaledZ||s.canonical.y-c.canonical.y||s.wrap-c.wrap||s.canonical.x-c.canonical.x}function Ht(f,e){const s=f.feature,c=e.getFeatureState(s.layer["source-layer"],s.id);s.source=s.layer.source,s.layer["source-layer"]&&(s.sourceLayer=s.layer["source-layer"]),s.state=c}function re(f,e,s){return a._(this,void 0,void 0,(function*(){let c=f;if(f.url?c=(yield a.j(e.transformRequest(f.url,"Source"),s)).data:yield W.frameAsync(s),!c)return null;const p=a.Q(a.e(c,f),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in c&&c.vector_layers&&(p.vectorLayerIds=c.vector_layers.map((g=>g.id))),p}))}class ae{constructor(e,s){e&&(s?this.setSouthWest(e).setNorthEast(s):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof a.S?new a.S(e.lng,e.lat):a.S.convert(e),this}setSouthWest(e){return this._sw=e instanceof a.S?new a.S(e.lng,e.lat):a.S.convert(e),this}extend(e){const s=this._sw,c=this._ne;let p,g;if(e instanceof a.S)p=e,g=e;else{if(!(e instanceof ae))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(ae.convert(e)):this.extend(a.S.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(a.S.convert(e)):this;if(p=e._sw,g=e._ne,!p||!g)return this}return s||c?(s.lng=Math.min(p.lng,s.lng),s.lat=Math.min(p.lat,s.lat),c.lng=Math.max(g.lng,c.lng),c.lat=Math.max(g.lat,c.lat)):(this._sw=new a.S(p.lng,p.lat),this._ne=new a.S(g.lng,g.lat)),this}getCenter(){return new a.S((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 a.S(this.getWest(),this.getNorth())}getSouthEast(){return new a.S(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(e){const{lng:s,lat:c}=a.S.convert(e);let p=this._sw.lng<=s&&s<=this._ne.lng;return this._sw.lng>this._ne.lng&&(p=this._sw.lng>=s&&s>=this._ne.lng),this._sw.lat<=c&&c<=this._ne.lat&&p}static convert(e){return e instanceof ae?e:e&&new ae(e)}static fromLngLat(e,s=0){const c=360*s/40075017,p=c/Math.cos(Math.PI/180*e.lat);return new ae(new a.S(e.lng-p,e.lat-c),new a.S(e.lng+p,e.lat+c))}adjustAntiMeridian(){const e=new a.S(this._sw.lng,this._sw.lat),s=new a.S(this._ne.lng,this._ne.lat);return new ae(e,e.lng>s.lng?new a.S(s.lng+360,s.lat):s)}}class be{constructor(e,s,c){this.bounds=ae.convert(this.validateBounds(e)),this.minzoom=s||0,this.maxzoom=c||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const s=Math.pow(2,e.z),c=Math.floor(a.V(this.bounds.getWest())*s),p=Math.floor(a.U(this.bounds.getNorth())*s),g=Math.ceil(a.V(this.bounds.getEast())*s),b=Math.ceil(a.U(this.bounds.getSouth())*s);return e.x>=c&&e.x<g&&e.y>=p&&e.y<b}}class Fe extends a.E{constructor(e,s,c,p){if(super(),this.id=e,this.dispatcher=c,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.Q(s,["url","scheme","tileSize","promoteId"])),this._options=a.e({type:"vector"},s),this._collectResourceTiming=s.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(p)}load(){return a._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const e=yield re(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(a.e(this,e),e.bounds&&(this.tileBounds=new be(e.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,this.fire(new a.k(e))}}))}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(e){return a._(this,void 0,void 0,(function*(){const s=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c={request:this.map._requestManager.transformRequest(s,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};c.request.collectResourceTiming=this._collectResourceTiming;let p="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise(((g,b)=>{e.reloadPromise={resolve:g,reject:b}}))}else e.actor=this.dispatcher.getActor(),p="LT";e.abortController=new AbortController;try{const g=yield e.actor.sendAsync({type:p,data:c},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,g)}catch(g){if(delete e.abortController,e.aborted)return;if(g&&g.status!==404)throw g;this._afterTileLoadWorkerResponse(e,null)}}))}_afterTileLoadWorkerResponse(e,s){if(s&&s.resourceTiming&&(e.resourceTiming=s.resourceTiming),s&&this.map._refreshExpiredTiles&&e.setExpiryData(s),e.loadVectorData(s,this.map.painter),e.reloadPromise){const c=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(c.resolve).catch(c.reject)}}abortTile(e){return a._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}unloadTile(e){return a._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class Ue extends a.E{constructor(e,s,c,p){super(),this.id=e,this.dispatcher=c,this.setEventedParent(p),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},s),a.e(this,a.Q(s,["url","scheme","tileSize"]))}load(){return a._(this,arguments,void 0,(function*(e=!1){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const s=yield re(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,s&&(a.e(this,s),s.bounds&&(this.tileBounds=new be(s.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(s){this._tileJSONRequest=null,this._loaded=!0,this.fire(new a.k(s))}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}serialize(){return a.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return a._(this,void 0,void 0,(function*(){const s=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const c=yield Te.getImage(this.map._requestManager.transformRequest(s,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(c&&c.data){this.map._refreshExpiredTiles&&(c.cacheControl||c.expires)&&e.setExpiryData({cacheControl:c.cacheControl,expires:c.expires});const p=this.map.painter.context,g=p.gl,b=c.data;e.texture=this.map.painter.getTileTexture(b.width),e.texture?e.texture.update(b,{useMipmap:!0}):(e.texture=new a.T(p,b,g.RGBA,{useMipmap:!0}),e.texture.bind(g.LINEAR,g.CLAMP_TO_EDGE,g.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(c){if(delete e.abortController,e.aborted)e.state="unloaded";else if(c)throw e.state="errored",c}}))}abortTile(e){return a._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)}))}unloadTile(e){return a._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)}))}hasTransition(){return!1}}class Ne extends Ue{constructor(e,s,c,p){super(e,s,c,p),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},s),this.encoding=s.encoding||"mapbox",this.redFactor=s.redFactor,this.greenFactor=s.greenFactor,this.blueFactor=s.blueFactor,this.baseShift=s.baseShift}loadTile(e){return a._(this,void 0,void 0,(function*(){const s=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c=this.map._requestManager.transformRequest(s,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const p=yield Te.getImage(c,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(p&&p.data){const g=p.data;this.map._refreshExpiredTiles&&(p.cacheControl||p.expires)&&e.setExpiryData({cacheControl:p.cacheControl,expires:p.expires});const b=a.b(g)&&a.W()?g:yield this.readImageNow(g),T={type:this.type,uid:e.uid,source:this.id,rawImageData:b,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const S=yield e.actor.sendAsync({type:"LDT",data:T});e.dem=S,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(p){if(delete e.abortController,e.aborted)e.state="unloaded";else if(p)throw e.state="errored",p}}))}readImageNow(e){return a._(this,void 0,void 0,(function*(){if(typeof VideoFrame<"u"&&a.X()){const s=e.width+2,c=e.height+2;try{return new a.R({width:s,height:c},yield a.Y(e,-1,-1,s,c))}catch{}}return W.getImageData(e,1)}))}_getNeighboringTiles(e){const s=e.canonical,c=Math.pow(2,s.z),p=(s.x-1+c)%c,g=s.x===0?e.wrap-1:e.wrap,b=(s.x+1+c)%c,T=s.x+1===c?e.wrap+1:e.wrap,S={};return S[new a.Z(e.overscaledZ,g,s.z,p,s.y).key]={backfilled:!1},S[new a.Z(e.overscaledZ,T,s.z,b,s.y).key]={backfilled:!1},s.y>0&&(S[new a.Z(e.overscaledZ,g,s.z,p,s.y-1).key]={backfilled:!1},S[new a.Z(e.overscaledZ,e.wrap,s.z,s.x,s.y-1).key]={backfilled:!1},S[new a.Z(e.overscaledZ,T,s.z,b,s.y-1).key]={backfilled:!1}),s.y+1<c&&(S[new a.Z(e.overscaledZ,g,s.z,p,s.y+1).key]={backfilled:!1},S[new a.Z(e.overscaledZ,e.wrap,s.z,s.x,s.y+1).key]={backfilled:!1},S[new a.Z(e.overscaledZ,T,s.z,b,s.y+1).key]={backfilled:!1}),S}unloadTile(e){return a._(this,void 0,void 0,(function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.t
92ype,uid:e.uid,source:this.id}}))}))}}class ht extends a.E{constructor(e,s,c,p){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:s.data},this.actor=c.getActor(),this.setEventedParent(p),this._data=s.data,this._options=a.e({},s),this._collectResourceTiming=s.collectResourceTiming,s.maxzoom!==void 0&&(this.maxzoom=s.maxzoom),s.type&&(this.type=s.type),s.attribution&&(this.attribution=s.attribution),this.promoteId=s.promoteId,s.clusterMaxZoom!==void 0&&this.maxzoom<=s.clusterMaxZoom&&a.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${s.clusterMaxZoom}".`),this.workerOptions=a.e({source:this.id,cluster:s.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(s.buffer!==void 0?s.buffer:128),tolerance:this._pixelsToTileUnits(s.tolerance!==void 0?s.tolerance:.375),extent:a.$,maxZoom:this.maxzoom,lineMetrics:s.lineMetrics||!1,generateId:s.generateId||!1},superclusterOptions:{maxZoom:this._getClusterMaxZoom(s.clusterMaxZoom),minPoints:Math.max(2,s.clusterMinPoints||2),extent:a.$,radius:this._pixelsToTileUnits(s.clusterRadius||50),log:!1,generateId:s.generateId||!1},clusterProperties:s.clusterProperties,filter:s.filter},s.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(e){return e*(a.$/this.tileSize)}_getClusterMaxZoom(e){const s=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||e===void 0||a.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${s}"`),s}load(){return a._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._pendingWorkerUpdate={data:e},this._updateWorkerData(),this}updateData(e){return this._pendingWorkerUpdate.diff=a.a0(this._pendingWorkerUpdate.diff,e),this._updateWorkerData(),this}getData(){return a._(this,void 0,void 0,(function*(){const e=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})}))}getCoordinatesFromGeometry(e){return e.type==="GeometryCollection"?e.geometries.map((s=>s.coordinates)).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return a._(this,void 0,void 0,(function*(){const e=new ae,s=yield this.getData();let c;switch(s.type){case"FeatureCollection":c=s.features.map((p=>this.getCoordinatesFromGeometry(p.geometry))).flat(1/0);break;case"Feature":c=this.getCoordinatesFromGeometry(s.geometry);break;default:c=this.getCoordinatesFromGeometry(s)}if(c.length==0)return e;for(let p=0;p<c.length-1;p+=2)e.extend([c[p],c[p+1]]);return e}))}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(e.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),e.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMa
92xZoom))),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,s,c){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:s,offset:c}})}_updateWorkerData(){return a._(this,void 0,void 0,(function*(){if(this._isUpdatingWorker)return;const{data:e,diff:s}=this._pendingWorkerUpdate;if(!e&&!s)return void a.w(`No data or diff provided to GeoJSONSource ${this.id}.`);const c=a.e({type:this.type},this.workerOptions);e?(typeof e=="string"?(c.request=this.map._requestManager.transformRequest(W.resolveURL(e),"Source"),c.request.collectResourceTiming=this._collectResourceTiming):c.data=JSON.stringify(e),this._pendingWorkerUpdate.data=void 0):s&&(c.dataDiff=s,this._pendingWorkerUpdate.diff=void 0),this._isUpdatingWorker=!0,this.fire(new a.l("dataloading",{dataType:"source"}));try{const p=yield this.actor.sendAsync({type:"LD",data:c});if(this._isUpdatingWorker=!1,this._removed||p.abandoned)return void this.fire(new a.l("dataabort",{dataType:"source"}));this._data=p.data;let g=null;p.resourceTiming&&p.resourceTiming[this.id]&&(g=p.resourceTiming[this.id].slice(0));const b={dataType:"source"};this._collectResourceTiming&&g&&g.length>0&&a.e(b,{resourceTiming:g}),this.fire(new a.l("data",Object.assign(Object.assign({},b),{sourceDataType:"metadata"}))),this.fire(new a.l("data",Object.assign(Object.assign({},b),{sourceDataType:"content"})))}catch(p){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new a.l("dataabort",{dataType:"source"}));this.fire(new a.k(p))}finally{(this._pendingWorkerUpdate.data||this._pendingWorkerUpdate.diff)&&this._updateWorkerData()}}))}loaded(){return!this._isUpdatingWorker&&this._pendingWorkerUpdate.data===void 0&&this._pendingWorkerUpdate.diff===void 0}loadTile(e){return a._(this,void 0,void 0,(function*(){const s=e.actor?"RT":"LT";e.actor=this.actor;const c={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;const p=yield this.actor.sendAsync({type:s,data:c},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(p,this.map.painter,s==="RT")}))}abortTile(e){return a._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}))}unloadTile(e){return a._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
vendor: 5,320 bytes, line 92
92ype,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class ot extends a.E{constructor(e,s,c,p){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=c,this.coordinates=s.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(p),this.options=s}load(e){return a._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const s=yield Te.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,s&&s.data&&(this.image=s.data,e&&(this.coordinates=e),this._finishLoading())}catch(s){this._request=null,this._loaded=!0,this.fire(new a.k(s))}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const s=e.map(a.a1.fromLngLat);var c;return this.tileID=(function(p){const g=a.a2.fromPoints(p),b=g.width(),T=g.height(),S=Math.max(b,T),C=Math.max(0,Math.floor(-Math.log(S)/Math.LN2)),E=Math.pow(2,C);return new a.a4(C,Math.floor((g.minX+g.maxX)/2*E),Math.floor((g.minY+g.maxY)/2*E))})(s),this.terrainTileRanges=this._getOverlappingTileRanges(s),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=s.map((p=>this.tileID.getTilePoint(p)._round())),this.flippedWindingOrder=((c=this.tileCoords)[1].x-c[0].x)*(c[2].y-c[0].y)-(c[1].y-c[0].y)*(c[2].x-c[0].x)<0,this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,s=e.gl;this.texture||(this.texture=new a.T(e,this.image,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE));let c=!1;for(const p in this.tiles){const g=this.tiles[p];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,c=!0)}c&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return a._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){const{minX:s,minY:c,maxX:p,maxY:g}=a.a2.fromPoints(e),b={};for(let T=0;T<=a.a3;T++){const S=Math.pow(2,T),C=Math.floor(s*S),E=Math.floor(c*S),j=Math.floor(p*S),A=Math.floor(g*S);b[T]={minTileX:C,minTileY:E,maxTileX:j,maxTileY:A}}return b}}class at extends ot{constructor(e,s,c,p){super(e,s,c,p),this.roundZoom=!0,this.type="video",this.options=s}load(){return a._(this,void 0,void 0,(function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const s of e.urls)this.urls.push(this.map._requestManager.transformRequest(s,"Source").url);try{const s=yield a.a5(this.urls);if(this._loaded=!0,!s)return;this.video=s,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(s){this.fire(new a.k(s))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const s=this.video.seekable;e<s.start(0)||e>s.end(0)?this.fire(new a.k(new a.a6(`sources.${this.id}`,null,`Playback for this video can be set only between the ${s.start(0)} and ${s.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,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 e=this.map.painter.context,s=e.gl;this.texture?this.video.paused||(this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,this.video)):(this.texture=new a.T(e,this.video,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE));let c=!1;for(const p in this.tiles){const g=this.tiles[p];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,c=!0)}c&&this.fire(new a.l("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 qe extends ot{constructor(e,s,c,p){super(e,s,c,p),s.coordinates?Array.isArray(s.coordinates)&&s.coordinates.length===4&&!s.coordinates.some((g=>!Array.isArray(g)||g.length!==2||g.some((b=>typeof b!="number"))))||this.fire(new a.k(new a.a6(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.k(new a.a6(`sources.${e}`,null,'missing required property "coordinates"'))),s.animate&&typeof s.animate!="boolean"&&this.fire(new a.k(new a.a6(`sources.${e}
92`,null,'optional "animate" property must be a boolean value'))),s.canvas?typeof s.canvas=="string"||s.canvas instanceof HTMLCanvasElement||this.fire(new a.k(new a.a6(`sources.${e}`,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 a.k(new a.a6(`sources.${e}`,null,'missing required property "canvas"'))),this.options=s,this.animate=s.animate===void 0||s.animate}load(){return a._(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 a.k(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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const s=this.map.painter.context,c=s.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.T(s,this.canvas,c.RGBA,{premultiply:!0});let p=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,p=!0)}p&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const Ct={},mt=f=>{switch(f){case"geojson":return ht;case"image":return ot;case"raster":return Ue;case"raster-dem":return Ne;case"vector":return Fe;case"video":return at;case"canvas":return qe}return Ct[f]},Ot="RTLPluginLoaded";class Dt extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=De()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((s=>{throw this.status="error",s}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return a._(this,arguments,void 0,(function*(s,c=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=W.resolveURL(s),!this.url)throw new Error(`requested url ${s}
92 is invalid`);if(this.status==="unavailable"){if(!c)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return a._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.l(Ot))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Yt=null;function pi(){return Yt||(Yt=new Dt),Yt}class hi{constructor(e,s){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=a.a7(),this.uses=0,this.tileSize=s,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(e){const s=e+this.timeAdded;s<this.fadeEndTime||(this.fadeEndTime=s)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,s,c){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=(function(p,g){const b={};if(!g)return b;for(const T of p){const S=T.layerIds.map((C=>g.getLayer(C))).filter(Boolean);if(S.length!==0){T.layers=S,T.stateDependentLayerIds&&(T.stateDependentLayers=T.stateDependentLayerIds.map((C=>S.filter((E=>E.id===C))[0])));for(const C of S)b[C.id]=T}}return b})(e.buckets,s?.style),this.hasSymbolBuckets=!1;for(const p in this.buckets){const g=this.buckets[p];if(g instanceof a.a9){if(this.hasSymbolBuckets=!0,!c)break;g.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const p in this.buckets){const g=this.buckets[p];if(g instanceof a.a9&&g.hasRTLText){this.hasRTLText=!0,pi().lazyLoad();break}}this.queryPadding=0;for(const p in this.buckets){const g=this.buckets[p];this.queryPadding=Math.max(this.queryPadding,s.style.getLayer(p).queryRadius(g))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new a.a8}unloadVectorData(){for(const e in this.buckets)this.buckets[e].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(e){return this.buckets[e.id]}upload(e){for(const c in this.buckets){const p=this.buckets[c];p.uploadPending()&&p.upload(e)}const s=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new a.T(e,this.imageAtlas.image,s.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new a.T(e,this.glyphAtlasImage,s.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,s,c,p,g,b,T,S,C,E,j){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:p,cameraQueryGeometry:g,scale:b,tileSize:this.tileSize,pixelPosMatrix:E,transform:S,params:T,queryPadding:this.queryPadding*C,getElevation:j},e,s,c):{}}querySourceFeatures(e,s){const c=this.latestFeatureIndex;if(!c||!c.rawTileData)return;const p=c.loadVTLayers(),g=s&&s.sourceLayer?s.sourceLayer:"",b=p._geojsonTileLayer||p[g];if(!b)return;const T=a.aa(s?.filter,s?.globalState),{z:S,x:C,y:E}=this.tileID.canonical,j={z:S,x:C,y:E};for(let A=0;A<b.length;A++){const R=b.feature(A);if(T.needGeometry){const X=a.ab(R,!0);if(!T.filter(new a.F(this.tileID.overscaledZ),X,this.tileID.canonical))continue}else if(!T.filter(new a.F(this.tileID.overscaledZ),R))continue;const V=c.getId(R,g),Y=new a.ac(R,S,C,E,V);Y.tile=j,e.push(Y)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const s=this.expirationTime;
vendor: 11,974 bytes, line 92
92if(e.cacheControl){const c=a.ad(e.cacheControl);c["max-age"]&&(this.expirationTime=Date.now()+1e3*c["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const c=Date.now();let p=!1;if(this.expirationTime>c)p=!1;else if(s)if(this.expirationTime<s)p=!0;else{const g=this.expirationTime-s;g?this.expirationTime=c+Math.max(g,3e4):p=!0}else p=!0;p?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(e,s){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(e).length===0)return;const c=this.latestFeatureIndex.loadVTLayers();for(const p in this.buckets){if(!s.style.hasLayer(p))continue;const g=this.buckets[p],b=g.layers[0].sourceLayer||"_geojsonTileLayer",T=c[b],S=e[b];if(!T||!S||Object.keys(S).length===0)continue;g.update(S,T,this.imageAtlas&&this.imageAtlas.patternPositions||{});const C=s&&s.style&&s.style.getLayer(p);C&&(this.queryPadding=Math.max(this.queryPadding,C.queryRadius(g)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<W.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=W.now()+e}setDependencies(e,s){const c={};for(const p of s)c[p]=!0;this.dependencies[e]=c}hasDependency(e,s){for(const c of e){const p=this.dependencies[c];if(p){for(const g of s)if(p[g])return!0}}return!1}}class de{constructor(e,s){this.max=e,this.onRemove=s,this.reset()}reset(){for(const e in this.data)for(const s of this.data[e])s.timeout&&clearTimeout(s.timeout),this.onRemove(s.value);return this.data={},this.order=[],this}add(e,s,c){const p=e.wrapped().key;this.data[p]===void 0&&(this.data[p]=[]);const g={value:s,timeout:void 0};if(c!==void 0&&(g.timeout=setTimeout((()=>{this.remove(e,g)}),c)),this.data[p].push(g),this.order.push(p),this.order.length>this.max){const b=this._getAndRemoveByKey(this.order[0]);b&&this.onRemove(b)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const s=this.data[e].shift();return s.timeout&&clearTimeout(s.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),s.value}getByKey(e){const s=this.data[e];return s?s[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,s){if(!this.has(e))return this;const c=e.wrapped().key,p=s===void 0?0:this.data[c].indexOf(s),g=this.data[c][p];return this.data[c].splice(p,1),g.timeout&&clearTimeout(g.timeout),this.data[c].length===0&&delete this.data[c],this.onRemove(g.value),this.order.splice(this.order.indexOf(c),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const s=this._getAndRemoveByKey(this.order[0]);s&&this.onRemove(s)}return this}filter(e){const s=[];for(const c in this.data)for(const p of this.data[c])e(p.value)||s.push(p);for(const c of s)this.remove(c.value.tileID,c)}}class ${constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,s,c){const p=String(s);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][p]=this.stateChanges[e][p]||{},a.e(this.stateChanges[e][p],c),this.deletedStates[e]===null){this.deletedStates[e]={};for(const g in this.state[e])g!==p&&(this.deletedStates[e][g]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][p]===null){this.deletedStates[e][p]={};for(const g in this.state[e][p])c[g]||(this.deletedStates[e][p][g]=null)}else for(const g in c)this.deletedStates[e]&&this.deletedStates[e][p]&&this.deletedStates[e][p][g]===null&&delete this.deletedStates[e][p][g]}removeFeatureState(e,s,c){if(this.deletedStates[e]===null)return;const p=String(s);if(this.deletedStates[e]=this.deletedStates[e]||{},c&&s!==void 0)this.deletedStates[e][p]!==null&&(this.deletedStates[e][p]=this.deletedStates[e][p]||{},this.deletedStates[e][p][c]=null);else if(s!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][p])for(c in this.deletedStates[e][p]={},this.stateChanges[e][p])this.deletedStates[e][p][c]=null;else this.deletedStates[e][p]=null;else this.deletedStates[e]=null}getState(e,s){const c=String(s),p=a.e({},(this.state[e]||{})[c],(this.stateChanges[e]||{})[c]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const g=this.deletedStates[e][s];if(g===null)return{};for(const b in g)delete p[b]}return p}initializeTileState(e,s){e.setFeatureState(this.state,s)}coalesceChanges(e,s){const c={};for(const p in this.stateChanges){this.state[p]=this.state[p]||{};const g={};for(const b in this.stateChanges[p])this.state[p][b]||(this.state[p][b]={}),a.e(this.state[p][b],this.stateChanges[p][b]),g[b]=this.state[p][b];c[p]=g}for(const p in this.deletedStates){this.state[p]=this.state[p]||{};const g={};if(this.deletedStates[p]===null)for(const b in this.state[p])g[b]={},this.state[p][b]={};else for(const b in this.deletedStates[p]){if(this.deletedStates[p][b]===null)this.state[p][b]={};else for(const T of Object.keys(this.deletedStates[p][b]))delete this.state[p][b][T];g[b]=this.state[p][b]}c[p]=c[p]||{},a.e(c[p],g)}if(this.stateChanges={},this.deletedStates={},Object.keys(c).length!==0)for(const p in e)e[p].setFeatureState(c,s)}}const U=89.25;function q(f,e){const s=a.ah(e.lat,-a.ai,a.ai);return new a.P(a.V(e.lng)*f,a.U(s)*f)}function se(f,e){return new a.a1(e.x/f,e.y/f).toLngLat()}function ce(f){return f.cameraToCenterDistance*Math.min(.85*Math.tan(a.ae(90-f.pitch)),Math.tan(a.ae(U-f.pitch)))}function fe(f,e){const s=f.canonical,c=e/a.af(s.z),p=s.x+Math.pow(2,s.z)*f.wrap,g=a.ag(new Float64Array(16));return a.M(g,g,[p*c,s.y*c,0]),a.N(g,g,[c/a.$,c/a.$,1]),g}function xe(f,e,s,c,p){const g=a.a1.fromLngLat(f,e),b=p*a.aj(1,f.lat),T=b*Math.cos(a.ae(s)),S=Math.sqrt(b*b-T*T),C=S*Math.sin(a.ae(-c)),E=S*Math.cos(a.ae(-c));return new a.a1(g.x+C,g.y+E,g.z+T)}function ge(f,e,s){const c=e.intersectsFrustum(f);if(!s||c===0)return c;const p=e.intersectsPlane(s);return p===0?0:c===2&&p===2?2:1}function Me(f,e,s){let c=0;const p=(s-e)/10;for(let g=0;g<10;g++)c+=p*Math.pow(Math.cos(e+(g+.5)/10*(s-e)),f);return c}function He(f,e){return function(s,c,p,g,b){const T=2*((f-1)/a.ak(Math.cos(a.ae(U-b))/Math.cos(a.ae(U)))-1),S=Math.acos(p/g),C=2*Me(T-1,0,a.ae(b/2)),E=Math.min(a.ae(U),S+a.ae(b/2)),j=Me(T-1,Math.min(E,S-a.ae(b/2)),E),A=Math.atan(c/p),R=Math.hypot(c,p);let V=s;return V+=a.ak(g/R/Math.max(.5,Math.cos(a.ae(b/2)))),V+=T*a.ak(Math.cos(A))/2,V-=a.ak(Math.max(1,j/C/e))/2,V}}const ze=He(9.314,3);function yt(f,e){const s=(e.roundZoom?Math.round:Math.floor)(f.zoom+a.ak(f.tileSize/e.tileSize));return Math.max(0,s)}function ye(f,e){const s=f.getCameraFrustum(),c=f.getClippingPlane(),p=f.screenPointToMercatorCoordinate(f.getCameraPoint()),g=a.a1.fromLngLat(f.center,f.elevation);p.z=g.z+Math.cos(f.pitchInRadians)*f.cameraToCenterDistance/f.worldSize;const b=f.getCoveringTilesDetailsProvider(),T=b.allowVariableZoom(f,e),S=yt(f,e),C=e.minzoom||0,E=e.maxzoom!==void 0?e.maxzoom:f.maxZoom,j=Math.min(Math.max(0,S),E),A=Math.pow(2,j),R=[A*p.x,A*p.y,0],V=[A*g.x,A*g.y,0],Y=Math.hypot(g.x-p.x,g.y-p.y),X=Math.abs(g.z-p.z),J=Math.hypot(Y,X),Q=le=>({zoom:0,x:0,y:0,wrap:le,fullyVisible:!1}),ne=[],te=[];if(f.renderWorldCopies&&b.allowWorldCopies())for(let le=1;le<=3;le++)ne.push(Q(-le)),ne.push(Q(le));for(ne.push(Q(0));ne.length>0;){const le=ne.pop(),pe=le.x,ie=le.y;let me=le.fullyVisible;const Oe={x:pe,y:ie,z:le.zoom},ve=b.getTileBoundingVolume(Oe,le.wrap,f.elevation,e);if(!me){const Ze=ge(s,ve,c);if(Ze===0)continue;me=Ze===2}const we=b.distanceToTile2d(p.x,p.y,Oe,ve);let Se=S;T&&(Se=(e.calculateTileZoom||ze)(f.zoom+a.ak(f.tileSize/e.tileSize),we,X,J,f.fov)),Se=(e.roundZoom?Math.round:Math.floor)(Se),Se=Math.max(0,Se);const Je=Math.min(Se,E);if(le.wrap=b.getWrap(g,Oe,le.wrap),le.zoom>=Je){if(le.zoom<C)continue;const Ze=j-le.zoom,$e=R[0]-.5-(pe<<Ze),bt=R[1]-.5-(ie<<Ze),Xt=e.reparseOverscaled?Math.max(le.zoom,Se):le.zoom;te.push({tileID:new a.Z(le.zoom===E?Xt:le.zoom,le.wrap,le.zoom,pe,ie),distanceSq:a.al([V[0]-.5-pe,V[1]-.5-ie]),tileDistanceToCamera:Math.sqrt($e*$e+bt*bt)})}else for(let Ze=0;Ze<4;Ze++)ne.push({zoom:le.zoom+1,x:(pe<<1)+Ze%2,y:(ie<<1)+(Ze>>1),wrap:le.wrap,fullyVisible:me})}return te.sort(((le,pe)=>le.distanceSq-pe.distanceSq)).map((le=>le.tileID))}const Nt=a.a2.fromPoints([new a.P(0,0),new a.P(a.$,a.$)]);class ei extends a.E{constructor(e,s,c){super(),this.id=e,this.dispatcher=c,this.on("data",(p=>this._dataHandler(p))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((p,g,b,T)=>{const S=new(mt(g.type))(p,g,b,T);if(S.id!==p)throw new Error(`Expected Source id to be ${p} instead of ${S.id}`);return S})(e,s,c,this),this._tiles={},this._cache=new de(0,(p=>this._unloadTile(p))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new $,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}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 e in this._tiles){const s=this._tiles[e];if(s.state!=="loaded"&&s.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,s,c){return a._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,s,c)}catch(p){e.state="errored",p.status!==404?this._source.fire(new a.k(p,{tile:e})):this.update(this.transform,this.terrain)}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new a.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const s in this._tiles){const c=this._tiles[s];c.upload(e),c.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(Tt).map((e=>e.key))}getRenderableIds(e){const s=[];for(const c in this._tiles)this._isIdRenderable(c,e)&&s.push(this._tiles[c]);return e?s.sort(((c,p)=>{const g=c.tileID,b=p.tileID,T=new a.P(g.canonical.x,g.canonical.y)._rotate(-this.transform.bearingInRadians),S=new a.P(b.canonical.x,b.canonical.y)._rotate(-this.transform.bearingInRadians);return g.overscaledZ-b.overscaledZ||S.y-T.y||S.x-T.x})).map((c=>c.tileID.key)):s.map((c=>c.tileID)).sort(Tt).map((c=>c.key))}hasRenderableParent(e){const s=this.findLoadedParent(e,0);return!!s&&this._isIdRenderable(s.tileID.key)}_isIdRenderable(e,s){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(s||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const s in this._tiles)e?this._reloadTile(s,"expired"):this._tiles[s].state!=="errored"&&this._reloadTile(s,"reloading")}}_reloadTile(e,s){return a._(this,void 0,void 0,(function*(){const c=this._tiles[e];c&&(c.state!=="loading"&&(c.state=s),yield this._loadTile(c,e,s))}
92))}_tileLoaded(e,s,c){e.timeAdded=W.now(),c==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(s,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new a.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const s=this.getRenderableIds();for(let p=0;p<s.length;p++){const g=s[p];if(e.neighboringTiles&&e.neighboringTiles[g]){const b=this.getTileByID(g);c(e,b),c(b,e)}}function c(p,g){p.needsHillshadePrepare=!0,p.needsTerrainPrepare=!0;let b=g.tileID.canonical.x-p.tileID.canonical.x;const T=g.tileID.canonical.y-p.tileID.canonical.y,S=Math.pow(2,p.tileID.canonical.z),C=g.tileID.key;b===0&&T===0||Math.abs(T)>1||(Math.abs(b)>1&&(Math.abs(b+S)===1?b+=S:Math.abs(b-S)===1&&(b-=S)),g.dem&&p.dem&&(p.dem.backfillBorder(g.dem,b,T),p.neighboringTiles&&p.neighboringTiles[C]&&(p.neighboringTiles[C].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,s,c,p){for(const g in this._tiles){let b=this._tiles[g];if(p[g]||!b.hasData()||b.tileID.overscaledZ<=s||b.tileID.overscaledZ>c)continue;let T=b.tileID;for(;b&&b.tileID.overscaledZ>s+1;){const C=b.tileID.scaledTo(b.tileID.overscaledZ-1);b=this._tiles[C.key],b&&b.hasData()&&(T=C)}let S=T;for(;S.overscaledZ>s;)if(S=S.scaledTo(S.overscaledZ-1),e[S.key]||e[S.canonical.key]){p[T.key]=T;break}}}findLoadedParent(e,s){if(e.key in this._loadedParentTiles){const c=this._loadedParentTiles[e.key];return c&&c.tileID.overscaledZ>=s?c:null}for(let c=e.overscaledZ-1;c>=s;c--){const p=e.scaledTo(c),g=this._getLoadedTile(p);if(g)return g}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const s=this._tiles[e.key];return s&&s.hasData()?s:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const s=Math.ceil(e.width/this._source.tileSize)+1,c=Math.ceil(e.height/this._source.tileSize)+1,p=Math.floor(s*c*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),g=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,p):p;this._cache.setMaxSize(g)}handleWrapJump(e){const s=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,s){const c={};for(const p in this._tiles){const g=this._tiles[p];g.tileID=g.tileID.unwrapTo(g.tileID.wrap+s),c[g.tileID.key]=g}this._tiles=c;for(const p in this._timers)clearTimeout(this._timers[p]),delete this._timers[p];for(const p in this._tiles)this._setTileReloadTimer(p,this._tiles[p])}}_updateCoveredAndRetainedTiles(e,s,c,p,g,b){const T={},S={},C=Object.keys(e),E=W.now();for(const j of C){const A=e[j],R=this._tiles[j];if(!R||R.fadeEndTime!==0&&R.fadeEndTime<=E)continue;const V=this.findLoadedParent(A,s),Y=this.findLoadedSibling(A),X=V||Y||null;X&&(this._addTile(X.tileID),T[X.tileID.key]=X.tileID),S[j]=A}this._retainLoadedChildren(S,p,c,e);for(const j in T)e[j]||(this._coveredTiles[j]=!0,e[j]=T[j]);if(b){const j={},A={};for(const R of g)this._tiles[R.key].hasData()?j[R.key]=R:A[R.key]=R;for(const R in A){const V=A[R].children(this._source.maxzoom);this._tiles[V[0].key]&&this._tiles[V[1].key]&&this._tiles[V[2].key]&&this._tiles[V[3].key]&&(j[V[0].key]=e[V[0].key]=V[0],j[V[1].key]=e[V[1].key]=V[1],j[V[2].key]=e[V[2].key]=V[2],j[V[3].key]=e[V[3].key]=V[3],delete A[R])}for(const R in A){const V=A[R],Y=this.findLoadedParent(V,this._source.minzoom),X=this.findLoadedSibling(V),J=Y||X||null;if(J){j[J.tileID.key]=e[J.tileID.key]=J.tileID;for(const Q in j)j[Q].isChildOf(J.tileID)&&delete j[Q]}}for(const R in this._tiles)j[R]||(this._coveredTiles[R]=!0)}}update(e,s){if(!this._sourceLoaded||this._paused)return;let c;this.transform=e,this.terrain=s,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?c=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((E=>new a.Z(E.canonical.z,E.wrap,E.canonical.z,E.canonical.x,E.canonical.y))):(c=ye(e,{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:s,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(c=c.filter((E=>this._source.hasTile(E))))):c=[];const p=yt(e,this._source),g=Math.max(p-ei.maxOverzooming,this._source.minzoom),b=Math.max(p+ei.maxUnderzooming,this._source.minzoom);
92if(this.usedForTerrain){const E={};for(const j of c)if(j.canonical.z>this._source.minzoom){const A=j.scaledTo(j.canonical.z-1);E[A.key]=A;const R=j.scaledTo(Math.max(this._source.minzoom,Math.min(j.canonical.z,5)));E[R.key]=R}c=c.concat(Object.values(E))}const T=c.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,T&&this.fire(new a.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const S=this._updateRetainedTiles(c,p);Zt(this._source.type)&&this._updateCoveredAndRetainedTiles(S,g,b,p,c,s);for(const E in S)this._tiles[E].clearFadeHold();const C=a.am(this._tiles,S);for(const E of C){const j=this._tiles[E];j.hasSymbolBuckets&&!j.holdingForFade()?j.setHoldDuration(this.map._fadeDuration):j.hasSymbolBuckets&&!j.symbolFadeFinished()||this._removeTile(E)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,s){var c;const p={},g={},b=Math.max(s-ei.maxOverzooming,this._source.minzoom),T=Math.max(s+ei.maxUnderzooming,this._source.minzoom),S={};for(const C of e){const E=this._addTile(C);p[C.key]=C,E.hasData()||s<this._source.maxzoom&&(S[C.key]=C)}this._retainLoadedChildren(S,s,T,p);for(const C of e){let E=this._tiles[C.key];if(E.hasData())continue;if(s+1>this._source.maxzoom){const A=C.children(this._source.maxzoom)[0],R=this.getTile(A);if(R&&R.hasData()){p[A.key]=A;continue}}else{const A=C.children(this._source.maxzoom);if(A.length===4&&p[A[0].key]&&p[A[1].key]&&p[A[2].key]&&p[A[3].key]||A.length===1&&p[A[0].key])continue}let j=E.wasRequested();for(let A=C.overscaledZ-1;A>=b;--A){const R=C.scaledTo(A);if(g[R.key])break;if(g[R.key]=!0,E=this.getTile(R),!E&&j&&(E=this._addTile(R)),E){const V=E.hasData();if((V||!(!((c=this.map)===null||c===void 0)&&c.cancelPendingTileRequestsWhileZooming)||j)&&(p[R.key]=R),j=E.wasRequested(),V)break}}}return p}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const s=[];let c,p=this._tiles[e].tileID;for(;p.overscaledZ>0;){if(p.key in this._loadedParentTiles){c=this._loadedParentTiles[p.key];break}s.push(p.key);const g=p.scaledTo(p.overscaledZ-1);if(c=this._getLoadedTile(g),c)break;p=g}for(const g of s)this._loadedParentTiles[g]=c}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const s=this._tiles[e].tileID,c=this._getLoadedTile(s);this._loadedSiblingTiles[s.key]=c}}_addTile(e){let s=this._tiles[e.key];if(s)return s;s=this._cache.getAndRemove(e),s&&(this._setTileReloadTimer(e.key,s),s.tileID=e,this._state.initializeTileState(s,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,s)));const c=s;return s||(s=new hi(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(s,e.key,s.state)),s.uses++,this._tiles[e.key]=s,c||this._source.fire(new a.l("dataloading",{tile:s,coord:s.tileID,dataType:"source"})),s}_setTileReloadTimer(e,s){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const c=s.getExpiryTimeout();c&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),c))}refreshTiles(e){for(const s in this._tiles)(this._isIdRenderable(s)||this._tiles[s].state=="errored")&&e.some((c=>c.equals(this._tiles[s].tileID.canonical)))&&this._reloadTile(s,"expired")}_removeTile(e){const s=this._tiles[e];s&&(s.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),s.uses>0||(s.hasData()&&s.state!=="reloading"?this._cache.add(s.tileID,s,s.getExpiryTimeout()):(s.aborted=!0,this._abortTile(s),this._unloadTile(s))))}_dataHandler(e){const s=e.sourceDataType;e.dataType==="source"&&s==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&s==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,s,c){const p=[],g=this.transform;if(!g)return p;const b=g.getCoveringTilesDetailsProvider().allowWorldCopies(),T=c?g.getCameraQueryGeometry(e):e,S=R=>g.screenPointToMercatorCoordinate(R,this.terrain),C=this.transformBbox(e,S,!b),E=this.transformBbox(T,S,!b),j=this.getIds(),A=a.a2.fromPoints(E);for(let R=0;R<j.length;R++){const V=this._tiles[j[R]];if(V.holdingForFade())continue;const Y=b?[V.tileID]:[V.tileID.unwrapTo(-1),V.tileID.unwrapTo(0)],X=Math.pow(2,g.zoom-V.tileID.overscaledZ
vendor: 43,710 bytes, line 92
92),J=s*V.queryPadding*a.$/V.tileSize/X;for(const Q of Y){const ne=A.map((te=>Q.getTilePoint(new a.a1(te.x,te.y))));if(ne.expandBy(J),ne.intersects(Nt)){const te=C.map((pe=>Q.getTilePoint(pe))),le=E.map((pe=>Q.getTilePoint(pe)));p.push({tile:V,tileID:b?Q:Q.unwrapTo(0),queryGeometry:te,cameraQueryGeometry:le,scale:X})}}}return p}transformBbox(e,s,c){let p=e.map(s);if(c){const g=a.a2.fromPoints(e);g.shrinkBy(.001*Math.min(g.width(),g.height()));const b=g.map(s);a.a2.fromPoints(p).covers(b)||(p=p.map((T=>T.x>.5?new a.a1(T.x-1,T.y,T.z):T)))}return p}getVisibleCoordinates(e){const s=this.getRenderableIds(e).map((c=>this._tiles[c].tileID));return this.transform&&this.transform.populateCache(s),s}hasTransition(){if(this._source.hasTransition())return!0;if(Zt(this._source.type)){const e=W.now();for(const s in this._tiles)if(this._tiles[s].fadeEndTime>=e)return!0}return!1}setFeatureState(e,s,c){this._state.updateState(e=e||"_geojsonTileLayer",s,c)}removeFeatureState(e,s,c){this._state.removeFeatureState(e=e||"_geojsonTileLayer",s,c)}getFeatureState(e,s){return this._state.getState(e=e||"_geojsonTileLayer",s)}setDependencies(e,s,c){const p=this._tiles[e];p&&p.setDependencies(s,c)}reloadTilesForDependencies(e,s){for(const c in this._tiles)this._tiles[c].hasDependency(e,s)&&this._reloadTile(c,"reloading");this._cache.filter((c=>!c.hasDependency(e,s)))}}function Tt(f,e){const s=Math.abs(2*f.wrap)-+(f.wrap<0),c=Math.abs(2*e.wrap)-+(e.wrap<0);return f.overscaledZ-e.overscaledZ||c-s||e.canonical.y-f.canonical.y||e.canonical.x-f.canonical.x}function Zt(f){return f==="raster"||f==="image"||f==="video"}ei.maxOverzooming=10,ei.maxUnderzooming=3;class Ei{constructor(e,s){this.reset(e,s)}reset(e,s){this.points=e||[],this._distances=[0];for(let c=1;c<this.points.length;c++)this._distances[c]=this._distances[c-1]+this.points[c].dist(this.points[c-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(s||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(this.points.length===1)return this.points[0];e=a.ah(e,0,1);let s=1,c=this._distances[s];const p=e*this.paddedLength+this.padding;for(;c<p&&s<this._distances.length;)c=this._distances[++s];const g=s-1,b=this._distances[g],T=c-b,S=T>0?(p-b)/T:0;return this.points[g].mult(1-S).add(this.points[s].mult(S))}}function lr(f,e){let s=!0;return f==="always"||f!=="never"&&e!=="never"||(s=!1),s}class cr{constructor(e,s,c){const p=this.boxCells=[],g=this.circleCells=[];this.xCellCount=Math.ceil(e/c),this.yCellCount=Math.ceil(s/c);for(let b=0;b<this.xCellCount*this.yCellCount;b++)p.push([]),g.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=s,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/s,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,s,c,p,g){this._forEachCell(s,c,p,g,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(s),this.bboxes.push(c),this.bboxes.push(p),this.bboxes.push(g)}insertCircle(e,s,c,p){this._forEachCell(s-p,c-p,s+p,c+p,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(s),this.circles.push(c),this.circles.push(p)}_insertBoxCell(e,s,c,p,g,b){this.boxCells[g].push(b)}_insertCircleCell(e,s,c,p,g,b){this.circleCells[g].push(b)}_query(e,s,c,p,g,b,T){if(c<0||e>this.width||p<0||s>this.height)return[];const S=[];if(e<=0&&s<=0&&this.width<=c&&this.height<=p){if(g)return[{key:null,x1:e,y1:s,x2:c,y2:p}];for(let C=0;C<this.boxKeys.length;C++)S.push({key:this.boxKeys[C],x1:this.bboxes[4*C],y1:this.bboxes[4*C+1],x2:this.bboxes[4*C+2],y2:this.bboxes[4*C+3]});for(let C=0;C<this.circleKeys.length;C++){const E=this.circles[3*C],j=this.circles[3*C+1],A=this.circles[3*C+2];S.push({key:this.circleKeys[C],x1:E-A,y1:j-A,x2:E+A,y2:j+A})}}else this._forEachCell(e,s,c,p,this._queryCell,S,{hitTest:g,overlapMode:b,seenUids:{box:{},circle:{}}},T);return S}query(e,s,c,p){return this._query(e,s,c,p,!1,null)}hitTest(e,s,c,p,g,b){return this._query(e,s,c,p,!0,g,b).length>0}hitTestCircle(e,s,c,p,g){const b=e-c,T=e+c,S=s-c,C=s+c;if(T<0||b>this.width||C<0||S>this.height)return!1;const E=[];return this._forEachCell(b,S,T,C,this._queryCellCircle,E,{hitTest:!0,overlapMode:p,circle:{x:e,y:s,radius:c},seenUids:{box:{},circle:{}}},g),E.length>0}_queryCell(e,s,c,p,g,b,T,S){const{seenUids:C,hitTest:E,overlapMode:j}=T,A=this.boxCells[g];if(A!==null){const V=this.bboxes;for(const Y of A)if(!C.box[Y]){C.box[Y]=!0;const X=4*Y,J=this.boxKeys[Y];if(e<=V[X+2]&&s<=V[X+3]&&c>=V[X+0]&&p>=V[X+1]&&(!S||S(J))&&(!E||!lr(j,J.overlapMode))&&(b.push({key:J,x1:V[X],y1:V[X+1],x2:V[X+2],y2:V[X+3]}),E))return!0}}const R=this.circleCells[g];if(R!==null){const V=this.circles;for(const Y of R)if(!C.circle[Y]){C.circle[Y]=!0;const X=3*Y,J=this.circleKeys[Y];if(this._circleAndRectCollide(V[X],V[X+1],V[X+2],e,s,c,p)&&(!S||S(J))&&(!E||!lr(j,J.overlapMode))){const Q=V[X],ne=V[X+1],te=V[X+2];if(b.push({key:J,x1:Q-te,y1:ne-te,x2:Q+te,y2:ne+te}),E)return!0}}}return!1}_queryCellCircle(e,s,c,p,g,b,T,S){const{circle:C,seenUids:E,overlapMode:j}=T,A=this.boxCells[g];if(A!==null){const V=this.bboxes;for(const Y of A)if(!E.box[Y]){E.box[Y]=!0;const X=4*Y,J=this.boxKeys[Y];if(this._circleAndRectCollide(C.x,C.y,C.radius,V[X+0],V[X+1],V[X+2],V[X+3])&&(!S||S(J))&&!lr(j,J.overlapMode))return b.push(!0),!0}}const R=this.circleCells[g];if(R!==null){const V=this.circles;for(const Y of R)if(!E.circle[Y]){E.circle[Y]=!0;const X=3*Y,J=this.circleKeys[Y];if(this._circlesCollide(V[X],V[X+1],V[X+2],C.x,C.y,C.radius)&&(!S||S(J))&&!lr(j,J.overlapMode))return b.push(!0),!0}}}_forEachCell(e,s,c,p,g,b,T,S){const C=this._convertToXCellCoord(e),E=this._convertToYCellCoord(s),j=this._convertToXCellCoord(c),A=this._convertToYCellCoord(p);for(let R=C;R<=j;R++)for(let V=E;V<=A;V++)if(g.call(this,e,s,c,p,this.xCellCount*V+R,b,T,S))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,s,c,p,g,b){const T=p-e,S=g-s,C=c+b;return C*C>T*T+S*S}_circleAndRectCollide(e,s,c,p,g,b,T){const S=(b-p)/2,C=Math.abs(e-(p+S));if(C>S+c)return!1;const E=(T-g)/2,j=Math.abs(s-(g+E));if(j>E+c)return!1;if(C<=S||j<=E)return!0;const A=C-S,R=j-E;return A*A+R*R<=c*c}}function Qi(f,e,s){const c=a.L();if(!f){const{vecSouth:j,vecEast:A}=ci(e),R=D();R[0]=A[0],R[1]=A[1],R[2]=j[0],R[3]=j[1],p=R,(E=(b=(g=R)[0])*(C=g[3])-(S=g[2])*(T=g[1]))&&(p[0]=C*(E=1/E),p[1]=-T*E,p[2]=-S*E,p[3]=b*E),c[0]=R[0],c[1]=R[1],c[4]=R[2],c[5]=R[3]}var p,g,b,T,S,C,E;return a.N(c,c,[1/s,1/s,1]),c}function si(f,e,s,c){if(f){const p=a.L();if(!e){const{vecSouth:g,vecEast:b}=ci(s);p[0]=b[0],p[1]=b[1],p[4]=g[0],p[5]=g[1]}return a.N(p,p,[c,c,1]),p}return s.pixelsToClipSpaceMatrix}function ci(f){const e=Math.cos(f.rollInRadians),s=Math.sin(f.rollInRadians),c=Math.cos(f.pitchInRadians),p=Math.cos(f.bearingInRadians),g=Math.sin(f.bearingInRadians),b=a.ar();b[0]=-p*c*s-g*e,b[1]=-g*c*s+p*e;const T=a.as(b);T<1e-9?a.at(b):a.au(b,b,1/T);const S=a.ar();S[0]=p*c*e-g*s,S[1]=g*c*e+p*s;const C=a.as(S);return C<1e-9?a.at(S):a.au(S,S,1/C),{vecEast:S,vecSouth:b}}function rr(f,e,s,c){let p;c?(p=[f,e,c(f,e),1],a.aw(p,p,s)):(p=[f,e,0,1],To(p,p,s));const g=p[3];return{point:new a.P(p[0]/g,p[1]/g),signedDistanceFromCamera:g,isOccluded:!1}}function We(f,e){return .5+f/e*.5}function Ir(f,e){return f.x>=-e[0]&&f.x<=e[0]&&f.y>=-e[1]&&f.y<=e[1]}function $i(f,e,s,c,p,g,b,T,S,C,E,j,A){const R=s?f.textSizeData:f.iconSizeData,V=a.an(R,e.transform.zoom),Y=[256/e.width*2+1,256/e.height*2+1],X=s?f.text.dynamicLayoutVertexArray:f.icon.dynamicLayoutVertexArray;X.clear();const J=f.lineVertexArray,Q=s?f.text.placedSymbolArray:f.icon.placedSymbolArray,ne=e.transform.width/e.transform.height;let te=!1;for(let le=0;le<Q.length;le++){const pe=Q.get(le);if(pe.hidden||pe.writingMode===a.ao.vertical&&!te){Fn(pe.numGlyphs,X);continue}te=!1;const ie=new a.P(pe.anchorX,pe.anchorY),me={getElevation:A,pitchedLabelPlaneMatrix:c,lineVertexArray:J,pitchWithMap:g,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:e.transform,tileAnchorPoint:ie,unwrappedTileID:S,width:C,height:E,translation:j},Oe=vs(pe.anchorX,pe.anchorY,me);if(!Ir(Oe.point,Y)){Fn(pe.numGlyphs,X);continue}const ve=We(e.transform.cameraToCenterDistance,Oe.signedDistanceFromCamera),we=a.ap(R,V,pe),Se=g?we*e.transform.getPitchedTextCorrection(pe.anchorX,pe.anchorY,S)/ve:we*ve,Je=lt({projectionContext:me,pitchedLabelPlaneMatrixInverse:p,symbol:pe,fontSize:Se,flip:!1,keepUpright:b,glyphOffsetArray:f.glyphOffsetArray,dynamicLayoutVertexArray:X,aspectRatio:ne,rotateToLine:T});te=Je.useVertical,(Je.notEnoughRoom||te||Je.needsFlipping&&lt({projectionContext:me,pitchedLabelPlaneMatrixInverse:p,symbol:pe,fontSize:Se,flip:!0,keepUpright:b,glyphOffsetArray:f.glyphOffsetArray,dynamicLayoutVertexArray:X,aspectRatio:ne,rotateToLine:T}).notEnoughRoom)&&Fn(pe.numGlyphs,X)}s?f.text.dynamicLayoutVertexBuffer.updateData(X):f.icon.dynamicLayoutVertexBuffer.updateData(X)}function xs(f,e,s,c,p,g,b,T){const S=g.glyphStartIndex+g.numGlyphs,C=g.lineStartIndex,E=g.lineStartIndex+g.lineLength,j=e.getoffsetX(g.glyphStartIndex),A=e.getoffsetX(S-1),R=ws(f*j,s,c,p,g.segment,C,E,T,b);if(!R)return null;const V=ws(f*A,s,c,p,g.segment,C,E,T,b);return V?T.projectionCache.anyProjectionOccluded?null:{first:R,last:V}:null}function Bo(f,e,s,c){return f===a.ao.horizontal&&Math.abs(s.y-e.y)>Math.abs(s.x-e.x)*c?{useVertical:!0}:(f===a.ao.vertical?e.y<s.y:e.x>s.x)?{needsFlipping:!0}:null}function lt(f){const{projectionContext:e,pitchedLabelPlaneMatrixInverse:s,symbol:c,fontSize:p,flip:g,keepUpright:b,glyphOffsetArray:T,dynamicLayoutVertexArray:S,aspectRatio:C,rotateToLine:E}=f,j=p/24,A=c.lineOffsetX*j,R=c.lineOffsetY*j;let V;if(c.numGlyphs>1){const Y=c.glyphStartIndex+c.numGlyphs,X=c.lineStartIndex,J=c.lineStartIndex+c.lineLength,Q=xs(j,T,A,R,g,c,E,e);if(!Q)return{notEnoughRoom:!0};const ne=$s(Q.first.point.x,Q.first.point.y,e,s),te=$s(Q.last.point.x,Q.last.point.y,e,s);if(b&&!g){const le=Bo(c.writingMode,ne,te,C);if(le)return le}V=[Q.first];for(let le=c.glyphStartIndex+1;le<Y-1;le++){const pe=ws(j*T.getoffsetX(le),A,R,g,c.segment,X,J,e,E);if(!pe)return{notEnoughRoom:!0};V.push(pe)}V.push(Q.last)}else{if(b&&!g){const X=Or(e.tileAnchorPoint.x,e.tileAnchorPoint.y,e).point,J=c.lineStartIndex+c.segment+1,Q=new a.P(e.lineVertexArray.getx(J),e.lineVertexArray.gety(J)),ne=Or(Q.x,Q.y,e),te=ne.signedDistanceFromCamera>0?ne.point:ti(e.tileAnchorPoint,Q,X,1,e),le=$s(X.x,X.y,e,s),pe=$s(te.x,te.y,e,s),ie=Bo(c.writingMode,le,pe,C);if(ie)return ie}const Y=ws(j*T.getoffsetX(c.glyphStartIndex),A,R,g,c.segment,c.lineStartIndex,c.lineStartIndex+c.lineLength,e,E);if(!Y||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};V=[Y]}for(const Y of V)a.av(S,Y.point,Y.angle);return{}}function ti(f,e,s,c,p){const g=f.add(f.sub(e)._unit()),b=Or(g.x,g.y,p).point,T=s.sub(b);return s.add(T._mult(c/T.mag()))}function Kt(f,e,s){const c=e.projectionCache;if(c.projections[f])return c.projections[f];const p=new a.P(e.lineVertexArray.getx(f),e.lineVertexArray.gety(f)),g=Or(p.x,p.y,e);if(g.signedDistanceFromCamera>0)return c.projections[f]=g.point,c.anyProjectionOccluded=c.anyProjectionOccluded||g.isOccluded,g.point;const b=f-s.direction;return ti(s.distanceFromAnchor===0?e.tileAnchorPoint:new a.P(e.lineVertexArray.getx(b),e.lineVertexArray.gety(b)),p,s.previousVertex,s.absOffsetX-s.distanceFromAnchor+1,e)}function Or(f,e,s){const c=f+s.translation[0],p=e+s.translation[1];let g;return s.pitchWithMap?(g=rr(c,p,s.pitchedLabelPlaneMatrix,s.getElevation),g.isOccluded=!1):(g=s.transform.projectTileCoordinates(c,p,s.unwrappedTileID,s.getElevation),g.point.x=(.5*g.point.x+.5)*s.width,g.point.y=(.5*-g.point.y+.5)*s.height),g}function $s(f,e,s,c){if(s.pitchWithMap){const p=[f,e,0,1];return a.aw(p,p,c),s.transform.projectTileCoordinates(p[0]/p[3],p[1]/p[3],s.unwrappedTileID,s.getElevation).point}return{x:f/s.width*2-1,y:1-e/s.height*2}}function vs(f,e,s){return s.transform.projectTileCoordinates(f,e,s.unwrappedTileID,s.getElevation)}function Wt(f,e,s){return f._unit()._perp()._mult(e*s)}function al(f,e,s,c,p,g,b,T,S){if(T.projectionCache.offsets[f])return T.projectionCache.offsets[f];const C=s.add(e);if(f+S.direction<c||f+S.direction>=p)return T.projectionCache.offsets[f]=C,C;const E=Kt(f+S.direction,T,S),j=Wt(E.sub(s),b,S.direction),A=s.add(j),R=E.add(j);return T.projectionCache.offsets[f]=a.ax(g,C,A,R)||C,T.projectionCache.offsets[f]}function ws(f,e,s,c,p,g,b,T,S){const C=c?f-e:f+e;let E=C>0?1:-1,j=0;c&&(E*=-1,j=Math.PI),E<0&&(j+=Math.PI);let A,R=E>0?g+p:g+p+1;T.projectionCache.cachedAnchorPoint?A=T.projectionCache.cachedAnchorPoint:(A=Or(T.tileAnchorPoint.x,T.tileAnchorPoint.y,T).point,T.projectionCache.cachedAnchorPoint=A);let V,Y,X=A,J=A,Q=0,ne=0;const te=Math.abs(C),le=[];let pe;for(;Q+ne<=te;){if(R+=E,R<g||R>=b)return null;Q+=ne,J=X,Y=V;const Oe={absOffsetX:te,direction:E,distanceFromAnchor:Q,previousVertex:J};if(X=Kt(R,T,Oe),s===0)le.push(J),pe=X.sub(J);else{let ve;const we=X.sub(J);ve=we.mag()===0?Wt(Kt(R+E,T,Oe).sub(X),s,E):Wt(we,s,E),Y||(Y=J.add(ve)),V=al(R,ve,X,g,b,Y,s,T,Oe),le.push(Y),pe=V.sub(Y)}ne=pe.mag()}const ie=pe._mult((te-Q)/ne)._add(Y||J),me=j+Math.atan2(X.y-J.y,X.x-J.x);return le.push(ie),{point:ie,angle:S?me:0,path:le}}const ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Fn(f,e){for(let s=0;s<f;s++){const c=e.length;e.resize(c+4),e.float32.set(ll,3*c)}}function To(f,e,s){const c=e[0],p=e[1];return f[0]=s[0]*c+s[4]*p+s[12],f[1]=s[1]*c+s[5]*p+s[13],f[3]=s[3]*c+s[7]*p+s[15],f}const Xi=100;class cl{constructor(e,s=new cr(e.width+200,e.height+200,25),c=new cr(e.width+200,e.height+200,25)){this.transform=e,this.grid=s,this.ignoredGrid=c,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+Xi,this.screenBottomBoundary=e.height+Xi,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,s,c,p,g,b,T,S,C,E,j,A){const R=this.projectAndGetPerspectiveRatio(e.anchorPointX+S[0],e.anchorPointY+S[1],g,E,A),V=c*R.perspectiveRatio;let Y;if(b||T)Y=this._projectCollisionBox(e,V,p,g,b,T,S,R,E,j,A);else{const pe=R.x+(j?j.x*V:0),ie=R.y+(j?j.y*V:0);Y={allPointsOccluded:!1,box:[pe+e.x1*V,ie+e.y1*V,pe+e.x2*V,ie+e.y2*V]}}const[X,J,Q,ne]=Y.box,te=b?Y.allPointsOccluded:R.isOccluded;let le=te;return le||(le=R.perspectiveRatio<this.perspectiveRatioCutoff),le||(le=!this.isInsideGrid(X,J,Q,ne)),le||s!=="always"&&this.grid.hitTest(X,J,Q,ne,s,C)?{box:[X,J,Q,ne],placeable:!1,offscreen:!1,occluded:te}:{box:[X,J,Q,ne],placeable:!0,offscreen:this.isOffscreen(X,J,Q,ne),occluded:te}}placeCollisionCircles(e,s,c,p,g,b,T,S,C,E,j,A,R,V){const Y=[],X=new a.P(s.anchorX,s.anchorY),J=this.getPerspectiveRatio(X.x,X.y,b,V),Q=(C?g*this.transform.getPitchedTextCorrection(s.anchorX,s.anchorY,b)/J:g*J)/a.aB,ne={getElevation:V,pitchedLabelPlaneMatrix:T,lineVertexArray:c,pitchWithMap:C,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:X,unwrappedTileID:b,width:this.transform.width,height:this.transform.height,translation:R},te=xs(Q,p,s.lineOffsetX*Q,s.lineOffsetY*Q,!1,s,!1,ne);let le=!1,pe=!1,ie=!0;if(te){const me=.5*j*J+A,Oe=new a.P(-100,-100),ve=new a.P(this.screenRightBoundary,this.screenBottomBoundary),we=new Ei,Se=te.first,Je=te.last;let Ze=[];for(let Xt=Se.path.length-1;Xt>=1;Xt--)Ze.push(Se.path[Xt]);for(let Xt=1;Xt<Je.path.length;Xt++)Ze.push(Je.path[Xt]);const $e=2.5*me;if(C){const Xt=this.projectPathToScreenSpace(Ze,ne);Ze=Xt.some((mi=>mi.signedDistanceFromCamera<=0))?[]:Xt.map((mi=>mi.point))}let bt=[];if(Ze.length>0){const Xt=Ze[0].clone(),mi=Ze[0].clone();for(let zi=1;zi<Ze.length;zi++)Xt.x=Math.min(Xt.x,Ze[zi].x),Xt.y=Math.min(Xt.y,Ze[zi].y),mi.x=Math.max(mi.x,Ze[zi].x),mi.y=Math.max(mi.y,Ze[zi].y);bt=Xt.x>=Oe.x&&mi.x<=ve.x&&Xt.y>=Oe.y&&mi.y<=ve.y?[Ze]:mi.x<Oe.x||Xt.x>ve.x||mi.y<Oe.y||Xt.y>ve.y?[]:a.ay([Ze],Oe.x,Oe.y,ve.x,ve.y)}for(const Xt of bt){we.reset(Xt,.25*me);let mi=0;mi=we.length<=.5*me?1:Math.ceil(we.paddedLength/$e)+1;for(let zi=0;zi<mi;zi++){const gi=zi/Math.max(mi-1,1),Ai=we.lerp(gi),Gi=Ai.x+Xi,Mi=Ai.y+Xi;Y.push(Gi,Mi,me,0);const Vt=Gi-me,_r=Mi-me,er=Gi+me,yr=Mi+me;if(ie=ie&&this.isOffscreen(Vt,_r,er,yr),pe=pe||this.isInsideGrid(Vt,_r,er,yr),e!=="always"&&this.grid.hitTestCircle(Gi,Mi,me,e,E)&&(le=!0,!S))return{circles:[],offscreen:!1,collisionDetected:le}}}}return{circles:!S&&le||!pe||J<this.perspectiveRatioCutoff?[]:Y,offscreen:ie,collisionDetected:le}}projectPathToScreenSpace(e,s){const c=(function(p,g){const b=a.L();return a.aq(b,g.pitchedLabelPlaneMatrix),p.map((T=>{const S=rr(T.x,T.y,b,g.getElevation),C=g.transform.projectTileCoordinates(S.point.x,S.point.y,g.unwrappedTileID,g.getElevation);return C.point.x=(.5*C.point.x+.5)*g.width,C.point.y=(.5*-C.point.y+.5)*g.height,C}))})(e,s);return(function(p){let g=0,b=0,T=0,S=0;for(let C=0;C<p.length;C++)p[C].isOccluded?(T=C+1,S=0):(S++,S>b&&(b=S,g=T));return p.slice(g,g+b)})(c)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const s=[],c=new a.a2;for(const j of e){const A=new a.P(j.x+Xi,j.y+Xi);c.extend(A),s.push(A)}const{minX:p,minY:g,maxX:b,maxY:T}=c,S=this.grid.query(p,g,b,T).concat(this.ignoredGrid.query(p,g,b,T)),C={},E={};for(const j of S){const A=j.key;if(C[A.bucketInstanceId]===void 0&&(C[A.bucketInstanceId]={}),C[A.bucketInstanceId][A.featureIndex])continue;const R=[new a.P(j.x1,j.y1),new a.P(j.x2,j.y1),new a.P(j.x2,j.y2),new a.P(j.x1,j.y2)];a.az(s,R)&&(C[A.bucketInstanceId][A.featureIndex]=!0,E[A.bucketInstanceId]===void 0&&(E[A.bucketInstanceId]=[]),E[A.bucketInstanceId].push(A.featureIndex))}return E}insertCollisionBox(e,s,c,p,g,b){(c?this.ignoredGrid:this.grid).insert({bucketInstanceId:p,featureIndex:g,collisionGroupID:b,overlapMode:s},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,s,c,p,g,b){const T=c?this.ignoredGrid:this.grid,S={bucketInstanceId:p,featureIndex:g,collisionGroupID:b,overlapMode:s};for(let C=0;C<e.length;C+=4)T.insertCircle(S,e[C],e[C+1],e[C+2])}projectAndGetPerspectiveRatio(e,s,c,p,g){if(g){let b;p?(b=[e,s,p(e,s),1],a.aw(b,b,g)):(b=[e,s,0,1],To(b,b,g));const T=b[3];return{x:(b[0]/T+1)/2*this.transform.width+Xi,y:(-b[1]/T+1)/2*this.transform.height+Xi,perspectiveRatio:.5+this.transform.cameraToCenterDistance/T*.5,isOccluded:!1,signedDistanceFromCamera:T}}{const b=this.transform.projectTileCoordinates(e,s,c,p);return{x:(b.point.x+1)/2*this.transform.width+Xi,y:(1-b.point.y)/2*this.transform.height+Xi,perspectiveRatio:.5+this.transform.cameraToCenterDistance/b.signedDistanceFromCamera*.5,isOccluded:b.isOccluded,signedDistanceFromCamera:b.signedDistanceFromCamera}}}getPerspectiveRatio(e,s,c,p){const g=this.transform.projectTileCoordinates(e,s,c,p);return .5+this.transform.cameraToCenterDistance/g.signedDistanceFromCamera*.5}isOffscreen(e,s,c,p){return c<Xi||e>=this.screenRightBoundary||p<Xi||s>this.screenBottomBoundary}isInsideGrid(e,s,c,p){return c>=0&&e<this.gridRightBoundary&&p>=0&&s<this.gridBottomBoundary}getViewportMatrix(){const e=a.ag([]);return a.M(e,e,[-100,-100,0]),e}_projectCollisionBox(e,s,c,p,g,b,T,S,C,E,j){let A=1,R=0,V=0,Y=1;const X=e.anchorPointX+T[0],J=e.anchorPointY+T[1];if(b&&!g){const Ze=this.projectAndGetPerspectiveRatio(X+1,J,p,C,j),$e=Ze.x-S.x,bt=Math.atan((Ze.y-S.y)/$e)+($e<0?Math.PI:0),Xt=Math.sin(bt),mi=Math.cos(bt);A=mi,R=Xt,V=-Xt,Y=mi}else if(!b&&g){const Ze=ci(this.transform);A=Ze.vecEast[0],R=Ze.vecEast[1],V=Ze.vecSouth[0],Y=Ze.vecSouth[1]}let Q=S.x,ne=S.y,te=s;g&&(Q=X,ne=J,te=Math.pow(2,-(this.transform.zoom-c.overscaledZ)),te*=this.transform.getPitchedTextCorrection(X,J,p),E||(te*=a.ah(.5+S.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),E&&(Q+=A*E.x*te+V*E.y*te,ne+=R*E.x*te+Y*E.y*te);const le=e.x1*te,pe=e.x2*te,ie=(le+pe)/2,me=e.y1*te,Oe=e.y2*te,ve=(me+Oe)/2,we=[{offsetX:le,offsetY:me},{offsetX:ie,offsetY:me},{offsetX:pe,offsetY:me},{offsetX:pe,offsetY:ve},{offsetX:pe,offsetY:Oe},{offsetX:ie,offsetY:Oe},{offsetX:le,offsetY:Oe},{offsetX:le,offsetY:ve}];let Se=[];for(const{offsetX:Ze,offsetY:$e}of we)Se.push(new a.P(Q+A*Ze+V*$e,ne+R*Ze+Y*$e));let Je=!1;if(g){const Ze=Se.map(($e=>this.projectAndGetPerspectiveRatio($e.x,$e.y,p,C,j)));Je=Ze.some(($e=>!$e.isOccluded)),Se=Ze.map(($e=>new a.P($e.x,$e.y)))}else Je=!0;return{box:a.aA(Se),allPointsOccluded:!Je}}}class Zr{constructor(e,s,c,p){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?s:-s))):p&&c?1:0,this.placed=c}isHidden(){return this.opacity===0&&!this.placed}}class Ti{constructor(e,s,c,p,g){this.text=new Zr(e?e.text:null,s,c,g),this.icon=new Zr(e?e.icon:null,s,p,g)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Uh{constructor(e,s,c){this.text=e,this.icon=s,this.skipFade=c}}class pa{constructor(e,s,c,p,g){this.bucketInstanceId=e,this.featureIndex=s,this.sourceLayerIndex=c,this.bucketIndex=p,this.tileID=g}}class jc{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const s=++this.maxGroupID;this.collisionGroups[e]={ID:s,predicate:c=>c.collisionGroupID===s}}return this.collisionGroups[e]}}function Bs(f,e,s,c,p){const{horizontalAlign:g,verticalAlign:b}=a.aH(f);return new a.P(-(g-.5)*e+c[0]*p,-(b-.5)*s+c[1]*p)}class Ts{constructor(e,s,c,p,g){this.transform=e.clone(),this.terrain=s,this.collisionIndex=new cl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=c,this.retainedQueryData={},this.collisionGroups=new jc(p),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=g,g&&(g.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const s=this.terrain;return s?(c,p)=>s.getElevation(e,c,p):null}getBucketParts(e,s,c,p){const g=c.getBucket(s),b=c.latestFeatureIndex;if(!g||!b||s.id!==g.layerIds[0])return;const T=c.collisionBoxArray,S=g.layers[0].layout,C=g.layers[0].paint,E=Math.pow(2,this.transform.zoom-c.tileID.overscaledZ),j=c.tileSize/a.$,A=c.tileID.toUnwrapped(),R=S.get("text-rotation-alignment")==="map",V=a.aC(c,1,this.transform.zoom),Y=a.aD(this.collisionIndex.transform,c,C.get("text-translate"),C.get("text-translate-anchor")),X=a.aD(this.collisionIndex.transform,c,C.get("icon-translate"),C.get("icon-translate-anchor")),J=Qi(R,this.transform,V);this.retainedQueryData[g.bucketInstanceId]=new pa(g.bucketInstanceId,b,g.sourceLayerIndex,g.index,c.tileID);const Q={bucket:g,layout:S,translationText:Y,translationIcon:X,unwrappedTileID:A,pitchedLabelPlaneMatrix:J,scale:E,textPixelRatio:j,holdingForFade:c.holdingForFade(),collisionBoxArray:T,partiallyEvaluatedTextSize:a.an(g.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(g.sourceID)};if(p)for(const ne of g.sortKeyRanges){const{sortKey:te,symbolInstanceStart:le,symbolInstanceEnd:pe}=ne;e.push({sortKey:te,symbolInstanceStart:le,symbolInstanceEnd:pe,parameters:Q})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:g.symbolInstances.length,parameters:Q})}attemptAnchorPlacement(e,s,c,p,g,b,T,S,C,E,j,A,R,V,Y,X,J,Q,ne,te){const le=a.aE[e.textAnchor],pe=[e.textOffset0,e.textOffset1],ie=Bs(le,c,p,pe,g),me=this.collisionIndex.placeCollisionBox(s,A,S,C,E,T,b,X,j.predicate,ne,ie,te);if((!Q||this.collisionIndex.placeCollisionBox(Q,A,S,C,E,T,b,J,j.predicate,ne,ie,te).placeable)&&me.placeable){let Oe;if(this.prevPlacement&&this.prevPlacement.variableOffsets[R.crossTileID]&&this.prevPlacement.placements[R.crossTileID]&&this.prevPlacement.placements[R.crossTileID].text&&(Oe=this.prevPlacement.variableOffsets[R.crossTileID].anchor),R.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[R.crossTileID]={textOffset:pe,width:c,height:p,anchor:le,textBoxScale:g,prevAnchor:Oe},this.markUsedJustification(V,le,R,Y),V.allowVerticalPlacement&&(this.markUsedOrientation(V,Y,R),this.placedOrientations[R.crossTileID]=Y),{shift:ie,placedGlyphBoxes:me}}}placeLayerBucketPart(e,s,c){const{bucket:p,layout:g,translationText:b,translationIcon:T,unwrappedTileID:S,pitchedLabelPlaneMatrix:C,textPixelRatio:E,holdingForFade:j,collisionBoxArray:A,partiallyEvaluatedTextSize:R,collisionGroup:V}=e.parameters,Y=g.get("text-optional"),X=g.get("icon-optional"),J=a.aF(g,"text-overlap","text-allow-overlap"),Q=J==="always",ne=a.aF(g,"icon-overlap","icon-allow-overlap"),te=ne==="always",le=g.get("text-rotation-alignment")==="map",pe=g.get("text-pitch-alignment")==="map",ie=g.get("icon-text-fit")!=="none",me=g.get("symbol-z-order")==="viewport-y",Oe=Q&&(te||!p.hasIconData()||X),ve=te&&(Q||!p.hasTextData()||Y);!p.collisionArrays&&A&&p.deserializeCollisionBoxes(A);const we=this.retainedQueryData[p.bucketInstanceId].tileID,Se=this._getTerrainElevationFunc(we),Je=this.transform.getFastPathSimpleProjectionMatrix(we),Ze=($e,bt,Xt)=>{var mi,zi;if(s[$e.crossTileID])return;if(j)return void(this.placements[$e.crossTileID]=new Uh(!1,!1,!1));let gi=!1,Ai=!1,Gi=!0,Mi=null,Vt={box:null,placeable:!1,offscreen:null,occluded:!1},_r={placeable:!1},er=null,yr=null,Ur=null,Cs=0,On=0,Es=0;bt.textFeatureIndex?Cs=bt.textFeatureIndex:$e.useRuntimeCollisionCircles&&(Cs=$e.featureIndex),bt.verticalTextFeatureIndex&&(On=bt.verticalTextFeatureIndex);const oo=bt.textBox;if(oo){const nn=Ji=>{let ur=a.ao.horizontal;if(p.allowVerticalPlacement&&!Ji&&this.prevPlacement){const on=this.prevPlacement.placedOrientations[$e.crossTileID];on&&(this.placedOrientations[$e.crossTileID]=on,ur=on,this.markUsedOrientation(p,ur,$e))}return ur},Hn=(Ji,ur)=>{if(p.allowVerticalPlacement&&$e.numVerticalGlyphVertices>0&&bt.verticalTextBox){for(const on of p.writingModes)if(on===a.ao.vertical?(Vt=ur(),_r=Vt):Vt=Ji(),Vt&&Vt.placeable)break}else Vt=Ji()},Zn=$e.textAnchorOffsetStartIndex,sn=$e.textAnchorOffsetEndIndex;if(sn===Zn){const Ji=(ur,on)=>{const br=this.collisionIndex.placeCollisionBox(ur,J,E,we,S,pe,le,b,V.predicate,Se,void 0,Je);return br&&br.placeable&&(this.markUsedOrientation(p,on,$e),this.placedOrientations[$e.crossTileID]=on),br};Hn((()=>Ji(oo,a.ao.horizontal)),(()=>{const ur=bt.verticalTextBox;return p.allowVerticalPlacement&&$e.numVerticalGlyphVertices>0&&ur?Ji(ur,a.ao.vertical):{box:null,offscreen:null}})),nn(Vt&&Vt.placeable)}else{let Ji=a.aE[(zi=(mi=this.prevPlacement)===null||mi===void 0?void 0:mi.variableOffsets[$e.crossTileID])===null||zi===void 0?void 0:zi.anchor];const ur=(br,Iu,La)=>{const Go=br.x2-br.x1,ls=br.y2-br.y1,Pn=$e.textBoxScale,Ms=ie&&ne==="never"?Iu:null;let Is=null,As=J==="never"?1:2,Ip="never";Ji&&As++;for(let Au=0;Au<As;Au++){for(let za=Zn;za<sn;za++){const ju=p.textAnchorOffsets.get(za);if(Ji&&ju.textAnchor!==Ji)continue;const cs=this.attemptAnchorPlacement(ju,br,Go,ls,Pn,le,pe,E,we,S,V,Ip,$e,p,La,b,T,Ms,Se);if(cs&&(Is=cs.placedGlyphBoxes,Is&&Is.placeable))return gi=!0,Mi=cs.shift,Is}Ji?Ji=null:Ip=J}return c&&!Is&&(Is={box:this.collisionIndex.placeCollisionBox(oo,"always",E,we,S,pe,le,b,V.predicate,Se,void 0,Je).box,offscreen:!1,placeable:!1,occluded:!1}),Is};Hn((()=>ur(oo,bt.iconBox,a.ao.horizontal)),(()=>{const br=bt.verticalTextBox;return p.allowVerticalPlacement&&(!Vt||!Vt.placeable)&&$e.numVerticalGlyphVertices>0&&br?ur(br,bt.verticalIconBox,a.ao.vertical):{box:null,occluded:!0,offscreen:null}})),Vt&&(gi=Vt.placeable,Gi=Vt.offscreen);const on=nn(Vt&&Vt.placeable);if(!gi&&this.prevPlacement){const br=this.prevPlacement.variableOffsets[$e.crossTileID];br&&(this.variableOffsets[$e.crossTileID]=br,this.markUsedJustification(p,br.anchor,$e,on))}}}if(er=Vt,gi=er&&er.placeable,Gi=er&&er.offscreen,$e.useRuntimeCollisionCircles){const nn=p.text.placedSymbolArray.get($e.centerJustifiedTextSymbolIndex),Hn=a.ap(p.textSizeData,R,nn),Zn=g.get("text-padding");yr=this.collisionIndex.placeCollisionCircles(J,nn,p.lineVertexArray,p.glyphOffsetArray,Hn,S,C,c,pe,V.predicate,$e.collisionCircleDiameter,Zn,b,Se),yr.circles.length&&yr.collisionDetected&&!c&&a.w("Collisions detected, but collision boxes are not shown"),gi=Q||yr.circles.length>0&&!yr.collisionDetected,Gi=Gi&&yr.offscreen}if(bt.iconFeatureIndex&&(Es=bt.iconFeatureIndex),bt.iconBox){const nn=Hn=>this.collisionIndex.placeCollisionBox(Hn,ne,E,we,S,pe,le,T,V.predicate,Se,ie&&Mi?Mi:void 0,Je);_r&&_r.placeable&&bt.verticalIconBox?(Ur=nn(bt.verticalIconBox),Ai=Ur.placeable):(Ur=nn(bt.iconBox),Ai=Ur.placeable),Gi=Gi&&Ur.offscreen}const Gl=Y||$e.numHorizontalGlyphVertices===0&&$e.numVerticalGlyphVertices===0,Vo=X||$e.numIconVertices===0;Gl||Vo?Vo?Gl||(Ai=Ai&&gi):gi=Ai&&gi:Ai=gi=Ai&&gi;const as=Ai&&Ur.placeable;if(gi&&er.placeable&&this.collisionIndex.insertCollisionBox(er.box,J,g.get("text-ignore-placement"),p.bucketInstanceId,_r&&_r.placeable&&On?On:Cs,V.ID),as&&this.collisionIndex.insertCollisionBox(Ur.box,ne,g.get("icon-ignore-placement"),p.bucketInstanceId,Es,V.ID),yr&&gi&&this.collisionIndex.insertCollisionCircles(yr.circles,J,g.get("text-ignore-placement"),p.bucketInstanceId,Cs,V.ID),c&&this.storeCollisionData(p.bucketInstanceId,Xt,bt,er,Ur,yr),$e.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(p.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[$e.crossTileID]=new Uh((gi||Oe)&&!er?.occluded,(Ai||ve)&&!Ur?.occluded,Gi||p.justReloaded),s[$e.crossTileID]=!0};if(me){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const $e=p.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let bt=$e.length-1;bt>=0;--bt){const Xt=$e[bt];Ze(p.symbolInstances.get(Xt),p.collisionArrays[Xt],Xt)}}else for(let $e=e.symbolInstanceStart;$e<e.symbolInstanceEnd;$e++)Ze(p.symbolInstances.get($e),p.collisionArrays[$e],$e);p.justReloaded=!1}storeCollisionData(e,s,c,p,g,b){if(c.textBox||c.iconBox){let T,S;this.collisionBoxArrays.has(e)?T=this.collisionBoxArrays.get(e):(T=new Map,this.collisionBoxArrays.set(e,T)),T.has(s)?S=T.get(s):(S={text:null,icon:null},T.set(s,S)),c.textBox&&(S.text=p.box),c.iconBox&&(S.icon=g.box)}if(b){let T=this.collisionCircleArrays[e];T===void 0&&(T=this.collisionCircleArrays[e]=[]);for(let S=0;S<b.circles.length;S+=4)T.push(b.circles[S+0]-Xi),T.push(b.circles[S+1]-Xi),T.push(b.circles[S+2]),T.push(b.collisionDetected?1:0)}}markUsedJustification(e,s,c,p){let g;g=p===a.ao.vertical?c.verticalPlacedTextSymbolIndex:{left:c.leftJustifiedTextSymbolIndex,center:c.centerJustifiedTextSymbolIndex,right:c.rightJustifiedTextSymbolIndex}[a.aG(s)];const b=[c.leftJustifiedTextSymbolIndex,c.centerJustifiedTextSymbolIndex,c.rightJustifiedTextSymbolIndex,c.verticalPlacedTextSymbolIndex];for(const T of b)T>=0&&(e.text.placedSymbolArray.get(T).crossTileID=g>=0&&T!==g?0:c.crossTileID)}markUsedOrientation(e,s,c){const p=s===a.ao.horizontal||s===a.ao.horizontalOnly?s:0,g=s===a.ao.vertical?s:0,b=[c.leftJustifiedTextSymbolIndex,c.centerJustifiedTextSymbolIndex,c.rightJustifiedTextSymbolIndex];for(const T of b)e.text.placedSymbolArray.get(T).placedOrientation=p;c.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(c.verticalPlacedTextSymbolIndex).placedOrientation=g)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const s=this.prevPlacement;let c=!1;this.prevZoomAdjustment=s?s.zoomAdjustment(this.transform.zoom):0;const p=s?s.symbolFadeChange(e):1,g=s?s.opacities:{},b=s?s.variableOffsets:{},T=s?s.placedOrientations:{};for(const S in this.placements){const C=this.placements[S],E=g[S];E?(this.opacities[S]=new Ti(E,p,C.text,C.icon),c=c||C.text!==E.text.placed||C.icon!==E.icon.placed):(this.opacities[S]=new Ti(null,p,C.text,C.icon,C.skipFade),c=c||C.text||C.icon)}for(const S in g){const C=g[S];if(!this.opacities[S]){const E=new Ti(C,p,!1,!1);E.isHidden()||(this.opacities[S]=E,c=c||C.text.placed||C.icon.placed)}}for(const S in b)this.variableOffsets[S]||!this.opacities[S]||this.opacities[S].isHidden()||(this.variableOffsets[S]=b[S]);for(const S in T)this.placedOrientations[S]||!this.opacities[S]||this.opacities[S].isHidden()||(this.placedOrientations[S]=T[S]);if(s&&s.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");c?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=s?s.lastPlacementChangeTime:e)}updateLayerOpacities(e,s){const c={};for(const p of s){const g=p.getBucket(e);g&&p.latestFeatureIndex&&e.id===g.layerIds[0]&&this.updateBucketOpacities(g,p.tileID,c,p.collisionBoxArray)}}updateBucketOpacities(e,s,c,p){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const g=e.layers[0],b=g.layout,T=new Ti(null,0,!1,!1,!0),S=b.get("text-allow-overlap"),C=b.get("icon-allow-overlap"),E=g._unevaluatedLayout.hasValue("text-variable-anchor")||g._unevaluatedLayout.hasValue("text-variable-anchor-offset"),j=b.get("text-rotation-alignment")==="map",A=b.get("text-pitch-alignment")==="map",R=b.get("icon-text-fit")!=="none",V=new Ti(null,0,S&&(C||!e.hasIconData()||b.get("icon-optional")),C&&(S||!e.hasTextData()||b.get("text-optional")),!0);!e.collisionArrays&&p&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(p);const Y=(J,Q,ne)=>{for(let te=0;te<Q/4;te++)J.opacityVertexArray.emplaceBack(ne);J.hasVisibleVertices=J.hasVisibleVertices||ne!==Oo},X=this.collisionBoxArrays.get(e.bucketInstanceId);for(let J=0;J<e.symbolInstances.length;J++){const Q=e.symbolInstances.get(J),{numHorizontalGlyphVertices:ne,numVerticalGlyphVertices:te,crossTileID:le}=Q;let pe=this.opacities[le];c[le]?pe=T:pe||(pe=V,this.opacities[le]=pe),c[le]=!0;const ie=Q.numIconVertices>0,me=this.placedOrientations[Q.crossTileID],Oe=me===a.ao.vertical,ve=me===a.ao.horizontal||me===a.ao.horizontalOnly;if(ne>0||te>0){const Se=Rc(pe.text);Y(e.text,ne,Oe?Oo:Se),Y(e.text,te,ve?Oo:Se);const Je=pe.text.isHidden();[Q.rightJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.leftJustifiedTextSymbolIndex].forEach((bt=>{bt>=0&&(e.text.placedSymbolArray.get(bt).hidden=Je||Oe?1:0)})),Q.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).hidden=Je||ve?1:0);const Ze=this.variableOffsets[Q.crossTileID];Ze&&this.markUsedJustification(e,Ze.anchor,Q,me);const $e=this.placedOrientations[Q.crossTileID];$e&&(this.markUsedJustification(e,"left",Q,$e),this.markUsedOrientation(e,$e,Q))}if(ie){const Se=Rc(pe.icon),Je=!(R&&Q.verticalPlacedIconSymbolIndex&&Oe);Q.placedIconSymbolIndex>=0&&(Y(e.icon,Q.numIconVertices,Je?Se:Oo),e.icon.placedSymbolArray.get(Q.placedIconSymbolIndex).hidden=pe.icon.isHidden()),Q.verticalPlacedIconSymbolIndex>=0&&(Y(e.icon,Q.numVerticalIconVertices,Je?Oo:Se),e.icon.placedSymbolArray.get(Q.verticalPlacedIconSymbolIndex).hidden=pe.icon.isHidden())}const we=X&&X.has(J)?X.get(J):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const Se=e.collisionArrays[J];if(Se){let Je=new a.P(0,0);if(Se.textBox||Se.verticalTextBox){let Ze=!0;if(E){const $e=this.variableOffsets[le];$e?(Je=Bs($e.anchor,$e.width,$e.height,$e.textOffset,$e.textBoxScale),j&&Je._rotate(A?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Ze=!1}if(Se.textBox||Se.verticalTextBox){let $e;Se.textBox&&($e=Oe),Se.verticalTextBox&&($e=ve),kc(e.textCollisionBox.collisionVertexArray,pe.text.placed,!Ze||$e,we.text,Je.x,Je.y)}}if(Se.iconBox||Se.verticalIconBox){const Ze=!!(!ve&&Se.verticalIconBox);let $e;Se.iconBox&&($e=Ze),Se.verticalIconBox&&($e=!Ze),kc(e.iconCollisionBox.collisionVertexArray,pe.icon.placed,$e,we.icon,R?Je.x:0,R?Je.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,s){const c=this.zoomAtLastRecencyCheck===s?1-this.zoomAdjustment(s):1;return this.zoomAtLastRecencyCheck=s,this.commitTime+this.fadeDuration*c>e}setStale(){this.stale=!0}}function kc(f,e,s,c,p,g){c&&c.length!==0||(c=[0,0,0,0]);const b=c[0]-Xi,T=c[1]-Xi,S=c[2]-Xi,C=c[3]-Xi;f.emplaceBack(e?1:0,s?1:0,p||0,g||0,b,T),f.emplaceBack(e?1:0,s?1:0,p||0,g||0,S,T),f.emplaceBack(e?1:0,s?1:0,p||0,g||0,S,C),f.emplaceBack(e?1:0,s?1:0,p||0,g||0,b,C)}const Vh=Math.pow(2,25),Gh=Math.pow(2,24),So=Math.pow(2,17),Hh=Math.pow(2,16),cf=Math.pow(2,9),uf=Math.pow(2,8),hf=Math.pow(2,1);function Rc(f){if(f.opacity===0&&!f.placed)return 0;if(f.opacity===1&&f.placed)return 4294967295;const e=f.placed?1:0,s=Math.floor(127*f.opacity);return s*Vh+e*Gh+s*So+e*Hh+s*cf+e*uf+s*hf+e}const Oo=0;class Dc{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,s,c,p,g){const b=this._bucketParts;for(;this._currentTileIndex<e.length;)if(s.getBucketParts(b,p,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,g())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,b.sort(((T,S)=>T.sortKey-S.sortKey)));this._currentPartIndex<b.length;)if(s.placeLayerBucketPart(b[this._currentPartIndex],this._seenCrossTileIDs,c),this._currentPartIndex++,g())return!0;return!1}}class Lc{constructor(e,s,c,p,g,b,T,S){this.placement=new Ts(e,s,b,T,S),this._currentPlacementIndex=c.length-1,this._forceFullPlacement=p,this._showCollisionBoxes=g,this._done=!1}isDone(){return this._done}continuePlacement(e,s,c){const p=W.now(),g=()=>!this._forceFullPlacement&&W.now()-p>2;for(;this._currentPlacementIndex>=0;){const b=s[e[this._currentPlacementIndex]],T=this.placement.collisionIndex.transform.zoom;if(b.type==="symbol"&&(!b.minzoom||b.minzoom<=T)&&(!b.maxzoom||b.maxzoom>T)){if(this._inProgressLayer||(this._inProgressLayer=new Dc(b)),this._inProgressLayer.continuePlacement(c[b.source],this.placement,this._showCollisionBoxes,b,g))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Po=512/a.$/2;class zc{constructor(e,s,c){this.tileID=e,this.bucketInstanceId=c,this._symbolsByKey={};const p=new Map;for(let g=0;g<s.length;g++){const b=s.get(g),T=b.key,S=p.get(T);S?S.push(b):p.set(T,[b])}for(const[g,b]of p){const T={positions:b.map((S=>({x:Math.floor(S.anchorX*Po),y:Math.floor(S.anchorY*Po)}))),crossTileIDs:b.map((S=>S.crossTileID))};if(T.positions.length>128){const S=new a.aI(T.positions.length,16,Uint16Array);for(const{x:C,y:E}of T.positions)S.add(C,E);S.finish(),delete T.positions,T.index=S}this._symbolsByKey[g]=T}}getScaledCoordinates(e,s){const{x:c,y:p,z:g}=this.tileID.canonical,{x:b,y:T,z:S}=s.canonical,C=Po/Math.pow(2,S-g),E=(T*a.$+e.anchorY)*C,j=p*a.$*Po;return{x:Math.floor((b*a.$+e.anchorX)*C-c*a.$*Po),y:Math.floor(E-j)}}findMatches(e,s,c){const p=this.tileID.canonical.z<s.canonical.z?1:Math.pow(2,this.tileID.canonical.z-s.canonical.z);for(let g=0;g<e.length;g++){const b=e.get(g);if(b.crossTileID)continue;const T=this._symbolsByKey[b.key];if(!T)continue;const S=this.getScaledCoordinates(b,s);if(T.index){const C=T.index.range(S.x-p,S.y-p,S.x+p,S.y+p).sort();for(const E of C){const j=T.crossTileIDs[E];if(!c[j]){c[j]=!0,b.crossTileID=j;break}}}else if(T.positions)for(let C=0;C<T.positions.length;C++){const E=T.positions[C],j=T.crossTileIDs[C];if(Math.abs(E.x-S.x)<=p&&Math.abs(E.y-S.y)<=p&&!c[j]){c[j]=!0,b.crossTileID=j;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map((({crossTileIDs:e})=>e))}}class Fc{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class pf{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const s=Math.round((e-this.lng)/360);if(s!==0)for(const c in this.indexes){const p=this.indexes[c],g={};for(const b in p){const T=p[b];T.tileID=T.tileID.unwrapTo(T.tileID.wrap+s),g[T.tileID.key]=T}this.indexes[c]=g}this.lng=e}addBucket(e,s,c){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===s.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let g=0;g<s.symbolInstances.length;g++)s.symbolInstances.get(g).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const p=this.usedCrossTileIDs[e.overscaledZ];for(const g in this.indexes){const b=this.indexes[g];if(Number(g)>e.overscaledZ)for(const T in b){const S=b[T];S.tileID.isChildOf(e)&&S.findMatches(s.symbolInstances,e,p)}else{const T=b[e.scaledTo(Number(g)).key];T&&T.findMatches(s.symbolInstances,e,p)}}for(let g=0;g<s.symbolInstances.length;g++){const b=s.symbolInstances.get(g);b.crossTileID||(b.crossTileID=c.generate(),p[b.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new zc(e,s.symbolInstances,s.bucketInstanceId),!0}removeBucketCrossTileIDs(e,s){for(const c of s.getCrossTileIDsLists())for(const p of c)delete this.usedCrossTileIDs[e][p]}removeStaleBuckets(e){let s=!1;for(const c in this.indexes){const p=this.indexes[c];for(const g in p)e[p[g].bucketInstanceId]||(this.removeBucketCrossTileIDs(c,p[g]),delete p[g],s=!0)}return s}}class Co{constructor(){this.layerIndexes={},this.crossTileIDs=new Fc,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,s,c){let p=this.layerIndexes[e.id];p===void 0&&(p=this.layerIndexes[e.id]=new pf);let g=!1;const b={};p.handleWrapJump(c);for(const T of s){const S=T.getBucket(e);S&&e.id===S.layerIds[0]&&(S.bucketInstanceId||(S.bucketInstanceId=++this.maxBucketInstanceId),p.addBucket(T.tileID,S,this.crossTileIDs)&&(g=!0),b[S.bucketInstanceId]=!0)}return p.removeStaleBuckets(b)&&(g=!0),g}pruneUnusedLayers(e){const s={};e.forEach((c=>
92{s[c]=!0}));for(const c in this.layerIndexes)s[c]||delete this.layerIndexes[c]}}var da="void main() {fragColor=vec4(1.0);}";const gn={prelude:ii(`#ifdef GL_ES
93precision mediump float;
94#else
95#if !defined(lowp)
96#define lowp
97#endif
98#if !defined(mediump)
99#define mediump
100#endif
101#if !defined(highp)
102#define highp
103#endif
104#endif
105out highp vec4 fragColor;`,`#ifdef GL_ES
106precision highp float;
107#else
108#if !defined(lowp)
109#define lowp
110#endif
111#if !defined(mediump)
112#define mediump
113#endif
114#if !defined(highp)
115#define highp
116#endif
117#endif
118vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
119);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+      c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+    c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+    c
120);}
121#ifdef TERRAIN3D
122uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
123#endif
124const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
125#ifdef TERRAIN3D
126highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
127#else
128return 1.0;
129#endif
130}float calculate_visibility(vec4 pos) {
131#ifdef TERRAIN3D
132vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
133#else
134return 1.0;
135#endif
136}float ele(vec2 pos) {
137#ifdef TERRAIN3D
138vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
139#else
140return 0.0;
141#endif
142}float get_elevation(vec2 pos) {
143#ifdef TERRAIN3D
144#ifdef GLOBE
145if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
146#endif
147vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
148#else
149return 0.0;
150#endif
151}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:ii("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:ii("",`#define GLOBE_RADIUS 6371008.8
152uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
153);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); 
154if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
155);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:ii(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
156#ifdef OVERDRAW_INSPECTOR
157fragColor=vec4(1.0);
158#endif
159}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:ii(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;
159uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
160#ifdef OVERDRAW_INSPECTOR
161fragColor=vec4(1.0);
162#endif
163}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ii(`in vec3 v_data;in float v_visibility;
164#pragma mapbox: define highp vec4 color
165#pragma mapbox: define mediump float radius
166#pragma mapbox: define lowp float blur
167#pragma mapbox: define lowp float opacity
168#pragma mapbox: define highp vec4 stroke_color
169#pragma mapbox: define mediump float stroke_width
170#pragma mapbox: define lowp float stroke_opacity
171void main() {
172#pragma mapbox: initialize highp vec4 color
173#pragma mapbox: initialize mediump float radius
174#pragma mapbox: initialize lowp float blur
175#pragma mapbox: initialize lowp float opacity
176#pragma mapbox: initialize highp vec4 stroke_color
177#pragma mapbox: initialize mediump float stroke_width
178#pragma mapbox: initialize lowp float stroke_opacity
179vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
180#ifdef OVERDRAW_INSPECTOR
181fragColor=vec4(1.0);
182#endif
183}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
184#pragma mapbox: define highp vec4 color
185#pragma mapbox: define mediump float radius
186#pragma mapbox: define lowp float blur
187#pragma mapbox: define lowp float opacity
188#pragma mapbox: define highp vec4 stroke_color
189#pragma mapbox: define mediump float stroke_width
190#pragma mapbox: define lowp float stroke_opacity
191void main(void) {
192#pragma mapbox: initialize highp vec4 color
193#pragma mapbox: initialize mediump float radius
194#pragma mapbox: initialize lowp float blur
195#pragma mapbox: initialize lowp float opacity
196#pragma mapbox: initialize highp vec4 stroke_color
197#pragma mapbox: initialize mediump float stroke_width
198#pragma mapbox: initialize lowp float stroke_opacity
199vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
200#ifdef GLOBE
201vec3 center_vector=projectToSphere(circle_center);
202#endif
203float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
204#ifdef GLOBE
205vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
206#else
207vec4 projected_center=projectTileWithElevation(circle_center,ele);
208#endif
209corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
210#ifdef GLOBE
211vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
212#else
213gl_Position=projectTileWithElevation(corner_position,ele);
214#endif
215} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ii(da,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ii(`uniform highp float u_intensity;in vec2 v_extrude;
216#pragma mapbox: define highp float weight
217#define GAUSS_COEF 0.3989422804014327
218void main() {
219#pragma mapbox: initialize highp float weight
220float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
221#ifdef OVERDRAW_INSPECTOR
222fragColor=vec4(1.0);
223#endif
224}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
225#pragma mapbox: define highp float weight
226#pragma mapbox: define mediump float radius
227const highp float ZERO=1.0/255.0/16.0;
228#define GAUSS_COEF 0.3989422804014327
229void main(void) {
230#pragma mapbox: initialize highp float weight
231#pragma mapbox: initialize mediump float radius
232vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
233#ifdef GLOBE
234vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
235#else
236gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
237#endif
238}`),heatmapTexture:ii(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
239#ifdef OVERDRAW_INSPECTOR
240fragColor=vec4(0.0);
241#endif
242}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ii("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ii("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:ii(`#ifdef GL_ES
243precision highp float;
244#endif
245uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else
246{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));
247#ifdef OVERDRAW_INSPECTOR
248fragColor=vec4(1.0);
249#endif
250}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:ii("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ii(da,`in vec2 a_pos;void main() {
251#ifdef GLOBE
252gl_Position=projectTileFor3D(a_pos,0.0);
253#else
254gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
255#endif
256}`),fill:ii(`#pragma mapbox: define highp vec4 color
257#pragma mapbox: define lowp float opacity
258void main() {
259#pragma mapbox: initialize highp vec4 color
260#pragma mapbox: initialize lowp float opacity
261fragColor=color*opacity;
262#ifdef OVERDRAW_INSPECTOR
263fragColor=vec4(1.0);
264#endif
265}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
266#pragma mapbox: define highp vec4 color
267#pragma mapbox: define lowp float opacity
268void main() {
269#pragma mapbox: initialize highp vec4 color
270#pragma mapbox: initialize lowp float opacity
271gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:ii(`in vec2 v_pos;
272#ifdef GLOBE
273in float v_depth;
274#endif
275#pragma mapbox: define highp vec4 outline_color
276#pragma mapbox: define lowp float opacity
277void main() {
278#pragma mapbox: initialize highp vec4 outline_color
279#pragma mapbox: initialize lowp float opacity
280float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
281#ifdef GLOBE
282if (v_depth > 1.0) {discard;}
283#endif
284#ifdef OVERDRAW_INSPECTOR
285fragColor=vec4(1.0);
286#endif
287}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
288#ifdef GLOBE
289out float v_depth;
290#endif
291#pragma mapbox: define highp vec4 outline_color
292#pragma mapbox: define lowp float opacity
293void main() {
294#pragma mapbox: initialize highp vec4 outline_color
295#pragma mapbox: initialize lowp float opacity
296gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
297#ifdef GLOBE
298v_depth=gl_Position.z/gl_Position.w;
299#endif
300}`),fillOutlinePattern:ii(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
301#ifdef GLOBE
302in float v_depth;
303#endif
304#pragma mapbox: define lowp float opacity
305#pragma mapbox: define lowp vec4 pattern_from
306#pragma mapbox: define lowp vec4 pattern_to
307void main() {
308#pragma mapbox: initialize lowp float opacity
309#pragma mapbox: initialize mediump vec4 pattern_from
310#pragma mapbox: initialize mediump vec4 pattern_to
311vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
312#ifdef GLOBE
313if (v_depth > 1.0) {discard;}
314#endif
315#ifdef OVERDRAW_INSPECTOR
316fragColor=vec4(1.0);
317#endif
318}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
319#ifdef GLOBE
320out float v_depth;
321#endif
322#pragma mapbox: define lowp float opacity
323#pragma mapbox: define lowp vec4 pattern_from
324#pragma mapbox: define lowp vec4 pattern_to
325#pragma mapbox: define lowp float pixel_ratio_from
326#pragma mapbox: define lowp float pixel_ratio_to
327void main() {
328#pragma mapbox: initialize lowp float opacity
329#pragma mapbox: initialize mediump vec4 pattern_from
330#pragma mapbox: initialize mediump vec4 pattern_to
331#pragma mapbox: initialize lowp float pixel_ratio_from
332#pragma mapbox: initialize lowp float pixel_ratio_to
333vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
334#ifdef GLOBE
335v_depth=gl_Position.z/gl_Position.w;
336#endif
337}`),fillPattern:ii(`#ifdef GL_ES
338precision highp float;
339#endif
340uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
341#pragma mapbox: define lowp float opacity
342#pragma mapbox: define lowp vec4 pattern_from
343#pragma mapbox: define lowp vec4 pattern_to
344void main() {
345#pragma mapbox: initialize lowp float opacity
346#pragma mapbox: initialize mediump vec4 pattern_from
347#pragma mapbox: initialize mediump vec4 pattern_to
348vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
349#ifdef OVERDRAW_INSPECTOR
350fragColor=vec4(1.0);
351#endif
352}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
353#pragma mapbox: define lowp float opacity
354#pragma mapbox: define lowp vec4 pattern_from
355#pragma mapbox: define lowp vec4 pattern_to
356#pragma mapbox: define lowp float pixel_ratio_from
357#pragma mapbox: define lowp float pixel_ratio_to
358void main() {
359#pragma mapbox: initialize lowp float opacity
360#pragma mapbox: initialize mediump vec4 pattern_from
361#pragma mapbox: initialize mediump vec4 pattern_to
362#pragma mapbox: initialize lowp float pixel_ratio_from
363#pragma mapbox: initialize lowp float pixel_ratio_to
364vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_siz
364e_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:ii(`in vec4 v_color;void main() {fragColor=v_color;
365#ifdef OVERDRAW_INSPECTOR
366fragColor=vec4(1.0);
367#endif
368}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
369#ifdef TERRAIN3D
370in vec2 a_centroid;
371#endif
372out vec4 v_color;
373#pragma mapbox: define highp float base
374#pragma mapbox: define highp float height
375#pragma mapbox: define highp vec4 color
376void main() {
377#pragma mapbox: initialize highp float base
378#pragma mapbox: initialize highp float height
379#pragma mapbox: initialize highp vec4 color
380vec3 normal=a_normal_ed.xyz;
381#ifdef TERRAIN3D
382float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
383#else
384float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
385#endif
386base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
387#ifdef GLOBE
388vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
389#else
390gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
391#endif
392float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
393#ifdef GLOBE
394mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
395#endif
396directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:ii(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
397#pragma mapbox: define lowp float base
398#pragma mapbox: define lowp float height
399#pragma mapbox: define lowp vec4 pattern_from
400#pragma mapbox: define lowp vec4 pattern_to
401#pragma mapbox: define lowp float pixel_ratio_from
402#pragma mapbox: define lowp float pixel_ratio_to
403void main() {
404#pragma mapbox: initialize lowp float base
405#pragma mapbox: initialize lowp float height
406#pragma mapbox: initialize mediump vec4 pattern_from
407#pragma mapbox: initialize mediump vec4 pattern_to
408#pragma mapbox: initialize lowp float pixel_ratio_from
409#pragma mapbox: initialize lowp float pixel_ratio_to
410vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
411#ifdef OVERDRAW_INSPECTOR
412fragColor=vec4(1.0);
413#endif
414}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
415#ifdef TERRAIN3D
416in vec2 a_centroid;
417#endif
418#ifdef GLOBE
419out vec3 v_sphere_pos;
420#endif
421out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
422#pragma mapbox: define lowp float base
423#pragma mapbox: define lowp float height
424#pragma mapbox: define lowp vec4 pattern_from
425#pragma mapbox: define lowp vec4 pattern_to
426#pragma mapbox: define lowp float pixel_ratio_from
427#pragma mapbox: define lowp float pixel_ratio_to
428void main() {
429#pragma mapbox: initialize lowp float base
430#pragma mapbox: initialize lowp float height
431#pragma mapbox: initialize mediump vec4 pattern_from
432#pragma mapbox: initialize mediump vec4 pattern_to
433#pragma mapbox: initialize lowp float pixel_ratio_from
434#pragma mapbox: initialize lowp float pixel_ratio_to
435vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
436#ifdef TERRAIN3D
437float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
438#else
439float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
440#endif
441base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
442#ifdef GLOBE
443vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
444#else
445gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
446#endif
447vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
448? a_pos
449: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:ii(`#ifdef GL_ES
450precision highp float;
451#endif
452uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/p
452ow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
453#ifdef OVERDRAW_INSPECTOR
454fragColor=vec4(1.0);
455#endif
456}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ii(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
457#define PI 3.141592653589793
458#define STANDARD 0
459#define COMBINED 1
460#define IGOR 2
461#define MULTIDIRECTIONAL 3
462#define BASIC 4
463float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
464{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
465{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}
466#ifdef OVERDRAW_INSPECTOR
467fragColor=vec4(1.0);
468#endif
469}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:ii(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
470#ifdef GLOBE
471in float v_depth;
472#endif
473#pragma mapbox: define highp vec4 color
474#pragma mapbox: define lowp float blur
475#pragma mapbox: define lowp float opacity
476void main() {
477#pragma mapbox: initialize highp vec4 color
478#pragma mapbox: initialize lowp float blur
479#pragma mapbox: initialize lowp float opacity
480float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
481#ifdef GLOBE
482if (v_depth > 1.0) {discard;}
483#endif
484#ifdef OVERDRAW_INSPECTOR
485fragColor=vec4(1.0);
486#endif
487}`,`
488#define scale 0.015873016
489in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
490#ifdef GLOBE
491out float v_depth;
492#endif
493#pragma mapbox: define highp vec4 color
494#pragma mapbox: define lowp float blur
495#pragma mapbox: define lowp float opacity
496#pragma mapbox: define mediump float gapwidth
497#pragma mapbox: define lowp float offset
498#pragma mapbox: define mediump float width
499void main() {
500#pragma mapbox: initialize highp vec4 color
501#pragma mapbox: initialize lowp float blur
502#pragma mapbox: initialize lowp float opacity
503#pragma mapbox: initialize mediump float gapwidth
504#pragma mapbox: initialize lowp float offset
505#pragma mapbox: initialize mediump float width
506float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
506float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
507#ifdef GLOBE
508v_depth=gl_Position.z/gl_Position.w;
509#endif
510#ifdef TERRAIN3D
511v_gamma_scale=1.0;
512#else
513float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
514#endif
515v_width2=vec2(outset,inset);}`),lineGradient:ii(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
516#ifdef GLOBE
517in float v_depth;
518#endif
519#pragma mapbox: define lowp float blur
520#pragma mapbox: define lowp float opacity
521void main() {
522#pragma mapbox: initialize lowp float blur
523#pragma mapbox: initialize lowp float opacity
524float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
525#ifdef GLOBE
526if (v_depth > 1.0) {discard;}
527#endif
528#ifdef OVERDRAW_INSPECTOR
529fragColor=vec4(1.0);
530#endif
531}`,`
532#define scale 0.015873016
533in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
534#ifdef GLOBE
535out float v_depth;
536#endif
537#pragma mapbox: define lowp float blur
538#pragma mapbox: define lowp float opacity
539#pragma mapbox: define mediump float gapwidth
540#pragma mapbox: define lowp float offset
541#pragma mapbox: define mediump float width
542void main() {
543#pragma mapbox: initialize lowp float blur
544#pragma mapbox: initialize lowp float opacity
545#pragma mapbox: initialize mediump float gapwidth
546#pragma mapbox: initialize lowp float offset
547#pragma mapbox: initialize mediump float width
548float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
549#ifdef GLOBE
550v_depth=gl_Position.z/gl_Position.w;
551#endif
552#ifdef TERRAIN3D
553v_gamma_scale=1.0;
554#else
555float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
556#endif
557v_width2=vec2(outset,inset);}`),linePattern:ii(`#ifdef GL_ES
558precision highp float;
559#endif
560uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
561#ifdef GLOBE
562in float v_depth;
563#endif
564#pragma mapbox: define lowp vec4 pattern_from
565#pragma mapbox: define lowp vec4 pattern_to
566#pragma mapbox: define lowp float pixel_ratio_from
567#pragma mapbox: define lowp float pixel_ratio_to
568#pragma mapbox: define lowp float blur
569#pragma mapbox: define lowp float opacity
570void main() {
571#pragma mapbox: initialize mediump vec4 pattern_from
572#pragma mapbox: initialize mediump vec4 pattern_to
573#pragma mapbox: initialize lowp float pixel_ratio_from
574#pragma mapbox: initialize lowp float pixel_ratio_to
575#pragma mapbox: initialize lowp float blur
576#pragma mapbox: initialize lowp float opacity
577vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
578#ifdef GLOBE
579if (v_depth > 1.0) {discard;}
580#endif
581#ifdef OVERDRAW_INSPECTOR
582fragColor=vec4(1.0);
583#endif
584}`,`
585#define scale 0.015873016
586#define LINE_DISTANCE_SCALE 2.0
587in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
588#ifdef GLOBE
589out float v_depth;
590#endif
591#pragma mapbox: define lowp float blur
592#pragma mapbox: define lowp float opacity
593#pragma mapbox: define lowp float offset
594#pragma mapbox: define mediump float gapwidth
595#pragma mapbox: define mediump float width
596#pragma mapbox: define lowp float floorwidth
597#pragma mapbox: define lowp vec4 pattern_from
598#pragma mapbox: define lowp vec4 pattern_to
599#pragma mapbox: define lowp float pixel_ratio_from
600#pragma mapbox: define lowp float pixel_ratio_to
601void main() {
602#pragma mapbox: initialize lowp float blur
603#pragma mapbox: initialize lowp float opacity
604#pragma mapbox: initialize lowp float offset
605#pragma mapbox: initialize mediump float gapwidth
606#pragma mapbox: initialize mediump float width
607#pragma mapbox: initialize lowp float floorwidth
608#pragma mapbox: initialize mediump vec4 pattern_from
609#pragma mapbox: initialize mediump vec4 pattern_to
610#pragma mapbox: initialize lowp float pixel_ratio_from
611#pragma mapbox: initialize lowp float pixel_ratio_to
612float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
612float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
613#ifdef GLOBE
614v_depth=gl_Position.z/gl_Position.w;
615#endif
616#ifdef TERRAIN3D
617v_gamma_scale=1.0;
618#else
619float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
620#endif
621v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ii(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
622#ifdef GLOBE
623in float v_depth;
624#endif
625#pragma mapbox: define highp vec4 color
626#pragma mapbox: define lowp float blur
627#pragma mapbox: define lowp float opacity
628#pragma mapbox: define mediump float width
629#pragma mapbox: define lowp float floorwidth
630void main() {
631#pragma mapbox: initialize highp vec4 color
632#pragma mapbox: initialize lowp float blur
633#pragma mapbox: initialize lowp float opacity
634#pragma mapbox: initialize mediump float width
635#pragma mapbox: initialize lowp float floorwidth
636float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
637#ifdef GLOBE
638if (v_depth > 1.0) {discard;}
639#endif
640#ifdef OVERDRAW_INSPECTOR
641fragColor=vec4(1.0);
642#endif
643}`,`
644#define scale 0.015873016
645#define LINE_DISTANCE_SCALE 2.0
646in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
647#ifdef GLOBE
648out float v_depth;
649#endif
650#pragma mapbox: define highp vec4 color
651#pragma mapbox: define lowp float blur
652#pragma mapbox: define lowp float opacity
653#pragma mapbox: define mediump float gapwidth
654#pragma mapbox: define lowp float offset
655#pragma mapbox: define mediump float width
656#pragma mapbox: define lowp float floorwidth
657void main() {
658#pragma mapbox: initialize highp vec4 color
659#pragma mapbox: initialize lowp float blur
660#pragma mapbox: initialize lowp float opacity
661#pragma mapbox: initialize mediump float gapwidth
662#pragma mapbox: initialize lowp float offset
663#pragma mapbox: initialize mediump float width
664#pragma mapbox: initialize lowp float floorwidth
665float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
666#ifdef GLOBE
667v_depth=gl_Position.z/gl_Position.w;
668#endif
669#ifdef TERRAIN3D
670v_gamma_scale=1.0;
671#else
672float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
673#endif
674v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:ii(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
675#ifdef OVERDRAW_INSPECTOR
676fragColor=vec4(1.0);
677#endif
678}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
679#ifdef GLOBE
680if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
681#endif
682v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:ii(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
683#pragma mapbox: define lowp float opacity
684void main() {
685#pragma mapbox: initialize lowp float opacity
686lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
687#ifdef OVERDRAW_INSPECTOR
688fragColor=vec4(1.0);
689#endif
690}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;
691#pragma mapbox: define lowp float opacity
692void main() {
693#pragma mapbox: initialize lowp float opacity
694vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
695camera_to_anchor_distance/u_camera_to_center_distance :
696u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
697#ifdef GLOBE
698if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
699#endif
700vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:ii(`#define SDF_PX 8.0
701uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
702#pragma mapbox: define highp vec4 fill_color
703#pragma mapbox: define highp vec4 halo_color
704#pragma mapbox: define lowp float opacity
705#pragma mapbox: define lowp float halo_width
706#pragma mapbox: define lowp float halo_blur
707void main() {
708#pragma mapbox: initialize highp vec4 fill_color
709#pragma mapbox: initialize highp vec4 halo_color
710#pragma mapbox: initialize lowp float opacity
711#pragma mapbox: initialize lowp float halo_width
712#pragma mapbox: initialize lowp float halo_blur
713float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);
714#ifdef OVERDRAW_INSPECTOR
715fragColor=vec4(1.0);
716#endif
717}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
718#pragma mapbox: define highp vec4 fill_color
719#pragma mapbox: define highp vec4 halo_color
720#pragma mapbox: define lowp float opacity
721#pragma mapbox: define lowp float halo_width
722#pragma mapbox: define lowp float halo_blur
723void main() {
724#pragma mapbox: initialize highp vec4 fill_color
725#pragma mapbox: initialize highp vec4 halo_color
726#pragma mapbox: initialize lowp float opacity
727#pragma mapbox: initialize lowp float halo_width
728#pragma mapbox: initialize lowp float halo_blur
729vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
730camera_to_anchor_distance/u_camera_to_center_distance :
731u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
732#ifdef GLOBE
733if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
734#endif
735vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:ii(`#define SDF_PX 8.0
736#define SDF 1.0
737#define ICON 0.0
738uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;
739#pragma mapbox: define highp vec4 fill_color
740#pragma mapbox: define highp vec4 halo_color
741#pragma mapbox: define lowp float opacity
742#pragma mapbox: define lowp float halo_width
743#pragma mapbox: define lowp float halo_blur
744void main() {
745#pragma mapbox: initialize highp vec4 fill_color
746#pragma mapbox: initialize highp vec4 halo_color
747#pragma mapbox: initialize lowp float opacity
748#pragma mapbox: initialize lowp float halo_width
749#pragma mapbox: initialize lowp float halo_blur
750float fad
750e_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
751#ifdef OVERDRAW_INSPECTOR
752fragColor=vec4(1.0);
753#endif
754return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
755#ifdef OVERDRAW_INSPECTOR
756fragColor=vec4(1.0);
757#endif
758}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
759#pragma mapbox: define highp vec4 fill_color
760#pragma mapbox: define highp vec4 halo_color
761#pragma mapbox: define lowp float opacity
762#pragma mapbox: define lowp float halo_width
763#pragma mapbox: define lowp float halo_blur
764void main() {
765#pragma mapbox: initialize highp vec4 fill_color
766#pragma mapbox: initialize highp vec4 halo_color
767#pragma mapbox: initialize lowp float opacity
768#pragma mapbox: initialize lowp float halo_width
769#pragma mapbox: initialize lowp float halo_blur
770vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
771camera_to_anchor_distance/u_camera_to_center_distance :
772u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
773#ifdef GLOBE
774if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
775#endif
776vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:ii("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
776float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ii("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ii("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:ii("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:ii(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
777);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:ii("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};
vendor: 28,404 bytes, lines 777-826
777function ii(f,e){const s=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,c=e.match(/in ([\w]+) ([\w]+)/g),p=f.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),b=g?g.concat(p):p,T={};return{fragmentSource:f=f.replace(s,((S,C,E,j,A)=>(T[A]=!0,C==="define"?`
778#ifndef HAS_UNIFORM_u_${A}
779in ${E} ${j} ${A};
780#else
781uniform ${E} ${j} u_${A};
782#endif
783`:`
784#ifdef HAS_UNIFORM_u_${A}
785    ${E} ${j} ${A} = u_${A};
786#endif
787`))),vertexSource:e=e.replace(s,((S,C,E,j,A)=>{const R=j==="float"?"vec2":"vec4",V=A.match(/color/)?"color":R;return T[A]?C==="define"?`
788#ifndef HAS_UNIFORM_u_${A}
789uniform lowp float u_${A}_t;
790in ${E} ${R} a_${A};
791out ${E} ${j} ${A};
792#else
793uniform ${E} ${j} u_${A};
794#endif
795`:V==="vec4"?`
796#ifndef HAS_UNIFORM_u_${A}
797    ${A} = a_${A};
798#else
799    ${E} ${j} ${A} = u_${A};
800#endif
801`:`
802#ifndef HAS_UNIFORM_u_${A}
803    ${A} = unpack_mix_${V}(a_${A}, u_${A}_t);
804#else
805    ${E} ${j} ${A} = u_${A};
806#endif
807`:C==="define"?`
808#ifndef HAS_UNIFORM_u_${A}
809uniform lowp float u_${A}_t;
810in ${E} ${R} a_${A};
811#else
812uniform ${E} ${j} u_${A};
813#endif
814`:V==="vec4"?`
815#ifndef HAS_UNIFORM_u_${A}
816    ${E} ${j} ${A} = a_${A};
817#else
818    ${E} ${j} ${A} = u_${A};
819#endif
820`:`
821#ifndef HAS_UNIFORM_u_${A}
822    ${E} ${j} ${A} = unpack_mix_${V}(a_${A}, u_${A}_t);
823#else
824    ${E} ${j} ${A} = u_${A};
825#endif
826`})),staticAttributes:c,staticUniforms:b}}class Us{constructor(e,s,c){this.vertexBuffer=e,this.indexBuffer=s,this.segments=c}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Ss=a.aJ([{name:"a_pos",type:"Int16",components:2}]);const is="#define PROJECTION_MERCATOR",Vs="mercator";class ri{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Vs}get shaderDefine(){return is}get shaderPreludeCode(){return gn.projectionMercator}get vertexShaderPreludeCode(){return gn.projectionMercator.vertexSource}get subdivisionGranularity(){return a.aK.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,s,c,p,g){if(this._cachedMesh)return this._cachedMesh;const b=new a.aL;b.emplaceBack(0,0),b.emplaceBack(a.$,0),b.emplaceBack(0,a.$),b.emplaceBack(a.$,a.$);const T=e.createVertexBuffer(b,Ss.members),S=a.aM.simpleSegment(0,0,4,2),C=new a.aN;C.emplaceBack(1,0,2),C.emplaceBack(1,2,3);const E=e.createIndexBuffer(C);return this._cachedMesh=new Us(T,E,S),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class Gs{constructor(e=0,s=0,c=0,p=0){if(isNaN(e)||e<0||isNaN(s)||s<0||isNaN(c)||c<0||isNaN(p)||p<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=s,this.left=c,this.right=p}interpolate(e,s,c){return s.top!=null&&e.top!=null&&(this.top=a.C.number(e.top,s.top,c)),s.bottom!=null&&e.bottom!=null&&(this.bottom=a.C.number(e.bottom,s.bottom,c)),s.left!=null&&e.left!=null&&(this.left=a.C.number(e.left,s.left,c)),s.right!=null&&e.right!=null&&(this.right=a.C.number(e.right,s.right,c)),this}getCenter(e,s){const c=a.ah((this.left+e-this.right)/2,0,e),p=a.ah((this.top+s-this.bottom)/2,0,s);return new a.P(c,p)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Gs(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function ul(f,e){if(!f.renderWorldCopies||f.lngRange)return;const s=e.lng-f.center.lng;e.lng+=s>180?-360:s<-180?360:0}function hl(f){return Math.max(0,Math.floor(f))}class zr{constructor(e,s,c,p,g,b){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=b===void 0||!!b,this._minZoom=s||0,this._maxZoom=c||22,this._minPitch=p??0,this._maxPitch=g??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new a.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=hl(this._zoom),this._scale=a.af(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Gs,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,s,c){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=hl(this._zoom),this._scale=a.af(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Gs(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!c&&e.autoCalculateNearFarZ,s&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const s=a.aO(e,-180,180)*Math.PI/180;var c,p,g,b,T,S,C,E,j;this._bearingInRadians!==s&&(this._unmodified=!1,this._bearingInRadians=s,this._calcMatrices(),this._rotationMatrix=D(),c=this._rotationMatrix,g=-this._bearingInRadians,b=(p=this._rotationMatrix)[0],T=p[1],S=p[2],C=p[3],E=Math.sin(g),j=Math.cos(g),c[0]=b*j+S*E,c[1]=T*j+C*E,c[2]=b*-E+S*j,c[3]=T*-E+C*j)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const s=a.ah(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==s&&(this._unmodified=!1,this._pitchInRadians=s,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const s=e/180*Math.PI;this._rollInRadians!==s&&(this._unmodified=!1,this._rollInRadians=s,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return a.aP(this._fovInRadians)}setFov(e){e=a.ah(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=a.ae(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){const s=this.getConstrained(this._center,e).zoom;this._zoom!==s&&(this._unmodified=!1,this._zoom=s,this._tileZoom=Math.max(0,Math.floor(s)),this._scale=a.af(s),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,s){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=s,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,s,c){this._unmodified=!1,this._edgeInsets.interpolate(e,s,c),this._constrain(),this._calcMatrices()}resize(e,s,c=!0){this._width=e,this._height=s,c&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new ae([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-a.ai,a.ai])}getConstrained(e,s){return this._callbacks.getConstrained(e,s)}getCameraQueryGeometry(e,s){if(s.length===1)return[s[0],e];{const{minX:c,minY:p,maxX:g,maxY:b}=a.a2.fromPoints(s).extend(e);return[new a.P(c,p),new a.P(g,p),new a.P(g,b),new a.P(c,b),new a.P(c,p)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:s,zoom:c}=this.getConstrained(this.center,this.zoom);this.setCenter(s),this.setZoom(c),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=a.ag(new Float64Array(16));a.N(e,e,[this._width/2,-this._height/2,1]),a.M(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=a.ag(new Float64Array(16)),a.N(e,e,[1,-1,1]),a.M(e,e,[-1,-1,0]),a.N(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,s,c,p){const g=c!==void 0?c:this.bearing,b=p=p!==void 0?p:this.pitch,T=a.a1.fromLngLat(e,s),S=-Math.cos(a.ae(b)),C=Math.sin(a.ae(b)),E=C*Math.sin(a.ae(g)),j=-C*Math.cos(a.ae(g));let A=this.elevation;const R=s-A;let V;S*R>=0||Math.abs(S)<.1?(V=1e4,A=s+V*S):V=-R/S;let Y,X,J=a.aQ(1,T.y),Q=0;do{if(Q+=1,Q>10)break;X=V/J,Y=new a.a1(T.x+E*X,T.y+j*X),J=1/Y.meterInMercatorCoordinateUnits()}while(Math.abs(V-X*J)>1e-12);return{center:Y.toLngLat(),elevation:A,zoom:a.ak(this.height/2/Math.tan(this.fovInRadians/2)/X/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const s=a.aj(1,this.center.lat)*this.worldSize,c=this.cameraToCenterDistance/s,p=a.a1.fromLngLat(this.center,this.elevation),g=xe(this.center,this.elevation,this.pitch,this.bearing,c);this._elevation=e;const b=this.calculateCenterFromCameraLngLatAlt(g.toLngLat(),a.aQ(g.z,p.y),this.bearing,this.pitch);this._elevation=b.elevation,this._center=b.center,this.setZoom(b.zoom)}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=a.aj(1,this.center.lat)*this.worldSize;return xe(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];const s=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/s,e.canonical.y/s,1/s/a.$,1/s/a.$]}}class mr{constructor(e,s){this.min=e,this.max=s,this.center=a.aR([],a.aS([],this.min,this.max),.5)}quadrant(e){const s=[e%2==0,e<2],c=a.aT(this.min),p=a.aT(this.max);for(let g=0;g<s.length;g++)c[g]=s[g]?this.min[g]:this.center[g],p[g]=s[g]?this.center[g]:this.max[g];return p[2]=this.max[2],new mr(c,p)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let s=!0;for(let c=0;c<e.planes.length;c++){const p=this.intersectsPlane(e.planes[c]);if(p===0)return 0;p===1&&(s=!1)}return s?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let s=e[3],c=e[3];for(let p=0;p<3;p++)e[p]>0?(s+=e[p]*this.min[p],c+=e[p]*this.max[p]):(c+=e[p]*this.min[p],s+=e[p]*this.max[p]);return s>=0?2:c<0?0:1}}class Fr{distanceToTile2d(e,s,c,p){const g=p.distanceX([e,s]),b=p.distanceY([e,s]);return Math.hypot(g,b)}getWrap(e,s,c){return c}getTileBoundingVolume(e,s,c,p){var g,b;let T=0,S=0;if(p?.terrain){const E=new a.Z(e.z,s,e.z,e.x,e.y),j=p.terrain.getMinMaxElevation(E);T=(g=j.minElevation)!==null&&g!==void 0?g:Math.min(0,c),S=(b=j.maxElevation)!==null&&b!==void 0?b:Math.max(0,c)}const C=1<<e.z;return new mr([s+e.x/C,e.y/C,T],[s+(e.x+1)/C,(e.y+1)/C,S])}allowVariableZoom(e,s){const c=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,p=a.ah(78.5-c/2,0,60);return!!s.terrain||e.pitch>p}allowWorldCopies(){return!0}prepareNextFrame(){}}class nr{constructor(e,s,c){this.points=e,this.planes=s,this.aabb=c}static fromInvProjectionMatrix(e,s=1,c=0,p,g){const b=g?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],T=Math.pow(2,c),S=[[-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((A=>(function(R,V,Y,X){const J=a.aw([],R,V),Q=1/J[3]/Y*X;return a.aY(J,J,[Q,Q,1/J[3],Q])})(A,e,s,T)));p&&(function(A,R,V,Y){const X=Y?4:0,J=Y?0:4;let Q=0;const ne=[],te=[];for(let ie=0;ie<4;ie++){const me=a.aU([],A[ie+J],A[ie+X]),Oe=a.aZ(me);a.aR(me,me,1/Oe),ne.push(Oe),te.push(me)}for(let ie=0;ie<4;ie++){const me=a.a_(A[ie+X],te[ie],V);Q=me!==null&&me>=0?Math.max(Q,me):Math.max(Q,ne[ie])}const le=(function(ie,me){const Oe=a.aU([],ie[me[0]],ie[me[1]]),ve=a.aU([],ie[me[2]],ie[me[1]]),we=[0,0,0,0];return a.aV(we,a.aW([],Oe,ve)),we[3]=-a.aX(we,ie[me[0]]),we})(A,R),pe=(function(ie,me){const Oe=a.a$(ie),ve=a.b0([],ie,1/Oe),we=a.aU([],me,a.aR([],ve,a.aX(me,ve))),Se=a.a$(we);if(Se>0){const Je=Math.sqrt(1-ve[3]*ve[3]),Ze=a.aR([],ve,-ve[3]),$e=a.aS([],Ze,a.aR([],we,Je/Se));return a.b1(me,$e)}return null})(V,le);if(pe!==null){const ie=pe/a.aX(te[0],le);Q=Math.min(Q,ie)}for(let ie=0;ie<4;ie++){const me=Math.min(Q,ne[ie]);A[ie+J]=[A[ie+X][0]+te[ie][0]*me,A[ie+X][1]+te[ie][1]*me,A[ie+X][2]+te[ie][2]*me,1]}})(S,b[0],p,g);const C=b.map((A=>{const R=a.aU([],S[A[0]],S[A[1]]),V=a.aU([],S[A[2]],S[A[1]]),Y=a.aV([],a.aW([],R,V)),X=-a.aX(Y,S[A[1]]);return Y.concat(X)})),E=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],j=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const A of S)for(let R=0;R<3;R++)E[R]=Math.min(E[R],A[R]),j[R]=Math.max(j[R],A[R]);return new nr(S,C,new mr(E,j))}}class Si{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,s,c){return this._helper.interpolatePadding(e,s,c)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,s,c=!0){this._helper.resize(e,s,c)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,s){this._helper.overrideNearFarZ(e,s)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,s){}constructor(e,s,c,p,g){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new zr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(b,T)=>this.getConstrained(b,T)},e,s,c,p,g),this._coveringTilesDetailsProvider=new Fr}clone(){const e=new Si;return e.apply(this),e}apply(e,s,c){this._helper.apply(e,s,c)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){const s=[new a.b2(0,e)];if(this._helper._renderWorldCopies){const c=this.screenPointToMercatorCoordinate(new a.P(0,0)),p=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,0)),g=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,this._helper._height)),b=this.screenPointToMercatorCoordinate(new a.P(0,this._helper._height)),T=Math.floor(Math.min(c.x,p.x,g.x,b.x)),S=Math.floor(Math.max(c.x,p.x,g.x,b.x)),C=1;for(let E=T-C;E<=S+C;E++)E!==0&&s.push(new a.b2(E,e))}return s}getCameraFrustum(){return nr.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const s=this.screenPointToLocation(this.centerPoint,e),c=e?e.getElevationForLngLatZoom(s,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(c)}setLocationAtPoint(e,s){const c=a.aj(this.elevation,this.center.lat),p=this.screenPointToMercatorCoordinateAtZ(s,c),g=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,c),b=a.a1.fromLngLat(e),T=new a.a1(b.x-(p.x-g.x),b.y-(p.y-g.y));this.setCenter(T?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,s){return s?this.coordinatePoint(a.a1.fromLngLat(e),s.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(a.a1.fromLngLat(e))}screenPointToLocation(e,s){var c;return(c=this.screenPointToMercatorCoordinate(e,s))===null||c===void 0?void 0:c.toLngLat()}screenPointToMercatorCoordinate(e,s){if(s){const c=s.pointCoordinate(e);if(c!=null)return c}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,s){const c=s||0,p=[e.x,e.y,0,1],g=[e.x,e.y,1,1];a.aw(p,p,this._pixelMatrixInverse),a.aw(g,g,this._pixelMatrixInverse);const b=p[3],T=g[3],S=p[1]/b,C=g[1]/T,E=p[2]/b,j=g[2]/T,A=E===j?0:(c-E)/(j-E);return new a.a1(a.C.number(p[0]/b,g[0]/T,A)/this.worldSize,a.C.number(S,C,A)/this.worldSize,c)}coordinatePoint(e,s=0,c=this._pixelMatrix){const p=[e.x*this.worldSize,e.y*this.worldSize,s,1];return a.aw(p,p,c),new a.P(p[0]/p[3],p[1]/p[3])}getBounds(){const e=Math.max(0,this._helper._height/2-ce(this));return new ae().extend(this.screenPointToLocation(new a.P(0,e))).extend(this.screenPointToLocation(new a.P(this._helper._width,e))).extend(this.screenPointToLocation(new a.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new a.P(0,this._helper._height)))}isPointOnMapSurface(e,s){return s?s.pointCoordinate(e)!=null:e.y>this.height/2-ce(this)}calculatePosMatrix(e,s=!1,c){var p;const g=(p=e.key)!==null&&p!==void 0?p:a.b3(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),b=s?this._alignedPosMatrixCache:this._posMatrixCache;if(b.has(g)){const C=b.get(g);return c?C.f32:C.f64}const T=fe(e,this.worldSize);a.O(T,s?this._alignedProjMatrix:this._viewProjMatrix,T);const S={f64:T,f32:new Float32Array(T)};return b.set(g,S),c?S.f32:S.f64}calculateFogMatrix(e){const s=e.key,c=this._fogMatrixCacheF32;if(c.has(s))return c.get(s);const p=fe(e,this.worldSize);return a.O(p,this._fogMatrix,p),c.set(s,new Float32Array(p)),c.get(s)}getConstrained(e,s){s=a.ah(+s,this.minZoom,this.maxZoom);const c={center:new a.S(e.lng,e.lat),zoom:s};let p=this._helper._lngRange;if(!this._helper._renderWorldCopies&&p===null){const ne=179.9999999999;p=[-ne,ne]}const g=this.tileSize*a.af(c.zoom);let b=0,T=g,S=0,C=g,E=0,j=0;const{x:A,y:R}=this.size;if(this._helper._latRange){const ne=this._helper._latRange;b=a.U(ne[1])*g,T=a.U(ne[0])*g,T-b<R&&(E=R/(T-b))}p&&(S=a.aO(a.V(p[0])*g,0,g),C=a.aO(a.V(p[1])*g,0,g),C<S&&(C+=g),C-S<A&&(j=A/(C-S)));const{x:V,y:Y}=q(g,e);let X,J;const Q=Math.max(j||0,E||0);if(Q){const ne=new a.P(j?(C+S)/2:V,E?(T+b)/2:Y);return c.center=se(g,ne).wrap(),c.zoom+=a.ak(Q),c}if(this._helper._latRange){const ne=R/2;Y-ne<b&&(J=b+ne),Y+ne>T&&(J=T-ne)}if(p){const ne=(S+C)/2;let te=V;this._helper._renderWorldCopies&&(te=a.aO(V,ne-g/2,ne+g/2));const le=A/2;te-le<S&&(X=S+le),te+le>C&&(X=C-le)}if(X!==void 0||J!==void 0){const ne=new a.P(X??V,J??Y);c.center=se(g,ne).wrap()}return c}calculateCenterFromCameraLngLatAlt(e,s,c,p){return this._helper.calculateCenterFromCameraLngLatAlt(e,s,c,p)}_calculateNearFarZIfNeeded(e,s,c){if(!this._helper.autoCalculateNearFarZ)return;const p=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),g=e-p*this._helper._pixelPerMeter/Math.cos(s),b=p<0?g:e,T=Math.PI/2+this.pitchInRadians,S=a.ae(this.fov)*(Math.abs(Math.cos(a.ae(this.roll)))*this.height+Math.abs(Math.sin(a.ae(this.roll)))*this.width)/this.height*(.5+c.y/this.height),C=Math.sin(S)*b/Math.sin(a.ah(Math.PI-T-S,.01,Math.PI-.01)),E=ce(this),j=Math.atan(E/this._helper.cameraToCenterDistance),A=a.ae(.75),R=j>A?2*j*(.5+c.y/(2*E)):A,V=Math.sin(R)*b/Math.sin(a.ah(Math.PI-T-R,.01,Math.PI-.01)),Y=Math.min(C,V);this._helper._farZ=1.01*(Math.cos(Math.PI/2-s)*Y+b),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,s=q(this.worldSize,this.center),c=s.x,p=s.y;this._helper._pixelPerMeter=a.aj(1,this.center.lat)*this.worldSize;const g=a.ae(Math.min(this.pitch,U)),b=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(g));let T;this._calculateNearFarZIfNeeded(b,g,e),T=new Float64Array(16),a.b4(T,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),a.aq(this._invProjMatrix,T),T[8]=2*-e.x/this._helper._width,T[9]=2*e.y/this._helper._height,this._projectionMatrix=a.b5(T),a.N(T,T,[1,-1,1]),a.M(T,T,[0,0,-this._helper.cameraToCenterDistance]),a.b6(T,T,-this.rollInRadians),a.b7(T,T,this.pitchInRadians),a.b6(T,T,-this.bearingInRadians),a.M(T,T,[-c,-p,0]),this._mercatorMatrix=a.N([],T,[this.worldSize,this.worldSize,this.worldSize]),a.N(T,T,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=a.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,T),a.M(T,T,[0,0,-this.elevation]),this._viewProjMatrix=T,this._invViewProjMatrix=a.aq([],T);const S=[0,0,-1,1];a.aw(S,S,this._invViewProjMatrix),this._cameraPosition=[S[0]/S[3],S[1]/S[3],S[2]/S[3]],this._fogMatrix=new Float64Array(16),a.b4(this._fogMatrix,this.fovInRadians,this.width/this.height,b,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,a.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),a.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b6(this._fogMatrix,this._fogMatrix,-this.rollInRadians),a.b7(this._fogMatrix,this._fogMatrix,this.pitchInRadians),a.b6(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),a.M(this._fogMatrix,this._fogMatrix,[-c,-p,0]),a.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),a.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=a.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,T);const C=this._helper._width%2/2,E=this._helper._height%2/2,j=Math.cos(this.bearingInRadians),A=Math.sin(-this.bearingInRadians),R=c-Math.round(c)+j*C+A*E,V=p-Math.round(p)+j*E+A*C,Y=new Float64Array(T);if(a.M(Y,Y,[R>.5?R-1:R,V>.5?V-1:V,0]),this._alignedProjMatrix=Y,T=a.aq(new Float64Array(16),this._pixelMatrix),!T)throw new Error("failed to invert matrix");this._pixelMatrixInverse=T,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new a.P(0,0)),s=[e.x*this.worldSize,e.y*this.worldSize,0,1];return a.aw(s,s,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=a.aj(1,this.center.lat)*this.worldSize;return xe(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,s){const c=a.a1.fromLngLat(e),p=[c.x*this.worldSize,c.y*this.worldSize,s,1];return a.aw(p,p,this._viewProjMatrix),p[2]/p[3]}getProjectionData(e){const{overscaledTileID:s,aligned:c,applyTerrainMatrix:p}=e,g=this._helper.getMercatorTileCoordinates(s),b=s?this.calculatePosMatrix(s,c,!0):null;let T;return T=s&&s.terrainRttPosMatrix32f&&p?s.terrainRttPosMatrix32f:b||a.b8(),{mainMatrix:T,tileMercatorCoords:g,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:T}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,s,c){return 1}transformLightDirection(e){return a.aT(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,s,c,p){const g=this.calculatePosMatrix(c);let b;
vendor: 1,774 bytes, line 826
826p?(b=[e,s,p(e,s),1],a.aw(b,b,g)):(b=[e,s,0,1],To(b,b,g));const T=b[3];return{point:new a.P(b[0]/T,b[1]/T),signedDistanceFromCamera:T,isOccluded:!1}}populateCache(e){for(const s of e)this.calculatePosMatrix(s)}getMatrixForModel(e,s){const c=a.a1.fromLngLat(e,s),p=c.meterInMercatorCoordinateUnits(),g=a.b9();return a.M(g,g,[c.x,c.y,c.z]),a.b6(g,g,Math.PI),a.b7(g,g,Math.PI/2),a.N(g,g,[-p,p,p]),g}getProjectionDataForCustomLayer(e=!0){const s=new a.Z(0,0,0,0,0),c=this.getProjectionData({overscaledTileID:s,applyGlobeMatrix:e}),p=fe(s,this.worldSize);a.O(p,this._viewProjMatrix,p),c.tileMercatorCoords=[0,0,1,1];const g=[a.$,a.$,this.worldSize/this._helper.pixelsPerMeter],b=a.ba();return a.N(b,p,g),c.fallbackMatrix=b,c.mainMatrix=b,c}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function Zh(){a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Nr(f){if(f.useSlerp)if(f.k<1){const e=a.bb(f.startEulerAngles.roll,f.startEulerAngles.pitch,f.startEulerAngles.bearing),s=a.bb(f.endEulerAngles.roll,f.endEulerAngles.pitch,f.endEulerAngles.bearing),c=new Float64Array(4);a.bc(c,e,s,f.k);const p=a.bd(c);f.tr.setRoll(p.roll),f.tr.setPitch(p.pitch),f.tr.setBearing(p.bearing)}else f.tr.setRoll(f.endEulerAngles.roll),f.tr.setPitch(f.endEulerAngles.pitch),f.tr.setBearing(f.endEulerAngles.bearing);else f.tr.setRoll(a.C.number(f.startEulerAngles.roll,f.endEulerAngles.roll,f.k)),f.tr.setPitch(a.C.number(f.startEulerAngles.pitch,f.endEulerAngles.pitch,f.k)),f.tr.setBearing(a.C.number(f.startEulerAngles.bearing,f.endEulerAngles.bearing,f.k))}function tn(f,e,s,c,p){const g=p.padding,b=q(p.worldSize,s.getNorthWest()),T=q(p.worldSize,s.getNorthEast()),S=q(p.worldSize,s.getSouthEast()),C=q(p.worldSize,s.getSouthWest
vendor: 33,012 bytes, line 826
826()),E=a.ae(-c),j=b.rotate(E),A=T.rotate(E),R=S.rotate(E),V=C.rotate(E),Y=new a.P(Math.max(j.x,A.x,V.x,R.x),Math.max(j.y,A.y,V.y,R.y)),X=new a.P(Math.min(j.x,A.x,V.x,R.x),Math.min(j.y,A.y,V.y,R.y)),J=Y.sub(X),Q=(p.width-(g.left+g.right+e.left+e.right))/J.x,ne=(p.height-(g.top+g.bottom+e.top+e.bottom))/J.y;if(ne<0||Q<0)return void Zh();const te=Math.min(a.ak(p.scale*Math.min(Q,ne)),f.maxZoom),le=a.P.convert(f.offset),pe=new a.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(a.ae(c)),ie=le.add(pe).mult(p.scale/a.af(te));return{center:se(p.worldSize,b.add(S).div(2).sub(ie)),zoom:te,bearing:c}}class Ar{get useGlobeControls(){return!1}handlePanInertia(e,s){const c=e.mag(),p=Math.abs(ce(s));return{easingOffset:e.mult(Math.min(.75*p/c,1)),easingCenter:s.center}}handleMapControlsRollPitchBearingZoom(e,s){e.bearingDelta&&s.setBearing(s.bearing+e.bearingDelta),e.pitchDelta&&s.setPitch(s.pitch+e.pitchDelta),e.rollDelta&&s.setRoll(s.roll+e.rollDelta),e.zoomDelta&&s.setZoom(s.zoom+e.zoomDelta)}handleMapControlsPan(e,s,c){e.around.distSqr(s.centerPoint)<.01||s.setLocationAtPoint(c,e.around)}cameraForBoxAndBearing(e,s,c,p,g){return tn(e,s,c,p,g)}handleJumpToCenterZoom(e,s){e.zoom!==(s.zoom!==void 0?+s.zoom:e.zoom)&&e.setZoom(+s.zoom),s.center!==void 0&&e.setCenter(a.S.convert(s.center))}handleEaseTo(e,s){const c=e.zoom,p=e.padding,g={roll:e.roll,pitch:e.pitch,bearing:e.bearing},b={roll:s.roll===void 0?e.roll:s.roll,pitch:s.pitch===void 0?e.pitch:s.pitch,bearing:s.bearing===void 0?e.bearing:s.bearing},T=s.zoom!==void 0,S=!e.isPaddingEqual(s.padding);let C=!1;const E=T?+s.zoom:e.zoom;let j=e.centerPoint.add(s.offsetAsPoint);const A=e.screenPointToLocation(j),{center:R,zoom:V}=e.getConstrained(a.S.convert(s.center||A),E??c);ul(e,R);const Y=q(e.worldSize,A),X=q(e.worldSize,R).sub(Y),J=a.af(V-c);return C=V!==c,{easeFunc:Q=>{if(C&&e.setZoom(a.C.number(c,V,Q)),a.be(g,b)||Nr({startEulerAngles:g,endEulerAngles:b,tr:e,k:Q,useSlerp:g.roll!=b.roll}),S&&(e.interpolatePadding(p,s.padding,Q),j=e.centerPoint.add(s.offsetAsPoint)),s.around)e.setLocationAtPoint(s.around,s.aroundPoint);else{const ne=a.af(e.zoom-c),te=V>c?Math.min(2,J):Math.max(.5,J),le=Math.pow(te,1-Q),pe=se(e.worldSize,Y.add(X.mult(Q*le)).mult(ne));e.setLocationAtPoint(e.renderWorldCopies?pe.wrap():pe,j)}},isZooming:C,elevationCenter:R}}handleFlyTo(e,s){const c=s.zoom!==void 0,p=e.zoom,g=e.getConstrained(a.S.convert(s.center||s.locationAtOffset),c?+s.zoom:p),b=g.center,T=g.zoom;ul(e,b);const S=q(e.worldSize,s.locationAtOffset),C=q(e.worldSize,b).sub(S),E=C.mag(),j=a.af(T-p);let A;if(s.minZoom!==void 0){const R=Math.min(+s.minZoom,p,T),V=e.getConstrained(b,R).zoom;A=a.af(V-p)}return{easeFunc:(R,V,Y,X)=>{e.setZoom(R===1?T:p+a.ak(V));const J=R===1?b:se(e.worldSize,S.add(C.mult(Y)).mult(V));e.setLocationAtPoint(e.renderWorldCopies?J.wrap():J,X)},scaleOfZoom:j,targetCenter:b,scaleOfMinZoom:A,pixelPathLength:E}}}class Ii{constructor(e,s,c){this.blendFunction=e,this.blendColor=s,this.mask=c}}Ii.Replace=[1,0],Ii.disabled=new Ii(Ii.Replace,a.bf.transparent,[!1,!1,!1,!1]),Ii.unblended=new Ii(Ii.Replace,a.bf.transparent,[!0,!0,!0,!0]),Ii.alphaBlended=new Ii([1,771],a.bf.transparent,[!0,!0,!0,!0]);const Hs=2305;class kt{constructor(e,s,c){this.enable=e,this.mode=s,this.frontFace=c}}kt.disabled=new kt(!1,1029,Hs),kt.backCCW=new kt(!0,1029,Hs),kt.frontCCW=new kt(!0,1028,Hs);class Ut{constructor(e,s,c){this.func=e,this.mask=s,this.range=c}}Ut.ReadOnly=!1,Ut.ReadWrite=!0,Ut.disabled=new Ut(519,Ut.ReadOnly,[0,1]);const rs=7680;class ui{constructor(e,s,c,p,g,b){this.test=e,this.ref=s,this.mask=c,this.fail=p,this.depthFail=g,this.pass=b}}ui.disabled=new ui({func:519,mask:0},0,0,rs,rs,rs);const rn=new WeakMap;function Nn(f){var e;if(rn.has(f))return rn.get(f);{const s=(e=f.getParameter(f.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return rn.set(f,s),s}}class $n{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;const s=e.context,c=s.gl;this._texFormat=c.RGBA,this._texType=c.UNSIGNED_BYTE;const p=new a.aL;p.emplaceBack(-1,-1),p.emplaceBack(2,-1),p.emplaceBack(-1,2);const g=new a.aN;g.emplaceBack(0,1,2),this._fullscreenTriangle=new Us(s.createVertexBuffer(p,Ss.members),s.createIndexBuffer(g),a.aM.simpleSegment(0,0,p.length,g.length)),this._resultBuffer=new Uint8Array(4),s.activeTexture.set(c.TEXTURE1);const b=c.createTexture();c.bindTexture(c.TEXTURE_2D,b),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.NEAREST),c.texImage2D(c.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=s.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(b),Nn(c)&&(this._pbo=c.createBuffer(),c.bindBuffer(c.PIXEL_PACK_BUFFER,this._pbo),c.bufferData(c.PIXEL_PACK_BUFFER,4,c.STREAM_READ),c.bindBuffer(c.PIXEL_PACK_BUFFER,null))}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,s){const c=this._updateCount;return this._readbackQueue?c>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():c>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,s),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,s=e.gl;e.activeTexture.set(s.TEXTURE1),s.bindTexture(s.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,s){const c=this._cachedRenderContext.context,p=c.gl;if(this._bindFramebuffer(),c.viewport.set([0,0,this._texWidth,this._texHeight]),c.clear({color:a.bf.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(c,p.TRIANGLES,Ut.disabled,ui.disabled,Ii.unblended,kt.disabled,((g,b)=>({u_input:g,u_output_expected:b}))(e,s),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Nn(p)){p.bindBuffer(p.PIXEL_PACK_BUFFER,this._pbo),p.readBuffer(p.COLOR_ATTACHMENT0),p.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),p.bindBuffer(p.PIXEL_PACK_BUFFER,null);const g=p.fenceSync(p.SYNC_GPU_COMMANDS_COMPLETE,0);p.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:g}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Nn(e)){const s=e.clientWaitSync(this._readbackQueue.sync,0,0);if(s===e.WAIT_FAILED)return a.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(s===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=$n._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let s=0;return s+=e[0]/256,s+=e[1]/65536,s+=e[2]/16777216,e[3]<127&&(s=-s),s/128}}const pl=a.$/128;function Nc(f,e){const s=f.granularity!==void 0?Math.max(f.granularity,1):1,c=s+(f.generateBorders?2:0),p=s+(f.extendToNorthPole||f.generateBorders?1:0)+(f.extendToSouthPole||f.generateBorders?1:0),g=c+1,b=p+1,T=f.generateBorders?-1:0,S=f.generateBorders||f.extendToNorthPole?-1:0,C=s+(f.generateBorders?1:0),E=s+(f.generateBorders||f.extendToSouthPole?1:0),j=g*b,A=c*p*6,R=g*b>65536;if(R&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const V=R||e==="32bit",Y=new Int16Array(2*j);let X=0;for(let ne=S;ne<=E;ne++)for(let te=T;te<=C;te++){let le=te/s*a.$;te===-1&&(le=-pl),te===s+1&&(le=a.$+pl);let pe=ne/s*a.$;ne===-1&&(pe=f.extendToNorthPole?a.bh:-pl),ne===s+1&&(pe=f.extendToSouthPole?a.bi:a.$+pl),Y[X++]=le,Y[X++]=pe}const J=V?new Uint32Array(A):new Uint16Array(A);let Q=0;for(let ne=0;ne<p;ne++)for(let te=0;te<c;te++){const le=te+1+ne*g,pe=te+(ne+1)*g,ie=te+1+(ne+1)*g;J[Q++]=te+ne*g,J[Q++]=pe,J[Q++]=le,J[Q++]=le,J[Q++]=pe,J[Q++]=ie}return{vertices:Y.buffer.slice(0),indices:J.buffer.slice(0),uses32bitIndices:V}}const Eo=new a.aK({fill:new a.bj(128,2),line:new a.bj(512,0),tile:new a.bj(128,32),stencil:new a.bj(128,1),circle:3});class fa{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return gn.projectionGlobe}get vertexShaderPreludeCode(){return gn.projectionMercator.vertexSource}get subdivisionGranularity(){return Eo}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new $n(e));const s=a.U(this._errorQueryLatitudeDegrees),c=2*Math.atan(Math.exp(Math.PI-s*Math.PI*2))-.5*Math.PI,p=this._errorMeasurement.updateErrorLoop(s,c),g=W.now();p!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=p,this._errorMeasurementLastChangeTime=g);const b=Math.min(Math.max((g-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=a.bk(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,a.bl(b))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,s,c,p,g){const b=(g==="stencil"?Eo.stencil:Eo.tile).getGranularityForZoomLevel(s.z);return this._getMesh(e,{granularity:b,generateBorders:c,extendToNorthPole:s.y===0&&p,extendToSouthPole:s.y===(1<<s.z)-1&&p})}_getMesh(e,s){const c=this._getMeshKey(s);if(c in this._tileMeshCache)return this._tileMeshCache[c];const p=(function(g,b){const T=Nc(b,"16bit"),S=a.aL.deserialize({arrayBuffer:T.vertices,length:T.vertices.byteLength/2/2}),C=a.aN.deserialize({arrayBuffer:T.indices,length:T.indices.byteLength/2/3});return new Us(g.createVertexBuffer(S,Ss.members),g.createIndexBuffer(C),a.aM.simpleSegment(0,0,S.length,C.length))})(e,s);return this._tileMeshCache[c]=p,p}recalculate(e){}hasTransition(){const e=W.now();let s=!1;return s=s||(e-this._errorMeasurementLastChangeTime)/1e3<.7,s=s||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,s}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}const dl=new a.r({type:new a.D(a.v.projection.type)});class fl extends a.E{constructor(e){super(),this._transitionable=new a.t(dl,void 0),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.F(0)),this._mercatorProjection=new ri,this._verticalPerspectiveProjection=new fa}get transitionState(){const e=this.properties.get("type");if(typeof e=="string"&&e==="mercator")return 0;if(typeof e=="string"&&e==="vertical-perspective")return 1;if(e instanceof a.bm){if(e.from==="vertical-perspective"&&e.to==="mercator")return 1-e.transition;if(e.from==="mercator"&&e.to==="vertical-perspective")return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,s,c,p,g){return this.currentProjection.getMeshFromTileID(e,s,c,p,g)}setProjection(e){this._transitionable.setValue("type",e?.type||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function ml(f){const e=Mo(f.worldSize,f.center.lat);return 2*Math.PI*e}function _n(f,e,s,c,p){const g=1/(1<<p),b=e/a.$*g+c*g,T=a.bo((f/a.$*g+s*g)*Math.PI*2+Math.PI,2*Math.PI),S=2*Math.atan(Math.exp(Math.PI-b*Math.PI*2))-.5*Math.PI,C=Math.cos(S),E=new Float64Array(3);return E[0]=Math.sin(T)*C,E[1]=Math.sin(S),E[2]=Math.cos(T)*C,E}function gr(f){return(function(e,s){const c=Math.cos(s),p=new Float64Array(3);return p[0]=Math.sin(e)*c,p[1]=Math.sin(s),p[2]=Math.cos(e)*c,p})(f.lng*Math.PI/180,f.lat*Math.PI/180)}function Mo(f,e){return f/(2*Math.PI)/Math.cos(e*Math.PI/180)}function ma(f){const e=Math.asin(f[1])/Math.PI*180,s=Math.sqrt(f[0]*f[0]+f[2]*f[2]);if(s>1e-6){const c=f[0]/s,p=Math.acos(f[2]/s),g=(c>0?p:-p)/Math.PI*180;return new a.S(a.aO(g,-180,180),e)}return new a.S(0,e)}function Zs(f){return Math.cos(f*Math.PI/180)}function Yi(f,e){const s=Zs(f),c=Zs(e);return a.ak(c/s)}function qh(f,e){const s=f.rotate(e.bearingInRadians),c=e.zoom+Yi(e.center.lat,0),p=a.bk(1/Zs(e.center.lat),1/Zs(Math.min(Math.abs(e.center.lat),60)),a.bn(c,7,3,0,1)),g=360/ml({worldSize:e.worldSize,center:{lat:e.center.lat}});return new a.S(e.center.lng-s.x*g*p,a.ah(e.center.lat+s.y*g,-a.ai,a.ai))}function ga(f){const e=.5*f,s=Math.sin(e),c=Math.cos(e);return Math.log(s+c)-Math.log(c-s)}function $c(f,e,s,c){const p=f.lat+s*c;if(Math.abs(s)>1){const g=(Math.sign(f.lat+s)!==Math.sign(f.lat)?-Math.abs(f.lat):Math.abs(f.lat))*Math.PI/180,b=Math.abs(f.lat+s)*Math.PI/180,T=ga(g+c*(b-g)),S=ga(g),C=ga(b);return new a.S(f.lng+e*((T-S)/(C-S)),p)}return new a.S(f.lng+e*c,p)}class df{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,s,c,p){const g=`${e.z}_${e.x}_${e.y}_${p?.terrain?"t":""}`,b=this._cache.get(g);if(b)return b;const T=this._cachePrevious.get(g);if(T)return this._cache.set(g,T),T;const S=this._boundingVolumeFactory(e,s,c,p);return this._cache.set(g,S),this._hadAnyChanges=!0,S}}class Io{constructor(e,s,c,p){this.min=c,this.max=p,this.points=e,this.planes=s}static fromAabb(e,s){const c=[];for(let p=0;p<8;p++)c.push([1&~p?e[0]:s[0],(p>>1&1)==1?s[1]:e[1],(p>>2&1)==1?s[2]:e[2]]);return new Io(c,[[-1,0,0,s[0]],[1,0,0,-e[0]],[0,-1,0,s[1]],[0,1,0,-e[1]],[0,0,-1,s[2]],[0,0,1,-e[2]]],e,s)}static fromCenterSizeAngles(e,s,c){const p=a.br([],c[0],c[1],c[2]),g=a.bs([],[s[0],0,0],p),b=a.bs([],[0,s[1],0],p),T=a.bs([],[0,0,s[2]],p),S=[...e],C=[...e];for(let j=0;j<8;j++)for(let A=0;A<3;A++){const R=e[A]+g[A]*(1&~j?-1:1)+b[A]*((j>>1&1)==1?1:-1)+T[A]*((j>>2&1)==1?1:-1);S[A]=Math.min(S[A],R),C[A]=Math.max(C[A],R)}const E=[];for(let j=0;j<8;j++){const A=[...e];a.aS(A,A,a.aR([],g,1&~j?-1:1)),a.aS(A,A,a.aR([],b,(j>>1&1)==1?1:-1)),a.aS(A,A,a.aR([],T,(j>>2&1)==1?1:-1)),E.push(A)}return new Io(E,[[...g,-a.aX(g,E[0])],[...b,-a.aX(b,E[0])],[...T,-a.aX(T,E[0])],[-g[0],-g[1],-g[2],-a.aX(g,E[7])],[-b[0],-b[1],-b[2],-a.aX(b,E[7])],[-T[0],-T[1],-T[2],-a.aX(T,E[7])]],S,C)}intersectsFrustum(e){let s=!0;const c=this.points.length,p=this.planes.length,g=e.planes.length,b=e.points.length;for(let T=0;T<g;T++){const S=e.planes[T];let C=0;for(let E=0;E<c;E++){const j=this.points[E];S[0]*j[0]+S[1]*j[1]+S[2]*j[2]+S[3]>=0&&C++}if(C===0)return 0;C<c&&(s=!1)}if(s)return 2;for(let T=0;T<p;T++){const S=this.planes[T];let C=0;for(let E=0;E<b;E++){const j=e.points[E];S[0]*j[0]+S[1]*j[1]+S[2]*j[2]+S[3]>=0&&C++}if(C===0)return 0}return 1}intersectsPlane(e){const s=this.points.length;let c=0;for(let p=0;p<s;p++){const g=this.points[p];e[0]*g[0]+e[1]*g[1]+e[2]*g[2]+e[3]>=0&&c++}return c===s?2:c===0?0:1}}function Pr(f,e,s){const c=f-e;return c<0?-c:Math.max(0,c-s)}function _a(f,e,s,c,p){const g=f-s;let b;return b=g<0?Math.min(-g,1+g-p):g>1?Math.min(Math.max(g-p,0),1-g):0,Math.max(b,Pr(e,c,p))}class Un{constructor(){this._boundingVolumeCache=new df(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,s,c,p){const g=1<<c.z,b=1/g,T=c.x/g,S=c.y/g;let C=2;return C=Math.min(C,_a(e,s,T,S,b)),C=Math.min(C,_a(e,s,T+.5,-S-b,b)),C=Math.min(C,_a(e,s,T+.5,2-S-b,b)),C}getWrap(e,s,c){const p=1<<s.z,g=1/p,b=s.x/p,T=Pr(e.x,b,g),S=Pr(e.x,b-1,g),C=Pr(e.x,b+1,g),E=Math.min(T,S,C);return E===C?1:E===S?-1:0}allowVariableZoom(e,s){return yt(e,s)>4}allowWorldCopies(){return!1}getTileBoundingVolume(e,s,c,p){return this._boundingVolumeCache.getTileBoundingVolume(e,s,c,p)}_computeTileBoundingVolume(e,s,c,p){var g,b;let T=0,S=0;if(p?.terrain){const C=new a.Z(e.z,s,e.z,e.x,e.y),E=p.terrain.getMinMaxElevation(C);T=(g=E.minElevation)!==null&&g!==void 0?g:Math.min(0,c),S=(b=E.maxElevation)!==null&&b!==void 0?b:Math.max(0,c)}if(T/=a.bu,S/=a.bu,T+=1,S+=1,e.z<=0)return Io.fromAabb([-S,-S,-S],[S,S,S]);if(e.z===1)return Io.fromAabb([e.x===0?-S:0,e.y===0?0:-S,-S],[e.x===0?0:S,e.y===0?S:0,S]);{const C=[_n(0,0,e.x,e.y,e.z),_n(a.$,0,e.x,e.y,e.z),_n(a.$,a.$,e.x,e.y,e.z),_n(0,a.$,e.x,e.y,e.z)],E=[];for(const we of C)E.push(a.aR([],we,S));if(S!==T)for(const we of C)E.push(a.aR([],we,T));e.y===0&&E.push([0,1,0]),e.y===(1<<e.z)-1&&E.push([0,-1,0]);const j=[1,1,1],A=[-1,-1,-1];for(const we of E)for(let Se=0;Se<3;Se++)j[Se]=Math.min(j[Se],we[Se]),A[Se]=Math.max(A[Se],we[Se]);const R=_n(a.$/2,a.$/2,e.x,e.y,e.z),V=a.aW([],[0,1,0],R);a.aV(V,V);const Y=a.aW([],R,V);a.aV(Y,Y);const X=a.aW([],C[2],C[1]);a.aV(X,X);const J=a.aW([],C[0],C[3]);a.aV(J,J),E.push(a.aR([],R,S)),e.y>=(1<<e.z)/2&&E.push(a.aR([],_n(a.$/2,0,e.x,e.y,e.z),S)),e.y<(1<<e.z)/2&&E.push(a.aR([],_n(a.$/2,a.$,e.x,e.y,e.z),S));const Q=ya(R,E),ne=ya(Y,E),te=[-R[0],-R[1],-R[2],Q.max],le=[R[0],R[1],R[2],-Q.min],pe=[-Y[0],-Y[1],-Y[2],ne.max],ie=[Y[0],Y[1],Y[2],-ne.min],me=[...X,0],Oe=[...J,0],ve=[];return e.y===0?ve.push(a.bt(Oe,me,te),a.bt(Oe,me,le)):ve.push(a.bt(pe,me,te),a.bt(pe,me,le),a.bt(pe,Oe,te),a.bt(pe,Oe,le)),e.y===(1<<e.z)-1?ve.push(a.bt(Oe,me,te),a.bt(Oe,me,le)):ve.push(a.bt(ie,me,te),a.bt(ie,me,le),a.bt(ie,Oe,te),a.bt(ie,Oe,le)),new Io(ve,[te,le,pe,ie,me,Oe],j,A)}}}function ya(f,e){let s=1/0,c=-1/0;for(const p of e){const g=a.aX(f,p);s=Math.min(s,g),c=Math.max(c,g)}return{min:s,max:c}}class ba{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,s,c){return this._helper.interpolatePadding(e,s,c)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,s){this._helper.resize(e,s)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,s){this._helper.overrideNearFarZ(e,s)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(){this._cachedClippingPlane=a.bv(),this._projectionMatrix=a.b9(),this._globeViewProjMatrix32f=a.b8(),this._globeViewProjMatrixNoCorrection=a.b9(),this._globeViewProjMatrixNoCorrectionInverted=a.b9(),this._globeProjMatrixInverted=a.b9(),this._cameraPosition=a.bp(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new zr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,s)=>this.getConstrained(e,s)}),this._coveringTilesDetailsProvider=new Un}clone(){const e=new ba;return e.apply(this),e}apply(e,s){this._globeLatitudeErrorCorrectionRadians=s||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=a.bp();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:s,applyGlobeMatrix:c}=e,p=this._helper.getMercatorTileCoordinates(s);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:p,clippingPlane:this._cachedClippingPlane,projectionTransition:c?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const s=this.pitchInRadians,c=this.cameraToCenterDistance/e,p=Math.sin(s)*c,g=Math.cos(s)*c+1,b=1/Math.sqrt(p*p+g*g)*1;let T=-p,S=g;const C=Math.sqrt(T*T+S*S);T/=C,S/=C;const E=[0,T,S];a.bw(E,E,[0,0,0],-this.bearingInRadians),a.bx(E,E,[0,0,0],-1*this.center.lat*Math.PI/180),a.by(E,E,[0,0,0],this.center.lng*Math.PI/180);const j=1/a.aZ(E);return a.aR(E,E,j),[...E,-b*j]}isLocationOccluded(e){return!this.isSurfacePointVisible(gr(e))}transformLightDirection(e){const s=this._helper._center.lng*Math.PI/180,c=this._helper._center.lat*Math.PI/180,p=Math.cos(c),g=[Math.sin(s)*p,Math.sin(c),Math.cos(s)*p],b=[g[2],0,-g[0]],T=[0,0,0];a.aW(T,b,g),a.aV(b,b),a.aV(T,T);const S=[0,0,0];return a.aV(S,[b[0]*e[0]+T[0]*e[1]+g[0]*e[2],b[1]*e[0]+T[1]*e[1]+g[1]*e[2],b[2]*e[0]+T[2]*e[1]+g[2]*e[2]]),S}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,s,c){const p=(function(T,S,C){const E=1/(1<<C.z);return new a.a1(T/a.$*E+C.x*E,S/a.$*E+C.y*E)})(e,s,c.canonical),g=(b=p.y,[a.bo(p.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-b*Math.PI*2))-.5*Math.PI]);var b;return this.getCircleRadiusCorrection()/Math.cos(g[1])}projectTileCoordinates(e,s,c,p){const g=c.canonical,b=_n(e,s,g.x,g.y,g.z),T=1+(p?p(e,s):0)/a.bu,S=[b[0]*T,b[1]*T,b[2]*T,1];a.aw(S,S,this._globeViewProjMatrixNoCorrection);const C=this._cachedClippingPlane,E=C[0]*b[0]+C[1]*b[1]+C[2]*b[2]+C[3]<0;return{point:new a.P(S[0]/S[3],S[1]/S[3]),signedDistanceFromCamera:S[3],isOccluded:E}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const e=Mo(this.worldSize,this.center.lat),s=a.ba(),c=a.ba();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),a.b4(s,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const p=this.centerOffset;s[8]=2*-p.x/this._helper._width,s[9]=2*p.y/this._helper._height,this._projectionMatrix=a.b5(s),this._globeProjMatrixInverted=a.ba(),a.aq(this._globeProjMatrixInverted,s),a.M(s,s,[0,0,-this.cameraToCenterDistance]),a.b6(s,s,this.rollInRadians),a.b7(s,s,-this.pitchInRadians),a.b6(s,s,this.bearingInRadians),a.M(s,s,[0,0,-e]);const g=a.bp();g[0]=e,g[1]=e,g[2]=e,a.b7(c,s,this.center.lat*Math.PI/180),a.bz(c,c,-this.center.lng*Math.PI/180),a.N(c,c,g),this._globeViewProjMatrixNoCorrection=c,a.b7(s,s,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),a.bz(s,s,-this.center.lng*Math.PI/180),a.N(s,s,g),this._globeViewProjMatrix32f=new Float32Array(s),this._globeViewProjMatrixNoCorrectionInverted=a.ba(),a.aq(this._globeViewProjMatrixNoCorrectionInverted,c);const b=a.bp();this._cameraPosition=a.bp(),this._cameraPosition[2]=this.cameraToCenterDistance/e,a.bw(this._cameraPosition,this._cameraPosition,b,-this.rollInRadians),a.bx(this._cameraPosition,this._cameraPosition,b,this.pitchInRadians),a.bw(this._cameraPosition,this._cameraPosition,b,-this.bearingInRadians),a.aS(this._cameraPosition,this._cameraPosition,[0,0,1]),a.bx(this._cameraPosition,this._cameraPosition,b,-this.center.lat*Math.PI/180),a.by(this._cameraPosition,this._cameraPosition,b,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);const T=a.b5(this._globeViewProjMatrixNoCorrectionInverted);a.N(T,T,[1,1,-1]),this._cachedFrustum=nr.fromInvProjectionMatrix(T,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){a.w("calculateFogMatrix is not supported on globe projection.");const s=a.ba();return a.ag(s),s}getVisibleUnwrappedCoordinates(e){return[new a.b2(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&a.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,s){if(!this._globeViewProjMatrixNoCorrection)return 1;const c=gr(e);a.aR(c,c,1+s/a.bu);const p=a.bv();return a.aw(p,[c[0],c[1],c[2],1],this._globeViewProjMatrixNoCorrection),p[2]/p[3]}populateCache(e){}getBounds(){const e=.5*this.width,s=.5*this.height,c=[new a.P(0,0),new a.P(e,0),new a.P(this.width,0),new a.P(this.width,s),new a.P(this.width,this.height),new a.P(e,this.height),new a.P(0,this.height),new a.P(0,s)],p=[];for(const j of c)p.push(this.unprojectScreenPoint(j));let g=0,b=0,T=0,S=0;const C=this.center;for(const j of p){const A=a.bA(C.lng,j.lng),R=a.bA(C.lat,j.lat);A<b&&(b=A),A>g&&(g=A),R<S&&(S=R),R>T&&(T=R)}const E=[C.lng+b,C.lat+S,C.lng+g,C.lat+T];return this.isSurfacePointOnScreen([0,1,0])&&(E[3]=90,E[0]=-180,E[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(E[1]=-90,E[0]=-180,E[2]=180),new ae(E)}getConstrained(e,s){const c=a.ah(e.lat,-a.ai,a.ai),p=a.ah(+s,this.minZoom+Yi(0,c),this.maxZoom);return{center:new a.S(e.lng,c),zoom:p}}calculateCenterFromCameraLngLatAlt(e,s,c,p){return this._helper.calculateCenterFromCameraLngLatAlt(e,s,c,p)}setLocationAtPoint(e,s){const c=gr(this.unprojectScreenPoint(s)),p=gr(e),g=a.bp();a.bB(g);const b=a.bp();a.by(b,c,g,-this.center.lng*Math.PI/180),a.bx(b,b,g,this.center.lat*Math.PI/180);const T=p[0]*p[0]+p[2]*p[2],S=b[0]*b[0];if(T<S)return;const C=Math.sqrt(T-S),E=-C,j=a.bC(p[0],p[2],b[0],C),A=a.bC(p[0],p[2],b[0],E),R=a.bp();a.by(R,p,g,-j);const V=a.bC(R[1],R[2],b[1],b[2]),Y=a.bp();a.by(Y,p,g,-A);const X=a.bC(Y[1],Y[2],b[1],b[2]),J=.5*Math.PI,Q=V>=-J&&V<=J,ne=X>=-J&&X<=J;let te,le;if(Q&&ne){const Oe=this.center.lng*Math.PI/180,ve=this.center.lat*Math.PI/180;a.bD(j,Oe)+a.bD(V,ve)<a.bD(A,Oe)+a.bD(X,ve)?(te=j,le=V):(te=A,le=X)}else if(Q)te=j,le=V;else{if(!ne)return;te=A,le=X}const pe=te/Math.PI*180,ie=le/Math.PI*180,me=this.center.lat;this.setCenter(new a.S(pe,a.ah(ie,-90,90))),this.setZoom(this.zoom+Yi(me,this.center.lat))}locationToScreenPoint(e,s){const c=gr(e);if(s){const p=s.getElevationForLngLatZoom(e,this._helper._tileZoom);a.aR(c,c,1+p/a.bu)}return this._projectSurfacePointToScreen(c)}_projectSurfacePointToScreen(e){const s=a.bv();return a.aw(s,[...e,1],this._globeViewProjMatrixNoCorrection),s[0]/=s[3],s[1]/=s[3],new a.P((.5*s[0]+.5)*this.width,(.5*-s[1]+.5)*this.height)}screenPointToMercatorCoordinate(e,s){if(s){const c=s.pointCoordinate(e);if(c)return c}return a.a1.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,s){var c;return(c=this.screenPointToMercatorCoordinate(e,s))===null||c===void 0?void 0:c.toLngLat()}isPointOnMapSurface(e,s){const c=this._cameraPosition,p=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(c,p)}getRayDirectionFromPixel(e){const s=a.bv();s[0]=e.x/this.width*2-1,s[1]=-1*(e.y/this.height*2-1),s[2]=1,s[3]=1,a.aw(s,s,this._globeViewProjMatrixNoCorrectionInverted),s[0]/=s[3],s[1]/=s[3],s[2]/=s[3];const c=a.bp();c[0]=s[0]-this._cameraPosition[0],c[1]=s[1]-this._cameraPosition[1],c[2]=s[2]-this._cameraPosition[2];const p=a.bp();return a.aV(p,c),p}isSurfacePointVisible(e){const s=this._cachedClippingPlane;return s[0]*e[0]+s[1]*e[1]+s[2]*e[2]+s[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;const s=a.bv();return a.aw(s,[...e,1],this._globeViewProjMatrixNoCorrection),s[0]/=s[3],s[1]/=s[3],s[2]/=s[3],s[0]>-1&&s[0]<1&&s[1]>-1&&s[1]<1&&s[2]>-1&&s[2]<1}rayPlanetIntersection(e,s){const c=a.aX(e,s),p=a.bp(),g=a.bp();a.aR(g,s,c),a.aU(p,e,g);const b=1-a.aX(p,p);if(b<0)return null;const T=a.aX(e,e)-1,S=-c+(c<0?1:-1)*Math.sqrt(b),C=T/S,E=S;return{tMin:Math.min(C,E),tMax:Math.max(C,E)}}unprojectScreenPoint(e){const s=this._cameraPosition,c=this.getRayDirectionFromPixel(e),p=this.rayPlanetIntersection(s,c);if(p){const E=a.bp();a.aS(E,s,[c[0]*p.tMin,c[1]*p.tMin,c[2]*p.tMin]);const j=a.bp();return a.aV(j,E),ma(j)}const g=this._cachedClippingPlane,b=g[0]*c[0]+g[1]*c[1]+g[2]*c[2],T=-a.b1(g,s)/b,S=a.bp();if(T>0)a.aS(S,s,[c[0]*T,c[1]*T,c[2]*T]);else{const E=a.bp();a.aS(E,s,[2*c[0],2*c[1],2*c[2]]);const j=a.b1(this._cachedClippingPlane,E);a.aU(S,E,[this._cachedClippingPlane[0]*j,this._cachedClippingPlane[1]*j,this._cachedClippingPlane[2]*j])}const C=(function(E){const j=a.bp();return j[0]=E[0]*-E[3],j[1]=E[1]*-E[3],j[2]=E[2]*-E[3],{center:j,radius:Math.sqrt(1-E[3]*E[3])}})(g);return ma((function(E,j,A){const R=a.bp();a.aU(R,A,E);const V=a.bp();return a.bq(V,E,R,j/a.a$(R)),V})(C.center,C.radius,S))}getMatrixForModel(e,s){const c=a.S.convert(e),p=1/a.bu,g=a.b9();return a.bz(g,g,c.lng/180*Math.PI),a.b7(g,g,-c.lat/180*Math.PI),a.M(g,g,[0,0,1+s/a.bu]),a.b7(g,g,.5*Math.PI),a.N(g,g,[p,p,p]),g}getProjectionDataForCustomLayer(e=!0){const s=this.getProjectionData({overscaledTileID:new a.Z(0,0,0,0,0),applyGlobeMatrix:e});return s.tileMercatorCoords=[0,0,1,1],s}getFastPathSimpleProjectionMatrix(e){}}
vendor: 7,606 bytes, line 826
826class xa{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,s,c){return this._helper.interpolatePadding(e,s,c)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,s,c=!0){this._helper.resize(e,s,c)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,s){this._helper.overrideNearFarZ(e,s)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,s){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=s,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new zr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,s)=>this.getConstrained(e,s)}),this._globeness=1,this._mercatorTransform=new Si,this._verticalPerspectiveTransform=new ba}clone(){const e=new xa;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){const s=this._mercatorTransform.getProjectionData(e),c=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?c.mainMatrix:s.mainMatrix,clippingPlane:c.clippingPlane,tileMercatorCoords:c.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:s.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return a.bk(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return a.bk(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,s,c){const p=this._mercatorTransform.getPitchedTextCorrection(e,s,c),g=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,s,c);return a.bk(p,g,this._globeness)}projectTileCoordinates(e,s,c,p){return this.currentTransform.projectTileCoordinates(e,s,c,p)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,s){return this.currentTransform.lngLatToCameraDepth(e,s)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,s){return this.currentTransform.getConstrained(e,s)}calculateCenterFromCameraLngLatAlt(e,s,c,p){return this._helper.calculateCenterFromCameraLngLatAlt(e,s,c,p)}setLocationAtPoint(e,s){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,s),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,s),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,s){return this.currentTransform.locationToScreenPoint(e,s)}screenPointToMercatorCoordinate(e,s){return this.currentTransform.screenPointToMercatorCoordinate(e,s)}screenPointToLocation(e,s){return this.currentTransform.screenPointToLocation(e,s)}
vendor: 34,336 bytes, line 826
826isPointOnMapSurface(e,s){return this.currentTransform.isPointOnMapSurface(e,s)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,s){return this.currentTransform.getMatrixForModel(e,s)}getProjectionDataForCustomLayer(e=!0){const s=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return s;const c=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return c.fallbackMatrix=s.mainMatrix,c}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class jr{get useGlobeControls(){return!0}handlePanInertia(e,s){const c=qh(e,s);return Math.abs(c.lng-s.center.lng)>180&&(c.lng=s.center.lng+179.5*Math.sign(c.lng-s.center.lng)),{easingCenter:c,easingOffset:new a.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,s){const c=e.around,p=s.screenPointToLocation(c);e.bearingDelta&&s.setBearing(s.bearing+e.bearingDelta),e.pitchDelta&&s.setPitch(s.pitch+e.pitchDelta),e.rollDelta&&s.setRoll(s.roll+e.rollDelta);const g=s.zoom;e.zoomDelta&&s.setZoom(s.zoom+e.zoomDelta);const b=s.zoom-g;if(b===0)return;const T=a.bA(s.center.lng,p.lng),S=T/(Math.abs(T/180)+1),C=a.bA(s.center.lat,p.lat),E=s.getRayDirectionFromPixel(c),j=s.cameraPosition,A=-1*a.aX(j,E),R=a.bp();a.aS(R,j,[E[0]*A,E[1]*A,E[2]*A]);const V=a.aZ(R)-1,Y=Math.exp(.5*-Math.max(V-.3,0)),X=Mo(s.worldSize,s.center.lat)/Math.min(s.width,s.height),J=a.bn(X,.9,.5,1,.25),Q=(1-a.af(-b))*Math.min(Y,J),ne=s.center.lat,te=s.zoom,le=new a.S(s.center.lng+S*Q,a.ah(s.center.lat+C*Q,-a.ai,a.ai));s.setLocationAtPoint(p,c);const pe=s.center,ie=a.bn(Math.abs(T),45,85,0,1),me=a.bn(X,.75,.35,0,1),Oe=Math.pow(Math.max(ie,me),.25),ve=a.bA(pe.lng,le.lng),we=a.bA(pe.lat,le.lat);s.setCenter(new a.S(pe.lng+ve*Oe,pe.lat+we*Oe).wrap()),s.setZoom(te+Yi(ne,s.center.lat))}handleMapControlsPan(e,s,c){if(!e.panDelta)return;const p=s.center.lat,g=s.zoom;s.setCenter(qh(e.panDelta,s).wrap()),s.setZoom(g+Yi(p,s.center.lat))}cameraForBoxAndBearing(e,s,c,p,g){const b=tn(e,s,c,p,g),T=s.left/g.width*2-1,S=(g.width-s.right)/g.width*2-1,C=s.top/g.height*-2+1,E=(g.height-s.bottom)/g.height*-2+1,j=a.bA(c.getWest(),c.getEast())<0,A=j?c.getEast():c.getWest(),R=j?c.getWest():c.getEast(),V=Math.max(c.getNorth(),c.getSouth()),Y=Math.min(c.getNorth(),c.getSouth()),X=A+.5*a.bA(A,R),J=V+.5*a.bA(V,Y),Q=g.clone();Q.setCenter(b.center),Q.setBearing(b.bearing),Q.setPitch(0),Q.setRoll(0),Q.setZoom(b.zoom);const ne=Q.modelViewProjectionMatrix,te=[gr(c.getNorthWest()),gr(c.getNorthEast()),gr(c.getSouthWest()),gr(c.getSouthEast()),gr(new a.S(R,J)),gr(new a.S(A,J)),gr(new a.S(X,V)),gr(new a.S(X,Y))],le=gr(b.center);let pe=Number.POSITIVE_INFINITY;for(const ie of te)T<0&&(pe=jr.getLesserNonNegativeNonNull(pe,jr.solveVectorScale(ie,le,ne,"x",T))),S>0&&(pe=jr.getLesserNonNegativeNonNull(pe,jr.solveVectorScale(ie,le,ne,"x",S))),C>0&&(pe=jr.getLesserNonNegativeNonNull(pe,jr.solveVectorScale(ie,le,ne,"y",C))),E<0&&(pe=jr.getLesserNonNegativeNonNull(pe,jr.solveVectorScale(ie,le,ne,"y",E)));if(Number.isFinite(pe)&&pe!==0)return b.zoom=Q.zoom+a.ak(pe),b;Zh()}handleJumpToCenterZoom(e,s){const c=e.center.lat,p=e.getConstrained(s.center?a.S.convert(s.center):e.center,e.zoom).center;e.setCenter(p.wrap());const g=s.zoom!==void 0?+s.zoom:e.zoom+Yi(c,p.lat);e.zoom!==g&&e.setZoom(g)}handleEaseTo(e,s){const c=e.zoom,p=e.center,g=e.padding,b={roll:e.roll,pitch:e.pitch,bearing:e.bearing},T={roll:s.roll===void 0?e.roll:s.roll,pitch:s.pitch===void 0?e.pitch:s.pitch,bearing:s.bearing===void 0?e.bearing:s.bearing},S=s.zoom!==void 0,C=!e.isPaddingEqual(s.padding);let E=!1;const j=s.center?a.S.convert(s.center):p,A=e.getConstrained(j,c).center;ul(e,A);const R=e.clone();R.setCenter(A),R.setZoom(S?+s.zoom:c+Yi(p.lat,j.lat)),R.setBearing(s.bearing);const V=new a.P(a.ah(e.centerPoint.x+s.offsetAsPoint.x,0,e.width),a.ah(e.centerPoint.y+s.offsetAsPoint.y,0,e.height));R.setLocationAtPoint(A,V);const Y=(s.offset&&s.offsetAsPoint.mag())>0?R.center:A,X=S?+s.zoom:c+Yi(p.lat,Y.lat),J=c+Yi(p.lat,0),Q=X+Yi(Y.lat,0),ne=a.bA(p.lng,Y.lng),te=a.bA(p.lat,Y.lat),le=a.af(Q-J);return E=X!==c,{easeFunc:pe=>{if(a.be(b,T)||Nr({startEulerAngles:b,endEulerAngles:T,tr:e,k:pe,useSlerp:b.roll!=T.roll}),C&&e.interpolatePadding(g,s.padding,pe),s.around)a.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(s.around,s.aroundPoint);else{const ie=Q>J?Math.min(2,le):Math.max(.5,le),me=Math.pow(ie,1-pe),Oe=$c(p,ne,te,pe*me);e.setCenter(Oe.wrap())}if(E){const ie=a.C.number(J,Q,pe)+Yi(0,e.center.lat);e.setZoom(ie)}},isZooming:E,elevationCenter:Y}}handleFlyTo(e,s){const c=s.zoom!==void 0,p=e.center,g=e.zoom,b=e.padding,T=!e.isPaddingEqual(s.padding),S=e.getConstrained(a.S.convert(s.center||s.locationAtOffset),g).center,C=c?+s.zoom:e.zoom+Yi(e.center.lat,S.lat),E=e.clone();E.setCenter(S),E.setZoom(C),E.setBearing(s.bearing);const j=new a.P(a.ah(e.centerPoint.x+s.offsetAsPoint.x,0,e.width),a.ah(e.centerPoint.y+s.offsetAsPoint.y,0,e.height));E.setLocationAtPoint(S,j);const A=E.center;ul(e,A);const R=(function(te,le,pe){const ie=gr(le),me=gr(pe),Oe=a.aX(ie,me),ve=Math.acos(Oe),we=ml(te);return ve/(2*Math.PI)*we})(e,p,A),V=g+Yi(p.lat,0),Y=C+Yi(A.lat,0),X=a.af(Y-V);let J;if(typeof s.minZoom=="number"){const te=+s.minZoom+Yi(A.lat,0),le=Math.min(te,V,Y)+Yi(0,A.lat),pe=e.getConstrained(A,le).zoom+Yi(A.lat,0);J=a.af(pe-V)}const Q=a.bA(p.lng,A.lng),ne=a.bA(p.lat,A.lat);return{easeFunc:(te,le,pe,ie)=>{const me=$c(p,Q,ne,pe);T&&e.interpolatePadding(b,s.padding,te);const Oe=te===1?A:me;e.setCenter(Oe.wrap());const ve=V+a.ak(le);e.setZoom(te===1?C:ve+Yi(0,Oe.lat))},scaleOfZoom:X,targetCenter:A,scaleOfMinZoom:J,pixelPathLength:R}}static solveVectorScale(e,s,c,p,g){const b=p==="x"?[c[0],c[4],c[8],c[12]]:[c[1],c[5],c[9],c[13]],T=[c[3],c[7],c[11],c[15]],S=e[0]*b[0]+e[1]*b[1]+e[2]*b[2],C=e[0]*T[0]+e[1]*T[1]+e[2]*T[2],E=s[0]*b[0]+s[1]*b[1]+s[2]*b[2],j=s[0]*T[0]+s[1]*T[1]+s[2]*T[2];return E+g*C===S+g*j||T[3]*(S-E)+b[3]*(j-C)+S*j==E*C?null:(E+b[3]-g*j-g*T[3])/(E-S-g*j+g*C)}static getLesserNonNegativeNonNull(e,s){return s!==null&&s>=0&&s<e?s:e}}class Wh{constructor(e){this._globe=e,this._mercatorCameraHelper=new Ar,this._verticalPerspectiveCameraHelper=new jr}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,s){return this.currentHelper.handlePanInertia(e,s)}handleMapControlsRollPitchBearingZoom(e,s){return this.currentHelper.handleMapControlsRollPitchBearingZoom(e,s)}handleMapControlsPan(e,s,c){this.currentHelper.handleMapControlsPan(e,s,c)}cameraForBoxAndBearing(e,s,c,p,g){return this.currentHelper.cameraForBoxAndBearing(e,s,c,p,g)}handleJumpToCenterZoom(e,s){this.currentHelper.handleJumpToCenterZoom(e,s)}handleEaseTo(e,s){return this.currentHelper.handleEaseTo(e,s)}handleFlyTo(e,s){return this.currentHelper.handleFlyTo(e,s)}}const gl=(f,e)=>a.y(f,e&&e.filter((s=>s.identifier!=="source.canvas"))),ff=a.bE();class Uc extends a.E{constructor(e,s={}){var c,p;super(),this._rtlPluginLoaded=()=>{for(const b in this.sourceCaches){const T=this.sourceCaches[b].getSource().type;T!=="vector"&&T!=="geojson"||this.sourceCaches[b].reload()}},this.map=e,this.dispatcher=new At(ct(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((b,T)=>this.getGlyphs(b,T))),this.dispatcher.registerMessageHandler("GI",((b,T)=>this.getImages(b,T))),this.imageManager=new Ge,this.imageManager.setEventedParent(this);const g=((c=e._container)===null||c===void 0?void 0:c.lang)||typeof document<"u"&&((p=document.documentElement)===null||p===void 0?void 0:p.lang)||void 0;this.glyphManager=new Et(e._requestManager,s.localIdeographFontFamily,g),this.lineAtlas=new Ft(256,512),this.crossTileSymbolIndex=new Co,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.bF,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",a.bG()),pi().on(Ot,this._rtlPluginLoaded),this.on("data",(b=>{if(b.dataType!=="source"||b.sourceDataType!=="metadata")return;const T=this.sourceCaches[b.sourceId];if(!T)return;const S=T.getSource();if(S&&S.vectorLayerIds)for(const C in this._layers){const E=this._layers[C];E.source===S.id&&this._validateLayer(E)}}))}setGlobalStateProperty(e,s){var c,p,g;this._checkLoaded();const b=s===null?(g=(p=(c=this.stylesheet.state)===null||c===void 0?void 0:c[e])===null||p===void 0?void 0:p.default)!==null&&g!==void 0?g:null:s;if(a.bH(b,this._globalState[e]))return this;this._globalState[e]=b,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();const s=[];for(const c in e)!a.bH(this._globalState[c],e[c].default)&&(s.push(c),this._globalState[c]=e[c].default);this._applyGlobalStateChanges(s)}_applyGlobalStateChanges(e){if(e.length===0)return;const s=new Set,c={};for(const p of e){c[p]=this._globalState[p];for(const g in this._layers){const b=this._layers[g],T=b.getLayoutAffectingGlobalStateRefs(),S=b.getPaintAffectingGlobalStateRefs();if(T.has(p)&&s.add(b.source),S.has(p))for(const{name:C,value:E}of S.get(p))this._updatePaintProperty(b,C,E)}}this.dispatcher.broadcast("UGS",c);for(const p in this.sourceCaches)s.has(p)&&(this._reloadSource(p),this._changed=!0)}loadURL(e,s={},c){this.fire(new a.l("dataloading",{dataType:"style"})),s.validate=typeof s.validate!="boolean"||s.validate;const p=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const g=this._loadStyleRequest;a.j(p,this._loadStyleRequest).then((b=>{this._loadStyleRequest=null,this._load(b.data,s,c)})).catch((b=>{this._loadStyleRequest=null,b&&!g.signal.aborted&&this.fire(new a.k(b))}))}loadJSON(e,s={},c){this.fire(new a.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,W.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,s.validate=s.validate!==!1,this._load(e,s,c)})).catch((()=>{}))}loadEmpty(){this.fire(new a.l("dataloading",{dataType:"style"})),this._load(ff,{validate:!1})}_load(e,s,c){var p,g;let b=s.transformStyle?s.transformStyle(c,e):e;if(!s.validate||!gl(this,a.z(b))){b=Object.assign({},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 qt(this.stylesheet.light),this._setProjectionInternal(((p=this.stylesheet.projection)===null||p===void 0?void 0:p.type)||"mercator"),this.sky=new ni(this.stylesheet.sky),this.map.setTerrain((g=this.stylesheet.terrain)!==null&&g!==void 0?g:null),this.fire(new a.l("data",{dataType:"style"})),this.fire(new a.l("style.load"))}}_createLayers(){var e;const s=a.bI(this.stylesheet.layers);this.setGlobalState((e=this.stylesheet.state)!==null&&e!==void 0?e:null),this.dispatcher.broadcast("SL",s),this._order=s.map((c=>c.id)),this._layers={},this._serializedLayers=null;for(const c of s){const p=a.bJ(c,this._globalState);p.setEventedParent(this,{layer:{id:c.id}}),this._layers[c.id]=p}}_loadSprite(e,s=!1,c=void 0){let p;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(g,b,T,S){return a._(this,void 0,void 0,(function*(){const C=Ce(g),E=T>1?"@2x":"",j={},A={};for(const{id:R,url:V}of C){const Y=b.transformRequest(Re(V,E,".json"),"SpriteJSON");j[R]=a.j(Y,S);const X=b.transformRequest(Re(V,E,".png"),"SpriteImage");A[R]=Te.getImage(X,S)}return yield Promise.all([...Object.values(j),...Object.values(A)]),(function(R,V){return a._(this,void 0,void 0,(function*(){const Y={};for(const X in R){Y[X]={};const J=W.getImageCanvasContext((yield V[X]).data),Q=(yield R[X]).data;for(const ne in Q){const{width:te,height:le,x:pe,y:ie,sdf:me,pixelRatio:Oe,stretchX:ve,stretchY:we,content:Se,textFitWidth:Je,textFitHeight:Ze}=Q[ne];Y[X][ne]={data:null,pixelRatio:Oe,sdf:me,stretchX:ve,stretchY:we,content:Se,textFitWidth:Je,textFitHeight:Ze,spriteData:{width:te,height:le,x:pe,y:ie,context:J}}}}return Y}))})(j,A)}))})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((g=>{if(this._spriteRequest=null,g)for(const b in g){this._spritesImagesIds[b]=[];const T=this._spritesImagesIds[b]?this._spritesImagesIds[b].filter((S=>!(S in g))):[];for(const S of T)this.imageManager.removeImage(S),this._changedImages[S]=!0;for(const S in g[b]){const C=b==="default"?S:`${b}:${S}`;this._spritesImagesIds[b].push(C),C in this.imageManager.images?this.imageManager.updateImage(C,g[b][S],!1):this.imageManager.addImage(C,g[b][S]),s&&(this._changedImages[C]=!0)}}})).catch((g=>{this._spriteRequest=null,p=g,this.fire(new a.k(p))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),s&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"})),c&&c(p)}))}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}_validateLayer(e){const s=this.sourceCaches[e.source];if(!s)return;const c=e.sourceLayer;if(!c)return;const p=s.getSource();(p.type==="geojson"||p.vectorLayerIds&&p.vectorLayerIds.indexOf(c)===-1)&&this.fire(new a.k(new Error(`Source layer "${c}" does not exist on source "${p.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,s=!1){const c=this._serializedAllLayers();if(!e||e.length===0)return Object.values(s?a.bK(c):c);const p=[];for(const g of e)if(c[g]){const b=s?a.bK(c[g]):c[g];p.push(b)}return p}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const s=Object.keys(this._layers);for(const c of s){const p=this._layers[c];p.type!=="custom"&&(e[c]=p.serialize())}return e}hasTransitions(){var e,s,c;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((s=this.sky)===null||s===void 0)&&s.hasTransition()||!((c=this.projection)===null||c===void 0)&&c.hasTransition())return!0;for(const p in this.sourceCaches)if(this.sourceCaches[p].hasTransition())return!0;for(const p in this._layers)if(this._layers[p].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const s=this._changed;if(s){const p=Object.keys(this._updatedLayers),g=Object.keys(this._removedLayers);(p.length||g.length)&&this._updateWorkerLayers(p,g);for(const b in this._updatedSources){const T=this._updatedSources[b];if(T==="reload")this._reloadSource(b);else{if(T!=="clear")throw new Error(`Invalid action ${T}`);this._clearSource(b)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const b in this._updatedPaintProps)this._layers[b].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const c={};for(const p in this.sourceCaches){const g=this.sourceCaches[p];c[p]=g.used,g.used=!1}for(const p of this._order){const g=this._layers[p];g.recalculate(e,this._availableImages),!g.isHidden(e.zoom)&&g.source&&(this.sourceCaches[g.source].used=!0)}for(const p in c){const g=this.sourceCaches[p];!!c[p]!=!!g.used&&g.fire(new a.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:p}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,s&&this.fire(new a.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const s in this.sourceCaches)this.sourceCaches[s].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,s){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:s})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,s={}){var c;this._checkLoaded();const p=this.serialize();if(e=s.transformStyle?s.transformStyle(p,e):e,((c=s.validate)===null||c===void 0||c)&&gl(this,a.z(e)))return!1;(e=a.bK(e)).layers=a.bI(e.layers);const g=a.bL(p,e),b=this._getOperationsToPerform(g);if(b.unimplemented.length>0)throw new Error(`Unimplemented: ${b.unimplemented.join(", ")}.`);if(b.operations.length===0)return!1;for(const T of b.operations)T();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const s=[],c=[];for(const p of e)switch(p.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":s.push((()=>this.addLayer.apply(this,p.args)));break;case"removeLayer":s.push((()=>this.removeLayer.apply(this,p.args)));break;case"setPaintProperty":s.push((()=>this.setPaintProperty.apply(this,p.args)));break;case"setLayoutProperty":s.push((()=>this.setLayoutProperty.apply(this,p.args)));break;case"setFilter":s.push((()=>this.setFilter.apply(this,p.args)));break;case"addSource":s.push((()=>this.addSource.apply(this,p.args)));break;case"removeSource":s.push((()=>this.removeSource.apply(this,p.args)));break;case"setLayerZoomRange":s.push((()=>this.setLayerZoomRange.apply(this,p.args)));break;case"setLight":s.push((()=>this.setLight.apply(this,p.args)));break;case"setGeoJSONSourceData":s.push((()=>this.setGeoJSONSourceData.apply(this,p.args)));break;case"setGlyphs":s.push((()=>this.setGlyphs.apply(this,p.args)));break;case"setSprite":s.push((()=>this.setSprite.apply(this,p.args)));break;case"setTerrain":s.push((()=>this.map.setTerrain.apply(this,p.args)));break;case"setSky":s.push((()=>this.setSky.apply(this,p.args)));break;case"setProjection":this.setProjection.apply(this,p.args);break;case"setGlobalState":s.push((()=>this.setGlobalState.apply(this,p.args)));break;case"setTransition":s.push((()=>{}));break;default:c.push(p.command)}return{operations:s,unimplemented:c}}addImage(e,s){if(this.getImage(e))return this.fire(new a.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,s),this._afterImageUpdated(e)}updateImage(e,s){this.imageManager.updateImage(e,s)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new a.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,s,c={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!s.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(s).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(s.type)>=0&&this._validate(a.z.source,`sources.${e}`,s,null,c))return;this.map&&this.map._collectResourceTiming&&(s.collectResourceTiming=!0);const p=this.sourceCaches[e]=new ei(e,s,this.dispatcher);p.style=this,p.setEventedParent(this,(()=>({isSourceLoaded:p.loaded(),source:p.serialize(),sourceId:e}))),p.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const c in this._layers)if(this._layers[c].source===e)return this.fire(new a.k(new Error(`Source "${e}" cannot be removed while layer "${c}" is using it.`)));const s=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],s.fire(new a.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),s.setEventedParent(null),s.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,s){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const c=this.sourceCaches[e].getSource();if(c.type!=="geojson")throw new Error(`geojsonSource.type is ${c.type}, which is !== 'geojson`);c.setData(s),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,s,c={}){this._checkLoaded();const p=e.id;if(this.getLayer(p))return void this.fire(new a.k(new Error(`Layer "${p}" already exists on this map.`)));let g;if(e.type==="custom"){if(gl(this,a.bM(e)))return;g=a.bJ(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(p,e.source),e=a.bK(e),e=a.e(e,{source:p})),this._validate(a.z.layer,`layers.${p}`,e,{arrayIndex:-1},c))return;g=a.bJ(e,this._globalState),this._validateLayer(g),g.setEventedParent(this,{layer:{id:p}})}const b=s?this._order.indexOf(s):this._order.length;if(s&&b===-1)this.fire(new a.k(new Error(`Cannot add layer "${p}" before non-existing layer "${s}".`)));else{if(this._order.splice(b,0,p),this._layerOrderChanged=!0,this._layers[p]=g,this._removedLayers[p]&&g.source&&g.type!=="custom"){const T=this._removedLayers[p];delete this._removedLayers[p],T.type!==g.type?this._updatedSources[g.source]="clear":(this._updatedSources[g.source]="reload",this.sourceCaches[g.source].pause())}this._updateLayer(g),g.onAdd&&g.onAdd(this.map)}}moveLayer(e,s){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new a.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===s)return;const c=this._order.indexOf(e);this._order.splice(c,1);const p=s?this._order.indexOf(s):this._order.length;s&&p===-1?this.fire(new a.k(new Error(`Cannot move layer "${e}" before non-existing layer "${s}".`))):(this._order.splice(p,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const s=this._layers[e];if(!s)return void this.fire(new a.k(new Error(`Cannot remove non-existing layer "${e}".`)));s.setEventedParent(null);const c=this._order.indexOf(e);this._order.splice(c,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=s,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],s.onRemove&&s.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,s,c){this._checkLoaded();const p=this.getLayer(e);p?p.minzoom===s&&p.maxzoom===c||(s!=null&&(p.minzoom=s),c!=null&&(p.maxzoom=c),this._updateLayer(p)):this.fire(new a.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,s,c={}){this._checkLoaded();const p=this.getLayer(e);if(p){if(!a.bH(p.filter,s))return s==null?(p.setFilter(void 0),void this._updateLayer(p)):void(this._validate(a.z.filter,`layers.${p.id}.filter`,s,null,c)||(p.setFilter(a.bK(s)),this._updateLayer(p)))}else this.fire(new a.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return a.bK(this.getLayer(e).filter)}setLayoutProperty(e,s,c,p={}){this._checkLoaded();const g=this.getLayer(e);g?a.bH(g.getLayoutProperty(s),c)||(g.setLayoutProperty(s,c,p),this._updateLayer(g)):this.fire(new a.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,s){const c=this.getLayer(e);if(c)return c.getLayoutProperty(s);this.fire(new a.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,s,c,p={}){this._checkLoaded();const g=this.getLayer(e);g?a.bH(g.getPaintProperty(s),c)||this._updatePaintProperty(g,s,c,p):this.fire(new a.k(new Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,s,c,p={}){e.setPaintProperty(s,c,p)&&this._updateLayer(e),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null}getPaintProperty(e,s){return this.getLayer(e).getPaintProperty(s)}setFeatureState(e,s){this._checkLoaded();const c=e.source,p=e.sourceLayer,g=this.sourceCaches[c];if(g===void 0)return void this.fire(new a.k(new Error(`The source '${c}' does not exist in the map's style.`)));const b=g.getSource().type;b==="geojson"&&p?this.fire(new a.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):b!=="vector"||p?(e.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),g.setFeatureState(p,e.id,s)):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,s){this._checkLoaded();const c=e.source,p=this.sourceCaches[c];if(p===void 0)return void this.fire(new a.k(new Error(`The source '${c}' does not exist in the map's style.`)));const g=p.getSource().type,b=g==="vector"?e.sourceLayer:void 0;g!=="vector"||b?s&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new a.k(new Error("A feature id is required to remove its specific state property."))):p.removeFeatureState(b,e.id,s):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const s=e.source,c=e.sourceLayer,p=this.sourceCaches[s];if(p!==void 0)return p.getSource().type!=="vector"||c?(e.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),p.getFeatureState(c,e.id)):void this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.k(new Error(`The source '${s}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=a.bN(this.sourceCaches,(g=>g.serialize())),s=this._serializeByIds(this._order,!0),c=this.map.getTerrain()||void 0,p=this.stylesheet;return a.bO({version:p.version,name:p.name,metadata:p.metadata,light:p.light,sky:p.sky,center:p.center,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,sprite:p.sprite,glyphs:p.glyphs,transition:p.transition,projection:p.projection,sources:e,layers:s,terrain:c},(g=>g!==void 0))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const s=b=>this._layers[b].type==="fill-extrusion",c={},p=[];for(let b=this._order.length-1;b>=0;b--){const T=this._order[b];if(s(T)){c[T]=b;for(const S of e){const C=S[T];if(C)for(const E of C)p.push(E)}}}p.sort(((b,T)=>T.intersectionZ-b.intersectionZ));const g=[];for(let b=this._order.length-1;b>=0;b--){const T=this._order[b];if(s(T))for(let S=p.length-1;S>=0;S--){const C=p[S].feature;if(c[C.layer.id]<b)break;g.push(C),p.pop()}else for(const S of e){const C=S[T];if(C)for(const E of C)g.push(E.feature)}}return g}queryRenderedFeatures(e,s,c){s&&s.filter&&this._validate(a.z.filter,"queryRenderedFeatures.filter",s.filter,null,s);const p={};if(s&&s.layers){if(!(Array.isArray(s.layers)||s.layers instanceof Set))return this.fire(new a.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const C of s.layers){const E=this._layers[C];if(!E)return this.fire(new a.k(new Error(`The layer '${C}' does not exist in the map's style and cannot be queried for features.`))),[];p[E.source]=!0}}const g=[];s.availableImages=this._availableImages;const b=this._serializedAllLayers(),T=s.layers instanceof Set?s.layers:Array.isArray(s.layers)?new Set(s.layers):null,S=Object.assign(Object.assign({},s),{layers:T,globalState:this._globalState});for(const C in this.sourceCaches)s.layers&&!p[C]||g.push(st(this.sourceCaches[C],this._layers,b,e,S,c,this.map.terrain?(E,j,A)=>this.map.terrain.getElevation(E,j,A):void 0));return this.placement&&g.push((function(C,E,j,A,R,V,Y){const X={},J=V.queryRenderedSymbols(A),Q=[];for(const ne of Object.keys(J).map(Number))Q.push(Y[ne]);Q.sort(vt);for(const ne of Q){const te=ne.featureIndex.lookupSymbolFeatures(J[ne.bucketInstanceId],E,ne.bucketIndex,ne.sourceLayerIndex,{filterSpec:R.filter,globalState:R.globalState},R.layers,R.availableImages,C);for(const le in te){const pe=X[le]=X[le]||[],ie=te[le];ie.sort(((me,Oe)=>{const ve=ne.featureSortOrder;if(ve){const we=ve.indexOf(me.featureIndex);return ve.indexOf(Oe.featureIndex)-we}return Oe.featureIndex-me.featureIndex}));for(const me of ie)pe.push(me)}}return(function(ne,te,le){for(const pe in ne)for(const ie of ne[pe])Ht(ie,le[te[pe].source]);return ne})(X,C,j)})(this._layers,b,this.sourceCaches,e,S,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(g)}querySourceFeatures(e,s){s?.filter&&this._validate(a.z.filter,"querySourceFeatures.filter",s.filter,null,s);const c=this.sourceCaches[e];return c?(function(p,g){const b=p.getRenderableIds().map((C=>p.getTileByID(C))),T=[],S={};for(let C=0;C<b.length;C++){const E=b[C],j=E.tileID.canonical.key;S[j]||(S[j]=!0,E.querySourceFeatures(T,g))}return T})(c,s?Object.assign(Object.assign({},s),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,s={}){this._checkLoaded();const c=this.light.getLight();let p=!1;for(const b in e)if(!a.bH(e[b],c[b])){p=!0;break}if(!p)return;const g={now:W.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,s),this.light.updateTransitions(g)}getProjection(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.projection}setProjection(e){if(this._checkLoaded(),this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=e,this._setProjectionInternal(e.type)}getSky(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.sky}setSky(e,s={}){this._checkLoaded();const c=this.getSky();let p=!1;if(!e&&!c)return;if(e&&!c)p=!0;else if(!e&&c)p=!0;else for(const b in e)if(!a.bH(e[b],c[b])){p=!0;break}if(!p)return;const g={now:W.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,s),this.sky.updateTransitions(g)}_setProjectionInternal(e){const s=(function(c){if(Array.isArray(c)){const p=new fl({type:c});return{projection:p,transform:new xa,cameraHelper:new Wh(p)}}switch(c){case"mercator":return{projection:new ri,transform:new Si,cameraHelper:new Ar};case"globe":{const p=new fl({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:p,transform:new xa,cameraHelper:new Wh(p)}}case"vertical-perspective":return{projection:new fa,transform:new ba,cameraHelper:new jr};default:return a.w(`Unknown projection name: ${c}. Falling back to mercator projection.`),{projection:new ri,transform:new Si,cameraHelper:new Ar}}})(e);this.projection=s.projection,this.map.migrateProjection(s.transform,s.cameraHelper);for(const c in this.sourceCaches)this.sourceCaches[c].reload()}_validate(e,s,c,p,g={}){return(!g||g.validate!==!1)&&gl(this,e.call(a.z,a.e({key:s,style:this.serialize(),value:c,styleSpec:a.v},p)))}_remove(e=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),pi().off(Ot,this._rtlPluginLoaded);for(const s in this._layers)this._layers[s].setEventedParent(null);for(const s in this.sourceCaches){const c=this.sourceCaches[s];c.setEventedParent(null),c.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const s in this.sourceCaches)this.sourceCaches[s].update(e,this.map.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,s,c,p,g=!1){let b=!1,T=!1;const S={};for(const C of this._order){const E=this._layers[C];if(E.type!=="symbol")continue;if(!S[E.source]){const A=this.sourceCaches[E.source];S[E.source]=A.getRenderableIds(!0).map((R=>A.getTileByID(R))).sort(((R,V)=>V.tileID.overscaledZ-R.tileID.overscaledZ||(R.tileID.isLessThan(V.tileID)?-1:1)))}const j=this.crossTileSymbolIndex.addLayer(E,S[E.source],e.center.lng);b=b||j}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((g=g||this._layerOrderChanged||c===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(W.now(),e.zoom))&&(this.pauseablePlacement=new Lc(e,this.map.terrain,this._order,g,s,c,p,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,S),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(W.now()),T=!0),b&&this.pauseablePlacement.placement.setStale()),T||b)for(const C of this._order){const E=this._layers[C];E.type==="symbol"&&this.placement.updateLayerOpacities(E,S[E.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(W.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,s){return a._(this,void 0,void 0,(function*(){const c=yield this.imageManager.getImages(s.icons);this._updateTilesForChangedImages();const p=this.sourceCaches[s.source];return p&&p.setDependencies(s.tileID.key,s.type,s.icons),c}))}getGlyphs(e,s){return a._(this,void 0,void 0,(function*(){const c=yield this.glyphManager.getGlyphs(s.stacks),p=this.sourceCaches[s.source];return p&&p.setDependencies(s.tileID.key,s.type,[""]),c}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,s={}
vendor: 1,035 bytes, line 826
826){this._checkLoaded(),e&&this._validate(a.z.glyphs,"glyphs",e,null,s)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,s,c={},p){this._checkLoaded();const g=[{id:e,url:s}],b=[...Ce(this.stylesheet.sprite),...g];this._validate(a.z.sprite,"sprite",b,null,c)||(this.stylesheet.sprite=b,this._loadSprite(g,!0,p))}removeSprite(e){this._checkLoaded();const s=Ce(this.stylesheet.sprite);if(s.find((c=>c.id===e))){if(this._spritesImagesIds[e])for(const c of this._spritesImagesIds[e])this.imageManager.removeImage(c),this._changedImages[c]=!0;s.splice(s.findIndex((c=>c.id===e)),1),this.stylesheet.sprite=s.length>0?s:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}else this.fire(new a.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return Ce(this.stylesheet.sprite)}setSprite(e,s={}
vendor: 53,115 bytes, lines 826-828
826,c){this._checkLoaded(),e&&this._validate(a.z.sprite,"sprite",e,null,s)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,c):(this._unloadSprite(),c&&c(null)))}}var mf=a.aJ([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class gf{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,s,c,p,g,b,T,S,C){this.context=e;let E=this.boundPaintVertexBuffers.length!==p.length;for(let j=0;!E&&j<p.length;j++)this.boundPaintVertexBuffers[j]!==p[j]&&(E=!0);!this.vao||this.boundProgram!==s||this.boundLayoutVertexBuffer!==c||E||this.boundIndexBuffer!==g||this.boundVertexOffset!==b||this.boundDynamicVertexBuffer!==T||this.boundDynamicVertexBuffer2!==S||this.boundDynamicVertexBuffer3!==C?this.freshBind(s,c,p,g,b,T,S,C):(e.bindVertexArray.set(this.vao),T&&T.bind(),g&&g.dynamicDraw&&g.bind(),S&&S.bind(),C&&C.bind())}freshBind(e,s,c,p,g,b,T,S){const C=e.numAttributes,E=this.context,j=E.gl;this.vao&&this.destroy(),this.vao=E.createVertexArray(),E.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=s,this.boundPaintVertexBuffers=c,this.boundIndexBuffer=p,this.boundVertexOffset=g,this.boundDynamicVertexBuffer=b,this.boundDynamicVertexBuffer2=T,this.boundDynamicVertexBuffer3=S,s.enableAttributes(j,e);for(const A of c)A.enableAttributes(j,e);b&&b.enableAttributes(j,e),T&&T.enableAttributes(j,e),S&&S.enableAttributes(j,e),s.bind(),s.setVertexAttribPointers(j,e,g);for(const A of c)A.bind(),A.setVertexAttribPointers(j,e,g);b&&(b.bind(),b.setVertexAttribPointers(j,e,g)),p&&p.bind(),T&&(T.bind(),T.setVertexAttribPointers(j,e,g)),S&&(S.bind(),S.setVertexAttribPointers(j,e,g)),E.currentNumAttributes=C}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const _l=(f,e,s,c,p)=>({u_texture:0,u_ele_delta:f,u_fog_matrix:e,u_fog_color:s?s.properties.get("fog-color"):a.bf.white,u_fog_ground_blend:s?s.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:p?0:s?s.calculateFogBlendOpacity(c):0,u_horizon_color:s?s.properties.get("horizon-color"):a.bf.white,u_horizon_fog_blend:s?s.properties.get("horizon-fog-blend"):1,u_is_globe_mode:p?1:0}),Vc={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function qs(f){const e=[];for(let s=0;s<f.length;s++){if(f[s]===null)continue;const c=f[s].split(" ");e.push(c.pop())}return e}class Gc{constructor(e,s,c,p,g,b,T,S,C=[]){const E=e.gl;this.program=E.createProgram();const j=qs(s.staticAttributes),A=c?c.getBinderAttributes():[],R=j.concat(A),V=gn.prelude.staticUniforms?qs(gn.prelude.staticUniforms):[],Y=T.staticUniforms?qs(T.staticUniforms):[],X=s.staticUniforms?qs(s.staticUniforms):[],J=c?c.getBinderUniforms():[],Q=V.concat(Y).concat(X).concat(J),ne=[];for(const ve of Q)ne.indexOf(ve)<0&&ne.push(ve);const te=c?c.defines():[];Nn(E)&&te.unshift("#version 300 es"),g&&te.push("#define OVERDRAW_INSPECTOR;"),b&&te.push("#define TERRAIN3D;"),S&&te.push(S),C&&te.push(...C);let le=te.concat(gn.prelude.fragmentSource,T.fragmentSource,s.fragmentSource).join(`
827`),pe=te.concat(gn.prelude.vertexSource,T.vertexSource,s.vertexSource).join(`
828`);Nn(E)||(le=(function(ve){return ve.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(le),pe=(function(ve){return ve.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})(pe));const ie=E.createShader(E.FRAGMENT_SHADER);if(E.isContextLost())return void(this.failedToCreate=!0);if(E.shaderSource(ie,le),E.compileShader(ie),!E.getShaderParameter(ie,E.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${E.getShaderInfoLog(ie)}`);E.attachShader(this.program,ie);const me=E.createShader(E.VERTEX_SHADER);if(E.isContextLost())return void(this.failedToCreate=!0);if(E.shaderSource(me,pe),E.compileShader(me),!E.getShaderParameter(me,E.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${E.getShaderInfoLog(me)}`);E.attachShader(this.program,me),this.attributes={};const Oe={};this.numAttributes=R.length;for(let ve=0;ve<this.numAttributes;ve++)R[ve]&&(E.bindAttribLocation(this.program,ve,R[ve]),this.attributes[R[ve]]=ve);if(E.linkProgram(this.program),!E.getProgramParameter(this.program,E.LINK_STATUS))throw new Error(`Program failed to link: ${E.getProgramInfoLog(this.program)}`);E.deleteShader(me),E.deleteShader(ie);for(let ve=0;ve<ne.length;ve++){const we=ne[ve];if(we&&!Oe[we]){const Se=E.getUniformLocation(this.program,we);Se&&(Oe[we]=Se)}}this.fixedUniforms=p(e,Oe),this.terrainUniforms=((ve,we)=>({u_depth:new a.bP(ve,we.u_depth),u_terrain:new a.bP(ve,we.u_terrain),u_terrain_dim:new a.bg(ve,we.u_terrain_dim),u_terrain_matrix:new a.bR(ve,we.u_terrain_matrix),u_terrain_unpack:new a.bS(ve,we.u_terrain_unpack),u_terrain_exaggeration:new a.bg(ve,we.u_terrain_exaggeration)}))(e,Oe),this.projectionUniforms=((ve,we)=>({u_projection_matrix:new a.bR(ve,we.u_projection_matrix),u_projection_tile_mercator_coords:new a.bS(ve,we.u_projection_tile_mercator_coords),u_projection_clipping_plane:new a.bS(ve,we.u_projection_clipping_plane),u_projection_transition:new a.bg(ve,we.u_projection_transition),u_projection_fallback_matrix:new a.bR(ve,we.u_projection_fallback_matrix)}))(e,Oe),this.binderUniforms=c?c.getUniforms(e,Oe):[]}draw(e,s,c,p,g,b,T,S,C,E,j,A,R,V,Y,X,J,Q,ne){const te=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(c),e.setStencilMode(p),e.setColorMode(g),e.setCullFace(b),S){e.activeTexture.set(te.TEXTURE2),te.bindTexture(te.TEXTURE_2D,S.depthTexture),e.activeTexture.set(te.TEXTURE3),te.bindTexture(te.TEXTURE_2D,S.texture);for(const pe in this.terrainUniforms)this.terrainUniforms[pe].set(S[pe])}if(C)for(const pe in C)this.projectionUniforms[Vc[pe]].set(C[pe]);if(T)for(const pe in this.fixedUniforms)this.fixedUniforms[pe].set(T[pe]);X&&X.setUniforms(e,this.binderUniforms,V,{zoom:Y});let le=0;switch(s){case te.LINES:le=2;break;case te.TRIANGLES:le=3;break;case te.LINE_STRIP:le=1}for(const pe of R.get()){const ie=pe.vaos||(pe.vaos={});(ie[E]||(ie[E]=new gf)).bind(e,this,j,X?X.getPaintVertexBuffers():[],A,pe.vertexOffset,J,Q,ne),te.drawElements(s,pe.primitiveLength*le,te.UNSIGNED_SHORT,pe.primitiveOffset*le*2)}}}function yl(f,e,s){const c=1/a.aC(s,1,e.transform.tileZoom),p=Math.pow(2,s.tileID.overscaledZ),g=s.tileSize*Math.pow(2,e.transform.tileZoom)/p,b=g*(s.tileID.canonical.x+s.tileID.wrap*p),T=g*s.tileID.canonical.y;return{u_image:0,u_texsize:s.imageAtlasTexture.size,u_scale:[c,f.fromScale,f.toScale],u_fade:f.t,u_pixel_coord_upper:[b>>16,T>>16],u_pixel_coord_lower:[65535&b,65535&T]}}const yn=(f,e,s,c)=>{const p=f.style.light,g=p.properties.get("position"),b=[g.x,g.y,g.z],T=a.bV();p.properties.get("anchor")==="viewport"&&a.bW(T,f.transform.bearingInRadians),a.bX(b,b,T);const S=f.transform.transformLightDirection(b),C=p.properties.get("color");return{u_lightpos:b,u_lightpos_globe:S,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[C.r,C.g,C.b],u_vertical_gradient:+e,u_opacity:s,u_fill_translate:c}},_f=(f,e,s,c,p,g,b)=>a.e(yn(f,e,s,c),yl(g,f,b),{u_height_factor:-Math.pow(2,p.overscaledZ)/b.tileSize/8}),bl=(f,e,s,c)=>a.e(yl(e,f,s),{u_fill_translate:c}),va=(f,e)=>({u_world:f,u_fill_translate:e}),wa=(f,e,s,c,p)=>a.e(bl(f,e,s,p),{u_world:c}),yf=(f,e,s,c,p)=>{const g=f.transform;let b,T,S=0;if(s.paint.get("circle-pitch-alignment")==="map"){const C=a.aC(e,1,g.zoom);b=!0,T=[C,C],S=C/(a.$*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*p}else b=!1,T=g.pixelsToGLUnits;return{u_camera_to_center_distance:g.cameraToCenterDistance,u_scale_with_map:+(s.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+b,u_device_pixel_ratio:f.pixelRatio,u_extrude_scale:T,u_globe_extrude_scale:S,u_translate:c}},xl=f=>({u_pixel_extrude_scale:[1/f.width,1/f.height]}),bf=f=>({u_viewport_size:[f.width,f.height]}),Ws=(f,e=1)=>({u_color:f,u_overlay:0,u_overlay_scale:e}),Kh=(f,e,s,c)=>{const p=a.aC(f,1,e)/(a.$*Math.pow(2,f.tileID.overscaledZ))*2*Math.PI*c;return{u_extrude_scale:a.aC(f,1,e),u_intensity:s,u_globe_extrude_scale:p}},Hc=(f,e,s,c)=>{const p=a.L();a.bY(p,0,f.width,f.height,0,0,1);const g=f.context.gl;return{u_matrix:p,u_world:[g.drawingBufferWidth,g.drawingBufferHeight],u_image:s,u_color_ramp:c,u_opacity:e.paint.get("heatmap-opacity")}},xf=(f,e,s)=>{const c=s.paint.get("hillshade-accent-color");let p;switch(s.paint.get("hillshade-method")){case"basic":p=4;break;case"combined":p=1;break;case"igor":p=2;break;case"multidirectional":p=3;break;default:p=0}const g=s.getIlluminationProperties();for(let b=0;b<g.directionRadians.length;b++)s.paint.get("hillshade-illumination-anchor")==="viewport"&&(g.directionRadians[b]+=f.transform.bearingInRadians);return{u_image:0,u_latrange:Zc(0,e.tileID),u_exaggeration:s.paint.get("hillshade-exaggeration"),u_altitudes:g.altitudeRadians,u_azimuths:g.directionRadians,u_accent:c,u_method:p,u_highlights:g.highlightColor,u_shadows:g.shadowColor}},Xh=(f,e)=>{const s=e.stride,c=a.L();return a.bY(c,0,a.$,-a.$,0,0,1),a.M(c,c,[0,-a.$,0]),{u_matrix:c,u_image:1,u_dimension:[s,s],u_zoom:f.overscaledZ,u_unpack:e.getUnpackVector()}};function Zc(f,e){const s=Math.pow(2,e.canonical.z),c=e.canonical.y;return[new a.a1(0,c/s).toLngLat().lat,new a.a1(0,(c+1)/s).toLngLat().lat]}const Yh=(f,e,s=0)=>({u_image:0,u_unpack:e.getUnpackVector(),u_dimension:[e.stride,e.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:s,u_opacity:f.paint.get("color-relief-opacity")}),vl=(f,e,s,c)=>{const p=f.transform;return{u_translation:Wc(f,e,s),u_ratio:c/a.aC(e,1,p.zoom),u_device_pixel_ratio:f.pixelRatio,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},Jh=(f,e,s,c,p)=>a.e(vl(f,e,s,c),{u_image:0,u_image_height:p}),Qh=(f,e,s,c,p)=>{const g=f.transform,b=qc(e,g);return{u_translation:Wc(f,e,s),u_texsize:e.imageAtlasTexture.size,u_ratio:c/a.aC(e,1,g.zoom),u_device_pixel_ratio:f.pixelRatio,u_image:0,u_scale:[b,p.fromScale,p.toScale],u_fade:p.t,u_units_to_pixels:[1/g.pixelsToGLUnits[0],1/g.pixelsToGLUnits[1]]}},Ks=(f,e,s,c,p,g)=>{const b=f.lineAtlas,T=qc(e,f.transform),S=s.layout.get("line-cap")==="round",C=b.getDash(p.from,S),E=b.getDash(p.to,S),j=C.width*g.fromScale,A=E.width*g.toScale;return a.e(vl(f,e,s,c),{u_patternscale_a:[T/j,-C.height/2],u_patternscale_b:[T/A,-E.height/2],u_sdfgamma:b.width/(256*Math.min(j,A)*f.pixelRatio)/2,u_image:0,u_tex_y_a:C.y,u_tex_y_b:E.y,u_mix:g.t})};function qc(f,e){return 1/a.aC(f,1,e.tileZoom)}function Wc(f,e,s){return a.aD(f.transform,e,s.paint.get("line-translate"),s.paint.get("line-translate-anchor"))}const Ba=(f,e,s,c,p)=>{return{u_tl_parent:f,u_scale_parent:e,u_buffer_scale:1,u_fade_t:s.mix,u_opacity:s.opacity*c.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:c.paint.get("raster-brightness-min"),u_brightness_high:c.paint.get("raster-brightness-max"),u_saturation_factor:(b=c.paint.get("raster-saturation"),b>0?1-1/(1.001-b):-b),u_contrast_factor:(g=c.paint.get("raster-contrast"),g>0?1/(1-g):1+g),u_spin_weights:vf(c.paint.get("raster-hue-rotate")),u_coords_top:[p[0].x,p[0].y,p[1].x,p[1].y],u_coords_bottom:[p[3].x,p[3].y,p[2].x,p[2].y]};var g,b};function vf(f){f*=Math.PI/180;const e=Math.sin(f),s=Math.cos(f);return[(2*s+1)/3,(-Math.sqrt(3)*e-s+1)/3,(Math.sqrt(3)*e-s+1)/3]}const Ta=(f,e,s,c,p,g,b,T,S,C,E,j,A)=>{const R=b.transform;return{u_is_size_zoom_constant:+(f==="constant"||f==="source"),u_is_size_feature_constant:+(f==="constant"||f==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:R.cameraToCenterDistance,u_pitch:R.pitch/360*2*Math.PI,u_rotate_symbol:+s,u_aspect_ratio:R.width/R.height,u_fade_change:b.options.fadeDuration?b.symbolFadeChange:1,u_label_plane_matrix:T,u_coord_matrix:S,u_is_text:+E,u_pitch_with_map:+c,u_is_along_line:p,u_is_variable_anchor:g,u_texsize:j,u_texture:0,u_translation:C,u_pitched_scale:A}},ep=(f,e,s,c,p,g,b,T,S,C,E,j,A,R)=>{const V=b.transform;return a.e(Ta(f,e,s,c,p,g,b,T,S,C,E,j,R),{u_gamma_scale:c?Math.cos(V.pitch*Math.PI/180)*V.cameraToCenterDistance:1,u_device_pixel_ratio:b.pixelRatio,u_is_halo:1})},wf=(f,e,s,c,p,g,b,T,S,C,E,j,A)=>a.e(ep(f,e,s,c,p,g,b,T,S,C,!0,E,0,A),{u_texsize_icon:j,u_texture_icon:1}),tp=(f,e)=>({u_opacity:f,u_color:e}),ip=(f,e,s,c,p)=>a.e((function(g,b,T,S){const C=T.imageManager.getPattern(g.from.toString()),E=T.imageManager.getPattern(g.to.toString()),{width:j,height:A}=T.imageManager.getPixelSize(),R=Math.pow(2,S.tileID.overscaledZ),V=S.tileSize*Math.pow(2,T.transform.tileZoom)/R,Y=V*(S.tileID.canonical.x+S.tileID.wrap*R),X=V*S.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:C.tl,u_pattern_br_a:C.br,u_pattern_tl_b:E.tl,u_pattern_br_b:E.br,u_texsize:[j,A],u_mix:b.t,u_pattern_size_a:C.displaySize,u_pattern_size_b:E.displaySize,u_scale_a:b.fromScale,u_scale_b:b.toScale,u_tile_units_to_pixels:1/a.aC(S,1,T.transform.tileZoom),u_pixel_coord_upper:[Y>>16,X>>16],u_pixel_coord_lower:[65535&Y,65535&X]}})(s,p,e,c),{u_opacity:f}),Kc=(f,e)=>{},Xc={fillExtrusion:(f,e)=>({u_lightpos:new a.bT(f,e.u_lightpos),u_lightpos_globe:new a.bT(f,e.u_lightpos_globe),u_lightintensity:new a.bg(f,e.u_lightintensity),u_lightcolor:new a.bT(f,e.u_lightcolor),u_vertical_gradient:new a.bg(f,e.u_vertical_gradient),u_opacity:new a.bg(f,e.u_opacity),u_fill_translate:new a.bU(f,e.u_fill_translate)}),fillExtrusionPattern:(f,e)=>({u_lightpos:new a.bT(f,e.u_lightpos),u_lightpos_globe:new a.bT(f,e.u_lightpos_globe),u_lightintensity:new a.bg(f,e.u_lightintensity),u_lightcolor:new a.bT(f,e.u_lightcolor),u_vertical_gradient:new a.bg(f,e.u_vertical_gradient),u_height_factor:new a.bg(f,e.u_height_factor),u_opacity:new a.bg(f,e.u_opacity),u_fill_translate:new a.bU(f,e.u_fill_translate),u_image:new a.bP(f,e.u_image),u_texsize:new a.bU(f,e.u_texsize),u_pixel_coord_upper:new a.bU(f,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(f,e.u_pixel_coord_lower),u_scale:new a.bT(f,e.u_scale),u_fade:new a.bg(f,e.u_fade)}),fill:(f,e)=>({u_fill_translate:new a.bU(f,e.u_fill_translate)}),fillPattern:(f,e)=>({u_image:new a.bP(f,e.u_image),u_texsize:new a.bU(f,e.u_texsize),u_pixel_coord_upper:new a.bU(f,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(f,e.u_pixel_coord_lower),u_scale:new a.bT(f,e.u_scale),u_fade:new a.bg(f,e.u_fade),u_fill_translate:new a.bU(f,e.u_fill_translate)}),fillOutline:(f,e)=>({u_world:new a.bU(f,e.u_world),u_fill_translate:new a.bU(f,e.u_fill_translate)}),fillOutlinePattern:(f,e)=>({u_world:new a.bU(f,e.u_world),u_image:new a.bP(f,e.u_image),u_texsize:new a.bU(f,e.u_texsize),u_pixel_coord_upper:new a.bU(f,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(f,e.u_pixel_coord_lower),u_scale:new a.bT(f,e.u_scale),u_fade:new a.bg(f,e.u_fade),u_fill_translate:new a.bU(f,e.u_fill_translate)}),circle:(f,e)=>({u_camera_to_center_distance:new a.bg(f,e.u_camera_to_center_distance),u_scale_with_map:new a.bP(f,e.u_scale_with_map),u_pitch_with_map:new a.bP(f,e.u_pitch_with_map),u_extrude_scale:new a.bU(f,e.u_extrude_scale),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_globe_extrude_scale:new a.bg(f,e.u_globe_extrude_scale),u_translate:new a.bU(f,e.u_translate)}),collisionBox:(f,e)=>({u_pixel_extrude_scale:new a.bU(f,e.u_pixel_extrude_scale)}),collisionCircle:(f,e)=>({u_viewport_size:new a.bU(f,e.u_viewport_size)}),debug:(f,e)=>({u_color:new a.bQ(f,e.u_color),u_overlay:new a.bP(f,e.u_overlay),u_overlay_scale:new a.bg(f,e.u_overlay_scale)}),depth:Kc,clippingMask:Kc,heatmap:(f,e)=>({u_extrude_scale:new a.bg(f,e.u_extrude_scale),u_intensity:new a.bg(f,e.u_intensity),u_globe_extrude_scale:new a.bg(f,e.u_globe_extrude_scale)}),heatmapTexture:(f,e)=>({u_matrix:new a.bR(f,e.u_matrix),u_world:new a.bU(f,e.u_world),u_image:new a.bP(f,e.u_image),u_color_ramp:new a.bP(f,e.u_color_ramp),u_opacity:new a.bg(f,e.u_opacity)}),hillshade:(f,e)=>({u_image:new a.bP(f,e.u_image),u_latrange:new a.bU(f,e.u_latrange),u_exaggeration:new a.bg(f,e.u_exaggeration),u_altitudes:new a.b_(f,e.u_altitudes),u_azimuths:new a.b_(f,e.u_azimuths),u_accent:new a.bQ(f,e.u_accent),u_method:new a.bP(f,e.u_method),u_shadows:new a.bZ(f,e.u_shadows),u_highlights:new a.bZ(f,e.u_highlights)}),hillshadePrepare:(f,e)=>({u_matrix:new a.bR(f,e.u_matrix),u_image:new a.bP(f,e.u_image),u_dimension:new a.bU(f,e.u_dimension),u_zoom:new a.bg(f,e.u_zoom),u_unpack:new a.bS(f,e.u_unpack)}),colorRelief:(f,e)=>({u_image:new a.bP(f,e.u_image),u_unpack:new a.bS(f,e.u_unpack),u_dimension:new a.bU(f,e.u_dimension),u_elevation_stops:new a.bP(f,e.u_elevation_stops),u_color_stops:new a.bP(f,e.u_color_stops),u_color_ramp_size:new a.bP(f,e.u_color_ramp_size),u_opacity:new a.bg(f,e.u_opacity)}),line:(f,e)=>({u_translation:new a.bU(f,e.u_translation),u_ratio:new a.bg(f,e.u_ratio),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_units_to_pixels:new a.bU(f,e.u_units_to_pixels)}),lineGradient:(f,e)=>({u_translation:new a.bU(f,e.u_translation),u_ratio:new a.bg(f,e.u_ratio),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_units_to_pixels:new a.bU(f,e.u_units_to_pixels),u_image:new a.bP(f,e.u_image),u_image_height:new a.bg(f,e.u_image_height)}),linePattern:(f,e)=>({u_translation:new a.bU(f,e.u_translation),u_texsize:new a.bU(f,e.u_texsize),u_ratio:new a.bg(f,e.u_ratio),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_image:new a.bP(f,e.u_image),u_units_to_pixels:new a.bU(f,e.u_units_to_pixels),u_scale:new a.bT(f,e.u_scale),u_fade:new a.bg(f,e.u_fade)}),lineSDF:(f,e)=>({u_translation:new a.bU(f,e.u_translation),u_ratio:new a.bg(f,e.u_ratio),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_units_to_pixels:new a.bU(f,e.u_units_to_pixels),u_patternscale_a:new a.bU(f,e.u_patternscale_a),u_patternscale_b:new a.bU(f,e.u_patternscale_b),u_sdfgamma:new a.bg(f,e.u_sdfgamma),u_image:new a.bP(f,e.u_image),u_tex_y_a:new a.bg(f,e.u_tex_y_a),u_tex_y_b:new a.bg(f,e.u_tex_y_b),u_mix:new a.bg(f,e.u_mix)}),raster:(f,e)=>({u_tl_parent:new a.bU(f,e.u_tl_parent),u_scale_parent:new a.bg(f,e.u_scale_parent),u_buffer_scale:new a.bg(f,e.u_buffer_scale),u_fade_t:new a.bg(f,e.u_fade_t),u_opacity:new a.bg(f,e.u_opacity),u_image0:new a.bP(f,e.u_image0),u_image1:new a.bP(f,e.u_image1),u_brightness_low:new a.bg(f,e.u_brightness_low),u_brightness_high:new a.bg(f,e.u_brightness_high),u_saturation_factor:new a.bg(f,e.u_saturation_factor),u_contrast_factor:new a.bg(f,e.u_contrast_factor),u_spin_weights:new a.bT(f,e.u_spin_weights),u_coords_top:new a.bS(f,e.u_coords_top),u_coords_bottom:new a.bS(f,e.u_coords_bottom)}),symbolIcon:(f,e)=>({u_is_size_zoom_constant:new a.bP(f,e.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bP(f,e.u_is_size_feature_constant),u_size_t:new a.bg(f,e.u_size_t),u_size:new a.bg(f,e.u_size),u_camera_to_center_distance:new a.bg(f,e.u_camera_to_center_distance),u_pitch:new a.bg(f,e.u_pitch),u_rotate_symbol:new a.bP(f,e.u_rotate_symbol),u_aspect_ratio:new a.bg(f,e.u_aspect_ratio),u_fade_change:new a.bg(f,e.u_fade_change),u_label_plane_matrix:new a.bR(f,e.u_label_plane_matrix),u_coord_matrix:new a.bR(f,e.u_coord_matrix),u_is_text:new a.bP(f,e.u_is_text),u_pitch_with_map:new a.bP(f,e.u_pitch_with_map),u_is_along_line:new a.bP(f,e.u_is_along_line),u_is_variable_anchor:new a.bP(f,e.u_is_variable_anchor),u_texsize:new a.bU(f,e.u_texsize),u_texture:new a.bP(f,e.u_texture),u_translation:new a.bU(f,e.u_translation),u_pitched_scale:new a.bg(f,e.u_pitched_scale)}),symbolSDF:(f,e)=>({u_is_size_zoom_constant:new a.bP(f,e.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bP(f,e.u_is_size_feature_constant),u_size_t:new a.bg(f,e.u_size_t),u_size:new a.bg(f,e.u_size),u_camera_to_center_distance:new a.bg(f,e.u_camera_to_center_distance),u_pitch:new a.bg(f,e.u_pitch),u_rotate_symbol:new a.bP(f,e.u_rotate_symbol),u_aspect_ratio:new a.bg(f,e.u_aspect_ratio),u_fade_change:new a.bg(f,e.u_fade_change),u_label_plane_matrix:new a.bR(f,e.u_label_plane_matrix),u_coord_matrix:new a.bR(f,e.u_coord_matrix),u_is_text:new a.bP(f,e.u_is_text),u_pitch_with_map:new a.bP(f,e.u_pitch_with_map),u_is_along_line:new a.bP(f,e.u_is_along_line),u_is_variable_anchor:new a.bP(f,e.u_is_variable_anchor),u_texsize:new a.bU(f,e.u_texsize),u_texture:new a.bP(f,e.u_texture),u_gamma_scale:new a.bg(f,e.u_gamma_scale),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_is_halo:new a.bP(f,e.u_is_halo),u_translation:new a.bU(f,e.u_translation),u_pitched_scale:new a.bg(f,e.u_pitched_scale)}),symbolTextAndIcon:(f,e)=>({u_is_size_zoom_constant:new a.bP(f,e.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bP(f,e.u_is_size_feature_constant),u_size_t:new a.bg(f,e.u_size_t),u_size:new a.bg(f,e.u_size),u_camera_to_center_distance:new a.bg(f,e.u_camera_to_center_distance),u_pitch:new a.bg(f,e.u_pitch),u_rotate_symbol:new a.bP(f,e.u_rotate_symbol),u_aspect_ratio:new a.bg(f,e.u_aspect_ratio),u_fade_change:new a.bg(f,e.u_fade_change),u_label_plane_matrix:new a.bR(f,e.u_label_plane_matrix),u_coord_matrix:new a.bR(f,e.u_coord_matrix),u_is_text:new a.bP(f,e.u_is_text),u_pitch_with_map:new a.bP(f,e.u_pitch_with_map),u_is_along_line:new a.bP(f,e.u_is_along_line),u_is_variable_anchor:new a.bP(f,e.u_is_variable_anchor),u_texsize:new a.bU(f,e.u_texsize),u_texsize_icon:new a.bU(f,e.u_texsize_icon),u_texture:new a.bP(f,e.u_texture),u_texture_icon:new a.bP(f,e.u_texture_icon),u_gamma_scale:new a.bg(f,e.u_gamma_scale),u_device_pixel_ratio:new a.bg(f,e.u_device_pixel_ratio),u_is_halo:new a.bP(f,e.u_is_halo),u_translation:new a.bU(f,e.u_translation),u_pitched_scale:new a.bg(f,e.u_pitched_scale)}),background:(f,e)=>({u_opacity:new a.bg(f,e.u_opacity),u_color:new a.bQ(f,e.u_color)}),backgroundPattern:(f,e)=>({u_opacity:new a.bg(f,e.u_opacity),u_image:new a.bP(f,e.u_image),u_pattern_tl_a:new a.bU(f,e.u_pattern_tl_a),u_pattern_br_a:new a.bU(f,e.u_pattern_br_a),u_pattern_tl_b:new a.bU(f,e.u_pattern_tl_b),u_pattern_br_b:new a.bU(f,e.u_pattern_br_b),u_texsize:new a.bU(f,e.u_texsize),u_mix:new a.bg(f,e.u_mix),u_pattern_size_a:new a.bU(f,e.u_pattern_size_a),u_pattern_size_b:new a.bU(f,e.u_pattern_size_b),u_scale_a:new a.bg(f,e.u_scale_a),u_scale_b:new a.bg(f,e.u_scale_b),u_pixel_coord_upper:new a.bU(f,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(f,e.u_pixel_coord_lower),u_tile_units_to_pixels:new a.bg(f,e.u_tile_units_to_pixels)}),terrain:(f,e)=>({u_texture:new a.bP(f,e.u_texture),u_ele_delta:new a.bg(f,e.u_ele_delta),u_fog_matrix:new a.bR(f,e.u_fog_matrix),u_fog_color:new a.bQ(f,e.u_fog_color),u_fog_ground_blend:new a.bg(f,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.bg(f,e.u_fog_ground_blend_opacity),u_horizon_color:new a.bQ(f,e.u_horizon_color),u_horizon_fog_blend:new a.bg(f,e.u_horizon_fog_blend),u_is_globe_mode:new a.bg(f,e.u_is_globe_mode)}),terrainDepth:(f,e)=>({u_ele_delta:new a.bg(f,e.u_ele_delta)}),terrainCoords:(f,e)=>({u_texture:new a.bP(f,e.u_texture),u_terrain_coords_id:new a.bg(f,e.u_terrain_coords_id),u_ele_delta:new a.bg(f,e.u_ele_delta)}),projectionErrorMeasurement:(f,e)=>({u_input:new a.bg(f,e.u_input),u_output_expected:new a.bg(f,e.u_output_expected)}),atmosphere:(f,e)=>({u_sun_pos:new a.bT(f,e.u_sun_pos),u_atmosphere_blend:new a.bg(f,e.u_atmosphere_blend),u_globe_position:new a.bT(f,e.u_globe_position),u_globe_radius:new a.bg(f,e.u_globe_radius),u_inv_proj_matrix:new a.bR(f,e.u_inv_proj_matrix)}),sky:(f,e)=>({u_sky_color:new a.bQ(f,e.u_sky_color),u_horizon_color:new a.bQ(f,e.u_horizon_color),u_horizon:new a.bU(f,e.u_horizon),u_horizon_normal:new a.bU(f,e.u_horizon_normal),u_sky_horizon_blend:new a.bg(f,e.u_sky_horizon_blend),u_sky_blend:new a.bg(f,e.u_sky_blend)})};class rp{constructor(e,s,c){this.context=e;const p=e.gl;this.buffer=p.createBuffer(),this.dynamicDraw=!!c,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),p.bufferData(p.ELEMENT_ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const s=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),s.bufferSubData(s.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const wl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ns{constructor(e,s,c,p){this.length=s.length,this.attributes=c,this.itemSize=s.bytesPerElement,this.dynamicDraw=p,this.context=e;const g=e.gl;this.buffer=g.createBuffer(),e.bindVertexBuffer.set(this.buffer),g.bufferData(g.ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?g.DYNAMIC_DRAW:g.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const s=this.context.gl;this.bind(),s.bufferSubData(s.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,s){for(let c=0;c<this.attributes.length;c++){const p=s.attributes[this.attributes[c].name];p!==void 0&&e.enableVertexAttribArray(p)}}setVertexAttribPointers(e,s,c){for(let p=0;p<this.attributes.length;p++){const g=this.attributes[p],b=s.attributes[g.name];b!==void 0&&e.vertexAttribPointer(b,g.components,e[wl[g.type]],!1,this.itemSize,g.offset+this.itemSize*(c||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class fi{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Yc extends fi{getDefault(){return a.bf.transparent}set(e){const s=this.current;(e.r!==s.r||e.g!==s.g||e.b!==s.b||e.a!==s.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Jc extends fi{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class np extends fi{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class Qc extends fi{getDefault(){return[!0,!0,!0,!0]}set(e){const s=this.current;(e[0]!==s[0]||e[1]!==s[1]||e[2]!==s[2]||e[3]!==s[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Xs extends fi{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class eu extends fi{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class Bf extends fi{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const s=this.current;(e.func!==s.func||e.ref!==s.ref||e.mask!==s.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class Tf extends fi{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const s=this.current;(e[0]!==s[0]||e[1]!==s[1]||e[2]!==s[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class Sf extends fi{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;e?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST),this.current=e,this.dirty=!1}}class Of extends fi{getDefault(){return[0,1]}set(e){const s=this.current;(e[0]!==s[0]||e[1]!==s[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class sp extends fi{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;e?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST),this.current=e,this.dirty=!1}}class Pf extends fi{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class op extends fi{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;e?s.enable(s.BLEND):s.disable(s.BLEND),this.current=e,this.dirty=!1}}class Bl extends fi{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const s=this.current;(e[0]!==s[0]||e[1]!==s[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class Tl extends fi{getDefault(){return a.bf.transparent}set(e){const s=this.current;(e.r!==s.r||e.g!==s.g||e.b!==s.b||e.a!==s.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Sl extends fi{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class tu extends fi{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;e?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE),this.current=e,this.dirty=!1}}class Ys extends fi{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class Sa extends fi{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class Ao extends fi{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class dn extends fi{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class ap extends fi{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const s=this.current;(e[0]!==s[0]||e[1]!==s[1]||e[2]!==s[2]||e[3]!==s[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class lp extends fi{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.bindFramebuffer(s.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class iu extends fi{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.bindRenderbuffer(s.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class Js extends fi{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.bindTexture(s.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class Ol extends fi{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class Pl extends fi{getDefault(){return null}set(e){const s=this.gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class Oa extends fi{getDefault(){return null}set(e){var s;if(e===this.current&&!this.dirty)return;const c=this.gl;Nn(c)?c.bindVertexArray(e):(s=c.getExtension("OES_vertex_array_object"))===null||s===void 0||s.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class Cl extends fi{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class cp extends fi{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class jo extends fi{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class Os extends fi{constructor(e,s){super(e),this.context=e,this.parent=s}getDefault(){return null}}class up extends Os{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class ru extends Os{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class oi extends Os{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,e),this.current=e,this.dirty=!1}}const Pa="Framebuffer is not complete";class Cf{constructor(e,s,c,p,g){this.context=e,this.width=s,this.height=c;const b=e.gl,T=this.framebuffer=b.createFramebuffer();if(this.colorAttachment=new up(e,T),p)this.depthAttachment=g?new oi(e,T):new ru(e,T);else if(g)throw new Error("Stencil cannot be set without depth");if(b.checkFramebufferStatus(b.FRAMEBUFFER)!==b.FRAMEBUFFER_COMPLETE)throw new Error(Pa)}destroy(){const e=this.context.gl,s=this.colorAttachment.get();if(s&&e.deleteTexture(s),this.depthAttachment){const c=this.depthAttachment.get();c&&e.deleteRenderbuffer(c)}e.deleteFramebuffer(this.framebuffer)}}class hp{constructor(e){var s,c;if(this.gl=e,this.clearColor=new Yc(this),this.clearDepth=new Jc(this),this.clearStencil=new np(this),this.colorMask=new Qc(this),this.depthMask=new Xs(this),this.stencilMask=new eu(this),this.stencilFunc=new Bf(this),this.stencilOp=new Tf(this),this.stencilTest=new Sf(this),this.depthRange=new Of(this),this.depthTest=new sp(this),this.depthFunc=new Pf(this),this.blend=new op(this),this.blendFunc=new Bl(this),this.blendColor=new Tl(this),this.blendEquation=new Sl(this),this.cullFace=new tu(this),this.cullFaceSide=new Ys(this),this.frontFace=new Sa(this),this.program=new Ao(this),this.activeTexture=new dn(this),this.viewport=new ap(this),this.bindFramebuffer=new lp(this),this.bindRenderbuffer=new iu(this),this.bindTexture=new Js(this),this.bindVertexBuffer=new Ol(this),this.bindElementBuffer=new Pl(this),this.bindVertexArray=new Oa(this),this.pixelStoreUnpack=new Cl(this),this.pixelStoreUnpackPremultiplyAlpha=new cp(this),this.pixelStoreUnpackFlipY=new jo(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),Nn(e)){this.HALF_FLOAT=e.HALF_FLOAT;const p=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(s=e.RGBA16F)!==null&&s!==void 0?s:p?.RGBA16F_EXT,this.RGB16F=(c=e.RGB16F)!==null&&c!==void 0?c:p?.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");const p=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=p?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,s){return new rp(this,e,s)}createVertexBuffer(e,s,c){return new ns(this,e,s,c)}createRenderbuffer(e,s,c){const p=this.gl,g=p.createRenderbuffer();return this.bindRenderbuffer.set(g),p.renderbufferStorage(p.RENDERBUFFER,e,s,c),this.bindRenderbuffer.set(null),g}createFramebuffer(e,s,c,p){return new Cf(this,e,s,c,p)}clear({color:e,depth:s,stencil:c}){const p=this.gl;let g=0;e&&(g|=p.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),s!==void 0&&(g|=p.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(s),this.depthMask.set(!0)),c!==void 0&&(g|=p.STENCIL_BUFFER_BIT,this.clearStencil.set(c),this.stencilMask.set(255)),p.clear(g)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){a.bH(e.blendFunction,Ii.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return Nn(this.gl)?this.gl.createVertexArray():(e=this.gl.getExtension("OES_vertex_array_object"))===null||e===void 0?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var s;return Nn(this.gl)?this.gl.deleteVertexArray(e):(s=this.gl.getExtension("OES_vertex_array_object"))===null||s===void 0?void 0:s.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}let Ps;function pp(f,e,s,c,p){const g=f.context,b=f.transform,T=g.gl,S=f.useProgram("collisionBox"),C=[];let E=0,j=0;for(let J=0;J<c.length;J++){const Q=c[J],ne=e.getTile(Q).getBucket(s);if(!ne)continue;const te=p?ne.textCollisionBox:ne.iconCollisionBox,le=ne.collisionCircleArray;le.length>0&&(C.push({circleArray:le,circleOffset:j,coord:Q}),E+=le.length/4,j=E),te&&S.draw(g,T.LINES,Ut.disabled,ui.disabled,f.colorModeForRenderPass(),kt.disabled,xl(f.transform),f.style.map.terrain&&f.style.map.terrain.getTerrainData(Q),b.getProjectionData({overscaledTileID:Q,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),s.id,te.layoutVertexBuffer,te.indexBuffer,te.segments,null,f.transform.zoom,null,null,te.collisionVertexBuffer)}if(!p||!C.length)return;const A=f.useProgram("collisionCircle"),R=new a.b$;R.resize(4*E),R._trim();let V=0;for(const J of C)for(let Q=0;Q<J.circleArray.length/4;Q++){const ne=4*Q,te=J.circleArray[ne+0],le=J.circleArray[ne+1],pe=J.circleArray[ne+2],ie=J.circleArray[ne+3];R.emplace(V++,te,le,pe,ie,0),R.emplace(V++,te,le,pe,ie,1),R.emplace(V++,te,le,pe,ie,2),R.emplace(V++,te,le,pe,ie,3)}(!Ps||Ps.length<2*E)&&(Ps=(function(J){const Q=2*J,ne=new a.c1;ne.resize(Q),ne._trim();for(let te=0;te<Q;te++){const le=6*te;ne.uint16[le+0]=4*te+0,ne.uint16[le+1]=4*te+1,ne.uint16[le+2]=4*te+2,ne.uint16[le+3]=4*te+2,ne.uint16[le+4]=4*te+3,ne.uint16[le+5]=4*te+0}return ne})(E));const Y=g.createIndexBuffer(Ps,!0),X=g.createVertexBuffer(R,a.c0.members,!0);for(const J of C){const Q=bf(f.transform);A.draw(g,T.TRIANGLES,Ut.disabled,ui.disabled,f.colorModeForRenderPass(),kt.disabled,Q,f.style.map.terrain&&f.style.map.terrain.getTerrainData(J.coord),null,s.id,X,Y,a.aM.simpleSegment(0,2*J.circleOffset,J.circleArray.length,J.circleArray.length/2),null,f.transform.zoom,null,null,null)}X.destroy(),Y.destroy()}const Ef=a.ag(new Float32Array(16));function dp(f,e,s,c,p,g){const{horizontalAlign:b,verticalAlign:T}=a.aH(f);return new a.P((-(b-.5)*e/p+c[0])*g,(-(T-.5)*s/p+c[1])*g)}function Mf(f,e,s,c,p,g){const b=e.tileAnchorPoint.add(new a.P(e.translation[0],e.translation[1]));if(e.pitchWithMap){let T=c.mult(g);s||(T=T.rotate(-p));const S=b.add(T);return rr(S.x,S.y,e.pitchedLabelPlaneMatrix,e.getElevation).point}if(s){const T=Or(e.tileAnchorPoint.x+1,e.tileAnchorPoint.y,e).point.sub(f),S=Math.atan(T.y/T.x)+(T.x<0?Math.PI:0);return f.add(c.rotate(S))}return f.add(c)}function nu(f,e,s,c,p,g,b,T,S,C,E,j){const A=f.text.placedSymbolArray,R=f.text.dynamicLayoutVertexArray,V=f.icon.dynamicLayoutVertexArray,Y={};R.clear();for(let X=0;X<A.length;X++){const J=A.get(X),Q=J.hidden||!J.crossTileID||f.allowVerticalPlacement&&!J.placedOrientation?null:c[J.crossTileID];if(Q){const ne=new a.P(J.anchorX,J.anchorY),te={getElevation:j,width:p.width,height:p.height,pitchedLabelPlaneMatrix:g,pitchWithMap:s,transform:p,tileAnchorPoint:ne,translation:C,unwrappedTileID:E},le=s?vs(ne.x,ne.y,te):Or(ne.x,ne.y,te),pe=We(p.cameraToCenterDistance,le.signedDistanceFromCamera);let ie=a.ap(f.textSizeData,T,J)*pe/a.aB;s&&(ie*=f.tilePixelRatio/b);const{width:me,height:Oe,anchor:ve,textOffset:we,textBoxScale:Se}=Q,Je=dp(ve,me,Oe,we,Se,ie),Ze=p.getPitchedTextCorrection(ne.x+C[0],ne.y+C[1],E),$e=Mf(le.point,te,e,Je,-p.bearingInRadians,Ze),bt=f.allowVerticalPlacement&&J.placedOrientation===a.ao.vertical?Math.PI/2:0;for(let Xt=0;Xt<J.numGlyphs;Xt++)a.av(R,$e,bt);S&&J.associatedIconIndex>=0&&(Y[J.associatedIconIndex]={shiftedAnchor:$e,angle:bt})}else Fn(J.numGlyphs,R)}if(S){V.clear();const X=f.icon.placedSymbolArray;for(let J=0;J<X.length;J++){const Q=X.get(J);if(Q.hidden)Fn(Q.numGlyphs,V);else{const ne=Y[J];if(ne)for(let te=0;te<Q.numGlyphs;te++)a.av(V,ne.shiftedAnchor,ne.angle);else Fn(Q.numGlyphs,V)}}f.icon.dynamicLayoutVertexBuffer.updateData(V)}f.text.dynamicLayoutVertexBuffer.updateData(R)}function El(f,e,s){return s.iconsInText&&e?"symbolTextAndIcon":f?"symbolSDF":"symbolIcon"}function Ca(f,e,s,c,p,g,b,T,S,C,E,j,A){const R=f.context,V=R.gl,Y=f.transform,X=T==="map",J=S==="map",Q=T!=="viewport"&&s.layout.get("symbol-placement")!=="point",ne=X&&!J&&!Q,te=!s.layout.get("symbol-sort-key").isConstant();let le=!1;const pe=f.getDepthModeForSublayer(0,Ut.ReadOnly),ie=s._unevaluatedLayout.hasValue("text-variable-anchor")||s._unevaluatedLayout.hasValue("text-variable-anchor-offset"),me=[],Oe=Y.getCircleRadiusCorrection();for(const ve of c){const we=e.getTile(ve),Se=we.getBucket(s);if(!Se)continue;const Je=p?Se.text:Se.icon;if(!Je||!Je.segments.get().length||!Je.hasVisibleVertices)continue;const Ze=Je.programConfigurations.get(s.id),$e=p||Se.sdfIcons,bt=p?Se.textSizeData:Se.iconSizeData,Xt=J||Y.pitch!==0,mi=f.useProgram(El($e,p,Se),Ze),zi=a.an(bt,Y.zoom),gi=f.style.map.terrain&&f.style.map.terrain.getTerrainData(ve);let Ai,Gi,Mi,Vt,_r=[0,0],er=null;if(p)Gi=we.glyphAtlasTexture,Mi=V.LINEAR,Ai=we.glyphAtlasTexture.size,Se.iconsInText&&(_r=we.imageAtlasTexture.size,er=we.imageAtlasTexture,Vt=Xt||f.options.rotating||f.options.zooming||bt.kind==="composite"||bt.kind==="camera"?V.LINEAR:V.NEAREST);else{const Ji=s.layout.get("icon-size").constantOr(0)!==1||Se.iconsNeedLinear;Gi=we.imageAtlasTexture,Mi=$e||f.options.rotating||f.options.zooming||Ji||Xt?V.LINEAR:V.NEAREST,Ai=we.imageAtlasTexture.size}const yr=a.aC(we,1,f.transform.zoom),Ur=Qi(X,f.transform,yr),Cs=a.L();a.aq(Cs,Ur);const On=si(J,X,f.transform,yr),Es=a.aD(Y,we,g,b),oo=Y.getProjectionData({overscaledTileID:ve,applyGlobeMatrix:!A,applyTerrainMatrix:!0}),Gl=ie&&Se.hasTextData(),Vo=s.layout.get("icon-text-fit")!=="none"&&Gl&&Se.hasIconData();if(Q){const Ji=f.style.map.terrain?(on,br)=>f.style.map.terrain.getElevation(ve,on,br):null,ur=s.layout.get("text-rotation-alignment")==="map";$i(Se,f,p,Ur,Cs,J,C,ur,ve.toUnwrapped(),Y.width,Y.height,Es,Ji)}const as=p&&ie||Vo,nn=Q||as?Ef:J?Ur:f.transform.clipSpaceToPixelsMatrix,Hn=$e&&s.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Zn;Zn=$e?Se.iconsInText?wf(bt.kind,zi,ne,J,Q,as,f,nn,On,Es,Ai,_r,Oe):ep(bt.kind,zi,ne,J,Q,as,f,nn,On,Es,p,Ai,0,Oe):Ta(bt.kind,zi,ne,J,Q,as,f,nn,On,Es,p,Ai,Oe);const sn={program:mi,buffers:Je,uniformValues:Zn,projectionData:oo,atlasTexture:Gi,atlasTextureIcon:er,atlasInterpolation:Mi,atlasInterpolationIcon:Vt,isSDF:$e,hasHalo:Hn};if(te&&Se.canOverlap){le=!0;const Ji=Je.segments.get();for(const ur of Ji)me.push({segments:new a.aM([ur]),sortKey:ur.sortKey,state:sn,terrainData:gi})}else me.push({segments:Je.segments,sortKey:0,state:sn,terrainData:gi})}le&&me.sort(((ve,we)=>ve.sortKey-we.sortKey));for(const ve of me){const we=ve.state;if(R.activeTexture.set(V.TEXTURE0),we.atlasTexture.bind(we.atlasInterpolation,V.CLAMP_TO_EDGE),we.atlasTextureIcon&&(R.activeTexture.set(V.TEXTURE1),we.atlasTextureIcon&&we.atlasTextureIcon.bind(we.atlasInterpolationIcon,V.CLAMP_TO_EDGE)),we.isSDF){const Se=we.uniformValues;we.hasHalo&&(Se.u_is_halo=1,Ea(we.buffers,ve.segments,s,f,we.program,pe,E,j,Se,we.projectionData,ve.terrainData)),Se.u_is_halo=0}Ea(we.buffers,ve.segments,s,f,we.program,pe,E,j,we.uniformValues,we.projectionData,ve.terrainData)}}function Ea(f,e,s,c,p,g,b,T,S,C,E){const j=c.context;p.draw(j,j.gl.TRIANGLES,g,b,T,kt.backCCW,S,E,C,s.id,f.layoutVertexBuffer,f.indexBuffer,e,s.paint,c.transform.zoom,f.programConfigurations.get(s.id),f.dynamicLayoutVertexBuffer,f.opacityVertexBuffer)}function su(f,e,s,c,p){const g=f.context,b=g.gl,T=ui.disabled,S=new Ii([b.ONE,b.ONE],a.bf.transparent,[!0,!0,!0,!0]),C=e.getBucket(s);if(!C)return;const E=c.key;let j=s.heatmapFbos.get(E);j||(j=Ma(g,e.tileSize,e.tileSize),s.heatmapFbos.set(E,j)),g.bindFramebuffer.set(j.framebuffer),g.viewport.set([0,0,e.tileSize,e.tileSize]),g.clear({color:a.bf.transparent});const A=C.programConfigurations.get(s.id),R=f.useProgram("heatmap",A,!p),V=f.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Y=f.style.map.terrain.getTerrainData(c);R.draw(g,b.TRIANGLES,Ut.disabled,T,S,kt.disabled,Kh(e,f.transform.zoom,s.paint.get("heatmap-intensity"),1),Y,V,s.id,C.layoutVertexBuffer,C.indexBuffer,C.segments,s.paint,f.transform.zoom,A)}function fp(f,e,s,c,p){const g=f.context,b=g.gl,T=f.transform;g.setColorMode(f.colorModeForRenderPass());const S=Ia(g,e),C=s.key,E=e.heatmapFbos.get(C);if(!E)return;g.activeTexture.set(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,E.colorAttachment.get()),g.activeTexture.set(b.TEXTURE1),S.bind(b.LINEAR,b.CLAMP_TO_EDGE);const j=T.getProjectionData({overscaledTileID:s,applyTerrainMatrix:p,applyGlobeMatrix:!c});f.useProgram("heatmapTexture").draw(g,b.TRIANGLES,Ut.disabled,ui.disabled,f.colorModeForRenderPass(),kt.disabled,Hc(f,e,0,1),null,j,e.id,f.rasterBoundsBuffer,f.quadTriangleIndexBuffer,f.rasterBoundsSegments,e.paint,T.zoom),E.destroy(),e.heatmapFbos.delete(C)}function Ma(f,e,s){var c,p;const g=f.gl,b=g.createTexture();g.bindTexture(g.TEXTURE_2D,b),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR);const T=(c=f.HALF_FLOAT)!==null&&c!==void 0?c:g.UNSIGNED_BYTE,S=(p=f.RGBA16F)!==null&&p!==void 0?p:g.RGBA;g.texImage2D(g.TEXTURE_2D,0,S,e,s,0,g.RGBA,T,null);const C=f.createFramebuffer(e,s,!1,!1);return C.colorAttachment.set(b),C}function Ia(f,e){return e.colorRampTexture||(e.colorRampTexture=new a.T(f,e.colorRamp,f.gl.RGBA)),e.colorRampTexture}function Aa(f,e,s,c,p){if(!s||!c||!c.imageAtlas)return;const g=c.imageAtlas.patternPositions;let b=g[s.to.toString()],T=g[s.from.toString()];if(!b&&T&&(b=T),!T&&b&&(T=b),!b||!T){const S=p.getPaintProperty(e);b=g[S],T=g[S]}b&&T&&f.setConstantPatternPositions(b,T)}function Ml(f,e,s,c,p,g,b,T){const S=f.context.gl,C="fill-pattern",E=s.paint.get(C),j=E&&E.constantOr(1),A=s.getCrossfadeParameters();let R,V,Y,X,J;const Q=f.transform,ne=s.paint.get("fill-translate"),te=s.paint.get("fill-translate-anchor");b?(V=j&&!s.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",R=S.LINES):(V=j?"fillPattern":"fill",R=S.TRIANGLES);const le=E.constantOr(null);for(const pe of c){const ie=e.getTile(pe);if(j&&!ie.patternsLoaded())continue;const me=ie.getBucket(s);if(!me)continue;const Oe=me.programConfigurations.get(s.id),ve=f.useProgram(V,Oe),we=f.style.map.terrain&&f.style.map.terrain.getTerrainData(pe);j&&(f.context.activeTexture.set(S.TEXTURE0),ie.imageAtlasTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),Oe.updatePaintBuffers(A)),Aa(Oe,C,le,ie,s);const Se=Q.getProjectionData({overscaledTileID:pe,applyGlobeMatrix:!T,applyTerrainMatrix:!0}),Je=a.aD(Q,ie,ne,te);if(b){X=me.indexBuffer2,J=me.segments2;const $e=[S.drawingBufferWidth,S.drawingBufferHeight];Y=V==="fillOutlinePattern"&&j?wa(f,A,ie,$e,Je):va($e,Je)}else X=me.indexBuffer,J=me.segments,Y=j?bl(f,A,ie,Je):{u_fill_translate:Je};const Ze=f.stencilModeForClipping(pe);ve.draw(f.context,R,p,Ze,g,kt.backCCW,Y,we,Se,s.id,me.layoutVertexBuffer,X,J,s.paint,f.transform.zoom,Oe)}}function ou(f,e,s,c,p,g,b,T){const S=f.context,C=S.gl,E="fill-extrusion-pattern",j=s.paint.get(E),A=j.constantOr(1),R=s.getCrossfadeParameters(),V=s.paint.get("fill-extrusion-opacity"),Y=j.constantOr(null),X=f.transform;for(const J of c){const Q=e.getTile(J),ne=Q.getBucket(s);if(!ne)continue;const te=f.style.map.terrain&&f.style.map.terrain.getTerrainData(J),le=ne.programConfigurations.get(s.id),pe=f.useProgram(A?"fillExtrusionPattern":"fillExtrusion",le);A&&(f.context.activeTexture.set(C.TEXTURE0),Q.imageAtlasTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),le.updatePaintBuffers(R));const ie=X.getProjectionData({overscaledTileID:J,applyGlobeMatrix:!T,applyTerrainMatrix:!0});Aa(le,E,Y,Q,s);const me=a.aD(X,Q,s.paint.get("fill-extrusion-translate"),s.paint.get("fill-extrusion-translate-anchor")),Oe=s.paint.get("fill-extrusion-vertical-gradient"),ve=A?_f(f,Oe,V,me,J,R,Q):yn(f,Oe,V,me);pe.draw(S,S.gl.TRIANGLES,p,g,b,kt.backCCW,ve,te,ie,s.id,ne.layoutVertexBuffer,ne.indexBuffer,ne.segments,s.paint,f.transform.zoom,le,f.style.map.terrain&&ne.centroidVertexBuffer)}}function Qs(f,e,s,c,p,g,b,T,S){var C;const E=f.style.projection,j=f.context,A=f.transform,R=j.gl,V=[`#define NUM_ILLUMINATION_SOURCES ${s.paint.get("hillshade-highlight-color").values.length}`],Y=f.useProgram("hillshade",null,!1,V),X=!f.options.moving;for(const J of c){const Q=e.getTile(J),ne=Q.fbo;if(!ne)continue;const te=E.getMeshFromTileID(j,J.canonical,T,!0,"raster"),le=(C=f.style.map.terrain)===null||C===void 0?void 0:C.getTerrainData(J);j.activeTexture.set(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,ne.colorAttachment.get());const pe=A.getProjectionData({overscaledTileID:J,aligned:X,applyGlobeMatrix:!S,applyTerrainMatrix:!0});Y.draw(j,R.TRIANGLES,g,p[J.overscaledZ],b,kt.backCCW,xf(f,Q,s),le,pe,s.id,te.vertexBuffer,te.indexBuffer,te.segments)}}function au(f,e,s,c,p,g,b,T,S){var C;const E=f.style.projection,j=f.context,A=f.transform,R=j.gl,V=f.useProgram("colorRelief"),Y=!f.options.moving;let X=!0,J=0;for(const Q of c){const ne=e.getTile(Q),te=ne.dem;if(X){const ve=R.getParameter(R.MAX_TEXTURE_SIZE),{elevationTexture:we,colorTexture:Se}=s.getColorRampTextures(j,ve,te.getUnpackVector());j.activeTexture.set(R.TEXTURE1),we.bind(R.NEAREST,R.CLAMP_TO_EDGE),j.activeTexture.set(R.TEXTURE4),Se.bind(R.LINEAR,R.CLAMP_TO_EDGE),X=!1,J=we.size[0]}if(!te||!te.data)continue;const le=te.stride,pe=te.getPixels();if(j.activeTexture.set(R.TEXTURE0),j.pixelStoreUnpackPremultiplyAlpha.set(!1),ne.demTexture=ne.demTexture||f.getTileTexture(le),ne.demTexture){const ve=ne.demTexture;ve.update(pe,{premultiply:!1}),ve.bind(R.LINEAR,R.CLAMP_TO_EDGE)}else ne.demTexture=new a.T(j,pe,R.RGBA,{premultiply:!1}),ne.demTexture.bind(R.LINEAR,R.CLAMP_TO_EDGE);const ie=E.getMeshFromTileID(j,Q.canonical,T,!0,"raster"),me=(C=f.style.map.terrain)===null||C===void 0?void 0:C.getTerrainData(Q),Oe=A.getProjectionData({overscaledTileID:Q,aligned:Y,applyGlobeMatrix:!S,applyTerrainMatrix:!0});V.draw(j,R.TRIANGLES,g,p[Q.overscaledZ],b,kt.backCCW,Yh(s,ne.dem,J),me,Oe,s.id,ie.vertexBuffer,ie.indexBuffer,ie.segments)}}const Il=[new a.P(0,0),new a.P(a.$,0),new a.P(a.$,a.$),new a.P(0,a.$)];function eo(f,e,s,c,p,g,b,T,S=!1,C=!1){const E=c[c.length-1].overscaledZ,j=f.context,A=j.gl,R=f.useProgram("raster"),V=f.transform,Y=f.style.projection,X=f.colorModeForRenderPass(),J=!f.options.moving;for(const Q of c){const ne=f.getDepthModeForSublayer(Q.overscaledZ-E,s.paint.get("raster-opacity")===1?Ut.ReadWrite:Ut.ReadOnly,A.LESS),te=e.getTile(Q);te.registerFadeDuration(s.paint.get("raster-fade-duration"));const le=e.findLoadedParent(Q,0),pe=e.findLoadedSibling(Q),ie=lu(te,le||pe||null,e,s,f.transform,f.style.map.terrain);let me,Oe;const ve=s.paint.get("raster-resampling")==="nearest"?A.NEAREST:A.LINEAR;j.activeTexture.set(A.TEXTURE0),te.texture.bind(ve,A.CLAMP_TO_EDGE,A.LINEAR_MIPMAP_NEAREST),j.activeTexture.set(A.TEXTURE1),le?(le.texture.bind(ve,A.CLAMP_TO_EDGE,A.LINEAR_MIPMAP_NEAREST),me=Math.pow(2,le.tileID.overscaledZ-te.tileID.overscaledZ
vendor: 7,260 bytes, line 828
828),Oe=[te.tileID.canonical.x*me%1,te.tileID.canonical.y*me%1]):te.texture.bind(ve,A.CLAMP_TO_EDGE,A.LINEAR_MIPMAP_NEAREST),te.texture.useMipmap&&j.extTextureFilterAnisotropic&&f.transform.pitch>20&&A.texParameterf(A.TEXTURE_2D,j.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,j.extTextureFilterAnisotropicMax);const we=f.style.map.terrain&&f.style.map.terrain.getTerrainData(Q),Se=V.getProjectionData({overscaledTileID:Q,aligned:J,applyGlobeMatrix:!C,applyTerrainMatrix:!0}),Je=Ba(Oe||[0,0],me||1,ie,s,T),Ze=Y.getMeshFromTileID(j,Q.canonical,g,b,"raster");R.draw(j,A.TRIANGLES,ne,p?p[Q.overscaledZ]:ui.disabled,X,S?kt.frontCCW:kt.backCCW,Je,we,Se,s.id,Ze.vertexBuffer,Ze.indexBuffer,Ze.segments)}}function lu(f,e,s,c,p,g){const b=c.paint.get("raster-fade-duration");if(!g&&b>0){const T=W.now(),S=(T-f.timeAdded)/b,C=e?(T-e.timeAdded)/b:-1,E=s.getSource(),j=yt(p,{tileSize:E.tileSize,roundZoom:E.roundZoom}),A=!e||Math.abs(e.tileID.overscaledZ-j)>Math.abs(f.tileID.overscaledZ-j),R=A&&f.refreshedUponExpiration?1:a.ah(A?S:1-C,0,1);return f.refreshedUponExpiration&&S>=1&&(f.refreshedUponExpiration=!1),e?{opacity:1,mix:1-R}:{opacity:R,mix:0}}return{opacity:1,mix:0}}const mp=new a.bf(1,0,0,1),gp=new a.bf(0,1,0,1),Al=new a.bf(0,0,1,1),cu=new a.bf(1,0,1,1),If=new a.bf(0,1,1,1);function uu(f,e,s,c){Vn(f,0,e+s/2,f.transform.width,s,c)}function Ui(f,e,s,c){Vn(f,e-s/2,0,s,f.transform.height,c)}function Vn(f,e,s,c,p,g){const b=f.context,T=b.gl;T.enable(T.SCISSOR_TEST),T.scissor(e*f.pixelRatio,s*f.pixelRatio,c*f.pixelRatio,p*f.pixelRatio),b.clear({color:g}),T.disable(T.SCISSOR_TEST)}function fn(f,e,s){const c=f.context,p=c.gl,g=f.useProgram("debug"),b=Ut.disabled,T=ui.disabled,S=f.colorModeForRenderPass(),C="$debug",E=f.style.map.terrain&&f.style.map.terrain.getTerrainData(s);c.activeTexture.set(p.TEXTURE0);const j=e.getTileByID(s.key).latestRawTileData,A=Math.floor((j&&j.byteLength||0)/1024),R=e.getTile(s).tileSize,V=512/Math.min(R,512)*(s.overscaledZ/f.transform.zoom)*.5;let Y=s.canonical.toString();s.overscaledZ!==s.canonical.z&&(Y+=` => ${s.overscaledZ}`),(function(J,Q){J.initDebugOverlayCanvas();const ne=J.debugOverlayCanvas,te=J.context.gl,le=J.debugOverlayCanvas.getContext("2d");le.clearRect(0,0,ne.width,ne.height),le.shadowColor="white",le.shadowBlur=2,le.lineWidth=1.5,le.strokeStyle="white",le.textBaseline="top",le.font="bold 36px Open Sans, sans-serif",le.fillText(Q,5,5),le.strokeText(Q,5,5),J.debugOverlayTexture.update(ne),J.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)})(f,`${Y} ${A}kB`);const X=f.transform.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});g.draw(c,p.TRIANGLES,b,T,Ii.alphaBlended,kt.disabled,Ws(a.bf.transparent,V),null,X,C,f.debugBuffer,f.quadTriangleIndexBuffer,f.debugSegments),g.draw(c,p.LINE_STRIP,b,T,S,kt.disabled,Ws(a.bf.red),E,X,C,f.debugBuffer,f.tileBorderIndexBuffer,f.debugSegments)}function jl(f,e,s,c){const{isRenderingGlobe:p}=c,g=f.context,b=g.gl,T=f.transform,S=f.colorModeForRenderPass(),C=f.getDepthModeFor3D(),E=f.useProgram("terrain");g.bindFramebuffer.set(null),g.viewport.set([0,0,f.width,f.height]);for(const j of s){const A=e.getTerrainMesh(j.tileID),R=f.renderToTexture.getTexture(j),V=e.getTerrainData(j.tileID);g.activeTexture.set(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,R.texture);const Y=e.getMeshFrameDelta(T.zoom),X=T.calculateFogMatrix(j.tileID.toUnwrapped()),J=_l(Y,X,f.style.sky,T.pitch,p),Q=T.getProjectionData({overscaledTileID:j.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});E.draw(g,b.TRIANGLES,C,ui.disabled,S,kt.backCCW,J,V,Q,"terrain",A.vertexBuffer,A.indexBuffer,A.segments)}}function ja(f,e){if(!e.mesh){const s=new a.aL;s.emplaceBack(-1,-1),s.emplaceBack(1,-1),s.emplaceBack(1,1),s.emplaceBack(-1,1);const c=new a.aN;c.emplaceBack(0,1,2),c.emplaceBack(0,2,3),e.mesh=new Us(f.createVertexBuffer(s,Ss.members),f.createIndexBuffer(c),a.aM.simpleSegment(0,0,s.length,c.length))}return e.mesh}class _p{constructor(e,s){this.context=new hp(e),this.transform=s,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.ag(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ei.maxUnderzooming+ei.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Co}resize(e,s,c){if(this.width=Math.floor(e*c),this.height=Math.floor(s*c),this.pixelRatio=c,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const p of this.style._order)this.style._layers[p].resize()}setup(){const e=this.context,s=new a.aL;s.emplaceBack(0,0),s.emplaceBack(a.$,0),s.emplaceBack(0,a.$),s.emplaceBack(a.$,a.$),this.tileExtentBuffer=e.createVertexBuffer(s,Ss.members),this.tileExtentSegments=a.aM.simpleSegment(0,0,4,2);const c=new a.aL;c.emplaceBack(0,0),c.emplaceBack(a.$,0),c.emplaceBack(0,a.$),c.emplaceBack(a.$,a.$),this.debugBuffer=e.createVertexBuffer(c,Ss.members),this.debugSegments=a.aM.simpleSegment(0,0,4,5);const p=new a.c6;p.emplaceBack(0,0,0,0),p.emplaceBack(a.$,0,a.$,0),p.emplaceBack(0,a.$,0,a.$),p.emplaceBack(a.$,a.$,a.$,a.$),this.rasterBoundsBuffer=e.createVertexBuffer(p,mf.members),this.rasterBoundsSegments=a.aM.simpleSegment(0,0,4,2);const g=new a.aL;g.emplaceBack(0,0),g.emplaceBack(a.$,0),g.emplaceBack(0,a.$),g.emplaceBack(a.$,a.$),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(g,Ss.members),this.rasterBoundsSegmentsPosOnly=a.aM.simpleSegment(0,0,4,5);const b=new a.aL;b.emplaceBack(0,0),b.emplaceBack(1,0),b.emplaceBack(0,1),b.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(b,Ss.members),this.viewportSegments=a.aM.simpleSegment(0,0,4,2);const T=new a.c7;T.emplaceBack(0),T.emplaceBack(1),T.emplaceBack(3),T.emplaceBack(2),T.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(T);const S=new a.aN;S.emplaceBack(1,0,2),S.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(S);const C=this.context.gl;this.stencilClearMode=new ui({func:C.ALWAYS,mask:0},0,255,C.ZERO,C.ZERO,C.ZERO),this.tileExtentMesh=new Us(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const e=this.context,s=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const c=a.L();a.bY(c,0,this.width,this.height,0,0,1),a.N(c,c,[s.drawingBufferWidth,s.drawingBufferHeight,0]);const p={mainMatrix:c,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:c};this.useProgram("clippingMask",null,!0).draw(e,s.TRIANGLES,Ut.disabled,this.stencilClearMode,Ii.disabled,kt.disabled,null,null,p,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,s,c){if(this.currentStencilSource===e.source||!e.isTileClipped()||!s||!s.length)return;this.currentStencilSource=e.source,this.nextStencilID+s.length>256&&this.clearStencil();const p=this.context;p.setColorMode(Ii.disabled),p.setDepthMode(Ut.disabled);const g={};for(const b of s)g[b.key]=this.nextStencilID++;this._renderTileMasks(g,s,c,!0),this._renderTileMasks(g,s,c,!1),this._tileClippingMaskIDs=g}_renderTileMasks(e,s,c,p){const g=this.context,b=g.gl,T=this.style.projection,S=this.transform,C=this.useProgram("clippingMask");for(const E of s){const j=e[E.key],A=this.style.map.terrain&&this.style.map.terrain.getTerrainData(E),R=T.getMeshFromTileID(this.context,E.c
vendor: 23,250 bytes, lines 828-830
828anonical,p,!0,"stencil"),V=S.getProjectionData({overscaledTileID:E,applyGlobeMatrix:!c,applyTerrainMatrix:!0});C.draw(g,b.TRIANGLES,Ut.disabled,new ui({func:b.ALWAYS,mask:0},j,255,b.KEEP,b.KEEP,b.REPLACE),Ii.disabled,c?kt.disabled:kt.backCCW,null,A,V,"$clipping",R.vertexBuffer,R.indexBuffer,R.segments)}}_renderTilesDepthBuffer(){const e=this.context,s=e.gl,c=this.style.projection,p=this.transform,g=this.useProgram("depth"),b=this.getDepthModeFor3D(),T=ye(p,{tileSize:p.tileSize});for(const S of T){const C=this.style.map.terrain&&this.style.map.terrain.getTerrainData(S),E=c.getMeshFromTileID(this.context,S.canonical,!0,!0,"raster"),j=p.getProjectionData({overscaledTileID:S,applyGlobeMatrix:!0,applyTerrainMatrix:!0});g.draw(e,s.TRIANGLES,b,ui.disabled,Ii.disabled,kt.backCCW,null,C,j,"$clipping",E.vertexBuffer,E.indexBuffer,E.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,s=this.context.gl;return new ui({func:s.NOTEQUAL,mask:255},e,255,s.KEEP,s.KEEP,s.REPLACE)}stencilModeForClipping(e){const s=this.context.gl;return new ui({func:s.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,s.KEEP,s.KEEP,s.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const s=this.context.gl,c=e.sort(((b,T)=>T.overscaledZ-b.overscaledZ)),p=c[c.length-1].overscaledZ,g=c[0].overscaledZ-p+1;if(g>1){this.currentStencilSource=void 0,this.nextStencilID+g>256&&this.clearStencil();const b={};for(let T=0;T<g;T++)b[T+p]=new ui({func:s.GEQUAL,mask:255},T+this.nextStencilID,255,s.KEEP,s.KEEP,s.REPLACE);return this.nextStencilID+=g,[b,c]}return[{[p]:ui.disabled},c]}stencilConfigForOverlapTwoPass(e){const s=this.context.gl,c=e.sort(((b,T)=>T.overscaledZ-b.overscaledZ)),p=c[c.length-1].overscaledZ,g=c[0].overscaledZ-p+1;if(this.clearStencil(),g>1){const b={},T={};for(let S=0;S<g;S++)b[S+p]=new ui({func:s.GREATER,mask:255},g+1+S,255,s.KEEP,s.KEEP,s.REPLACE),T[S+p]=new ui({func:s.GREATER,mask:255},1+S,255,s.KEEP,s.KEEP,s.REPLACE);return this.nextStencilID=2*g+1,[b,T,c]}return this.nextStencilID=3,[{[p]:new ui({func:s.GREATER,mask:255},2,255,s.KEEP,s.KEEP,s.REPLACE)},{[p]:new ui({func:s.GREATER,mask:255},1,255,s.KEEP,s.KEEP,s.REPLACE)},c]}colorModeForRenderPass(){const e=this.context.gl;return this._showOverdrawInspector?new Ii([e.CONSTANT_COLOR,e.ONE],new a.bf(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ii.unblended:Ii.alphaBlended}getDepthModeForSublayer(e,s,c){if(!this.opaquePassEnabledForLayer())return Ut.disabled;const p=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Ut(c||this.context.gl.LEQUAL,s,[p,p])}getDepthModeFor3D(){return new Ut(this.context.gl.LEQUAL,Ut.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,s){var c,p;this.style=e,this.options=s,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(W.now()),this.imageManager.beginFrame();const g=this.style._order,b=this.style.sourceCaches,T={},S={},C={},E={isRenderingToTexture:!1,isRenderingGlobe:((c=e.projection)===null||c===void 0?void 0:c.transitionState)>0};for(const A in b){const R=b[A];R.used&&R.prepare(this.context),T[A]=R.getVisibleCoordinates(!1),S[A]=T[A].slice().reverse(),C[A]=R.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let A=0;A<g.length;A++)if(this.style._layers[g[A]].is3D()){this.opaquePassCutoff=A;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const A of g){const R=this.style._layers[A];if(!R.hasOffscreenPass()||R.isHidden(this.transform.zoom))continue;const V=S[R.source];(R.type==="custom"||V.length)&&this.renderLayer(this,b[R.source],R,V,E)}if((p=this.style.projection)===null||p===void 0||p.updateGPUdependent({context:this.context,useProgram:A=>this.useProgram(A)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:s.showOverdrawInspector?a.bf.black:a.bf.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(A,R){const V=A.context,Y=V.gl,X=((pe,ie,me)=>{const Oe=Math.cos(ie.rollInRadians),ve=Math.sin(ie.rollInRadians),we=ce(ie),Se=ie.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:pe.properties.get("sky-color"),u_horizon_color:pe.properties.get("horizon-color"),u_horizon:[(ie.width/2-we*ve)*me,(ie.height/2+we*Oe)*me],u_horizon_normal:[-ve,Oe],u_sky_horizon_blend:pe.properties.get("sky-horizon-blend")*ie.height/2*me,u_sky_blend:Se}})(R,A.style.map.transform,A.pixelRatio),J=new Ut(Y.LEQUAL,Ut.ReadWrite,[0,1]),Q=ui.disabled,ne=A.colorModeForRenderPass(),te=A.useProgram("sky"),le=ja(V,R);te.draw(V,Y.TRIANGLES,J,Q,ne,kt.disabled,X,null,void 0,"sky",le.vertexBuffer,le.indexBuffer,le.segments)})(this,this.style.sky),this._showOverdrawInspector=s.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=g.length-1;this.currentLayer>=0;this.currentLayer--){const A=this.style._layers[g[this.currentLayer]],R=b[A.source],V=T[A.source];this._renderTileClippingMasks(A,V,!1),this.renderLayer(this,R,A,V,E)}this.renderPass="translucent";let j=!1;for(this.currentLayer=0;this.currentLayer<g.length;this.currentLayer++){const A=this.style._layers[g[this.currentLayer]],R=b[A.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(A,E))continue;this.opaquePassEnabledForLayer()||j||(j=!0,E.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const V=(A.type==="symbol"?C:S)[A.source];this._renderTileClippingMasks(A,T[A.source],!!this.renderToTexture),this.renderLayer(this,R,A,V,E)}if(E.isRenderingGlobe&&(function(A,R,V){const Y=A.context,X=Y.gl,J=A.useProgram("atmosphere"),Q=new Ut(X.LEQUAL,Ut.ReadOnly,[0,1]),ne=A.transform,te=(function(Se,Je){const Ze=Se.properties.get("position"),$e=[-Ze.x,-Ze.y,-Ze.z],bt=a.ag(new Float64Array(16));return Se.properties.get("anchor")==="map"&&(a.b6(bt,bt,Je.rollInRadians),a.b7(bt,bt,-Je.pitchInRadians),a.b6(bt,bt,Je.bearingInRadians),a.b7(bt,bt,Je.center.lat*Math.PI/180),a.bz(bt,bt,-Je.center.lng*Math.PI/180)),a.c5($e,$e,bt),$e})(V,A.transform),le=ne.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),pe=R.properties.get("atmosphere-blend")*le.projectionTransition;if(pe===0)return;const ie=Mo(ne.worldSize,ne.center.lat),me=ne.inverseProjectionMatrix,Oe=new Float64Array(4);Oe[3]=1,a.aw(Oe,Oe,ne.modelViewProjectionMatrix),Oe[0]/=Oe[3],Oe[1]/=Oe[3],Oe[2]/=Oe[3],Oe[3]=1,a.aw(Oe,Oe,me),Oe[0]/=Oe[3],Oe[1]/=Oe[3],Oe[2]/=Oe[3],Oe[3]=1;const ve=((Se,Je,Ze,$e,bt)=>({u_sun_pos:Se,u_atmosphere_blend:Je,u_globe_position:Ze,u_globe_radius:$e,u_inv_proj_matrix:bt}))(te,pe,[Oe[0],Oe[1],Oe[2]],ie,me),we=ja(Y,R);J.draw(Y,X.TRIANGLES,Q,ui.disabled,Ii.alphaBlended,kt.disabled,ve,null,null,"atmosphere",we.vertexBuffer,we.indexBuffer,we.segments)})(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const A=(function(R,V){let Y=null;const X=Object.values(R._layers).flatMap((te=>te.source&&!te.isHidden(V)?[R.sourceCaches[te.source]]:[])),J=X.filter((te=>te.getSource().type==="vector")),Q=X.filter((te=>te.getSource().type!=="vector")),ne=te=>{(!Y||Y.getSource().maxzoom<te.getSource().maxzoom)&&(Y=te)};return J.forEach((te=>ne(te))),Y||Q.forEach((te=>ne(te))),Y})(this.style,this.transform.zoom);A&&(function(R,V,Y){for(let X=0;X<Y.length;X++)fn(R,V,Y[X])})(this,A,A.getVisibleCoordinates())}this.options.showPadding&&(function(A){const R=A.transform.padding;uu(A,A.transform.height-(R.top||0),3,mp),uu(A,R.bottom||0,3,gp),Ui(A,R.left||0,3,Al),Ui(A,A.transform.width-(R.right||0),3,cu);const V=A.transform.centerPoint;(function(Y,X,J,Q){Vn(Y,X-1,J-10,2,20,Q),Vn(Y,X-10,J-1,20,2,Q)})(A,V.x,A.transform.height-V.y,If)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;const s=this.terrainFacilitator.matrix,c=this.transform.modelViewProjectionMatrix;let p=this.terrainFacilitator.dirty;p||(p=e?!a.c8(s,c):!a.c9(s,c)),p||(p=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),p&&(a.ca(s,c),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(g,b){const T=g.context,S=T.gl,C=g.transform,E=Ii.unblended,j=new Ut(S.LEQUAL,Ut.ReadWrite,[0,1]),A=b.sourceCache.getRenderableTiles(),R=g.useProgram("terrainDepth");T.bindFramebuffer.set(b.getFramebuffer("depth").framebuffer),T.viewport.set([0,0,g.width/devicePixelRatio,g.height/devicePixelRatio]),T.clear({color:a.bf.transparent,depth:1});for(const V of A){const Y=b.getTerrainMesh(V.tileID),X=b.getTerrainData(V.tileID),J=C.getProjectionData({overscaledTileID:V.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Q={u_ele_delta:b.getMeshFrameDelta(C.zoom)};R.draw(T,S.TRIANGLES,j,ui.disabled,E,kt.backCCW,Q,X,J,"terrain",Y.vertexBuffer,Y.indexBuffer,Y.segments)}T.bindFramebuffer.set(null),T.viewport.set([0,0,g.width,g.height])})(this,this.style.map.terrain),(function(g,b){const T=g.context,S=T.gl,C=g.transform,E=Ii.unblended,j=new Ut(S.LEQUAL,Ut.ReadWrite,[0,1]),A=b.getCoordsTexture(),R=b.sourceCache.getRenderableTiles(),V=g.useProgram("terrainCoords");T.bindFramebuffer.set(b.getFramebuffer("coords").framebuffer),T.viewport.set([0,0,g.width/devicePixelRatio,g.height/devicePixelRatio]),T.clear({color:a.bf.transparent,depth:1}),b.coordsIndex=[];for(const Y of R){const X=b.getTerrainMesh(Y.tileID),J=b.getTerrainData(Y.tileID);T.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,A.texture);const Q={u_terrain_coords_id:(255-b.coordsIndex.length)/255,u_texture:0,u_ele_delta:b.getMeshFrameDelta(C.zoom)},ne=C.getProjectionData({overscaledTileID:Y.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});V.draw(T,S.TRIANGLES,j,ui.disabled,E,kt.backCCW,Q,J,ne,"terrain",X.vertexBuffer,X.indexBuffer,X.segments),b.coordsIndex.push(Y.tileID.key)}T.bindFramebuffer.set(null),T.viewport.set([0,0,g.width,g.height])})(this,this.style.map.terrain))}renderLayer(e,s,c,p,g){c.isHidden(this.transform.zoom)||(c.type==="background"||c.type==="custom"||(p||[]).length)&&(this.id=c.id,a.cb(c)?(function(b,T,S,C,E,j){if(b.renderPass!=="translucent")return;const{isRenderingToTexture:A}=j,R=ui.disabled,V=b.colorModeForRenderPass();(S._unevaluatedLayout.hasValue("text-variable-anchor")||S._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Y,X,J,Q,ne,te,le,pe,ie){const me=X.transform,Oe=X.style.map.terrain,ve=ne==="map",we=te==="map";for(const Se of Y){const Je=Q.getTile(Se),Ze=Je.getBucket(J);if(!Ze||!Ze.text||!Ze.text.segments.get().length)continue;const $e=a.an(Ze.textSizeData,me.zoom),bt=a.aC(Je,1,X.transform.zoom),Xt=Qi(ve,X.transform,bt),mi=J.layout.get("icon-text-fit")!=="none"&&Ze.hasIconData();if($e){const zi=Math.pow(2,me.zoom-Je.tileID.overscaledZ),gi=Oe?(Ai,Gi)=>Oe.getElevation(Se,Ai,Gi):null;nu(Ze,ve,we,ie,me,Xt,zi,$e,mi,a.aD(me,Je,le,pe),Se.toUnwrapped(),gi)}}})(C,b,S,T,S.layout.get("text-rotation-alignment"),S.layout.get("text-pitch-alignment"),S.paint.get("text-translate"),S.paint.get("text-translate-anchor"),E),S.paint.get("icon-opacity").constantOr(1)!==0&&Ca(b,T,S,C,!1,S.paint.get("icon-translate"),S.paint.get("icon-translate-anchor"),S.layout.get("icon-rotation-alignment"),S.layout.get("icon-pitch-alignment"),S.layout.get("icon-keep-upright"),R,V,A),S.paint.get("text-opacity").constantOr(1)!==0&&Ca(b,T,S,C,!0,S.paint.get("text-translate"),S.paint.get("text-translate-anchor"),S.layout.get("text-rotation-alignment"),S.layout.get("text-pitch-alignment"),S.layout.get("text-keep-upright"),R,V,A),T.map.showCollisionBoxes&&(pp(b,T,S,C,!0),pp(b,T,S,C,!1))})(e,s,c,p,this.style.placement.variableOffsets,g):a.cc(c)?(function(b,T,S,C,E){if(b.renderPass!=="translucent")return;const{isRenderingToTexture:j}=E,A=S.paint.get("circle-opacity"),R=S.paint.get("circle-stroke-width"),V=S.paint.get("circle-stroke-opacity"),Y=!S.layout.get("circle-sort-key").isConstant();if(A.constantOr(1)===0&&(R.constantOr(1)===0||V.constantOr(1)===0))return;const X=b.context,J=X.gl,Q=b.transform,ne=b.getDepthModeForSublayer(0,Ut.ReadOnly),te=ui.disabled,le=b.colorModeForRenderPass(),pe=[],ie=Q.getCircleRadiusCorrection();for(let me=0;me<C.length;me++){const Oe=C[me],ve=T.getTile(Oe),we=ve.getBucket(S);if(!we)continue;const Se=S.paint.get("circle-translate"),Je=S.paint.get("circle-translate-anchor"),Ze=a.aD(Q,ve,Se,Je),$e=we.programConfigurations.get(S.id),bt=b.useProgram("circle",$e),Xt=we.layoutVertexBuffer,mi=we.indexBuffer,zi=b.style.map.terrain&&b.style.map.terrain.getTerrainData(Oe),gi={programConfiguration:$e,program:bt,layoutVertexBuffer:Xt,indexBuffer:mi,uniformValues:yf(b,ve,S,Ze,ie),terrainData:zi,projectionData:Q.getProjectionData({overscaledTileID:Oe,applyGlobeMatrix:!j,applyTerrainMatrix:!0})};if(Y){const Ai=we.segments.get();for(const Gi of Ai)pe.push({segments:new a.aM([Gi]),sortKey:Gi.sortKey,state:gi})}else pe.push({segments:we.segments,sortKey:0,state:gi})}Y&&pe.sort(((me,Oe)=>me.sortKey-Oe.sortKey));for(const me of pe){const{programConfiguration:Oe,program:ve,layoutVertexBuffer:we,indexBuffer:Se,uniformValues:Je,terrainData:Ze,projectionData:$e}=me.state;ve.draw(X,J.TRIANGLES,ne,te,le,kt.backCCW,Je,Ze,$e,S.id,we,Se,me.segments,S.paint,b.transform.zoom,Oe)}})(e,s,c,p,g):a.cd(c)?(function(b,T,S,C,E){if(S.paint.get("heatmap-opacity")===0)return;const j=b.context,{isRenderingToTexture:A,isRenderingGlobe:R}=E;if(b.style.map.terrain){for(const V of C){const Y=T.getTile(V);T.hasRenderableParent(V)||(b.renderPass==="offscreen"?su(b,Y,S,V,R):b.renderPass==="translucent"&&fp(b,S,V,A,R))}j.viewport.set([0,0,b.width,b.height])}else b.renderPass==="offscreen"?(function(V,Y,X,J){const Q=V.context,ne=Q.gl,te=V.transform,le=ui.disabled,pe=new Ii([ne.ONE,ne.ONE],a.bf.transparent,[!0,!0,!0,!0]);(function(ie,me,Oe){const ve=ie.gl;ie.activeTexture.set(ve.TEXTURE1),ie.viewport.set([0,0,me.width/4,me.height/4]);let we=Oe.heatmapFbos.get(a.c2);we?(ve.bindTexture(ve.TEXTURE_2D,we.colorAttachment.get()),ie.bindFramebuffer.set(we.framebuffer)):(we=Ma(ie,me.width/4,me.height/4),Oe.heatmapFbos.set(a.c2,we))})(Q,V,X),Q.clear({color:a.bf.transparent});for(let ie=0;ie<J.length;ie++){const me=J[ie];if(Y.hasRenderableParent(me))continue;const Oe=Y.getTile(me),ve=Oe.getBucket(X);if(!ve)continue;const we=ve.programConfigurations.get(X.id),Se=V.useProgram("heatmap",we),Je=te.getProjectionData({overscaledTileID:me,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Ze=te.getCircleRadiusCorrection();Se.draw(Q,ne.TRIANGLES,Ut.disabled,le,pe,kt.backCCW,Kh(Oe,te.zoom,X.paint.get("heatmap-intensity"),Ze),null,Je,X.id,ve.layoutVertexBuffer,ve.indexBuffer,ve.segments,X.paint,te.zoom,we)}Q.viewport.set([0,0,V.width,V.height])})(b,T,S,C):b.renderPass==="translucent"&&(function(V,Y){const X=V.context,J=X.gl;X.setColorMode(V.colorModeForRenderPass());const Q=Y.heatmapFbos.get(a.c2);Q&&(X.activeTexture.set(J.TEXTURE0),J.bindTexture(J.TEXTURE_2D,Q.colorAttachment.get()),X.activeTexture.set(J.TEXTURE1),Ia(X,Y).bind(J.LINEAR,J.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(X,J.TRIANGLES,Ut.disabled,ui.disabled,V.colorModeForRenderPass(),kt.disabled,Hc(V,Y,0,1),null,null,Y.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,Y.paint,V.transform.zoom))})(b,S)})(e,s,c,p,g):a.ce(c)?(function(b,T,S,C,E){if(b.renderPass!=="translucent")return;const{isRenderingToTexture:j}=E,A=S.paint.get("line-opacity"),R=S.paint.get("line-width");if(A.constantOr(1)===0||R.constantOr(1)===0)return;const V=b.getDepthModeForSublayer(0,Ut.ReadOnly),Y=b.colorModeForRenderPass(),X=S.paint.get("line-dasharray"),J=S.paint.get("line-pattern"),Q=J.constantOr(1),ne=S.paint.get("line-gradient"),te=S.getCrossfadeParameters(),le=Q?"linePattern":X?"lineSDF":ne?"lineGradient":"line",pe=b.context,ie=pe.gl,me=b.transform;let Oe=!0;for(const ve of C){const we=T.getTile(ve);if(Q&&!we.patternsLoaded())continue;const Se=we.getBucket(S);if(!Se)continue;const Je=Se.programConfigurations.get(S.id),Ze=b.context.program.get(),$e=b.useProgram(le,Je),bt=Oe||$e.program!==Ze,Xt=b.style.map.terrain&&b.style.map.terrain.getTerrainData(ve),mi=J.constantOr(null);if(mi&&we.imageAtlas){const Mi=we.imageAtlas,Vt=Mi.patternPositions[mi.to.toString()],_r=Mi.patternPositions[mi.from.toString()];Vt&&_r&&Je.setConstantPatternPositions(Vt,_r)}const zi=me.getProjectionData({overscaledTileID:ve,applyGlobeMatrix:!j,applyTerrainMatrix:!0}),gi=me.getPixelScale(),Ai=Q?Qh(b,we,S,gi,te):X?Ks(b,we,S,gi,X,te):ne?Jh(b,we,S,gi,Se.lineClipsArray.length):vl(b,we,S,gi);if(Q)pe.activeTexture.set(ie.TEXTURE0),we.imageAtlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),Je.updatePaintBuffers(te);else if(X&&(bt||b.lineAtlas.dirty))pe.activeTexture.set(ie.TEXTURE0),b.lineAtlas.bind(pe);else if(ne){const Mi=Se.gradients[S.id];let Vt=Mi.texture;if(S.gradientVersion!==Mi.version){let _r=256;if(S.stepInterpolant){const er=T.getSource().maxzoom,yr=ve.canonical.z===er?Math.ceil(1<<b.transform.maxZoom-ve.canonical.z):1;_r=a.ah(a.c3(Se.maxLineLength/a.$*1024*yr),256,pe.maxTextureSize)}Mi.gradient=a.c4({expression:S.gradientExpression(),evaluationKey:"lineProgress",resolution:_r,image:Mi.gradient||void 0,clips:Se.lineClipsArray}),Mi.texture?Mi.texture.update(Mi.gradient):Mi.texture=new a.T(pe,Mi.gradient,ie.RGBA),Mi.version=S.gradientVersion,Vt=Mi.texture}pe.activeTexture.set(ie.TEXTURE0),Vt.bind(S.stepInterpolant?ie.NEAREST:ie.LINEAR,ie.CLAMP_TO_EDGE)}const Gi=b.stencilModeForClipping(ve);$e.draw(pe,ie.TRIANGLES,V,Gi,Y,kt.disabled,Ai,Xt,zi,S.id,Se.layoutVertexBuffer,Se.indexBuffer,Se.segments,S.paint,b.transform.zoom,Je,Se.layoutVertexBuffer2),Oe=!1}})(e,s,c,p,g):a.cf(c)?(function(b,T,S,C,E){const j=S.paint.get("fill-color"),A=S.paint.get("fill-opacity");if(A.constantOr(1)===0)return;const{isRenderingToTexture:R}=E,V=b.colorModeForRenderPass(),Y=S.paint.get("fill-pattern"),X=b.opaquePassEnabledForLayer()&&!Y.constantOr(1)&&j.constantOr(a.bf.transparent).a===1&&A.constantOr(0)===1?"opaque":"translucent";if(b.renderPass===X){const J=b.getDepthModeForSublayer(1,b.renderPass==="opaque"?Ut.ReadWrite:Ut.ReadOnly);Ml(b,T,S,C,J,V,!1,R)}if(b.renderPass==="translucent"&&S.paint.get("fill-antialias")){const J=b.getDepthModeForSublayer(S.getPaintProperty("fill-outline-color")?2:0,Ut.ReadOnly);Ml(b,T,S,C,J,V,!0,R)}})(e,s,c,p,g):a.cg(c)?(function(b,T,S,C,E){const j=S.paint.get("fill-extrusion-opacity");if(j===0)return;const{isRenderingToTexture:A}=E;if(b.renderPass==="translucent"){const R=new Ut(b.context.gl.LEQUAL,Ut.ReadWrite,b.depthRangeFor3D);if(j!==1||S.paint.get("fill-extrusion-pattern").constantOr(1))ou(b,T,S,C,R,ui.disabled,Ii.disabled,A),ou(b,T,S,C,R,b.stencilModeFor3D(),b.colorModeForRenderPass(),A);else{const V=b.colorModeForRenderPass();ou(b,T,S,C,R,ui.disabled,V,A)}}})(e,s,c,p,g):a.ch(c)?(function(b,T,S,C,E){if(b.renderPass!=="offscreen"&&b.renderPass!=="translucent")return;const{isRenderingToTexture:j}=E,A=b.context,R=b.style.projection.useSubdivision,V=b.getDepthModeForSublayer(0,Ut.ReadOnly),Y=b.colorModeForRenderPass();if(b.renderPass==="offscreen")(function(X,J,Q,ne,te,le,pe){const ie=X.context,me=ie.gl;for(const Oe of Q){const ve=J.getTile(Oe),we=ve.dem;if(!we||!we.data||!ve.needsHillshadePrepare)continue;const Se=we.dim,Je=we.stride,Ze=we.getPixels();if(ie.activeTexture.set(me.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),ve.demTexture=ve.demTexture||X.getTileTexture(Je),ve.demTexture){const bt=ve.demTexture;bt.update(Ze,{premultiply:!1}),bt.bind(me.NEAREST,me.CLAMP_TO_EDGE)}else ve.demTexture=new a.T(ie,Ze,me.RGBA,{premultiply:!1}),ve.demTexture.bind(me.NEAREST,me.CLAMP_TO_EDGE);ie.activeTexture.set(me.TEXTURE0);let $e=ve.fbo;if(!$e){const bt=new a.T(ie,{width:Se,height:Se,data:null},me.RGBA);bt.bind(me.LINEAR,me.CLAMP_TO_EDGE),$e=ve.fbo=ie.createFramebuffer(Se,Se,!0,!1),$e.colorAttachment.set(bt.texture)}ie.bindFramebuffer.set($e.framebuffer),ie.viewport.set([0,0,Se,Se]),X.useProgram("hillshadePrepare").draw(ie,me.TRIANGLES,te,le,pe,kt.disabled,Xh(ve.tileID,we),null,null,ne.id,X.rasterBoundsBuffer,X.quadTriangleIndexBuffer,X.rasterBoundsSegments),ve.needsHillshadePrepare=!1}})(b,T,C,S,V,ui.disabled,Y),A.viewport.set([0,0,b.width,b.height]);else if(b.renderPass==="translucent")if(R){const[X,J,Q]=b.stencilConfigForOverlapTwoPass(C);Qs(b,T,S,Q,X,V,Y,!1,j),Qs(b,T,S,Q,J,V,Y,!0,j)}else{const[X,J]=b.getStencilConfigForOverlapAndUpdateStencilID(C);Qs(b,T,S,J,X,V,Y,!1,j)}})(e,s,c,p,g):a.ci(c)?(function(b,T,S,C,E){if(b.renderPass!=="translucent"||!C.length)return;const{isRenderingToTexture:j}=E,A=b.style.projection.useSubdivision,R=b.getDepthModeForSublayer(0,Ut.ReadOnly),V=b.colorModeForRenderPass();if(A){const[Y,X,J]=b.stencilConfigForOverlapTwoPass(C);au(b,T,S,J,Y,R,V,!1,j),au(b,T,S,J,X,R,V,!0,j)}else{const[Y,X]=b.getStencilConfigForOverlapAndUpdateStencilID(C);au(b,T,S,X,Y,R,V,!1,j)}})(e,s,c,p,g):a.cj(c)?(function(b,T,S,C,E){if(b.renderPass!=="translucent"||S.paint.get("raster-opacity")===0||!C.length)return;const{isRenderingToTexture:j}=E,A=T.getSource(),R=b.style.projection.useSubdivision;if(A instanceof ot)eo(b,T,S,C,null,!1,!1,A.tileCoords,A.flippedWindingOrder,j);else if(R){const[V,Y,X]=b.stencilConfigForOverlapTwoPass(C);eo(b,T,S,X,V,!1,!0,Il,!1,j),eo(b,T,S,X,Y,!0,!0,Il,!1,j)}else{const[V,Y]=b.getStencilConfigForOverlapAndUpdateStencilID(C);eo(b,T,S,Y,V,!1,!0,Il,!1,j)}})(e,s,c,p,g):a.ck(c)?(function(b,T,S,C,E){const j=S.paint.get("background-color"),A=S.paint.get("background-opacity");if(A===0)return;const{isRenderingToTexture:R}=E,V=b.context,Y=V.gl,X=b.style.projection,J=b.transform,Q=J.tileSize,ne=S.paint.get("background-pattern");if(b.isPatternMissing(ne))return;const te=!ne&&j.a===1&&A===1&&b.opaquePassEnabledForLayer()?"opaque":"translucent";if(b.renderPass!==te)return;const le=ui.disabled,pe=b.getDepthModeForSublayer(0,te==="opaque"?Ut.ReadWrite:Ut.ReadOnly),ie=b.colorModeForRenderPass(),me=b.useProgram(ne?"backgroundPattern":"background"),Oe=C||ye(J,{tileSize:Q,terrain:b.style.map.terrain});ne&&(V.activeTexture.set(Y.TEXTURE0),b.imageManager.bind(b.context));const ve=S.getCrossfadeParameters();for(const we of Oe){const Se=J.getProjectionData({overscaledTileID:we,applyGlobeMatrix:!R,applyTerrainMatrix:!0}),Je=ne?ip(A,b,ne,{tileID:we,tileSize:Q},ve):tp(A,j),Ze=b.style.map.terrain&&b.style.map.terrain.getTerrainData(we),$e=X.getMeshFromTileID(V,we.canonical,!1,!0,"raster");me.draw(V,Y.TRIANGLES,pe,le,ie,kt.backCCW,Je,Ze,Se,S.id,$e.vertexBuffer,$e.indexBuffer,$e.segments)}})(e,0,c,p,g):a.cl(c)&&(function(b,T,S,C){const{isRenderingGlobe:E}=C,j=b.context,A=S.implementation,R=b.style.projection,V=b.transform,Y=V.getProjectionDataForCustomLayer(E),X={farZ:V.farZ,nearZ:V.nearZ,fov:V.fov*Math.PI/180,modelViewProjectionMatrix:V.modelViewProjectionMatrix,projectionMatrix:V.projectionMatrix,shaderData:{variantName:R.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
829uniform mat4 u_projection_matrix;
830${R.shaderPreludeCode.vertexSource}
830`,define:R.shaderDefine},defaultProjectionData:Y},J=A.renderingMode?A.renderingMode:"2d";if(b.renderPass==="offscreen"){const Q=A.prerender;Q&&(b.setCustomLayerDefaults(),j.setColorMode(b.colorModeForRenderPass()),Q.call(A,j.gl,X),j.setDirty(),b.setBaseState())}else if(b.renderPass==="translucent"){b.setCustomLayerDefaults(),j.setColorMode(b.colorModeForRenderPass()),j.setStencilMode(ui.disabled);const Q=J==="3d"?b.getDepthModeFor3D():b.getDepthModeForSublayer(0,Ut.ReadOnly);j.setDepthMode(Q),A.render(j.gl,X),j.setDirty(),b.setBaseState(),j.bindFramebuffer.set(null)}})(e,0,c,g))}saveTileTexture(e){const s=this._tileTextures[e.size[0]];s?s.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const s=this._tileTextures[e];return s&&s.length>0?s.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const s=this.imageManager.getPattern(e.from.toString()),c=this.imageManager.getPattern(e.to.toString());return!s||!c}useProgram(e,s,c=!1,p=[]){this.cache=this.cache||{};const g=!!this.style.map.terrain,b=this.style.projection,T=c?gn.projectionMercator:b.shaderPreludeCode,S=c?is:b.shaderDefine,C=e+(s?s.cacheKey:"")+`/${c?Vs:b.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(g?"/terrain":"")+(p?`/${p.join("/")}`:"");return this.cache[C]||(this.cache[C]=new Gc(this.context,gn[e],s,Xc[e],this._showOverdrawInspector,g,T,S,p)),this.cache[C]}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 e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new a.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:s}=this.context.gl;return this.width!==e||this.height!==s}}function to(f,e){let s,c=!1,p=null,g=null;const b=()=>{p=null,c&&(f.apply(g,s),p=setTimeout(b,e),c=!1)};return(...T)=>(c=!0,g=this,s=T,p||b(),p)}class kl{constructor(e){this._getCurrentHash=()=>{const s=window.location.hash.replace("#","");if(this._hashName){let c;return s.split("&").map((p=>p.split("="))).forEach((p=>{p[0]===this._hashName&&(c=p)})),(c&&c[1]||"").split("/")}return s.split("/")},this._onHashChange=()=>{const s=this._getCurrentHash();if(!this._isValidHash(s))return!1;const c=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:c,pitch:+(s[4]||0)}),!0},this._updateHashUnthrottled=()=>{const s=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,s)},this._removeHash=()=>{const s=this._getCurrentHash();if(s.length===0)return;const c=s.join("/");let p=c;p.split("&").length>0&&(p=p.split("&")[0]),this._hashName&&(p=`${this._hashName}=${c}`);let g=window.location.hash.replace(p,"");g.startsWith("#&")?g=g.slice(0,1)+g.slice(2):g==="#"&&(g="");let b=window.location.href.replace(/(#.+)?$/,g);b=b.replace("&&","&"),window.history.replaceState(window.history.state,null,b)},this._updateHash=to(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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()),this._removeHash(),delete this._map,this}getHashString(e){const s=this._map.getCenter(),c=Math.round(100*this._map.getZoom())/100,p=Math.ceil((c*Math.LN2+Math.log(512/360/.5))/Math.LN10),g=Math.pow(10,p),b=Math.round(s.lng*g)/g,T=Math.round(s.lat*g)/g,S=this._map.getBearing(),C=this._map.getPitch();let E="";if(E+=e?`/${b}/${T}/${c}`:`${c}/${T}/${b}`,(S||C)&&(E+="/"+Math.round(10*S)/10),C&&(E+=`/${Math.round(C)}`),this._hashName){const j=this._hashName;let A=!1;const R=window.location.hash.slice(1).split("&").map((V=>{const Y=V.split("=")[0];return Y===j?(A=!0,`${Y}=${E}`):V})).filter((V=>V));return A||R.push(`${j}=${E}`),`#${R.join("&")}`}return`#${E}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new a.S(+e[2],+e[1])}catch{return!1}const s=+e[0],c=+(e[3]||0),p=+(e[4]||0);return s>=this._map.getMinZoom()&&s<=this._map.getMaxZoom()&&c>=-180&&c<=180&&p>=this._map.getMinPitch()&&p<=this._map.getMaxPitch()}}const ss={linearity:.3,easing:a.cm(0,0,.3,1)},hu=a.e({deceleration:2500,maxSpeed:1400},ss),yp=a.e({deceleration:20,maxSpeed:1400},ss),bp=a.e({deceleration:1e3,maxSpeed:360},ss),xp=a.e({deceleration:1e3,maxSpeed:90},ss),vp=a.e({deceleration:1e3,maxSpeed:360},ss);class wp{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:W.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,s=W.now();for(;e.length>0&&s-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const s={zoom:0,bearing:0,pitch:0,roll:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:g}of this._inertiaBuffer)s.zoom+=g.zoomDelta||0,s.bearing+=g.bearingDelta||0,s.pitch+=g.pitchDelta||0,s.roll+=g.rollDelta||0,g.panDelta&&s.pan._add(g.panDelta),g.around&&(s.around=g.around),g.pinchAround&&(s.pinchAround=g.pinchAround);const c=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,p={};if(s.pan.mag()){const g=ko(s.pan.mag(),c,a.e({},hu,e||{})),b=s.pan.mult(g.amount/s.pan.mag()),T=this._map.cameraHelper.handlePanInertia(b,this._map.transform);p.center=T.easingCenter,p.offset=T.easingOffset,bn(p,g)}if(s.zoom){const g=ko(s.zoom,c,yp);
vendor: 30,667 bytes, line 830
830p.zoom=this._map.transform.zoom+g.amount,bn(p,g)}if(s.bearing){const g=ko(s.bearing,c,bp);p.bearing=this._map.transform.bearing+a.ah(g.amount,-179,179),bn(p,g)}if(s.pitch){const g=ko(s.pitch,c,xp);p.pitch=this._map.transform.pitch+g.amount,bn(p,g)}if(s.roll){const g=ko(s.roll,c,vp);p.roll=this._map.transform.roll+a.ah(g.amount,-179,179),bn(p,g)}if(p.zoom||p.bearing){const g=s.pinchAround===void 0?s.around:s.pinchAround;p.around=g?this._map.unproject(g):this._map.getCenter()}return this.clear(),a.e(p,{noMoveStart:!0})}}function bn(f,e){(!f.duration||f.duration<e.duration)&&(f.duration=e.duration,f.easing=e.easing)}function ko(f,e,s){const{maxSpeed:c,linearity:p,deceleration:g}=s,b=a.ah(f*p/(e/1e3),-c,c),T=Math.abs(b)/(g*p);return{easing:s.easing,duration:1e3*T,amount:b*(T/2)}}class qr extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,s,c,p={}){c=c instanceof MouseEvent?c:new MouseEvent(e,c);const g=G.mousePos(s.getCanvas(),c),b=s.unproject(g);super(e,a.e({point:g,lngLat:b,originalEvent:c},p)),this._defaultPrevented=!1,this.target=s}}class Ro extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,s,c){const p=e==="touchend"?c.changedTouches:c.touches,g=G.touchPos(s.getCanvasContainer(),p),b=g.map((S=>s.unproject(S))),T=g.reduce(((S,C,E,j)=>S.add(C.div(j.length))),new a.P(0,0));super(e,{points:g,point:T,lngLats:b,lngLat:s.unproject(T),originalEvent:c}),this._defaultPrevented=!1}}class pu extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,s,c){super(e,{originalEvent:c}),this._defaultPrevented=!1}}class Bp{constructor(e,s){this._map=e,this._clickTolerance=s.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new pu(e.type,this._map,e))}mousedown(e,s){return this._mousedownPos=s,this._firePreventable(new qr(e.type,this._map,e))}mouseup(e){this._map.fire(new qr(e.type,this._map,e))}click(e,s){this._mousedownPos&&this._mousedownPos.dist(s)>=this._clickTolerance||this._map.fire(new qr(e.type,this._map,e))}dblclick(e){return this._firePreventable(new qr(e.type,this._map,e))}mouseover(e){this._map.fire(new qr(e.type,this._map,e))}mouseout(e){this._map.fire(new qr(e.type,this._map,e))}touchstart(e){return this._firePreventable(new Ro(e.type,this._map,e))}touchmove(e){this._map.fire(new Ro(e.type,this._map,e))}touchend(e){this._map.fire(new Ro(e.type,this._map,e))}touchcancel(e){this._map.fire(new Ro(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Tp{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new qr(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new qr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new qr(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Do{constructor(e){this._map=e}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(e){return this.transform.screenPointToLocation(a.P.convert(e),this._map.terrain)}}class du{constructor(e,s){this._map=e,this._tr=new Do(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=s.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,s){this.isEnabled()&&e.shiftKey&&e.button===0&&(G.disableDrag(),this._startPos=this._lastPos=s,this._active=!0)}mousemoveWindow(e,s){if(!this._active)return;const c=s;if(this._lastPos.equals(c)||!this._box&&c.dist(this._startPos)<this._clickTolerance)return;const p=this._startPos;this._lastPos=c,this._box||(this._box=G.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));const g=Math.min(p.x,c.x),b=Math.max(p.x,c.x),T=Math.min(p.y,c.y),S=Math.max(p.y,c.y);G.setTransform(this._box,`translate(${g}px,${T}px)`),this._box.style.width=b-g+"px",this._box.style.height=S-T+"px"}mouseupWindow(e,s){if(!this._active||e.button!==0)return;const c=this._startPos,p=s;if(this.reset(),G.suppressClick(),c.x!==p.x||c.y!==p.y)return this._map.fire(new a.l("boxzoomend",{originalEvent:e})),{cameraAnimation:g=>g.fitScreenCoordinates(c,p,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(G.remove(this._box),this._box=null),G.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,s){return this._map.fire(new a.l(e,{originalEvent:s}))}}function Lo(f,e){if(f.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${f.length}, points ${e.length}`);const s={};for(let c=0;c<f.length;c++)s[f[c].identifier]=e[c];return s}class Sp{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,s,c){(this.centroid||c.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),c.length===this.numTouches&&(this.centroid=(function(p){const g=new a.P(0,0);for(const b of p)g._add(b);return g.div(p.length)})(s),this.touches=Lo(c,s)))}touchmove(e,s,c){if(this.aborted||!this.centroid)return;const p=Lo(c,s);for(const g in this.touches){const b=p[g];(!b||b.dist(this.touches[g])>30)&&(this.aborted=!0)}}touchend(e,s,c){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),c.length===0){const p=!this.aborted&&this.centroid;if(this.reset(),p)return p}}}class Wr{constructor(e){this.singleTap=new Sp(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,s,c){this.singleTap.touchstart(e,s,c)}touchmove(e,s,c){this.singleTap.touchmove(e,s,c)}touchend(e,s,c){const p=this.singleTap.touchend(e,s,c);if(p){const g=e.timeStamp-this.lastTime<500,b=!this.lastTap||this.lastTap.dist(p)<30;if(g&&b||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=p,this.count===this.numTaps)return this.reset(),p}}}class xn{constructor(e){this._tr=new Do(e),this._zoomIn=new Wr({numTouches:1,numTaps:2}),this._zoomOut=new Wr({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,s,c){this._zoomIn.touchstart(e,s,c),this._zoomOut.touchstart(e,s,c)}touchmove(e,s,c){this._zoomIn.touchmove(e,s,c),this._zoomOut.touchmove(e,s,c)}touchend(e,s,c){const p=this._zoomIn.touchend(e,s,c),g=this._zoomOut.touchend(e,s,c),b=this._tr;return p?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:T=>T.easeTo({duration:300,zoom:b.zoom+1,around:b.unproject(p)},{originalEvent:e})}):g?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:T=>T.easeTo({duration:300,zoom:b.zoom-1,around:b.unproject(g)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zo{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const s=this._moveFunction(...e);if(s.bearingDelta||s.pitchDelta||s.rollDelta||s.around||s.panDelta)return this._active=!0,s}dragStart(e,s){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(s)?s[0]:s,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,s){if(!this.isEnabled())return;const c=this._lastPoint;if(!c)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const p=Array.isArray(s)?s[0]:s;return!this._moved&&p.dist(c)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=p,this._move(c,p))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&G.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const vn=0,Fo=2,Af={[vn]:1,[Fo]:2};class ka{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){const s=G.mouseButton(e);this._eventButton=s}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!(function(s,c){const p=Af[c];return s.buttons===void 0||(s.buttons&p)!==p})(e,this._eventButton)}isValidEndEvent(e){return G.mouseButton(e)===this._eventButton}}class jf{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class kf{constructor(e=new ka({checkCorrectEvent:()=>!0}),s=new jf){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=s}_executeRelevantHandler(e,s,c){return e instanceof MouseEvent?s(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?c(e):void 0}startMove(e){this._executeRelevantHandler(e,(s=>this.mouseMoveStateManager.startMove(s)),(s=>this.oneFingerTouchMoveStateManager.startMove(s)))}endMove(e){this._executeRelevantHandler(e,(s=>this.mouseMoveStateManager.endMove(s)),(s=>this.oneFingerTouchMoveStateManager.endMove(s)))}isValidStartEvent(e){return this._executeRelevantHandler(e,(s=>this.mouseMoveStateManager.isValidStartEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidStartEvent(s)))}isValidMoveEvent(e){return this._executeRelevantHandler(e,(s=>this.mouseMoveStateManager.isValidMoveEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(s)))}isValidEndEvent(e){return this._executeRelevantHandler(e,(s=>this.mouseMoveStateManager.isValidEndEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidEndEvent(s)))}}const Ra=f=>{f.mousedown=f.dragStart,f.mousemoveWindow=f.dragMove,f.mouseup=f.dragEnd,f.contextmenu=e=>{e.preventDefault()}};class Da{constructor(e,s){this._clickTolerance=e.clickTolerance||1,this._map=s,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,s,c){return this._calculateTransform(e,s,c)}touchmove(e,s,c){if(this._active){if(!this._shouldBePrevented(c.length))return e.preventDefault(),this._calculateTransform(e,s,c);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,s,c){this._calculateTransform(e,s,c),this._active&&this._shouldBePrevented(c.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,s,c){c.length>0&&(this._active=!0);const p=Lo(c,s),g=new a.P(0,0),b=new a.P(0,0);let T=0;for(const C in p){const E=p[C],j=this._touches[C];j&&(g._add(E),b._add(E.sub(j)),T++,p[C]=E)}if(this._touches=p,this._shouldBePrevented(T)||!b.mag())return;const S=b.div(T);return this._sum._add(S),this._sum.mag()<this._clickTolerance?void 0:{around:g.div(T),panDelta:S}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,s,c){this._firstTwoTouches||c.length<2||(this._firstTwoTouches=[c[0].identifier,c[1].identifier],this._start([s[0],s[1]]))}touchmove(e,s,c){if(!this._firstTwoTouches)return;e.preventDefault();const[p,g]=this._firstTwoTouches,b=ft(c,s,p),T=ft(c,s,g);if(!b||!T)return;const S=this._aroundCenter?null:b.add(T).div(2);return this._move([b,T],S,e)}touchend(e,s,c){if(!this._firstTwoTouches)return;const[p,g]=this._firstTwoTouches,b=ft(c,s,p),T=ft(c,s,g);b&&T||(this._active&&G.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function ft(f,e,s){for(let c=0;c<f.length;c++)if(f[c].identifier===s)return e[c]}function fu(f,e){return Math.log(f/e)/Math.LN2}class Rl extends wn{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,s){const c=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(fu(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:fu(this._distance,c),pinchAround:s}}}function mu(f,e){return 180*f.angleWith(e)/Math.PI}class No extends wn{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,s,c){const p=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:mu(this._vector,p),pinchAround:s}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const s=25/(Math.PI*this._minDiameter)*360,c=mu(e,this._startVector);return Math.abs(c)<s}}function io(f){return Math.abs(f.y)>Math.abs(f.x)}class Dl extends wn{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,s,c){super.touchstart(e,s,c),this._currentTouchCount=c.length}_start(e){this._lastPoints=e,io(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,s,c){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const p=e[0].sub(this._lastPoints[0]),g=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(p,g,c.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(p.y+g.y)/2*-.5}):void 0}gestureBeginsVertically(e,s,c){if(this._valid!==void 0)return this._valid;const p=e.mag()>=2,g=s.mag()>=2;if(!p&&!g)return;if(!p||!g)return this._firstMove===void 0&&(this._firstMove=c),c-this._firstMove<100&&void 0;const b=e.y>0==s.y>0;return io(e)&&io(s)&&b}}const ai={panStep:100,bearingStep:15,pitchStep:10};class Ll{constructor(e){this._tr=new Do(e);const s=ai;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let s=0,c=0,p=0,g=0,b=0;switch(e.keyCode){case 61:case 107:case 171:case 187:s=1;break;case 189:case 109:case 173:s=-1;break;case 37:e.shiftKey?c=-1:(e.preventDefault(),g=-1);break;case 39:e.shiftKey?c=1:(e.preventDefault(),g=1);break;case 38:e.shiftKey?p=1:(e.preventDefault(),b=-1);break;case 40:e.shiftKey?p=-1:(e.preventDefault(),b=1);break;default:return}return this._rotationDisabled&&(c=0,p=0),{cameraAnimation:T=>{const S=this._tr;T.easeTo({duration:300,easeId:"keyboardHandler",easing:Rf,zoom:s?Math.round(S.zoom)+s*(e.shiftKey?2:1):S.zoom,bearing:S.bearing+c*this._bearingStep,pitch:S.pitch+p*this._pitchStep,offset:[-g*this._panStep,-b*this._panStep],center:S.center},{originalEvent:e})}}}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 Rf(f){return f*(2-f)}const zl=4.000244140625,Df=1/450;class Op{constructor(e,s){this._onTimeout=c=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(c)},this._map=e,this._tr=new Do(e),this._triggerRenderFrame=s,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Df}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let s=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const c=W.now(),p=c-(this._lastWheelEventTime||0);this._lastWheelEventTime=c,s!==0&&s%zl==0?this._type="wheel":s!==0&&Math.abs(s)<4?this._type="trackpad":p>400?(this._type=null,this._lastValue=s,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(p*s)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,s+=this._lastValue)),e.shiftKey&&s&&(s/=4),this._type&&(this._lastWheelEvent=e,this._delta-=s,this._active||this._start(e)),e.preventDefault()}_start(e){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 s=G.mousePos(this._map.getCanvas(),e),c=this._tr;this._aroundPoint=this._aroundCenter?c.transform.locationToScreenPoint(a.S.convert(c.center)):s,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const T=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=T),typeof this._targetZoom=="number"&&(this._targetZoom+=T)}if(this._delta!==0){const T=this._type==="wheel"&&Math.abs(this._delta)>zl?this._wheelZoomRate:this._defaultZoomRate;let S=2/(1+Math.exp(-Math.abs(this._delta*T)));this._delta<0&&S!==0&&(S=1/S);const C=typeof this._targetZoom!="number"?e.scale:a.af(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),a.ak(C*S)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const s=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,c=this._startZoom,p=this._easing;let g,b=!1;if(this._type==="wheel"&&c&&p){const T=W.now()-this._lastWheelEventTime,S=Math.min((T+5)/200,1),C=p(S);g=a.C.number(c,s,C),S<1?this._frameId||(this._frameId=!0):b=!0}else g=s,b=!0;return this._active=!0,b&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=g,{noInertia:!0,needsRenderFrame:!b,zoomDelta:g-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let s=a.co;if(this._prevEase){const c=this._prevEase,p=(W.now()-c.start)/c.duration,g=c.easing(p+.01)-c.easing(p),b=.27/Math.sqrt(g*g+1e-4)*.01,T=Math.sqrt(.0729-b*b);s=a.cm(b,T,.25,1)}return this._prevEase={start:W.now(),duration:e,easing:s},s}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class gu{constructor(e,s){this._clickZoom=e,this._tapZoom=s}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 _u{constructor(e){this._tr=new Do(e),this.reset()}reset(){this._active=!1}dblclick(e,s){return e.preventDefault(),{cameraAnimation:c=>{c.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(s)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Pp{constructor(){this._tap=new Wr({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(e,s,c){if(!this._swipePoint)if(this._tapTime){const p=s[0],g=e.timeStamp-this._tapTime<500,b=this._tapPoint.dist(p)<30;g&&b?c.length>0&&(this._swipePoint=p,this._swipeTouch=c[0].identifier):this.reset()}else this._tap.touchstart(e,s,c)}touchmove(e,s,c){if(this._tapTime){if(this._swipePoint){if(c[0].identifier!==this._swipeTouch)return;const p=s[0],g=p.y-this._swipePoint.y;return this._swipePoint=p,e.preventDefault(),this._active=!0,{zoomDelta:g/128}}}else this._tap.touchmove(e,s,c)}touchend(e,s,c){if(this._tapTime)this._swipePoint&&c.length===0&&this.reset();else{const p=this._tap.touchend(e,s,c);p&&(this._tapTime=e.timeStamp,this._tapPoint=p)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cp{constructor(e,s,c){this._el=e,this._mousePan=s,this._touchPan=c}enable(e){this._inertiaOptions=e||{},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 yu{constructor(e,s,c,p){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=s,this._mousePitch=c,this._mouseRoll=p}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Ep{constructor(e,s,c,p){this._el=e,this._touchZoom=s,this._touchRotate=c,this._tapDragZoom=p,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),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 Mp{constructor(e,s){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=s,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=G.create("div","maplibregl-cooperative-gesture-screen",e);let s=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(s=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const c=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),p=document.createElement("div");p.className="maplibregl-desktop-message",p.textContent=s,this._container.appendChild(p);const g=document.createElement("div");g.className="maplibregl-mobile-message",g.textContent=c,this._container.appendChild(g),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(G.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._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,s){this._enabled&&(this._map.fire(new a.l("cooperativegestureprevented",{gestureType:e,originalEvent:s})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const Bn=f=>f.zoom||f.drag||f.roll||f.pitch||f.rotate;class Oi extends a.l{}function bu(f){return f.panDelta&&f.panDelta.mag()||f.zoomDelta||f.bearingDelta||f.pitchDelta||f.rollDelta}class Fl{constructor(e,s){this.handleWindowEvent=p=>{this.handleEvent(p,`${p.type}Window`)},this.handleEvent=(p,g)=>{if(p.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const b=p.type==="renderFrame"?void 0:p,T={needsRenderFrame:!1},S={},C={};for(const{handlerName:A,handler:R,allowed:V}of this._handlers){if(!R.isEnabled())continue;let Y;if(this._blockedByActive(C,V,A))R.reset();else if(R[g||p.type]){if(a.cp(p,g||p.type)){const X=G.mousePos(this._map.getCanvas(),p);Y=R[g||p.type](p,X)}else if(a.cq(p,g||p.type)){const X=this._getMapTouches(p.touches),J=G.touchPos(this._map.getCanvas(),X);Y=R[g||p.type](p,J,X)}else a.cr(g||p.type)||(Y=R[g||p.type](p));this.mergeHandlerResult(T,S,Y,A,b),Y&&Y.needsRenderFrame&&this._triggerRenderFrame()}(Y||R.isActive())&&(C[A]=R)}const E={};for(const A in this._previousActiveHandlers)C[A]||(E[A]=b);this._previousActiveHandlers=C,(Object.keys(E).length||bu(T))&&(this._changes.push([T,S,E]),this._triggerRenderFrame()),(Object.keys(C).length||bu(T))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:j}=T;j&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],j(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new wp(e),this._bearingSnap=s.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(s);const c=this._el;this._listeners=[[c,"touchstart",{passive:!0}],[c,"touchmove",{passive:!1}],[c,"touchend",void 0],[c,"touchcancel",void 0],[c,"mousedown",void 0],[c,"mousemove",void 0],[c,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[c,"mouseover",void 0],[c,"mouseout",void 0],[c,"dblclick",void 0],[c,"click",void 0],[c,"keydown",{capture:!1}],[c,"keyup",void 0],[c,"wheel",{passive:!1}],[c,"contextmenu",void 0],[window,"blur",void 0]];for(const[p,g,b]of this._listeners)G.addEventListener(p,g,p===document?this.handleWindowEvent:this.handleEvent,b)}destroy(){for(const[e,s,c]of this._listeners)G.removeEventListener(e,s,e===document?this.handleWindowEvent:this.handleEvent,c)}_addDefaultHandlers(e){const s=this._map,c=s.getCanvasContainer();this._add("mapEvent",new Bp(s,e));const p=s.boxZoom=new du(s,e);this._add("boxZoom",p),e.interactive&&e.boxZoom&&p.enable();const g=s.cooperativeGestures=new Mp(s,e.cooperativeGestures);this._add("cooperativeGestures",g),e.cooperativeGestures&&g.enable();const b=new xn(s),T=new _u(s);s.doubleClickZoom=new gu(T,b),this._add("tapZoom",b),this._add("clickZoom",T),e.interactive&&e.doubleClickZoom&&s.doubleClickZoom.enable();const S=new Pp;this._add("tapDragZoom",S);const C=s.touchPitch=new Dl(s);this._add("touchPitch",C),e.interactive&&e.touchPitch&&s.touchPitch.enable(e.touchPitch);const E=()=>s.project(s.getCenter()),j=(function({enable:te,clickTolerance:le,aroundCenter:pe=!0,minPixelCenterThreshold:ie=100,rotateDegreesPerPixelMoved:me=.8},Oe){const ve=new ka({checkCorrectEvent:we=>G.mouseButton(we)===0&&we.ctrlKey||G.mouseButton(we)===2&&!we.ctrlKey});return new zo({clickTolerance:le,move:(we,Se)=>{const Je=Oe();if(pe&&Math.abs(Je.y-we.y)>ie)return{bearingDelta:a.cn(new a.P(we.x,Se.y),Se,Je)};let Ze=(Se.x-we.x)*me;return pe&&Se.y<Je.y&&(Ze=-Ze),{bearingDelta:Ze}},moveStateManager:ve,enable:te,assignEvents:Ra})})(e,E),A=(function({enable:te,clickTolerance:le,pitchDegreesPerPixelMoved:pe=-.5}){const ie=new ka({checkCorrectEvent:me=>G.mouseButton(me)===0&&me.ctrlKey||G.mouseButton(me)===2});return new zo({clickTolerance:le,move:(me,Oe)=>({pitchDelta:(Oe.y-me.y)*pe}),moveStateManager:ie,enable:te,assignEvents:Ra})})(e),R=(function({enable:te,clickTolerance:le,rollDegreesPerPixelMoved:pe=.3},ie){const me=new ka({checkCorrectEvent:Oe=>G.mouseButton(Oe)===2&&Oe.ctrlKey});return new zo({clickTolerance:le,move:(Oe,ve)=>{const we=ie();let Se=(ve.x-Oe.x)*pe;return ve.y<we.y&&(Se=-Se),{rollDelta:Se}},moveStateManager:me,enable:te,assignEvents:Ra})})(e,E);s.dragRotate=new yu(e,j,A,R),this._add("mouseRotate",j,["mousePitch"]),this._add("mousePitch",A,["mouseRotate","mouseRoll"]),this._add("mouseRoll",R,["mousePitch"]),e.interactive&&e.dragRotate&&s.dragRotate.enable();const V=(function({enable:te,clickTolerance:le}){const pe=new ka({checkCorrectEvent:ie=>G.mouseButton(ie)===0&&!ie.ctrlKey});return new zo({clickTolerance:le,move:(ie,me)=>({around:me,panDelta:me.sub(ie)}),activateOnStart:!0,moveStateManager:pe,enable:te,assignEvents:Ra})})(e),Y=new Da(e,s);s.dragPan=new Cp(c,V,Y),this._add("mousePan",V),this._add("touchPan",Y,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&s.dragPan.enable(e.dragPan);const X=new No,J=new Rl;s.touchZoomRotate=new Ep(c,J,X,S),this._add("touchRotate",X,["touchPan","touchZoom"]),this._add("touchZoom",J,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&s.touchZoomRotate.enable(e.touchZoomRotate);const Q=s.scrollZoom=new Op(s,(()=>
vendor: 4,314 bytes, line 830
830this._triggerRenderFrame()));this._add("scrollZoom",Q,["mousePan"]),e.interactive&&e.scrollZoom&&s.scrollZoom.enable(e.scrollZoom);const ne=s.keyboard=new Ll(s);this._add("keyboard",ne),e.interactive&&e.keyboard&&s.keyboard.enable(),this._add("blockableMapEvent",new Tp(s))}_add(e,s,c){this._handlers.push({handlerName:e,handler:s,allowed:c}),this._handlersById[e]=s}stop(e){if(!this._updatingCamera){for(const{handler:s}of this._handlers)s.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Bn(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,s,c){for(const p in e)if(p!==c&&(!s||s.indexOf(p)<0))return!0;return!1}_getMapTouches(e){const s=[];for(const c of e)this._el.contains(c.target)&&s.push(c);return s}mergeHandlerResult(e,s,c,p,g){if(!c)return;a.e(e,c);const b={handlerName:p,originalEvent:c.originalEvent||g};c.zoomDelta!==void 0&&(s.zoom=b),c.panDelta!==void 0&&(s.drag=b),c.rollDelta!==void 0&&(s.roll=b),c.pitchDelta!==void 0&&(s.pitch=b),c.bearingDelta!==void 0&&(s.rotate=b)}_applyChanges(){const e={},s={},c={};for(const[p,g,b]of this._changes)p.panDelta&&(e.panDelta=(e.panDelta||new a.P(0,0))._add(p.panDelta)),p.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+p.zoomDelta),p.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+p.bearingDelta),p.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+p.pitchDelta),p.rollDelta&&(e.rollDelta=(e.rollDelta||0)+p.rollDelta),p.around!==void 0&&(e.around=p.around),p.pinchAround!==void 0&&(e.pinchAround=p.pinchAround),p.noInertia&&(e.noInertia=p.noInertia),a.e(s,g),a.e(c,b);this._updateMapTransform(e,s,c),this._changes=[]}_updateMapTransform(e,s,c){const p=this._map,g=p._getTransformForUpdate(),b=p.terrain;if(!(bu(e)||b&&this._terrainMovement))return this._fireEvents(s,c,!0);p._stop(!0);let{panDelta:T,zoomDelta:S,bearingDelta:C,pitchDelta:E,rollDelta:j,around:A,pinchAround:R}=e;R!==void 0&&(A=R),A=A||p.transform.centerPoint,b&&!g.isPointOnMapSurface(A)&&(A=g.centerPoint);const V={panDelta:T,zoomDelta:S,rollDelta:j,pitchDelta:E,bearingDelta:C,around:A};this._map.cameraHelper.useGlobeControls&&!g.isPointOnMapSurface(A)&&(A=g.centerPoint);const Y=A.distSqr(g.centerPoint)<.01?g.center:g.screenPointToLocation(T?A.sub(T):A);b?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(V,g),this._terrainMovement||!s.drag&&!s.zoom?s.drag&&this._terrainMovement?g.setCenter(g.screenPointToLocation(g.centerPoint.sub(T))):this._map.cameraHelper.handleMapControlsPan(V,g,Y):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(V,g,Y))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(V,g),this._map.cameraHelper.handleMapControlsPan(V,g,Y)),p._applyUpdatedTransform(g),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(s,c,!0)}_fireEvents(e,s,c){const p=Bn(this._eventsInProgress),g=Bn(e),b={};for(const j in e){const{originalEvent:A}=e[j];this._eventsInProgress[j]||(b[`${j}start`]=A),this._eventsInProgress[j]=e[j]}!p&&g&&this._fireEvent("movestart",g.originalEvent);for(const j in b)this._fireEvent(j,b[j]);g&&this._fireEvent("move",g.originalEvent);for(const j in e){const{originalEvent:A}=e[j];this._fireEvent(j,A)}const T={};let S;for(const j in this._eventsInProgress){const{handlerName:A,originalEvent:R}=this._eventsInProgress[j];this._handlersById[A].isActive()||(delete this._eventsInProgress[j],S=s[A]||R,T[`${j}end`]=S)}for(const j in T)this._fireEvent(j,T[j]);const C=Bn(this._eventsInProgress),E=(p||g)&&!C;if(E&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const j=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&j.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(j)}if(c&&E){this._updatingCamera=!0;const j=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),A=R=>R!==0&&-this._bearingSnap<R&&R<this._bearingSnap;!j||!j.essential&&W.prefersReducedMotion?(this._map.fire(new a.l("moveend",{originalEvent:S})),A(this._map.getBearing())&&this._map.resetNorth()):(A(j.bearing||this._map.getBearing())&&
vendor: 56,660 bytes, line 830
830(j.bearing=0),j.freezeElevation=!0,this._map.easeTo(j,{originalEvent:S})),this._updatingCamera=!1}}_fireEvent(e,s){this._map.fire(new a.l(e,s?{originalEvent:s}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((e=>{delete this._frameId,this.handleEvent(new Oi("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class xu extends a.E{constructor(e,s,c){super(),this._renderFrameCallback=()=>{const p=Math.min((W.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(p)),p<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=c.bearingSnap,this.cameraHelper=s,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(e,s){e.apply(this.transform),this.transform=e,this.cameraHelper=s}getCenter(){return new a.S(this.transform.center.lng,this.transform.center.lat)}setCenter(e,s){return this.jumpTo({center:e},s)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,s){return this.jumpTo({elevation:e},s),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,s,c){return e=a.P.convert(e).mult(-1),this.panTo(this.transform.center,a.e({offset:e},s),c)}panTo(e,s,c){return this.easeTo(a.e({center:e},s),c)}getZoom(){return this.transform.zoom}setZoom(e,s){return this.jumpTo({zoom:e},s),this}zoomTo(e,s,c){return this.easeTo(a.e({zoom:e},s),c)}zoomIn(e,s){return this.zoomTo(this.getZoom()+1,e,s),this}zoomOut(e,s){return this.zoomTo(this.getZoom()-1,e,s),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,s){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new a.l("movestart",s)).fire(new a.l("move",s)).fire(new a.l("moveend",s))),this}getBearing(){return this.transform.bearing}setBearing(e,s){return this.jumpTo({bearing:e},s),this}getPadding(){return this.transform.padding}setPadding(e,s){return this.jumpTo({padding:e},s),this}rotateTo(e,s,c){return this.easeTo(a.e({bearing:e},s),c)}resetNorth(e,s){return this.rotateTo(0,a.e({duration:1e3},e),s),this}resetNorthPitch(e,s){return this.easeTo(a.e({bearing:0,pitch:0,roll:0,duration:1e3},e),s),this}snapToNorth(e,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,s):this}getPitch(){return this.transform.pitch}setPitch(e,s){return this.jumpTo({pitch:e},s),this}getRoll(){return this.transform.roll}setRoll(e,s){return this.jumpTo({roll:e},s),this}cameraForBounds(e,s){e=ae.convert(e).adjustAntiMeridian();const c=s&&s.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),c,s)}_cameraForBoxAndBearing(e,s,c,p){const g={top:0,bottom:0,right:0,left:0};if(typeof(p=a.e({padding:g,offset:[0,0],maxZoom:this.transform.maxZoom},p)).padding=="number"){const C=p.padding;p.padding={top:C,bottom:C,right:C,left:C}}const b=a.e(g,p.padding);p.padding=b;const T=this.transform,S=new ae(e,s);return this.cameraHelper.cameraForBoxAndBearing(p,b,S,c,T)}fitBounds(e,s,c){return this._fitInternal(this.cameraForBounds(e,s),s,c)}fitScreenCoordinates(e,s,c,p,g){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(a.P.convert(e)),this.transform.screenPointToLocation(a.P.convert(s)),c,p),p,g)}_fitInternal(e,s,c){return e?(delete(s=a.e(e,s)).padding,s.linear?this.easeTo(s,c):this.flyTo(s,c)):this}jumpTo(e,s){this.stop();const c=this._getTransformForUpdate();let p=!1,g=!1,b=!1;const T=c.zoom;this.cameraHelper.handleJumpToCenterZoom(c,e);const S=c.zoom!==T;return"elevation"in e&&c.elevation!==+e.elevation&&c.setElevation(+e.elevation),"bearing"in e&&c.bearing!==+e.bearing&&(p=!0,c.setBearing(+e.bearing)),"pitch"in e&&c.pitch!==+e.pitch&&(g=!0,c.setPitch(+e.pitch)),"roll"in e&&c.roll!==+e.roll&&(b=!0,c.setRoll(+e.roll)),e.padding==null||c.isPaddingEqual(e.padding)||c.setPadding(e.padding),this._applyUpdatedTransform(c),this.fire(new a.l("movestart",s)).fire(new a.l("move",s)),S&&this.fire(new a.l("zoomstart",s)).fire(new a.l("zoom",s)).fire(new a.l("zoomend",s)),p&&this.fire(new a.l("rotatestart",s)).fire(new a.l("rotate",s)).fire(new a.l("rotateend",s)),g&&this.fire(new a.l("pitchstart",s)).fire(new a.l("pitch",s)).fire(new a.l("pitchend",s)),b&&this.fire(new a.l("rollstart",s)).fire(new a.l("roll",s)).fire(new a.l("rollend",s)),this.fire(new a.l("moveend",s))}calculateCameraOptionsFromTo(e,s,c,p=0){const g=a.a1.fromLngLat(e,s),b=a.a1.fromLngLat(c,p),T=b.x-g.x,S=b.y-g.y,C=b.z-g.z,E=Math.hypot(T,S,C);if(E===0)throw new Error("Can't calculate camera options with same From and To");const j=Math.hypot(T,S),A=a.ak(this.transform.cameraToCenterDistance/E/this.transform.tileSize),R=180*Math.atan2(T,-S)/Math.PI;let V=180*Math.acos(j/E)/Math.PI;return V=C<0?90-V:90+V,{center:b.toLngLat(),elevation:p,zoom:A,pitch:V,bearing:R}}calculateCameraOptionsFromCameraLngLatAltRotation(e,s,c,p,g){const b=this.transform.calculateCenterFromCameraLngLatAlt(e,s,c,p);return{center:b.center,elevation:b.elevation,zoom:b.zoom,bearing:c,pitch:p,roll:g}}easeTo(e,s){this._stop(!1,e.easeId),((e=a.e({offset:[0,0],duration:500,easing:a.co},e)).animate===!1||!e.essential&&W.prefersReducedMotion)&&(e.duration=0);const c=this._getTransformForUpdate(),p=this.getBearing(),g=c.pitch,b=c.roll,T="bearing"in e?this._normalizeBearing(e.bearing,p):p,S="pitch"in e?+e.pitch:g,C="roll"in e?this._normalizeBearing(e.roll,b):b,E="padding"in e?e.padding:c.padding,j=a.P.convert(e.offset);let A,R;e.around&&(A=a.S.convert(e.around),R=c.locationToScreenPoint(A));const V={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},Y=this.cameraHelper.handleEaseTo(c,{bearing:T,pitch:S,roll:C,padding:E,around:A,aroundPoint:R,offsetAsPoint:j,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating=this._rotating||p!==T,this._pitching=this._pitching||S!==g,this._rolling=this._rolling||C!==b,this._padding=!c.isPaddingEqual(E),this._zooming=this._zooming||Y.isZooming,this._easeId=e.easeId,this._prepareEase(s,e.noMoveStart,V),this.terrain&&this._prepareElevation(Y.elevationCenter),this._ease((X=>{Y.easeFunc(X),this.terrain&&!e.freezeElevation&&this._updateElevation(X),this._applyUpdatedTransform(c),this._fireMoveEvents(s)}),(X=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(s,X)}),e),this}_prepareEase(e,s,c={}){this._moving=!0,s||c.moving||this.fire(new a.l("movestart",e)),this._zooming&&!c.zooming&&this.fire(new a.l("zoomstart",e)),this._rotating&&!c.rotating&&this.fire(new a.l("rotatestart",e)),this._pitching&&!c.pitching&&this.fire(new a.l("pitchstart",e)),this._rolling&&!c.rolling&&this.fire(new a.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const s=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&s!==this._elevationTarget){const c=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(c-(s-(c*e+this._elevationStart))/(1-e)),this._elevationTarget=s}this.transform.setElevation(a.C.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};const s=e.getCameraLngLat(),c=e.getCameraAltitude(),p=this.terrain?this.terrain.getElevationForLngLatZoom(s,e.zoom):0;if(c<p){const g=this.calculateCameraOptionsFromTo(s,p,e.center,e.elevation);return{pitch:g.pitch,zoom:g.zoom}}return{}}_applyUpdatedTransform(e){const s=[];if(s.push((p=>this._elevateCameraIfInsideTerrain(p))),this.transformCameraUpdate&&s.push((p=>this.transformCameraUpdate(p))),!s.length)return;const c=e.clone();for(const p of s){const g=c.clone(),{center:b,zoom:T,roll:S,pitch:C,bearing:E,elevation:j}=p(g);b&&g.setCenter(b),j!==void 0&&g.setElevation(j),T!==void 0&&g.setZoom(T),S!==void 0&&g.setRoll(S),C!==void 0&&g.setPitch(C),E!==void 0&&g.setBearing(E),c.apply(g)}this.transform.apply(c)}_fireMoveEvents(e){this.fire(new a.l("move",e)),this._zooming&&this.fire(new a.l("zoom",e)),this._rotating&&this.fire(new a.l("rotate",e)),this._pitching&&this.fire(new a.l("pitch",e)),this._rolling&&this.fire(new a.l("roll",e))}_afterEase(e,s){if(this._easeId&&s&&this._easeId===s)return;delete this._easeId;const c=this._zooming,p=this._rotating,g=this._pitching,b=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,c&&this.fire(new a.l("zoomend",e)),p&&this.fire(new a.l("rotateend",e)),g&&this.fire(new a.l("pitchend",e)),b&&this.fire(new a.l("rollend",e)),this.fire(new a.l("moveend",e))}flyTo(e,s){if(!e.essential&&W.prefersReducedMotion){const Se=a.Q(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(Se,s)}this.stop(),e=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.co},e);const c=this._getTransformForUpdate(),p=c.bearing,g=c.pitch,b=c.roll,T=c.padding,S="bearing"in e?this._normalizeBearing(e.bearing,p):p,C="pitch"in e?+e.pitch:g,E="roll"in e?this._normalizeBearing(e.roll,b):b,j="padding"in e?e.padding:c.padding,A=a.P.convert(e.offset);let R=c.centerPoint.add(A);const V=c.screenPointToLocation(R),Y=this.cameraHelper.handleFlyTo(c,{bearing:S,pitch:C,roll:E,padding:j,locationAtOffset:V,offsetAsPoint:A,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let X=e.curve;const J=Math.max(c.width,c.height),Q=J/Y.scaleOfZoom,ne=Y.pixelPathLength;typeof Y.scaleOfMinZoom=="number"&&(X=Math.sqrt(J/Y.scaleOfMinZoom/ne*2));const te=X*X;function le(Se){const Je=(Q*Q-J*J+(Se?-1:1)*te*te*ne*ne)/(2*(Se?Q:J)*te*ne);return Math.log(Math.sqrt(Je*Je+1)-Je)}function pe(Se){return(Math.exp(Se)-Math.exp(-Se))/2}function ie(Se){return(Math.exp(Se)+Math.exp(-Se))/2}const me=le(!1);let Oe=function(Se){return ie(me)/ie(me+X*Se)},ve=function(Se){return J*((ie(me)*(pe(Je=me+X*Se)/ie(Je))-pe(me))/te)/ne;var Je},we=(le(!0)-me)/X;if(Math.abs(ne)<2e-6||!isFinite(we)){if(Math.abs(J-Q)<1e-6)return this.easeTo(e,s);const Se=Q<J?-1:1;we=Math.abs(Math.log(Q/J))/X,ve=()=>0,Oe=Je=>Math.exp(Se*X*Je)}return e.duration="duration"in e?+e.duration:1e3*we/("screenSpeed"in e?+e.screenSpeed/X:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=p!==S,this._pitching=C!==g,this._rolling=E!==b,this._padding=!c.isPaddingEqual(j),this._prepareEase(s,!1),this.terrain&&this._prepareElevation(Y.targetCenter),this._ease((Se=>{const Je=Se*we,Ze=1/Oe(Je),$e=ve(Je);this._rotating&&c.setBearing(a.C.number(p,S,Se)),this._pitching&&c.setPitch(a.C.number(g,C,Se)),this._rolling&&c.setRoll(a.C.number(b,E,Se)),this._padding&&(c.interpolatePadding(T,j,Se),R=c.centerPoint.add(A)),Y.easeFunc(Se,Ze,$e,R),this.terrain&&!e.freezeElevation&&this._updateElevation(Se),this._applyUpdatedTransform(c),this._fireMoveEvents(s)}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(s)}),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,s){var c;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,s)}return e||(c=this.handlers)===null||c===void 0||c.stop(!1),this}_ease(e,s,c){c.animate===!1||c.duration===0?(e(1),s()):(this._easeStart=W.now(),this._easeOptions=c,this._onEaseFrame=e,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,s){e=a.aO(e,-180,180);const c=Math.abs(e-s);return Math.abs(e-360-s)<c&&(e-=360),Math.abs(e+360-s)<c&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(a.S.convert(e),this.transform.tileZoom):null}}const vu={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class wu{constructor(e=vu){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=s=>{!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=G.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=G.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=G.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(){G.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(e,s){const c=this._map._getUIString(`AttributionControl.${s}`);e.title=c,e.setAttribute("aria-label",c)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((p=>typeof p!="string"?"":p))):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const p=this._map.style.stylesheet;this.styleOwner=p.owner,this.styleId=p.id}const s=this._map.style.sourceCaches;for(const p in s){const g=s[p];if(g.used||g.usedForTerrain){const b=g.getSource();b.attribution&&e.indexOf(b.attribution)<0&&e.push(b.attribution)}}e=e.filter((p=>String(p).trim())),e.sort(((p,g)=>p.length-g.length)),e=e.filter(((p,g)=>{for(let b=g+1;b<e.length;b++)if(e[b].indexOf(p)>=0)return!1;return!0}));const c=e.join(" | ");c!==this._attribHTML&&(this._attribHTML=c,e.length?(this._innerContainer.innerHTML=G.sanitize(c),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Bu{constructor(e={}){this._updateCompact=()=>{const s=this._container.children;if(s.length){const c=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&c.classList.add("maplibregl-compact"):c.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=G.create("div","maplibregl-ctrl");const s=G.create("a","maplibregl-ctrl-logo");return s.target="_blank",s.rel="noopener nofollow",s.href="https://maplibre.org/",s.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),s.setAttribute("rel","noopener nofollow"),this._container.appendChild(s),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){G.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Lf{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const s=++this._id;return this._queue.push({callback:e,id:s,cancelled:!1}),s}remove(e){const s=this._currentlyRunning,c=s?this._queue.concat(s):this._queue;for(const p of c)if(p.id===e)return void(p.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const s=this._currentlyRunning=this._queue;this._queue=[];for(const c of s)if(!c.cancelled&&(c.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Gn=a.aJ([{name:"a_pos3d",type:"Int16",components:3}]);class Nl extends a.E{constructor(e){super(),this._lastTilesetChange=W.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,s){this.sourceCache.update(e,s),this._renderableTilesKeys=[];const c={};for(const p of ye(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:s,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))c[p.key]=!0,this._renderableTilesKeys.push(p.key),this._tiles[p.key]||(p.terrainRttPosMatrix32f=new Float64Array(16),a.bY(p.terrainRttPosMatrix32f,0,a.$,a.$,0,0,1),this._tiles[p.key]=new hi(p,this.tileSize),this._lastTilesetChange=W.now());for(const p in this._tiles)c[p]||delete this._tiles[p]}freeRtt(e){for(const s in this._tiles){const c=this._tiles[s];(!e||c.tileID.equals(e)||c.tileID.isChildOf(e)||e.isChildOf(c.tileID))&&(c.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,s){return s?this._getTerrainCoordsForTileRanges(e,s):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const s={};for(const c of this._renderableTilesKeys){const p=this._tiles[c].tileID,g=e.clone(),b=a.ba();if(p.canonical.equals(e.canonical))a.bY(b,0,a.$,a.$,0,0,1);else if(p.canonical.isChildOf(e.canonical)){const T=p.canonical.z-e.canonical.z,S=p.canonical.x-(p.canonical.x>>T<<T),C=p.canonical.y-(p.canonical.y>>T<<T),E=a.$>>T;a.bY(b,0,E,E,0,0,1),a.M(b,b,[-S*E,-C*E,0])}else{if(!e.canonical.isChildOf(p.canonical))continue;{const T=e.canonical.z-p.canonical.z,S=e.canonical.x-(e.canonical.x>>T<<T),C=e.canonical.y-(e.canonical.y>>T<<T),E=a.$>>T;a.bY(b,0,a.$,a.$,0,0,1),a.M(b,b,[S*E,C*E,0]),a.N(b,b,[1/2**T,1/2**T,0])}}g.terrainRttPosMatrix32f=new Float32Array(b),s[c]=g}return s}_getTerrainCoordsForTileRanges(e,s){const c={};for(const p of this._renderableTilesKeys){const g=this._tiles[p].tileID;if(!this._isWithinTileRanges(g,s))continue;const b=e.clone(),T=a.ba();if(g.canonical.z===e.canonical.z){const S=e.canonical.x-g.canonical.x,C=e.canonical.y-g.canonical.y;a.bY(T,0,a.$,a.$,0,0,1),a.M(T,T,[S*a.$,C*a.$,0])}else if(g.canonical.z>e.canonical.z){const S=g.canonical.z-e.canonical.z,C=g.canonical.x-(g.canonical.x>>S<<S),E=g.canonical.y-(g.canonical.y>>S<<S),j=e.canonical.x-(g.canonical.x>>S),A=e.canonical.y-(g.canonical.y>>S),R=a.$>>S;a.bY(T,0,R,R,0,0,1),a.M(T,T,[-C*R+j*a.$,-E*R+A*a.$,0])}else{const S=e.canonical.z-g.canonical.z,C=e.canonical.x-(e.canonical.x>>S<<S),E=e.canonical.y-(e.canonical.y>>S<<S),j=(e.canonical.x>>S)-g.canonical.x,A=(e.canonical.y>>S)-g.canonical.y,R=a.$<<S;a.bY(T,0,R,R,0,0,1),a.M(T,T,[C*a.$+j*R,E*a.$+A*R,0])}b.terrainRttPosMatrix32f=new Float32Array(T),c[p]=b}return c}getSourceTile(e,s){const c=this.sourceCache._source;let p=e.overscaledZ-this.deltaZoom;if(p>c.maxzoom&&(p=c.maxzoom),p<c.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(p).key);let g=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!g||!g.dem)&&s)for(;p>=c.minzoom&&(!g||!g.dem);)g=this.sourceCache.getTileByID(e.scaledTo(p--).key);return g}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,s){return s[e.canonical.z]&&e.canonical.x>=s[e.canonical.z].minTileX&&e.canonical.x<=s[e.canonical.z].maxTileX&&e.canonical.y>=s[e.canonical.z].minTileY&&e.canonical.y<=s[e.canonical.z].maxTileY}}class wt{constructor(e,s,c){this._meshCache={},this.painter=e,this.sourceCache=new Nl(s),this.options=c,this.exaggeration=typeof c.exaggeration=="number"?c.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,s,c,p=a.$){var g;if(!(s>=0&&s<p&&c>=0&&c<p))return 0;const b=this.getTerrainData(e),T=(g=b.tile)===null||g===void 0?void 0:g.dem;if(!T)return 0;const S=a.cs([],[s/p*a.$,c/p*a.$],b.u_terrain_matrix),C=[S[0]*T.dim,S[1]*T.dim],E=Math.floor(C[0]),j=Math.floor(C[1]),A=C[0]-E,R=C[1]-j;return T.get(E,j)*(1-A)*(1-R)+T.get(E+1,j)*A*(1-R)+T.get(E,j+1)*(1-A)*R+T.get(E+1,j+1)*A*R}getElevationForLngLatZoom(e,s){if(!a.ct(s,e.wrap()))return 0;const{tileID:c,mercatorX:p,mercatorY:g}=this._getOverscaledTileIDFromLngLatZoom(e,s);return this.getElevation(c,p%a.$,g%a.$,a.$)}getElevation(e,s,c,p=a.$){return this.getDEMElevation(e,s,c,p)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const p=this.painter.context,g=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new a.T(p,g,p.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new a.T(p,new a.R({width:1,height:1}),p.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(p.gl.NEAREST,p.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.ag([])}const s=this.sourceCache.getSourceTile(e,!0);if(s&&s.dem&&(!s.demTexture||s.needsTerrainPrepare)){const p=this.painter.context;s.demTexture=this.painter.getTileTexture(s.dem.stride),s.demTexture?s.demTexture.update(s.dem.getPixels(),{premultiply:!1}):s.demTexture=new a.T(p,s.dem.getPixels(),p.gl.RGBA,{premultiply:!1}),s.demTexture.bind(p.gl.NEAREST,p.gl.CLAMP_TO_EDGE),s.needsTerrainPrepare=!1}const c=s&&s+s.tileID.key+e.key;if(c&&!this._demMatrixCache[c]){const p=this.sourceCache.sourceCache._source.maxzoom;let g=e.canonical.z-s.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=p?g=e.canonical.z-p:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const b=e.canonical.x-(e.canonical.x>>g<<g),T=e.canonical.y-(e.canonical.y>>g<<g),S=a.cu(new Float64Array(16),[1/(a.$<<g),1/(a.$<<g),0]);a.M(S,S,[b*a.$,T*a.$,0]),this._demMatrixCache[e.key]={matrix:S,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:s&&s.dem&&s.dem.dim||1,u_terrain_matrix:c?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:s&&s.dem&&s.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(s&&s.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:s}}getFramebuffer(e){const s=this.painter,c=s.width/devicePixelRatio,p=s.height/devicePixelRatio;return!this._fbo||this._fbo.width===c&&this._fbo.height===p||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new a.T(s.context,{width:c,height:p,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new a.T(s.context,{width:c,height:p,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=s.context.createFramebuffer(c,p,!0,!1),this._fbo.depthAttachment.set(s.context.createRenderbuffer(s.context.gl.DEPTH_COMPONENT16,c,p))),this._fbo.colorAttachment.set(e==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const s=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let g=0,b=0;g<this._coordsTextureSize;g++)for(let T=0;T<this._coordsTextureSize;T++,b+=4)s[b+0]=255&T,s[b+1]=255&g,s[b+2]=T>>8<<4|g>>8,s[b+3]=0;const c=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(s.buffer)),p=new a.T(e,c,e.gl.RGBA,{premultiply:!1});return p.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=p,p}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const s=new Uint8Array(4),c=this.painter.context,p=c.gl,g=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),b=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),T=Math.round(this.painter.height/devicePixelRatio);c.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),p.readPixels(g,T-b-1,1,1,p.RGBA,p.UNSIGNED_BYTE,s),c.bindFramebuffer.set(null);const S=s[0]+(s[2]>>4<<8),C=s[1]+((15&s[2])<<8),E=this.coordsIndex[255-s[3]],j=E&&this.sourceCache.getTileByID(E);if(!j)return null;const A=this._coordsTextureSize,R=(1<<j.tileID.canonical.z)*A;return new a.a1((j.tileID.canonical.x*A+S)/R+j.tileID.wrap,(j.tileID.canonical.y*A+C)/R,this.getElevation(j.tileID,S,C,A))}depthAtPoint(e){const s=new Uint8Array(4),c=this.painter.context,p=c.gl;return c.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),p.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,p.RGBA,p.UNSIGNED_BYTE,s),c.bindFramebuffer.set(null),(s[0]/16777216+s[1]/65536+s[2]/256+s[3])/256}getTerrainMesh(e){var s;const c=((s=this.painter.style.projection)===null||s===void 0?void 0:s.transitionState)>0,p=c&&e.canonical.y===0,g=c&&e.canonical.y===(1<<e.canonical.z)-1,b=`m_${p?"n":""}_${g?"s":""}`;if(this._meshCache[b])return this._meshCache[b];const T=this.painter.context,S=new a.cv,C=new a.aN,E=this.meshSize,j=a.$/E,A=E*E;for(let ie=0;ie<=E;ie++)for(let me=0;me<=E;me++)S.emplaceBack(me*j,ie*j,0);for(let ie=0;ie<A;ie+=E+1)for(let me=0;me<E;me++)C.emplaceBack(me+ie,E+me+ie+1,E+me+ie+2),C.emplaceBack(me+ie,E+me+ie+2,me+ie+1);const R=S.length,V=R+(E+1),Y=(E+1)*E,X=p?a.bh:0,J=p?0:1,Q=g?a.bi:a.$,ne=g?0:1;for(let ie=0;ie<=E;ie++)S.emplaceBack(ie*j,X,J);for(let ie=0;ie<=E;ie++)S.emplaceBack(ie*j,Q,ne);for(let ie=0;ie<E;ie++)C.emplaceBack(Y+ie,V+ie,V+ie+1),C.emplaceBack(Y+ie,V+ie+1,Y+ie+1),C.emplaceBack(0+ie,R+ie+1,R+ie),C.emplaceBack(0+ie,0+ie+1,R+ie+1);const te=S.length,le=te+2*(E+1);for(const ie of[0,1])for(let me=0;me<=E;me++)for(const Oe of[0,1])S.emplaceBack(ie*a.$,me*j,Oe);for(let ie=0;ie<2*E;ie+=2)C.emplaceBack(te+ie,te+ie+1,te+ie+3),C.emplaceBack(te+ie,te+ie+3,te+ie+2),C.emplaceBack(le+ie,le+ie+3,le+ie+1),C.emplaceBack(le+ie,le+ie+2,le+ie+3);const pe=new Us(T.createVertexBuffer(S,Gn.members),T.createIndexBuffer(C),a.aM.simpleSegment(0,0,S.length,C.length));return this._meshCache[b]=pe,pe}getMeshFrameDelta(e){return 2*Math.PI*a.bu/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,s){var c;const{tileID:p}=this._getOverscaledTileIDFromLngLatZoom(e,s);return(c=this.getMinMaxElevation(p).minElevation)!==null&&c!==void 0?c:0}getMinMaxElevation(e){const s=this.getTerrainData(e).tile,c={minElevation:null,maxElevation:null};return s&&s.dem&&(c.minElevation=s.dem.min*this.exaggeration,c.maxElevation=s.dem.max*this.exaggeration),c}_getOverscaledTileIDFromLngLatZoom(e,s){const c=a.a1.fromLngLat(e.wrap()),p=(1<<s)*a.$,g=c.x*p,b=c.y*p,T=Math.floor(g/a.$),S=Math.floor(b/a.$);return{tileID:new a.Z(s,0,s,T,S),mercatorX:g,mercatorY:b}}}class Mt{constructor(e,s,c){this._context=e,this._size=s,this._tileSize=c,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){const s=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),c=new a.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return c.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),s.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),s.colorAttachment.set(c.texture),{id:e,fbo:s,texture:c,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((s=>e.id!==s)),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const s of this._recentlyUsed)if(!this._objects[s].inUse)return this._objects[s];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&this._objects.some((e=>!e.inUse))===!1}}const os={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Tu{constructor(e,s){this.painter=e,this.terrain=s,this.pool=new Mt(e.context,30,s.sourceCache.tileSize*s.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,s){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter((c=>!e._layers[c].isHidden(s))),this._coordsAscending={};for(const c in e.sourceCaches){this._coordsAscending[c]={};const p=e.sourceCaches[c].getVisibleCoordinates(),g=e.sourceCaches[c].getSource(),b=g instanceof ot?g.terrainTileRanges:null;for(const T of p){const S=this.terrain.sourceCache.getTerrainCoords(T,b);for(const C in S)this._coordsAscending[c][C]||(this._coordsAscending[c][C]=[]),this._coordsAscending[c][C].push(S[C])}}this._coordsAscendingStr={};for(const c of e._order){const p=e._layers[c],g=p.source;if(os[p.type]&&!this._coordsAscendingStr[g]){this._coordsAscendingStr[g]={};for(const b in this._coordsAscending[g])this._coordsAscendingStr[g][b]=this._coordsAscending[g][b].map((T=>T.key)).sort().join()}}for(const c of this._renderableTiles)for(const p in this._coordsAscendingStr){const g=this._coordsAscendingStr[p][c.tileID.key];g&&g!==c.rttCoords[p]&&(c.rtt=[])}}renderLayer(e,s){if(e.isHidden(this.painter.transform.zoom))return!1;const c=Object.assign(Object.assign({},s),{isRenderingToTexture:!0}),p=e.type,g=this.painter,b=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(os[p]&&(this._prevType&&os[this._prevType]||this._stacks.push([]),this._prevType=p,this._stacks[this._stacks.length-1].push(e.id),!b))return!0;if(os[this._prevType]||os[p]&&b){this._prevType=p;const T=this._stacks.length-1,S=this._stacks[T]||[];for(const C of this._renderableTiles){if(this.pool.isFull()&&(jl(this.painter,this.terrain,this._rttTiles,c),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(C),C.rtt[T]){const j=this.pool.getObjectForId(C.rtt[T].id);if(j.stamp===C.rtt[T].stamp){this.pool.useObject(j);continue}}const E=this.pool.getOrCreateFreeObject();this.pool.useObject(E),this.pool.stampObject(E),C.rtt[T]={id:E.id,stamp:E.stamp},g.context.bindFramebuffer.set(E.fbo.framebuffer),g.context.clear({color:a.bf.transparent,stencil:0}),g.currentStencilSource=void 0;for(let j=0;j<S.length;j++){const A=g.style._layers[S[j]],R=A.source?this._coordsAscending[A.source][C.tileID.key]:[C.tileID];g.context.viewport.set([0,0,E.fbo.width,E.fbo.height]),g._renderTileClippingMasks(A,R,!0),g.renderLayer(g,g.style.sourceCaches[A.source],A,R,c),A.source&&(C.rttCoords[A.source]=this._coordsAscendingStr[A.source][C.tileID.key])}}return jl(this.painter,this.terrain,this._rttTiles,c),this._rttTiles=[],this.pool.freeAllObjects(),os[p]}return!1}}const $l={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},$r=M,Su={hash:!1,interactive:!0,bearingSnap:7,attributionControl:vu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Tn={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class zf{constructor(e,s,c=!1){this.mousedown=g=>{this.startMove(g,G.mousePos(this.element,g)),G.addEventListener(window,"mousemove",this.mousemove),G.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=g=>{this.move(g,G.mousePos(this.element,g))},this.mouseup=g=>{this._rotatePitchHandler.dragEnd(g),this.offTemp()},this.touchstart=g=>{g.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=G.touchPos(this.element,g.targetTouches)[0],this.startMove(g,this._startPos),G.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),G.addEventListener(window,"touchend",this.touchend))},this.touchmove=g=>{g.targetTouches.length!==1?this.reset():(this._lastPos=G.touchPos(this.element,g.targetTouches)[0],this.move(g,this._lastPos))},this.touchend=g=>{g.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=s;const p=new kf;this._rotatePitchHandler=new zo({clickTolerance:3,move:(g,b)=>{const T=s.getBoundingClientRect(),S=new a.P((T.bottom-T.top)/2,(T.right-T.left)/2);return{bearingDelta:a.cn(new a.P(g.x,b.y),b,S),pitchDelta:c?-.5*(b.y-g.y):void 0}},moveStateManager:p,enable:!0,assignEvents:()=>{}}),this.map=e,G.addEventListener(s,"mousedown",this.mousedown),G.addEventListener(s,"touchstart",this.touchstart,{passive:!1}),G.addEventListener(s,"touchcancel",this.reset)}startMove(e,s){this._rotatePitchHandler.dragStart(e,s),G.disableDrag()}move(e,s){const c=this.map,{bearingDelta:p,pitchDelta:g}=this._rotatePitchHandler.dragMove(e,s)||{};p&&c.setBearing(c.getBearing()+p),g&&c.setPitch(c.getPitch()+g)}off(){const e=this.element;G.removeEventListener(e,"mousedown",this.mousedown),G.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),G.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),G.removeEventListener(window,"touchend",this.touchend),G.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){G.enableDrag(),G.removeEventListener(window,"mousemove",this.mousemove),G.removeEventListener(window,"mouseup",this.mouseup),G.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),G.removeEventListener(window,"touchend",this.touchend)}}let Sn;function Li(f,e,s,c=!1){if(c||!s.getCoveringTilesDetailsProvider().allowWorldCopies())return f?.wrap();const p=new a.S(f.lng,f.lat);if(f=new a.S(f.lng,f.lat),e){const g=new a.S(f.lng-360,f.lat),b=new a.S(f.lng+360,f.lat),T=s.locationToScreenPoint(f).distSqr(e);s.locationToScreenPoint(g).distSqr(e)<T?f=g:s.locationToScreenPoint(b).distSqr(e)<T&&(f=b)}for(;Math.abs(f.lng-s.center.lng)>180;){const g=s.locationToScreenPoint(f);if(g.x>=0&&g.y>=0&&g.x<=s.width&&g.y<=s.height)break;f.lng>s.center.lng?f.lng-=360:f.lng+=360}return f.lng!==p.lng&&s.isPointOnMapSurface(s.locationToScreenPoint(f))?f:p}const Vi={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 Ou(f,e,s){const c=f.classList;for(const p in Vi)c.remove(`maplibregl-${s}-anchor-${p}`);c.add(`maplibregl-${s}-anchor-${e}`)}class ro extends a.E{constructor(e){if(super(),this._onKeyPress=s=>{const c=s.code,p=s.charCode||s.keyCode;c!=="Space"&&c!=="Enter"&&p!==32&&p!==13||this.togglePopup()},this._onMapClick=s=>{const c=s.originalEvent.target,p=this._element;this._popup&&(c===p||p.contains(c))&&this.togglePopup()},this._update=s=>{if(!this._map)return;const c=this._map.loaded()&&!this._map.isMoving();(s?.type==="terrain"||s?.type==="render"&&!c)&&this._map.once("render",this._update),this._lngLat=Li(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let p="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?p=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(p=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let g="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?g="rotateX(0deg)":this._pitchAlignment==="map"&&(g=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||s&&s.type!=="moveend"||(this._pos=this._pos.round()),G.setTransform(this._element,`${Vi[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${g} ${p}`),W.frameAsync(new AbortController).then((()=>{this._updateOpacity(s&&s.type==="moveend")})).catch((()=>{}))},this._onMove=s=>{if(!this._isDragging){const c=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=c}this._isDragging&&(this._pos=s.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 a.l("dragstart"))),this.fire(new a.l("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 a.l("dragend")),this._state="inactive"},this._addDragHandler=s=>{this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.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=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=a.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=G.create("div");const s=G.createNS("http://www.w3.org/2000/svg","svg"),c=41,p=27;s.setAttributeNS(null,"display","block"),s.setAttributeNS(null,"height",`${c}px`),s.setAttributeNS(null,"width",`${p}px`),s.setAttributeNS(null,"viewBox",`0 0 ${p} ${c}`);const g=G.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"stroke","none"),g.setAttributeNS(null,"stroke-width","1"),g.setAttributeNS(null,"fill","none"),g.setAttributeNS(null,"fill-rule","evenodd");const b=G.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"fill-rule","nonzero");const T=G.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"transform","translate(3.0, 29.0)"),T.setAttributeNS(null,"fill","#000000");const S=[{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 J of S){const Q=G.createNS("http://www.w3.org/2000/svg","ellipse");Q.setAttributeNS(null,"opacity","0.04"),Q.setAttributeNS(null,"cx","10.5"),Q.setAttributeNS(null,"cy","5.80029008"),Q.setAttributeNS(null,"rx",J.rx),Q.setAttributeNS(null,"ry",J.ry),T.appendChild(Q)}const C=G.createNS("http://www.w3.org/2000/svg","g");C.setAttributeNS(null,"fill",this._color);const E=G.createNS("http://www.w3.org/2000/svg","path");E.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"),C.appendChild(E);const j=G.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"opacity","0.25"),j.setAttributeNS(null,"fill","#000000");const A=G.createNS("http://www.w3.org/2000/svg","path");A.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(A);const R=G.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"transform","translate(6.0, 7.0)"),R.setAttributeNS(null,"fill","#FFFFFF");const V=G.createNS("http://www.w3.org/2000/svg","g");V.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Y=G.createNS("http://www.w3.org/2000/svg","circle");Y.setAttributeNS(null,"fill","#000000"),Y.setAttributeNS(null,"opacity","0.25"),Y.setAttributeNS(null,"cx","5.5"),Y.setAttributeNS(null,"cy","5.5"),Y.setAttributeNS(null,"r","5.4999962");const X=G.createNS("http://www.w3.org/2000/svg","circle");X.setAttributeNS(null,"fill","#FFFFFF"),X.setAttributeNS(null,"cx","5.5"),X.setAttributeNS(null,"cy","5.5"),X.setAttributeNS(null,"r","5.4999962"),V.appendChild(Y),V.appendChild(X),b.appendChild(T),b.appendChild(C),b.appendChild(j),b.appendChild(R),b.appendChild(V),s.appendChild(b),s.setAttributeNS(null,"height",c*this._scale+"px"),s.setAttributeNS(null,"width",p*this._scale+"px"),this._element.appendChild(s),this._offset=a.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(s=>{s.preventDefault()})),this._element.addEventListener("mousedown",(s=>{s.preventDefault()})),Ou(this._element,this._anchor,"marker"),e&&e.className)for(const s of e.className.split(" "))this._element.classList.add(s);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",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("terrain",this._update),this._map.off("projectiontransition",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),G.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=a.S.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const p=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[p,-1*(38.1-13.5+p)],"bottom-right":[-p,-1*(38.1-13.5+p)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var s,c;const p=(s=this._map)===null||s===void 0?void 0:s.terrain,g=this._map.transform.isLocationOccluded(this._lngLat);if(!p||g){const R=g?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==R&&(this._element.style.opacity=R))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const b=this._map,T=b.terrain.depthAtPoint(this._pos),S=b.terrain.getElevationForLngLatZoom(this._lngLat,b.transform.tileZoom);if(b.transform.lngLatToCameraDepth(this._lngLat,S)-T<.006)return void(this._element.style.opacity=this._opacity);const C=-this._offset.y/b.transform.pixelsPerMeter,E=Math.sin(b.getPitch()*Math.PI/180)*C,j=b.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),A=b.transform.lngLatToCameraDepth(this._lngLat,S+E)-j>.006;!((c=this._popup)===null||c===void 0)&&c.isOpen()&&A&&this._popup.remove(),this._element.style.opacity=A?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=a.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,s){return(this._opacity===void 0||e===void 0&&s===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),s!==void 0&&(this._opacityWhenCovered=s),this._map&&this._updateOpacity(!0),this}}const Ul={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let $o=0,no=!1;const Pu={maxWidth:100,unit:"metric"};function Uo(f,e,s){const c=s&&s.maxWidth||100,p=f._container.clientHeight/2,g=f._container.clientWidth/2,b=f.unproject([g-c/2,p]),T=f.unproject([g+c/2,p]),S=Math.round(f.project(T).x-f.project(b).x),C=Math.min(c,S,f._container.clientWidth),E=b.distanceTo(T);if(s&&s.unit==="imperial"){const j=3.2808*E;j>5280?so(e,C,j/5280,f._getUIString("ScaleControl.Miles")):so(e,C,j,f._getUIString("ScaleControl.Feet"))}else s&&s.unit==="nautical"?so(e,C,E/1852,f._getUIString("ScaleControl.NauticalMiles")):E>=1e3?so(e,C,E/1e3,f._getUIString("ScaleControl.Kilometers")):so(e,C,E,f._getUIString("ScaleControl.Meters"))}function so(f,e,s,c){const p=(function(g){const b=Math.pow(10,`${Math.floor(g)}`.length-1);let T=g/b;return T=T>=10?10:T>=5?5:T>=3?3:T>=2?2:T>=1?1:(function(S){const C=Math.pow(10,Math.ceil(-Math.log(S)/Math.LN10));return Math.round(S*C)/C})(T),b*T})(s);f.style.width=e*(p/s)+"px",f.innerHTML=`${p}&nbsp;${c}`}const Cu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Eu=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Vl(f){if(f){if(typeof f=="number"){const e=Math.round(Math.abs(f)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,f),"top-left":new a.P(e,e),"top-right":new a.P(-e,e),bottom:new a.P(0,-f),"bottom-left":new a.P(e,-e),"bottom-right":new a.P(-e,-e),left:new a.P(f,0),right:new a.P(-f,0)}}if(f instanceof a.P||Array.isArray(f)){const e=a.P.convert(f);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:a.P.convert(f.center||[0,0]),top:a.P.convert(f.top||[0,0]),"top-left":a.P.convert(f["top-left"]||[0,0]),"top-right":a.P.convert(f["top-right"]||[0,0]),bottom:a.P.convert(f.bottom||[0,0]),"bottom-left":a.P.convert(f["bottom-left"]||[0,0]),"bottom-right":a.P.convert(f["bottom-right"]||[0,0]),left:a.P.convert(f.left||[0,0]),right:a.P.convert(f.right||[0,0])}}return Vl(new a.P(0,0))}const Mu=M;v.AJAXError=a.cz,v.Event=a.l,v.Evented=a.E,v.LngLat=a.S,v.MercatorCoordinate=a.a1,v.Point=a.P,v.addProtocol=a.cA,v.config=a.a,v.removeProtocol=a.cB,v.AttributionControl=wu,v.BoxZoomHandler=du,v.CanvasSource=qe,v.CooperativeGesturesHandler=Mp,v.DoubleClickZoomHandler=gu,v.DragPanHandler=Cp,v.DragRotateHandler=yu,v.EdgeInsets=Gs,v.FullscreenControl=class extends a.E{constructor(f={}){super(),this._onFullscreenChange=()=>{var e;let s=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=s?.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)s=s.shadowRoot.fullscreenElement;s===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,f&&f.container&&(f.container instanceof HTMLElement?this._container=f.container:a.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(f){return this._map=f,this._container||(this._container=this._map.getContainer()),this._controlContainer=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){G.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const f=this._fullscreenButton=G.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);G.create("span","maplibregl-ctrl-icon",f).setAttribute("aria-hidden","true"),f.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const f=this._getTitle();this._fullscreenButton.setAttribute("aria-label",f),this._fullscreenButton.title=f}_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 a.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.l("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()}},v.GeoJSONSource=ht,v.GeolocateControl=class extends a.E{constructor(f){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new a.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
830RROR":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(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{const s=new a.S(e.coords.longitude,e.coords.latitude),c=e.coords.accuracy,p=this._map.getBearing(),g=a.e({bearing:p},this.options.fitBoundsOptions),b=ae.fromLngLat(s,c);this._map.fitBounds(b,g,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const s=new a.S(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(e.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 s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&no)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=G.create("button","maplibregl-ctrl-geolocate",this._container),G.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}else{const s=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=G.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ro({element:this._dotElement}),this._circleElement=G.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ro({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(s=>{const c=s?.[0]instanceof ResizeObserverEntry;s.geolocateSource||this._watchState!=="ACTIVE_LOCK"||c||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.l("trackuserlocationend")),this.fire(new a.l("userlocationlostfocus")))}))}},this.options=a.e({},Ul,f)}onAdd(f){return this._map=f,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return a._(this,arguments,void 0,(function*(e=!1){if(Sn!==void 0&&!e)return Sn;if(window.navigator.permissions===void 0)return Sn=!!window.navigator.geolocation,Sn;try{Sn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Sn=!!window.navigator.geolocation}return Sn}))})().then((e=>this._finishSetupUI(e))),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(),G.remove(this._container),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,$o=0,no=!1}_isOutOfMapMaxBounds(f){const e=this._map.getMaxBounds(),s=f.coords;return e&&(s.longitude<e.getWest()||s.longitude>e.getEast()||s.latitude<e.getSouth()||s.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
830RROR",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}`)}}_updateCircleRadiusIfNeeded(){const f=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&f))return;const e=this._map.project(f),s=this._map.unproject([e.x+100,e.y]),c=f.distanceTo(s)/100,p=2*this._accuracy/c;this._circleElement.style.width=`${p.toFixed(2)}px`,this._circleElement.style.height=`${p.toFixed(2)}px`}trigger(){if(!this._setup)return a.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 a.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":$o--,no=!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 a.l("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 a.l("trackuserlocationstart")),this.fire(new a.l("userlocationfocus"));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 f;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),$o++,$o>1?(f={maximumAge:6e5,timeout:0},no=!0):(f=this.options.positionOptions,no=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,f)}}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)}},v.GlobeControl=class{constructor(){this._toggleProjection=()=>{var f;const e=(f=this._map.getProjection())===null||f===void 0?void 0:f.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var f;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((f=this._map.getProjection())===null||f===void 0?void 0:f.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(f){return this._map=f,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=G.create("button","maplibregl-ctrl-globe",this._container),G.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){G.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},v.Hash=kl,v.ImageSource=ot,v.KeyboardHandler=Ll,v.LngLatBounds=ae,v.LogoControl
vendor: 38,436 bytes, line 830
830=Bu,v.Map=class extends xu{constructor(f){var e,s;a.cw.mark(a.cx.create);const c=Object.assign(Object.assign(Object.assign({},Su),f),{canvasContextAttributes:Object.assign(Object.assign({},Su.canvasContextAttributes),f.canvasContextAttributes)});if(c.minZoom!=null&&c.maxZoom!=null&&c.minZoom>c.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(c.minPitch!=null&&c.maxPitch!=null&&c.minPitch>c.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(c.minPitch!=null&&c.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(c.maxPitch!=null&&c.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const p=new Si,g=new Ar;if(c.minZoom!==void 0&&p.setMinZoom(c.minZoom),c.maxZoom!==void 0&&p.setMaxZoom(c.maxZoom),c.minPitch!==void 0&&p.setMinPitch(c.minPitch),c.maxPitch!==void 0&&p.setMaxPitch(c.maxPitch),c.renderWorldCopies!==void 0&&p.setRenderWorldCopies(c.renderWorldCopies),super(p,g,{bearingSnap:c.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Lf,this._controls=[],this._mapId=a.a7(),this._contextLost=T=>{T.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.l("webglcontextlost",{originalEvent:T}))},this._contextRestored=T=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.l("webglcontextrestored",{originalEvent:T}))},this._onMapScroll=T=>{if(T.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=c.interactive,this._maxTileCacheSize=c.maxTileCacheSize,this._maxTileCacheZoomLevels=c.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},c.canvasContextAttributes),this._trackResize=c.trackResize===!0,this._bearingSnap=c.bearingSnap,this._centerClampedToGround=c.centerClampedToGround,this._refreshExpiredTiles=c.refreshExpiredTiles===!0,this._fadeDuration=c.fadeDuration,this._crossSourceCollisions=c.crossSourceCollisions===!0,this._collectResourceTiming=c.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},$l),c.locale),this._clickTolerance=c.clickTolerance,this._overridePixelRatio=c.pixelRatio,this._maxCanvasSize=c.maxCanvasSize,this.transformCameraUpdate=c.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=c.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=Te.addThrottleControl((()=>this.isMoving())),this._requestManager=new je(c.transformRequest),typeof c.container=="string"){if(this._container=document.getElementById(c.container),!this._container)throw new Error(`Container '${c.container}' not found.`)}else{if(!(c.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=c.container}if(c.maxBounds&&this.setMaxBounds(c.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 T=!1;const S=to((C=>{this._trackResize&&!this._removed&&(this.resize(C),this.redraw())}),50);this._resizeObserver=new ResizeObserver((C=>{T?S(C):T=!0})),this._resizeObserver.observe(this._container)}this.handlers=new Fl(this,c),this._hash=c.hash&&new kl(typeof c.hash=="string"&&c.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:c.center,elevation:c.elevation,zoom:c.zoom,bearing:c.bearing,pitch:c.pitch,roll:c.roll}),c.bounds&&(this.resize(),this.fitBounds(c.bounds,a.e({},c.fitBoundsOptions,{duration:0}))));const b=typeof c.style=="string"||((s=(e=c.style)===null||e===void 0?void 0:e.projection)===null||s===void 0?void 0:s.type)!=="globe";this.resize(null,b),this._localIdeographFontFamily=c.localIdeographFontFamily,this._validateStyle=c.validateStyle,c.style&&this.setStyle(c.style,{localIdeographFontFamily:c.localIdeographFontFamily}),c.attributionControl&&this.addControl(new wu(typeof c.attributionControl=="boolean"?void 0:c.attributionControl)),c.maplibreLogo&&this.addControl(new Bu,c.logoPosition),this.on("style.load",(()=>{if(b||this._resizeTransform(),this.transform.unmodified){const T=a.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(T)}})),this.on("data",(T=>{this._update(T.dataType==="style"),this.fire(new a.l(`${T.dataType}data`,T))})),this.on("dataloading",(T=>{this.fire(new a.l(`${T.dataType}dataloading`,T))})),this.on("dataabort",(T=>{this.fire(new a.l("sourcedataabort",T))}))}_getMapId(){return this._mapId}setGlobalStateProperty(f,e){return this.style.setGlobalStateProperty(f,e),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(f,e){if(e===void 0&&(e=f.getDefaultPosition?f.getDefaultPosition():"top-right"),!f||!f.onAdd)return this.fire(new a.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=f.onAdd(this);this._controls.push(f);const c=this._controlPositions[e];return e.indexOf("bottom")!==-1?c.insertBefore(s,c.firstChild):c.appendChild(s),this}removeControl(f){if(!f||!f.onRemove)return this.fire(new a.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(f);return e>-1&&this._controls.splice(e,1),f.onRemove(this),this}hasControl(f){return this._controls.indexOf(f)>-1}coveringTiles(f){return ye(this.transform,f)}calculateCameraOptionsFromTo(f,e,s,c){return c==null&&this.terrain&&(c=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(f,e,s,c)}resize(f,e=!0){const[s,c]=this._containerDimensions(),p=this._getClampedPixelRatio(s,c);if(this._resizeCanvas(s,c,p),this.painter.resize(s,c,p),this.painter.overLimit()){const b=this.painter.context.gl;this._maxCanvasSize=[b.drawingBufferWidth,b.drawingBufferHeight];const T=this._getClampedPixelRatio(s,c);this._resizeCanvas(s,c,T),this.painter.resize(s,c,T)}this._resizeTransform(e);const g=!this._moving;return g&&(this.stop(),this.fire(new a.l("movestart",f)).fire(new a.l("move",f))),this.fire(new a.l("resize",f)),g&&this.fire(new a.l("moveend",f)),this}_resizeTransform(f=!0){var e;const[s,c]=this._containerDimensions();this.transform.resize(s,c,f),(e=this._requestedCameraState)===null||e===void 0||e.resize(s,c,f)}_getClampedPixelRatio(f,e){const{0:s,1:c}=this._maxCanvasSize,p=this.getPixelRatio(),g=f*p,b=e*p;return Math.min(g>s?s/g:1,b>c?c/b:1)*p}getPixelRatio(){var f;return(f=this._overridePixelRatio)!==null&&f!==void 0?f:devicePixelRatio}setPixelRatio(f){this._overridePixelRatio=f,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(f){return this.transform.setMaxBounds(ae.convert(f)),this._update()}setMinZoom(f){if((f=f??-2)>=-2&&f<=this.transform.maxZoom)return this.transform.setMinZoom(f),this._update(),this.getZoom()<f&&this.setZoom(f),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(f){if((f=f??22)>=this.transform.minZoom)return this.transform.setMaxZoom(f),this._update(),this.getZoom()>f&&this.setZoom(f),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(f){if((f=f??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(f>=0&&f<=this.transform.maxPitch)return this.transform.setMinPitch(f),this._update(),this.getPitch()<f&&this.setPitch(f),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(f){if((f=f??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(f>=this.transform.minPitch)return this.transform.setMaxPitch(f),this._update(),this.getPitch()>f&&this.setPitch(f),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(f){return this.transform.setRenderWorldCopies(f),this._update()}project(f){return this.transform.locationToScreenPoint(a.S.convert(f),this.style&&this.terrain)}unproject(f){return this.transform.screenPointToLocation(a.P.convert(f),this.terrain)}isMoving(){var f;return this._moving||((f=this.handlers)===null||f===void 0?void 0:f.isMoving())}isZooming(){var f;return this._zooming||((f=this.handlers)===null||f===void 0?void 0:f.isZooming())}isRotating(){var f;return this._rotating||((f=this.handlers)===null||f===void 0?void 0:f.isRotating())}_createDelegatedListener(f,e,s){if(f==="mouseenter"||f==="mouseover"){let c=!1;return{layers:e,listener:s,delegates:{mousemove:g=>{const b=e.filter((S=>this.getLayer(S))),T=b.length!==0?this.queryRenderedFeatures(g.point,{layers:b}):[];T.length?c||(c=!0,s.call(this,new qr(f,this,g.originalEvent,{features:T}))):c=!1},mouseout:()=>{c=!1}}}}if(f==="mouseleave"||f==="mouseout"){let c=!1;return{layers:e,listener:s,delegates:{mousemove:b=>{const T=e.filter((S=>this.getLayer(S)));(T.length!==0?this.queryRenderedFeatures(b.point,{layers:T}):[]).length?c=!0:c&&(c=!1,s.call(this,new qr(f,this,b.originalEvent)))},mouseout:b=>{c&&(c=!1,s.call(this,new qr(f,this,b.originalEvent)))}}}}{const c=p=>{const g=e.filter((T=>this.getLayer(T))),b=g.length!==0?this.queryRenderedFeatures(p.point,{layers:g}):[];b.length&&(p.features=b,s.call(this,p),delete p.features)};return{layers:e,listener:s,delegates:{[f]:c}}}}_saveDelegatedListener(f,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[f]=this._delegatedListeners[f]||[],this._delegatedListeners[f].push(e)}_removeDelegatedListener(f,e,s){if(!this._delegatedListeners||!this._delegatedListeners[f])return;const c=this._delegatedListeners[f];for(let p=0;p<c.length;p++){const g=c[p];if(g.listener===s&&g.layers.length===e.length&&g.layers.every((b=>e.includes(b)))){for(const b in g.delegates)this.off(b,g.delegates[b]);return void c.splice(p,1)}}}on(f,e,s){if(s===void 0)return super.on(f,e);const c=typeof e=="string"?[e]:e,p=this._createDelegatedListener(f,c,s);this._saveDelegatedListener(f,p);for(const g in p.delegates)this.on(g,p.delegates[g]);return{unsubscribe:()=>{this._removeDelegatedListener(f,c,s)}}}once(f,e,s){if(s===void 0)return super.once(f,e);const c=typeof e=="string"?[e]:e,p=this._createDelegatedListener(f,c,s);for(const g in p.delegates){const b=p.delegates[g];p.delegates[g]=(...T)=>{this._removeDelegatedListener(f,c,s),b(...T)}}this._saveDelegatedListener(f,p);for(const g in p.delegates)this.once(g,p.delegates[g]);return this}off(f,e,s){return s===void 0?super.off(f,e):(this._removeDelegatedListener(f,typeof e=="string"?[e]:e,s),this)}queryRenderedFeatures(f,e){if(!this.style)return[];let s;const c=f instanceof a.P||Array.isArray(f),p=c?f:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(c?{}:f)||{},p instanceof a.P||typeof p[0]=="number")s=[a.P.convert(p)];else{const g=a.P.convert(p[0]),b=a.P.convert(p[1]);s=[g,new a.P(b.x,g.y),b,new a.P(g.x,b.y),g]}return this.style.queryRenderedFeatures(s,e,this.transform)}querySourceFeatures(f,e){return this.style.querySourceFeatures(f,e)}setStyle(f,e){return(e=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&f?(this._diffStyle(f,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(f,e))}setTransformRequest(f){return this._requestManager.setTransformRequest(f),this}_getUIString(f){const e=this._locale[f];if(e==null)throw new Error(`Missing UI string '${f}'`);return e}_updateStyle(f,e){var s,c;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(f,e)));const p=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!f)),f?(this.style=new Uc(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof f=="string"?this.style.loadURL(f,e,p):this.style.loadJSON(f,e,p),this):((c=(s=this.style)===null||s===void 0?void 0:s.projection)===null||c===void 0||c.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Uc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(f,e){if(typeof f=="string"){const s=this._requestManager.transformRequest(f,"Style");a.j(s,new AbortController).then((c=>{this._updateDiff(c.data,e)})).catch((c=>{c&&this.fire(new a.k(c))}))}else typeof f=="object"&&this._updateDiff(f,e)}_updateDiff(f,e){try{this.style.setState(f,e)&&this._update(!0)}catch(s){a.w(`Unable to perform style diff: ${s.message||s.error||s}.  Rebuilding the style from scratch.`),this._updateStyle(f,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(f,e){return this._lazyInitEmptyStyle(),this.style.addSource(f,e),this._update(!0)}isSourceLoaded(f){const e=this.style&&this.style.sourceCaches[f];if(e!==void 0)return e.loaded();this.fire(new a.k(new Error(`There is no source with ID '${f}'`)))}setTerrain(f){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),f){const e=this.style.sourceCaches[f.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${f.source}`);this.terrain===null&&e.reload();for(const s in this.style._layers){const c=this.style._layers[s];c.type==="hillshade"&&c.source===f.source&&a.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."),c.type==="color-relief"&&c.source===f.source&&a.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new wt(this.painter,e,f),this.painter.renderToTexture=new Tu(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=s=>{var c;s.dataType==="style"?this.terrain.sourceCache.freeRtt():s.dataType==="source"&&s.tile&&(s.sourceId!==f.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((c=s.source)===null||c===void 0?void 0:c.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(s.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.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new a.l("terrain",{terrain:f})),this}getTerrain(){var f,e;return(e=(f=this.terrain)===null||f===void 0?void 0:f.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const f=this.style&&this.style.sourceCaches;for(const e in f){const s=f[e]._tiles;for(const c in s){const p=s[c];if(p.state!=="loaded"&&p.state!=="errored")return!1}}return!0}removeSource(f){return this.style.removeSource(f),this._update(!0)}getSource(f){return this.style.getSource(f)}setSourceTileLodParams(f,e,s){if(s){const c=this.getSource(s);if(!c)throw new Error(`There is no source with ID "${s}", cannot set LOD parameters`);c.calculateTileZoom=He(Math.max(1,f),Math.max(1,e))}else for(const c in this.style.sourceCaches)this.style.sourceCaches[c].getSource().calculateTileZoom=He(Math.max(1,f),Math.max(1,e));return this._update(!0),this}refreshTiles(f,e){const s=this.style.sourceCaches[f];if(!s)throw new Error(`There is no source cache with ID "${f}", cannot refresh tile`);e===void 0?s.reload(!0):s.refreshTiles(e.map((c=>new a.a4(c.z,c.x,c.y))))}addImage(f,e,s={}){const{pixelRatio:c=1,sdf:p=!1,stretchX:g,stretchY:b,content:T,textFitWidth:S,textFitHeight:C}=s;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||a.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new a.k(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:E,height:j,data:A}=e,R=e;return this.style.addImage(f,{data:new a.R({width:E,height:j},new Uint8Array(A)),pixelRatio:c,stretchX:g,stretchY:b,content:T,textFitWidth:S,textFitHeight:C,sdf:p,version:0,userImage:R}),R.onAdd&&R.onAdd(this,f),this}}{const{width:E,height:j,data:A}=W.getImageData(e);this.style.addImage(f,{data:new a.R({width:E,height:j},A),pixelRatio:c,stretchX:g,stretchY:b,content:T,textFitWidth:S,textFitHeight:C,sdf:p,version:0})}}updateImage(f,e){const s=this.style.getImage(f);if(!s)return this.fire(new a.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const c=e instanceof HTMLImageElement||a.b(e)?W.getImageData(e):e,{width:p,height:g,data:b}=c;if(p===void 0||g===void 0)return this.fire(new a.k(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(p!==s.data.width||g!==s.data.height)return this.fire(new a.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const T=!(e instanceof HTMLImageElement||a.b(e));return s.data.replace(b,T),this.style.updateImage(f,s),this}getImage(f){return this.style.getImage(f)}hasImage(f){return f?!!this.style.getImage(f):(this.fire(new a.k(new Error("Missing required image id"))),!1)}removeImage(f){this.style.removeImage(f)}loadImage(f){return Te.getImage(this._requestManager.transformRequest(f,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(f,e){return this._lazyInitEmptyStyle(),this.style.addLayer(f,e),this._update(!0)}moveLayer(f,e){return this.style.moveLayer(f,e),this._update(!0)}removeLayer(f){return this.style.removeLayer(f),this._update(!0)}getLayer(f){return this.style.getLayer(f)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(f,e,s){return this.style.setLayerZoomRange(f,e,s),this._update(!0)}setFilter(f,e,s={}){return this.style.setFilter(f,e,s),this._update(!0)}getFilter(f){return this.style.getFilter(f)}setPaintProperty(f,e,s,c={}){return this.style.setPaintProperty(f,e,s,c),this._update(!0)}getPaintProperty(f,e){return this.style.getPaintProperty(f,e)}setLayoutProperty(f,e,s,c={}){return this.style.setLayoutProperty(f,e,s,c),this._update(!0)}getLayoutProperty(f,e){return this.style.getLayoutProperty(f,e)}setGlyphs(f,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(f,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(f,e,s={}){return this._lazyInitEmptyStyle(),this.style.addSprite(f,e,s,(c=>{c||this._update(!0)})),this}removeSprite(f){return this._lazyInitEmptyStyle(),this.style.removeSprite(f),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(f,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(f,e,(s=>{s||this._update(!0)})),this}setLight(f,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(f,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(f,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(f,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(f,e){return this.style.setFeatureState(f,e),this._update()}removeFeatureState(f,e){return this.style.removeFeatureState(f,e),this._update()}getFeatureState(f){return this.style.getFeatureState(f)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let f=0,e=0;return this._container&&(f=this._container.clientWidth||400,e=this._container.clientHeight||300),[f,e]}_setupContainer(){const f=this._container;f.classList.add("maplibregl-map");const e=this._canvasContainer=G.create("div","maplibregl-canvas-container",f);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=G.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const s=this._containerDimensions(),c=this._getClampedPixelRatio(s[0],s[1]);this._resizeCanvas(s[0],s[1],c);const p=this._controlContainer=G.create("div","maplibregl-control-container",f),g=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((b=>{g[b]=G.create("div",`maplibregl-ctrl-${b} `,p)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(f,e,s){this._canvas.width=Math.floor(s*f),this._canvas.height=Math.floor(s*e),this._canvas.style.width=`${f}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const f=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",(c=>{e={requestedAttributes:f},c&&(e.statusMessage=c.statusMessage,e.type=c.type)}),{once:!0});let s=null;if(s=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,f):this._canvas.getContext("webgl2",f)||this._canvas.getContext("webgl",f),!s){const c="Failed to initialize WebGL";throw e?(e.message=c,new Error(JSON.stringify(e))):new Error(c)}this.painter=new _p(s,this.transform),Pe.testSupport(s)}migrateProjection(f,e){super.migrateProjection(f,e),this.painter.transform=f,this.fire(new a.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(f){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||f,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(f){return this._update(),this._renderTaskQueue.add(f)}_cancelRenderFrame(f){this._renderTaskQueue.remove(f)}_render(f){var e,s,c,p,g;const b=this._idleTriggered?this._fadeDuration:0,T=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(f),this._removed)return;let S=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,A=W.now();this.style.zoomHistory.update(j,A);const R=new a.F(j,{now:A,fadeDuration:b,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),V=R.crossFadingFactor();V===1&&V===this._crossFadingFactor||(S=!0,this._crossFadingFactor=V),this.style.update(R)}const C=((s=this.style.projection)===null||s===void 0?void 0:s.transitionState)>0!==T;(c=this.style.projection)===null||c===void 0||c.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((p=this.style.projection)===null||p===void 0?void 0:p.transitionState,(g=this.style.projection)===null||g===void 0?void 0:g.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||C)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,b,this._crossSourceCollisions,C),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:b,showPadding:this.showPadding}),this.fire(new a.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.cw.mark(a.cx.load),this.fire(new a.l("load"))),this.style&&(this.style.hasTransitions()||S)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const E=this._sourcesDirty||this._styleDirty||this._placementDirty;return E||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.l("idle")),!this._loaded||this._fullyLoaded||E||(this._fullyLoaded=!0,a.cw.mark(a.cx.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var f;this._hash&&this._hash.remove();for(const s of this._controls)s.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),Te.removeThrottleControl(this._imageQueueHandle),(f=this._resizeObserver)===null||f===void 0||f.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e?.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),G.remove(this._canvasContainer),G.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),a.cw.clearMetrics(),this._removed=!0,this.fire(new a.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,W.frame(this._frameRequest,(f=>{a.cw.frame(f),this._frameRequest=null;try{this._render(f)}catch(e){if(!a.cy(e)&&!(function(s){return s.message===Pa})(e))throw e}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(f){this._showTileBoundaries!==f&&(this._showTileBoundaries=f,this._update())}get showPadding(){return!!this._showPadding}set showPadding(f){this._showPadding!==f&&(this._showPadding=f,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(f){this._showCollisionBoxes!==f&&(this._showCollisionBoxes=f,f?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(f){this._showOverdrawInspector!==f&&(this._showOverdrawInspector=f,this._update())}get repaint(){return!!this._repaint}set repaint(f){this._repaint!==f&&(this._repaint=f,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(f){this._vertices=f,this._update()}get version(){return $r}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(f){return this._lazyInitEmptyStyle(),this.style.setProjection(f),this._update(!0)}},v.MapMouseEvent=qr,v.MapTouchEvent=Ro,v.MapWheelEvent=pu,v.Marker=ro,v.NavigationControl=class{constructor(f){this._updateZoomButtons=()=>{const e=this._map.getZoom(),s=e===this._map.getMaxZoom(),c=e===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=c,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",c.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,s)=>{const c=this._map._getUIString(`NavigationControl.${s}`);e.title=c,e.setAttribute("aria-label",c)},this.options=a.e({},Tn,f),this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),G.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),G.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=G.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(f){return this._map=f,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new zf(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){G.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.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(f,e){const s=G.create("button",f,this._container);return s.type="button",s.addEventListener("click",e),s}},v.Popup=class extends a.E{constructor(f){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&G.remove(this._content),this._container&&(G.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 a.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=G.create("div","maplibregl-popup",this._map.getContainer()),this._tip=G.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const b of this.options.className.split(" "))this._container.classList.add(b);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),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=Li(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const s=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let c=this.options.anchor;const p=Vl(this.options.offset);if(!c){const b=this._container.offsetWidth,T=this._container.offsetHeight;let S;S=s.y+p.bottom.y<T?["top"]:s.y>this._map.transform.height-T?["bottom"]:[],s.x<b/2?S.push("left"):s.x>this._map.transform.width-b/2&&S.push("right"),c=S.length===0?"bottom":S.join("-")}let g=s.add(p[c]);this.options.subpixelPositioning||(g=g.round()),G.setTransform(this._container,`${Vi[c]} translate(${g.x}px,${g.y}px)`),Ou(this._container,c,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(Cu),f)}addTo(f){return this._map&&this.remove(),this._map=f,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 a.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(f){return this._lngLat=a.S.convert(f),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(f){return this.setDOMContent(document.createTextNode(f))}setHTML(f){const e=document.createDocumentFragment(),s=document.createElement("body");let c;for(s.innerHTML=f;c=s.firstChild,c;)e.appendChild(c);return this.setDOMContent(e)}getMaxWidth(){var f;return(f=this._container)===null||f===void 0?void 0:f.style.maxWidth}setMaxWidth(f){return this.options.maxWidth=f,this._update(),this}setDOMContent(f){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=G.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(f),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(f){return this._container&&this._container.classList.add(f),this}removeClassName(f){return this._container&&this._container.classList.remove(f),this}setOffset(f){return this.options.offset=f,this._update(),this}toggleClassName(f){if(this._container)return this._container.classList.toggle(f)}setSubpixelPositioning(f){this.options.subpixelPositioning=f}_createCloseButton(){this.options.closeButton&&(this._closeButton=G.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const f=this._container.querySelector(Eu);f&&f.focus()}},v.RasterDEMTileSource=Ne,v.RasterTileSource=Ue,v.ScaleControl=class{constructor(f){this._onMove=()=>{Uo(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Uo(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Pu),f)}getDefaultPosition(){return"bottom-left"}onAdd(f){return this._map=f,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-scale",f.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){G.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},v.ScrollZoomHandler=Op,v.Style=Uc,v.TerrainControl=class{constructor(f){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=f}onAdd(f){return this._map=f,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=G.create("button","maplibregl-ctrl-terrain",this._container),G.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.t
830ype="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){G.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},v.TwoFingersTouchPitchHandler=Dl,v.TwoFingersTouchRotateHandler=No,v.TwoFingersTouchZoomHandler=Rl,v.TwoFingersTouchZoomRotateHandler=Ep,v.VectorTileSource=Fe,v.VideoSource=at,v.addSourceType=(f,e)=>a._(void 0,void 0,void 0,(function*(){if(mt(f))throw new Error(`A source type called "${f}" already exists.`);((s,c)=>{Ct[s]=c})(f,e)})),v.clearPrewarmedResources=function(){const f=Ye;f&&(f.isPreloaded()&&f.numActive()===1?(f.release(ir),Ye=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()"))},v.createTileMesh=Nc,v.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},v.getRTLTextPluginStatus=function(){return pi().getRTLTextPluginStatus()},v.getVersion=function(){return Mu},v.getWorkerCount=function(){return bi.workerCount},v.getWorkerUrl=function(){return a.a.WORKER_URL},v.importScriptInWorkers=function(f){return De().broadcast("IS",f)},v.prewarm=function(){ct().acquire(ir)},v.setMaxParallelImageRequests=function(f){a.a.MAX_PARALLEL_IMAGE_REQUESTS=f},v.setRTLTextPlugin=function(f,e){return pi().setRTLTextPlugin(f,e)},v.setWorkerCount=function(f){bi.workerCount=f},v.setWorkerUrl=function(f){a.a.WORKER_URL=f}}));var w=u;return w}))})(gd)),gd.exports}var eh=pS(),Rn=Uint8Array,dc=Uint16Array,dS=Int32Array,X8=new Rn([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]),Y8=new Rn([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]),fS=new Rn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),J8=function(i,o){for(var u=new dc(31),d=0;d<31;++d)u[d]=o+=1<<i[d-1];for(var y=new dS(u[30]),d=1;d<30;++d)for(var w=u[d];w<u[d+1];++w)y[w]=w-u[d]<<5|d;return{b:u,r:y}},Q8=J8(X8,2),ex=Q8.b,mS=Q8.r;ex[28]=258,mS[258]=28;var gS=J8(Y8,0),_S=gS.b,L0=new dc(32768);for(var qi=0;qi<32768;++qi){var Yo=(qi&43690)>>1|(qi&21845)<<1;Yo=(Yo&52428)>>2|(Yo&13107)<<2,Yo=(Yo&61680)>>4|(Yo&3855)<<4,L0[qi]=((Yo&65280)>>8|(Yo&255)<<8)>>1}var fh=(function(i,o,u){for(var d=i.length,y=0,w=new dc(o);y<d;++y)i[y]&&++w[i[y]-1];var v=new dc(o);for(y=1;y<o;++y)v[y]=v[y-1]+w[y-1]<<1;var a;if(u){a=new dc(1<<o);var M=15-o;for(y=0;y<d;++y)if(i[y])for(var D=y<<4|i[y],F=o-i[y],H=v[i[y]-1]++<<F,W=H|(1<<F)-1;H<=W;++H)a[L0[H]>>M]=D}else for(a=new dc(d),y=0;y<d;++y)i[y]&&(a[y]=L0[v[i[y]-1]++]>>15-i[y]);return a}),Nh=new Rn(288);for(var qi=0;qi<144;++qi)Nh[qi]=8;for(var qi=144;qi<256;++qi)Nh[qi]=9;for(var qi=256;qi<280;++qi)Nh[qi]=7;for(var qi=280;qi<288;++qi)Nh[qi]=8;var tx=new Rn(32);for(var qi=0;qi<32;++qi)tx[qi]=5;var yS=fh(Nh,9,1),bS=fh(tx,5,1),e0=function(i){for(var o=i[0],u=1;u<i.length;++u)i[u]>o&&(o=i[u]);return o},fs=function(i,o,u){var d=o/8|0;return(i[d]|i[d+1]<<8)>>(o&7)&u},t0=function(i,o){var u=o/8|0;return(i[u]|i[u+1]<<8|i[u+2]<<16)>>(o&7)},xS=function(i){return(i+7)/8|0},vS=function(i,o,u){return(u==null||u>i.length)&&(u=i.length),new Rn(i.subarray(o,u))}
830,wS=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],jn=function(i,o,u){var d=new Error(o||wS[i]);if(d.code=i,Error.captureStackTrace&&Error.captureStackTrace(d,jn),!u)throw d;return d},Cg=function(i,o,u,d){var y=i.length,w=0;if(!y||o.f&&!o.l)return u||new Rn(0);var v=!u,a=v||o.i!=2,M=o.i;v&&(u=new Rn(y*3));var D=function(Ht){var re=u.length;if(Ht>re){var ae=new Rn(Math.max(re*2,Ht));ae.set(u),u=ae}},F=o.f||0,H=o.p||0,W=o.b||0,G=o.l,Pe=o.d,Ie=o.m,rt=o.n,nt=y*8;do{if(!G){F=fs(i,H,1);var Ae=fs(i,H+1,3);if(H+=3,Ae)if(Ae==1)G=yS,Pe=bS,Ie=9,rt=5;else if(Ae==2){var Ce=fs(i,H,31)+257,Re=fs(i,H+10,15)+4,pt=Ce+fs(i,H+5,31)+1;H+=14;for(var Ge=new Rn(pt),dt=new Rn(19),_t=0;_t<Re;++_t)dt[fS[_t]]=fs(i,H+_t*3,7);H+=Re*3;for(var Xe=e0(dt),Et=(1<<Xe)-1,di=fh(dt,Xe,1),_t=0;_t<pt;){var yi=di[fs(i,H,Et)];H+=yi&15;var ke=yi>>4;if(ke<16)Ge[_t++]=ke;else{var qt=0,It=0;for(ke==16?(It=3+fs(i,H,3),H+=2,qt=Ge[_t-1]):ke==17?(It=3+fs(i,H,7),H+=3):ke==18&&(It=11+fs(i,H,127),H+=7);It--;)Ge[_t++]=qt}}var ni=Ge.subarray(0,Ce),Ft=Ge.subarray(Ce);Ie=e0(ni),rt=e0(Ft),G=fh(ni,Ie,1),Pe=fh(Ft,rt,1)}else jn(1);else{var ke=xS(H)+4,Te=i[ke-4]|i[ke-3]<<8,je=ke+Te;if(je>y){M&&jn(0);break}a&&D(W+Te),u.set(i.subarray(ke,je),W),o.b=W+=Te,o.p=H=je*8,o.f=F;continue}if(H>nt){M&&jn(0);break}}a&&D(W+131072);for(var ir=(1<<Ie)-1,bi=(1<<rt)-1,Bi=H;;Bi=H){var qt=G[t0(i,H)&ir],Ye=qt>>4;if(H+=qt&15,H>nt){M&&jn(0);break}if(qt||jn(2),Ye<256)u[W++]=Ye;else if(Ye==256){Bi=H,G=null;break}else{var gt=Ye-254;if(Ye>264){var _t=Ye-257,ct=X8[_t];gt=fs(i,H,(1<<ct)-1)+ex[_t],H+=ct}var At=Pe[t0(i,H)&bi],De=At>>4;At||jn(3),H+=At&15;var Ft=_S[De];if(De>3){var ct=Y8[De];Ft+=t0(i,H)&(1<<ct)-1,H+=ct}if(H>nt){M&&jn(0);break}a&&D(W+131072);var ut=W+gt;if(W<Ft){var st=w-Ft,vt=Math.min(Ft,ut);for(st+W<0&&jn(3);W<vt;++W)u[W]=d[st+W]}for(;W<ut;++W)u[W]=u[W-Ft]}}o.l=G,o.p=Bi,o.b=W,o.f=F,G&&(F=1,o.m=Ie,o.d=Pe,o.n=rt)}while(!F);return W!=u.length&&v?vS(u,0,W):u.subarray(0,W)},BS=new Rn(0),TS=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&jn(6,"invalid gzip data");var o=i[3],u=10;o&4&&(u+=(i[10]|i[11]<<8)+2);for(var d=(o>>3&1)+(o>>4&1);d>0;d-=!i[u++]);return u+(o&2)},SS=function(i){var o=i.length;return(i[o-4]|i[o-3]<<8|i[o-2]<<16|i[o-1]<<24)>>>0},OS=function(i,o){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&jn(6,"invalid zlib data"),(i[1]>>5&1)==1&&jn(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function PS(i,o){return Cg(i,{i:2},o,o)}function CS(i,o){var u=TS(i);return u+8>i.length&&jn(6,"invalid gzip data"),Cg(i.subarray(u,-8),{i:2},new Rn(SS(i)),o)}function ES(i,o){return Cg(i.subarray(OS(i),-4),{i:2},o,o)}function MS(i,o){return i[0]==31&&i[1]==139&&i[2]==8?CS(i,o):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?PS(i,o):ES(i,o)}var IS=typeof TextDecoder<"u"&&new TextDecoder,AS=0;try{IS.decode(BS,{stream:!0}),AS=1}catch{}var jS=Object.defineProperty,mh=Math.pow,Di=(i,o)=>jS(i,"name",{value:o,configurable:!0}),Dr=(i,o,u)=>new Promise((d,y)=>{var w=M=>{try{a(u.next(M))}catch(D){y(D)}},v=M=>{try{a(u.throw(M))}catch(D){y(D)}},a=M=>M.done?d(M.value):Promise.resolve(M.value).then(w,v);a((u=u.apply(i,o)).next())});Di((i,o)=>{let u=!1,d="",y=L.GridLayer.extend({createTile:Di((w,v)=>{let a=document.createElement("img"),M=new AbortController,D=M.signal;return a.cancel=()=>{M.abort()},u||(i.getHeader().then(F=>{F.tileType===1?console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details."):F.tileType===2?d="image/png":F.tileType===3?d="image/jpeg":F.tileType===4?d="image/webp":F.tileType===5&&(d="image/avif")}),u=!0),i.getZxy(w.z,w.x,w.y,D).then(F=>{if(F){let H=new Blob([F.data],{type:d}),W=window.URL.createObjectURL(H);a.src=W,a.cancel=void 0,v(void 0,a)}}).catch(F=>{if(F.name!=="AbortError")throw F}),a},"createTile"),_removeTile:Di(function(w){let v=this._tiles[w];v&&(v.el.cancel&&v.el.cancel(),v.el.width=0,v.el.height=0,v.el.deleted=!0,L.DomUtil.remove(v.el),delete this._tiles[w],this.fire("tileunload",{tile:v.el,coords:this._keyToTileCoords(w)}))},"_removeTile")});return new y(o)},"leafletRasterLayer");var kS=Di(i=>(o,u)=>{if(u instanceof AbortController)return i(o,u);let d=new AbortController;return i(o,d).then(y=>u(void 0,y.data,y.cacheControl||"",y.expires||""),y=>u(y)).catch(y=>u(y)),{cancel:Di(()=>d.abort(),"cancel")}},"v3compat"),ix=class{constructor(o){this.tilev4=Di((u,d)=>Dr(this,null,function*(){if(u.type==="json"){let G=u.url.substr(10),Pe=this.tiles.get(G);if(Pe||(Pe=new gb(G),this.tiles.set(G,Pe)),this.metadata)return{data:yield Pe.getTileJson(u.url)};let Ie=yield Pe.getHeader();return(Ie.minLon>=Ie.maxLon||Ie.minLat>=Ie.maxLat)&&console.error(`Bounds of PMTiles archive ${Ie.minLon},${Ie.minLat},${Ie.maxLon},${Ie.maxLat} are not valid.`),{data:{tiles:[`${u.url}/{z}/{x}/{y}`],minzoom:Ie.minZoom,maxzoom:Ie.maxZoom,bounds:[Ie.minLon,Ie.minLat,Ie.maxLon,Ie.maxLat]}}}let y=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),w=u.url.match(y);if(!w)throw new Error("Invalid PMTiles protocol URL");let v=w[1],a=this.tiles.get(v);a||(a=new gb(v),this.tiles.set(v,a));let M=w[2],D=w[3],F=w[4],H=yield a.getHeader(),W=yield a?.getZxy(+M,+D,+F,d.signal);if(W)return{data:new Uint8Array(W.data),cacheControl:W.cacheControl,expires:W.expires};if(H.tileType===1){if(this.errorOnMissingTile)throw new Error("Tile not found.");return{data:new Uint8Array}}return{data:null}}),"tilev4"),this.tile=kS(this.tilev4),this.tiles=new Map,this.metadata=o?.metadata||!1,this.errorOnMissingTile=o?.errorOnMissingTile||!1}add(o){this.tiles.set(o.source.getKey(),o)}get(o){return this.tiles.get(o)}};Di(ix,"Protocol");var RS=ix;function rx(i,o){return(o>>>0)*4294967296+(i>>>0)}Di(rx,"toNum");function nx(i,o){let u=o.buf,d=u[o.pos++],y=(d&112)>>4;if(d<128||(d=u[o.pos++],y|=(d&127)<<3,d<128)||(d=u[o.pos++],y|=(d&127)<<10,d<128)||(d=u[o.pos++],y|=(d&127)<<17,d<128)||(d=u[o.pos++],y|=(d&127)<<24,d<128)||(d=u[o.pos++],y|=(d&1)<<31,d<128))return rx(i,y);throw new Error("Expected varint not more than 10 bytes")}Di(nx,"readVarintRemainder");function pc(i){let o=i.buf,u=o[i.pos++],d=u&127;return u<128||(u=o[i.pos++],d|=(u&127)<<7,u<128)||(u=o[i.pos++],d|=(u&127)<<14,u<128)||(u=o[i.pos++],d|=(u&127)<<21,u<128)?d:(u=o[i.pos],d|=(u&15)<<28,nx(d,i))}Di(pc,"readVarint");function Eg(i,o,u,d){if(d===0){u===1&&(o[0]=i-1-o[0],o[1]=i-1-o[1]);let y=o[0];o[0]=o[1],o[1]=y}}Di(Eg,"rotate");function sx(i,o){let u=mh(2,i),d=o,y=o,w=o,v=[0,0],a=1;for(;a<u;)d=1&w/2,y=1&(w^d),Eg(a,v,d,y),v[0]+=a*d,v[1]+=a*y,w=w/4,a*=2;return[i,v[0],v[1]]}Di(sx,"idOnLevel");var DS=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function ox(i,o,u){if(i>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");if(o>mh(2,i)-1||u>mh(2,i)-1)throw new Error("tile x/y outside zoom level bounds");let d=DS[i],y=mh(2,i),w=0,v=0,a=0,M=[o,u],D=y/2;for(;D>0;)w=(M[0]&D)>0?1:0,v=(M[1]&D)>0?1:0,a+=D*D*(3*w^v),Eg(D,M,w,v),D=D/2;return d+a}Di(ox,"zxyToTileId");function LS(i){let o=0;for(let u=0;u<27;u++){let d=(1<<u)*(1<<u);if(o+d>i)return sx(u,i-o);o+=d}throw new Error("Tile zoom level exceeds max safe number limit (26)")}Di(LS,"tileIdToZxy");var zS=(i=>(i[i.Unknown=0]="Unknown",i[i.None=1]="None",i[i.Gzip=2]="Gzip",i[i.Brotli=3]="Brotli",i[i.Zstd=4]="Zstd",i))(zS||{});function of(i,o){return Dr(this,null,function*(){if(o===1||o===0)return i;if(o===2){if(typeof globalThis.DecompressionStream>"u")return MS(new Uint8Array(i));let u=new Response(i).body;if(!u)throw new Error("Failed to read response stream");let d=u.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(d).arrayBuffer()}throw new Error("Compression method not supported")})}Di(of,"defaultDecompress");var FS=(i=>(i[i.Unknown=0]="Unknown",i[i.Mvt=1]="Mvt",i[i.Png=2]="Png",i[i.Jpeg=3]="Jpeg",i[i.Webp=4]="Webp",i[i.Avif=5]="Avif",i))(FS||{});function ax(i){return i===1?".mvt":i===2?".png":i===3?".jpg":i===4?".webp":i===5?".avif":""}Di(ax,"tileTypeExt");var NS=127;function lx(i,o){let u=0,d=i.length-1;for(;u<=d;){let y=d+u>>1,w=o-i[y].tileId;if(w>0)u=y+1;else if(w<0)d=y-1;else return i[y]}return d>=0&&(i[d].runLength===0||o-i[d].tileId<i[d].runLength)?i[d]:null}Di(lx,"findTile");var $S=class{constructor(o){this.file=o}getKey(){return this.file.name}getBytes(o,u){return Dr(this,null,function*(){return{data:yield this.file.slice(o,o+u).arrayBuffer()}})}};Di($S,"FileSource");var cx=class{constructor(o,u=new Headers){this.url=o,this.customHeaders=u,this.mustReload=!1;let d="";"navigator"in globalThis&&(d=globalThis.navigator.userAgent||"");let y=d.indexOf("Windows")>-1,w=/Chrome|Chromium|Edg|OPR|Brave/.test(d);this.chromeWindowsNoCache=!1,y&&w&&(this.chromeWindowsNoCache=!0)}getKey(){return this.url}setHeaders(o){this.customHeaders=o}getBytes(o,u,d,y){return Dr(this,null,function*(){let w,v;d?v=d:(w=new AbortController,v=w.signal);let a=new Headers(this.customHeaders);a.set("range",`bytes=${o}-${o+u-1}`);let M;this.mustReload?M="reload":this.chromeWindowsNoCache&&(M="no-store");let D=yield fetch(this.url,{signal:v,cache:M,headers:a});
vendor: 7,560 bytes, line 830
830if(o===0&&D.status===416){let W=D.headers.get("Content-Range");if(!W||!W.startsWith("bytes */"))throw new Error("Missing content-length on 416 response");let G=+W.substr(8);D=yield fetch(this.url,{signal:v,cache:"reload",headers:{range:`bytes=0-${G-1}`}})}let F=D.headers.get("Etag");if(F!=null&&F.startsWith("W/")&&(F=null),D.status===416||y&&F&&F!==y)throw this.mustReload=!0,new z0(`Server returned non-matching ETag ${y} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`);if(D.status>=300)throw new Error(`Bad response code: ${D.status}`);let H=D.headers.get("Content-Length");if(D.status===200&&(!H||+H>u))throw w&&w.abort(),new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield D.arrayBuffer(),etag:F||void 0,cacheControl:D.headers.get("Cache-Control")||void 0,expires:D.headers.get("Expires")||void 0}})}};Di(cx,"FetchSource");var US=cx;function Wn(i,o){let u=i.getUint32(o+4,!0),d=i.getUint32(o+0,!0);return u*mh(2,32)+d}Di(Wn,"getUint64");function ux(i,o){let u=new DataView(i),d=u.getUint8(7);if(d>3)throw new Error(`Archive is spec version ${d} but this library supports up to spec version 3`);return{specVersion:d,rootDirectoryOffset:Wn(u,8),rootDirectoryLength:Wn(u,16),jsonMetadataOffset:Wn(u,24),jsonMetadataLength:Wn(u,32),leafDirectoryOffset:Wn(u,40),leafDirectoryLength:Wn(u,48),tileDataOffset:Wn(u,56),tileDataLength:Wn(u,64),numAddressedTiles:Wn(u,72),numTileEntries:Wn(u,80),numTileContents:Wn(u,88),clustered:u.getUint8(96)===1,internalCompression:u.getUint8(97),tileCompression:u.getUint8(98),tileType:u.getUint8(99),minZoom:u.getUint8(100),maxZoom:u.getUint8(101),minLon:u.getInt32(102,!0)/1e7,minLat:u.getInt32(106,!0)/1e7,maxLon:u.getInt32(110,!0)/1e7,maxLat:u.getInt32(114,!0)/1e7,centerZoom:u.getUint8(118),centerLon:u.getInt32(119,!0)/1e7,centerLat:u.getInt32(123,!0)/1e7,etag:o}}Di(ux,"bytesToHeader");function Mg(i){let o={buf:new Uint8Array(i),pos:0},u=pc(o),d=[],y=0;for(let w=0;w<u;w++){let v=pc(o);d.push({tileId:y+v,offset:0,length:0,runLength:1}),y+=v}for(let w=0;w<u;w++)d[w].runLength=pc(o);for(let w=0;w<u;w++)d[w].length=pc(o);for(let w=0;w<u;w++){let v=pc(o);v===0&&w>0?d[w].offset=d[w-1].offset+d[w-1].length:d[w].offset=v-1}return d}Di(Mg,"deserializeIndex");var hx=class extends Error{};Di(hx,"EtagMismatch");var z0=hx;function Ig(i,o){return Dr(this,null,function*(){let u=yield i.getBytes(0,16384);if(new DataView(u.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");let d=u.data.slice(0,NS),y=ux(d,u.etag),w=u.data.slice(y.rootDirectoryOffset,y.rootDirectoryOffset+y.rootDirectoryLength),v=`${i.getKey()}|${y.etag||""}|${y.rootDirectoryOffset}|${y.rootDirectoryLength}`,a=Mg(yield o(w,y.internalCompression));return[y,[v,a.length,a]]})}Di(Ig,"getHeaderAndRoot");function Ag(i,o,u,d,y){return Dr(this,null,function*(){let w=yield i.getBytes(u,d,void 0,y.etag),v=yield o(w.data,y.internalCompression),a=Mg(v);if(a.length===0)throw new Error("Empty directory is invalid");return a})}Di(Ag,"getDirectory");var VS=class{constructor(o=100,u=!0,d=of){this.cache=new Map,this.maxCacheEntries=o,this.counter=1,this.decompress=d}getHeader(o){return Dr(this,null,function*(){let u=o.getKey(),d=this.cache.get(u);if(d)return d.lastUsed=this.counter++,d.data;let y=yield Ig(o,this.decompress);return y[1]&&this.cache.set(y[1][0],{lastUsed:this.counter++,data:y[1][2]}),this.cache.set(u,{lastUsed:this.counter++,data:y[0]}),this.prune(),y[0]})}getDirectory(o,u,d,y){return Dr(this,null,function*(){let w=`${o.getKey()}|${y.etag||""}|${u}|${d}`,v=this.cache.get(w);if(v)return v.lastUsed=this.counter++,v.data;let a=yield Ag(o,this.decompress,u,d,y);return this.cache.set(w,{lastUsed:this.counter++,data:a}),this.prune(),a})}prune(){if(this.cache.size>this.maxCacheEntries){let o=1/0,u;this.cache.forEach((d,y)=>{d.lastUsed<o&&(o=d.lastUsed,u=y)}),u&&this.cache.delete(u)}}invalidate(o){return Dr(this,null,function*(){this.cache.delete(o.getKey())})}};Di(VS,"ResolvedValueCache");var px=class{constructor(o=100,u=!0,d=of){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=o,this.counter=1,this.decompress=d}getHeader(o){return Dr(this,null,function*(){let u=o.getKey(),d=this.cache.get(u);if(d)return d.lastUsed=this.counter++,yield d.data;let y=new Promise((w,v)=>{Ig(o,this.decompress).then(a=>{a[1]&&this.cache.set(a[1][0],{lastUsed:this.counter++,data:Promise.resolve(a[1][2])}),w(a[0]),this.prune()}).catch(a=>{v(a)})});return this.cache.set(u,{lastUsed:this.counter++,data:y}),y})}getDirectory(o,u,d,y){return Dr(this,null,function*(){let w=`${o.getKey()}|${y.etag||""}|${u}|${d}`,v=this.cache.get(w);if(v)return v.lastUsed=this.counter++,yield v.data;let a=new Promise((M,D)=>{Ag(o,this.decompress,u,d,y).then(F=>{M(F),this.prune()}).catch(F=>{D(F)})});return this.cache.set(w,{lastUsed:this.counter++,data:a}),a})}prune(){if(this.cache.size>=this.maxCacheEntries){let o=1/0,u;this.cache.forEach((d,y)=>{d.lastUsed<o&&(o=d.lastUsed,u=y)}),u&&this.cache.delete(u)}}invalidate(o){return Dr(this,null,function*(){let u=o.getKey();if(this.invalidations.get(u))return yield this.invalidations.get(u);this.cache.delete(o.getKey());let d=new Promise((y,w)=>{this.getHeader(o).then(v=>{y(),this.invalidations.delete(u)}).catch(v=>{w(v)})});this.invalidations.set(u,d)})}};Di(px,"SharedPromiseCache");var GS=px,dx=class{constructor(o,u,d){typeof o=="string"?this.source=new US(o):this.source=o,d?this.decompress=d:this.decompress=of,u?this.cache=u:this.cache=new GS}getHeader(){return Dr(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(o,u,d,y){return Dr(this,null,function*(){let w=ox(o,u,d),v=yield this.cache.getHeader(this.source);if(o<v.minZoom||o>v.maxZoom)return;let a=v.rootDirectoryOffset,M=v.rootDirectoryLength;for(let D=0;D<=3;D++){let F=yield this.cache.getDirectory(this.source,a,M,v),H=lx(F,w);if(H){if(H.runLength>0){let W=yield this.source.getBytes(v.tileDataOffset+H.offset,H.length,y,v.etag);return{data:yield this.decompress(W.data,v.tileCompression),cacheControl:W.cacheControl,expires:W.expires}}a=v.leafDirectoryOffset+H.offset,M=H.length}else return}throw new Error("Maximum directory depth exceeded")})}getZxy(o,u,d,y){return Dr(this,null,function*(){try{return yield this.getZxyAttempt(o,u,d,y)}catch(w){if(w instanceof z0)return this.cache.invalidate(this.source),yield this.getZxyAttempt(o,u,d,y);throw w}})}getMetadataAttempt(){return Dr(this,null,function*(){let o=yield this.cache.getHeader(this.source),u=yield this.source.getBytes(o.jsonMetadataOffset,o.jsonMetadataLength,void 0,o.etag),d=yield this.decompress(u.data,o.internalCompression),y=new TextDecoder("utf-8");return JSON.parse(y.decode(d))})}getMetadata(){return Dr(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(o){if(o instanceof z0)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw o}})}getTileJson(o){return Dr(this,null,function*(){let u=yield this.getHeader(),d=yield this.getMetadata(),y=ax(u.tileType);return{tilejson:"3.0.0",scheme:"xyz",tiles:[`${o}/{z}/{x}/{y}${y}`],vector_layers:d.vector_layers,attribution:d.attribution,description:d.description,name:d.name,version:d.version,bounds:[u.minLon,u.minLat,u.maxLon,u.maxLat],center:[u.centerLon,u.centerLat,u.centerZoom],minzoom:u.minZoom,maxzoom:u.maxZoom}})}};Di(dx,"PMTiles");var gb=dx;const $h=Kd("projects",()=>{const i=vi([]),o=vi(!1),u=vi(!1),d=async()=>
830{if(!(o.value||u.value)){u.value=!0;try{const v=await fetch("https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/projects_20260731.json");if(!v.ok)throw new Error(`Failed to fetch projects: ${v.status}`);const a=await v.json();i.value=a,o.value=!0}catch(v){console.error("Error loading projects:",v)}finally{u.value=!1}}},y=v=>i.value.find(a=>a.project_id===v),w=_i(()=>{const v={};for(const a of i.value){if(!a.uei||!a.bbox)continue;const M=a.bbox,D=v[a.uei];D?(D[0]=Math.min(D[0],M[0]),D[1]=Math.min(D[1],M[1]),D[2]=Math.max(D[2],M[2]),D[3]=Math.max(D[3],M[3])):v[a.uei]=[...M]}return v});return{projects:i,isLoaded:o,isLoading:u,loadProjects:d,getProjectInfo:y,providerBboxByUei:w}}),HS=()=>{try{const i=document.createElement("canvas"),o=i.getContext("webgl")||i.getContext("experimental-webgl");if(!o)return{supported:!1,error:"WebGL context could not be created. Your browser may not support WebGL or it may be disabled."};const u=o;try{const d=u.getParameter(u.RENDERER),y=u.getParameter(u.VENDOR);if(typeof d=="string"&&typeof y=="string"){const w=["software","llvm","mesa"],v=d.toLowerCase(),a=y.toLowerCase();w.some(D=>v.includes(D)||a.includes(D))&&console.warn("WebGL is using software rendering, performance may be limited")}}catch(d){console.warn("Could not read WebGL parameters:",d)}return{supported:!0}}catch(i){return console.error("WebGL support check failed:",i),{supported:!1,error:`WebGL initialization failed: ${i instanceof Error?i.message:"Unknown error"}`}}},ZS=()=>{alert(`WebGL Not Supported
831
832This map requires WebGL support to display properly, but your browser either doesn't support WebGL or it's disabled.
833
834To fix this issue:
835• Try updating your browser to the latest version
836• Enable hardware acceleration in your browser settings
837• Try using a different browser (Chrome, Firefox, Safari, or Edge)
838• Update your graphics drivers
839
840If you continue to have issues, please contact support.`)},Ns=[{name:"AMAZON KUIPER COMMERCIAL SERVICES LLC",uei:"PX3CHN4WCPG3",mapColor:"#FF4D6B"},{name:"AMG TECHNOLOGY INVESTMENT GROUP, LLC",aka:"Nextlink",uei:"CLDKC67YLL67",mapColor:"#4DADFF"},{name:"Citizens Telecommunications Company of Illinois",uei:"ST6DZ941KPL3",mapColor:"#FF8C4D"},{name:"COMCAST OF ILLINOIS III, INC.",uei:"S5HFWGVB5GM5",mapColor:"#FFAD4D"},{name:"CONEXON CONNECT LLC",uei:"VJ5HRDMWAPW8",mapColor:"#FFCE4D"},{name:"CONNECT HOLDING II LLC",aka:"Brightspeed",uei:"JWYXBY1U3ML3",mapColor:"#FFF04D"},{name:"CONSOLIDATED COMMUNICATIONS ENTERPRISE SERVICES, INC.",uei:"G5ENUFN1N6E4",mapColor:"#E8FF4D"},{name:"FLAT ROCK TELEPHONE CO-OP, INCORPORATED",uei:"KEZ6PJE5S8K8",mapColor:"#C6FF4D"},{name:"GARGOYLE TECHNOLOGIES INC",aka:"Volo.net",uei:"GCHDWNW5LFW5",mapColor:"#8C4DFF"},{name:"GHB ENTERPRISE LLC",uei:"MPA3G4G1K2N4",mapColor:"#82FF4D"},{name:"GRAFTON TECHNOLOGIES, INC.",uei:"MSKYJ31NGMK7",mapColor:"#60FF4D"},{name:"ILLINOIS BELL TELEPHONE COMPANY, LLC",aka:"AT&T",uei:"FV85RLFJJB87",mapColor:"#4DFF60"},{name:"ILLINOIS ELECTRIC COOPERATIVE",aka:"IllnoisNet",uei:"NLL4LSJJFVE3",mapColor:"#4DFF82"},{name:"PAVLOV MEDIA INC",uei:"GHRTWY5DKE64",mapColor:"#4DFFA4"},{name:"PROTEK COMMUNICATIONS, LLC",uei:"QEUMKHLSKWT5",mapColor:"#4DFFC6"},{name:"RURAL ELECTRIC CONVENIENCE COOPERATIVE",uei:"YH87SAARU181",mapColor:"#4DFFE8"},{name:"SHELBY ELECTRIC COOPERATIVE",uei:"T8GUNGBKCEL4",mapColor:"#4DF0FF"},{name:"SILO COMMUNICATIONS LLC",uei:"SCEVUHVPMPV5",mapColor:"#4DCEFF"},{name:"STRADA COMMUNICATIONS LLC",uei:"VMPYBXF2MRV9",mapColor:"#FF6B4D"},{name:"STRATEGIC MANAGEMENT, LLC",uei:"T63RG6QKN9S5",mapColor:"#4D8CFF"},{name:"Surf Air Wireless LLC",uei:"ULYZHJMC3FD5",mapColor:"#4D6BFF"},{name:"WABASH TELEPHONE COOPERATIVE INC",uei:"ZA6NBH6J62S2",mapColor:"#6B4DFF"},{name:"WISPER ISP, LLC",uei:"DLCFQ92MMML9",mapColor:"#A4FF4D"}];function fx(i){return i.aka?`${i.name} (${i.aka})`:i.name}function mx(i){const o=Ns.find(u=>u.uei===i);return o?fx(o):i}const qS={class:"bg-base-100 shadow-lg border border-base-300 rounded-lg p-4 w-[325px]"},WS={class:"mb-3"},KS={class:"text-base-content text-base font-medium leading-tight mb-1"},XS={class:"text-base-content/70 text-sm"},YS={class:"table table-sm w-full"},JS={key:0},QS={class:"text-base-content text-xs border-0 pl-4 pr-0 py-1"},eO={class:"text-base-content text-xs border-0 pl-4 pr-0 py-1"},tO={class:"text-base-content text-xs border-0 pl-4 pr-0 py-1"},iO=zn({__name:"BslFeaturePopup",props:{properties:{}},setup(i){const o=$h(),u=y=>({0:"Other",10:"Copper Wire",40:"Coaxial Cable / HFC",50:"Optical Carrier / Fiber to the Premises",60:"Geostationary Satellite",61:"Non-Geostationary Satellite",70:"Unlicensed Terrestrial Fixed Wireless",71:"Licensed Terrestrial Fixed Wireless",72:"Licensed-by-Rule Terrestrial Fixed Wireless"})[y]||"Unknown",d=y=>o.getProjectInfo(y);return(y,w)=>(Pt(),Lt("div",qS,[ue("div",WS,[ue("div",KS,Jt(y.properties.address_primary),1),ue("div",XS,Jt(y.properties.city)+", IL "+Jt(y.properties.zip),1)]),w[3]||(w[3]=ue("div",{class:"inline-flex items-center px-2 py-1 bg-success/20 text-success text-xs font-medium rounded-full mb-3"},[ue("div",{class:"w-2 h-2 bg-success rounded-full mr-2"}),Xn(" Broadband Serviceable Location ")],-1)),ue("table",YS,[ue("tbody",null,[d(y.properties.project_id)?.uei?(Pt(),Lt("tr",JS,[w[0]||(w[0]=ue("th",{class:"text-base-content/70 text-xs font-medium border-0 px-0 py-1"},"Provider",-1)),ue("td",QS,Jt(wi(mx)(d(y.properties.project_id).uei)),1)])):or("",!0),ue("tr",null,[w[1]||(w[1]=ue("th",{class:"text-base-content/70 text-xs font-medium border-0 px-0 py-1"},"Technology",-1)),ue("td",eO,Jt(u(y.properties.technology)),1)]),ue("tr",null,[w[2]||(w[2]=ue("th",{class:"text-base-content/70 text-xs font-medium border-0 px-0 py-1"},"Maximum Speed",-1)),ue("td",tO,[ue("div",null,Jt(y.properties.download_speed_anticipated)+" Mbps Download",1),ue("div",null,Jt(y.properties.upload_speed_anticipated)+" Mbps Upload",1)])])])])]))}}),rO={class:"bg-base-100 shadow-lg border border-base-300 rounded-lg p-4 w-[325px]"},nO={class:"mb-3"},sO={class:"text-base-content text-base font-medium leading-tight mb-1"},oO={class:"text-base-content/70 text-sm"},aO={key:0,class:"text-base-content/70 text-sm"},lO={key:0},cO={key:1},uO={class:"table table-sm w-full"},hO={key:0},pO={class:"text-base-content text-xs border-0 pl-4 pr-0 py-1"},dO={class:"text-base-content text-xs border-0 pl-4 pr-0 py-1"},fO={class:"text-base-content text-xs border-0 pl-4 pr-0 py-1"},mO=zn({__name:"CaiFeaturePopup",props:{properties:{}},setup(i){const o=$h(),u=y=>({0:"Other",10:"Copper Wire",40:"Coaxial Cable / HFC",50:"Optical Carrier / Fiber to the Premises",60:"Geostationary Satellite",61:"Non-Geostationary Satellite",70:"Unlicensed Terrestrial Fixed Wireless",71:"Licensed Terrestrial Fixed Wireless",72:"Licensed-by-Rule Terrestrial Fixed Wireless"})[y]||"Unknown",d=y=>o.getProjectInfo(y);return(y,w)=>(Pt(),Lt("div",rO,[ue("div",nO,[ue("div",sO,Jt(y.properties.entity_name),1),ue("div",oO,Jt(y.properties.address_primary),1),y.properties.city||y.properties.zip_code?(Pt(),Lt("div",aO,[y.properties.city?(Pt(),Lt("span",lO,Jt(y.properties.city),1)):or("",!0),w[0]||(w[0]=Xn(", IL ",-1)),y.properties.zip_code?(Pt(),Lt("span",cO,Jt(y.properties.zip_code),1)):or("",!0)])):or("",!0)]),w[4]||(w[4]=ue("div",{class:"inline-flex items-center px-2 py-1 bg-primary/20 text-primary text-xs font-medium rounded-full mb-3"},[ue("div",{class:"w-3 h-3 mr-2"},[ue("svg",{viewBox:"0 0 16 16",class:"w-full h-full"}
840,[ue("polygon",{points:"8,2 14,14 2,14",fill:"currentColor"})])]),Xn(" Community Anchor Institution ")],-1)),ue("table",uO,[ue("tbody",null,[d(y.properties.project_id)?.uei?(Pt(),Lt("tr",hO,[w[1]||(w[1]=ue("th",{class:"text-base-content/70 text-xs font-medium border-0 px-0 py-1"},"Provider",-1)),ue("td",pO,Jt(wi(mx)(d(y.properties.project_id).uei)),1)])):or("",!0),ue("tr",null,[w[2]||(w[2]=ue("th",{class:"text-base-content/70 text-xs font-medium border-0 px-0 py-1"},"Technology",-1)),ue("td",dO,Jt(u(y.properties.technology)),1)]),ue("tr",null,[w[3]||(w[3]=ue("th",{class:"text-base-content/70 text-xs font-medium border-0 px-0 py-1"},"Maximum Speed",-1)),ue("td",fO,Jt(y.properties.download_speed_anticipated)+" Mbps Download / "+Jt(y.properties.upload_speed_anticipated)+" Mbps Upload ",1)])])])]))}}),gO={"location-type":"Location Type",grantee:"Broadband Provider",technology:"Technology"},af=Kd("map",()=>{const i=vi(null),o=vi(null),u=vi(null),d=vi(null),y=vi(null),w=vi("location-type"),v=_i(()=>gO[w.value]);function a(Pe){i.value=Pe}function M(){i.value=null}function D(Pe){w.value=Pe}function F(Pe,Ie){o.value=Pe,u.value=Ie??null}function H(){o.value=null,u.value=null}function W(Pe,Ie){d.value=Pe,y.value=Ie??null}function G(){d.value=null,y.value=null}return{selectedCountyOrPlace:i,selectedProviderUei:o,selectedProviderBbox:u,selectedProjectId:d,selectedProjectBbox:y,selectedColorScheme:w,selectedColorSchemeDisplayName:v,setSelectedCountyOrPlace:a,clearSelectedCountyOrPlace:M,setColorScheme:D,setSelectedProviderUei:F,clearSelectedProviderUei:H,setSelectedProjectId:W,clearSelectedProjectId:G}}),_O=zn({__name:"DownloadDataModal",setup(i){const o=vi(),u=()=>{o.value?.showModal()};return(d,y)=>(Pt(),Lt("div",null,[ue("a",{class:"link link-primary text-sm cursor-pointer",onClick:u},"Download the data"),ue("dialog",{ref_key:"modal",ref:o,class:"modal"},[...y[0]||(y[0]=[ue("div",{class:"modal-box max-w-3xl"},[ue("form",{method:"dialog"},[ue("button",{class:"btn btn-sm btn-circle btn-ghost absolute right-2 top-2"},"✕")]),ue("h3",{class:"font-bold text-xl mb-6"},"Download the data"),ue("div",{class:"grid grid-cols-2 gap-6 mb-8"},[ue("div",{class:"card bg-base-200 shadow-md"},[ue("div",{class:"card-body"},[ue("h4",{class:"card-title text-lg mb-4 justify-center"}," Broadband Serviceable Locations "),ue("div",{class:"grid grid-cols-2 gap-3"},[ue("a",{class:"btn btn-primary btn-block",href:"https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/public-data/20260825/il_bead_bsls_20260825.shp.zip"},"Shapefile"),ue("a",{class:"btn btn-primary btn-block",href:"https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/public-data/20260825/il_bead_bsls_20260825.gpkg"},"GeoPackage")]),ue("div",{class:"grid grid-cols-2 gap-3 mt-2"},[ue("div",{class:"text-center text-sm text-base-content/60"},"4 MB"),ue("div",{class:"text-center text-sm text-base-content/60"},"34.5 MB")])])]),ue("div",{class:"card bg-base-200 shadow-md"},[ue("div",{class:"card-body"},[ue("h4",{class:"card-title text-lg mb-4 justify-center"},"Community Anchor Institutions"),ue("div",{class:"grid grid-cols-2 gap-3"},[ue("a",{class:"btn btn-primary btn-block",href:"https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/public-data/20260825/il_bead_cais_20260825.shp.zip"},"Shapefile"),ue("a",{class:"btn btn-primary btn-block",href:"https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/public-data/20260825/il_bead_cais_20260825.gpkg"},"GeoPackage")]),ue("div",{class:"grid grid-cols-2 gap-3 mt-2"},[ue("div",{class:"text-center text-sm text-base-content/60"},"66 KB"),ue("div",{class:"text-center text-sm text-base-content/60"},"442 KB")])])])]),ue("div",{class:"text-center text-sm text-base-content/60"},"Last updated 8/25/2026"),ue("div",{class:"modal-action"},[ue("form",{method:"dialog"},[ue("button",{class:"btn btn-primary"},"Close")])])],-1),ue("form",{method:"dialog",class:"modal-backdrop"},[ue("button",null,"close")],-1)])],512)]))}}),_b=JSON.parse(`[{"fips":"00113","name":"Abingdon","type":"city","bbox":[-90.414639,40.791531,-90.385946,40.816236],"project_ids":[]},{"fips":"00178","name":"Adair","type":"cdp","bbox":[-90.505874,40.412235,-90.49121,40.424295],"project_ids":[]},{"fips":"00191","name":"Adams","type":"cdp","bbox":[-91.213516,39.859836,-91.185017,39.885834],"project_ids":["BOTB-0266"]},{"fips":"00230","name":"Addieville","type":"village","bbox":[-89.495755,38.383677,-89.477149,38.399729],"project_ids":["BOTB-1026"]},{"fips":"00243","name":"Addison","type":"village","bbox":[-88.05218,41.904996,-87.959657,41.957445],"project_ids":["BOTB-0266"]},{"fips":"00295","name":"Adeline","type":"village","bbox":[-89.496942,42.135841,-89.486918,42.144682],"project_ids":["BOTB-0249"]},{"fips":"00516","name":"Albany","type":"village","bbox":[-90.234601,41.779204,-90.200315,41.795074],"project_ids":[]},{"fips":"00555","name":"Albers","type":"village","bbox":[-89.640039,38.531719,-89.602666,38.552384],"project_ids":["BOTB-0142","BOTB-0237"]},{"fips":"00568","name":"Albion","type":"city","bbox":[-88.080167,38.360519,-88.028816,38.393473],"project_ids":["BOTB-0007"]},{"fips":"00594","name":"Alden","type":"cdp","bbox":[-88.523226,42.45511,-88.513467,42.462306],"project_ids":["BOTB-0266"]},{"fips":"00646","name":"Aledo","type":"city","bbox":[-90.761953,41.185186,-90.71822,41.214498],"project_ids":["BOTB-0224"]},{"fips":"00659","name":"Alexander","type":"cdp","bbox":[-90.051704,39.71414,-90.02235,39.730959],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"00672","name":"Alexis","type":"village","bbox":[-90.563305,41.057105,-90.546781,41.068328],"project_ids":[]},{"fips":"00685","name":"Algonquin","type":"village","bbox":[-88.383651,42.132401,-88.257476,42.193731],"project_ids":["BOTB-0010","BOTB-0266"]},{"fips":"00737","name":"Alhambra","type":"village","bbox":[-89.749751,38.880932,-89.723495,38.891964],"project_ids":[]},{"fips":"00815","name":"Allendale","type":"village","bbox":[-87.716023,38.523825,-87.703439,38.531301],"project_ids":["BOTB-0215"]},{"fips":"00867","name":"Allenville","type":"village","bbox":[-88.547199,39.552477,-88.52811,39.564363],"project_ids":["BOTB-0173"]},{"fips":"00880","name":"Allerton","type":"village","bbox":[-87.947533,39.906678,-87.928033,39.923397],"project_ids":[]},{"fips":"00919","name":"Alma","type":"village","bbox":[-88.921736,38.71508,-88.901738,38.730622],"project_ids":["BOTB-0250"]},{"fips":"00971","name":"Alpha","type":"village","bbox":[-90.38628,41.184759,-90.375128,41.201216],"project_ids":[]},{"fips":"00997","name":"Alsey","type":"village","bbox":[-90.439758,39.553721,-90.425765,39.564909],"project_ids":["BOTB-0275"]},{"fips":"01010","name":"Alsip","type":"village","bbox":[-87.778572,41.651704,-87.
840694909,41.690891],"project_ids":["BOTB-0266"]},{"fips":"01049","name":"Altamont","type":"city","bbox":[-88.75745,39.036438,-88.733934,39.072303],"project_ids":["BOTB-0226"]},{"fips":"01114","name":"Alton","type":"city","bbox":[-90.209312,38.8628,-90.088186,38.948697],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"01140","name":"Altona","type":"village","bbox":[-90.173813,41.107014,-90.15419,41.123053],"project_ids":[]},{"fips":"01205","name":"Alto Pass","type":"village","bbox":[-89.334946,37.561702,-89.304901,37.583827],"project_ids":["BOTB-0269","BOTB-0279"]},{"fips":"01242","name":"Alvan (Alvin)","type":"village","bbox":[-87.614799,40.300247,-87.597198,40.314751],"project_ids":[]},{"fips":"01270","name":"Amboy","type":"city","bbox":[-89.421265,41.701867,-89.314099,41.757939],"project_ids":["BOTB-0220","BOTB-1027"]},{"fips":"01361","name":"Anchor","type":"village","bbox":[-88.544878,40.565791,-88.53344,40.573038],"project_ids":["BOTB-0213"]},{"fips":"01426","name":"Andalusia","type":"village","bbox":[-90.737998,41.430269,-90.696081,41.446553],"project_ids":[]},{"fips":"01491","name":"Andover","type":"village","bbox":[-90.300377,41.287602,-90.28116,41.302398],"project_ids":[]},{"fips":"01517","name":"Andres","type":"cdp","bbox":[-87.885073,41.367337,-87.877706,41.376139],"project_ids":["BOTB-0241"]},{"fips":"01543","name":"Anna","type":"city","bbox":[-89.261321,37.445456,-89.207438,37.475962],"project_ids":["BOTB-0222","BOTB-0269","BOTB-0279"]},{"fips":"01556","name":"Annapolis","type":"cdp","bbox":[-87.821634,39.13726,-87.810907,39.148478],"project_ids":["BOTB-0215","BOTB-0269"]},{"fips":"01569","name":"Annawan","type":"town","bbox":[-89.915899,41.384598,-89.848238,41.410423],"project_ids":["BOTB-0266","BOTB-0268"]},{"fips":"01595","name":"Antioch","type":"village","bbox":[-88.128599,42.446679,-87.991626,42.495637],"project_ids":["BOTB-0232","BOTB-0266"]},{"fips":"01647","name":"Apple Canyon Lake","type":"cdp","bbox":[-90.18572,42.404577,-90.14284,42.452867],"project_ids":[]},{"fips":"01673","name":"Apple River","type":"village","bbox":[-90.104071,42.495763,-90.08532,42.508295],"project_ids":["BOTB-0220"]},{"fips":"01803","name":"Arbury Hills","type":"cdp","bbox":[-87.850374,41.532146,-87.840568,41.539512],"project_ids":[]},{"fips":"01881","name":"Arcola","type":"city","bbox":[-88.320815,39.673574,-88.283587,39.695372],"project_ids":["BOTB-0278"]},{"fips":"01946","name":"Arenzville","type":"village","bbox":[-90.380107,39.87488,-90.358759,39.88607],"project_ids":[]},{"fips":"01972","name":"Argenta","type":"village","bbox":[-88.832091,39.976077,-88.805528,39.992448],"project_ids":["BOTB-0175"]},{"fips":"02050","name":"Argyle","type":"cdp","bbox":[-88.950862,42.348304,-88.930034,42.363008],"project_ids":["BOTB-0266"]},{"fips":"02102","name":"Arlington","type":"village","bbox":[-89.258053,41.466227,-89.23941,41.478535],"project_ids":["BOTB-0220"]},{"fips":"02154","name":"Arlington Heights","type":"village","bbox":[-88.026753,42.033157,-87.944761,42.153663],"project_ids":["BOTB-0266"]},{"fips":"02206","name":"Armington","type":"village","bbox":[-89.32116,40.334811,-89.305663,40.343366],"project_ids":["BOTB-0082"]},{"fips":"02258","name":"Aroma Park","type":"village","bbox":[-87.825202,41.062987,-87.772686,41.099122],"project_ids":[]},{"fips":"02342","name":"Arrowsmith","type":"village","bbox":[-88.636447,40.445497,-88.627343,40.453031],"project_ids":["BOTB-0121"]},{"fips":"02414","name":"Arthur","type":"village","bbox":[-88.491373,39.704765,-88.451737,39.729168],"project_ids":[]},{"fips":"02479","name":"Ashkum","type":"village","bbox":[-87.967313,40.869558,-87.942309,40.884977],"project_ids":["BOTB-0213"]},{"fips":"02505","name":"Ashland","type":"village","bbox":[-90.01788,39.88134,-89.994476,39.894642],"project_ids":["BOTB-0269"]},{"fips":"02531","name":"Ashley","type":"city","bbox":[-89.200018,38.316144,-89.177876,38.338438],"project_ids":["BOTB-0074","BOTB-1017"]},{"fips":"02557","name":"Ashmore","type":"village","bbox":[-88.02752,39.519181,-88.01088,39.538997],"project_ids":["BOTB-0278"]},{"fips":"02583","name":"Ashton","type":"village","bbox":[-89.235932,41.862366,-89.213014,41.874393],"project_ids":["BOTB-1001"]},{"fips":"02609","name":"Assumption","type":"city","bbox":[-89.061873,39.511677,-89.036114,39.526256],"project_ids":["BOTB-0283"]},{"fips":"02635","name":"Astoria","type":"town","bbox":[-90.366321,40.222389,-90.344428,40.232126],"project_ids":[]},{"fips":"02674","name":"Athens","type":"city","bbox":[-89.741398,39.950827,-89.704635,39.973301],"project_ids":[]},{"fips":"02726","name":"Atkinson","type":"town","bbox":[-90.025077,41.405274,-89.974396,41.435366],"project_ids":["BOTB-0266","BOTB-0268"]},{"fips":"02752","name":"Atlanta","type":"city","bbox":[-89.243266,40.252221,-89.217048,40.278969],"project_ids":["BOTB-0061"]},{"fips":"02882","name":"Atwood","type":"village","bbox":[-88.471348,39.790197,-88.451085,39.808956],"project_ids":[]},{"fips":"02921","name":"Auburn","type":"city","bbox":[-89.76366,39.54856,-89.721575,39.603084],"project_ids":["BOTB-0230"]},{"fips":"02986","name":"Augusta","type":"village","bbox":[-90.959501,40.222877,-90.940115,40.240303],"project_ids":[]},{"fips":"03012","name":"Aurora","type":"city","bbox":[-88.408212,41.679869,-88.204982,41.822179],"project_ids":["BOTB-0266","BOTB-0273"]},{"fips":"03103","name":"Ava","type":"city","bbox":[-89.509538,37.881033,-89.486537,37.895856],"project_ids":["BOTB-0077"]},{"fips":"03181","name":"Aviston","type":"village","bbox":[-89.622075,38.601761,-89.587469,38.634035],"project_ids":[]},{"fips":"03207","name":"Avon","type":"village","bbox":[-90.448159,40.655824,-90.425164,40.666635],"project_ids":["BOTB-0224"]},{"fips":"03337","name":"Baileyville","type":"cdp","bbox":[-89.598546,42.192849,-89.590605,42.207435],"project_ids":["BOTB-0249","BOTB-0280","BOTB-1006"]},{"fips":"03454","name":"Baldwin","type":"village","bbox":[-89.861051,38.1771,-89.833229,38.188206],"project_ids":["BOTB-0040"]}
840,{"fips":"03571","name":"Banner","type":"village","bbox":[-89.924596,40.503057,-89.903397,40.524607],"project_ids":["BOTB-0081"]},{"fips":"03610","name":"Bannockburn","type":"village","bbox":[-87.88978,42.181315,-87.851884,42.20382],"project_ids":["BOTB-0266"]},{"fips":"03675","name":"Bardolph","type":"village","bbox":[-90.572141,40.488384,-90.552476,40.502953],"project_ids":[]},{"fips":"03844","name":"Barrington","type":"village","bbox":[-88.159444,42.128248,-88.096705,42.168791],"project_ids":["BOTB-0266"]},{"fips":"03883","name":"Barrington Hills","type":"village","bbox":[-88.266671,42.077881,-88.136003,42.1942],"project_ids":["BOTB-0266"]},{"fips":"03948","name":"Barry","type":"city","bbox":[-91.050126,39.683493,-91.02462,39.71326],"project_ids":[]},{"fips":"03987","name":"Barstow","type":"cdp","bbox":[-90.360065,41.511424,-90.353328,41.519743],"project_ids":["BOTB-0268"]},{"fips":"04000","name":"Bartelso","type":"village","bbox":[-89.474841,38.53225,-89.44603,38.543675],"project_ids":[]},{"fips":"04013","name":"Bartlett","type":"village","bbox":[-88.269244,41.94145,-88.148897,42.015752],"project_ids":["BOTB-0241","BOTB-0266"]},{"fips":"04039","name":"Bartonville","type":"village","bbox":[-89.708721,40.605948,-89.612009,40.667875],"project_ids":["BOTB-0238","BOTB-0266"]},{"fips":"04052","name":"Basco","type":"village","bbox":[-91.205028,40.324379,-91.192126,40.330879],"project_ids":[]},{"fips":"04078","name":"Batavia","type":"city","bbox":[-88.363011,41.816438,-88.25977,41.871263],"project_ids":["BOTB-0266"]},{"fips":"04117","name":"Batchtown","type":"village","bbox":[-90.673281,39.025477,-90.635863,39.040261],"project_ids":["BOTB-0275"]},{"fips":"04156","name":"Bath","type":"village","bbox":[-90.150418,40.186268,-90.136367,40.19772],"project_ids":[]},{"fips":"04247","name":"Baylis","type":"village","bbox":[-90.91589,39.724342,-90.90307,39.735439],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"04273","name":"Bay View Gardens","type":"village","bbox":[-89.541158,40.80451,-89.512571,40.81702],"project_ids":[]},{"fips":"04303","name":"Beach Park","type":"village","bbox":[-87.894042,42.396533,-87.819345,42.457517],"project_ids":["BOTB-0266"]},{"fips":"04351","name":"Beardstown","type":"city","bbox":[-90.443992,39.96616,-90.391318,40.024387],"project_ids":[]},{"fips":"04403","name":"Beason","type":"cdp","bbox":[-89.197974,40.135798,-89.187829,40.150317],"project_ids":[]},{"fips":"04507","name":"Beaverville","type":"village","bbox":[-87.659608,40.948566,-87.648966,40.959146],"project_ids":["BOTB-0008"]},{"fips":"04533","name":"Beckemeyer","type":"village","bbox":[-89.444953,38.600885,-89.415067,38.61054],"project_ids":["BOTB-1026"]},{"fips":"04572","name":"Bedford Park","type":"village","bbox":[-87.854154,41.748209,-87.741599,41.785131],"project_ids":["BOTB-0266"]},{"fips":"04585","name":"Beecher","type":"village","bbox":[-87.640803,41.335205,-87.597294,41.369862],"project_ids":["BOTB-0241","BOTB-0266"]},{"fips":"04598","name":"Beecher City","type":"village","bbox":[-88.796258,39.17976,-88.777587,39.194334],"project_ids":[]},{"fips":"04689","name":"Belgium","type":"village","bbox":[-87.646439,40.054029,-87.62552,40.06557],"project_ids":["BOTB-0215"]},{"fips":"04715","name":"Belknap","type":"village","bbox":[-88.951722,37.316044,-88.928948,37.329315],"project_ids":[]},{"fips":"04793","name":"Belle Prairie City","type":"town","bbox":[-88.565543,38.219533,-88.547209,38.226927],"project_ids":[]},{"fips":"04806","name":"Belle Rive","type":"village","bbox":[-88.749855,38.224206,-88.731065,38.239149],"project_ids":[]},{"fips":"04845","name":"Belleville","type":"city","bbox":[-90.09829,38.446442,-89.905394,38.590509],"project_ids":["BOTB-0237","BOTB-0269","BOTB-1026"]},{"fips":"04871","name":"Bellevue","type":"village","bbox":[-89.693739,40.674088,-89.642153,40.70844],"project_ids":["BOTB-0266"]},{"fips":"04897","name":"Bellflower","type":"village","bbox":[-88.533051,40.332631,-88.517103,40.347088],"project_ids":["BOTB-0121"]},{"fips":"04936","name":"Bellmont","type":"village","bbox":[-87.916368,38.379126,-87.904961,38.387091],"project_ids":["BOTB-0005"]},{"fips":"04975","name":"Bellwood","type":"village","bbox":[-87.899371,41.8707,-87.85889,41.892923],"project_ids":["BOTB-0266"]},{"fips":"05092","name":"Belvidere","type":"city","bbox":[-88.934532,42.231405,-88.803235,42.281259],"project_ids":["BOTB-0002","BOTB-0266"]},{"fips":"05144","name":"Bement","type":"village","bbox":[-88.579998,39.915403,-88.561395,39.931752],"project_ids":[]},{"fips":"05209","name":"Benld","type":"city","bbox":[-89.814251,39.08555,-89.792587,39.100736],"project_ids":[]},{"fips":"05248","name":"Bensenville","type":"village","bbox":[-87.968763,41.930731,-87.914673,41.993383],"project_ids":["BOTB-0266"]},{"fips":"05261","name":"Benson","type":"village","bbox":[-89.124802,40.845827,-89.116149,40.856961],"project_ids":["BOTB-1018"]},{"fips":"05274","name":"Bentley","type":"town","bbox":[-91.114916,40.33441,-91.105812,40.34972],"project_ids":[]},{"fips":"05300","name":"Benton","type":"city","bbox":[-88.947536,37.982049,-88.887843,38.080102],"project_ids":["BOTB-0075","BOTB-0266"]},{"fips":"05404","name":"Berkeley","type":"village","bbox":[-87.920633,41.873114,-87.895511,41.899938],"project_ids":["BOTB-0266"]},{"fips":"05443","name":"Berlin","type":"village","bbox":[-89.912696,39.749694,-89.893913,39.764568],"project_ids":["BOTB-0261"]},{"fips":"05573","name":"Berwyn","type":"city","bbox":[-87.804199,41.821153,-87.777784,41.865392],"project_ids":[]},{"fips":"05599","name":"Bethalto","type":"village","bbox":[-90.081954,38.869924,-90.01117,38.93116],"project_ids":["BOTB-0171","BOTB-0260","BOTB-0269"]},{"fips":"05612","name":"Bethany","type":"village","bbox":[-88.755604,39.632287,-88.730216,39.654156],"project_ids":["BOTB-0173"]},{"fips":"05729","name":"Beverly","type":"cdp","bbox":[-91.001627,39.786464,-90.977942,39.804899],"project_ids":["BOTB-1013"]},{"fips":"05859","name":"Big Foot Prairie","type":"cdp","bbox":[-88.606727,42.486568,-88.596144,42.495094],"project_ids":[]},{"fips":"05898","name":"Biggsville","type":"village","bbox":[-90.872097,40.848727,-90.854706,40.857786],"project_ids":[]},{"fips":"05976","name":"Big Rock","type":"village","bbox":[-88.576374,41.731629,-88.4887
84074,41.801218],"project_ids":["BOTB-0049","BOTB-0088","BOTB-0266"]},{"fips":"06028","name":"Bingham","type":"village","bbox":[-89.218497,39.108189,-89.209117,39.116527],"project_ids":["BOTB-0243"]},{"fips":"06171","name":"Bishop Hill","type":"village","bbox":[-90.124745,41.194189,-90.110208,41.205162],"project_ids":[]},{"fips":"06184","name":"Bismarck","type":"village","bbox":[-87.620847,40.252662,-87.602023,40.267308],"project_ids":[]},{"fips":"06444","name":"Blairsville","type":"cdp","bbox":[-89.13339,37.803376,-89.114733,37.81827],"project_ids":["BOTB-0075"]},{"fips":"06470","name":"Blandinsville","type":"village","bbox":[-90.88459,40.5446,-90.850701,40.56249],"project_ids":[]},{"fips":"06565","name":"Bloomfield","type":"cdp","bbox":[-91.309603,40.011206,-91.292201,40.022585],"project_ids":["BOTB-0214"]},{"fips":"06587","name":"Bloomingdale","type":"village","bbox":[-88.140147,41.930453,-88.049767,41.969047],"project_ids":["BOTB-0266"]},{"fips":"06613","name":"Bloomington","type":"city","bbox":[-89.067715,40.429435,-88.863539,40.518523],"project_ids":[]},{"fips":"06704","name":"Blue Island","type":"city","bbox":[-87.709557,41.632796,-87.650564,41.677419],"project_ids":["BOTB-0266"]},{"fips":"06756","name":"Blue Mound","type":"village","bbox":[-89.129967,39.692957,-89.107316,39.71104],"project_ids":["BOTB-0283"]},{"fips":"06899","name":"Bluffs","type":"village","bbox":[-90.544759,39.742806,-90.525725,39.755771],"project_ids":[]},{"fips":"06964","name":"Bluford","type":"village","bbox":[-88.751882,38.305055,-88.716519,38.342699],"project_ids":["BOTB-0074"]},{"fips":"07133","name":"Bolingbrook","type":"village","bbox":[-88.179663,41.630767,-88.028444,41.735937],"project_ids":["BOTB-0266"]},{"fips":"07211","name":"Bondville","type":"village","bbox":[-88.375177,40.101847,-88.350664,40.12034],"project_ids":["BOTB-0284"]},{"fips":"07224","name":"Bone Gap","type":"village","bbox":[-88.004938,38.438639,-87.986044,38.451562],"project_ids":[]},{"fips":"07237","name":"Bonfield","type":"village","bbox":[-88.064597,41.139453,-88.043894,41.15051],"project_ids":["BOTB-0106"]},{"fips":"07263","name":"Bonnie","type":"village","bbox":[-88.919286,38.191254,-88.898187,38.21405],"project_ids":["BOTB-0074"]},{"fips":"07276","name":"Bonnie Brae","type":"cdp","bbox":[-88.04276,41.597407,-88.02631,41.603205],"project_ids":[]},{"fips":"07315","name":"Boody","type":"cdp","bbox":[-89.056406,39.753865,-89.037595,39.776195],"project_ids":["BOTB-0285"]},{"fips":"07419","name":"Boulder Hill","type":"cdp","bbox":[-88.349071,41.700314,-88.318023,41.720542],"project_ids":[]},{"fips":"07471","name":"Bourbonnais","type":"village","bbox":[-87.911435,41.146812,-87.849839,41.221585],"project_ids":["BOTB-0249","BOTB-0266","BOTB-1015"]},{"fips":"07510","name":"Bowen","type":"village","bbox":[-91.073,40.227604,-91.054735,40.23893],"project_ids":[]},{"fips":"07640","name":"Braceville","type":"village","bbox":[-88.283648,41.215529,-88.219672,41.252932],"project_ids":[]},{"fips":"07692","name":"Bradford","type":"village","bbox":[-89.667734,41.170054,-89.648108,41.184687],"project_ids":[]},{"fips":"07744","name":"Bradley","type":"village","bbox":[-87.894543,41.133264,-87.810345,41.206874],"project_ids":["BOTB-0249","BOTB-0278","BOTB-1015"]},{"fips":"07770","name":"Braidwood","type":"city","bbox":[-88.265148,41.245363,-88.18949,41.29224],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"07913","name":"Breese","type":"city","bbox":[-89.553847,38.596135,-89.49306,38.636177],"project_ids":["BOTB-0142","BOTB-1026"]},{"fips":"08186","name":"Bridgeport","type":"city","bbox":[-87.768777,38.701603,-87.747381,38.71899],"project_ids":["BOTB-0003"]},{"fips":"08225","name":"Bridgeview","type":"village","bbox":[-87.825321,41.704134,-87.789927,41.769502],"project_ids":["BOTB-0266"]},{"fips":"08264","name":"Brighton","type":"village","bbox":[-90.160049,39.028435,-90.122134,39.054305],"project_ids":["BOTB-0260"]},{"fips":"08303","name":"Brimfield","type":"village","bbox":[-89.894869,40.821378,-89.860783,40.848963],"project_ids":[]},{"fips":"08420","name":"Broadlands","type":"village","bbox":[-88.003829,39.90452,-87.991021,39.913141],"project_ids":["BOTB-0266"]},{"fips":"08446","name":"Broadview","type":"village","bbox":[-87.868111,41.845534,-87.842706,41.871468],"project_ids":["BOTB-0266"]},{"fips":"08472","name":"Broadwell","type":"village","bbox":[-89.447051,40.063427,-89.437844,40.073759],"project_ids":[]},{"fips":"08524","name":"Brocton","type":"village","bbox":[-87.940838,39.70979,-87.926444,39.720944],"project_ids":[]},{"fips":"08576","name":"Brookfield","type":"village","bbox":[-87.861581,41.805281,-87.831659,41.842605],"project_ids":["BOTB-0266"]},{"fips":"08667","name":"Brooklyn","type":"village","bbox":[-90.177486,38.646246,-90.154314,38.66028],"project_ids":["BOTB-0269"]},{"fips":"08706","name":"Brookport","type":"city","bbox":[-88.639691,37.118204,-88.620788,37.141863],"project_ids":["BOTB-0199"]},{"fips":"08875","name":"Broughton","type":"village","bbox":[-88.476166,37.925098,-88.44849,37.94377],"project_ids":[]},{"fips":"08953","name":"Browning","type":"village","bbox":[-90.378803,40.118626,-90.367277,40.131544],"project_ids":["BOTB-0214"]},{"fips":"08979","name":"Browns","type":"village","bbox":[-87.987832,38.372023,-87.976872,38.381489],"project_ids":[]},{"fips":"08992","name":"Brownstown","type":"village","bbox":[-88.965131,38.983347,-88.945065,39.002086],"project_ids":["BOTB-0269"]},{"fips":"09148","name":"Brussels","type":"village","bbox":[-90.604543,38.941446,-90.578761,38.953718],"project_ids":["BOTB-0275"]},{"fips":"09161","name":"Bryant","type":"village","bbox":[-90.104602,40.459796,-90.089369,40.470708],"project_ids":[]},{"fips":"09304","name":"Buckingham","type":"village","bbox":[-88.181516,41.040081,-88.16971,41.05465],"project_ids":[]},{"fips":"09317","name":"Buckley","type":"village","bbox":[-88.042953,40.590227,-88.030405,40.602693],"project_ids":[]},{"fips":"09330","name":"Buckner","type":"village","bbox":[-89.02726,37.973742,-89.002318,37.987017],"project_ids":["BOTB-0075"]},{"fips":"09356","name":"Buda","type":"village","bbox":[-89.689071,41.321687,-89.667745,41.336356],"project_ids":["BOTB-0266"]},{"fips":"09434","name":"Buffalo","type":"village","bbox":[-89.41555,39.846143,-89.40272,39.854516],"project_ids":["BOTB-0135"]},{"fips":"09447","name":"Buffalo Grove","type":"village","bbox":[-87.994985,42.129702,-87.910547,42.210328],"project_ids":["BOTB-0266"]},{"fips":"09499","name":"Buffalo Prairie","type":"cdp","bbox":[-90.87909,41.330395,-90.81696,41.353411],"project_ids":[]},{"fips":"09531","name":"Bull Valley","type":"village","bbox":[-88.416618,42.281836,-88.31585,42.369226],"project_ids":["BOTB-0195","BOTB-0266"]},{"fips":"09538","name":"Bulpitt","type":"village","bbox":[-89.42827,39.589791,-89.423284,39.593834],"project_ids":[]},{"fips":"09551","name":"Buncombe","type":"village","bbox":[-88.984256,37.456318,-88.965505,37.480736],"project_ids":["BOTB-0001"]},{"fips":"09577","name":"Bunker Hill","type":"city","bbox":[-89.964635,39.026795,-89.940407,39.056171],"project_ids":["BOTB-0260"]},{"fips":"09642","name":"Burbank","type":"city","bbox":[-87.799814,41.733529,-87.740928,41.756561],"project_ids":["BOTB-0266"]},{"fips":"09681","name":"Bureau Junction","type":"village","bbox":[-89.378706,41.276812,-89.354
840148,41.305837],"project_ids":["BOTB-0181"]},{"fips":"09759","name":"Burlington","type":"village","bbox":[-88.587316,42.011092,-88.513773,42.066781],"project_ids":["BOTB-0037","BOTB-0266","BOTB-1003"]},{"fips":"09798","name":"Burnham","type":"village","bbox":[-87.564072,41.629925,-87.524997,41.644749],"project_ids":["BOTB-0266"]},{"fips":"09889","name":"Burnt Prairie","type":"village","bbox":[-88.261318,38.248794,-88.253506,38.252811],"project_ids":[]},{"fips":"09980","name":"Burr Ridge","type":"village","bbox":[-87.945263,41.712419,-87.886318,41.789571],"project_ids":["BOTB-0266"]},{"fips":"10006","name":"Burton","type":"cdp","bbox":[-91.254314,39.899962,-91.245003,39.915567],"project_ids":["BOTB-0190"]},{"fips":"10045","name":"Burtons Bridge","type":"cdp","bbox":[-88.233567,42.274497,-88.22633,42.281548],"project_ids":["BOTB-0060"]},{"fips":"10084","name":"Bush","type":"village","bbox":[-89.138123,37.834908,-89.121553,37.848277],"project_ids":["BOTB-0075"]},{"fips":"10110","name":"Bushnell","type":"city","bbox":[-90.532903,40.54097,-90.482638,40.567003],"project_ids":["BOTB-0224"]},{"fips":"10149","name":"Butler","type":"village","bbox":[-89.539119,39.1917,-89.525074,39.206333],"project_ids":["BOTB-0264"]},{"fips":"10240","name":"Byron","type":"city","bbox":[-89.298035,42.094683,-89.233025,42.152684],"project_ids":["BOTB-0266"]},{"fips":"10292","name":"Cabery","type":"village","bbox":[-88.21063,40.991419,-88.197458,41.003189],"project_ids":[]},{"fips":"10305","name":"Cable","type":"cdp","bbox":[-90.519207,41.268504,-90.493074,41.289473],"project_ids":["BOTB-0224","BOTB-0266"]},{"fips":"10373","name":"Cahokia Heights","type":"city","bbox":[-90.231097,38.54273,-90.06569,38.609272],"project_ids":["BOTB-0269","BOTB-1026"]},{"fips":"10383","name":"Cairo","type":"city","bbox":[-89.231458,36.970298,-89.132915,37.088868],"project_ids":["BOTB-0227"]},{"fips":"10422","name":"Caledonia","type":"village","bbox":[-88.910428,42.362902,-88.880508,42.378149],"project_ids":[]},{"fips":"10448","name":"Calhoun","type":"village","bbox":[-88.052399,38.643639,-88.035747,38.658812],"project_ids":["BOTB-0269"]},{"fips":"10487","name":"Calumet City","type":"city","bbox":[-87.578559,41.581361,-87.525052,41.644729],"project_ids":["BOTB-0266"]},{"fips":"10513","name":"Calumet Park","type":"village","bbox":[-87.670796,41.655107,-87.641547,41.677544],"project_ids":["BOTB-0266"]},{"fips":"10591","name":"Camargo","type":"village","bbox":[-88.178949,39.791716,-88.155242,39.806551],"project_ids":[]},{"fips":"10630","name":"Cambria","type":"village","bbox":[-89.151642,37.760101,-89.099038,37.796231],"project_ids":["BOTB-0075"]},{"fips":"10643","name":"Cambridge","type":"village","bbox":[-90.208286,41.283113,-90.17507,41.310569],"project_ids":["BOTB-0268"]},{"fips":"10695","name":"Camden","type":"village","bbox":[-90.782539,40.147074,-90.76335,40.159279],"project_ids":["BOTB-1002"]},{"fips":"10747","name":"Cameron","type":"cdp","bbox":[-90.526039,40.882246,-90.508619,40.895185],"project_ids":["BOTB-0224"]},{"fips":"10773","name":"Campbell Hill","type":"village","bbox":[-89.558706,37.92623,-89.540224,37.938567],"project_ids":["BOTB-0269"]},{"fips":"10786","name":"Campbell's Island","type":"cdp","bbox":[-90.441435,41.53219,-90.418657,41.551024],"project_ids":[]},{"fips":"10877","name":"Camp Point","type":"village","bbox":[-91.078256,40.019113,-91.050011,40.053707],"project_ids":["BOTB-0266"]},{"fips":"10906","name":"Campton Hills","type":"village","bbox":[-88.477538,41.896819,-88.37496,42.003936],"project_ids":["BOTB-0266","BOTB-1003"]},{"fips":"10916","name":"Campus","type":"village","bbox":[-88.311333,41.021447,-88.304968,41.029513],"project_ids":[]},{"fips":"10936","name":"Candlewick Lake","type":"cdp","bbox":[-88.889574,42.341847,-88.851441,42.367402],"project_ids":[]},{"fips":"11007","name":"Canton","type":"city","bbox":[-90.085797,40.531437,-89.969763,40.600745],"project_ids":["BOTB-0036","BOTB-0216","BOTB-0266"]},{"fips":"11033","name":"Cantrall","type":"village","bbox":[-89.683517,39.931561,-89.674002,39.938972],"project_ids":[]},{"fips":"11124","name":"Capron","type":"village","bbox":[-88.749787,42.393074,-88.725353,42.404225],"project_ids":["BOTB-0249"]},{"fips":"11150","name":"Carbon Cliff","type":"village","bbox":[-90.407951,41.481849,-90.371472,41.514535],"project_ids":[]},{"fips":"11163","name":"Carbondale","type":"city","bbox":[-89.277175,37.679986,-89.148624,37.767703],"project_ids":["BOTB-0003","BOTB-0077","BOTB-0222","BOTB-0269"]},{"fips":"11176","name":"Carbon Hill","type":"village","bbox":[-88.304899,41.293921,-88.295181,41.299747],"project_ids":[]},{"fips":"11202","name":"Carlinville","type":"city","bbox":[-89.899756,39.245758,-89.846218,39.300373],"project_ids":["BOTB-0269"]},{"fips":"11215","name":"Carlock","type":"village","bbox":[-89.139196,40.575777,-89.119724,40.589841],"project_ids":["BOTB-0216"]},{"fips":"11228","name":"Carlyle","type":"city","bbox":[-89.405568,38.602848,-89.343377,38.646424],"project_ids":["BOTB-0243"]},{"fips":"11267","name":"Carman","type":"cdp","bbox":[-91.06604,40.727818,-91.056335,40.742859],"project_ids":["BOTB-0224"]},{"fips":"11293","name":"Carmi","type":"city","bbox":[-88.213002,38.06886,-88.139321,38.102413],"project_ids":["BOTB-0068"]},{"fips":"11332","name":"Carol Stream","type":"village","bbox":[-88.174862,41.888027,-88.087651,41.942805],"project_ids":["BOTB-0266"]}
840,{"fips":"11358","name":"Carpentersville","type":"village","bbox":[-88.359497,42.101801,-88.241297,42.148802],"project_ids":["BOTB-0010","BOTB-0266"]},{"fips":"11397","name":"Carrier Mills","type":"village","bbox":[-88.642013,37.680071,-88.615843,37.698365],"project_ids":[]},{"fips":"11462","name":"Carrollton","type":"city","bbox":[-90.418012,39.273367,-90.393907,39.316245],"project_ids":["BOTB-0003"]},{"fips":"11514","name":"Carterville","type":"city","bbox":[-89.148319,37.737843,-89.044689,37.797669],"project_ids":["BOTB-0003","BOTB-0075","BOTB-0225","BOTB-0269"]},{"fips":"11527","name":"Carthage","type":"city","bbox":[-91.159632,40.401272,-91.101599,40.428121],"project_ids":[]},{"fips":"11592","name":"Cary","type":"village","bbox":[-88.291074,42.190166,-88.211066,42.240446],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"11618","name":"Casey","type":"city","bbox":[-88.016818,39.290543,-87.968324,39.328054],"project_ids":["BOTB-0266"]},{"fips":"11644","name":"Caseyville","type":"village","bbox":[-90.079747,38.598291,-89.976142,38.652096],"project_ids":["BOTB-0259","BOTB-0269"]},{"fips":"11774","name":"Catlin","type":"village","bbox":[-87.719824,40.05778,-87.696684,40.076394],"project_ids":["BOTB-0215"]},{"fips":"11826","name":"Cave-In-Rock","type":"village","bbox":[-88.171877,37.465759,-88.159982,37.475747],"project_ids":[]},{"fips":"11982","name":"Cedar Point","type":"village","bbox":[-89.135748,41.257601,-89.116326,41.272815],"project_ids":["BOTB-0220","BOTB-0235"]},{"fips":"12008","name":"Cedarville","type":"village","bbox":[-89.642836,42.368495,-89.628978,42.38311],"project_ids":["BOTB-0056"]},{"fips":"12151","name":"Central City","type":"village","bbox":[-89.134223,38.540045,-89.120257,38.558338],"project_ids":[]},{"fips":"12164","name":"Centralia","type":"city","bbox":[-89.175645,38.463629,-89.063264,38.548746],"project_ids":["BOTB-0239","BOTB-0250","BOTB-1017"]},{"fips":"12268","name":"Cerro Gordo","type":"village","bbox":[-88.7454,39.879885,-88.725718,39.896183],"project_ids":[]},{"fips":"12294","name":"Chadwick","type":"village","bbox":[-89.893489,42.007528,-89.882993,42.0219],"project_ids":["BOTB-0220"]},{"fips":"12385","name":"Champaign","type":"city","bbox":[-88.333345,40.061887,-88.221223,40.16398],"project_ids":["BOTB-0266","BOTB-0284"]},{"fips":"12450","name":"Chandlerville","type":"village","bbox":[-90.1625,40.037865,-90.138762,40.057223],"project_ids":[]},{"fips":"12476","name":"Channahon","type":"village","bbox":[-88.383655,41.376392,-88.172439,41.480589],"project_ids":["BOTB-0266"]},{"fips":"12489","name":"Channel Lake","type":"cdp","bbox":[-88.176893,42.466013,-88.130047,42.495604],"project_ids":["BOTB-0266"]},{"fips":"12528","name":"Chapin","type":"village","bbox":[-90.412132,39.759131,-90.393043,39.774165],"project_ids":["BOTB-0269"]},{"fips":"12567","name":"Charleston","type":"city","bbox":[-88.282601,39.454851,-88.116387,39.524493],"project_ids":["BOTB-0140","BOTB-0266"]},{"fips":"12684","name":"Chatham","type":"village","bbox":[-89.728371,39.632766,-89.643264,39.703309],"project_ids":["BOTB-0230","BOTB-0269"]},{"fips":"12710","name":"Chatsworth","type":"town","bbox":[-88.314759,40.703257,-88.274791,40.768742],"project_ids":[]},{"fips":"12801","name":"Chebanse","type":"village","bbox":[-87.921923,40.986787,-87.903657,41.010234],"project_ids":["BOTB-0008"]},{"fips":"12879","name":"Chemung","type":"cdp","bbox":[-88.672266,42.412502,-88.657624,42.421085],"project_ids":["BOTB-0266"]},{"fips":"12931","name":"Chenoa","type":"city","bbox":[-88.747592,40.719945,-88.706031,40.756318],"project_ids":["BOTB-0278"]},{"fips":"12970","name":"Cherry","type":"village","bbox":[-89.224489,41.419123,-89.203643,41.437437],"project_ids":["BOTB-0220"]},{"fips":"13074","name":"Cherry Valley","type":"village","bbox":[-89.02361,42.158878,-88.930521,42.274072],"project_ids":["BOTB-0220","BOTB-0228","BOTB-0266"]},{"fips":"13139","name":"Chester","type":"city","bbox":[-89.873162,37.888748,-89.782354,37.939864],"project_ids":["BOTB-0004","BOTB-0182"]},{"fips":"13165","name":"Chesterfield","type":"village","bbox":[-90.073786,39.251316,-90.059726,39.261859],"project_ids":["BOTB-0275"]},{"fips":"13230","name":"Chestnut","type":"cdp","bbox":[-89.191831,40.051894,-89.182398,40.055581],"project_ids":[]},{"fips":"14000","name":"Chicago","type":"city","bbox":[-87.940097,41.644286,-87.523661,42.023135],"project_ids":["BOTB-0266"]},{"fips":"14026","name":"Chicago Heights","type":"city","bbox":[-87.674425,41.481492,-87.59686,41.543357],"project_ids":["BOTB-0266"]},{"fips":"14065","name":"Chicago Ridge","type":"village","bbox":[-87.798513,41.69034,-87.759205,41.720345],"project_ids":["BOTB-0266"]},{"fips":"14117","name":"Chillicothe","type":"city","bbox":[-89.534096,40.885854,-89.465454,40.938894],"project_ids":[]},{"fips":"14273","name":"Chrisman","type":"city","bbox":[-87.684913,39.79256,-87.660918,39.813126],"project_ids":[]},{"fips":"14286","name":"Christopher","type":"city","bbox":[-89.078656,37.953649,-89.034168,37.981862],"project_ids":["BOTB-0075"]},{"fips":"14351","name":"Cicero","type":"town","bbox":[-87.779048,41.821525,-87.738654,41.86596],"project_ids":["BOTB-0266"]},{"fips":"14442","name":"Cisco","type":"village","bbox":[-88.732254,40.006868,-88.719756,40.014976],"project_ids":["BOTB-0027"]},{"fips":"14455","name":"Cisne","type":"village","bbox":[-88.44422,38.504686,-88.430037,38.526552],"project_ids":[]},{"fips":"14468","name":"Cissna Park","type":"village","bbox":[-87.901937,40.558724,-87.881557,40.572561],"project_ids":[]},{"fips":"14533","name":"Claremont","type":"village","bbox":[-87.984314,38.710042,-87.965571,38.725014],"project_ids":["BOTB-0067"]},{"fips":"14572","name":"Clarendon Hills","type":"village","bbox":[-87.970734,41.781549,-87.946428,41.81073],"project_ids":["BOTB-0266"]},{"fips":"14715","name":"Clay City","type":"village","bbox":[-88.36709,38.675608,-88.329159,38.694734],"project_ids":[]},{"fips":"14767","name":"Clayton","type":"village","bbox":[-90.969856,40.021968,-90.948173,40.036748],"project_ids":[]},{"fips":"14923","name":"Cleveland","type":"village","bbox":[-90.32466,41.498124,-90.30913,41.509639],"project_ids":[]},{"fips":"14936","name":"Clifton","type":"village","bbox":[-87.94564,40.921929,-87.924027,40.947184],"project_ids":["BOTB-0008"]},{"fips":"15001","name":"Clinton","type":"city","bbox":[-88.994098,40.131737,-88.936498,40.165661],"project_ids":["BOTB-0003","BOTB-0266","BOTB-0278"]},{"fips":"15170","name":"Coal City","type":"village","bbox":[-88.314271,41.245672,-88.242461,41.331792],"project_ids":[]},{"fips":"15209","name":"Coalton","type":"village","bbox":[-89.313646,39.27772,-89.293137,39.290669],"project_ids":[]},{"fips":"15235","name":"Coal Valley","type":"village","bbox":[-90.478393,41.416797,-90.400377,41.460039],"project_ids":["BOTB-0224"]},{"fips":"15261","name":"Coatsburg","type":"village","bbox":[-91.165866,40.029496,-91.157228,40.036611],"project_ids":[]},{"fips":"15300","name":"Cobden","type":"village","bbox":[-89.266805,37.522319,-89.244595,37.54626],"project_ids":["BOTB-0269"]},{"fips":"15352","name":"Coffeen","type":"city","bbox":[-89.402006,39.078006,-89.379797,39.096769],"project_ids":["BOTB-0243"]},{"fips":"15378","name":"Colchester","type":"city","bbox":[-90.803212,40.410279,-90.777137,40.435293],"project_ids":[]},{"fips":"15469","name":"Coleta","type":"village","bbox":[-89.807004,41.897133,-89.792549,41.905757],"project_ids":[]},{"fips":"15495","name":"Colfax","type":"village","bbox":[-88.623701,40.558763,-88.605983,40.573318],"project_ids":[]},{"fips":"15599","name":"Collinsville","type":"city","bbox":[-90.073148,38.643679,-89.947134,38.723616],"project_ids":["BOTB-0079","BOTB-0171","BOTB-0259","BOTB-0269"]},{"fips":"15664","name":"Colona","type":"city","bbox":[-90.39295,41.440966,-90.319456,41.491032],"project_ids":[]},{"fips":"15807","name":"Colp","type":"village","bbox":[-89.082419,37.803632,-89.071738,37.811254],"project_ids":[]},{"fips":"15833","name":"Columbia","type":"city","bbox":[-90.270646,38.420147,-90.168022,38.48761],"project_ids":["BOTB-1026"]},{"fips":"15846","name":"Columbus","type":"village","bbox":[-91.150921,39.985014,-91.140514,39.991252],"project_ids":[]},{"fips":"15950","name":"Como","type":"cdp","bbox":[-89.783451,41.756551,-89.745428,41.772322],"project_ids":["BOTB-0220"]},{"fips":"15989","name":"Compton","type":"village","bbox":[-89.110696,41.692226,-89.072008,41.696159],"project_ids":["BOTB-0281"]},{"fips":"16054","name":"Concord","type":"village","bbox":[-90.378747,39.806929,-90.359238,39.828272],"project_ids":["BOTB-0269"]},{"fips":"16119","name":"Congerville","type":"village","bbox":[-89.222353,40.608373,
840-89.192093,40.624621],"project_ids":["BOTB-0216","BOTB-0266"]},{"fips":"16210","name":"Cooksville","type":"village","bbox":[-88.721632,40.537511,-88.707317,40.546468],"project_ids":["BOTB-0213"]},{"fips":"16301","name":"Coral","type":"cdp","bbox":[-88.567822,42.215787,-88.563908,42.219933],"project_ids":[]},{"fips":"16366","name":"Cordova","type":"village","bbox":[-90.330975,41.664526,-90.310334,41.692164],"project_ids":[]},{"fips":"16405","name":"Cornell","type":"village","bbox":[-88.740179,40.985842,-88.71963,40.99719],"project_ids":["BOTB-0218"]},{"fips":"16431","name":"Cornland","type":"cdp","bbox":[-89.405388,39.934681,-89.394793,39.940049],"project_ids":[]},{"fips":"16470","name":"Cortland","type":"town","bbox":[-88.707163,41.901222,-88.63531,41.949564],"project_ids":["BOTB-0037","BOTB-0266"]},{"fips":"16613","name":"Coulterville","type":"village","bbox":[-89.612954,38.176217,-89.59664,38.190619],"project_ids":["BOTB-0058","BOTB-0248"]},{"fips":"16691","name":"Country Club Hills","type":"city","bbox":[-87.752395,41.535105,-87.701764,41.586451],"project_ids":["BOTB-0266"]},{"fips":"16873","name":"Countryside","type":"city","bbox":[-87.896783,41.753605,-87.858572,41.798402],"project_ids":["BOTB-0266","BOTB-0272"]},{"fips":"17055","name":"Cowden","type":"village","bbox":[-88.866638,39.243678,-88.85221,39.255908],"project_ids":["BOTB-0139"]},{"fips":"17077","name":"Coyne Center","type":"cdp","bbox":[-90.577961,41.391725,-90.548864,41.410353],"project_ids":["BOTB-0224"]},{"fips":"17094","name":"Crab Orchard","type":"cdp","bbox":[-88.818196,37.716949,-88.788957,37.732721],"project_ids":["BOTB-0075"]},{"fips":"17185","name":"Crainville","type":"village","bbox":[-89.072787,37.740152,-89.040052,37.764382],"project_ids":["BOTB-0075","BOTB-0269"]},{"fips":"17289","name":"Creal Springs","type":"city","bbox":[-88.846477,37.611997,-88.827772,37.628222],"project_ids":[]},{"fips":"17406","name":"Crescent City","type":"village","bbox":[-87.864042,40.766171,-87.849509,40.778097],"project_ids":[]},{"fips":"17458","name":"Crest Hill","type":"city","bbox":[-88.148397,41.540349,-88.076323,41.59623],"project_ids":["BOTB-0266"]},{"fips":"17471","name":"Creston","type":"village","bbox":[-88.990678,41.920447,-88.951324,41.945937],"project_ids":["BOTB-0266","BOTB-1001"]},{"fips":"17497","name":"Crestwood","type":"village","bbox":[-87.763007,41.631285,-87.707205,41.662106],"project_ids":["BOTB-0266"]},{"fips":"17523","name":"Crete","type":"village","bbox":[-87.670673,41.391436,-87.569444,41.470046],"project_ids":["BOTB-0266"]},{"fips":"17549","name":"Creve Coeur","type":"village","bbox":[-89.637067,40.622138,-89.574355,40.660762],"project_ids":["BOTB-0266"]},{"fips":"17783","name":"Crossville","type":"village","bbox":[-88.075022,38.154422,-88.050181,38.17051],"project_ids":["BOTB-0269"]},{"fips":"17887","name":"Crystal Lake","type":"city","bbox":[-88.423301,42.190063,-88.27181,42.276937],"project_ids":["BOTB-0010","BOTB-0240","BOTB-0266","BOTB-1020"]},{"fips":"17939","name":"Crystal Lawns","type":"cdp","bbox":[-88.18097,41.565291,-88.144995,41.573778],"project_ids":[]},{"fips":"17991","name":"Cuba","type":"city","bbox":[-90.203688,40.487136,-90.185124,40.498892],"project_ids":[]},{"fips":"18030","name":"Cullom","type":"village","bbox":[-88.277363,40.874245,-88.261359,40.885288],"project_ids":[]},{"fips":"18147","name":"Curran","type":"village","bbox":[-89.799701,39.730756,-89.761234,39.751494],"project_ids":["BOTB-0261"]},{"fips":"18212","name":"Custer Park","type":"cdp","bbox":[-88.133382,41.238014,-88.124114,41.249179],"project_ids":[]},{"fips":"18225","name":"Cutler","type":"village","bbox":[-89.574686,38.027692,-89.560611,38.040729],"project_ids":["BOTB-0051"]},{"fips":"18251","name":"Cypress","type":"village","bbox":[-89.025453,37.357814,-89.011891,37.372978],"project_ids":["BOTB-0227"]},{"fips":"18303","name":"Dahlgren","type":"village","bbox":[-88.694359,38.190629,-88.675365,38.205357],"project_ids":[]},{"fips":"18342","name":"Dakota","type":"village","bbox":[-89.532731,42.383621,-89.520086,42.391534],"project_ids":["BOTB-0256"]},{"fips":"18420","name":"Dallas City","type":"city","bbox":[-91.195139,40.62332,-91.145983,40.652723],"project_ids":["BOTB-0266"]},{"fips":"18446","name":"Dalton City","type":"village","bbox":[-88.812277,39.708055,-88.799545,39.726022],"project_ids":["BOTB-0173"]},{"fips":"18459","name":"Dalzell","type":"village","bbox":[-89.199471,41.3412
84069,-89.163013,41.364202],"project_ids":["BOTB-0147"]},{"fips":"18472","name":"Damiansville","type":"village","bbox":[-89.635127,38.502714,-89.593114,38.518873],"project_ids":["BOTB-0142"]},{"fips":"18485","name":"Dana","type":"village","bbox":[-88.955374,40.953052,-88.945511,40.960406],"project_ids":["BOTB-0220"]},{"fips":"18498","name":"Danforth","type":"village","bbox":[-87.98572,40.810825,-87.969611,40.828612],"project_ids":[]},{"fips":"18537","name":"Danvers","type":"village","bbox":[-89.187126,40.523042,-89.163095,40.537809],"project_ids":["BOTB-0061"]},{"fips":"18563","name":"Danville","type":"city","bbox":[-87.665219,40.103392,-87.531696,40.20449],"project_ids":["BOTB-0215","BOTB-0266"]},{"fips":"18628","name":"Darien","type":"city","bbox":[-88.030557,41.700255,-87.944915,41.76862],"project_ids":[]},{"fips":"18641","name":"Darmstadt","type":"cdp","bbox":[-89.73172,38.317322,-89.725861,38.320709],"project_ids":["BOTB-1026"]},{"fips":"18706","name":"Davis","type":"village","bbox":[-89.428306,42.415853,-89.4084,42.426406],"project_ids":["BOTB-0249"]},{"fips":"18719","name":"Davis Junction","type":"village","bbox":[-89.114772,42.085202,-89.071036,42.150812],"project_ids":["BOTB-0220","BOTB-0233","BOTB-0249","BOTB-0281"]},{"fips":"18745","name":"Dawson","type":"village","bbox":[-89.472936,39.846372,-89.453953,39.860873],"project_ids":["BOTB-0135"]},{"fips":"18771","name":"Dayton","type":"cdp","bbox":[-88.816576,41.376685,-88.778748,41.398002],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"18823","name":"Decatur","type":"city","bbox":[-89.032574,39.786777,-88.803133,39.925],"project_ids":["BOTB-0027","BOTB-0172","BOTB-0173","BOTB-0285"]},{"fips":"18940","name":"Deer Creek","type":"village","bbox":[-89.339355,40.622564,-89.322928,40.638505],"project_ids":[]},{"fips":"18992","name":"Deerfield","type":"village","bbox":[-87.884029,42.145642,-87.821065,42.189156],"project_ids":["BOTB-0266"]},{"fips":"19031","name":"Deer Grove","type":"village","bbox":[-89.694249,41.60429,-89.679746,41.613719],"project_ids":["BOTB-0220"]},{"fips":"19083","name":"Deer Park","type":"village","bbox":[-88.128484,42.152111,-88.038571,42.184943],"project_ids":["BOTB-0266"]},{"fips":"19161","name":"DeKalb","type":"city","bbox":[-88.797425,41.878323,-88.693654,41.97176],"project_ids":["BOTB-0037","BOTB-0266"]},{"fips":"19200","name":"De Land","type":"village","bbox":[-88.649977,40.115331,-88.631126,40.127141],"project_ids":["BOTB-0278"]},{"fips":"19226","name":"Delavan","type":"city","bbox":[-89.566537,40.363417,-89.523726,40.379576],"project_ids":[]},{"fips":"19499","name":"De Pue","type":"village","bbox":[-89.325612,41.319099,-89.267383,41.342367],"project_ids":[]},{"fips":"19616","name":"De Soto","type":"village","bbox":[-89.243442,37.810194,-89.210855,37.822655],"project_ids":["BOTB-0077"]},{"fips":"19642","name":"Des Plaines","type":"city","bbox":[-87.950074,41.995342,-87.859967,42.079829],"project_ids":["BOTB-0266"]},{"fips":"19681","name":"Detroit","type":"village","bbox":[-90.680716,39.616435,-90.671256,39.623832],"project_ids":["BOTB-0266"]},{"fips":"19746","name":"Dewey","type":"cdp","bbox":[-88.291014,40.317173,-88.278128,40.321133],"project_ids":[]},{"fips":"19798","name":"De Witt","type":"village","bbox":[-88.787817,40.177755,-88.78288,40.191915],"project_ids":[]},{"fips":"19837","name":"Diamond","type":"village","bbox":[-88.269533,41.274033,-88.226737,41.295841],"project_ids":[]},{"fips":"19915","name":"Dieterich","type":"village","bbox":[-88.398092,39.04564,-88.365711,39.071529],"project_ids":[]},{"fips":"20045","name":"Divernon","type":"village","bbox":[-89.660606,39.553093,-89.639579,39.600487],"project_ids":["BOTB-0230","BOTB-0269"]},{"fips":"20123","name":"Dix","type":"village","bbox":[-88.956195,38.432445,-88.927738,38.458648],"project_ids":[]},{"fips":"20149","name":"Dixmoor","type":"village","bbox":[-87.679505,41.622648,-87.656021,41.642415],"project_ids":["BOTB-0266"]},{"fips":"20162","name":"Dixon","type":"city","bbox":[-89.515377,41.80161,-89.438933,41.885711],"project_ids":["BOTB-0042","BOTB-0097"]},{"fips":"20292","name":"Dolton","type":"village","bbox":[-87.633973,41.606693,-87.573361,41.644732],"project_ids":["BOTB-0266"]},{"fips":"20305","name":"Dongola","type":"village","bbox":[-89.175538,37.35218,-89.15537,37.369691],"project_ids":["BOTB-0222"]},{"fips":"20318","name":"Donnellson","type":"village","bbox":[-89.487402,39.023918,-89.468613,39.035191],"project_ids":["BOTB-0168","BOTB-0264"]},{"fips":"20331","name":"Donovan","type":"village","bbox":[-87.621,40.878015,-87.605379,40.888821],"project_ids":[]},{"fips":"20370","name":"Dorchester","type":"village","bbox":[-89.894943,39.078176,-89.875957,39.09272],"project_ids":["BOTB-0260"]},{"fips":"20526","name":"Dover","type":"village","bbox":[-89.403085,41.429407,-89.388646,41.440011],"project_ids":["BOTB-0220"]},{"fips":"20565","name":"Dowell","type":"village","bbox":[-89.243412,37.932628,-89.23329,37.94655],"project_ids":[]},{"fips":"20591","name":"Downers Grove","type":"village","bbox":[-88.05745,41.743853,-87.983354,41.839078],"project_ids":["BOTB-0266"]},{"fips":"20643","name":"Downs","type":"village","bbox":[-88.920412,40.377907,-88.858095,40.421926],"project_ids":[]},{"fips":"20890","name":"Du Bois","type":"village","bbox":[-89.231537,38.213928,-89.20275,38.228766],"project_ids":["BOTB-1017"]},{"fips":"21020","name":"Dundas","type":"cdp","bbox":[-88.094564,38.826355,-88.075846,38.841576],"project_ids":["BOTB-0269"]},{"fips":"21098","name":"Dunfermline","type":"village","bbox":[-90.037119,40.48738,-90.029673,40.495192],"project_ids":[]}
840,{"fips":"21176","name":"Dunlap","type":"village","bbox":[-89.703065,40.824097,-89.648993,40.867914],"project_ids":["BOTB-0242","BOTB-0245","BOTB-0266"]},{"fips":"21254","name":"Dupo","type":"village","bbox":[-90.251996,38.48342,-90.186193,38.548176],"project_ids":["BOTB-1026"]},{"fips":"21267","name":"Du Quoin","type":"city","bbox":[-89.264385,37.970939,-89.205761,38.031506],"project_ids":["BOTB-0077"]},{"fips":"21280","name":"Durand","type":"village","bbox":[-89.341655,42.423775,-89.303037,42.442504],"project_ids":["BOTB-0282"]},{"fips":"21358","name":"Dwight","type":"village","bbox":[-88.451398,41.079172,-88.391479,41.120227],"project_ids":["BOTB-0266"]},{"fips":"21410","name":"Eagarville","type":"village","bbox":[-89.792902,39.104581,-89.774278,39.119192],"project_ids":["BOTB-0243"]},{"fips":"21475","name":"Eagle Lake","type":"cdp","bbox":[-87.5593,41.35962,-87.549424,41.382313],"project_ids":["BOTB-0220"]},{"fips":"21540","name":"Earlville","type":"city","bbox":[-88.937841,41.579146,-88.904342,41.598275],"project_ids":[]},{"fips":"21553","name":"East Alton","type":"village","bbox":[-90.149161,38.858085,-90.074082,38.909382],"project_ids":["BOTB-0266"]},{"fips":"21579","name":"East Brooklyn","type":"village","bbox":[-88.269436,41.17091,-88.262,41.174418],"project_ids":[]},{"fips":"21605","name":"East Cape Girardeau","type":"village","bbox":[-89.505319,37.288301,-89.468569,37.303072],"project_ids":["BOTB-0227"]},{"fips":"21618","name":"East Carondelet","type":"village","bbox":[-90.255063,38.517898,-90.225074,38.553495],"project_ids":["BOTB-1026"]},{"fips":"21683","name":"East Dubuque","type":"city","bbox":[-90.650283,42.460958,-90.585359,42.508302],"project_ids":["BOTB-0220"]},{"fips":"21696","name":"East Dundee","type":"village","bbox":[-88.284695,42.071471,-88.230141,42.114465],"project_ids":["BOTB-0266"]},{"fips":"21826","name":"East Galesburg","type":"village","bbox":[-90.326343,40.932976,-90.297968,40.957248],"project_ids":["BOTB-0224"]},{"fips":"21852","name":"East Gillespie","type":"village","bbox":[-89.820832,39.131105,-89.801909,39.144694],"project_ids":[]},{"fips":"21904","name":"East Hazel Crest","type":"village","bbox":[-87.665532,41.57172,-87.630601,41.582343],"project_ids":["BOTB-0266"]},{"fips":"22021","name":"East Lynn","type":"cdp","bbox":[-87.805184,40.462041,-87.795493,40.47302],"project_ids":[]},{"fips":"22073","name":"East Moline","type":"city","bbox":[-90.46295,41.47864,-90.275765,41.550279],"project_ids":["BOTB-0212","BOTB-0224","BOTB-0266","BOTB-0268"]},{"fips":"22151","name":"Easton","type":"village","bbox":[-89.850887,40.228857,-89.828795,40.234689],"project_ids":[]},{"fips":"22164","name":"East Peoria","type":"city","bbox":[-89.616369,40.619266,-89.474812,40.719065],"project_ids":["BOTB-0266"]},{"fips":"22255","name":"East St. Louis","type":"city","bbox":[-90.186665,38.578753,-90.041694,38.642668],"project_ids":["BOTB-0269"]},{"fips":"22398","name":"Eddyville","type":"village","bbox":[-88.589103,37.493304,-88.579856,37.506677],"project_ids":[]},{"fips":"22567","name":"Edgewood","type":"village","bbox":[-88.67354,38.914777,-88.654436,38.929623],"project_ids":["BOTB-0007"]},{"fips":"22619","name":"Edgington","type":"cdp","bbox":[-90.773373,41.379417,-90.754038,41.394362],"project_ids":[]},{"fips":"22645","name":"Edinburg","type":"village","bbox":[-89.401958,39.650675,-89.377865,39.664062],"project_ids":[]},{"fips":"22697","name":"Edwardsville","type":"city","bbox":[-90.085985,38.760207,-89.883583,38.825357],"project_ids":["BOTB-0171"]},{"fips":"22736","name":"Effingham","type":"city","bbox":[-88.60389,39.068898,-88.504549,39.169909],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"22931","name":"Elburn","type":"village","bbox":[-88.487101,41.859688,-88.442449,41.913903],"project_ids":["BOTB-0266"]},{"fips":"22957","name":"El Dara","type":"village","bbox":[-91.001191,39.615368,-90.982273,39.63012],"project_ids":["BOTB-0266"]},{"fips":"23009","name":"Eldorado","type":"city","bbox":[-88.465929,37.797656,-88.420816,37.834269],"project_ids":["BOTB-0269"]},{"fips":"23022","name":"Eldred","type":"village","bbox":[-90.559682,39.283056,-90.548681,39.289295],"project_ids":["BOTB-0269"]},{"fips":"23074","name":"Elgin","type":"city","bbox":[-88.455197,41.971576,-88.222773,42.103579],"project_ids":["BOTB-0266","BOTB-1003"]},{"fips":"23139","name":"Eliza","type":"cdp","bbox":[-90.97792,41.291961,-90.966024,41.29788],"project_ids":[]},{"fips":"23165","name":"Elizabeth","type":"village","bbox":[-90.255389,42.30904,-90.193609,42.321984],"project_ids":[]},{"fips":"23191","name":"Elizabethtown","type":"village","bbox":[-88.313343,37.441089,-88.294842,37.455335],"project_ids":[]},{"fips":"23256","name":"Elk Grove Village","type":"village","bbox":[-88.060568,41.983265,-87.935217,42.038752],"project_ids":["BOTB-0266"]},{"fips":"23269","name":"Elkhart","type":"village","bbox":[-89.493655,40.001853,-89.446734,40.028103],"project_ids":[]},{"fips":"23373","name":"Elkville","type":"village","bbox":[-89.243811,37.901626,-89.229616,37.917451],"project_ids":["BOTB-0269"]},{"fips":"23425","name":"Elliott","type":"village","bbox":[-88.288644,40.457437,-88.267297,40.471034],"project_ids":[]},{"fips":"23503","name":"Ellis Grove","type":"village","bbox":[-89.918596,38.004176,-89.900523,38.018368],"project_ids":["BOTB-0004"]},{"fips":"23529","name":"Ellisville","type":"village","bbox":[-90.310813,40.623237,-90.301258,40.631429],"project_ids":[]},{"fips":"23555","name":"Ellsworth","type":"village","bbox":[-88.721471,40.446215,-88.711936,40.453584],"project_ids":["BOTB-0121"]},{"fips":"23620","name":"Elmhurst","type":"city","bbox":[-87.969181,41.85865,-87.9184,41.931573],"project_ids":["BOTB-0266"]},{"fips":"23698","name":"Elmwood","type":"city","bbox":[-89.980717,40.770798,-89.951679,40.792234],"project_ids":[]},{"fips":"23724","name":"Elmwood Park","type":"village","bbox":[-87.826254,41.908545,-87.805748,41.937939],"project_ids":[]},{"fips":"23737","name":"El Paso","type":"city","bbox":[-89.044229,40.729625,-88.973401,40.758531],"project_ids":["BOTB-1018"]}
840,{"fips":"23776","name":"Elsah","type":"village","bbox":[-90.366977,38.942576,-90.343014,38.963094],"project_ids":["BOTB-0247"]},{"fips":"23841","name":"Elvaston","type":"village","bbox":[-91.25932,40.388074,-91.24127,40.40363],"project_ids":[]},{"fips":"23919","name":"Elwin","type":"cdp","bbox":[-88.985524,39.765759,-88.968784,39.785946],"project_ids":["BOTB-0285"]},{"fips":"23945","name":"Elwood","type":"village","bbox":[-88.189904,41.375072,-88.077796,41.447195],"project_ids":["BOTB-0266"]},{"fips":"23971","name":"Emden","type":"village","bbox":[-89.488988,40.293829,-89.480453,40.304719],"project_ids":[]},{"fips":"24062","name":"Emington","type":"village","bbox":[-88.360738,40.965246,-88.353213,40.972203],"project_ids":["BOTB-0218"]},{"fips":"24166","name":"Energy","type":"village","bbox":[-89.040202,37.756404,-89.012276,37.785792],"project_ids":["BOTB-0075"]},{"fips":"24179","name":"Enfield","type":"village","bbox":[-88.350858,38.093503,-88.327592,38.108003],"project_ids":["BOTB-0068"]},{"fips":"24348","name":"Equality","type":"village","bbox":[-88.353197,37.728169,-88.332402,37.743617],"project_ids":[]},{"fips":"24374","name":"Erie","type":"village","bbox":[-90.093309,41.647208,-90.068262,41.671079],"project_ids":[]},{"fips":"24452","name":"Essex","type":"village","bbox":[-88.209923,41.169571,-88.161782,41.194481],"project_ids":["BOTB-0218","BOTB-0266"]},{"fips":"24543","name":"Eureka","type":"city","bbox":[-89.30396,40.697504,-89.25881,40.736644],"project_ids":["BOTB-0069","BOTB-1018"]},{"fips":"24582","name":"Evanston","type":"city","bbox":[-87.732456,42.019134,-87.66507,42.071732],"project_ids":["BOTB-0266"]},{"fips":"24608","name":"Evansville","type":"village","bbox":[-89.948483,38.081707,-89.917806,38.099179],"project_ids":["BOTB-0040"]},{"fips":"24634","name":"Evergreen Park","type":"village","bbox":[-87.721654,41.706079,-87.681843,41.735444],"project_ids":["BOTB-0266"]},{"fips":"24673","name":"Ewing","type":"village","bbox":[-88.862084,38.081393,-88.843574,38.096284],"project_ids":["BOTB-0074"]},{"fips":"24699","name":"Exeter","type":"village","bbox":[-90.50746,39.71328,-90.488408,39.727981],"project_ids":["BOTB-0275"]},{"fips":"24764","name":"Fairbury","type":"city","bbox":[-88.55464,40.733296,-88.484063,40.758515],"project_ids":[]},{"fips":"24816","name":"Fairfield","type":"city","bbox":[-88.424135,38.356889,-88.334791,38.401031],"project_ids":["BOTB-0007"]},{"fips":"24920","name":"Fairmont","type":"cdp","bbox":[-88.072696,41.553067,-88.044102,41.571708],"project_ids":["BOTB-0266"]},{"fips":"24933","name":"Fairmont City","type":"village","bbox":[-90.175158,38.636665,-90.037006,38.673449],"project_ids":["BOTB-0269"]},{"fips":"24985","name":"Fairmount","type":"village","bbox":[-87.83655,40.039285,-87.818796,40.051325],"project_ids":[]},{"fips":"25063","name":"Fairview","type":"village","bbox":[-90.21467,40.629298,-90.159131,40.66694],"project_ids":[]},{"fips":"25141","name":"Fairview Heights","type":"city","bbox":[-90.052291,38.567317,-89.96155,38.625382],"project_ids":["BOTB-0225","BOTB-0259","BOTB-0266","BOTB-0269"]},{"fips":"25245","name":"Fall Creek","type":"cdp","bbox":[-91.305721,39.778049,-91.300913,39.784956],"project_ids":[]},{"fips":"25375","name":"Farina","type":"village","bbox":[-88.80786,38.803177,-88.765244,38.843521],"project_ids":["BOTB-0250"]},{"fips":"25414","name":"Farmer City","type":"city","bbox":[-88.663074,40.232527,-88.620512,40.262361],"project_ids":["BOTB-0266","BOTB-0276"]},{"fips":"25440","name":"Farmersville","type":"village","bbox":[-89.663572,39.433356,-89.639487,39.450489],"project_ids":["BOTB-0230","BOTB-0269"]},{"fips":"25531","name":"Farmington","type":"city","bbox":[-90.019874,40.6885,-89.976658,40.706506],"project_ids":[]},{"fips":"25713","name":"Fayetteville","type":"village","bbox":[-89.804803,38.372672,-89.791403,38.381363],"project_ids":["BOTB-1026"]},{"fips":"25895","name":"Ferris","type":"village","bbox":[-91.183799,40.457214,-91.153499,40.479907],"project_ids":[]},{"fips":"25960","name":"Fidelity","type":"village","bbox":[-90.16702,39.15077,-90.16161,39.157798],"project_ids":[]},{"fips":"26012","name":"Fieldon","type":"village","bbox":[-90.503548,39.104789,-90.495268,39.115983],"project_ids":[]},{"fips":"26077","name":"Fillmore","type":"village","bbox":[-89.288021,39.108109,-89.269251,39.122733],"project_ids":["BOTB-0243"]},{"fips":"26116","name":"Findlay","type":"village","bbox":[-88.764028,39.514142,-88.743886,39.529098],"project_ids":[]},{"fips":"26194","name":"Fisher","type":"village","bbox":[-88.365781,40.305228,-88.337441,40.327062],"project_ids":["BOTB-0278"]},{"fips":"26233","name":"Fithian","type":"village","bbox":[-87.883504,40.110061,-87.868451,40.12086],"project_ids":["BOTB-0215","BOTB-0284"]},{"fips":"26311","name":"Flanagan","type":"village","bbox":[-88.866051,40.869635,-88.850219,40.883803],"project_ids":[]},{"fips":"26350","name":"Flat Rock","type":"village","bbox":[-87.684546,38.896012,-87.665505,38.911595],"project_ids":[]},{"fips":"26454","name":"Flora","type":"city","bbox":[-88.508657,38.655188,-88.440763,38.685662],"project_ids":[]},{"fips":"26467","name":"Floraville","type":"cdp","bbox":[-90.058897,38.374068,-90.052102,38.379898],"project_ids":["BOTB-1026"]},{"fips":"26480","name":"Florence","type":"village","bbox":[-90.616308,39.620007,-90.604991,39.634783],"project_ids":["BOTB-0266"]},{"fips":"26571","name":"Flossmoor","type":"village","bbox":[-87.713469,41.527726,-87.655026,41.551737],"project_ids":["BOTB-0263"]},{"fips":"26662","name":"Foosland","type":"village","bbox":[-88.432751,40.359276,-88.426387,40.363064],"project_ids":[]},{"fips":"26710","name":"Ford Heights","type":"village","bbox":[-87.599616,41.498972,-87.553328,41.524106],"project_ids":["BOTB-0266"]},{"fips":"26753","name":"Forest City","type":"village","bbox":[-89.84197,40.364179,-89.821632,40.377564],"project_ids":[]},{"fips":"26896","name":"Forest Lake","type":"cdp","bbox":[-88.058294,42.203639,-88.048288,42.217341],"project_ids":[]},{"fips":"26935","name":"Forest Park","type":"village","bbox":[-87.833696,41.850022,-87.803944,41.886983],"project_ids":["BOTB-0266"]},{"fips":"26987","name":"Forest View","type":"village","bbox":[-87.802112,41.798559,-87.752901,41.814932],"project_ids":["BOTB-0266"]},{"fips":"27026","name":"Forrest","type":"village","bbox":[-88.41922,40.731101,-88.400267,40.761749],"project_ids":[]},{"fips":"27065","name":"Forreston","type":"village","bbox":[-89.589176,42.116754,-89.568399,42.142163],"project_ids":[]},{"fips":"27091","name":"Forsyth","type":"village","bbox":[-88.993279,39.907431,-88.936931,39.94244],"project_ids":["BOTB-0027","BOTB-0172"]},{"fips":"27377","name":"Fowler","type":"cdp","bbox":[-91.262988,40.00692,-91.252312,40.01063],"project_ids":[]},{"fips":"27442","name":"Fox Lake","type":"village","bbox":[-88.218882,42.357782,-88.146996,42.495181],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"27455","name":"Fox Lake Hills","type":"cdp","bbox":[-88.140253,42.40087,-88.106826,42.426725],"project_ids":[]},{"fips":"27533","name":"Fox River Grove","type":"village","bbox":[-88.238212,42.184359,-88.189512,42.205102],"project_ids":["BOTB-0266"]},{"fips":"27624","name":"Frankfort","type":"village","bbox":[-87.907175,41.441239,-87.762339,41.528953],"project_ids":["BOTB-0266"]},{"fips":"27644","name":"Frankfort Square","type":"cdp","bbox":[-87.820864,41.506425,-87.790319,41.536735],"project_ids":["BOTB-0266"]},{"fips":"27663","name":"Franklin","type":"village","bbox":[-90.058974,39.610245,-90.035196,39.632362],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"27689","name":"Franklin Grove","type":"village","bbox":[-89.308245,41.833181,-89.2936,41.848301],"project_ids":["BOTB-0266"]},{"fips":"27702","name":"Franklin Park","type":"village","bbox":[-87.920328,41.91158,-87.849588,41.958086],"project_ids":["BOTB-0266"]},{"fips":"27728","name":"Franklinville","type":"cdp","bbox":[-88.520916,42.273107,-88.510214,42.27904],"project_ids":["BOTB-1020"]},{"fips":"27806","name":"Freeburg","type":"village","bbox":[-89.964833,38.401662,-89.867161,38.484102],"project_ids":["BOTB-0237","BOTB-0266","BOTB-1026"]},{"fips":"27858","name":"Freeman Spur","type":"village","bbox":[-89.007133,37.854427,-88.992428,37.86582],"project_ids":[]},{"fips":"27884","name":"Freeport","type":"city","bbox":[-89.686565,42.24931,-89.577582,42.321393],"project_ids":["BOTB-0220","BOTB-0266","BOTB-1005"]},{"fips":"28144","name":"Fulton","type":"city","bbox":[-90.174876,41.839827,-90.139968,41.882951],"project_ids":["BOTB-0220"]},{"fips":"28170","name":"Fults","type":"village","bbox":[-90.217259,38.161327,-90.208691,38.167213],"project_ids":[]},{"fips":"28248","name":"Gages Lake","type":"cdp","bbox":[-88.004666,42.339256,-87.96356,42.367716],"project_ids":[]},{"fips":"28261","name":"Galatia","type":"village","bbox":[-88.627684,37.831081,-88.601794,37.851786],"project_ids":["BOTB-0269"]}
840,{"fips":"28300","name":"Galena","type":"city","bbox":[-90.458066,42.395316,-90.400037,42.446356],"project_ids":["BOTB-0220"]},{"fips":"28326","name":"Galesburg","type":"city","bbox":[-90.441216,40.901428,-90.301815,40.992441],"project_ids":["BOTB-0224"]},{"fips":"28404","name":"Galt","type":"cdp","bbox":[-89.765065,41.782848,-89.742309,41.793273],"project_ids":[]},{"fips":"28430","name":"Galva","type":"city","bbox":[-90.061104,41.156014,-90.013182,41.18611],"project_ids":[]},{"fips":"28612","name":"Garden Prairie","type":"cdp","bbox":[-88.731282,42.249363,-88.70541,42.261085],"project_ids":["BOTB-0062","BOTB-0266"]},{"fips":"28638","name":"Gardner","type":"village","bbox":[-88.34028,41.175071,-88.283365,41.215013],"project_ids":[]},{"fips":"28742","name":"Garrett","type":"village","bbox":[-88.429348,39.791747,-88.419981,39.802633],"project_ids":[]},{"fips":"28807","name":"Gays","type":"village","bbox":[-88.503399,39.454022,-88.488212,39.462074],"project_ids":["BOTB-0140"]},{"fips":"28846","name":"Geneseo","type":"city","bbox":[-90.177463,41.425603,-90.12367,41.481393],"project_ids":[]},{"fips":"28872","name":"Geneva","type":"city","bbox":[-88.379624,41.863619,-88.262423,41.89919],"project_ids":["BOTB-0266"]},{"fips":"28898","name":"Genoa","type":"city","bbox":[-88.720366,42.075815,-88.675888,42.109995],"project_ids":["BOTB-0150","BOTB-0266"]},{"fips":"28963","name":"Georgetown","type":"city","bbox":[-87.646581,39.965225,-87.622603,39.987712],"project_ids":[]},{"fips":"29041","name":"Germantown","type":"village","bbox":[-89.559377,38.544612,-89.53035,38.567284],"project_ids":["BOTB-0142"]},{"fips":"29080","name":"Germantown Hills","type":"village","bbox":[-89.486612,40.757546,-89.440357,40.783061],"project_ids":[]},{"fips":"29093","name":"German Valley","type":"village","bbox":[-89.498966,42.210172,-89.472324,42.218861],"project_ids":["BOTB-0220","BOTB-0249"]},{"fips":"29125","name":"Gibson City","type":"city","bbox":[-88.403744,40.449551,-88.365762,40.48242],"project_ids":[]},{"fips":"29145","name":"Gifford","type":"village","bbox":[-88.02626,40.298136,-88.01653,40.317323],"project_ids":[]},{"fips":"29171","name":"Gilberts","type":"village","bbox":[-88.3935,42.07241,-88.349394,42.15392],"project_ids":["BOTB-0010","BOTB-0266"]},{"fips":"29236","name":"Gillespie","type":"city","bbox":[-89.832359,39.114299,-89.804179,39.137045],"project_ids":[]},{"fips":"29275","name":"Gilman","type":"city","bbox":[-88.019947,40.74591,-87.974922,40.777636],"project_ids":[]},{"fips":"29340","name":"Gilson","type":"cdp","bbox":[-90.207282,40.859024,-90.189526,40.867527],"project_ids":[]},{"fips":"29392","name":"Girard","type":"city","bbox":[-89.79661,39.435374,-89.768921,39.453921],"project_ids":["BOTB-0269"]},{"fips":"29431","name":"Gladstone","type":"village","bbox":[-90.966054,40.858954,-90.948605,40.869754],"project_ids":["BOTB-0224"]},{"fips":"29483","name":"Glasford","type":"village","bbox":[-89.826994,40.563725,-89.799371,40.580259],"project_ids":[]},{"fips":"29496","name":"Glasgow","type":"village","bbox":[-90.489422,39.541414,-90.470513,39.556052],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"29639","name":"Glen Carbon","type":"village","bbox":[-90.03881,38.737003,-89.908338,38.788702],"project_ids":["BOTB-0171"]},{"fips":"29652","name":"Glencoe","type":"village","bbox":[-87.784866,42.11607,-87.74153,42.152402],"project_ids":[]},{"fips":"29730","name":"Glendale Heights","type":"village","bbox":[-88.101797,41.895622,-88.043419,41.943149],"project_ids":["BOTB-0266"]},{"fips":"29756","name":"Glen Ellyn","type":"village","bbox":[-88.090917,41.830657,-88.026986,41.901567],"project_ids":["BOTB-0266"]},{"fips":"29938","name":"Glenview","type":"village","bbox":[-87.893719,42.055093,-87.758658,42.116827],"project_ids":["BOTB-0266"]},{"fips":"30029","name":"Glenwood","type":"village","bbox":[-87.640979,41.520709,-87.580967,41.560289],"project_ids":["BOTB-0266"]},{"fips":"30094","name":"Godfrey","type":"village","bbox":[-90.275702,38.896913,-90.137068,38.9994],"project_ids":["BOTB-0050","BOTB-0083","BOTB-0247","BOTB-0266","BOTB-0269","BOTB-1019"]},{"fips":"30120","name":"Godley","type":"village","bbox":[-88.255179,41.230429,-88.235396,41.248928],"project_ids":["BOTB-0266"]},{"fips":"30133","name":"Golconda","type":"city","bbox":[-88.495711,37.353265,-88.481068,37.370915],"project_ids":["BOTB-0045"]},{"fips":"30159","name":"Golden","type":"village","bbox":[-91.030655,40.104645,-91.007765,40.114738],"project_ids":[]},{"fips":"30250","name":"Golden Gate","type":"village","bbox":[-88.208304,38.357039,-88.201462,38.360862],"project_ids":["BOTB-0266"]},{"fips":"30328","name":"Golf","type":"village","bbox":[-87.79746,42.055227,-87.775762,42.062564],"project_ids":["BOTB-0266"]},{"fips":"30419","name":"Goodenow","type":"cdp","bbox":[-87.641623,41.390977,-87.637364,41.393363],"project_ids":[]},{"fips":"30445","name":"Goodfield","type":"village","bbox":[-89.286397,40.608603,
840-89.246251,40.640591],"project_ids":["BOTB-0231","BOTB-1018"]},{"fips":"30458","name":"Good Hope","type":"village","bbox":[-90.684716,40.551892,-90.666395,40.562457],"project_ids":[]},{"fips":"30510","name":"Goofy Ridge","type":"cdp","bbox":[-89.961348,40.385013,-89.923812,40.407488],"project_ids":["BOTB-0214"]},{"fips":"30575","name":"Goreville","type":"village","bbox":[-88.994517,37.542513,-88.911514,37.593156],"project_ids":[]},{"fips":"30588","name":"Gorham","type":"village","bbox":[-89.490997,37.703088,-89.473104,37.725365],"project_ids":["BOTB-0269"]},{"fips":"30653","name":"Grafton","type":"city","bbox":[-90.45983,38.963687,-90.394681,38.992273],"project_ids":[]},{"fips":"30705","name":"Grand Detour","type":"cdp","bbox":[-89.429262,41.886067,-89.398563,41.91183],"project_ids":["BOTB-0220"]},{"fips":"30757","name":"Grand Ridge","type":"village","bbox":[-88.837615,41.231022,-88.824526,41.241217],"project_ids":["BOTB-0218","BOTB-0220"]},{"fips":"30770","name":"Grand Tower","type":"city","bbox":[-89.515332,37.621082,-89.48042,37.648255],"project_ids":["BOTB-0077"]},{"fips":"30835","name":"Grandview","type":"village","bbox":[-89.625042,39.81294,-89.608875,39.822644],"project_ids":[]},{"fips":"30900","name":"Grandwood Park","type":"cdp","bbox":[-88.004142,42.385569,-87.964344,42.404616],"project_ids":["BOTB-0266"]},{"fips":"30926","name":"Granite City","type":"city","bbox":[-90.189473,38.68034,-90.075759,38.798935],"project_ids":["BOTB-0269"]},{"fips":"30978","name":"Grantfork","type":"village","bbox":[-89.67604,38.819206,-89.65754,38.835444],"project_ids":["BOTB-0171"]},{"fips":"30991","name":"Grant Park","type":"village","bbox":[-87.658952,41.22557,-87.606614,41.262934],"project_ids":["BOTB-0124","BOTB-0249"]},{"fips":"31017","name":"Granville","type":"village","bbox":[-89.242807,41.256146,-89.212161,41.281513],"project_ids":["BOTB-0220","BOTB-0235"]},{"fips":"31121","name":"Grayslake","type":"village","bbox":[-88.063315,42.2988,-87.988163,42.389623],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"31165","name":"Grayville","type":"city","bbox":[-88.011809,38.231795,-87.983058,38.282731],"project_ids":["BOTB-0007","BOTB-0266","BOTB-0269"]},{"fips":"31368","name":"Greenfield","type":"city","bbox":[-90.228693,39.328384,-90.187006,39.353298],"project_ids":["BOTB-0269"]},{"fips":"31446","name":"Green Oaks","type":"village","bbox":[-87.934345,42.263382,-87.883525,42.323744],"project_ids":["BOTB-0266"]},{"fips":"31524","name":"Greenup","type":"village","bbox":[-88.173827,39.233984,-88.145139,39.26642],"project_ids":["BOTB-0262","BOTB-0269"]},{"fips":"31563","name":"Green Valley","type":"village","bbox":[-89.651781,40.399975,-89.633417,40.413424],"project_ids":[]},{"fips":"31576","name":"Greenview","type":"village","bbox":[-89.751785,40.076779,-89.730426,40.091595],"project_ids":[]},{"fips":"31589","name":"Greenville","type":"city","bbox":[-89.423804,38.860388,-89.343698,38.90916],"project_ids":["BOTB-0168","BOTB-0243"]},{"fips":"31667","name":"Greenwood","type":"village","bbox":[-88.423661,42.377496,-88.352169,42.418083],"project_ids":["BOTB-0019","BOTB-0266"]},{"fips":"31732","name":"Gridley","type":"village","bbox":[-88.895501,40.733235,-88.868056,40.754332],"project_ids":[]},{"fips":"31771","name":"Griggsville","type":"city","bbox":[-90.73818,39.698334,-90.713296,39.715751],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"31991","name":"Gulfport","type":"village","bbox":[-91.097649,40.793676,-91.068433,40.823638],"project_ids":["BOTB-0224"]},{"fips":"32018","name":"Gurnee","type":"village","bbox":[-88.003098,42.327597,-87.883929,42.403862],"project_ids":["BOTB-0266","BOTB-0274"]},{"fips":"32200","name":"Hainesville","type":"village","bbox":[-88.080061,42.327829,-88.058286,42.35703],"project_ids":["BOTB-0266"]},{"fips":"32395","name":"Hamburg","type":"village","bbox":[-90.723725,39.224675,-90.708498,39.239183],"project_ids":["BOTB-0266","BOTB-0275"]},{"fips":"32408","name":"Hamel","type":"village","bbox":[-89.857265,38.881598,-89.821769,38.899898],"project_ids":[]},{"fips":"32434","name":"Hamilton","type":"city","bbox":[-91.421973,40.375667,-91.324203,40.41152],"project_ids":["BOTB-0214","BOTB-0266"]},{"fips":"32473","name":"Hamlet","type":"cdp","bbox":[-90.744715,41.306677,-90.72557,41.317692],"project_ids":[]},{"fips":"32499","name":"Hammond","type":"village","bbox":[-88.599301,39.792121,-88.584955,39.806724],"project_ids":[]},{"fips":"32525","name":"Hampshire","type":"village","bbox":[-88.555709,42.077453,-88.454621,42.153761],"project_ids":["BOTB-0010","BOTB-0220","BOTB-1003"]},{"fips":"32564","name":"Hampton","type":"village","bbox":[-90.420583,41.543593,-90.376228,41.573055],"project_ids":[]},{"fips":"32616","name":"Hanaford","type":"village","bbox":[-88.845026,37.950658,-88.826273,37.965243],"project_ids":[]},{"fips":"32668","name":"Hanna City","type":"village","bbox":[-89.833153,40.682562,-89.785046,40.702003],"project_ids":["BOTB-0266"]},{"fips":"32707","name":"Hanover","type":"village","bbox":[-90.314707,42.245381,-90.24573,42.266089],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"32746","name":"Hanover Park","type":"village","bbox":[-88.16983,41.937908,-88.11878,42.01811],"project_ids":["BOTB-0266"]},{"fips":"32850","name":"Hardin","type":"village","bbox":[-90.641843,39.145364,-90.606506,39.183629],"project_ids":[]},{"fips":"32876","name":"Harding","type":"cdp","bbox":[-88.855153,41.512666,-88.843904,41.523872],"project_ids":[]},{"fips":"32967","name":"Harmon","type":"village","bbox":[-89.560575,41.716126,-89.5496,41.729598],"project_ids":["BOTB-0266"]},{"fips":"33019","name":"Harmony","type":"cdp","bbox":[-88.535452,42.153634,-88.518079,42.165075],"project_ids":["BOTB-0010"]},{"fips":"33136","name":"Harrisburg","type":"city","bbox":[-88.577368,37.708894,-88.51252,37.765751],"project_ids":["BOTB-0269"]},{"fips":"33162","name":"Harrison","type":"cdp","bbox":[-89.351296,37.783647,-89.31481,37.809492],"project_ids":["BOTB-0077"]},{"fips":"33227","name":"Harristown","type":"village","bbox":[-89.106283,39.831092,-89.024128,39.857495],"project_ids":["BOTB-0172","BOTB-0285"]},{"fips":"33279","name":"Hartford","type":"village","bbox":[-90.119862,38.784044,-90.067015,38.845251],"project_ids":["BOTB-0269"]},{"fips":"33292","name":"Hartland","type":"cdp","bbox":[-88.516213,42.359928,-88.501436,42.366741],"project_ids":["BOTB-0019","BOTB-0249"]},{"fips":"33318","name":"Hartsburg","type":"village","bbox":[-89.446379,40.246843,-89.436916,40.25394],"project_ids":[]},{"fips":"33331","name":"Harvard","type":"city","bbox":[-88.660985,42.396119,-88.569636,42.465775],"project_ids":["BOTB-0062","BOTB-0266","BOTB-1010"]},{"fips":"33357","name":"Harvel","type":"village","bbox":[-89.540673,39.348804,-89.521541,39.36344],"project_ids":["BOTB-0230","BOTB-0269"]},{"fips":"33383","name":"Harvey","type":"city","bbox":[-87.685147,41.579063,-87.621523,41.629897],"project_ids":["BOTB-0263","BOTB-0266"]},{"fips":"33435","name":"Harwood Heights","type":"village","bbox":[-87.819466,41.956723,-87.786742,41.974538],"project_ids":[]},{"fips":"33513","name":"Havana","type":"city","bbox":[-90.079684,40.274682,
840-90.030168,40.311896],"project_ids":["BOTB-0214"]},{"fips":"33630","name":"Hawthorn Woods","type":"village","bbox":[-88.115843,42.197311,-88.018923,42.277151],"project_ids":["BOTB-0266"]},{"fips":"33695","name":"Hazel Crest","type":"village","bbox":[-87.713614,41.549678,-87.655883,41.58634],"project_ids":["BOTB-0263","BOTB-0266"]},{"fips":"33851","name":"Hebron","type":"village","bbox":[-88.449967,42.450444,-88.419109,42.482903],"project_ids":["BOTB-0105","BOTB-0266"]},{"fips":"33877","name":"Hecker","type":"village","bbox":[-89.998943,38.298268,-89.983163,38.308752],"project_ids":["BOTB-0013"]},{"fips":"34007","name":"Henderson","type":"village","bbox":[-90.360707,41.019602,-90.348598,41.029339],"project_ids":["BOTB-0071"]},{"fips":"34098","name":"Hennepin","type":"village","bbox":[-89.351457,41.227792,-89.299026,41.308476],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"34137","name":"Henning","type":"village","bbox":[-87.711111,40.295717,-87.690863,40.317844],"project_ids":[]},{"fips":"34163","name":"Henry","type":"city","bbox":[-89.375089,41.103874,-89.33443,41.133511],"project_ids":["BOTB-0215","BOTB-0220"]},{"fips":"34272","name":"Heritage Lake","type":"cdp","bbox":[-89.341815,40.537028,-89.320134,40.553658],"project_ids":["BOTB-0231"]},{"fips":"34332","name":"Herrick","type":"village","bbox":[-88.991681,39.215938,-88.977762,39.223255],"project_ids":[]},{"fips":"34358","name":"Herrin","type":"city","bbox":[-89.063606,37.742354,-88.995092,37.844796],"project_ids":["BOTB-0075","BOTB-0269"]},{"fips":"34384","name":"Herscher","type":"village","bbox":[-88.114503,41.038348,-88.081096,41.064424],"project_ids":["BOTB-0249"]},{"fips":"34423","name":"Hettick","type":"village","bbox":[-90.042779,39.350673,-90.03232,39.360634],"project_ids":["BOTB-0269"]},{"fips":"34449","name":"Heyworth","type":"village","bbox":[-89.035378,40.297851,-88.958862,40.33773],"project_ids":["BOTB-0266"]},{"fips":"34514","name":"Hickory Hills","type":"city","bbox":[-87.848027,41.708657,-87.807999,41.740325],"project_ids":["BOTB-0266"]},{"fips":"34553","name":"Hidalgo","type":"village","bbox":[-88.155556,39.151612,-88.142607,39.160142],"project_ids":["BOTB-0269"]},{"fips":"34670","name":"Highland","type":"city","bbox":[-89.712506,38.717193,-89.648377,38.824354],"project_ids":["BOTB-0171"]},{"fips":"34722","name":"Highland Park","type":"city","bbox":[-87.852057,42.152252,-87.758829,42.223163],"project_ids":["BOTB-0266"]},{"fips":"34865","name":"Highwood","type":"city","bbox":[-87.821551,42.196086,-87.804354,42.218049],"project_ids":["BOTB-0266"]},{"fips":"34982","name":"Hillcrest","type":"village","bbox":[-89.089549,41.948438,-89.024626,41.992067],"project_ids":["BOTB-0158","BOTB-1001"]},{"fips":"35047","name":"Hillsboro","type":"city","bbox":[-89.508678,39.122497,-89.431978,39.277782],"project_ids":["BOTB-0264"]},{"fips":"35073","name":"Hillsdale","type":"village","bbox":[-90.190799,41.598853,-90.165778,41.617798],"project_ids":["BOTB-0268"]},{"fips":"35086","name":"Hillside","type":"village","bbox":[-87.918243,41.844527,-87.882433,41.885418],"project_ids":["BOTB-0266"]},{"fips":"35203","name":"Hillview","type":"village","bbox":[-90.548555,39.440893,-90.525616,39.456186],"project_ids":[]},{"fips":"35268","name":"Hinckley","type":"village","bbox":[-88.655283,41.765598,-88.621731,41.779578],"project_ids":["BOTB-0088","BOTB-0229"]},{"fips":"35281","name":"Hindsboro","type":"village","bbox":[-88.140161,39.679769,-88.128518,39.689297],"project_ids":["BOTB-0266"]},{"fips":"35307","name":"Hinsdale","type":"village","bbox":[-87.952571,41.763863,-87.900017,41.825846],"project_ids":["BOTB-0266"]},{"fips":"35385","name":"Hodgkins","type":"village","bbox":[-87.88663,41.739148,-87.831594,41.783949],"project_ids":["BOTB-0266","BOTB-0272"]},{"fips":"35398","name":"Hoffman","type":"village","bbox":[-89.273206,38.535817,-89.254482,38.549401],"project_ids":["BOTB-0239","BOTB-1026"]},{"fips":"35411","name":"Hoffman Estates","type":"village","bbox":[-88.243339,42.026564,-88.060181,42.117863],"project_ids":["BOTB-0266"]},{"fips":"35463","name":"Holcomb","type":"cdp","bbox":[-89.099599,42.061067,-89.095134,42.069354],"project_ids":["BOTB-0249"]},{"fips":"35515","name":"Holiday Hills","type":"village","bbox":[-88.243126,42.285518,-88.217495,42.306856],"project_ids":[]},{"fips":"35541","name":"Holiday Shores","type":"cdp","bbox":[-89.946294,38.905464,-89.920875,38.939054],"project_ids":[]},{"fips":"35671","name":"Hollowayville","type":"village","bbox":[-89.299139,41.363168,-89.287975,41.366729],"project_ids":["BOTB-0220"]},{"fips":"35814","name":"Homer","type":"village","bbox":[-87.970823,40.025087,-87.948492,40.042486],"project_ids":["BOTB-0284"]},{"fips":"35835","name":"Homer Glen","type":"village","bbox":[-88.008529,41.548736,-87.909377,41.643933],"project_ids":["BOTB-0266"]},{"fips":"35866","name":"Hometown","type":"city","bbox":[-87.741208,41.7274
84019,-87.721435,41.734862],"project_ids":["BOTB-0266"]},{"fips":"35879","name":"Homewood","type":"village","bbox":[-87.699009,41.538758,-87.63144,41.579107],"project_ids":["BOTB-0266"]},{"fips":"36061","name":"Hoopeston","type":"city","bbox":[-87.689352,40.437915,-87.640314,40.477669],"project_ids":["BOTB-0215","BOTB-0266"]},{"fips":"36074","name":"Hooppole","type":"village","bbox":[-89.921286,41.518218,-89.906655,41.525473],"project_ids":[]},{"fips":"36126","name":"Hopedale","type":"village","bbox":[-89.454566,40.416578,-89.402201,40.432222],"project_ids":["BOTB-0210","BOTB-0266"]},{"fips":"36150","name":"Hopewell","type":"village","bbox":[-89.467368,40.973221,-89.444215,40.994313],"project_ids":["BOTB-0220"]},{"fips":"36190","name":"Hopkins Park","type":"village","bbox":[-87.649387,41.047457,-87.552752,41.096343],"project_ids":["BOTB-0266"]},{"fips":"36347","name":"Hoyleton","type":"village","bbox":[-89.279113,38.43829,-89.26511,38.453124],"project_ids":["BOTB-1026"]},{"fips":"36438","name":"Hudson","type":"village","bbox":[-88.998843,40.591025,-88.979342,40.616463],"project_ids":[]},{"fips":"36477","name":"Huey","type":"village","bbox":[-89.295727,38.601745,-89.281595,38.60781],"project_ids":["BOTB-0250"]},{"fips":"36516","name":"Hull","type":"village","bbox":[-91.22339,39.7018,-91.185713,39.716614],"project_ids":["BOTB-0266"]},{"fips":"36542","name":"Humboldt","type":"village","bbox":[-88.326788,39.600921,-88.312572,39.608334],"project_ids":[]},{"fips":"36568","name":"Hume","type":"village","bbox":[-87.880289,39.791489,-87.861222,39.807107],"project_ids":["BOTB-0215"]},{"fips":"36750","name":"Huntley","type":"village","bbox":[-88.481927,42.11227,-88.388439,42.215261],"project_ids":["BOTB-0010"]},{"fips":"36815","name":"Hurst","type":"city","bbox":[-89.151477,37.82191,-89.135851,37.844159],"project_ids":["BOTB-0075"]},{"fips":"36841","name":"Hutsonville","type":"village","bbox":[-87.671539,39.101285,-87.652245,39.115984],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"37062","name":"Illinois City","type":"cdp","bbox":[-90.906363,41.393704,-90.893447,41.405386],"project_ids":[]},{"fips":"37127","name":"Illiopolis","type":"village","bbox":[-89.264608,39.842389,-89.232988,39.855334],"project_ids":["BOTB-0266"]},{"fips":"37179","name":"Ina","type":"village","bbox":[-88.917655,38.125696,-88.889741,38.173053],"project_ids":["BOTB-0074"]},{"fips":"37218","name":"Indian Creek","type":"village","bbox":[-87.984319,42.222609,-87.969729,42.233487],"project_ids":[]},{"fips":"37257","name":"Indian Head Park","type":"village","bbox":[-87.906987,41.756258,-87.887291,41.77958],"project_ids":[]},{"fips":"37348","name":"Indianola","type":"village","bbox":[-87.745017,39.921265,-87.73553,39.932725],"project_ids":[]},{"fips":"37439","name":"Industry","type":"village","bbox":[-90.615435,40.322274,-90.601089,40.33161],"project_ids":[]},{"fips":"37465","name":"Ingalls Park","type":"cdp","bbox":[-88.04935,41.513126,-88.023596,41.530092],"project_ids":["BOTB-0266"]},{"fips":"37608","name":"Inverness","type":"village","bbox":[-88.141099,42.08151,-88.06785,42.139641],"project_ids":["BOTB-0266"]},{"fips":"37621","name":"Iola","type":"village","bbox":[-88.637795,38.82696,-88.618815,38.841921],"project_ids":[]},{"fips":"37647","name":"Ipava","type":"village","bbox":[-90.33075,40.349443,-90.31619,40.355867],"project_ids":[]},{"fips":"37712","name":"Iroquois","type":"village","bbox":[-87.591448,40.819084,-87.576814,40.834808],"project_ids":[]},{"fips":"37738","name":"Irving","type":"village","bbox":[-89.415565,39.196963,-89.396822,39.213532],"project_ids":["BOTB-0264"]},{"fips":"37777","name":"Irvington","type":"village","bbox":[-89.168275,38.427414,-89.14502,38.452416],"project_ids":["BOTB-1017"]},{"fips":"37803","name":"Irwin","type":"village","bbox":[-87.986435,41.049795,-87.982068,41.059025],"project_ids":[]},{"fips":"37894","name":"Island Lake","type":"village","bbox":[-88.226519,42.256057,-88.169141,42.306327],"project_ids":["BOTB-0060"]},{"fips":"37907","name":"Itasca","type":"village","bbox":[-88.051323,41.956175,-87.985231,41.992683],"project_ids":["BOTB-0266"]},{"fips":"37933","name":"Iuka","type":"village","bbox":[-88.794906,38.60508,-88.771799,38.630414],"project_ids":[]}
840,{"fips":"37998","name":"Ivesdale","type":"village","bbox":[-88.468653,39.937644,-88.446343,39.952493],"project_ids":[]},{"fips":"38115","name":"Jacksonville","type":"city","bbox":[-90.291413,39.693993,-90.172294,39.756755],"project_ids":["BOTB-0275"]},{"fips":"38232","name":"Janesville","type":"cdp","bbox":[-88.248558,39.373817,-88.240869,39.377313],"project_ids":["BOTB-0266"]},{"fips":"38323","name":"Jeffersonville","type":"village","bbox":[-88.413519,38.435031,-88.394514,38.449907],"project_ids":[]},{"fips":"38349","name":"Jeisyville","type":"village","bbox":[-89.411403,39.575162,-89.404512,39.584489],"project_ids":[]},{"fips":"38375","name":"Jerome","type":"village","bbox":[-89.686926,39.763049,-89.668145,39.771582],"project_ids":[]},{"fips":"38414","name":"Jerseyville","type":"city","bbox":[-90.361906,39.086785,-90.29785,39.137962],"project_ids":[]},{"fips":"38427","name":"Jewett","type":"village","bbox":[-88.252339,39.20026,-88.233865,39.215334],"project_ids":[]},{"fips":"38479","name":"Johnsburg","type":"village","bbox":[-88.306208,42.357644,-88.203614,42.4155],"project_ids":["BOTB-0060","BOTB-0065","BOTB-0266"]},{"fips":"38531","name":"Johnsonville","type":"village","bbox":[-88.541432,38.516515,-88.533528,38.525994],"project_ids":[]},{"fips":"38544","name":"Johnston City","type":"city","bbox":[-88.955905,37.810578,-88.900587,37.833839],"project_ids":["BOTB-0075"]},{"fips":"38570","name":"Joliet","type":"city","bbox":[-88.362191,41.422913,-87.990361,41.594791],"project_ids":["BOTB-0266","BOTB-0271"]},{"fips":"38635","name":"Jonesboro","type":"city","bbox":[-89.281117,37.4383,-89.24961,37.468495],"project_ids":["BOTB-0269","BOTB-0279"]},{"fips":"38674","name":"Joppa","type":"village","bbox":[-88.849987,37.198581,-88.839425,37.213721],"project_ids":["BOTB-0200"]},{"fips":"38726","name":"Joslin","type":"cdp","bbox":[-90.252924,41.53326,-90.203453,41.583385],"project_ids":["BOTB-0212","BOTB-0268"]},{"fips":"38739","name":"Joy","type":"village","bbox":[-90.885581,41.192058,-90.871955,41.201509],"project_ids":["BOTB-0224"]},{"fips":"38778","name":"Junction","type":"village","bbox":[-88.247896,37.716957,-88.229112,37.73218],"project_ids":["BOTB-0269"]},{"fips":"38791","name":"Junction City","type":"village","bbox":[-89.133231,38.56862,-89.117192,38.584981],"project_ids":[]},{"fips":"38830","name":"Justice","type":"village","bbox":[-87.860574,41.732732,-87.814325,41.762299],"project_ids":["BOTB-0266"]},{"fips":"38856","name":"Kampsville","type":"village","bbox":[-90.624976,39.284184,-90.602254,39.311494],"project_ids":["BOTB-0266"]},{"fips":"38869","name":"Kane","type":"village","bbox":[-90.36031,39.181562,-90.341476,39.196166],"project_ids":[]},{"fips":"38895","name":"Kaneville","type":"village","bbox":[-88.528114,41.82958,-88.514232,41.838918],"project_ids":[]},{"fips":"38921","name":"Kangley","type":"village","bbox":[-88.87916,41.141706,-88.862769,41.152736],"project_ids":["BOTB-0157"]},{"fips":"38934","name":"Kankakee","type":"city","bbox":[-87.920977,41.046996,-87.821177,41.145764],"project_ids":["BOTB-0249","BOTB-1015"]},{"fips":"38986","name":"Kansas","type":"village","bbox":[-87.949275,39.547079,-87.929814,39.561803],"project_ids":[]},{"fips":"39038","name":"Kappa","type":"village","bbox":[-89.013927,40.668137,-88.999355,40.679354],"project_ids":["BOTB-1018"]},{"fips":"39077","name":"Karnak","type":"village","bbox":[-88.989402,37.284986,-88.961199,37.303838],"project_ids":["BOTB-0227"]},{"fips":"39129","name":"Kaskaskia","type":"village","bbox":[-89.92031,37.91666,-89.912312,37.924176],"project_ids":[]},{"fips":"39233","name":"Keenes","type":"village","bbox":[-88.644353,38.334919,-88.639491,38.342288],"project_ids":[]},{"fips":"39259","name":"Keensburg","type":"village","bbox":[-87.872955,38.34642,-87.863702,38.355712],"project_ids":["BOTB-0005"]},{"fips":"39298","name":"Keithsburg","type":"city","bbox":[-90.960802,41.084743,-90.919316,41.114774],"project_ids":["BOTB-0224"]},{"fips":"39324","name":"Kell","type":"village","bbox":[-88.912873,38.483833,-88.893991,38.498644],"project_ids":["BOTB-0074"]},{"fips":"39441","name":"Kempton","type":"village","bbox":[-88.241812,40.93307,-88.231305,40.938074],"project_ids":[]},{"fips":"39519","name":"Kenilworth","type":"village","bbox":[-87.726016,42.082571,-87.702716,42.095445],"project_ids":[]},{"fips":"39532","name":"Kenney","type":"village","bbox":[-89.095317,40.093155,-89.079301,40.101613],"project_ids":[]},{"fips":"39727","name":"Kewanee","type":"city","bbox":[-89.964774,41.214814,-89.887008,41.261416],"project_ids":[]},{"fips":"39753","name":"Keyesport","type":"village","bbox":[-89.286111,38.73462,-89.261719,38.760263],"project_ids":["BOTB-0243"]},{"fips":"39857","name":"Kilbourne","type":"village","bbox":[-90.022447,40.144573,-90.003138,40.159391],"project_ids":[]},{"fips":"39883","name":"Kildeer","type":"village","bbox":[-88.077492,42.15642,-88.026295,42.215013],"project_ids":["BOTB-0266"]},{"fips":"39909","name":"Kincaid","type":"village","bbox":[-89.439287,39.577885,-89.400337,39.593929],"project_ids":["BOTB-0230"]},{"fips":"39922","name":"Kinderhook","type":"village","bbox":[-91.162657,39.698095,-91.142436,39.709723],"project_ids":["BOTB-0275"]},{"fips":"39987","name":"Kings","type":"cdp","bbox":[-89.110468,41.998958,-89.104336,42.008574],"project_ids":["BOTB-0220"]},{"fips":"40052","name":"Kingston","type":"cdp","bbox":[-91.032369,39.815339,-91.020667,39.823519],"project_ids":["BOTB-1013"]},{"fips":"40065","name":"Kingston","type":"village","bbox":[-88.78709,42.089904,-88.74168,42.114568],"project_ids":["BOTB-1021"]},{"fips":"40091","name":"Kingston Mines","type":"village","bbox":[-89.789624,40.5493,-89.755611,40.565916],"project_ids":["BOTB-0266"]},{"fips":"40117","name":"Kinmundy","type":"city","bbox":[-88.877767,38.760883,-88.836094,38.780797],"project_ids":[]},{"fips":"40143","name":"Kinsman","type":"village","bbox":[-88.572505,41.188308,-88.567571,41.192228],"project_ids":["BOTB-0152"]},{"fips":"40156","name":"Kirkland","type":"village","bbox":[-88.880761,42.080496,-88.822113,42.098328],"project_ids":["BOTB-0015"]},{"fips":"40182","name":"Kirkwood","type":"village","bbox":[-90.758848,40.860819,-90.734551,40.875407],"project_ids":["BOTB-0224"]},{"fips":"40364","name":"Knollwood","type":"cdp","bbox":[-87.891636,42.279525,-87.867627,42.290601],"project_ids":["BOTB-0266"]},{"fips":"40416","name":"Knoxville","type":"city","bbox":[-90.306645,40.889
840619,-90.269715,40.921827],"project_ids":["BOTB-0224"]},{"fips":"40520","name":"La Clede","type":"cdp","bbox":[-88.719824,38.875612,-88.708084,38.885322],"project_ids":["BOTB-0226"]},{"fips":"40559","name":"Lacon","type":"city","bbox":[-89.421304,41.008283,-89.391783,41.03754],"project_ids":["BOTB-0220"]},{"fips":"40598","name":"Ladd","type":"village","bbox":[-89.229002,41.367364,-89.183725,41.393559],"project_ids":["BOTB-0147"]},{"fips":"40676","name":"La Fayette","type":"village","bbox":[-89.977298,41.10599,-89.968983,41.113583],"project_ids":[]},{"fips":"40767","name":"La Grange","type":"village","bbox":[-87.889429,41.790168,-87.85919,41.820062],"project_ids":[]},{"fips":"40793","name":"La Grange Park","type":"village","bbox":[-87.890893,41.819226,-87.851813,41.845558],"project_ids":["BOTB-0266"]},{"fips":"40832","name":"La Harpe","type":"city","bbox":[-90.982577,40.570775,-90.954023,40.593436],"project_ids":[]},{"fips":"40884","name":"Lake Barrington","type":"village","bbox":[-88.199512,42.174045,-88.130839,42.251047],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"40910","name":"Lake Bluff","type":"village","bbox":[-87.887076,42.268548,-87.827945,42.304879],"project_ids":["BOTB-0266"]},{"fips":"40962","name":"Lake Camelot","type":"cdp","bbox":[-89.766179,40.624022,-89.73244,40.645934],"project_ids":["BOTB-0201","BOTB-0238"]},{"fips":"40980","name":"Lake Carroll","type":"cdp","bbox":[-89.919151,42.130769,-89.823864,42.198027],"project_ids":["BOTB-0009","BOTB-0064","BOTB-0220","BOTB-0266"]},{"fips":"40988","name":"Lake Catherine","type":"cdp","bbox":[-88.13906,42.473682,-88.111441,42.495611],"project_ids":["BOTB-0266"]},{"fips":"41040","name":"Lake City","type":"cdp","bbox":[-88.725457,39.749946,-88.709203,39.758647],"project_ids":[]},{"fips":"41105","name":"Lake Forest","type":"city","bbox":[-87.901467,42.203582,-87.80671,42.279829],"project_ids":["BOTB-0266"]},{"fips":"41157","name":"Lake Holiday","type":"cdp","bbox":[-88.695197,41.601581,-88.635573,41.631041],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"41183","name":"Lake in the Hills","type":"village","bbox":[-88.432199,42.168427,-88.276789,42.214335],"project_ids":["BOTB-0010","BOTB-0266"]},{"fips":"41214","name":"Lake Ka-Ho","type":"village","bbox":[-89.751068,39.093995,-89.739032,39.10536],"project_ids":["BOTB-0260"]},{"fips":"41326","name":"Lakemoor","type":"village","bbox":[-88.238093,42.314019,-88.161139,42.372161],"project_ids":["BOTB-0060"]},{"fips":"41346","name":"Lake of the Woods","type":"cdp","bbox":[-88.393463,40.1932,-88.354433,40.219697],"project_ids":["BOTB-1004"]},{"fips":"41404","name":"Lake Petersburg","type":"cdp","bbox":[-89.883886,39.974727,-89.845842,39.992911],"project_ids":["BOTB-0266"]},{"fips":"41456","name":"Lake Summerset","type":"cdp","bbox":[-89.419382,42.439942,-89.380682,42.461859],"project_ids":["BOTB-0282"]},{"fips":"41586","name":"Lake Villa","type":"village","bbox":[-88.122314,42.386315,-88.052996,42.448447],"project_ids":["BOTB-0266"]},{"fips":"41651","name":"Lakewood","type":"village","bbox":[-88.446452,42.204468,-88.347545,42.255111],"project_ids":["BOTB-0010","BOTB-1020"]},{"fips":"41677","name":"Lakewood","type":"cdp","bbox":[-88.904771,39.318135,-88.892865,39.329286],"project_ids":[]},{"fips":"41716","name":"Lakewood Shores","type":"cdp","bbox":[-88.151453,41.272821,-88.136054,41.287762],"project_ids":[]},{"fips":"41742","name":"Lake Zurich","type":"village","bbox":[-88.120786,42.168375,-88.057898,42.221827],"project_ids":["BOTB-0266"]},{"fips":"41794","name":"La Moille","type":"village","bbox":[-89.310064,41.520803,-89.266238,41.539111],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"41859","name":"Lanark","type":"city","bbox":[-89.842888,42.089687,-89.82021,42.110221],"project_ids":["BOTB-0064","BOTB-0220"]},{"fips":"41950","name":"Lane","type":"cdp","bbox":[-88.859643,40.11917,-88.852528,40.125941],"project_ids":[]},{"fips":"42002","name":"Langleyville","type":"cdp","bbox":[-89.367123,39.557391,-89.348452,39.567326],"project_ids":[]},{"fips":"42028","name":"Lansing","type":"village","bbox":[-87.583169,41.517396,-87.525281,41.595257],"project_ids":["BOTB-0266"]},{"fips":"42067","name":"LaPlace","type":"cdp","bbox":[-88.726822,39.792207,-88.700444,39.805802],"project_ids":["BOTB-0173"]},{"fips":"42080","name":"La Prairie","type":"village","bbox":[-91.007977,40.142847,-90.998398,40.150449],"project_ids":[]},{"fips":"42171","name":"La Rose","type":"village","bbox":[-89.23812,40.972753,-89.230689,40.985498],"project_ids":["BOTB-0220"]},{"fips":"42184","name":"LaSalle","type":"city","bbox":[-89.125877,41.314599,-89.010139,41.396852],"project_ids":["BOTB-0147","BOTB-0220"]},{"fips":"42249","name":"Latham","type":"village","bbox":[-89.170284,39.961213,-89.155058,39.972049],"project_ids":["BOTB-0172"]},{"fips":"42392","name":"Lawrence","type":"cdp","bbox":[-88.652805,42.434912,-88.63315,42.451019],"project_ids":[]},{"fips":"42405","name":"Lawrenceville","type":"city","bbox":[-87.704152,38.713743,-87.663215,38.738474],"project_ids":["BOTB-0003"]},{"fips":"42457","name":"Leaf River","type":"village","bbox":[-89.413742,42.116797,-89.394167,42.129714],"project_ids":[]},{"fips":"42496","name":"Lebanon","type":"city","bbox":[-89.834532,38.561543,-89.793
840065,38.621203],"project_ids":["BOTB-0079","BOTB-0237"]},{"fips":"42587","name":"Lee","type":"village","bbox":[-88.951235,41.788335,-88.935528,41.804469],"project_ids":["BOTB-0266","BOTB-0281"]},{"fips":"42600","name":"Lee Center","type":"cdp","bbox":[-89.286703,41.741832,-89.266062,41.758072],"project_ids":["BOTB-0235","BOTB-0249"]},{"fips":"42756","name":"Leland","type":"village","bbox":[-88.807688,41.60558,-88.789269,41.622985],"project_ids":[]},{"fips":"42769","name":"Leland Grove","type":"city","bbox":[-89.696505,39.77144,-89.671269,39.786834],"project_ids":[]},{"fips":"42795","name":"Lemont","type":"village","bbox":[-88.047103,41.639337,-87.928544,41.711226],"project_ids":["BOTB-0266"]},{"fips":"42834","name":"Lena","type":"village","bbox":[-89.840776,42.356958,-89.797355,42.399594],"project_ids":["BOTB-1005"]},{"fips":"42860","name":"Lenzburg","type":"village","bbox":[-89.829688,38.270779,-89.806742,38.296275],"project_ids":["BOTB-0248","BOTB-1012"]},{"fips":"42912","name":"Leonore","type":"village","bbox":[-88.986053,41.18507,-88.979023,41.19187],"project_ids":["BOTB-0220"]},{"fips":"42938","name":"Lerna","type":"village","bbox":[-88.294727,39.416012,-88.283141,39.419989],"project_ids":[]},{"fips":"42971","name":"Le Roy","type":"city","bbox":[-88.783415,40.31894,-88.748678,40.357507],"project_ids":["BOTB-0266"]},{"fips":"43055","name":"Lewistown","type":"city","bbox":[-90.172814,40.377053,-90.140194,40.416096],"project_ids":["BOTB-0266"]},{"fips":"43094","name":"Lexington","type":"city","bbox":[-88.815447,40.631713,-88.759897,40.664108],"project_ids":["BOTB-0213"]},{"fips":"43133","name":"Liberty","type":"village","bbox":[-91.113191,39.874568,-91.104397,39.895285],"project_ids":[]},{"fips":"43250","name":"Libertyville","type":"village","bbox":[-88.022183,42.245589,-87.92485,42.324286],"project_ids":["BOTB-0266"]},{"fips":"43406","name":"Lily Lake","type":"village","bbox":[-88.488615,41.938999,-88.452716,41.968258],"project_ids":["BOTB-0266"]},{"fips":"43445","name":"Lima","type":"village","bbox":[-91.381774,40.170633,-91.373704,40.185104],"project_ids":[]},{"fips":"43510","name":"Limestone","type":"village","bbox":[-88.010459,41.108204,-87.937727,41.162159],"project_ids":["BOTB-0249","BOTB-1015"]},{"fips":"43536","name":"Lincoln","type":"city","bbox":[-89.416919,40.126366,-89.330477,40.168455],"project_ids":[]},{"fips":"43666","name":"Lincolnshire","type":"village","bbox":[-87.951265,42.17535,-87.883874,42.22187],"project_ids":["BOTB-0266"]},{"fips":"43744","name":"Lincolnwood","type":"village","bbox":[-87.76227,41.997232,-87.709057,42.015423],"project_ids":[]},{"fips":"43770","name":"Lindenhurst","type":"village","bbox":[-88.059065,42.385067,-88.002784,42.440881],"project_ids":["BOTB-0266"]},{"fips":"43900","name":"Lisbon","type":"village","bbox":[-88.498758,41.465904,-88.4332,41.495091],"project_ids":[]},{"fips":"43939","name":"Lisle","type":"village","bbox":[-88.119297,41.759794,-88.049792,41.818481],"project_ids":["BOTB-0266"]},{"fips":"43965","name":"Litchfield","type":"city","bbox":[-89.693257,39.146643,-89.584648,39.262214],"project_ids":["BOTB-0230","BOTB-0264","BOTB-0269"]},{"fips":"43978","name":"Literberry","type":"cdp","bbox":[-90.206827,39.842896,-90.187952,39.858723],"project_ids":[]},{"fips":"44056","name":"Littleton","type":"village","bbox":[-90.633484,40.226714,-90.611169,40.241404],"project_ids":[]},{"fips":"44082","name":"Little York","type":"village","bbox":[-90.755165,41.006533,-90.737319,41.013955],"project_ids":["BOTB-0224"]},{"fips":"44121","name":"Liverpool","type":"village","bbox":[-90.007934,40.387996,-89.997411,40.392478],"project_ids":["BOTB-0266"]},{"fips":"44160","name":"Livingston","type":"village","bbox":[-89.773433,38.959075,-89.754718,38.97598],"project_ids":[]},{"fips":"44173","name":"Loami","type":"village","bbox":[-89.858236,39.663382,-89.838301,39.683909],"project_ids":["BOTB-0230","BOTB-0269"]},{"fips":"44225","name":"Lockport","type":"city","bbox":[-88.075775,41.556091,-87.963479,41.641672],"project_ids":["BOTB-0266"]},{"fips":"44244","name":"Lockport Heights","type":"cdp","bbox":[-88.029805,41.619228,-88.015946,41.624009],"project_ids":["BOTB-0266"]},{"fips":"44264","name":"Loda","type":"village","bbox":[-88.088987,40.504749,-88.060368,40.526544],"project_ids":["BOTB-0213","BOTB-0278"]},{"fips":"44381","name":"Lomax","type":"village","bbox":[-91.094529,40.67273,-91.058227,40.689185],"project_ids":[]},{"fips":"44407","name":"Lombard","type":"village","bbox":[-88.051044,41.831422,-87.98701,41.915062],"project_ids":["BOTB-0266"]},{"fips":"44446","name":"London Mills","type":"village","bbox":[-90.283143,40.705994,-90.253357,40.717479],"project_ids":["BOTB-0224"]},{"fips":"44498","name":"Long Creek","type":"village","bbox":[-88.884508,39.791031,-88.811813,39.820198],"project_ids":["BOTB-0173"]},{"fips":"44524","name":"Long Grove","type":"village","bbox":[-88.043327,42.153686,-87.964971,42.252575],"project_ids":["BOTB-0266"]},{"fips":"44550","name":"Long Lake","type":"cdp","bbox":[-88.149713,42.364636,-88.109285,42.388313],"project_ids":["BOTB-0060"]},{"fips":"44576","name":"Long Point","type":"village","bbox":[-88.89668,41.00148,-88.88867,41.008877],"project_ids":["BOTB-0220"]},{"fips":"44602","name":"Longview","type":"village","bbox":[-88.070763,39.879855,-88.057148,39.894372],"project_ids":[]},{"fips":"44719","name":"Loraine","type":"village","bbox":[-91.232751,40.142839,-91.212157,40.161337],"project_ids":[]},{"fips":"44784","name":"Lorenzo","type":"cdp","bbox":[-88.229464,41.341628,-88.212631,41.350462],"project_ids":[]},{"fips":"44823","name":"Lostant","type":"village","bbox":[-89.0749,41.10454,-89.054067,41.146119],"project_ids":["BOTB-0266"]},{"fips":"44836","name":"Lost Nation","type":"cdp","bbox":[-89.389426,41.902612,-89.345938,41.923864],"project_ids":["BOTB-0249","BOTB-0266"]},{"fips":"44927","name":"Louisville","type":"village","bbox":[-88.522167,38.759698,-88.490939,38.776996],"project_ids":[]},{"fips":"45031","name":"Loves Park","type":"city","bbox":[-89.069963,42.293905,-88.91999,42.37018],"project_ids":["BOTB-0266"]},{"fips":"45044","name":"Lovington","type":"village","bbox":[-88.644055,39.709943,-88.624725,39.721133],"project_ids":[]},{"fips":"45109","name":"Lowpoint","type":"cdp","bbox":[-89.320658,40.868997,-89.308228,40.876359],"project_ids":["BOTB-0053"]},{"fips":"45174","name":"Ludlow","type":"village","bbox":[-88.136573,40.381914,-88.117537,40.397737],"project_ids":[]},{"fips":"45278","name":"Lyndon","type":"village","bbox":[-89.934976,41.707185,-89.910608,41.724999],"project_ids":[]},{"fips":"45343","name":"Lynn Center","type":"cdp","bbox":[-90.362965,41.290129,-90.353741,41.29847],"project_ids":[]},{"fips":"45369","name":"Lynnville","type":"village","bbox":[-90.347859,39.682604,-90.344124,39.688751],"project_ids":[]},{"fips":"45421","name":"Lynwood","type":"village","bbox":[-87.587529,41.491043,-87.525533,41.542877],"project_ids":["BOTB-0266"]},{"fips":"45434","name":"Lyons","type":"village","bbox":[-87.840593,41.798884,-87.801764,41.823715],"project_ids":["BOTB-0266"]}
840,{"fips":"45525","name":"McClure","type":"village","bbox":[-89.44949,37.292043,-89.395851,37.334756],"project_ids":["BOTB-0227"]},{"fips":"45564","name":"McCook","type":"village","bbox":[-87.859459,41.782231,-87.812043,41.806165],"project_ids":["BOTB-0266"]},{"fips":"45616","name":"McCullom Lake","type":"village","bbox":[-88.306263,42.364063,-88.285343,42.375256],"project_ids":[]},{"fips":"45642","name":"Macedonia","type":"village","bbox":[-88.71026,38.04889,-88.699974,38.056336],"project_ids":[]},{"fips":"45694","name":"McHenry","type":"city","bbox":[-88.345638,42.299354,-88.238033,42.371403],"project_ids":["BOTB-0060","BOTB-0195","BOTB-0266"]},{"fips":"45726","name":"Machesney Park","type":"village","bbox":[-89.073953,42.325036,-88.951574,42.401777],"project_ids":["BOTB-0151","BOTB-0266"]},{"fips":"45785","name":"Mackinaw","type":"village","bbox":[-89.37582,40.521491,-89.325738,40.542331],"project_ids":["BOTB-0231"]},{"fips":"45811","name":"McLean","type":"village","bbox":[-89.181864,40.303803,-89.149267,40.326474],"project_ids":["BOTB-0061"]},{"fips":"45824","name":"McLeansboro","type":"city","bbox":[-88.571357,38.071249,-88.511443,38.104178],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"45850","name":"McNabb","type":"village","bbox":[-89.214491,41.172763,-89.203782,41.181863],"project_ids":["BOTB-0266"]},{"fips":"45889","name":"Macomb","type":"city","bbox":[-90.757202,40.431083,-90.618788,40.519814],"project_ids":["BOTB-0224","BOTB-0266"]},{"fips":"45941","name":"Macon","type":"city","bbox":[-89.009757,39.692504,-88.983477,39.727372],"project_ids":["BOTB-0285"]},{"fips":"45993","name":"Madison","type":"city","bbox":[-90.210835,38.638612,-90.077076,38.798193],"project_ids":["BOTB-0269"]},{"fips":"46058","name":"Maeystown","type":"village","bbox":[-90.238707,38.21985,-90.226347,38.231672],"project_ids":["BOTB-1008"]},{"fips":"46110","name":"Magnolia","type":"village","bbox":[-89.201731,41.109011,-89.189478,41.118517],"project_ids":["BOTB-0249","BOTB-0266"]},{"fips":"46136","name":"Mahomet","type":"village","bbox":[-88.445816,40.163854,-88.336532,40.226247],"project_ids":["BOTB-0284","BOTB-1004"]},{"fips":"46214","name":"Makanda","type":"village","bbox":[-89.268547,37.598605,-89.20016,37.645828],"project_ids":["BOTB-0266"]},{"fips":"46240","name":"Malden","type":"village","bbox":[-89.375383,41.420107,-89.36462,41.429664],"project_ids":["BOTB-0032","BOTB-0220"]},{"fips":"46279","name":"Malta","type":"village","bbox":[-88.886784,41.921111,-88.856729,41.937545],"project_ids":["BOTB-0037"]},{"fips":"46331","name":"Manchester","type":"village","bbox":[-90.340253,39.534867,-90.320338,39.549816],"project_ids":["BOTB-0269"]},{"fips":"46357","name":"Manhattan","type":"village","bbox":[-88.020384,41.385834,-87.941055,41.45452],"project_ids":["BOTB-0241","BOTB-0266"]},{"fips":"46383","name":"Manito","type":"village","bbox":[-89.792526,40.405687,-89.765889,40.435133],"project_ids":[]},{"fips":"46422","name":"Manlius","type":"village","bbox":[-89.68337,41.451054,-89.660985,41.461931],"project_ids":["BOTB-0212"]},{"fips":"46487","name":"Mansfield","type":"village","bbox":[-88.519936,40.205523,-88.495427,40.222004],"project_ids":["BOTB-1004"]},{"fips":"46500","name":"Manteno","type":"village","bbox":[-87.881985,41.206714,-87.80992,41.276191],"project_ids":["BOTB-0220","BOTB-0266","BOTB-0278"]},{"fips":"46604","name":"Maple Park","type":"village","bbox":[-88.625665,41.890106,-88.584948,41.930518],"project_ids":["BOTB-0266"]},{"fips":"46643","name":"Mapleton","type":"village","bbox":[-89.737208,40.560128,-89.704365,40.582355],"project_ids":["BOTB-0238","BOTB-0266"]},{"fips":"46695","name":"Maquon","type":"village","bbox":[-90.167619,40.79321,-90.156836,40.801014],"project_ids":[]},{"fips":"46734","name":"Marcelline","type":"cdp","bbox":[-91.371393,40.115139,-91.366008,40.120024],"project_ids":[]},{"fips":"46786","name":"Marengo","type":"city","bbox":[-88.663847,42.171599,-88.575384,42.271533],"project_ids":["BOTB-0128","BOTB-0160","BOTB-0273"]},{"fips":"46825","name":"Marietta","type":"village","bbox":[-90.398047,40.495456,-90.388005,40.503324],"project_ids":[]},{"fips":"46864","name":"Marine","type":"village","bbox":[-89.788013,38.779177,-89.767224,38.794178],"project_ids":["BOTB-0171"]},{"fips":"46916","name":"Marion","type":"city","bbox":[-89.021829,37.664562,-88.877607,37.767971],"project_ids":["BOTB-0222"]},{"fips":"46955","name":"Marissa","type":"village","bbox":[-89.815947,38.234299,-89.734497,38.271722],"project_ids":["BOTB-0248","BOTB-0266","BOTB-1012"]},{"fips":"46981","name":"Mark","type":"village","bbox":[-89.280602,41.250494,-89.240598,41.274872],"project_ids":["BOTB-0220","BOTB-0235","BOTB-0266"]},{"fips":"47007","name":"Markham","type":"city","bbox":[-87.719873,41.582697,-87.650211,41.622362],"project_ids":["BOTB-0263","BOTB-0266"]},{"fips":"47046","name":"Marley","type":"cdp","bbox":[-87.932002,41.544997,-87.919455,41.552187],"project_ids":[]},{"fips":"47072","name":"Maroa","type":"city","bbox":[-88.966396,40.022488,-88.942019,40.052307],"project_ids":["BOTB-0172"]},{"fips":"47111","name":"Marquette Heights","type":"city","bbox":[-89.61986,40.610101,-89.588804,40.629202],"project_ids":[]},{"fips":"47150","name":"Marseilles","type":"city","bbox":[-88.743725,41.267008,-88.637769,41.368612],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"47163","name":"Marshall","type":"city","bbox":[-87.714142,39.371819,-87.66143,39.434673],"project_ids":["BOTB-0253","BOTB-1009","BOTB-1022"]},{"fips":"47254","name":"Martinsville","type":"city","bbox":[-87.90405,39.320227,-87.862953,39.374348],"project_ids":["BOTB-0253","BOTB-1024"]},{"fips":"47280","name":"Martinton","type":"village","bbox":[-87.731103,40.910156,-87.721287,40.919334],"project_ids":["BOTB-0008"]},{"fips":"47397","name":"Maryville","type":"village","bbox":[-90.005894,38.703964,-89.928368,38.745573],"project_ids":["BOTB-0079","BOTB-0171"]},{"fips":"47423","name":"Mascoutah","type":"city","bbox":[-89.831617,38.479912,-89.779327,38.558167],"project_ids":["BOTB-0237","BOTB-1026"]},{"fips":"47449","name":"Mason","type":"town","bbox":[-88.635434,38.944413,-88.616129,38.962897],"project_ids":["BOTB-0226"]},{"fips":"47475","name":"Mason City","type":"city","bbox":[-89.716856,40.193228,-89.678673,40.208695],"project_ids":[]},{"fips":"47527","name":"Matherville","type":"village","bbox":[-90.612388,41.25494,-90.5968,41.264309],"project_ids":["BOTB-0224"]},{"fips":"47540","name":"Matteson","type":"village","bbox":[-87.790416,41.491436,-87.690738,41.529659],"project_ids":["BOTB-0266"]},{"fips":"47553","name":"Mattoon","type":"city","bbox":[-88.419224,39.41045,-88.266515,39.520856],"project_ids":["BOTB-0140"]},{"fips":"47592","name":"Maunie","type":"village","bbox":[-88.04983,38.031048,-88.04247,38.039075],"project_ids":["BOTB-0076"]},{"fips":"47774","name":"Maywood","type":"village","bbox":[-87.863164,41.864183,-87.824852,41.898648],"project_ids":["BOTB-0266"]},{"fips":"47787","name":"Mazon","type":"village","bbox":[-88.433434,41.234989,-88.414138,41.248573],"project_ids":["BOTB-0152"]},{"fips":"48021","name":"Mechanicsburg","type":"village","bbox":[-89.420951,39.791582,-89.389844,39.814321],"project_ids":["BOTB-0135"]},{"fips":"48073","name":"Media","type":"village","bbox":[-90.846411,40.756846,-90.817444,40.777731],"project_ids":[]},{"fips":"48138","name":"Medora","type":"village","bbox":[-90.147121,39.167199,-90.133847,39.181724],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"48242","name":"Melrose Park","type":"village","bbox":[-87.903409,41.888954,-87.827848,41.919051],"project_ids":["BOTB-0266"]},{"fips":"48268","name":"Melvin","type":"village","bbox":[-88.253023,40.56454,-88.236738,40.575295],"project_ids":[]},{"fips":"48307","name":"Mendon","type":"village","bbox":[-91.302308,40.080802,-91.270908,40.09547],"project_ids":[]},{"fips":"48333","name":"Mendota","type":"city","bbox":[-89.147027,41.512769,-89.05035,41.576239],"project_ids":["BOTB-0197","BOTB-0220"]},{"fips":"48359","name":"Menominee","type":"village","bbox":[-90.565129,42.459631,-90.522738,42.492175],"project_ids":[]},{"fips":"48424","name":"Meredosia","type":"village","bbox":[-90.569792,39.823377,-90.544422,39.840835],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"48554","name":"Merrionette Park","type":"village","bbox":[-87.71013,41.676837,-87.695354,41.688033],"project_ids":[]},{"fips":"48567","name":"Merritt","type":"cdp","bbox":[-90.41919,39.713088,-90.414269,39.717756],"project_ids":["BOTB-0275"]},{"fips":"48606","name":"Metamora","type":"village","bbox":[-89.391994,40.782213,-89.345398,40.810217],"project_ids":["BOTB-0266"]},{"fips":"48632","name":"Metcalf","type":"village","bbox":[-87.813796,39.792457,-87.796105,39.807114],"project_ids":[]},{"fips":"48645","name":"Metropolis","type":"city","bbox":[-88.747957,37.135027,-88.672272,37.18703],"project_ids":["BOTB-0001","BOTB-0199","BOTB-0200"]},{"fips":"48671","name":"Mettawa","type":"village","bbox":[-87.941018,42.221114,-87.895653,42.27644],"project_ids":["BOTB-0266"]},{"fips":"48684","name":"Meyer","type":"cdp","bbox":[-91.507081,40.144288,-91.501263,40.154647],"project_ids":[]},{"fips":"48853","name":"Middletown","type":"village","bbox":[-89.595152,40.092331,-89.583927,40.106781],"project_ids":[]},{"fips":"48892","name":"Midlothian","type":"village","bbox":[-87.757001,41.610946,-87.698184,41.637454],"project_ids":["BOTB-0266"]},{"fips":"49009","name":"Milan","type":"village","bbox":[-90.605663,41.409377,-90.522614,41.464061],"project_ids":["BOTB-0224"]},{"fips":"49048","name":"Milford","type":"village","bbox":[-87.705376,40.61798
8401,-87.684293,40.634824],"project_ids":["BOTB-0213"]},{"fips":"49100","name":"Millbrook","type":"village","bbox":[-88.564249,41.588775,-88.524914,41.623024],"project_ids":["BOTB-0266"]},{"fips":"49178","name":"Mill Creek","type":"village","bbox":[-89.258069,37.335556,-89.248792,37.346621],"project_ids":[]},{"fips":"49191","name":"Milledgeville","type":"village","bbox":[-89.788509,41.957105,-89.763847,41.970364],"project_ids":["BOTB-0220"]},{"fips":"49243","name":"Millersburg","type":"cdp","bbox":[-90.828459,41.238006,-90.808703,41.242568],"project_ids":["BOTB-0224"]},{"fips":"49308","name":"Millington","type":"village","bbox":[-88.611714,41.553907,-88.594178,41.57067],"project_ids":["BOTB-0266"]},{"fips":"49347","name":"Mill Shoals","type":"village","bbox":[-88.352721,38.241131,-88.333251,38.263879],"project_ids":["BOTB-0217","BOTB-0269"]},{"fips":"49386","name":"Millstadt","type":"village","bbox":[-90.107039,38.420627,-90.049904,38.484223],"project_ids":["BOTB-1026"]},{"fips":"49477","name":"Milton","type":"village","bbox":[-90.657124,39.560142,-90.641781,39.571165],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"49516","name":"Mineral","type":"village","bbox":[-89.843418,41.377395,-89.831229,41.387403],"project_ids":["BOTB-0266"]},{"fips":"49555","name":"Minier","type":"village","bbox":[-89.320737,40.424547,-89.30693,40.441332],"project_ids":["BOTB-0103"]},{"fips":"49568","name":"Minonk","type":"city","bbox":[-89.056167,40.892958,-89.02476,40.926172],"project_ids":["BOTB-0266"]},{"fips":"49607","name":"Minooka","type":"village","bbox":[-88.340023,41.418015,-88.236627,41.491498],"project_ids":["BOTB-0266"]},{"fips":"49698","name":"Mitchell","type":"cdp","bbox":[-90.092787,38.757824,-90.071415,38.769019],"project_ids":[]},{"fips":"49802","name":"Modesto","type":"village","bbox":[-89.986831,39.47084,-89.974836,39.485641],"project_ids":["BOTB-0230"]},{"fips":"49854","name":"Mokena","type":"village","bbox":[-87.927988,41.491693,-87.811892,41.553076],"project_ids":["BOTB-0266"]},{"fips":"49867","name":"Moline","type":"city","bbox":[-90.539563,41.420958,-90.432092,41.518428],"project_ids":["BOTB-0224"]},{"fips":"49893","name":"Momence","type":"city","bbox":[-87.686436,41.149611,-87.651159,41.1767],"project_ids":["BOTB-0249","BOTB-1015"]},{"fips":"49945","name":"Monee","type":"village","bbox":[-87.783663,41.397656,-87.70913,41.434206],"project_ids":["BOTB-0266","BOTB-0278"]},{"fips":"50010","name":"Monmouth","type":"city","bbox":[-90.667471,40.891754,-90.611594,40.935469],"project_ids":["BOTB-0224"]},{"fips":"50062","name":"Monroe Center","type":"village","bbox":[-89.012319,42.093518,-88.978067,42.108273],"project_ids":["BOTB-0220"]},{"fips":"50218","name":"Montgomery","type":"village","bbox":[-88.429196,41.697848,-88.28194,41.744853],"project_ids":["BOTB-0273"]},{"fips":"50244","name":"Monticello","type":"city","bbox":[-88.607928,40.003013,-88.545827,40.06881],"project_ids":["BOTB-1004"]},{"fips":"50283","name":"Montrose","type":"village","bbox":[-88.388578,39.155066,-88.367623,39.176551],"project_ids":[]},{"fips":"50452","name":"Moro","type":"cdp","bbox":[-90.032429,38.922251,-90.019737,38.929014],"project_ids":["BOTB-0260"]},{"fips":"50491","name":"Morris","type":"city","bbox":[-88.489308,41.34925,-88.364733,41.43773],"project_ids":[]},{"fips":"50530","name":"Morrison","type":"city","bbox":[-89.984534,41.791937,-89.937767,41.82282],"project_ids":["BOTB-0220"]},{"fips":"50543","name":"Morrisonville","type":"village","bbox":[-89.478373,39.413882,-89.448842,39.433009],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"50621","name":"Morton","type":"village","bbox":[-89.516675,40.558082,-89.421764,40.662185],"project_ids":["BOTB-0069","BOTB-0211","BOTB-0231"]},{"fips":"50647","name":"Morton Grove","type":"village","bbox":[-87.825819,42.02276,-87.76194,42.056534],"project_ids":["BOTB-0266"]},{"fips":"50699","name":"Mossville","type":"cdp","bbox":[-89.582884,40.807025,-89.556598,40.825462],"project_ids":["BOTB-0266"]},{"fips":"50751","name":"Mound City","type":"city","bbox":[-89.17756,37.069691,-89.151251,37.097061],"project_ids":["BOTB-0227"]},{"fips":"50777","name":"Mounds","type":"city","bbox":[-89.213015,37.106675,-89.189646,37.122188],"project_ids":["BOTB-0227"]},{"fips":"50790","name":"Mound Station","type":"village","bbox":[-90.883343,40.002666,-90.864141,40.010399],"project_ids":[]},{"fips":"50829","name":"Mount Auburn","type":"village","bbox":[-89.270339,39.757367,-89.251418,39.772478],"project_ids":["BOTB-0287"]},{"fips":"50868","name":"Mount Carmel","type":"city","bbox":[-87.803755,38.395573,-87.743504,38.446064],"project_ids":["BOTB-0005"]},{"fips":"50881","name":"Mount Carroll","type":"city","bbox":[-89.992392,42.077055,-89.960132,42.109219],"project_ids":[]},{"fips":"50920","name":"Mount Clare","type":"village","bbox":[-89.83941,39.089554,-89.811533,39.109316],"project_ids":["BOTB-0260"]},{"fips":"50933","name":"Mount Erie","type":"village","bbox":[-88.239597,38.510869,-88.224676,38.518363],"project_ids":[]},{"fips":"50998","name":"Mount Morris","type":"village","bbox":[-89.445513,42.035217,-89.410226,42.06194],"project_ids":["BOTB-1006"]},{"fips":"51024","name":"Mount Olive","type":"city","bbox":[-89.750733,39.064265,-89.714959,39.083425],"project_ids":["BOTB-0260"]},{"fips":"51089","name":"Mount Prospect","type":"village","bbox":[-87.975592,42.020741,-87.888623,42.102387],"project_ids":["BOTB-0266"]},{"fips":"51128","name":"Mount Pulaski","type":"city","bbox":[-89.294976,40.000388,-89.272764,40.023434],"project_ids":[]},{"fips":"51154","name":"Mount Sterling","type":"city","bbox":[-90.778578,39.976051,-90.749885,39.99
840631],"project_ids":[]},{"fips":"51180","name":"Mount Vernon","type":"city","bbox":[-88.975773,38.272955,-88.829967,38.347458],"project_ids":["BOTB-0074","BOTB-0239"]},{"fips":"51206","name":"Mount Zion","type":"village","bbox":[-88.915526,39.750724,-88.858527,39.804662],"project_ids":["BOTB-0173","BOTB-0285"]},{"fips":"51232","name":"Moweaqua","type":"village","bbox":[-89.053354,39.610429,-89.002501,39.639562],"project_ids":["BOTB-0266","BOTB-0283"]},{"fips":"51271","name":"Muddy","type":"village","bbox":[-88.52181,37.759414,-88.506864,37.772883],"project_ids":[]},{"fips":"51284","name":"Mulberry Grove","type":"village","bbox":[-89.278439,38.917284,-89.256714,38.931875],"project_ids":["BOTB-0243"]},{"fips":"51310","name":"Mulkeytown","type":"cdp","bbox":[-89.117624,37.968334,-89.104613,37.975722],"project_ids":["BOTB-0075"]},{"fips":"51336","name":"Muncie","type":"village","bbox":[-87.849861,40.114008,-87.835311,40.117925],"project_ids":[]},{"fips":"51349","name":"Mundelein","type":"village","bbox":[-88.072496,42.227642,-87.93845,42.306126],"project_ids":["BOTB-0266"]},{"fips":"51453","name":"Murphysboro","type":"city","bbox":[-89.366553,37.748164,-89.278528,37.789312],"project_ids":["BOTB-0077"]},{"fips":"51479","name":"Murrayville","type":"village","bbox":[-90.260898,39.574394,-90.241824,39.589069],"project_ids":[]},{"fips":"51544","name":"Nachusa","type":"cdp","bbox":[-89.400483,41.830173,-89.370956,41.837578],"project_ids":["BOTB-0220","BOTB-0249"]},{"fips":"51622","name":"Naperville","type":"city","bbox":[-88.235347,41.666244,-88.088513,41.821871],"project_ids":["BOTB-0266"]},{"fips":"51648","name":"Naplate","type":"village","bbox":[-88.886769,41.328712,-88.873254,41.335673],"project_ids":[]},{"fips":"51661","name":"Naples","type":"town","bbox":[-90.616117,39.74678,-90.60086,39.762808],"project_ids":["BOTB-0275"]},{"fips":"51700","name":"Nashville","type":"city","bbox":[-89.404073,38.327536,-89.350323,38.393873],"project_ids":["BOTB-0154"]},{"fips":"51726","name":"Nason","type":"city","bbox":[-88.976661,38.169131,-88.957751,38.183711],"project_ids":["BOTB-0074"]},{"fips":"51791","name":"Nauvoo","type":"city","bbox":[-91.406851,40.523032,-91.360861,40.568694],"project_ids":["BOTB-0138"]},{"fips":"51882","name":"Nebo","type":"village","bbox":[-90.794444,39.435735,-90.781346,39.447015],"project_ids":["BOTB-0266","BOTB-0275"]},{"fips":"51934","name":"Nekoma","type":"cdp","bbox":[-90.19448,41.169061,-90.18731,41.174582],"project_ids":[]},{"fips":"51947","name":"Nelson","type":"village","bbox":[-89.611604,41.79244,-89.592395,41.801538],"project_ids":[]},{"fips":"51986","name":"Neoga","type":"city","bbox":[-88.467012,39.312732,-88.427575,39.332283],"project_ids":["BOTB-0262"]},{"fips":"51999","name":"Neponset","type":"village","bbox":[-89.799218,41.289411,-89.779592,41.304335],"project_ids":[]},{"fips":"52103","name":"Newark","type":"village","bbox":[-88.590078,41.526586,-88.569445,41.54821],"project_ids":[]},{"fips":"52116","name":"New Athens","type":"village","bbox":[-89.900159,38.305925,-89.852723,38.335373],"project_ids":["BOTB-0013","BOTB-1026"]},{"fips":"52142","name":"New Baden","type":"village","bbox":[-89.736644,38.52803,-89.684725,38.546018],"project_ids":["BOTB-0237"]},{"fips":"52155","name":"New Bedford","type":"village","bbox":[-89.722391,41.507524,-89.715103,41.514895],"project_ids":[]},{"fips":"52168","name":"New Berlin","type":"village","bbox":[-89.930694,39.718487,-89.900583,39.733153],"project_ids":["BOTB-0261"]},{"fips":"52220","name":"New Boston","type":"city","bbox":[-91.014718,41.158344,-90.986031,41.180277],"project_ids":["BOTB-0224"]},{"fips":"52285","name":"New Burnside","type":"village","bbox":[-88.782062,37.570898,-88.763158,37.586432],"project_ids":["BOTB-0075"]},{"fips":"52311","name":"New Canton","type":"town","bbox":[-91.106806,39.628773,-91.085862,39.64413],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"52415","name":"New Douglas","type":"village","bbox":[-89.675932,38.960831,-89.657137,38.977545],"project_ids":["BOTB-0168"]},{"fips":"52467","name":"New Grand Chain","type":"village","bbox":[-89.028267,37.24672,-88.99998,37.262465],"project_ids":["BOTB-0227"]},{"fips":"52506","name":"New Haven","type":"village","bbox":[-88.138918,37.893036,-88.11777,37.916118],"project_ids":["BOTB-0076","BOTB-0225"]}
840,{"fips":"52545","name":"New Holland","type":"village","bbox":[-89.589509,40.179373,-89.572889,40.18834],"project_ids":[]},{"fips":"52584","name":"New Lenox","type":"village","bbox":[-88.026096,41.460788,-87.907433,41.566506],"project_ids":["BOTB-0266"]},{"fips":"52623","name":"Newman","type":"city","bbox":[-88.003862,39.787601,-87.977768,39.803266],"project_ids":["BOTB-0003"]},{"fips":"52701","name":"New Milford","type":"village","bbox":[-89.084822,42.159043,-89.02388,42.194426],"project_ids":["BOTB-0220","BOTB-0228"]},{"fips":"52714","name":"New Minden","type":"village","bbox":[-89.375346,38.434164,-89.364389,38.442938],"project_ids":["BOTB-1026"]},{"fips":"52805","name":"New Salem","type":"village","bbox":[-90.857527,39.700212,-90.838166,39.715071],"project_ids":["BOTB-0275"]},{"fips":"52844","name":"Newton","type":"city","bbox":[-88.192695,38.973033,-88.144285,38.998089],"project_ids":[]},{"fips":"52961","name":"Niantic","type":"village","bbox":[-89.174855,39.846095,-89.156545,39.86494],"project_ids":["BOTB-0172"]},{"fips":"53000","name":"Niles","type":"village","bbox":[-87.855014,41.999985,-87.767142,42.062016],"project_ids":[]},{"fips":"53039","name":"Nilwood","type":"town","bbox":[-89.81468,39.391667,-89.802852,39.406334],"project_ids":["BOTB-0269"]},{"fips":"53078","name":"Niota","type":"cdp","bbox":[-91.299414,40.609682,-91.280478,40.623818],"project_ids":["BOTB-0138"]},{"fips":"53143","name":"Noble","type":"village","bbox":[-88.232697,38.689964,-88.213388,38.704899],"project_ids":[]},{"fips":"53169","name":"Nokomis","type":"city","bbox":[-89.298017,39.290633,-89.270935,39.308844],"project_ids":[]},{"fips":"53195","name":"Nora","type":"village","bbox":[-89.955254,42.447409,-89.934079,42.463017],"project_ids":[]},{"fips":"53234","name":"Normal","type":"town","bbox":[-89.083473,40.493899,-88.903021,40.561684],"project_ids":["BOTB-0089","BOTB-0266"]},{"fips":"53377","name":"Norridge","type":"village","bbox":[-87.846564,41.952391,-87.801301,41.975397],"project_ids":[]},{"fips":"53390","name":"Norris","type":"village","bbox":[-90.0378,40.622103,-90.022831,40.629359],"project_ids":["BOTB-0266"]},{"fips":"53403","name":"Norris City","type":"village","bbox":[-88.337853,37.96174,-88.319343,37.988215],"project_ids":["BOTB-0076"]},{"fips":"53442","name":"North Aurora","type":"village","bbox":[-88.400804,41.788791,-88.298613,41.832968],"project_ids":["BOTB-0266","BOTB-0273"]},{"fips":"53455","name":"North Barrington","type":"village","bbox":[-88.160038,42.179042,-88.110796,42.2417],"project_ids":["BOTB-0266"]},{"fips":"53481","name":"Northbrook","type":"village","bbox":[-87.892357,42.098324,-87.780301,42.152998],"project_ids":["BOTB-0266"]},{"fips":"53559","name":"North Chicago","type":"city","bbox":[-87.899504,42.287764,-87.824646,42.34152],"project_ids":["BOTB-0266"]},{"fips":"53585","name":"North City","type":"village","bbox":[-89.078898,37.979571,-89.049662,38.005079],"project_ids":["BOTB-0075"]},{"fips":"53663","name":"Northfield","type":"village","bbox":[-87.801559,42.08487,-87.751421,42.119598],"project_ids":["BOTB-0266"]},{"fips":"53793","name":"North Henderson","type":"village","bbox":[-90.478769,41.085638,-90.467304,41.094414],"project_ids":["BOTB-0224"]},{"fips":"53871","name":"Northlake","type":"city","bbox":[-87.920562,41.899696,-87.882872,41.937045],"project_ids":["BOTB-0266"]},{"fips":"54092","name":"North Pekin","type":"village","bbox":[-89.636832,40.600022,-89.607817,40.626705],"project_ids":["BOTB-0266"]},{"fips":"54144","name":"North Riverside","type":"village","bbox":[-87.855227,41.835301,-87.80348,41.857747],"project_ids":["BOTB-0266"]},{"fips":"54222","name":"North Utica","type":"village","bbox":[-89.038889,41.312167,-88.990881,41.389818],"project_ids":["BOTB-0147","BOTB-0266"]},{"fips":"54404","name":"Norwood","type":"village","bbox":[-89.706222,40.704473,-89.691438,40.711032],"project_ids":[]},{"fips":"54534","name":"Oak Brook","type":"village","bbox":[-87.99679,41.81294,-87.91861,41.86188],"project_ids":["BOTB-0266"]},{"fips":"54560","name":"Oakbrook Terrace","type":"city","bbox":[-87.992481,41.844638,-87.948558,41.868261],"project_ids":["BOTB-0266"]},{"fips":"54586","name":"Oakdale","type":"village","bbox":[-89.520039,38.255725,-89.491998,38.27551],"project_ids":[]}
840,{"fips":"54625","name":"Oakford","type":"village","bbox":[-89.971656,40.094802,-89.957823,40.106145],"project_ids":["BOTB-0221"]},{"fips":"54638","name":"Oak Forest","type":"city","bbox":[-87.794557,41.575003,-87.713863,41.62868],"project_ids":["BOTB-0266"]},{"fips":"54703","name":"Oak Grove","type":"village","bbox":[-90.587076,41.406887,-90.56295,41.421113],"project_ids":["BOTB-0224"]},{"fips":"54781","name":"Oakland","type":"city","bbox":[-88.045286,39.648288,-88.014425,39.667036],"project_ids":[]},{"fips":"54820","name":"Oak Lawn","type":"village","bbox":[-87.798757,41.683381,-87.720317,41.734524],"project_ids":["BOTB-0266"]},{"fips":"54885","name":"Oak Park","type":"village","bbox":[-87.805748,41.864977,-87.774139,41.909254],"project_ids":["BOTB-0266"]},{"fips":"54924","name":"Oak Run","type":"cdp","bbox":[-90.165817,40.945588,-90.101383,40.979396],"project_ids":[]},{"fips":"55002","name":"Oakwood","type":"village","bbox":[-87.784953,40.092059,-87.768256,40.128346],"project_ids":["BOTB-0215"]},{"fips":"55041","name":"Oakwood Hills","type":"village","bbox":[-88.257395,42.240436,-88.222682,42.256185],"project_ids":["BOTB-0060"]},{"fips":"55106","name":"Oblong","type":"village","bbox":[-87.927462,38.994495,-87.899494,39.008852],"project_ids":["BOTB-0257","BOTB-0269"]},{"fips":"55132","name":"Oconee","type":"village","bbox":[-89.112397,39.280837,-89.100134,39.290378],"project_ids":["BOTB-0269"]},{"fips":"55171","name":"Odell","type":"village","bbox":[-88.533611,40.994842,-88.501599,41.01056],"project_ids":["BOTB-0266"]},{"fips":"55210","name":"Odin","type":"village","bbox":[-89.063848,38.606808,-89.038683,38.626748],"project_ids":["BOTB-0250"]},{"fips":"55249","name":"O'Fallon","type":"city","bbox":[-89.966326,38.547351,-89.852854,38.650085],"project_ids":["BOTB-0079","BOTB-0237"]},{"fips":"55275","name":"Ogden","type":"village","bbox":[-87.966368,40.108853,-87.947659,40.12264],"project_ids":["BOTB-0284"]},{"fips":"55353","name":"Oglesby","type":"city","bbox":[-89.105644,41.272814,-89.030739,41.31046],"project_ids":["BOTB-0220"]},{"fips":"55379","name":"Ohio","type":"village","bbox":[-89.471292,41.549278,-89.451957,41.561078],"project_ids":["BOTB-0032","BOTB-0080","BOTB-0217","BOTB-0266"]},{"fips":"55418","name":"Ohlman","type":"village","bbox":[-89.22353,39.337903,-89.214368,39.34887],"project_ids":[]},{"fips":"55470","name":"Okawville","type":"village","bbox":[-89.562613,38.418456,-89.532005,38.448505],"project_ids":["BOTB-1026"]},{"fips":"55639","name":"Old Mill Creek","type":"village","bbox":[-88.014635,42.395388,-87.947539,42.483955],"project_ids":["BOTB-0232","BOTB-0266"]},{"fips":"55717","name":"Old Ripley","type":"village","bbox":[-89.574957,38.888559,-89.568584,38.897298],"project_ids":["BOTB-0168"]},{"fips":"55756","name":"Old Shawneetown","type":"village","bbox":[-88.147579,37.689065,-88.130972,37.70
8405084],"project_ids":["BOTB-0266"]},{"fips":"55847","name":"Olive Branch","type":"cdp","bbox":[-89.388119,37.150935,-89.31618,37.196242],"project_ids":["BOTB-0227","BOTB-0269"]},{"fips":"55886","name":"Olivet","type":"cdp","bbox":[-87.653808,39.933707,-87.617343,39.954912],"project_ids":[]},{"fips":"55899","name":"Olmsted","type":"village","bbox":[-89.104712,37.164621,-89.062721,37.196184],"project_ids":["BOTB-0227"]},{"fips":"55912","name":"Olney","type":"city","bbox":[-88.13132,38.697576,-88.047803,38.758453],"project_ids":["BOTB-0067"]},{"fips":"55938","name":"Olympia Fields","type":"village","bbox":[-87.714426,41.503965,-87.664645,41.529137],"project_ids":[]},{"fips":"56003","name":"Omaha","type":"village","bbox":[-88.312145,37.882958,-88.297084,37.897751],"project_ids":["BOTB-0076"]},{"fips":"56081","name":"Onarga","type":"village","bbox":[-88.027939,40.70187,-87.993833,40.72504],"project_ids":["BOTB-0278"]},{"fips":"56159","name":"Oneida","type":"city","bbox":[-90.234495,41.063158,-90.21474,41.079688],"project_ids":[]},{"fips":"56198","name":"Opdyke","type":"cdp","bbox":[-88.795624,38.252426,-88.781715,38.264949],"project_ids":[]},{"fips":"56211","name":"Ophiem","type":"cdp","bbox":[-90.397336,41.245194,-90.367973,41.263176],"project_ids":[]},{"fips":"56237","name":"Oquawka","type":"village","bbox":[-90.962916,40.924441,-90.937889,40.954475],"project_ids":["BOTB-0224"]},{"fips":"56341","name":"Orangeville","type":"village","bbox":[-89.655705,42.455281,-89.637474,42.47536],"project_ids":["BOTB-1005"]},{"fips":"56471","name":"Oreana","type":"village","bbox":[-88.878797,39.92998,-88.856652,39.948557],"project_ids":["BOTB-0027"]},{"fips":"56484","name":"Oregon","type":"city","bbox":[-89.352791,41.999462,-89.310394,42.026457],"project_ids":[]},{"fips":"56536","name":"Orient","type":"city","bbox":[-88.98639,37.9102,-88.967306,37.926965],"project_ids":["BOTB-0003"]},{"fips":"56601","name":"Orion","type":"village","bbox":[-90.391205,41.340996,-90.358339,41.362015],"project_ids":[]},{"fips":"56627","name":"Orland Hills","type":"village","bbox":[-87.861868,41.579573,-87.832454,41.603731],"project_ids":["BOTB-0266"]},{"fips":"56640","name":"Orland Park","type":"village","bbox":[-87.911636,41.552679,-87.789731,41.652588],"project_ids":["BOTB-0266"]},{"fips":"56796","name":"Osco","type":"cdp","bbox":[-90.28972,41.342264,-90.277925,41.350863],"project_ids":[]},{"fips":"56887","name":"Oswego","type":"village","bbox":[-88.41841,41.63725,-88.260275,41.719315],"project_ids":[]},{"fips":"56926","name":"Ottawa","type":"city","bbox":[-88.889085,41.309623,-88.743725,41.397842],"project_ids":["BOTB-0220","BOTB-0235","BOTB-0266"]},{"fips":"56978","name":"Otterville","type":"town","bbox":[-90.40776,39.043488,-90.38897,39.058117],"project_ids":[]},{"fips":"57043","name":"Owaneco","type":"village","bbox":[-89.204292,39.4765,-89.185475,39.487751],"project_ids":[]},{"fips":"57121","name":"Oxville","type":"cdp","bbox":[-90.563394,39.703469,-90.557567,39.706963],"project_ids":[]},{"fips":"57160","name":"Paderborn","type":"cdp","bbox":[-90.051353,38.355841,-90.041461,38.363392],"project_ids":["BOTB-1026"]},{"fips":"57225","name":"Palatine","type":"village","bbox":[-88.094968,42.062331,-88.003271,42.153848],"project_ids":["BOTB-0266"]},{"fips":"57277","name":"Palestine","type":"village","bbox":[-87.626944,38.99628,-87.59961,39.007248],"project_ids":[]},{"fips":"57303","name":"Palmer","type":"village","bbox":[-89.417358,39.451316,-89.398453,39.466044],"project_ids":["BOTB-0266"]},{"fips":"57329","name":"Palmyra","type":"village","bbox":[-90.005471,39.427136,-89.986273,39.442519],"project_ids":["BOTB-0230"]},{"fips":"57342","name":"Paloma","type":"cdp","bbox":[-91.205598,40.019162,-91.191134,40.031976],"project_ids":[]},{"fips":"57381","name":"Palos Heights","type":"city","bbox":[-87.820163,41.645672,-87.768567,41.684432],"project_ids":["BOTB-0266"]},{"fips":"57394","name":"Palos Hills","type":"city","bbox":[-87.846842,41.680706,-87.797857,41.718198],"project_ids":["BOTB-0266"]},{"fips":"57407","name":"Palos Park","type":"village","bbox":[-87.967208,41.649768,-87.810733,41.692374],"project_ids":["BOTB-0266"]},{"fips":"57472","name":"Pana","type":"city","bbox":[-89.118722,39.35816,-89.009402,39.406145],"project_ids":["BOTB-0283"]},{"fips":"57498","name":"Panama","type":"village","bbox":[-89.529483,39.020926,-89.518861,39.037295],"project_ids":["BOTB-0168"]},{"fips":"57524","name":"Panola","type":"village","bbox":[-89.025495,40.773342,-89.011317,40.790521],"project_ids":["BOTB-1018"]},{"fips":"57576","name":"Papineau","type":"village","bbox":[-87.720514,40.96285,-87.712667,40.973203],"project_ids":["BOTB-0213"]},{"fips":"57628","name":"Paris","type":"city","bbox":[-87.719201,39.581563,-87.649207,39.649894],"project_ids":["BOTB-0278"]},{"fips":"57654","name":"Park City","type":"city","bbox":[-87.90725,42.341573,-87.877854,42.363325],"project_ids":["BOTB-0274"]},{"fips":"57693","name":"Parkersburg","type":"village","bbox":[-88.063787,38.580793,-88.049884,38.599314],"project_ids":["BOTB-0269"]},{"fips":"57732","name":"Park Forest","type":"village","bbox":[-87.709872,41.449079,-87.656042,41.506176],"project_ids":["BOTB-0266"]},{"fips":"57875","name":"Park Ridge","type":"city","bbox":[-87.869829,41.984509,-87.816269,42.04717],"project_ids":["BOTB-0266"]},{"fips":"58057","name":"Patoka","type":"village","bbox":[-89.105543,38.745919,-89.086569,38.766392],"project_ids":["BOTB-0250"]},{"fips":"58174","name":"Pawnee","type":"village","bbox":[-89.608943,39.58224,-89.567557,39.608965],"project_ids":[]},{"fips":"58226","name":"Paw Paw","type":"village","bbox":[-88.99312,41.681693,-88.968635,41.696521],"project_ids":["BOTB-0281"]},{"fips":"58239","name":"Paxton","type":"city","bbox":[-88.13188,40.443995,-88.078776,40.469987],"project_ids":["BOTB-0213"]},{"fips":"58265","name":"Payson","type":"village","bbox":[-91.256346,39.807218,-91.232188,39.826395],"project_ids":[]},{"fips":"58343","name":"Pearl","type":"village","bbox":[-90.638438,39.451577,-90.605505,39.467078],"project_ids":["BOTB-0266"]},{"fips":"58369","name":"Pearl City","type":"village","bbox":[-89.835889,42.256396,-89.820644,42.276379],"project_ids":[]},{"fips":"58408","name":"Pecatonica","type":"village","bbox":[-89.372263,42.298192,-89.341071,42.318503],"project_ids":["BOTB-0220"]},{"fips":"58447","name":"Pekin","type":"city","bbox":[-89.675118,40.53085,-89.574485,40.615393],"project_ids":["BOTB-0041","BOTB-0266"]},{"fips":"58577","name":"Penfield","type":"cdp","bbox":[-87.949236,40.298919,-87.936269,40.309503],"project_ids":["BOTB-0284"]},{"fips":"59000","name":"Peoria","type":"city","bbox":[-89.69887,40.652235,-89.546414,40.844242],"project_ids":["BOTB-0216","BOTB-0242","BOTB-0266"]},{"fips":"59026","name":"Peoria Heights","type":"village","bbox":[-89.59095,40.728751,-89.54103,40.760719],"project_ids":[]},{"fips":"59052","name":"Peotone","type":"village","bbox":[-87.823906,41.313213,-87.765959,41.339591],"project_ids":["BOTB-0241"]},{"fips":"59104","name":"Percy","type":"village","bbox":[-89.633375,38.008732,-89.60429,38.021167],"project_ids":["BOTB-0051"]},{"fips":"59156","name":"Perry","type":"village","bbox":[-90.75515,39.777937,-90.73807,39.786293],"project_ids":[]},{"fips":"59234","name":"Peru","type":"city","bbox":[-89.182727,41.309772,-89.105732,41.383875],"project_ids":["BOTB-0147","BOTB-0220"]},{"fips":"59273","name":"Pesotum","type":"village","bbox":[-88.283745,39.901746,-88.264916,39.922624],"project_ids":[]},{"fips":"59312","name":"Petersburg","type":"city","bbox":[-89.862393,40.003537,-89.807991,40.02581],"project_ids":[]},{"fips":"59520","name":"Phillipstown","type":"village","bbox":[-88.023185,38.139248,-88.013038,38.146478],"project_ids":[]},{"fips":"59533","name":"Philo","type":"village","bbox":[-88.166392,39.996389,-88.142681,40.01204],"project_ids":["BOTB-0284"]},{"fips":"59572","name":"Phoenix","type":"village","bbox":[-87.636646,41.604201,-87.624118,41.619309],"project_ids":[]},{"fips":"59709","name":"Pierron","type":"village","bbox":[-89.602684,38.772221,-89.5158,38.783316],"project_ids":[]},{"fips":"59884","name":"Pinckneyville","type":"city","bbox":[-89.415012,38.042673,-89.315167,38.116583],"project_ids":["BOTB-0077"]},{"fips":"59988","name":"Pingree Grove","type":"village","bbox":[-88.4686,42.061386,-88.409507,42.110393],"project_ids":["BOTB-0266","BOTB-1003"]},{"fips":"60079","name":"Piper City","type":"village","bbox":[-88.196956,40.74817,-88.180707,40.765378],"project_ids":[]},{"fips":"60144","name":"Pistakee Highlands","type":"cdp","bbox":[-88.227246,42.385562,-88.198804,42.415577],"project_ids":[]},{"fips":"60209","name":"Pittsburg","type":"village","bbox":[-88.864129,37.766643,-88.835747,37.790291],"project_ids":[]},{"fips":"60222","name":"Pittsfield","type":"city","bbox":[-90.850766,39.592974,-90.740901,39.656619],"project_ids":["BOTB-0269","BOTB-0275"]},{"fips":"60287","name":"Plainfield","type":"village","bbox":[-88.302589,41.569223,-88.162889,41.680185],"project_ids":["BOTB-0266"]},{"fips":"60339","name":"Plainville","type":"village","bbox":[-91.189965,39.778281,-91.175754,39.78903],"project_ids":["BOTB-0266"]},{"fips":"60352","name":"Plano","type":"city","bbox":[-88.575093,41.647361,-88.487901,41.720031],"project_ids":["BOTB-0266"]},{"fips":"60391","name":"Plattville","type":"village","bbox":[-88.404873,41.525174,-88.365899,41.54803],"project_ids":[]},{"fips":"60534","name":"Pleasant Hill","type":"village","bbox":[-90.885802,39.434468,-90.860838,39.452135],"project_ids":["BOTB-0048","BOTB-0275"]},{"fips":"60599","name":"Pleasant Plains","type":"village","bbox":[-89.929833,39.865472,-89.901149,39.885841],"project_ids":["BOTB-0266"]},{"fips":"60826","name":"Plum Valley","type":"cdp","bbox":[-87.561961,41.446844,-87.525671,41.470283],"project_ids":["BOTB-0266"]},{"fips":"60833","name":"Plymouth","type":"village","bbox":[-90.924158,40.284057,-90.905738,40.299301],"project_ids":[]},{"fips":"60872","name":"Pocahontas","type":"village","bbox":[-89.5
84052621,38.8181,-89.529127,38.829115],"project_ids":[]},{"fips":"60937","name":"Polo","type":"city","bbox":[-89.602217,41.973893,-89.564226,41.995778],"project_ids":["BOTB-0266"]},{"fips":"61015","name":"Pontiac","type":"city","bbox":[-88.682341,40.858901,-88.60366,40.935845],"project_ids":["BOTB-0278"]},{"fips":"61067","name":"Pontoon Beach","type":"village","bbox":[-90.106127,38.666669,-90.011887,38.775023],"project_ids":["BOTB-0171","BOTB-0269"]},{"fips":"61080","name":"Pontoosuc","type":"village","bbox":[-91.228395,40.618564,-91.195505,40.638473],"project_ids":[]},{"fips":"61145","name":"Poplar Grove","type":"village","bbox":[-88.880913,42.305665,-88.805094,42.386019],"project_ids":["BOTB-0002"]},{"fips":"61216","name":"Port Barrington","type":"village","bbox":[-88.210372,42.227306,-88.174077,42.256135],"project_ids":["BOTB-0060"]},{"fips":"61223","name":"Port Byron","type":"village","bbox":[-90.338921,41.590646,-90.306101,41.637469],"project_ids":[]},{"fips":"61314","name":"Posen","type":"village","bbox":[-87.698514,41.619152,-87.674625,41.640868],"project_ids":[]},{"fips":"61366","name":"Potomac","type":"village","bbox":[-87.808603,40.299761,-87.785425,40.314243],"project_ids":["BOTB-0284"]},{"fips":"61548","name":"Prairie City","type":"village","bbox":[-90.474697,40.613444,-90.454103,40.62841],"project_ids":["BOTB-0224"]},{"fips":"61639","name":"Prairie du Rocher","type":"village","bbox":[-90.107654,38.072712,-90.08846,38.08987],"project_ids":["BOTB-1008"]},{"fips":"61678","name":"Prairie Grove","type":"village","bbox":[-88.301841,42.248623,-88.227977,42.29949],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"61743","name":"Prairietown","type":"cdp","bbox":[-89.927025,38.962948,-89.918576,38.970318],"project_ids":[]},{"fips":"61782","name":"Preemption","type":"cdp","bbox":[-90.591831,41.305404,-90.567044,41.320477],"project_ids":["BOTB-0224"]},{"fips":"61821","name":"Prestbury","type":"cdp","bbox":[-88.43427,41.778247,-88.4094,41.790535],"project_ids":[]},{"fips":"61860","name":"Preston Heights","type":"cdp","bbox":[-88.102357,41.487836,-88.061239,41.507149],"project_ids":["BOTB-0266"]},{"fips":"61899","name":"Princeton","type":"city","bbox":[-89.499483,41.346397,-89.422332,41.423061],"project_ids":["BOTB-0003","BOTB-0181"]},{"fips":"61925","name":"Princeville","type":"village","bbox":[-89.767327,40.922821,-89.744336,40.952121],"project_ids":[]},{"fips":"61977","name":"Prophetstown","type":"city","bbox":[-89.949956,41.661934,-89.912814,41.682381],"project_ids":["BOTB-0268"]},{"fips":"62016","name":"Prospect Heights","type":"city","bbox":[-87.969069,42.0878,-87.878249,42.124357],"project_ids":["BOTB-0266"]},{"fips":"62211","name":"Pulaski","type":"village","bbox":[-89.217208,37.206813,-89.198749,37.228926],"project_ids":[]},{"fips":"62367","name":"Quincy","type":"city","bbox":[-91.428424,39.897206,-91.31581,39.973067],"project_ids":["BOTB-0266"]},{"fips":"62523","name":"Radom","type":"village","bbox":[-89.201336,38.272121,-89.182703,38.287625],"project_ids":["BOTB-1017"]},{"fips":"62588","name":"Raleigh","type":"village","bbox":[-88.544148,37.815996,-88.516479,37.838325],"project_ids":[]},{"fips":"62627","name":"Ramsey","type":"village","bbox":[-89.120046,39.136795,-89.100825,39.16488],"project_ids":["BOTB-0243"]},{"fips":"62744","name":"Rankin","type":"village","bbox":[-87.901891,40.456316,-87.886978,40.472136],"project_ids":[]},{"fips":"62757","name":"Ransom","type":"village","bbox":[-88.663875,41.151226,-88.644472,41.165867],"project_ids":["BOTB-0218"]},{"fips":"62783","name":"Rantoul","type":"village","bbox":[-88.212991,40.275387,-88.117064,40.326742],"project_ids":["BOTB-0284"]},{"fips":"62822","name":"Rapids City","type":"village","bbox":[-90.359314,41.56701,-90.325525,41.594496],"project_ids":[]},{"fips":"62848","name":"Raritan","type":"village","bbox":[-90.830685,40.693053,-90.818863,40.698219],"project_ids":[]},{"fips":"62965","name":"Raymond","type":"village","bbox":[-89.593089,39.308007,-89.561326,39.330661],"project_ids":["BOTB-0230","BOTB-0264","BOTB-0269"]},{"fips":"63043","name":"Red Bud","type":"city","bbox":[-90.026526,38.191845,-89.975579,38.222723],"project_ids":["BOTB-0225"]},{"fips":"63056","name":"Reddick","type":"village","bbox":[-88.2531,41.093369,-88.244039,41.103707],"project_ids":["BOTB-0220"]},{"fips":"63069","name":"Redmon","type":"village","bbox":[-87.867519,39.640939,-87.856022,39.647608],"project_ids":[]}
840,{"fips":"63355","name":"Rentchler","type":"cdp","bbox":[-89.873215,38.486311,-89.861287,38.497131],"project_ids":[]},{"fips":"63382","name":"Rest Haven","type":"cdp","bbox":[-88.14126,41.243968,-88.123871,41.265979],"project_ids":[]},{"fips":"63420","name":"Reynolds","type":"village","bbox":[-90.681866,41.326749,-90.665841,41.337278],"project_ids":[]},{"fips":"63537","name":"Richfield","type":"cdp","bbox":[-91.125268,39.808761,-91.105938,39.819883],"project_ids":["BOTB-0266"]},{"fips":"63641","name":"Richmond","type":"village","bbox":[-88.330432,42.439866,-88.276828,42.494619],"project_ids":["BOTB-0065","BOTB-0266"]},{"fips":"63706","name":"Richton Park","type":"village","bbox":[-87.790313,41.46971,-87.702879,41.49214],"project_ids":["BOTB-0266"]},{"fips":"63719","name":"Richview","type":"village","bbox":[-89.196324,38.366336,-89.163959,38.394993],"project_ids":["BOTB-1017"]},{"fips":"63862","name":"Ridge Farm","type":"village","bbox":[-87.670168,39.884162,-87.63279,39.908814],"project_ids":[]},{"fips":"63875","name":"Ridgefield","type":"cdp","bbox":[-88.371718,42.260545,-88.355102,42.27606],"project_ids":["BOTB-0266"]},{"fips":"64005","name":"Ridgewood","type":"cdp","bbox":[-88.057523,41.52803,-88.033837,41.541965],"project_ids":[]},{"fips":"64018","name":"Ridgway","type":"village","bbox":[-88.272693,37.791756,-88.248867,37.807314],"project_ids":["BOTB-0076"]},{"fips":"64044","name":"Ridott","type":"village","bbox":[-89.48027,42.295022,-89.473817,42.299417],"project_ids":["BOTB-0220","BOTB-0249"]},{"fips":"64083","name":"Riggston","type":"cdp","bbox":[-90.425799,39.692805,-90.420863,39.695795],"project_ids":["BOTB-0275"]},{"fips":"64094","name":"Riley","type":"cdp","bbox":[-88.637142,42.190384,-88.620492,42.194905],"project_ids":["BOTB-0266","BOTB-0273"]},{"fips":"64135","name":"Ringwood","type":"village","bbox":[-88.335475,42.37755,-88.28001,42.414843],"project_ids":["BOTB-0019","BOTB-0266"]},{"fips":"64148","name":"Rio","type":"village","bbox":[-90.40462,41.105383,-90.390175,41.113398],"project_ids":[]},{"fips":"64174","name":"Ripley","type":"village","bbox":[-90.644253,40.019859,-90.629665,40.030197],"project_ids":["BOTB-1002"]},{"fips":"64239","name":"Ritchie","type":"cdp","bbox":[-88.125428,41.244077,-88.104333,41.266868],"project_ids":["BOTB-0241","BOTB-1015"]},{"fips":"64278","name":"Riverdale","type":"village","bbox":[-87.669683,41.629834,-87.6172,41.661734],"project_ids":["BOTB-0266"]},{"fips":"64304","name":"River Forest","type":"village","bbox":[-87.834747,41.879175,-87.804986,41.908907],"project_ids":["BOTB-0266"]},{"fips":"64343","name":"River Grove","type":"village","bbox":[-87.852609,41.908405,-87.825441,41.93775],"project_ids":["BOTB-0266"]},{"fips":"64421","name":"Riverside","type":"village","bbox":[-87.832192,41.81655,-87.802676,41.8431],"project_ids":["BOTB-0266"]},{"fips":"64486","name":"Riverton","type":"village","bbox":[-89.558963,39.822294,-89.506393,39.863796],"project_ids":["BOTB-0246","BOTB-0266"]},{"fips":"64538","name":"Riverwoods","type":"village","bbox":[-87.923176,42.152953,-87.874446,42.192953],"project_ids":["BOTB-0266"]},{"fips":"64590","name":"Roanoke","type":"village","bbox":[-89.220547,40.788312,-89.182167,40.805194],"project_ids":["BOTB-0266"]},{"fips":"64616","name":"Robbins","type":"village","bbox":[-87.728399,41.632678,-87.691878,41.651076],"project_ids":["BOTB-0266"]},{"fips":"64655","name":"Roberts","type":"village","bbox":[-88.19132,40.607333,-88.175674,40.621096],"project_ids":[]},{"fips":"64707","name":"Robinson","type":"city","bbox":[-87.766125,38.985127,-87.68467,39.02856],"project_ids":["BOTB-0006","BOTB-0266"]},{"fips":"64746","name":"Rochelle","type":"city","bbox":[-89.123237,41.861942,-88.985635,41.960302],"project_ids":["BOTB-0281","BOTB-1001"]},{"fips":"64759","name":"Rochester","type":"village","bbox":[-89.571649,39.732638,-89.517348,39.765458],"project_ids":["BOTB-0266"]},{"fips":"64811","name":"Rockbridge","type":"village","bbox":[-90.213745,39.262273,-90.199242,39.276381],"project_ids":["BOTB-0275"]},{"fips":"64837","name":"Rock City","type":"village","bbox":[-89.478842,42.410741,-89.464362,42.415777],"project_ids":["BOTB-0256"]},{"fips":"64902","name":"Rockdale","type":"village","bbox":[-88.144955,41.495222,-88.098158,41.511427],"project_ids":["BOTB-0266"]},{"fips":"64928","name":"Rock Falls","type":"city","bbox":[-89.744806,41.754416,-89.661327,41.78874],"project_ids":[]},{"fips":"65000","name":"Rockford","type":"city","bbox":[-89.195274,42.143238,-88.940855,42.339314],"project_ids":["BOTB-0220","BOTB-0228","BOTB-0233","BOTB-0234","BOTB-0266","BOTB-0282"]}
840,{"fips":"65078","name":"Rock Island","type":"city","bbox":[-90.653375,41.415008,-90.532536,41.513161],"project_ids":["BOTB-0224"]},{"fips":"65104","name":"Rock Island Arsenal","type":"cdp","bbox":[-90.581615,41.5085,-90.503633,41.526133],"project_ids":["BOTB-0224"]},{"fips":"65130","name":"Rockport","type":"cdp","bbox":[-91.021375,39.531711,-91.001903,39.547262],"project_ids":["BOTB-0102"]},{"fips":"65156","name":"Rockton","type":"village","bbox":[-89.098956,42.411864,-89.019413,42.474598],"project_ids":["BOTB-0151"]},{"fips":"65221","name":"Rockwood","type":"village","bbox":[-89.707262,37.832514,-89.686614,37.850711],"project_ids":[]},{"fips":"65338","name":"Rolling Meadows","type":"city","bbox":[-88.06806,42.046052,-87.993103,42.104516],"project_ids":["BOTB-0266"]},{"fips":"65403","name":"Rome","type":"cdp","bbox":[-89.524832,40.854062,-89.491749,40.893149],"project_ids":[]},{"fips":"65442","name":"Romeoville","type":"village","bbox":[-88.163103,41.59268,-88.028565,41.679888],"project_ids":["BOTB-0266"]},{"fips":"65481","name":"Roodhouse","type":"city","bbox":[-90.383918,39.472876,-90.362936,39.49163],"project_ids":["BOTB-0003","BOTB-0269","BOTB-0275"]},{"fips":"65611","name":"Roscoe","type":"village","bbox":[-89.059763,42.383878,-88.96039,42.478433],"project_ids":["BOTB-0151","BOTB-0266"]},{"fips":"65754","name":"Rose Hill","type":"village","bbox":[-88.157806,39.097413,-88.14192,39.11194],"project_ids":["BOTB-0269"]},{"fips":"65806","name":"Roselle","type":"village","bbox":[-88.125052,41.960238,-88.046498,42.000658],"project_ids":["BOTB-0266"]},{"fips":"65819","name":"Rosemont","type":"village","bbox":[-87.896044,41.973817,-87.85573,42.009623],"project_ids":["BOTB-0266"]},{"fips":"65845","name":"Roseville","type":"village","bbox":[-90.673988,40.724398,-90.654258,40.738839],"project_ids":[]},{"fips":"65884","name":"Rosewood Heights","type":"cdp","bbox":[-90.087391,38.875483,-90.058747,38.9051],"project_ids":[]},{"fips":"65897","name":"Rosiclare","type":"city","bbox":[-88.365065,37.403449,-88.33492,37.440118],"project_ids":[]},{"fips":"65962","name":"Rossville","type":"village","bbox":[-87.691944,40.368339,-87.656598,40.401475],"project_ids":[]},{"fips":"66027","name":"Round Lake","type":"village","bbox":[-88.148483,42.3032,-88.082307,42.368004],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"66040","name":"Round Lake Beach","type":"village","bbox":[-88.120131,42.364301,-88.043542,42.399578],"project_ids":["BOTB-0266"]},{"fips":"66053","name":"Round Lake Heights","type":"village","bbox":[-88.113605,42.379064,-88.097031,42.393697],"project_ids":[]},{"fips":"66066","name":"Round Lake Park","type":"village","bbox":[-88.08757,42.303004,-88.048256,42.364771],"project_ids":["BOTB-0060","BOTB-0266"]},{"fips":"66131","name":"Roxana","type":"village","bbox":[-90.090423,38.80427,-90.003711,38.856304],"project_ids":["BOTB-0269"]},{"fips":"66157","name":"Royal","type":"village","bbox":[-87.983147,40.190291,-87.960541,40.199799],"project_ids":["BOTB-0266","BOTB-0284"]},{"fips":"66196","name":"Royal Lakes","type":"village","bbox":[-89.970064,39.10791,-89.951327,39.115431],"project_ids":["BOTB-0269"]},{"fips":"66209","name":"Royalton","type":"village","bbox":[-89.123663,37.869392,-89.104708,37.887768],"project_ids":["BOTB-0075"]},{"fips":"66287","name":"Ruma","type":"village","bbox":[-90.01131,38.116622,-89.991651,38.140221],"project_ids":["BOTB-0269","BOTB-1008"]},{"fips":"66339","name":"Rushville","type":"city","bbox":[-90.586095,40.109232,-90.544053,40.134158],"project_ids":["BOTB-1023"]},{"fips":"66404","name":"Russellville","type":"village","bbox":[-87.535382,38.812272,-87.522161,38.824906],"project_ids":["BOTB-0266"]},{"fips":"66443","name":"Rutland","type":"village","bbox":[-89.047427,40.969657,-89.03299,40.992029],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"66534","name":"Sadorus","type":"village","bbox":[-88.356574,39.958767,-88.336118,39.974759],"project_ids":[]},{"fips":"66599","name":"Sailor Springs","type":"village","bbox":[-88.366747,38.759952,-88.355291,38.767983],"project_ids":[]},{"fips":"66638","name":"St. Anne","type":"village","bbox":[-87.734113,41.013776,-87.703891,41.030271],"project_ids":[]},{"fips":"66677","name":"St. Augustine","type":"village","bbox":[-90.415627,40.714489,-90.400923,40.72912],"project_ids":[]},{"fips":"66703","name":"St. Charles","type":"city","bbox":[-88.389604,41.897015,-88.249501,41.961133],"project_ids":["BOTB-0266"]},{"fips":"66768","name":"St. David","type":"village","bbox":[-90.060186,40.4866
84075,-90.040983,40.496049],"project_ids":[]},{"fips":"66794","name":"St. Elmo","type":"city","bbox":[-88.862133,39.004848,-88.839136,39.044706],"project_ids":[]},{"fips":"66800","name":"Ste. Marie","type":"village","bbox":[-88.03795,38.921848,-88.017328,38.938005],"project_ids":["BOTB-0269"]},{"fips":"66833","name":"St. Francisville","type":"city","bbox":[-87.65539,38.585145,-87.636874,38.598741],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"66859","name":"St. Jacob","type":"village","bbox":[-89.777853,38.710424,-89.756613,38.733044],"project_ids":[]},{"fips":"66924","name":"St. Johns","type":"village","bbox":[-89.249784,38.026884,-89.230948,38.039653],"project_ids":["BOTB-0077"]},{"fips":"66950","name":"St. Joseph","type":"village","bbox":[-88.061554,40.104636,-88.009883,40.122072],"project_ids":["BOTB-0284"]},{"fips":"66989","name":"St. Libory","type":"village","bbox":[-89.72704,38.351791,-89.703974,38.37291],"project_ids":[]},{"fips":"67132","name":"St. Peter","type":"village","bbox":[-88.865411,38.863064,-88.832357,38.871728],"project_ids":["BOTB-0226"]},{"fips":"67158","name":"St. Rose","type":"village","bbox":[-89.559445,38.673168,-89.54725,38.689657],"project_ids":[]},{"fips":"67236","name":"Salem","type":"city","bbox":[-89.013658,38.598259,-88.921676,38.660601],"project_ids":["BOTB-0250","BOTB-1028"]},{"fips":"67372","name":"Sammons Point","type":"village","bbox":[-87.873206,41.00
8407766,-87.843297,41.056958],"project_ids":[]},{"fips":"67444","name":"Sandoval","type":"village","bbox":[-89.128379,38.601689,-89.106396,38.619982],"project_ids":[]},{"fips":"67548","name":"Sandwich","type":"city","bbox":[-88.655928,41.631259,-88.570918,41.677938],"project_ids":["BOTB-0229"]},{"fips":"67613","name":"San Jose","type":"village","bbox":[-89.611897,40.298103,-89.596929,40.312817],"project_ids":[]},{"fips":"67756","name":"Sauget","type":"village","bbox":[-90.204623,38.549814,-90.114724,38.607864],"project_ids":["BOTB-0269"]},{"fips":"67769","name":"Sauk Village","type":"village","bbox":[-87.599464,41.469992,-87.538568,41.513845],"project_ids":["BOTB-0266"]},{"fips":"67795","name":"Saunemin","type":"village","bbox":[-88.415075,40.8765,-88.40086,40.898372],"project_ids":[]},{"fips":"67821","name":"Savanna","type":"city","bbox":[-90.159994,42.071648,-90.110939,42.109917],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"67860","name":"Savoy","type":"village","bbox":[-88.276056,40.024227,-88.238006,40.083565],"project_ids":[]},{"fips":"67873","name":"Sawyerville","type":"village","bbox":[-89.811454,39.071131,-89.792589,39.085863],"project_ids":["BOTB-0260"]},{"fips":"67912","name":"Saybrook","type":"village","bbox":[-88.543263,40.420142,-88.516622,40.436929],"project_ids":["BOTB-0121"]},{"fips":"67925","name":"Scales Mound","type":"village","bbox":[-90.263155,42.467389,-90.243083,42.483031],"project_ids":[]},{"fips":"68003","name":"Schaumburg","type":"village","bbox":[-88.154429,41.986841,-88.028023,42.078112],"project_ids":["BOTB-0266"]},{"fips":"68081","name":"Schiller Park","type":"village","bbox":[-87.890763,41.945386,-87.847392,41.973359],"project_ids":["BOTB-0266"]},{"fips":"68120","name":"Schram City","type":"village","bbox":[-89.473613,39.155276,-89.446292,39.173433],"project_ids":[]},{"fips":"68198","name":"Sciota","type":"village","bbox":[-90.755446,40.559138,-90.741897,40.566589],"project_ids":[]},{"fips":"68328","name":"Scott AFB","type":"cdp","bbox":[-89.882948,38.524414,-89.821788,38.558337],"project_ids":["BOTB-0237"]},{"fips":"68406","name":"Scottville","type":"village","bbox":[-90.113321,39.470435,-90.09421,39.484979],"project_ids":["BOTB-0269"]},{"fips":"68458","name":"Seaton","type":"village","bbox":[-90.814153,41.094537,-90.784162,41.109923],"project_ids":["BOTB-0224"]},{"fips":"68471","name":"Seatonville","type":"village","bbox":[-89.282551,41.356837,-89.262744,41.371547],"project_ids":["BOTB-0220"]},{"fips":"68510","name":"Secor","type":"village","bbox":[-89.14186,40.735117,-89.130064,40.746584],"project_ids":["BOTB-1018"]},{"fips":"68640","name":"Seneca","type":"village","bbox":[-88.63794,41.281585,-88.526872,41.363033],"project_ids":[]},{"fips":"68679","name":"Serena","type":"cdp","bbox":[-88.738495,41.482702,-88.72689,41.494642],"project_ids":[]},{"fips":"68705","name":"Sesser","type":"city","bbox":[-89.063497,38.078047,-89.038568,38.100702],"project_ids":["BOTB-0075"]},{"fips":"68809","name":"Seymour","type":"cdp","bbox":[-88.431234,40.104895,-88.423251,40.109216
840],"project_ids":["BOTB-1004"]},{"fips":"68822","name":"Shabbona","type":"village","bbox":[-88.906223,41.757387,-88.85628,41.772809],"project_ids":["BOTB-0266"]},{"fips":"68991","name":"Shannon","type":"village","bbox":[-89.74695,42.146139,-89.733587,42.16031],"project_ids":["BOTB-1006"]},{"fips":"69082","name":"Shawneetown","type":"city","bbox":[-88.196058,37.704418,-88.175399,37.723802],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"69147","name":"Sheffield","type":"village","bbox":[-89.756162,41.349362,-89.723331,41.365091],"project_ids":["BOTB-0212"]},{"fips":"69186","name":"Shelbyville","type":"city","bbox":[-88.84574,39.390144,-88.757718,39.434669],"project_ids":["BOTB-0223","BOTB-0265","BOTB-0266","BOTB-0269"]},{"fips":"69212","name":"Sheldon","type":"village","bbox":[-87.57614,40.761776,-87.556612,40.776936],"project_ids":[]},{"fips":"69277","name":"Sheridan","type":"village","bbox":[-88.710883,41.51234,-88.652911,41.562832],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"69342","name":"Sherman","type":"village","bbox":[-89.630782,39.867527,-89.582386,39.915279],"project_ids":[]},{"fips":"69368","name":"Sherrard","type":"village","bbox":[-90.512398,41.295425,-90.483581,41.324304],"project_ids":["BOTB-0224"]},{"fips":"69524","name":"Shiloh","type":"village","bbox":[-89.966157,38.497245,-89.871446,38.581025],"project_ids":["BOTB-0237","BOTB-0269"]},{"fips":"69563","name":"Shipman","type":"town","bbox":[-90.05778,39.112958,-90.028673,39.12778],"project_ids":["BOTB-0269"]},{"fips":"69628","name":"Shirley","type":"cdp","bbox":[-89.067233,40.403232,-89.059885,40.40978],"project_ids":[]},{"fips":"69758","name":"Shorewood","type":"village","bbox":[-88.246464,41.484063,-88.178809,41.545344],"project_ids":[]},{"fips":"69797","name":"Shumway","type":"village","bbox":[-88.660909,39.178493,-88.646911,39.186887],"project_ids":[]},{"fips":"69810","name":"Sibley","type":"village","bbox":[-88.386401,40.5802,-88.37072,40.594431],"project_ids":[]},{"fips":"69836","name":"Sidell","type":"village","bbox":[-87.832464,39.902449,-87.814757,39.916959],"project_ids":[]},{"fips":"69875","name":"Sidney","type":"village","bbox":[-88.082684,40.0112,-88.059122,40.033209],"project_ids":["BOTB-0284"]},{"fips":"69914","name":"Sigel","type":"town","bbox":[-88.503048,39.221333,-88.488917,39.229544],"project_ids":["BOTB-0258","BOTB-0269"]},{"fips":"69979","name":"Silvis","type":"city","bbox":[-90.426406,41.467517,-90.386139,41.52196],"project_ids":["BOTB-0212"]},{"fips":"70005","name":"Simpson","type":"village","bbox":[-88.765397,37.463551,-88.746032,37.470978],"project_ids":[]},{"fips":"70031","name":"Sims","type":"village","bbox":[-88.545661,38.352883,-88.526377,38.371971],"project_ids":[]},{"fips":"70122","name":"Skokie","type":"village","bbox":[-87.780882,42.003325,-87.708661,42.06504],"project_ids":["BOTB-0266"]},{"fips":"70161","name":"Sleepy Hollow","type":"village","bbox":[-88.335398,42.078519,-88.291523,42.102859],"project_ids":["BOTB-0266"]},{"fips":"70213","name":"Smithboro","type":"village","bbox":[-89.350161,38.88698,-89.331215,38.902426],"project_ids":["BOTB-0243"]},{"fips":"70226","name":"Smithfield","type":"village","bbox":[-90.300974,40.466095,-90.282058,40.480823],"project_ids":[]},{"fips":"70252","name":"Smithton","type":"village","bbox":[-90.022495,38.366323,-89.964699,38.460854],"project_ids":["BOTB-1026"]},{"fips":"70278","name":"Smithville","type":"cdp","bbox":[-89.820513,40.65328,-89.785438,40.668346],"project_ids":["BOTB-0201"]},{"fips":"70356","name":"Solon Mills","type":"cdp","bbox":[-88.287774,42.438131,-88.26847,42.447472],"project_ids":[]},{"fips":"70460","name":"Somonauk","type":"village","bbox":[-88.69828,41.624644,-88.651066,41.66482],"project_ids":["BOTB-0266"]},{"fips":"70525","name":"Sorento","type":"village","bbox":[-89.586106,38.994204,-89.564837,39.008086],"project_ids":["BOTB-0168"]},{"fips":"70564","name":"South Barrington","type":"village","bbox":[-88.194627,42.066582,-88.104295,42.110599],"project_ids":["BOTB-0266"]},{"fips":"70590","name":"South Beloit","type":"city","bbox":[-89.079549,42.456835,-88.982754,42.496296],"project_ids":["BOTB-0266"]},{"fips":"70629","name":"South Chicago Heights","type":"village","bbox":[-87.655073,41.474165,-87.606333,41.491588],"project_ids":["BOTB-0266"]},{"fips":"70720","name":"South Elgin","type":"village","bbox":[-88.364869,41.960326,-88.267609,42.012685],"project_ids":["BOTB-0266"]},{"fips":"70759","name":"Southern View","type":"village","bbox":[-89.66068,39.742767,-89.639725,39.764519],"project_ids":[]},{"fips":"70850","name":"South Holland","type":"village","bbox":[-87.636387,41.577302,-87.563109,41.622666],"project_ids":["BOTB-0266"]},{"fips":"70889","name":"South Jacksonville","type":"village","bbox":[-90.248034,39.682624,-90.215189,39.715997],"project_ids":[]},{"fips":"71175","name":"South Pekin","type":"village","bbox":[-89.663821,40.479981,-89.639675,40.504176],"project_ids":["BOTB-0216"]},{"fips":"71240","name":"South Roxana","type":"village","bbox":[-90.081089,38.786764,-90.048222,38.833326],"project_ids":[]},{"fips":"71370","name":"South Wilmington","type":"village","bbox":[-88.291064,41.169981,-88.26959,41.17941],"project_ids":[]},{"fips":"71422","name":"Sparland","type":"village","bbox":[-89.460977,41.020462,-89.432504,41.036299],"project_ids":["BOTB-0220"]},{"fips":"71448","name":"Sparta","type":"city","bbox":[-89.777414,38.100845,-89.681542,38.190571],"project_ids":["BOTB-0248","BOTB-0254"]},{"fips":"71474","name":"Spaulding","type":"village","bbox":[-89.56385,39.85807,-89.524492,39.874539],"project_ids":["BOTB-0266","BOTB-0287"]},{"fips":"71526","name":"Spillertown","type":"village","bbox":[-88.927852,37.759242,
840-88.915099,37.769069],"project_ids":["BOTB-0222"]},{"fips":"71604","name":"Spring Bay","type":"village","bbox":[-89.541159,40.811247,-89.51145,40.831286],"project_ids":["BOTB-0266"]},{"fips":"71643","name":"Springerton","type":"village","bbox":[-88.363441,38.175893,-88.351734,38.183171],"project_ids":[]},{"fips":"72000","name":"Springfield","type":"city","bbox":[-89.772132,39.65316,-89.568509,39.874247],"project_ids":["BOTB-0221","BOTB-0230","BOTB-0246","BOTB-0266","BOTB-0269"]},{"fips":"72052","name":"Spring Grove","type":"village","bbox":[-88.282874,42.412022,-88.205682,42.495041],"project_ids":["BOTB-0065","BOTB-0266"]},{"fips":"72156","name":"Spring Valley","type":"city","bbox":[-89.241042,41.309709,-89.163734,41.371433],"project_ids":["BOTB-0147","BOTB-0217","BOTB-0220","BOTB-0266"]},{"fips":"72221","name":"Standard","type":"village","bbox":[-89.19227,41.250435,-89.168522,41.261875],"project_ids":["BOTB-0235"]},{"fips":"72234","name":"Standard City","type":"village","bbox":[-89.793264,39.34317,-89.774288,39.355122],"project_ids":[]},{"fips":"72260","name":"Stanford","type":"village","bbox":[-89.228238,40.420616,-89.212881,40.442426],"project_ids":["BOTB-0266"]},{"fips":"72403","name":"Staunton","type":"city","bbox":[-89.82316,38.99833,-89.746843,39.027659],"project_ids":[]},{"fips":"72468","name":"Steeleville","type":"village","bbox":[-89.681482,37.997603,-89.647952,38.021066],"project_ids":["BOTB-0066","BOTB-0254"]},{"fips":"72520","name":"Steger","type":"village","bbox":[-87.654651,41.45866,-87.5775,41.487051],"project_ids":["BOTB-0266"]},{"fips":"72546","name":"Sterling","type":"city","bbox":[-89.75765,41.783028,-89.640248,41.821125],"project_ids":["BOTB-0220"]},{"fips":"72624","name":"Steward","type":"village","bbox":[-89.024658,41.845942,-89.010344,41.85183],"project_ids":["BOTB-0281"]},{"fips":"72650","name":"Stewardson","type":"village","bbox":[-88.640277,39.257145,-88.617799,39.270408],"project_ids":["BOTB-0269"]},{"fips":"72676","name":"Stickney","type":"village","bbox":[-87.802612,41.810321,-87.74354,41.829316],"project_ids":["BOTB-0266"]},{"fips":"72702","name":"Stillman Valley","type":"village","bbox":[-89.19027,42.099593,-89.165352,42.112271],"project_ids":[]},{"fips":"72780","name":"Stockton","type":"village","bbox":[-90.023752,42.338901,-89.980938,42.364297],"project_ids":["BOTB-0220"]},{"fips":"72884","name":"Stonefort","type":"village","bbox":[-88.722505,37.606631,-88.689918,37.625058],"project_ids":["BOTB-0001"]},{"fips":"72923","name":"Stone Park","type":"village","bbox":[-87.887608,41.89695,-87.870425,41.907808],"project_ids":["BOTB-0266"]},{"fips":"72949","name":"Stonington","type":"village","bbox":[-89.210268,39.632213,-89.181419,39.644111],"project_ids":[]},{"fips":"73027","name":"Stoy","type":"village","bbox":[-87.843336,38.990002,-87.823848,39.003552],"project_ids":["BOTB-0257"]},{"fips":"73040","name":"Strasburg","type":"village","bbox":[-88.632342,39.342402,-88.61383,39.355374],"project_ids":["BOTB-0266","BOTB-0269"]},{"fips":"73131","name":"Strawn","type":"village","bbox":[-88.40488,40.64647,-88.39443,40.661056],"project_ids":[]},{"fips":"73157","name":"Streamwood","type":"village","bbox":[-88.221779,41.989334,-88.13866,42.043078],"project_ids":["BOTB-0266"]},{"fips":"73170","name":"Streator","type":"city","bbox":[-88.864391,41.083542,-88.796903,41.160962],"project_ids":["BOTB-0157","BOTB-0218"]},{"fips":"73261","name":"Stronghurst","type":"village","bbox":[-90.918275,40.738233,-90.899109,40.75303],"project_ids":["BOTB-0224"]},{"fips":"73287","name":"Sublette","type":"village","bbox":[-89.238273,41.636139,-89.218806,41.64937],"project_ids":["BOTB-0235"]},{"fips":"73391","name":"Sugar Grove","type":"village","bbox":[-88.513241,41.729031,-88.397382,41.805585],"project_ids":["BOTB-0049","BOTB-0266"]},{"fips":"73495","name":"Sullivan","type":"city","bbox":[-88.633232,39.559257,-88.590502,39.610921],"project_ids":["BOTB-0173"]},{"fips":"73547","name":"Summerfield","type":"village","bbox":[-89.761393,38.590018,-89.73398,38.60089],"project_ids":["BOTB-0079"]},{"fips":"73638","name":"Summit","type":"village","bbox":[-87.834045,41.772386,-87.800867,41.800777],"project_ids":["BOTB-0266"]},{"fips":"73703","name":"Sumner","type":"city","bbox":[-87.909015,38.709822,-87.852584,38.732048],"project_ids":["BOTB-0269"]},{"fips":"73872","name":"Sunnyland","type":"cdp","bbox":[-88.152166,41.565769,-88.139988,41.578649],"project_ids":[]},{"fips":"73943","name":"Sun River Terrace","type":"village","bbox":[-87.745274,41.119141,-87.724319,41.133735],"project_ids":["BOTB-1015"]},{"fips":"74119","name":"Swansea","type":"village","bbox":[-90.025569,38.522037,-89.954325,38.578092],"project_ids":["BOTB-0237","BOTB-0266"]},{"fips":"74145","name":"Swedona","type":"cdp","bbox":[-90.449955,41.275488,-90.434883,41.28315],"project_ids":["BOTB-0224"]},{"fips":"74223","name":"Sycamore","type":"city","bbox":[-88.733893,41.95509,-88.6318,42.040023],"project_ids":["BOTB-0037"]},{"fips":"74275","name":"Symerton","type":"village","bbox":[-88.056324,41.321152,-88.050379,41.330726],"project_ids":["BOTB-0220"]},{"fips":"74301","name":"Table Grove","type":"village","bbox":[-90.431578,40.360721,-90.419389,40.370952],"project_ids":[]},{"fips":"74379","name":"Tallula","type":"village","bbox":[-89.947764,39.93856,-89.928998,39.952762],"project_ids":[]},{"fips":"74444","name":"Tamaroa","type":"village","bbox":[-89.241197,38.128303,-89.218398,38.145177],"project_ids":["BOTB-0239"]},{"fips":"74457","name":"Tamms","type":"village","bbox":[-89.288987,37.222405,-89.258223,37.258091],"project_ids":["BOTB-0227"]},{"fips":"74470","name":"Tampico","type":"village","bbox":[-89.793452,41.624834,-89.776405,41.635959],"project_ids":[]},{"fips":"74548","name":"Taylor Ridge","type":"cdp","bbox":[-90.682488,41.379374,-90.659557,41.401299],"project_ids":[]},{"fips":"74561","name":"Taylor Springs","type":"village","bbox":[-89.506062,39.121982,-89.482145,39.140105],"project_ids":["BOTB-0264"]},{"fips":"74574","name":"Taylorville","type":"city","bbox":[-89.337651,39.462369,-89.218177,39.596916],"project_ids":["BOTB-0217","BOTB-0266","BOTB-0283"]},{"fips":"74665","name":"Tennessee","type":"village","bbox":[-90.845076,40.40639,-90.829672,40.417063],"project_ids":[]},{"fips":"74743","name":"Teutopolis","type":"village","bbox":[-88.503598,39.115114,-88.4383,39.143949],"project_ids":["BOTB-0258"]},{"fips":"74847","name":"Thawville","type":"village","bbox":[-88.121155,40.66827,-88.109045,40.679841],"project_ids":[]}
840,{"fips":"74860","name":"Thayer","type":"village","bbox":[-89.770234,39.535996,-89.744227,39.544927],"project_ids":["BOTB-0003","BOTB-0230"]},{"fips":"74873","name":"Thebes","type":"village","bbox":[-89.467631,37.186852,-89.440774,37.226807],"project_ids":["BOTB-0227"]},{"fips":"74970","name":"The Galena Territory","type":"cdp","bbox":[-90.358988,42.371912,-90.26957,42.430304],"project_ids":["BOTB-0220"]},{"fips":"75081","name":"Third Lake","type":"village","bbox":[-88.03869,42.356371,-87.9979,42.3897],"project_ids":["BOTB-0266"]},{"fips":"75107","name":"Thomasboro","type":"village","bbox":[-88.196538,40.231486,-88.179111,40.255231],"project_ids":["BOTB-0284"]},{"fips":"75159","name":"Thompsonville","type":"village","bbox":[-88.780974,37.907034,-88.743648,37.921864],"project_ids":[]},{"fips":"75172","name":"Thomson","type":"village","bbox":[-90.129585,41.948803,-90.097788,41.994632],"project_ids":[]},{"fips":"75185","name":"Thornton","type":"village","bbox":[-87.635395,41.557335,-87.598871,41.586413],"project_ids":["BOTB-0266"]},{"fips":"75263","name":"Tilden","type":"village","bbox":[-89.693463,38.205295,-89.674362,38.219443],"project_ids":["BOTB-0248"]},{"fips":"75276","name":"Tilton","type":"village","bbox":[-87.66772,40.075478,-87.619871,40.117982],"project_ids":["BOTB-0215"]},{"fips":"75360","name":"Timberlane","type":"village","bbox":[-88.894636,42.327425,-88.846683,42.35246],"project_ids":["BOTB-0002"]},{"fips":"75484","name":"Tinley Park","type":"village","bbox":[-87.85639,41.525204,-87.759574,41.604072],"project_ids":["BOTB-0266"]},{"fips":"75549","name":"Tiskilwa","type":"village","bbox":[-89.519831,41.288263,-89.49002,41.298288],"project_ids":["BOTB-0212"]},{"fips":"75601","name":"Toledo","type":"village","bbox":[-88.264548,39.262385,-88.227138,39.284269],"project_ids":["BOTB-0262","BOTB-0269"]},{"fips":"75614","name":"Tolono","type":"village","bbox":[-88.275327,39.966752,-88.246514,40.017603],"project_ids":[]},{"fips":"75653","name":"Toluca","type":"city","bbox":[-89.143854,40.992049,-89.123209,41.022241],"project_ids":["BOTB-0220"]},{"fips":"75718","name":"Tonica","type":"village","bbox":[-89.086976,41.204947,-89.055168,41.228717],"project_ids":["BOTB-0218","BOTB-0266"]},{"fips":"75757","name":"Topeka","type":"village","bbox":[-89.933819,40.326427,-89.927995,40.333967],"project_ids":["BOTB-0214"]},{"fips":"75783","name":"Toulon","type":"city","bbox":[-89.885775,41.082762,-89.8386,41.100623],"project_ids":["BOTB-0212"]},{"fips":"75809","name":"Tovey","type":"village","bbox":[-89.456709,39.5858,-89.43996,39.59104],"project_ids":[]},{"fips":"75822","name":"Towanda","type":"village","bbox":[-88.911466,40.557189,-88.886124,40.57175],"project_ids":["BOTB-0069","BOTB-0266"]},{"fips":"75848","name":"Tower Hill","type":"village","bbox":[-88.968294,39.378249,-88.950304,39.394598],"project_ids":["BOTB-0269"]},{"fips":"75874","name":"Tower Lakes","type":"village","bbox":[-88.164404,42.220909,-88.135729,42.241355],"project_ids":[]},{"fips":"75965","name":"Tremont","type":"village","bbox":[-89.50627,40.51443,-89.466436,40.533378],"project_ids":[]},{"fips":"75991","name":"Trenton","type":"city","bbox":[-89.703067,38.598591,-89.663562,38.618899],"project_ids":[]},{"fips":"76017","name":"Trilla","type":"cdp","bbox":[-88.357005,39.372041,-88.34347,39.381627],"project_ids":["BOTB-0215"]},{"fips":"76082","name":"Triumph","type":"cdp","bbox":[-89.025247,41.495337,-89.01709,41.505234],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"76108","name":"Trivoli","type":"cdp","bbox":[-89.905763,40.690136,-89.872109,40.705112],"project_ids":["BOTB-0266"]},{"fips":"76160","name":"Trout Valley","type":"village","bbox":[-88.262047,42.191293,-88.247585,42.204201],"project_ids":[]},{"fips":"76199","name":"Troy","type":"city","bbox":[-89.930798,38.697974,-89.84699,38.747906],"project_ids":["BOTB-0079","BOTB-0171"]},{"fips":"76225","name":"Troy Grove","type":"village","bbox":[-89.093112,41.460963,-89.068685,41.469783],"project_ids":["BOTB-0249"]},{"fips":"76407","name":"Tuscola","type":"city","bbox":[-88.29243,39.775214,-88.255325,39.820514],"project_ids":[]},{"fips":"76511","name":"Twin Grove","type":"cdp","bbox":[-89.125831,40.471357,-89.064462,40.502484],"project_ids":["BOTB-0089","BOTB-0277"]},{"fips":"76615","name":"Ullin","type":"village","bbox":[-89.193536,37.261062,-89.155284,37.297343],"project_ids":["BOTB-0227"]},{"fips":"76706","name":"Union","type":"village","bbox":[-88.552975,42.218588,-88.535551,42.240699],"project_ids":["BOTB-0160"]},{"fips":"76771","name":"Union Hill","type":"village","bbox":[-88.14885,41.105137,-88.143957,41.111423],"project_ids":["BOTB-0249"]},{"fips":"76875","name":"Unity","type":"cdp","bbox":[-89.279669,37.143747,-89.26593,37.1606],"project_ids":[]}
840,{"fips":"76935","name":"University Park","type":"village","bbox":[-87.761002,41.420177,-87.661181,41.472827],"project_ids":["BOTB-0241","BOTB-0266"]},{"fips":"77005","name":"Urbana","type":"city","bbox":[-88.233985,40.072872,-88.15306,40.157339],"project_ids":["BOTB-0266","BOTB-0284"]},{"fips":"77044","name":"Ursa","type":"village","bbox":[-91.395145,40.059911,-91.361875,40.089173],"project_ids":[]},{"fips":"77148","name":"Valier","type":"village","bbox":[-89.053584,38.008834,-89.034301,38.037422],"project_ids":["BOTB-0075"]},{"fips":"77187","name":"Valley City","type":"village","bbox":[-90.656811,39.702784,-90.643779,39.710604],"project_ids":["BOTB-0266"]},{"fips":"77265","name":"Valmeyer","type":"village","bbox":[-90.324265,38.289963,-90.260935,38.321429],"project_ids":["BOTB-0269","BOTB-1008"]},{"fips":"77317","name":"Vandalia","type":"city","bbox":[-89.156699,38.943424,-89.079674,39.018412],"project_ids":["BOTB-0252"]},{"fips":"77395","name":"Varna","type":"village","bbox":[-89.231066,41.02841,-89.219767,41.039953],"project_ids":["BOTB-0220"]},{"fips":"77408","name":"Venedy","type":"village","bbox":[-89.649706,38.391968,-89.641563,38.401291],"project_ids":["BOTB-0269"]}
840,{"fips":"77460","name":"Venetian Village","type":"cdp","bbox":[-88.073438,42.389967,-88.028716,42.415282],"project_ids":["BOTB-0266"]},{"fips":"77473","name":"Venice","type":"city","bbox":[-90.184623,38.660119,-90.157082,38.69194],"project_ids":["BOTB-0269"]},{"fips":"77525","name":"Vergennes","type":"village","bbox":[-89.345966,37.8961,-89.333166,37.909647],"project_ids":["BOTB-0269"]},{"fips":"77551","name":"Vermilion","type":"village","bbox":[-87.594956,39.574766,-87.581062,39.585658],"project_ids":["BOTB-0046"]},{"fips":"77642","name":"Vermont","type":"village","bbox":[-90.439903,40.28343,-90.416478,40.305813],"project_ids":[]},{"fips":"77681","name":"Vernon","type":"village","bbox":[-89.095761,38.793991,-89.079369,38.808719],"project_ids":["BOTB-0250"]},{"fips":"77694","name":"Vernon Hills","type":"village","bbox":[-87.994152,42.200932,-87.931617,42.269662],"project_ids":["BOTB-0266"]},{"fips":"77707","name":"Verona","type":"village","bbox":[-88.511389,41.21284,-88.497319,41.218579],"project_ids":["BOTB-0152"]},{"fips":"77720","name":"Versailles","type":"village","bbox":[-90.668671,39.876288,-90.649931,39.891297],"project_ids":["BOTB-0266"]},{"fips":"77811","name":"Victoria","type":"village","bbox":[-90.107628,41.023866,-90.080532,41.036909],"project_ids":[]},{"fips":"77863","name":"Vienna","type":"city","bbox":[-88.91156,37.401787,-88.851934,37.432122],"project_ids":["BOTB-0001"]},{"fips":"77941","name":"Villa Grove","type":"city","bbox":[-88.169782,39.846222,-88.148174,39.879941],"project_ids":[]},{"fips":"77993","name":"Villa Park","type":"village","bbox":[-88.004718,41.858212,-87.95684,41.917325],"project_ids":[]},{"fips":"78123","name":"Viola","type":"village","bbox":[-90.596832,41.196574,-90.576453,41.214575],"project_ids":[]},{"fips":"78149","name":"Virden","type":"city","bbox":[-89.790709,39.490113,-89.757698,39.527664],"project_ids":[]},{"fips":"78175","name":"Virgil","type":"village","bbox":[-88.542917,41.940444,-88.503139,41.97162],"project_ids":["BOTB-1003"]},{"fips":"78201","name":"Virginia","type":"city","bbox":[-90.224866,39.938541,-90.199644,39.970834],"project_ids":[]},{"fips":"78227","name":"Volo","type":"village","bbox":[-88.184735,42.299422,-88.135242,42.367657],"project_ids":["BOTB-0060"]},{"fips":"78370","name":"Wadsworth","type":"village","bbox":[-87.963926,42.400229,-87.878936,42.493927],"project_ids":["BOTB-0232","BOTB-0266","BOTB-0274"]},{"fips":"78383","name":"Waggoner","type":"village","bbox":[-89.65728,39.373945,-89.647808,39.381158],"project_ids":["BOTB-0230"]},{"fips":"78526","name":"Walnut","type":"village","bbox":[-89.606148,41.548833,-89.574758,41.565229],"project_ids":["BOTB-0003","BOTB-0032","BOTB-0266"]},{"fips":"78604","name":"Walnut Hill","type":"village","bbox":[-89.051769,38.474005,-89.037705,38.481364],"project_ids":["BOTB-0074"]},{"fips":"78656","name":"Walshville","type":"village","bbox":[-89.624304,39.065235,-89.614221,39.072655],"project_ids":[]},{"fips":"78708","name":"Waltonville","type":"village","bbox":[-89.049724,38.205359,-89.023979,38.224503],"project_ids":["BOTB-0074"]},{"fips":"78721","name":"Wamac","type":"city","bbox":[-89.153705,38.47942,-89.134061,38.514388],"project_ids":["BOTB-0239","BOTB-1017"]},{"fips":"78773","name":"Wapella","type":"village","bbox":[-88.96993,40.213717,-88.955691,40.231653],"project_ids":["BOTB-0266"]},{"fips":"78851","name":"Warren","type":"village","bbox":[-90.001569,42.484266,-89.978263,42.5032],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"78916","name":"Warrensburg","type":"village","bbox":[-89.082701,39.925844,-89.0468,39.937218],"project_ids":["BOTB-0172"]},{"fips":"78929","name":"Warrenville","type":"city","bbox":[-88.214442,41.799207,-88.148477,41.850584],"project_ids":["BOTB-0266"]},{"fips":"78942","name":"Warsaw","type":"city","bbox":[-91.466999,40.331814,-91.402186,40.375942],"project_ids":["BOTB-0266"]},{"fips":"79007","name":"Washburn","type":"village","bbox":[-89.30312,40.912864,-89.280244,40.928872],"project_ids":["BOTB-0053","BOTB-0220"]},{"fips":"79033","name":"Washington","type":"city","bbox":[-89.48369,40.675111,-89.373061,40.734733],"project_ids":["BOTB-0266"]},{"fips":"79085","name":"Washington Park","type":"village","bbox":[-90.112809,38.613015,-90.074474,38.645349],"project_ids":["BOTB-0269"]},{"fips":"79124","name":"Wataga","type":"village","bbox":[-90.287523,41.01842,-90.258415,41.034108],"project_ids":[]},{"fips":"79150","name":"Waterloo","type":"city","bbox":[-90.179807,38.299899,-90.115351,38.383196],"project_ids":["BOTB-0269","BOTB-1026"]},{"fips":"79163","name":"Waterman","type":"village","bbox":[-88.786142,41.761441,-88.744428,41.778245],"project_ids":["BOTB-0183"]},{"fips":"79228","name":"Watseka","type":"city","bbox":[-87.767059,40.759848,-87.
840695783,40.790202],"project_ids":["BOTB-0213"]},{"fips":"79241","name":"Watson","type":"village","bbox":[-88.582298,39.017689,-88.553305,39.036593],"project_ids":["BOTB-0266"]},{"fips":"79267","name":"Wauconda","type":"village","bbox":[-88.16423,42.247669,-88.106307,42.306478],"project_ids":["BOTB-0060","BOTB-0095"]},{"fips":"79293","name":"Waukegan","type":"city","bbox":[-87.963654,42.30922,-87.801684,42.431914],"project_ids":["BOTB-0266","BOTB-0274"]},{"fips":"79358","name":"Waverly","type":"city","bbox":[-89.964323,39.583842,-89.943011,39.600217],"project_ids":["BOTB-0230","BOTB-0269"]},{"fips":"79397","name":"Wayne","type":"village","bbox":[-88.312533,41.928845,-88.201247,41.975989],"project_ids":["BOTB-0241"]},{"fips":"79436","name":"Wayne City","type":"village","bbox":[-88.616289,38.335586,-88.570724,38.357472],"project_ids":[]},{"fips":"79449","name":"Waynesville","type":"village","bbox":[-89.130262,40.236599,-89.119572,40.24575],"project_ids":["BOTB-0061"]},{"fips":"79618","name":"Wedron","type":"cdp","bbox":[-88.783177,41.430779,-88.763821,41.44449],"project_ids":["BOTB-0220"]},{"fips":"79683","name":"Weldon","type":"village","bbox":[-88.754788,40.117132,-88.74514,40.128182],"project_ids":["BOTB-0175"]},{"fips":"79735","name":"Wellington","type":"village","bbox":[-87.69347,40.535896,-87.673993,40.560174],"project_ids":["BOTB-0213"]},{"fips":"79813","name":"Wenona","type":"city","bbox":[-89.06264,41.025489,-89.046319,41.060809],"project_ids":["BOTB-0266"]},{"fips":"79826","name":"Wenonah","type":"village","bbox":[-89.298212,39.308811,-89.27923,39.334207],"project_ids":[]},{"fips":"80008","name":"West Brooklyn","type":"village","bbox":[-89.150611,41.69097,-89.144282,41.698995],"project_ids":["BOTB-0281"]},{"fips":"80047","name":"Westchester","type":"village","bbox":[-87.918994,41.833179,-87.867061,41.871044],"project_ids":["BOTB-0266"]},{"fips":"80060","name":"West Chicago","type":"city","bbox":[-88.262687,41.850391,-88.176069,41.937262],"project_ids":["BOTB-0241","BOTB-0266"]},{"fips":"80073","name":"West City","type":"village","bbox":[-88.974719,37.9904,-88.929495,38.004878],"project_ids":["BOTB-0075"]},{"fips":"80125","name":"West Dundee","type":"village","bbox":[-88.354693,42.066991,-88.273153,42.117902],"project_ids":["BOTB-0266"]},{"fips":"80242","name":"Western Springs","type":"village","bbox":[-87.913629,41.774971,-87.888266,41.820717],"project_ids":[]},{"fips":"80255","name":"Westervelt","type":"cdp","bbox":[-88.864052,39.476179,-88.857336,39.481917],"project_ids":[]},{"fips":"80281","name":"Westfield","type":"village","bbox":[-88.006079,39.448093,-87.987045,39.463148],"project_ids":["BOTB-0266"]},{"fips":"80333","name":"West Frankfort","type":"city","bbox":[-88.961045,37.871915,-88.89595,37.918239],"project_ids":["BOTB-0003"]},{"fips":"80570","name":"Westlake Village","type":"cdp","bbox":[-89.300993,42.304037,-89.276921,42.318571],"project_ids":["BOTB-0266"]},{"fips":"80580","name":"West Liberty","type":"cdp","bbox":[-88.09462,38.848487,-88.075868,38.856276],"project_ids":["BOTB-0266"]},{"fips":"80645","name":"Westmont","type":"village","bbox":[-87.994278,41.764814,-87.946816,41.825068],"project_ids":["BOTB-0266"]},{"fips":"80736","name":"West Peoria","type":"city","bbox":[-89.661321,40.684306,-89.622755,40.710778],"project_ids":[]},{"fips":"80762","name":"West Point","type":"village","bbox":[-91.189752,40.252208,-91.172996,40.257542],"project_ids":["BOTB-0266"]},{"fips":"80853","name":"West Salem","type":"village","bbox":[-88.021894,38.511478,-87.996509,38.52814],"project_ids":["BOTB-0007"]},{"fips":"80879","name":"West Union","type":"cdp","bbox":[-87.679856,39.201372,-87.64729,39.223852],"project_ids":["BOTB-1016"]},{"fips":"80931","name":"Westville","type":"village","bbox":[-87.649515,40.027369,-87.62762,40.064437],"project_ids":[]},{"fips":"80957","name":"West York","type":"cdp","bbox":[-87.67559,39.164952,-87.669557,39.172198],"project_ids":["BOTB-0011"]},{"fips":"81048","name":"Wheaton","type":"city","bbox":[-88.151555,41.818438,-88.075444,41.889563],"project_ids":["BOTB-0266"]},{"fips":"81074","name":"Wheeler","type":"village","bbox":[-88.326706,39.034244,-88.310639,39.052472],"project_ids":[]},{"fips":"81087","name":"Wheeling","type":"village","bbox":[-87.96116,42.095157,-87.887568,42.155537],"project_ids":["BOTB-0266"]},{"fips":"81165","name":"Whiteash","type":"cdp","bbox":[-88.937452,37.777595,-88.921449,37.792997],"project_ids":[]},{"fips":"81191","name":"White City","type":"village","bbox":[-89.774143,39.062671,-89.750896,39.082432],"project_ids":["BOTB-0260"]},{"fips":"81256","name":"White Hall","type":"city","bbox":[-90.420051,39.426004,-90.374626,39.451629],"project_ids":["BOTB-0269","BOTB-0275"]}
840,{"fips":"81295","name":"White Heath","type":"cdp","bbox":[-88.521044,40.081397,-88.503558,40.092132],"project_ids":["BOTB-1004"]},{"fips":"81802","name":"Williamsfield","type":"village","bbox":[-90.028427,40.915725,-90.009408,40.941502],"project_ids":[]},{"fips":"81815","name":"Williamson","type":"village","bbox":[-89.773711,38.97586,-89.754867,38.998757],"project_ids":[]},{"fips":"81854","name":"Williamsville","type":"village","bbox":[-89.587538,39.915442,-89.525126,39.976519],"project_ids":[]},{"fips":"81867","name":"Willisville","type":"village","bbox":[-89.594521,37.977101,-89.58504,37.990302],"project_ids":["BOTB-0051"]},{"fips":"81919","name":"Willowbrook","type":"village","bbox":[-87.963823,41.74295,-87.923496,41.783263],"project_ids":[]},{"fips":"81938","name":"Willowbrook","type":"cdp","bbox":[-87.545865,41.435585,-87.525591,41.462268],"project_ids":["BOTB-0266"]},{"fips":"82010","name":"Willow Hill","type":"village","bbox":[-88.031598,38.988522,-88.011978,39.003104],"project_ids":["BOTB-0215"]},{"fips":"82029","name":"Willow Lake","type":"cdp","bbox":[-89.659849,42.321145,-89.612199,42.345951],"project_ids":["BOTB-0220","BOTB-0266"]},{"fips":"82049","name":"Willow Springs","type":"village","bbox":[-87.942262,41.698952,-87.848027,41.754388],"project_ids":["BOTB-0266"]},{"fips":"82075","name":"Wilmette","type":"village","bbox":[-87.778457,42.064666,-87.679343,42.089666],"project_ids":["BOTB-0266"]},{"fips":"82088","name":"Wilmington","type":"village","bbox":[-90.494612,39.473507,-90.475733,39.488012],"project_ids":[]},{"fips":"82101","name":"Wilmington","type":"city","bbox":[-88.235604,41.273109,-88.075576,41.376063],"project_ids":["BOTB-0220","BOTB-0241","BOTB-0266"]},{"fips":"82218","name":"Wilsonville","type":"village","bbox":[-89.862588,39.059916,-89.848074,39.079857],"project_ids":[]},{"fips":"82257","name":"Wilton Center","type":"cdp","bbox":[-87.969269,41.346634,-87.944095,41.358104],"project_ids":[]},{"fips":"82270","name":"Winchester","type":"city","bbox":[-90.468507,39.620733,-90.443418,39.640828],"project_ids":[]},{"fips":"82309","name":"Windsor","type":"village","bbox":[-90.45109,41.194901,-90.436576,41.207064],"project_ids":[]},{"fips":"82322","name":"Windsor","type":"city","bbox":[-88.602921,39.433272,-88.587379,39.446021],"project_ids":["BOTB-0140"]},{"fips":"82400","name":"Winfield","type":"village","bbox":[-88.179496,41.853967,-88.125476,41.908775],"project_ids":["BOTB-0266"]},{"fips":"82491","name":"Winnebago","type":"village","bbox":[-89.251236,42.254307,-89.207313,42.281388],"project_ids":["BOTB-0282"]},{"fips":"82530","name":"Winnetka","type":"village","bbox":[-87.770709,42.088327,-87.710799,42.128468],"project_ids":["BOTB-0266"]},{"fips":"82543","name":"Winslow","type":"village","bbox":[-89.802747,42.486286,-89.789491,42.501242],"project_ids":["BOTB-0280"]},{"fips":"82686","name":"Winthrop Harbor","type":"village","bbox":[-87.864009,42.466141,-87.797638,42.493097],"project_ids":["BOTB-0266"]},{"fips":"82725","name":"Witt","type":"city","bbox":[-89.361473,39.244194,-89.335268,39.261186],"project_ids":[]},{"fips":"82855","name":"Wonder Lake","type":"village","bbox":[-88.394463,42.353435,-88.306093,42.410938],"project_ids":["BOTB-0019","BOTB-0266"]},{"fips":"82985","name":"Wood Dale","type":"city","bbox":[-88.004964,41.942526,-87.95924,41.992872],"project_ids":["BOTB-0266"]},{"fips":"83063","name":"Woodhull","type":"village","bbox":[-90.341817,41.172976,-90.30587,41.184748],"project_ids":[]},{"fips":"83102","name":"Woodland","type":"village","bbox":[-87.739566,40.706856,-87.725883,40.72916],"project_ids":[]},{"fips":"83206","name":"Woodlawn","type":"village","bbox":[-89.050268,38.31627,-89.021216,38.337183],"project_ids":["BOTB-0074"]},{"fips":"83245","name":"Woodridge","type":"village","bbox":[-88.086697,41.678285,-88.00133,41.779536],"project_ids":["BOTB-0266"]},{"fips":"83271","name":"Wood River","type":"city","bbox":[-90.120153,38.842548,-90.020463,38.88139],"project_ids":["BOTB-0266"]},{"fips":"83336","name":"Woodson","type":"village","bbox":[-90.233919,39.621663,-90.217486,39.632599],"project_ids":["BOTB-0196"]},{"fips":"83349","name":"Woodstock","type":"city","bbox":[-88.491777,42.269394,-88.38477,42.356361],"project_ids":["BOTB-0240","BOTB-0266","BOTB-1020"]},{"fips":"83505","name":"Worden","type":"village","bbox":[-89.856938,38.922851,-89.832483,38.940329],"project_ids":[]},{"fips":"83518","name":"Worth","type":"village","bbox":[-87.810496,41.674082,-87.773166,41.702999],"project_ids":["BOTB-0266"]},{"fips":"83622","name":"Wyanet","type":"village","bbox":[-89.592411,41.352715,-89.571573,41.368891],"project_ids":["BOTB-0212"]},{"fips":"83687","name":"Wyoming","type":"city","bbox":[-89.784402,41.053044,-89.764223,41.076914],"project_ids":[]},{"fips":"83739","name":"Xenia","type":"village","bbox":[-88.648992,38.628536,-88.630257,38.650691],"project_ids":[]},{"fips":"83765","name":"Yale","type":"village","bbox":[-88.034676,39.11615,-88.014654,39.124618],"project_ids":["BOTB-0269"]},{"fips":"83817","name":"Yates City","type":"village","bbox":[-90.036499,40.770963,-90.004921,40.78414],"project_ids":[]},{"fips":"84038","name":"Yorkville","type":"city","bbox":[-88.53365,41.573695,-88.389195,41.721891],"project_ids":["BOTB-0266"]},{"fips":"84155","name":"Zeigler","type":"city","bbox":[-89.062881,37.889844,-89.040934,37.92716],"project_ids":["BOTB-0075"]},{"fips":"84220","name":"Zion","type":"city","bbox":[-87.898143,42.430765,-87.797181,42.493899],"project_ids":["BOTB-0232","BOTB-0266"]}]`),yb=JSON.parse('[{"fips":"001","name":"Adams","bbox":[-91.513079,39.756862,-90.911969,40.200041],"project_ids":["BOTB-0190","BOTB-0214","BOTB-0266","BOTB-0275","BOTB-1002","BOTB-1013"]},{"fips":"003","name":"Alexander","bbox":[-89.518477,36.970298,-89.132915,37.335578],"project_ids":["BOTB-0227","BOTB-0269"]},{"fips":"005","name":"Bond","bbox":[-89.639267,38.740509,-89.250238,39.02838],"project_ids":["BOTB-0168","BOTB-0237","BOTB-0243"]},{"fips":"007","name":"Boone","bbox":[-88.940994,42.15232,-88.705389,42.495045],"project_ids":["BOTB-0002","BOTB-0003","BOTB-0015","BOTB-0062","BOTB-0091","BOTB-0220","BOTB-0249","BOTB-0266"]},{"fips":"009","name":"Brown","bbox":[-90.917132,39.838961,-90.510442,40.105902],"project_ids":["BOTB-0266","BOTB-0275","BOTB-1002","BOTB-1007"]},{"fips":"011","name":"Bureau","bbox":[-89.862351,41.14851,-89.163705,41.585362],"project_ids":["BOTB-0003","BOTB-0023","BOTB-0032","BOTB-0080","BOTB-0133","BOTB-0141","BOTB-0147","BOTB-0181","BOTB-0191","BOTB-0212","BOTB-0217","BOTB-0220","BOTB-0266"]},{"fips":"013","name":"Calhoun","bbox":[-90.936728,38.868384,-90.450813,39.400252],"project_ids":["BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"015","name":"Carroll","bbox":[-90.317395,41.928917,-89.684694,42.199112],"project_ids":["BOTB-0009","BOTB-0012","BOTB-0064","BOTB-0220","BOTB-0266","BOTB-0280","BOTB-1006"]},{"fips":"017","name":"Cass","bbox":[-90.583534,39.872601,-89.994405,40.125292],"project_ids":["BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"019","name":"Champaign","bbox":[-88.463634,39.879092,-87.92876,40.400612],"project_ids":["BOTB-0213","BOTB-0266","BOTB-0278","BOTB-0284","BOTB-1004"]},{"fips":"021","name":"Christian","bbox":[-89.535076,39.345825,-89.023987,39.826085],"project_ids":["BOTB-0172","BOTB-0217","BOTB-0221","BOTB-0223","BOTB-0230","BOTB-0266","BOTB-0269","BOTB-0283","BOTB-0287"]},{"fips":"023","name":"Clark","bbox":[-88.013944,39.157513,-87.531355,39.487392],"project_ids":["BOTB-0011","BOTB-0046","BOTB-0112","BOTB-0118","BOTB-0176","BOTB-0253","BOTB-0266","BOTB-0269","BOTB-1009","BOTB-1011","BOTB-1016","BOTB-1022","BOTB-1024"]}
840,{"fips":"025","name":"Clay","bbox":[-88.698459,38.599137,-88.249063,38.915432],"project_ids":["BOTB-0007","BOTB-0266"]},{"fips":"027","name":"Clinton","bbox":[-89.706949,38.415779,-89.138337,38.743236],"project_ids":["BOTB-0079","BOTB-0142","BOTB-0237","BOTB-0239","BOTB-0243","BOTB-0250","BOTB-0266","BOTB-0269","BOTB-1017","BOTB-1026"]},{"fips":"029","name":"Coles","bbox":[-88.472073,39.373638,-87.960179,39.685973],"project_ids":["BOTB-0140","BOTB-0215","BOTB-0262","BOTB-0266","BOTB-0278"]},{"fips":"031","name":"Cook","bbox":[-88.263641,41.469705,-87.111162,42.154292],"project_ids":["BOTB-0263","BOTB-0266","BOTB-0272"]},{"fips":"033","name":"Crawford","bbox":[-87.950392,38.848857,-87.51213,39.17922],"project_ids":["BOTB-0006","BOTB-0011","BOTB-0215","BOTB-0257","BOTB-0266","BOTB-0269"]},{"fips":"035","name":"Cumberland","bbox":[-88.471207,39.171042,-88.007766,39.378968],"project_ids":["BOTB-0140","BOTB-0215","BOTB-0262","BOTB-0266","BOTB-0269"]},{"fips":"037","name":"DeKalb","bbox":[-88.942146,41.628316,-88.588308,42.15359],"project_ids":["BOTB-0010","BOTB-0015","BOTB-0037","BOTB-0088","BOTB-0149","BOTB-0150","BOTB-0183","BOTB-0220","BOTB-0229","BOTB-0233","BOTB-0255","BOTB-0266","BOTB-0281","BOTB-1021"]},{"fips":"039","name":"De Witt","bbox":[-89.148764,40.048853,-88.574885,40.283203],"project_ids":["BOTB-0003","BOTB-0061","BOTB-0175","BOTB-0223","BOTB-0266","BOTB-0276","BOTB-0278"]},{"fips":"041","name":"Douglas","bbox":[-88.473182,39.651588,-87.936988,39.880227],"project_ids":["BOTB-0003","BOTB-0266","BOTB-0278"]},{"fips":"043","name":"DuPage","bbox":[-88.262896,41.685242,-87.914264,41.993886],"project_ids":["BOTB-0241","BOTB-0266"]},{"fips":"045","name":"Edgar","bbox":[-87.968777,39.476676,-87.53164,39.883],"project_ids":["BOTB-0046","BOTB-0112","BOTB-0215","BOTB-0253","BOTB-0266","BOTB-0278","BOTB-1011"]},{"fips":"047","name":"Edwards","bbox":[-88.150891,38.25566,-87.937174,38.570552],"project_ids":["BOTB-0007","BOTB-0269"]},{"fips":"049","name":"Effingham","bbox":[-88.806795,38.910847,-88.360475,39.216263],"project_ids":["BOTB-0007","BOTB-0226","BOTB-0258","BOTB-0266","BOTB-0269"]},{"fips":"051","name":"Fayette","bbox":[-89.257463,38.736331,-88.693531,39.217909],"project_ids":["BOTB-0026","BOTB-0226","BOTB-0243","BOTB-0250","BOTB-0252","BOTB-0269"]},{"fips":"053","name":"Ford","bbox":[-88.459957,40.398417,-87.931712,40.997777],"project_ids":["BOTB-0213","BOTB-0266"]},{"fips":"055","name":"Franklin","bbox":[-89.178371,37.861927,-88.704606,38.126617],"project_ids":["BOTB-0003","BOTB-0074","BOTB-0075","BOTB-0266","BOTB-0269"]},{"fips":"057","name":"Fulton","bbox":[-90.451916,40.183812,-89.872114,40.714868],"project_ids":["BOTB-0036","BOTB-0081","BOTB-0201","BOTB-0214","BOTB-0216","BOTB-0224","BOTB-0266"]},{"fips":"059","name":"Gallatin","bbox":[-88.375434,37.573066,-88.025921,37.916118],"project_ids":["BOTB-0076","BOTB-0225","BOTB-0266","BOTB-0269"]},{"fips":"061","name":"Greene","bbox":[-90.62229,39.117592,-90.148069,39.521803],"project_ids":["BOTB-0003","BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"063","name":"Grundy","bbox":[-88.595961,41.10828,-88.240889,41.463066],"project_ids":["BOTB-0152","BOTB-0220","BOTB-0266"]},{"fips":"065","name":"Hamilton","bbox":[-88.70664,37.906428,-88.370367,38.256661],"project_ids":["BOTB-0075","BOTB-0266","BOTB-0269"]},{"fips":"067","name":"Hancock","bbox":[-91.507269,40.193086,-90.904216,40.639202],"project_ids":["BOTB-0003","BOTB-0138","BOTB-0214","BOTB-0217","BOTB-0266"]},{"fips":"069","name":"Hardin","bbox":[-88.415412,37.401599,-88.061114,37.599625],"project_ids":[]},{"fips":"071","name":"Henderson","bbox":[-91.185295,40.634946,-90.785194,41.070256],"project_ids":["BOTB-0224","BOTB-0266"]},{"fips":"073","name":"Henry","bbox":[-90.437652,41.149304,-89.856613,41.584679],"project_ids":["BOTB-0212","BOTB-0217","BOTB-0224","BOTB-0266","BOTB-0268"]},{"fips":"075","name":"Iroquois","bbox":[-88.131935,40.485568,-87.525661,41.010341],"project_ids":["BOTB-0008","BOTB-0213","BOTB-0266","BOTB-0278"]},{"fips":"077","name":"Jackson","bbox":[-89.680868,37.561925,-89.150662,37.955343],"project_ids":["BOTB-0003","BOTB-0075","BOTB-0077","BOTB-0222","BOTB-0254","BOTB-0266","BOTB-0269","BOTB-0279"]}
840,{"fips":"079","name":"Jasper","bbox":[-88.362779,38.846877,-87.945032,39.174882],"project_ids":["BOTB-0007","BOTB-0215","BOTB-0257","BOTB-0266","BOTB-0269"]},{"fips":"081","name":"Jefferson","bbox":[-89.149841,38.124523,-88.698961,38.476969],"project_ids":["BOTB-0007","BOTB-0074","BOTB-0075","BOTB-0239","BOTB-0266","BOTB-1017"]},{"fips":"083","name":"Jersey","bbox":[-90.603569,38.923395,-90.145828,39.262009],"project_ids":["BOTB-0050","BOTB-0083","BOTB-0143","BOTB-0219","BOTB-0247","BOTB-0260","BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"085","name":"Jo Daviess","bbox":[-90.65671,42.193645,-89.919772,42.508481],"project_ids":["BOTB-0220","BOTB-0266","BOTB-1005"]},{"fips":"087","name":"Johnson","bbox":[-89.044799,37.293933,-88.708546,37.600682],"project_ids":["BOTB-0001","BOTB-0003","BOTB-0075","BOTB-0222","BOTB-0227","BOTB-0266","BOTB-0269"]},{"fips":"089","name":"Kane","bbox":[-88.602566,41.719563,-88.238186,42.154249],"project_ids":["BOTB-0010","BOTB-0037","BOTB-0049","BOTB-0088","BOTB-0220","BOTB-0241","BOTB-0266","BOTB-0273","BOTB-1003"]},{"fips":"091","name":"Kankakee","bbox":[-88.251501,40.99456,-87.526206,41.298052],"project_ids":["BOTB-0008","BOTB-0106","BOTB-0124","BOTB-0218","BOTB-0220","BOTB-0241","BOTB-0249","BOTB-0266","BOTB-0278","BOTB-1015"]},{"fips":"093","name":"Kendall","bbox":[-88.60362,41.457129,-88.252231,41.724656],"project_ids":["BOTB-0266"]},{"fips":"095","name":"Knox","bbox":[-90.444339,40.712361,-89.984557,41.15211],"project_ids":["BOTB-0071","BOTB-0212","BOTB-0224","BOTB-0266"]},{"fips":"097","name":"Lake","bbox":[-88.199763,42.149409,-87.019935,42.495637],"project_ids":["BOTB-0060","BOTB-0095","BOTB-0232","BOTB-0266","BOTB-0274"]},{"fips":"099","name":"LaSalle","bbox":[-89.16715,40.925749,-88.58624,41.631389],"project_ids":["BOTB-0023","BOTB-0147","BOTB-0152","BOTB-0157","BOTB-0191","BOTB-0197","BOTB-0218","BOTB-0220","BOTB-0235","BOTB-0249","BOTB-0255","BOTB-0266"]},{"fips":"101","name":"Lawrence","bbox":[-87.912362,38.568061,-87.495199,38.852507],"project_ids":["BOTB-0003","BOTB-0266","BOTB-0269"]},{"fips":"103","name":"Lee","bbox":[-89.632379,41.584889,-88.938679,41.911716],"project_ids":["BOTB-0023","BOTB-0032","BOTB-0042","BOTB-0070","BOTB-0097","BOTB-0197","BOTB-0202","BOTB-0217","BOTB-0220","BOTB-0235","BOTB-0249","BOTB-0255","BOTB-0266","BOTB-0281","BOTB-1001","BOTB-1027"]},{"fips":"105","name":"Livingston","bbox":[-88.931476,40.61655,-88.23495,41.114218],"project_ids":["BOTB-0218","BOTB-0220","BOTB-0266","BOTB-0278"]},{"fips":"107","name":"Logan","bbox":[-89.603598,39.91686,-89.143451,40.325344],"project_ids":["BOTB-0039","BOTB-0061","BOTB-0172","BOTB-0266"]},{"fips":"109","name":"McDonough","bbox":[-90.909756,40.276335,-90.445627,40.639201],"project_ids":["BOTB-0217","BOTB-0224","BOTB-0266"]},{"fips":"111","name":"McHenry","bbox":[-88.707421,42.15341,-88.198245,42.495181],"project_ids":["BOTB-0003","BOTB-0010","BOTB-0019","BOTB-0060","BOTB-0062","BOTB-0065","BOTB-0090","BOTB-0105","BOTB-0122","BOTB-0128","BOTB-0160","BOTB-0167","BOTB-0195","BOTB-0220","BOTB-0240","BOTB-0249","BOTB-0266","BOTB-0273","BOTB-1010","BOTB-1020"]},{"fips":"113","name":"McLean","bbox":[-89.269397,40.280919,-88.459207,40.757608],"project_ids":["BOTB-0028","BOTB-0039","BOTB-0061","BOTB-0069","BOTB-0089","BOTB-0096","BOTB-0121","BOTB-0213","BOTB-0216","BOTB-0266","BOTB-0270","BOTB-0277","BOTB-0278","BOTB-1018"]},{"fips":"115","name":"Macon","bbox":[-89.217874,39.652678,-88.745057,40.055344],"project_ids":["BOTB-0027","BOTB-0172","BOTB-0173","BOTB-0175","BOTB-0266","BOTB-0283","BOTB-0285","BOTB-0287"]},{"fips":"117","name":"Macoupin","bbox":[-90.153782,38.99833,-89.698555,39.523316],"project_ids":["BOTB-0230","BOTB-0243","BOTB-0247","BOTB-0260","BOTB-0264","BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"119","name":"Madison","bbox":[-90.275702,38.654966,-89.595103,38.9994],"project_ids":["BOTB-0050","BOTB-0079","BOTB-0083","BOTB-0168","BOTB-0171","BOTB-0237","BOTB-0247","BOTB-0259","BOTB-0260","BOTB-0266","BOTB-0269","BOTB-1019"]},{"fips":"121","name":"Marion","bbox":[-89.144388,38.473878,-88.695165,38.826299],"project_ids":["BOTB-0007","BOTB-0026","BOTB-0074","BOTB-0226","BOTB-0239","BOTB-0250","BOTB-0266","BOTB-1017","BOTB-1028"]},{"fips":"123","name":"Marshall","bbox":[-89.638727,40.921205,-89.047059,41.1487],"project_ids":["BOTB-0212","BOTB-0215","BOTB-0220","BOTB-0249","BOTB-0266"]}
840,{"fips":"125","name":"Mason","bbox":[-90.354524,40.050926,-89.601011,40.435995],"project_ids":["BOTB-0214","BOTB-0216","BOTB-0266"]},{"fips":"127","name":"Massac","bbox":[-88.928898,37.06535,-88.4901,37.337081],"project_ids":["BOTB-0001","BOTB-0199","BOTB-0200","BOTB-0227","BOTB-0266"]},{"fips":"129","name":"Menard","bbox":[-89.995113,39.901531,-89.578289,40.160726],"project_ids":["BOTB-0087","BOTB-0093","BOTB-0221","BOTB-0266","BOTB-1014"]},{"fips":"131","name":"Mercer","bbox":[-91.114186,41.063645,-90.433737,41.333361],"project_ids":["BOTB-0224","BOTB-0266"]},{"fips":"133","name":"Monroe","bbox":[-90.372734,38.086907,-89.896751,38.520728],"project_ids":["BOTB-0013","BOTB-0170","BOTB-0179","BOTB-0266","BOTB-0269","BOTB-1008","BOTB-1026"]},{"fips":"135","name":"Montgomery","bbox":[-89.703692,38.998979,-89.139464,39.524599],"project_ids":["BOTB-0168","BOTB-0230","BOTB-0243","BOTB-0260","BOTB-0264","BOTB-0266","BOTB-0269","BOTB-0283"]},{"fips":"137","name":"Morgan","bbox":[-90.599105,39.519945,-89.923955,39.87675],"project_ids":["BOTB-0031","BOTB-0196","BOTB-0230","BOTB-0261","BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"139","name":"Moultrie","bbox":[-88.812709,39.447041,-88.470505,39.792273],"project_ids":["BOTB-0140","BOTB-0173","BOTB-0266"]},{"fips":"141","name":"Ogle","bbox":[-89.688486,41.885463,-88.938935,42.204241],"project_ids":["BOTB-0042","BOTB-0117","BOTB-0132","BOTB-0158","BOTB-0161","BOTB-0202","BOTB-0204","BOTB-0220","BOTB-0228","BOTB-0233","BOTB-0234","BOTB-0249","BOTB-0266","BOTB-0280","BOTB-0281","BOTB-0282","BOTB-1001","BOTB-1006"]},{"fips":"143","name":"Peoria","bbox":[-89.989018,40.513225,-89.447693,40.975055],"project_ids":["BOTB-0201","BOTB-0203","BOTB-0205","BOTB-0212","BOTB-0216","BOTB-0217","BOTB-0238","BOTB-0242","BOTB-0245","BOTB-0266"]},{"fips":"145","name":"Perry","bbox":[-89.595079,37.950186,-89.115253,38.219271],"project_ids":["BOTB-0051","BOTB-0058","BOTB-0077","BOTB-0225","BOTB-0239","BOTB-0248","BOTB-0254","BOTB-0266","BOTB-1017"]},{"fips":"147","name":"Piatt","bbox":[-88.745967,39.79182,-88.460418,40.281935],"project_ids":["BOTB-0027","BOTB-0173","BOTB-0175","BOTB-0266","BOTB-0278","BOTB-1004"]},{"fips":"149","name":"Pike","bbox":[-91.370102,39.395416,-90.565737,39.844927],"project_ids":["BOTB-0048","BOTB-0102","BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"151","name":"Pope","bbox":[-88.710753,37.06725,-88.412659,37.600171],"project_ids":["BOTB-0001","BOTB-0045","BOTB-0075","BOTB-0266"]},{"fips":"153","name":"Pulaski","bbox":[-89.273631,37.06831,-88.92789,37.335329],"project_ids":["BOTB-0227","BOTB-0269"]},{"fips":"155","name":"Putnam","bbox":[-89.466473,41.103766,-89.162237,41.322531],"project_ids":["BOTB-0212","BOTB-0220","BOTB-0235","BOTB-0249","BOTB-0266"]},{"fips":"157","name":"Randolph","bbox":[-90.205205,37.803152,-89.592395,38.223246],"project_ids":["BOTB-0003","BOTB-0004","BOTB-0013","BOTB-0040","BOTB-0051","BOTB-0058","BOTB-0066","BOTB-0085","BOTB-0182","BOTB-0185","BOTB-0186","BOTB-0225","BOTB-0248","BOTB-0254","BOTB-0266","BOTB-0269","BOTB-1008"]},{"fips":"159","name":"Richland","bbox":[-88.297536,38.569033,-87.90811,38.850247],"project_ids":["BOTB-0067","BOTB-0266","BOTB-0269"]},{"fips":"161","name":"Rock Island","bbox":[-91.07207,41.326781,-90.159878,41.782964],"project_ids":["BOTB-0212","BOTB-0217","BOTB-0224","BOTB-0266","BOTB-0268"]},{"fips":"163","name":"St. Clair","bbox":[-90.264123,38.219404,-89.703253,38.66028],"project_ids":["BOTB-0013","BOTB-0040","BOTB-0079","BOTB-0225","BOTB-0237","BOTB-0248","BOTB-0259","BOTB-0266","BOTB-0269","BOTB-1012","BOTB-1026"]},{"fips":"165","name":"Saline","bbox":[-88.708638,37.598991,-88.373465,37.90775],"project_ids":["BOTB-0001","BOTB-0075","BOTB-0076","BOTB-0266","BOTB-0269"]},{"fips":"167","name":"Sangamon","bbox":[-89.994514,39.522104,-89.217437,39.976736],"project_ids":["BOTB-0003","BOTB-0087","BOTB-0093","BOTB-0135","BOTB-0217","BOTB-0221","BOTB-0230","BOTB-0246","BOTB-0261","BOTB-0266","BOTB-0267","BOTB-0269","BOTB-0287","BOTB-1014"]},{"fips":"169","name":"Schuyler","bbox":[-90.913471,39.97883,-90.199635,40.284394],"project_ids":["BOTB-0016","BOTB-0100","BOTB-0214","BOTB-0217","BOTB-0266","BOTB-0269","BOTB-1002","BOTB-1007","BOTB-1023"]},{"fips":"171","name":"Scott","bbox":[-90.646112,39.520269,-90.300666,39.790096],"project_ids":["BOTB-0266","BOTB-0269","BOTB-0275"]},{"fips":"173","name":"Shelby","bbox":[-89.139919,39.214915,-88.470351,39.654292],"project_ids":["BOTB-0139","BOTB-0140","BOTB-0173","BOTB-0223","BOTB-0258","BOTB-0265","BOTB-0266","BOTB-0269","BOTB-0283","BOTB-0286"]},{"fips":"175","name":"Stark","bbox":[-89.985494,40.973707,-89.638456,41.234479],"project_ids":["BOTB-0212","BOTB-0266"]},{"fips":"177","name":"Stephenson","bbox":[-89.926509,42.196651,-89.396192,42.505818],"project_ids":["BOTB-0056","BOTB-0217","BOTB-0220","BOTB-0249","BOTB-0256","BOTB-0266","BOTB-0280","BOTB-0281","BOTB-0282","BOTB-1005","BOTB-1006"]},{"fips":"179","name":"Tazewell","bbox":[-89.92468,40.319212,-89.26374,40.748257],"project_ids":["BOTB-0039","BOTB-0041","BOTB-0069","BOTB-0072","BOTB-0082","BOTB-0096","BOTB-0103","BOTB-0104","BOTB-0210","BOTB-0211","BOTB-0216","BOTB-0217","BOTB-0231","BOTB-0236","BOTB-0266","BOTB-1018"]},{"fips":"181","name":"Union","bbox":[-89.521979,37.329717,-89.0414,37.600279],"project_ids":["BOTB-0075","BOTB-0222","BOTB-0227","BOTB-0269","BOTB-0279"]}
840,{"fips":"183","name":"Vermilion","bbox":[-87.942103,39.868459,-87.526366,40.491237],"project_ids":["BOTB-0213","BOTB-0215","BOTB-0266","BOTB-0284"]},{"fips":"185","name":"Wabash","bbox":[-87.992328,38.236297,-87.645118,38.57023],"project_ids":["BOTB-0005","BOTB-0215","BOTB-0266","BOTB-0269"]},{"fips":"187","name":"Warren","bbox":[-90.789653,40.627638,-90.439423,41.068843],"project_ids":["BOTB-0217","BOTB-0224","BOTB-0266"]},{"fips":"189","name":"Washington","bbox":[-89.70425,38.212895,-89.143866,38.518861],"project_ids":["BOTB-0074","BOTB-0154","BOTB-0186","BOTB-0239","BOTB-0248","BOTB-0266","BOTB-0269","BOTB-1017","BOTB-1026"]},{"fips":"191","name":"Wayne","bbox":[-88.702405,38.255301,-88.147752,38.607309],"project_ids":["BOTB-0007","BOTB-0266","BOTB-0269"]},{"fips":"193","name":"White","bbox":[-88.374644,37.888051,-87.910623,38.259894],"project_ids":["BOTB-0068","BOTB-0076","BOTB-0217","BOTB-0266","BOTB-0269"]},{"fips":"195","name":"Whiteside","bbox":[-90.247917,41.583654,-89.628907,41.931298],"project_ids":["BOTB-0217","BOTB-0220","BOTB-0266","BOTB-0268"]},{"fips":"197","name":"Will","bbox":[-88.261275,41.201566,-87.525591,41.728894],"project_ids":["BOTB-0052","BOTB-0220","BOTB-0241","BOTB-0249","BOTB-0266","BOTB-0271","BOTB-0278","BOTB-1015"]},{"fips":"199","name":"Williamson","bbox":[-89.153617,37.596222,-88.706741,37.863601],"project_ids":["BOTB-0001","BOTB-0003","BOTB-0075","BOTB-0222","BOTB-0225","BOTB-0266","BOTB-0269"]},{"fips":"201","name":"Winnebago","bbox":[-89.401423,42.150266,-88.939732,42.500563],"project_ids":["BOTB-0015","BOTB-0084","BOTB-0151","BOTB-0177","BOTB-0220","BOTB-0228","BOTB-0233","BOTB-0234","BOTB-0249","BOTB-0266","BOTB-0281","BOTB-0282"]},{"fips":"203","name":"Woodford","bbox":[-89.563626,40.594318,-88.929331,40.92774],"project_ids":["BOTB-0053","BOTB-0069","BOTB-0211","BOTB-0216","BOTB-0217","BOTB-0220","BOTB-0266","BOTB-1018"]}]'),yO={class:"px-4 py-3 bg-base-100 w-full text-base-content border-b border-base-300"},bO={class:"flex flex-wrap items-end gap-6 justify-between"},xO={class:"flex flex-wrap items-end gap-6"},vO={class:"flex flex-col space-y-1"},wO={class:"dropdown"},BO={tabindex:"0",role:"button",class:"input input-sm w-44 flex items-center justify-between text-sm cursor-pointer"},TO={class:"truncate"},SO={tabindex:"0",class:"dropdown-content menu p-2 shadow bg-base-100 rounded-box w-44 z-10"},OO={class:"flex flex-col space-y-1"},PO={class:"relative"},CO=["onMousedown","onMouseenter"],EO={class:"flex justify-between items-center"},MO={class:"font-medium text-sm"},IO={class:"text-xs text-base-content/60 capitalize"},AO={class:"flex flex-col space-y-1"},jO={class:"relative"},kO=["onMousedown","onMouseenter"],RO={class:"flex flex-col"},DO={class:"font-medium text-sm"},LO={key:0,class:"text-xs text-base-content/60"},zO={class:"flex flex-col space-y-1"},FO={class:"relative"},NO=["onMousedown","onMouseenter"],$O={class:"flex flex-col"},UO={class:"font-medium text-sm"},VO={key:0,class:"text-xs text-base-content/60"},GO={class:"flex flex-col space-y-1"},HO=["disabled"],ZO={key:0,class:"badge badge-primary badge-sm ml-0.5"},qO={class:"flex flex-col space-y-1"},WO=zn({__name:"MapToolbar",setup(i){const o=af(),u=_i(()=>{let Ye=0;return o.selectedCountyOrPlace&&Ye++,o.selectedProviderUei&&Ye++,o.selectedProjectId&&Ye++,Ye}),d=$h(),y=_i(()=>Object.fromEntries(Ns.map(Ye=>[Ye.uei,Ye.name]))),w=_i(()=>{const Ye=o.selectedCountyOrPlace;if(!Ye)return null;let gt;return Ye.type==="county"?gt=yb.find(ct=>ct.fips===Ye.fips)?.project_ids:gt=_b.find(ct=>ct.fips===Ye.fips)?.project_ids,gt?.length?new Set(gt):null}),v=vi(""),a=vi(!1),M=vi([]),D=vi(-1),F=vi(""),H=vi(!1),W=vi(-1),G=vi(""),Pe=vi(!1),Ie=vi(-1),rt=_i(()=>{if(!v.value.trim())return[];const Ye=v.value.toLowerCase().trim(),gt={county:1,city:2,village:3,cdp:4},ct=M.value.filter(Ht=>Ht.name.toLowerCase().includes(Ye)),At=ct.filter(Ht=>Ht.name.toLowerCase().startsWith(Ye)),De=ct.filter(Ht=>!Ht.name.toLowerCase().startsWith(Ye)),ut=(Ht,re)=>{const ae=gt[Ht.type]-gt[re.type];
840return ae!==0?ae:Ht.name.localeCompare(re.name)},st=At.sort(ut),vt=De.sort(ut);return[...st,...vt].slice(0,5)}),nt=_i(()=>{let Ye=Ns;if(w.value){const ct=new Set(d.projects.filter(At=>At.uei&&w.value.has(At.project_id)).map(At=>At.uei));Ye=Ye.filter(At=>ct.has(At.uei))}if(o.selectedProjectId){const ct=d.getProjectInfo(o.selectedProjectId);ct?.uei&&(Ye=Ye.filter(At=>At.uei===ct.uei))}const gt=F.value.toLowerCase().trim();return gt?Ye.filter(ct=>ct.name.toLowerCase().includes(gt)||(ct.aka||"").toLowerCase().includes(gt)):Ye}),Ae=_i(()=>{let Ye=d.projects;w.value&&(Ye=Ye.filter(ct=>w.value.has(ct.project_id))),o.selectedProviderUei&&(Ye=Ye.filter(ct=>ct.uei===o.selectedProviderUei));const gt=G.value.toLowerCase().trim();return gt?Ye.filter(ct=>{const At=y.value[ct.uei??""]??"";return(ct.project_name||ct.project_id).toLowerCase().includes(gt)||At.toLowerCase().includes(gt)}):Ye}),ke=()=>{a.value=!0,D.value=-1,v.value.trim()||o.clearSelectedCountyOrPlace()},Te=()=>{H.value=!1,Pe.value=!1,a.value=!0},je=()=>{a.value=!1,Pe.value=!1,H.value=!0},Ce=()=>{a.value=!1,H.value=!1,Pe.value=!0},Re=Ye=>{if(!(!a.value||rt.value.length===0))switch(Ye.key){case"ArrowDown":Ye.preventDefault(),D.value=Math.min(D.value+1,rt.value.length-1);break;case"ArrowUp":Ye.preventDefault(),D.value=Math.max(D.value-1,-1);break;case"Enter":Ye.preventDefault(),D.value>=0&&dt(rt.value[D.value]);break;case"Escape":a.value=!1,D.value=-1;break}},pt=()=>{setTimeout(()=>{a.value=!1,D.value=-1},150)},Ge=()=>{v.value="",a.value=!1,D.value=-1,o.clearSelectedCountyOrPlace()},dt=Ye=>{v.value=Ye.name,a.value=!1;const gt=Ye.originalData,ct=(Ye.type==="county",gt.fips),At=gt.bbox;o.setSelectedCountyOrPlace({fips:ct,name:Ye.name,type:Ye.type,bbox:At}),console.log("Selected and persisted:",{fips:ct,name:Ye.name,type:Ye.type,bbox:At})},_t=Ye=>{o.setColorScheme(Ye),console.log("Color scheme changed to:",Ye),document.activeElement instanceof HTMLElement&&document.activeElement.blur()},Xe=()=>{H.value=!0,W.value=-1,F.value.trim()||o.setSelectedProviderUei(null)},Et=()=>{setTimeout(()=>{H.value=!1,W.value=-1},150)},di=Ye=>{if(!(!H.value||nt.value.length===0))switch(Ye.key){case"ArrowDown":Ye.preventDefault(),W.value=Math.min(W.value+1,nt.value.length-1);break;case"ArrowUp":Ye.preventDefault(),W.value=Math.max(W.value-1,-1);break;case"Enter":Ye.preventDefault(),W.value>=0&&qt(nt.value[W.value]);break;case"Escape":H.value=!1,W.value=-1;break}},yi=()=>{F.value="",H.value=!1,W.value=-1,o.setSelectedProviderUei(null)},qt=Ye=>{F.value=Ye.name+(Ye.aka?` (${Ye.aka})`:""),H.value=!1,W.value=-1;const gt=d.providerBboxByUei[Ye.uei]??void 0;o.setSelectedProviderUei(Ye.uei,gt)},It=()=>{Pe.value=!0,Ie.value=-1,G.value.trim()||o.setSelectedProjectId(null)},ni=()=>{setTimeout(()=>{Pe.value=!1,Ie.value=-1},150)},Ft=Ye=>{if(!(!Pe.value||Ae.value.length===0))switch(Ye.key){case"ArrowDown":Ye.preventDefault(),Ie.value=Math.min(Ie.value+1,Ae.value.length-1);break;case"ArrowUp":Ye.preventDefault(),Ie.value=Math.max(Ie.value-1,-1);break;case"Enter":Ye.preventDefault(),Ie.value>=0&&bi(Ae.value[Ie.value]);break;case"Escape":Pe.value=!1,Ie.value=-1;break}},ir=()=>{G.value="",Pe.value=!1,Ie.value=-1,o.setSelectedProjectId(null)},bi=Ye=>{G.value=Ye.project_name||Ye.project_id,Pe.value=!1,Ie.value=-1,o.setSelectedProjectId(Ye.project_id,Ye.bbox??void 0)},Bi=()=>{v.value="",a.value=!1,D.value=-1,o.clearSelectedCountyOrPlace(),o.setSelectedProviderUei(null),F.value="",o.setSelectedProjectId(null),G.value="",console.log("All filters reset")};return Cc(()=>{d.loadProjects();const Ye=_b.map(ct=>({name:ct.name,type:ct.type,originalData:{...ct,bbox:ct.bbox}})),gt=yb.map(ct=>({name:ct.name.charAt(0)+ct.name.slice(1).toLowerCase()+" County",type:"county",originalData:{...ct,bbox:ct.bbox}}));M.value=[...Ye,...gt]}),(Ye,gt)=>(Pt(),Lt("div",yO,[ue("div",bO,[ue("div",xO,[ue("div",vO,[gt[10]||(gt[10]=ue("label",{class:"text-xs font-medium text-base-content/80"}," Color map by ",-1)),ue("div",wO,[ue("div",BO,[ue("span",TO,Jt(wi(o).selectedColorSchemeDisplayName),1),gt[9]||(gt[9]=ue("svg",{class:"w-3 h-3 ml-1 flex-shrink-0 text-base-content/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ue("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),ue("ul",SO,[ue("li",null,[ue("a",{onClick:gt[0]||(gt[0]=ct=>_t("location-type"))},"Location Type")]),ue("li",null,[ue("a",{onClick:gt[1]||(gt[1]=ct=>_t("grantee"))},"Broadband Provider")]),ue("li",null,[ue("a",{onClick:gt[2]||(gt[2]=ct=>_t("technology"))},"Technology")])])])]),ue("div",OO,[gt[11]||(gt[11]=ue("label",{class:"text-xs font-medium text-base-content/80"}," Filter by area ",-1)),ue("div",PO,[od(ue("input",{type:"text",placeholder:"County or municipality...",class:kn(["input input-sm w-64 pr-8 text-sm",wi(o).selectedCountyOrPlace?"!border-base-content":""]),"onUpdate:modelValue":gt[3]||(gt[3]=ct=>v.value=ct),onInput:ke,onFocus:Te,onBlur:pt,onKeydown:Re},null,34),[[Lm,v.value]]),wi(o).selectedCountyOrPlace||v.value.trim()?(Pt(),Lt("button",{key:0,onClick:Ge,class:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-base-200 transition-colors",type:"button","aria-label":"Clear search"},[Wi(wi(md),{class:"w-3 h-3 text-base-content/60"})])):or("",!0),a.value&&rt.value.length>0?(Pt(),Lt("div",{key:1,class:"absolute top-full left-0 right-0 bg-base-100 border border-base-300 rounded-b-lg shadow-lg z-10 max-h-60 overflow-y-auto",onMouseleave:gt[4]||(gt[4]=ct=>D.value=-1)},[(Pt(!0),Lt(Zi,null,Kn(rt.value,(ct,At)=>(Pt(),Lt("div",{key:`${ct.type}-${ct.name}`,class:kn(["px-3 py-2 cursor-pointer border-b border-base-300 last:border-b-0 hover:bg-base-200",{"bg-base-200":At===D.value}]),onMousedown:zm(De=>dt(ct),["prevent"]),onMouseenter:De=>D.value=At},[ue("div",EO,[ue("span",MO,Jt(ct.name),1),ue("span",IO,Jt(ct.type==="county"?"County":ct.type),1)])],42,CO))),128))],32)):or("",!0)])]),ue("div",AO,[gt[12]||(gt[12]=ue("label",{class:"text-xs font-medium text-base-content/80"}," Filter by provider ",-1)),ue("div",jO,[od(ue("input",{type:"text",placeholder:"Search providers...",class:kn(["input input-sm w-56 pr-8 text-sm",wi(o).selectedProviderUei?"!border-base-content":""]),"onUpdate:modelValue":gt[5]||(gt[5]=ct=>F.value=ct),onInput:Xe,onFocus:je,onBlur:Et,onKeydown:di},null,34),[[Lm,F.value]]),wi(o).selectedProviderUei||F.value.trim()?(Pt(),Lt("button",{key:0,onClick:yi,class:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-base-200 transition-colors",type:"button","aria-label":"Clear provider search"},[Wi(wi(md),{class:"w-3 h-3 text-base-content/60"})])):or("",!0),H.value&&nt.value.length>0?(Pt(),Lt("div",{key:1,class:"absolute top-full left-0 right-0 bg-base-100 border border-base-300 rounded-b-lg shadow-lg z-20 max-h-60 overflow-y-auto",onMouseleave:gt[6]||(gt[6]=ct=>W.value=-1)},[(Pt(!0),Lt(Zi,null,Kn(nt.value,(ct,At)=>(Pt(),Lt("div",{key:ct.uei,class:kn(["px-3 py-2 cursor-pointer border-b border-base-300 last:border-b-0 hover:bg-base-200",{"bg-base-200":At===W.value}]),onMousedown:zm(De=>qt(ct),["prevent"]),onMouseenter:De=>W.value=At},[ue("div",RO,[ue("span",DO,Jt(ct.name),1),ct.aka?(Pt(),Lt("span",LO,"("+Jt(ct.aka)+")",1)):or("",!0)])],42,kO))),128))],32)):or("",!0)])]),ue("div",zO,[gt[13]||(gt[13]=ue("label",{class:"text-xs font-medium text-base-content/80"}," Filter by project ",-1)),ue("div",FO,[od(ue("input",{type:"text",placeholder:"Search projects...",class:kn(["input input-sm w-56 pr-8 text-sm",wi(o).selectedProjectId?"!border-base-content":""]),"onUpdate:modelValue":gt[7]||(gt[7]=ct=>G.value=ct),onInput:It,onFocus:Ce,onBlur:ni,onKeydown:Ft},null,34),[[Lm,G.value]]),wi(o).selectedProjectId||G.value.trim()?(Pt(),Lt("button",{key:0,onClick:ir,class:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-base-200 transition-colors",type:"button","aria-label":"Clear project search"},[Wi(wi(md),{class:"w-3 h-3 text-base-content/60"})])):or("",!0),Pe.value&&Ae.value.length>0?(Pt(),Lt("div",{key:1,class:"absolute top-full left-0 right-0 bg-base-100 border border-base-300 rounded-b-lg shadow-lg z-20 max-h-60 overflow-y-auto",onMouseleave:gt[8]||(gt[8]=ct=>Ie.value=-1)},[(Pt(!0),Lt(Zi,null,Kn(Ae.value,(ct,At)=>(Pt(),Lt("div",{key:ct.project_id,class:kn(["px-3 py-2 cursor-pointer border-b border-base-300 last:border-b-0 hover:bg-base-200",{"bg-base-200":At===Ie.value}]),onMousedown:zm(De=>bi(ct),["prevent"]),onMouseenter:De=>Ie.value=At},[ue("div",$O,[ue("span",UO,Jt(ct.project_name||ct.project_id),1),ct.uei?(Pt(),Lt("span",VO,Jt(y.value[ct.uei]),1)):or("",!0)])],42,NO))),128))],32)):or("",!0)])]),ue("div",GO,[gt[15]||(gt[15]=ue
840("label",{class:"text-xs font-medium text-base-content/80 opacity-0"}," Reset ",-1)),ue("button",{onClick:Bi,class:"btn btn-sm btn-outline text-sm",disabled:u.value===0},[gt[14]||(gt[14]=Xn(" Reset Filters ",-1)),u.value>0?(Pt(),Lt("span",ZO,Jt(u.value),1)):or("",!0)],8,HO)])]),ue("div",qO,[gt[16]||(gt[16]=ue("label",{class:"text-xs font-medium text-base-content/80 opacity-0"}," Download ",-1)),Wi(_O)])])]))}}),jg={other:{id:"other",name:"Other",color:"#9CA3AF",codes:["0"]},"copper-dsl":{id:"copper-dsl",name:"Copper / DSL",color:"#EF4444",codes:["10"]},"coaxial-cable":{id:"coaxial-cable",name:"Coaxial Cable",color:"#ffd166",codes:["40"]},fiber:{id:"fiber",name:"Fiber to the Premises",color:"rgb(0, 211, 144)",codes:["50"]},satellite:{id:"satellite",name:"Satellite",color:"#ef476f",codes:["60","61"]},"fixed-wireless":{id:"fixed-wireless",name:"Fixed Wireless",color:"#118ab2",codes:["70","71","72"]}},kg={};Object.values(jg).forEach(i=>{i.codes.forEach(o=>{kg[o]=i})});const kd={circle:"rgb(0, 211, 144)",triangle:"#605dff"},fc="#6B7280";function F0(i,o,u="circle"){switch(i){case"location-type":return kd[u];case"grantee":if(!o)return fc;const d=Ns.find(w=>w.uei===o);return d?d.mapColor:fc;case"technology":if(!o)return fc;const y=kg[o];return y?y.color:fc;default:return kd[u]}}function KO(){const i=["case"];return Object.values(jg).forEach(o=>{i.push(["in",["get","technology"],["literal",o.codes]]),i.push(o.color)}),i.push(fc),i}function XO(){const i=["case"];return Ns.forEach(o=>{i.push(["==",["get","uei"],o.uei]),i.push(o.mapColor)}),i.push(fc),i}function YO(){return Object.values(jg).filter(i=>["coaxial-cable","fiber","satellite","fixed-wireless"].includes(i.id))}function JO(){const i={};return Object.entries(kg).forEach(([o,u])=>{i[o]=u.color}),i}const QO={class:"map-legend"},eP={class:"legend-header"},tP={class:"legend-content"},iP={key:0,class:"legend-items"},rP={class:"legend-item"},nP={class:"legend-item"},sP={key:1,class:"legend-items"},oP={class:"legend-section"},aP={class:"legend-label"},lP={role:"alert",class:"alert alert-warning alert-soft text-xs mt-4"},cP={class:"flex items-center gap-2"},uP={key:2,class:"legend-items"},hP={class:"legend-section"},pP={class:"legend-label"},dP=zn({__name:"MapLegend",setup(i){const o=af(),u=Pg(),d=vi(!0);Cc(()=>{d.value=!u.isSmallScreen});const y=()=>{d.value=!d.value},w=YO();return(v,a)=>(Pt(),Lt("div",QO,[ue("div",eP,[a[0]||(a[0]=ue("h3",{class:"legend-title"},"Legend",-1)),ue("button",{onClick:y,class:"btn btn-xs btn-ghost text-white hover:bg-white/10"},Jt(d.value?"Hide":"Show"),1)]),od(ue("div",tP,[wi(o).selectedColorScheme==="location-type"?(Pt(),Lt("div",iP,[ue("div",rP,[ue("div",{class:"legend-symbol circle-symbol",style:Yr({backgroundColor:wi(F0)("location-type",void 0,"circle")})},null,4),a[1]||(a[1]=ue("span",{class:"legend-label"},"Broadband Serviceable Location (BSL)",-1))]),ue("div",nP,[ue("div",{class:"legend-symbol triangle-symbol",style:Yr({borderBottomColor:wi(F0)("location-type",void 0,"triangle")})},null,4),a[2]||(a[2]=ue("span",{class:"legend-label"},"Community Anchor Institution (CAI)",-1))])])):wi(o).selectedColorScheme==="grantee"?(Pt(),Lt("div",sP,[a[5]||(a[5]=My('<div class="legend-section" data-v-b4363e34><div class="legend-section-title" data-v-b4363e34>Symbols</div><div class="legend-item" data-v-b4363e34><div class="legend-symbol circle-symbol" style="background-color:#6b7280;" data-v-b4363e34></div><span class="legend-label" data-v-b4363e34>Broadband Serviceable Location (BSL)</span></div><div class="legend-item" data-v-b4363e34><div class="legend-symbol triangle-symbol" style="border-bottom-color:#6b7280;" data-v-b4363e34></div><span class="legend-label" data-v-b4363e34>Community Anchor Institution (CAI)</span></div></div>',1)),ue("div",oP,[a[4]||(a[4]=ue("div",{class:"legend-section-title"},"Broadband Providers by Color",-1)),(Pt(!0),Lt(Zi,null,Kn(wi(Ns),M=>(Pt(),Lt("div",{key:M.uei,class:"legend-item"},[ue("div",{class:"legend-symbol circle-symbol",style:Yr({backgroundColor:M.mapColor})},null,4),ue("div",{class:"legend-symbol triangle-symbol",style:Yr({borderBottomColor:M.mapColor})},null,4),ue("span",aP,Jt(wi(fx)(M)),1)]))),128)),ue("div",lP,[ue("span",cP,[Wi(wi(tS),{class:"w-7 h-7"}),a[3]||(a[3]=Xn(" We're working on making these colors easier to distinguish. ",-1))])])])])):wi(o).selectedColorScheme==="technology"?(Pt(),Lt("div",uP,[a[7]||(a[7]=My('<div class="legend-section" data-v-b4363e34><div class="legend-section-title" data-v-b4363e34>Symbols</div><div class="legend-item" data-v-b4363e34><div class="legend-symbol circle-symbol" style="background-color:#6b7280;" data-v-b4363e34></div><span class="legend-label" data-v-b4363e34>Broadband Serviceable Location (BSL)</span></div><div class="legend-item" data-v-b4363e34><div class="legend-symbol triangle-symbol" style="border-bottom-color:#6b7280;" data-v-b4363e34></div><span class="legend-label" data-v-b4363e34>Community Anchor Institution (CAI)</span></div></div>',1)),ue("div",hP,[a[6]||(a[6]=ue("div",{class:"legend-section-title"},"Technologies by Color",-1)),(Pt(!0),Lt(Zi,null,Kn(wi(w),M=>(Pt(),Lt("div",{key:M.id,class:"legend-item"},[ue("div",{class:"legend-symbol circle-symbol",style:Yr({backgroundColor:M.color})},null,4),ue("div",{class:"legend-symbol triangle-symbol",style:Yr({borderBottomColor:M.color})},null,4),ue("span",pP,Jt(M.name),1)]))),128))])])):or("",!0)],512),[[B9,d.value]])]))}}),fP=(i,o)=>{const u=i.__vccOpts||i;for(const[d,y]of o)u[d]=y;return u},mP=fP(dP,[["__scopeId","data-v-b4363e34"]]),gP=i=>{const o=i.trim().split(`
841`);if(o.length<2)return[];const u=o[0].split(",").map(y=>y.trim().replace(/^"(.*)"$/,"$1")),d=[];for(let y=1;y<o.length;y++){const w=o[y].trim();if(!w)continue;const v=[];let a="",M=!1;for(let D=0;D<w.length;D++){const F=w[D];F==='"'?M=!M:F===","&&!M?(v.push(a.trim().replace(/^"(.*)"$/,"$1")),a=""):a+=F}if(v.push(a.trim().replace(/^"(.*)"$/,"$1")),v.length===u.length){const D={};u.forEach((F,H)=>{const W=v[H];W&&!isNaN(Number(W))&&W!==""?D[F]=Number(W):D[F]=W||null}),d.push(D)}}return d},gx=Kd("stats",()=>{const i=vi([]),o=vi(!1),u=vi(!1);return{statAtoms:i,isLoaded:o,isLoading:u,loadStatAtoms:async()=>
841{if(!(o.value||u.value)){u.value=!0;try{const v=await fetch("https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/stat_atoms_20260731.csv");if(!v.ok)throw new Error(`Failed to fetch stat atoms: ${v.status}`);const a=await v.text(),M=gP(a);i.value=M,o.value=!0,console.log(`Loaded ${M.length} stat atoms`)}catch(v){console.error("Error loading stat atoms:",v)}finally{u.value=!1}}},getStatAtomsByField:(v,a)=>i.value.filter(M=>M[v]===a),getUniqueValues:v=>{const a=i.value.map(M=>M[v]).filter(M=>M!=null);return[...new Set(a)]}}}),_P={class:"bg-base-100 shadow-lg border border-base-300 rounded-lg w-[400px] h-full flex flex-col"},yP={class:"mb-4 text-center p-4 pb-0 flex-shrink-0"},bP={class:"text-sm font-medium text-base-content/80"},xP={class:"space-y-3 p-4 pt-0 overflow-y-auto flex-1"},vP={class:"stat bg-base-200 border border-base-300 rounded-lg p-4"},wP={class:"stat-figure text-base-content/70"},BP={class:"stat-value text-base-content text-2xl font-bold"},TP={class:"grid grid-cols-2 gap-3"},SP={class:"bg-base-200 border border-base-300 rounded-lg p-3 overflow-hidden"},OP={class:"text-base-content text-xl font-bold"},PP={class:"bg-base-200 border border-base-300 rounded-lg p-3 overflow-hidden"},CP={class:"text-base-content text-xl font-bold"},EP={class:"bg-base-100 border border-base-300 rounded-lg p-4 overflow-visible"},MP={class:"relative w-full h-8 bg-base-200 rounded-full overflow-hidden mb-3"},IP={class:"space-y-2 text-xs"},AP={class:"text-base-content/70"},jP={class:"font-medium ml-auto"},kP={class:"bg-base-100 border border-base-300 rounded-lg p-4 overflow-visible"},RP={class:"relative w-full h-8 bg-base-200 rounded-full overflow-hidden mb-3"},DP={class:"space-y-2 text-xs"},LP={class:"text-base-content/70"},zP={class:"font-medium ml-auto"},FP={class:"bg-base-100 border border-base-300 rounded-lg p-4 overflow-visible"},NP={class:"relative w-full h-8 bg-base-200 rounded-full overflow-hidden mb-3"},$P={class:"space-y-2 text-xs"},UP={class:"text-base-content/70"},VP={class:"font-medium ml-auto"},GP={key:0,class:"bg-base-100 border border-base-300 rounded-lg p-4 overflow-visible"},HP={class:"space-y-2 text-xs"},ZP=["title"],qP={class:"font-medium"},WP={key:0,class:"pt-2 text-center"},KP=zn({__name:"StatPanel",setup(i){const o=af(),u=gx(),d=$h(),y=vi(!1);na([()=>o.selectedCountyOrPlace,()=>o.selectedProviderUei,()=>o.selectedProjectId],()=>{y.value=!1});const w=_i(()=>{if(!o.selectedCountyOrPlace)return"Statewide";const Te=o.selectedCountyOrPlace;return Te.type==="county"?`${Te.name}`:`the ${Te.type} of ${Te.name}`}),v=_i(()=>{if(!o.selectedProviderUei)return"All Providers";const Te=Ns.find(je=>je.uei===o.selectedProviderUei);return Te?Te.name+(Te.aka?` (${Te.aka})`:""):"All Providers"}),a=_i(()=>{if(!o.selectedProjectId)return"All Projects";const Te=d.getProjectInfo(o.selectedProjectId);return Te?Te.project_name||Te.project_id:"All Projects"}),M=_i(()=>
841{const Te=w.value,je=v.value,Ce=a.value,Re=[];return je!=="All Providers"&&Re.push(je),Ce!=="All Projects"&&Re.push(`Project: ${Ce}`),Re.push("locations"),Te==="Statewide"?Re.push("statewide"):Re.push(`in ${Te}`),Re.join(" ")}),D=_i(()=>{let Te=u.statAtoms;if(o.selectedCountyOrPlace){const je=o.selectedCountyOrPlace;je.type==="county"?Te=Te.filter(Ce=>Number(Ce.county_fips)===Number(je.fips)):Te=Te.filter(Ce=>Ce.place_fips==je.fips)}return o.selectedProviderUei&&(Te=Te.filter(je=>je.uei===o.selectedProviderUei)),o.selectedProjectId&&(Te=Te.filter(je=>je.project_id===o.selectedProjectId)),Te}),F=_i(()=>D.value.reduce((Te,je)=>Te+(Number(je.num_awarded_locs)||0),0)),H=_i(()=>D.value.reduce((Te,je)=>Te+(Number(je.num_awarded_bsls)||0),0)),W=_i(()=>D.value.reduce((Te,je)=>Te+(Number(je.num_awarded_cais)||0),0)),G=Te=>Te.toLocaleString(),Pe=_i(()=>{const Te=new Map;D.value.forEach(Re=>{const pt=Re.uei,Ge=Number(Re.num_awarded_locs)||0;pt&&Ge>0&&Te.set(pt,(Te.get(pt)||0)+Ge)});const je=Array.from(Te.entries()).map(([Re,pt])=>{const Ge=Ns.find(_t=>_t.uei===Re),dt=Ge?.name||`Unknown Provider (${Re})`;return{uei:Re,name:dt,locationCount:pt,color:Ge?.mapColor||"#6b7280"}}).sort((Re,pt)=>pt.locationCount-Re.locationCount),Ce=je.reduce((Re,pt)=>Re+pt.locationCount,0);return je.map(Re=>({...Re,percentage:Ce>0?Re.locationCount/Ce*100:0}))}),Ie=_i(()=>Pe.value.slice(0,5)),rt=_i(()=>Pe.value.slice(5)),nt=_i(()=>{const Te=[{label:"100-200 Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_dn_100_i_200_e)||0),0),color:"#05676E"},{label:"200-500 Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_dn_200_i_500_e)||0),0),color:"#189796"},{label:"500-1000 Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_dn_500_i_1000_e)||0),0),color:"#2ACAC0"},{label:"1000+ Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_dn_1000_i_inf_i)||0),0),color:"#3BFFEB"}],je=Te.reduce((Ce,Re)=>Ce+Re.value,0);return Te.map(Ce=>({...Ce,percentage:je>0?Ce.value/je*100:0}))}),Ae=_i(()=>{const Te=[{label:"20-50 Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_up_20_i_50_e)||0),0),color:"#05676E"},{label:"50-100 Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_up_50_i_100_e)||0),0),color:"#189796"},{label:"100-200 Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_up_100_i_200_e)||0),0),color:"#2ACAC0"},{label:"200+ Mbps",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_up_200_i_inf_i)||0),0),color:"#3beddb"}],je=Te.reduce((Ce,Re)=>Ce+Re.value,0);return Te.map(Ce=>({...Ce,percentage:je>0?Ce.value/je*100:0}))}),ke=_i(()=>{const Te=[{label:"Cable",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_cable)||0),0),color:"#ffd166"},{label:"Fiber",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_fiber)||0),0),color:"rgb(0, 211, 144)"},{label:"Wireless",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_wireless)||0),0),color:"#118ab2"},{label:"Satellite",value:D.value.reduce((Ce,Re)=>Ce+(Number(Re.num_awarded_locs_satellite)||0),0),color:"#ef476f"}],je=Te.reduce((Ce,Re)=>Ce+Re.value,0);return Te.map(Ce=>({...Ce,percentage:je>0?Ce.value/je*100:0}))});return(Te,je)=>(Pt(),Lt("div",_P,[ue("div",yP,[je[1]||(je[1]=ue("div",{class:"text-xs text-base-content/50 mb-1"},"This is a summary of",-1)),ue("div",bP,Jt(M.value),1)]),ue("div",xP,[ue("div",vP,[ue("div",wP,[Wi(wi(iS),{class:"w-8 h-8"})]),je[2]||(je[2]=ue("div",{class:"stat-title text-base-content/70 text-sm font-medium"},"Total Locations",-1)),ue("div",BP,Jt(G(F.value)),1)]),ue("div",TP,[ue("div",SP,[je[3]||(je[3]=ue("div",{class:"text-base-content/70 text-xs font-medium leading-tight mb-2 w-full overflow-hidden text-wrap"}," Broadband Serviceable Locations ",-1)),ue("div",OP,Jt(G(H.value)),1)]),ue("div",PP,[je[4]||(je[4]=ue("div",{class:"text-base-content/70 text-xs font-medium leading-tight mb-2 w-full overflow-hidden text-wrap"}," Community Anchor Institutions ",-1)),ue("div",CP,Jt(G(W.value)),1)])]),ue("div",EP,[je[5]||(je[5]=ue("h3",{class:"text-sm font-medium mb-3 text-base-content"},"Maximum Download Speeds",-1)),ue("div",MP,[(Pt(!0),Lt(Zi,null,Kn(nt.value,(Ce,Re)=>(Pt(),Lt("div",{key:Ce.label,class:kn(["absolute top-0 h-full transition-all duration-200 hover:brightness-110",{"rounded-l-full":Re===0,"rounded-r-full":Re===nt.value.length-1}]),style:Yr({left:nt.value.slice(0,Re).reduce((pt,Ge)=>pt+Ge.percentage,0)+"%",width:Ce.percentage+"%",backgroundColor:Ce.color})},null,6))),128))]),ue("div",IP,[(Pt(!0),Lt(Zi,null,Kn(nt.value,Ce=>(Pt(),Lt("div",{key:Ce.label,class:"flex items-center gap-2"},[ue("div",{class:"w-3 h-3 rounded-sm flex-shrink-0",style:Yr({backgroundColor:Ce.color})},null,4),ue("span",AP,Jt(Ce.label),1),ue("span",jP,Jt(G(Ce.value))+" ("+Jt(Ce.percentage.toFixed(1))+"%)",1)]))),128))])]),ue("div",kP,[je[6]||(je[6]=ue("h3",{class:"text-sm font-medium mb-3 text-base-content"},"Maximum Upload Speeds",-1)),ue("div",RP,[(Pt(!0),Lt(Zi,null,Kn(Ae.value,(Ce,Re)=>(Pt(),Lt("div",{key:Ce.label,class:kn(["absolute top-0 h-full transition-all duration-200 hover:brightness-110",{"rounded-l-full":Re===0,"rounded-r-full":Re===Ae.value.length-1}]),style:Yr({left:Ae.value.slice(0,Re).reduce((pt,Ge)=>pt+Ge.percentage,0)+"%",width:Ce.percentage+"%",backgroundColor:Ce.color})},null,6))),128))]),ue("div",DP,[(Pt(!0),Lt(Zi,null,Kn(Ae.value,Ce=>(Pt(),Lt("div",{key:Ce.label,class:"flex items-center gap-2"},[ue("div",{class:"w-3 h-3 rounded-sm flex-shrink-0",style:Yr({backgroundColor:Ce.color})},null,4),ue("span",LP,Jt(Ce.label),1),ue("span",zP,Jt(G(Ce.value))+" ("+Jt(Ce.percentage.toFixed(1))+"%)",1)]))),128))])]),ue("div",FP,[je[7]||
841(je[7]=ue("h3",{class:"text-sm font-medium mb-3 text-base-content"},"Technologies",-1)),ue("div",NP,[(Pt(!0),Lt(Zi,null,Kn(ke.value,(Ce,Re)=>(Pt(),Lt("div",{key:Ce.label,class:kn(["absolute top-0 h-full transition-all duration-200 hover:brightness-110",{"rounded-l-full":Re===0,"rounded-r-full":Re===ke.value.length-1}]),style:Yr({left:ke.value.slice(0,Re).reduce((pt,Ge)=>pt+Ge.percentage,0)+"%",width:Ce.percentage+"%",backgroundColor:Ce.color})},null,6))),128))]),ue("div",$P,[(Pt(!0),Lt(Zi,null,Kn(ke.value,Ce=>(Pt(),Lt("div",{key:Ce.label,class:"flex items-center gap-2"},[ue("div",{class:"w-3 h-3 rounded-sm flex-shrink-0",style:Yr({backgroundColor:Ce.color})},null,4),ue("span",UP,Jt(Ce.label),1),ue("span",VP,Jt(G(Ce.value))+" ("+Jt(Ce.percentage.toFixed(1))+"%)",1)]))),128))])]),Pe.value.length>0?(Pt(),Lt("div",GP,[je[8]||(je[8]=ue("h3",{class:"text-sm font-medium mb-3 text-base-content"},"Providers",-1)),ue("div",HP,[(Pt(!0),Lt(Zi,null,Kn(y.value?Pe.value:Ie.value,Ce=>(Pt(),Lt("div",{key:Ce.uei,class:"flex items-center gap-2"},[ue("div",{class:"w-3 h-3 rounded-sm flex-shrink-0",style:Yr({backgroundColor:Ce.color})},null,4),ue("span",{class:"text-base-content/70 flex-1 truncate",title:Ce.name},Jt(Ce.name),9,ZP),ue("span",qP,Jt(G(Ce.locationCount))+" ("+Jt(Ce.percentage.toFixed(1))+"%)",1)]))),128)),rt.value.length>0?(Pt(),Lt("div",WP,[ue("button",{onClick:je[0]||(je[0]=Ce=>y.value=!y.value),class:"text-xs text-primary hover:text-primary-focus transition-colors duration-200"},Jt(y.value?"Show less":`Show all (${rt.value.length} more)`),1)])):or("",!0)])])):or("",!0)])]))}}),XP={key:0,class:"absolute inset-0 bg-gray-900 flex items-center justify-center z-50"},YP={key:1,class:"absolute inset-0 bg-gray-900 text-white flex items-center justify-center z-50"},JP={class:"max-w-md mx-auto p-8 text-center"},QP={class:"text-gray-300 space-y-4"},eC={class:"mt-6 p-3 bg-gray-800 rounded text-xs text-gray-400"},tC=zn({__name:"WebGLStatus",props:{status:{type:[Boolean,null]},errorMessage:{}},emits:["retry"],setup(i,{emit:o}){const u=o,d=()=>{u("retry")};return(y,w)=>y.status===null?(Pt(),Lt("div",XP,[...w[0]||(w[0]=[ue("div",{class:"text-center text-white"},[ue("div",{class:"animate-spin w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full mx-auto mb-4"}),ue("p",null,"Initializing map...")],-1)])])):y.status===!1?(Pt(),Lt("div",YP,[ue("div",JP,[w[5]||(w[5]=ue("div",{class:"mb-6"},[ue("svg",{class:"w-16 h-16 mx-auto text-red-500 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ue("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.684-.833-2.464 0L4.35 16.5c-.77.833.192 2.5 1.732 2.5z"})]),ue("h2",{class:"text-xl font-bold text-red-500 mb-2"},"WebGL Not Supported")],-1)),ue("div",QP,[w[3]||(w[3]=ue("p",{class:"text-sm"}," This interactive map requires WebGL support to display properly, but your browser either doesn't support WebGL or it's currently disabled. ",-1)),w[4]||(w[4]=ue("div",{class:"text-left"},[ue("p",{class:"font-semibold text-white mb-2"},"To fix this issue, try:"),ue("ul",{class:"text-sm space-y-1 list-disc list-inside"},[ue("li",null,"Updating your browser to the latest version"),ue("li",null,"Enabling hardware acceleration in your browser settings"),ue("li",null,"Using a different browser (Chrome, Firefox, Safari, or Edge)"),ue("li",null,"Updating your graphics drivers")])],-1)),ue("div",eC,[w[1]||(w[1]=ue("strong",null,"Technical details:",-1)),w[2]||(w[2]=ue("br",null,null,-1)),Xn(" "+Jt(y.errorMessage),1)]),ue("button",{onClick:d,class:"mt-4 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors"}," Retry ")])])])):or("",!0)}}),iC={class:"flex h-full flex-col"},rC={class:"flex flex-1 min-h-0"},nC={class:"flex-1 h-full relative",ref:"map-container"},sC="XPQJGfz2BYhZTI3zL5bE",oC=zn({__name:"MapView",setup(i){const o=af(),u=Pg(),d=vi(null),y=vi("");let w,v=a3("map-container");const a=()=>{if(!w||!w.getLayer("awarded-bsls"))return;const Ae=o.selectedCountyOrPlace,ke=o.selectedProviderUei,Te=o.selectedProjectId,je=[];if(Ae){let Re;Ae.type==="county"?Re=["==",["get","county_fips"],String(Ae.fips)]:Re=["all",["has","place_fips"],["==",["get","place_fips"],Ae.fips]],je.push(Re)}ke&&je.push(["==",["get","uei"],ke]),Te&&je.push(["==",["get","project_id"],Te]);let Ce=null;je.length===1?Ce=je[0]:je.length>1&&(Ce=["all",...je]),w.setFilter("awarded-bsls",Ce),w.getLayer("awarded-cais")&&w.setFilter("awarded-cais",Ce)},M=()=>{switch(o.selectedColorScheme){case"location-type":return kd.circle;case"grantee":return XO();case"technology":return KO();default:return kd.circle}},D=Ae=>`
842    <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
843      <polygon points="8,2 14,14 2,14" fill="${Ae}" fill-opacity="0.9" stroke="rgba(255, 255, 255, 0.3)" stroke-width="0.5"/>
844    </svg>
845  `,F=()=>{if(!w)return;const Ae=o.selectedColorScheme;if(["triangle-icon","triangle-location-type","triangle-grantee","triangle-technology"].forEach(Te=>{w.hasImage(Te)&&w.removeImage(Te)}),Ae==="location-type"){const Te=F0("location-type",void 0,"triangle"),je=D(Te),Ce=`data:image/svg+xml;base64,${btoa(je)}`,Re=new Image;Re.onload=()=>w.addImage("triangle-location-type",Re),Re.src=Ce}else if(Ae==="grantee"){Ns.forEach(Re=>{const pt=D(Re.mapColor),Ge=`data:image/svg+xml;base64,${btoa(pt)}`,dt=new Image;dt.onload=()=>w.addImage(`triangle-grantee-${Re.uei}`,dt),dt.src=Ge});const Te=D("#6B7280"),je=`data:image/svg+xml;base64,${btoa(Te)}`,Ce=new Image;Ce.onload=()=>w.addImage("triangle-grantee-default",Ce),Ce.src=je}else if(Ae==="technology"){const Te=JO();Object.entries(Te).forEach(([pt,Ge])=>{const dt=D(Ge),_t=`data:image/svg+xml;base64,${btoa(dt)}`,Xe=new Image;Xe.onload=()=>w.addImage(`triangle-technology-${pt}`,Xe),Xe.src=_t});const je=D("#6B7280"),Ce=`data:image/svg+xml;base64,${btoa(je)}`,Re=new Image;Re.onload=()=>w.addImage("triangle-technology-default",Re),Re.src=Ce}},H=()=>{switch(o.selectedColorScheme){case"location-type":return"triangle-location-type";case"grantee":const ke=["case"];return Ns.forEach(Te=>{ke.push(["==",["get","uei"],Te.uei]),ke.push(`triangle-grantee-${Te.uei}`)}),ke.push("triangle-grantee-default"),ke;case"technology":return["case",["==",["get","technology"],"0"],"triangle-technology-0",["==",["get","technology"],"10"],"triangle-technology-10",["==",["get","technology"],"40"],"triangle-technology-40",["==",["get","technology"],"50"],"triangle-technology-50",["==",["get","technology"],"60"],"triangle-technology-60",["==",["get","technology"],"61"],"triangle-technology-61",["==",["get","technology"],"70"],"triangle-technology-70",["==",["get","technology"],"71"],"triangle-technology-71",["==",["get","technology"],"72"],"triangle-technology-72","triangle-technology-default"];default:return"triangle-location-type"}},W=()=>{if(!w||!w.getLayer("awarded-bsls"))return;const Ae=M();w.setPaintProperty("awarded-bsls","circle-color",Ae),w.getLayer("awarded-cais")&&(F(),setTimeout(()=>{const ke=H();w.setLayoutProperty("awarded-cais","icon-image",ke)},100))},G=(Ae,ke)=>{const Te=Math.max(Ae[0],ke[0]),je=Math.max(Ae[1],ke[1]),Ce=Math.min(Ae[2],ke[2]),Re=Math.min(Ae[3],ke[3]);return Te>Ce||je>Re?null:[Te,je,Ce,Re]},Pe=()=>{const Ae=o.selectedCountyOrPlace?.bbox??null,ke=o.selectedProviderBbox,Te=o.selectedProjectBbox;return Ae||(ke&&Te?G(ke,Te):ke||Te||null)},Ie=()=>{if(!w)return;const Ae=Pe();if(!Ae)return;const[ke,Te,je,Ce]=Ae;w.fitBounds([[ke,Te],[je,Ce]],{padding:40,maxZoom:14})};na(()=>[o.selectedCountyOrPlace,o.selectedProviderUei,o.selectedProjectId],()=>{a(),Ie()},{immediate:!0}),na(()=>o.selectedColorScheme,W,{immediate:!0});const rt=()=>{window.location.reload()};let nt=new RS;return eh.addProtocol("pmtiles",nt.tile),Cc(()=>{const Ae=HS();if(d.value=Ae.supported,!Ae.supported){console.error("WebGL is not supported or disabled"),y.value=Ae.error||"WebGL is not supported",ZS();return}if(!v.value){console.error("Could not get map container");return}try{w=new eh.Map({container:v.value,style:`https://api.maptiler.com/maps/backdrop-dark/style.json?key=${sC}`,center:[-89.2,39.8],zoom:u.mapZoom,minZoom:5.75,maxZoom:17}),w.on("error",ke=>{console.error("MapLibre GL error:",ke.error),ke.error?.message?.toLowerCase().includes("webgl")&&(d.value=!1,y.value="WebGL context lost or failed during map initialization")})}catch(ke){console.error("Failed to initialize map:",ke),d.value=!1,y.value=`Map initialization failed: ${ke instanceof Error?ke.message:"Unknown error"}`;return}w.addControl(new eh.NavigationControl),w.on("load",()=>{const ke=w.getStyle().layers;let Te;for(const pt of ke)if(pt.type==="symbol"){Te=pt.id;break}w.addSource("awarded-bsls",{type:"vector",url:"pmtiles://https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/awarded_bsls_20260825_1623.pmtiles"}
845),w.addLayer({id:"awarded-bsls",type:"circle",source:"awarded-bsls","source-layer":"awarded-bsls",paint:{"circle-radius":["interpolate",["linear"],["zoom"],5.75,1,8,2,11,4,17,8],"circle-color":M(),"circle-opacity":.9}},Te),w.addSource("awarded-cais",{type:"vector",url:"pmtiles://https://il-bead-award-map.nyc3.cdn.digitaloceanspaces.com/awarded_cais_20260825_1623.pmtiles"}),F(),w.addLayer({id:"awarded-cais",type:"symbol",source:"awarded-cais","source-layer":"awarded-cais",layout:{"icon-image":H(),"icon-size":["interpolate",["linear"],["zoom"],5.75,.3,8,.5,11,.8,17,1.2],"icon-allow-overlap":!0}},Te),a();let je=null,Ce=null;const Re=(pt,Ge,dt)=>{const _t=pt.getElement().querySelector(".maplibregl-popup-tip");if(!_t)return;const Xe=Ge.firstElementChild;if(!Xe)return;const Et=getComputedStyle(Xe).backgroundColor;dt==="bottom"?_t.style.borderTopColor=Et:_t.style.borderBottomColor=Et};w.on("mouseenter","awarded-bsls",pt=>{if(w.getCanvas().style.cursor="pointer",w.getZoom()<10)return;const Ge=pt.features?.[0];if(!Ge)return;const dt=document.createElement("div"),_t=la(iO,{properties:Ge.properties});Jy(_t,dt);const Xe=w.getContainer().offsetHeight,Et=pt.point.y<Xe*.4?"top":"bottom",di=Et==="top"?[0,8]:[0,-8],yi=Ge.geometry.coordinates;je?.remove(),je=new eh.Popup({closeButton:!1,closeOnClick:!1,anchor:Et,offset:di}).setLngLat(yi).setDOMContent(dt).addTo(w),Re(je,dt,Et)}),w.on("mouseleave","awarded-bsls",()=>{w.getCanvas().style.cursor="",je?.remove(),je=null}),w.on("mouseenter","awarded-cais",pt=>{if(w.getCanvas().style.cursor="pointer",w.getZoom()<10)return;const Ge=pt.features?.[0];if(!Ge)return;const dt=document.createElement("div"),_t=la(mO,{properties:Ge.properties});Jy(_t,dt);const Xe=w.getContainer().offsetHeight,Et=pt.point.y<Xe*.4?"top":"bottom",di=Et==="top"?[0,8]:[0,-8],yi=Ge.geometry.coordinates;Ce?.remove(),Ce=new eh.Popup({closeButton:!1,closeOnClick:!1,anchor:Et,offset:di}).setLngLat(yi).setDOMContent(dt).addTo(w),Re(Ce,dt,Et)}),w.on("mouseleave","awarded-cais",()=>{w.getCanvas().style.cursor="",Ce?.remove(),Ce=null})})}),(Ae,ke)=>(Pt(),Lt("div",iC,[Wi(WO),ue("div",rC,[ue("div",nC,[Wi(tC,{status:d.value,"error-message":y.value,onRetry:rt},null,8,["status","error-message"]),d.value!==!1?(Pt(),xc(mP,{key:0})):or("",!0)],512),Wi(KP)])]))}}),aC=KT({history:ST(),routes:[{path:"/",component:oC}]}),lf=$9(uS);ZB({app:lf,dsn:"https://65a1af1ea2415348243872a02d89bf25@o4506893373603840.ingest.us.sentry.io/4510067484262400",sendDefaultPii:!0}
845);lf.use(G9());lf.use(aC);lf.mount("#app");const lC=$h();lC.loadProjects();const cC=gx();cC.loadStatAtoms();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.