PageSourceSearch

https://onlineforum.franchiseverband.com/vite/assets/MemberMapPage-C_2Y-dC2.js

js franchiseverband.com collected 2026-10-03 20:37:36 UTC 781,148 bytes, 498 lines download raw bytes

1import{c as Fo,j as ht,a9 as ah,v as Zf,W as Gf,S as Bu,ab as kc,y as Xf,ce as Wf,a as Kf,aW as Cl,f as Hf,ck as Jf,J as Yf}from"./application-BnWNrl4f.js";import{l as Qr,Q as $f,bf as rh,bg as ih}from"./index-DY0ELU4Q.js";import{u as sh}from"./useQueryParams-BrK7KEfQ.js";import{T as Qf}from"./TabSelect-DnAo2x2h.js";import{T as ed}from"./TabBar-CsRR2nbR.js";import"./jquery_ujs-D4SpL0p_.js";import"./jquery-BIvjjJpk.js";var Fu={exports:{}},td=Fu.exports,nh;function rd(){return nh||(nh=1,(function(we,He){(function(qe,ut){we.exports=ut()})(td,(function(){var qe,ut,yt;function Dt(u,St){if(!qe)qe=St;else if(!ut)ut=St;else{var se="var sharedChunk = {}; ("+qe+")(sharedChunk); ("+ut+")(sharedChunk);",dt={};qe(dt),yt=St(dt),typeof window<"u"&&(yt.workerUrl=window.URL.createObjectURL(new Blob([se],{type:"text/javascript"})))}}return Dt(["exports"],(function(u){function St(e,t){return e(t={exports:{}},t.exports),t.exports}var se=dt;function dt(e,t,r,a){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(a-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=a,this.p2x=r,this.p2y=a}dt.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},dt.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},dt.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},dt.prototype.solveCurveX=function(e,t){var r,a,l,c,h;for(t===void 0&&(t=1e-6),l=e,h=0;h<8;h++){if(c=this.sampleCurveX(l)-e,Math.abs(c)<t)return l;var m=this.sampleCurveDerivativeX(l);if(Math.abs(m)<1e-6)break;l-=c/m}if((l=e)<(r=0))return r;if(l>(a=1))return a;for(;r<a;){if(c=this.sampleCurveX(l),Math.abs(c-e)<t)return l;e>c?r=l:a=l,l=.5*(a-r)+r}return l},dt.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var Fe=li;function li(e,t){this.x=e,this.y=t}li.prototype={clone:function(){return new li(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),a=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=a,this},_rotateAround:function(e,t){var r=Math.cos(e),a=Math.sin(e),l=t.y+a*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-a*(this.y-t.y),this.y=l,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},li.convert=function(e){return e instanceof li?e:Array.isArray(e)?new li(e[0],e[1]):e};var ze=typeof self<"u"?self:{},Ps=Math.pow(2,53)-1;function ui(e,t,r,a){var l=new se(e,t,r,a);return function(c){return l.solve(c)}}var An=ui(.25,.1,.25,1);function qr(e,t,r){return Math.min(r,Math.max(t,e))}function Oo(e,t,r){var a=r-t,l=((e-t)%a+a)%a+t;return l===t?r:l}function _r(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var a=0,l=t;a<l.length;a+=1){var c=l[a];for(var h in c)e[h]=c[h]}return e}var ba=1;function so(){return ba++}function Ni(){return(function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)})()}function lo(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function uo(e,t){e.forEach((function(r){t[r]&&(t[r]=t[r].bind(t))}))}function zn(e,t){return e.indexOf(t,e.length-t.length)!==-1}function Er(e,t,r){var a={};for(var l in e)a[l]=t.call(r||this,e[l],l,e);return a}function ji(e,t,r){var a={};for(var l in e)t.call(r||this,e[l],l,e)&&(a[l]=e[l]);return a}function Si(e){return Array.isArray(e)?e.map(Si):typeof e=="object"&&e?Er(e,Si):e}var co={};function qt(e){co[e]||(typeof console<"u"&&console.warn(e),co[e]=!0)}function Zr(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function wa(e){for(var t=0,r=0,a=e.length,l=a-1,c=void 0,h=void 0;r<a;
1l=r++)t+=((h=e[l]).x-(c=e[r]).x)*(c.y+h.y);return t}function ei(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function po(e){var t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(a,l,c,h){var m=c||h;return t[l]=!m||m.toLowerCase(),""})),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}var ho=null;function Sa(e){if(ho==null){var t=e.navigator?e.navigator.userAgent:null;ho=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return ho}function tn(e){try{var t=ze[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch{return!1}}var Ti,Mi,Pn,Cn,rn=ze.performance&&ze.performance.now?ze.performance.now.bind(ze.performance):Date.now.bind(Date),Cs=ze.requestAnimationFrame||ze.mozRequestAnimationFrame||ze.webkitRequestAnimationFrame||ze.msRequestAnimationFrame,Ir=ze.cancelAnimationFrame||ze.mozCancelAnimationFrame||ze.webkitCancelAnimationFrame||ze.msCancelAnimationFrame,qi={now:rn,frame:function(e){var t=Cs(e);return{cancel:function(){return Ir(t)}}},getImageData:function(e,t){t===void 0&&(t=0);var r=ze.document.createElement("canvas"),a=r.getContext("2d");if(!a)throw new Error("failed to create canvas 2d context");return r.width=e.width,r.height=e.height,a.drawImage(e,0,0,e.width,e.height),a.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return Ti||(Ti=ze.document.createElement("a")),Ti.href=e,Ti.href},hardwareConcurrency:ze.navigator&&ze.navigator.hardwareConcurrency||4,get devicePixelRatio(){return ze.devicePixelRatio},get prefersReducedMotion(){return!!ze.matchMedia&&(Mi==null&&(Mi=ze.matchMedia("(prefers-reduced-motion: reduce)")),Mi.matches)}},gt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},Di={supported:!1,testSupport:function(e){!fo&&Cn&&(Ei?it(e):Pn=e)}},fo=!1,Ei=!1;function it(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,Cn),e.isContextLost())return;Di.supported=!0}
1catch{}e.deleteTexture(t),fo=!0}ze.document&&((Cn=ze.document.createElement("img")).onload=function(){Pn&&it(Pn),Pn=null,Ei=!0},Cn.onerror=function(){fo=!0,Pn=null},Cn.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var nn="01",Ar=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function ci(e){return e.indexOf("mapbox:")===0}Ar.prototype._createSkuToken=function(){var e=(function(){for(var t="",r=0;r<10;r++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",nn,t].join(""),tokenExpiresAt:Date.now()+432e5}})();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},Ar.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ar.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},Ar.prototype.normalizeStyleURL=function(e,t){if(!ci(e))return e;var r=pi(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Ar.prototype.normalizeGlyphsURL=function(e,t){if(!ci(e))return e;var r=pi(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Ar.prototype.normalizeSourceURL=function(e,t){if(!ci(e))return e;var r=pi(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},Ar.prototype.normalizeSpriteURL=function(e,t,r,a){var l=pi(e);return ci(e)?(l.path="/styles/v1"+l.path+"/sprite"+t+r,this._makeAPIURL(l,this._customAccessToken||a)):(l.path+=""+t+r,kn(l))},Ar.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!ci(e))return e;var r=pi(e);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(qi.devicePixelRatio>=2||t===512?"@2x":"")+(Di.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||(function(l){for(var c=0,h=l;c<h.length;c+=1){var m=h[c].match(/^access_token=(.*)$/);if(m)return m[1]}return null})(r.params)||gt.ACCESS_TOKEN;return gt.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,a)},Ar.prototype.canonicalizeTileURL=function(e,t){var r=pi(e);if(!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/))return e;var a="mapbox://tiles/";a+=r.path.replace("/v4/","");var l=r.params;return t&&(l=l.filter((function(c){return!c.match(/^access_token=/)}))),l.length&&(a+="?"+l.join("&")),a},Ar.prototype.canonicalizeTileset=function(e,t){for(var r=!!t&&ci(t),a=[],l=0,c=e.tiles||[];l<c.length;l+=1){var h=c[l];Ii(h)?a.push(this.canonicalizeTileURL(h,r)):a.push(h)}return a},Ar.prototype._makeAPIURL=function(e,t){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",a=pi(gt.API_URL);if(e.protocol=a.protocol,e.authority=a.authority,e.protocol==="http"){var l=e.params.indexOf("secure");l>=0&&e.params.splice(l,1)}if(a.path!=="/"&&(e.path=""+a.path+e.path),!gt.REQUIRE_ACCESS_TOKEN)return kn(e);if(!(t=t||gt.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if(t[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return e.params=e.params.filter((function(c){return c.indexOf("access_token")===-1})),e.params.push("access_token="+t),kn(e)},Ar.prototype.setTransformRequest=function(e){this._transformRequestFn=e};var ks=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ii(e){return ks.test(e)}var Uo=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function pi(e){var t=e.match(Uo);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function kn(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}function mo(e){if(!e)return null;var t=e.split(".");if(!t||t.length!==3)return null;try{return JSON.parse(decodeURIComponent(ze.atob(t[1]).split("").map((function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch{return null}}var hi=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};hi.prototype.getStorageKey=function(e){var t,r=mo(gt.ACCESS_TOKEN);return t=r&&r.u?ze.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,(function(a,l){return String.fromCharCode(+("0x"+l))}))):gt.ACCESS_TOKEN||"",e?"mapbox.eventData."+e+":"+t:"mapbox.eventData:"+t},hi.prototype.fetchEventData=function(){var e=tn("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{var a=ze.localStorage.getItem(t);a&&(this.eventData=JSON.parse(a));var l=ze.localStorage.getItem(r);l&&(this.anonId=l)}catch{qt("Unable to read from LocalStorage")}},hi.prototype.saveEventData=function(){var e=tn("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{ze.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&ze.localStorage.setItem(t,JSON.stringify(this.eventData))}catch{qt("Unable to write to LocalStorage")}},hi.prototype.processRequests=function(e){},hi.prototype.postEvent=function(e,t,r,a){var l=this;if(gt.EVENTS_URL){var c=pi(gt.EVENTS_URL);c.params.push("access_token="+(a||gt.ACCESS_TOKEN||""));var h={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.15.2",skuId:nn,userId:this.anonId},m=t?_r(h,t):h,g={url:kn(c),headers:{"Content-Type":"text/plain"},body:JSON.stringify([m])};
1this.pendingRequest=w(g,(function(_){l.pendingRequest=null,r(_),l.saveEventData(),l.processRequests(a)}))}},hi.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var fi,Mn,Ai=(function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.postMapLoadEvent=function(r,a,l,c){this.skuToken=l,(gt.EVENTS_URL&&c||gt.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(h){return ci(h)||Ii(h)})))&&this.queueRequest({id:a,timestamp:Date.now()},c)},t.prototype.processRequests=function(r){var a=this;if(!this.pendingRequest&&this.queue.length!==0){var l=this.queue.shift(),c=l.id,h=l.timestamp;c&&this.success[c]||(this.anonId||this.fetchEventData(),lo(this.anonId)||(this.anonId=Ni()),this.postEvent(h,{skuToken:this.skuToken},(function(m){m||c&&(a.success[c]=!0)}),r))}},t})(hi),Ta=new((function(e){function t(r){e.call(this,"appUserTurnstile"),this._customAccessToken=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.postTurnstileEvent=function(r,a){gt.EVENTS_URL&&gt.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(l){return ci(l)||Ii(l)}))&&this.queueRequest(Date.now(),a)},t.prototype.processRequests=function(r){var a=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var l=mo(gt.ACCESS_TOKEN),c=l?l.u:gt.ACCESS_TOKEN,h=c!==this.eventData.tokenU;lo(this.anonId)||(this.anonId=Ni(),h=!0);var m=this.queue.shift();if(this.eventData.lastSuccess){var g=new Date(this.eventData.lastSuccess),_=new Date(m),x=(m-this.eventData.lastSuccess)/864e5;h=h||x>=1||x<-1||g.getDate()!==_.getDate()}else h=!0;if(!h)return this.processRequests();this.postEvent(m,{"enabled.telemetry":!1},(function(b){b||(a.eventData.lastSuccess=m,a.eventData.tokenU=c)}),r)}},t})(hi)),Ea=Ta.postTurnstileEvent.bind(Ta),Vo=new Ai,No=Vo.postMapLoadEvent.bind(Vo),yo=500,Ia=50;function go(){ze.caches&&!fi&&(fi=ze.caches.open("mapbox-tiles"))}function jo(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var Dn,qo=1/0;function Zo(){return Dn==null&&(Dn=ze.OffscreenCanvas&&new ze.OffscreenCanvas(1,1).getContext("2d")&&typeof ze.createImageBitmap=="function"),Dn}var Aa={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Aa);var za=(function(e){function t(r,a,l){a===401&&Ii(l)&&(r+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,r),this.status=a,this.url=l,this.name=this.constructor.name,this.message=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t})(Error),Ln=ei()?function(){return self.worker&&self.worker.referrer}:function(){return(ze.location.protocol==="blob:"?ze.parent:ze).location.href};function Rn(e,t){var r,a=new ze.AbortController,l=new ze.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:Ln(),signal:a.signal}),c=!1,h=!1,m=(r=l.url).indexOf("sku=")>0&&Ii(r);e.type==="json"&&l.headers.set("Accept","application/json");var g=function(x,b,T){if(!h){if(x&&x.message!=="SecurityError"&&qt(x),b&&T)return _(b);var A=Date.now();ze.fetch(l).then((function(D){if(D.ok){var L=m?D.clone():null;return _(D,L,A)}return t(new za(D.statusText,D.status,e.url))})).catch((function(D){D.code!==20&&t(new Error(D.message))}))}},_=function(x,b,T){(e.type==="arrayBuffer"?x.arrayBuffer():e.type==="json"?x.json():x.text()).then((function(A){h||(b&&T&&(function(D,L,Z){if(go(),fi){var V={status:L.status,statusText:L.statusText,headers:new ze.Headers};L.headers.forEach((function(J,$){return V.headers.set($,J)}));var K=po(L.headers.get("Cache-Control")||"");K["no-store"]||(K["max-age"]&&V.headers.set("Expires",new Date(Z+1e3*K["max-age"]).toUTCString()),new Date(V.headers.get("Expires")).getTime()-Z<42e4||(function(J,$){if(Mn===void 0)try{new Response(new ReadableStream),Mn=!0}catch{Mn=!1}Mn?$(J.body):J.blob().then($)})(L,(function(J){var $=new ze.Response(J,V);go(),fi&&fi.then((function(Q){return Q.put(jo(D.url),$)})).catch((function(Q){return qt(Q.message)}))})))}})(l,b,T),c=!0,t(null,A,x.headers.get("Cache-Control"),x.headers.get("Expires")))})).catch((function(A){h||t(new Error(A.message))}))};return m?(function(x,b){if(go(),!fi)return b(null);var T=jo(x.url);fi.then((function(A){A.match(T).then((function(D){var L=(function(Z){if(!
1Z)return!1;var V=new Date(Z.headers.get("Expires")||0),K=po(Z.headers.get("Cache-Control")||"");return V>Date.now()&&!K["no-cache"]})(D);A.delete(T),L&&A.put(T,D.clone()),b(null,D,L)})).catch(b)})).catch(b)})(l,g):g(null,null),{cancel:function(){h=!0,c||a.abort()}}}var on,Bn,_o=function(e,t){if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){if(ei()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t);if(!ei()){var r=e.url.substring(0,e.url.indexOf("://"));return(gt.REGISTERED_PROTOCOLS[r]||Rn)(e,t)}}if(!(/^file:/.test(a=e.url)||/^file:/.test(Ln())&&!/^\w+:/.test(a))){if(ze.fetch&&ze.Request&&ze.AbortController&&ze.Request.prototype.hasOwnProperty("signal"))return Rn(e,t);if(ei()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var a;return(function(l,c){var h=new ze.XMLHttpRequest;for(var m in h.open(l.method||"GET",l.url,!0),l.type==="arrayBuffer"&&(h.responseType="arraybuffer"),l.headers)h.setRequestHeader(m,l.headers[m]);return l.type==="json"&&(h.responseType="text",h.setRequestHeader("Accept","application/json")),h.withCredentials=l.credentials==="include",h.onerror=function(){c(new Error(h.statusText))},h.onload=function(){if((h.status>=200&&h.status<300||h.status===0)&&h.response!==null){var g=h.response;if(l.type==="json")try{g=JSON.parse(h.response)}catch(_){return c(_)}c(null,g,h.getResponseHeader("Cache-Control"),h.getResponseHeader("Expires"))}else c(new za(h.statusText,h.status,l.url))},h.send(l.body),{cancel:function(){return h.abort()}}})(e,t)},Vt=function(e,t){return _o(_r(e,{type:"arrayBuffer"}),t)},w=function(e,t){return _o(_r(e,{method:"POST"}),t)},E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";on=[],Bn=0;var I=function(e,t){if(Di.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Bn>=gt.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return on.push(r),r}Bn++;var a=!1,l=function(){if(!a)for(a=!0,Bn--;on.length&&Bn<gt.MAX_PARALLEL_IMAGE_REQUESTS;){var h=on.shift();h.cancelled||(h.cancel=I(h.requestParameters,h.callback).cancel)}},c=Vt(e,(function(h,m,g,_){l(),h?t(h):m&&(Zo()?(function(x,b){var T=new ze.Blob([new Uint8Array(x)],{type:"image/png"});ze.createImageBitmap(T).then((function(A){b(null,A)})).catch((function(A){b(new Error("Could not load image because of "+A.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))})(m,t):(function(x,b,T,A){var D=new ze.Image,L=ze.URL;D.onload=function(){b(null,D),L.revokeObjectURL(D.src),D.onload=null,ze.requestAnimationFrame((function(){D.src=E}))},D.onerror=function(){return b(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."))};var Z=new ze.Blob([new Uint8Array(x)],{type:"image/png"});D.cacheControl=T,D.expires=A,D.src=x.byteLength?L.createObjectURL(Z):E})(m,t,g,_))}));return{cancel:function(){c.cancel(),l()}}};function k(e,t,r){r[e]&&r[e].indexOf(t)!==-1||(r[e]=r[e]||[],r[e].push(t))}function F(e,t,r){if(r&&r[e]){var a=r[e].indexOf(t);a!==-1&&r[e].splice(a,1)}}var G=function(e,t){t===void 0&&(t={}),_r(this,t),this.type=e},W=(function(e){function t(r,a){a===void 0&&(a={}),e.call(this,"error",_r({error:r},a))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(G),q=function(){};q.prototype.on=function(e,t){return this._listeners=this._listeners||{},k(e,t,this._listeners),this},q.prototype.off=function(e,t){return F(e,t,this._listeners),F(e,t,this._oneTimeListeners),this},q.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},k(e,t,this._oneTimeListeners),this},q.prototype.fire=function(e,t){typeof e=="string"&&(e=new G(e,t||{}));var r=e.type;if(this.listens(r)){e.target=this;for(var a=0,l=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];a<l.length;a+=1)l[a].call(this,e);for(var c=0,h=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];c<h.length;c+=1){var m=h[c];F(r,m,this._oneTimeListeners),m.call(this,e)}var g=this._eventedParent;g&&(_r(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),g.fire(e))}else e instanceof W&&console.error(e.error);return this},q.prototype.listens=function(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},q.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var M
vendor: 19,005 bytes, line 1
1={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},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-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
vendor: 9,823 bytes, line 1
1,"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}}
1,U=function(e,t,r,a){this.message=(e?e+": ":"")+r,a&&(this.identifier=a),t!=null&&t.__line__&&(this.line=t.__line__)};function le(e){var t=e.value;return t?[new U(e.key,t,"constants have been deprecated as of v8")]:[]}function fe(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var a=0,l=t;a<l.length;a+=1){var c=l[a];for(var h in c)e[h]=c[h]}return e}function Y(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function ue(e){if(Array.isArray(e))return e.map(ue);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var r in e)t[r]=ue(e[r]);return t}return Y(e)}var xe=(function(e){function t(r,a){e.call(this,a),this.message=a,this.key=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(Error),Se=function(e,t){t===void 0&&(t=[]),this.parent=e,this.bindings={};for(var r=0,a=t;r<a.length;r+=1){var l=a[r];this.bindings[l[0]]=l[1]}};Se.prototype.concat=function(e){return new Se(this,e)},Se.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},Se.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var Ce={kind:"null"},oe={kind:"number"},me={kind:"string"},ae={kind:"boolean"},Xe={kind:"color"},We={kind:"object"},Ie={kind:"value"},Tt={kind:"collator"},et={kind:"formatted"},At={kind:"resolvedImage"};function kt(e,t){return{kind:"array",itemType:e,N:t}}function ot(e){if(e.kind==="array"){var t=ot(e.itemType);return typeof e.N=="number"?"array<"+t+", "+e.N+">":e.itemType.kind==="value"?"array":"array<"+t+">"}return e.kind}var Et=[Ce,oe,me,ae,Xe,et,We,kt(Ie),At];function Nt(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Nt(e.itemType,t.itemType))&&(typeof e.N!="number"||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if(e.kind==="value"){for(var r=0,a=Et;r<a.length;r+=1)if(!Nt(a[r],t))return null}}return"Expected "+ot(e)+" but found "+ot(t)+" instead."}function It(e,t){return t.some((function(r){return r.kind===e.kind}))}function $e(e,t){return t.some((function(r){return r==="null"?e===null:r==="array"?Array.isArray(e):r==="object"?e&&!Array.isArray(e)&&typeof e=="object":r===typeof e}))}var vo=St((function(e,t){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(m){return(m=Math.round(m))<0?0:m>255?255:m}function l(m){return a(m[m.length-1]==="%"?parseFloat(m)/100*255:parseInt(m))}function c(m){return(g=m[m.length-1]==="%"?parseFloat(m)/100:parseFloat(m))<0?0:g>1?1:g;var g}function h(m,g,_){return _<0?_+=1:_>1&&(_-=1),6*_<1?m+(g-m)*_*6:2*_<1?g:3*_<2?m+(g-m)*(2/3-_)*6:m}try{t.parseCSSColor=function(m){var g,_=m.replace(/ /g,"").toLowerCase();if(_ in r)return r[_].slice();if(_[0]==="#")return _.length===4?(g=parseInt(_.substr(1),16))>=0&&g<=4095?[(3840&g)>>4|(3840&g)>>8,240&g|(240&g)>>4,15&g|(15&g)<<4,1]:null:_.length===7&&(g=parseInt(_.substr(1),16))>=0&&g<=16777215?[(16711680&g)>>16,(65280&g)>>8,255&g,1]:null;var x=_.indexOf("("),b=_.indexOf(")");if(x!==-1&&b+1===_.length){var T=_.substr(0,x),A=_.substr(x+1,b-(x+1)).split(","),D=1;switch(T){case"rgba":if(A.length!==4)return null;D=c(A.pop());case"rgb":return A.length!==3?null:[l(A[0]),l(A[1]),l(A[2]),D];case"hsla":if(A.length!==4)return null;D=c(A.pop());case"hsl":if(A.length!==3)return null;var L=(parseFloat(A[0])%360+360)%360/360,Z=c(A[1]),V=c(A[2]),K=V<=.5?V*(Z+1):V+Z-V*Z,J=2*V-K;return[a(255*h(J,K,L+1/3)),a(255*h(J,K,L)),a(255*h(J,K,L-1/3)),D];default:return null}}return null}}catch{}})).parseCSSColor,rt=function(e,t,r,a){a===void 0&&(a=1),this.r=e,this.g=t,this.b=r,this.a=a};rt.parse=function(e){if(e){if(e instanceof rt)return e;if(typeof e=="string"){var t=vo(e);if(t)return new rt(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},rt.prototype.toString=function(){var e=this.toArray(),t=e[1],r=e[2],a=e[3];return"rgba("+Math.round(e[0])+","+Math.round(t)+","+Math.round(r)+","+a+")"},rt.prototype.toArray=function(){var e=this.a;return e===0?[0,0,0,0]:[255*this.r/e,255*this.g/e,255*this.b/e,e]},rt.black=new rt(0,0,0,1),rt.white=new rt(1,1,1,1),rt.transparent=new rt(0,0,0,0),rt.red=new rt(1,0,0,1);var Fn=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Fn.prototype.compare=function(e,t){return this.collator.compare(e,t)},Fn.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Pa=function(e,t,r,a,l){this.text=e,this.image=t,this.scale=r,this.fontStack=a,this.textColor=l},pr=function(e){this.sections=e};pr.fromString=function(e){return new pr([new Pa(e,null,null,null,null)])},pr.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some((function(e){return e.text.length!==0||e.image&&e.image.name.length!==0}))},pr.factory=function(e){return e instanceof pr?e:pr.fromString(e)},pr.prototype.toString=function(){return this.sections.length===0?"":this.sections.map((function(e){return e.text})).join("")},pr.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var a=r[t];if(a.image)e.push(["image",a.image.name]);else{e.push(a.text);var l={};a.fontStack&&(l["text-font"]=["literal",a.fontStack.split(",")]),a.scale&&(l["font-scale"]=a.scale),a.textColor&&(l["text-color"]=["rgba"].concat(a.textColor.toArray())),e.push(l)}}return e};var Rr=function(e){this.name=e.name,this.available=e.available};function Ms(e,t,r,a){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:"Invalid rgba value ["+[e,t,r,a].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof a=="number"?[e,t,r,a]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function On(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof rt||e instanceof Fn||e instanceof pr||e instanceof Rr)return!0;
1if(Array.isArray(e)){for(var t=0,r=e;t<r.length;t+=1)if(!On(r[t]))return!1;return!0}if(typeof e=="object"){for(var a in e)if(!On(e[a]))return!1;return!0}return!1}function ar(e){if(e===null)return Ce;if(typeof e=="string")return me;if(typeof e=="boolean")return ae;if(typeof e=="number")return oe;if(e instanceof rt)return Xe;if(e instanceof Fn)return Tt;if(e instanceof pr)return et;if(e instanceof Rr)return At;if(Array.isArray(e)){for(var t,r=e.length,a=0,l=e;a<l.length;a+=1){var c=ar(l[a]);if(t){if(t===c)continue;t=Ie;break}t=c}return kt(t||Ie,r)}return We}function Li(e){var t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof rt||e instanceof pr||e instanceof Rr?e.toString():JSON.stringify(e)}Rr.prototype.toString=function(){return this.name},Rr.fromString=function(e){return e?new Rr({name:e,available:!1}):null},Rr.prototype.serialize=function(){return["image",this.name]};var di=function(e,t){this.type=e,this.value=t};di.parse=function(e,t){if(e.length!==2)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!On(e[1]))return t.error("invalid value");var r=e[1],a=ar(r),l=t.expectedType;return a.kind!=="array"||a.N!==0||!l||l.kind!=="array"||typeof l.N=="number"&&l.N!==0||(a=l),new di(a,r)},di.prototype.evaluate=function(){return this.value},di.prototype.eachChild=function(){},di.prototype.outputDefined=function(){return!0},di.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof rt?["rgba"].concat(this.value.toArray()):this.value instanceof pr?this.value.serialize():this.value};var Lt=function(e){this.name="ExpressionEvaluationError",this.message=e};Lt.prototype.toJSON=function(){return this.message};var Br={string:me,number:oe,boolean:ae,object:We},xr=function(e,t){this.type=e,this.args=t};xr.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r,a=1,l=e[0];if(l==="array"){var c,h;if(e.length>2){var m=e[1];if(typeof m!="string"||!(m in Br)||m==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);c=Br[m],a++}else c=Ie;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);h=e[2],a++}r=kt(c,h)}else r=Br[l];for(var g=[];a<e.length;a++){var _=t.parse(e[a],a,Ie);if(!_)return null;g.push(_)}return new xr(r,g)},xr.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var r=this.args[t].evaluate(e);if(!Nt(this.type,ar(r)))return r;if(t===this.args.length-1)throw new Lt("Expected value to be of type "+ot(this.type)+", but found "+ot(ar(r))+" instead.")}return null},xr.prototype.eachChild=function(e){this.args.forEach(e)},xr.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},xr.prototype.serialize=function(){var e=this.type,t=[e.kind];if(e.kind==="array"){var r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){t.push(r.kind);var a=e.N;(typeof a=="number"||this.args.length>1)&&t.push(a)}}return t.concat(this.args.map((function(l){return l.serialize()})))};var Gr=function(e){this.type=et,this.sections=e};Gr.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&typeof r=="object")return t.error("First argument must be an image or text section.");for(var a=[],l=!1,c=1;c<=e.length-1;++c){var h=e[c];if(l&&typeof h=="object"&&!Array.isArray(h)){l=!1;var m=null;if(h["font-scale"]&&!(m=t.parse(h["font-scale"],1,oe)))return null;var g=null;if(h["text-font"]&&!(g=t.parse(h["text-font"],1,kt(me))))return null;var _=null;if(h["text-color"]&&!(_=t.parse(h["text-color"],1,Xe)))return null;var x=a[a.length-1];x.scale=m,x.font=g,x.textColor=_}else{var b=t.parse(e[c],1,Ie);if(!b)return null;var T=b.type.kind;if(T!=="string"&&T!=="value"&&T!=="null"&&T!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");l=!0,a.push({content:b,scale:null,font:null,textColor:null})}}return new Gr(a)},Gr.prototype.evaluate=function(e){return new pr(this.sections.map((function(t){var r=t.content.evaluate(e);return ar(r)===At?new Pa("",r,null,null,null):new Pa(Li(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},Gr.prototype.eachChild=function(e){for(var t=0,r=this.sections;t<r.length;t+=1){var a=r[t];e(a.content),a.scale&&e(a.scale),a.font&&e(a.font),a.textColor&&e(a.textColor)}},Gr.prototype.outputDefined=function(){return!1},Gr.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var a=r[t];e.push(a.content.serialize());var l={};a.scale&&(l["font-scale"]=a.scale.serialize()),a.font&&(l["text-font"]=a.font.serialize()),a.textColor&&(l["text-color"]=a.textColor.serialize()),e.push(l)}return e};var Zi=function(e){this.type=At,this.input=e};Zi.parse=function(e,t){if(e.length!==2)return t.error("Expected two arguments.");var r=t.parse(e[1],1,me);return r?new Zi(r):t.error("No image name provided.")},Zi.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=Rr.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r},Zi.prototype.eachChild=function(e){e(this.input)},Zi.prototype.outputDefined=function(){return!1},Zi.prototype.serialize=function(){return["image",this.input.serialize()]};var Ou={"to-boolean":ae,"to-color":Xe,"to-number":oe,"to-string":me},mi=function(e,t){this.type=e,this.args=t};mi.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if((r==="to-boolean"||r==="to-string")&&e.length!==2)return t.error("Expected one argument.");for(var a=Ou[r],l=[],c=1;c<e.length;c++){var h=t.parse(e[c],c,Ie);if(!h)return null;l.push(h)}return new mi(a,l)}
1,mi.prototype.evaluate=function(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){for(var t,r,a=0,l=this.args;a<l.length;a+=1){if(r=null,(t=l[a].evaluate(e))instanceof rt)return t;if(typeof t=="string"){var c=e.parseColor(t);if(c)return c}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Ms(t[0],t[1],t[2],t[3])))return new rt(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Lt(r||"Could not parse color from value '"+(typeof t=="string"?t:String(JSON.stringify(t)))+"'")}if(this.type.kind==="number"){for(var h=null,m=0,g=this.args;m<g.length;m+=1){if((h=g[m].evaluate(e))===null)return 0;var _=Number(h);if(!isNaN(_))return _}throw new Lt("Could not convert "+JSON.stringify(h)+" to number.")}return this.type.kind==="formatted"?pr.fromString(Li(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Rr.fromString(Li(this.args[0].evaluate(e))):Li(this.args[0].evaluate(e))},mi.prototype.eachChild=function(e){this.args.forEach(e)},mi.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},mi.prototype.serialize=function(){if(this.type.kind==="formatted")return new Gr([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Zi(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ml=["Unknown","Point","LineString","Polygon"],Gi=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Gi.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Gi.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?Ml[this.feature.type]:this.feature.type:null},Gi.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Gi.prototype.canonicalID=function(){return this.canonical},Gi.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Gi.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=rt.parse(e)),t};var hr=function(e,t,r,a){this.name=e,this.type=t,this._evaluate=r,this.args=a};hr.prototype.evaluate=function(e){return this._evaluate(e,this.args)},hr.prototype.eachChild=function(e){this.args.forEach(e)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},hr.parse=function(e,t){var r,a=e[0],l=hr.definitions[a];if(!l)return t.error('Unknown expression "'+a+'". If you wanted a literal array, use ["literal", [...]].',0);for(var c=Array.isArray(l)?l[0]:l.type,h=Array.isArray(l)?[[l[1],l[2]]]:l.overloads,m=h.filter((function(ke){var ge=ke[0];return!Array.isArray(ge)||ge.length===e.length-1})),g=null,_=0,x=m;_<x.length;_+=1){var b=x[_],T=b[0],A=b[1];g=new ln(t.registry,t.path,null,t.scope);for(var D=[],L=!1,Z=1;Z<e.length;Z++){var V=e[Z],K=Array.isArray(T)?T[Z-1]:T.type,J=g.parse(V,1+D.length,K);if(!J){L=!0;break}D.push(J)}if(!L)if(Array.isArray(T)&&T.length!==D.length)g.error("Expected "+T.length+" arguments, but found "+D.length+" instead.");else{for(var $=0;$<D.length;$++){var Q=Array.isArray(T)?T[$]:T.type,ie=D[$];g.concat($+1).checkSubtype(Q,ie.type)}if(g.errors.length===0)return new hr(a,c,A,D)}}if(m.length===1)(r=t.errors).push.apply(r,g.errors);else{for(var pe=(m.length?m:h).map((function(ke){var ge;return ge=ke[0],Array.isArray(ge)?"("+ge.map(ot).join(", ")+")":"("+ot(ge.type)+"...)"})).join(" | "),de=[],Pe=1;Pe<e.length;Pe++){var ye=t.parse(e[Pe],1+de.length);if(!ye)return null;de.push(ot(ye.type))}t.error("Expected arguments of type "+pe+", but found ("+de.join(", ")+") instead.")}return null},hr.register=function(e,t){for(var r in hr.definitions=t,t)e[r]=hr};var tr=function(e,t,r){this.type=Tt,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t};function xo(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Ca(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Uu(e,t){var r=(180+e[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,l=Math.pow(2,t.z);return[Math.round(r*l*8192),Math.round(a*l*8192)]}function Vu(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function Ds(e,t){for(var r,a,l,c,h,m,g,_=!1,x=0,b=t.length;x<b;x++)for(var T=t[x],A=0,D=T.length;A<D-1;A++){if((c=(r=e)[0]-(a=T[A])[0])*(g=r[1]-(l=T[A+1])[1])-(m=r[0]-l[0])*(h=r[1]-a[1])==0&&c*m<=0&&h*g<=0)return!1;Vu(e,T[A],T[A+1])&&(_=!_)}return _}function Nu(e,t){for(var r=0;r<t.length;r++)if(Ds(e,t[r]))return!0;return!1}function Dl(e,t,r,a){var l=a[0]-r[0],c=a[1]-r[1],h=(e[0]-r[0])*c-l*(e[1]-r[1]),m=(t[0]-r[0])*c-l*(t[1]-r[1]);return h>0&&m<0||h<0&&m>0}function ju(e,t,r){for(var a=0,l=r;a<l.length;a+=1)for(var c=l[a],h=0;h<c.length-1;++h)if((b=[(x=c[h+1])[0]-(_=c[h])[0],x[1]-_[1]])[0]*(T=[(g=t)[0]-(m=e)[0],g[1]-m[1]])[1]-b[1]*T[0]!=0&&Dl(m,g,_,x)&&Dl(_,x,m,g))return!0;var m,g,_,x,b,T;return!1}function Ls(e,t){for(var r=0;r<e.length;++r)if(!Ds(e[r],t))return!1;for(var a=0;a<e.length-1;++a)if(ju(e[a],e[a+1],t))return!1;return!0}function ka(e,t){for(var r=0;r<t.length;r++)if(Ls(e,t[r]))return!0;return!1}function Ma(e,t,r){for(var a=[],l=0;l<e.length;l++){for(var c=[],h=0;h<e[l].length;h++){var m=Uu(e[l][h],r);xo(t,m),c.push(m)}a.push(c)}return a}function Go(e,t,r){for(var a=[],l=0;l<e.length;l++){var c=Ma(e[l],t,r);a.push(c)}return a}function Ll(e,t,r,a){if(e[0]<r[0]||e[0]>r[2]){var l=.5*a,c=e[0]-r[0]>l?-a:r[0]-e[0]>l?a:0;c===0&&(c=e[0]-r[2]>l?-a:r[2]-e[0]>l?a:0),e[0]+=c}xo(t,e)}function Da(e,t,r,a){for(var l=8192*Math.pow(2,a.z),c=[8192*a.x,8192*a.y],h=[],m=0,g=e;m<g.length;m+=1)for(var _=0,x=g[m];_<x.length;_+=1){var b=x[_],T=[b.x+c[0],b.y+c[1]];Ll(T,t,r,l),h.push(T)}return h}function Rs(e,t,r,a){for(var l,c=8192*Math.pow(2,a.z),h=[8192*a.x,8192*a.y],m=[],g=0,_=e;g<_.length;g+=1){for(var x=[],b=0,T=_[g];b<T.length;b+=1){var A=T[b],D=[A.x+h[0],A.y+h[1]];xo(t,D),x.push(D)}m.push(x)}if(t[2]-t[0]<=c/2){(l=t)[0]=l[1]=1/0,l[2]=l[3]=-1/0;for(var L=0,Z=m;L<Z.length;L+=1)for(var V=0,K=Z[L];V<K.length;V+=1)Ll(K[V],t,r,c)}return m}tr.parse=function(e,t){if(e.length!==2)return t.error("Expected one argument.");var r=e[1];if(typeof r!="object"||Array.isArray(r))return t.error("Collator options argument must be an object.");var a=t.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,ae);if(!a)return null;var l=t.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,ae);if(!l)return null;var c=null;return r.locale&&!(c=t.parse(r.locale,1,me))?null:new tr(a,l,c)},tr.prototype.evaluate=function(e){return new Fn(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},tr.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},tr.prototype.outputDefined=function(){return!1},tr.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var Fr=function(e,t){this.type=ae,this.geojson=e,this.geometries=t};function Un(e){if(e instanceof hr&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof Fr)return!1;var t=!0;return e.eachChild((function(r){t&&!Un(r)&&(t=!1)})),t}function an(e){if(e instanceof hr&&e.name==="feature-state")return!1;var t=!0;return e.eachChild((function(r){t&&!an(r)&&(t=!1)})),t}function La(e,t){if(e instanceof hr&&t.indexOf(e.name)>=0)return!1;var r=!0;return e.eachChild((function(a){r&&!La(a,t)&&(r=!1)})),r}Fr.parse=function(e,t){if(e.length!==2)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(On(e[1])){var r=e[1];if(r.type==="FeatureCollection")for(var a=0;a<r.features.length;++a){var l=r.features[a].geometry.type;if(l==="Polygon"||l==="MultiPolygon")return new Fr(r,r.features[a].geometry)}else if(r.type==="Feature"){var c=r.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new Fr(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new Fr(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Fr.prototype.evaluate=function(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return(function(t,r){var a=[1/0,1/0,-1/0,-1/0],l=[1/0,1/0,-1/0,-1/0],c=t.canonicalID();if(r.type==="Polygon"){var h=Ma(r.coordinates,l,c),m=Da(t.geometry(),a,l,c);if(!Ca(a,l))return!1;for(var g=0,_=m;g<_.length;g+=1)if(!Ds(_[g],h))return!1}if(r.type==="MultiPolygon"){var x=Go(r.coordinates,l,c),b=Da(t.geometry(),a,l,c);if(!Ca(a,l))return!1;for(var T=0,A=b;T<A.length;T+=1)if(!Nu(A[T],x))return!1}return!0})(e,this.geometries);if(e.geometryType()==="LineString")return(function(t,r){var a=[1/0,1/0,-1/0,-1/0],l=[1/0,1/0,-1/0,-1/0],c=t.canonicalID();if(r.type==="Polygon"){var h=Ma(r.coordinates,l,c),m=Rs(t.geometry(),a,l,c);if(!Ca(a,l))return!1;for(var g=0,_=m;g<_.length;g+=1)if(!Ls(_[g],h))return!1}if(r.type==="MultiPolygon"){var x=Go(r.coordinates,l,c),b=Rs(t.geometry(),a,l,c);if(!Ca(a,l))return!1;for(var T=0,A=b;T<A.length;T+=1)if(!ka(A[T],x))return!1}return!0})(e,this.geometries)}return!1},Fr.prototype.eachChild=function(){},Fr.prototype.outputDefined=function(){return!0},Fr.prototype.serialize=function(){return["within",this.geojson]};var sn=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};
1sn.parse=function(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");var r=e[1];return t.scope.has(r)?new sn(r,t.scope.get(r)):t.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},sn.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},sn.prototype.eachChild=function(){},sn.prototype.outputDefined=function(){return!1},sn.prototype.serialize=function(){return["var",this.name]};var ln=function(e,t,r,a,l){t===void 0&&(t=[]),a===void 0&&(a=new Se),l===void 0&&(l=[]),this.registry=e,this.path=t,this.key=t.map((function(c){return"["+c+"]"})).join(""),this.scope=a,this.errors=l,this.expectedType=r};function Xi(e,t){for(var r,a=e.length-1,l=0,c=a,h=0;l<=c;)if((r=e[h=Math.floor((l+c)/2)])<=t){if(h===a||t<e[h+1])return h;l=h+1}else{if(!(r>t))throw new Lt("Input is not a number.");c=h-1}return 0}ln.prototype.parse=function(e,t,r,a,l){return l===void 0&&(l={}),t?this.concat(t,r,a)._parse(e,l):this._parse(e,l)},ln.prototype._parse=function(e,t){function r(_,x,b){return b==="assert"?new xr(x,[_]):b==="coerce"?new mi(x,[_]):_}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var a=e[0];if(typeof a!="string")return this.error("Expression name must be a string, but found "+typeof a+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var l=this.registry[a];if(l){var c=l.parse(e,this);if(!c)return null;if(this.expectedType){var h=this.expectedType,m=c.type;if(h.kind!=="string"&&h.kind!=="number"&&h.kind!=="boolean"&&h.kind!=="object"&&h.kind!=="array"||m.kind!=="value")if(h.kind!=="color"&&h.kind!=="formatted"&&h.kind!=="resolvedImage"||m.kind!=="value"&&m.kind!=="string"){if(this.checkSubtype(h,m))return null}else c=r(c,h,t.typeAnnotation||"coerce");else c=r(c,h,t.typeAnnotation||"assert")}if(!(c instanceof di)&&c.type.kind!=="resolvedImage"&&(function _(x){if(x instanceof sn)return _(x.boundExpression);if(x instanceof hr&&x.name==="error"||x instanceof tr||x instanceof Fr)return!1;var b=x instanceof mi||x instanceof xr,T=!0;return x.eachChild((function(A){T=b?T&&_(A):T&&A instanceof di})),!!T&&Un(x)&&La(x,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])})(c)){var g=new Gi;try{c=new di(c.type,c.evaluate(g))}catch(_){return this.error(_.message),null}}return c}return this.error('Unknown expression "'+a+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof e+" instead.")},ln.prototype.concat=function(e,t,r){var a=typeof e=="number"?this.path.concat(e):this.path,l=r?this.scope.concat(r):this.scope;return new ln(this.registry,a,t||null,l,this.errors)},ln.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var a=""+this.key+t.map((function(l){return"["+l+"]"})).join("");this.errors.push(new xe(a,e))},ln.prototype.checkSubtype=function(e,t){var r=Nt(e,t);return r&&this.error(r),r};var zi=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var a=0,l=r;a<l.length;a+=1){var c=l[a],h=c[1];this.labels.push(c[0]),this.outputs.push(h)}};function Qt(e,t,r){return e*(1-r)+t*r}zi.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var r=t.parse(e[1],1,oe);if(!r)return null;var a=[],l=null;t.expectedType&&t.expectedType.kind!=="value"&&(l=t.expectedType);for(var c=1;c<e.length;c+=2){var h=c===1?-1/0:e[c],m=e[c+1],g=c,_=c+1;if(typeof h!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(a.length&&a[a.length-1][0]>=h)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);var x=t.parse(m,_,l);if(!x)return null;l=l||x.type,a.push([h,x])}return new zi(l,r,a)},zi.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);var a=this.input.evaluate(e);if(a<=t[0])return r[0].evaluate(e);var l=t.length;return a>=t[l-1]?r[l-1].evaluate(e):r[Xi(t,a)].evaluate(e)},zi.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},zi.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},zi.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Ra=Object.freeze({__proto__:null,number:Qt,color:function(e,t,r){return new rt(Qt(e.r,t.r,r),Qt(e.g,t.g,r),Qt(e.b,t.b,r),Qt(e.a,t.a,r))},array:function(e,t,r){return e.map((function(a,l){return Qt(a,t[l],r)}))}}),Rl=6/29*3*(6/29),qu=Math.PI/180,Zu=180/Math.PI;function Bs(e){return e>.008856451679035631?Math.pow(e,1/3):e/Rl+4/29}function Fs(e){return e>6/29?e*e*e:Rl*(e-4/29)}
1function Os(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Us(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bl(e){var t=Us(e.r),r=Us(e.g),a=Us(e.b),l=Bs((.4124564*t+.3575761*r+.1804375*a)/.95047),c=Bs((.2126729*t+.7151522*r+.072175*a)/1);return{l:116*c-16,a:500*(l-c),b:200*(c-Bs((.0193339*t+.119192*r+.9503041*a)/1.08883)),alpha:e.a}}function Fl(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,a=isNaN(e.b)?t:t-e.b/200;return t=1*Fs(t),r=.95047*Fs(r),a=1.08883*Fs(a),new rt(Os(3.2404542*r-1.5371385*t-.4985314*a),Os(-.969266*r+1.8760108*t+.041556*a),Os(.0556434*r-.2040259*t+1.0572252*a),e.alpha)}function Gu(e,t,r){var a=t-e;return e+r*(a>180||a<-180?a-360*Math.round(a/360):a)}var Xo={forward:Bl,reverse:Fl,interpolate:function(e,t,r){return{l:Qt(e.l,t.l,r),a:Qt(e.a,t.a,r),b:Qt(e.b,t.b,r),alpha:Qt(e.alpha,t.alpha,r)}}},Wo={forward:function(e){var t=Bl(e),r=t.l,a=t.a,l=t.b,c=Math.atan2(l,a)*Zu;return{h:c<0?c+360:c,c:Math.sqrt(a*a+l*l),l:r,alpha:e.a}},reverse:function(e){var t=e.h*qu,r=e.c;return Fl({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:Gu(e.h,t.h,r),c:Qt(e.c,t.c,r),l:Qt(e.l,t.l,r),alpha:Qt(e.alpha,t.alpha,r)}}},Ol=Object.freeze({__proto__:null,lab:Xo,hcl:Wo}),vr=function(e,t,r,a,l){this.type=e,this.operator=t,this.interpolation=r,this.input=a,this.labels=[],this.outputs=[];for(var c=0,h=l;c<h.length;c+=1){var m=h[c],g=m[1];this.labels.push(m[0]),this.outputs.push(g)}};function Vs(e,t,r,a){var l=a-r,c=e-r;return l===0?0:t===1?c/l:(Math.pow(t,c)-1)/(Math.pow(t,l)-1)}vr.interpolationFactor=function(e,t,r,a){var l=0;if(e.name==="exponential")l=Vs(t,e.base,r,a);else if(e.name==="linear")l=Vs(t,1,r,a);else if(e.name==="cubic-bezier"){var c=e.controlPoints;l=new se(c[0],c[1],c[2],c[3]).solve(Vs(t,1,r,a))}return l},vr.parse=function(e,t){var r=e[0],a=e[1],l=e[2],c=e.slice(3);if(!Array.isArray(a)||a.length===0)return t.error("Expected an interpolation type expression.",1);if(a[0]==="linear")a={name:"linear"};else if(a[0]==="exponential"){var h=a[1];if(typeof h!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);a={name:"exponential",base:h}}else{if(a[0]!=="cubic-bezier")return t.error("Unknown interpolation type "+String(a[0]),1,0);var m=a.slice(1);if(m.length!==4||m.some((function(Z){return typeof Z!="number"||Z<0||Z>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);a={name:"cubic-bezier",controlPoints:m}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(l=t.parse(l,2,oe)))return null;var g=[],_=null;r==="interpolate-hcl"||r==="interpolate-lab"?_=Xe:t.expectedType&&t.expectedType.kind!=="value"&&(_=t.expectedType);for(var x=0;x<c.length;x+=2){var b=c[x],T=c[x+1],A=x+3,D=x+4;if(typeof b!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',A);if(g.length&&g[g.length-1][0]>=b)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',A);var L=t.parse(T,D,_);if(!L)return null;_=_||L.type,g.push([b,L])}return _.kind==="number"||_.kind==="color"||_.kind==="array"&&_.itemType.kind==="number"&&typeof _.N=="number"?new vr(_,r,a,l,g):t.error("Type "+ot(_)+" is not interpolatable.")},vr.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);var a=this.input.evaluate(e);if(a<=t[0])return r[0].evaluate(e);var l=t.length;if(a>=t[l-1])return r[l-1].evaluate(e);var c=Xi(t,a),h=vr.interpolationFactor(this.interpolation,a,t[c],t[c+1]),m=r[c].evaluate(e),g=r[c+1].evaluate(e);return this.operator==="interpolate"?Ra[this.type.kind.toLowerCase()](m,g,h):this.operator==="interpolate-hcl"?Wo.reverse(Wo.interpolate(Wo.forward(m),Wo.forward(g),h)):Xo.reverse(Xo.interpolate(Xo.forward(m),Xo.forward(g),h))},vr.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},vr.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},vr.prototype.serialize=function(){var e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],r=0;r<this.labels.length;
1r++)t.push(this.labels[r],this.outputs[r].serialize());return t};var un=function(e,t){this.type=e,this.args=t};un.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var r=null,a=t.expectedType;a&&a.kind!=="value"&&(r=a);for(var l=[],c=0,h=e.slice(1);c<h.length;c+=1){var m=t.parse(h[c],1+l.length,r,void 0,{typeAnnotation:"omit"});if(!m)return null;r=r||m.type,l.push(m)}var g=a&&l.some((function(_){return Nt(a,_.type)}));return new un(g?Ie:r,l)},un.prototype.evaluate=function(e){for(var t,r=null,a=0,l=0,c=this.args;l<c.length&&(a++,(r=c[l].evaluate(e))&&r instanceof Rr&&!r.available&&(t||(t=r.name),r=null,a===this.args.length&&(r=t)),r===null);l+=1);return r},un.prototype.eachChild=function(e){this.args.forEach(e)},un.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},un.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var cn=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};cn.prototype.evaluate=function(e){return this.result.evaluate(e)},cn.prototype.eachChild=function(e){for(var t=0,r=this.bindings;t<r.length;t+=1)e(r[t][1]);e(this.result)},cn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var r=[],a=1;a<e.length-1;a+=2){var l=e[a];if(typeof l!="string")return t.error("Expected string, but found "+typeof l+" instead.",a);if(/[^a-zA-Z0-9_]/.test(l))return t.error("Variable names must contain only alphanumeric characters or '_'.",a);var c=t.parse(e[a+1],a+1);if(!c)return null;r.push([l,c])}var h=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return h?new cn(r,h):null},cn.prototype.outputDefined=function(){return this.result.outputDefined()},cn.prototype.serialize=function(){for(var e=["let"],t=0,r=this.bindings;t<r.length;t+=1){var a=r[t];e.push(a[0],a[1].serialize())}return e.push(this.result.serialize()),e};var Vn=function(e,t,r){this.type=e,this.index=t,this.input=r};Vn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,oe),a=t.parse(e[2],2,kt(t.expectedType||Ie));return r&&a?new Vn(a.type.itemType,r,a):null},Vn.prototype.evaluate=function(e){var t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new Lt("Array index out of bounds: "+t+" < 0.");if(t>=r.length)throw new Lt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new Lt("Array index must be an integer, but found "+t+" instead.");return r[t]},Vn.prototype.eachChild=function(e){e(this.index),e(this.input)},Vn.prototype.outputDefined=function(){return!1},Vn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Nn=function(e,t){this.type=ae,this.needle=e,this.haystack=t};Nn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Ie),a=t.parse(e[2],2,Ie);return r&&a?It(r.type,[ae,me,oe,Ce,Ie])?new Nn(r,a):t.error("Expected first argument to be of type boolean, string, number or null, but found "+ot(r.type)+" instead"):null},Nn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!$e(t,["boolean","string","number","null"]))throw new Lt("Expected first argument to be of type boolean, string, number or null, but found "+ot(ar(t))+" instead.");if(!$e(r,["string","array"]))throw new Lt("Expected second argument to be of type array or string, but found "+ot(ar(r))+" instead.");return r.indexOf(t)>=0},Nn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Nn.prototype.outputDefined=function(){return!0},Nn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var pn=function(e,t,r){this.type=oe,this.needle=e,this.haystack=t,this.fromIndex=r};pn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Ie),a=t.parse(e[2],2,Ie);if(!r||!a)return null;if(!It(r.type,[ae,me,oe,Ce,Ie]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+ot(r.type)+" instead");if(e.length===4){var l=t.parse(e[3],3,oe);return l?new pn(r,a,l):null}return new pn(r,a)},pn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!$e(t,["boolean","string","number","null"]))throw new Lt("Expected first argument to be of type boolean, string, number or null, but found "+ot(ar(t))+" instead.");if(!$e(r,["string","array"]))throw new Lt("Expected second argument to be of type array or string, but found "+ot(ar(r))+" instead.");if(this.fromIndex){var a=this.fromIndex.evaluate(e);return r.indexOf(t,a)}return r.indexOf(t)},pn.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var jn=function(e,t,r,a,l,c){this.inputType=e,this.type=t,this.input=r,this.cases=a,this.outputs=l,this.otherwise=c};jn.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,a;t.expectedType&&t.expectedType.kind!=="value"&&(a=t.expectedType);for(var l={},c=[],h=2;h<e.length-1;h+=2){var m=e[h],g=e[h+1];Array.isArray(m)||(m=[m]);var _=t.concat(h);if(m.length===0)return _.error("Expected at least one branch label.");for(var x=0,b=m;x<b.length;x+=1){var T=b[x];if(typeof T!="number"&&typeof T!="string")return _.error("Branch labels must be numbers or strings.");if(typeof T=="number"&&Math.abs(T)>Number.MAX_SAFE_INTEGER)return _.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof T=="number"&&Math.floor(T)!==T)return _.error("Numeric branch labels must be integer values.");if(r){if(_.checkSubtype(r,ar(T)))return null}else r=ar(T);if(l[String(T)]!==void 0)return _.error("Branch labels must be unique.");l[String(T)]=c.length}var A=t.parse(g,h,a);if(!A)return null;a=a||A.type,c.push(A)}var D=t.parse(e[1],1,Ie);if(!D)return null;var L=t.parse(e[e.length-1],e.length-1,a);
1return L?D.type.kind!=="value"&&t.concat(1).checkSubtype(r,D.type)?null:new jn(r,a,D,l,c,L):null},jn.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(ar(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},jn.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},jn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},jn.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],a={},l=0,c=Object.keys(this.cases).sort();l<c.length;l+=1){var h=c[l];(b=a[this.cases[h]])===void 0?(a[this.cases[h]]=r.length,r.push([this.cases[h],[h]])):r[b][1].push(h)}for(var m=function(A){return e.inputType.kind==="number"?Number(A):A},g=0,_=r;g<_.length;g+=1){var x=_[g],b=x[0],T=x[1];t.push(T.length===1?m(T[0]):T.map(m)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var qn=function(e,t,r){this.type=e,this.branches=t,this.otherwise=r};qn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);for(var a=[],l=1;l<e.length-1;l+=2){var c=t.parse(e[l],l,ae);if(!c)return null;var h=t.parse(e[l+1],l+1,r);if(!h)return null;a.push([c,h]),r=r||h.type}var m=t.parse(e[e.length-1],e.length-1,r);return m?new qn(r,a,m):null},qn.prototype.evaluate=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var a=r[t],l=a[1];if(a[0].evaluate(e))return l.evaluate(e)}return this.otherwise.evaluate(e)},qn.prototype.eachChild=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var a=r[t],l=a[1];e(a[0]),e(l)}e(this.otherwise)},qn.prototype.outputDefined=function(){return this.branches.every((function(e){return e[1].outputDefined()}))&&this.otherwise.outputDefined()},qn.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var hn=function(e,t,r,a){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=a};function Ul(e,t){return e==="=="||e==="!="?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 Rt(e,t,r,a){return a.compare(t,r)===0}function bo(e,t,r){var a=e!=="=="&&e!=="!=";return(function(){function l(c,h,m){this.type=ae,this.lhs=c,this.rhs=h,this.collator=m,this.hasUntypedArgument=c.type.kind==="value"||h.type.kind==="value"}return l.parse=function(c,h){if(c.length!==3&&c.length!==4)return h.error("Expected two or three arguments.");var m=c[0],g=h.parse(c[1],1,Ie);if(!g)return null;if(!Ul(m,g.type))return h.concat(1).error('"'+m+`" comparisons are not supported for type '`+ot(g.type)+"'.");var _=h.parse(c[2],2,Ie);if(!_)return null;if(!Ul(m,_.type))return h.concat(2).error('"'+m+`" comparisons are not supported for type '`+ot(_.type)+"'.");if(g.type.kind!==_.type.kind&&g.type.kind!=="value"&&_.type.kind!=="value")return h.error("Cannot compare types '"+ot(g.type)+"' and '"+ot(_.type)+"'.");a&&(g.type.kind==="value"&&_.type.kind!=="value"?g=new xr(_.type,[g]):g.type.kind!=="value"&&_.type.kind==="value"&&(_=new xr(g.type,[_]))
1);var x=null;if(c.length===4){if(g.type.kind!=="string"&&_.type.kind!=="string"&&g.type.kind!=="value"&&_.type.kind!=="value")return h.error("Cannot use collator to compare non-string types.");if(!(x=h.parse(c[3],3,Tt)))return null}return new l(g,_,x)},l.prototype.evaluate=function(c){var h=this.lhs.evaluate(c),m=this.rhs.evaluate(c);if(a&&this.hasUntypedArgument){var g=ar(h),_=ar(m);if(g.kind!==_.kind||g.kind!=="string"&&g.kind!=="number")throw new Lt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+g.kind+", "+_.kind+") instead.")}if(this.collator&&!a&&this.hasUntypedArgument){var x=ar(h),b=ar(m);if(x.kind!=="string"||b.kind!=="string")return t(c,h,m)}return this.collator?r(c,h,m,this.collator.evaluate(c)):t(c,h,m)},l.prototype.eachChild=function(c){c(this.lhs),c(this.rhs),this.collator&&c(this.collator)},l.prototype.outputDefined=function(){return!0},l.prototype.serialize=function(){var c=[e];return this.eachChild((function(h){c.push(h.serialize())})),c},l})()}hn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Ie),a=t.parse(e[2],2,oe);if(!r||!a)return null;if(!It(r.type,[kt(Ie),me,Ie]))return t.error("Expected first argument to be of type array or string, but found "+ot(r.type)+" instead");if(e.length===4){var l=t.parse(e[3],3,oe);return l?new hn(r.type,r,a,l):null}return new hn(r.type,r,a)},hn.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!$e(t,["string","array"]))throw new Lt("Expected first argument to be of type array or string, but found "+ot(ar(t))+" instead.");if(this.endIndex){var a=this.endIndex.evaluate(e);return t.slice(r,a)}return t.slice(r)},hn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},hn.prototype.outputDefined=function(){return!1},hn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ba=bo("==",(function(e,t,r){return t===r}),Rt),Vl=bo("!=",(function(e,t,r){return t!==r}),(function(e,t,r,a){return!Rt(0,t,r,a)})),Nl=bo("<",(function(e,t,r){return t<r}),(function(e,t,r,a){return a.compare(t,r)<0})),jl=bo(">",(function(e,t,r){return t>r}),(function(e,t,r,a){return a.compare(t,r)>0})),ql=bo("<=",(function(e,t,r){return t<=r}),(function(e,t,r,a){return a.compare(t,r)<=0})),Xu=bo(">=",(function(e,t,r){return t>=r}),(function(e,t,r,a){return a.compare(t,r)>=0})),fn=function(e,t,r,a,l){this.type=me,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=a,this.maxFractionDigits=l};fn.parse=function(e,t){if(e.length!==3)return t.error("Expected two arguments.");var r=t.parse(e[1],1,oe);if(!r)return null;var a=e[2];if(typeof a!="object"||Array.isArray(a))return t.error("NumberFormat options argument must be an object.");var l=null;if(a.locale&&!(l=t.parse(a.locale,1,me)))return null;var c=null;if(a.currency&&!(c=t.parse(a.currency,1,me)))return null;var h=null;if(a["min-fraction-digits"]&&!(h=t.parse(a["min-fraction-digits"],1,oe)))return null;var m=null;return a["max-fraction-digits"]&&!(m=t.parse(a["max-fraction-digits"],1,oe))?null:new fn(r,l,c,h,m)},fn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},fn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var dn=function(e){this.type=oe,this.input=e};dn.parse=function(e,t){if(e.length!==2)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?t.error("Expected argument of type string or array, but found "+ot(r.type)+" instead."):new dn(r):null},dn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if(typeof t=="string"||Array.isArray(t))return t.length;throw new Lt("Expected value to be of type string or array, but found "+ot(ar(t))+" instead.")},dn.prototype.eachChild=function(e){e(this.input)},dn.prototype.outputDefined=function(){return!1},dn.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var wo={"==":Ba,"!=":Vl,">":jl,"<":Nl,">=":Xu,"<=":ql,array:xr,at:Vn,boolean:xr,case:qn,coalesce:un,collator:tr,format:Gr,image:Zi,in:Nn,"index-of":pn,interpolate:vr,"interpolate-hcl":vr,"interpolate-lab":vr,length:dn,let:cn,literal:di,match:jn,number:xr,"number-format":fn,object:xr,slice:hn,step:zi,string:xr,"to-boolean":mi,"to-color":mi,"to-number":mi,"to-string":mi,var:sn,within:Fr};function Zl(e,t){var r=t[0],a=t[1],l=t[2],c=t[3];r=r.evaluate(e),a=a.evaluate(e),l=l.evaluate(e);var h=c?c.evaluate(e):1,m=Ms(r,a,l,h);if(m)throw new Lt(m);return new rt(r/255*h,a/255*h,l/255*h,h)}function Gl(e,t){return e in t}function Ns(e,t){var r=t[e];return r===void 0?null:r}function Zn(e){return{type:e}}function js(e){return{result:"success",value:e}}function Gn(e){return{result:"error",value:e}}function So(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function Fa(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function qs(e){return!!e.expression&&e.expression.interpolated}function zt(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function Oa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Xl(e){return e}function To(e,t,r){return e!==void 0?e:t!==void 0?t:r!==void 0?r:void 0}function Wu(e,t,r,a,l){return To(typeof r===l?a[r]:void 0,e.default,t.default)}function Ku(e,t,r){if(zt(r)!=="number")return To(e.default,t.default);var a=e.stops.length;if(a===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[a-1][0])return e.stops[a-1][1];var l=Xi(e.stops.map((function(c){return c[0]})),r);return e.stops[l][1]}function Ko(e,t,r){var a=e.base!==void 0?e.base:1;if(zt(r)!=="number")return To(e.default,t.default);var l=e.stops.length;if(l===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[l-1][0])return e.stops[l-1][1];var c=Xi(e.stops.map((function(b){return b[0]})),r),h=(function(b,T,A,D){var L=D-A,Z=b-A;return L===0?0:T===1?Z/L:(Math.pow(T,Z)-1)/(Math.pow(T,L)-1)})(r,a,e.stops[c][0],e.stops[c+1][0]),m=e.stops[c][1],g=e.stops[c+1][1],_=Ra[t.type]||Xl;if(e.colorSpace&&e.colorSpace!=="rgb"){var x=Ol[e.colorSpace];_=function(b,T){return x.reverse(x.interpolate(x.forward(b),x.forward(T),h))}}return typeof m.evaluate=="function"?{evaluate:function(){for(var b=[],T=arguments.length;T--;)b[T]=arguments[T];var A=m.evaluate.apply(void 0,b),D=g.evaluate.apply(void 0,b);if(A!==void 0&&D!==void 0)return _(A,D,h)}}:_(m,g,h)}function Wl(e,t,r){return t.type==="color"?r=rt.parse(r):t.type==="formatted"?r=pr.fromString(r.toString()):t.type==="resolvedImage"?r=Rr.fromString(r.toString()):zt(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0),To(r,e.default,t.default)}hr.register(wo,{error:[{kind:"error"},[me],function(e,t){throw new Lt(t[0].evaluate(e))}],typeof:[me,[Ie],function(e,t){return ot(ar(t[0].evaluate(e)))}],"to-rgba":[kt(oe,4),[Xe],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Xe,[oe,oe,oe],Zl],rgba:[Xe,[oe,oe,oe,oe],Zl],has:{type:ae,overloads:[[[me],function(e,t){return Gl
1(t[0].evaluate(e),e.properties())}],[[me,We],function(e,t){var r=t[1];return Gl(t[0].evaluate(e),r.evaluate(e))}]]},get:{type:Ie,overloads:[[[me],function(e,t){return Ns(t[0].evaluate(e),e.properties())}],[[me,We],function(e,t){var r=t[1];return Ns(t[0].evaluate(e),r.evaluate(e))}]]},"feature-state":[Ie,[me],function(e,t){return Ns(t[0].evaluate(e),e.featureState||{})}],properties:[We,[],function(e){return e.properties()}],"geometry-type":[me,[],function(e){return e.geometryType()}],id:[Ie,[],function(e){return e.id()}],zoom:[oe,[],function(e){return e.globals.zoom}],"heatmap-density":[oe,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[oe,[],function(e){return e.globals.lineProgress||0}],accumulated:[Ie,[],function(e){return e.globals.accumulated===void 0?null:e.globals.accumulated}],"+":[oe,Zn(oe),function(e,t){for(var r=0,a=0,l=t;a<l.length;a+=1)r+=l[a].evaluate(e);return r}],"*":[oe,Zn(oe),function(e,t){for(var r=1,a=0,l=t;a<l.length;a+=1)r*=l[a].evaluate(e);return r}],"-":{type:oe,overloads:[[[oe,oe],function(e,t){var r=t[1];return t[0].evaluate(e)-r.evaluate(e)}],[[oe],function(e,t){return-t[0].evaluate(e)}]]},"/":[oe,[oe,oe],function(e,t){var r=t[1];return t[0].evaluate(e)/r.evaluate(e)}],"%":[oe,[oe,oe],function(e,t){var r=t[1];return t[0].evaluate(e)%r.evaluate(e)}],ln2:[oe,[],function(){return Math.LN2}],pi:[oe,[],function(){return Math.PI}],e:[oe,[],function(){return Math.E}],"^":[oe,[oe,oe],function(e,t){var r=t[1];return Math.pow(t[0].evaluate(e),r.evaluate(e))}],sqrt:[oe,[oe],function(e,t){return Math.sqrt(t[0].evaluate(e))}],log10:[oe,[oe],function(e,t){return Math.log(t[0].evaluate(e))/Math.LN10}],ln:[oe,[oe],function(e,t){return Math.log(t[0].evaluate(e))}],log2:[oe,[oe],function(e,t){return Math.log(t[0].evaluate(e))/Math.LN2}],sin:[oe,[oe],function(e,t){return Math.sin(t[0].evaluate(e))}],cos:[oe,[oe],function(e,t){return Math.cos(t[0].evaluate(e))}],tan:[oe,[oe],function(e,t){return Math.tan(t[0].evaluate(e))}],asin:[oe,[oe],function(e,t){return Math.asin(t[0].evaluate(e))}],acos:[oe,[oe],function(e,t){return Math.acos(t[0].evaluate(e))}],atan:[oe,[oe],function(e,t){return Math.atan(t[0].evaluate(e))}],min:[oe,Zn(oe),function(e,t){return Math.min.apply(Math,t.map((function(r){return r.evaluate(e)})))}],max:[oe,Zn(oe),function(e,t){return Math.max.apply(Math,t.map((function(r){return r.evaluate(e)})))}],abs:[oe,[oe],function(e,t){return Math.abs(t[0].evaluate(e))}],round:[oe,[oe],function(e,t){var r=t[0].evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[oe,[oe],function(e,t){return Math.floor(t[0].evaluate(e))}],ceil:[oe,[oe],function(e,t){return Math.ceil(t[0].evaluate(e))}],"filter-==":[ae,[me,Ie],function(e,t){var r=t[0],a=t[1];return e.properties()[r.value]===a.value}],"filter-id-==":[ae,[Ie],function(e,t){var r=t[0];return e.id()===r.value}],"filter-type-==":[ae,[me],function(e,t){var r=t[0];return e.geometryType()===r.value}],"filter-<":[ae,[me,Ie],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l<c}],"filter-id-<":[ae,[Ie],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a<l}],"filter->":[ae,[me,Ie],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l>c}],"filter-id->":[ae,[Ie],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a>l}],"filter-<=":[ae,[me,Ie],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l<=c}],"filter-id-<=":[ae,[Ie],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a<=l}],"filter->=":[ae,[me,Ie],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l>=c}],"filter-id->=":[ae,[Ie],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a>=l}],"filter-has":[ae,[Ie],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[ae,[],function(e){return e.id()!==null&&e.id()!==void 0}],"filter-type-in":[ae,[kt(me)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[ae,[kt(Ie)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[ae,[me,kt(Ie)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[ae,[me,kt(Ie)],function(e,t){var r=t[0],a=t[1];return(function(l,c,h,m){for(;h<=m;){var g=h+m>>1;if(c[g]===l)return!0;c[g]>l?m=g-1:h=g+1}return!1})(e.properties()[r.value],a.value,0,a.value.length-1)}],all:{type:ae,overloads:[[[ae,ae],function(e,t){var r=t[1];return t[0].evaluate(e)&&r.evaluate(e)}],[Zn(ae),function(e,t){for(var r=0,a=t;r<a.length;r+=1)if(!a[r].evaluate(e))return!1;return!0}]]},any:{type:ae,overloads:[[[ae,ae],function(e,t){var r=t[1];return t[0].evaluate(e)||r.evaluate(e)}],[Zn(ae),function(e,t){for(var r=0,a=t;r<a.length;r+=1)if(a[r].evaluate(e))return!0;return!1}]]},"!":[ae,[ae],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[ae,[me],function(e,t){var r=e.globals&&e.globals.isSupportedScript;return!r||r(t[0].evaluate(e))}],upcase:[me,[me],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[me,[me],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[me,Zn(Ie),function(e,t){return t.map((function(r){return Li(r.evaluate(e))})).join("")}],"resolved-locale":[me,[Tt],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var Eo=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Gi,this._defaultValue=t?(function(r){return r.type==="color"&&Oa(r.default)?new rt(0,0,0,0):r.type==="color"?rt.parse(r.default)||null:r.default===void 0?null:r.default})(t):null,this._enumValues=t&&t.type==="enum"?t.values:null};function Ua(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in wo}function Va(e,t){var r=new ln(wo,[],t?(function(l){var c={color:Xe,string:me,number:oe,enum:me,boolean:ae,formatted:et,resolvedImage:At};return l.type==="array"?kt(c[l.value]||Ie,l.length):c[l.type]})(t):void 0),a=r.parse(e,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?js(new Eo(a,t)):Gn(r.errors)}Eo.prototype.evaluateWithoutErrorHandling=function(e,t,r,a,l,c){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=a,this._evaluator.availableImages=l||null,this._evaluator.formattedSection=c,this.expression.evaluate(this._evaluator)},Eo.prototype.evaluate=function(e,t,r,a,l,c){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=a,this._evaluator.availableImages=l||null,this._evaluator.formattedSection=c||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!=h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new Lt("Expected value to be one of "+Object.keys(this._enumValues).map((function(m){return JSON.stringify(m)})).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(m){return this._warningHistory[m.message]||(this._warningHistory[m.message]=!0,typeof console<"u"&&console.warn(m.message)),this._defaultValue}};var Ho=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!an(t.expression)};Ho.prototype.evaluateWithoutErrorHandling=function(e,t,r,a,l,c){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,a,l,c)},Ho.prototype.evaluate=function(e,t,r,a,l,c){return this._styleExpression.evaluate(e,t,r,a,l,c)};var Io=function(e,t,r,a){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!an(t.expression),this.interpolationType=a};function Zs(e,t){if((e=Va(e,t)).result==="error")return e;var r=e.value.expression,a=Un(r);if(!a&&!So(t))return Gn([new xe("","data expressions not supported")]);var l=La(r,["zoom"]);if(!l&&!Fa(t))return Gn([new xe("","zoom expressions not supported")]);var c=(function h(m){var g=null;if(m instanceof cn)g=h(m.result);else if(m instanceof un)for(var _=0,x=m.args;_<x.length&&!(g=h(x[_]));_+=1);else(m instanceof zi||m instanceof vr)&&m.input instanceof hr&&m.input.name==="zoom"&&(g=m);return g instanceof xe||m.eachChild((function(b){var T=h(b);T instanceof xe?g=T:!g&&T?g=new xe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):g&&T&&g!==T&&(g=ne
1w xe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),g})(r);return c||l?c instanceof xe?Gn([c]):c instanceof vr&&!qs(t)?Gn([new xe("",'"interpolate" expressions cannot be used with this property')]):js(c?new Io(a?"camera":"composite",e.value,c.labels,c instanceof vr?c.interpolation:void 0):new Ho(a?"constant":"source",e.value)):Gn([new xe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Io.prototype.evaluateWithoutErrorHandling=function(e,t,r,a,l,c){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,a,l,c)},Io.prototype.evaluate=function(e,t,r,a,l,c){return this._styleExpression.evaluate(e,t,r,a,l,c)},Io.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?vr.interpolationFactor(this.interpolationType,e,t,r):0};var Jo=function(e,t){this._parameters=e,this._specification=t,fe(this,(function r(a,l){var c,h,m,g=l.type==="color",_=a.stops&&typeof a.stops[0][0]=="object",x=_||!(_||a.property!==void 0),b=a.type||(qs(l)?"exponential":"interval");if(g&&((a=fe({},a)).stops&&(a.stops=a.stops.map((function(ye){return[ye[0],rt.parse(ye[1])]}))),a.default=rt.parse(a.default?a.default:l.default)),a.colorSpace&&a.colorSpace!=="rgb"&&!Ol[a.colorSpace])throw new Error("Unknown color space: "+a.colorSpace);if(b==="exponential")c=Ko;else if(b==="interval")c=Ku;else if(b==="categorical"){c=Wu,h=Object.create(null);for(var T=0,A=a.stops;T<A.length;T+=1){var D=A[T];h[D[0]]=D[1]}m=typeof a.stops[0][0]}else{if(b!=="identity")throw new Error('Unknown function type "'+b+'"');c=Wl}if(_){for(var L={},Z=[],V=0;V<a.stops.length;V++){var K=a.stops[V],J=K[0].zoom;L[J]===void 0&&(L[J]={zoom:J,type:a.type,property:a.property,default:a.default,stops:[]},Z.push(J)),L[J].stops.push([K[0].value,K[1]])}for(var $=[],Q=0,ie=Z;Q<ie.length;Q+=1){var pe=ie[Q];$.push([L[pe].zoom,r(L[pe],l)])}var de={name:"linear"};return{kind:"composite",interpolationType:de,interpolationFactor:vr.interpolationFactor.bind(void 0,de),zoomStops:$.map((function(ye){return ye[0]})),evaluate:function(ye,ke){var ge=ye.zoom;return Ko({stops:$,base:a.base},l,ge).evaluate(ge,ke)}}}if(x){var Pe=b==="exponential"?{name:"exponential",base:a.base!==void 0?a.base:1}:null;return{kind:"camera",interpolationType:Pe,interpolationFactor:vr.interpolationFactor.bind(void 0,Pe),zoomStops:a.stops.map((function(ye){return ye[0]})),evaluate:function(ye){return c(a,l,ye.zoom,h,m)}}}return{kind:"source",evaluate:function(ye,ke){var ge=ke&&ke.properties?ke.properties[a.property]:void 0;return ge===void 0?To(a.default,l.default):c(a,l,ge,h,m)}}})(this._parameters,this._specification))};function Pi(e){var t=e.key,r=e.value,a=e.valueSpec||{},l=e.objectElementValidators||{},c=e.style,h=e.styleSpec,m=[],g=zt(r);if(g!=="object")return[new U(t,r,"object expected, "+g+" found")];for(var _ in r){var x=_.split(".")[0],b=a[x]||a["*"],T=void 0;if(l[x])T=l[x];else if(a[x])T=at;else if(l["*"])T=l["*"];else{if(!a["*"]){m.push(new U(t,r[_],'unknown property "'+_+'"'));continue}T=at}m=m.concat(T({key:(t&&t+".")+_,value:r[_],valueSpec:b,style:c,styleSpec:h,object:r,objectKey:_},r))}for(var A in a)l[A]||a[A].required&&a[A].default===void 0&&r[A]===void 0&&m.push(new U(t,r,'missing required property "'+A+'"'));return m}function Kl(e){var t=e.value,r=e.valueSpec,a=e.style,l=e.styleSpec,c=e.key,h=e.arrayElementValidator||at;if(zt(t)!=="array")return[new U(c,t,"array expected, "+zt(t)+" found")];if(r.length&&t.length!==r.length)return[new U(c,t,"array length "+r.length+" expected, length "+t.length+" found")];if(r["min-length"]&&t.length<r["min-length"])return[new U(c,t,"array length at least "+r["min-length"]+" expected, length "+t.length+" found")];var m={type:r.value,values:r.values};l.$version<7&&(m.function=r.function),zt(r.value)==="object"&&(m=r.value);for(var g=[],_=0;_<t.length;_++)g=g.concat(h({array:t,arrayIndex:_,value:t[_],valueSpec:m,style:a,styleSpec:l,key:c+"["+_+"]"}));return g}function Hl(e){var t=e.key,r=e.value,a=e.valueSpec,l=zt(r);return l==="number"&&r!=r&&(l="NaN"),l!=="number"?[new U(t,r,"number expected, "+l+" found")]:"minimum"in a&&r<a.minimum?[new U(t,r,r+" is less than the minimum value "+a.minimum)]:"maximum"in a&&r>a.maximum?[new U(t,r,r+" is greater than the maximum value "+a.maximum)]:[]}function Gs(e){var t,r,a,l=e.valueSpec,c=Y(e.value.type),h={},m=c!=="categorical"&&e.value.property===void 0,g=!m,_=zt(e.value.stops)==="array"&&zt(e.value.stops[0])==="array"&&zt(e.value.stops[0][0])==="object",x=Pi({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(A){if(c==="identity")return[new U(A.key,A.value,'identity function may not have a "stops" property')];var D=[],L=A.value;
1return D=D.concat(Kl({key:A.key,value:L,valueSpec:A.valueSpec,style:A.style,styleSpec:A.styleSpec,arrayElementValidator:b})),zt(L)==="array"&&L.length===0&&D.push(new U(A.key,L,"array must have at least one stop")),D},default:function(A){return at({key:A.key,value:A.value,valueSpec:l,style:A.style,styleSpec:A.styleSpec})}}});return c==="identity"&&m&&x.push(new U(e.key,e.value,'missing required property "property"')),c==="identity"||e.value.stops||x.push(new U(e.key,e.value,'missing required property "stops"')),c==="exponential"&&e.valueSpec.expression&&!qs(e.valueSpec)&&x.push(new U(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(g&&!So(e.valueSpec)?x.push(new U(e.key,e.value,"property functions not supported")):m&&!Fa(e.valueSpec)&&x.push(new U(e.key,e.value,"zoom functions not supported"))),c!=="categorical"&&!_||e.value.property!==void 0||x.push(new U(e.key,e.value,'"property" property is required')),x;function b(A){var D=[],L=A.value,Z=A.key;if(zt(L)!=="array")return[new U(Z,L,"array expected, "+zt(L)+" found")];if(L.length!==2)return[new U(Z,L,"array length 2 expected, length "+L.length+" found")];if(_){if(zt(L[0])!=="object")return[new U(Z,L,"object expected, "+zt(L[0])+" found")];if(L[0].zoom===void 0)return[new U(Z,L,"object stop key must have zoom")];if(L[0].value===void 0)return[new U(Z,L,"object stop key must have value")];if(a&&a>Y(L[0].zoom))return[new U(Z,L[0].zoom,"stop zoom values must appear in ascending order")];Y(L[0].zoom)!==a&&(a=Y(L[0].zoom),r=void 0,h={}),D=D.concat(Pi({key:Z+"[0]",value:L[0],valueSpec:{zoom:{}},style:A.style,styleSpec:A.styleSpec,objectElementValidators:{zoom:Hl,value:T}}))}else D=D.concat(T({key:Z+"[0]",value:L[0],style:A.style,styleSpec:A.styleSpec},L));return Ua(ue(L[1]))?D.concat([new U(Z+"[1]",L[1],"expressions are not allowed in function stops.")]):D.concat(at({key:Z+"[1]",value:L[1],valueSpec:l,style:A.style,styleSpec:A.styleSpec}))}function T(A,D){var L=zt(A.value),Z=Y(A.value),V=A.value!==null?A.value:D;if(t){if(L!==t)return[new U(A.key,V,L+" stop domain type must match previous stop domain type "+t)]}else t=L;if(L!=="number"&&L!=="string"&&L!=="boolean")return[new U(A.key,V,"stop domain value must be a number, string, or boolean")];if(L!=="number"&&c!=="categorical"){var K="number expected, "+L+" found";return So(l)&&c===void 0&&(K+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new U(A.key,V,K)]}return c!=="categorical"||L!=="number"||isFinite(Z)&&Math.floor(Z)===Z?c!=="categorical"&&L==="number"&&r!==void 0&&Z<r?[new U(A.key,V,"stop domain values must appear in ascending order")]:(r=Z,c==="categorical"&&Z in h?[new U(A.key,V,"stop domain values must be unique")]:(h[Z]=!0,[])):[new U(A.key,V,"integer expected, found "+Z)]}}function Xn(e){var t=(e.expressionContext==="property"?Zs:Va)(ue(e.value),e.valueSpec);if(t.result==="error")return t.value.map((function(a){return new U(""+e.key+a.key,e.value,a.message)}));var r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new U(e.key,e.value,'Invalid data expression for "'+e.propertyKey+'". Output values must be contained as literals within the expression.')];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!an(r))return[new U(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!an(r))return[new U(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!La(r,["zoom","feature-state"]))return[new U(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!Un(r))return[new U(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yo(e){var t=e.key,r=e.value,a=e.valueSpec,l=[];return Array.isArray(a.values)?a.values.indexOf(Y(r))===-1&&l.push(new U(t,r,"expected one of ["+a.values.join(", ")+"], "+JSON.stringify(r)+" found")):Object.keys(a.values).indexOf(Y(r))===-1&&l.push(new U(t,r,"expected one of ["+Object.keys(a.values).join(", ")+"], "+JSON.stringify(r)+" found")),l}function $o(e){if(e===!0||e===!1)return!0;
1if(!Array.isArray(e)||e.length===0)return!1;switch(e[0]){case"has":return e.length>=2&&e[1]!=="$id"&&e[1]!=="$type";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);t<r.length;t+=1){var a=r[t];if(!$o(a)&&typeof a!="boolean")return!1}return!0;default:return!0}}Jo.deserialize=function(e){return new Jo(e._parameters,e._specification)},Jo.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}};var Hu={type:"boolean",default:!1};function Na(e){if(e==null)return{filter:function(){return!0},needGeometry:!1};$o(e)||(e=ja(e));var t=Va(e,Hu);if(t.result==="error")throw new Error(t.value.map((function(r){return r.key+": "+r.message})).join(", "));return{filter:function(r,a,l){return t.value.evaluate(r,a,{},l)},needGeometry:(function r(a){if(!Array.isArray(a))return!1;if(a[0]==="within")return!0;for(var l=1;l<a.length;l++)if(r(a[l]))return!0;return!1})(e)}}function Ju(e,t){return e<t?-1:e>t?1:0}function ja(e){if(!e)return!0;var t,r=e[0];return e.length<=1?r!=="any":r==="=="?Xs(e[1],e[2],"=="):r==="!="?qa(Xs(e[1],e[2],"==")):r==="<"||r===">"||r==="<="||r===">="?Xs(e[1],e[2],r):r==="any"?(t=e.slice(1),["any"].concat(t.map(ja))):r==="all"?["all"].concat(e.slice(1).map(ja)):r==="none"?["all"].concat(e.slice(1).map(ja).map(qa)):r==="in"?Jl(e[1],e.slice(2)):r==="!in"?qa(Jl(e[1],e.slice(2))):r==="has"?Yl(e[1]):r==="!has"?qa(Yl(e[1])):r!=="within"||e}function Xs(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function Jl(e,t){if(t.length===0)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(r){return typeof r!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Ju)]]:["filter-in-small",e,["literal",t]]}}function Yl(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function qa(e){return["!",e]}function Za(e){return $o(ue(e.value))?Xn(fe({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):(function t(r){var a=r.value,l=r.key;if(zt(a)!=="array")return[new U(l,a,"array expected, "+zt(a)+" found")];var c,h=r.styleSpec,m=[];
1if(a.length<1)return[new U(l,a,"filter array must have at least 1 element")];switch(m=m.concat(Yo({key:l+"[0]",value:a[0],valueSpec:h.filter_operator,style:r.style,styleSpec:r.styleSpec})),Y(a[0])){case"<":case"<=":case">":case">=":a.length>=2&&Y(a[1])==="$type"&&m.push(new U(l,a,'"$type" cannot be use with operator "'+a[0]+'"'));case"==":case"!=":a.length!==3&&m.push(new U(l,a,'filter array for operator "'+a[0]+'" must have 3 elements'));case"in":case"!in":a.length>=2&&(c=zt(a[1]))!=="string"&&m.push(new U(l+"[1]",a[1],"string expected, "+c+" found"));for(var g=2;g<a.length;g++)c=zt(a[g]),Y(a[1])==="$type"?m=m.concat(Yo({key:l+"["+g+"]",value:a[g],valueSpec:h.geometry_type,style:r.style,styleSpec:r.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&m.push(new U(l+"["+g+"]",a[g],"string, number, or boolean expected, "+c+" found"));break;case"any":case"all":case"none":for(var _=1;_<a.length;_++)m=m.concat(t({key:l+"["+_+"]",value:a[_],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":c=zt(a[1]),a.length!==2?m.push(new U(l,a,'filter array for "'+a[0]+'" operator must have 2 elements')):c!=="string"&&m.push(new U(l+"[1]",a[1],"string expected, "+c+" found"));break;case"within":c=zt(a[1]),a.length!==2?m.push(new U(l,a,'filter array for "'+a[0]+'" operator must have 2 elements')):c!=="object"&&m.push(new U(l+"[1]",a[1],"object expected, "+c+" found"))}return m})(e)}function Ws(e,t){var r=e.key,a=e.style,l=e.styleSpec,c=e.value,h=e.objectKey,m=l[t+"_"+e.layerType];if(!m)return[];var g=h.match(/^(.*)-transition$/);if(t==="paint"&&g&&m[g[1]]&&m[g[1]].transition)return at({key:r,value:c,valueSpec:l.transition,style:a,styleSpec:l});var _,x=e.valueSpec||m[h];if(!x)return[new U(r,c,'unknown property "'+h+'"')];if(zt(c)==="string"&&So(x)&&!x.tokens&&(_=/^{([^}]+)}$/.exec(c)))return[new U(r,c,'"'+h+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(_[1])+" }`.")];var b=[];return e.layerType==="symbol"&&(h==="text-field"&&a&&!a.glyphs&&b.push(new U(r,c,'use of "text-field" requires a style "glyphs" property')),h==="text-font"&&Oa(ue(c))&&Y(c.type)==="identity"&&b.push(new U(r,c,'"text-font" does not support identity functions'))),b.concat(at({key:e.key,value:c,valueSpec:x,style:a,styleSpec:l,expressionContext:"property",propertyType:t,propertyKey:h}))}function Qo(e){return Ws(e,"paint")}function $l(e){return Ws(e,"layout")}function Ks(e){var t=[],r=e.value,a=e.key,l=e.style,c=e.styleSpec;r.type||r.ref||t.push(new U(a,r,'either "type" or "ref" is required'));var h,m=Y(r.type),g=Y(r.ref);if(r.id)for(var _=Y(r.id),x=0;x<e.arrayIndex;x++){var b=l.layers[x];Y(b.id)===_&&t.push(new U(a,r.id,'duplicate layer id "'+r.id+'", previously used at line '+b.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(D){D in r&&t.push(new U(a,r[D],'"'+D+'" is prohibited for ref layers'))})),l.layers.forEach((function(D){Y(D.id)===g&&(h=D)})),h?h.ref?t.push(new U(a,r.ref,"ref cannot reference another ref layer")):m=Y(h.type):t.push(new U(a,r.ref,'ref layer "'+g+'" not found'));else if(m!=="background")if(r.source){var T=l.sources&&l.sources[r.source],A=T&&Y(T.type);T?A==="vector"&&m==="raster"?t.push(new U(a,r.source,'layer "'+r.id+'" requires a raster source')):A==="raster"&&m!=="raster"?t.push(new U(a,r.source,'layer "'+r.id+'" requires a vector source')):A!=="vector"||r["source-layer"]?A==="raster-dem"&&m!=="hillshade"?t.push(new U(a,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):m!=="line"||!r.paint||!r.paint["line-gradient"]||A==="geojson"&&T.lineMetrics||t.push(new U(a,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):t.push(new U(a,r,'layer "'+r.id+'" must specify a "source-layer"')):t.push(new U(a,r.source,'source "'+r.source+'" not found'))}else t.push(new U(a,r,'missing required property "source"'));return t=t.concat(Pi({key:a,value:r,valueSpec:c.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return at({key:a+".type",value:r.type,valueSpec:c.layer.type,style:e.style,styleSpec:e.styleSpec,object:r,objectKey:"type"})},filter:Za,layout:function(D){return Pi({layer:r,key:D.key,value:D.value,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{"*":function(L){return $l
1(fe({layerType:m},L))}}})},paint:function(D){return Pi({layer:r,key:D.key,value:D.value,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{"*":function(L){return Qo(fe({layerType:m},L))}}})}}}))}function xt(e){var t=e.value,r=e.key,a=zt(t);return a!=="string"?[new U(r,t,"string expected, "+a+" found")]:[]}var Ga={promoteId:function(e){var t=e.key,r=e.value;if(zt(r)==="string")return xt({key:t,value:r});var a=[];for(var l in r)a.push.apply(a,xt({key:t+"."+l,value:r[l]}));return a}};function Wn(e){var t=e.value,r=e.key,a=e.styleSpec,l=e.style;if(!t.type)return[new U(r,t,'"type" is required')];var c,h=Y(t.type);switch(h){case"vector":case"raster":case"raster-dem":return Pi({key:r,value:t,valueSpec:a["source_"+h.replace("-","_")],style:e.style,styleSpec:a,objectElementValidators:Ga});case"geojson":if(c=Pi({key:r,value:t,valueSpec:a.source_geojson,style:l,styleSpec:a,objectElementValidators:Ga}),t.cluster)for(var m in t.clusterProperties){var g=t.clusterProperties[m],_=g[0],x=typeof _=="string"?[_,["accumulated"],["get",m]]:_;c.push.apply(c,Xn({key:r+"."+m+".map",value:g[1],expressionContext:"cluster-map"})),c.push.apply(c,Xn({key:r+"."+m+".reduce",value:x,expressionContext:"cluster-reduce"}))}return c;case"video":return Pi({key:r,value:t,valueSpec:a.source_video,style:l,styleSpec:a});case"image":return Pi({key:r,value:t,valueSpec:a.source_image,style:l,styleSpec:a});case"canvas":return[new U(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:r+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function mn(e){var t=e.value,r=e.styleSpec,a=r.light,l=e.style,c=[],h=zt(t);if(t===void 0)return c;if(h!=="object")return c.concat([new U("light",t,"object expected, "+h+" found")]);for(var m in t){var g=m.match(/^(.*)-transition$/);c=c.concat(g&&a[g[1]]&&a[g[1]].transition?at({key:m,value:t[m],valueSpec:r.transition,style:l,styleSpec:r}):a[m]?at({key:m,value:t[m],valueSpec:a[m],style:l,styleSpec:r}):[new U(m,t[m],'unknown property "'+m+'"')])}return c}var _t={"*":function(){return[]},array:Kl,boolean:function(e){var t=e.value,r=e.key,a=zt(t);return a!=="boolean"?[new U(r,t,"boolean expected, "+a+" found")]:[]},number:Hl,color:function(e){var t=e.key,r=e.value,a=zt(r);return a!=="string"?[new U(t,r,"color expected, "+a+" found")]:vo(r)===null?[new U(t,r,'color expected, "'+r+'" found')]:[]},constants:le,enum:Yo,filter:Za,function:Gs,layer:Ks,object:Pi,source:Wn,light:mn,string:xt,formatted:function(e){return xt(e).length===0?[]:Xn(e)},resolvedImage:function(e){return xt(e).length===0?[]:Xn(e)}};function at(e){var t=e.value,r=e.valueSpec,a=e.styleSpec;return r.expression&&Oa(Y(t))?Gs(e):r.expression&&Ua(ue(t))?Xn(e):r.type&&_t[r.type]?_t[r.type](e):Pi(fe({},e,{valueSpec:r.type?a[r.type]:r}))}function Kn(e){var t=e.value,r=e.key,a=xt(e);return a.length||(t.indexOf("{fontstack}")===-1&&a.push(new U(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&a.push(new U(r,t,'"glyphs" url must include a "{range}" token'))),a}function Ri(e,t){t===void 0&&(t=M);var r=[];return r=r.concat(at({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:Kn,"*":function(){return[]}}})),e.constants&&(r=r.concat(le({key:"constants",value:e.constants}))),Ql(r)}function Ql(e){return[].concat(e).sort((function(t,r){return t.line-r.line}))}function Ao(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Ql(e.apply(this,t))}}Ri.source=Ao(Wn),Ri.light=Ao(mn),Ri.layer=Ao(Ks),Ri.filter=Ao(Za),Ri.paintProperty=Ao(Qo),Ri.layoutProperty=Ao($l);var ea=Ri,Yu=ea.light,ta=ea.paintProperty,Xa=ea.layoutProperty;function ra(e,t){var r=!1;if(t&&t.length)for(var a=0,l=t;a<l.length;a+=1)e.fire(new W(new Error(l[a].message))),r=!0;return r}var br=ti;function ti(e,t,r){var a=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var l=new Int32Array(this.arrayBuffer);e=l[0],this.d=(t=l[1])+2*(r=l[2]);for(var c=0;c<this.d*this.d;c++){var h=l[3+c],m=l[3+c+1];a.push(h===m?null:l.subarray(h,m))}var g=l[3+a.length+1];this.keys=l.subarray(l[3+a.length],g),this.bboxes=l.subarray(g),this.insert=this._insertReadonly}else{this.d=t+2*r;for(var _=0;_<this.d*this.d;_++)a.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;var x=r/t*e;this.min=-x,this.max=e+x}
1ti.prototype.insert=function(e,t,r,a,l){this._forEachCell(t,r,a,l,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(a),this.bboxes.push(l)},ti.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ti.prototype._insertCell=function(e,t,r,a,l,c){this.cells[l].push(c)},ti.prototype.query=function(e,t,r,a,l){var c=this.min,h=this.max;if(e<=c&&t<=c&&h<=r&&h<=a&&!l)return Array.prototype.slice.call(this.keys);var m=[];return this._forEachCell(e,t,r,a,this._queryCell,m,{},l),m},ti.prototype._queryCell=function(e,t,r,a,l,c,h,m){var g=this.cells[l];if(g!==null)for(var _=this.keys,x=this.bboxes,b=0;b<g.length;b++){var T=g[b];if(h[T]===void 0){var A=4*T;(m?m(x[A+0],x[A+1],x[A+2],x[A+3]):e<=x[A+2]&&t<=x[A+3]&&r>=x[A+0]&&a>=x[A+1])?(h[T]=!0,c.push(_[T])):h[T]=!1}}},ti.prototype._forEachCell=function(e,t,r,a,l,c,h,m){for(var g=this._convertToCellCoord(e),_=this._convertToCellCoord(t),x=this._convertToCellCoord(r),b=this._convertToCellCoord(a),T=g;T<=x;T++)for(var A=_;A<=b;A++){var D=this.d*A+T;if((!m||m(this._convertFromCellCoord(T),this._convertFromCellCoord(A),this._convertFromCellCoord(T+1),this._convertFromCellCoord(A+1)))&&l.call(this,e,t,r,a,D,c,h,m))return}},ti.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},ti.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},ti.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,r=0,a=0;a<this.cells.length;a++)r+=this.cells[a].length;var l=new Int32Array(t+r+this.keys.length+this.bboxes.length);l[0]=this.extent,l[1]=this.n,l[2]=this.padding;for(var c=t,h=0;h<e.length;h++){var m=e[h];l[3+h]=c,l.set(m,c),c+=m.length}return l[3+e.length]=c,l.set(this.keys,c),l[3+e.length+1]=c+=this.keys.length,l.set(this.bboxes,c),c+=this.bboxes.length,l.buffer};var eu=ze.ImageData,fr=ze.ImageBitmap,Xr={};function be(e,t,r){r===void 0&&(r={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Xr[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}for(var ia in be("Object",Object),br.serialize=function(e,t){var r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}},br.deserialize=function(e){return new br(e.buffer)},be("Grid",br),be("Color",rt),be("Error",Error),be("ResolvedImage",Rr),be("StylePropertyFunction",Jo),be("StyleExpression",Eo,{omit:["_evaluator"]}),be("ZoomDependentExpression",Io),be("ZoomConstantExpression",Ho),be("CompoundExpression",hr,{omit:["_evaluate"]}),wo)wo[ia]._classRegistryKey||be("Expression_"+ia,wo[ia]);function zo(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}function yn(e){return fr&&e instanceof fr}function Wr(e,t){if(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(zo(e)||yn(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var r=e;return t&&t.push(r.buffer),r}if(e instanceof eu)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var a=[],l=0,c=e;l<c.length;l+=1)a.push(Wr(c[l],t));return a}if(typeof e=="object"){var h=e.constructor,m=h._classRegistryKey;if(!m)throw new Error("can't serialize object of unregistered class");var g=h.serialize?h.serialize(e,t):{};if(!h.serialize){for(var _ in e)if(e.hasOwnProperty(_)&&!(Xr[m].omit.indexOf(_)>=0)){var x=e[_];g[_]=Xr[m].shallow.indexOf(_)>=0?x:Wr(x,t)}e instanceof Error&&(g.message=e.message)}if(g.$name)throw new Error("$name property is reserved for worker serialization logic.");return m!=="Object"&&(g.$name=m),g}throw new Error("can't serialize object of type "+typeof e)}function na(e){if(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||zo(e)||yn(e)||ArrayBuffer.isView(e)||e instanceof eu)return e;if(Array.isArray(e))return e.map(na);if(typeof e=="object"){var t=e.$name||"Object",r=Xr[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var a=Object.create(r.prototype),l=0,c=Object.keys(e);l<c.length;l+=1){var h=c[l];if(h!=="$name"){var m=e[h];a[h]=Xr[t].shallow.indexOf(h)>=0?m:na(m)}}return a}throw new Error("can't deserialize object of type "+typeof e)}var Or=function(){this.first=!0};Or.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))};var Te={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>
1=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function Wa(e){for(var t=0,r=e;t<r.length;t+=1)if(Ka(r[t].charCodeAt(0)))return!0;return!1}function Ka(e){return!(e!==746&&e!==747&&(e<4352||!(Te["Bopomofo Extended"](e)||Te.Bopomofo(e)||Te["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||Te["CJK Compatibility Ideographs"](e)||Te["CJK Compatibility"](e)||Te["CJK Radicals Supplement"](e)||Te["CJK Strokes"](e)||!(!Te["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||e===12336)||Te["CJK Unified Ideographs Extension A"](e)||Te["CJK Unified Ideographs"](e)||Te["Enclosed CJK Letters and Months"](e)||Te["Hangul Compatibility Jamo"](e)||Te["Hangul Jamo Extended-A"](e)||Te["Hangul Jamo Extended-B"](e)||Te["Hangul Jamo"](e)||Te["Hangul Syllables"](e)||Te.Hiragana(e)||Te["Ideographic Description Characters"](e)||Te.Kanbun(e)||Te["Kangxi Radicals"](e)||Te["Katakana Phonetic Extensions"](e)||Te.Katakana(e)&&e!==12540||!(!Te["Halfwidth and Fullwidth Forms"](e)||e===65288||e===65289||e===65293||e>=65306&&e<=65310||e===65339||e===65341||e===65343||e>=65371&&e<=65503||e===65507||e>=65512&&e<=65519)||!(!Te["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Te["Unified Canadian Aboriginal Syllabics"](e)||Te["Unified Canadian Aboriginal Syllabics Extended"](e)||Te["Vertical Forms"](e)||Te["Yijing Hexagram Symbols"](e)||Te["Yi Syllables"](e)||Te["Yi Radicals"](e))))}function yi(e){return!(Ka(e)||(function(t){return!!(Te["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||Te["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)||Te["Letterlike Symbols"](t)||Te["Number Forms"](t)||Te["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)||Te["Control Pictures"](t)&&t!==9251||Te["Optical Character Recognition"](t)||Te["Enclosed Alphanumerics"](t)||Te["Geometric Shapes"](t)||Te["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Te["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Te["CJK Symbols and Punctuation"](t)||Te.Katakana(t)||Te["Private Use Area"](t)||Te["CJK Compatibility Forms"](t)||Te["Small Form Variants"](t)||Te["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)})(e))}function Ur(e){return e>=1424&&e<=2303||Te["Arabic Presentation Forms-A"](e)||Te["Arabic Presentation Forms-B"](e)}function Ha(e,t){return!(!t&&Ur(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||Te.Khmer(e))}function tu(e){for(var t=0,r=e;t<r.length;t+=1)if(Ur(r[t].charCodeAt(0)))return!0;return!1}var Hs=null,Vr="unavailable",gn=null,Ja=function(e){e&&typeof e=="string"&&e.indexOf("NetworkError")>-1&&(Vr="error"),Hs&&Hs(e)};function Js(){Ys.fire(new G("pluginStateChange",{pluginStatus:Vr,pluginURL:gn}))}var Ys=new q,Ci=function(){return Vr},ru=function(){if(Vr!=="deferred"||!gn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Vr="loading",Js(),gn&&Vt({url:gn},(function(e){e?Ja(e):(Vr="loaded",Js())}))},Ut={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Vr==="loaded"||Ut.applyArabicShaping!=null},isLoading:function(){return Vr==="loading"},setState:function(e){Vr=e.pluginStatus,gn=e.pluginURL},isParsed:function(){return Ut.applyArabicShaping!=null&&Ut.processBidirectionalText!=null&&Ut.processStyledBidirectionalText!=null},getPluginURL:function(){return gn}},ft=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Or,this.transition={})};ft.prototype.isSupportedScript=function(e){return(function(t,r){for(var a=0,l=t;a<l.length;
1a+=1)if(!Ha(l[a].charCodeAt(0),r))return!1;return!0})(e,Ut.isLoaded())},ft.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},ft.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var gi=function(e,t){this.property=e,this.value=t,this.expression=(function(r,a){if(Oa(r))return new Jo(r,a);if(Ua(r)){var l=Zs(r,a);if(l.result==="error")throw new Error(l.value.map((function(h){return h.key+": "+h.message})).join(", "));return l.value}var c=r;return typeof r=="string"&&a.type==="color"&&(c=rt.parse(r)),{kind:"constant",evaluate:function(){return c}}})(t===void 0?e.specification.default:t,e.specification)};gi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},gi.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var Kr=function(e){this.property=e,this.value=new gi(e,void 0)};Kr.prototype.transitioned=function(e,t){return new Hn(this.property,this.value,t,_r({},e.transition,this.transition),e.now)},Kr.prototype.untransitioned=function(){return new Hn(this.property,this.value,null,{},0)};var ri=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};ri.prototype.getValue=function(e){return Si(this._values[e].value.value)},ri.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Kr(this._values[e].property)),this._values[e].value=new gi(this._values[e].property,t===null?void 0:Si(t))},ri.prototype.getTransition=function(e){return Si(this._values[e].transition)},ri.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Kr(this._values[e].property)),this._values[e].transition=Si(t)||void 0},ri.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var a=r[t],l=this.getValue(a);l!==void 0&&(e[a]=l);var c=this.getTransition(a);c!==void 0&&(e[a+"-transition"]=c)}return e},ri.prototype.transitioned=function(e,t){for(var r=new Bi(this._properties),a=0,l=Object.keys(this._values);a<l.length;a+=1){var c=l[a];r._values[c]=this._values[c].transitioned(e,t._values[c])}return r},ri.prototype.untransitioned=function(){for(var e=new Bi(this._properties),t=0,r=Object.keys(this._values);t<r.length;t+=1){var a=r[t];e._values[a]=this._values[a].untransitioned()}return e};var Hn=function(e,t,r,a,l){this.property=e,this.value=t,this.begin=l+a.delay||0,this.end=this.begin+a.duration||0,e.specification.transition&&(a.delay||a.duration)&&(this.prior=r)};
1Hn.prototype.possiblyEvaluate=function(e,t,r){var a=e.now||0,l=this.value.possiblyEvaluate(e,t,r),c=this.prior;if(c){if(a>this.end)return this.prior=null,l;if(this.value.isDataDriven())return this.prior=null,l;if(a<this.begin)return c.possiblyEvaluate(e,t,r);var h=(a-this.begin)/(this.end-this.begin);return this.property.interpolate(c.possiblyEvaluate(e,t,r),l,(function(m){if(m<=0)return 0;if(m>=1)return 1;var g=m*m,_=g*m;return 4*(m<.5?_:3*(m-g)+_-.75)})(h))}return l};var Bi=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Bi.prototype.possiblyEvaluate=function(e,t,r){for(var a=new Jn(this._properties),l=0,c=Object.keys(this._values);l<c.length;l+=1){var h=c[l];a._values[h]=this._values[h].possiblyEvaluate(e,t,r)}return a},Bi.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1)if(this._values[t[e]].prior)return!0;return!1};var _n=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};_n.prototype.getValue=function(e){return Si(this._values[e].value)},_n.prototype.setValue=function(e,t){this._values[e]=new gi(this._values[e].property,t===null?void 0:Si(t))},_n.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var a=r[t],l=this.getValue(a);l!==void 0&&(e[a]=l)}return e},_n.prototype.possiblyEvaluate=function(e,t,r){for(var a=new Jn(this._properties),l=0,c=Object.keys(this._values);l<c.length;l+=1){var h=c[l];a._values[h]=this._values[h].possiblyEvaluate(e,t,r)}return a};var ii=function(e,t,r){this.property=e,this.value=t,this.parameters=r};ii.prototype.isConstant=function(){return this.value.kind==="constant"},ii.prototype.constantOr=function(e){return this.value.kind==="constant"?this.value.value:e},ii.prototype.evaluate=function(e,t,r,a){return this.property.evaluate(this.value,this.parameters,e,t,r,a)};var Jn=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};Jn.prototype.get=function(e){return this._values[e]};var _e=function(e){this.specification=e};_e.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},_e.prototype.interpolate=function(e,t,r){var a=Ra[this.specification.type];return a?a(e,t,r):e};var Ue=function(e,t){this.specification=e,this.overrides=t};Ue.prototype.possiblyEvaluate=function(e,t,r,a){return new ii(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(t,null,{},r,a)}:e.expression,t)},Ue.prototype.interpolate=function(e,t,r){if(e.value.kind!=="constant"||t.value.kind!=="constant")return e;if(e.value.value===void 0||t.value.value===void 0)return new ii(this,{kind:"constant",value:void 0},e.parameters);var a=Ra[this.specification.type];return a?new ii(this,{kind:"constant",value:a(e.value.value,t.value.value,r)},e.parameters):e},Ue.prototype.evaluate=function(e,t,r,a,l,c){return e.kind==="constant"?e.value:e.evaluate(t,r,a,l,c)};var Hr=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.possiblyEvaluate=function(r,a,l,c){if(r.value===void 0)return new ii(this,{kind:"constant",value:void 0},a);if(r.expression.kind==="constant"){var h=r.expression.evaluate(a,null,{},l,c),m=r.property.specification.type==="resolvedImage"&&typeof h!="string"?h.name:h,g=this._calculate(m,m,m,a);return new ii(this,{kind:"constant",value:g},a)}if(r.expression.kind==="camera"){var _=this._calculate(r.expression.evaluate({zoom:a.zoom-1}),r.expression.evaluate({zoom:a.zoom}),r.expression.evaluate({zoom:a.zoom+1}),a);return new ii(this,{kind:"constant",value:_},a)}return new ii(this,r.expression,a)},t.prototype.evaluate=function(r,a,l,c,h,m){if(r.kind==="source"){var g=r.evaluate(a,l,c,h,m);return this._calculate(g,g,g,a)}return r.kind==="composite"?this._calculate(r.evaluate({zoom:Math.floor(a.zoom)-1},l,c),r.evaluate({zoom:Math.floor(a.zoom)},l,c),r.evaluate({zoom:Math.floor(a.zoom)+1},l,c),a):r.value},t.prototype._calculate=function(r,a,l,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:r,to:a}:{from:l,to:a}},t.prototype.interpolate=function(r){return r},t})(Ue),_i=function(e){this.specification=e};_i.prototype.possiblyEvaluate=function(e,t,r,a){if(e.value!==void 0){if(e.expression.kind==="constant"){var l=e.expression.evaluate(t,null,{},r,a);return this._calculate(l,l,l,t)}return this._calculate(e.expression.evaluate(new ft(Math.floor(t.zoom-1),t)),e.expression.evaluate(new ft(Math.floor(t.zoom),t)),e.expression.evaluate(new ft(Math.floor(t.zoom+1),t)),t)}},_i.prototype._calculate=function(e,t,r,a){return a.zoom>a.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},_i.prototype.interpolate=function(e){return e};var Wi=function(e){this.specification=e};Wi.prototype.possiblyEvaluate=function(e,t,r,a){return!!e.expression.evaluate(t,null,{},r,a)},Wi.prototype.interpolate=function(){return!1};var Jr=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var a=this.defaultPropertyValues[t]=new gi(r,void 0),l=this.defaultTransitionablePropertyValues[t]=new Kr(r);this.defaultTransitioningPropertyValues[t]=l.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=a.possiblyEvaluate({})}};be("DataDrivenProperty",Ue),be("DataConstantProperty",_e),be("CrossFadedDataDrivenProperty",Hr),be("CrossFadedProperty",_i),be("ColorRampProperty",Wi);var vi=(function(e){function t(r,a){if(e.call(this),this.id=r.id,this.type=r.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},r.type!=="custom"&&(this.metadata=(r=r).metadata,this.minzoom=r.minzoom,this.maxzoom=r.maxzoom,r.type!=="background"&&(this.source=r.source,this.sourceLayer=r["source-layer"],this.filter=r.filter),a.layout&&(this._unevaluatedLayout=new _n(a.layout)),a.paint)){for(var l in this._transitionablePaint=new ri(a.paint),r.paint)this.setPaintProperty(l,r.paint[l],{validate:!1});for(var c in r.layout)this.setLayoutProperty(c,r.layout[c],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Jn(a.paint)}}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(r){return r==="visibility"?this.visibility:this._unevaluatedLayout.getValue(r)},t.prototype.setLayoutProperty=function(r,a,l){l===void 0&&(l={}
1),a!=null&&this._validate(Xa,"layers."+this.id+".layout."+r,r,a,l)||(r!=="visibility"?this._unevaluatedLayout.setValue(r,a):this.visibility=a)},t.prototype.getPaintProperty=function(r){return zn(r,"-transition")?this._transitionablePaint.getTransition(r.slice(0,-11)):this._transitionablePaint.getValue(r)},t.prototype.setPaintProperty=function(r,a,l){if(l===void 0&&(l={}),a!=null&&this._validate(ta,"layers."+this.id+".paint."+r,r,a,l))return!1;if(zn(r,"-transition"))return this._transitionablePaint.setTransition(r.slice(0,-11),a||void 0),!1;var c=this._transitionablePaint._values[r],h=c.property.specification["property-type"]==="cross-faded-data-driven",m=c.value.isDataDriven(),g=c.value;this._transitionablePaint.setValue(r,a),this._handleSpecialPaintPropertyUpdate(r);var _=this._transitionablePaint._values[r].value;return _.isDataDriven()||m||h||this._handleOverridablePaintPropertyUpdate(r,g,_)},t.prototype._handleSpecialPaintPropertyUpdate=function(r){},t.prototype._handleOverridablePaintPropertyUpdate=function(r,a,l){return!1},t.prototype.isHidden=function(r){return!!(this.minzoom&&r<this.minzoom)||!!(this.maxzoom&&r>=this.maxzoom)||this.visibility==="none"},t.prototype.updateTransitions=function(r){this._transitioningPaint=this._transitionablePaint.transitioned(r,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(r,a){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,a)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,a)}
1,t.prototype.serialize=function(){var r={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&&(r.layout=r.layout||{},r.layout.visibility=this.visibility),ji(r,(function(a,l){return!(a===void 0||l==="layout"&&!Object.keys(a).length||l==="paint"&&!Object.keys(a).length)}))},t.prototype._validate=function(r,a,l,c,h){return h===void 0&&(h={}),(!h||h.validate!==!1)&&ra(this,r.call(ea,{key:a,layerType:this.type,objectKey:l,value:c,styleSpec:M,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var r in this.paint._values){var a=this.paint.get(r);if(a instanceof ii&&So(a.property.specification)&&(a.value.kind==="source"||a.value.kind==="composite")&&a.value.isStateDependent)return!0}return!1},t})(q),$u={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ki=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Pt=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function dr(e,t){t===void 0&&(t=1);var r=0,a=0;return{members:e.map((function(l){var c=$u[l.type].BYTES_PER_ELEMENT,h=r=$s(r,Math.max(t,c)),m=l.components||1;return a=Math.max(a,c),r+=c*m,{name:l.name,type:l.type,components:m,offset:h}})),size:$s(r,Math.max(a,t)),alignment:t}}function $s(e,t){return Math.ceil(e/t)*t}Pt.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Pt.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Pt.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pt.prototype.clear=function(){this.length=0},Pt.prototype.resize=function(e){this.reserve(e),this.length=e},Pt.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},Pt.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var oa=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a){var l=this.length;return this.resize(l+1),this.emplace(l,r,a)},t.prototype.emplace=function(r,a,l){var c=2*r;return this.int16[c+0]=a,this.int16[c+1]=l,r},t})(Pt);oa.prototype.bytesPerElement=4,be("StructArrayLayout2i4",oa);var Hi=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,a,l,c)},t.prototype.emplace=function(r,a,l,c,h){var m=4*r;return this.int16[m+0]=a,this.int16[m+1]=l,this.int16[m+2]=c,this.int16[m+3]=h,r},t})(Pt);Hi.prototype.bytesPerElement=8,be("StructArrayLayout4i8",Hi);var Yr=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m){var g=this.length;return this.resize(g+1),this.emplace(g,r,a,l,c,h,m)},t.prototype.emplace=function(r,a,l,c,h,m,g){var _=6*r;return this.int16[_+0]=a,this.int16[_+1]=l,this.int16[_+2]=c,this.int16[_+3]=h,this.int16[_+4]=m,this.int16[_+5]=g,r},t})(Pt);Yr.prototype.bytesPerElement=12,be("StructArrayLayout2i4i12",Yr);var Ya=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m){var g=this.length;return this.resize(g+1),this.emplace(g,r,a,l,c,h,m)},t.prototype.emplace=function(r,a,l,c,h,m,g){var _=4*r,x=8*r;return this.int16[_+0]=a,this.int16[_+1]=l,this.uint8[x+4]=c,this.uint8[x+5]=h,this.uint8[x+6]=m,this.uint8[x+7]=g,r},t})(Pt);Ya.prototype.bytesPerElement=8,be("StructArrayLayout2i4ub8",Ya);var Yn=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a){var l=this.length;return this.resize(l+1),this.emplace(l,r,a)},t.prototype.emplace=function(r,a,l){var c=2*r;return this.float32[c+0]=a,this.float32[c+1]=l,r},t})(Pt);Yn.prototype.bytesPerElement=8,be("StructArrayLayout2f8",Yn);var Ji=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,g,_,x,b){var T=this.length;return this.resize(T+1),this.emplace(T,r,a,l,c,h,m,g,_,x,b)},t.prototype.emplace=function(r,a,l,c,h,m,g,_,x,b,T){var A=10*r;return this.uint16[A+0]=a,this.uint16[A+1]=l,this.uint16[A+2]=c,this.uint16[A+3]=h,this.uint16[A+4]=m,this.uint16[A+5]=g,this.uint16[A+6]=_,this.uint16[A+7]=x,this.uint16[A+8]=b,this.uint16[A+9]=T,r},t})(Pt);Ji.prototype.bytesPerElement=20,be("StructArrayLayout10ui20",Ji);var Po=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,g,_,x,b,T,A){var D=this.length;return this.resize(D+1),this.emplace(D,r,a,l,c,h,m,g,_,x,b,T,A)},t.prototype.emplace=function(r,a,l,c,h,m,g,_,x,b,T,A,D){var L=12*r;return this.int16[L+0]=a,this.int16[L+1]=l,this.int16[L+2]=c,this.int16[L+3]=h,this.uint16[L+4]=m,this.uint16[L+5]=g,this.uint16[L+6]=_,this.uint16[L+7]=x,this.int16[L+8]=b,this.int16[L+9]=T,this.int16[L+10]=A,this.int16[L+11]=D,r},t})(Pt);Po.prototype.bytesPerElement=24,be("StructArrayLayout4i4ui4i24",Po);var aa=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=3*r;return this.float32[h+0]=a,this.float32[h+1]=l,this.float32[h+2]=c,r},t})(Pt);aa.prototype.bytesPerElement=12,be("StructArrayLayout3f12",aa);var Qs=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r){var a=this.length;return this.resize(a+1),this.emplace(a,r)},t.prototype.emplace=function(r,a){return this.uint32[1*r+0]=a,r},t})(Pt);Qs.prototype.bytesPerElement=4,be("StructArrayLayout1ul4",Qs);var sa=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,g,_,x){var b=this.length;return this.resize(b+1),this.emplace(b,r,a,l,c,h,m,g,_,x)},t.prototype.emplace=function(r,a,l,c,h,m,g,_,x,b){var T=10*r,A=5*r;return this.int16[T+0]=a,this.int16[T+1]=l,this.int16[T+2]=c,this.int16[T+3]=h,this.int16[T+4]=m,this.int16[T+5]=g,this.uint32[A+3]=_,this.uint16[T+8]=x,this.uint16[T+9]=b,r},t})(Pt);sa.prototype.bytesPerElement=20,be("StructArrayLayout6i1ul2ui20",sa);var vn=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m){var g=this.length;return this.resize(g+1),this.emplace(g,r,a,l,c,h,m)},t.prototype.emplace=function(r,a,l,c,h,m,g){var _=6*r;return this.int16[_+0]=a,this.int16[_+1]=l,this.int16[_+2]=c,this.int16[_+3]=h,this.int16[_+4]=m,this.int16[_+5]=g,r},t})(Pt);vn.prototype.bytesPerElement=12,be("StructArrayLayout2i2i2i12",vn);var el=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h){var m=this.length;return this.resize(m+1),this.emplace(m,r,a,l,c,h)},t.prototype.emplace=function(r,a,l,c,h,m){var g=4*r,_=8*r;return this.float32[g+0]=a,this.float32[g+1]=l,this.float32[g+2]=c,this.int16[_+6]=h,this.int16[_+7]=m,r},t})(Pt);el.prototype.bytesPerElement=16,be("StructArrayLayout2f1f2i16",el);var tl=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,a,l,c)},t.prototype.emplace=function(r,a,l,c,h){var m=12*r,g=3*r;return this.uint8[m+0]=a,this.uint8[m+1]=l,this.float32[g+1]=c,this.float32[g+2]=h,r},t})(Pt);tl.prototype.bytesPerElement=12,be("StructArrayLayout2ub2f12",tl);var ni=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=3*r;return this.uint16[h+0]=a,this.uint16[h+1]=l,this.uint16[h+2]=c,r},t})(Pt);ni.prototype.bytesPerElement=6,be("StructArrayLayout3ui6",ni);var $a=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){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)},t.prototype.emplaceBack=function(r,a,l,c,h,m,g,_,x,b,T,A,D,L,Z,V,K){var J=this.length;return this.resize(J+1),this.emplace(J,r,a,l,c,h,m,g,_,x,b,T,A,D,L,Z,V,K)},t.prototype.emplace=function(r,a,l,c,h,m,g,_,x,b,T,A,D,L,Z,V,K,J){var $=24*r,Q=12*r,ie=48*r;return this.int16[$+0]=a,this.int16[$+1]=l,this.uint16[$+2]=c,this.uint16[$+3]=h,this.uint32[Q+2]=m,this.uint32[Q+3]=g,this.uint32[Q+4]=_,this.uint16[$+10]=x,this.uint16[$+11]=b,this.uint16[$+12]=T,this.float32[Q+7]=A,this.float32[Q+8]=D,this.uint8[ie+36]=L,this.uint8[ie+37]=Z,this.uint8[ie+38]=V,this.uint32[Q+10]=K,this.int16[$+22]=J,r},t})(Pt);
1$a.prototype.bytesPerElement=48,be("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$a);var $n=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){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)},t.prototype.emplaceBack=function(r,a,l,c,h,m,g,_,x,b,T,A,D,L,Z,V,K,J,$,Q,ie,pe,de,Pe,ye,ke,ge,Je){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,r,a,l,c,h,m,g,_,x,b,T,A,D,L,Z,V,K,J,$,Q,ie,pe,de,Pe,ye,ke,ge,Je)},t.prototype.emplace=function(r,a,l,c,h,m,g,_,x,b,T,A,D,L,Z,V,K,J,$,Q,ie,pe,de,Pe,ye,ke,ge,Je,Oe){var Ae=34*r,Qe=17*r;return this.int16[Ae+0]=a,this.int16[Ae+1]=l,this.int16[Ae+2]=c,this.int16[Ae+3]=h,this.int16[Ae+4]=m,this.int16[Ae+5]=g,this.int16[Ae+6]=_,this.int16[Ae+7]=x,this.uint16[Ae+8]=b,this.uint16[Ae+9]=T,this.uint16[Ae+10]=A,this.uint16[Ae+11]=D,this.uint16[Ae+12]=L,this.uint16[Ae+13]=Z,this.uint16[Ae+14]=V,this.uint16[Ae+15]=K,this.uint16[Ae+16]=J,this.uint16[Ae+17]=$,this.uint16[Ae+18]=Q,this.uint16[Ae+19]=ie,this.uint16[Ae+20]=pe,this.uint16[Ae+21]=de,this.uint16[Ae+22]=Pe,this.uint32[Qe+12]=ye,this.float32[Qe+13]=ke,this.float32[Qe+14]=ge,this.float32[Qe+15]=Je,this.float32[Qe+16]=Oe,r},t})(Pt);$n.prototype.bytesPerElement=68,be("StructArrayLayout8i15ui1ul4f68",$n);var oi=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r){var a=this.length;return this.resize(a+1),this.emplace(a,r)},t.prototype.emplace=function(r,a){return this.float32[1*r+0]=a,r},t})(Pt);oi.prototype.bytesPerElement=4,be("StructArrayLayout1f4",oi);var rl=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=3*r;return this.int16[h+0]=a,this.int16[h+1]=l,this.int16[h+2]=c,r},t})(Pt);rl.prototype.bytesPerElement=6,be("StructArrayLayout3i6",rl);var il=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=4*r;return this.uint32[2*r+0]=a,this.uint16[h+2]=l,this.uint16[h+3]=c,r},t})(Pt);il.prototype.bytesPerElement=8,be("StructArrayLayout1ul2ui8",il);var la=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a){var l=this.length;return this.resize(l+1),this.emplace(l,r,a)},t.prototype.emplace=function(r,a,l){var c=2*r;return this.uint16[c+0]=a,this.uint16[c+1]=l,r},t})(Pt);la.prototype.bytesPerElement=4,be("StructArrayLayout2ui4",la);var Qa=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r){var a=this.length;return this.resize(a+1),this.emplace(a,r)},t.prototype.emplace=function(r,a){return this.uint16[1*r+0]=a,r},t})(Pt);Qa.prototype.bytesPerElement=2,be("StructArrayLayout1ui2",Qa);var i=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,a,l,c)},t.prototype.emplace=function(r,a,l,c,h){var m=4*r;return this.float32[m+0]=a,this.float32[m+1]=l,this.float32[m+2]=c,this.float32[m+3]=h,r},t})(Pt);i.prototype.bytesPerElement=16,be("StructArrayLayout4f16",i);var o=(function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]}
1,r.anchorPoint.get=function(){return new Fe(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t})(Ki);o.prototype.size=20;var n=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new o(this,r)},t})(sa);be("CollisionBoxArray",n);var s=(function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(a){this._structArray.uint8[this._pos1+37]=a},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(a){this._structArray.uint8[this._pos1+38]=a},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(a){this._structArray.uint32[this._pos4+10]=a},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t})(Ki);s.prototype.size=48;var p=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new s(this,r)},t})($a);be("PlacedSymbolArray",p);var f=(function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]}
1,r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(a){this._structArray.uint32[this._pos4+12]=a},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,r),t})(Ki);f.prototype.size=68;var d=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new f(this,r)},t})($n);be("SymbolInstanceArray",d);var y=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getoffsetX=function(r){return this.float32[1*r+0]},t})(oi);be("GlyphOffsetArray",y);var v=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getx=function(r){return this.int16[3*r+0]},t.prototype.gety=function(r){return this.int16[3*r+1]},t.prototype.gettileUnitDistanceFromAnchor=function(r){return this.int16[3*r+2]},t})(rl);be("SymbolLineVertexArray",v);var S=(function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,r),t})(Ki);S.prototype.size=8;var z=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new S(this,r)},t})(il);be("FeatureIndexArray",z);var C=dr([{name:"a_pos",components:2,type:"Int16"}],4).members,P=function(e){e===void 0&&(e=[]),this.segments=e};function O(e,t){return 256*(e=qr(Math.floor(e),0,255))+qr(Math.floor(t),0,255)}P.prototype.prepareSegment=function(e,t,r,a){var l=this.segments[this.segments.length-1];return e>P.MAX_VERTEX_ARRAY_LENGTH&&qt("Max vertices per segment is "+P.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!l||l.vertexLength+e>P.MAX_VERTEX_ARRAY_LENGTH||l.sortKey!==a)&&(l={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},a!==void 0&&(l.sortKey=a),this.segments.push(l)),l},P.prototype.get=function(){return this.segments},P.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var r=t[e];for(var a in r.vaos)r.vaos[a].destroy()}},P.simpleSegment=function(e,t,r,a){return new P([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:a,vaos:{},sortKey:0}])},P.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,be("SegmentVector",P);var B=dr([{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"}]),j=St((function(e){e.exports=function(t,r){var a,l,c,h,m,g,_,x;for(l=t.length-(a=3&t.length),c=r,m=3432918353,g=461845907,x=0;x<l;)_=255&t.charCodeAt(x)|(255&t.charCodeAt(++x))<<8|(255&t.charCodeAt(++x))<<16|(255&t.charCodeAt(++x))<<24,++x,c=27492+(65535&(h=
vendor: 16,726 bytes, line 1
15*(65535&(c=(c^=_=(65535&(_=(_=(65535&_)*m+(((_>>>16)*m&65535)<<16)&4294967295)<<15|_>>>17))*g+(((_>>>16)*g&65535)<<16)&4294967295)<<13|c>>>19))+((5*(c>>>16)&65535)<<16)&4294967295))+((58964+(h>>>16)&65535)<<16);switch(_=0,a){case 3:_^=(255&t.charCodeAt(x+2))<<16;case 2:_^=(255&t.charCodeAt(x+1))<<8;case 1:c^=_=(65535&(_=(_=(65535&(_^=255&t.charCodeAt(x)))*m+(((_>>>16)*m&65535)<<16)&4294967295)<<15|_>>>17))*g+(((_>>>16)*g&65535)<<16)&4294967295}return c^=t.length,c=2246822507*(65535&(c^=c>>>16))+((2246822507*(c>>>16)&65535)<<16)&4294967295,c=3266489909*(65535&(c^=c>>>13))+((3266489909*(c>>>16)&65535)<<16)&4294967295,(c^=c>>>16)>>>0}})),R=St((function(e){e.exports=function(t,r){for(var a,l=t.length,c=r^l,h=0;l>=4;)a=1540483477*(65535&(a=255&t.charCodeAt(h)|(255&t.charCodeAt(++h))<<8|(255&t.charCodeAt(++h))<<16|(255&t.charCodeAt(++h))<<24))+((1540483477*(a>>>16)&65535)<<16),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),l-=4,++h;switch(l){case 3:c^=(255&t.charCodeAt(h+2))<<16;case 2:c^=(255&t.charCodeAt(h+1))<<8;case 1:c=1540483477*(65535&(c^=255&t.charCodeAt(h)))+((1540483477*(c>>>16)&65535)<<16)}return c=1540483477*(65535&(c^=c>>>13))+((1540483477*(c>>>16)&65535)<<16),(c^=c>>>15)>>>0}})),N=j,X=R;N.murmur3=j,N.murmur2=X;var H=function(){this.ids=[],this.positions=[],this.indexed=!1};H.prototype.add=function(e,t,r,a){this.ids.push(ee(e)),this.positions.push(t,r,a)},H.prototype.getPositions=function(e){for(var t=ee(e),r=0,a=this.ids.length-1;r<a;){var l=r+a>>1;this.ids[l]>=t?a=l:r=l+1}for(var c=[];this.ids[r]===t;)c.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return c},H.serialize=function(e,t){var r=new Float64Array(e.ids),a=new Uint32Array(e.positions);return(function l(c,h,m,g){for(;m<g;){for(var _=c[m+g>>1],x=m-1,b=g+1;;){do x++;while(c[x]<_);do b--;while(c[b]>_);if(x>=b)break;re(c,x,b),re(h,3*x,3*b),re(h,3*x+1,3*b+1),re(h,3*x+2,3*b+2)}b-m<g-b?(l(c,h,m,b),m=b+1):(l(c,h,b+1,g),g=b)}})(r,a,0,r.length-1),t&&t.push(r.buffer,a.buffer),{ids:r,positions:a}},H.deserialize=function(e){var t=new H;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var te=Math.pow(2,53)-1;function ee(e){var t=+e;return!isNaN(t)&&t<=te?t:N(String(e))}function re(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}be("FeaturePositionMap",H);var ne=function(e,t){this.gl=e.gl,this.location=t},he=(function(e){function t(r,a){e.call(this,r,a),this.current=0}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){this.current!==r&&(this.current=r,this.gl.uniform1i(this.location,r))},t})(ne),ce=(function(e){function t(r,a){e.call(this,r,a),this.current=0}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){this.current!==r&&(this.current=r,this.gl.uniform1f(this.location,r))},t})(ne),ve=(function(e){function t(r,a){e.call(this,r,a),this.current=[0,0]}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r[0]===this.current[0]&&r[1]===this.current[1]||(this.current=r,this.gl.uniform2f(this.location,r[0],r[1]))},t})(ne),Me=(function(e){function t(r,a){e.call(this,r,a),this.current=[0,0,0]}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]||(this.current=r,this.gl.uniform3f(this.location,r[0],r[1],r[2]))},t})(ne),Re=(function(e){function t(r,a){e.call(this,r,a),this.current=[0,0,0,0]}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]&&r[3]===this.current[3]||(this.current=r,this.gl.uniform4f(this.location,r[0],r[1],r[2],r[3]))},t})(ne),De=(function(e){function t(r,a){e.call(this,r,a),this.current=rt.transparent}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r.r===this.current.r&&r.g===this.current.g&&r.b===this.current.b&&r.a===this.current.a||(this.current=r,this.gl.uniform4f(this.location,r.r,r.g,r.b,r.a))},t})(ne),st=new Float32Array(16),Ee=(function(e){function t(r,a){e.call(this,r,a),this.current=st}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){if(r[12]!==this.current[12]||r[0]!==this.current[0])return this.current=r,void this.gl.uniformMatrix4fv(this.location,!1,r);for(var a=1;a<16;a++)if(r[a]!==this.current[a]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}},t})(ne);function Ze(e){return[O(255*e.r,255*e.g),O(255*e.b,255*e.a)]}var Ye=function(e,t,r){this.value=e,this.uniformNames=t.map((function(a){return"u_"+a})),this.type=r};Ye.prototype.setUniform=function(e,t,r){e.set(r.constantOr(this.value))},Ye.prototype.getBinding=function(e,t,r){return this.type==="color"?new De(e,t):new ce(e,t)};var Ge=function(e,t){this.uniformNames=t.map((function(r){return"u_"+r})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Ge.prototype.setConstantPatternPositions=function(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr},Ge.prototype.setUniform=function(e,t,r,a){var l=a==="u_pattern_to"?this.patternTo:a==="u_pattern_from"?this.patternFrom:a==="u_pixel_ratio_to"?this.pixelRatioTo:a==="u_pixel_ratio_from"?this.pixelRatioFrom:null;l&&e.set(l)},Ge.prototype.getBinding=function(e,t,r){return r.substr(0,9)==="u_pattern"?new Re(e,t):new ce(e,t)};var je=function(e,t,r,a){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map((function(l){return{name:"a_"+l,type:"Float32",components:r==="color"?2:1,offset:0}})),this.paintVertexArray=new a};je.prototype.populatePaintArray=function(e,t,r,a,l){var c=this.paintVertexArray.length,h=this.expression.evaluate(new ft(0),t,{},a,[],l);this.paintVertexArray.resize(e),this._setPaintValue(c,e,h)},je.prototype.updatePaintArray=function(e,t,r,a){var l=this.expression.evaluate({zoom:0},r,a);this._setPaintValue(e,t,l)},je.prototype._setPaintValue=function(e,t,r){if(this.type==="color")for(var a=Ze(r),l=e;l<t;l++)this.paintVertexArray.emplace(l,a[0],a[1]);else{for(var c=e;c<t;c++)this.paintVertexArray.emplace(c,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},je.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},je.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Ne=function(e,t,r,a,l,c){this.expression=e,this.uniformNames=t.map((function(h){return"u_"+h+"_t"})),this.type=r,this.useIntegerZoom=a,this.zoom=l,this.maxValue=0,this.paintVertexAttributes=t.map((function(h){return{name:"a_"+h,type:"Float32",components:r==="color"?4:2,offset:0}})),this.paintVertexArray=new c};Ne.prototype.populatePaintArray=function(e,t,r,a,l){var c=this.expression.evaluate(new ft(this.zoom),t,{},a,[],l),h=this.expression.evaluate(new ft(this.zoom+1),t,{},a,[],l),m=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(m,e,c,h)},Ne.prototype.updatePaintArray=function(e,t,r,a){var l=this.expression.evaluate({zoom:this.zoom},r,a),c=this.expression.evaluate({zoom:this.zoom+1},r,a);this._setPaintValue(e,t,l,c)},Ne.prototype._setPaintValue=function(e,t,r,a){if(this.type==="color")for(var l=Ze(r),c=Ze(a),h=e;h<t;h++)this.paintVertexArray.emplace(h,l[0],l[1],c[0],c[1]);else{for(var m=e;m<t;m++)this.paintVertexArray.emplace(m,r,a);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(a))}},Ne.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ne.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ne.prototype.setUniform=function(e,t){var r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,a=qr(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(a)},Ne.prototype.getBinding=function(e,t,r){return new ce(e,t)};var Ve=function(e,t,r,a,l,c){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=a,this.layerId=c,this.zoomInPaintVertexArray=new l,this.zoomOutPaintVertexArray=new l};Ve.prototype.populatePaintArray=function(e,t,r){var a=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(a,e,t.patterns&&t.patterns[this.layerId],r)},Ve.prototype.updatePaintArray=function(e,t,r,a,l){this._setPaintValues(e,t,r.patterns&&r.patterns[this.layerId],l)},Ve.prototype._setPaintValues=function(e,t,r,a){if(a&&r){var l=a[r.min],c=a[r.mid],h=a[r.max];if(l&&c&&h)for(var m=e;m<t;m++)this.zoomInPaintVertexArray.emplace(m,c.tl[0],c.tl[1],c.br[0],c.br[1],l.tl[0],l.tl[1],l.br[0],l.br[1],c.pixelRatio,l.pixelRatio),this.zoomOutPaintVertexArray.emplace(m,c.tl[0],c.tl[1],c.br[0],c.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1],c.pixelRatio,h.pixelRatio)}},Ve.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,B.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,B.members,this.expression.isStateDependent))},Ve.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Be=function(e,t,r){this.binders={},this._buffers=[];var a=[];for(var l in e.paint._values)if(r(l)){var c=e.paint.get(l);if(c instanceof ii&&So(c.property.specification)){var h=Wt(l,e.type),m=c.value,g=c.property.specification.type,_=c.property.useIntegerZoom,x=c.property.specification["property-type"],b=x==="cross-faded"||x==="cross-faded-data-driven";if(m.kind==="constant")this.binders[l]=b?new Ge(m.value,h):new Ye(m.value,h,g),a.push("/u_"+l);else if(m.kind==="source"||b){var T=zr(l,g,"source");this.binders[l]=b?new Ve(m,g,_,t,T,e.id):new je(m,h,g,T),a.push("/a_"+l)}else{var A=zr(l,g,"composite");this.binders[l]=new Ne(m,h,g,_,t,A),a.push("/z_"+l)}}}this.cacheKey=a.sort().join("")};Be.prototype.getMaxValue=function(e){var t=this.binders[e];return t instanceof je||t instanceof Ne?t.maxValue:0},Be.prototype.populatePaintArrays=function(e,t,r,a,l){for(var c in this.binders){var h=this.binders[c];(h instanceof je||h instanceof Ne||h instanceof Ve)&&h.populatePaintArray(e,t,r,a,l)}},Be.prototype.setConstantPatternPositions=function(e,t){for(var r in this.binders){var a=this.binders[r];a instanceof Ge&&a.setConstantPatternPositions(e,t)}},Be.prototype.updatePaintArrays=function(e,t,r,a,l){var c=!1;for(var h in e)for(var m=0,g=t.getPositions(h);m<g.length;m+=1){var _=g[m],x=r.feature(_.index);for(var b in this.binders){var T=this.binders[b];if((T instanceof je||T instanceof Ne||T instanceof Ve)&&T.expression.isStateDependent===!0){var A=a.paint.get(b);T.expression=A.value,T.updatePaintArray(_.start,_.end,x,e[h],l),c=!0}}}return c},Be.prototype.defines=function(){var e=[];for(var t in this.binders){var r=this.binders[t];(r instanceof Ye||r instanceof Ge)&&e.push.apply(e,r.uniformNames.map((function(a){return"#define HAS_UNIFORM_"+a})))}return e},Be.prototype.getBinderAttributes=function(){var e=[];for(var t in this.binders){var r=this.binders[t];if(r instanceof je||r instanceof Ne)for(var a=0;a<r.paintVertexAttributes.length;a++)e.push(r.paintVertexAttributes[a].name);else if(r instanceof Ve)for(var l=0;l<B.members.length;l++)e.push(B.members[l].name)}return e},Be.prototype.getBinderUniforms=function(){var e=[];for(var t in this.binders){var r=this.binders[t];if(r instanceof Ye||r instanceof Ge||r instanceof Ne)for(var a=0,l=r.uniformNames;a<l.length;a+=1)e.push(l[a])}return e},Be.prototype.getPaintVertexBuffers=function(){return this._buffers},Be.prototype.getUniforms=function(e,t){var r=[];for(var a in this.binders){var l=this.binders[a];if(l instanceof Ye||l instanceof Ge||l instanceof Ne)for(var c=0,h=l.uniformNames;c<h.length;c+=1){var m=h[c];if(t[m]){var g=l.getBinding(e,t[m],m);r.push({name:m,property:a,binding:g})}}}return r},Be.prototype.setUniforms=function(e,t,r,a){for(var l=0,c=t;l<c.length;l+=1){var h=c[l],m=h.name,g=h.property;this.binders[g].setUniform(h.binding,a,r.get(g),m)}},Be.prototype.updatePaintBuffers=function(e){for(var t in this._buffers=[],this.binders){var r=this.binders[t];if(e&&r instanceof Ve){var a=e.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;a&&this._buffers.push(a)}else(r instanceof je||r instanceof Ne)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},Be.prototype.upload=function(e){for(var t in this.binders){var r=this.binders[t];(r instanceof je||r instanceof Ne||r instanceof Ve)&&r.upload(e)}this.updatePaintBuffers()},Be.prototype.destroy=function(){for(var e in this.binders){var t=this.binders[e];(t instanceof je||t instanceof Ne||t instanceof Ve)&&t.destroy()}};var bt=function(e,t,r){r===void 0&&(r=function(){return!0}),this.programConfigurations={};for(var a=0,l=e;a<l.length;a+=1){var c=l[a];this.programConfigurations[c.id]=new Be(c,t,r)}this.needsUpload=!1,this._featureMap=new H,this._bufferOffset=0};function Wt(e,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"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function zr(e,t,r){var a={color:{source:Yn,composite:i},number:{source:oi,composite:Yn}},l=(function(c){return{"line-pattern":{source:Ji,composite:Ji},"fill-pattern":{source:Ji,composite:Ji},"fill-extrusion-pattern":{source:Ji,composite:Ji}}[c]})(e);return l&&l[r]||a[t][r]}bt.prototype.populatePaintArrays=function(e,t,r,a,l,c){for(var h in this.programConfigurations)this.programConfigurations[h].populatePaintArrays(e,t,a,l,c);t.id!==void 0&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0},bt.prototype.updatePaintArrays=function(e,t,r,a){for(var l=0,c=r;l<c.length;l+=1){var h=c[l];this.needsUpload=this.programConfigurations[h.id].updatePaintArrays(e,this._featureMap,t,h,a)||this.needsUpload}},bt.prototype.get=function(e){return this.programConfigurations[e]},bt.prototype.upload=function(e){if(this.needsUpload){for(var t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}},bt.prototype.destroy=function(){for(var e in this.programConfigurations)this.programConfigurations[e].destroy()},be("ConstantBinder",Ye),be("CrossFadedConstantBinder",Ge),be("SourceExpressionBinder",je),be("CrossFadedCompositeBinder",Ve),be("CompositeExpressionBinder",Ne),be("ProgramConfiguration",Be,{omit:["_buffers"]}),be("ProgramConfigurationSet",bt);var sr=Math.pow(2,14)-1,lr=-sr-1;function Kt(e){for(var t=8192/e.extent,r=e.loadGeometry(),a=0;a<r.length;a++)for(var l=r[a],c=0;c<l.length;c++){var h=l[c],m=Math.round(h.x*t),g=Math.round(h.y*t);h.x=qr(m,lr,sr),h.y=qr(g,lr,sr),(m<h.x||m>h.x+1||g<h.y||g>h.y+1)&&qt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function wr(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Kt(e):[]}}function Fi(e,t,r,a,l){e.emplaceBack(2*t+(a+1)/2,2*r+(l+1)/2)}var Pr=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new oa,this.indexArray=new ni,this.segments=new P,this.programConfigurations=new bt(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
1)).map((function(t){return t.id}))};function Cr(e,t){for(var r=0;r<e.length;r++)if(Ui(t,e[r]))return!0;for(var a=0;a<t.length;a++)if(Ui(e,t[a]))return!0;return!!xn(e,t)}function Oi(e,t,r){return!!Ui(e,t)||!!Qn(t,e,r)}function ai(e,t){if(e.length===1)return ko(t,e[0]);for(var r=0;r<t.length;r++)for(var a=t[r],l=0;l<a.length;l++)if(Ui(e,a[l]))return!0;for(var c=0;c<e.length;c++)if(ko(t,e[c]))return!0;for(var h=0;h<t.length;h++)if(xn(e,t[h]))return!0;return!1}function nl(e,t,r){if(e.length>1){if(xn(e,t))return!0;for(var a=0;a<t.length;a++)if(Qn(t[a],e,r))return!0}for(var l=0;l<e.length;l++)if(Qn(e[l],t,r))return!0;return!1}function xn(e,t){if(e.length===0||t.length===0)return!1;for(var r=0;r<e.length-1;r++)for(var a=e[r],l=e[r+1],c=0;c<t.length-1;c++)if(Co(a,l,t[c],t[c+1]))return!0;return!1}function Co(e,t,r,a){return Zr(e,r,a)!==Zr(t,r,a)&&Zr(e,t,r)!==Zr(e,t,a)}function Qn(e,t,r){var a=r*r;if(t.length===1)return e.distSqr(t[0])<a;for(var l=1;l<t.length;l++)if(ua(e,t[l-1],t[l])<a)return!0;return!1}function ua(e,t,r){var a=t.distSqr(r);if(a===0)return e.distSqr(t);var l=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/a;return e.distSqr(l<0?t:l>1?r:r.sub(t)._mult(l)._add(t))}function ko(e,t){for(var r,a,l,c=!1,h=0;h<e.length;h++)for(var m=0,g=(r=e[h]).length-1;m<r.length;g=m++)(a=r[m]).y>t.y!=(l=r[g]).y>t.y&&t.x<(l.x-a.x)*(t.y-a.y)/(l.y-a.y)+a.x&&(c=!c);return c}function Ui(e,t){for(var r=!1,a=0,l=e.length-1;a<e.length;l=a++){var c=e[a],h=e[l];c.y>t.y!=h.y>t.y&&t.x<(h.x-c.x)*(t.y-c.y)/(h.y-c.y)+c.x&&(r=!r)}return r}function Mo(e,t,r){var a=r[0],l=r[2];if(e.x<a.x&&t.x<a.x||e.x>l.x&&t.x>l.x||e.y<a.y&&t.y<a.y||e.y>l.y&&t.y>l.y)return!1;var c=Zr(e,t,r[0]);return c!==Zr(e,t,r[1])||c!==Zr(e,t,r[2])||c!==Zr(e,t,r[3])}function rr(e,t,r){var a=t.paint.get(e).value;return a.kind==="constant"?a.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Yi(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ki(e,t,r,a,l){if(!t[0]&&!t[1])return e;var c=Fe.convert(t)._mult(l);r==="viewport"&&c._rotate(-a);for(var h=[],m=0;m<e.length;m++)h.push(e[m].sub(c));return h}Pr.prototype.populate=function(e,t,r){var a=this.layers[0],l=[],c=null,h=!1;a.type==="circle"&&(h=!(c=a.layout.get("circle-sort-key")).isConstant());for(var m=0,g=e;m<g.length;m+=1){var _=g[m],x=_.feature,b=_.id,T=_.index,A=_.sourceLayerIndex,D=this.layers[0]._featureFilter.needGeometry,L=wr(x,D);if(this.layers[0]._featureFilter.filter(new ft(this.zoom),L,r)){var Z=h?c.evaluate(L,{},r):void 0,V={id:b,properties:x.properties,type:x.type,sourceLayerIndex:A,index:T,geometry:D?L.geometry:Kt(x),patterns:{},sortKey:Z};l.push(V)}}h&&l.sort((function(Pe,ye){return Pe.sortKey-ye.sortKey}));for(var K=0,J=l;K<J.length;K+=1){var $=J[K],Q=$.geometry,ie=$.index,pe=$.sourceLayerIndex,de=e[ie].feature;this.addFeature($,Q,ie,r),t.featureIndex.insert(de,Q,ie,pe,this.index)}},Pr.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Pr.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Pr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Pr.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,C),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Pr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Pr.prototype.addFeature=function(e,t,r,a){for(var l=0,c=t;l<c.length;l+=1)for(var h=0,m=c[l];h<m.length;h+=1){var g=m[h],_=g.x,x=g.y;if(!(_<0||_>=8192||x<0||x>=8192)){var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),T=b.vertexLength;Fi(this.layoutVertexArray,_,x,-1,-1),Fi(this.layoutVertexArray,_,x,1,-1),Fi(this.layoutVertexArray,_,x,1,1),Fi(this.layoutVertexArray,_,x,-1,1),this.indexArray.emplaceBack(T,T+1,T+2),this.indexArray.emplaceBack(T,T+3,T+2),b.vertexLength+=4,b.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},a)},be("CircleBucket",Pr,{omit:["layers"]});var eo=new Jr({"circle-sort-key":new Ue(M.layout_circle["circle-sort-key"])}),Ht={paint:new Jr({"circle-radius":new Ue(M.paint_circle["circle-radius"]),"circle-color":new Ue(M.paint_circle["circle-color"]),"circle-blur":new 
1Ue(M.paint_circle["circle-blur"]),"circle-opacity":new Ue(M.paint_circle["circle-opacity"]),"circle-translate":new _e(M.paint_circle["circle-translate"]),"circle-translate-anchor":new _e(M.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new _e(M.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new _e(M.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ue(M.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ue(M.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ue(M.paint_circle["circle-stroke-opacity"])}),layout:eo},Zt=typeof Float32Array<"u"?Float32Array:Array;function kr(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ca(e,t,r){var a=t[0],l=t[1],c=t[2],h=t[3],m=t[4],g=t[5],_=t[6],x=t[7],b=t[8],T=t[9],A=t[10],D=t[11],L=t[12],Z=t[13],V=t[14],K=t[15],J=r[0],$=r[1],Q=r[2],ie=r[3];return e[0]=J*a+$*m+Q*b+ie*L,e[1]=J*l+$*g+Q*T+ie*Z,e[2]=J*c+$*_+Q*A+ie*V,e[3]=J*h+$*x+Q*D+ie*K,e[4]=(J=r[4])*a+($=r[5])*m+(Q=r[6])*b+(ie=r[7])*L,e[5]=J*l+$*g+Q*T+ie*Z,e[6]=J*c+$*_+Q*A+ie*V,e[7]=J*h+$*x+Q*D+ie*K,e[8]=(J=r[8])*a+($=r[9])*m+(Q=r[10])*b+(ie=r[11])*L,e[9]=J*l+$*g+Q*T+ie*Z,e[10]=J*c+$*_+Q*A+ie*V,e[11]=J*h+$*x+Q*D+ie*K,e[12]=(J=r[12])*a+($=r[13])*m+(Q=r[14])*b+(ie=r[15])*L,e[13]=J*l+$*g+Q*T+ie*Z,e[14]=J*c+$*_+Q*A+ie*V,e[15]=J*h+$*x+Q*D+ie*K,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var es,Qu=ca;function ts(e,t,r){var a=t[0],l=t[1],c=t[2],h=t[3];return e[0]=r[0]*a+r[4]*l+r[8]*c+r[12]*h,e[1]=r[1]*a+r[5]*l+r[9]*c+r[13]*h,e[2]=r[2]*a+r[6]*l+r[10]*c+r[14]*h,e[3]=r[3]*a+r[7]*l+r[11]*c+r[15]*h,e}es=new Zt(3),Zt!=Float32Array&&(es[0]=0,es[1]=0,es[2]=0),(function(){var e=new Zt(4);Zt!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)})();var rs=((function(){var e=new Zt(2);Zt!=Float32Array&&(e[0]=0,e[1]=0)})(),(function(e){function t(r){e.call(this,r,Ht)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Pr(r)},t.prototype.queryRadius=function(r){var a=r;return rr("circle-radius",this,a)+rr("circle-stroke-width",this,a)+Yi(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,g,_){for(var x=ki(r,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),m.angle,g),b=this.paint.get("circle-radius").evaluate(a,l)+this.paint.get("circle-stroke-width").evaluate(a,l),T=this.paint.get("circle-pitch-alignment")==="map",A=T?x:(function(pe,de){return pe.map((function(Pe){return iu(Pe,de)}))})(x,_),D=T?b*g:b,L=0,Z=c;L<Z.length;L+=1)for(var V=0,K=Z[L];V<K.length;V+=1){var J=K[V],$=T?J:iu(J,_),Q=D,ie=ts([],[J.x,J.y,0,1],_);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Q*=ie[3]/m.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Q*=m.cameraToCenterDistance/ie[3]),Oi(A,$,Q))return!0}return!1},t})(vi));function iu(e,t){var r=ts([],[e.x,e.y,0,1],t);return new Fe(r[0]/r[3],r[1]/r[3])}var pa=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(Pr);function ha(e,t,r,a){var l=t.width,c=t.height;if(a){if(a instanceof Uint8ClampedArray)a=new Uint8Array(a.buffer);else if(a.length!==l*c*r)throw new RangeError("mismatched image size")}else a=new Uint8Array(l*c*r);return e.width=l,e.height=c,e.data=a,e}function Rc(e,t,r){var a=t.width,l=t.height;if(a!==e.width||l!==e.height){var c=ha({},{width:a,height:l},r);ec(e,c,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,a),height:Math.min(e.height,l)},r),e.width=a,e.height=l,e.data=c.data}}function ec(e,t,r,a,l,c){if(l.width===0||l.height===0)return t;if(l.width>e.width||l.height>e.height||r.x>e.width-l.width||r.y>e.height-l.height)throw new RangeError("out of range source coordinates for image copy");if(l.width>t.width||l.height>t.height||a.x>t.width-l.width||a.y>t.height-l.height)throw new RangeError("out of range destination coordinates for image copy");for(var h=e.data,m=t.data,g=0;g<l.height;g++)for(var _=((r.y+g)*e.width+r.x)*c,x=((a.y+g)*t.width+a.x)*c,b=0;b<l.width*c;b++)m[x+b]=h[_+b];return t}be("HeatmapBucket",pa,{omit:["layers"]});var fa=function(e,t){ha(this,e,1,t)};fa.prototype.resize=function(e){Rc(this,e,1)},fa.prototype.clone=function(){return new fa({width:this.width,height:this.height},new Uint8Array(this.data))}
1,fa.copy=function(e,t,r,a,l){ec(e,t,r,a,l,1)};var $r=function(e,t){ha(this,e,4,t)};$r.prototype.resize=function(e){Rc(this,e,4)},$r.prototype.replace=function(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e},$r.prototype.clone=function(){return new $r({width:this.width,height:this.height},new Uint8Array(this.data))},$r.copy=function(e,t,r,a,l){ec(e,t,r,a,l,4)},be("AlphaImage",fa),be("RGBAImage",$r);var ph={paint:new Jr({"heatmap-radius":new Ue(M.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ue(M.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new _e(M.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Wi(M.paint_heatmap["heatmap-color"]),"heatmap-opacity":new _e(M.paint_heatmap["heatmap-opacity"])})};function Bc(e){var t={},r=e.resolution||256,a=e.clips?e.clips.length:1,l=e.image||new $r({width:r,height:a}),c=function(D,L,Z){t[e.evaluationKey]=Z;var V=e.expression.evaluate(t);l.data[D+L+0]=Math.floor(255*V.r/V.a),l.data[D+L+1]=Math.floor(255*V.g/V.a),l.data[D+L+2]=Math.floor(255*V.b/V.a),l.data[D+L+3]=Math.floor(255*V.a)};if(e.clips)for(var h=0,m=0;h<a;++h,m+=4*r)for(var g=0,_=0;g<r;g++,_+=4){var x=g/(r-1),b=e.clips[h];c(m,_,b.start*(1-x)+b.end*x)}else for(var T=0,A=0;T<r;T++,A+=4)c(0,A,T/(r-1));return l}var hh=(function(e){function t(r){e.call(this,r,ph),this._updateColorRamp()}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new pa(r)},t.prototype._handleSpecialPaintPropertyUpdate=function(r){r==="heatmap-color"&&this._updateColorRamp()},t.prototype._updateColorRamp=function(){this.colorRamp=Bc({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},t.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},t})(vi),fh={paint:new Jr({"hillshade-illumination-direction":new _e(M.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new _e(M.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new _e(M.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new _e(M.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new _e(M.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new _e(M.paint_hillshade["hillshade-accent-color"])})},dh=(function(e){function t(r){e.call(this,r,fh)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},t})(vi),mh=dr([{name:"a_pos",components:2,type:"Int16"}],4).members,tc=nu,yh=nu;function nu(e,t,r){r=r||2;var a,l,c,h,m,g,_,x=t&&t.length,b=x?t[0]*r:e.length,T=Fc(e,0,b,r,!0),A=[];if(!T||T.next===T.prev)return A;if(x&&(T=(function(L,Z,V,K){var J,$,Q,ie=[];for(J=0,$=Z.length;J<$;J++)(Q=Fc(L,Z[J]*K,J<$-1?Z[J+1]*K:L.length,K,!1))===Q.next&&(Q.steiner=!0),ie.push(Th(Q));for(ie.sort(bh),J=0;J<ie.length;J++)wh(ie[J],V),V=Do(V,V.next);return V})(e,t,T,r)),e.length>80*r){a=c=e[0],l=h=e[1];for(var D=r;D<b;D+=r)(m=e[D])<a&&(a=m),(g=e[D+1])<l&&(l=g),m>c&&(c=m),g>h&&(h=g);_=(_=Math.max(c-a,h-l))!==0?1/_:0}return ol(T,A,r,a,l,_),A}function Fc(e,t,r,a,l){var c,h;if(l===nc(e,t,r,a)>0)for(c=t;c<r;c+=a)h=Vc(c,e[c],e[c+1],h);else for(c=r-a;c>=t;c-=a)h=Vc(c,e[c],e[c+1],h);return h&&ou(h,h.next)&&(sl(h),h=h.next),h}function Do(e,t){if(!e)return e;t||(t=e);var r,a=e;do if(r=!1,a.steiner||!ou(a,a.next)&&ir(a.prev,a,a.next)!==0)a=a.next;else{if(sl(a),(a=t=a.prev)===a.next)break;r=!0}while(r||a!==t);return t}function ol(e,t,r,a,l,c,h){if(e){!h&&c&&(function(x,b,T,A){var D=x;do D.z===null&&(D.z=rc(D.x,D.y,b,T,A)),D.prevZ=D.prev,D.nextZ=D.next,D=D.next;while(D!==x);D.prevZ.nextZ=null,D.prevZ=null,(function(L){var Z,V,K,J,$,Q,ie,pe,de=1;do{for(V=L,L=null,$=null,Q=0;V;){for(Q++,K=V,ie=0,Z=0;Z<de&&(ie++,K=K.nextZ);Z++);for(pe=de;ie>0||pe>0&&K;)ie!==0&&(pe===0||!K||V.z<=K.z)?(J=V,V=V.nextZ,ie--):(J=K,K=K.nextZ,pe--),$?$.nextZ=J:L=J,J.prevZ=$,$=J;V=K}$.nextZ=null,de*=2}while(Q>1)})(D)})(e,a,l,c);for(var m,g,_=e;e.prev!==e.next;)if(m=e.prev,g=e.next,c?_h(e,a,l,c):gh(e))t.push(m.i/r),t.push(e.i/r),t.push(g.i/r),sl(e),e=g.next,_=g.next;else if((e=g)===_){h?h===1?ol(e=vh(Do(e),t,r),t,r,a,l,c,2):h===2&&xh(e,t,r,a,l,c):ol(Do(e),t,r,a,l,c,1);break}}}function gh(e){var t=e.prev,r=e,a=e.next;if(ir(t,r,a)>=0)return!1;for(var l=e.next.next;l!==e.prev;){if(is(t.x,t.y,r.x,r.y,a.x,a.y,l.x,l.y)&&ir(l.prev,l,l.next)>=0)return!1;l=l.next}return!0}function _h(e,t,r,a){var l=e.prev,c=e,h=e.next;if(ir(l,c,h)>=0)return!1;for(var m=l.x>c.x?l.x>h.x?l.x:h.x:c.x>h.x?c.x:h.x,g=l.y>c.y?l.y>h.y?l.y:h.y:c.y>h.y?c.y:h.y,_=rc(l.x<c.x?l.x<h.x?l.x:h.x:c.x<h.x?c.x:h.x,l.y<c.y?l.y<h.y?l.y:h.y:c.y<h.y?c.y:h.y,t,r,a),x=rc(m,g,t,r,a),b=e.prevZ,T=e.nextZ;b&&b.z>=_&&T&&T.z<=x;){if(b!==e.prev&&b!==e.next&&is(l.x,l.y,c.x,c.y,h.x,h.y,b.x,b.y)&&ir(b.prev,b,b.next)>=0||(b=b.prevZ,T!==e.prev&&T!==e.next&&is(l.x,l.y,c.x,c.y,h.x,h.y,T.x,T.y)&&ir(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;b&&b.z>=_;){if(b!==e.prev&&b!==e.next&&is(l.x,l.y,c.x,c.y,h.x,h.y,b.x,b.y)&&ir(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;T&&T.z<=x;){if(T!==e.prev&&T!==e.next&&is(l.x,l.y,c.x,c.y,h.x,h.y,T.x,T.y)&&ir(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function vh(e,t,r){var a=e;do{var l=a.prev,c=a.next.next;!ou(l,c)&&Oc(l,a,a.next,c)&&al(l,c)&&al(c,l)&&(t.push(l.i/r),t.push(a.i/r),t.push(c.i/r),sl(a),sl(a.next),a=e=c),a=a.next}while(a!==e);return Do(a)}function xh(e,t,r,a,l,c){var h=e;do{for(var m=h.next.next;m!==h.prev;){if(h.i!==m.i&&Eh(h,m)){var g=Uc(h,m);return h=Do(h,h.next),g=Do(g,g.next),ol(h,t,r,a,l,c),void ol(g,t,r,a,l,c)}m=m.next}h=h.next}while(h!==e)}function bh(e,t){return e.x-t.x}function wh(e,t){if(t=(function(a,l){var c,h=l,m=a.x,g=a.y,_=-1/0;do{if(g<=h.y&&g>=h.next.y&&h.next.y!==h.y){var x=h.x+(g-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(x<=m&&x>_){if(_=x,x===m){if(g===h.y)return h;if(g===h.next.y)return h.next}c=h.x<h.next.x?h:h.next}}h=h.next}while(h!==l);if(!c)return null;if(m===_)return c;var b,T=c,A=c.x,D=c.y,L=1/0;h=c;do m>=h.x&&h.x>=A&&m!==h.x&&is(g<D?m:_,g,A,D,g<D?_:m,g,h.x,h.y)&&(b=Math.abs(g-h.y)/(m-h.x),al(h,a)&&(b<L||b===L&&(h.x>c.x||h.x===c.x&&Sh(c,h)))&&(c=h,L=b)),h=h.next;while(h!==T);return c})(e,t)){var r=Uc(t,e);Do(t,t.next),Do(r,r.next)}}function Sh(e,t){return ir(e.prev,e,t.prev)<0&&ir(t.next,e,e.next)<0}function rc(e,t,r,a,l){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*l)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-a)*l)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Th(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function is(e,t,r,a,l,c,h,m){return(l-h)*(t-m)-(e-h)*(c-m)>
1=0&&(e-h)*(a-m)-(r-h)*(t-m)>=0&&(r-h)*(c-m)-(l-h)*(a-m)>=0}function Eh(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!(function(r,a){var l=r;do{if(l.i!==r.i&&l.next.i!==r.i&&l.i!==a.i&&l.next.i!==a.i&&Oc(l,l.next,r,a))return!0;l=l.next}while(l!==r);return!1})(e,t)&&(al(e,t)&&al(t,e)&&(function(r,a){var l=r,c=!1,h=(r.x+a.x)/2,m=(r.y+a.y)/2;do l.y>m!=l.next.y>m&&l.next.y!==l.y&&h<(l.next.x-l.x)*(m-l.y)/(l.next.y-l.y)+l.x&&(c=!c),l=l.next;while(l!==r);return c})(e,t)&&(ir(e.prev,e,t.prev)||ir(e,t.prev,t))||ou(e,t)&&ir(e.prev,e,e.next)>0&&ir(t.prev,t,t.next)>0)}function ir(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function ou(e,t){return e.x===t.x&&e.y===t.y}function Oc(e,t,r,a){var l=su(ir(e,t,r)),c=su(ir(e,t,a)),h=su(ir(r,a,e)),m=su(ir(r,a,t));return l!==c&&h!==m||!(l!==0||!au(e,r,t))||!(c!==0||!au(e,a,t))||!(h!==0||!au(r,e,a))||!(m!==0||!au(r,t,a))}function au(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function su(e){return e>0?1:e<0?-1:0}function al(e,t){return ir(e.prev,e,e.next)<0?ir(e,t,e.next)>=0&&ir(e,e.prev,t)>=0:ir(e,t,e.prev)<0||ir(e,e.next,t)<0}function Uc(e,t){var r=new ic(e.i,e.x,e.y),a=new ic(t.i,t.x,t.y),l=e.next,c=t.prev;return e.next=t,t.prev=e,r.next=l,l.prev=r,a.next=r,r.prev=a,c.next=a,a.prev=c,a}function Vc(e,t,r,a){var l=new ic(e,t,r);return a?(l.next=a.next,l.prev=a,a.next.prev=l,a.next=l):(l.prev=l,l.next=l),l}function sl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function ic(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function nc(e,t,r,a){for(var l=0,c=t,h=r-a;c<r;c+=a)l+=(e[h]-e[c])*(e[c+1]+e[h+1]),h=c;return l}function Ih(e,t,r,a,l){(function c(h,m,g,_,x){for(;_>g;){if(_-g>600){var b=_-g+1,T=m-g+1,A=Math.log(b),D=.5*Math.exp(2*A/3),L=.5*Math.sqrt(A*D*(b-D)/b)*(T-b/2<0?-1:1);c(h,m,Math.max(g,Math.floor(m-T*D/b+L)),Math.min(_,Math.floor(m+(b-T)*D/b+L)),x)}var Z=h[m],V=g,K=_;for(ll(h,g,m),x(h[_],Z)>0&&ll(h,g,_);V<K;){for(ll(h,V,K),V++,K--;x(h[V],Z)<0;)V++;for(;x(h[K],Z)>0;)K--}x(h[g],Z)===0?ll(h,g,K):ll(h,++K,_),K<=m&&(g=K+1),m<=K&&(_=K-1)}})(e,t,r,a||e.length-1,l||Ah)}function ll(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function Ah(e,t){return e<t?-1:e>t?1:0}function oc(e,t){var r=e.length;if(r<=1)return[e];for(var a,l,c=[],h=0;h<r;h++){var m=wa(e[h]);m!==0&&(e[h].area=Math.abs(m),l===void 0&&(l=m<0),l===m<0?(a&&c.push(a),a=[e[h]]):a.push(e[h]))}if(a&&c.push(a),t>1)for(var g=0;g<c.length;g++)c[g].length<=t||(Ih(c[g],t,1,c[g].length-1,zh),c[g]=c[g].slice(0,t));return c}function zh(e,t){return t.area-e.area}function ac(e,t,r){for(var a=r.patternDependencies,l=!1,c=0,h=t;c<h.length;c+=1){var m=h[c].paint.get(e+"-pattern");m.isConstant()||(l=!0);var g=m.constantOr(null);g&&(l=!0,a[g.to]=!0,a[g.from]=!0)}return l}function sc(e,t,r,a,l){for(var c=l.patternDependencies,h=0,m=t;h<m.length;h+=1){var g=m[h],_=g.paint.get(e+"-pattern").value;if(_.kind!=="constant"){var x=_.evaluate({zoom:a-1},r,{},l.availableImages),b=_.evaluate({zoom:a},r,{},l.availableImages),T=_.evaluate({zoom:a+1},r,{},l.availableImages);b=b&&b.name?b.name:b,T=T&&T.name?T.name:T,c[x=x&&x.name?x.name:x]=!0,c[b]=!0,c[T]=!0,r.patterns[g.id]={min:x,mid:b,max:T}}}return r}nu.deviation=function(e,t,r,a){var l=t&&t.length,c=Math.abs(nc(e,0,l?t[0]*r:e.length,r));if(l)for(var h=0,m=t.length;h<m;h++)c-=Math.abs(nc(e,t[h]*r,h<m-1?t[h+1]*r:e.length,r));var g=0;for(h=0;h<a.length;h+=3){var _=a[h]*r,x=a[h+1]*r,b=a[h+2]*r;g+=Math.abs((e[_]-e[b])*(e[x+1]-e[_+1])-(e[_]-e[x])*(e[b+1]-e[_+1]))}return c===0&&g===0?0:Math.abs((g-c)/c)},nu.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},a=0,l=0;l<e.length;l++){for(var c=0;c<e[l].length;c++)for(var h=0;h<t;h++)r.vertices.push(e[l][c][h]);l>0&&r.holes.push(a+=e[l-1].length)}return r},tc.default=yh;var $i=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new oa,this.indexArray=new ni,this.indexArray2=new la,this.programConfigurations=new bt(e.layers,e.zoom),this.segments=new P,this.segments2=new P,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
1)).map((function(t){return t.id}))};$i.prototype.populate=function(e,t,r){this.hasPattern=ac("fill",this.layers,t);for(var a=this.layers[0].layout.get("fill-sort-key"),l=!a.isConstant(),c=[],h=0,m=e;h<m.length;h+=1){var g=m[h],_=g.feature,x=g.id,b=g.index,T=g.sourceLayerIndex,A=this.layers[0]._featureFilter.needGeometry,D=wr(_,A);if(this.layers[0]._featureFilter.filter(new ft(this.zoom),D,r)){var L=l?a.evaluate(D,{},r,t.availableImages):void 0,Z={id:x,properties:_.properties,type:_.type,sourceLayerIndex:T,index:b,geometry:A?D.geometry:Kt(_),patterns:{},sortKey:L};c.push(Z)}}l&&c.sort((function(de,Pe){return de.sortKey-Pe.sortKey}));for(var V=0,K=c;V<K.length;V+=1){var J=K[V],$=J.geometry,Q=J.index,ie=J.sourceLayerIndex;if(this.hasPattern){var pe=sc("fill",this.layers,J,this.zoom,t);this.patternFeatures.push(pe)}else this.addFeature(J,$,Q,r,{});t.featureIndex.insert(e[Q].feature,$,Q,ie,this.index)}},$i.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},$i.prototype.addFeatures=function(e,t,r){for(var a=0,l=this.patternFeatures;a<l.length;a+=1){var c=l[a];this.addFeature(c,c.geometry,c.index,t,r)}},$i.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},$i.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},$i.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,mh),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0},$i.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},$i.prototype.addFeature=function(e,t,r,a,l){for(var c=0,h=oc(t,500);c<h.length;c+=1){for(var m=h[c],g=0,_=0,x=m;_<x.length;_+=1)g+=x[_].length;for(var b=this.segments.prepareSegment(g,this.layoutVertexArray,this.indexArray),T=b.vertexLength,A=[],D=[],L=0,Z=m;L<Z.length;L+=1){var V=Z[L];if(V.length!==0){V!==m[0]&&D.push(A.length/2);var K=this.segments2.prepareSegment(V.length,this.layoutVertexArray,this.indexArray2),J=K.vertexLength;this.layoutVertexArray.emplaceBack(V[0].x,V[0].y),this.indexArray2.emplaceBack(J+V.length-1,J),A.push(V[0].x),A.push(V[0].y);for(var $=1;$<V.length;$++)this.layoutVertexArray.emplaceBack(V[$].x,V[$].y),this.indexArray2.emplaceBack(J+$-1,J+$),A.push(V[$].x),A.push(V[$].y);K.vertexLength+=V.length,K.primitiveLength+=V.length}}for(var Q=tc(A,D),ie=0;ie<Q.length;ie+=3)this.indexArray.emplaceBack(T+Q[ie],T+Q[ie+1],T+Q[ie+2]);b.vertexLength+=g,b.primitiveLength+=Q.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,a)},be("FillBucket",$i,{omit:["layers","patternFeatures"]});var Ph=new Jr({"fill-sort-key":new Ue(M.layout_fill["fill-sort-key"])}),Ch={paint:new Jr({"fill-antialias":new _e(M.paint_fill["fill-antialias"]),"fill-opacity":new Ue(M.paint_fill["fill-opacity"]),"fill-color":new Ue(M.paint_fill["fill-color"]),"fill-outline-color":new Ue(M.paint_fill["fill-outline-color"]),"fill-translate":new _e(M.paint_fill["fill-translate"]),"fill-translate-anchor":new _e(M.paint_fill["fill-translate-anchor"]),"fill-pattern":new Hr(M.paint_fill["fill-pattern"])}),layout:Ph},kh=(function(e){function t(r){e.call(this,r,Ch)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(r,a){e.prototype.recalculate.call(this,r,a);var 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"])},t.prototype.createBucket=function(r){return new $i(r)},t.prototype.queryRadius=function(){return Yi(this.paint.get("fill-translate"))},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,g){return ai(ki(r,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),m.angle,g),c)},t.prototype.isTileClipped=function(){return!0},t})(vi),Mh=dr([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Nc=ns;function ns(e,t,r,a,l){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=a,this._values=l,e.readFields(Dh,this,t)}function Dh(e,t,r){e==1?t.id=r.readVarint():e==2?(function(a,l){for(var c=a.readVarint()+a.pos;a.pos<c;){var h=l._keys[a.readVarint()],m=l._values[a.readVarint()];l.properties[h]=m}})(r,t):e==3?t.type=r.readVarint():e==4&&(t._geometry=r.pos)}function Lh(e){for(var t,r,a=0,l=0,c=e.length,h=c-1;l<c;h=l++)a+=((r=e[h]).x-(t=e[l]).x)*(t.y+r.y);return a}ns.types=["Unknown","Point","LineString","Polygon"],ns.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,r=e.readVarint()+e.pos,a=1,l=0,c=0,h=0,m=[];e.pos<r;){if(l<=0){var g=e.readVarint();a=7&g,l=g>>3}if(l--,a===1||a===2)c+=e.readSVarint(),h+=e.readSVarint(),a===1&&(t&&m.push(t),t=[]),t.push(new Fe(c,h));else{if(a!==7)throw new Error("unknown command "+a);t&&t.push(t[0].clone())}}return t&&m.push(t),m},ns.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,a=0,l=0,c=0,h=1/0,m=-1/0,g=1/0,_=-1/0;e.pos<t;){if(a<=0){var x=e.readVarint();r=7&x,a=x>>3}if(a--,r===1||r===2)(l+=e.readSVarint())<h&&(h=l),l>m&&(m=l),(c+=e.readSVarint())<g&&(g=c),c>_&&(_=c);else if(r!==7)throw new Error("unknown command "+r)}return[h,g,m,_]},ns.prototype.toGeoJSON=function(e,t,r){var a,l,c=this.extent*Math.pow(2,r),h=this.extent*e,m=this.extent*t,g=this.loadGeometry(),_=ns.types[this.type];function x(A){for(var D=0;D<A.length;D++){var L=A[D];A[D]=[360*(L.x+h)/c-180,360/Math.PI*Math.atan(Math.exp((180-360*(L.y+m)/c)*Math.PI/180)
1)-90]}}switch(this.type){case 1:var b=[];for(a=0;a<g.length;a++)b[a]=g[a][0];x(g=b);break;case 2:for(a=0;a<g.length;a++)x(g[a]);break;case 3:for(g=(function(A){var D=A.length;if(D<=1)return[A];for(var L,Z,V=[],K=0;K<D;K++){var J=Lh(A[K]);J!==0&&(Z===void 0&&(Z=J<0),Z===J<0?(L&&V.push(L),L=[A[K]]):L.push(A[K]))}return L&&V.push(L),V})(g),a=0;a<g.length;a++)for(l=0;l<g[a].length;l++)x(g[a][l])}g.length===1?g=g[0]:_="Multi"+_;var T={type:"Feature",geometry:{type:_,coordinates:g},properties:this.properties};return"id"in this&&(T.id=this.id),T};var jc=qc;function qc(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(Rh,this,t),this.length=this._features.length}function Rh(e,t,r){e===15?t.version=r.readVarint():e===1?t.name=r.readString():e===5?t.extent=r.readVarint():e===2?t._features.push(r.pos):e===3?t._keys.push(r.readString()):e===4&&t._values.push((function(a){for(var l=null,c=a.readVarint()+a.pos;a.pos<c;){var h=a.readVarint()>>3;l=h===1?a.readString():h===2?a.readFloat():h===3?a.readDouble():h===4?a.readVarint64():h===5?a.readVarint():h===6?a.readSVarint():h===7?a.readBoolean():null}return l})(r))}function Bh(e,t,r){if(e===3){var a=new jc(r,r.readVarint()+r.pos);a.length&&(t[a.name]=a)}}qc.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Nc(this._pbf,t,this.extent,this._keys,this._values)};var os={VectorTile:function(e,t){this.layers=e.readFields(Bh,{},t)},VectorTileFeature:Nc,VectorTileLayer:jc},Fh=os.VectorTileFeature.types,lc=Math.pow(2,13);function ul(e,t,r,a,l,c,h,m){e.emplaceBack(t,r,2*Math.floor(a*lc)+h,l*lc*2,c*lc*2,Math.round(m))}var Qi=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Yr,this.indexArray=new ni,this.programConfigurations=new bt(e.layers,e.zoom),this.segments=new P,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Oh(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}Qi.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=ac("fill-extrusion",this.layers,t);for(var a=0,l=e;a<l.length;a+=1){var c=l[a],h=c.feature,m=c.id,g=c.index,_=c.sourceLayerIndex,x=this.layers[0]._featureFilter.needGeometry,b=wr(h,x);if(this.layers[0]._featureFilter.filter(new ft(this.zoom),b,r)){var T={id:m,sourceLayerIndex:_,index:g,geometry:x?b.geometry:Kt(h),properties:h.properties,type:h.type,patterns:{}};this.hasPattern?this.features.push(sc("fill-extrusion",this.layers,T,this.zoom,t)):this.addFeature(T,T.geometry,g,r,{}),t.featureIndex.insert(h,T.geometry,g,_,this.index,!0)}}},Qi.prototype.addFeatures=function(e,t,r){for(var a=0,l=this.features;a<l.length;a+=1){var c=l[a];this.addFeature(c,c.geometry,c.index,t,r)}},Qi.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Qi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Qi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Qi.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Mh),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Qi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Qi.prototype.addFeature=function(e,t,r,a,l){for(var c=0,h=oc(t,500);c<h.length;c+=1){for(var m=h[c],g=0,_=0,x=m;_<x.length;_+=1)g+=x[_].length;for(var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),T=0,A=m;T<A.length;T+=1){var D=A[T];if(D.length!==0&&!((Qe=D).every((function(Ke){return Ke.x<0}))||Qe.every((function(Ke){return Ke.x>8192}))||Qe.every((function(Ke){return Ke.y<0}))||Qe.every((function(Ke){return Ke.y>8192}))))for(var L=0,Z=0;Z<D.length;Z++){var V=D[Z];if(Z>=1){var K=D[Z-1];if(!Oh(V,K)){b.vertexLength+4>P.MAX_VERTEX_ARRAY_LENGTH&&(b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var J=V.sub(K)._perp()._unit(),$=K.dist(V);L+$>32768&&(L=0),ul(this.layoutVertexArray,V.x,V.y,J.x,J.y,0,0,L),ul(this.layoutVertexArray,V.x,V.y,J.x,J.y,0,1,L),ul(this.layoutVertexArray,K.x,K.y,J.x,J.y,0,0,L+=$),ul(this.layoutVertexArray,K.x,K.y,J.x,J.y,0,1,L);var Q=b.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),b.vertexLength+=4,b.primitiveLength+=2}}}}if(b.vertexLength+g>P.MAX_VERTEX_ARRAY_LENGTH&&(b=this.segments.prepareSegment(g,this.layoutVertexArray,this.indexArray)),Fh[e.type]==="Polygon"){for(var ie=[],pe=[],de=b.vertexLength,Pe=0,ye=m;Pe<ye.length;Pe+=1){var ke=ye[Pe];
vendor: 4,703 bytes, line 1
1if(ke.length!==0){ke!==m[0]&&pe.push(ie.length/2);for(var ge=0;ge<ke.length;ge++){var Je=ke[ge];ul(this.layoutVertexArray,Je.x,Je.y,0,0,1,1,0),ie.push(Je.x),ie.push(Je.y)}}}for(var Oe=tc(ie,pe),Ae=0;Ae<Oe.length;Ae+=3)this.indexArray.emplaceBack(de+Oe[Ae],de+Oe[Ae+2],de+Oe[Ae+1]);b.primitiveLength+=Oe.length/3,b.vertexLength+=g}}var Qe;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,a)},be("FillExtrusionBucket",Qi,{omit:["layers","features"]});var Uh={paint:new Jr({"fill-extrusion-opacity":new _e(M["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ue(M["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new _e(M["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new _e(M["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Hr(M["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ue(M["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ue(M["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new _e(M["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Vh=(function(e){function t(r){e.call(this,r,Uh)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Qi(r)},t.prototype.queryRadius=function(){return Yi(this.paint.get("fill-extrusion-translate"))},t.prototype.is3D=function(){return!0},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,g,_){var x=ki(r,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),m.angle,g),b=this.paint.get("fill-extrusion-height").evaluate(a,l),T=this.paint.get("fill-extrusion-base").evaluate(a,l),A=(function(L,Z,V,K){for(var J=[],$=0,Q=L;$<Q.length;$+=1){var ie=Q[$],pe=[ie.x,ie.y,0,1];ts(pe,pe,Z),J.push(new Fe(pe[0]/pe[3],pe[1]/pe[3]))}return J})(x,_),D=(function(L,Z,V,K){for(var J=[],$=[],Q=K[8]*Z,ie=K[9]*Z,pe=K[10]*Z,de=K[11]*Z,Pe=K[8]*V,ye=K[9]*V,ke=K[10]*V,ge=K[11]*V,Je=0,Oe=L;Je<Oe.length;Je+=1){for(var Ae=[],Qe=[],Ke=0,nt=Oe[Je];Ke<nt.length;Ke+=1){var Le=nt[Ke],ct=Le.x,Ft=Le.y,Gt=K[0]*ct+K[4]*Ft+K[12],jt=K[1]*ct+K[5]*Ft+K[13],Ot=K[2]*ct+K[6]*Ft+K[14],Xt=K[3]*ct+K[7]*Ft+K[15],ur=Ot+pe,cr=Xt+de,Dr=Gt+Pe,yr=jt+ye,Lr=Ot+ke,Jt=Xt+ge,gr=new Fe((Gt+Q)/cr,(jt+ie)/cr);gr.z=ur/cr,Ae.push(gr);var tt=new Fe(Dr/Jt,yr/Jt);tt.z=Lr/Jt,Qe.push(tt)}J.push(Ae),$.push(Qe)}return[J,$]})(c,T,b,_);return(function(L,Z,V){var K=1/0;ai(V,Z)&&(K=Zc(V,Z[0]));for(var J=0;J<Z.length;J++)for(var $=Z[J],Q=L[J],ie=0;ie<$.length-1;ie++){var pe=$[ie],de=[pe,$[ie+1],Q[ie+1],Q[ie],pe];Cr(V,de)&&(K=Math.min(K,Zc(V,de)))}return K!==1/0&&K})(D[0],D[1],A)},t})(vi);function cl(e,t){return e.x*t.x+e.y*t.y}function Zc(e,t){if(e.length===1){for(var r,a=0,l=t[a++];!r||l.equals(r);)if(!(r=t[a++]))return 1/0;for(;a<t.length;a++){var c=t[a],h=e[0],m=r.sub(l),g=c.sub(l),_=h.sub(l),x=cl(m,m),b=cl(m,g),T=cl(g,g),A=cl(_,m),D=cl(_,g),L=x*T-b*b,Z=(T*A-b*D)/L,V=(x*D-b*A)/L,K=l.z*(1-Z-V)+r.z*Z+c.z*V;if(isFinite(K))return K}return 1/0}for(var J=1/0,$=0,Q=t;$<Q.length;$+=1)J=Math.min(J,Q[$].z);return J}var Nh=dr([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,jh=dr([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,qh=os.VectorTileFeature.types,Zh=Math.cos(Math.PI/180*37.5),Gc=Math.pow(2,14)/.5,Nr=function(e){var t=this;this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((function(r){t.gradients[r.id]={}})),this.layoutVertexArray=new Ya,this.layoutVertexArray2=new Yn,this.indexArray=new ni,this.programConfigurations=new bt(e.layers,e.zoom),this.segments=new P,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};Nr.prototype.populate=function(e,t,r){this.hasPattern=ac("line",this.layers,t);for(var a=this.layers[0].layout.get("line-sort-key"),l=!a.isConstant(),c=[],h=0,m=e;h<m.length;h+=1){var g=m[h],_=g.feature,x=g.id,b=g.index,T=g.sourceLayerIndex,A=this.layers[0]._featureFilter.needGeometry,D=wr(_,A);if(this.layers[0]._featureFilter.filter(new ft(this.zoom),D,r)){var L=l?a.evaluate(D,{},r):void 0,Z={id:x,properties:_.properties,type:_.type,sourceLayerIndex:T,index:b,geometry:A?D.geometry:Kt(_),patterns:{},sortKey:L};c.push(Z)}}l&&c.sort((function(de,Pe){return de.sortKey-Pe.sortKey}
1));for(var V=0,K=c;V<K.length;V+=1){var J=K[V],$=J.geometry,Q=J.index,ie=J.sourceLayerIndex;if(this.hasPattern){var pe=sc("line",this.layers,J,this.zoom,t);this.patternFeatures.push(pe)}else this.addFeature(J,$,Q,r,{});t.featureIndex.insert(e[Q].feature,$,Q,ie,this.index)}},Nr.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Nr.prototype.addFeatures=function(e,t,r){for(var a=0,l=this.patternFeatures;a<l.length;a+=1){var c=l[a];this.addFeature(c,c.geometry,c.index,t,r)}},Nr.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Nr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Nr.prototype.upload=function(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,jh)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Nh),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Nr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Nr.prototype.lineFeatureClips=function(e){if(e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}},Nr.prototype.addFeature=function(e,t,r,a,l){var c=this.layers[0].layout,h=c.get("line-join").evaluate(e,{}),m=c.get("line-cap"),g=c.get("line-miter-limit"),_=c.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(var x=0,b=t;x<b.length;x+=1)this.addLine(b[x],e,h,m,g,_);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,a)},Nr.prototype.addLine=function(e,t,r,a,l,c){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var h=0;h<e.length-1;h++)this.totalDistance+=e[h].dist(e[h+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var m=qh[t.type]==="Polygon",g=e.length;g>=2&&e[g-1].equals(e[g-2]);)g--;for(var _=0;_<g-1&&e[_].equals(e[_+1]);)_++;if(!(g<(m?3:2))){r==="bevel"&&(l=1.05);var x,b=this.overscaling<=16?122880/(512*this.overscaling):0,T=this.segments.prepareSegment(10*g,this.layoutVertexArray,this.indexArray),A=void 0,D=void 0,L=void 0,Z=void 0;this.e1=this.e2=-1,m&&(Z=e[_].sub(x=e[g-2])._unit()._perp());for(var V=_;V<g;V++)if(!(D=V===g-1?m?e[_+1]:void 0:e[V+1])||!e[V].equals(D)){Z&&(L=Z),x&&(A=x),x=e[V],Z=D?D.sub(x)._unit()._perp():L;var K=(L=L||Z).add(Z);K.x===0&&K.y===0||K._unit();var J=L.x*Z.x+L.y*Z.y,$=K.x*Z.x+K.y*Z.y,Q=$!==0?1/$:1/0,ie=2*Math.sqrt(2-2*$),pe=$<Zh&&A&&D,de=L.x*Z.y-L.y*Z.x>0;if(pe&&V>_){var Pe=x.dist(A);if(Pe>2*b){var ye=x.sub(x.sub(A)._mult(b/Pe)._round());this.updateDistance(A,ye),this.addCurrentVertex(ye,L,0,0,T),A=ye}}var ke=A&&D,ge=ke?r:m?"butt":a;if(ke&&ge==="round"&&(Q<c?ge="miter":Q<=2&&(ge="fakeround")),ge==="miter"&&Q>l&&(ge="bevel"),ge==="bevel"&&(Q>2&&(ge="flipbevel"),Q<l&&(ge="miter")),A&&this.updateDistance(A,x),ge==="miter")K._mult(Q),this.addCurrentVertex(x,K,0,0,T);else if(ge==="flipbevel"){if(Q>100)K=Z.mult(-1);else{var Je=Q*L.add(Z).mag()/L.sub(Z).mag();K._perp()._mult(Je*(de?-1:1))}this.addCurrentVertex(x,K,0,0,T),this.addCurrentVertex(x,K.mult(-1),0,0,T)}else if(ge==="bevel"||ge==="fakeround"){var Oe=-Math.sqrt(Q*Q-1),Ae=de?Oe:0,Qe=de?0:Oe;if(A&&this.addCurrentVertex(x,L,Ae,Qe,T),ge==="fakeround")for(var Ke=Math.round(180*ie/Math.PI/20),nt=1;nt<Ke;nt++){var Le=nt/Ke;if(Le!==.5){var ct=Le-.5;Le+=Le*ct*(Le-1)*((1.0904+J*(J*(3.55645-1.43519*J)-3.2452))*ct*ct+(.848013+J*(.215638*J-1.06021)))}var Ft=Z.sub(L)._mult(Le)._add(L)._unit()._mult(de?-1:1);this.addHalfVertex(x,Ft.x,Ft.y,!1,de,0,T)}D&&this.addCurrentVertex(x,Z,-Ae,-Qe,T)}else if(ge==="butt")this.addCurrentVertex(x,K,0,0,T);else if(ge==="square"){var Gt=A?1:-1;this.addCurrentVertex(x,K,Gt,Gt,T)}else ge==="round"&&(A&&(this.addCurrentVertex(x,L,0,0,T),this.addCurrentVertex(x,L,1,1,T,!0)),D&&(this.addCurrentVertex(x,Z,-1,-1,T,!0),this.addCurrentVertex(x,Z,0,0,T)));
1if(pe&&V<g-1){var jt=x.dist(D);if(jt>2*b){var Ot=x.add(D.sub(x)._mult(b/jt)._round());this.updateDistance(x,Ot),this.addCurrentVertex(Ot,Z,0,0,T),x=Ot}}}}},Nr.prototype.addCurrentVertex=function(e,t,r,a,l,c){c===void 0&&(c=!1);var h=t.y*a-t.x,m=-t.y-t.x*a;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,c,!1,r,l),this.addHalfVertex(e,h,m,c,!0,-a,l),this.distance>Gc/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(e,t,r,a,l,c))},Nr.prototype.addHalfVertex=function(e,t,r,a,l,c,h){var m=.5*(this.lineClips?this.scaledDistance*(Gc-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e.x<<1)+(a?1:0),(e.y<<1)+(l?1:0),Math.round(63*t)+128,Math.round(63*r)+128,1+(c===0?0:c<0?-1:1)|(63&m)<<2,m>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var g=h.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,g),h.primitiveLength++),l?this.e2=g:this.e1=g},Nr.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Nr.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},be("LineBucket",Nr,{omit:["layers","patternFeatures"]});var Gh=new Jr({"line-cap":new _e(M.layout_line["line-cap"]),"line-join":new Ue(M.layout_line["line-join"]),"line-miter-limit":new _e(M.layout_line["line-miter-limit"]),"line-round-limit":new _e(M.layout_line["line-round-limit"]),"line-sort-key":new Ue(M.layout_line["line-sort-key"])}),Xc={paint:new Jr({"line-opacity":new Ue(M.paint_line["line-opacity"]),"line-color":new Ue(M.paint_line["line-color"]),"line-translate":new _e(M.paint_line["line-translate"]),"line-translate-anchor":new _e(M.paint_line["line-translate-anchor"]),"line-width":new Ue(M.paint_line["line-width"]),"line-gap-width":new Ue(M.paint_line["line-gap-width"]),"line-offset":new Ue(M.paint_line["line-offset"]),"line-blur":new Ue(M.paint_line["line-blur"]),"line-dasharray":new _i(M.paint_line["line-dasharray"]),"line-pattern":new Hr(M.paint_line["line-pattern"]),"line-gradient":new Wi(M.paint_line["line-gradient"])}),layout:Gh},Wc=new((function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.possiblyEvaluate=function(r,a){return a=new ft(Math.floor(a.zoom),{now:a.now,fadeDuration:a.fadeDuration,zoomHistory:a.zoomHistory,transition:a.transition}),e.prototype.possiblyEvaluate.call(this,r,a)},t.prototype.evaluate=function(r,a,l,c){return a=_r({},a,{zoom:Math.floor(a.zoom)}),e.prototype.evaluate.call(this,r,a,l,c)},t})(Ue))(Xc.paint.properties["line-width"].specification);Wc.useIntegerZoom=!0;var Xh=(function(e){function t(r){e.call(this,r,Xc),this.gradientVersion=0}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(r){r==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof zi,this.gradientVersion=(this.gradientVersion+1)%Ps)},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(r,a){e.prototype.recalculate.call(this,r,a),this.paint._values["line-floorwidth"]=Wc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,r)},t.prototype.createBucket=function(r){return new Nr(r)},t.prototype.queryRadius=function(r){var a=r,l=Kc(rr("line-width",this,a),rr("line-gap-width",this,a)),c=rr("line-offset",this,a);return l/2+Math.abs(c)+Yi(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,g){var _=ki(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),m.angle,g),x=g/2*Kc(this.paint.get("line-width").evaluate(a,l),this.paint.get("line-gap-width").evaluate(a,l)),b=this.paint.get("line-offset").evaluate(a,l);return b&&(c=(function(T,A){for(var D=[],L=new Fe(0,0),Z=0;Z<T.length;Z++){for(var V=T[Z],K=[],J=0;J<V.length;J++){var $=V[J],Q=V[J+1],ie=J===0?L:$.sub(V[J-1])._unit()._perp(),pe=J===V.length-1?L:Q.sub($)._unit()._perp(),de=ie._add(pe)._unit();de._mult(1/(de.x*pe.x+de.y*pe.y)),K.push(de._mult(A)._add($))}D.push(K)}return D})(c,b*g)),(function(T,A,D){for(var L=0;L<A.length;L++){var Z=A[L];if(T.length>=3){for(var V=0;V<Z.length;V++)if(Ui(T,Z[V]))return!0}if(nl(T,Z,D))return!0}return!1})(_,c,x)},t.prototype.isTileClipped=function(){return!0},t})(vi);function Kc(e,t){return t>0?t+2*e:e}var Wh=dr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Kh=dr([{name:"a_projected_pos",components:3,type:"Float32"}],4),Hh=(dr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),dr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Hc=(dr([{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"}]),dr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Jh=dr([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Yh(e,t,r){return e.sections.forEach((function(a){a.text=(function(l,c,h){var m=c.layout.get("text-transform").evaluate(h,{});return m==="uppercase"?l=l.toLocaleUpperCase():m==="lowercase"&&(l=l.toLocaleLowerCase()),Ut.applyArabicShaping&&(l=Ut.applyArabicShaping(l)),l})(a.text,t,r)})),e}dr([{name:"triangle",components:3,type:"Uint16"}]),dr([{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"}]),dr([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),dr([{type:"Float32",name:"offsetX"}]),dr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var pl={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Jc=function(e,t,r,a,l){var c,h,m=8*l-a-1,g=(1<<m)-1,_=g>>1,x=-7,b=l-1,T=-1,A=e[t+b];for(b+=T,c=A&(1<<-x)-1,A>>=-x,x+=m;x>0;c=256*c+e[t+b],b+=T,x-=8);for(h=c&(1<<-x)-1,c>>=-x,x+=a;x>0;h=256*h+e[t+b],b+=T,x-=8);if(c===0)c=1-_;else{if(c===g)return h?NaN:1/0*(A?-1:1);h+=Math.pow(2,a),c-=_}return(A?-1:1)*h*Math.pow(2,c-a)},Yc=function(e,t,r,a,l,c){var h,m,g,_=8*c-l-1,x=(1<<_)-1,b=x>>1,T=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=0,D=1,L=t<0||t===0&&1
1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,h=x):(h=Math.floor(Math.log(t)/Math.LN2),t*(g=Math.pow(2,-h))<1&&(h--,g*=2),(t+=h+b>=1?T/g:T*Math.pow(2,1-b))*g>=2&&(h++,g/=2),h+b>=x?(m=0,h=x):h+b>=1?(m=(t*g-1)*Math.pow(2,l),h+=b):(m=t*Math.pow(2,b-1)*Math.pow(2,l),h=0));l>=8;e[r+A]=255&m,A+=D,m/=256,l-=8);for(h=h<<l|m,_+=l;_>0;e[r+A]=255&h,A+=D,h/=256,_-=8);e[r+A-D]|=128*L},lu=Ct;function Ct(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Ct.Varint=0,Ct.Fixed64=1,Ct.Bytes=2,Ct.Fixed32=5;var $c=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function to(e){return e.type===Ct.Bytes?e.readVarint()+e.pos:e.pos+1}function as(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Qc(e,t,r){var a=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(a);for(var l=r.pos-1;l>=e;l--)r.buf[l+a]=r.buf[l]}function $h(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function Qh(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function ef(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function tf(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function rf(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function nf(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function of(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function af(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function sf(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function uu(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function ss(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function ep(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function lf(e,t,r){e===1&&r.readMessage(uf,t)}function uf(e,t,r){if(e===3){var a=r.readMessage(cf,{}),l=a.width,c=a.height,h=a.left,m=a.top,g=a.advance;t.push({id:a.id,bitmap:new fa({width:l+6,height:c+6},a.bitmap),metrics:{width:l,height:c,left:h,top:m,advance:g}})}}function cf(e,t,r){e===1?t.id=r.readVarint():e===2?t.bitmap=r.readBytes():e===3?t.width=r.readVarint():e===4?t.height=r.readVarint():e===5?t.left=r.readSVarint():e===6?t.top=r.readSVarint():e===7&&(t.advance=r.readVarint())}function tp(e){for(var t=0,r=0,a=0,l=e;a<l.length;a+=1){var c=l[a];t+=c.w*c.h,r=Math.max(r,c.w)}e.sort((function(L,Z){return Z.h-L.h}));for(var h=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],m=0,g=0,_=0,x=e;_<x.length;_+=1)for(var b=x[_],T=h.length-1;T>=0;T--){var A=h[T];if(!(b.w>A.w||b.h>A.h)){if(b.x=A.x,b.y=A.y,g=Math.max(g,b.y+b.h),m=Math.max(m,b.x+b.w),b.w===A.w&&b.h===A.h){var D=h.pop();T<h.length&&(h[T]=D)}else b.h===A.h?(A.x+=b.w,A.w-=b.w):b.w===A.w?(A.y+=b.h,A.h-=b.h):(h.push({x:A.x+b.w,y:A.y,w:A.w-b.w,h:b.h}),A.y+=b.h,A.h-=b.h);break}}return{w:m,h:g,fill:t/(m*g)||0}}Ct.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var a=this.readVarint(),l=a>>3,c=this.pos;this.type=7&a,e(l,t,this),this.pos===c&&this.skip(a)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=uu(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=ep(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=uu(this.buf,this.pos)+4294967296*uu(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=uu(this.buf,this.pos)+4294967296*ep(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=Jc(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Jc(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,a=this.buf;return t=127&(r=a[this.pos++]),r<128?t:(t|=(127&(r=a[this.pos++]))<<7,r<128?t:(t|=(127&(r=a[this.pos++]))<<14,r<128?t:(t|=(127&(r=a[this.pos++]))<<21,r<128?t:(function(l,c,h){var m,g,_=h.buf;if(m=(112&(g=_[h.pos++]))>>4,g<128||(m|=(127&(g=_[h.pos++]))<<3,g<128)||(m|=(127&(g=_[h.pos++]))<<10,g<128)||(m|=(127&(g=_[h.pos++]))<<17,g<128)||(m|=(127&(g=_[h.pos++]))<<24,g<128)||(m|=(1&(g=_[h.pos++]))<<31,g<128))return as(l,m,c);throw new Error("Expected varint not more than 10 bytes")})(t|=(15&(r=a[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&$c?(function(r,a,l){return $c.decode(r.subarray(a,l))})(this.buf,t,e):(function(r,a,l){for(var c="",h=a;h<l;){var m,g,_,x=r[h],b=null,T=x>239?4:x>223?3:x>191?2:1;if(h+T>l)break;T===1?x<128&&(b=x):T===2?(192&(m=r[h+1]))==128&&(b=(31&x)<<6|63&m)<=127&&(b=null):T===3?(g=r[h+2],(192&(m=r[h+1]))==128&&(192&g)==128&&((b=(15&x)<<12|(63&m)<<6|63&g)<=2047||b>=55296&&b<=57343)&&(b=null)):T===4&&(g=r[h+2],_=r[h+3],(192&(m=r[h+1]))==128&&(192&g)==128&&(192&_)==128&&((b=(15&x)<<18|(63&m)<<12|(63&g)<<6|63&_)<=65535||b>=1114112)&&(b=null)),b===null?(b=65533,T=1):b>65535&&(b-=65536,c+=String.fromCharCode(b>>>10&1023|55296),b=56320|1023&b),c+=String.fromCharCode(b),h+=T}return c})(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}
vendor: 10,491 bytes, line 1
1,readPackedVarint:function(e,t){if(this.type!==Ct.Bytes)return e.push(this.readVarint(t));var r=to(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==Ct.Bytes)return e.push(this.readSVarint());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==Ct.Bytes)return e.push(this.readBoolean());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==Ct.Bytes)return e.push(this.readFloat());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==Ct.Bytes)return e.push(this.readDouble());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==Ct.Bytes)return e.push(this.readFixed32());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==Ct.Bytes)return e.push(this.readSFixed32());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==Ct.Bytes)return e.push(this.readFixed64());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==Ct.Bytes)return e.push(this.readSFixed64());var t=to(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===Ct.Varint)for(;this.buf[this.pos++]>127;);else if(t===Ct.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Ct.Fixed32)this.pos+=4;else{if(t!==Ct.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),ss(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),ss(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),ss(this.buf,-1&e,this.pos),ss(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),ss(this.buf,-1&e,this.pos),ss(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?(function(t,r){var a,l;if(t>=0?(a=t%4294967296|0,l=t/4294967296|0):(l=~(-t/4294967296),4294967295^(a=~(-t%4294967296))?a=a+1|0:(a=0,l=l+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),(function(c,h,m){m.buf[m.pos++]=127&c|128,c>>>=7,m.buf[m.pos++]=127&c|128,c>>>=7,m.buf[m.pos++]=127&c|128,c>>>=7,m.buf[m.pos++]=127&c|128,m.buf[m.pos]=127&(c>>>=7)})(a,0,r),(function(c,h){var m=(7&c)<<4;h.buf[h.pos++]|=m|((c>>>=3)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c)))))})(l,r)})(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=(function(a,l,c){for(var h,m,g=0;g<l.length;g++){if((h=l.charCodeAt(g))>55295&&h<57344){if(!m){h>56319||g+1===l.length?(a[c++]=239,a[c++]=191,a[c++]=189):m=h;continue}if(h<56320){a[c++]=239,a[c++]=191,a[c++]=189,m=h;continue}h=m-55296<<10|h-56320|65536,m=null}else m&&(a[c++]=239,a[c++]=191,a[c++]=189,m=null);h<128?a[c++]=h:(h<2048?a[c++]=h>>6|192:(h<65536?a[c++]=h>>12|224:(a[c++]=h>>18|240,a[c++]=h>>12&63|128),a[c++]=h>>6&63|128),a[c++]=63&h|128)}return c})(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Qc(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Yc(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Yc(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var a=this.pos-r;a>=128&&Qc(r,a,this),this.pos=r-1,this.writeVarint(a),this.pos+=a},writeMessage:function(e,t,r){this.writeTag(e,Ct.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,$h,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Qh,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,rf,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ef,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,tf,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,nf,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,of,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,af,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,sf,t)},writeBytesField:function(e,t){this.writeTag(e,Ct.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Ct.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Ct.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Ct.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Ct.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Ct.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Ct.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Ct.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Ct.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Ct.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var cu=function(e,t){var r=t.pixelRatio,a=t.version,l=t.stretchX,c=t.stretchY,h=t.content;this.paddedRect=e,this.pixelRatio=r,this.stretchX=l,this.stretchY=c,this.content=h,this.version=a},hl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};hl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},hl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},hl.tlbr.get=function(){return this.tl.concat(this.br)},hl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(cu.prototype,hl);var fl=function(e,t){var r={},a={};this.haveRenderCallbacks=[];var l=[];this.addImages(e,r,l),this.addImages(t,a,l);var c=tp(l),h=new $r({width:c.w||1,height:c.h||1});for(var m in e){var g=e[m],_=r[m].paddedRect;$r.copy(g.data,h,{x:0,y:0},{x:_.x+1,y:_.y+1},g.data)}for(var x in t){var b=t[x],T=a[x].paddedRect,A=T.x+1,D=T.y+1,L=b.data.width,Z=b.data.height;$r.copy(b.data,h,{x:0,y:0},{x:A,y:D},b.data),$r.copy(b.data,h,{x:0,y:Z-1},{x:A,y:D-1},{width:L,height:1}),$r.copy(b.data,h,{x:0,y:0},{x:A,y:D+Z},{width:L,height:1}),$r.copy(b.data,h,{x:L-1,y:0},{x:A-1,y:D},{width:1,height:Z}),$r.copy(b.data,h,{x:0,y:0},{x:A+L,y:D},{width:1,height:Z})}this.image=h,this.iconPositions=r,this.patternPositions=a};fl.prototype.addImages=function(e,t,r){for(var a in e){var l=e[a],c={x:0,y:0,w:l.data.width+2,h:l.data.height+2};r.push(c),t[a]=new cu(c,l),l.hasRenderCallback&&this.haveRenderCallbacks.push(a)}},fl.prototype.patchUpdatedImages=function(e,t){for(var r in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)},fl.prototype.patchUpdatedImage=function(e,t,r){if(e&&t&&e.version!==t.version){e.version=t.version;var a=e.tl;r.update(t.data,void 0,{x:a[0],y:a[1]})}},be("ImagePosition",cu),be("ImageAtlas",fl);var xi={horizontal:1,vertical:2,horizontalOnly:3},ls=function(){this.scale=1,this.fontStack="",this.imageName=null};ls.forText=function(e,t){var r=new ls;return r.scale=e||1,r.fontStack=t,r},ls.forImage=function(e){var t=new ls;return t.imageName=e,t};var Mr=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function pu(e,t,r,a,l,c,h,m,g,_,x,b,T,A,D,L){var Z,V=Mr.fromFeature(e,l);b===xi.vertical&&V.verticalizePunctuation();var K=Ut.processBidirectionalText,J=Ut.processStyledBidirectionalText;if(K&&V.sections.length===1){Z=[];for(var $=0,Q=K(V.toString(),uc(V,_,c,t,a,A,D));$<Q.length;$+=1){var ie=Q[$],pe=new Mr;pe.text=ie,pe.sections=V.sections;for(var de=0;de<ie.length;de++)pe.sectionIndex.push(0);Z.push(pe)}}else if(J){Z=[];for(var Pe=0,ye=J(V.text,V.sectionIndex,uc(V,_,c,t,a,A,D));Pe<ye.length;Pe+=1){var ke=ye[Pe],ge=new Mr;ge.text=ke[0],ge.sectionIndex=ke[1],ge.sections=V.sections,Z.push(ge)}}else Z=(function(Ae,Qe){for(var Ke=[],nt=Ae.text,Le=0,ct=0,Ft=Qe;ct<Ft.length;ct+=1){var Gt=Ft[ct];Ke.push(Ae.substring(Le,Gt)),Le=Gt}return Le<nt.length&&Ke.push(Ae.substring(Le,nt.length)),Ke})(V,uc(V,_,c,t,a,A,D));var Je=[],Oe={positionedLines:Je,text:V.toString(),top:x[1],bottom:x[1],left:x[0],right:x[0],writingMode:b,iconsInText:!1,verticalizable:!1};return(function(Ae,Qe,Ke,nt,Le,ct,Ft,Gt,jt,Ot,Xt,ur){for(var cr=0,Dr=-17,yr=0,Lr=0,Jt=Gt==="right"?1:Gt==="left"?0:.5,gr=0,tt=0,wt=Le;tt<wt.length;tt+=1){var mt=wt[tt];mt.trim();var lt=mt.getMaxScale(),jr=24*(lt-1),Sr={positionedGlyphs:[],lineOffset:0};Ae.positionedLines[gr]=Sr;var Mt=Sr.positionedGlyphs,er=0;if(mt.length()){for(var Tr=0;Tr<mt.length();Tr++){var pt=mt.getSection(Tr),bn=mt.getSectionIndex(Tr),bi=mt.getCharCode(Tr),wn=0,Yt=null,Sn=null,Vi=null,ys=24,ga=!(jt===xi.horizontal||!Xt&&!Ka(bi)||Xt&&(hu[bi]||(oo=bi,Te.Arabic(oo)||Te["Arabic Supplement"](oo)||Te["Arabic Extended-A"](oo)||Te["Arabic Presentation Forms-A"](oo)||Te["Arabic Presentation Forms-B"](oo))));if(pt.imageName){var gs=nt[pt.imageName];if(!gs)continue;Vi=pt.imageName,Ae.iconsInText=Ae.iconsInText||!0,Sn=gs.paddedRect;var no=gs.displaySize;pt.scale=24*pt.scale/ur,wn=jr+(24-no[1]*pt.scale),ys=(Yt={width:no[0],height:no[1],left:1,top:-3,advance:ga?no[1]:no[0]}).advance;
1var _s=ga?no[0]*pt.scale-24*lt:no[1]*pt.scale-24*lt;_s>0&&_s>er&&(er=_s)}else{var bu=Ke[pt.fontStack],vs=bu&&bu[bi];if(vs&&vs.rect)Sn=vs.rect,Yt=vs.metrics;else{var yl=Qe[pt.fontStack],wu=yl&&yl[bi];if(!wu)continue;Yt=wu.metrics}wn=24*(lt-pt.scale)}ga?(Ae.verticalizable=!0,Mt.push({glyph:bi,imageName:Vi,x:cr,y:Dr+wn,vertical:ga,scale:pt.scale,fontStack:pt.fontStack,sectionIndex:bn,metrics:Yt,rect:Sn}),cr+=ys*pt.scale+Ot):(Mt.push({glyph:bi,imageName:Vi,x:cr,y:Dr+wn,vertical:ga,scale:pt.scale,fontStack:pt.fontStack,sectionIndex:bn,metrics:Yt,rect:Sn}),cr+=Yt.advance*pt.scale+Ot)}Mt.length!==0&&(yr=Math.max(cr-Ot,yr),hf(Mt,0,Mt.length-1,Jt,er)),cr=0;var Su=ct*lt+er;Sr.lineOffset=Math.max(er,jr),Dr+=Su,Lr=Math.max(Su,Lr),++gr}else Dr+=ct,++gr}var oo,gl=Dr- -17,xs=cc(Ft),Ro=xs.horizontalAlign,bs=xs.verticalAlign;(function(Tu,Eu,_l,vl,Iu,xl,bl,wl,Au){var ws,zu=(Eu-_l)*Iu;ws=xl!==bl?-wl*vl- -17:(-vl*Au+.5)*bl;for(var Ss=0,Sl=Tu;Ss<Sl.length;Ss+=1)for(var _a=0,Tl=Sl[Ss].positionedGlyphs;_a<Tl.length;_a+=1){var Ts=Tl[_a];Ts.x+=zu,Ts.y+=ws}})(Ae.positionedLines,Jt,Ro,bs,yr,Lr,ct,gl,Le.length),Ae.top+=-bs*gl,Ae.bottom=Ae.top+gl,Ae.left+=-Ro*yr,Ae.right=Ae.left+yr})(Oe,t,r,a,Z,h,m,g,b,_,T,L),!(function(Ae){for(var Qe=0,Ke=Ae;Qe<Ke.length;Qe+=1)if(Ke[Qe].positionedGlyphs.length!==0)return!1;return!0})(Je)&&Oe}Mr.fromFeature=function(e,t){for(var r=new Mr,a=0;a<e.sections.length;a++){var l=e.sections[a];l.image?r.addImageSection(l):r.addTextSection(l,t)}return r},Mr.prototype.length=function(){return this.text.length},Mr.prototype.getSection=function(e){return this.sections[this.sectionIndex[e]]},Mr.prototype.getSectionIndex=function(e){return this.sectionIndex[e]},Mr.prototype.getCharCode=function(e){return this.text.charCodeAt(e)},Mr.prototype.verticalizePunctuation=function(){this.text=(function(e){for(var t="",r=0;r<e.length;r++){var a=e.charCodeAt(r+1)||null,l=e.charCodeAt(r-1)||null;t+=a&&yi(a)&&!pl[e[r+1]]||l&&yi(l)&&!pl[e[r-1]]||!pl[e[r]]?e[r]:pl[e[r]]}return t})(this.text)},Mr.prototype.trim=function(){for(var e=0,t=0;t<this.text.length&&hu[this.text.charCodeAt(t)];t++)e++;for(var r=this.text.length,a=this.text.length-1;a>=0&&a>=e&&hu[this.text.charCodeAt(a)];a--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},Mr.prototype.substring=function(e,t){var r=new Mr;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},Mr.prototype.toString=function(){return this.text},Mr.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},Mr.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(ls.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,a=0;a<e.text.length;++a)this.sectionIndex.push(r)},Mr.prototype.addImageSection=function(e){var t=e.image?e.image.name:"";if(t.length!==0){var r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push(ls.forImage(t)),this.sectionIndex.push(this.sections.length-1)):qt("Reached maximum number of images 6401")}else qt("Can't add FormattedSection with an empty image.")},Mr.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var hu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},si={};function rp(e,t,r,a,l,c){if(t.imageName){var h=a[t.imageName];return h?h.displaySize[0]*t.scale*24/c+l:0}var m=r[t.fontStack],g=m&&m[e];return g?g.metrics.advance*t.scale+l:0}function ip(e,t,r,a){var l=Math.pow(e-t,2);return a?e<t?l/2:2*l:l+Math.abs(r)*r}function pf(e,t,r){var a=0;return e===10&&(a-=1e4),r&&(a+=150),e!==40&&e!==65288||(a+=50),t!==41&&t!==65289||(a+=50),a}function np(e,t,r,a,l,c){for(var h=null,m=ip(t,r,l,c),g=0,_=a;g<_.length;g+=1){var x=_[g],b=ip(t-x.x,r,l,c)+x.badness;b<=m&&(h=x,m=b)}return{index:e,x:t,priorBreak:h,badness:m}}function uc(e,t,r,a,l,c,h){if(c!=="point")return[];if(!e)return[];for(var m,g=[],_=(function(Z,V,K,J,$,Q){for(var ie=0,pe=0;pe<Z.length();pe++){var de=Z.getSection(pe);ie+=rp(Z.getCharCode(pe),de,J,$,V,Q)}return ie/Math.max(1,Math.ceil(ie/K))})(e,t,r,a,l,h),x=e.text.indexOf("​")>=0,b=0,T=0;T<e.length();T++){var A=e.getSection(T),D=e.getCharCode(T);if(hu[D]||(b+=rp(D,A,a,l,t,h)),T<e.length()-1){var L=!((m=D)<11904||!(Te["Bopomofo Extended"](m)||Te.Bopomofo(m)||Te["CJK Compatibility Forms"](m)||Te["CJK Compatibility Ideographs"](m)||Te["CJK Compatibility"](m)||Te["CJK Radicals Supplement"](m)||Te["CJK Strokes"](m)||Te["CJK Symbols and Punctuation"](m)||Te["CJK 
1Unified Ideographs Extension A"](m)||Te["CJK Unified Ideographs"](m)||Te["Enclosed CJK Letters and Months"](m)||Te["Halfwidth and Fullwidth Forms"](m)||Te.Hiragana(m)||Te["Ideographic Description Characters"](m)||Te["Kangxi Radicals"](m)||Te["Katakana Phonetic Extensions"](m)||Te.Katakana(m)||Te["Vertical Forms"](m)||Te["Yi Radicals"](m)||Te["Yi Syllables"](m)));(si[D]||L||A.imageName)&&g.push(np(T+1,b,_,g,pf(D,e.getCharCode(T+1),L&&x),!1))}}return(function Z(V){return V?Z(V.priorBreak).concat(V.index):[]})(np(e.length(),b,_,g,0,!0))}function cc(e){var t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){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 hf(e,t,r,a,l){if(a||l)for(var c=e[r],h=(e[r].x+c.metrics.advance*c.scale)*a,m=t;m<=r;m++)e[m].x-=h,e[m].y+=l}function op(e,t,r,a,l,c){var h,m=e.image;if(m.content){var g=m.content,_=m.pixelRatio||1;h=[g[0]/_,g[1]/_,m.displaySize[0]-g[2]/_,m.displaySize[1]-g[3]/_]}var x,b,T,A,D=t.left*c,L=t.right*c;r==="width"||r==="both"?(A=l[0]+D-a[3],b=l[0]+L+a[1]):b=(A=l[0]+(D+L-m.displaySize[0])/2)+m.displaySize[0];var Z=t.top*c,V=t.bottom*c;return r==="height"||r==="both"?(x=l[1]+Z-a[0],T=l[1]+V+a[2]):T=(x=l[1]+(Z+V-m.displaySize[1])/2)+m.displaySize[1],{image:m,top:x,right:b,bottom:T,left:A,collisionPadding:h}}si[10]=!0,si[32]=!0,si[38]=!0,si[40]=!0,si[41]=!0,si[43]=!0,si[45]=!0,si[47]=!0,si[173]=!0,si[183]=!0,si[8203]=!0,si[8208]=!0,si[8211]=!0,si[8231]=!0;var us=(function(e){function t(r,a,l,c){e.call(this,r,a),this.angle=l,c!==void 0&&(this.segment=c)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.clone=function(){return new t(this.x,this.y,this.angle,this.segment)},t})(Fe);function pc(e,t){var r=t.expression;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new ft(e+1))};if(r.kind==="source")return{kind:"source"};for(var a=r.zoomStops,l=r.interpolationType,c=0;c<a.length&&a[c]<=e;)c++;for(var h=c=Math.max(0,c-1);h<a.length&&a[h]<e+1;)h++;h=Math.min(a.length-1,h);var m=a[c],g=a[h];return r.kind==="composite"?{kind:"composite",minZoom:m,maxZoom:g,interpolationType:l}:{kind:"camera",minZoom:m,maxZoom:g,minSize:r.evaluate(new ft(m)),maxSize:r.evaluate(new ft(g)),interpolationType:l}}function ap(e,t,r){var a=t.uSize,l=r.lowerSize;return e.kind==="source"?l/128:e.kind==="composite"?Qt(l/128,r.upperSize/128,t.uSizeT):a}function sp(e,t){var r=0,a=0;if(e.kind==="constant")a=e.layoutSize;else if(e.kind!=="source"){var l=e.interpolationType,c=l?qr(vr.interpolationFactor(l,t,e.minZoom,e.maxZoom),0,1):0;e.kind==="camera"?a=Qt(e.minSize,e.maxSize,c):r=c}return{uSizeT:r,uSize:a}}be("Anchor",us);var ff=Object.freeze({__proto__:null,getSizeData:pc,evaluateSizeForFeature:ap,evaluateSizeForZoom:sp,SIZE_PACK_FACTOR:128});function lp(e,t,r,a,l){if(t.segment===void 0)return!0;for(var c=t,h=t.segment+1,m=0;m>-r/2;){if(--h<0)return!1;m-=e[h].dist(c),c=e[h]}m+=e[h].dist(e[h+1]),h++;for(var g=[],_=0;m<r/2;){var x=e[h],b=e[h+1];if(!b)return!1;var T=e[h-1].angleTo(x)-x.angleTo(b);for(T=Math.abs((T+3*Math.PI)%(2*Math.PI)-Math.PI),g.push({distance:m,angleDelta:T}),_+=T;m-g[0].distance>a;)_-=g.shift().angleDelta;if(_>l)return!1;h++,m+=x.dist(b)}return!0}function up(e){for(var t=0,r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function cp(e,t,r){return e?.6*t*r:0}function pp(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function df(e,t,r,a,l,c){for(var h=cp(r,l,c),m=pp(r,a)*c,g=0,_=up(e)/2,x=0;x<e.length-1;x++){var b=e[x],T=e[x+1],A=b.dist(T);if(g+A>_){var D=(_-g)/A,L=Qt(b.x,T.x,D),Z=Qt(b.y,T.y,D),V=new us(L,Z,T.angleTo(b),x);return V._round(),!h||lp(e,V,m,h,t)?V:void 0}g+=A}}function mf(e,t,r,a,l,c,h,m,g){var _=cp(a,c,h),x=pp(a,l),b=x*h,T=e[0].x===0||e[0].x===g||e[0].y===0||e[0].y===g;return t-b<t/4&&(t=b+t/4),(function A(D,L,Z,V,K,J,$,Q,ie){for(var pe=J/2,de=up(D),Pe=0,ye=L-Z,ke=[],ge=0;ge<D.length-1;ge++){for(var Je=D[ge],Oe=D[ge+1],Ae=Je.dist(Oe),Qe=Oe.angleTo(Je);ye+Z<Pe+Ae;){var Ke=((ye+=Z)-Pe)/Ae,nt=Qt(Je.x,Oe.x,Ke),Le=Qt(Je.y,Oe.y,Ke);if(nt>=0&&nt<ie&&Le>=0&&Le<ie&&ye-pe>=0&&ye+pe<=de){var ct=new us(nt,Le,Qe,ge);ct._round(),V&&!lp(D,ct,J,V,K)||ke.push(ct)}}Pe+=Ae}return Q||ke.length||$||(ke=A(D,Pe/2,Z,V,K,J,$,!0,ie)),ke})(e,T?t/2*m%t:(x/2+2*c)*h*m%t,t,_,r,b,T,!1,g)}function hp(e,t,r,a,l){for(var c=[],h=0;h<e.length;h++)for(var m=e[h],g=void 0,_=0;_<m.length-1;_++){var x=m[_],b=m[_+1];x.x<t&&b.x<t||(x.x<t?x=new Fe(t,x.y+(t-x.x)/(b.x-x.x)*(b.y-x.y))._round():b.x<t&&(b=ne
vendor: 11,232 bytes, line 1
1w Fe(t,x.y+(t-x.x)/(b.x-x.x)*(b.y-x.y))._round()),x.y<r&&b.y<r||(x.y<r?x=new Fe(x.x+(r-x.y)/(b.y-x.y)*(b.x-x.x),r)._round():b.y<r&&(b=new Fe(x.x+(r-x.y)/(b.y-x.y)*(b.x-x.x),r)._round()),x.x>=a&&b.x>=a||(x.x>=a?x=new Fe(a,x.y+(a-x.x)/(b.x-x.x)*(b.y-x.y))._round():b.x>=a&&(b=new Fe(a,x.y+(a-x.x)/(b.x-x.x)*(b.y-x.y))._round()),x.y>=l&&b.y>=l||(x.y>=l?x=new Fe(x.x+(l-x.y)/(b.y-x.y)*(b.x-x.x),l)._round():b.y>=l&&(b=new Fe(x.x+(l-x.y)/(b.y-x.y)*(b.x-x.x),l)._round()),g&&x.equals(g[g.length-1])||c.push(g=[x]),g.push(b)))))}return c}function fp(e,t,r,a){var l=[],c=e.image,h=c.pixelRatio,m=c.paddedRect.w-2,g=c.paddedRect.h-2,_=e.right-e.left,x=e.bottom-e.top,b=c.stretchX||[[0,m]],T=c.stretchY||[[0,g]],A=function(nt,Le){return nt+Le[1]-Le[0]},D=b.reduce(A,0),L=T.reduce(A,0),Z=m-D,V=g-L,K=0,J=D,$=0,Q=L,ie=0,pe=Z,de=0,Pe=V;if(c.content&&a){var ye=c.content;K=fu(b,0,ye[0]),$=fu(T,0,ye[1]),J=fu(b,ye[0],ye[2]),Q=fu(T,ye[1],ye[3]),ie=ye[0]-K,de=ye[1]-$,pe=ye[2]-ye[0]-J,Pe=ye[3]-ye[1]-Q}var ke=function(nt,Le,ct,Ft){var Gt=du(nt.stretch-K,J,_,e.left),jt=mu(nt.fixed-ie,pe,nt.stretch,D),Ot=du(Le.stretch-$,Q,x,e.top),Xt=mu(Le.fixed-de,Pe,Le.stretch,L),ur=du(ct.stretch-K,J,_,e.left),cr=mu(ct.fixed-ie,pe,ct.stretch,D),Dr=du(Ft.stretch-$,Q,x,e.top),yr=mu(Ft.fixed-de,Pe,Ft.stretch,L),Lr=new Fe(Gt,Ot),Jt=new Fe(ur,Ot),gr=new Fe(ur,Dr),tt=new Fe(Gt,Dr),wt=new Fe(jt/h,Xt/h),mt=new Fe(cr/h,yr/h),lt=t*Math.PI/180;if(lt){var jr=Math.sin(lt),Sr=Math.cos(lt),Mt=[Sr,-jr,jr,Sr];Lr._matMult(Mt),Jt._matMult(Mt),tt._matMult(Mt),gr._matMult(Mt)}var er=nt.stretch+nt.fixed,Tr=Le.stretch+Le.fixed;return{tl:Lr,tr:Jt,bl:tt,br:gr,tex:{x:c.paddedRect.x+1+er,y:c.paddedRect.y+1+Tr,w:ct.stretch+ct.fixed-er,h:Ft.stretch+Ft.fixed-Tr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wt,pixelOffsetBR:mt,minFontScaleX:pe/h/_,minFontScaleY:Pe/h/x,isSDF:r}};if(a&&(c.stretchX||c.stretchY))for(var ge=dp(b,Z,D),Je=dp(T,V,L),Oe=0;Oe<ge.length-1;Oe++)for(var Ae=ge[Oe],Qe=ge[Oe+1],Ke=0;Ke<Je.length-1;Ke++)l.push(ke(Ae,Je[Ke],Qe,Je[Ke+1]));else l.push(ke({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:m+1},{fixed:0,stretch:g+1}));return l}function fu(e,t,r){for(var a=0,l=0,c=e;l<c.length;l+=1){var h=c[l];a+=Math.max(t,Math.min(r,h[1]))-Math.max(t,Math.min(r,h[0]))}return a}function dp(e,t,r){for(var a=[{fixed:-1,stretch:0}],l=0,c=e;l<c.length;l+=1){var h=c[l],m=h[0],g=h[1],_=a[a.length-1];a.push({fixed:m-_.stretch,stretch:_.stretch}),a.push({fixed:m-_.stretch,stretch:_.stretch+(g-m)})}return a.push({fixed:t+1,stretch:r}),a}function du(e,t,r,a){return e/t*r+a}function mu(e,t,r,a){return e-t*r/a}var yu=function(e,t,r,a,l,c,h,m,g,_){if(this.boxStartIndex=e.length,g){var x=c.top,b=c.bottom,T=c.collisionPadding;T&&(x-=T[1],b+=T[3]);var A=b-x;A>0&&(A=Math.max(10,A),this.circleDiameter=A)}else{var D=c.top*h-m,L=c.bottom*h+m,Z=c.left*h-m,V=c.right*h+m,K=c.collisionPadding;if(K&&(Z-=K[0]*h,D-=K[1]*h,V+=K[2]*h,L+=K[3]*h),_){var J=new Fe(Z,D),$=new Fe(V,D),Q=new Fe(Z,L),ie=new Fe(V,L),pe=_*Math.PI/180;J._rotate(pe),$._rotate(pe),Q._rotate(pe),ie._rotate(pe),Z=Math.min(J.x,$.x,Q.x,ie.x),V=Math.max(J.x,$.x,Q.x,ie.x),D=Math.min(J.y,$.y,Q.y,ie.y),L=Math.max(J.y,$.y,Q.y,ie.y)}e.emplaceBack(t.x,t.y,Z,D,V,L,r,a,l)}this.boxEndIndex=e.length},cs=function(e,t){if(e===void 0&&(e=[]),t===void 0&&(t=yf),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function yf(e,t){return e<t?-1:e>t?1:0}function gf(e,t,r){r===void 0&&(r=!1);for(var a=1/0,l=1/0,c=-1/0,h=-1/0,m=e[0],g=0;g<m.length;g++){var _=m[g];(!g||_.x<a)&&(a=_.x),(!g||_.y<l)&&(l=_.y),(!g||_.x>c)&&(c=_.x),(!g||_.y>h)&&(h=_.y)}var x=Math.min(c-a,h-l),b=x/2,T=new cs([],_f);if(x===0)return new Fe(a,l);for(var A=a;A<c;A+=x)for(var D=l;D<h;D+=x)T.push(new ps(A+b,D+b,b,e));for(var L=(function(K){for(var J=0,$=0,Q=0,ie=K[0],pe=0,de=ie.length,Pe=de-1;pe<de;Pe=pe++){var ye=ie[pe],ke=ie[Pe],ge=ye.x*ke.y-ke.x*ye.y;$+=(ye.x+ke.x)*ge,Q+=(ye.y+ke.y)*ge,J+=3*ge}return new ps($/J,Q/J,0,K)})(e),Z=T.length;T.length;){var V=T.pop();(V.d>L.d||!L.d)&&(L=V,r&&console.log("found best %d after %d probes",Math.round(1e4*V.d)/1e4,Z)),V.max-L.d<=t||(T.push(new ps(V.p.x-(b=V.h/2),V.p.y-b,b,e)),T.push(new ps(V.p.x+b,V.p.y-b,b,e)),T.push(new ps(V.p.x-b,V.p.y+b,b,e)),T.push(new ps(V.p.x+b,V.p.y+b,b,e)),Z+=4)}return r&&(console.log("num probes: "+Z),console.log("best distance: "+L.d)),L.p}function _f(e,t){return t.max-e.max}function ps(e,t,r,a){this.p=new Fe(e,t),this.h=r,this.d=(function(l,c){for(var h=!1,m=1/0,g=0;g<c.length;g++)for(var _=c[g],x=0,b=_.length,T=b-1;x<b;T=x++){var A=_[x],D=_[T];A.y>l.y!=D.y>l.y&&l.x<(D.x-A.x)*(l.y-A.y)/(D.y-A.y)+A.x&&(h=!h),m=Math.min(m,ua(l,A,D))}return(h?1:-1)*Math.sqrt(m)})(this.p,a),this.max=this.d+this.h*Math.SQRT2}cs.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},cs.prototype.pop=function(){if(this.length!==0){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},cs.prototype.peek=function(){return this.data[0]},cs.prototype._up=function(e){for(var t=this.data,r=this.compare,a=t[e];e>0;){var l=e-1>>1,c=t[l];if(r(a,c)>=0)break;t[e]=c,e=l}t[e]=a},cs.prototype._down=function(e){for(var t=this.data,r=this.compare,a=this.length>>1,l=t[e];e<a;){var c=1+(e<<1),h=t[c],m=c+1;if(m<this.length&&r(t[m],h)<0&&(c=m,h=t[m]),r(h,l)>=0)break;t[e]=h,e=c}t[e]=l};var hc=Number.POSITIVE_INFINITY;function mp(e,t){return t[1]!==hc?(function(r,a,l){var c=0,h=0;switch(a=Math.abs(a),l=Math.abs(l),r){case"top-right":case"top-left":case"top":h=l-7;break;case"bottom-right":case"bottom-left":case"bottom":h=7-l}switch(r){case"top-right":case"bottom-right":case"right":c=-a;break;case"top-left":case"bottom-left":case"left":c=a}return[c,h]})(e,t[0],t[1]):(function(r,a){var l=0,c=0;a<0&&(a=0);var h=a/Math.sqrt(2);switch(r){case"top-right":case"top-left":c=h-7;break;case"bottom-right":case"bottom-left":c=7-h;break;case"bottom":c=7-a;break;case"top":c=a-7}switch(r){case"top-right":case"bottom-right":l=-h;break;case"top-left":case"bottom-left":l=h;break;case"left":l=a;break;case"right":l=-a}return[l,c]})(e,t[0])}function fc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function yp(e,t,r,a,l,c,h,m,g,_,x,b,T,A,D){var L=(function($,Q,ie,pe,de,Pe,ye,ke){for(var ge=pe.layout.get("text-rotate").evaluate(Pe,{})*Math.PI/180,Je=[],Oe=0,Ae=Q.positionedLines;Oe<Ae.length;Oe+=1)for(var Qe=Ae[Oe],Ke=0,nt=Qe.positionedGlyphs;Ke<nt.length;Ke+=1){var Le=nt[Ke];if(Le.rect){var ct=Le.rect||{},Ft=4,Gt=!0,jt=1,Ot=0,Xt=(de||ke)&&Le.vertical,ur=Le.metrics.advance*Le.scale/2;if(ke&&Q.verticalizable&&(Ot=Qe.lineOffset/2-(Le.imageName?-(24-Le.metrics.width*Le.scale)/2:24*(Le.scale-1))),Le.imageName){var cr=ye[Le.imageName];Gt=cr.sdf,Ft=1/(jt=cr.pixelRatio)}var Dr=de?[Le.x+ur,Le.y]:[0,0],yr=de?[0,0]:[Le.x+ur+ie[0],Le.y+ie[1]-Ot],Lr=[0,0];Xt&&(Lr=yr,yr=[0,0]);var Jt=(Le.metrics.left-Ft)*Le.scale-ur+yr[0],gr=(-Le.metrics.top-Ft)*Le.scale+yr[1],tt=Jt+ct.w*Le.scale/jt,wt=gr+ct.h*Le.scale/jt,mt=new Fe(Jt,gr),lt=new Fe(tt,gr),jr=new Fe(Jt,wt),Sr=new Fe(tt,wt);if(Xt){var Mt=new Fe(-ur,ur- -17),er=-Math.PI/2,Tr=12-ur,pt=new Fe(22-Tr,-(Le.imageName?Tr:0)),bn=new(Function.prototype.bind.apply(Fe,[null].concat(Lr)));mt._rotateAround(er,Mt)._add(pt)._add(bn),lt._rotateAround(er,Mt)._add(pt)._add(bn),jr._rotateAround(er,Mt)._add(pt)._add(bn),Sr._rotateAround(er,Mt)._add(pt)._add(bn)}if(ge){var bi=Math.sin(ge),wn=Math.cos(ge),Yt=[wn,-bi,bi,wn];mt._matMult(Yt),lt._matMult(Yt),jr._matMult(Yt),Sr._matMult(Yt)}var Sn=new Fe(0,0),Vi=new Fe(0,0);Je.push({tl:mt,tr:lt,bl:jr,br:Sr,tex:ct,writingMode:Q.writingMode,glyphOffset:Dr,sectionIndex:Le.sectionIndex,isSDF:Gt,pixelOffsetTL:Sn,pixelOffsetBR:Vi,minFontScaleX:0,minFontScaleY:0})}}return Je})(0,r,m,l,c,h,a,e.allowVerticalPlacement),Z=e.textSizeData,V=null;Z.kind==="source"?(V=[128*l.layout.get("text-size").evaluate(h,{})])[0]>32640&&qt(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Z.kind==="composite"&&((V=[128*A.compositeTextSizes[0].evaluate(h,{},D),128*A.compositeTextSizes[1].evaluate(h,{},D)])[0]>32640||V[1]>32640)&&qt(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),e.addSymbols(e.text,L,V,m,c,h,_,t,g.lineStartIndex,g.lineLength,T,D);for(var K=0,J=x;K<J.length;K+=1)b[J[K]]=e.text.placedSymbolArray.length-1;return 4*L.length}function gp(e){for(var t in e)return e[t];return null}function vf(e,t,r,a){var l=e.compareText;if(t in l){for(var c=l[t],h=c.length-1;h>=0;h--)if(a.dist(c[h])<r)return!0}else l[t]=[];return l[t].push(a),!1}var xf=os.VectorTileFeature.types,bf=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function gu(e,t,r,a,l,c,h,m,g,_,x,b,T){var A=m?Math.min(32640,Math.round(m[0])):0,D=m?Math.min(32640,Math.round(m[1])):0;e.emplaceBack(t,r,Math.round(32*a),Math.round(32*l),c,h,(A<<1)+(g?1:0),D,16*_,16*x,256*b,256*T)}function dc(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}function wf(e){for(var t=0,r=e.sections;t<r.length;t+=1)if(tu(r[t].text))return!0;return!1}var hs=function(e){this.layoutVertexArray=new Po,this.indexArray=new ni,this.programConfigurations=e,this.segments=new P,this.dynamicLayoutVertexArray=new aa,this.opacityVertexArray=new Qs,this.placedSymbolArray=new p};hs.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},hs.prototype.upload=function(e,t,r,a){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Wh.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,Kh.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,bf,!0),this.opacityVertexBuffer.itemSize=1),(r||a)&&this.programConfigurations.upload(e))},hs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},be("SymbolBuffers",hs);var dl=function(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new P,this.collisionVertexArray=new tl};dl.prototype.upload=function(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,Hh.members,!0)},dl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},be("CollisionBuffers",dl);var vt=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(c){return c.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.s
1ourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=kr([]),this.placementViewportMatrix=kr([]);var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=pc(this.zoom,t["text-size"]),this.iconSizeData=pc(this.zoom,t["icon-size"]);var r=this.layers[0].layout,a=r.get("symbol-sort-key"),l=r.get("symbol-z-order");this.canOverlap=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=l!=="viewport-y"&&!a.isConstant(),this.sortFeaturesByY=(l==="viewport-y"||l==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map((function(c){return xi[c]}))),this.stateDependentLayerIds=this.layers.filter((function(c){return c.isStateDependent()})).map((function(c){return c.id})),this.sourceID=e.sourceID};vt.prototype.createArrays=function(){this.text=new hs(new bt(this.layers,this.zoom,(function(e){return/^text/.test(e)}))),this.icon=new hs(new bt(this.layers,this.zoom,(function(e){return/^icon/.test(e)}))),this.glyphOffsetArray=new y,this.lineVertexArray=new v,this.symbolInstances=new d},vt.prototype.calculateGlyphDependencies=function(e,t,r,a,l){for(var c=0;c<e.length;c++)if(t[e.charCodeAt(c)]=!0,(r||a)&&l){var h=pl[e.charAt(c)];h&&(t[h.charCodeAt(0)]=!0)}},vt.prototype.populate=function(e,t,r){var a=this.layers[0],l=a.layout,c=l.get("text-font"),h=l.get("text-field"),m=l.get("icon-image"),g=(h.value.kind!=="constant"||h.value.value instanceof pr&&!h.value.value.isEmpty()||h.value.value.toString().length>0)&&(c.value.kind!=="constant"||c.value.value.length>0),_=m.value.kind!=="constant"||!!m.value.value||Object.keys(m.parameters).length>0,x=l.get("symbol-sort-key");if(this.features=[],g||_){for(var b=t.iconDependencies,T=t.glyphDependencies,A=t.availableImages,D=new ft(this.zoom),L=0,Z=e;L<Z.length;L+=1){var V=Z[L],K=V.feature,J=V.id,$=V.index,Q=V.sourceLayerIndex,ie=a._featureFilter.needGeometry,pe=wr(K,ie);if(a._featureFilter.filter(D,pe,r)){ie||(pe.geometry=Kt(K));var de=void 0;if(g){var Pe=a.getValueAndResolveTokens("text-field",pe,r,A),ye=pr.factory(Pe);wf(ye)&&(this.hasRTLText=!0),(!this.hasRTLText||Ci()==="unavailable"||this.hasRTLText&&Ut.isParsed())&&(de=Yh(ye,a,pe))}var ke=void 0;if(_){var ge=a.getValueAndResolveTokens("icon-image",pe,r,A);ke=ge instanceof Rr?ge:Rr.fromString(ge)}if(de||ke){var Je=this.sortFeaturesByKey?x.evaluate(pe,{},r):void 0;if(this.features.push({id:J,text:de,icon:ke,index:$,sourceLayerIndex:Q,geometry:pe.geometry,properties:K.properties,type:xf[K.type],sortKey:Je}),ke&&(b[ke.name]=!0),de){var Oe=c.evaluate(pe,{},r).join(","),Ae=l.get("text-rotation-alignment")==="map"&&l.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(xi.vertical)>=0;for(var Qe=0,Ke=de.sections;Qe<Ke.length;Qe+=1){var nt=Ke[Qe];if(nt.image)b[nt.image.name]=!0;else{var Le=Wa(de.toString()),ct=nt.fontStack||Oe,Ft=T[ct]=T[ct]||{};this.calculateGlyphDependencies(nt.text,Ft,Ae,this.allowVerticalPlacement,Le)}}}}}}l.get("symbol-placement")==="line"&&(this.features=(function(Gt){var jt={},Ot={},Xt=[],ur=0;function cr(Mt){Xt.push(Gt[Mt]),ur++}function Dr(Mt,er,Tr){var pt=Ot[Mt];return delete Ot[Mt],Ot[er]=pt,Xt[pt].geometry[0].pop(),Xt[pt].geometry[0]=Xt[pt].geometry[0].concat(Tr[0]),pt}function yr(Mt,er,Tr){var pt=jt[er];return delete jt[er],jt[Mt]=pt,Xt[pt].geometry[0].shift(),Xt[pt].geometry[0]=Tr[0].concat(Xt[pt].geometry[0]),pt}function Lr(Mt,er,Tr){var pt=Tr?er[0][er[0].length-1]:er[0][0];return Mt+":"+pt.x+":"+pt.y}for(var Jt=0;Jt<Gt.length;Jt++){var gr=Gt[Jt],tt=gr.geometry,wt=gr.text?gr.text.toString():null;if(wt){var mt=Lr(wt,tt),lt=Lr(wt,tt,!0);if(mt in Ot&&lt in jt&&Ot[mt]!==jt[lt]){var jr=yr(mt,lt,tt),Sr=Dr(mt,lt,Xt[jr].geometry);delete jt[mt],delete Ot[lt],Ot[Lr(wt,Xt[Sr].geometry,!0)]=Sr,Xt[jr].geometry=null}else mt in Ot?Dr(mt,lt,tt):lt in jt?yr(mt,lt,tt):(cr(Jt),jt[mt]=ur-1,Ot[lt]=ur-1)}else cr(Jt)}return Xt.filter((function(Mt){return Mt.geometry}))})(this.features)),this.sortFeaturesByKey&&this.features.sort((function(Gt,jt){return Gt.sortKey-jt.sortKey}
vendor: 9,237 bytes, line 1
1))}},vt.prototype.update=function(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r))},vt.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},vt.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},vt.prototype.upload=function(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},vt.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},vt.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},vt.prototype.addToLineVertexArray=function(e,t){var r=this.lineVertexArray.length;if(e.segment!==void 0){for(var a=e.dist(t[e.segment+1]),l=e.dist(t[e.segment]),c={},h=e.segment+1;h<t.length;h++)c[h]={x:t[h].x,y:t[h].y,tileUnitDistanceFromAnchor:a},h<t.length-1&&(a+=t[h+1].dist(t[h]));for(var m=e.segment||0;m>=0;m--)c[m]={x:t[m].x,y:t[m].y,tileUnitDistanceFromAnchor:l},m>0&&(l+=t[m-1].dist(t[m]));for(var g=0;g<t.length;g++){var _=c[g];this.lineVertexArray.emplaceBack(_.x,_.y,_.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},vt.prototype.addSymbols=function(e,t,r,a,l,c,h,m,g,_,x,b){for(var T=e.indexArray,A=e.layoutVertexArray,D=e.segments.prepareSegment(4*t.length,A,T,this.canOverlap?c.sortKey:void 0),L=this.glyphOffsetArray.length,Z=D.vertexLength,V=this.allowVerticalPlacement&&h===xi.vertical?Math.PI/2:0,K=c.text&&c.text.sections,J=0;J<t.length;J++){var $=t[J],Q=$.tl,ie=$.tr,pe=$.bl,de=$.br,Pe=$.tex,ye=$.pixelOffsetTL,ke=$.pixelOffsetBR,ge=$.minFontScaleX,Je=$.minFontScaleY,Oe=$.glyphOffset,Ae=$.isSDF,Qe=$.sectionIndex,Ke=D.vertexLength,nt=Oe[1];gu(A,m.x,m.y,Q.x,nt+Q.y,Pe.x,Pe.y,r,Ae,ye.x,ye.y,ge,Je),gu(A,m.x,m.y,ie.x,nt+ie.y,Pe.x+Pe.w,Pe.y,r,Ae,ke.x,ye.y,ge,Je),gu(A,m.x,m.y,pe.x,nt+pe.y,Pe.x,Pe.y+Pe.h,r,Ae,ye.x,ke.y,ge,Je),gu(A,m.x,m.y,de.x,nt+de.y,Pe.x+Pe.w,Pe.y+Pe.h,r,Ae,ke.x,ke.y,ge,Je),dc(e.dynamicLayoutVertexArray,m,V),T.emplaceBack(Ke,Ke+1,Ke+2),T.emplaceBack(Ke+1,Ke+2,Ke+3),D.vertexLength+=4,D.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Oe[0]),J!==t.length-1&&Qe===t[J+1].sectionIndex||e.programConfigurations.populatePaintArrays(A.length,c,c.index,{},b,K&&K[Qe])}e.placedSymbolArray.emplaceBack(m.x,m.y,L,this.glyphOffsetArray.length-L,Z,g,_,m.segment,r?r[0]:0,r?r[1]:0,a[0],a[1],h,0,!1,0,x)},vt.prototype._addCollisionDebugVertex=function(e,t,r,a,l,c){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,a,l,Math.round(c.x),Math.round(c.y))},vt.prototype.addCollisionDebugVertices=function(e,t,r,a,l,c,h){var m=l.segments.prepareSegment(4,l.layoutVertexArray,l.indexArray),g=m.vertexLength,_=l.layoutVertexArray,x=l.collisionVertexArray,b=h.anchorX,T=h.anchorY;this._addCollisionDebugVertex(_,x,c,b,T,new Fe(e,t)),this._addCollisionDebugVertex(_,x,c,b,T,new Fe(r,t)),this._addCollisionDebugVertex(_,x,c,b,T,new Fe(r,a)),this._addCollisionDebugVertex(_,x,c,b,T,new Fe(e,a)),m.vertexLength+=4;var A=l.indexArray;A.emplaceBack(g,g+1),A.emplaceBack(g+1,g+2),A.emplaceBack(g+2,g+3),A.emplaceBack(g+3,g),m.primitiveLength+=4},vt.prototype.addDebugCollisionBoxes=function(e,t,r,a){for(var l=e;l<t;l++){var c=this.collisionBoxArray.get(l);this.addCollisionDebugVertices(c.x1,c.y1,c.x2,c.y2,a?this.textCollisionBox:this.iconCollisionBox,c.anchorPoint,r)}},vt.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new dl(vn,Hc.members,la),this.iconCollisionBox=new dl(vn,Hc.members,la);for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},vt.prototype._deserializeCollisionBoxesForSymbol=function(e,t,r,a,l,c,h,m,g){for(var _={},x=t;x<r;x++){var b=e.get(x);_.textBox={x1:b.x1,y1:b.y1,x2:b.x2,y2:b.y2,anchorPointX:b.anchorPointX,anchorPointY:b.anchorPointY},_.textFeatureIndex=b.featureIndex;break}for(var T=a;T<l;T++){var A=e.get(T);_.verticalTextBox={x1:A.x1,y1:A.y1,x2:A.x2,y2:A.y2,anchorPointX:A.anchorPointX,anchorPointY:A.anchorPointY},_.verticalTextFeatureIndex=A.featureIndex;break}for(var D=c;D<h;D++){var L=e.get(D);_.iconBox={x1:L.x1,y1:L.y1,x2:L.x2,y2:L.y2,anchorPointX:L.anchorPointX,anchorPointY:L.anchorPointY},_.iconFeatureIndex=L.featureIndex;break}for(var Z=m;Z<g;Z++){var V=e.get(Z);_.verticalIconBox={x1:V.x1,y1:V.y1,x2:V.x2,y2:V.y2,anchorPointX:V.anchorPointX,anchorPointY:V.anchorPointY},_.verticalIconFeatureIndex=V.featureIndex;break}return _},vt.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},vt.prototype.hasTextData=function(){return this.text.segments.get().length>0},vt.prototype.hasIconData=function(){return this.icon.segments.get().length>0},vt.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},vt.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},vt.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},vt.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),a=r.vertexStartIndex+4*r.numGlyphs,l=r.vertexStartIndex;l<a;l+=4)e.indexArray.emplaceBack(l,l+1,l+2),e.indexArray.emplaceBack(l+1,l+2,l+3)},vt.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var t=Math.sin(e),r=Math.cos(e),a=[],l=[],c=[],h=0;h<this.symbolInstances.length;++h){c.push(h);var m=this.symbolInstances.get(h);a.push(0|Math.round(t*m.anchorX+r*m.anchorY)),l.push(m.featureIndex)}return c.sort((function(g,_){return a[g]-a[_]||l[_]-l[g]})),c},vt.prototype.addToSortKeyRanges=function(e,t){var r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})},vt.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,a=this.symbolInstanceIndexes;r<a.length;r+=1){var l=this.symbolInstances.get(a[r]);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach((function(c,h,m){c>=0&&m.indexOf(c)===h&&t.addIndicesForPlacedSymbol(t.text,c)})),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)}},be("SymbolBucket",vt,{omit:["layers","collisionBoxArray","features","compareText"]}),vt.MAX_GLYPHS=65535,vt.addDynamicAttributes=dc;var Sf=new Jr({"symbol-placement":new _e(M.layout_symbol["symbol-placement"]),"symbol-spacing":new _e(M.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new _e(M.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ue(M.layout_symbol["symbol-sort-key"]),"symbol-z-order":new _e(M.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new _e(M.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new _e(M.layout_symbol["icon-ignore-placement"]),"icon-optional":new _e(M.layout_symbol["icon-optional"]),"icon-rotation-alignment":new _e(M.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ue(M.layout_symbol["icon-size"]),"icon-text-fit":new _e(M.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new _e(M.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ue(M.layout_symbol["icon-image"]),"icon-rotate":new Ue(M.layout_symbol["icon-rotate"]),"icon-padding":new _e(M.layout_symbol["icon-padding"]),"icon-keep-upright":new _e(M.layout_symbol["icon-keep-upright"]),"icon-offset":new 
1Ue(M.layout_symbol["icon-offset"]),"icon-anchor":new Ue(M.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new _e(M.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new _e(M.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new _e(M.layout_symbol["text-rotation-alignment"]),"text-field":new Ue(M.layout_symbol["text-field"]),"text-font":new Ue(M.layout_symbol["text-font"]),"text-size":new Ue(M.layout_symbol["text-size"]),"text-max-width":new Ue(M.layout_symbol["text-max-width"]),"text-line-height":new _e(M.layout_symbol["text-line-height"]),"text-letter-spacing":new Ue(M.layout_symbol["text-letter-spacing"]),"text-justify":new Ue(M.layout_symbol["text-justify"]),"text-radial-offset":new Ue(M.layout_symbol["text-radial-offset"]),"text-variable-anchor":new _e(M.layout_symbol["text-variable-anchor"]),"text-anchor":new Ue(M.layout_symbol["text-anchor"]),"text-max-angle":new _e(M.layout_symbol["text-max-angle"]),"text-writing-mode":new _e(M.layout_symbol["text-writing-mode"]),"text-rotate":new Ue(M.layout_symbol["text-rotate"]),"text-padding":new _e(M.layout_symbol["text-padding"]),"text-keep-upright":new _e(M.layout_symbol["text-keep-upright"]),"text-transform":new Ue(M.layout_symbol["text-transform"]),"text-offset":new Ue(M.layout_symbol["text-offset"]),"text-allow-overlap":new _e(M.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new _e(M.layout_symbol["text-ignore-placement"]),"text-optional":new _e(M.layout_symbol["text-optional"])}),mc={paint:new Jr({"icon-opacity":new Ue(M.paint_symbol["icon-opacity"]),"icon-color":new Ue(M.paint_symbol["icon-color"]),"icon-halo-color":new Ue(M.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ue(M.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ue(M.paint_symbol["icon-halo-blur"]),"icon-translate":new _e(M.paint_symbol["icon-translate"]),"icon-translate-anchor":new _e(M.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ue(M.paint_symbol["text-opacity"]),"text-color":new Ue(M.paint_symbol["text-color"],{runtimeType:Xe,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new Ue(M.paint_symbol["text-halo-color"]),"text-halo-width":new Ue(M.paint_symbol["text-halo-width"]),"text-halo-blur":new Ue(M.paint_symbol["text-halo-blur"]),"text-translate":new _e(M.paint_symbol["text-translate"]),"text-translate-anchor":new _e(M.paint_symbol["text-translate-anchor"])}),layout:Sf},fs=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:Ce,this.defaultValue=e};fs.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},fs.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},fs.prototype.outputDefined=function(){return!1},fs.prototype.serialize=function(){return null},be("FormatSectionOverride",fs,{omit:["defaultValue"]});var Tf=(function(e){function t(r){e.call(this,r,mc)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(r,a){if(e.prototype.recalculate.call(this,r,a),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")),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"){var l=this.layout.get("text-writing-mode");if(l){for(var c=[],h=0,m=l;h<m.length;h+=1){var g=m[h];c.indexOf(g)<0&&c.push(g)}this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},t.prototype.getValueAndResolveTokens=function(r,a,l,c){var h=this.layout.get(r).evaluate(a,{},l,c),m=this._unevaluatedLayout._values[r];return m.isDataDriven()||Ua(m.value)||!h?h:(function(g,_){return _.replace(/{([^{}]+)}/g,(function(x,b){return b in g?String(g[b]):""}))})(a.properties,h)},t.prototype.createBucket=function(r){return new vt(r)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype._setPaintOverrides=function(){for(var r=0,a=mc.paint.overridableProperties;r<a.length;r+=1){var l=a[r];if(t.hasPaintOverride(this.layout,l)){var c,h=this.paint.get(l),m=new fs(h),g=new Eo(m,h.property.specification);c=h.value.kind==="constant"||h.value.kind==="source"?new Ho("source",g):new Io("composite",g,h.value.zoomStops,h.value._interpolationType),this.paint._values[l]=new ii(h.property,c,h.parameters)}}},t.prototype._handleOverridablePaintPropertyUpdate=function(r,a,l){return!(!this.layout||a.isDataDriven()||l.isDataDriven())&&t.hasPaintOverride(this.layout,r)},t.hasPaintOverride=function(r,a){var l=r.get("text-field"),c=mc.paint.properties[a],h=!1,m=function(x){for(var b=0,T=x;b<T.length;b+=1)if(c.overrides&&c.overrides.hasOverride(T[b]))return void(h=!0)};if(l.value.kind==="constant"&&l.value.value instanceof pr)m(l.value.value.sections);else if(l.value.kind==="source"){var g=function(x){h||(x instanceof di&&ar(x.value)===et?m(x.value.sections):x instanceof Gr?m(x.sections):x.eachChild(g))},_=l.value;_._styleExpression&&g(_._styleExpression.expression)}return h},t})(vi),Ef={paint:new Jr({"background-color":new _e(M.paint_background["background-color"]),"background-pattern":new _i(M.paint_background["background-pattern"]),"background-opacity":new _e(M.paint_background["background-opacity"])})},If=(function(e){function t(r){e.call(this,r,Ef)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(vi),Af={paint:new Jr({"raster-opacity":new _e(M.paint_raster["raster-opacity"]),"raster-hue-rotate":new _e(M.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new _e(M.paint_raster["raster-brightness-min"]),"raster-brightness-max":new _e(M.paint_raster["raster-brightness-max"]),"raster-saturation":new _e(M.paint_raster["raster-saturation"]),"raster-contrast":new _e(M.paint_raster["raster-contrast"]),"raster-resampling":new _e(M.paint_raster["raster-resampling"]),"raster-fade-duration":new _e(M.paint_raster["raster-fade-duration"])})},zf=(function(e){function t(r){e.call(this,r,Af)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(vi),Pf=(function(e){function t(r){e.call(this,r,{}),this.implementation=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},t.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},t.prototype.recalculate=function(){},t.prototype.updateTransitions=function(){},t.prototype.hasTransition=function(){},t.prototype.serialize=function(){},t.prototype.onAdd=function(r){this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},t.prototype.onRemove=function(r){this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},t}
vendor: 14,546 bytes, line 1
1)(vi),Cf={circle:rs,heatmap:hh,hillshade:dh,fill:kh,"fill-extrusion":Vh,line:Xh,symbol:Tf,background:If,raster:zf},_p=ze.HTMLImageElement,vp=ze.HTMLCanvasElement,xp=ze.HTMLVideoElement,bp=ze.ImageData,_u=ze.ImageBitmap,da=function(e,t,r,a){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,a)};da.prototype.update=function(e,t,r){var a=e.width,l=e.height,c=!(this.size&&this.size[0]===a&&this.size[1]===l||r),h=this.context,m=h.gl;if(this.useMipmap=!!(t&&t.useMipmap),m.bindTexture(m.TEXTURE_2D,this.texture),h.pixelStoreUnpackFlipY.set(!1),h.pixelStoreUnpack.set(1),h.pixelStoreUnpackPremultiplyAlpha.set(this.format===m.RGBA&&(!t||t.premultiply!==!1)),c)this.size=[a,l],e instanceof _p||e instanceof vp||e instanceof xp||e instanceof bp||_u&&e instanceof _u?m.texImage2D(m.TEXTURE_2D,0,this.format,this.format,m.UNSIGNED_BYTE,e):m.texImage2D(m.TEXTURE_2D,0,this.format,a,l,0,this.format,m.UNSIGNED_BYTE,e.data);else{var g=r||{x:0,y:0},_=g.x,x=g.y;e instanceof _p||e instanceof vp||e instanceof xp||e instanceof bp||_u&&e instanceof _u?m.texSubImage2D(m.TEXTURE_2D,0,_,x,m.RGBA,m.UNSIGNED_BYTE,e):m.texSubImage2D(m.TEXTURE_2D,0,_,x,a,l,m.RGBA,m.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&m.generateMipmap(m.TEXTURE_2D)},da.prototype.bind=function(e,t,r){var a=this.context.gl;a.bindTexture(a.TEXTURE_2D,this.texture),r!==a.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=a.LINEAR),e!==this.filter&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,e),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,t),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,t),this.wrap=t)},da.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},da.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var yc=function(e){var t=this;this._callback=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1,t._callback()})};yc.prototype.trigger=function(){var e=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){e._triggered=!1,e._callback()}),0))},yc.prototype.remove=function(){delete this._channel,this._callback=function(){}};var ds=function(e,t,r){this.target=e,this.parent=t,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},uo(["receive","process"],this),this.invoker=new yc(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=ei()?e:ze};function wp(e,t,r){var a=2*Math.PI*6378137/256/Math.pow(2,r);return[e*a-2*Math.PI*6378137/2,t*a-2*Math.PI*6378137/2]}ds.prototype.send=function(e,t,r,a,l){var c=this;l===void 0&&(l=!1);var h=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[h]=r);var m=Sa(this.globalScope)?void 0:[];return this.target.postMessage({id:h,type:e,hasCallback:!!r,targetMapId:a,mustQueue:l,sourceMapId:this.mapId,data:Wr(t,m)},m),{cancel:function(){r&&delete c.callbacks[h],c.target.postMessage({id:h,type:"<cancel>",targetMapId:a,sourceMapId:c.mapId})}}},ds.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(t.type==="<cancel>"){delete this.tasks[r];var a=this.cancelCallbacks[r];delete this.cancelCallbacks[r],a&&a()}else ei()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},ds.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},ds.prototype.processTask=function(e,t){var r=this;if(t.type==="<response>"){var a=this.callbacks[e];delete this.callbacks[e],a&&(t.error?a(na(t.error)):a(null,na(t.data)))}else{var l=!1,c=Sa(this.globalScope)?void 0:[],h=t.hasCallback?function(x,b){l=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"<response>",sourceMapId:r.mapId,error:x?Wr(x):null,data:Wr(b,c)},c)}:function(x){l=!0},m=null,g=na(t.data);if(this.parent[t.type])m=this.parent[t.type](t.sourceMapId,g,h);else if(this.parent.getWorkerSource){var _=t.type.split(".");m=this.parent.getWorkerSource(t.sourceMapId,_[0],g.source)[_[1]](g,h)}else h(new Error("Could not find function "+t.type));!l&&m&&m.cancel&&(this.cancelCallbacks[e]=m.cancel)}},ds.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var nr=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};nr.prototype.setNorthEast=function(e){return this._ne=e instanceof Bt?new Bt(e.lng,e.lat):Bt.convert(e),this},nr.prototype.setSouthWest=function(e){return this._sw=e instanceof Bt?new Bt(e.lng,e.lat):Bt.convert(e),this},nr.prototype.extend=function(e){var t,r,a=this._sw,l=this._ne;if(e instanceof Bt)t=e,r=e;else{if(!(e instanceof nr))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(nr.convert(e)):this.extend(Bt.convert(e)):this;if(r=e._ne,!(t=e._sw)||!r)return this}return a||l?(a.lng=Math.min(t.lng,a.lng),a.lat=Math.min(t.lat,a.lat),l.lng=Math.max(r.lng,l.lng),l.lat=Math.max(r.lat,l.lat)):(this._sw=new Bt(t.lng,t.lat),this._ne=new Bt(r.lng,r.lat)),this},nr.prototype.getCenter=function(){return new Bt((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},nr.prototype.getSouthWest=function(){return this._sw},nr.prototype.getNorthEast=function(){return this._ne},nr.prototype.getNorthWest=function(){return new Bt(this.getWest(),this.getNorth())},nr.prototype.getSouthEast=function(){return new Bt(this.getEast(),this.getSouth())},nr.prototype.getWest=function(){return this._sw.lng},nr.prototype.getSouth=function(){return this._sw.lat},nr.prototype.getEast=function(){return this._ne.lng},nr.prototype.getNorth=function(){return this._ne.lat},nr.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},nr.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},nr.prototype.isEmpty=function(){return!(this._sw&&this._ne)},nr.prototype.contains=function(e){var t=Bt.convert(e),r=t.lng,a=t.lat,l=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(l=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&l},nr.convert=function(e){return!e||e instanceof nr?e:new nr(e)};var Bt=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Bt.prototype.wrap=function(){return new Bt(Oo(this.lng,-180,180),this.lat)},Bt.prototype.toArray=function(){return[this.lng,this.lat]},Bt.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Bt.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,a=e.lat*t,l=Math.sin(r)*Math.sin(a)+Math.cos(r)*Math.cos(a)*Math.cos((e.lng-this.lng)*t);return 63710088e-1*Math.acos(Math.min(l,1))},Bt.prototype.toBounds=function(e){e===void 0&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new nr(new Bt(this.lng-r,this.lat-t),new Bt(this.lng+r,this.lat+t))},Bt.convert=function(e){if(e instanceof Bt)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Bt(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new Bt(Number("lng"in e?e.lng:e.lon),Number(e.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>]")};var Sp=2*Math.PI*63710088e-1;function Tp(e){return Sp*Math.cos(e*Math.PI/180)}function Ep(e){return(180+e)/360}function Ip(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Ap(e,t){return e/Tp(t)}function gc(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}var ma=function(e,t,r){r===void 0&&(r=0),this.x=+e,this.y=+t,this.z=+r};ma.fromLngLat=function(e,t){t===void 0&&(t=0);var r=Bt.convert(e);return new ma(Ep(r.lng),Ip(r.lat),Ap(t,r.lat))},ma.prototype.toLngLat=function(){return new Bt(360*this.x-180,gc(this.y))},ma.prototype.toAltitude=function(){return this.z*Tp(gc(this.y))},ma.prototype.meterInMercatorCoordinateUnits=function(){return 1/Sp*(e=gc(this.y),1/Math.cos(e*Math.PI/180));var e};var ya=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=ml(0,e,e,t,r)};ya.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},ya.prototype.url=function(e,t){var r,a,l,c,h,m=(a=this.y,l=this.z,c=wp(256*(r=this.x),256*(a=Math.pow(2,l)-a-1),l),h=wp(256*(r+1),256*(a+1),l),c[0]+","+c[1]+","+h[0]+","+h[1]),g=(function(_,x,b){for(var T,A="",D=_;D>0;D--)A+=(x&(T=1<<D-1)?1:0)+(b&T?2:0);return A})(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(t==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",g).replace("{bbox-epsg-3857}",m)},ya.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new Fe(8192*(e.x*t-this.x),8192*(e.y*t-this.y))},ya.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var zp=function(e,t){this.wrap=e,this.canonical=t,this.key=ml(e,t.z,t.z,t.x,t.y)},or=function(e,t,r,a,l){this.overscaledZ=e,this.wrap=t,this.canonical=new ya(r,+a,+l),this.key=ml(t,e,r,a,l)};function ml(e,t,r,a,l){(e*=2)<0&&(e=-1*e-1);var c=1<<r;return(c*c*e+c*l+a).toString(36)+r.toString(36)+t.toString(36)}or.prototype.equals=function(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)},or.prototype.scaledTo=function(e){var t=this.canonical.z-e;return e>this.canonical.z?new or(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new or(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},or.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?ml(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):ml(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},or.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t},or.prototype.children=function(e){if(this.overscaledZ>=e)return[new or(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,a=2*this.canonical.y;return[new or(t,this.wrap,t,r,a),new or(t,this.wrap,t,r+1,a),new or(t,this.wrap,t,r,a+1),new or(t,this.wrap,t,r+1,a+1)]},or.prototype.isLessThan=function(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))},or.prototype.wrapped=function(){return new or(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},or.prototype.unwrapTo=function(e){return new or(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)},or.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},or.prototype.toUnwrapped=function(){return new zp(this.wrap,this.canonical)},or.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},or.prototype.getTilePoint=function(e){return this.canonical.getTilePoint(new ma(e.x-this.wrap,e.y))},be("CanonicalTileID",ya),be("OverscaledTileID",or,{omit:["posMatrix"]});var ro=function(e,t,r){if(this.uid=e,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(r&&r!=="mapbox"&&r!=="terrarium")return qt('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=t.height;var a=this.dim=t.height-2;this.data=new Uint32Array(t.data.buffer),this.encoding=r||"mapbox";for(var l=0;l<a;l++)this.data[this._idx(-1,l)]=this.data[this._idx(0,l)],this.data[this._idx(a,l)]=this.data[this._idx(a-1,l)],this.data[this._idx(l,-1)]=this.data[this._idx(l,0)],this.data[this._idx(l,a)]=this.data[this._idx(l,a-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(a,-1)]=this.data[this._idx(a-1,0)],this.data[this._idx(-1,a)]=this.data[this._idx(0,a-1)],this.data[this._idx(a,a)]=this.data[this._idx(a-1,a-1)]};ro.prototype.get=function(e,t){var r=new Uint8Array(this.data.buffer),a=4*this._idx(e,t);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(r[a],r[a+1],r[a+2])},ro.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},ro.prototype._idx=function(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},ro.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},ro.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},ro.prototype.getPixels=function(){return new $r({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},ro.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var a=t*this.dim,l=t*this.dim+this.dim,c=r*this.dim,h=r*this.dim+this.dim;switch(t){case-1:a=l-1;break;case 1:l=a+1}switch(r){case-1:c=h-1;break;case 1:h=c+1}for(var m=-t*this.dim,g=-r*this.dim,_=c;_<h;_++)for(var x=a;x<l;x++)this.data[this._idx(x,_)]=e.data[this._idx(x+m,_+g)]},be("DEMData",ro);var vu=function(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}};vu.prototype.encode=function(e){return this._stringToNumber[e]},vu.prototype.decode=function(e){return this._numberToString[e]};var xu=function(e,t,r,a,l){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=a,this.properties=e.properties,this.id=l},_c={geometry:{configurable:!0}};_c.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}
1,_c.geometry.set=function(e){this._geometry=e},xu.prototype.toJSON=function(){var e={geometry:this.geometry};for(var t in this)t!=="_geometry"&&t!=="_vectorTileFeature"&&(e[t]=this[t]);return e},Object.defineProperties(xu.prototype,_c);var ms=function(){this.state={},this.stateChanges={},this.deletedStates={}};ms.prototype.updateState=function(e,t,r){var a=String(t);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][a]=this.stateChanges[e][a]||{},_r(this.stateChanges[e][a],r),this.deletedStates[e]===null)for(var l in this.deletedStates[e]={},this.state[e])l!==a&&(this.deletedStates[e][l]=null);else if(this.deletedStates[e]&&this.deletedStates[e][a]===null)for(var c in this.deletedStates[e][a]={},this.state[e][a])r[c]||(this.deletedStates[e][a][c]=null);else for(var h in r)this.deletedStates[e]&&this.deletedStates[e][a]&&this.deletedStates[e][a][h]===null&&delete this.deletedStates[e][a][h]},ms.prototype.removeFeatureState=function(e,t,r){if(this.deletedStates[e]!==null){var a=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&t!==void 0)this.deletedStates[e][a]!==null&&(this.deletedStates[e][a]=this.deletedStates[e][a]||{},this.deletedStates[e][a][r]=null);else if(t!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][a])for(r in this.deletedStates[e][a]={},this.stateChanges[e][a])this.deletedStates[e][a][r]=null;else this.deletedStates[e][a]=null;else this.deletedStates[e]=null}},ms.prototype.getState=function(e,t){var r=String(t),a=_r({},(this.state[e]||{})[r],(this.stateChanges[e]||{})[r]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){var l=this.deletedStates[e][t];if(l===null)return{};for(var c in l)delete a[c]}return a},ms.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},ms.prototype.coalesceChanges=function(e,t){var r={};for(var a in this.stateChanges){this.state[a]=this.state[a]||{};var l={};for(var c in this.stateChanges[a])this.state[a][c]||(this.state[a][c]={}),_r(this.state[a][c],this.stateChanges[a][c]),l[c]=this.state[a][c];r[a]=l}for(var h in this.deletedStates){this.state[h]=this.state[h]||{};var m={};if(this.deletedStates[h]===null)for(var g in this.state[h])m[g]={},this.state[h][g]={};else for(var _ in this.deletedStates[h]){if(this.deletedStates[h][_]===null)this.state[h][_]={};else for(var x=0,b=Object.keys(this.deletedStates[h][_]);x<b.length;x+=1)delete this.state[h][_][b[x]];m[_]=this.state[h][_]}r[h]=r[h]||{},_r(r[h],m)}if(this.stateChanges={},this.deletedStates={},Object.keys(r).length!==0)for(var T in e)e[T].setFeatureState(r,t)};var io=function(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new br(8192,16,0),this.grid3D=new br(8192,16,0),this.featureIndexArray=new z,this.promoteId=t};function Pp(e,t,r,a,l){return Er(e,(function(c,h){var m=t instanceof Jn?t.get(h):null;return m&&m.evaluate?m.evaluate(r,a,l):m}))}function Cp(e){for(var t=1/0,r=1/0,a=-1/0,l=-1/0,c=0,h=e;c<h.length;c+=1){var m=h[c];t=Math.min(t,m.x),r=Math.min(r,m.y),a=Math.max(a,m.x),l=Math.max(l,m.y)}return{minX:t,minY:r,maxX:a,maxY:l}}function kf(e,t){return t-e}io.prototype.insert=function(e,t,r,a,l,c){var h=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,a,l);for(var m=c?this.grid3D:this.grid,g=0;g<t.length;g++){for(var _=t[g],x=[1/0,1/0,-1/0,-1/0],b=0;b<_.length;b++){var T=_[b];x[0]=Math.min(x[0],T.x),x[1]=Math.min(x[1],T.y),x[2]=Math.max(x[2],T.x),x[3]=Math.max(x[3],T.y)}x[0]<8192&&x[1]<8192&&x[2]>=0&&x[3]>=0&&m.insert(h,x[0],x[1],x[2],x[3])}},io.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new os.VectorTile(new lu(this.rawTileData)).layers,this.sourceLayerCoder=new vu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},io.prototype.query=function(e,t,r,a){var l=this;this.loadVTLayers();for(var c=e.params||{},h=8192/e.tileSize/e.scale,m=Na(c.filter),g=e.queryGeometry,_=e.queryPadding*h,x=Cp(g),b=this.grid.query(x.minX-_,x.minY-_,x.maxX+_,x.maxY+_),T=Cp(e.cameraQueryGeometry),A=this.grid3D.query(T.minX-_,T.minY-_,T.maxX+_,T.maxY+_,(function($,Q,ie,pe){return(function(de,Pe,ye,ke,ge){for(var Je=0,Oe=de;Je<Oe.length;Je+=1){var Ae=Oe[Je];if(Pe<=Ae.x&&ye<=Ae.y&&ke>=Ae.x&&ge>=Ae.y)return!0}var Qe=[new Fe(Pe,ye),new Fe(Pe,ge),new Fe(ke,ge),new Fe(ke,ye)];if(de.length>2){for(var Ke=0,nt=Qe;Ke<nt.length;Ke+=1)if(Ui(de,nt[Ke]))return!0}for(var Le=0;Le<de.length-1;
1Le++)if(Mo(de[Le],de[Le+1],Qe))return!0;return!1})(e.cameraQueryGeometry,$-_,Q-_,ie+_,pe+_)})),D=0,L=A;D<L.length;D+=1)b.push(L[D]);b.sort(kf);for(var Z,V={},K=function($){var Q=b[$];if(Q!==Z){Z=Q;var ie=l.featureIndexArray.get(Q),pe=null;l.loadMatchingFeature(V,ie.bucketIndex,ie.sourceLayerIndex,ie.featureIndex,m,c.layers,c.availableImages,t,r,a,(function(de,Pe,ye){return pe||(pe=Kt(de)),Pe.queryIntersectsFeature(g,de,ye,pe,l.z,e.transform,h,e.pixelPosMatrix)}))}},J=0;J<b.length;J++)K(J);return V},io.prototype.loadMatchingFeature=function(e,t,r,a,l,c,h,m,g,_,x){var b=this.bucketLayerIDs[t];if(!c||(function(de,Pe){for(var ye=0;ye<de.length;ye++)if(Pe.indexOf(de[ye])>=0)return!0;return!1})(c,b)){var T=this.sourceLayerCoder.decode(r),A=this.vtLayers[T].feature(a);if(l.needGeometry){var D=wr(A,!0);if(!l.filter(new ft(this.tileID.overscaledZ),D,this.tileID.canonical))return}else if(!l.filter(new ft(this.tileID.overscaledZ),A))return;for(var L=this.getId(A,T),Z=0;Z<b.length;Z++){var V=b[Z];if(!(c&&c.indexOf(V)<0)){var K=m[V];if(K){var J={};L!==void 0&&_&&(J=_.getState(K.sourceLayer||"_geojsonTileLayer",L));var $=_r({},g[V]);$.paint=Pp($.paint,K.paint,A,J,h),$.layout=Pp($.layout,K.layout,A,J,h);var Q=!x||x(A,K,J);if(Q){var ie=new xu(A,this.z,this.x,this.y,L);ie.layer=$;var pe=e[V];pe===void 0&&(pe=e[V]=[]),pe.push({featureIndex:a,feature:ie,intersectionZ:Q})}}}}}},io.prototype.lookupSymbolFeatures=function(e,t,r,a,l,c,h,m){var g={};this.loadVTLayers();for(var _=Na(l),x=0,b=e;x<b.length;x+=1)this.loadMatchingFeature(g,r,a,b[x],_,c,h,m,t);return g},io.prototype.hasLayer=function(e){for(var t=0,r=this.bucketLayerIDs;t<r.length;t+=1)for(var a=0,l=r[t];a<l.length;a+=1)if(e===l[a])return!0;return!1},io.prototype.getId=function(e,t){var r=e.id;return this.promoteId&&typeof(r=e.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[t]]
1)=="boolean"&&(r=Number(r)),r},be("FeatureIndex",io,{omit:["rawTileData","sourceLayerCoder"]});var mr=function(e,t){this.tileID=e,this.uid=so(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};mr.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t<qi.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)},mr.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},mr.prototype.loadVectorData=function(e,t,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(var a in 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(_,x){var b={};if(!x)return b;for(var T=function(){var L=D[A],Z=L.layerIds.map((function(J){return x.getLayer(J)})).filter(Boolean);if(Z.length!==0){L.layers=Z,L.stateDependentLayerIds&&(L.stateDependentLayers=L.stateDependentLayerIds.map((function(J){return Z.filter((function($){return $.id===J}))[0]})));for(var V=0,K=Z;V<K.length;V+=1)b[K[V].id]=L}},A=0,D=_;A<D.length;A+=1)T();return b})(e.buckets,t.style),this.hasSymbolBuckets=!1,this.buckets){var l=this.buckets[a];if(l instanceof vt){if(this.hasSymbolBuckets=!0,!r)break;l.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var c in this.buckets){var h=this.buckets[c];if(h instanceof vt&&h.hasRTLText){this.hasRTLText=!0,Ut.isLoading()||Ut.isLoaded()||Ci()!=="deferred"||ru();break}}for(var m in this.queryPadding=0,this.buckets){var g=this.buckets[m];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(m).queryRadius(g))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new n},mr.prototype.unloadVectorData=function(){for(var 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"},mr.prototype.getBucket=function(e){return this.buckets[e.id]},mr.prototype.upload=function(e){for(var t in this.buckets){var r=this.buckets[t];r.uploadPending()&&r.upload(e)}var a=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new da(e,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new da(e,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null)},mr.prototype.prepare=function(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)},mr.prototype.queryRenderedFeatures=function(e,t,r,a,l,c,h,m,g,_){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:a,cameraQueryGeometry:l,scale:c,tileSize:this.tileSize,pixelPosMatrix:_,transform:m,params:h,queryPadding:this.queryPadding*g},e,t,r):{}},mr.prototype.querySourceFeatures=function(e,t){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var a=r.loadVTLayers(),l=t?t.sourceLayer:"",c=a._geojsonTileLayer||a[l];if(c)for(var h=Na(t&&t.filter),m=this.tileID.canonical,g=m.z,_=m.x,x=m.y,b={z:g,x:_,y:x},T=0;T<c.length;T++){var A=c.feature(T);if(h.needGeometry){var D=wr(A,!0);if(!h.filter(new ft(this.tileID.overscaledZ),D,this.tileID.canonical))continue}else if(!h.filter(new ft(this.tileID.overscaledZ),A))continue;var L=r.getId(A,l),Z=new xu(A,g,_,x,L);Z.tile=b,e.push(Z)}}},mr.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},mr.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},mr.prototype.setExpiryData=function(e){var t=this.expirationTime;
vendor: 7,858 bytes, line 1
1if(e.cacheControl){var r=po(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var a=Date.now(),l=!1;if(this.expirationTime>a)l=!1;else if(t)if(this.expirationTime<t)l=!0;else{var c=this.expirationTime-t;c?this.expirationTime=a+Math.max(c,3e4):l=!0}else l=!0;l?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},mr.prototype.getExpiryTimeout=function(){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)},mr.prototype.setFeatureState=function(e,t){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(e).length!==0){var r=this.latestFeatureIndex.loadVTLayers();for(var a in this.buckets)if(t.style.hasLayer(a)){var l=this.buckets[a],c=l.layers[0].sourceLayer||"_geojsonTileLayer",h=r[c],m=e[c];if(h&&m&&Object.keys(m).length!==0){l.update(m,h,this.imageAtlas&&this.imageAtlas.patternPositions||{});var g=t&&t.style&&t.style.getLayer(a);g&&(this.queryPadding=Math.max(this.queryPadding,g.queryRadius(l)))}}}},mr.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},mr.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<qi.now()},mr.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},mr.prototype.setHoldDuration=function(e){this.symbolFadeHoldUntil=qi.now()+e},mr.prototype.setDependencies=function(e,t){for(var r={},a=0,l=t;a<l.length;a+=1)r[l[a]]=!0;this.dependencies[e]=r},mr.prototype.hasDependency=function(e,t){for(var r=0,a=e;r<a.length;r+=1){var l=this.dependencies[a[r]];if(l){for(var c=0,h=t;c<h.length;c+=1)if(l[h[c]])return!0}}return!1};var Lo=ze.performance,kp=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},Lo.mark(this._marks.start)};kp.prototype.finish=function(){Lo.mark(this._marks.end);var e=Lo.getEntriesByName(this._marks.measure);return e.length===0&&(Lo.measure(this._marks.measure,this._marks.start,this._marks.end),e=Lo.getEntriesByName(this._marks.measure),Lo.clearMarks(this._marks.start),Lo.clearMarks(this._marks.end),Lo.clearMeasures(this._marks.measure)),e},u.Actor=ds,u.AlphaImage=fa,u.CanonicalTileID=ya,u.CollisionBoxArray=n,u.Color=rt,u.DEMData=ro,u.DataConstantProperty=_e,u.DictionaryCoder=vu,u.EXTENT=8192,u.ErrorEvent=W,u.EvaluationParameters=ft,u.Event=G,u.Evented=q,u.FeatureIndex=io,u.FillBucket=$i,u.FillExtrusionBucket=Qi,u.ImageAtlas=fl,u.ImagePosition=cu,u.LineBucket=Nr,u.LngLat=Bt,u.LngLatBounds=nr,u.MercatorCoordinate=ma,u.ONE_EM=24,u.OverscaledTileID=or,u.Point=Fe,u.Point$1=Fe,u.Properties=Jr,u.Protobuf=lu,u.RGBAImage=$r,u.RequestManager=Ar,u.RequestPerformance=kp,u.ResourceType=Aa,u.SegmentVector=P,u.SourceFeatureState=ms,u.StructArrayLayout1ui2=Qa,u.StructArrayLayout2f1f2i16=el,u.StructArrayLayout2i4=oa,u.StructArrayLayout3ui6=ni,u.StructArrayLayout4i8=Hi,u.SymbolBucket=vt,u.Texture=da,u.Tile=mr,u.Transitionable=ri,u.Uniform1f=ce,u.Uniform1i=he,u.Uniform2f=ve,u.Uniform3f=Me,u.Uniform4f=Re,u.UniformColor=De,u.UniformMatrix4f=Ee,u.UnwrappedTileID=zp,u.ValidationError=U,u.WritingMode=xi,u.ZoomHistory=Or,u.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},u.addDynamicAttributes=dc,u.asyncAll=function(e,t,r){if(!e.length)return r(null,[]);var a=e.length,l=new Array(e.length),c=null;e.forEach((function(h,m){t(h,(function(g,_){g&&(c=g),l[m]=_,--a==0&&r(c,l)}))}))},u.bezier=ui,u.bindAll=uo,u.browser=qi,u.cacheEntryPossiblyAdded=function(e){++qo>Ia&&(e.getActor().send("enforceCacheSizeLimit",yo),qo=0)},u.clamp=qr,u.clearTileCache=function(e){var t=ze.caches.delete("mapbox-tiles");e&&t.catch(e).then((function(){return e()}))},u.clipLine=hp,u.clone=function(e){var t=new Zt(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},u.clone$1=Si,u.clone$2=function(e){var t=new Zt(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},u.collisionCircleLayout=Jh,u.config=gt,u.create=function(){var e=new Zt(16);return Zt!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},u.create$1=function(){var e=new Zt(9);return Zt!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},u.create$2=function(){var e=new Zt(4);return Zt!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},u.createCommonjsModule=St,u.createExpression=Va,u.createLayout=dr,u.createStyleLayer=function(e){return e.type==="custom"?new Pf(e):new Cf[e.type](e)},u.cross=function(e,t,r){var a=t[0],l=t[1],c=t[2],h=r[0],m=r[1],g=r[2];return e[0]=l*g-c*m,e[1]=c*h-a*g,e[2]=a*m-l*h,e},u.deepEqual=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(!e(t[a],r[a]))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(var l in t)if(!e(t[l],r[l]))return!1;return!0}return t===r},u.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},u.dot$1=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},u.ease=An,u.emitValidationErrors=ra,u.endsWith=zn,u.enforceCacheSizeLimit=function(e){go(),fi&&fi.then((function(t){t.keys().then((function(r){for(var a=0;a<r.length-e;a++)t.delete(r[a])}))}))},u.evaluateSizeForFeature=ap,u.evaluateSizeForZoom=sp,u.evaluateVariableOffset=mp,u.evented=Ys,u.extend=_r,u.featureFilter=Na,u.filterObject=ji,u.fromRotation=function(e,t){var r=Math.sin(t),a=Math.cos(t);return e[0]=a,e[1]=r,e[2]=0,e[3]=-r,e[4]=a,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},u.getAnchorAlignment=cc,u.getAnchorJustification=fc,u.getArrayBuffer=Vt,u.getImage=I,u.getJSON=function(e,t){return _o(_r(e,{type:"json"}),t)},u.getRTLTextPluginStatus=Ci,u.getReferrer=Ln,u.getVideo=function(e,t){var r,a,l=ze.document.createElement("video");l.muted=!0,l.onloadstart=function(){t(null,l)};for(var c=0;c<e.length;c++){var h=ze.document.createElement("source");r=e[c],a=void 0,(a=ze.document.createElement("a")).href=r,(a.protocol!==ze.document.location.protocol||a.host!==ze.document.location.host)&&(l.crossOrigin="Anonymous"),h.src=e[c],l.appendChild(h)}return{cancel:function(){}}},u.identity=kr,u.invert=function(e,t){var r=t[0],a=t[1],l=t[2],c=t[3],h=t[4],m=t[5],g=t[6],_=t[7],x=t[8],b=t[9],T=t[10],A=t[11],D=t[12],L=t[13],Z=t[14],V=t[15],K=r*m-a*h,J=r*g-l*h,$=r*_-c*h,Q=a*g-l*m,ie=a*_-c*m,pe=l*_-c*g,de=x*L-b*D,Pe=x*Z-T*D,ye=x*V-A*D,ke=b*Z-T*L,ge=b*V-A*L,Je=T*V-A*Z,Oe=K*Je-J*ge+$*ke+Q*ye-ie*Pe+pe*de;return Oe?(e[0]=(m*Je-g*ge+_*ke)*(Oe=1/Oe),e[1]=(l*ge-a*Je-c*ke)*Oe,e[2]=(L*pe-Z*ie+V*Q)*Oe,e[3]=(T*ie-b*pe-A*Q)*Oe,e[4]=(g*ye-h*Je-_*Pe)*Oe,e[5]=(r*Je-l*ye+c*Pe)*Oe,e[6]=(Z*$-D*pe-V*J)*Oe,e[7]=(x*pe-T*$+A*J)*Oe,e[8]=(h*ge-m*ye+_*de)*Oe,e[9]=(a*ye-r*ge-c*de)*Oe,e[10]=(D*ie-L*$+V*K)*Oe,e[11]=(b*$-x*ie-A*K)*Oe,e[12]=(m*Pe-h*ke-g*de)*Oe,e[13]=(r*ke-a*Pe+l*de)*Oe,e[14]=(L*J-D*Q-Z*K)*Oe,e[15]=(x*Q-b*J+T*K)*Oe,e):null},u.isChar=Te,u.isMapboxURL=ci,u.keysDifference=function(e,t){var r=[];for(var a in e)a in t||r.push(a);return r},u.makeRequest=_o,u.mapObject=Er,u.mercatorXfromLng=Ep,u.mercatorYfromLat=Ip,u.mercatorZfromAltitude=Ap,u.mul=Qu,u.multiply=ca,u.mvt=os,u.nextPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},u.normalize=function(e,t){var r=t[0],a=t[1],l=t[2],c=r*r+a*a+l*l;return c>0&&(c=1/Math.sqrt(c)),e[0]=t[0]*c,e[1]=t[1]*c,e[2]=t[2]*c,e},u.number=Qt,u.offscreenCanvasSupported=Zo,u.ortho=function(e,t,r,a,l,c,h){var m=1/(t-r),g=1/(a-l),_=1/(c-h);return e[0]=-2*m,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*g,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
1]=2*_,e[11]=0,e[12]=(t+r)*m,e[13]=(l+a)*g,e[14]=(h+c)*_,e[15]=1,e},u.parseGlyphPBF=function(e){return new lu(e).readFields(lf,[])},u.pbf=lu,u.performSymbolLayout=function(e,t,r,a,l,c,h){e.createArrays(),e.tilePixelRatio=8192/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;var m=e.layers[0].layout,g=e.layers[0]._unevaluatedLayout._values,_={};if(e.textSizeData.kind==="composite"){var x=e.textSizeData,b=x.maxZoom;_.compositeTextSizes=[g["text-size"].possiblyEvaluate(new ft(x.minZoom),h),g["text-size"].possiblyEvaluate(new ft(b),h)]}if(e.iconSizeData.kind==="composite"){var T=e.iconSizeData,A=T.maxZoom;_.compositeIconSizes=[g["icon-size"].possiblyEvaluate(new ft(T.minZoom),h),g["icon-size"].possiblyEvaluate(new ft(A),h)]}_.layoutTextSize=g["text-size"].possiblyEvaluate(new ft(e.zoom+1),h),_.layoutIconSize=g["icon-size"].possiblyEvaluate(new ft(e.zoom+1),h),_.textMaxSize=g["text-size"].possiblyEvaluate(new ft(18));for(var D=24*m.get("text-line-height"),L=m.get("text-rotation-alignment")==="map"&&m.get("symbol-placement")!=="point",Z=m.get("text-keep-upright"),V=m.get("text-size"),K=function(){var Q=$[J],ie=m.get("text-font").evaluate(Q,{},h).join(","),pe=V.evaluate(Q,{},h),de=_.layoutTextSize.evaluate(Q,{},h),Pe=_.layoutIconSize.evaluate(Q,{},h),ye={horizontal:{},vertical:void 0},ke=Q.text,ge=[0,0];if(ke){var Je=ke.toString(),Oe=24*m.get("text-letter-spacing").evaluate(Q,{},h),Ae=(function(tt){for(var wt=0,mt=tt;wt<mt.length;wt+=1)if(lt=mt[wt].charCodeAt(0),Te.Arabic(lt)||Te["Arabic Supplement"](lt)||Te["Arabic Extended-A"](lt)||Te["Arabic Presentation Forms-A"](lt)||Te["Arabic Presentation Forms-B"](lt))return!1;var lt;return!0})(Je)?Oe:0,Qe=m.get("text-anchor").evaluate(Q,{},h),Ke=m.get("text-variable-anchor");if(!Ke){var nt=m.get("text-radial-offset").evaluate(Q,{},h);ge=nt?mp(Qe,[24*nt,hc]):m.get("text-offset").evaluate(Q,{},h).map((function(tt){return 24*tt}))}var Le=L?"center":m.get("text-justify").evaluate(Q,{},h),ct=m.get("symbol-placement"),Ft=ct==="point"?24*m.get("text-max-width").evaluate(Q,{},h):0,Gt=function(){e.allowVerticalPlacement&&Wa(Je)&&(ye.vertical=pu(ke,t,r,l,ie,Ft,D,Qe,"left",Ae,ge,xi.vertical,!0,ct,de,pe))};if(!L&&Ke){for(var jt=Le==="auto"?Ke.map((function(tt){return fc(tt)})):[Le],Ot=!1,Xt=0;Xt<jt.length;Xt++){var ur=jt[Xt];if(!ye.horizontal[ur])if(Ot)ye.horizontal[ur]=ye.horizontal[0];else{var cr=pu(ke,t,r,l,ie,Ft,D,"center",ur,Ae,ge,xi.horizontal,!1,ct,de,pe);cr&&(ye.horizontal[ur]=cr,Ot=cr.positionedLines.length===1)}}Gt()}else{Le==="auto"&&(Le=fc(Qe));var Dr=pu(ke,t,r,l,ie,Ft,D,Qe,Le,Ae,ge,xi.horizontal,!1,ct,de,pe);Dr&&(ye.horizontal[Le]=Dr),Gt(),Wa(Je)&&L&&Z&&(ye.vertical=pu(ke,t,r,l,ie,Ft,D,Qe,Le,Ae,ge,xi.vertical,!1,ct,de,pe))}}var yr=void 0,Lr=!1;if(Q.icon&&Q.icon.name){var Jt=a[Q.icon.name];Jt&&(yr=(function(tt,wt,mt){var lt=cc(mt),jr=wt[0]-tt.displaySize[0]*lt.horizontalAlign,Sr=wt[1]-tt.displaySize[1]*lt.verticalAlign;return{image:tt,top:Sr,bottom:Sr+tt.displaySize[1],left:jr,right:jr+tt.displaySize[0]}})(l[Q.icon.name],m.get("icon-offset").evaluate(Q,{},h),m.get("icon-anchor").evaluate(Q,{},h)),Lr=Jt.sdf,e.sdfIcons===void 0?e.sdfIcons=Jt.sdf:e.sdfIcons!==Jt.sdf&&qt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Jt.pixelRatio!==e.pixelRatio||m.get("icon-rotate").constantOr(1)!==0)&&(e.iconsNeedLinear=!0))}var gr=gp(ye.horizontal)||ye.vertical;e.iconsInText=!!gr&&gr.iconsInText,(gr||yr)&&(function(tt,wt,mt,lt,jr,Sr,Mt,er,Tr,pt,bn){var bi=Sr.textMaxSize.evaluate(wt,{});bi===void 0&&(bi=Mt);var wn,Yt=tt.layers[0].layout,Sn=Yt.get("icon-offset").evaluate(wt,{},bn),Vi=gp(mt.horizontal),ys=Mt/24,ga=tt.tilePixelRatio*ys,gs=tt.tilePixelRatio*bi/24,no=tt.tilePixelRatio*er,_s=tt.tilePixelRatio*Yt.get("symbol-spacing"),bu=Yt.get("text-padding")*tt.tilePixelRatio,vs=Yt.get("icon-padding")*tt.tilePixelRatio,yl=Yt.get("text-max-angle")/180*Math.PI,wu=Yt.get("text-rotation-alignment")==="map"&&Yt.get("symbol-placement")!=="point",Su=Yt.get("icon-rotation-alignment")==="map"&&Yt.get("symbol-placement")!=="point",oo=Yt.get("symbol-placement"),gl=_s/2,xs=Yt.get("icon-text-fit");lt&&xs!=="none"&&(tt.allowVerticalPlacement&&mt.vertical&&(wn=op(lt,mt.vertical,xs,Yt.get("icon-text-fit-padding"),Sn,ys)),Vi&&(lt=op(lt,Vi,xs,Yt.get("icon-text-fit-padding"),Sn,ys)));var Ro=function(Mf,El){El.x<0||El.x>=8192||El.y<0||El.y>=8192||(function($t,en,Df,Bo,wc,Lp,Pu,Tn,Cu,Il,ku,Mu,Sc,Rp,Al,Bp,Fp,Op,Up,Vp,wi,Du,Np,En,Lf){var jp,va,Es,Is,As,zs=$t.addToLineVertexArray(en,Df),qp=0,Zp=0,Gp=0,Xp=0,Tc=-1,Ec=-1,ao={},Wp=N(""),Ic=0,Ac=0;if(Tn._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Ic=(jp=Tn.layout.get("text-offset").evaluate(wi,{},En).map((function(Pl){return 24*Pl}
1)))[0],Ac=jp[1]):(Ic=24*Tn.layout.get("text-radial-offset").evaluate(wi,{},En),Ac=hc),$t.allowVerticalPlacement&&Bo.vertical){var Kp=Tn.layout.get("text-rotate").evaluate(wi,{},En)+90;Is=new yu(Cu,en,Il,ku,Mu,Bo.vertical,Sc,Rp,Al,Kp),Pu&&(As=new yu(Cu,en,Il,ku,Mu,Pu,Fp,Op,Al,Kp))}if(wc){var zc=Tn.layout.get("icon-rotate").evaluate(wi,{}),Hp=Tn.layout.get("icon-text-fit")!=="none",Jp=fp(wc,zc,Np,Hp),Pc=Pu?fp(Pu,zc,Np,Hp):void 0;Es=new yu(Cu,en,Il,ku,Mu,wc,Fp,Op,!1,zc),qp=4*Jp.length;var Yp=$t.iconSizeData,zl=null;Yp.kind==="source"?(zl=[128*Tn.layout.get("icon-size").evaluate(wi,{})])[0]>32640&&qt($t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Yp.kind==="composite"&&((zl=[128*Du.compositeIconSizes[0].evaluate(wi,{},En),128*Du.compositeIconSizes[1].evaluate(wi,{},En)])[0]>32640||zl[1]>32640)&&qt($t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),$t.addSymbols($t.icon,Jp,zl,Vp,Up,wi,!1,en,zs.lineStartIndex,zs.lineLength,-1,En),Tc=$t.icon.placedSymbolArray.length-1,Pc&&(Zp=4*Pc.length,$t.addSymbols($t.icon,Pc,zl,Vp,Up,wi,xi.vertical,en,zs.lineStartIndex,zs.lineLength,-1,En),Ec=$t.icon.placedSymbolArray.length-1)}for(var $p in Bo.horizontal){var Lu=Bo.horizontal[$p];if(!va){Wp=N(Lu.text);var Rf=Tn.layout.get("text-rotate").evaluate(wi,{},En);va=new yu(Cu,en,Il,ku,Mu,Lu,Sc,Rp,Al,Rf)}var Qp=Lu.positionedLines.length===1;if(Gp+=yp($t,en,Lu,Lp,Tn,Al,wi,Bp,zs,Bo.vertical?xi.horizontal:xi.horizontalOnly,Qp?Object.keys(Bo.horizontal):[$p],ao,Tc,Du,En),Qp)break}Bo.vertical&&(Xp+=yp($t,en,Bo.vertical,Lp,Tn,Al,wi,Bp,zs,xi.vertical,["vertical"],ao,Ec,Du,En));var Bf=va?va.boxStartIndex:$t.collisionBoxArray.length,Ff=va?va.boxEndIndex:$t.collisionBoxArray.length,Of=Is?Is.boxStartIndex:$t.collisionBoxArray.length,Uf=Is?Is.boxEndIndex:$t.collisionBoxArray.length,Vf=Es?Es.boxStartIndex:$t.collisionBoxArray.length,Nf=Es?Es.boxEndIndex:$t.collisionBoxArray.length,jf=As?As.boxStartIndex:$t.collisionBoxArray.length,qf=As?As.boxEndIndex:$t.collisionBoxArray.length,In=-1,Ru=function(Pl,th){return Pl&&Pl.circleDiameter?Math.max(Pl.circleDiameter,th):th};In=Ru(va,In),In=Ru(Is,In),In=Ru(Es,In);var eh=(In=Ru(As,In))>-1?1:0;eh&&(In*=Lf/24),$t.glyphOffsetArray.length>=vt.MAX_GLYPHS&&qt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),wi.sortKey!==void 0&&$t.addToSortKeyRanges($t.symbolInstances.length,wi.sortKey),$t.symbolInstances.emplaceBack(en.x,en.y,ao.right>=0?ao.right:-1,ao.center>=0?ao.center:-1,ao.left>=0?ao.left:-1,ao.vertical||-1,Tc,Ec,Wp,Bf,Ff,Of,Uf,Vf,Nf,jf,qf,Il,Gp,Xp,qp,Zp,eh,0,Sc,Ic,Ac,In)})(tt,El,Mf,mt,lt,jr,wn,tt.layers[0],tt.collisionBoxArray,wt.index,wt.sourceLayerIndex,tt.index,ga,bu,wu,Tr,no,vs,Su,Sn,wt,Sr,pt,bn,Mt)};if(oo==="line")for(var bs=0,Tu=hp(wt.geometry,0,0,8192,8192);bs<Tu.length;bs+=1)for(var Eu=Tu[bs],_l=0,vl=mf(Eu,_s,yl,mt.vertical||Vi,lt,24,gs,tt.overscaling,8192);_l<vl.length;_l+=1){var Iu=vl[_l];Vi&&vf(tt,Vi.text,gl,Iu)||Ro(Eu,Iu)}else if(oo==="line-center")for(var xl=0,bl=wt.geometry;xl<bl.length;xl+=1){var wl=bl[xl];if(wl.length>1){var Au=df(wl,yl,mt.vertical||Vi,lt,24,gs);Au&&Ro(wl,Au)}}else if(wt.type==="Polygon")for(var ws=0,zu=oc(wt.geometry,0);ws<zu.length;ws+=1){var Ss=zu[ws],Sl=gf(Ss,16);Ro(Ss[0],new us(Sl.x,Sl.y,0))}else if(wt.type==="LineString")for(var _a=0,Tl=wt.geometry;_a<Tl.length;_a+=1){var Ts=Tl[_a];Ro(Ts,new us(Ts[0].x,Ts[0].y,0))}else if(wt.type==="Point")for(var vc=0,Mp=wt.geometry;vc<Mp.length;vc+=1)for(var xc=0,Dp=Mp[vc];xc<Dp.length;xc+=1){var bc=Dp[xc];Ro([bc],new us(bc.x,bc.y,0))}})(e,Q,ye,yr,a,_,de,Pe,ge,Lr,h)},J=0,$=e.features;J<$.length;J+=1)K();c&&e.generateCollisionDebugBuffers()},u.perspective=function(e,t,r,a,l){var c,h=1/Math.tan(t/2);return e[0]=h/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=h,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,l!=null&&l!==1/0?(e[10]=(l+a)*(c=1/(a-l)),e[14]=2*l*a*c):(e[10]=-1,e[14]=-2*a),e},u.pick=function(e,t){for(var r={},a=0;a<t.length;a++){var l=t[a];l in e&&(r[l]=e[l])}return r},u.plugin=Ut,u.polygonIntersectsPolygon=Cr,u.postMapLoadEvent=No,u.postTurnstileEvent=Ea,u.potpack=tp,u.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],u.register=be,u.registerForPluginStateChange=function(e){return e({pluginStatus:Vr,pluginURL:gn}),Ys.on("pluginStateChange",e),e},u.renderColorRamp=Bc,u.rotate=function(e,t,r){var a=t[0],l=t[1],c=t[2],h=t[3],m=Math.sin(r),g=Math.cos(r);return e[0]=a*g+c*m,e[1]=l*g+h*m,e[2]=a*-m+c*g,e[3]=l*-m+h*g,e},u.rotateX=function(e,t,r){var a=Math.sin(r),l=Math.cos(r),c=t[4],h=t[5],m=t[6],g=t[7],_=t[8],x=t[9],b=t[10],T=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=c*l+_*a,e[5]=h*l+x*a,e[6]=m*l+b*a,e[7]=g*l+T*a,e[8]=_*l-c*a,e[9]=x*l-h*a,e[10]=b*l-m*a,e[11]=T*l-g*a,e},u.rotateZ=function(e,t,r){var a=Math.sin(r),l=Math.cos(r),c=t[0],h=t[1],m=t[2],g=t[3],_=t[4],x=t[5],b=t[6],T=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=c*l+_*a,e[1]=h*l+x*a,e[2]=m*l+b*a,e[3]=g*l+T*a,e[4]=_*l-c*a,e[5]=x*l-h*a,e[6]=b*l-m*a,e[7]=T*l-g*a,e},u.scale=function(e,t,r){var a=r[0],l=r[1],c=r[2];return e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e[3]=t[3]*a,e[4]=t[4]*l,e[5]=t[5]*l,e[6]=t[6]*l,e[7]=t[7]*l,e[8]=t[8]*c,e[9]=t[9]*c,e[10]=t[10]*c,e[11]=t[11]*c,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},u.scale$1=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},u.scale$2=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}
1,u.setCacheLimits=function(e,t){yo=e,Ia=t},u.setRTLTextPlugin=function(e,t,r){if(r===void 0&&(r=!1),Vr==="deferred"||Vr==="loading"||Vr==="loaded")throw new Error("setRTLTextPlugin cannot be called multiple times.");gn=qi.resolveURL(e),Vr="deferred",Hs=t,Js(),r||ru()},u.sphericalToCartesian=function(e){var t=e[0],r=e[1],a=e[2];return r+=90,r*=Math.PI/180,a*=Math.PI/180,{x:t*Math.cos(r)*Math.sin(a),y:t*Math.sin(r)*Math.sin(a),z:t*Math.cos(a)}},u.sqrLen=function(e){var t=e[0],r=e[1];return t*t+r*r},u.styleSpec=M,u.sub=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},u.symbolSize=ff,u.transformMat3=function(e,t,r){var a=t[0],l=t[1],c=t[2];return e[0]=a*r[0]+l*r[3]+c*r[6],e[1]=a*r[1]+l*r[4]+c*r[7],e[2]=a*r[2]+l*r[5]+c*r[8],e},u.transformMat4=ts,u.translate=function(e,t,r){var a,l,c,h,m,g,_,x,b,T,A,D,L=r[0],Z=r[1],V=r[2];return t===e?(e[12]=t[0]*L+t[4]*Z+t[8]*V+t[12],e[13]=t[1]*L+t[5]*Z+t[9]*V+t[13],e[14]=t[2]*L+t[6]*Z+t[10]*V+t[14],e[15]=t[3]*L+t[7]*Z+t[11]*V+t[15]):(l=t[1],c=t[2],h=t[3],m=t[4],g=t[5],_=t[6],x=t[7],b=t[8],T=t[9],A=t[10],D=t[11],e[0]=a=t[0],e[1]=l,e[2]=c,e[3]=h,e[4]=m,e[5]=g,e[6]=_,e[7]=x,e[8]=b,e[9]=T,e[10]=A,e[11]=D,e[12]=a*L+m*Z+b*V+t[12],e[13]=l*L+g*Z+T*V+t[13],e[14]=c*L+_*Z+A*V+t[14],e[15]=h*L+x*Z+D*V+t[15]),e},u.triggerPluginCompletionEvent=Ja,u.uniqueId=so,u.validateCustomStyleLayer=function(e){var t=[],r=e.id;return r===void 0&&t.push({message:"layers."+r+': missing required property "id"'}),e.render===void 0&&t.push({message:"layers."+r+': missing required method "render"'}),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&t.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),t},u.validateLight=Yu,u.validateStyle=ea,u.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},u.vectorTile=os,u.version="1.15.2",u.warnOnce=qt,u.webpSupported=Di,u.window=ze,u.wrap=Oo})),Dt(["./shared"],(function(u){function St(w){var E=typeof w;if(E==="number"||E==="boolean"||E==="string"||w==null)return JSON.stringify(w);if(Array.isArray(w)){for(var I="[",k=0,F=w;k<F.length;k+=1)I+=St(F[k])+",";return I+"]"}for(var G=Object.keys(w).sort(),W="{",q=0;q<G.length;q++)W+=JSON.stringify(G[q])+":"+St(w[G[q]])+",";return W+"}"}function se(w){for(var E="",I=0,k=u.refProperties;I<k.length;I+=1)E+="/"+St(w[k[I]]);return E}var dt=function(w){this.keyCache={},w&&this.replace(w)};dt.prototype.replace=function(w){this._layerConfigs={},this._layers={},this.update(w,[])},dt.prototype.update=function(w,E){for(var I=this,k=0,F=w;k<F.length;k+=1){var G=F[k];this._layerConfigs[G.id]=G;var W=this._layers[G.id]=u.createStyleLayer(G);W._featureFilter=u.featureFilter(W.filter),this.keyCache[G.id]&&delete this.keyCache[G.id]}for(var q=0,M=E;q<M.length;q+=1){var U=M[q];delete this.keyCache[U],delete this._layerConfigs[U],delete this._layers[U]}this.familiesBySource={};for(var le=0,fe=(function(me,ae){for(var Xe={},We=0;We<me.length;We++){var Ie=ae&&ae[me[We].id]||se(me[We]);ae&&(ae[me[We].id]=Ie);var Tt=Xe[Ie];Tt||(Tt=Xe[Ie]=[]),Tt.push(me[We])}var et=[];for(var At in Xe)et.push(Xe[At]);return et})(u.values(this._layerConfigs),this.keyCache);le<fe.length;le+=1){var Y=fe[le].map((function(me){return I._layers[me.id]})),ue=Y[0];if(ue.visibility!=="none"){var xe=ue.source||"",Se=this.familiesBySource[xe];Se||(Se=this.familiesBySource[xe]={});var Ce=ue.sourceLayer||"_geojsonTileLayer",oe=Se[Ce];oe||(oe=Se[Ce]=[]),oe.push(Y)}}};var Fe=function(w){var E={},I=[];for(var k in w){var F=w[k],G=E[k]={};for(var W in F){var q=F[+W];if(q&&q.bitmap.width!==0&&q.bitmap.height!==0){var M={x:0,y:0,w:q.bitmap.width+2,h:q.bitmap.height+2};I.push(M),G[W]={rect:M,metrics:q.metrics}}}}var U=u.potpack(I),le=new u.AlphaImage({width:U.w||1,height:U.h||1});for(var fe in w){var Y=w[fe];for(var ue in Y){var xe=Y[+ue];if(xe&&xe.bitmap.width!==0&&xe.bitmap.height!==0){var Se=E[fe][ue].rect;u.AlphaImage.copy(xe.bitmap,le,{x:0,y:0},{x:Se.x+1,y:Se.y+1},xe.bitmap)}}}this.image=le,this.positions=E};u.register("GlyphAtlas",Fe);var li=function(w){this.tileID=new u.OverscaledTileID(w.tileID.overscaledZ,w.tileID.wrap,w.tileID.canonical.z,w.tileID.canonical.x,w.tileID.canonical.y),this.uid=w.uid,this.zoom=w.zoom,this.pixelRatio=w.pixelRatio,this.tileSize=w.tileSize,this.source=w.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=w.showCollisionBoxes,this.collectResourceTiming=!!w.collectResourceTiming,this.returnDependencies=!!w.returnDependencies,this.promoteId=w.promoteId};function ze(w,E,I){for(var k=new u.EvaluationParameters(E),F=0,G=w;F<G.length;F+=1)G[F].recalculate(k,I)}function Ps(w,E){var I=u.getArrayBuffer(w.request,(function(k,F,G,W){k?E(k):F&&E(null,{vectorTile:new u.vectorTile.VectorTile(new u.pbf(F)),rawData:F,cacheControl:G,expires:W})}));return function(){I.cancel(),E()}}li.prototype.parse=function(w,E,I,k,F){var G=this;this.status="parsing",this.data=w,this.collisionBoxArray=new u.CollisionBoxArray;var W=new u.DictionaryCoder(Object.keys(w.layers).sort()),q=new u.FeatureIndex(this.tileID,this.promoteId);q.bucketLayerIDs=[];var M,U,le,fe,Y={},ue={featureIndex:q,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:I},xe=E.familiesBySource[this.source];
vendor: 4,180 bytes, line 1
1for(var Se in xe){var Ce=w.layers[Se];if(Ce){Ce.version===1&&u.warnOnce('Vector tile source "'+this.source+'" layer "'+Se+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var oe=W.encode(Se),me=[],ae=0;ae<Ce.length;ae++){var Xe=Ce.feature(ae),We=q.getId(Xe,Se);me.push({feature:Xe,id:We,index:ae,sourceLayerIndex:oe})}for(var Ie=0,Tt=xe[Se];Ie<Tt.length;Ie+=1){var et=Tt[Ie],At=et[0];At.minzoom&&this.zoom<Math.floor(At.minzoom)||At.maxzoom&&this.zoom>=At.maxzoom||At.visibility!=="none"&&(ze(et,this.zoom,I),(Y[At.id]=At.createBucket({index:q.bucketLayerIDs.length,layers:et,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:oe,sourceID:this.source})).populate(me,ue,this.tileID.canonical),q.bucketLayerIDs.push(et.map((function(It){return It.id}))))}}}var kt=u.mapObject(ue.glyphDependencies,(function(It){return Object.keys(It).map(Number)}));Object.keys(kt).length?k.send("getGlyphs",{uid:this.uid,stacks:kt},(function(It,$e){M||(M=It,U=$e,Nt.call(G))})):U={};var ot=Object.keys(ue.iconDependencies);ot.length?k.send("getImages",{icons:ot,source:this.source,tileID:this.tileID,type:"icons"},(function(It,$e){M||(M=It,le=$e,Nt.call(G))})):le={};var Et=Object.keys(ue.patternDependencies);function Nt(){if(M)return F(M);if(U&&le&&fe){var It=new Fe(U),$e=new u.ImageAtlas(le,fe);for(var vo in Y){var rt=Y[vo];rt instanceof u.SymbolBucket?(ze(rt.layers,this.zoom,I),u.performSymbolLayout(rt,U,It.positions,le,$e.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):rt.hasPattern&&(rt instanceof u.LineBucket||rt instanceof u.FillBucket||rt instanceof u.FillExtrusionBucket)&&(ze(rt.layers,this.zoom,I),rt.addFeatures(ue,this.tileID.canonical,$e.patternPositions))}this.status="done",F(null,{buckets:u.values(Y).filter((function(Fn){return!Fn.isEmpty()})),featureIndex:q,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:It.image,imageAtlas:$e,glyphMap:this.returnDependencies?U:null,iconMap:this.returnDependencies?le:null,glyphPositions:this.returnDependencies?It.positions:null})}}Et.length?k.send("getImages",{icons:Et,source:this.source,tileID:this.tileID,type:"patterns"},(function(It,$e){M||(M=It,fe=$e,Nt.call(G))})):fe={},Nt.call(this)};var ui=function(w,E,I,k){this.actor=w,this.layerIndex=E,this.availableImages=I,this.loadVectorData=k||Ps,this.loading={},this.loaded={}};ui.prototype.loadTile=function(w,E){var I=this,k=w.uid;this.loading||(this.loading={});var F=!!(w&&w.request&&w.request.collectResourceTiming)&&new u.RequestPerformance(w.request),G=this.loading[k]=new li(w);G.abort=this.loadVectorData(w,(function(W,q){if(delete I.loading[k],W||!q)return G.status="done",I.loaded[k]=G,E(W);var M=q.rawData,U={};q.expires&&(U.expires=q.expires),q.cacheControl&&(U.cacheControl=q.cacheControl);var le={};if(F){var fe=F.finish();fe&&(le.resourceTiming=JSON.parse(JSON.stringify(fe)))}G.vectorTile=q.vectorTile,G.parse(q.vectorTile,I.layerIndex,I.availableImages,I.actor,(function(Y,ue){if(Y||!ue)return E(Y);E(null,u.extend({rawTileData:M.slice(0)},ue,U,le))})),I.loaded=I.loaded||{},I.loaded[k]=G}))},ui.prototype.reloadTile=function(w,E){var I=this,k=this.loaded,F=w.uid,G=this;if(k&&k[F]){var W=k[F];W.showCollisionBoxes=w.showCollisionBoxes;var q=function(M,U){var le=W.reloadCallback;le&&(delete W.reloadCallback,W.parse(W.vectorTile,G.layerIndex,I.availableImages,G.actor,le)),E(M,U)};W.status==="parsing"?W.reloadCallback=q:W.status==="done"&&(W.vectorTile?W.parse(W.vectorTile,this.layerIndex,this.availableImages,this.actor,q):q())}},ui.prototype.abortTile=function(w,E){var I=this.loading,k=w.uid;I&&I[k]&&I[k].abort&&(I[k].abort(),delete I[k]),E()},ui.prototype.removeTile=function(w,E){var I=this.loaded,k=w.uid;I&&I[k]&&delete I[k],E()};var An=u.window.ImageBitmap,qr=function(){this.loaded={}};function Oo(w,E){if(w.length!==0){_r(w[0],E);for(var I=1;I<w.length;I++)_r(w[I],!E)}}function _r(w,E){for(var I=0,k=0,F=w.length,G=F-1;k<F;G=k++)I+=(w[k][0]-w[G][0])*(w[G][1]+w[k][1]);I>=0!=!!E&&w.reverse()}qr.prototype.loadTile=function(w,E){var I=w.uid,k=w.encoding,F=w.rawImageData,G=An&&F instanceof An?this.getImageData(
1F):F,W=new u.DEMData(I,G,k);this.loaded=this.loaded||{},this.loaded[I]=W,E(null,W)},qr.prototype.getImageData=function(w){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(w.width,w.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=w.width,this.offscreenCanvas.height=w.height,this.offscreenCanvasContext.drawImage(w,0,0,w.width,w.height);var E=this.offscreenCanvasContext.getImageData(-1,-1,w.width+2,w.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new u.RGBAImage({width:E.width,height:E.height},E.data)},qr.prototype.removeTile=function(w){var E=this.loaded,I=w.uid;E&&E[I]&&delete E[I]};var ba=u.vectorTile.VectorTileFeature.prototype.toGeoJSON,so=function(w){this._feature=w,this.extent=u.EXTENT,this.type=w.type,this.properties=w.tags,"id"in w&&!isNaN(w.id)&&(this.id=parseInt(w.id,10))};so.prototype.loadGeometry=function(){if(this._feature.type===1){for(var w=[],E=0,I=this._feature.geometry;E<I.length;E+=1){var k=I[E];w.push([new u.Point$1(k[0],k[1])])}return w}for(var F=[],G=0,W=this._feature.geometry;G<W.length;G+=1){for(var q=[],M=0,U=W[G];M<U.length;M+=1){var le=U[M];q.push(new u.Point$1(le[0],le[1]))}F.push(q)}return F},so.prototype.toGeoJSON=function(w,E,I){return ba.call(this,w,E,I)};var Ni=function(w){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u.EXTENT,this.length=w.length,this._features=w};Ni.prototype.feature=function(w){return new so(this._features[w])};var lo=u.vectorTile.VectorTileFeature,uo=zn;function zn(w,E){this.options=E||{},this.features=w,this.length=w.length}function Er(w,E){this.id=typeof w.id=="number"?w.id:void 0,this.type=w.type,this.rawGeometry=w.type===1?[w.geometry]:w.geometry,this.properties=w.tags,this.extent=E||4096}zn.prototype.feature=function(w){return new Er(this.features[w],this.options.extent)},Er.prototype.loadGeometry=function(){var w=this.rawGeometry;this.geometry=[];for(var E=0;E<w.length;E++){for(var I=w[E],k=[],F=0;F<I.length;F++)k.push(new u.Point$1(I[F][0],I[F][1]));this.geometry.push(k)}return this.geometry},Er.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var w=this.geometry,E=1/0,I=-1/0,k=1/0,F=-1/0,G=0;G<w.length;G++)for(var W=w[G],q=0;q<W.length;q++){var M=W[q];E=Math.min(E,M.x),I=Math.max(I,M.x),k=Math.min(k,M.y),F=Math.max(F,M.y)}return[E,k,I,F]},Er.prototype.toGeoJSON=lo.prototype.toGeoJSON;var ji=co,Si=uo;function co(w){var E=new u.pbf;return(function(I,k){for(var F in I.layers)k.writeMessage(3,qt,I.layers[F])})(w,E),E.finish()}function qt(w,E){var I;E.writeVarintField(15,w.version||1),E.writeStringField(1,w.name||""),E.writeVarintField(5,w.extent||4096);var k={keys:[],values:[],keycache:{},valuecache:{}};for(I=0;I<w.length;I++)k.feature=w.feature(I),E.writeMessage(2,Zr,k);var F=k.keys;for(I=0;I<F.length;I++)E.writeStringField(3,F[I]);var G=k.values;for(I=0;I<G.length;I++)E.writeMessage(4,Sa,G[I])}function Zr(w,E){var I=w.feature;I.id!==void 0&&E.writeVarintField(1,I.id),E.writeMessage(2,wa,w),E.writeVarintField(3,I.type),E.writeMessage(4,ho,I)}function wa(w,E){var I=w.feature,k=w.keys,F=w.values,G=w.keycache,W=w.valuecache;for(var q in I.properties){var M=G[q];M===void 0&&(k.push(q),G[q]=M=k.length-1),E.writeVarint(M);var U=I.properties[q],le=typeof U;le!=="string"&&le!=="boolean"&&le!=="number"&&(U=JSON.stringify(U));var fe=le+":"+U,Y=W[fe];Y===void 0&&(F.push(U),W[fe]=Y=F.length-1),E.writeVarint(Y)}}function ei(w,E){return(E<<3)+(7&w)}function po(w){return w<<1^w>>31}function ho(w,E){for(var I=w.loadGeometry(),k=w.type,F=0,G=0,W=I.length,q=0;q<W;q++){var M=I[q],U=1;k===1&&(U=M.length),E.writeVarint(ei(1,U));for(var le=k===3?M.length-1:M.length,fe=0;fe<le;fe++){fe===1&&k!==1&&E.writeVarint(ei(2,le-1));var Y=M[fe].x-F,ue=M[fe].y-G;E.writeVarint(po(Y)),E.writeVarint(po(ue)),F+=Y,G+=ue}k===3&&E.writeVarint(ei(7,1))}}function Sa(w,E){var I=typeof w;I==="string"?E.writeStringField(1,w):I==="boolean"?E.writeBooleanField(7,w):I==="number"&&(w%1!=0?E.writeDoubleField(3,w):w<0?E.writeSVarintField(6,w):E.writeVarintField(5,w))}function tn(w,E,I,k){Ti(w,I,k),Ti(E,2*I,2*k),Ti(E,2*I+1,2*k+1)}function Ti(w,E,I){var k=w[E];w[E]=w[I],w[I]=k}function Mi(w,E,I,k){var F=w-I,G=E-k;return F*F+G*G}ji.fromVectorTileJs=co,ji.fromGeojsonVt=function(w,E){E=E||{};var I={};for(var k in w)I[k]=new uo(w[k].features,E),I[k].name=k,I[k].version=E.version,I[k].extent=E.extent;return co({layers:I})},ji.GeoJSONWrapper=Si;var Pn=function(w){return w[0]},Cn=function(w){return w[1]},rn=function(w,E,I,k,F){E===void 0&&(E=Pn),I===void 0&&(I=Cn),k===void 0&&(k=64),F===void 0&&(F=Float64Array),this.nodeSize=k,this.points=w;for(var G=w.length<65536?Uint16Array:Uint32Array,W=this.ids=new G(w.length),q=this.coords=new F(2*w.length),M=0;M<w.length;M++)W[M]=M,q[2*M]=E(w[M]),q[2*M+1]=I(w[M]);(function U(le,fe,Y,ue,xe,Se){if(!(xe-ue<=Y)){var Ce=ue+xe>>1;(function oe(me,ae,Xe,We,Ie,Tt){for(;Ie>We;){if(Ie-We>600){var et=Ie-We+1,At=Xe-We+1,kt=Math.log(et),ot=.5*Math.exp(2*kt/3),Et=.5*Math.sqrt(kt*ot*(et-ot)/et)*(At-et/2<0?-1:1);oe(me,ae,Xe,Math.max(We,Math.floor(Xe-At*ot/et+Et)),Math.min(Ie,Math.floor(Xe+(et-At)*ot/et+Et)),Tt)}var Nt=ae[2*Xe+Tt],It=We,$e=Ie;for(tn(me,ae,We,Xe),ae[2*Ie+Tt]>Nt&&tn(me,ae,We,Ie);It<$e;){for(tn(me,ae,It,$e),It++,$e--;ae[2*It+Tt]<Nt;)It++;for(;ae[2*$e+Tt]>Nt;)$e--}ae[2*We+Tt]===Nt?tn(me,ae,We,$e):tn(me,ae,++$e,Ie),$e<=Xe&&(We=$e+1),Xe<=$e&&(Ie=$e-1)}})(le,fe,Ce,ue,xe,Se%2),U(le,fe,Y,ue,Ce-1,Se+1),U(le,fe,Y,Ce+1,xe,Se+1)}})(W,q,k,0,W.length-1,0)};rn.prototype.range=function(w,E,I,k){return(function(F,G,W,q,M,U,le){for(var fe,Y,ue=[0,F.length-1,0],xe=[];ue.length;){var Se=ue.pop(),Ce=ue.pop(),oe=ue.pop();if(Ce-oe<=le)for(var me=oe;me<=Ce;me++)Y=G[2*me+1],(fe=G[2*me])>=W&&fe<=M&&Y>=q&&Y<=U&&xe.push(F[me]);else{var ae=Math.floor((oe+Ce)/2);Y=G[2*ae+1],(fe=G[2*ae])>=W&&fe<=M&&Y>=q&&Y<=U&&xe.push(F[ae]);var Xe=(Se+1)%2;(Se===0?W<=fe:q<=Y)&&(ue.push(oe),ue.push(ae-1),ue.push(Xe)),(Se===0?M>=fe:U>=Y)&&(ue.push(ae+1),ue.push(Ce),ue.push(Xe))}}return xe})(this.ids,this.coords,w,E,I,k,this.nodeSize)}
1,rn.prototype.within=function(w,E,I){return(function(k,F,G,W,q,M){for(var U=[0,k.length-1,0],le=[],fe=q*q;U.length;){var Y=U.pop(),ue=U.pop(),xe=U.pop();if(ue-xe<=M)for(var Se=xe;Se<=ue;Se++)Mi(F[2*Se],F[2*Se+1],G,W)<=fe&&le.push(k[Se]);else{var Ce=Math.floor((xe+ue)/2),oe=F[2*Ce],me=F[2*Ce+1];Mi(oe,me,G,W)<=fe&&le.push(k[Ce]);var ae=(Y+1)%2;(Y===0?G-q<=oe:W-q<=me)&&(U.push(xe),U.push(Ce-1),U.push(ae)),(Y===0?G+q>=oe:W+q>=me)&&(U.push(Ce+1),U.push(ue),U.push(ae))}}return le})(this.ids,this.coords,w,E,I,this.nodeSize)};var Cs={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(w){return w}},Ir=function(w){this.options=nn(Object.create(Cs),w),this.trees=new Array(this.options.maxZoom+1)};function qi(w,E,I,k,F){return{x:w,y:E,zoom:1/0,id:I,parentId:-1,numPoints:k,properties:F}}function gt(w,E){var I=w.geometry.coordinates,k=I[1];return{x:Ei(I[0]),y:it(k),zoom:1/0,index:E,parentId:-1}}function Di(w){return{type:"Feature",id:w.id,properties:fo(w),geometry:{type:"Point",coordinates:[(k=w.x,360*(k-.5)),(E=w.y,I=(180-360*E)*Math.PI/180,360*Math.atan(Math.exp(I))/Math.PI-90)]}};var E,I,k}function fo(w){var E=w.numPoints,I=E>=1e4?Math.round(E/1e3)+"k":E>=1e3?Math.round(E/100)/10+"k":E;return nn(nn({},w.properties),{cluster:!0,cluster_id:w.id,point_count:E,point_count_abbreviated:I})}function Ei(w){return w/360+.5}function it(w){var E=Math.sin(w*Math.PI/180),I=.5-.25*Math.log((1+E)/(1-E))/Math.PI;return I<0?0:I>1?1:I}function nn(w,E){for(var I in E)w[I]=E[I];return w}function Ar(w){return w.x}function ci(w){return w.y}function ks(w,E,I,k,F,G){var W=F-I,q=G-k;if(W!==0||q!==0){var M=((w-I)*W+(E-k)*q)/(W*W+q*q);M>1?(I=F,k=G):M>0&&(I+=W*M,k+=q*M)}return(W=w-I)*W+(q=E-k)*q}function Ii(w,E,I,k){var F={id:w===void 0?null:w,type:E,geometry:I,tags:k,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return(function(G){var W=G.geometry,q=G.type;if(q==="Point"||q==="MultiPoint"||q==="LineString")Uo(G,W);else if(q==="Polygon"||q==="MultiLineString")for(var M=0;M<W.length;M++)Uo(G,W[M]);else if(q==="MultiPolygon")for(M=0;M<W.length;M++)for(var U=0;U<W[M].length;U++)Uo(G,W[M][U])})(F),F}function Uo(w,E){for(var I=0;I<E.length;I+=3)w.minX=Math.min(w.minX,E[I]),w.minY=Math.min(w.minY,E[I+1]),w.maxX=Math.max(w.maxX,E[I]),w.maxY=Math.max(w.maxY,E[I+1])}function pi(w,E,I,k){if(E.geometry){var F=E.geometry.coordinates,G=E.geometry.type,W=Math.pow(I.tolerance/((1<<I.maxZoom)*I.extent),2),q=[],M=E.id;if(I.promoteId?M=E.properties[I.promoteId]:I.generateId&&(M=k||0),G==="Point")kn(F,q);else if(G==="MultiPoint")for(var U=0;U<F.length;U++)kn(F[U],q);else if(G==="LineString")mo(F,q,W,!1);else if(G==="MultiLineString"){if(I.lineMetrics){for(U=0;U<F.length;U++)mo(F[U],q=[],W,!1),w.push(Ii(M,"LineString",q,E.properties));return}hi(F,q,W,!1)}else if(G==="Polygon")hi(F,q,W,!0);else{if(G!=="MultiPolygon"){if(G==="GeometryCollection"){for(U=0;U<E.geometry.geometries.length;U++)pi(w,{id:M,geometry:E.geometry.geometries[U],properties:E.properties},I,k);return}throw new Error("Input data is not a valid GeoJSON object.")}for(U=0;U<F.length;U++){var le=[];hi(F[U],le,W,!0),q.push(le)}}w.push(Ii(M,G,q,E.properties))}}function kn(w,E){E.push(fi(w[0])),E.push(Mn(w[1])),E.push(0)}function mo(w,E,I,k){for(var F,G,W=0,q=0;q<w.length;q++){var M=fi(w[q][0]),U=Mn(w[q][1]);E.push(M),E.push(U),E.push(0),q>0&&(W+=k?(F*U-M*G)/2:Math.sqrt(Math.pow(M-F,2)+Math.pow(U-G,2))),F=M,G=U}var le=E.length-3;E[2]=1,(function fe(Y,ue,xe,Se){for(var Ce,oe=Se,me=xe-ue>>1,ae=xe-ue,Xe=Y[ue],We=Y[ue+1],Ie=Y[xe],Tt=Y[xe+1],et=ue+3;et<xe;et+=3){var At=ks(Y[et],Y[et+1],Xe,We,Ie,Tt);if(At>oe)Ce=et,oe=At;else if(At===oe){var kt=Math.abs(et-me);kt<ae&&(Ce=et,ae=kt)}}oe>Se&&(Ce-ue>3&&fe(Y,ue,Ce,Se),Y[Ce+2]=oe,xe-Ce>3&&fe(Y,Ce,xe,Se))})(E,0,le,I),E[le+2]=1,E.size=Math.abs(W),E.start=0,E.end=E.size}function hi(w,E,I,k){for(var F=0;F<w.length;F++){var G=[];mo(w[F],G,I,k),E.push(G)}}function fi(w){return w/360+.5}function Mn(w){var E=Math.sin(w*Math.PI/180),I=.5-.25*Math.log((1+E)/(1-E))/Math.PI;return I<0?0:I>1?1:I}function Ai(w,E,I,k,F,G,W,q){if(k/=E,G>=(I/=E)&&W<k)return w;if(W<I||G>=k)return null;for(var M=[],U=0;U<w.length;U++){var le=w[U],fe=le.geometry,Y=le.type,ue=F===0?le.minX:le.minY,xe=F===0?le.maxX:le.maxY;if(ue>=I&&xe<k)M.push(le);else if(!(xe<I||ue>=k)){var Se=[];if(Y==="Point"||Y==="MultiPoint")Ta(fe,Se,I,k,F);else if(Y==="LineString")Ea(fe,Se,I,k,F,!1,q.lineMetrics);else if(Y==="MultiLineString")No(fe,Se,I,k,F,!1);else if(Y==="Polygon")No(fe,Se,I,k,F,!0);else if(Y==="MultiPolygon")for(var Ce=0;Ce<fe.length;Ce++){var oe=[];
vendor: 4,100 bytes, line 1
1No(fe[Ce],oe,I,k,F,!0),oe.length&&Se.push(oe)}if(Se.length){if(q.lineMetrics&&Y==="LineString"){for(Ce=0;Ce<Se.length;Ce++)M.push(Ii(le.id,Y,Se[Ce],le.tags));continue}Y!=="LineString"&&Y!=="MultiLineString"||(Se.length===1?(Y="LineString",Se=Se[0]):Y="MultiLineString"),Y!=="Point"&&Y!=="MultiPoint"||(Y=Se.length===3?"Point":"MultiPoint"),M.push(Ii(le.id,Y,Se,le.tags))}}}return M.length?M:null}function Ta(w,E,I,k,F){for(var G=0;G<w.length;G+=3){var W=w[G+F];W>=I&&W<=k&&(E.push(w[G]),E.push(w[G+1]),E.push(w[G+2]))}}function Ea(w,E,I,k,F,G,W){for(var q,M,U=Vo(w),le=F===0?Ia:go,fe=w.start,Y=0;Y<w.length-3;Y+=3){var ue=w[Y],xe=w[Y+1],Se=w[Y+2],Ce=w[Y+3],oe=w[Y+4],me=F===0?ue:xe,ae=F===0?Ce:oe,Xe=!1;W&&(q=Math.sqrt(Math.pow(ue-Ce,2)+Math.pow(xe-oe,2))),me<I?ae>I&&(M=le(U,ue,xe,Ce,oe,I),W&&(U.start=fe+q*M)):me>k?ae<k&&(M=le(U,ue,xe,Ce,oe,k),W&&(U.start=fe+q*M)):yo(U,ue,xe,Se),ae<I&&me>=I&&(M=le(U,ue,xe,Ce,oe,I),Xe=!0),ae>k&&me<=k&&(M=le(U,ue,xe,Ce,oe,k),Xe=!0),!G&&Xe&&(W&&(U.end=fe+q*M),E.push(U),U=Vo(w)),W&&(fe+=q)}var We=w.length-3;ue=w[We],xe=w[We+1],Se=w[We+2],(me=F===0?ue:xe)>=I&&me<=k&&yo(U,ue,xe,Se),We=U.length-3,G&&We>=3&&(U[We]!==U[0]||U[We+1]!==U[1])&&yo(U,U[0],U[1],U[2]),U.length&&E.push(U)}function Vo(w){var E=[];return E.size=w.size,E.start=w.start,E.end=w.end,E}function No(w,E,I,k,F,G){for(var W=0;W<w.length;W++)Ea(w[W],E,I,k,F,G,!1)}function yo(w,E,I,k){w.push(E),w.push(I),w.push(k)}function Ia(w,E,I,k,F,G){var W=(G-E)/(k-E);return w.push(G),w.push(I+(F-I)*W),w.push(1),W}function go(w,E,I,k,F,G){var W=(G-I)/(F-I);return w.push(E+(k-E)*W),w.push(G),w.push(1),W}function jo(w,E){for(var I=[],k=0;k<w.length;k++){var F,G=w[k],W=G.type;if(W==="Point"||W==="MultiPoint"||W==="LineString")F=Dn(G.geometry,E);else if(W==="MultiLineString"||W==="Polygon"){F=[];for(var q=0;q<G.geometry.length;q++)F.push(Dn(G.geometry[q],E))}else if(W==="MultiPolygon")for(F=[],q=0;q<G.geometry.length;q++){for(var M=[],U=0;U<G.geometry[q].length;U++)M.push(Dn(G.geometry[q][U],E));F.push(M)}I.push(Ii(G.id,W,F,G.tags))}return I}function Dn(w,E){var I=[];I.size=w.size,w.start!==void 0&&(I.start=w.start,I.end=w.end);for(var k=0;k<w.length;k+=3)I.push(w[k]+E,w[k+1],w[k+2]);return I}function qo(w,E){if(w.transformed)return w;var I,k,F,G=1<<w.z,W=w.x,q=w.y;for(I=0;I<w.features.length;I++){var M=w.features[I],U=M.geometry,le=M.type;if(M.geometry=[],le===1)for(k=0;k<U.length;k+=2)M.geometry.push(Zo(U[k],U[k+1],E,G,W,q));else for(k=0;k<U.length;k++){var fe=[];for(F=0;F<U[k].length;F+=2)fe.push(Zo(U[k][F],U[k][F+1],E,G,W,q));M.geometry.push(fe)}}return w.transformed=!0,w}function Zo(w,E,I,k,F,G){return[Math.round(I*(w*k-F)),Math.round(I*(E*k-G))]}function Aa(w,E,I,k,F){for(var G=E===F.maxZoom?0:F.tolerance/((1<<E)*F.extent),W={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:I,y:k,z:E,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},q=0;q<w.length;q++){W.numFeatures++,za(W,w[q],G,F);var M=w[q].minX,U=w[q].minY,le=w[q].maxX,fe=w[q].maxY;M<W.minX&&(W.minX=M),U<W.minY&&(W.minY=U),le>W.maxX&&(W.maxX=le),fe>W.maxY&&(W.maxY=fe)}return W}function za(w,E,I,k){var F=E.geometry,G=E.type,W=[];if(G==="Point"||G==="MultiPoint")for(var q=0;q<F.length;q+=3)W.push(F[q]),W.push(F[q+1]),w.numPoints++,w.numSimplified++;else if(G==="LineString")Ln(W,F,w,I,!1,!1);else if(G==="MultiLineString"||G==="Polygon")for(q=0;q<F.length;q++)Ln(W,F[q],w,I,G==="Polygon",q===0);else if(G==="MultiPolygon")for(var M=0;M<F.length;M++){var U=F[M];for(q=0;q<U.length;q++)Ln(W,U[q],w,I,!0,q===0)}if(W.length){var le=E.tags||null;if(G==="LineString"&&k.lineMetrics){for(var fe in le={},E.tags)le[fe]=E.tags[fe];le.mapbox_clip_start=F.start/F.size,le.mapbox_clip_end=F.end/F.size}var Y={geometry:W,type:G==="Polygon"||G==="MultiPolygon"?3:G==="LineString"||G==="MultiLineString"?2:1,tags:le};E.id!==null&&(Y.id=E.id),w.features.push(Y)}}function Ln(w,E,I,k,F,G){var W=k*k;if(k>0&&E.size<(F?W:k))I.numPoints+=E.length/3;else{for(var q=[],M=0;M<E.length;M+=3)(k===0||E[M+2]>W)&&(I.numSimplified++,q.push(E[M]),q.push(E[M+1])),I.numPoints++;F&&(function(U,le){for(var fe=0,Y=0,ue=U.length,xe=ue-2;Y<ue;
1xe=Y,Y+=2)fe+=(U[Y]-U[xe])*(U[Y+1]+U[xe+1]);if(fe>0===le)for(Y=0,ue=U.length;Y<ue/2;Y+=2){var Se=U[Y],Ce=U[Y+1];U[Y]=U[ue-2-Y],U[Y+1]=U[ue-1-Y],U[ue-2-Y]=Se,U[ue-1-Y]=Ce}})(q,G),w.push(q)}}function Rn(w,E){var I=(E=this.options=(function(F,G){for(var W in G)F[W]=G[W];return F})(Object.create(this.options),E)).debug;if(I&&console.time("preprocess data"),E.maxZoom<0||E.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(E.promoteId&&E.generateId)throw new Error("promoteId and generateId cannot be used together.");var k=(function(F,G){var W=[];if(F.type==="FeatureCollection")for(var q=0;q<F.features.length;q++)pi(W,F.features[q],G,q);else pi(W,F.type==="Feature"?F:{geometry:F},G);return W})(w,E);this.tiles={},this.tileCoords=[],I&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",E.indexMaxZoom,E.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(k=(function(F,G){var W=G.buffer/G.extent,q=F,M=Ai(F,1,-1-W,W,0,-1,2,G),U=Ai(F,1,1-W,2+W,0,-1,2,G);return(M||U)&&(q=Ai(F,1,-W,1+W,0,-1,2,G)||[],M&&(q=jo(M,1).concat(q)),U&&(q=q.concat(jo(U,-1)))),q})(k,E)).length&&this.splitTile(k,0,0,0),I&&(k.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)))}function on(w,E,I){return 32*((1<<w)*I+E)+w}function Bn(w,E){var I=w.tileID.canonical;if(!this._geoJSONIndex)return E(null,null);var k=this._geoJSONIndex.getTile(I.z,I.x,I.y);if(!k)return E(null,null);var F=new Ni(k.features),G=ji(F);G.byteOffset===0&&G.byteLength===G.buffer.byteLength||(G=new Uint8Array(G)),E(null,{vectorTile:F,rawData:G.buffer})}Ir.prototype.load=function(w){var E=this.options,I=E.log,k=E.minZoom,F=E.maxZoom,G=E.nodeSize;I&&console.time("total time");var W="prepare "+w.length+" points";I&&console.time(W),this.points=w;for(var q=[],M=0;M<w.length;M++)w[M].geometry&&q.push(gt(w[M],M));this.trees[F+1]=new rn(q,Ar,ci,G,Float32Array),I&&console.timeEnd(W);for(var U=F;U>=k;U--){var le=+Date.now();q=this._cluster(q,U),this.trees[U]=new rn(q,Ar,ci,G,Float32Array),I&&console.log("z%d: %d clusters in %dms",U,q.length,+Date.now()-le)}return I&&console.timeEnd("total time"),this},Ir.prototype.getClusters=function(w,E){var I=((w[0]+180)%360+360)%360-180,k=Math.max(-90,Math.min(90,w[1])),F=w[2]===180?180:((w[2]+180)%360+360)%360-180,G=Math.max(-90,Math.min(90,w[3]));if(w[2]-w[0]>=360)I=-180,F=180;else if(I>F){var W=this.getClusters([I,k,180,G],E),q=this.getClusters([-180,k,F,G],E);return W.concat(q)}for(var M=this.trees[this._limitZoom(E)],U=[],le=0,fe=M.range(Ei(I),it(G),Ei(F),it(k));le<fe.length;le+=1){var Y=M.points[fe[le]];U.push(Y.numPoints?Di(Y):this.points[Y.index])}return U},Ir.prototype.getChildren=function(w){var E=this._getOriginId(w),I=this._getOriginZoom(w),k="No cluster with the specified id.",F=this.trees[I];if(!F)throw new Error(k);var G=F.points[E];if(!G)throw new Error(k);for(var W=this.options.radius/(this.options.extent*Math.pow(2,I-1)),q=[],M=0,U=F.within(G.x,G.y,W);M<U.length;M+=1){var le=F.points[U[M]];le.parentId===w&&q.push(le.numPoints?Di(le):this.points[le.index])}if(q.length===0)throw new Error(k);return q},Ir.prototype.getLeaves=function(w,E,I){var k=[];return this._appendLeaves(k,w,E=E||10,I=I||0,0),k},Ir.prototype.getTile=function(w,E,I){var k=this.trees[this._limitZoom(w)],F=Math.pow(2,w),G=this.options,W=G.radius/G.extent,q=(I-W)/F,M=(I+1+W)/F,U={features:[]};return this._addTileFeatures(k.range((E-W)/F,q,(E+1+W)/F,M),k.points,E,I,F,U),E===0&&this._addTileFeatures(k.range(1-W/F,q,1,M),k.points,F,I,F,U),E===F-1&&this._addTileFeatures(k.range(0,q,W/F,M),k.points,-1,I,F,U),U.features.length?U:null},Ir.prototype.getClusterExpansionZoom=function(w){for(var E=this._getOriginZoom(w)-1;E<=this.options.maxZoom;){var I=this.getChildren(w);if(E++,I.length!==1)break;w=I[0].properties.cluster_id}return E},Ir.prototype._appendLeaves=function(w,E,I,k,F){for(var G=0,W=this.getChildren(E);G<W.length;G+=1){var q=W[G],M=q.properties;if(M&&M.cluster?F+M.point_count<=k?F+=M.point_count:F=this._appendLeaves(w,M.cluster_id,I,k,F):F<k?F++:w.push(q),w.length===I)break}return F},Ir.prototype._addTileFeatures=function(w,E,I,k,F,G){for(var W=0,q=w;W<q.length;W+=1){var M=E[q[W]],U=M.numPoints,le={type:1,geometry:[[Math.round(this.options.extent*(M.x*F-I)),Math.round(this.options.extent*(M.y
vendor: 4,262 bytes, line 1
1*F-k))]],tags:U?fo(M):this.points[M.index].properties},fe=void 0;U?fe=M.id:this.options.generateId?fe=M.index:this.points[M.index].id&&(fe=this.points[M.index].id),fe!==void 0&&(le.id=fe),G.features.push(le)}},Ir.prototype._limitZoom=function(w){return Math.max(this.options.minZoom,Math.min(+w,this.options.maxZoom+1))},Ir.prototype._cluster=function(w,E){for(var I=[],k=this.options,F=k.reduce,G=k.minPoints,W=k.radius/(k.extent*Math.pow(2,E)),q=0;q<w.length;q++){var M=w[q];if(!(M.zoom<=E)){M.zoom=E;for(var U=this.trees[E+1],le=U.within(M.x,M.y,W),fe=M.numPoints||1,Y=fe,ue=0,xe=le;ue<xe.length;ue+=1){var Se=U.points[xe[ue]];Se.zoom>E&&(Y+=Se.numPoints||1)}if(Y>=G){for(var Ce=M.x*fe,oe=M.y*fe,me=F&&fe>1?this._map(M,!0):null,ae=(q<<5)+(E+1)+this.points.length,Xe=0,We=le;Xe<We.length;Xe+=1){var Ie=U.points[We[Xe]];if(!(Ie.zoom<=E)){Ie.zoom=E;var Tt=Ie.numPoints||1;Ce+=Ie.x*Tt,oe+=Ie.y*Tt,Ie.parentId=ae,F&&(me||(me=this._map(M,!0)),F(me,this._map(Ie)))}}M.parentId=ae,I.push(qi(Ce/Y,oe/Y,ae,Y,me))}else if(I.push(M),Y>1)for(var et=0,At=le;et<At.length;et+=1){var kt=U.points[At[et]];kt.zoom<=E||(kt.zoom=E,I.push(kt))}}}return I},Ir.prototype._getOriginId=function(w){return w-this.points.length>>5},Ir.prototype._getOriginZoom=function(w){return(w-this.points.length)%32},Ir.prototype._map=function(w,E){if(w.numPoints)return E?nn({},w.properties):w.properties;var I=this.points[w.index].properties,k=this.options.map(I);return E&&k===I?nn({},k):k},Rn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Rn.prototype.splitTile=function(w,E,I,k,F,G,W){for(var q=[w,E,I,k],M=this.options,U=M.debug;q.length;){k=q.pop(),I=q.pop(),E=q.pop(),w=q.pop();var le=1<<E,fe=on(E,I,k),Y=this.tiles[fe];if(!Y&&(U>1&&console.time("creation"),Y=this.tiles[fe]=Aa(w,E,I,k,M),this.tileCoords.push({z:E,x:I,y:k}),U)){U>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",E,I,k,Y.numFeatures,Y.numPoints,Y.numSimplified),console.timeEnd("creation"));var ue="z"+E;this.stats[ue]=(this.stats[ue]||0)+1,this.total++}if(Y.source=w,F){if(E===M.maxZoom||E===F)continue;var xe=1<<F-E;if(I!==Math.floor(G/xe)||k!==Math.floor(W/xe))continue}else if(E===M.indexMaxZoom||Y.numPoints<=M.indexMaxPoints)continue;if(Y.source=null,w.length!==0){U>1&&console.time("clipping");var Se,Ce,oe,me,ae,Xe,We=.5*M.buffer/M.extent,Ie=.5-We,Tt=.5+We,et=1+We;Se=Ce=oe=me=null,ae=Ai(w,le,I-We,I+Tt,0,Y.minX,Y.maxX,M),Xe=Ai(w,le,I+Ie,I+et,0,Y.minX,Y.maxX,M),w=null,ae&&(Se=Ai(ae,le,k-We,k+Tt,1,Y.minY,Y.maxY,M),Ce=Ai(ae,le,k+Ie,k+et,1,Y.minY,Y.maxY,M),ae=null),Xe&&(oe=Ai(Xe,le,k-We,k+Tt,1,Y.minY,Y.maxY,M),me=Ai(Xe,le,k+Ie,k+et,1,Y.minY,Y.maxY,M),Xe=null),U>1&&console.timeEnd("clipping"),q.push(Se||[],E+1,2*I,2*k),q.push(Ce||[],E+1,2*I,2*k+1),q.push(oe||[],E+1,2*I+1,2*k),q.push(me||[],E+1,2*I+1,2*k+1)}}},Rn.prototype.getTile=function(w,E,I){var k=this.options,F=k.extent,G=k.debug;if(w<0||w>24)return null;var W=1<<w,q=on(w,E=(E%W+W)%W,I);if(this.tiles[q])return qo(this.tiles[q],F);G>1&&console.log("drilling down to z%d-%d-%d",w,E,I);for(var M,U=w,le=E,fe=I;!M&&U>0;)U--,le=Math.floor(le/2),fe=Math.floor(fe/2),M=this.tiles[on(U,le,fe)];return M&&M.source?(G>1&&console.log("found parent tile z%d-%d-%d",U,le,fe),G>1&&console.time("drilling down"),this.splitTile(M.source,U,le,fe,w,E,I),G>1&&console.timeEnd("drilling down"),this.tiles[q]?qo(this.tiles[q],F):null):null};var _o=(function(w){function E(I,k,F,G){w.call(this,I,k,F,Bn),G&&(this.loadGeoJSON=G)}return w&&(E.__proto__=w),(E.prototype=Object.create(w&&w.prototype)).constructor=E,E.prototype.loadData=function(I,k){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=k,this._pendingLoadDataParams=I,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},E.prototype._loadData=function(){var I=this;if(this._pendingCallback&&this._pendingLoadDataParams){var k=this._pendingCallback,F=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var G=!!(F&&F.request&&F.request.collectResourceTiming)&&new u.RequestPerformance(F.request);this.loadGeoJSON(F,(function(W,q){if(W||!q)return k(W);
1if(typeof q!="object")return k(new Error("Input data given to '"+F.source+"' is not a valid GeoJSON object."));(function Y(ue,xe){var Se,Ce=ue&&ue.type;if(Ce==="FeatureCollection")for(Se=0;Se<ue.features.length;Se++)Y(ue.features[Se],xe);else if(Ce==="GeometryCollection")for(Se=0;Se<ue.geometries.length;Se++)Y(ue.geometries[Se],xe);else if(Ce==="Feature")Y(ue.geometry,xe);else if(Ce==="Polygon")Oo(ue.coordinates,xe);else if(Ce==="MultiPolygon")for(Se=0;Se<ue.coordinates.length;Se++)Oo(ue.coordinates[Se],xe);return ue})(q,!0);try{if(F.filter){var M=u.createExpression(F.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(M.result==="error")throw new Error(M.value.map((function(Y){return Y.key+": "+Y.message})).join(", "));var U=q.features.filter((function(Y){return M.value.evaluate({zoom:0},Y)}));q={type:"FeatureCollection",features:U}}I._geoJSONIndex=F.cluster?new Ir((function(Y){var ue=Y.superclusterOptions,xe=Y.clusterProperties;if(!xe||!ue)return ue;for(var Se={},Ce={},oe={accumulated:null,zoom:0},me={properties:null},ae=Object.keys(xe),Xe=0,We=ae;Xe<We.length;Xe+=1){var Ie=We[Xe],Tt=xe[Ie],et=Tt[0],At=u.createExpression(Tt[1]),kt=u.createExpression(typeof et=="string"?[et,["accumulated"],["get",Ie]]:et);Se[Ie]=At.value,Ce[Ie]=kt.value}return ue.map=function(ot){me.properties=ot;for(var Et={},Nt=0,It=ae;Nt<It.length;Nt+=1){var $e=It[Nt];Et[$e]=Se[$e].evaluate(oe,me)}return Et},ue.reduce=function(ot,Et){me.properties=Et;for(var Nt=0,It=ae;Nt<It.length;Nt+=1){var $e=It[Nt];oe.accumulated=ot[$e],ot[$e]=Ce[$e].evaluate(oe,me)}},ue})(F)).load(q.features):(function(Y,ue){return new Rn(Y,ue)})(q,F.geojsonVtOptions)}catch(Y){return k(Y)}I.loaded={};var le={};if(G){var fe=G.finish();fe&&(le.resourceTiming={},le.resourceTiming[F.source]=JSON.parse(JSON.stringify(fe)))}k(null,le)}))}},E.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},E.prototype.reloadTile=function(I,k){var F=this.loaded;return F&&F[I.uid]?w.prototype.reloadTile.call(this,I,k):this.loadTile(I,k)},E.prototype.loadGeoJSON=function(I,k){if(I.request)u.getJSON(I.request,k);else{if(typeof I.data!="string")return k(new Error("Input data given to '"+I.source+"' is not a valid GeoJSON object."));try{return k(null,JSON.parse(I.data))}catch{return k(new Error("Input data given to '"+I.source+"' is not a valid GeoJSON object."))}}},E.prototype.removeSource=function(I,k){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),k()},E.prototype.getClusterExpansionZoom=function(I,k){try{k(null,this._geoJSONIndex.getClusterExpansionZoom(I.clusterId))}catch(F){k(F)}},E.prototype.getClusterChildren=function(I,k){try{k(null,this._geoJSONIndex.getChildren(I.clusterId))}catch(F){k(F)}},E.prototype.getClusterLeaves=function(I,k){try{k(null,this._geoJSONIndex.getLeaves(I.clusterId,I.limit,I.offset))}catch(F){k(F)}},E})(ui),Vt=function(w){var E=this;this.self=w,this.actor=new u.Actor(w,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ui,geojson:_o},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(I,k){if(E.workerSourceTypes[I])throw new Error('Worker source with name "'+I+'" already registered.');E.workerSourceTypes[I]=k},this.self.registerRTLTextPlugin=function(I){if(u.plugin.isParsed())throw new Error("RTL text plugin already registered.");u.plugin.applyArabicShaping=I.applyArabicShaping,u.plugin.processBidirectionalText=I.processBidirectionalText,u.plugin.processStyledBidirectionalText=I.processStyledBidirectionalText}};return Vt.prototype.setReferrer=function(w,E){this.referrer=E},Vt.prototype.setImages=function(w,E,I){for(var k in this.availableImages[w]=E,this.workerSources[w]){var F=this.workerSources[w][k];for(var G in F)F[G].availableImages=E}I()},Vt.prototype.setLayers=function(w,E,I){this.getLayerIndex(w).replace(E),I()},Vt.prototype.updateLayers=function(w,E,I){this.getLayerIndex(w).update(E.layers,E.removedIds),I()},Vt.prototype.loadTile=function(w,E,I){this.getWorkerSource(w,E.type,E.source).loadTile(E,I)},Vt.prototype.loadDEMTile=function(w,E,I){this.getDEMWorkerSource(w,E.source).loadTile(E,I)},Vt.prototype.reloadTile=function(w,E,I){this.getWorkerSource(w,E.type,E.source).reloadTile(E,I)},Vt.prototype.abortTile=function(w,E,I){this.getWorkerSource(w,E.type,E.source).abortTile(E,I)},Vt.prototype.removeTile=function(w,E,I){this.getWorkerSource(w,E.type,E.source).removeTile(E,I)},Vt.prototype.removeDEMTile=function(w,E){this.getDEMWorkerSource(w,E.source).removeTile(E)},Vt.prototype.removeSource=function(w,E,I){if(this.workerSources[w]&&this.workerSources[w][E.type]&&this.workerSources[w][E.type][E.source]){var k=this.workerSources[w][E.type][E.source];delete this.workerSources[w][E.type][E.source],k.removeSource!==void 0?k.removeSource(E,I):I()}},Vt.prototype.loadWorkerSource=function(w,E,I){try{this.self.importScripts(E.url),I()}catch(k){I(k.toString())}},Vt.prototype.syncRTLPluginState=function(w,E,I){try{u.plugin.setState(E);var k=u.plugin.getPluginURL();if(u.plugin.isLoaded()&&!u.plugin.isParsed()&&k!=null){this.self.importScripts(k);var F=u.plugin.isParsed();I(F?void 0:new Error("RTL Text Plugin failed to import scripts from "+k),F)}}catch(G){I(G.toString())}},Vt.prototype.getAvailableImages=function(w){var E=this.availableImages[w];return E||(E=[]),E},Vt.prototype.getLayerIndex=function(w){var E=this.layerIndexes[w];return E||(E=this.layerIndexes[w]=new dt),E},Vt.prototype.getWorkerSource=function(w,E,I){var k=this;return this.workerSources[w]||(this.workerSources[w]={}),this.workerSources[w][E]||(this.workerSources[w][E]={}),this.workerSources[w][E][I]||(this.workerSources[w][E][I]=new this.workerSourceTypes[E]({send:function(F,G,W){k.actor.send(F,G,W,w)}},this.getLayerIndex(w),this.getAvailableImages(w))),this.workerSources[w][E][I]},Vt.prototype.getDEMWorkerSource=function(w,E){return this.demWorkerSources[w]||(this.demWorkerSources[w]={}),this.demWorkerSources[w][E]||(this.demWorkerSources[w][E]=new qr),this.demWorkerSources[w][E]},Vt.prototype.enforceCacheSizeLimit=function(w,E){u.enforceCacheSizeLimit(E)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new Vt(self)),Vt})),Dt(["./shared"],(function(u){var St=u.createCommonjsModule((function(i){function o(p){return!n(p)}function n(p){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?(function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var d,y,v=new Blob([""],{type:"text/javascript"}),S=URL.createObjectURL(v);try{y=new Worker(S),d=!0}catch{d=!1}return y&&y.terminate(),URL.revokeObjectURL(S),d})()?"Uint8ClampedArray"in window?ArrayBuffer.isView?(function(){var d=document.createElement("canvas");d.width=d.height=1;var y=d.getContext("2d");if(!y)return!1;var v=y.getImageData(0,0,1,1);return v&&v.width===d.width})()?(s[f=p&&p.failIfMajorPerformanceCaveat]===void 0&&(s[f]=(function(d){var y=(function(S){var z=document.createElement("canvas"),C=Object.create(o.webGLContextAttributes);return C.failIfMajorPerformanceCaveat=S,z.probablySupportsContext?z.probablySupportsContext("webgl",C)||z.probablySupportsContext("experimental-webgl",C):z.supportsContext?z.supportsContext("webgl",C)||z.supportsContext("experimental-webgl",C):z.getContext("webgl",C)||z.getContext("experimental-webgl",C)})(d);if(!y)return!1;var v=y.createShader(y.VERTEX_SHADER);return!(!v||y.isContextLost())&&(y.shaderSource(v,"void main() {}"),y.compileShader(v),y.getShaderParameter(v,y.COMPILE_STATUS)===!0)})(f)),s[f]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray supp
1ort":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var f}i.exports?i.exports=o:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=o,window.mapboxgl.notSupportedReason=n);var s={};o.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),se={create:function(i,o,n){var s=u.window.document.createElement(i);return o!==void 0&&(s.className=o),n&&n.appendChild(s),s},createNS:function(i,o){return u.window.document.createElementNS(i,o)}},dt=u.window.document&&u.window.document.documentElement.style;function Fe(i){if(!dt)return i[0];for(var o=0;o<i.length;o++)if(i[o]in dt)return i[o];return i[0]}var li,ze=Fe(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);se.disableDrag=function(){dt&&ze&&(li=dt[ze],dt[ze]="none")},se.enableDrag=function(){dt&&ze&&(dt[ze]=li)};var Ps=Fe(["transform","WebkitTransform"]);se.setTransform=function(i,o){i.style[Ps]=o};var ui=!1;try{var An=Object.defineProperty({},"passive",{get:function(){ui=!0}});u.window.addEventListener("test",An,An),u.window.removeEventListener("test",An,An)}catch{ui=!1}se.addEventListener=function(i,o,n,s){s===void 0&&(s={}),i.addEventListener(o,n,"passive"in s&&ui?s:s.capture)},se.removeEventListener=function(i,o,n,s){s===void 0&&(s={}),i.removeEventListener(o,n,"passive"in s&&ui?s:s.capture)};var qr=function(i){i.preventDefault(),i.stopPropagation(),u.window.removeEventListener("click",qr,!0)};function Oo(i){var o=i.userImage;return!!(o&&o.render&&o.render())&&(i.data.replace(new Uint8Array(o.data.buffer)),!0)}se.suppressClick=function(){u.window.addEventListener("click",qr,!0),u.window.setTimeout((function(){u.window.removeEventListener("click",qr,!0)}),0)},se.mousePos=function(i,o){var n=i.getBoundingClientRect();return new u.Point(o.clientX-n.left-i.clientLeft,o.clientY-n.top-i.clientTop)},se.touchPos=function(i,o){for(var n=i.getBoundingClientRect(),s=[],p=0;p<o.length;p++)s.push(new u.Point(o[p].clientX-n.left-i.clientLeft,o[p].clientY-n.top-i.clientTop));return s},se.mouseButton=function(i){return u.window.InstallTrigger!==void 0&&i.button===2&&i.ctrlKey&&u.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:i.button},se.remove=function(i){i.parentNode&&i.parentNode.removeChild(i)};var _r=(function(i){function o(){i.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new u.RGBAImage({width:1,height:1}),this.dirty=!0}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.isLoaded=function(){return this.loaded},o.prototype.setLoaded=function(n){if(this.loaded!==n&&(this.loaded=n,n)){for(var s=0,p=this.requestors;s<p.length;s+=1){var f=p[s];this._notify(f.ids,f.callback)}this.requestors=[]}},o.prototype.getImage=function(n){return this.images[n]},o.prototype.addImage=function(n,s){this._validate(n,s)&&(this.images[n]=s)},o.prototype._validate=function(n,s){var p=!0;return this._validateStretch(s.stretchX,s.data&&s.data.width)||(this.fire(new u.ErrorEvent(new Error('Image "'+n+'" has invalid "stretchX" value'))),p=!1),this._validateStretch(s.stretchY,s.data&&s.data.height)||(this.fire(new u.ErrorEvent(new Error('Image "'+n+'" has invalid "stretchY" value'))),p=!1),this._validateContent(s.content,s)||(this.fire(new u.ErrorEvent(new Error('Image "'+n+'" has invalid "content" value'))),p=!1),p},o.prototype._validateStretch=function(n,s){if(!n)return!0;for(var p=0,f=0,d=n;f<d.length;f+=1){var y=d[f];if(y[0]<p||y[1]<y[0]||s<y[1])return!1;p=y[1]}return!0},o.prototype._validateContent=function(n,s){return!(n&&(n.length!==4||n[0]<0||s.data.width<n[0]||n[1]<0||s.data.height<n[1]||n[2]<0||s.data.width<n[2]||n[3]<0||s.data.height<n[3]||n[2]<n[0]||n[3]<n[1]))},o.prototype.updateImage=function(n,s){s.version=this.images[n].version+1,this.images[n]=s,this.updatedImages[n]=!0},o.prototype.removeImage=function(n){var s=this.images[n];delete this.images[n],delete this.patterns[n],s.userImage&&s.userImage.onRemove&&s.userImage.onRemove()},o.prototype.listImages=function(){return Object.keys(this.images)},o.prototype.getImages=function(n,s){var p=!0;if(!this.isLoaded())for(var f=0,d=n;f<d.length;f+=1)this.images[d[f]]||(p=!1);this.isLoaded()||p?this._notify(n,s):this.requestors.push({ids:n,callback:s})},o.prototype._notify=function(n,s){for(var p={},f=0,d=n;f<d.length;f+=1){var y=d[f];this.images[y]||this.fire(new u.Event("styleimagemissing",{id:y}));var v=this.images[y];v?p[y]={data:v.data.clone(),pixelRatio:v.pixelRatio,sdf:v.sdf,version:v.version,stretchX:v.stretchX,stretchY:v.stretchY,content:v.content,hasRenderCallback:!!(v.userImage&&v.userImage.render)}:u.warnOnce('Image "'+y+'" 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.')}s(null,p)},o.prototype.getPixelSize=function(){var n=this.atlasImage;return{width:n.width,height:n.height}},o.prototype.getPattern=function(n){var s=this.patterns[n],p=this.getImage(n);if(!p)return null;if(s&&s.position.version===p.version)return s.position;if(s)s.position.version=p.version;else{var f={w:p.data.width+2,h:p.data.height+2,x:0,y:0},d=new u.ImagePosition(f,p);this.patterns[n]={bin:f,position:d}}return this._updatePatternAtlas(),this.patterns[n].position},o.prototype.bind=function(n){var s=n.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u.Texture(n,this.atlasImage,s.RGBA),this.atlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE)},o.prototype._updatePatternAtlas=function(){var n=[];for(var s in this.patterns)n.push(this.patterns[s].bin);var p=u.potpack(n),f=p.w,d=p.h,y=this.atlasImage;for(var v in y.resize({width:f||1,height:d||1}),this.patterns){var S=this.patterns[v].bin,z=S.x+1,C=S.y+1,P=this.images[v].data,O=P.width,B=P.height;u.RGBAImage.copy(P,y,{x:0,y:0},{x:z,y:C},{width:O,height:B}),u.RGBAImage.copy(P,y,{x:0,y:B-1},{x:z,y:C-1},{width:O,height:1}),u.RGBAImage.copy(P,y,{x:0,y:0},{x:z,y:C+B},{width:O,height:1}),u.RGBAImage.copy(P,y,{x:O-1,y:0},{x:z-1,y:C},{width:1,height:B}),u.RGBAImage.copy(P,y,{x:0,y:0},{x:z+O,y:C},{width:1,height:B})}this.dirty=!0},o.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},o.prototype.dispatchRenderCallbacks=function(n){for(var s=0,p=n;s<p.length;s+=1){var f=p[s];if(!this.callbackDispatchedThisFrame[f]){this.callbackDispatchedThisFrame[f]=!0;var d=this.images[f];Oo(d)&&this.updateImage(f,d)}}},o})(u.Evented),ba=lo,so=lo,Ni=1e20;function lo(i,o,n,s,p,f){this.fontSize=i||24,this.buffer=o===void 0?3:o,this.cutoff=s||.25,this.fontFamily=p||"sans-serif",this.fontWeight=f||"normal",this.radius=n||8;var d=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=d,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(d*d),this.gridInner=new Float64Array(d*d),this.f=new Float64Array(d),this.d=new Float64Array(d),this.z=new Float64Array(d+1),this.v=new Int16Array(d),this.middle=Math.round(d/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function uo(i,o,n,s,p,f,d){for(var y=0;y<o;y++){for(var v=0;v<n;v++)s[v]=i[v*o+y];for(zn(s,p,f,d,n),v=0;v<n;v++)i[v*o+y]=p[v]}for(v=0;v<n;v++){for(y=0;y<o;y++)s[y]=i[v*o+y];for(zn(s,p,f,d,o),y=0;y<o;y++)i[v*o+y]=Math.sqrt(p[y])}}function zn(i,o,n,s,p){n[0]=0,s[0]=-Ni,s[1]=+Ni;for(var f=1,d=0;f<p;
vendor: 10,605 bytes, line 1
1f++){for(var y=(i[f]+f*f-(i[n[d]]+n[d]*n[d]))/(2*f-2*n[d]);y<=s[d];)d--,y=(i[f]+f*f-(i[n[d]]+n[d]*n[d]))/(2*f-2*n[d]);n[++d]=f,s[d]=y,s[d+1]=+Ni}for(f=0,d=0;f<p;f++){for(;s[d+1]<f;)d++;o[f]=(f-n[d])*(f-n[d])+i[n[d]]}}lo.prototype.draw=function(i){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(i,this.buffer,this.middle);for(var o=this.ctx.getImageData(0,0,this.size,this.size),n=new Uint8ClampedArray(this.size*this.size),s=0;s<this.size*this.size;s++){var p=o.data[4*s+3]/255;this.gridOuter[s]=p===1?0:p===0?Ni:Math.pow(Math.max(0,.5-p),2),this.gridInner[s]=p===1?Ni:p===0?0:Math.pow(Math.max(0,p-.5),2)}for(uo(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),uo(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),s=0;s<this.size*this.size;s++)n[s]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[s]-this.gridInner[s])/this.radius+this.cutoff))));return n},ba.default=so;var Er=function(i,o){this.requestManager=i,this.localIdeographFontFamily=o,this.entries={}};Er.prototype.setURL=function(i){this.url=i},Er.prototype.getGlyphs=function(i,o){var n=this,s=[];for(var p in i)for(var f=0,d=i[p];f<d.length;f+=1)s.push({stack:p,id:d[f]});u.asyncAll(s,(function(y,v){var S=y.stack,z=y.id,C=n.entries[S];C||(C=n.entries[S]={glyphs:{},requests:{},ranges:{}});var P=C.glyphs[z];if(P===void 0){if(P=n._tinySDF(C,S,z))return C.glyphs[z]=P,void v(null,{stack:S,id:z,glyph:P});var O=Math.floor(z/256);if(256*O>65535)v(new Error("glyphs > 65535 not supported"));else if(C.ranges[O])v(null,{stack:S,id:z,glyph:P});else{var B=C.requests[O];B||(B=C.requests[O]=[],Er.loadGlyphRange(S,O,n.url,n.requestManager,(function(j,R){if(R){for(var N in R)n._doesCharSupportLocalGlyph(+N)||(C.glyphs[+N]=R[+N]);C.ranges[O]=!0}for(var X=0,H=B;X<H.length;X+=1)(0,H[X])(j,R);delete C.requests[O]}))),B.push((function(j,R){j?v(j):R&&v(null,{stack:S,id:z,glyph:R[z]||null})}))}}else v(null,{stack:S,id:z,glyph:P})}),(function(y,v){if(y)o(y);else if(v){for(var S={},z=0,C=v;z<C.length;z+=1){var P=C[z],O=P.stack,B=P.id,j=P.glyph;(S[O]||(S[O]={}))[B]=j&&{id:j.id,bitmap:j.bitmap.clone(),metrics:j.metrics}}o(null,S)}}))},Er.prototype._doesCharSupportLocalGlyph=function(i){return!!this.localIdeographFontFamily&&(u.isChar["CJK Unified Ideographs"](i)||u.isChar["Hangul Syllables"](i)||u.isChar.Hiragana(i)||u.isChar.Katakana(i))},Er.prototype._tinySDF=function(i,o,n){var s=this.localIdeographFontFamily;if(s&&this._doesCharSupportLocalGlyph(n)){var p=i.tinySDF;if(!p){var f="400";/bold/i.test(o)?f="900":/medium/i.test(o)?f="500":/light/i.test(o)&&(f="200"),p=i.tinySDF=new Er.TinySDF(24,3,8,.25,s,f)}return{id:n,bitmap:new u.AlphaImage({width:30,height:30},p.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},Er.loadGlyphRange=function(i,o,n,s,p){var f=256*o,d=f+255,y=s.transformRequest(s.normalizeGlyphsURL(n).replace("{fontstack}",i).replace("{range}",f+"-"+d),u.ResourceType.Glyphs);u.getArrayBuffer(y,(function(v,S){if(v)p(v);else if(S){for(var z={},C=0,P=u.parseGlyphPBF(S);C<P.length;C+=1){var O=P[C];z[O.id]=O}p(null,z)}}))},Er.TinySDF=ba;var ji=function(){this.specification=u.styleSpec.light.position};ji.prototype.possiblyEvaluate=function(i,o){return u.sphericalToCartesian(i.expression.evaluate(o))},ji.prototype.interpolate=function(i,o,n){return{x:u.number(i.x,o.x,n),y:u.number(i.y,o.y,n),z:u.number(i.z,o.z,n)}};var Si=new u.Properties({anchor:new u.DataConstantProperty(u.styleSpec.light.anchor),position:new ji,color:new u.DataConstantProperty(u.styleSpec.light.color),intensity:new u.DataConstantProperty(u.styleSpec.light.intensity)}),co=(function(i){function o(n){i.call(this),this._transitionable=new u.Transitionable(Si),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getLight=function(){return this._transitionable.serialize()},o.prototype.setLight=function(n,s){if(s===void 0&&(s={}),!this._validate(u.validateLight,n,s))for(var p in n){var f=n[p];u.endsWith(p,"-transition")?this._transitionable.setTransition(p.slice(0,-11),f):this._transitionable.setValue(p,f)}},o.prototype.updateTransitions=function(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)},o.prototype.hasTransition=function(){return this._transitioning.hasTransition()},o.prototype.recalculate=function(n){this.properties=this._transitioning.possiblyEvaluate(n)},o.prototype._validate=function(n,s,p){return(!p||p.validate!==!1)&&u.emitValidationErrors(this,n.call(u.validateStyle,u.extend({value:s,style:{glyphs:!0,sprite:!0},styleSpec:u.styleSpec})))},o})(u.Evented),qt=function(i,o){this.width=i,this.height=o,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};qt.prototype.getDash=function(i,o){var n=i.join(",")+String(o);return this.dashEntry[n]||(this.dashEntry[n]=this.addDash(i,o)),this.dashEntry[n]},qt.prototype.getDashRanges=function(i,o,n){var s=[],p=i.length%2==1?-i[i.length-1]*n:0,f=i[0]*n,d=!0;s.push({left:p,right:f,isDash:d,zeroLength:i[0]===0});for(var y=i[0],v=1;v<i.length;v++){var S=i[v];s.push({left:p=y*n,right:f=(y+=S)*n,isDash:d=!d,zeroLength:S===0})}return s},qt.prototype.addRoundDash=function(i,o,n){for(var s=o/2,p=-n;p<=n;p++)for(var f=this.width*(this.nextRow+n+p),d=0,y=i[d],v=0;v<this.width;v++){v/y.right>1&&(y=i[++d]);var S=Math.abs(v-y.left),z=Math.abs(v-y.right),C=Math.min(S,z),P=void 0,O=p/n*(s+1);if(y.isDash){var B=s-Math.abs(O);P=Math.sqrt(C*C+B*B)}else P=s-Math.sqrt(C*C+O*O);this.data[f+v]=Math.max(0,Math.min(255,P+128))}},qt.prototype.addRegularDash=function(i){for(var o=i.length-1;o>=0;--o){var n=i[o],s=i[o+1];n.zeroLength?i.splice(o,1):s&&s.isDash===n.isDash&&(s.left=n.left,i.splice(o,1))}var p=i[0],f=i[i.length-1];p.isDash===f.isDash&&(p.left=f.left-this.width,f.right=p.right+this.width);for(var d=this.width*this.nextRow,y=0,v=i[y],S=0;S<this.width;S++){S/v.right>1&&(v=i[++y]);var z=Math.abs(S-v.left),C=Math.abs(S-v.right),P=Math.min(z,C);this.data[d+S]=Math.max(0,Math.min(255,(v.isDash?P:-P)+128))}},qt.prototype.addDash=function(i,o){var n=o?7:0,s=2*n+1;if(this.nextRow+s>this.height)return u.warnOnce("LineAtlas out of space"),null;for(var p=0,f=0;f<i.length;f++)p+=i[f];if(p!==0){var d=this.width/p,y=this.getDashRanges(i,this.width,d);o?this.addRoundDash(y,d,n):this.addRegularDash(y)}var v={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:p};return this.nextRow+=s,this.dirty=!0,v},qt.prototype.bind=function(i){var o=i.gl;this.texture?(o.bindTexture(o.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,o.texSubImage2D(o.TEXTURE_2D,0,0,0,this.width,this.height,o.ALPHA,o.UNSIGNED_BYTE,this.data))):(this.texture=o.createTexture(),o.bindTexture(o.TEXTURE_2D,this.texture),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.REPEAT),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.REPEAT),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texImage2D(o.TEXTURE_2D,0,o.ALPHA,this.width,this.height,0,o.ALPHA,o.UNSIGNED_BYTE,this.data))};var Zr=function i(o,n){this.workerPool=o,this.actors=[],this.currentActor=0,this.id=u.uniqueId();for(var s=this.workerPool.acquire(this.id),p=0;p<s.length;p++){var f=new i.Actor(s[p],n,this.id);f.name="Worker "+p,this.actors.push(f)}};function wa(i,o,n){var s=function(p,f){if(p)return n(p);if(f){var d=u.pick(u.extend(f,i),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);f.vector_layers&&(d.vectorLayers=f.vector_layers,d.vectorLayerIds=d.vectorLayers.map((function(y){return y.id}))),d.tiles=o.canonicalizeTileset(d,i.url),n(null,d)}};return i.url?u.getJSON(o.transformRequest(o.normalizeSourceURL(i.url),u.ResourceType.Source),s):u.browser.frame((function(){return s(null,i)}))}Zr.prototype.broadcast=function(i,o,n){u.asyncAll(this.actors,(function(s,p){s.send(i,o,p)}),n=n||function(){})},Zr.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},Zr.prototype.remove=function(){this.actors.forEach((function(i){i.remove()})),this.actors=[],this.workerPool.release(this.id)},Zr.Actor=u.Actor;var ei=function(i,o,n){this.bounds=u.LngLatBounds.convert(this.validateBounds(i)),this.minzoom=o||0,this.maxzoom=n||24};ei.prototype.validateBounds=function(i){return Array.isArray(i)&&i.length===4?[Math.max(-180,i[0]),Math.max(-90,i[1]),Math.min(180,i[2]),Math.min(90,i[3])]:[-180,-90,180,90]},ei.prototype.contains=function(i){var o=Math.pow(2,i.z),n=Math.floor(u.mercatorXfromLng(this.bounds.getWest())*o),s=Math.floor(u.mercatorYfromLat(this.bounds.getNorth())*o),p=Math.ceil(u.mercatorXfromLng(this.bounds.getEast())*o),f=Math.ceil(u.mercatorYfromLat(this.bounds.getSouth())*o);return i.x>=n&&i.x<p&&i.y>=s&&i.y<f};var po=(function(i){function o(n,s,p,f){if(i.call(this),this.id=n,this.dispatcher=p,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,u.extend(this,u.pick(s,["url","scheme","tileSize","promoteId"])),this._options=u.extend({type:"vector"},s),this._collectResourceTiming=s.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(f)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this._loaded=!1,this.fire(new u.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=wa(this._options,this.map._requestManager,(function(s,p){n._tileJSONRequest=null,n._loaded=!0,s?n.fire(new u.ErrorEvent(s)):p&&(u.extend(n,p),p.bounds&&(n.tileBounds=new ei(p.bounds,n.minzoom,n.maxzoom)),u.postTurnstileEvent(p.tiles,n.map._requestManager._customAccessToken),u.postMapLoadEvent(p.tiles,n.map._getMapId(),n.map._requestManager._skuToken,n.map._requestManager._customAccessToken),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"metadata"})),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"content"})))}))},o.prototype.loaded=function(){return this._loaded},o.prototype.hasTile=function(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.setSourceProperty=function(n){this._tileJSONRequest&&this._tileJSONRequest.cancel(),n(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},o.prototype.setTiles=function(n){var s=this;return this.setSourceProperty((function(){s._options.tiles=n}
1)),this},o.prototype.setUrl=function(n){var s=this;return this.setSourceProperty((function(){s.url=n,s._options.url=n})),this},o.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},o.prototype.serialize=function(){return u.extend({},this._options)},o.prototype.loadTile=function(n,s){var p=this.map._requestManager.normalizeTileURL(n.tileID.canonical.url(this.tiles,this.scheme)),f={request:this.map._requestManager.transformRequest(p,u.ResourceType.Tile),uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,tileSize:this.tileSize*n.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:u.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(y,v){return delete n.request,n.aborted?s(null):y&&y.status!==404?s(y):(v&&v.resourceTiming&&(n.resourceTiming=v.resourceTiming),this.map._refreshExpiredTiles&&v&&n.setExpiryData(v),n.loadVectorData(v,this.map.painter),u.cacheEntryPossiblyAdded(this.dispatcher),s(null),void(n.reloadCallback&&(this.loadTile(n,n.reloadCallback),n.reloadCallback=null)))}f.request.collectResourceTiming=this._collectResourceTiming,n.actor&&n.state!=="expired"?n.state==="loading"?n.reloadCallback=s:n.request=n.actor.send("reloadTile",f,d.bind(this)):(n.actor=this.dispatcher.getActor(),n.request=n.actor.send("loadTile",f,d.bind(this)))},o.prototype.abortTile=function(n){n.request&&(n.request.cancel(),delete n.request),n.actor&&n.actor.send("abortTile",{uid:n.uid,type:this.t
vendor: 4,366 bytes, line 1
1ype,source:this.id},void 0)},o.prototype.unloadTile=function(n){n.unloadVectorData(),n.actor&&n.actor.send("removeTile",{uid:n.uid,type:this.type,source:this.id},void 0)},o.prototype.hasTransition=function(){return!1},o})(u.Evented),ho=(function(i){function o(n,s,p,f){i.call(this),this.id=n,this.dispatcher=p,this.setEventedParent(f),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=u.extend({type:"raster"},s),u.extend(this,u.pick(s,["url","scheme","tileSize"]))}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this._loaded=!1,this.fire(new u.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=wa(this._options,this.map._requestManager,(function(s,p){n._tileJSONRequest=null,n._loaded=!0,s?n.fire(new u.ErrorEvent(s)):p&&(u.extend(n,p),p.bounds&&(n.tileBounds=new ei(p.bounds,n.minzoom,n.maxzoom)),u.postTurnstileEvent(p.tiles),u.postMapLoadEvent(p.tiles,n.map._getMapId(),n.map._requestManager._skuToken),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"metadata"})),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"content"})))}))},o.prototype.loaded=function(){return this._loaded},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},o.prototype.serialize=function(){return u.extend({},this._options)},o.prototype.hasTile=function(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)},o.prototype.loadTile=function(n,s){var p=this,f=this.map._requestManager.normalizeTileURL(n.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);n.request=u.getImage(this.map._requestManager.transformRequest(f,u.ResourceType.Tile),(function(d,y){if(delete n.request,n.aborted)n.state="unloaded",s(null);else if(d)n.state="errored",s(d);else if(y){p.map._refreshExpiredTiles&&n.setExpiryData(y),delete y.cacheControl,delete y.expires;var v=p.map.painter.context,S=v.gl;n.texture=p.map.painter.getTileTexture(y.width),n.texture?n.texture.update(y,{useMipmap:!0}):(n.texture=new u.Texture(v,y,S.RGBA,{useMipmap:!0}),n.texture.bind(S.LINEAR,S.CLAMP_TO_EDGE,S.LINEAR_MIPMAP_NEAREST),v.extTextureFilterAnisotropic&&S.texParameterf(S.TEXTURE_2D,v.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,v.extTextureFilterAnisotropicMax)),n.state="loaded",u.cacheEntryPossiblyAdded(p.dispatcher),s(null)}}))},o.prototype.abortTile=function(n,s){n.request&&(n.request.cancel(),delete n.request),s()},o.prototype.unloadTile=function(n,s){n.texture&&this.map.painter.saveTileTexture(n.texture),s()},o.prototype.hasTransition=function(){return!1},o})(u.Evented),Sa=(function(i){function o(n,s,p,f){i.call(this,n,s,p,f),this.type="raster-dem",this.maxzoom=22,this._options=u.extend({type:"raster-dem"},s),this.encoding=s.encoding||"mapbox"}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},o.prototype.loadTile=function(n,s){var p=this.map._requestManager.normalizeTileURL(n.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function f(d,y){d&&(n.state="errored",s(d)),y&&(n.dem=y,n.needsHillshadePrepare=!0,n.state="loaded",s(null))}n.request=u.getImage(this.map._requestManager.transformRequest(p,u.ResourceType.Tile),(function(d,y){if(delete n.request,n.aborted)n.state="unloaded",s(null);else if(d)n.state="errored",s(d);else if(y){this.map._refreshExpiredTiles&&n.setExpiryData(y),delete y.cacheControl,delete y.expires;var v=u.window.ImageBitmap&&y instanceof u.window.ImageBitmap&&u.offscreenCanvasSupported()?y:u.browser.getImageData(y,1),S={uid:n.uid,coord:n.tileID,source:this.id,rawImageData:v,encoding:this.encoding};n.actor&&n.state!=="expired"||(n.actor=this.dispatcher.getActor(),n.actor.send("loadDEMTile",S,f.bind(this)))}}).bind(this)),n.neighboringTiles=this._getNeighboringTiles(n.tileID)},o.prototype._getNeighboringTiles=function(n){var s=n.canonical,p=Math.pow(2,s.z),f=(s.x-1+p)%p,d=s.x===0?n.wrap-1:n.wrap,y=(s.x+1+p)%p,v=s.x+1===p?n.wrap+1:n.wrap,S={};return S[new u.OverscaledTileID(n.overscaledZ,d,s.z,f,s.y).key]={backfilled:!1}
1,S[new u.OverscaledTileID(n.overscaledZ,v,s.z,y,s.y).key]={backfilled:!1},s.y>0&&(S[new u.OverscaledTileID(n.overscaledZ,d,s.z,f,s.y-1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,n.wrap,s.z,s.x,s.y-1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,v,s.z,y,s.y-1).key]={backfilled:!1}),s.y+1<p&&(S[new u.OverscaledTileID(n.overscaledZ,d,s.z,f,s.y+1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,n.wrap,s.z,s.x,s.y+1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,v,s.z,y,s.y+1).key]={backfilled:!1}),S},o.prototype.unloadTile=function(n){n.demTexture&&this.map.painter.saveTileTexture(n.demTexture),n.fbo&&(n.fbo.destroy(),delete n.fbo),n.dem&&delete n.dem,delete n.neighboringTiles,n.state="unloaded",n.actor&&n.actor.send("removeDEMTile",{uid:n.uid,source:this.id})},o})(ho),tn=(function(i){function o(n,s,p,f){i.call(this),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=p.getActor(),this.setEventedParent(f),this._data=s.data,this._options=u.extend({},s),this._collectResourceTiming=s.collectResourceTiming,this._resourceTiming=[],s.maxzoom!==void 0&&(this.maxzoom=s.maxzoom),s.type&&(this.type=s.type),s.attribution&&(this.attribution=s.attribution),this.promoteId=s.promoteId;var d=u.EXTENT/this.tileSize;this.workerOptions=u.extend({source:this.id,cluster:s.cluster||!1,geojsonVtOptions:{buffer:(s.buffer!==void 0?s.buffer:128)*d,tolerance:(s.tolerance!==void 0?s.tolerance:.375)*d,extent:u.EXTENT,maxZoom:this.maxzoom,lineMetrics:s.lineMetrics||!1,generateId:s.generateId||!1},superclusterOptions:{maxZoom:s.clusterMaxZoom!==void 0?Math.min(s.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,s.clusterMinPoints||2),extent:u.EXTENT,radius:(s.clusterRadius||50)*d,log:!1,generateId:s.generateId||!1},clusterProperties:s.clusterProperties,filter:s.filter},s.workerOptions)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this.fire(new u.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(s){if(s)n.fire(new u.ErrorEvent(s));else{var p={dataType:"source",sourceDataType:"metadata"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(p.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new u.Event("data",p))}}))},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.setData=function(n){var s=this;return this._data=n,this.fire(new u.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(p){if(p)s.fire(new u.ErrorEvent(p));else{var f={dataType:"source",sourceDataType:"content"};s._collectResourceTiming&&s._resourceTiming&&s._resourceTiming.length>0&&(f.resourceTiming=s._resourceTiming,s._resourceTiming=[]),s.fire(new u.Event("data",f))}})),this},o.prototype.getClusterExpansionZoom=function(n,s){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:n,source:this.id},s),this},o.prototype.getClusterChildren=function(n,s){return this.actor.send("geojson.getClusterChildren",{clusterId:n,source:this.id},s),this},o.prototype.getClusterLeaves=function(n,s,p,f){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:n,limit:s,offset:p},f),this},o.prototype._updateWorkerData=function(n){var s=this;this._loaded=!1;var p=u.extend({},this.workerOptions),f=this._data;typeof f=="string"?(p.request=this.map._requestManager.transformRequest(u.browser.resolveURL(f),u.ResourceType.Source),p.request.collectResourceTiming=this._collectResourceTiming):p.data=JSON.stringify(f),this.actor.send(this.type+".loadData",p,(function(d,y){s._removed||y&&y.abandoned||(s._loaded=!0,y&&y.resourceTiming&&y.resourceTiming[s.id]&&(s._resourceTiming=y.resourceTiming[s.id].slice(0)),s.actor.send(s.type+".coalesce",{source:p.source},null),n(d))}))},o.prototype.loaded=function(){return this._loaded},o.prototype.loadTile=function(n,s){var p=this,f=n.actor?"reloadTile":"loadTile";
vendor: 5,105 bytes, line 1
1n.actor=this.actor,n.request=this.actor.send(f,{type:this.type,uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:u.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(d,y){return delete n.request,n.unloadVectorData(),n.aborted?s(null):d?s(d):(n.loadVectorData(y,p.map.painter,f==="reloadTile"),s(null))}))},o.prototype.abortTile=function(n){n.request&&(n.request.cancel(),delete n.request),n.aborted=!0},o.prototype.unloadTile=function(n){n.unloadVectorData(),this.actor.send("removeTile",{uid:n.uid,type:this.type,source:this.id})},o.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},o.prototype.serialize=function(){return u.extend({},this._options,{type:this.type,data:this._data})},o.prototype.hasTransition=function(){return!1},o})(u.Evented),Ti=u.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Mi=(function(i){function o(n,s,p,f){i.call(this),this.id=n,this.dispatcher=p,this.coordinates=s.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(f),this.options=s}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(n,s){var p=this;this._loaded=!1,this.fire(new u.Event("dataloading",{dataType:"source"})),this.url=this.options.url,u.getImage(this.map._requestManager.transformRequest(this.url,u.ResourceType.Image),(function(f,d){p._loaded=!0,f?p.fire(new u.ErrorEvent(f)):d&&(p.image=d,n&&(p.coordinates=n),s&&s(),p._finishLoading())}))},o.prototype.loaded=function(){return this._loaded},o.prototype.updateImage=function(n){var s=this;return this.image&&n.url?(this.options.url=n.url,this.load(n.coordinates,(function(){s.texture=null})),this):this},o.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new u.Event("data",{dataType:"source",sourceDataType:"metadata"})))},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.setCoordinates=function(n){var s=this;this.coordinates=n;var p=n.map(u.MercatorCoordinate.fromLngLat);this.tileID=(function(d){for(var y=1/0,v=1/0,S=-1/0,z=-1/0,C=0,P=d;C<P.length;C+=1){var O=P[C];y=Math.min(y,O.x),v=Math.min(v,O.y),S=Math.max(S,O.x),z=Math.max(z,O.y)}var B=Math.max(S-y,z-v),j=Math.max(0,Math.floor(-Math.log(B)/Math.LN2)),R=Math.pow(2,j);return new u.CanonicalTileID(j,Math.floor((y+S)/2*R),Math.floor((v+z)/2*R))})(p),this.minzoom=this.maxzoom=this.tileID.z;var f=p.map((function(d){return s.tileID.getTilePoint(d)._round()}));return this._boundsArray=new u.StructArrayLayout4i8,this._boundsArray.emplaceBack(f[0].x,f[0].y,0,0),this._boundsArray.emplaceBack(f[1].x,f[1].y,u.EXTENT,0),this._boundsArray.emplaceBack(f[3].x,f[3].y,0,u.EXTENT),this._boundsArray.emplaceBack(f[2].x,f[2].y,u.EXTENT,u.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new u.Event("data",{dataType:"source",sourceDataType:"content"})),this},o.prototype.prepare=function(){if(Object.keys(this.tiles).length!==0&&this.image){var n=this.map.painter.context,s=n.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,Ti.members)),this.boundsSegments||(this.boundsSegments=u.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u.Texture(n,this.image,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE)),this.tiles){var f=this.tiles[p];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture)}}},o.prototype.loadTile=function(n,s){this.tileID&&this.tileID.equals(n.tileID.canonical)?(this.tiles[String(n.tileID.wrap)]=n,n.buckets={},s(null)):(n.state="errored",s(null))},o.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},o.prototype.hasTransition=function(){return!1},o})(u.Evented),Pn=(function(i){function o(n,s,p,f){i.call(this,n,s,p,f),this.roundZoom=!0,this.type="video",this.options=s}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this._loaded=!1;var s=this.options;this.urls=[];for(var p=0,f=s.urls;p<f.length;p+=1)this.urls.push(this.map._requestManager.transformRequest(f[p],u.ResourceType.Source).url);u.getVideo(this.urls,(function(d,y){n._loaded=!0,d?n.fire(new u.ErrorEvent(d)):y&&(n.video=y,n.video.loop=!0,n.video.addEventListener("playing",(function(){n.map.triggerRepaint()})),n.map&&n.video.play(),n._finishLoading())}))},o.prototype.pause=function(){this.video&&this.video.pause()},o.prototype.play=function(){this.video&&this.video.play()},o.prototype.seek=function(n){if(this.video){var s=this.video.seekable;n<s.start(0)||n>s.end(0)?this.fire(new u.ErrorEvent(new u.ValidationError("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=n}},o.prototype.getVideo=function(){return this.video}
1,o.prototype.onAdd=function(n){this.map||(this.map=n,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},o.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var n=this.map.painter.context,s=n.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,Ti.members)),this.boundsSegments||(this.boundsSegments=u.SegmentVector.simpleSegment(0,0,4,2)),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 u.Texture(n,this.video,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE)),this.tiles){var f=this.tiles[p];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture)}}},o.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},o.prototype.hasTransition=function(){return this.video&&!this.video.paused},o})(Mi),Cn=(function(i){function o(n,s,p,f){i.call(this,n,s,p,f),s.coordinates?Array.isArray(s.coordinates)&&s.coordinates.length===4&&!s.coordinates.some((function(d){return!Array.isArray(d)||d.length!==2||d.some((function(y){return typeof y!="number"}))}))||this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'missing required property "coordinates"'))),s.animate&&typeof s.animate!="boolean"&&this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),s.canvas?typeof s.canvas=="string"||s.canvas instanceof u.window.HTMLCanvasElement||this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,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 u.ErrorEvent(new u.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=s,this.animate=s.animate===void 0||s.animate}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof u.window.HTMLCanvasElement?this.options.canvas:u.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new u.ErrorEvent(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())},o.prototype.getCanvas=function(){return this.canvas},o.prototype.onAdd=function(n){this.map=n,this.load(),this.canvas&&this.animate&&this.play()},o.prototype.onRemove=function(){this.pause()},o.prototype.prepare=function(){var n=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,n=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,n=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var s=this.map.painter.context,p=s.gl;for(var f in this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,Ti.members)),this.boundsSegments||(this.boundsSegments=u.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(n||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u.Texture(s,this.canvas,p.RGBA,{premultiply:!0}),this.tiles){var d=this.tiles[f];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture)}}},o.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},o.prototype.hasTransition=function(){return this._playing},o.prototype._hasInvalidDimensions=function(){for(var n=0,s=[this.canvas.width,this.canvas.height];n<s.length;n+=1){var p=s[n];if(isNaN(p)||p<=0)return!0}return!1},o})(Mi),rn={vector:po,raster:ho,"raster-dem":Sa,geojson:tn,video:Pn,image:Mi,canvas:Cn};function Cs(i,o){var n=u.identity([]);return u.translate(n,n,[1,1,0]),u.scale(n,n,[.5*i.width,.5*i.height,1]),u.multiply(n,n,i.calculatePosMatrix(o.toUnwrapped()))}function Ir(i,o,n,s,p,f){var d=(function(j,R,N){if(j)for(var X=0,H=j;X<H.length;X+=1){var te=R[H[X]];if(te&&te.source===N&&te.type==="fill-extrusion")return!0}else for(var ee in R){var re=R[ee];if(re.source===N&&re.type==="fill-extrusion")return!0}return!1})(p&&p.layers,o,i.id),y=f.maxPitchScaleFactor(),v=i.tilesIn(s,y,d);v.sort(qi);for(var S=[],z=0,C=v;z<C.length;z+=1){var P=C[z];S.push({wrappedTileID:P.tileID.wrapped().key,queryResults:P.tile.queryRenderedFeatures(o,n,i._state,P.queryGeometry,P.cameraQueryGeometry,P.scale,p,f,y,Cs(i.transform,P.tileID))})}var O=(function(j){for(var R={},N={},X=0,H=j;X<H.length;X+=1){var te=H[X],ee=te.queryResults,re=te.wrappedTileID,ne=N[re]=N[re]||{};for(var he in ee)for(var ce=ee[he],ve=ne[he]=ne[he]||{},Me=R[he]=R[he]||[],Re=0,De=ce;Re<De.length;Re+=1){var st=De[Re];ve[st.featureIndex]||(ve[st.featureIndex]=!0,Me.push(st))}}return R})(S);
1for(var B in O)O[B].forEach((function(j){var R=j.feature,N=i.getFeatureState(R.layer["source-layer"],R.id);R.source=R.layer.source,R.layer["source-layer"]&&(R.sourceLayer=R.layer["source-layer"]),R.state=N}));return O}function qi(i,o){var n=i.tileID,s=o.tileID;return n.overscaledZ-s.overscaledZ||n.canonical.y-s.canonical.y||n.wrap-s.wrap||n.canonical.x-s.canonical.x}var gt=function(i,o){this.max=i,this.onRemove=o,this.reset()};gt.prototype.reset=function(){for(var i in this.data)for(var o=0,n=this.data[i];o<n.length;o+=1){var s=n[o];s.timeout&&clearTimeout(s.timeout),this.onRemove(s.value)}return this.data={},this.order=[],this},gt.prototype.add=function(i,o,n){var s=this,p=i.wrapped().key;this.data[p]===void 0&&(this.data[p]=[]);var f={value:o,timeout:void 0};if(n!==void 0&&(f.timeout=setTimeout((function(){s.remove(i,f)}),n)),this.data[p].push(f),this.order.push(p),this.order.length>this.max){var d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this},gt.prototype.has=function(i){return i.wrapped().key in this.data},gt.prototype.getAndRemove=function(i){return this.has(i)?this._getAndRemoveByKey(i.wrapped().key):null},gt.prototype._getAndRemoveByKey=function(i){var o=this.data[i].shift();return o.timeout&&clearTimeout(o.timeout),this.data[i].length===0&&delete this.data[i],this.order.splice(this.order.indexOf(i),1),o.value},gt.prototype.getByKey=function(i){var o=this.data[i];return o?o[0].value:null},gt.prototype.get=function(i){return this.has(i)?this.data[i.wrapped().key][0].value:null},gt.prototype.remove=function(i,o){if(!this.has(i))return this;var n=i.wrapped().key,s=o===void 0?0:this.data[n].indexOf(o),p=this.data[n][s];return this.data[n].splice(s,1),p.timeout&&clearTimeout(p.timeout),this.data[n].length===0&&delete this.data[n],this.onRemove(p.value),this.order.splice(this.order.indexOf(n),1),this},gt.prototype.setMaxSize=function(i){for(this.max=i;this.order.length>this.max;){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},gt.prototype.filter=function(i){var o=[];for(var n in this.data)for(var s=0,p=this.data[n];s<p.length;s+=1){var f=p[s];i(f.value)||o.push(f)}for(var d=0,y=o;d<y.length;d+=1){var v=y[d];this.remove(v.value.tileID,v)}};var Di=function(i,o,n){this.context=i;var s=i.gl;this.buffer=s.createBuffer(),this.dynamicDraw=!!n,this.context.unbindVAO(),i.bindElementBuffer.set(this.buffer),s.bufferData(s.ELEMENT_ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?s.DYNAMIC_DRAW:s.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer};Di.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Di.prototype.updateData=function(i){var o=this.context.gl;this.context.unbindVAO(),this.bind(),o.bufferSubData(o.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)},Di.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var fo={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Ei=function(i,o,n,s){this.length=o.length,this.attributes=n,this.itemSize=o.bytesPerElement,this.dynamicDraw=s,this.context=i;var p=i.gl;this.buffer=p.createBuffer(),i.bindVertexBuffer.set(this.buffer),p.bufferData(p.ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer};Ei.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Ei.prototype.updateData=function(i){var o=this.context.gl;this.bind(),o.bufferSubData(o.ARRAY_BUFFER,0,i.arrayBuffer)},Ei.prototype.enableAttributes=function(i,o){for(var n=0;n<this.attributes.length;n++){var s=o.attributes[this.attributes[n].name];s!==void 0&&i.enableVertexAttribArray(s)}},Ei.prototype.setVertexAttribPointers=function(i,o,n){for(var s=0;s<this.attributes.length;s++){var p=this.attributes[s],f=o.attributes[p.name];f!==void 0&&i.vertexAttribPointer(f,p.components,i[fo[p.type]],!1,this.itemSize,p.offset+this.itemSize*(n||0))}},Ei.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var it=function(i){this.gl=i.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};it.prototype.get=function(){return this.current},it.prototype.set=function(i){},it.prototype.getDefault=function(){return this.default},it.prototype.setDefault=function(){this.set(this.default)};var nn=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return u.Color.transparent},o.prototype.set=function(n){var s=this.current;(n.r!==s.r||n.g!==s.g||n.b!==s.b||n.a!==s.a||this.dirty)&&(this.gl.clearColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)},o})(it),Ar=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 1},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.clearDepth(n),this.current=n,this.dirty=!1)},o})(it),ci=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 0},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.clearStencil(n),this.current=n,this.dirty=!1)},o})(it),ks=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return[!0,
vendor: 4,883 bytes, line 1
1!0,!0,!0]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||n[2]!==s[2]||n[3]!==s[3]||this.dirty)&&(this.gl.colorMask(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)},o})(it),Ii=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!0},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.depthMask(n),this.current=n,this.dirty=!1)},o})(it),Uo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 255},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.stencilMask(n),this.current=n,this.dirty=!1)},o})(it),pi=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},o.prototype.set=function(n){var s=this.current;(n.func!==s.func||n.ref!==s.ref||n.mask!==s.mask||this.dirty)&&(this.gl.stencilFunc(n.func,n.ref,n.mask),this.current=n,this.dirty=!1)},o})(it),kn=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){var n=this.gl;return[n.KEEP,n.KEEP,n.KEEP]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||n[2]!==s[2]||this.dirty)&&(this.gl.stencilOp(n[0],n[1],n[2]),this.current=n,this.dirty=!1)},o})(it),mo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST),this.current=n,this.dirty=!1}},o})(it),hi=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return[0,1]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||this.dirty)&&(this.gl.depthRange(n[0],n[1]),this.current=n,this.dirty=!1)},o})(it),fi=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST),this.current=n,this.dirty=!1}},o})(it),Mn=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.LESS},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.depthFunc(n),this.current=n,this.dirty=!1)},o})(it),Ai=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.BLEND):s.disable(s.BLEND),this.current=n,this.dirty=!1}},o})(it),Ta=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){var n=this.gl;return[n.ONE,n.ZERO]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||this.dirty)&&(this.gl.blendFunc(n[0],n[1]),this.current=n,this.dirty=!1)},o})(it),Ea=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return u.Color.transparent},o.prototype.set=function(n){var s=this.current;(n.r!==s.r||n.g!==s.g||n.b!==s.b||n.a!==s.a||this.dirty)&&(this.gl.blendColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)},o})(it),Vo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.FUNC_ADD},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.blendEquation(n),this.current=n,this.dirty=!1)},o})(it),No=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE),this.current=n,this.dirty=!1}},o})(it),yo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.BACK}
1,o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.cullFace(n),this.current=n,this.dirty=!1)},o})(it),Ia=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.CCW},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.frontFace(n),this.current=n,this.dirty=!1)},o})(it),go=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.useProgram(n),this.current=n,this.dirty=!1)},o})(it),jo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.TEXTURE0},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.activeTexture(n),this.current=n,this.dirty=!1)},o})(it),Dn=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){var n=this.gl;return[0,0,n.drawingBufferWidth,n.drawingBufferHeight]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||n[2]!==s[2]||n[3]!==s[3]||this.dirty)&&(this.gl.viewport(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)},o})(it),qo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindFramebuffer(s.FRAMEBUFFER,n),this.current=n,this.dirty=!1}},o})(it),Zo=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindRenderbuffer(s.RENDERBUFFER,n),this.current=n,this.dirty=!1}},o})(it),Aa=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindTexture(s.TEXTURE_2D,n),this.current=n,this.dirty=!1}},o})(it),za=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,n),this.current=n,this.dirty=!1}},o})(it),Ln=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){var s=this.gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,n),this.current=n,this.dirty=!1},o})(it),Rn=(function(i){function o(n){i.call(this,n),this.vao=n.extVertexArrayObject}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){this.vao&&(n!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(n),this.current=n,this.dirty=!1)},o})(it),on=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 4},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,n),this.current=n,this.dirty=!1}},o})(it),Bn=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n),this.current=n,this.dirty=!1}},o})(it),_o=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,n),this.current=n,this.dirty=!1}},o})(it),Vt=(function(i){function o(n,s){i.call(this,n),this.context=n,this.parent=s}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o})(it),w=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.setDirty=function(){this.dirty=!0},o.prototype.set=function(n){if(n!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var s=this.gl;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,n,0),this.current=n,this.dirty=!1}},o})(Vt),E=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.set=function(n){if(n!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,n),this.current=n,this.dirty=!1}},o})(Vt),I=function(i,o,n,s){this.context=i,this.width=o,this.height=n;var p=this.framebuffer=i.gl.createFramebuffer();
vendor: 5,705 bytes, line 1
1this.colorAttachment=new w(i,p),s&&(this.depthAttachment=new E(i,p))};I.prototype.destroy=function(){var i=this.context.gl,o=this.colorAttachment.get();if(o&&i.deleteTexture(o),this.depthAttachment){var n=this.depthAttachment.get();n&&i.deleteRenderbuffer(n)}i.deleteFramebuffer(this.framebuffer)};var k=function(i,o,n){this.func=i,this.mask=o,this.range=n};k.ReadOnly=!1,k.ReadWrite=!0,k.disabled=new k(519,k.ReadOnly,[0,1]);var F=function(i,o,n,s,p,f){this.test=i,this.ref=o,this.mask=n,this.fail=s,this.depthFail=p,this.pass=f};F.disabled=new F({func:519,mask:0},0,0,7680,7680,7680);var G=function(i,o,n){this.blendFunction=i,this.blendColor=o,this.mask=n};G.disabled=new G(G.Replace=[1,0],u.Color.transparent,[!1,!1,!1,!1]),G.unblended=new G(G.Replace,u.Color.transparent,[!0,!0,!0,!0]),G.alphaBlended=new G([1,771],u.Color.transparent,[!0,!0,!0,!0]);var W=function(i,o,n){this.enable=i,this.mode=o,this.frontFace=n};W.disabled=new W(!1,1029,2305),W.backCCW=new W(!0,1029,2305);var q=function(i){this.gl=i,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new nn(this),this.clearDepth=new Ar(this),this.clearStencil=new ci(this),this.colorMask=new ks(this),this.depthMask=new Ii(this),this.stencilMask=new Uo(this),this.stencilFunc=new pi(this),this.stencilOp=new kn(this),this.stencilTest=new mo(this),this.depthRange=new hi(this),this.depthTest=new fi(this),this.depthFunc=new Mn(this),this.blend=new Ai(this),this.blendFunc=new Ta(this),this.blendColor=new Ea(this),this.blendEquation=new Vo(this),this.cullFace=new No(this),this.cullFaceSide=new yo(this),this.frontFace=new Ia(this),this.program=new go(this),this.activeTexture=new jo(this),this.viewport=new Dn(this),this.bindFramebuffer=new qo(this),this.bindRenderbuffer=new Zo(this),this.bindTexture=new Aa(this),this.bindVertexBuffer=new za(this),this.bindElementBuffer=new Ln(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Rn(this),this.pixelStoreUnpack=new on(this),this.pixelStoreUnpackPremultiplyAlpha=new Bn(this),this.pixelStoreUnpackFlipY=new _o(this),this.extTextureFilterAnisotropic=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=i.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=i.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(i.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=i.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=i.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE)};q.prototype.setDefault=function(){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()},q.prototype.setDirty=function(){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.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},q.prototype.createIndexBuffer=function(i,o){return new Di(this,i,o)},q.prototype.createVertexBuffer=function(i,o,n){return new Ei(this,i,o,n)},q.prototype.createRenderbuffer=function(i,o,n){var s=this.gl,p=s.createRenderbuffer();return this.bindRenderbuffer.set(p),s.renderbufferStorage(s.RENDERBUFFER,i,o,n),this.bindRenderbuffer.set(null),p},q.prototype.createFramebuffer=function(i,o,n){return new I(this,i,o,n)},q.prototype.clear=function(i){var o=i.color,n=i.depth,s=this.gl,p=0;o&&(p|=s.COLOR_BUFFER_BIT,this.clearColor.set(o),this.colorMask.set([!0,!0,!0,!0])),n!==void 0&&(p|=s.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(n),this.depthMask.set(!0)),s.clear(p)},q.prototype.setCullFace=function(i){i.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(i.mode),this.frontFace.set(i.frontFace))},q.prototype.setDepthMode=function(i){i.func!==this.gl.ALWAYS||i.mask?(this.depthTest.set(!0),this.depthFunc.set(i.func),this.depthMask.set(i.mask),this.depthRange.set(i.range)):this.depthTest.set(!1)},q.prototype.setStencilMode=function(i){i.test.func!==this.gl.ALWAYS||i.mask?(this.stencilTest.set(!0),this.stencilMask.set(i.mask),this.stencilOp.set([i.fail,i.depthFail,i.pass
1]),this.stencilFunc.set({func:i.test.func,ref:i.ref,mask:i.test.mask})):this.stencilTest.set(!1)},q.prototype.setColorMode=function(i){u.deepEqual(i.blendFunction,G.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(i.blendFunction),this.blendColor.set(i.blendColor)),this.colorMask.set(i.mask)},q.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var M=(function(i){function o(n,s,p){var f=this;i.call(this),this.id=n,this.dispatcher=p,this.on("data",(function(d){d.dataType==="source"&&d.sourceDataType==="metadata"&&(f._sourceLoaded=!0),f._sourceLoaded&&!f._paused&&d.dataType==="source"&&d.sourceDataType==="content"&&(f.reload(),f.transform&&f.update(f.transform))})),this.on("error",(function(){f._sourceErrored=!0})),this._source=(function(d,y,v,S){var z=new rn[y.type](d,y,v,S);if(z.id!==d)throw new Error("Expected Source id to be "+d+" instead of "+z.id);return u.bindAll(["load","abort","unload","serialize","prepare"],z),z})(n,s,p,this),this._tiles={},this._cache=new gt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new u.SourceFeatureState}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.onAdd=function(n){this.map=n,this._maxTileCacheSize=n?n._maxTileC
1acheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(n)},o.prototype.onRemove=function(n){this._source&&this._source.onRemove&&this._source.onRemove(n)},o.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var n in this._tiles){var s=this._tiles[n];if(s.state!=="loaded"&&s.state!=="errored")return!1}return!0},o.prototype.getSource=function(){return this._source},o.prototype.pause=function(){this._paused=!0},o.prototype.resume=function(){if(this._paused){var n=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,n&&this.reload(),this.transform&&this.update(this.transform)}},o.prototype._loadTile=function(n,s){return this._source.loadTile(n,s)},o.prototype._unloadTile=function(n){if(this._source.unloadTile)return this._source.unloadTile(n,(function(){}))},o.prototype._abortTile=function(n){if(this._source.abortTile)return this._source.abortTile(n,(function(){}))},o.prototype.serialize=function(){return this._source.serialize()},o.prototype.prepare=function(n){for(var s in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var p=this._tiles[s];p.upload(n),p.prepare(this.map.style.imageManager)}},o.prototype.getIds=function(){return u.values(this._tiles).map((function(n){return n.tileID})).sort(U).map((function(n){return n.key}))},o.prototype.getRenderableIds=function(n){var s=this,p=[];for(var f in this._tiles)this._isIdRenderable(f,n)&&p.push(this._tiles[f]);return n?p.sort((function(d,y){var v=d.tileID,S=y.tileID,z=new u.Point(v.canonical.x,v.canonical.y)._rotate(s.transform.angle),C=new u.Point(S.canonical.x,S.canonical.y)._rotate(s.transform.angle);return v.overscaledZ-S.overscaledZ||C.y-z.y||C.x-z.x})).map((function(d){return d.tileID.key})):p.map((function(d){return d.tileID})).sort(U).map((function(d){return d.key}))},o.prototype.hasRenderableParent=function(n){var s=this.findLoadedParent(n,0);return!!s&&this._isIdRenderable(s.tileID.key)},o.prototype._isIdRenderable=function(n,s){return this._tiles[n]&&this._tiles[n].hasData()&&!this._coveredTiles[n]&&(s||!this._tiles[n].holdingForFade())},o.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var n in this._cache.reset(),this._tiles)this._tiles[n].state!=="errored"&&this._reloadTile(n,"reloading")},o.prototype._reloadTile=function(n,s){var p=this._tiles[n];p&&(p.state!=="loading"&&(p.state=s),this._loadTile(p,this._tileLoaded.bind(this,p,n,s)))},o.prototype._tileLoaded=function(n,s,p,f){if(f)return n.state="errored",void(f.status!==404?this._source.fire(new u.ErrorEvent(f,{tile:n})):this.update(this.transform));n.timeAdded=u.browser.now(),p==="expired"&&(n.refreshedUponExpiration=!0),this._setTileReloadTimer(s,n),this.getSource().type==="raster-dem"&&n.dem&&this._backfillDEM(n),this._state.initializeTileState(n,this.map?this.map.painter:null),this._source.fire(new u.Event("data",{dataType:"source",tile:n,coord:n.tileID}))},o.prototype._backfillDEM=function(n){for(var s=this.getRenderableIds(),p=0;p<s.length;p++){var f=s[p];if(n.neighboringTiles&&n.neighboringTiles[f]){var d=this.getTileByID(f);y(n,d),y(d,n)}}function y(v,S){v.needsHillshadePrepare=!0;var z=S.tileID.canonical.x-v.tileID.canonical.x,C=S.tileID.canonical.y-v.tileID.canonical.y,P=Math.pow(2,v.tileID.canonical.z),O=S.tileID.key;z===0&&C===0||Math.abs(C)>1||(Math.abs(z)>1&&(Math.abs(z+P)===1?z+=P:Math.abs(z-P)===1&&(z-=P)),S.dem&&v.dem&&(v.dem.backfillBorder(S.dem,z,C),v.neighboringTiles&&v.neighboringTiles[O]&&(v.neighboringTiles[O].backfilled=!0)))}},o.prototype.getTile=function(n){return this.getTileByID(n.key)},o.prototype.getTileByID=function(n){return this._tiles[n]},o.prototype._retainLoadedChildren=function(n,s,p,f){for(var d in this._tiles){var y=this._tiles[d];if(!(f[d]||!y.hasData()||y.tileID.overscaledZ<=s||y.tileID.overscaledZ>p)){for(var v=y.tileID;y&&y.tileID.overscaledZ>s+1;){var S=y.tileID.scaledTo(y.tileID.overscaledZ-1);(y=this._tiles[S.key])&&y.hasData()&&(v=S)}for(var z=v;z.overscaledZ>s;)if(n[(z=z.scaledTo(z.overscaledZ-1)).key]){f[v.key]=v;break}}}},o.prototype.findLoadedParent=function(n,s){if(n.key in this._loadedParentTiles){var p=this._loadedParentTiles[n.key];return p&&p.tileID.overscaledZ>=s?p:null}for(var f=n.overscaledZ-1;f>=s;f--){var d=n.scaledTo(f),y=this._getLoadedTile(d);if(y)return y}},o.prototype._getLoadedTile=function(n){var s=this._tiles[n.key];return s&&s.hasData()?s:this._cache.getByKey(n.wrapped().key)},o.prototype.updateCacheSize=function(n){var s=Math.ceil(n.width/this._source.tileSize)+1,p=Math.ceil(n.height/this._source.tileSize)+1,f=Math.floor(s*p*5),d=typeof this._maxTileC
vendor: 44,389 bytes, line 1
1acheSize=="number"?Math.min(this._maxTileCacheSize,f):f;this._cache.setMaxSize(d)},o.prototype.handleWrapJump=function(n){var s=Math.round((n-(this._prevLng===void 0?n:this._prevLng))/360);if(this._prevLng=n,s){var p={};for(var f in this._tiles){var d=this._tiles[f];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+s),p[d.tileID.key]=d}for(var y in this._tiles=p,this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(var v in this._tiles)this._setTileReloadTimer(v,this._tiles[v])}},o.prototype.update=function(n){var s=this;if(this.transform=n,this._sourceLoaded&&!this._paused){var p;this.updateCacheSize(n),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?p=n.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(ne){return new u.OverscaledTileID(ne.canonical.z,ne.wrap,ne.canonical.z,ne.canonical.x,ne.canonical.y)})):(p=n.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(p=p.filter((function(ne){return s._source.hasTile(ne)})))):p=[];var f=n.coveringZoomLevel(this._source),d=Math.max(f-o.maxOverzooming,this._source.minzoom),y=Math.max(f+o.maxUnderzooming,this._source.minzoom),v=this._updateRetainedTiles(p,f);if(le(this._source.type)){for(var S={},z={},C=0,P=Object.keys(v);C<P.length;C+=1){var O=P[C],B=v[O],j=this._tiles[O];if(j&&!(j.fadeEndTime&&j.fadeEndTime<=u.browser.now())){var R=this.findLoadedParent(B,d);R&&(this._addTile(R.tileID),S[R.tileID.key]=R.tileID),z[O]=B}}for(var N in this._retainLoadedChildren(z,f,y,v),S)v[N]||(this._coveredTiles[N]=!0,v[N]=S[N])}for(var X in v)this._tiles[X].clearFadeHold();for(var H=0,te=u.keysDifference(this._tiles,v);H<te.length;H+=1){var ee=te[H],re=this._tiles[ee];re.hasSymbolBuckets&&!re.holdingForFade()?re.setHoldDuration(this.map._fadeDuration):re.hasSymbolBuckets&&!re.symbolFadeFinished()||this._removeTile(ee)}this._updateLoadedParentTileCache()}},o.prototype.releaseSymbolFadeTiles=function(){for(var n in this._tiles)this._tiles[n].holdingForFade()&&this._removeTile(n)},o.prototype._updateRetainedTiles=function(n,s){for(var p={},f={},d=Math.max(s-o.maxOverzooming,this._source.minzoom),y=Math.max(s+o.maxUnderzooming,this._source.minzoom),v={},S=0,z=n;S<z.length;S+=1){var C=z[S],P=this._addTile(C);p[C.key]=C,P.hasData()||s<this._source.maxzoom&&(v[C.key]=C)}this._retainLoadedChildren(v,s,y,p);for(var O=0,B=n;O<B.length;O+=1){var j=B[O],R=this._tiles[j.key];if(!R.hasData()){if(s+1>this._source.maxzoom){var N=j.children(this._source.maxzoom)[0],X=this.getTile(N);if(X&&X.hasData()){p[N.key]=N;continue}}else{var H=j.children(this._source.maxzoom);if(p[H[0].key]&&p[H[1].key]&&p[H[2].key]&&p[H[3].key])continue}for(var te=R.wasRequested(),ee=j.overscaledZ-1;ee>=d;--ee){var re=j.scaledTo(ee);if(f[re.key]||(f[re.key]=!0,!(R=this.getTile(re))&&te&&(R=this._addTile(re)),R&&(p[re.key]=re,te=R.wasRequested(),R.hasData())))break}}}return p},o.prototype._updateLoadedParentTileCache=function(){for(var n in this._loadedParentTiles={},this._tiles){for(var s=[],p=void 0,f=this._tiles[n].tileID;f.overscaledZ>0;){if(f.key in this._loadedParentTiles){p=this._loadedParentTiles[f.key];break}s.push(f.key);var d=f.scaledTo(f.overscaledZ-1);if(p=this._getLoadedTile(d))break;f=d}for(var y=0,v=s;y<v.length;y+=1)this._loadedParentTiles[v[y]]=p}},o.prototype._addTile=function(n){var s=this._tiles[n.key];if(s)return s;(s=this._cache.getAndRemove(n))&&(this._setTileReloadTimer(n.key,s),s.tileID=n,this._state.initializeTileState(s,this.map?this.map.painter:null),this._cacheTimers[n.key]&&(clearTimeout(this._cacheTimers[n.key]),delete this._cacheTimers[n.key],this._setTileReloadTimer(n.key,s)));var p=!!s;return p||(s=new u.Tile(n,this._source.tileSize*n.overscaleFactor()),this._loadTile(s,this._tileLoaded.bind(this,s,n.key,s.state))),s?(s.uses++,this._tiles[n.key]=s,p||this._source.fire(new u.Event("dataloading",{tile:s,coord:s.tileID,dataType:"source"})),s):null},o.prototype._setTileReloadTimer=function(n,s){var p=this;n in this._timers&&(clearTimeout(this._timers[n]),delete this._timers[n]);var f=s.getExpiryTimeout();f&&(this._timers[n]=setTimeout((function(){p._reloadTile(n,"expired"),delete p._timers[n]}),f))},o.prototype._removeTile=function(n){var s=this._tiles[n];s&&(s.uses--,delete this._tiles[n],this._timers[n]&&(clearTimeout(this._timers[n]),delete this._timers[n]),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))))},o.prototype.clearTiles=function(){for(var n in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(n);this._cache.reset()},o.prototype.tilesIn=function(n,s,p){var f=this,d=[],y=this.transform;if(!y)return d;for(var v=p?y.getCameraQueryGeometry(n):n,S=n.map((function(ee){return y.pointCoordinate(ee)})),z=v.map((function(ee){return y.pointCoordinate(ee)})),C=this.getIds(),P=1/0,O=1/0,B=-1/0,j=-1/0,R=0,N=z;R<N.length;R+=1){var X=N[R];P=Math.min(P,X.x),O=Math.min(O,X.y),B=Math.max(B,X.x),j=Math.max(j,X.y)}for(var H=function(ee){var re=f._tiles[C[ee]];if(!re.holdingForFade()){var ne=re.tileID,he=Math.pow(2,y.zoom-re.tileID.overscaledZ),ce=s*re.queryPadding*u.EXTENT/re.tileSize/he,ve=[ne.getTilePoint(new u.MercatorCoordinate(P,O)),ne.getTilePoint(new u.MercatorCoordinate(B,j))];if(ve[0].x-ce<u.EXTENT&&ve[0].y-ce<u.EXTENT&&ve[1].x+ce>=0&&ve[1].y+ce>=0){var Me=S.map((function(De){return ne.getTilePoint(De)})),Re=z.map((function(De){return ne.getTilePoint(De)}));d.push({tile:re,tileID:ne,queryGeometry:Me,cameraQueryGeometry:Re,scale:he})}}},te=0;te<C.length;te++)H(te);return d},o.prototype.getVisibleCoordinates=function(n){for(var s=this,p=this.getRenderableIds(n).map((function(v){return s._tiles[v].tileID})),f=0,d=p;f<d.length;f+=1){var y=d[f];y.posMatrix=this.transform.calculatePosMatrix(y.toUnwrapped())}return p},o.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(le(this._source.type))for(var n in this._tiles){var s=this._tiles[n];if(s.fadeEndTime!==void 0&&s.fadeEndTime>=u.browser.now())return!0}return!1},o.prototype.setFeatureState=function(n,s,p){this._state.updateState(n=n||"_geojsonTileLayer",s,p)},o.prototype.removeFeatureState=function(n,s,p){this._state.removeFeatureState(n=n||"_geojsonTileLayer",s,p)},o.prototype.getFeatureState=function(n,s){return this._state.getState(n=n||"_geojsonTileLayer",s)},o.prototype.setDependencies=function(n,s,p){var f=this._tiles[n];f&&f.setDependencies(s,p)},o.prototype.reloadTilesForDependencies=function(n,s){for(var p in this._tiles)this._tiles[p].hasDependency(n,s)&&this._reloadTile(p,"reloading");this._cache.filter((function(f){return!f.hasDependency(n,s)}))},o})(u.Evented);function U(i,o){var n=Math.abs(2*i.wrap)-+(i.wrap<0),s=Math.abs(2*o.wrap)-+(o.wrap<0);return i.overscaledZ-o.overscaledZ||s-n||o.canonical.y-i.canonical.y||o.canonical.x-i.canonical.x}function le(i){return i==="raster"||i==="image"||i==="video"}function fe(){return new u.window.Worker(Qa.workerUrl)}M.maxOverzooming=10,M.maxUnderzooming=3;var Y="mapboxgl_preloaded_worker_pool",ue=function(){this.active={}};ue.prototype.acquire=function(i){if(!this.workers)for(this.workers=[];this.workers.length<ue.workerCount;)this.workers.push(new fe);return this.active[i]=!0,this.workers.slice()},ue.prototype.release=function(i){delete this.active[i],this.numActive()===0&&(this.workers.forEach((function(o){o.terminate()})),this.workers=null)},ue.prototype.isPreloaded=function(){return!!this.active[Y]},ue.prototype.numActive=function(){return Object.keys(this.active).length};var xe,Se=Math.floor(u.browser.hardwareConcurrency/2);function Ce(){return xe||(xe=new ue),xe}function oe(i,o){var n={};for(var s in i)s!=="ref"&&(n[s]=i[s]);return u.refProperties.forEach((function(p){p in o&&(n[p]=o[p])})),n}function me(i){i=i.slice();for(var o=Object.create(null),n=0;n<i.length;n++)o[i[n].id]=i[n];for(var s=0;s<i.length;s++)"ref"in i[s]&&(i[s]=oe(i[s],o[i[s].ref]));return i}ue.workerCount=Math.max(Math.min(Se,6),1);var ae={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Xe(i,o,n){n.push({command:ae.addSource,args:[i,o[i]]})}function We(i,o,n){o.push({command:ae.removeSource,args:[i]}),n[i]=!0}function Ie(i,o,n,s){We(i,n,s),Xe(i,o,n)}function Tt(i,o,n){var s;for(s in i[n])if(i[n].hasOwnProperty(s)&&s!=="data"&&!u.deepEqual(i[n][s],o[n][s]))return!1;for(s in o[n])if(o[n].hasOwnProperty(s)&&s!=="data"&&!u.deepEqual(i[n][s],o[n][s]))return!1;return!0}function et(i,o,n,s,p,f){var d;for(d in o=o||{},i=i||{})i.hasOwnProperty(d)&&(u.deepEqual(i[d],o[d])||n.push({command:f,args:[s,d,o[d],p]}));for(d in o)o.hasOwnProperty(d)&&!i.hasOwnProperty(d)&&(u.deepEqual(i[d],o[d])||n.push({command:f,args:[s,d,o[d],p]}))}function At(i){return i.id}function kt(i,o){return i[o.id]=o,i}var ot=function(i,o){this.reset(i,o)};ot.prototype.reset=function(i,o){this.points=i||[],this._distances=[0];for(var n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(o||0,.5*this.length),this.paddedLength=this.length-2*this.padding},ot.prototype.lerp=function(i){if(this.points.length===1)return this.points[0];i=u.clamp(i,0,1);for(var o=1,n=this._distances[o],s=i*this.paddedLength+this.padding;n<s&&o<this._distances.length;)n=this._distances[++o];var p=o-1,f=this._distances[p],d=n-f,y=d>0?(s-f)/d:0;return this.points[p].mult(1-y).add(this.points[o].mult(y))};var Et=function(i,o,n){var s=this.boxCells=[],p=this.circleCells=[];this.xCellCount=Math.ceil(i/n),this.yCellCount=Math.ceil(o/n);for(var f=0;f<this.xCellCount*this.yCellCount;f++)s.push([]),p.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=i,this.height=o,this.xScale=this.xCellCount/i,this.yScale=this.yCellCount/o,this.boxUid=0,this.circleUid=0};function Nt(i,o,n,s,p){var f=u.create();return o?(u.scale(f,f,[1/p,1/p,1]),n||u.rotateZ(f,f,s.angle)):u.multiply(f,s.labelPlaneMatrix,i),f}function It(i,o,n,s,p){if(o){var f=u.clone(i);return u.scale(f,f,[p,p,1]),n||u.rotateZ(f,f,-s.angle),f}return s.glCoordMatrix}function $e(i,o){var n=[i.x,i.y,0,1];di(n,n,o);var s=n[3];return{point:new u.Point(n[0]/s,n[1]/s),signedDistanceFromCamera:s}}function vo(i,o){return .5+i/o*.5}function rt(i,o){var n=i[0]/i[3],s=i[1]/i[3];return n>=-o[0]&&n<=o[0]&&s>=-o[1]&&s<=o[1]}function Fn(i,o,n,s,p,f,d,y){var v=s?i.textSizeData:i.iconSizeData,S=u.evaluateSizeForZoom(v,n.transform.zoom),z=[256/n.width*2+1,256/n.height*2+1],C=s?i.text.dynamicLayoutVertexArray:i.icon.dynamicLayoutVertexArray;C.clear();for(var P=i.lineVertexArray,O=s?i.text.placedSymbolArray:i.icon.placedSymbolArray,B=n.transform.width/n.transform.height,j=!1,R=0;R<O.length;R++){var N=O.get(R);if(N.hidden||N.writingMode===u.WritingMode.vertical&&!j)Li(N.numGlyphs,C);else{j=!1;var X=[N.anchorX,N.anchorY,0,1];if(u.transformMat4(X,X,o),rt(X,z)){var H=vo(n.transform.cameraToCenterDistance,X[3]),te=u.evaluateSizeForFeature(v,S,N),ee=d?te/H:te*H,re=new u.Point(N.anchorX,N.anchorY),ne=$e(re,p).point,he={},ce=Rr(N,ee,!1,y,o,p,f,i.glyphOffsetArray,P,C,ne,re,he,B);j=ce.useVertical,(ce.notEnoughRoom||j||ce.needsFlipping&&Rr(N,ee,!0,y,o,p,f,i.glyphOffsetArray,P,C,ne,re,he,B).notEnoughRoom)&&Li(N.numGlyphs,C)}else Li(N.numGlyphs,C)}}s?i.text.dynamicLayoutVertexBuffer.updateData(C):i.icon.dynamicLayoutVertexBuffer.updateData(C)}function Pa(i,o,n,s,p,f,d,y,v,S,z){var C=y.glyphStartIndex+y.numGlyphs,P=y.lineStartIndex,O=y.lineStartIndex+y.lineLength,B=o.getoffsetX(y.glyphStartIndex),j=o.getoffsetX(C-1),R=On(i*B,n,s,p,f,d,y.segment,P,O,v,S,z);if(!R)return null;var N=On(i*j,n,s,p,f,d,y.segment,P,O,v,S,z);return N?{first:R,last:N}:null}function pr(i,o,n,s){return i===u.WritingMode.horizontal&&Math.abs(n.y-o.y)>Math.abs(n.x-o.x)*s?{useVertical:!0}:(i===u.WritingMode.vertical?o.y<n.y:o.x>n.x)?{needsFlipping:!0}:null}function Rr(i,o,n,s,p,f,d,y,v,S,z,C,P,O){var B,j=o/24,R=i.lineOffsetX*j,N=i.lineOffsetY*j;if(i.numGlyphs>1){var X=i.glyphStartIndex+i.numGlyphs,H=i.lineStartIndex,te=i.lineStartIndex+i.lineLength,ee=Pa(j,y,R,N,n,z,C,i,v,f,P);if(!ee)return{notEnoughRoom:!0};var re=$e(ee.first.point,d).point,ne=$e(ee.last.point,d).point;if(s&&!n){var he=pr(i.writingMode,re,ne,O);if(he)return he}B=[ee.first];for(var ce=i.glyphStartIndex+1;ce<X-1;ce++)B.push(On(j*y.getoffsetX(ce),R,N,n,z,C,i.segment,H,te,v,f,P));B.push(ee.last)}else{if(s&&!n){var ve=$e(C,p).point,Me=i.lineStartIndex+i.segment+1,Re=new u.Point(v.getx(Me),v.gety(Me)),De=$e(Re,p),st=De.signedDistanceFromCamera>0?De.point:Ms(C,Re,ve,1,p),Ee=pr(i.writingMode,ve,st,O);if(Ee)return Ee}var Ze=On(j*y.getoffsetX(i.glyphStartIndex),R,N,n,z,C,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,v,f,P);if(!Ze)return{notEnoughRoom:!0};B=[Ze]}for(var Ye=0,Ge=B;Ye<Ge.length;Ye+=1){var je=Ge[Ye];u.addDynamicAttributes(S,je.point,je.angle)}return{}}function Ms(i,o,n,s,p){var f=$e(i.add(i.sub(o)._unit()),p).point,d=n.sub(f);return n.add(d._mult(s/d.mag()))}function On(i,o,n,s,p,f,d,y,v,S,z,C){var P=s?i-o:i+o,O=P>0?1:-1,B=0;s&&(O*=-1,B=Math.PI),O<0&&(B+=Math.PI);for(var j=O>0?y+d:y+d+1,R=p,N=p,X=0,H=0,te=Math.abs(P),ee=[];X+H<=te;){if((j+=O)<y||j>=v)return null;if(N=R,ee.push(R),(R=C[j])===void 0){var re=new u.Point(S.getx(j),S.gety(j)),ne=$e(re,z);if(ne.signedDistanceFromCamera>0)R=C[j]=ne.point;else{var he=j-O;R=Ms(X===0?f:new u.Point(S.getx(he),S.gety(he)),re,N,te-X+1,z)}}X+=H,H=N.dist(R)}var ce=(te-X)/H,ve=R.sub(N),Me=ve.mult(ce)._add(N);Me._add(ve._unit()._perp()._mult(n*O));var Re=B+Math.atan2(R.y-N.y,R.x-N.x);return ee.push(Me),{point:Me,angle:Re,path:ee}}Et.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Et.prototype.insert=function(i,o,n,s,p){this._forEachCell(o,n,s,p,this._insertBoxCell,this.boxUid++),this.boxKeys.push(i),this.bboxes.push(o),this.bboxes.push(n),this.bboxes.push(s),this.bboxes.push(p)},Et.prototype.insertCircle=function(i,o,n,s){this._forEachCell(o-s,n-s,o+s,n+s,this._insertCircleCell,this.circleUid++),this.circleKeys.push(i),this.circles.push(o),this.circles.push(n),this.circles.push(s)},Et.prototype._insertBoxCell=function(i,o,n,s,p,f){this.boxCells[p].push(f)},Et.prototype._insertCircleCell=function(i,o,n,s,p,f){this.circleCells[p].push(f)},Et.prototype._query=function(i,o,n,s,p,f){if(n<0||i>this.width||s<0||o>this.height)return!p&&[];var d=[];if(i<=0&&o<=0&&this.width<=n&&this.height<=s){if(p)return!0;for(var y=0;y<this.boxKeys.length;y++)d.push({key:this.boxKeys[y],x1:this.bboxes[4*y],y1:this.bboxes[4*y+1],x2:this.bboxes[4*y+2],y2:this.bboxes[4*y+3]});for(var v=0;v<this.circleKeys.length;v++){var S=this.circles[3*v],z=this.circles[3*v+1],C=this.circles[3*v+2];d.push({key:this.circleKeys[v],x1:S-C,y1:z-C,x2:S+C,y2:z+C})}return f?d.filter(f):d}return this._forEachCell(i,o,n,s,this._queryCell,d,{hitTest:p,seenUids:{box:{},circle:{}}},f),p?d.length>0:d},Et.prototype._queryCircle=function(i,o,n,s,p){var f=i-n,d=i+n,y=o-n,v=o+n;if(d<0||f>this.width||v<0||y>this.height)return!s&&[];var S=[];return this._forEachCell(f,y,d,v,this._queryCellCircle,S,{hitTest:s,circle:{x:i,y:o,radius:n},seenUids:{box:{},circle:{}}},p),s?S.length>0:S},Et.prototype.query=function(i,o,n,s,p){return this._query(i,o,n,s,!1,p)},Et.prototype.hitTest=function(i,o,n,s,p){return this._query(i,o,n,s,!0,p)},Et.prototype.hitTestCircle=function(i,o,n,s){return this._queryCircle(i,o,n,!0,s)},Et.prototype._queryCell=function(i,o,n,s,p,f,d,y){var v=d.seenUids,S=this.boxCells[p];if(S!==null)for(var z=this.bboxes,C=0,P=S;C<P.length;C+=1){var O=P[C];if(!v.box[O]){v.box[O]=!0;var B=4*O;if(i<=z[B+2]&&o<=z[B+3]&&n>=z[B+0]&&s>=z[B+1]&&(!y||y(this.boxKeys[O]))){if(d.hitTest)return f.push(!0),!0;f.push({key:this.boxKeys[O],x1:z[B],y1:z[B+1],x2:z[B+2],y2:z[B+3]})}}}var j=this.circleCells[p];if(j!==null)for(var R=this.circles,N=0,X=j;N<X.length;N+=1){var H=X[N];if(!v.circle[H]){v.circle[H]=!0;var te=3*H;if(this._circleAndRectCollide(R[te],R[te+1],R[te+2],i,o,n,s)&&(!y||y(this.circleKeys[H]))){if(d.hitTest)return f.push(!0),!0;var ee=R[te],re=R[te+1],ne=R[te+2];f.push({key:this.circleKeys[H],x1:ee-ne,y1:re-ne,x2:ee+ne,y2:re+ne})}}}},Et.prototype._queryCellCircle=function(i,o,n,s,p,f,d,y){var v=d.circle,S=d.seenUids,z=this.boxCells[p];if(z!==null)for(var C=this.bboxes,P=0,O=z;P<O.length;P+=1){var B=O[P];if(!S.box[B]){S.box[B]=!0;var j=4*B;if(this._circleAndRectCollide(v.x,v.y,v.radius,C[j+0],C[j+1],C[j+2],C[j+3])&&(!y||y(this.boxKeys[B])))return f.push(!0),!0}}var R=this.circleCells[p];if(R!==null)for(var N=this.circles,X=0,H=R;X<H.length;X+=1){var te=H[X];if(!S.circle[te]){S.circle[te]=!0;var ee=3*te;if(this._circlesCollide(N[ee],N[ee+1],N[ee+2],v.x,v.y,v.radius)&&(!y||y(this.circleKeys[te])))return f.push(!0),!0}}},Et.prototype._forEachCell=function(i,o,n,s,p,f,d,y){for(var v=this._convertToXCellCoord(i),S=this._convertToYCellCoord(o),z=this._convertToXCellCoord(n),C=this._convertToYCellCoord(s),P=v;P<=z;P++)for(var O=S;O<=C;O++)if(p.call(this,i,o,n,s,this.xCellCount*O+P,f,d,y))return},Et.prototype._convertToXCellCoord=function(i){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(i*this.xScale)))},Et.prototype._convertToYCellCoord=function(i){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(i*this.yScale)))},Et.prototype._circlesCollide=function(i,o,n,s,p,f){var d=s-i,y=p-o,v=n+f;return v*v>d*d+y*y},Et.prototype._circleAndRectCollide=function(i,o,n,s,p,f,d){var y=(f-s)/2,v=Math.abs(i-(s+y));if(v>y+n)return!1;var S=(d-p)/2,z=Math.abs(o-(p+S));if(z>S+n)return!1;if(v<=y||z<=S)return!0;var C=v-y,P=z-S;return C*C+P*P<=n*n};var ar=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Li(i,o){for(var n=0;n<i;n++){var s=o.length;o.resize(s+4),o.float32.set(ar,3*s)}}function di(i,o,n){var s=o[0],p=o[1];return i[0]=n[0]*s+n[4]*p+n[12],i[1]=n[1]*s+n[5]*p+n[13],i[3]=n[3]*s+n[7]*p+n[15],i}var Lt=function(i,o,n){o===void 0&&(o=new Et(i.width+200,i.height+200,25)),n===void 0&&(n=new Et(i.width+200,i.height+200,25)),this.transform=i,this.grid=o,this.ignoredGrid=n,this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=i.width+100,this.screenBottomBoundary=i.height+100,this.gridRightBoundary=i.width+200,this.gridBottomBoundary=i.height+200};function Br(i,o,n){return o*(u.EXTENT/(i.tileSize*Math.pow(2,n-i.tileID.overscaledZ)))}Lt.prototype.placeCollisionBox=function(i,o,n,s,p){var f=this.projectAndGetPerspectiveRatio(s,i.anchorPointX,i.anchorPointY),d=n*f.perspectiveRatio,y=i.x1*d+f.point.x,v=i.y1*d+f.point.y,S=i.x2*d+f.point.x,z=i.y2*d+f.point.y;return!this.isInsideGrid(y,v,S,z)||!o&&this.grid.hitTest(y,v,S,z,p)?{box:[],offscreen:!1}:{box:[y,v,S,z],offscreen:this.isOffscreen(y,v,S,z)}},Lt.prototype.placeCollisionCircles=function(i,o,n,s,p,f,d,y,v,S,z,C,P){var O=[],B=new u.Point(o.anchorX,o.anchorY),j=$e(B,f),R=vo(this.transform.cameraToCenterDistance,j.signedDistanceFromCamera),N=(S?p/R:p*R)/u.ONE_EM,X=$e(B,d).point,H=Pa(N,s,o.lineOffsetX*N,o.lineOffsetY*N,!1,X,B,o,n,d,{}),te=!1,ee=!1,re=!0;if(H){for(var ne=.5*C*R+P,he=new u.Point(-100,-100),ce=new u.Point(this.screenRightBoundary,this.screenBottomBoundary),ve=new ot,Me=H.first,Re=H.last,De=[],st=Me.path.length-1;st>=1;st--)De.push(Me.path[st]);for(var Ee=1;Ee<Re.path.length;Ee++)De.push(Re.path[Ee]);var Ze=2.5*ne;if(y){var Ye=De.map((function(ai){return $e(ai,y)}));De=Ye.some((function(ai){return ai.signedDistanceFromCamera<=0}))?[]:Ye.map((function(ai){return ai.point}))}var Ge=[];if(De.length>0){for(var je=De[0].clone(),Ne=De[0].clone(),Ve=1;Ve<De.length;Ve++)je.x=Math.min(je.x,De[Ve].x),je.y=Math.min(je.y,De[Ve].y),Ne.x=Math.max(Ne.x,De[Ve].x),Ne.y=Math.max(Ne.y,De[Ve].y);Ge=je.x>=he.x&&Ne.x<=ce.x&&je.y>=he.y&&Ne.y<=ce.y?[De]:Ne.x<he.x||je.x>ce.x||Ne.y<he.y||je.y>ce.y?[]:u.clipLine([De],he.x,he.y,ce.x,ce.y)}for(var Be=0,bt=Ge;Be<bt.length;Be+=1){var Wt;ve.reset(bt[Be],.25*ne),Wt=ve.length<=.5*ne?1:Math.ceil(ve.paddedLength/Ze)+1;for(var zr=0;zr<Wt;zr++){var sr=zr/Math.max(Wt-1,1),lr=ve.lerp(sr),Kt=lr.x+100,wr=lr.y+100;O.push(Kt,wr,ne,0);var Fi=Kt-ne,Pr=wr-ne,Cr=Kt+ne,Oi=wr+ne;if(re=re&&this.isOffscreen(Fi,Pr,Cr,Oi),ee=ee||this.isInsideGrid(Fi,Pr,Cr,Oi),!i&&this.grid.hitTestCircle(Kt,wr,ne,z)&&(te=!0,!v))return{circles:[],offscreen:!1,collisionDetected:te}}}}return{circles:!v&&te||!ee?[]:O,offscreen:re,collisionDetected:te}},Lt.prototype.queryRenderedSymbols=function(i){if(i.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var o=[],n=1/0,s=1/0,p=-1/0,f=-1/0,d=0,y=i;d<y.length;d+=1){var v=y[d],S=new u.Point(v.x+100,v.y+100);n=Math.min(n,S.x),s=Math.min(s,S.y),p=Math.max(p,S.x),f=Math.max(f,S.y),o.push(S)}for(var z={},C={},P=0,O=this.grid.query(n,s,p,f).concat(this.ignoredGrid.query(n,s,p,f));P<O.length;P+=1){var B=O[P],j=B.key;if(z[j.bucketInstanceId]===void 0&&(z[j.bucketInstanceId]={}),!z[j.bucketInstanceId][j.featureIndex]){var R=[new u.Point(B.x1,B.y1),new u.Point(B.x2,B.y1),new u.Point(B.x2,B.y2),new u.Point(B.x1,B.y2)];u.polygonIntersectsPolygon(o,R)&&(z[j.bucketInstanceId][j.featureIndex]=!0,C[j.bucketInstanceId]===void 0&&(C[j.bucketInstanceId]=[]),C[j.bucketInstanceId].push(j.featureIndex))}}return C},Lt.prototype.insertCollisionBox=function(i,o,n,s,p){(o?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:s,collisionGroupID:p},i[0],i[1],i[2],i[3])},Lt.prototype.insertCollisionCircles=function(i,o,n,s,p){for(var f=o?this.ignoredGrid:this.grid,d={bucketInstanceId:n,featureIndex:s,collisionGroupID:p},y=0;y<i.length;y+=4)f.insertCircle(d,i[y],i[y+1],i[y+2])},Lt.prototype.projectAndGetPerspectiveRatio=function(i,o,n){var s=[o,n,0,1];return di(s,s,i),{point:new u.Point((s[0]/s[3]+1)/2*this.transform.width+100,(-s[1]/s[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/s[3]*.5}},Lt.prototype.isOffscreen=function(i,o,n,s){return n<100||i>=this.screenRightBoundary||s<100||o>this.screenBottomBoundary},Lt.prototype.isInsideGrid=function(i,o,n,s){return n>=0&&i<this.gridRightBoundary&&s>=0&&o<this.gridBottomBoundary},Lt.prototype.getViewportMatrix=function(){var i=u.identity([]);return u.translate(i,i,[-100,-100,0]),i};var xr=function(i,o,n,s){this.opacity=i?Math.max(0,Math.min(1,i.opacity+(i.placed?o:-o))):s&&n?1:0,this.placed=n};xr.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Gr=function(i,o,n,s,p){this.text=new xr(i?i.text:null,o,n,p),this.icon=new xr(i?i.icon:null,o,s,p)};Gr.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Zi=function(i,o,n){this.text=i,this.icon=o,this.skipFade=n},Ou=function(){this.invProjMatrix=u.create(),this.viewportMatrix=u.create(),this.circles=[]},mi=function(i,o,n,s,p){this.bucketInstanceId=i,this.featureIndex=o,this.sourceLayerIndex=n,this.bucketIndex=s,this.tileID=p},Ml=function(i){this.crossSourceCollisions=i,this.maxGroupID=0,this.collisionGroups={}};function Gi(i,o,n,s,p){var f=u.getAnchorAlignment(i),d=-(f.horizontalAlign-.5)*o,y=-(f.verticalAlign-.5)*n,v=u.evaluateVariableOffset(i,s);return new u.Point(d+v[0]*p,y+v[1]*p)}function hr(i,o,n,s,p,f){var d=i.x1,y=i.x2,v=i.y1,S=i.y2,z=i.anchorPointX,C=i.anchorPointY,P=new u.Point(o,n);return s&&P._rotate(p?f:-f),{x1:d+P.x,y1:v+P.y,x2:y+P.x,y2:S+P.y,anchorPointX:z,anchorPointY:C}}Ml.prototype.get=function(i){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[i]){var o=++this.maxGroupID;this.collisionGroups[i]={ID:o,predicate:function(n){return n.collisionGroupID===o}}}return this.collisionGroups[i]};var tr=function(i,o,n,s){this.transform=i.clone(),this.collisionIndex=new Lt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=o,this.retainedQueryData={},this.collisionGroups=new Ml(n),this.collisionCircleArrays={},this.prevPlacement=s,s&&(s.prevPlacement=void 0),this.placedOrientations={}};function xo(i,o,n,s,p){i.emplaceBack(o?1:0,n?1:0,s||0,p||0),i.emplaceBack(o?1:0,n?1:0,s||0,p||0),i.emplaceBack(o?1:0,n?1:0,s||0,p||0),i.emplaceBack(o?1:0,n?1:0,s||0,p||0)}tr.prototype.getBucketParts=function(i,o,n,s){var p=n.getBucket(o),f=n.latestFeatureIndex;if(p&&f&&o.id===p.layerIds[0]){var d=n.collisionBoxArray,y=p.layers[0].layout,v=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),S=n.tileSize/u.EXTENT,z=this.transform.calculatePosMatrix(n.tileID.toUnwrapped()),C=y.get("text-pitch-alignment")==="map",P=y.get("text-rotation-alignment")==="map",O=Br(n,1,this.transform.zoom),B=Nt(z,C,P,this.transform,O),j=null;if(C){var R=It(z,C,P,this.transform,O);j=u.multiply([],this.transform.labelPlaneMatrix,R)}this.retainedQueryData[p.bucketInstanceId]=new mi(p.bucketInstanceId,f,p.sourceLayerIndex,p.index,n.tileID);var N={bucket:p,layout:y,posMatrix:z,textLabelPlaneMatrix:B,labelToScreenMatrix:j,scale:v,textPixelRatio:S,holdingForFade:n.holdingForFade(),collisionBoxArray:d,partiallyEvaluatedTextSize:u.evaluateSizeForZoom(p.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(p.sourceID)};if(s)for(var X=0,H=p.sortKeyRanges;X<H.length;X+=1){var te=H[X];i.push({sortKey:te.sortKey,symbolInstanceStart:te.symbolInstanceStart,symbolInstanceEnd:te.symbolInstanceEnd,parameters:N})}else i.push({symbolInstanceStart:0,symbolInstanceEnd:p.symbolInstances.length,parameters:N})}},tr.prototype.attemptAnchorPlacement=function(i,o,n,s,p,f,d,y,v,S,z,C,P,O,B){var j,R=[C.textOffset0,C.textOffset1],N=Gi(i,n,s,R,p),X=this.collisionIndex.placeCollisionBox(hr(o,N.x,N.y,f,d,this.transform.angle),z,y,v,S.predicate);if(!B||this.collisionIndex.placeCollisionBox(hr(B,N.x,N.y,f,d,this.transform.angle),z,y,v,S.predicate).box.length!==0)return X.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[C.crossTileID]&&this.prevPlacement.placements[C.crossTileID]&&this.prevPlacement.placements[C.crossTileID].text&&(j=this.prevPlacement.variableOffsets[C.crossTileID].anchor),this.variableOffsets[C.crossTileID]={textOffset:R,width:n,height:s,anchor:i,textBoxScale:p,prevAnchor:j},this.markUsedJustification(P,i,C,O),P.allowVerticalPlacement&&(this.markUsedOrientation(P,O,C),this.placedOrientations[C.crossTileID]=O),{shift:N,placedGlyphBoxes:X}):void 0},tr.prototype.placeLayerBucketPart=function(i,o,n){var s=this,p=i.parameters,f=p.bucket,d=p.layout,y=p.posMatrix,v=p.textLabelPlaneMatrix,S=p.labelToScreenMatrix,z=p.textPixelRatio,C=p.holdingForFade,P=p.collisionBoxArray,O=p.partiallyEvaluatedTextSize,B=p.collisionGroup,j=d.get("text-optional"),R=d.get("icon-optional"),N=d.get("text-allow-overlap"),X=d.get("icon-allow-overlap"),H=d.get("text-rotation-alignment")==="map",te=d.get("text-pitch-alignment")==="map",ee=d.get("icon-text-fit")!=="none",re=d.get("symbol-z-order")==="viewport-y",ne=N&&(X||!f.hasIconData()||R),he=X&&(N||!f.hasTextData()||j);!f.collisionArrays&&P&&f.deserializeCollisionBoxes(P);var ce=function(Ee,Ze){if(!o[Ee.crossTileID])if(C)s.placements[Ee.crossTileID]=new Zi(!1,!1,!1);else{var Ye,Ge=!1,je=!1,Ne=!0,Ve=null,Be={box:null,offscreen:null},bt={box:null,offscreen:null},Wt=null,zr=null,sr=0,lr=0,Kt=0;Ze.textFeatureIndex?sr=Ze.textFeatureIndex:Ee.useRuntimeCollisionCircles&&(sr=Ee.featureIndex),Ze.verticalTextFeatureIndex&&(lr=Ze.verticalTextFeatureIndex);var wr=Ze.textBox;if(wr){var Fi=function(Ht){var Zt=u.WritingMode.horizontal;if(f.allowVerticalPlacement&&!Ht&&s.prevPlacement){var kr=s.prevPlacement.placedOrientations[Ee.crossTileID];kr&&(s.placedOrientations[Ee.crossTileID]=kr,s.markUsedOrientation(f,Zt=kr,Ee))}return Zt},Pr=function(Ht,Zt){if(f.allowVerticalPlacement&&Ee.numVerticalGlyphVertices>0&&Ze.verticalTextBox)for(var kr=0,ca=f.writingModes;kr<ca.length&&(ca[kr]===u.WritingMode.vertical?(Be=Zt(),bt=Be):Be=Ht(),!(Be&&Be.box&&Be.box.length));kr+=1);else Be=Ht()};if(d.get("text-variable-anchor")){var Cr=d.get("text-variable-anchor");if(s.prevPlacement&&s.prevPlacement.variableOffsets[Ee.crossTileID]){var Oi=s.prevPlacement.variableOffsets[Ee.crossTileID];Cr.indexOf(Oi.anchor)>0&&(Cr=Cr.filter((function(Ht){return Ht!==Oi.anchor}))).unshift(Oi.anchor)}var ai=function(Ht,Zt,kr){for(var ca=Ht.x2-Ht.x1,es=Ht.y2-Ht.y1,Qu=Ee.textBoxScale,ts=ee&&!X?Zt:null,rs={box:[],offscreen:!1},iu=N?2*Cr.length:Cr.length,pa=0;pa<iu;++pa){var ha=s.attemptAnchorPlacement(Cr[pa%Cr.length],Ht,ca,es,Qu,H,te,z,y,B,pa>=Cr.length,Ee,f,kr,ts);if(ha&&(rs=ha.placedGlyphBoxes)&&rs.box&&rs.box.length){Ge=!0,Ve=ha.shift;break}}return rs};Pr((function(){return ai(wr,Ze.iconBox,u.WritingMode.horizontal)}),(function(){var Ht=Ze.verticalTextBox;return f.allowVerticalPlacement&&!(Be&&Be.box&&Be.box.length)&&Ee.numVerticalGlyphVertices>0&&Ht?ai(Ht,Ze.verticalIconBox,u.WritingMode.vertical):{box:null,offscreen:null}})),Be&&(Ge=Be.box,Ne=Be.offscreen);var nl=Fi(Be&&Be.box);if(!Ge&&s.prevPlacement){var xn=s.prevPlacement.variableOffsets[Ee.crossTileID];xn&&(s.variableOffsets[Ee.crossTileID]=xn,s.markUsedJustification(f,xn.anchor,Ee,nl))}}else{var Co=function(Ht,Zt){var kr=s.collisionIndex.placeCollisionBox(Ht,N,z,y,B.predicate);return kr&&kr.box&&kr.box.length&&(s.markUsedOrientation(f,Zt,Ee),s.placedOrientations[Ee.crossTileID]=Zt),kr};Pr((function(){return Co(wr,u.WritingMode.horizontal)}),(function(){var Ht=Ze.verticalTextBox;return f.allowVerticalPlacement&&Ee.numVerticalGlyphVertices>0&&Ht?Co(Ht,u.WritingMode.vertical):{box:null,offscreen:null}})),Fi(Be&&Be.box&&Be.box.length)}}if(Ge=(Ye=Be)&&Ye.box&&Ye.box.length>0,Ne=Ye&&Ye.offscreen,Ee.useRuntimeCollisionCircles){var Qn=f.text.placedSymbolArray.get(Ee.centerJustifiedTextSymbolIndex),ua=u.evaluateSizeForFeature(f.textSizeData,O,Qn),ko=d.get("text-padding");Wt=s.collisionIndex.placeCollisionCircles(N,Qn,f.lineVertexArray,f.glyphOffsetArray,ua,y,v,S,n,te,B.predicate,Ee.collisionCircleDiameter,ko),Ge=N||Wt.circles.length>0&&!Wt.collisionDetected,Ne=Ne&&Wt.offscreen}if(Ze.iconFeatureIndex&&(Kt=Ze.iconFeatureIndex),Ze.iconBox){var Ui=function(Ht){var Zt=ee&&Ve?hr(Ht,Ve.x,Ve.y,H,te,s.transform.angle):Ht;return s.collisionIndex.placeCollisionBox(Zt,X,z,y,B.predicate)};je=bt&&bt.box&&bt.box.length&&Ze.verticalIconBox?(zr=Ui(Ze.verticalIconBox)).box.length>0:(zr=Ui(Ze.iconBox)).box.length>0,Ne=Ne&&zr.offscreen}var Mo=j||Ee.numHorizontalGlyphVertices===0&&Ee.numVerticalGlyphVertices===0,rr=R||Ee.numIconVertices===0;if(Mo||rr?rr?Mo||(je=je&&Ge):Ge=je&&Ge:je=Ge=je&&Ge,Ge&&Ye&&Ye.box&&s.collisionIndex.insertCollisionBox(Ye.box,d.get("text-ignore-placement"),f.bucketInstanceId,bt&&bt.box&&lr?lr:sr,B.ID),je&&zr&&s.collisionIndex.insertCollisionBox(zr.box,d.get("icon-ignore-placement"),f.bucketInstanceId,Kt,B.ID),Wt&&(Ge&&s.collisionIndex.insertCollisionCircles(Wt.circles,d.get("text-ignore-placement"),f.bucketInstanceId,sr,B.ID),n)){var Yi=f.bucketInstanceId,ki=s.collisionCircleArrays[Yi];ki===void 0&&(ki=s.collisionCircleArrays[Yi]=new Ou);for(var eo=0;eo<Wt.circles.length;eo+=4)ki.circles.push(Wt.circles[eo+0]),ki.circles.push(Wt.circles[eo+1]),ki.circles.push(Wt.circles[eo+2]),ki.circles.push(Wt.collisionDetected?1:0)}s.placements[Ee.crossTileID]=new Zi(Ge||ne,je||he,Ne||f.justReloaded),o[Ee.crossTileID]=!0}};if(re)for(var ve=f.getSortedSymbolIndexes(this.transform.angle),Me=ve.length-1;Me>=0;--Me){var Re=ve[Me];ce(f.symbolInstances.get(Re),f.collisionArrays[Re])}else for(var De=i.symbolInstanceStart;De<i.symbolInstanceEnd;De++)ce(f.symbolInstances.get(De),f.collisionArrays[De]);if(n&&f.bucketInstanceId in this.collisionCircleArrays){var st=this.collisionCircleArrays[f.bucketInstanceId];u.invert(st.invProjMatrix,y),st.viewportMatrix=this.collisionIndex.getViewportMatrix()}f.justReloaded=!1},tr.prototype.markUsedJustification=function(i,o,n,s){var p;p=s===u.WritingMode.vertical?n.verticalPlacedTextSymbolIndex:{left:n.leftJustifiedTextSymbolIndex,center:n.centerJustifiedTextSymbolIndex,right:n.rightJustifiedTextSymbolIndex}[u.getAnchorJustification(o)];for(var f=0,d=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex,n.verticalPlacedTextSymbolIndex];f<d.length;f+=1){var y=d[f];y>=0&&(i.text.placedSymbolArray.get(y).crossTileID=p>=0&&y!==p?0:n.crossTileID)}},tr.prototype.markUsedOrientation=function(i,o,n){for(var s=o===u.WritingMode.horizontal||o===u.WritingMode.horizontalOnly?o:0,p=o===u.WritingMode.vertical?o:0,f=0,d=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];f<d.length;f+=1)i.text.placedSymbolArray.get(d[f]).placedOrientation=s;n.verticalPlacedTextSymbolIndex&&(i.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=p)},tr.prototype.commit=function(i){this.commitTime=i,this.zoomAtLastRecencyCheck=this.transform.zoom;var o=this.prevPlacement,n=!1;this.prevZoomAdjustment=o?o.zoomAdjustment(this.transform.zoom):0;var s=o?o.symbolFadeChange(i):1,p=o?o.opacities:{},f=o?o.variableOffsets:{},d=o?o.placedOrientations:{};for(var y in this.placements){var v=this.placements[y],S=p[y];S?(this.opacities[y]=new Gr(S,s,v.text,v.icon),n=n||v.text!==S.text.placed||v.icon!==S.icon.placed):(this.opacities[y]=new Gr(null,s,v.text,v.icon,v.skipFade),n=n||v.text||v.icon)}for(var z in p){var C=p[z];if(!this.opacities[z]){var P=new Gr(C,s,!1,!1);P.isHidden()||(this.opacities[z]=P,n=n||C.text.placed||C.icon.placed)}}for(var O in f)this.variableOffsets[O]||!this.opacities[O]||this.opacities[O].isHidden()||(this.variableOffsets[O]=f[O]);for(var B in d)this.placedOrientations[B]||!this.opacities[B]||this.opacities[B].isHidden()||(this.placedOrientations[B]=d[B]);n?this.lastPlacementChangeTime=i:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=o?o.lastPlacementChangeTime:i)},tr.prototype.updateLayerOpacities=function(i,o){for(var n={},s=0,p=o;s<p.length;s+=1){var f=p[s],d=f.getBucket(i);d&&f.latestFeatureIndex&&i.id===d.layerIds[0]&&this.updateBucketOpacities(d,n,f.collisionBoxArray)}},tr.prototype.updateBucketOpacities=function(i,o,n){var s=this;i.hasTextData()&&i.text.opacityVertexArray.clear(),i.hasIconData()&&i.icon.opacityVertexArray.clear(),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexArray.clear(),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexArray.clear();var p=i.layers[0].layout,f=new Gr(null,0,!1,!1,!0),d=p.get("text-allow-overlap"),y=p.get("icon-allow-overlap"),v=p.get("text-variable-anchor"),S=p.get("text-rotation-alignment")==="map",z=p.get("text-pitch-alignment")==="map",C=p.get("icon-text-fit")!=="none",P=new Gr(null,0,d&&(y||!i.hasIconData()||p.get("icon-optional")),y&&(d||!i.hasTextData()||p.get("text-optional")),!0);!i.collisionArrays&&n&&(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData())&&i.deserializeCollisionBoxes(n);for(var O=function(N,X,H){for(var te=0;te<X/4;te++)N.opacityVertexArray.emplaceBack(H)},B=function(N){var X=i.symbolInstances.get(N),H=X.numHorizontalGlyphVertices,te=X.numVerticalGlyphVertices,ee=X.crossTileID,re=s.opacities[ee];o[ee]?re=f:re||(s.opacities[ee]=re=P),o[ee]=!0;var ne=X.numIconVertices>0,he=s.placedOrientations[X.crossTileID],ce=he===u.WritingMode.vertical,ve=he===u.WritingMode.horizontal||he===u.WritingMode.horizontalOnly;if(H>0||te>0){var Me=Ls(re.text);O(i.text,H,ce?ka:Me),O(i.text,te,ve?ka:Me);var Re=re.text.isHidden();[X.rightJustifiedTextSymbolIndex,X.centerJustifiedTextSymbolIndex,X.leftJustifiedTextSymbolIndex].forEach((function(Be){Be>=0&&(i.text.placedSymbolArray.get(Be).hidden=Re||ce?1:0)})),X.verticalPlacedTextSymbolIndex>=0&&(i.text.placedSymbolArray.get(X.verticalPlacedTextSymbolIndex).hidden=Re||ve?1:0);var De=s.variableOffsets[X.crossTileID];De&&s.markUsedJustification(i,De.anchor,X,he);var st=s.placedOrientations[X.crossTileID];st&&(s.markUsedJustification(i,"left",X,st),s.markUsedOrientation(i,st,X))}if(ne){var Ee=Ls(re.icon),Ze=!(C&&X.verticalPlacedIconSymbolIndex&&ce);X.placedIconSymbolIndex>=0&&(O(i.icon,X.numIconVertices,Ze?Ee:ka),i.icon.placedSymbolArray.get(X.placedIconSymbolIndex).hidden=re.icon.isHidden()),X.verticalPlacedIconSymbolIndex>=0&&(O(i.icon,X.numVerticalIconVertices,Ze?ka:Ee),i.icon.placedSymbolArray.get(X.verticalPlacedIconSymbolIndex).hidden=re.icon.isHidden())}if(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData()){var Ye=i.collisionArrays[N];if(Ye){var Ge=new u.Point(0,0);if(Ye.textBox||Ye.verticalTextBox){var je=!0;if(v){var Ne=s.variableOffsets[ee];Ne?(Ge=Gi(Ne.anchor,Ne.width,Ne.height,Ne.textOffset,Ne.textBoxScale),S&&Ge._rotate(z?s.transform.angle:-s.transform.angle)):je=!1}Ye.textBox&&xo(i.textCollisionBox.collisionVertexArray,re.text.placed,!je||ce,Ge.x,Ge.y),Ye.verticalTextBox&&xo(i.textCollisionBox.collisionVertexArray,re.text.placed,!je||ve,Ge.x,Ge.y)}var Ve=!!(!ve&&Ye.verticalIconBox);Ye.iconBox&&xo(i.iconCollisionBox.collisionVertexArray,re.icon.placed,Ve,C?Ge.x:0,C?Ge.y:0),Ye.verticalIconBox&&xo(i.iconCollisionBox.collisionVertexArray,re.icon.placed,!Ve,C?Ge.x:0,C?Ge.y:0)}}},j=0;j<i.symbolInstances.length;j++)B(j);if(i.sortFeatures(this.transform.angle),this.retainedQueryData[i.bucketInstanceId]&&(this.retainedQueryData[i.bucketInstanceId].featureSortOrder=i.featureSortOrder),i.hasTextData()&&i.text.opacityVertexBuffer&&i.text.opacityVertexBuffer.updateData(i.text.opacityVertexArray),i.hasIconData()&&i.icon.opacityVertexBuffer&&i.icon.opacityVertexBuffer.updateData(i.icon.opacityVertexArray),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexBuffer&&i.iconCollisionBox.collisionVertexBuffer.updateData(i.iconCollisionBox.collisionVertexArray),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexBuffer&&i.textCollisionBox.collisionVertexBuffer.updateData(i.textCollisionBox.collisionVertexArray),i.bucketInstanceId in this.collisionCircleArrays){var R=this.collisionCircleArrays[i.bucketInstanceId];i.placementInvProjMatrix=R.invProjMatrix,i.placementViewportMatrix=R.viewportMatrix,i.collisionCircleArray=R.circles,delete this.collisionCircleArrays[i.bucketInstanceId]}},tr.prototype.symbolFadeChange=function(i){return this.fadeDuration===0?1:(i-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},tr.prototype.zoomAdjustment=function(i){return Math.max(0,(this.transform.zoom-i)/1.5)},tr.prototype.hasTransitions=function(i){return this.stale||i-this.lastPlacementChangeTime<this.fadeDuration},tr.prototype.stillRecent=function(i,o){var n=this.zoomAtLastRecencyCheck===o?1-this.zoomAdjustment(o):1;return this.zoomAtLastRecencyCheck=o,this.commitTime+this.fadeDuration*n>i},tr.prototype.setStale=function(){this.stale=!0};var Ca=Math.pow(2,25),Uu=Math.pow(2,24),Vu=Math.pow(2,17),Ds=Math.pow(2,16),Nu=Math.pow(2,9),Dl=Math.pow(2,8),ju=Math.pow(2,1);function Ls(i){if(i.opacity===0&&!i.placed)return 0;if(i.opacity===1&&i.placed)return 4294967295;var o=i.placed?1:0,n=Math.floor(127*i.opacity);return n*Ca+o*Uu+n*Vu+o*Ds+n*Nu+o*Dl+n*ju+o}var ka=0,Ma=function(i){this._sortAcrossTiles=i.layout.get("symbol-z-order")!=="viewport-y"&&!i.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ma.prototype.continuePlacement=function(i,o,n,s,p){for(var f=this._bucketParts;this._currentTileIndex<i.length;)if(o.getBucketParts(f,s,i[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,p())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,f.sort((function(d,y){return d.sortKey-y.sortKey})));this._currentPartIndex<f.length;)if(o.placeLayerBucketPart(f[this._currentPartIndex],this._seenCrossTileIDs,n),this._currentPartIndex++,p())return!0;return!1};var Go=function(i,o,n,s,p,f,d){this.placement=new tr(i,p,f,d),this._currentPlacementIndex=o.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=s,this._done=!1};Go.prototype.isDone=function(){return this._done},Go.prototype.continuePlacement=function(i,o,n){for(var s=this,p=u.browser.now(),f=function(){var v=u.browser.now()-p;return!s._forceFullPlacement&&v>2};this._currentPlacementIndex>=0;){var d=o[i[this._currentPlacementIndex]],y=this.placement.collisionIndex.transform.zoom;if(d.type==="symbol"&&(!d.minzoom||d.minzoom<=y)&&(!d.maxzoom||d.maxzoom>y)){if(this._inProgressLayer||(this._inProgressLayer=new Ma(d)),this._inProgressLayer.continuePlacement(n[d.source],this.placement,this._showCollisionBoxes,d,f))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Go.prototype.commit=function(i){return this.placement.commit(i),this.placement};var Ll=512/u.EXTENT/2,Da=function(i,o,n){this.tileID=i,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var s=0;s<o.length;s++){var p=o.get(s),f=p.key;this.indexedSymbolInstances[f]||(this.indexedSymbolInstances[f]=[]),this.indexedSymbolInstances[f].push({crossTileID:p.crossTileID,coord:this.getScaledCoordinates(p,i)})}};Da.prototype.getScaledCoordinates=function(i,o){var n=Ll/Math.pow(2,o.canonical.z-this.tileID.canonical.z);return{x:Math.floor((o.canonical.x*u.EXTENT+i.anchorX)*n),y:Math.floor((o.canonical.y*u.EXTENT+i.anchorY)*n)}},Da.prototype.findMatches=function(i,o,n){for(var s=this.tileID.canonical.z<o.canonical.z?1:Math.pow(2,this.tileID.canonical.z-o.canonical.z),p=0;p<i.length;p++){var f=i.get(p);if(!f.crossTileID){var d=this.indexedSymbolInstances[f.key];if(d)for(var y=this.getScaledCoordinates(f,o),v=0,S=d;v<S.length;v+=1){var z=S[v];if(Math.abs(z.coord.x-y.x)<=s&&Math.abs(z.coord.y-y.y)<=s&&!n[z.crossTileID]){n[z.crossTileID]=!0,f.crossTileID=z.crossTileID;break}}}}};var Rs=function(){this.maxCrossTileID=0};Rs.prototype.generate=function(){return++this.maxCrossTileID};var Fr=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Fr.prototype.handleWrapJump=function(i){var o=Math.round((i-this.lng)/360);if(o!==0)for(var n in this.indexes){var s=this.indexes[n],p={};for(var f in s){var d=s[f];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+o),p[d.tileID.key]=d}this.indexes[n]=p}this.lng=i},Fr.prototype.addBucket=function(i,o,n){if(this.indexes[i.overscaledZ]&&this.indexes[i.overscaledZ][i.key]){if(this.indexes[i.overscaledZ][i.key].bucketInstanceId===o.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(i.overscaledZ,this.indexes[i.overscaledZ][i.key])}for(var s=0;s<o.symbolInstances.length;s++)o.symbolInstances.get(s).crossTileID=0;this.usedCrossTileIDs[i.overscaledZ]||(this.usedCrossTileIDs[i.overscaledZ]={});var p=this.usedCrossTileIDs[i.overscaledZ];for(var f in this.indexes){var d=this.indexes[f];if(Number(f)>i.overscaledZ)for(var y in d){var v=d[y];v.tileID.isChildOf(i)&&v.findMatches(o.symbolInstances,i,p)}else{var S=d[i.scaledTo(Number(f)).key];S&&S.findMatches(o.symbolInstances,i,p)}}for(var z=0;z<o.symbolInstances.length;z++){var C=o.symbolInstances.get(z);C.crossTileID||(C.crossTileID=n.generate(),p[C.crossTileID]=!0)}return this.indexes[i.overscaledZ]===void 0&&(this.indexes[i.overscaledZ]={}),this.indexes[i.overscaledZ][i.key]=new Da(i,o.symbolInstances,o.bucketInstanceId),!0},Fr.prototype.removeBucketCrossTileIDs=function(i,o){for(var n in o.indexedSymbolInstances)for(var s=0,p=o.indexedSymbolInstances[n];s<p.length;s+=1)delete this.usedCrossTileIDs[i][p[s].crossTileID]},Fr.prototype.removeStaleBuckets=function(i){var o=!1;for(var n in this.indexes){var s=this.indexes[n];for(var p in s)i[s[p].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,s[p]),delete s[p],o=!0)}return o};var Un=function(){this.layerIndexes={},this.crossTileIDs=new Rs,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Un.prototype.addLayer=function(i,o,n){var s=this.layerIndexes[i.id];s===void 0&&(s=this.layerIndexes[i.id]=new Fr);var p=!1,f={};s.handleWrapJump(n);for(var d=0,y=o;d<y.length;d+=1){var v=y[d],S=v.getBucket(i);S&&i.id===S.layerIds[0]&&(S.bucketInstanceId||(S.bucketInstanceId=++this.maxBucketInstanceId),s.addBucket(v.tileID,S,this.crossTileIDs)&&(p=!0),f[S.bucketInstanceId]=!0)}return s.removeStaleBuckets(f)&&(p=!0),p},Un.prototype.pruneUnusedLayers=function(i){var o={};
1for(var n in i.forEach((function(s){o[s]=!0})),this.layerIndexes)o[n]||delete this.layerIndexes[n]};var an=function(i,o){return u.emitValidationErrors(i,o&&o.filter((function(n){return n.identifier!=="source.canvas"})))},La=u.pick(ae,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),sn=u.pick(ae,["setCenter","setZoom","setBearing","setPitch"]),ln=(function(){var i={},o=u.styleSpec.$version;for(var n in u.styleSpec.$root){var s,p=u.styleSpec.$root[n];p.required&&(s=n==="version"?o:p.type==="array"?[]:{})!=null&&(i[n]=s)}return i})(),Xi=(function(i){function o(n,s){var p=this;s===void 0&&(s={}),i.call(this),this.map=n,this.dispatcher=new Zr(Ce(),this),this.imageManager=new _r,this.imageManager.setEventedParent(this),this.glyphManager=new Er(n._requestManager,s.localIdeographFontFamily),this.lineAtlas=new qt(256,512),this.crossTileSymbolIndex=new Un,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new u.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",u.getReferrer());var f=this;this._rtlTextPluginCallback=o.registerForPluginStateChange((function(d){f.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:d.pluginStatus,pluginURL:d.pluginURL},(function(y,v){if(u.triggerPluginCompletionEvent(y),v&&v.every((function(z){return z})))for(var S in f.sourceCaches)f.sourceCaches[S].reload()}))})),this.on("data",(function(d){if(d.dataType==="source"&&d.sourceDataType==="metadata"){var y=p.sourceCaches[d.sourceId];if(y){var v=y.getSource();if(v&&v.vectorLayerIds)for(var S in p._layers){var z=p._layers[S];z.source===v.id&&p._validateLayer(z)}}}}))}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.loadURL=function(n,s){var p=this;s===void 0&&(s={}),this.fire(new u.Event("dataloading",{dataType:"style"}));var f=typeof s.validate=="boolean"?s.validate:!u.isMapboxURL(n);n=this.map._requestManager.normalizeStyleURL(n,s.accessToken);var d=this.map._requestManager.transformRequest(n,u.ResourceType.Style);this._request=u.getJSON(d,(function(y,v){p._request=null,y?p.fire(new u.ErrorEvent(y)):v&&p._load(v,f)}))},o.prototype.loadJSON=function(n,s){var p=this;s===void 0&&(s={}),this.fire(new u.Event("dataloading",{dataType:"style"})),this._request=u.browser.frame((function(){p._request=null,p._load(n,s.validate!==!1)}))},o.prototype.loadEmpty=function(){this.fire(new u.Event("dataloading",{dataType:"style"})),this._load(ln,!1)},o.prototype._load=function(n,s){if(!s||!an(this,u.validateStyle(n))){for(var p in this._loaded=!0,this.stylesheet=n,n.sources)this.addSource(p,n.sources[p],{validate:!1});n.sprite?this._loadSprite(n.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(n.glyphs);var f=me(this.stylesheet.layers);this._order=f.map((function(S){return S.id})),this._layers={},this._serializedLayers={};for(var d=0,y=f;d<y.length;d+=1){var v=y[d];(v=u.createStyleLayer(v)).setEventedParent(this,{layer:{id:v.id}}),this._layers[v.id]=v,this._serializedLayers[v.id]=v.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new co(this.stylesheet.light),this.fire(new u.Event("data",{dataType:"style"})),this.fire(new u.Event("style.load"))}},o.prototype._loadSprite=function(n){var s=this;this._spriteRequest=(function(p,f,d){var y,v,S,z=u.browser.devicePixelRatio>1?"@2x":"",C=u.getJSON(f.transformRequest(f.normalizeSpriteURL(p,z,".json"),u.ResourceType.SpriteJSON),(function(B,j){C=null,S||(S=B,y=j,O())})),P=u.getImage(f.transformRequest(f.normalizeSpriteURL(p,z,".png"),u.ResourceType.SpriteImage),(function(B,j){P=null,S||(S=B,v=j,O())}));function O(){if(S)d(S);else if(y&&v){var B=u.browser.getImageData(v),j={};for(var R in y){var N=y[R],X=N.width,H=N.height,te=N.x,ee=N.y,re=N.sdf,ne=N.pixelRatio,he=N.stretchX,ce=N.stretchY,ve=N.content,Me=new u.RGBAImage({width:X,height:H});u.RGBAImage.copy(B,Me,{x:te,y:ee},{x:0,y:0},{width:X,height:H}),j[R]={data:Me,pixelRatio:ne,sdf:re,stretchX:he,stretchY:ce,content:ve}}d(null,j)}}return{cancel:function(){C&&(C.cancel(),C=null),P&&(P.cancel(),P=null)}}})(n,this.map._requestManager,(function(p,f){if(s._spriteRequest=null,p)s.fire(new u.ErrorEvent(p));else if(f)for(var d in f)s.imageManager.addImage(d,f[d]);s.imageManager.setLoaded(!0),s._availableImages=s.imageManager.listImages(),s.dispatcher.broadcast("setImages",s._availableImages),s.fire(new u.Event("data",{dataType:"style"}))}))},o.prototype._validateLayer=function(n){var s=this.sourceCaches[n.source];if(s){var p=n.sourceLayer;if(p){var f=s.getSource();(f.type==="geojson"||f.vectorLayerIds&&f.vectorLayerIds.indexOf(p)===-1)&&this.fire(new u.ErrorEvent(new Error('Source layer "'+p+'" does not exist on source "'+f.id+'" as specified by style layer "'+n.id+'"')))}}},o.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var n in this.sourceCaches)if(!this.sourceCaches[n].loaded())return!1;return!!this.imageManager.isLoaded()},o.prototype._serializeLayers=function(n){for(var s=[],p=0,f=n;p<f.length;p+=1){var d=this._layers[f[p]];d.type!=="custom"&&s.push(d.serialize())}return s},o.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var n in this.sourceCaches)if(this.sourceCaches[n].hasTransition())return!0;for(var s in this._layers)if(this._layers[s].hasTransition())return!0;return!1},o.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},o.prototype.update=function(n){if(this._loaded){var s=this._changed;if(this._changed){var p=Object.keys(this._updatedLayers),f=Object.keys(this._removedLayers);for(var d in(p.length||f.length)&&this._updateWorkerLayers(p,f),this._updatedSources){var y=this._updatedSources[d];y==="reload"?this._reloadSource(d):y==="clear"&&this._clearSource(d)}for(var v in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[v].updateTransitions(n);this.light.updateTransitions(n),this._resetUpdates()}var S={};for(var z in this.sourceCaches){var C=this.sourceCaches[z];S[z]=C.used,C.used=!1}for(var P=0,O=this._order;P<O.length;P+=1){var B=this._layers[O[P]];B.recalculate(n,this._availableImages),!B.isHidden(n.zoom)&&B.source&&(this.sourceCaches[B.source].used=!0)}for(var j in S){var R=this.sourceCaches[j];S[j]!==R.used&&R.fire(new u.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:j}))}this.light.recalculate(n),this.z=n.zoom,s&&this.fire(new u.Event("data",{dataType:"style"}))}},o.prototype._updateTilesForChangedImages=function(){var n=Object.keys(this._changedImages);if(n.length){for(var s in this.sourceCaches)this.sourceCaches[s].reloadTilesForDependencies(["icons","patterns"],n);this._changedImages={}}},o.prototype._updateWorkerLayers=function(n,s){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(n),removedIds:s})},o.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},o.prototype.setState=function(n){var s=this;if(this._checkLoaded(),an(this,u.validateStyle(n)))return!1;(n=u.clone$1(n)).layers=me(n.layers);var p=(function(d,y){if(!d)return[{command:ae.setStyle,args:[y]}];var v=[];try{if(!u.deepEqual(d.version,y.version))return[{command:ae.setStyle,args:[y]}];u.deepEqual(d.center,y.center)||v.push({command:ae.setCenter,args:[y.center]}),u.deepEqual(d.zoom,y.zoom)||v.push({command:ae.setZoom,args:[y.zoom]}),u.deepEqual(d.bearing,y.bearing)||v.push({command:ae.setBearing,args:[y.bearing]}),u.deepEqual(d.pitch,y.pitch)||v.push({command:ae.setPitch,args:[y.pitch]}),u.deepEqual(d.sprite,y.sprite)||v.push({command:ae.setSprite,args:[y.sprite]}),u.deepEqual(d.glyphs,y.glyphs)||v.push({command:ae.setGlyphs,args:[y.glyphs]}),u.deepEqual(d.transition,y.transition)||v.push({command:ae.setTransition,args:[y.transition]}),u.deepEqual(d.light,y.light)||v.push({command:ae.setLight,args:[y.light]});var S={},z=[];(function(P,O,B,j){var R;for(R in O=O||{},P=P||{})P.hasOwnProperty(R)&&(O.hasOwnProperty(R)||We(R,B,j));for(R in O)O.hasOwnProperty(R)&&(P.hasOwnProperty(R)?u.deepEqual(P[R],O[R])||(P[R
1].type==="geojson"&&O[R].type==="geojson"&&Tt(P,O,R)?B.push({command:ae.setGeoJSONSourceData,args:[R,O[R].data]}):Ie(R,O,B,j)):Xe(R,O,B))})(d.sources,y.sources,z,S);var C=[];d.layers&&d.layers.forEach((function(P){S[P.source]?v.push({command:ae.removeLayer,args:[P.id]}):C.push(P)})),v=v.concat(z),(function(P,O,B){O=O||[];var j,R,N,X,H,te,ee,re=(P=P||[]).map(At),ne=O.map(At),he=P.reduce(kt,{}),ce=O.reduce(kt,{}),ve=re.slice(),Me=Object.create(null);for(j=0,R=0;j<re.length;j++)ce.hasOwnProperty(N=re[j])?R++:(B.push({command:ae.removeLayer,args:[N]}),ve.splice(ve.indexOf(N,R),1));for(j=0,R=0;j<ne.length;j++)ve[ve.length-1-j]!==(N=ne[ne.length-1-j])&&(he.hasOwnProperty(N)?(B.push({command:ae.removeLayer,args:[N]}),ve.splice(ve.lastIndexOf(N,ve.length-R),1)):R++,B.push({command:ae.addLayer,args:[ce[N],te=ve[ve.length-j]]}),ve.splice(ve.length-j,0,N),Me[N]=!0);for(j=0;j<ne.length;j++)if(X=he[N=ne[j]],H=ce[N],!Me[N]&&!u.deepEqual(X,H))if(u.deepEqual(X.source,H.source)&&u.deepEqual(X["source-layer"],H["source-layer"])&&u.deepEqual(X.type,H.type)){for(ee in et(X.layout,H.layout,B,N,null,ae.setLayoutProperty),et(X.paint,H.paint,B,N,null,ae.setPaintProperty),u.deepEqual(X.filter,H.filter)||B.push({command:ae.setFilter,args:[N,H.filter]}),u.deepEqual(X.minzoom,H.minzoom)&&u.deepEqual(X.maxzoom,H.maxzoom)||B.push({command:ae.setLayerZoomRange,args:[N,H.minzoom,H.maxzoom]}),X)X.hasOwnProperty(ee)&&ee!=="layout"&&ee!=="paint"&&ee!=="filter"&&ee!=="metadata"&&ee!=="minzoom"&&ee!=="maxzoom"&&(ee.indexOf("paint.")===0?et(X[ee],H[ee],B,N,ee.slice(6),ae.setPaintProperty):u.deepEqual(X[ee],H[ee])||B.push({command:ae.setLayerProperty,args:[N,ee,H[ee]]}));for(ee in H)H.hasOwnProperty(ee)&&!X.hasOwnProperty(ee)&&ee!=="layout"&&ee!=="paint"&&ee!=="filter"&&ee!=="metadata"&&ee!=="minzoom"&&ee!=="maxzoom"&&(ee.indexOf("paint.")===0?et(X[ee],H[ee],B,N,ee.slice(6),ae.setPaintProperty):u.deepEqual(X[ee],H[ee])||B.push({command:ae.setLayerProperty,args:[N,ee,H[ee]]}))}else B.push({command:ae.removeLayer,args:[N]}),te=ve[ve.lastIndexOf(N)+1],B.push({command:ae.addLayer,args:[H,te]})})(C,y.layers,v)}catch(P){console.warn("Unable to compute style diff:",P),v=[{command:ae.setStyle,args:[y]}]}return v})(this.serialize(),n).filter((function(d){return!(d.command in sn)}));if(p.length===0)return!1;var f=p.filter((function(d){return!(d.command in La)}));if(f.length>0)throw new Error("Unimplemented: "+f.map((function(d){return d.command})).join(", ")+".");return p.forEach((function(d){d.command!=="setTransition"&&s[d.command].apply(s,d.args)})),this.stylesheet=n,!0},o.prototype.addImage=function(n,s){if(this.getImage(n))return this.fire(new u.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(n,s),this._afterImageUpdated(n)},o.prototype.updateImage=function(n,s){this.imageManager.updateImage(n,s)},o.prototype.getImage=function(n){return this.imageManager.getImage(n)},o.prototype.removeImage=function(n){if(!this.getImage(n))return this.fire(new u.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(n),this._afterImageUpdated(n)},o.prototype._afterImageUpdated=function(n){this._availableImages=this.imageManager.listImages(),this._changedImages[n]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new u.Event("data",{dataType:"style"}))},o.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},o.prototype.addSource=function(n,s,p){var f=this;if(p===void 0&&(p={}),this._checkLoaded(),this.sourceCaches[n]!==void 0)throw new Error("There is already a source with this ID");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(u.validateStyle.source,"sources."+n,s,null,p))){this.map&&this.map._collectResourceTiming&&(s.collectResourceTiming=!0);var d=this.sourceCaches[n]=new M(n,s,this.dispatcher);d.style=this,d.setEventedParent(this,(function(){return{isSourceLoaded:f.loaded(),source:d.serialize(),sourceId:n}})),d.onAdd(this.map),this._changed=!0}},o.prototype.removeSource=function(n){if(this._checkLoaded(),this.sourceCaches[n]===void 0)throw new Error("There is no source with this ID");for(var s in this._layers)if(this._layers[s].source===n)return this.fire(new u.ErrorEvent(new Error('Source "'+n+'" cannot be removed while layer "'+s+'" is using it.')));var p=this.sourceCaches[n];delete this.sourceCaches[n],delete this._updatedSources[n],p.fire(new u.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:n})),p.setEventedParent(null),p.clearTiles(),p.onRemove&&p.onRemove(this.map),this._changed=!0},o.prototype.setGeoJSONSourceData=function(n,s){this._checkLoaded(),this.sourceCaches[n].getSource().setData(s),this._changed=!0},o.prototype.getSource=function(n){return this.sourceCaches[n]&&this.sourceCaches[n].getSource()},o.prototype.addLayer=function(n,s,p){p===void 0&&(p={}),this._checkLoaded();var f=n.id;if(this.getLayer(f))this.fire(new u.ErrorEvent(new Error('Layer with i
1d "'+f+'" already exists on this map')));else{var d;if(n.type==="custom"){if(an(this,u.validateCustomStyleLayer(n)))return;d=u.createStyleLayer(n)}else{if(typeof n.source=="object"&&(this.addSource(f,n.source),n=u.clone$1(n),n=u.extend(n,{source:f})),this._validate(u.validateStyle.layer,"layers."+f,n,{arrayIndex:-1},p))return;d=u.createStyleLayer(n),this._validateLayer(d),d.setEventedParent(this,{layer:{id:f}}),this._serializedLayers[d.id]=d.serialize()}var y=s?this._order.indexOf(s):this._order.length;if(s&&y===-1)this.fire(new u.ErrorEvent(new Error('Layer with id "'+s+'" does not exist on this map.')));else{if(this._order.splice(y,0,f),this._layerOrderChanged=!0,this._layers[f]=d,this._removedLayers[f]&&d.source&&d.type!=="custom"){var v=this._removedLayers[f];delete this._removedLayers[f],v.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}},o.prototype.moveLayer=function(n,s){if(this._checkLoaded(),this._changed=!0,this._layers[n]){if(n!==s){var p=this._order.indexOf(n);this._order.splice(p,1);var f=s?this._order.indexOf(s):this._order.length;
1s&&f===-1?this.fire(new u.ErrorEvent(new Error('Layer with id "'+s+'" does not exist on this map.'))):(this._order.splice(f,0,n),this._layerOrderChanged=!0)}}else this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be moved.")))},o.prototype.removeLayer=function(n){this._checkLoaded();var s=this._layers[n];if(s){s.setEventedParent(null);var p=this._order.indexOf(n);this._order.splice(p,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[n]=s,delete this._layers[n],delete this._serializedLayers[n],delete this._updatedLayers[n],delete this._updatedPaintProps[n],s.onRemove&&s.onRemove(this.map)}else this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be removed.")))},o.prototype.getLayer=function(n){return this._layers[n]},o.prototype.hasLayer=function(n){return n in this._layers},o.prototype.setLayerZoomRange=function(n,s,p){this._checkLoaded();var f=this.getLayer(n);f?f.minzoom===s&&f.maxzoom===p||(s!=null&&(f.minzoom=s),p!=null&&(f.maxzoom=p),this._updateLayer(f)):this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot have zoom extent.")))},o.prototype.setFilter=function(n,s,p){p===void 0&&(p={}),this._checkLoaded();var f=this.getLayer(n);if(f){if(!u.deepEqual(f.filter,s))return s==null?(f.filter=void 0,void this._updateLayer(f)):void(this._validate(u.validateStyle.filter,"layers."+f.id+".filter",s,null,p)||(f.filter=u.clone$1(s),this._updateLayer(f)))}else this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be filtered.")))},o.prototype.getFilter=function(n){return u.clone$1(this.getLayer(n).filter)},o.prototype.setLayoutProperty=function(n,s,p,f){f===void 0&&(f={}),this._checkLoaded();var d=this.getLayer(n);d?u.deepEqual(d.getLayoutProperty(s),p)||(d.setLayoutProperty(s,p,f),this._updateLayer(d)):this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getLayoutProperty=function(n,s){var p=this.getLayer(n);if(p)return p.getLayoutProperty(s);this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style.")))},o.prototype.setPaintProperty=function(n,s,p,f){f===void 0&&(f={}),this._checkLoaded();var d=this.getLayer(n);d?u.deepEqual(d.getPaintProperty(s),p)||(d.setPaintProperty(s,p,f)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[n]=!0):this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getPaintProperty=function(n,s){return this.getLayer(n).getPaintProperty(s)},o.prototype.setFeatureState=function(n,s){this._checkLoaded();var p=n.source,f=n.sourceLayer,d=this.sourceCaches[p];if(d!==void 0){var y=d.getSource().type;y==="geojson"&&f?this.fire(new u.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):y!=="vector"||f?(n.id===void 0&&this.fire(new u.ErrorEvent(new Error("The feature id parameter must be provided."))),d.setFeatureState(f,n.id,s)):this.fire(new u.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new u.ErrorEvent(new Error("The source '"+p+"' does not exist in the map's style.")))},o.prototype.removeFeatureState=function(n,s){this._checkLoaded();var p=n.source,f=this.sourceCaches[p];if(f!==void 0){var d=f.getSource().type,y=d==="vector"?n.sourceLayer:void 0;d!=="vector"||y?s&&typeof n.id!="string"&&typeof n.id!="number"?this.fire(new u.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):f.removeFeatureState(y,n.id,s):this.fire(new u.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new u.ErrorEvent(new Error("The source '"+p+"' does not exist in the map's style.")))},o.prototype.getFeatureState=function(n){this._checkLoaded();var s=n.source,p=n.sourceLayer,f=this.sourceCaches[s];if(f!==void 0){if(f.getSource().type!=="vector"||p)return n.id===void 0&&this.fire(new u.ErrorEvent(new Error("The feature id parameter must be provided."))),f.getFeatureState(p,n.id);this.fire(new u.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new u.ErrorEvent(new Error("The source '"+s+"' does not exist in the map's style.")))},o.prototype.getTransition=function(){return u.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},o.prototype.serialize=function(){return u.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:u.mapObject(this.sourceCaches,(function(n){return n.serialize()})),layers:this._serializeLayers(this._order)},(function(n){return n!==void 0}))},o.prototype._updateLayer=function(n){this._updatedLayers[n.id]=!0,n.source&&!this._updatedSources[n.source]&&this.sourceCaches[n.source].getSource().type!=="raster"&&(this._updatedSources[n.source]="reload",this.sourceCaches[n.source].pause()),this._changed=!0},o.prototype._flattenAndSortRenderedFeatures=function(n){for(var s=this,p=function(he){return s._layers[he].type==="fill-extrusion"},f={},d=[],y=this._order.length-1;y>=0;y--){var v=this._order[y];if(p(v)){f[v]=y;for(var S=0,z=n;S<z.length;S+=1){var C=z[S][v];if(C)for(var P=0,O=C;P<O.length;P+=1)d.push(O[P])}}}d.sort((function(he,ce){return ce.intersectionZ-he.intersectionZ}));for(var B=[],j=this._order.length-1;j>=0;j--){var R=this._order[j];if(p(R))for(var N=d.length-1;N>=0;N--){var X=d[N].feature;if(f[X.layer.id]<j)break;B.push(X),d.pop()}else for(var H=0,te=n;H<te.length;H+=1){var ee=te[H][R];if(ee)for(var re=0,ne=ee;re<ne.length;re+=1)B.push(ne[re].feature)}}return B},o.prototype.queryRenderedFeatures=function(n,s,p){s&&s.filter&&this._val
vendor: 5,585 bytes, line 1
1idate(u.validateStyle.filter,"queryRenderedFeatures.filter",s.filter,null,s);var f={};if(s&&s.layers){if(!Array.isArray(s.layers))return this.fire(new u.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var d=0,y=s.layers;d<y.length;d+=1){var v=y[d],S=this._layers[v];if(!S)return this.fire(new u.ErrorEvent(new Error("The layer '"+v+"' does not exist in the map's style and cannot be queried for features."))),[];f[S.source]=!0}}var z=[];for(var C in s.availableImages=this._availableImages,this.sourceCaches)s.layers&&!f[C]||z.push(Ir(this.sourceCaches[C],this._layers,this._serializedLayers,n,s,p));return this.placement&&z.push((function(P,O,B,j,R,N,X){for(var H={},te=N.queryRenderedSymbols(j),ee=[],re=0,ne=Object.keys(te).map(Number);re<ne.length;re+=1)ee.push(X[ne[re]]);ee.sort(qi);for(var he=function(){var De=ve[ce],st=De.featureIndex.lookupSymbolFeatures(te[De.bucketInstanceId],O,De.bucketIndex,De.sourceLayerIndex,R.filter,R.layers,R.availableImages,P);for(var Ee in st){var Ze=H[Ee]=H[Ee]||[],Ye=st[Ee];Ye.sort((function(Ne,Ve){var Be=De.featureSortOrder;if(Be){var bt=Be.indexOf(Ne.featureIndex);return Be.indexOf(Ve.featureIndex)-bt}return Ve.featureIndex-Ne.featureIndex}));for(var Ge=0,je=Ye;Ge<je.length;Ge+=1)Ze.push(je[Ge])}},ce=0,ve=ee;ce<ve.length;ce+=1)he();var Me=function(De){H[De].forEach((function(st){var Ee=st.feature,Ze=B[P[De].source].getFeatureState(Ee.layer["source-layer"],Ee.id);Ee.source=Ee.layer.source,Ee.layer["source-layer"]&&(Ee.sourceLayer=Ee.layer["source-layer"]),Ee.state=Ze}))};for(var Re in H)Me(Re);return H})(this._layers,this._serializedLayers,this.sourceCaches,n,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(z)},o.prototype.querySourceFeatures=function(n,s){s&&s.filter&&this._validate(u.validateStyle.filter,"querySourceFeatures.filter",s.filter,null,s);var p=this.sourceCaches[n];return p?(function(f,d){for(var y=f.getRenderableIds().map((function(O){return f.getTileByID(O)})),v=[],S={},z=0;z<y.length;z++){var C=y[z],P=C.tileID.canonical.key;S[P]||(S[P]=!0,C.querySourceFeatures(v,d))}return v})(p,s):[]},o.prototype.addSourceType=function(n,s,p){return o.getSourceType(n)?p(new Error('A source type called "'+n+'" already exists.')):(o.setSourceType(n,s),s.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:n,url:s.workerSourceURL},p):p(null,null))},o.prototype.getLight=function(){return this.light.getLight()},o.prototype.setLight=function(n,s){s===void 0&&(s={}),this._checkLoaded();var p=this.light.getLight(),f=!1;for(var d in n)if(!u.deepEqual(n[d],p[d])){f=!0;break}if(f){var y={now:u.browser.now(),transition:u.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(n,s),this.light.updateTransitions(y)}},o.prototype._validate=function(n,s,p,f,d){return d===void 0&&(d={}),(!d||d.validate!==!1)&&an(this,n.call(u.validateStyle,u.extend({key:s,style:this.serialize(),value:p,styleSpec:u.styleSpec},f)))},o.prototype._remove=function(){for(var n in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),u.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[n].setEventedParent(null);for(var s in this.sourceCaches)this.sourceCaches[s].clearTiles(),this.sourceCaches[s].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},o.prototype._clearSource=function(n){this.sourceCaches[n].clearTiles()},o.prototype._reloadSource=function(n){this.sourceCaches[n].resume(),this.sourceCaches[n].reload()},o.prototype._updateSources=function(n){for(var s in this.sourceCaches)this.sourceCaches[s].update(n)},o.prototype._generateCollisionBoxes=function(){for(var n in this.sourceCaches)this._reloadSource(n)},o.prototype._updatePlacement=function(n,s,p,f,d){d===void 0&&(d=!1);for(var y=!1,v=!1,S={},z=0,C=this._order;z<C.length;z+=1){var P=this._layers[C[z]];if(P.type==="symbol"){if(!S[P.source]){var O=this.sourceCaches[P.source];S[P.source]=O.getRenderableIds(!0).map((function(X){return O.getTileByID(X)})).sort((function(X,H){return H.tileID.overscaledZ-X.tileID.overscaledZ||(X.tileID.isLessThan(H.tileID)?-1:1)}))}var B=this.crossTileSymbolIndex.addLayer(P,S[P.source],n.center.lng);y=y||B}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||p===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.browser.now(),n.zoom))&&(this.pauseablePlacement=new Go(n,this._order,d,s,p,f,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(u.browser.now()),v=!0),y&&this.pauseablePlacement.placement.setStale()),v||y)for(var j=0,R=this._order;j<R.length;j+=1){var N=this._layers[R[j]];N.type==="symbol"&&this.placement.updateLayerOpacities(N,S[N.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.browser.now())},o.prototype._releaseSymbolFadeTiles=function(){for(var n in this.sourceCaches)this.sourceCaches[n].releaseSymbolFadeTiles()},o.prototype.getImages=function(n,s,p){this.imageManager.getImages(s.icons,p),this._updateTilesForChangedImages();var f=this.sourceCaches[s.source];f&&f.setDependencies(s.tileID.key,s.type,s.icons)},o.prototype.getGlyphs=function(n,s,p){this.glyphManager.getGlyphs(s.stacks,p)}
1,o.prototype.getResource=function(n,s,p){return u.makeRequest(s,p)},o})(u.Evented);Xi.getSourceType=function(i){return rn[i]},Xi.setSourceType=function(i,o){rn[i]=o},Xi.registerForPluginStateChange=u.registerForPluginStateChange;var zi=u.createLayout([{name:"a_pos",type:"Int16",components:2}]),Qt=Rt(`#ifdef GL_ES
2precision mediump float;
3#else
4#if !defined(lowp)
5#define lowp
6#endif
7#if !defined(mediump)
8#define mediump
9#endif
10#if !defined(highp)
11#define highp
12#endif
13#endif`,`#ifdef GL_ES
14precision highp float;
15#else
16#if !defined(lowp)
17#define lowp
18#endif
19#if !defined(mediump)
20#define mediump
21#endif
22#if !defined(highp)
23#define highp
24#endif
25#endif
26vec2 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
27);}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;}`),Ra=Rt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
28#ifdef OVERDRAW_INSPECTOR
29gl_FragColor=vec4(1.0);
30#endif
31}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Rl=Rt(`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;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying 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=texture2D(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=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
32#ifdef OVERDRAW_INSPECTOR
33gl_FragColor=vec4(1.0);
34#endif
35}`,"uniform mat4 u_matrix;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;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);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);}"),qu=Rt(`varying vec3 v_data;
36#pragma mapbox: define highp vec4 color
37#pragma mapbox: define mediump float radius
38#pragma mapbox: define lowp float blur
39#pragma mapbox: define lowp float opacity
40#pragma mapbox: define highp vec4 stroke_color
41#pragma mapbox: define mediump float stroke_width
42#pragma mapbox: define lowp float stroke_opacity
43void main() {
44#pragma mapbox: initialize highp vec4 color
45#pragma mapbox: initialize mediump float radius
46#pragma mapbox: initialize lowp float blur
47#pragma mapbox: initialize lowp float opacity
48#pragma mapbox: initialize highp vec4 stroke_color
49#pragma mapbox: initialize mediump float stroke_width
50#pragma mapbox: initialize lowp float stroke_opacity
51vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);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
51/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
52#ifdef OVERDRAW_INSPECTOR
53gl_FragColor=vec4(1.0);
54#endif
55}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
56#pragma mapbox: define highp vec4 color
57#pragma mapbox: define mediump float radius
58#pragma mapbox: define lowp float blur
59#pragma mapbox: define lowp float opacity
60#pragma mapbox: define highp vec4 stroke_color
61#pragma mapbox: define mediump float stroke_width
62#pragma mapbox: define lowp float stroke_opacity
63void main(void) {
64#pragma mapbox: initialize highp vec4 color
65#pragma mapbox: initialize mediump float radius
66#pragma mapbox: initialize lowp float blur
67#pragma mapbox: initialize lowp float opacity
68#pragma mapbox: initialize highp vec4 stroke_color
69#pragma mapbox: initialize mediump float stroke_width
70#pragma mapbox: initialize lowp float stroke_opacity
71vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);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;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),Zu=Rt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Bs=Rt(`uniform highp float u_intensity;varying vec2 v_extrude;
72#pragma mapbox: define highp float weight
73#define GAUSS_COEF 0.3989422804014327
74void main() {
75#pragma mapbox: initialize highp float weight
76float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
77#ifdef OVERDRAW_INSPECTOR
78gl_FragColor=vec4(1.0);
79#endif
80}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
81#pragma mapbox: define highp float weight
82#pragma mapbox: define mediump float radius
83const highp float ZERO=1.0/255.0/16.0;
84#define GAUSS_COEF 0.3989422804014327
85void main(void) {
86#pragma mapbox: initialize highp float weight
87#pragma mapbox: initialize mediump float radius
88vec2 unscaled_extrude=vec2(mod(a_pos,2.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;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),Fs=Rt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
89#ifdef OVERDRAW_INSPECTOR
90gl_FragColor=vec4(0.0);
91#endif
92}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying 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;}"),Os=Rt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Us=Rt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);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);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;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;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Bl=Rt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),Fl=Rt(`#pragma mapbox: define highp vec4 color
93#pragma mapbox: define lowp float opacity
94void main() {
95#pragma mapbox: initialize highp vec4 color
96#pragma mapbox: initialize lowp float opacity
97gl_FragColor=color*opacity;
98#ifdef OVERDRAW_INSPECTOR
99gl_FragColor=vec4(1.0);
100#endif
101}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
102#pragma mapbox: define highp vec4 color
103#pragma mapbox: define lowp float opacity
104void main() {
105#pragma mapbox: initialize highp vec4 color
106#pragma mapbox: initialize lowp float opacity
107gl_Position=u_matrix*vec4(a_pos,0,1);}`),Gu=Rt(`varying vec2 v_pos;
108#pragma mapbox: define highp vec4 outline_color
109#pragma mapbox: define lowp float opacity
110void main() {
111#pragma mapbox: initialize highp vec4 outline_color
112#pragma mapbox: initialize lowp float opacity
113float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
114#ifdef OVERDRAW_INSPECTOR
115gl_FragColor=vec4(1.0);
116#endif
117}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
118#pragma mapbox: define highp vec4 outline_color
119#pragma mapbox: define lowp float opacity
120void main() {
121#pragma mapbox: initialize highp vec4 outline_color
122#pragma mapbox: initialize lowp float opacity
123gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Xo=Rt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
124#pragma mapbox: define lowp float opacity
125#pragma mapbox: define lowp vec4 pattern_from
126#pragma mapbox: define lowp vec4 pattern_to
127void main() {
128#pragma mapbox: initialize lowp float opacity
129#pragma mapbox: initialize mediump vec4 pattern_from
130#pragma mapbox: initialize mediump vec4 pattern_to
131vec2 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=texture2D(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=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
132#ifdef OVERDRAW_INSPECTOR
133gl_FragColor=vec4(1.0);
134#endif
135}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
136#pragma mapbox: define lowp float opacity
137#pragma mapbox: define lowp vec4 pattern_from
138#pragma mapbox: define lowp vec4 pattern_to
139#pragma mapbox: define lowp float pixel_ratio_from
140#pragma mapbox: define lowp float pixel_ratio_to
141void main() {
142#pragma mapbox: initialize lowp float opacity
143#pragma mapbox: initialize mediump vec4 pattern_from
144#pragma mapbox: initialize mediump vec4 pattern_to
145#pragma mapbox: initialize lowp float pixel_ratio_from
146#pragma mapbox: initialize lowp float pixel_ratio_to
147vec2 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=u_matrix*vec4(a_pos,0,1);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;}`),Wo=Rt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
148#pragma mapbox: define lowp float opacity
149#pragma mapbox: define lowp vec4 pattern_from
150#pragma mapbox: define lowp vec4 pattern_to
151void main() {
152#pragma mapbox: initialize lowp float opacity
153#pragma mapbox: initialize mediump vec4 pattern_from
154#pragma mapbox: initialize mediump vec4 pattern_to
155vec2 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=texture2D(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=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
156#ifdef OVERDRAW_INSPECTOR
157gl_FragColor=vec4(1.0);
158#endif
159}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
160#pragma mapbox: define lowp float opacity
161#pragma mapbox: define lowp vec4 pattern_from
162#pragma mapbox: define lowp vec4 pattern_to
163#pragma mapbox: define lowp float pixel_ratio_from
164#pragma mapbox: define lowp float pixel_ratio_to
165void main() {
166#pragma mapbox: initialize lowp float opacity
167#pragma mapbox: initialize mediump vec4 pattern_from
168#pragma mapbox: initialize mediump vec4 pattern_to
169#pragma mapbox: initialize lowp float pixel_ratio_from
170#pragma mapbox: initialize lowp float pixel_ratio_to
171vec2 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;gl_Position=u_matrix*vec4(a_pos,0,1);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);}`),Ol=Rt(`varying vec4 v_color;void main() {gl_FragColor=v_color;
172#ifdef OVERDRAW_INSPECTOR
173gl_FragColor=vec4(1.0);
174#endif
175}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
176#pragma mapbox: define highp float base
177#pragma mapbox: define highp float height
178#pragma mapbox: define highp vec4 color
179void main() {
180#pragma mapbox: initialize highp float base
181#pragma mapbox: initialize highp float height
182#pragma mapbox: initialize highp vec4 color
183vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float 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;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=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;}`),vr=Rt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
184#pragma mapbox: define lowp float base
185#pragma mapbox: define lowp float height
186#pragma mapbox: define lowp vec4 pattern_from
187#pragma mapbox: define lowp vec4 pattern_to
188#pragma mapbox: define lowp float pixel_ratio_from
189#pragma mapbox: define lowp float pixel_ratio_to
190void main() {
191#pragma mapbox: initialize lowp float base
192#pragma mapbox: initialize lowp float height
193#pragma mapbox: initialize mediump vec4 pattern_from
194#pragma mapbox: initialize mediump vec4 pattern_to
195#pragma mapbox: initialize lowp float pixel_ratio_from
196#pragma mapbox: initialize lowp float pixel_ratio_to
197vec2 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=texture2D(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=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
198#ifdef OVERDRAW_INSPECTOR
199gl_FragColor=vec4(1.0);
200#endif
201}`,`uniform mat4 u_matrix;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 vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
202#pragma mapbox: define lowp float base
203#pragma mapbox: define lowp float height
204#pragma mapbox: define lowp vec4 pattern_from
205#pragma mapbox: define lowp vec4 pattern_to
206#pragma mapbox: define lowp float pixel_ratio_from
207#pragma mapbox: define lowp float pixel_ratio_to
208void main() {
209#pragma mapbox: initialize lowp float base
210#pragma mapbox: initialize lowp float height
211#pragma mapbox: initialize mediump vec4 pat
211tern_from
212#pragma mapbox: initialize mediump vec4 pattern_to
213#pragma mapbox: initialize lowp float pixel_ratio_from
214#pragma mapbox: initialize lowp float pixel_ratio_to
215vec2 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;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
216? a_pos
217: vec2(edgedistance,z*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;}`),Vs=Rt(`#ifdef GL_ES
218precision highp float;
219#endif
220uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;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))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
221#ifdef OVERDRAW_INSPECTOR
222gl_FragColor=vec4(1.0);
223#endif
224}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying 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;}"),un=Rt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
225#define PI 3.141592653589793
226void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;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_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
227#ifdef OVERDRAW_INSPECTOR
228gl_FragColor=vec4(1.0);
229#endif
230}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),cn=Rt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
231#pragma mapbox: define highp vec4 color
232#pragma mapbox: define lowp float blur
233#pragma mapbox: define lowp float opacity
234void main() {
235#pragma mapbox: initialize highp vec4 color
236#pragma mapbox: initialize lowp float blur
237#pragma mapbox: initialize lowp float opacity
238float 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);gl_FragColor=color*(alpha*opacity);
239#ifdef OVERDRAW_INSPECTOR
240gl_FragColor=vec4(1.0);
241#endif
242}`,`
243#define scale 0.015873016
244attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
245#pragma mapbox: define highp vec4 color
246#pragma mapbox: define lowp float blur
247#pragma mapbox: define lowp float opacity
248#pragma mapbox: define mediump float gapwidth
249#pragma mapbox: define lowp float offset
250#pragma mapbox: define mediump float width
251void main() {
252#pragma mapbox: initialize highp vec4 color
253#pragma mapbox: initialize lowp float blur
254#pragma mapbox: initialize lowp float opacity
255#pragma mapbox: initialize mediump float gapwidth
256#pragma mapbox: initialize lowp float offset
257#pragma mapbox: initialize mediump float width
258float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Vn=Rt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
259#pragma mapbox: define lowp float blur
260#pragma mapbox: define lowp float opacity
261void main() {
262#pragma mapbox: initialize lowp float blur
263#pragma mapbox: initialize lowp float opacity
264float 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=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
265#ifdef OVERDRAW_INSPECTOR
266gl_FragColor=vec4(1.0);
267#endif
268}`,`
269#define scale 0.015873016
270attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
271#pragma mapbox: define lowp float blur
272#pragma mapbox: define lowp float opacity
273#pragma mapbox: define mediump float gapwidth
274#pragma mapbox: define lowp float offset
275#pragma mapbox: define mediump float width
276void main() {
277#pragma mapbox: initialize lowp float blur
278#pragma mapbox: initialize lowp float opacity
279#pragma mapbox: initialize mediump float gapwidth
280#pragma mapbox: initialize lowp float offset
281#pragma mapbox: initialize mediump float width
282float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Nn=Rt(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
283#pragma mapbox: define lowp vec4 pattern_from
284#pragma mapbox: define lowp vec4 pattern_to
285#pragma mapbox: define lowp float pixel_ratio_from
286#pragma mapbox: define lowp float pixel_ratio_to
287#pragma mapbox: define lowp float blur
288#pragma mapbox: define lowp float opacity
289void main() {
290#pragma mapbox: initialize mediump vec4 pattern_from
291#pragma mapbox: initialize mediump vec4 pattern_to
292#pragma mapbox: initialize lowp float pixel_ratio_from
293#pragma mapbox: initialize lowp float pixel_ratio_to
294#pragma mapbox: initialize lowp float blur
295#pragma mapbox: initialize lowp float opacity
296vec2 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(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
297#ifdef OVERDRAW_INSPECTOR
298gl_FragColor=vec4(1.0);
299#endif
300}`,`
301#define scale 0.015873016
302#define LINE_DISTANCE_SCALE 2.0
303attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
304#pragma mapbox: define lowp float blur
305#pragma mapbox: define lowp float opacity
306#pragma mapbox: define lowp float offset
307#pragma mapbox: define mediump float gapwidth
308#pragma mapbox: define mediump float width
309#pragma mapbox: define lowp float floorwidth
310#pragma mapbox: define lowp vec4 pattern_from
311#pragma mapbox: define lowp vec4 pattern_to
312#pragma mapbox: define lowp float pixel_ratio_from
313#pragma mapbox: define lowp float pixel_ratio_to
314void main() {
315#pragma mapbox: initialize lowp float blur
316#pragma mapbox: initialize lowp float opacity
317#pragma mapbox: initialize lowp float offset
318#pragma mapbox: initialize mediump float gapwidth
319#pragma mapbox: initialize mediump float width
320#pragma mapbox: initialize lowp float floorwidth
321#pragma mapbox: initialize mediump vec4 pattern_from
322#pragma mapbox: initialize mediump vec4 pattern_to
323#pragma mapbox: initialize lowp float pixel_ratio_from
324#pragma mapbox: initialize lowp float pixel_ratio_to
325float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),pn=Rt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
325uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
326#pragma mapbox: define highp vec4 color
327#pragma mapbox: define lowp float blur
328#pragma mapbox: define lowp float opacity
329#pragma mapbox: define mediump float width
330#pragma mapbox: define lowp float floorwidth
331void main() {
332#pragma mapbox: initialize highp vec4 color
333#pragma mapbox: initialize lowp float blur
334#pragma mapbox: initialize lowp float opacity
335#pragma mapbox: initialize mediump float width
336#pragma mapbox: initialize lowp float floorwidth
337float 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=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(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);gl_FragColor=color*(alpha*opacity);
338#ifdef OVERDRAW_INSPECTOR
339gl_FragColor=vec4(1.0);
340#endif
341}`,`
342#define scale 0.015873016
343#define LINE_DISTANCE_SCALE 2.0
344attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;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;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
345#pragma mapbox: define highp vec4 color
346#pragma mapbox: define lowp float blur
347#pragma mapbox: define lowp float opacity
348#pragma mapbox: define mediump float gapwidth
349#pragma mapbox: define lowp float offset
350#pragma mapbox: define mediump float width
351#pragma mapbox: define lowp float floorwidth
352void main() {
353#pragma mapbox: initialize highp vec4 color
354#pragma mapbox: initialize lowp float blur
355#pragma mapbox: initialize lowp float opacity
356#pragma mapbox: initialize mediump float gapwidth
357#pragma mapbox: initialize lowp float offset
358#pragma mapbox: initialize mediump float width
359#pragma mapbox: initialize lowp float floorwidth
360float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_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);}`),jn=Rt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying 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=texture2D(u_image0,v_pos0);vec4 color1=texture2D(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);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
361#ifdef OVERDRAW_INSPECTOR
362gl_FragColor=vec4(1.0);
363#endif
364}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),qn=Rt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
365#pragma mapbox: define lowp float opacity
366void main() {
367#pragma mapbox: initialize lowp float opacity
368lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
369#ifdef OVERDRAW_INSPECTOR
370gl_FragColor=vec4(1.0);
371#endif
372}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec2 v_tex;varying float v_fade_opacity;
373#pragma mapbox: define lowp float opacity
374void main() {
375#pragma mapbox: initialize lowp float opacity
376vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
377camera_to_anchor_distance/u_camera_to_center_distance :
378u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);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;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),hn=Rt(`#define SDF_PX 8.0
379uniform 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;varying vec2 v_data0;varying vec3 v_data1;
380#pragma mapbox: define highp vec4 fill_color
381#pragma mapbox: define highp vec4 halo_color
382#pragma mapbox: define lowp float opacity
383#pragma mapbox: define lowp float halo_width
384#pragma mapbox: define lowp float halo_blur
385void main() {
386#pragma mapbox: initialize highp vec4 fill_color
387#pragma mapbox: initialize highp vec4 halo_color
388#pragma mapbox: initialize lowp float opacity
389#pragma mapbox: initialize lowp float halo_width
390#pragma mapbox: initialize lowp float halo_blur
391float 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 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=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
392#ifdef OVERDRAW_INSPECTOR
393gl_FragColor=vec4(1.0);
394#endif
395}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec2 v_data0;varying vec3 v_data1;
396#pragma mapbox: define highp vec4 fill_color
397#pragma mapbox: define highp vec4 halo_color
398#pragma mapbox: define lowp float opacity
399#pragma mapbox: define lowp float halo_width
400#pragma mapbox: define lowp float halo_blur
401void main() {
402#pragma mapbox: initialize highp vec4 fill_color
403#pragma mapbox: initialize highp vec4 halo_color
404#pragma mapbox: initialize lowp float opacity
405#pragma mapbox: initialize lowp float halo_width
406#pragma mapbox: initialize lowp float halo_blur
407vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
408camera_to_anchor_distance/u_camera_to_center_distance :
409u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),Ul=Rt(`#define SDF_PX 8.0
410#define SDF 1.0
411#define ICON 0.0
412uniform 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;varying vec4 v_data0;varying vec4 v_data1;
413#pragma mapbox: define highp vec4 fill_color
414#pragma mapbox: define highp vec4 halo_color
415#pragma mapbox: define lowp float opacity
416#pragma mapbox: define lowp float halo_width
417#pragma mapbox: define lowp float halo_blur
418void main() {
419#pragma mapbox: initialize highp vec4 fill_color
420#pragma mapbox: initialize highp vec4 halo_color
421#pragma mapbox: initialize lowp float opacity
422#pragma mapbox: initialize lowp float halo_width
423#pragma mapbox: initialize lowp float halo_blur
424float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
424gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
425#ifdef OVERDRAW_INSPECTOR
426gl_FragColor=vec4(1.0);
427#endif
428return;}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=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
429#ifdef OVERDRAW_INSPECTOR
430gl_FragColor=vec4(1.0);
431#endif
432}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec4 v_data0;varying vec4 v_data1;
433#pragma mapbox: define highp vec4 fill_color
434#pragma mapbox: define highp vec4 halo_color
435#pragma mapbox: define lowp float opacity
436#pragma mapbox: define lowp float halo_width
437#pragma mapbox: define lowp float halo_blur
438void main() {
439#pragma mapbox: initialize highp vec4 fill_color
440#pragma mapbox: initialize highp vec4 halo_color
441#pragma mapbox: initialize lowp float opacity
442#pragma mapbox: initialize lowp float halo_width
443#pragma mapbox: initialize lowp float halo_blur
444vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
445camera_to_anchor_distance/u_camera_to_center_distance :
446u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,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);}`);function Rt(i,o){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,s=o.match(/attribute ([\w]+) ([\w]+)/g),p=i.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),f=o.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=f?f.concat(p):p,y={};return{fragmentSource:i=i.replace(n,(function(v,S,z,C,P){return y[P]=!0,S==="define"?`
447#ifndef HAS_UNIFORM_u_`+P+`
448varying `+z+" "+C+" "+P+`;
449#else
450uniform `+z+" "+C+" u_"+P+`;
451#endif
452`:`
453#ifdef HAS_UNIFORM_u_`+P+`
454    `+z+" "+C+" "+P+" = u_"+P+`;
455#endif
456`})),vertexSource:o=o.replace(n,(function(v,S,z,C,P){var O=C==="float"?"vec2":"vec4",B=P.match(/color/)?"color":O;return y[P]?S==="define"?`
457#ifndef HAS_UNIFORM_u_`+P+`
458uniform lowp float u_`+P+`_t;
459attribute `+z+" "+O+" a_"+P+`;
460varying `+z+" "+C+" "+P+`;
461#else
462uniform `+z+" "+C+" u_"+P+`;
463#endif
464`:B==="vec4"?`
465#ifndef HAS_UNIFORM_u_`+P+`
466    `+P+" = a_"+P+`;
467#else
468    `+z+" "+C+" "+P+" = u_"+P+`;
469#endif
470`:`
471#ifndef HAS_UNIFORM_u_`+P+`
472    `+P+" = unpack_mix_"+B+"(a_"+P+", u_"+P+`_t);
473#else
474    `+z+" "+C+" "+P+" = u_"+P+`;
475#endif
476`:S==="define"?`
477#ifndef HAS_UNIFORM_u_`+P+`
478uniform lowp float u_`+P+`_t;
479attribute `+z+" "+O+" a_"+P+`;
480#else
481uniform `+z+" "+C+" u_"+P+`;
482#endif
483`:B==="vec4"?`
484#ifndef HAS_UNIFORM_u_`+P+`
485    `+z+" "+C+" "+P+" = a_"+P+`;
486#else
487    `+z+" "+C+" "+P+" = u_"+P+`;
488#endif
489`:`
490#ifndef HAS_UNIFORM_u_`+P+`
491    `+z+" "+C+" "+P+" = unpack_mix_"+B+"(a_"+P+", u_"+P+`_t);
492#else
493    `+z+" "+C+" "+P+" = u_"+P+`;
494#endif
495`})),staticAttributes:s,staticUniforms:d}}var bo=Object.freeze({__proto__:null,prelude:Qt,background:Ra,backgroundPattern:Rl,circle:qu,clippingMask:Zu,heatmap:Bs,heatmapTexture:Fs,collisionBox:Os,collisionCircle:Us,debug:Bl,fill:Fl,fillOutline:Gu,fillOutlinePattern:Xo,fillPattern:Wo,fillExtrusion:Ol,fillExtrusionPattern:vr,hillshadePrepare:Vs,hillshade:un,line:cn,lineGradient:Vn,linePattern:Nn,lineSDF:pn,raster:jn,symbolIcon:qn,symbolSDF:hn,symbolTextAndIcon:Ul}),Ba=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Vl(i){for(var o=[],n=0;n<i.length;n++)if(i[n]!==null){var s=i[n].split(" ");o.push(s.pop())}return o}Ba.prototype.bind=function(i,o,n,s,p,f,d,y){this.context=i;for(var v=this.boundPaintVertexBuffers.length!==s.length,S=0;!v&&S<s.length;S++)this.boundPaintVertexBuffers[S]!==s[S]&&(v=!0);i.extVertexArrayObject&&this.vao&&this.boundProgram===o&&this.boundLayoutVertexBuffer===n&&!v&&this.boundIndexBuffer===p&&this.boundVertexOffset===f&&this.boundDynamicVertexBuffer===d&&this.boundDynamicVertexBuffer2===y?(i.bindVertexArrayOES.set(this.vao),d&&d.bind(),p&&p.dynamicDraw&&p.bind(),y&&y.bind()):this.freshBind(o,n,s,p,f,d,y)}
vendor: 11,368 bytes, lines 495-497
495,Ba.prototype.freshBind=function(i,o,n,s,p,f,d){var y,v=i.numAttributes,S=this.context,z=S.gl;if(S.extVertexArrayObject)this.vao&&this.destroy(),this.vao=S.extVertexArrayObject.createVertexArrayOES(),S.bindVertexArrayOES.set(this.vao),y=0,this.boundProgram=i,this.boundLayoutVertexBuffer=o,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=s,this.boundVertexOffset=p,this.boundDynamicVertexBuffer=f,this.boundDynamicVertexBuffer2=d;else{y=S.currentNumAttributes||0;for(var C=v;C<y;C++)z.disableVertexAttribArray(C)}o.enableAttributes(z,i);for(var P=0,O=n;P<O.length;P+=1)O[P].enableAttributes(z,i);f&&f.enableAttributes(z,i),d&&d.enableAttributes(z,i),o.bind(),o.setVertexAttribPointers(z,i,p);for(var B=0,j=n;B<j.length;B+=1){var R=j[B];R.bind(),R.setVertexAttribPointers(z,i,p)}f&&(f.bind(),f.setVertexAttribPointers(z,i,p)),s&&s.bind(),d&&(d.bind(),d.setVertexAttribPointers(z,i,p)),S.currentNumAttributes=v},Ba.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Nl=function(i,o,n,s,p,f){var d=i.gl;this.program=d.createProgram();for(var y=Vl(n.staticAttributes),v=s?s.getBinderAttributes():[],S=y.concat(v),z=n.staticUniforms?Vl(n.staticUniforms):[],C=s?s.getBinderUniforms():[],P=[],O=0,B=z.concat(C);O<B.length;O+=1){var j=B[O];P.indexOf(j)<0&&P.push(j)}var R=s?s.defines():[];f&&R.push("#define OVERDRAW_INSPECTOR;");var N=R.concat(Qt.fragmentSource,n.fragmentSource).join(`
496`),X=R.concat(Qt.vertexSource,n.vertexSource).join(`
497`),H=d.createShader(d.FRAGMENT_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(H,N),d.compileShader(H),d.attachShader(this.program,H);var te=d.createShader(d.VERTEX_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(te,X),d.compileShader(te),d.attachShader(this.program,te),this.attributes={};var ee={};this.numAttributes=S.length;for(var re=0;re<this.numAttributes;re++)S[re]&&(d.bindAttribLocation(this.program,re,S[re]),this.attributes[S[re]]=re);d.linkProgram(this.program),d.deleteShader(te),d.deleteShader(H);for(var ne=0;ne<P.length;ne++){var he=P[ne];if(he&&!ee[he]){var ce=d.getUniformLocation(this.program,he);ce&&(ee[he]=ce)}}this.fixedUniforms=p(i,ee),this.binderUniforms=s?s.getUniforms(i,ee):[]}}};function jl(i,o,n){var s=1/Br(n,1,o.transform.tileZoom),p=Math.pow(2,n.tileID.overscaledZ),f=n.tileSize*Math.pow(2,o.transform.tileZoom)/p,d=f*(n.tileID.canonical.x+n.tileID.wrap*p),y=f*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[s,i.fromScale,i.toScale],u_fade:i.t,u_pixel_coord_upper:[d>>16,y>>16],u_pixel_coord_lower:[65535&d,65535&y]}}Nl.prototype.draw=function(i,o,n,s,p,f,d,y,v,S,z,C,P,O,B,j){var R,N=i.gl;if(!this.failedToCreate){for(var X in i.program.set(this.program),i.setDepthMode(n),i.setStencilMode(s),i.setColorMode(p),i.setCullFace(f),this.fixedUniforms)this.fixedUniforms[X].set(d[X]);O&&O.setUniforms(i,this.binderUniforms,C,{zoom:P});for(var H=(R={},R[N.LINES]=2,R[N.TRIANGLES]=3,R[N.LINE_STRIP]=1,R)[o],te=0,ee=z.get();te<ee.length;te+=1){var re=ee[te],ne=re.vaos||(re.vaos={});(ne[y]||(ne[y]=new Ba)).bind(i,this,v,O?O.getPaintVertexBuffers():[],S,re.vertexOffset,B,j),N.drawElements(o,re.primitiveLength*H,N.UNSIGNED_SHORT,re.primitiveOffset*H*2)}}};var ql=function(i,o,n,s){var p=o.style.light,f=p.properties.get("position"),d=[f.x,f.y,f.z],y=u.create$1();p.properties.get("anchor")==="viewport"&&u.fromRotation(y,-o.transform.angle),u.transformMat3(d,d,y);var v=p.properties.get("color");return{u_matrix:i,u_lightpos:d,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[v.r,v.g,v.b],u_vertical_gradient:+n,u_opacity:s}},Xu=function(i,o,n,s,p,f,d){return u.extend(ql(i,o,n,s),jl(f,o,d),{u_height_factor:-Math.pow(2,p.overscaledZ)/d.tileSize/8})},fn=function(i){return{u_matrix:i}},dn=function(i,o,n,s){return u.extend(fn(i),jl(n,o,s))},wo=function(i,o){return{u_matrix:i,u_world:o}},Zl=function(i,o,n,s,p){return u.extend(dn(i,o,n,s),{u_world:p})},Gl=function(i,o,n,s){var p,f,d=i.transform;if(s.paint.get("circle-pitch-alignment")==="map"){var y=Br(n,1,d.zoom);p=!0,f=[y,y]}else p=!1,f=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(s.paint.get("circle-pitch-scale")==="map"),u_matrix:i.translatePosMatrix(o.posMatrix,n,s.paint.get("circle-translate"),s.paint.get("circle-translate-anchor")),u_pitch_with_map:+p,u_device_pixel_ratio:u.browser.devicePixelRatio,u_extrude_scale:f}},Ns=function(i,o,n){var s=Br(n,1,o.zoom),p=Math.pow(2,o.zoom-n.tileID.overscaledZ),f=n.tileID.overscaleFactor();return{u_matrix:i,u_camera_to_center_distance:o.cameraToCenterDistance,u_pixels_to_tile_units:s,u_extrude_scale:[o.pixelsToGLUnits[0]/(s*p),o.pixelsToGLUnits[1]/(s*p)],u_overscale_factor:f}},Zn=function(i,o,n){return{u_matrix:i,u_inv_matrix:o,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}},js=function(i,o,n){return n===void 0&&(n=1),{u_matrix:i,u_color:o,u_overlay:0,u_overlay_scale:n}},Gn=function(i){return{u_matrix:i}},So=function(i,o,n,s){return{u_matrix:i,u_extrude_scale:Br(o,1,n),u_intensity:s}},Fa=function(i,o,n){var s=i.transform;return{u_matrix:To(i,o,n),u_ratio:1/Br(o,1,s.zoom),u_device_pixel_ratio:u.browser.devicePixelRatio,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]]}},qs=function(i,o,n,s){return u.extend(Fa(i,o,n),{u_image:0,u_image_height:s})},zt=function(i,o,n,s){var p=i.transform,f=Xl(o,p);return{u_matrix:To(i,o,n),u_texsize:o.imageAtlasTexture.size,u_ratio:1/Br(o,1,p.zoom),u_device_pixel_ratio:u.browser.devicePixelRatio,u_image:0,u_scale:[f,s.fromScale,s.toScale],u_fade:s.t,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},Oa=function(i,o,n,s,p){var f=i.lineAtlas,d=Xl(o,i.transform),y=n.layout.get("line-cap")==="round",v=f.getDash(s.from,y),S=f.getDash(s.to,y),z=v.width*p.fromScale,C=S.width*p.toScale;return u.extend(Fa(i,o,n),{u_patternscale_a:[d/z,-v.height/2],u_patternscale_b:[d/C,-S.height/2],u_sdfgamma:f.width/(256*Math.min(z,C)*u.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:v.y,u_tex_y_b:S.y,u_mix:p.t})};function Xl(i,o){return 1/Br(i,1,o.tileZoom)}function To(i,o,n){return i.translatePosMatrix(o.tileID.posMatrix,o,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var Wu=function(i,o,n,s,p){return{u_matrix:i,u_tl_parent:o,u_scale_parent:n,u_buffer_scale:1,u_fade_t:s.mix,u_opacity:s.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(d=p.paint.get("raster-saturation"),d>0?1-1/(1.001-d):-d),u_contrast_factor:(f=p.paint.get("raster-contrast"),f>0?1/(1-f):1+f),u_spin_weights:Ku(p.paint.get("raster-hue-rotate"))};var f,d};function Ku(i){i*=Math.PI/180;var o=Math.sin(i),n=Math.cos(i);return[(2*n+1)/3,(-Math.sqrt(3)*o-n+1)/3,(Math.sqrt(3)*o-n+1)/3]}var Ko,Wl=function(i,o,n,s,p,f,d,y,v,S){var z=p.transform;return{u_is_size_zoom_constant:+(i==="constant"||i==="source"),u_is_size_feature_constant:+(i==="constant"||i==="camera"),u_size_t:o?o.uSizeT:0,u_size:o?o.uSize:0,u_camera_to_center_distance:z.cameraToCenterDistance,u_pitch:z.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:z.width/z.height,u_fade_change:p.options.fadeDuration?p.symbolFadeChange:1,u_matrix:f,u_label_plane_matrix:d,u_coord_matrix:y,u_is_text:+v,u_pitch_with_map:+s,u_texsize:S,u_texture:0}},Eo=function(i,o,n,s,p,f,d,y,v,S,z){var C=p.transform;return u.extend(Wl(i,o,n,s,p,f,d,y,v,S),{u_gamma_scale:s?Math.cos(C._pitch)*C.cameraToCenterDistance:1,u_device_pixel_ratio:u.browser.devicePixelRatio,u_is_halo:1})},Ua=function(i,o,n,s,p,f,d,y,v,S){return u.extend(Eo(i,o,n,s,p,f,d,y,!0,v),{u_texsize_icon:S,u_texture_icon:1})},Va=function(i,o,n){return{u_matrix:i,u_opacity:o,u_color:n}},Ho=function(i,o,n,s,p,f){return u.extend((function(d,y,v,S){var z=v.imageManager.getPattern(d.from.toString()),C=v.imageManager.getPattern(d.to.toString()),P=v.imageManager.getPixelSize(),O=P.width,B=P.height,j=Math.pow(2,S.tileID.overscaledZ),R=S.tileSize*Math.pow(2,v.transform.tileZoom)/j,N=R*(S.tileID.canonical.x+S.tileID.wrap*j),X=R*S.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:z.tl,u_pattern_br_a:z.br,u_pattern_tl_b:C.tl,u_pattern_br_b:C.br,u_texsize:[O,B],u_mix:y.t,u_pattern_size_a:z.displaySize,u_pattern_size_b:C.displaySize,u_scale_a:y.fromScale,u_scale_b:y.toScale,u_tile_units_to_pixels:1/Br(S,1,v.transform.tileZoom),u_pixel_coord_upper:[N>>16,X>>16],u_pixel_coord_lower:[65535&N,65535&X]}})(s,f,n,p),{u_matrix:i,u_opacity:o})},Io={fillExtrusion:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_lightpos:new u.Uniform3f(i,o.u_lightpos),u_lightintensity:new u.Uniform1f(i,o.u_lightintensity),u_lightcolor:new u.Uniform3f(i,o.u_lightcolor),u_vertical_gradient:new u.Uniform1f(i,o.u_vertical_gradient),u_opacity:new u.Uniform1f(i,o.u_opacity)}},fillExtrusionPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_lightpos:new u.Uniform3f(i,o.u_lightpos),u_lightintensity:new u.Uniform1f(i,o.u_lightintensity),u_lightcolor:new u.Uniform3f(i,o.u_lightcolor),u_vertical_gradient:new u.Uniform1f(i,o.u_vertical_gradient),u_height_factor:new u.Uniform1f(i,o.u_height_factor),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade),u_opacity:new u.Uniform1f(i,o.u_opacity)}},fill:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},fillPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},fillOutline:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world)}},fillOutlinePattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},circle:function(i,o){return{u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_scale_with_map:new u.Uniform1i(i,o.u_scale_with_map),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_extrude_scale:new u.Uniform2f(i,o.u_extrude_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},collisionBox:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pixels_to_tile_units:new u.Uniform1f(i,o.u_pixels_to_tile_units),u_extrude_scale:new u.Uniform2f(i,o.u_extrude_scale),u_overscale_factor:new u.Uniform1f(i,o.u_overscale_factor)}},collisionCircle:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_inv_matrix:new u.UniformMatrix4f(i,o.u_inv_matrix
497),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_viewport_size:new u.Uniform2f(i,o.u_viewport_size)}},debug:function(i,o){return{u_color:new u.UniformColor(i,o.u_color),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_overlay:new u.Uniform1i(i,o.u_overlay),u_overlay_scale:new u.Uniform1f(i,o.u_overlay_scale)}},clippingMask:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},heatmap:function(i,o){return{u_extrude_scale:new u.Uniform1f(i,o.u_extrude_scale),u_intensity:new u.Uniform1f(i,o.u_intensity),u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},heatmapTexture:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world),u_image:new u.Uniform1i(i,o.u_image),u_color_ramp:new u.Uniform1i(i,o.u_color_ramp),u_opacity:new u.Uniform1f(i,o.u_opacity)}},hillshade:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_latrange:new u.Uniform2f(i,o.u_latrange),u_light:new u.Uniform2f(i,o.u_light),u_shadow:new u.UniformColor(i,o.u_shadow),u_highlight:new u.UniformColor(i,o.u_highlight),u_accent:new u.UniformColor(i,o.u_accent)}},hillshadePrepare:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_dimension:new u.Uniform2f(i,o.u_dimension),u_zoom:new u.Uniform1f(i,o.u_zoom),u_unpack:new u.Uniform4f(i,o.u_unpack)}},line:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels)}},lineGradient:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_image:new u.Uniform1i(i,o.u_image),u_image_height:new u.Uniform1f(i,o.u_image_height)}},linePattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_texsize:new u.Uniform2f(i,o.u_texsize),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_image:new u.Uniform1i(i,o.u_image),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},lineSDF:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_patternscale_a:new u.Uniform2f(i,o.u_patternscale_a),u_patternscale_b:new u.Uniform2f(i,o.u_patternscale_b),u_sdfgamma:new u.Uniform1f(i,o.u_sdfgamma),u_image:new u.Uniform1i(i,o.u_image),u_tex_y_a:new u.Uniform1f(i,o.u_tex_y_a),u_tex_y_b:new u.Uniform1f(i,o.u_tex_y_b),u_mix:new u.Uniform1f(i,o.u_mix)}},raster:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_tl_parent:new u.Uniform2f(i,o.u_tl_parent),u_scale_parent:new u.Uniform1f(i,o.u_scale_parent),u_buffer_scale:new u.Uniform1f(i,o.u_buffer_scale),u_fade_t:new u.Uniform1f(i,o.u_fade_t),u_opacity:new u.Uniform1f(i,o.u_opacity),u_image0:new u.Uniform1i(i,o.u_image0),u_image1:new u.Uniform1i(i,o.u_image1),u_brightness_low:new u.Uniform1f(i,o.u_brightness_low),u_brightness_high:new u.Uniform1f(i,o.u_brightness_high),u_saturation_factor:new u.Uniform1f(i,o.u_saturation_factor),u_contrast_factor:new u.Uniform1f(i,o.u_contrast_factor),u_spin_weights:new u.Uniform3f(i,o.u_spin_weights)}},symbolIcon:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix
vendor: 4,332 bytes, line 497
497),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texture:new u.Uniform1i(i,o.u_texture)}},symbolSDF:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texture:new u.Uniform1i(i,o.u_texture),u_gamma_scale:new u.Uniform1f(i,o.u_gamma_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_is_halo:new u.Uniform1i(i,o.u_is_halo)}},symbolTextAndIcon:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texsize_icon:new u.Uniform2f(i,o.u_texsize_icon),u_texture:new u.Uniform1i(i,o.u_texture),u_texture_icon:new u.Uniform1i(i,o.u_texture_icon),u_gamma_scale:new u.Uniform1f(i,o.u_gamma_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_is_halo:new u.Uniform1i(i,o.u_is_halo)}},background:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_opacity:new u.Uniform1f(i,o.u_opacity),u_color:new u.UniformColor(i,o.u_color)}},backgroundPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_opacity:new u.Uniform1f(i,o.u_opacity),u_image:new u.Uniform1i(i,o.u_image),u_pattern_tl_a:new u.Uniform2f(i,o.u_pattern_tl_a),u_pattern_br_a:new u.Uniform2f(i,o.u_pattern_br_a),u_pattern_tl_b:new u.Uniform2f(i,o.u_pattern_tl_b),u_pattern_br_b:new u.Uniform2f(i,o.u_pattern_br_b),u_texsize:new u.Uniform2f(i,o.u_texsize),u_mix:new u.Uniform1f(i,o.u_mix),u_pattern_size_a:new u.Uniform2f(i,o.u_pattern_size_a),u_pattern_size_b:new u.Uniform2f(i,o.u_pattern_size_b),u_scale_a:new u.Uniform1f(i,o.u_scale_a),u_scale_b:new u.Uniform1f(i,o.u_scale_b),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_tile_units_to_pixels:new u.Uniform1f(i,o.u_tile_units_to_pixels)}}};function Zs(i,o,n,s,p,f,d){for(var y=i.context,v=y.gl,S=i.useProgram("collisionBox"),z=[],C=0,P=0,O=0;O<s.length;O++){var B=s[O],j=o.getTile(B),R=j.getBucket(n);if(R){var N=B.posMatrix;p[0]===0&&p[1]===0||(N=i.translatePosMatrix(B.posMatrix,j,p,f));var X=d?R.textCollisionBox:R.iconCollisionBox,H=R.collisionCircleArray;if(H.length>0){var te=u.create(),ee=N;u.mul(te,R.placementInvProjMatrix,i.transform.glCoordMatrix),u.mul(te,te,R.placementViewportMatrix),z.push({circleArray:H,circleOffset:P,transform:ee,invTransform:te}),P=C+=H.length/4}X&&S.draw(y,v.LINES,k.disabled,F.disabled,i.colorModeForRenderPass(),W.disabled,Ns(N,i.transform,j),n.id,X.layoutVertexBuffer,X.indexBuffer,X.segments,null,i.transform.zoom,null,null,X.collisionVertexBuffer)}}if(d&&z.length){var re=i.useProgram("collisionCircle"),ne=new u.StructArrayLayout2f1f2i16;ne.resize(4*C),ne._trim();for(var he=0,ce=0,ve=z;ce<ve.length;ce+=1)for(var Me=ve[ce],Re=0;Re<Me.circleArray.length/4;
497Re++){var De=4*Re,st=Me.circleArray[De+0],Ee=Me.circleArray[De+1],Ze=Me.circleArray[De+2],Ye=Me.circleArray[De+3];ne.emplace(he++,st,Ee,Ze,Ye,0),ne.emplace(he++,st,Ee,Ze,Ye,1),ne.emplace(he++,st,Ee,Ze,Ye,2),ne.emplace(he++,st,Ee,Ze,Ye,3)}(!Ko||Ko.length<2*C)&&(Ko=(function(Wt){var zr=2*Wt,sr=new u.StructArrayLayout3ui6;sr.resize(zr),sr._trim();for(var lr=0;lr<zr;lr++){var Kt=6*lr;sr.uint16[Kt+0]=4*lr+0,sr.uint16[Kt+1]=4*lr+1,sr.uint16[Kt+2]=4*lr+2,sr.uint16[Kt+3]=4*lr+2,sr.uint16[Kt+4]=4*lr+3,sr.uint16[Kt+5]=4*lr+0}return sr})(C));for(var Ge=y.createIndexBuffer(Ko,!0),je=y.createVertexBuffer(ne,u.collisionCircleLayout.members,!0),Ne=0,Ve=z;Ne<Ve.length;Ne+=1){var Be=Ve[Ne],bt=Zn(Be.transform,Be.invTransform,i.transform);re.draw(y,v.TRIANGLES,k.disabled,F.disabled,i.colorModeForRenderPass(),W.disabled,bt,n.id,je,Ge,u.SegmentVector.simpleSegment(0,2*Be.circleOffset,Be.circleArray.length,Be.circleArray.length/2),null,i.transform.zoom,null,null,null)}je.destroy(),Ge.destroy()}}var Jo=u.identity(new Float32Array(16));function Pi(i,o,n,s,p,f){var d=u.getAnchorAlignment(i),y=-(d.horizontalAlign-.5)*o,v=-(d.verticalAlign-.5)*n,S=u.evaluateVariableOffset(i,s);return new u.Point((y/p+S[0])*f,(v/p+S[1])*f)}function Kl(i,o,n,s,p,f,d,y,v,S,z){var C=i.text.placedSymbolArray,P=i.text.dynamicLayoutVertexArray,O=i.icon.dynamicLayoutVertexArray,B={};P.clear();for(var j=0;j<C.length;j++){var R=C.get(j),N=R.hidden||!R.crossTileID||i.allowVerticalPlacement&&!R.placedOrientation?null:s[R.crossTileID];if(N){var X=new u.Point(R.anchorX,R.anchorY),H=$e(X,n?y:d),te=vo(f.cameraToCenterDistance,H.signedDistanceFromCamera),ee=p.evaluateSizeForFeature(i.textSizeData,S,R)*te/u.ONE_EM;n&&(ee*=i.tilePixelRatio/v);for(var re=Pi(N.anchor,N.width,N.height,N.textOffset,N.textBoxScale,ee),ne=n?$e(X.add(re),d).point:H.point.add(o?re.rotate(-f.angle):re),he=i.allowVerticalPlacement&&R.placedOrientation===u.WritingMode.vertical?Math.PI/2:0,ce=0;ce<R.numGlyphs;ce++)u.addDynamicAttributes(P,ne,he);z&&R.associatedIconIndex>=0&&(B[R.associatedIconIndex]={shiftedAnchor:ne,angle:he})}else Li(R.numGlyphs,P)}if(z){O.clear();for(var ve=i.icon.placedSymbolArray,Me=0;Me<ve.length;Me++){var Re=ve.get(Me);if(Re.hidden)Li(Re.numGlyphs,O);else{var De=B[Me];if(De)for(var st=0;st<Re.numGlyphs;st++)u.addDynamicAttributes(O,De.shiftedAnchor,De.angle);else Li(Re.numGlyphs,O)}}i.icon.dynamicLayoutVertexBuffer.updateData(O)}i.text.dynamicLayoutVertexBuffer.updateData(P)}function Hl(i,o,n){return n.iconsInText&&o?"symbolTextAndIcon":i?"symbolSDF":"symbolIcon"}function Gs(i,o,n,s,p,f,d,y,v,S,z,C){for(var P=i.context,O=P.gl,B=i.transform,j=y==="map",R=v==="map",N=j&&n.layout.get("symbol-placement")!=="point",X=j&&!R&&!N,H=!n.layout.get("symbol-sort-key").isConstant(),te=!1,ee=i.depthModeForSublayer(0,k.ReadOnly),re=n.layout.get("text-variable-anchor"),ne=[],he=0,ce=s;he<ce.length;he+=1){var ve=ce[he],Me=o.getTile(ve),Re=Me.getBucket(n);if(Re){var De=p?Re.text:Re.icon;if(De&&De.segments.get().length){var st=De.programConfigurations.get(n.id),Ee=p||Re.sdfIcons,Ze=p?Re.textSizeData:Re.iconSizeData,Ye=R||B.pitch!==0,Ge=i.useProgram(Hl(Ee,p,Re),st),je=u.evaluateSizeForZoom(Ze,B.zoom),Ne=void 0,Ve=[0,0],Be=void 0,bt=void 0,Wt=null,zr=void 0;if(p)Be=Me.glyphAtlasTexture,bt=O.LINEAR,Ne=Me.glyphAtlasTexture.size,Re.iconsInText&&(Ve=Me.imageAtlasTexture.size,Wt=Me.imageAtlasTexture,zr=Ye||i.options.rotating||i.options.zooming||Ze.kind==="composite"||Ze.kind==="camera"?O.LINEAR:O.NEAREST);else{var sr=n.layout.get("icon-size").constantOr(0)!==1||Re.iconsNeedLinear;Be=Me.imageAtlasTexture,bt=Ee||i.options.rotating||i.options.zooming||sr||Ye?O.LINEAR:O.NEAREST,Ne=Me.imageAtlasTexture.size}var lr=Br(Me,1,i.transform.zoom),Kt=Nt(ve.posMatrix,R,j,i.transform,lr),wr=It(ve.posMatrix,R,j,i.transform,lr),Fi=re&&Re.hasTextData(),Pr=n.layout.get("icon-text-fit")!=="none"&&Fi&&Re.hasIconData();N&&Fn(Re,ve.posMatrix,i,p,Kt,wr,R,S);var Cr=i.translatePosMatrix(ve.posMatrix,Me,f,d),Oi=N||p&&re||Pr?Jo:Kt,ai=i.translatePosMatrix(wr,Me,f,d,!0),nl=Ee&&n.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0,xn={program:Ge,buffers:De,uniformValues:Ee?Re.iconsInText?Ua(Ze.kind,je,X,R,i,Cr,Oi,ai,Ne,Ve):Eo(Ze.kind,je,X,R,i,Cr,Oi,ai,p,Ne):Wl(Ze.kind,je,X,R,i,Cr,Oi,ai,p,Ne),atlasTexture:Be,atlasTextureIcon:Wt,atlasInterpolation:bt,atlasInterpolationIcon:zr,isSDF:Ee,hasHalo:nl};if(H&&Re.canOverlap){te=!0;for(var Co=0,Qn=De.segments.get();Co<Qn.length;Co+=1){var ua=Qn[Co];ne.push({segments:new u.SegmentVector([ua]),sortKey:ua.sortKey,state:xn})}}else ne.push({segments:De.segments,sortKey:0,state:xn})}}}te&&ne.sort((function(ki,eo){return ki.sortKey-eo.sortKey}
vendor: 6,137 bytes, line 497
497));for(var ko=0,Ui=ne;ko<Ui.length;ko+=1){var Mo=Ui[ko],rr=Mo.state;if(P.activeTexture.set(O.TEXTURE0),rr.atlasTexture.bind(rr.atlasInterpolation,O.CLAMP_TO_EDGE),rr.atlasTextureIcon&&(P.activeTexture.set(O.TEXTURE1),rr.atlasTextureIcon&&rr.atlasTextureIcon.bind(rr.atlasInterpolationIcon,O.CLAMP_TO_EDGE)),rr.isSDF){var Yi=rr.uniformValues;rr.hasHalo&&(Yi.u_is_halo=1,Xn(rr.buffers,Mo.segments,n,i,rr.program,ee,z,C,Yi)),Yi.u_is_halo=0}Xn(rr.buffers,Mo.segments,n,i,rr.program,ee,z,C,rr.uniformValues)}}function Xn(i,o,n,s,p,f,d,y,v){var S=s.context;p.draw(S,S.gl.TRIANGLES,f,d,y,W.disabled,v,n.id,i.layoutVertexBuffer,i.indexBuffer,o,n.paint,s.transform.zoom,i.programConfigurations.get(n.id),i.dynamicLayoutVertexBuffer,i.opacityVertexBuffer)}function Yo(i,o,n,s,p,f,d){var y,v,S,z,C,P=i.context.gl,O=n.paint.get("fill-pattern"),B=O&&O.constantOr(1),j=n.getCrossfadeParameters();d?(v=B&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",y=P.LINES):(v=B?"fillPattern":"fill",y=P.TRIANGLES);for(var R=0,N=s;R<N.length;R+=1){var X=N[R],H=o.getTile(X);if(!B||H.patternsLoaded()){var te=H.getBucket(n);if(te){var ee=te.programConfigurations.get(n.id),re=i.useProgram(v,ee);B&&(i.context.activeTexture.set(P.TEXTURE0),H.imageAtlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE),ee.updatePaintBuffers(j));var ne=O.constantOr(null);if(ne&&H.imageAtlas){var he=H.imageAtlas,ce=he.patternPositions[ne.to.toString()],ve=he.patternPositions[ne.from.toString()];ce&&ve&&ee.setConstantPatternPositions(ce,ve)}var Me=i.translatePosMatrix(X.posMatrix,H,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(d){z=te.indexBuffer2,C=te.segments2;var Re=[P.drawingBufferWidth,P.drawingBufferHeight];S=v==="fillOutlinePattern"&&B?Zl(Me,i,j,H,Re):wo(Me,Re)}else z=te.indexBuffer,C=te.segments,S=B?dn(Me,i,j,H):fn(Me);re.draw(i.context,y,p,i.stencilModeForClipping(X),f,W.disabled,S,n.id,te.layoutVertexBuffer,z,C,n.paint,i.transform.zoom,ee)}}}}function $o(i,o,n,s,p,f,d){for(var y=i.context,v=y.gl,S=n.paint.get("fill-extrusion-pattern"),z=S.constantOr(1),C=n.getCrossfadeParameters(),P=n.paint.get("fill-extrusion-opacity"),O=0,B=s;O<B.length;O+=1){var j=B[O],R=o.getTile(j),N=R.getBucket(n);if(N){var X=N.programConfigurations.get(n.id),H=i.useProgram(z?"fillExtrusionPattern":"fillExtrusion",X);z&&(i.context.activeTexture.set(v.TEXTURE0),R.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),X.updatePaintBuffers(C));var te=S.constantOr(null);if(te&&R.imageAtlas){var ee=R.imageAtlas,re=ee.patternPositions[te.to.toString()],ne=ee.patternPositions[te.from.toString()];re&&ne&&X.setConstantPatternPositions(re,ne)}var he=i.translatePosMatrix(j.posMatrix,R,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),ce=n.paint.get("fill-extrusion-vertical-gradient"),ve=z?Xu(he,i,ce,P,j,C,R):ql(he,i,ce,P);H.draw(y,y.gl.TRIANGLES,p,f,d,W.backCCW,ve,n.id,N.layoutVertexBuffer,N.indexBuffer,N.segments,n.paint,i.transform.zoom,X)}}}function Hu(i,o,n,s,p,f){var d=i.context,y=d.gl,v=o.fbo;if(v){var S=i.useProgram("hillshade");d.activeTexture.set(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.colorAttachment.get());var z=(function(C,P,O){var B=O.paint.get("hillshade-shadow-color"),j=O.paint.get("hillshade-highlight-color"),R=O.paint.get("hillshade-accent-color"),N=O.paint.get("hillshade-illumination-direction")*(Math.PI/180);O.paint.get("hillshade-illumination-anchor")==="viewport"&&(N-=C.transform.angle);var X,H,te,ee=!C.options.moving;return{u_matrix:C.transform.calculatePosMatrix(P.tileID.toUnwrapped(),ee),u_image:0,u_latrange:(X=P.tileID,H=Math.pow(2,X.canonical.z),te=X.canonical.y,[new u.MercatorCoordinate(0,te/H).toLngLat().lat,new u.MercatorCoordinate(0,(te+1)/H).toLngLat().lat]),u_light:[O.paint.get("hillshade-exaggeration"),N],u_shadow:B,u_highlight:j,u_accent:R}})(i,o,n);S.draw(d,y.TRIANGLES,s,p,f,W.disabled,z,n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments)}}function Na(i,o,n,s,p,f){var d=i.context,y=d.gl,v=o.dem;if(v&&v.data){var S=v.dim,z=v.stride,C=v.getPixels();if(d.activeTexture.set(y.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),o.demTexture=o.demTexture||i.getTileTexture(z),o.demTexture){var P=o.demTexture;P.update(C,{premultiply:!1}),P.bind(y.NEAREST,y.CLAMP_TO_EDGE)}else o.demTexture=new u.Texture(d,C,y.RGBA,{premultiply:!1}),o.demTexture.bind(y.NEAREST,y.CLAMP_TO_EDGE);d.activeTexture.set(y.TEXTURE0);var O=o.fbo;if(!O){var B=new u.Texture(d,{width:S,height:S,data:null},y.RGBA);B.bind(y.LINEAR,y.CLAMP_TO_EDGE),(O=o.fbo=d.createFramebuffer(S,S,!0)).colorAttachment.set(B.texture)}d.bindFramebuffer.set(O.framebuffer),d.viewport.set([0,0,S,S]),i.useProgram("hillshadePrepare").draw(d,y.TRIANGLES,s,p,f,W.disabled,(function(j,R){var N=R.stride,X=u.create();return u.ortho(X,0,u.EXTENT,-u.EXTENT,0,0,1),u.translate(X,X,[0,-u.EXTENT,0]),{u_matrix:X,u_image:1,u_dimension:[N,N],u_zoom:j.overscaledZ,u_unpack:R.getUnpackVector()}})(o.tileID,v),n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments),o.needsHillshadePrepare=!1}}function Ju(i,o,n,s,p){var f=s.paint.get("raster-fade-duration");if(f>0){var d=u.browser.now(),y=(d-i.timeAdded)/f,v=o?(d-o.timeAdded)/f:-1,S=n.getSource(),z=p.coveringZoomLevel({tileSize:S.tileSize,roundZoom:S.roundZoom}),C=!o||Math.abs(o.tileID.overscaledZ-z)>Math.abs(i.tileID.overscaledZ-z),P=C&&i.refreshedUponExpiration?1:u.clamp(C?y:1-v,0,1);return i.refreshedUponExpiration&&y>=1&&(i.refreshedUponExpiration=!1),o?{opacity:1,mix:1-P}:{opacity:P,mix:0}}return{opacity:1,mix:0}}var ja=new u.Color(1,0,0,1),Xs=new u.Color(0,1,0,1),Jl=new u.Color(0,0,1,1),Yl=new u.Color(1,0,1,1),qa=new u.Color(0,1,1,1);function Za(i,o,n,s){Qo(i,0,o+n/2,i.transform.width,n,s)}function Ws(i,o,n,s){Qo(i,o-n/2,0,n,i.transform.height,s)}function Qo(i,o,n,s,p,f){var d=i.context,y=d.gl;y.enable(y.SCISSOR_TEST),y.scissor(o*u.browser.devicePixelRatio,n*u.browser.devicePixelRatio,s*u.browser.devicePixelRatio,p*u.browser.devicePixelRatio),d.clear({color:f}),y.disable(y.SCISSOR_TEST)}function $l(i,o,n){var s=i.context,p=s.gl,f=n.posMatrix,d=i.useProgram("debug"),y=k.disabled,v=F.disabled,S=i.
497colorModeForRenderPass();s.activeTexture.set(p.TEXTURE0),i.emptyTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),d.draw(s,p.LINE_STRIP,y,v,S,W.disabled,js(f,u.Color.red),"$debug",i.debugBuffer,i.tileBorderIndexBuffer,i.debugSegments);var z=o.getTileByID(n.key).latestRawTileData,C=Math.floor((z&&z.byteLength||0)/1024),P=o.getTile(n).tileSize,O=512/Math.min(P,512)*(n.overscaledZ/i.transform.zoom)*.5,B=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(B+=" => "+n.overscaledZ),(function(j,R){j.initDebugOverlayCanvas();var N=j.debugOverlayCanvas,X=j.context.gl,H=j.debugOverlayCanvas.getContext("2d");H.clearRect(0,0,N.width,N.height),H.shadowColor="white",H.shadowBlur=2,H.lineWidth=1.5,H.strokeStyle="white",H.textBaseline="top",H.font="bold 36px Open Sans, sans-serif",H.fillText(R,5,5),H.strokeText(R,5,5),j.debugOverlayTexture.update(N),j.debugOverlayTexture.bind(X.LINEAR,X.CLAMP_TO_EDGE)})(i,B+" "+C+"kb"),d.draw(s,p.TRIANGLES,y,v,G.alphaBlended,W.disabled,js(f,u.Color.transparent,O),"$debug",i.debugBuffer,i.quadTriangleIndexBuffer,i.debugSegments)}var Ks={symbol:function(i,o,n,s,p){if(i.renderPass==="translucent"){var f=F.disabled,d=i.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&(function(y,v,S,z,C,P,O){for(var B=v.transform,j=C==="map",R=P==="map",N=0,X=y;N<X.length;N+=1){var H=X[N],te=z.getTile(H),ee=te.getBucket(S);if(ee&&ee.text&&ee.text.segments.get().length){var re=u.evaluateSizeForZoom(ee.textSizeData,B.zoom),ne=Br(te,1,v.transform.zoom),he=Nt(H.posMatrix,R,j,v.transform,ne),ce=S.layout.get("icon-text-fit")!=="none"&&ee.hasIconData();if(re){var ve=Math.pow(2,B.zoom-te.tileID.overscaledZ);Kl(ee,j,R,O,u.symbolSize,B,he,H.posMatrix,ve,re,ce)}}}})(s,i,n,o,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),p),n.paint.get("icon-opacity").constantOr(1)!==0&&Gs(i,o,n,s,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),f,d),n.paint.get("text-opacity").constantOr(1)!==0&&Gs(i,o,n,s,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),f,d),o.map.showCollisionBoxes&&(Zs(i,o,n,s,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),Zs(i,o,n,s,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))}},circle:function(i,o,n,s){if(i.renderPass==="translucent"){var p=n.paint.get("circle-opacity"),f=n.paint.get("circle-stroke-width"),d=n.paint.get("circle-stroke-opacity"),y=!n.layout.get("circle-sort-key").isConstant();if(p.constantOr(1)!==0||f.constantOr(1)!==0&&d.constantOr(1)!==0){for(var v=i.context,S=v.gl,z=i.depthModeForSublayer(0,k.ReadOnly),C=F.disabled,P=i.colorModeForRenderPass(),O=[],B=0;B<s.length;B++){var j=s[B],R=o.getTile(j),N=R.getBucket(n);if(N){var X=N.programConfigurations.get(n.id),H={programConfiguration:X,program:i.useProgram("circle",X),layoutVertexBuffer:N.layoutVertexBuffer,indexBuffer:N.indexBuffer,uniformValues:Gl(i,j,R,n)};if(y)for(var te=0,ee=N.segments.get();te<ee.length;te+=1){var re=ee[te];O.push({segments:new u.SegmentVector([re]),sortKey:re.sortKey,state:H})}else O.push({segments:N.segments,sortKey:0,state:H})}}y&&O.sort((function(Me,Re){return Me.sortKey-Re.sortKey}));for(var ne=0,he=O;ne<he.length;ne+=1){var ce=he[ne],ve=ce.state;ve.program.draw(v,S.TRIANGLES,z,C,P,W.disabled,ve.uniformValues,n.id,ve.layoutVertexBuffer,ve.indexBuffer,ce.segments,n.paint,i.transform.zoom,ve.programConfiguration)}}}},heatmap:function(i,o,n,s){if(n.paint.get("heatmap-opacity")!==0)if(i.renderPass==="offscreen"){var p=i.context,f=p.gl,d=F.disabled,y=new G([f.ONE,f.ONE],u.Color.transparent,[!0,!0,!0,!0]);(function(O,B,j){var R=O.gl;O.activeTexture.set(R.TEXTURE1),O.viewport.set([0,0,B.width/4,B.height/4]);var N=j.heatmapFbo;if(N)R.bindTexture(R.TEXTURE_2D,N.colorAttachment.get()),O.bindFramebuffer.set(N.framebuffer);else{var X=R.createTexture();R.bindTexture(R.TEXTURE_2D,X),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,R.LINEAR),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,R.LINEAR),N=j.heatmapFbo=O.createFramebuffer(B.width/4,B.height/4,!1),(function(H,te,ee,re){var ne=H.gl;ne.texImage2D(ne.TEXTURE_2D,0,ne.RGBA,te.width/4,te.height/4,0,ne.RGBA,H.extRenderToTextureHalfFloat?H.extTextureHalfFloat.HALF_FLOAT_OES:ne.UNSIGNED_BYTE,null),re.colorAttachment.set(ee)})(O,B,X,N)}})(p,i,n),p.clear({color:u.Color.transparent});for(var v=0;v<s.length;v++){var S=s[v];if(!o.hasRenderableParent(S)){var z=o.getTile(S),C=z.getBucket(n);if(C){var P=C.programConfigurations.get(n.id);i.useProgram("heatmap",P).draw(p,f.TRIANGLES,k.disabled,d,y,W.disabled,So(S.posMatrix,z,i.transform.zoom,n.paint.get("heatmap-intensity")),n.id,C.layoutVertexBuffer,C.indexBuffer,C.segments,n.paint,i.transform.zoom,P)}}}p.viewport.set([0,0,i.width,i.height])}else i.renderPass==="translucent"&&(i.context.setColorMode(i.colorModeForRenderPass()),(function(O,B){var j=O.context,R=j.gl,N=B.heatmapFbo;if(N){j.activeTexture.set(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,N.colorAttachment.get()),j.activeTexture.set(R.TEXTURE1);var X=B.colorRampTexture;
497X||(X=B.colorRampTexture=new u.Texture(j,B.colorRamp,R.RGBA)),X.bind(R.LINEAR,R.CLAMP_TO_EDGE),O.useProgram("heatmapTexture").draw(j,R.TRIANGLES,k.disabled,F.disabled,O.colorModeForRenderPass(),W.disabled,(function(H,te,ee,re){var ne=u.create();u.ortho(ne,0,H.width,H.height,0,0,1);var he=H.context.gl;return{u_matrix:ne,u_world:[he.drawingBufferWidth,he.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:te.paint.get("heatmap-opacity")}})(O,B),B.id,O.viewportBuffer,O.quadTriangleIndexBuffer,O.viewportSegments,B.paint,O.transform.zoom)}})(i,n))},line:function(i,o,n,s){if(i.renderPass==="translucent"){var p=n.paint.get("line-opacity"),f=n.paint.get("line-width");if(p.constantOr(1)!==0&&f.constantOr(1)!==0)for(var d=i.depthModeForSublayer(0,k.ReadOnly),y=i.colorModeForRenderPass(),v=n.paint.get("line-dasharray"),S=n.paint.get("line-pattern"),z=S.constantOr(1),C=n.paint.get("line-gradient"),P=n.getCrossfadeParameters(),O=z?"linePattern":v?"lineSDF":C?"lineGradient":"line",B=i.context,j=B.gl,R=!0,N=0,X=s;N<X.length;N+=1){var H=X[N],te=o.getTile(H);if(!z||te.patternsLoaded()){var ee=te.getBucket(n);if(ee){var re=ee.programConfigurations.get(n.id),ne=i.context.program.get(),he=i.useProgram(O,re),ce=R||he.program!==ne,ve=S.constantOr(null);if(ve&&te.imageAtlas){var Me=te.imageAtlas,Re=Me.patternPositions[ve.to.toString()],De=Me.patternPositions[ve.from.toString()];Re&&De&&re.setConstantPatternPositions(Re,De)}var st=z?zt(i,te,n,P):v?Oa(i,te,n,v,P):C?qs(i,te,n,ee.lineClipsArray.length):Fa(i,te,n);if(z)B.activeTexture.set(j.TEXTURE0),te.imageAtlasTexture.bind(j.LINEAR,j.CLAMP_TO_EDGE),re.updatePaintBuffers(P);else if(v&&(ce||i.lineAtlas.dirty))B.activeTexture.set(j.TEXTURE0),i.lineAtlas.bind(B);else if(C){var Ee=ee.gradients[n.id],Ze=Ee.texture;if(n.gradientVersion!==Ee.version){var Ye=256;if(n.stepInterpolant){var Ge=o.getSource().maxzoom,je=H.canonical.z===Ge?Math.ceil(1<<i.transform.maxZoom-H.canonical.z):1;Ye=u.clamp(u.nextPowerOfTwo(ee.maxLineLength/u.EXTENT*1024*je),256,B.maxTextureSize)}Ee.gradient=u.renderColorRamp({expression:n.gradientExpression(),evaluationKey:"lineProgress",resolution:Ye,image:Ee.gradient||void 0,clips:ee.lineClipsArray}),Ee.texture?Ee.texture.update(Ee.gradient):Ee.texture=new u.Texture(B,Ee.gradient,j.RGBA),Ee.version=n.gradientVersion,Ze=Ee.texture}B.activeTexture.set(j.TEXTURE0),Ze.bind(n.stepInterpolant?j.NEAREST:j.LINEAR,j.CLAMP_TO_EDGE)}he.draw(B,j.TRIANGLES,d,i.stencilModeForClipping(H),y,W.disabled,st,n.id,ee.layoutVertexBuffer,ee.indexBuffer,ee.segments,n.paint,i.transform.zoom,re,ee.layoutVertexBuffer2),R=!1}}}}},fill:function(i,o,n,s){var p=n.paint.get("fill-color"),f=n.paint.get("fill-opacity");if(f.constantOr(1)!==0){var d=i.colorModeForRenderPass(),y=n.paint.get("fill-pattern"),v=i.opaquePassEnabledForLayer()&&!y.constantOr(1)&&p.constantOr(u.Color.transparent).a===1&&f.constantOr(0)===1?"opaque":"translucent";if(i.renderPass===v){var S=i.depthModeForSublayer(1,i.renderPass==="opaque"?k.ReadWrite:k.ReadOnly);Yo(i,o,n,s,S,d,!1)}if(i.renderPass==="translucent"&&n.paint.get("fill-antialias")){var z=i.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,k.ReadOnly);Yo(i,o,n,s,z,d,!0)}}},"fill-extrusion":function(i,o,n,s){var p=n.paint.get("fill-extrusion-opacity");if(p!==0&&i.renderPass==="translucent"){var f=new k(i.context.gl.LEQUAL,k.ReadWrite,i.depthRangeFor3D);if(p!==1||n.paint.get("fill-extrusion-pattern").constantOr(1))$o(i,o,n,s,f,F.disabled,G.disabled),$o(i,o,n,s,f,i.stencilModeFor3D(),i.colorModeForRenderPass());else{var d=i.colorModeForRenderPass();$o(i,o,n,s,f,F.disabled,d)}}},hillshade:function(i,o,n,s){if(i.renderPass==="offscreen"||i.renderPass==="translucent"){for(var p=i.context,f=i.depthModeForSublayer(0,k.ReadOnly),d=i.colorModeForRenderPass(),y=i.renderPass==="translucent"?i.stencilConfigForOverlap(s):[{},s],v=y[0],S=0,z=y[1];S<z.length;S+=1){var C=z[S],P=o.getTile(C);P.needsHillshadePrepare&&i.renderPass==="offscreen"?Na(i,P,n,f,F.disabled,d):i.renderPass==="translucent"&&Hu(i,P,n,f,v[C.overscaledZ],d)}p.viewport.set([0,0,i.width,i.height])}},raster:function(i,o,n,s){if(i.renderPass==="translucent"&&n.paint.get("raster-opacity")!==0&&s.length)for(var p=i.context,f
497=p.gl,d=o.getSource(),y=i.useProgram("raster"),v=i.colorModeForRenderPass(),S=d instanceof Mi?[{},s]:i.stencilConfigForOverlap(s),z=S[0],C=S[1],P=C[C.length-1].overscaledZ,O=!i.options.moving,B=0,j=C;B<j.length;B+=1){var R=j[B],N=i.depthModeForSublayer(R.overscaledZ-P,n.paint.get("raster-opacity")===1?k.ReadWrite:k.ReadOnly,f.LESS),X=o.getTile(R),H=i.transform.calculatePosMatrix(R.toUnwrapped(),O);X.registerFadeDuration(n.paint.get("raster-fade-duration"));var te=o.findLoadedParent(R,0),ee=Ju(X,te,o,n,i.transform),re=void 0,ne=void 0,he=n.paint.get("raster-resampling")==="nearest"?f.NEAREST:f.LINEAR;p.activeTexture.set(f.TEXTURE0),X.texture.bind(he,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),p.activeTexture.set(f.TEXTURE1),te?(te.texture.bind(he,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),re=Math.pow(2,te.tileID.overscaledZ-X.tileID.overscaledZ),ne=[X.tileID.canonical.x*re%1,X.tileID.canonical.y*re%1]):X.texture.bind(he,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST);var ce=Wu(H,ne||[0,0],re||1,ee,n);d instanceof Mi?y.draw(p,f.TRIANGLES,N,F.disabled,v,W.disabled,ce,n.id,d.boundsBuffer,i.quadTriangleIndexBuffer,d.boundsSegments):y.draw(p,f.TRIANGLES,N,z[R.overscaledZ],v,W.disabled,ce,n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments)}},background:function(i,o,n){var s=n.paint.get("background-color"),p=n.paint.get("background-opacity");if(p!==0){var f=i.context,d=f.gl,y=i.transform,v=y.tileSize,S=n.paint.get("background-pattern");if(!i.isPatternMissing(S)){var z=!S&&s.a===1&&p===1&&i.opaquePassEnabledForLayer()?"opaque":"translucent";if(i.renderPass===z){var C=F.disabled,P=i.depthModeForSublayer(0,z==="opaque"?k.ReadWrite:k.ReadOnly),O=i.colorModeForRenderPass(),B=i.useProgram(S?"backgroundPattern":"background"),j=y.coveringTiles({tileSize:v});S&&(f.activeTexture.set(d.TEXTURE0),i.imageManager.bind(i.context));for(var R=n.getCrossfadeParameters(),N=0,X=j;N<X.length;N+=1){var H=X[N],te=i.transform.calculatePosMatrix(H.toUnwrapped()),ee=S?Ho(te,p,i,S,{tileID:H,tileSize:v},R):Va(te,p,s);B.draw(f,d.TRIANGLES,P,C,O,W.disabled,ee,n.id,i.tileExtentBuffer,i.quadTriangleIndexBuffer,i.tileExtentSegments)}}}}},debug:function(i,o,n){for(var s=0;s<n.length;s++)$l(i,o,n[s])},custom:function(i,o,n){var s=i.context,p=n.implementation;if(i.renderPass==="offscreen"){var f=p.prerender;f&&(i.setCustomLayerDefaults(),s.setColorMode(i.colorModeForRenderPass()),f.call(p,s.gl,i.transform.customLayerMatrix()),s.setDirty(),i.setBaseState())}else if(i.renderPass==="translucent"){i.setCustomLayerDefaults(),s.setColorMode(i.colorModeForRenderPass()),s.setStencilMode(F.disabled);var d=p.renderingMode==="3d"?new k(i.context.gl.LEQUAL,k.ReadWrite,i.depthRangeFor3D):i.depthModeForSublayer(0,k.ReadOnly);s.setDepthMode(d),p.render(s.gl,i.transform.customLayerMatrix()),s.setDirty(),i.setBaseState(),s.bindFramebuffer.set(null)}}},xt=function(i,o){this.context=new q(i),this.transform=o,this._tileTextures={},this.setup(),this.numSublayers=M.maxUnderzooming+M.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Un,this.gpuTimers={}};xt.prototype.resize=function(i,o){if(this.width=i*u.browser.devicePixelRatio,this.height=o*u.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,s=this.style._order;n<s.length;n+=1)this.style._layers[s[n]].resize()},xt.prototype.setup=function(){var i=this.context,o=new u.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(u.EXTENT,0),o.emplaceBack(0,u.EXTENT),o.emplaceBack(u.EXTENT,u.EXTENT),this.tileExtentBuffer=i.createVertexBuffer(o,zi.members),this.tileExtentSegments=u.SegmentVector.simpleSegment(0,0,4,2);var n=new u.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(u.EXTENT,0),n.emplaceBack(0,u.EXTENT),n.emplaceBack(u.EXTENT,u.EXTENT),this.debugBuffer=i.createVertexBuffer(n,zi.members),this.debugSegments=u.SegmentVector.simpleSegment(0,0,4,5);var s=new u.StructArrayLayout4i8;s.emplaceBack(0,0,0,0),s.emplaceBack(u.EXTENT,0,u.EXTENT,0),s.emplaceBack(0,u.EXTENT,0,u.EXTENT),s.emplaceBack(u.EXTENT,u.EXTENT,u.EXTENT,u.EXTENT),this.rasterBoundsBuffer=i.createVertexBuffer(s,Ti.members),this.rasterBoundsSegments=u.SegmentVector.simpleSegment(0,0,4,2);var p=new u.StructArrayLayout2i4;
vendor: 4,986 bytes, line 497
497p.emplaceBack(0,0),p.emplaceBack(1,0),p.emplaceBack(0,1),p.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(p,zi.members),this.viewportSegments=u.SegmentVector.simpleSegment(0,0,4,2);var f=new u.StructArrayLayout1ui2;f.emplaceBack(0),f.emplaceBack(1),f.emplaceBack(3),f.emplaceBack(2),f.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(f);var d=new u.StructArrayLayout3ui6;d.emplaceBack(0,1,2),d.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(d),this.emptyTexture=new u.Texture(i,{width:1,height:1,data:new Uint8Array([0,0,0,0])},i.gl.RGBA);var y=this.context.gl;this.stencilClearMode=new F({func:y.ALWAYS,mask:0},0,255,y.ZERO,y.ZERO,y.ZERO)},xt.prototype.clearStencil=function(){var i=this.context,o=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var n=u.create();u.ortho(n,0,this.width,this.height,0,0,1),u.scale(n,n,[o.drawingBufferWidth,o.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,o.TRIANGLES,k.disabled,this.stencilClearMode,G.disabled,W.disabled,Gn(n),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},xt.prototype._renderTileClippingMasks=function(i,o){if(this.currentStencilSource!==i.source&&i.isTileClipped()&&o&&o.length){this.currentStencilSource=i.source;var n=this.context,s=n.gl;this.nextStencilID+o.length>256&&this.clearStencil(),n.setColorMode(G.disabled),n.setDepthMode(k.disabled);var p=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var f=0,d=o;f<d.length;f+=1){var y=d[f],v=this._tileClippingMaskIDs[y.key]=this.nextStencilID++;p.draw(n,s.TRIANGLES,k.disabled,new F({func:s.ALWAYS,mask:0},v,255,s.KEEP,s.KEEP,s.REPLACE),G.disabled,W.disabled,Gn(y.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},xt.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var i=this.nextStencilID++,o=this.context.gl;return new F({func:o.NOTEQUAL,mask:255},i,255,o.KEEP,o.KEEP,o.REPLACE)},xt.prototype.stencilModeForClipping=function(i){var o=this.context.gl;return new F({func:o.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,o.KEEP,o.KEEP,o.REPLACE)},xt.prototype.stencilConfigForOverlap=function(i){var o,n=this.context.gl,s=i.sort((function(v,S){return S.overscaledZ-v.overscaledZ})),p=s[s.length-1].overscaledZ,f=s[0].overscaledZ-p+1;if(f>1){this.currentStencilSource=void 0,this.nextStencilID+f>256&&this.clearStencil();for(var d={},y=0;y<f;y++)d[y+p]=new F({func:n.GEQUAL,mask:255},y+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=f,[d,s]}return[(o={},o[p]=F.disabled,o),s]},xt.prototype.colorModeForRenderPass=function(){var i=this.context.gl;return this._showOverdrawInspector?new G([i.CONSTANT_COLOR,i.ONE],new u.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?G.unblended:G.alphaBlended},xt.prototype.depthModeForSublayer=function(i,o,n){if(!this.opaquePassEnabledForLayer())return k.disabled;var s=1-((1+this.currentLayer)*this.numSublayers+i)*this.depthEpsilon;return new k(n||this.context.gl.LEQUAL,o,[s,s])},xt.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},xt.prototype.render=function(i,o){var n=this;this.style=i,this.options=o,this.lineAtlas=i.lineAtlas,this.imageManager=i.imageManager,this.glyphManager=i.glyphManager,this.symbolFadeChange=i.placement.symbolFadeChange(u.browser.now()),this.imageManager.beginFrame();var s=this.style._order,p=this.style.sourceCaches;for(var f in p){var d=p[f];d.used&&d.prepare(this.context)}var y,v,S={},z={},C={};for(var P in p){var O=p[P];S[P]=O.getVisibleCoordinates(),z[P]=S[P].slice().reverse(),C[P]=O.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var B=0;B<s.length;B++)if(this.style._layers[s[B]].is3D()){this.opaquePassCutoff=B;break}this.renderPass="offscreen";for(var j=0,R=s;j<R.length;j+=1){var N=this.style._layers[R[j]];if(N.hasOffscreenPass()&&!N.isHidden(this.transform.zoom)){var X=z[N.source];(N.type==="custom"||X.length)&&this.renderLayer(this,p[N.source],N,X)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:o.showOverdrawInspector?u.Color.black:u.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=o.showOverdrawInspector,this.depthRangeFor3D=[0,1-(i._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=s.length-1;this.currentLayer>=0;this.currentLayer--){var H=this.style._layers[s[this.currentLayer]],te=p[H.source],ee=S[H.source];this._renderTileClippingMasks(H,ee),this.renderLayer(this,te,H,ee)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<s.length;this.currentLayer++){var re=this.style._layers[s[this.currentLayer]],ne=p[re.source],he=(re.type==="symbol"?C:z)[re.source];this._renderTileClippingMasks(re,S[re.source]),this.renderLayer(this,ne,re,he)}this.options.showTileBoundaries&&(u.values(this.style._layers).forEac
497h((function(ce){ce.source&&!ce.isHidden(n.transform.zoom)&&(ce.source!==(v&&v.id)&&(v=n.style.sourceCaches[ce.source]),(!y||y.getSource().maxzoom<v.getSource().maxzoom)&&(y=v))})),y&&Ks.debug(this,y,y.getVisibleCoordinates())),this.options.showPadding&&(function(ce){var ve=ce.transform.padding;Za(ce,ce.transform.height-(ve.top||0),3,ja),Za(ce,ve.bottom||0,3,Xs),Ws(ce,ve.left||0,3,Jl),Ws(ce,ce.transform.width-(ve.right||0),3,Yl);var Me=ce.transform.centerPoint;(function(Re,De,st,Ee){Qo(Re,De-1,st-10,2,20,Ee),Qo(Re,De-10,st-1,20,2,Ee)})(ce,Me.x,ce.transform.height-Me.y,qa)})(this),this.context.setDefault()},xt.prototype.renderLayer=function(i,o,n,s){n.isHidden(this.transform.zoom)||(n.type==="background"||n.type==="custom"||s.length)&&(this.id=n.id,this.gpuTimingStart(n),Ks[n.type](i,o,n,s,this.style.placement.variableOffsets),this.gpuTimingEnd())},xt.prototype.gpuTimingStart=function(i){if(this.options.gpuTiming){var o=this.context.extTimerQuery,n=this.gpuTimers[i.id];n||(n=this.gpuTimers[i.id]={calls:0,cpuTime:0,query:o.createQueryEXT()}),n.calls++,o.beginQueryEXT(o.TIME_ELAPSED_EXT,n.query)}},xt.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var i=this.context.extTimerQuery;i.endQueryEXT(i.TIME_ELAPSED_EXT)}},xt.prototype.collectGpuTimers=function(){var i=this.gpuTimers;return this.gpuTimers={},i},xt.prototype.queryGpuTimers=function(i){var o={};for(var n in i){var s=i[n],p=this.context.extTimerQuery,f=p.getQueryObjectEXT(s.query,p.QUERY_RESULT_EXT)/1e6;p.deleteQueryEXT(s.query),o[n]=f}return o},xt.prototype.translatePosMatrix=function(i,o,n,s,p){if(!n[0]&&!n[1])return i;var f=p?s==="map"?this.transform.angle:0:s==="viewport"?-this.transform.angle:0;if(f){var d=Math.sin(f),y=Math.cos(f);n=[n[0]*y-n[1]*d,n[0]*d+n[1]*y]}var v=[p?n[0]:Br(o,n[0],this.transform.zoom),p?n[1]:Br(o,n[1],this.transform.zoom),0],S=new Float32Array(16);return u.translate(S,i,v),S},xt.prototype.saveTileTexture=function(i){var o=this._tileTextures[i.size[0]];o?o.push(i):this._tileTextures[i.size[0]]=[i]},xt.prototype.getTileTexture=function(i){var o=this._tileTextures[i];return o&&o.length>0?o.pop():null},xt.prototype.isPatternMissing=function(i){if(!i)return!1;if(!i.from||!i.to)return!0;var o=this.imageManager.getPattern(i.from.toString()),n=this.imageManager.getPattern(i.to.toString());return!o||!n},xt.prototype.useProgram=function(i,o){this.cache=this.cache||{};var n=""+i+(o?o.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new Nl(this.context,i,bo[i],o,Io[i],this._showOverdrawInspector)),this.cache[n]},xt.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},xt.prototype.setBaseState=function(){var i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)},xt.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=u.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},xt.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ga=function(i,o){this.points=i,this.planes=o};Ga.fromInvProjectionMatrix=function(i,o,n){var s=Math.pow(2,n),p=[[-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((function(d){return u.transformMat4([],d,i)})).map((function(d){return u.scale$1([],d,1/d[3]/o*s)})),f=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(d){var y=u.sub([],p[d[0]],p[d[1]]),v=u.sub([],p[d[2]],p[d[1]]),S=u.normalize([],u.cross([],y,v)),z=-u.dot(S,p[d[1]]);return S.concat(z)}));return new Ga(p,f)};var Wn=function(i,o){this.min=i,this.max=o,this.center=u.scale$2([],u.add([],this.min,this.max),.5)};Wn.prototype.quadrant=function(i){for(var o=[i%2==0,i<2],n=u.clone$2(this.min),s=u.clone$2(this.max),p=0;p<o.length;p++)n[p]=o[p]?this.min[p]:this.center[p],s[p]=o[p]?this.center[p]:this.max[p];return s[2]=this.max[2],new Wn(n,s)},Wn.prototype.distanceX=function(i){return Math.max(Math.min(this.max[0],i[0]),this.min[0])-i[0]},Wn.prototype.distanceY=function(i){return Math.max(Math.min(this.max[1],i[1]),this.min[1])-i[1]},Wn.prototype.intersects=function(i){for(var o=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],n=!0,s=0;s<i.planes.length;s++){for(var p=i.planes[s],f=0,d=0;d<o.length;d++)f+=u.dot$1(p,o[d])>=0;if(f===0)return 0;f!==o.length&&(n=!1)}if(n)return 2;for(var y=0;y<3;y++){for(var v=Number.MAX_VALUE,S=-Number.MAX_VALUE,z=0;z<i.points.length;z++){var C=i.points[z][y]-this.min[y];v=Math.min(v,C),S=Math.max(S,C)}if(S<0||v>this.max[y]-this.min[y])return 0}return 1};var mn=function(i,o,n,s){if(i===void 0&&(i=0),o===void 0&&(o=0),n===void 0&&(n=0),s===void 0&&(s=0),isNaN(i)||i<0||isNaN(o)||o<0||isNaN(n)||n<0||isNaN(s)||s<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=o,this.left=n,this.right=s};mn.prototype.interpolate=function(i,o,n){return o.top!=null&&i.top!=null&&(this.top=u.number(i.top,o.top,n)),o.bottom!=null&&i.bottom!=null&&(this.bottom=u.number(i.bottom,o.bottom,n)),o.left!=null&&i.left!=null&&(this.left=u.number(i.left,o.left,n)),o.right!=null&&i.right!=null&&(this.right=u.number(i.right,o.right,n)),this},mn.prototype.getCenter=function(i,o){var n=u.clamp((this.left+i-this.right)/2,0,i),s=u.clamp((this.top+o-this.bottom)/2,0,o);return new u.Point(n,s)},mn.prototype.equals=function(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right},mn.prototype.clone=function(){return new mn(this.top,this.bottom,this.left,this.right)},mn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var _t=function(i,o,n,s,p){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=p===void 0||p,this._minZoom=i||0,this._maxZoom=o||22,this._minPitch=n??0,this._maxPitch=s??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new u.
vendor: 15,796 bytes, line 497
497LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new mn,this._posMatrixCache={},this._alignedPosMatrixCache={}},at={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};_t.prototype.clone=function(){var i=new _t(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.tileSize=this.tileSize,i.latRange=this.latRange,i.width=this.width,i.height=this.height,i._center=this._center,i.zoom=this.zoom,i.angle=this.angle,i._fov=this._fov,i._pitch=this._pitch,i._unmodified=this._unmodified,i._edgeInsets=this._edgeInsets.clone(),i._calcMatrices(),i},at.minZoom.get=function(){return this._minZoom},at.minZoom.set=function(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))},at.maxZoom.get=function(){return this._maxZoom},at.maxZoom.set=function(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))},at.minPitch.get=function(){return this._minPitch},at.minPitch.set=function(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))},at.maxPitch.get=function(){return this._maxPitch},at.maxPitch.set=function(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))},at.renderWorldCopies.get=function(){return this._renderWorldCopies},at.renderWorldCopies.set=function(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i},at.worldSize.get=function(){return this.tileSize*this.scale},at.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},at.size.get=function(){return new u.Point(this.width,this.height)},at.bearing.get=function(){return-this.angle/Math.PI*180},at.bearing.set=function(i){var o=-u.wrap(i,-180,180)*Math.PI/180;this.angle!==o&&(this._unmodified=!1,this.angle=o,this._calcMatrices(),this.rotationMatrix=u.create$2(),u.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},at.pitch.get=function(){return this._pitch/Math.PI*180},at.pitch.set=function(i){var o=u.clamp(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==o&&(this._unmodified=!1,this._pitch=o,this._calcMatrices())},at.fov.get=function(){return this._fov/Math.PI*180},at.fov.set=function(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())},at.zoom.get=function(){return this._zoom},at.zoom.set=function(i){var o=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==o&&(this._unmodified=!1,this._zoom=o,this.scale=this.zoomScale(o),this.tileZoom=Math.floor(o),this.zoomFraction=o-this.tileZoom,this._constrain(),this._calcMatrices())},at.center.get=function(){return this._center},at.center.set=function(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())},at.padding.get=function(){return this._edgeInsets.toJSON()},at.padding.set=function(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())},at.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},_t.prototype.isPaddingEqual=function(i){return this._edgeInsets.equals(i)},_t.prototype.interpolatePadding=function(i,o,n){this._unmodified=!1,this._edgeInsets.interpolate(i,o,n),this._constrain(),this._calcMatrices()},_t.prototype.coveringZoomLevel=function(i){var o=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,o)},_t.prototype.getVisibleUnwrappedCoordinates=function(i){var o=[new u.UnwrappedTileID(0,i)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new u.Point(0,0)),s=this.pointCoordinate(new u.Point(this.width,0)),p=this.pointCoordinate(new u.Point(this.width,this.height)),f=this.pointCoordinate(new u.Point(0,this.height)),d=Math.floor(Math.min(n.x,s.x,p.x,f.x)),y=Math.floor(Math.max(n.x,s.x,p.x,f.x)),v=d-1;v<=y+1;v++)v!==0&&o.push(new u.UnwrappedTileID(v,i));return o},_t.prototype.coveringTiles=function(i){var o=this.coveringZoomLevel(i),n=o;if(i.minzoom!==void 0&&o<i.minzoom)return[];i.maxzoom!==void 0&&o>i.maxzoom&&(o=i.maxzoom);var s=u.MercatorCoordinate.fromLngLat(this.center),p=Math.pow(2,o),f=[p*s.x,p*s.y,0],d=Ga.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,o),y=i.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(y=o);var v=function(ce){return{aabb:new Wn([ce*p,0,0],[(ce+1)*p,p,0]),zoom:0,x:0,y:0,wrap:ce,fullyVisible:!1}},S=[],z=[],C=o,P=i.reparseOverscaled?n:o;if(this._renderWorldCopies)for(var O=1;O<=3;O++)S.push(v(-O)),S.push(v(O));for(S.push(v(0));S.length>0;){var B=S.pop(),j=B.x,R=B.y,N=B.fullyVisible;if(!N){var X=B.aabb.intersects(d);if(X===0)continue;N=X===2}var H=B.aabb.distanceX(f),te=B.aabb.distanceY(f),ee=Math.max(Math.abs(H),Math.abs(te));if(B.zoom===C||ee>3+(1<<C-B.zoom)-2&&B.zoom>=y)z.push({tileID:new u.OverscaledTileID(B.zoom===C?P:B.zoom,B.wrap,B.zoom,j,R),distanceSq:u.sqrLen([f[0]-.5-j,f[1]-.5-R])});else for(var re=0;re<4;re++){var ne=(j<<1)+re%2,he=(R<<1)+(re>>1);S.push({aabb:B.aabb.quadrant(re),zoom:B.zoom+1,x:ne,y:he,wrap:B.wrap,fullyVisible:N})}}return z.sort((function(ce,ve){return ce.distanceSq-ve.distanceSq})).map((function(ce){return ce.tileID}))},_t.prototype.resize=function(i,o){this.width=i,this.height=o,this.pixelsToGLUnits=[2/i,-2/o],this._constrain(),this._calcMatrices()},at.unmodified.get=function(){return this._unmodified},_t.prototype.zoomScale=function(i){return Math.pow(2,i)},_t.prototype.scaleZoom=function(i){return Math.log(i)/Math.LN2},_t.prototype.project=function(i){var o=u.clamp(i.lat,-this.maxValidLatitude,this.maxValidLatitude);return new u.Point(u.mercatorXfromLng(i.lng)*this.worldSize,u.mercatorYfromLat(o)*this.worldSize)},_t.prototype.unproject=function(i){return new u.MercatorCoordinate(i.x/this.worldSize,i.y/this.worldSize).toLngLat()},at.point.get=function(){return this.project(this.center)},_t.prototype.setLocationAtPoint=function(i,o){var n=this.pointCoordinate(o),s=this.pointCoordinate(this.centerPoint),p=this.locationCoordinate(i),f=new u.MercatorCoordinate(p.x-(n.x-s.x),p.y-(n.y-s.y));this.center=this.coordinateLocation(f),this._renderWorldCopies&&(this.center=this.center.wrap())},_t.prototype.locationPoint=function(i){return this.coordinatePoint(this.locationCoordinate(i))},_t.prototype.pointLocation=function(i){return this.coordinateLocation(this.pointCoordinate(i))},_t.prototype.locationCoordinate=function(i){return u.MercatorCoordinate.fromLngLat(i)},_t.prototype.coordinateLocation=function(i){return i.toLngLat()},_t.prototype.pointCoordinate=function(i){var o=[i.x,i.y,0,1],n=[i.x,i.y,1,1];u.transformMat4(o,o,this.pixelMatrixInverse),u.transformMat4(n,n,this.pixelMatrixInverse);var s=o[3],p=n[3],f=o[1]/s,d=n[1]/p,y=o[2]/s,v=n[2]/p,S=y===v?0:(0-y)/(v-y);return new u.MercatorCoordinate(u.number(o[0]/s,n[0]/p,S)/this.worldSize,u.number(f,d,S)/this.worldSize)},_t.prototype.coordinatePoint=function(i){var o=[i.x*this.worldSize,i.y*this.worldSize,0,1];return u.transformMat4(o,o,this.pixelMatrix),new u.Point(o[0]/o[3],o[1]/o[3])},_t.prototype.getBounds=function(){return new u.LngLatBounds().extend(this.pointLocation(new u.Point(0,0))).extend(this.pointLocation(new u.Point(this.width,0))).extend(this.pointLocation(new u.Point(this.width,this.height))).extend(this.pointLocation(new u.Point(0,this.height)))},_t.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new u.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},_t.prototype.setMaxBounds=function(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},_t.prototype.calculatePosMatrix=function(i,o){o===void 0&&(o=!1);var n=i.key,s=o?this._alignedPosMatrixCache:this._posMatrixCache;if(s[n])return s[n];var p=i.canonical,f=this.worldSize/this.zoomScale(p.z),d=p.x+Math.pow(2,p.z)*i.wrap,y=u.identity(new Float64Array(16));return u.translate(y,y,[d*f,p.y*f,0]),u.scale(y,y,[f/u.EXTENT,f/u.EXTENT,1]),u.multiply(y,o?this.alignedProjMatrix:this.projMatrix,y),s[n]=new Float32Array(y),s[n]},_t.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},_t.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var i,o,n,s,p=-90,f=90,d=-180,y=180,v=this.size,S=this._unmodified;if(this.latRange){var z=this.latRange;p=u.mercatorYfromLat(z[1])*this.worldSize,i=(f=u.mercatorYfromLat(z[0])*this.worldSize)-p<v.y?v.y/(f-p):0}if(this.lngRange){var C=this.lngRange;d=u.mercatorXfromLng(C[0])*this.worldSize,o=(y=u.mercatorXfromLng(C[1])*this.worldSize)-d<v.x?v.x/(y-d):0}var P=this.point,O=Math.max(o||0,i||0);if(O)return this.center=this.unproject(new u.Point(o?(y+d)/2:P.x,i?(f+p)/2:P.y)),this.zoom+=this.scaleZoom(O),this._unmodified=S,void(this._constraining=!1);if(this.latRange){var B=P.y,j=v.y/2;B-j<p&&(s=p+j),B+j>f&&(s=f-j)}if(this.lngRange){var R=P.x,N=v.x/2;R-N<d&&(n=d+N),R+N>y&&(n=y-N)}n===void 0&&s===void 0||(this.center=this.unproject(new u.Point(n!==void 0?n:P.x,s!==void 0?s:P.y))),this._unmodified=S,this._constraining=!1}},_t.prototype._calcMatrices=function(){if(this.height){var i=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var o=Math.PI/2+this._pitch,n=this._fov*(.5+i.y/this.height),s=Math.sin(n)*this.cameraToCenterDistance/Math.sin(u.clamp(Math.PI-o-n,.01,Math.PI-.01)),p=this.point,f=p.x,d=p.y,y=1.01*(Math.cos(Math.PI/2-this._pitch)*s+this.cameraToCenterDistance),v=this.height/50,S=new Float64Array(16);u.perspective(S,this._fov,this.width/this.height,v,y),S[8]=2*-i.x/this.width,S[9]=2*i.y/this.height,u.scale(S,S,[1,-1,1]),u.translate(S,S,[0,0,-this.cameraToCenterDistance]),u.rotateX(S,S,this._pitch),u.rotateZ(S,S,this.angle),u.translate(S,S,[-f,-d,0]),this.mercatorMatrix=u.scale([],S,[this.worldSize,this.worldSize,this.worldSize]),u.scale(S,S,[1,1,u.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=S,this.invProjMatrix=u.invert([],this.projMatrix);var z=this.width%2/2,C=this.height%2/2,P=Math.cos(this.angle),O=Math.sin(this.angle),B=f-Math.round(f)+P*z+O*C,j=d-Math.round(d)+P*C+O*z,R=new Float64Array(S);if(u.translate(R,R,[B>.5?B-1:B,j>.5?j-1:j,0]),this.alignedProjMatrix=R,S=u.create(),u.scale(S,S,[this.width/2,-this.height/2,1]),u.translate(S,S,[1,-1,0]),this.labelPlaneMatrix=S,S=u.create(),u.scale(S,S,[1,-1,1]),u.translate(S,S,[-1,-1,0]),u.scale(S,S,[2/this.width,2/this.height,1]),this.glCoordMatrix=S,this.pixelMatrix=u.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(S=u.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=S,this._posMatrixCache={},this._alignedPosMatrixCache={}}},_t.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var i=this.pointCoordinate(new u.Point(0,0)),o=[i.x*this.worldSize,i.y*this.worldSize,0,1];return u.transformMat4(o,o,this.pixelMatrix)[3]/this.cameraToCenterDistance},_t.prototype.getCameraPoint=function(){var i=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new u.Point(0,i))},_t.prototype.getCameraQueryGeometry=function(i){var o=this.getCameraPoint();if(i.length===1)return[i[0],o];for(var n=o.x,s=o.y,p=o.x,f=o.y,d=0,y=i;d<y.length;d+=1){var v=y[d];n=Math.min(n,v.x),s=Math.min(s,v.y),p=Math.max(p,v.x),f=Math.max(f,v.y)}return[new u.Point(n,s),new u.Point(p,s),new u.Point(p,f),new u.Point(n,f),new u.Point(n,s)]},Object.defineProperties(_t.prototype,at);var Kn=function(i){var o,n,s,p;this._hashName=i&&encodeURIComponent(i),u.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(o=this._updateHashUnthrottled.bind(this),n=!1,s=null,p=function(){s=null,n&&(o(),s=setTimeout(p,300),n=!1)},function(){return n=!0,s||p(),s})};Kn.prototype.addTo=function(i){return this._map=i,u.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Kn.prototype.remove=function(){return u.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Kn.prototype.getHashString=function(i){var o=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,s=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),p=Math.pow(10,s),f=Math.round(o.lng*p)/p,d=Math.round(o.lat*p)/p,y=this._map.getBearing(),v=this._map.getPitch(),S="";if(S+=i?"/"+f+"/"+d+"/"+n:n+"/"+d+"/"+f,(y||v)&&(S+="/"+Math.round(10*y)/10),v&&(S+="/"+Math.round(v)),this._hashName){var z=this._hashName,C=!1,P=u.window.location.hash.slice(1).split("&").map((function(O){var B=O.split("=")[0];return B===z?(C=!0,B+"="+S):O})).filter((function(O){return O}));return C||P.push(z+"="+S),"#"+P.join("&")}return"#"+S},Kn.prototype._getCurrentHash=function(){var i,o=this,n=u.window.location.hash.replace("#","");return this._hashName?(n.split("&").map((function(s){return s.split("=")})).forEach((function(s){s[0]===o._hashName&&(i=s)})),(i&&i[1]||"").split("/")):n.split("/")},Kn.prototype._onHashChange=function(){var i=this._getCurrentHash();if(i.length>=3&&!i.some((function(n){return isNaN(n)}))){var o=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:o,pitch:+(i[4]||0)}),!0}return!1},Kn.prototype._updateHashUnthrottled=function(){var i=u.window.location.href.replace(/(#.+)?$/,this.getHashString());try{u.window.history.replaceState(u.window.history.state,null,i)}catch{}};var Ri={linearity:.3,easing:u.bezier(0,0,.3,1)},Ql=u.extend({deceleration:2500,maxSpeed:1400},Ri),Ao=u.extend({deceleration:20,maxSpeed:1400},Ri),ea=u.extend({deceleration:1e3,maxSpeed:360},Ri),Yu=u.extend({deceleration:1e3,maxSpeed:90},Ri),ta=function(i){this._map=i,this.clear()};function Xa(i,o){(!i.duration||i.duration<o.duration)&&(i.duration=o.duration,i.easing=o.easing)}function ra(i,o,n){var s=n.maxSpeed,p=n.linearity,f=n.deceleration,d=u.clamp(i*p/(o/1e3),-s,s),y=Math.abs(d)/(f*p);return{easing:n.easing,duration:1e3*y,amount:d*(y/2)}}ta.prototype.clear=function(){this._inertiaBuffer=[]},ta.prototype.record=function(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.browser.now(),settings:i})},ta.prototype._drainInertiaBuffer=function(){for(var i=this._inertiaBuffer,o=u.browser.now();i.length>0&&o-i[0].time>160;)i.shift()},ta.prototype._onMoveEnd=function(i){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var o={zoom:0,bearing:0,pitch:0,pan:new u.Point(0,0),pinchAround:void 0,around:void 0},n=0,s=this._inertiaBuffer;n<s.length;n+=1){var p=s[n].settings;o.zoom+=p.zoomDelta||0,o.bearing+=p.bearingDelta||0,o.pitch+=p.pitchDelta||0,p.panDelta&&o.pan._add(p.panDelta),p.around&&(o.around=p.around),p.pinchAround&&(o.pinchAround=p.pinchAround)}var f=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,d={};if(o.pan.mag()){var y=ra(o.pan.mag(),f,u.extend({},Ql,i||{}));d.offset=o.pan.mult(y.amount/o.pan.mag()),d.center=this._map.transform.center,Xa(d,y)}if(o.zoom){var v=ra(o.zoom,f,Ao);d.zoom=this._map.transform.zoom+v.amount,Xa(d,v)}if(o.bearing){var S=ra(o.bearing,f,ea);
497d.bearing=this._map.transform.bearing+u.clamp(S.amount,-179,179),Xa(d,S)}if(o.pitch){var z=ra(o.pitch,f,Yu);d.pitch=this._map.transform.pitch+z.amount,Xa(d,z)}if(d.zoom||d.bearing){var C=o.pinchAround===void 0?o.around:o.pinchAround;d.around=C?this._map.unproject(C):this._map.getCenter()}return this.clear(),u.extend(d,{noMoveStart:!0})}};var br=(function(i){function o(s,p,f,d){d===void 0&&(d={});var y=se.mousePos(p.getCanvasContainer(),f),v=p.unproject(y);i.call(this,s,u.extend({point:y,lngLat:v,originalEvent:f},d)),this._defaultPrevented=!1,this.target=p}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o})(u.Event),ti=(function(i){function o(s,p,f){var d=s==="touchend"?f.changedTouches:f.touches,y=se.touchPos(p.getCanvasContainer(),d),v=y.map((function(C){return p.unproject(C)})),S=y.reduce((function(C,P,O,B){return C.add(P.div(B.length))}),new u.Point(0,0)),z=p.unproject(S);i.call(this,s,{points:y,point:S,lngLats:v,lngLat:z,originalEvent:f}),this._defaultPrevented=!1}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o})(u.Event),eu=(function(i){function o(s,p,f){i.call(this,s,{originalEvent:f}),this._defaultPrevented=!1}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o})(u.Event),fr=function(i,o){this._map=i,this._clickTolerance=o.clickTolerance};fr.prototype.reset=function(){delete this._mousedownPos},fr.prototype.wheel=function(i){return this._firePreventable(new eu(i.type,this._map,i))},fr.prototype.mousedown=function(i,o){return this._mousedownPos=o,this._firePreventable(new br(i.type,this._map,i))},fr.prototype.mouseup=function(i){this._map.fire(new br(i.type,this._map,i))},fr.prototype.click=function(i,o){this._mousedownPos&&this._mousedownPos.dist(o)>=this._clickTolerance||this._map.fire(new br(i.type,this._map,i))},fr.prototype.dblclick=function(i){return this._firePreventable(new br(i.type,this._map,i))},fr.prototype.mouseover=function(i){this._map.fire(new br(i.type,this._map,i))},fr.prototype.mouseout=function(i){this._map.fire(new br(i.type,this._map,i))},fr.prototype.touchstart=function(i){return this._firePreventable(new ti(i.type,this._map,i))},fr.prototype.touchmove=function(i){this._map.fire(new ti(i.type,this._map,i))},fr.prototype.touchend=function(i){this._map.fire(new ti(i.type,this._map,i))},fr.prototype.touchcancel=function(i){this._map.fire(new ti(i.type,this._map,i))},fr.prototype._firePreventable=function(i){if(this._map.fire(i),i.defaultPrevented)return{}},fr.prototype.isEnabled=function(){return!0},fr.prototype.isActive=function(){return!1},fr.prototype.enable=function(){},fr.prototype.disable=function(){};var Xr=function(i){this._map=i};Xr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Xr.prototype.mousemove=function(i){this._map.fire(new br(i.type,this._map,i))},Xr.prototype.mousedown=function(){this._delayContextMenu=!0},Xr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new br("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Xr.prototype.contextmenu=function(i){this._delayContextMenu?this._contextMenuEvent=i:this._map.fire(new br(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()},Xr.prototype.isEnabled=function(){return!0},Xr.prototype.isActive=function(){return!1},Xr.prototype.enable=function(){},Xr.prototype.disable=function(){};var be=function(i,o){this._map=i,this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=o.clickTolerance||1};function ia(i,o){for(var n={},s=0;s<i.length;s++)n[i[s].identifier]=o[s];return n}be.prototype.isEnabled=function(){return!!this._enabled},be.prototype.isActive=function(){return!!this._active},be.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},be.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},be.prototype.mousedown=function(i,o){this.isEnabled()&&i.shiftKey&&i.button===0&&(se.disableDrag(),this._startPos=this._lastPos=o,this._active=!0)},be.prototype.mousemoveWindow=function(i,o){if(this._active){var n=o;if(!(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)){var s=this._startPos;this._lastPos=n,this._box||(this._box=se.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",i));var p=Math.min(s.x,n.x),f=Math.max(s.x,n.x),d=Math.min(s.y,n.y),y=Math.max(s.y,n.y);se.setTransform(this._box,"translate("+p+"px,"+d+"px)"),this._box.style.width=f-p+"px",this._box.style.height=y-d+"px"}}},be.prototype.mouseupWindow=function(i,o){var n=this;if(this._active&&i.button===0){var s=this._startPos,p=o;if(this.reset(),se.suppressClick(),s.x!==p.x||s.y!==p.y)return this._map.fire(new u.Event("boxzoomend",{originalEvent:i})),{cameraAnimation:function(f){return f.fitScreenCoordinates(s,p,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",i)}},be.prototype.keydown=function(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))},be.prototype.reset=function(){this._active=!1,this._container.classList.remove("maplibregl-crosshair","mapboxgl-crosshair"),this._box&&(se.remove(this._box),this._box=null),se.enableDrag(),delete this._startPos,delete this._lastPos},be.prototype._fireEvent=function(i,o){return this._map.fire(new u.Event(i,{originalEvent:o}))};var zo=function(i){this.reset(),this.numTouches=i.numTouches};zo.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},zo.prototype.touchstart=function(i,o,n){(this.centroid||n.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),n.length===this.numTouches&&(this.centroid=(function(s){for(var p=new u.Point(0,0),f=0,d=s;f<d.length;f+=1)p._add(d[f]);return p.div(s.length)})(o),this.touches=ia(n,o)))}
497,zo.prototype.touchmove=function(i,o,n){if(!this.aborted&&this.centroid){var s=ia(n,o);for(var p in this.touches){var f=s[p];(!f||f.dist(this.touches[p])>30)&&(this.aborted=!0)}}},zo.prototype.touchend=function(i,o,n){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),n.length===0){var s=!this.aborted&&this.centroid;if(this.reset(),s)return s}};var yn=function(i){this.singleTap=new zo(i),this.numTaps=i.numTaps,this.reset()};yn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},yn.prototype.touchstart=function(i,o,n){this.singleTap.touchstart(i,o,n)},yn.prototype.touchmove=function(i,o,n){this.singleTap.touchmove(i,o,n)},yn.prototype.touchend=function(i,o,n){var s=this.singleTap.touchend(i,o,n);if(s){var p=i.timeStamp-this.lastTime<500,f=!this.lastTap||this.lastTap.dist(s)<30;if(p&&f||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=s,this.count===this.numTaps)return this.reset(),s}};var Wr=function(){this._zoomIn=new yn({numTouches:1,numTaps:2}),this._zoomOut=new yn({numTouches:2,numTaps:1}),this.reset()};Wr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Wr.prototype.touchstart=function(i,o,n){this._zoomIn.touchstart(i,o,n),this._zoomOut.touchstart(i,o,n)},Wr.prototype.touchmove=function(i,o,n){this._zoomIn.touchmove(i,o,n),this._zoomOut.touchmove(i,o,n)},Wr.prototype.touchend=function(i,o,n){var s=this,p=this._zoomIn.touchend(i,o,n),f=this._zoomOut.touchend(i,o,n);return p?(this._active=!0,i.preventDefault(),setTimeout((function(){return s.reset()}),0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()+1,around:d.unproject(p)},{originalEvent:i})}}):f?(this._active=!0,i.preventDefault(),setTimeout((function(){return s.reset()}),0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()-1,around:d.unproject(f)},{originalEvent:i})}}):void 0},Wr.prototype.touchcancel=function(){this.reset()},Wr.prototype.enable=function(){this._enabled=!0},Wr.prototype.disable=function(){this._enabled=!1,this.reset()},Wr.prototype.isEnabled=function(){return this._enabled},Wr.prototype.isActive=function(){return this._active};var na={0:1,2:2},Or=function(i){this.reset(),this._clickTolerance=i.clickTolerance||1};Or.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Or.prototype._correctButton=function(i,o){return!1},Or.prototype._move=function(i,o){return{}},Or.prototype.mousedown=function(i,o){if(!this._lastPoint){var n=se.mouseButton(i);this._correctButton(i,n)&&(this._lastPoint=o,this._eventButton=n)}},Or.prototype.mousemoveWindow=function(i,o){var n=this._lastPoint;if(n){if(i.preventDefault(),(function(s,p){var f=na[p];return s.buttons===void 0||(s.buttons&f)!==f})(i,this._eventButton))this.reset();else if(this._moved||!(o.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=o,this._move(n,o)}},Or.prototype.mouseupWindow=function(i){this._lastPoint&&se.mouseButton(i)===this._eventButton&&(this._moved&&se.suppressClick(),this.reset())},Or.prototype.enable=function(){this._enabled=!0},Or.prototype.disable=function(){this._enabled=!1,this.reset()},Or.prototype.isEnabled=function(){return this._enabled},Or.prototype.isActive=function(){return this._active};var Te=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.mousedown=function(n,s){i.prototype.mousedown.call(this,n,s),this._lastPoint&&(this._active=!0)},o.prototype._correctButton=function(n,s){return s===0&&!n.ctrlKey},o.prototype._move=function(n,s){return{around:s,panDelta:s.sub(n)}},o})(Or),Wa=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype._correctButton=function(n,s){return s===0&&n.ctrlKey||s===2},o.prototype._move=function(n,s){var p=.8*(s.x-n.x);if(p)return this._active=!0,{bearingDelta:p}},o.prototype.contextmenu=function(n){n.preventDefault()},o})(Or),Ka=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype._correctButton=function(n,s){return s===0&&n.ctrlKey||s===2},o.prototype._move=function(n,s){var p=-.5*(s.y-n.y);if(p)return this._active=!0,{pitchDelta:p}},o.prototype.contextmenu=function(n){n.preventDefault()},o})(Or),yi=function(i){this._minTouches=1,this._clickTolerance=i.clickTolerance||1,this.reset()};yi.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new u.Point(0,0)},yi.prototype.touchstart=function(i,o,n){return this._calculateTransform(i,o,n)}
vendor: 4,111 bytes, line 497
497,yi.prototype.touchmove=function(i,o,n){if(this._active&&!(n.length<this._minTouches))return i.preventDefault(),this._calculateTransform(i,o,n)},yi.prototype.touchend=function(i,o,n){this._calculateTransform(i,o,n),this._active&&n.length<this._minTouches&&this.reset()},yi.prototype.touchcancel=function(){this.reset()},yi.prototype._calculateTransform=function(i,o,n){n.length>0&&(this._active=!0);var s=ia(n,o),p=new u.Point(0,0),f=new u.Point(0,0),d=0;for(var y in s){var v=s[y],S=this._touches[y];S&&(p._add(v),f._add(v.sub(S)),d++,s[y]=v)}if(this._touches=s,!(d<this._minTouches)&&f.mag()){var z=f.div(d);if(this._sum._add(z),!(this._sum.mag()<this._clickTolerance))return{around:p.div(d),panDelta:z}}},yi.prototype.enable=function(){this._enabled=!0},yi.prototype.disable=function(){this._enabled=!1,this.reset()},yi.prototype.isEnabled=function(){return this._enabled},yi.prototype.isActive=function(){return this._active};var Ur=function(){this.reset()};function Ha(i,o,n){for(var s=0;s<i.length;s++)if(i[s].identifier===n)return o[s]}function tu(i,o){return Math.log(i/o)/Math.LN2}Ur.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Ur.prototype._start=function(i){},Ur.prototype._move=function(i,o,n){return{}},Ur.prototype.touchstart=function(i,o,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([o[0],o[1]]))},Ur.prototype.touchmove=function(i,o,n){if(this._firstTwoTouches){i.preventDefault();var s=this._firstTwoTouches,p=s[1],f=Ha(n,o,s[0]),d=Ha(n,o,p);if(f&&d){var y=this._aroundCenter?null:f.add(d).div(2);return this._move([f,d],y,i)}}},Ur.prototype.touchend=function(i,o,n){if(this._firstTwoTouches){var s=this._firstTwoTouches,p=s[1],f=Ha(n,o,s[0]),d=Ha(n,o,p);f&&d||(this._active&&se.suppressClick(),this.reset())}},Ur.prototype.touchcancel=function(){this.reset()},Ur.prototype.enable=function(i){this._enabled=!0,this._aroundCenter=!!i&&i.around==="center"},Ur.prototype.disable=function(){this._enabled=!1,this.reset()},Ur.prototype.isEnabled=function(){return this._enabled},Ur.prototype.isActive=function(){return this._active};var Hs=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),delete this._distance,delete this._startDistance},o.prototype._start=function(n){this._startDistance=this._distance=n[0].dist(n[1])},o.prototype._move=function(n,s){var p=this._distance;if(this._distance=n[0].dist(n[1]),this._active||!(Math.abs(tu(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:tu(this._distance,p),pinchAround:s}},o})(Ur);function Vr(i,o){return 180*i.angleWith(o)/Math.PI}var gn=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},o.prototype._start=function(n){this._startVector=this._vector=n[0].sub(n[1]),this._minDiameter=n[0].dist(n[1])},o.prototype._move=function(n,s){var p=this._vector;if(this._vector=n[0].sub(n[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Vr(this._vector,p),pinchAround:s}},o.prototype._isBelowThreshold=function(n){this._minDiameter=Math.min(this._minDiameter,n.mag());var s=25/(Math.PI*this._minDiameter)*360,p=Vr(n,this._startVector);return Math.abs(p)<s},o})(Ur);function Ja(i){return Math.abs(i.y)>Math.abs(i.x)}var Js=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},o.prototype._start=function(n){this._lastPoints=n,Ja(n[0].sub(n[1]))&&(this._valid=!1)},o.prototype._move=function(n,s,p){var f=n[0].sub(this._lastPoints[0]),d=n[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(f,d,p.timeStamp),this._val
497id)return this._lastPoints=n,this._active=!0,{pitchDelta:(f.y+d.y)/2*-.5}},o.prototype.gestureBeginsVertically=function(n,s,p){if(this._valid!==void 0)return this._valid;var f=n.mag()>=2,d=s.mag()>=2;if(f||d){if(!f||!d)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;var y=n.y>0==s.y>0;return Ja(n)&&Ja(s)&&y}},o})(Ur),Ys={panStep:100,bearingStep:15,pitchStep:10},Ci=function(){var i=Ys;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1};function ru(i){return i*(2-i)}Ci.prototype.reset=function(){this._active=!1},Ci.prototype.keydown=function(i){var o=this;if(!(i.altKey||i.ctrlKey||i.metaKey)){var n=0,s=0,p=0,f=0,d=0;switch(i.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:i.shiftKey?s=-1:(i.preventDefault(),f=-1);break;case 39:i.shiftKey?s=1:(i.preventDefault(),f=1);break;case 38:i.shiftKey?p=1:(i.preventDefault(),d=-1);break;case 40:i.shiftKey?p=-1:(i.preventDefault(),d=1);break;default:return}return this._rotationDisabled&&(s=0,p=0),{cameraAnimation:function(y){var v=y.getZoom();y.easeTo({duration:300,easeId:"keyboardHandler",easing:ru,zoom:n?Math.round(v)+n*(i.shiftKey?2:1):v,bearing:y.getBearing()+s*o._bearingStep,pitch:y.getPitch()+p*o._pitchStep,offset:[-f*o._panStep,-d*o._panStep],center:y.getCenter()},{originalEvent:i})}}}},Ci.prototype.enable=function(){this._enabled=!0},Ci.prototype.disable=function(){this._enabled=!1,this.reset()},Ci.prototype.isEnabled=function(){return this._enabled},Ci.prototype.isActive=function(){return this._active},Ci.prototype.disableRotation=function(){this._rotationDisabled=!0},Ci.prototype.enableRotation=function(){this._rotationDisabled=!1};var Ut=function(i,o){this._map=i,this._el=i.getCanvasContainer(),this._handler=o,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,u.bindAll(["_onTimeout"],this)};Ut.prototype.setZoomRate=function(i){this._defaultZoomRate=i},Ut.prototype.setWheelZoomRate=function(i){this._wheelZoomRate=i},Ut.prototype.isEnabled=function(){return!!this._enabled},Ut.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Ut.prototype.isZooming=function(){return!!this._zooming},Ut.prototype.enable=function(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=i&&i.around==="center")},Ut.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ut.prototype.wheel=function(i){if(this.isEnabled()){var o=i.deltaMode===u.window.WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY,n=u.browser.now(),s=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,o!==0&&o%4.000244140625==0?this._type="wheel":o!==0&&Math.abs(o)<4?this._type="trackpad":s>400?(this._type=null,this._lastValue=o,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(s*o)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,o+=this._lastValue)),i.shiftKey&&o&&(o/=4),this._type&&(this._lastWheelEvent=i,this._delta-=o,this._active||this._start(i)),i.preventDefault()}}
vendor: 25,994 bytes, line 497
497,Ut.prototype._onTimeout=function(i){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(i)},Ut.prototype._start=function(i){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var o=se.mousePos(this._el,i);this._around=u.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(o)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Ut.prototype.renderFrame=function(){var i=this;if(this._frameId&&(this._frameId=null,this.isActive())){var o=this._map.transform;if(this._delta!==0){var n=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,s=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&s!==0&&(s=1/s);var p=typeof this._targetZoom=="number"?o.zoomScale(this._targetZoom):o.scale;this._targetZoom=Math.min(o.maxZoom,Math.max(o.minZoom,o.scaleZoom(p*s))),this._type==="wheel"&&(this._startZoom=o.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var f,d=typeof this._targetZoom=="number"?this._targetZoom:o.zoom,y=this._startZoom,v=this._easing,S=!1;if(this._type==="wheel"&&y&&v){var z=Math.min((u.browser.now()-this._lastWheelEventTime)/200,1),C=v(z);f=u.number(y,d,C),z<1?this._frameId||(this._frameId=!0):S=!0}else f=d,S=!0;return this._active=!0,S&&(this._active=!1,this._finishTimeout=setTimeout((function(){i._zooming=!1,i._handler._triggerRenderFrame(),delete i._targetZoom,delete i._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!S,zoomDelta:f-o.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Ut.prototype._smoothOutEasing=function(i){var o=u.ease;if(this._prevEase){var n=this._prevEase,s=(u.browser.now()-n.start)/n.duration,p=n.easing(s+.01)-n.easing(s),f=.27/Math.sqrt(p*p+1e-4)*.01,d=Math.sqrt(.0729-f*f);o=u.bezier(f,d,.25,1)}return this._prevEase={start:u.browser.now(),duration:i,easing:o},o},Ut.prototype.reset=function(){this._active=!1};var ft=function(i,o){this._clickZoom=i,this._tapZoom=o};ft.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ft.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ft.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ft.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var gi=function(){this.reset()};gi.prototype.reset=function(){this._active=!1},gi.prototype.dblclick=function(i,o){return i.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(i.shiftKey?-1:1),around:n.unproject(o)},{originalEvent:i})}}},gi.prototype.enable=function(){this._enabled=!0},gi.prototype.disable=function(){this._enabled=!1,this.reset()},gi.prototype.isEnabled=function(){return this._enabled},gi.prototype.isActive=function(){return this._active};var Kr=function(){this._tap=new yn({numTouches:1,numTaps:1}),this.reset()};Kr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Kr.prototype.touchstart=function(i,o,n){this._swipePoint||(this._tapTime&&i.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=o[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(i,o,n))},Kr.prototype.touchmove=function(i,o,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var s=o[0],p=s.y-this._swipePoint.y;return this._swipePoint=s,i.preventDefault(),this._active=!0,{zoomDelta:p/128}}}else this._tap.touchmove(i,o,n)},Kr.prototype.touchend=function(i,o,n){this._tapTime?this._swipePoint&&n.length===0&&this.reset():this._tap.touchend(i,o,n)&&(this._tapTime=i.timeStamp)},Kr.prototype.touchcancel=function(){this.reset()},Kr.prototype.enable=function(){this._enabled=!0},Kr.prototype.disable=function(){this._enabled=!1,this.reset()},Kr.prototype.isEnabled=function(){return this._enabled},Kr.prototype.isActive=function(){return this._active};var ri=function(i,o,n){this._el=i,this._mousePan=o,this._touchPan=n};ri.prototype.enable=function(i){this._inertiaOptions=i||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")},ri.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")},ri.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ri.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Hn=function(i,o,n){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=o,this._mousePitch=n};Hn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Hn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Hn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Hn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Bi=function(i,o,n,s){this._el=i,this._touchZoom=o,this._touchRotate=n,this._tapDragZoom=s,this._rotationDisabled=!1,this._enabled=!0};Bi.prototype.enable=function(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")},Bi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")},Bi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Bi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Bi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Bi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var _n=function(i){return i.zoom||i.drag||i.pitch||i.rotate},ii=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o})(u.Event);function Jn(i){return i.panDelta&&i.panDelta.mag()||i.zoomDelta||i.bearingDelta||i.pitchDelta}var _e=function(i,o){this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ta(i),this._bearingSnap=o.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(o),u.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[u.window.document,"mousemove",{capture:!0}],[u.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[u.window,"blur",void 0]];for(var s=0,p=this._listeners;s<p.length;s+=1){var f=p[s],d=f[0];se.addEventListener(d,f[1],d===u.window.document?this.handleWindowEvent:this.handleEvent,f[2])}};_e.prototype.destroy=function(){for(var i=0,o=this._listeners;i<o.length;i+=1){var n=o[i],s=n[0];se.removeEventListener(s,n[1],s===u.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},_e.prototype._addDefaultHandlers=function(i){var o=this._map,n=o.getCanvasContainer();this._add("mapEvent",new fr(o,i));var s=o.boxZoom=new be(o,i);this._add("boxZoom",s);var p=new Wr,f=new gi;o.doubleClickZoom=new ft(f,p),this._add("tapZoom",p),this._add("clickZoom",f);var d=new Kr;this._add("tapDragZoom",d);var y=o.touchPitch=new Js;this._add("touchPitch",y);var v=new Wa(i),S=new Ka(i);o.dragRotate=new Hn(i,v,S),this._add("mouseRotate",v,["mousePitch"]),this._add("mousePitch",S,["mouseRotate"]);var z=new Te(i),C=new yi(i);o.dragPan=new ri(n,z,C),this._add("mousePan",z),this._add("touchPan",C,["touchZoom","touchRotate"]);var P=new gn,O=new Hs;o.touchZoomRotate=new Bi(n,O,P,d),this._add("touchRotate",P,["touchPan","touchZoom"]),this._add("touchZoom",O,["touchPan","touchRotate"]);var B=o.scrollZoom=new Ut(o,this);this._add("scrollZoom",B,["mousePan"]);var j=o.keyboard=new Ci;this._add("keyboard",j),this._add("blockableMapEvent",new Xr(o));for(var R=0,N=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];R<N.length;R+=1){var X=N[R];i.interactive&&i[X]&&o[X].enable(i[X])}},_e.prototype._add=function(i,o,n){this._handlers.push({handlerName:i,handler:o,allowed:n}),this._handlersById[i]=o},_e.prototype.stop=function(i){if(!this._updatingCamera){for(var o=0,n=this._handlers;o<n.length;o+=1)n[o].handler.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}},_e.prototype.isActive=function(){for(var i=0,o=this._handlers;i<o.length;i+=1)if(o[i].handler.isActive())return!0;return!1},_e.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},_e.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},_e.prototype.isMoving=function(){return!!_n(this._eventsInProgress)||this.isZooming()},_e.prototype._blockedByActive=function(i,o,n){for(var s in i)if(s!==n&&(!o||o.indexOf(s)<0))return!0;return!1},_e.prototype.handleWindowEvent=function(i){this.handleEvent(i,i.type+"Window")},_e.prototype._getMapTouches=function(i){for(var o=[],n=0,s=i;n<s.length;n+=1){var p=s[n];this._el.contains(p.target)&&o.push(p)}return o},_e.prototype.handleEvent=function(i,o){if(i.type!=="blur"){this._updatingCamera=!0;for(var n=i.type==="renderFrame"?void 0:i,s={needsRenderFrame:!1},p={},f={},d=i.touches?this._getMapTouches(i.touches):void 0,y=d?se.touchPos(this._el,d):se.mousePos(this._el,i),v=0,S=this._handlers;v<S.length;v+=1){var z=S[v],C=z.handlerName,P=z.handler,O=z.allowed;if(P.isEnabled()){var B=void 0;this._blockedByActive(f,O,C)?P.reset():P[o||i.type]&&(B=P[o||i.type](i,y,d),this.mergeHandlerResult(s,p,B,C,n),B&&B.needsRenderFrame&&this._triggerRenderFrame()),(B||P.isActive())&&(f[C]=P)}}var j={};for(var R in this._previousActiveHandlers)f[R]||(j[R]=n);this._previousActiveHandlers=f,(Object.keys(j).length||Jn(s))&&(this._changes.push([s,p,j]),this._triggerRenderFrame()),(Object.keys(f).length||Jn(s))&&this._map._stop(!0),this._updatingCamera=!1;var N=s.cameraAnimation;N&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],N(this._map))}else this.stop(!0)},_e.prototype.mergeHandlerResult=function(i,o,n,s,p){if(n){u.extend(i,n);var f={handlerName:s,originalEvent:n.originalEvent||p};n.zoomDelta!==void 0&&(o.zoom=f),n.panDelta!==void 0&&(o.drag=f),n.pitchDelta!==void 0&&(o.pitch=f),n.bearingDelta!==void 0&&(o.rotate=f)}},_e.prototype._applyChanges=function(){for(var i={},o={},n={},s=0,p=this._changes;s<p.length;s+=1){var f=p[s],d=f[0],y=f[1],v=f[2];d.panDelta&&(i.panDelta=(i.panDelta||new u.Point(0,0))._add(d.panDelta)),d.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+d.zoomDelta),d.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+d.bearingDelta),d.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+d.pitchDelta),d.around!==void 0&&(i.around=d.around),d.pinchAround!==void 0&&(i.pinchAround=d.pinchAround),d.noInertia&&(i.noInertia=d.noInertia),u.extend(o,y),u.extend(n,v)}this._updateMapTransform(i,o,n),this._changes=[]},_e.prototype._updateMapTransform=function(i,o,n){var s=this._map,p=s.transform;if(!Jn(i))return this._fireEvents(o,n,!0);var f=i.panDelta,d=i.zoomDelta,y=i.bearingDelta,v=i.pitchDelta,S=i.around,z=i.pinchAround;z!==void 0&&(S=z),s._stop(!0),S=S||s.transform.centerPoint;var C=p.pointLocation(f?S.sub(f):S);y&&(p.bearing+=y),v&&(p.pitch+=v),d&&(p.zoom+=d),p.setLocationAtPoint(C,S),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(o,n,!0)},_e.prototype._fireEvents=function(i,o,n){var s=this,p=_n(this._eventsInProgress),f=_n(i),d={};for(var y in i)this._eventsInProgress[y]||(d[y+"start"]=i[y].originalEvent),this._eventsInProgress[y]=i[y];for(var v in!p&&f&&this._fireEvent("movestart",f.originalEvent),d)this._fireEvent(v,d[v]);for(var S in f&&this._fireEvent("move",f.originalEvent),i)this._fireEvent(S,i[S].originalEvent);var z,C={};for(var P in this._eventsInProgress){var O=this._eventsInProgress[P],B=O.handlerName,j=O.originalEvent;this._handlersById[B].isActive()||(delete this._eventsInProgress[P],C[P+"end"]=z=o[B]||j)}for(var R in C)this._fireEvent(R,C[R]);var N=_n(this._eventsInProgress);if(n&&(p||f)&&!N){this._updatingCamera=!0;var X=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),H=function(te){return te!==0&&-s._bearingSnap<te&&te<s._bearingSnap};X?(H(X.bearing||this._map.getBearing())&&(X.bearing=0),this._map.easeTo(X,{originalEvent:z})):(this._map.fire(new u.Event("moveend",{originalEvent:z})),H(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},_e.prototype._fireEvent=function(i,o){this._map.fire(new u.Event(i,o?{originalEvent:o}:{}))},_e.prototype._requestFrame=function(){var i=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(o){delete i._frameId,i.handleEvent(new ii("renderFrame",{timeStamp:o})),i._applyChanges()}))},_e.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Ue=(function(i){function o(n,s){i.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=s.bearingSnap,u.bindAll(["_renderFrameCallback"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getCenter=function(){return new u.LngLat(this.transform.center.lng,this.transform.center.lat)},o.prototype.setCenter=function(n,s){return this.jumpTo({center:n},s)},o.prototype.panBy=function(n,s,p){return n=u.Point.convert(n).mult(-1),this.panTo(this.transform.center,u.extend({offset:n},s),p)},o.prototype.panTo=function(n,s,p){return this.easeTo(u.extend({center:n},s),p)},o.prototype.getZoom=function(){return this.transform.zoom},o.prototype.setZoom=function(n,s){return this.jumpTo({zoom:n},s),this},o.prototype.zoomTo=function(n,s,p){return this.easeTo(u.extend({zoom:n},s),p)},o.prototype.zoomIn=function(n,s){return this.zoomTo(this.getZoom()+1,n,s),this},o.prototype.zoomOut=function(n,s){return this.zoomTo(this.getZoom()-1,n,s),this},o.prototype.getBearing=function(){return this.transform.bearing},o.prototype.setBearing=function(n,s){return this.jumpTo({bearing:n},s),this},o.prototype.getPadding=function(){return this.transform.padding},o.prototype.setPadding=function(n,s){return this.jumpTo({padding:n},s),this},o.prototype.rotateTo=function(n,s,p){return this.easeTo(u.extend({bearing:n},s),p)},o.prototype.resetNorth=function(n,s){return this.rotateTo(0,u.extend({duration:1e3},n),s),this},o.prototype.resetNorthPitch=function(n,s){return this.easeTo(u.extend({bearing:0,pitch:0,duration:1e3},n),s),this},o.prototype.snapToNorth=function(n,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(n,s):this},o.prototype.getPitch=function(){return this.transform.pitch},o.prototype.setPitch=function(n,s){return this.jumpTo({pitch:n},s),this},o.prototype.cameraForBounds=function(n,s){n=u.LngLatBounds.convert(n);var p=s&&s.bearing||0;return this._cameraForBoxAndBearing(n.getNorthWest(),n.getSouthEast(),p,s)},o.prototype._cameraForBoxAndBearing=function(n,s,p,f){var d={top:0,bottom:0,right:0,left:0};if(typeof(f=u.extend({padding:d,offset:[0,0],maxZoom:this.transform.maxZoom},f)).padding=="number"){var y=f.padding;f.padding={top:y,bottom:y,right:y,left:y}}f.padding=u.extend(d,f.padding);var v=this.transform,S=v.padding,z=v.project(u.LngLat.convert(n)),C=v.project(u.LngLat.convert(s)),P=z.rotate(-p*Math.PI/180),O=C.rotate(-p*Math.PI/180),B=new u.Point(Math.max(P.x,O.x),Math.max(P.y,O.y)),j=new u.Point(Math.min(P.x,O.x),Math.min(P.y,O.y)),R=B.sub(j),N=(v.width-(S.left+S.right+f.padding.left+f.padding.right))/R.x,X=(v.height-(S.top+S.bottom+f.padding.top+f.padding.bottom))/R.y;if(!(X<0||N<0)){var H=Math.min(v.scaleZoom(v.scale*Math.min(N,X)),f.maxZoom),te=typeof f.offset.x=="number"?new u.Point(f.offset.x,f.offset.y):u.Point.convert(f.offset),ee=new u.Point((f.padding.left-f.padding.right)/2,(f.padding.top-f.padding.bottom)/2).rotate(p*Math.PI/180),re=te.add(ee).mult(v.scale/v.zoomScale(H));return{center:v.unproject(z.add(C).div(2).sub(re)),zoom:H,bearing:p}}u.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},o.prototype.fitBounds=function(n,s,p){return this._fitInternal(this.cameraForBounds(n,s),s,p)},o.prototype.fitScreenCoordinates=function(n,s,p,f,d){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(u.Point.convert(n)),this.transform.pointLocation(u.Point.convert(s)),p,f),f,d)},o.prototype._fitInternal=function(n,s,p){return n?(delete(s=u.extend(n,s)).padding,s.linear?this.easeTo(s,p):this.flyTo(s,p)):this},o.prototype.jumpTo=function(n,s){this.stop();var p=this.transform,f=!1,d=!1,y=!1;return"zoom"in n&&p.zoom!==+n.zoom&&(f=!0,p.zoom=+n.zoom),n.center!==void 0&&(p.center=u.LngLat.convert(n.center)),"bearing"in n&&p.bearing!==+n.bearing&&(d=!0,p.bearing=+n.bearing),"pitch"in n&&p.pitch!==+n.pitch&&(y=!0,p.pitch=+n.pitch),n.padding==null||p.isPaddingEqual(n.padding)||(p.padding=n.padding),this.fire(new u.Event("movestart",s)).fire(new u.Event("move",s)),f&&this.fire(new u.Event("zoomstart",s)).fire(new u.Event("zoom",s)).fire(new u.Event("zoomend",s)),d&&this.fire(new u.Event("rotatestart",s)).fire(new u.Event("rotate",s)).fire(new u.Event("rotateend",s)),y&&this.fire(new u.Event("pitchstart",s)).fire(new u.Event("pitch",s)).fire(new u.Event("pitchend",s)),this.fire(new u.Event("moveend",s))},o.prototype.easeTo=function(n,s){var p=this;this._stop(!1,n.easeId),((n=u.extend({offset:[0,0],duration:500,easing:u.ease},n)).animate===!1||!n.essential&&u.browser.prefersReducedMotion)&&(n.duration=0);var f=this.transform,d=this.getZoom(),y=this.getBearing(),v=this.getPitch(),S=this.getPadding(),z="zoom"in n?+n.zoom:d,C="bearing"in n?this._normalizeBearing(n.bearing,y):y,P="pitch"in n?+n.pitch:v,O="padding"in n?n.padding:f.padding,B=u.Point.convert(n.offset),j=f.centerPoint.add(B),R=f.pointLocation(j),N=u.LngLat.convert(n.center||R);this._normalizeCenter(N);var X,H,te=f.project(R),ee=f.project(N).sub(te),re=f.zoomScale(z-d);n.around&&(X=u.LngLat.convert(n.around),H=f.locationPoint(X));var ne={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||z!==d,this._rotating=this._rotating||y!==C,this._pitching=this._pitching||P!==v,this._padding=!f.isPaddingEqual(O),this._easeId=n.easeId,this._prepareEase(s,n.noMoveStart,ne),this._ease((function(he){if(p._zooming&&(f.zoom=u.number(d,z,he)),p._rotating&&(f.bearing=u.number(y,C,he)),p._pitching&&(f.pitch=u.number(v,P,he)),p._padding&&(f.interpolatePadding(S,O,he),j=f.centerPoint.add(B)),X)f.setLocationAtPoint(X,H);else{var ce=f.zoomScale(f.zoom-d),ve=z>d?Math.min(2,re):Math.max(.5,re),Me=Math.pow(ve,1-he),Re=f.unproject(te.add(ee.mult(he*Me)).mult(ce));f.setLocationAtPoint(f.renderWorldCopies?Re.wrap():Re,j)}p._fireMoveEvents(s)}),(function(he){p._afterEase(s,he)}),n),this},o.prototype._prepareEase=function(n,s,p){p===void 0&&(p={}),this._moving=!0,s||p.moving||this.fire(new u.Event("movestart",n)),this._zooming&&!p.zooming&&this.fire(new u.Event("zoomstart",n)),this._rotating&&!p.rotating&&this.fire(new u.Event("rotatestart",n)),this._pitching&&!p.pitching&&this.fire(new u.Event("pitchstart",n))},o.prototype._fireMoveEvents=function(n){this.fire(new u.Event("move",n)),this._zooming&&this.fire(new u.Event("zoom",n)),this._rotating&&this.fire(new u.Event("rotate",n)),this._pitching&&this.fire(new u.Event("pitch",n))},o.prototype._afterEase=function(n,s){if(!this._easeId||!s||this._easeId!==s){delete this._easeId;var p=this._zooming,f=this._rotating,d=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,p&&this.fire(new u.Event("zoomend",n)),f&&this.fire(new u.Event("rotateend",n)),d&&this.fire(new u.Event("pitchend",n)),this.fire(new u.Event("moveend",n))}},o.prototype.flyTo=function(n,s){var p=this;if(!n.essential&&u.browser.prefersReducedMotion){var f=u.pick(n,["center","zoom","bearing","pitch","around"]);return this.jumpTo(f,s)}this.stop(),n=u.extend({offset:[0,0],speed:1.2,curve:1.42,easing:u.ease},n);var d=this.transform,y=this.getZoom(),v=this.getBearing(),S=this.getPitch(),z=this.getPadding(),C="zoom"in n?u.clamp(+n.zoom,d.minZoom,d.maxZoom):y,P="bearing"in n?this._normalizeBearing(n.bearing,v):v,O="pitch"in n?+n.pitch:S,B="padding"in n?n.padding:d.padding,j=d.zoomScale(C-y),R=u.Point.convert(n.offset),N=d.centerPoint.add(R),X=d.pointLocation(N),H=u.LngLat.convert(n.center||X);this._normalizeCenter(H);var te=d.project(X),ee=d.project(H).sub(te),re=n.curve,ne=Math.max(d.width,d.height),he=ne/j,ce=ee.mag();if("minZoom"in n){var ve=u.clamp(Math.min(n.minZoom,y,C),d.minZoom,d.maxZoom),Me=ne/d.zoomScale(ve-y);re=Math.sqrt(Me/ce*2)}var Re=re*re;function De(Ve){var Be=(he*he-ne*ne+(Ve?-1:1)*Re*Re*ce*ce)/(2*(Ve?he:ne)*Re*ce);return Math.log(Math.sqrt(Be*Be+1)-Be)}function st(Ve){return(Math.exp(Ve)-Math.exp(-Ve))/2}function Ee(Ve){return(Math.exp(Ve)+Math.exp(-Ve))/2}var Ze=De(0),Ye=function(Ve){return Ee(Ze)/Ee(Ze+re*Ve)},Ge=function(Ve){return ne*((Ee(Ze)*(st(Be=Ze+re*Ve)/Ee(Be))-st(Ze))/Re)/ce;var Be},je=(De(1)-Ze)/re;if(Math.abs(ce)<1e-6||!isFinite(je)){if(Math.abs(ne-he)<1e-6)return this.easeTo(n,s);var Ne=he<ne?-1:1;je=Math.abs(Math.log(he/ne))/re,Ge=function(){return 0},Ye=function(Ve){return Math.exp(Ne*re*Ve)}}return n.duration="duration"in n?+n.duration:1e3*je/("screenSpeed"in n?+n.screenSpeed/re:+n.speed),n.maxDuration&&n.duration>n.maxDuration&&(n.duration=0),this._zooming=!0,this._rotating=v!==P,this._pitching=O!==S,this._padding=!d.isPaddingEqual(B),this._prepareEase(s,!1),this._ease((function(Ve){var Be=Ve*je,bt=1/Ye(Be);d.zoom=Ve===1?C:y+d.scaleZoom(bt),p._rotating&&(d.bearing=u.number(v,P,Ve)),p._pitching&&(d.pitch=u.number(S,O,Ve)),p._padding&&(d.interpolatePadding(z,B,Ve),N=d.centerPoint.add(R));var Wt=Ve===1?H:d.unproject(te.add(ee.mult(Ge(Be))).mult(bt));d.setLocationAtPoint(d.renderWorldCopies?Wt.wrap():Wt,N),p._fireMoveEvents(s)}),(function(){return p._afterEase(s)}),n),this},o.prototype.isEasing=function(){return!!this._easeFrameId},o.prototype.stop=function(){return this._stop()},o.prototype._stop=function(n,s){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,s)}if(!n){var f=this.handlers;f&&f.stop(!1)}return this},o.prototype._ease=function(n,s,p){p.animate===!1||p.duration===0?(n(1),s()):(this._easeStart=u.browser.now(),this._easeOptions=p,this._onEaseFrame=n,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},o.prototype._renderFrameCallback=function(){var n=Math.min((u.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(n)),n<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},o.prototype._normalizeBearing=function(n,s){n=u.wrap(n,-180,180);var p=Math.abs(n-s);return Math.abs(n-360-s)<p&&(n-=360),Math.abs(n+360-s)<p&&(n+=360),n},o.prototype._normalizeCenter=function(n){var s=this.transform;if(s.renderWorldCopies&&!s.lngRange){var p=n.lng-s.center.lng;n.lng+=p>180?-360:p<-180?360:0}},o})(u.Evented),Hr=function(i){i===void 0&&(i={}),this.options=i,u.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Hr.prototype.getDefaultPosition=function(){return"bottom-right"},Hr.prototype.onAdd=function(i){var o=this.options&&this.options.compact;return this._map=i,this._container=se.create("div","maplibregl-ctrl maplibregl-ctrl-attrib mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=se.create("button","maplibregl-ctrl-attrib-button mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._compactButton.type="button",this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=se.create("div","maplibregl-ctrl-attrib-inner mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),o&&this._container.classList.add("maplibregl-compact","mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),o===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Hr.prototype.onRemove=function(){se.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Hr.prototype._setElementTitle=function(i,o){var n=this._map._getUIString("AttributionControl."+o);i.title=n,i.setAttribute("aria-label",n)},Hr.prototype._toggleAttribution=function(){this._container.classList.contains("maplibregl-compact-show")||this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","fal
497se")):(this._container.classList.add("maplibregl-compact-show","mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Hr.prototype._updateEditLink=function(){var i=this._editLink;i||(i=this._editLink=this._container.querySelector(".mapbox-improve-map"));var o=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||u.config.ACCESS_TOKEN}];if(i){var n=o.reduce((function(s,p,f){return p.value&&(s+=p.key+"="+p.value+(f<o.length-1?"&":"")),s}),"?");i.href=u.config.FEEDBACK_URL+"/"+n+(this._map._hash?this._map._hash.getHashString(!0):""),i.rel="noopener nofollow",this._setElementTitle(i,"MapFeedback")}},Hr.prototype._updateData=function(i){!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Hr.prototype._updateAttributions=function(){if(this._map.style){var i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map((function(y){return typeof y!="string"?"":y}))):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){var o=this._map.style.stylesheet;this.styleOwner=o.owner,this.styleId=o.id}var n=this._map.style.sourceCaches;for(var s in n){var p=n[s];if(p.used){var f=p.getSource();f.attribution&&i.indexOf(f.attribution)<0&&i.push(f.attribution)}}i.sort((function(y,v){return y.length-v.length}));var d=(i=i.filter((function(y,v){for(var S=v+1;S<i.length;S++)if(i[S].indexOf(y)>=0)return!1;return!0}))).join(" | ");d!==this._attribHTML&&(this._attribHTML=d,i.length?(this._innerContainer.innerHTML=d,this._container.classList.remove("maplibregl-attrib-empty","mapboxgl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty","mapboxgl-attrib-empty"),this._editLink=null)}},Hr.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("maplibregl-compact","mapboxgl-compact"):this._container.classList.remove("maplibregl-compact","maplibregl-compact-show","mapboxgl-compact","mapboxgl-compact-show")};var _i=function(){u.bindAll(["_updateLogo"],this),u.bindAll(["_updateCompact"],this)};_i.prototype.onAdd=function(i){this._map=i,this._container=se.create("div","maplibregl-ctrl mapboxgl-ctrl");var o=se.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return o.target="_blank",o.rel="noopener nofollow",o.href="https://maplibre.org/",o.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),o.setAttribute("rel","noopener nofollow"),this._container.appendChild(o),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){se.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return"bottom-left"},_i.prototype._updateLogo=function(i){i&&i.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},_i.prototype._logoRequired=function(){if(this._map.style){var i=this._map.style.sourceCaches;for(var o in i)if(i[o].getSource().mapbox_logo)return!0;return!1}},_i.prototype._updateCompact=function(){var i=this._container.children;if(i.length){var o=i[0];this._map.getCanvasContainer().offsetWidth<250?o.classList.add("maplibregl-compact","mapboxgl-compact"):o.classList.remove("maplibregl-compact","mapboxgl-compact")}};var Wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Wi.prototype.add=function(i){var o=++this._id;return this._queue.push({callback:i,id:o,cancelled:!1}),o},Wi.prototype.remove=function(i){for(var o=this._currentlyRunning,n=0,s=o?this._queue.concat(o):this._queue;n<s.length;n+=1){var p=s[n];if(p.id===i)return void(p.cancelled=!0)}},Wi.prototype.run=function(i){i===void 0&&(i=0);var o=this._currentlyRunning=this._queue;this._queue=[];for(var n=0,s=o;n<s.length;n+=1){var p=s[n];if(!p.cancelled&&(p.callback(i),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Wi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Jr={"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":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},vi=u.window.HTMLImageElement,$u=u.window.HTMLElement,Ki=u.window.ImageBitmap,Pt={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileC
497acheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},dr=(function(i){function o(s){var p=this;if((s=u.extend({},Pt,s)).minZoom!=null&&s.maxZoom!=null&&s.minZoom>s.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(s.minPitch!=null&&s.maxPitch!=null&&s.minPitch>s.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(s.minPitch!=null&&s.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(s.maxPitch!=null&&s.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var f=new _t(s.minZoom,s.maxZoom,s.minPitch,s.maxPitch,s.renderWorldCopies);if(i.call(this,f,s),this._interactive=s.interactive,this._maxTileCacheSize=s.maxTileCacheSize,this._failIfMajorPerformanceCaveat=s.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=s.preserveDrawingBuffer,this._antialias=s.antialias,this._trackResize=s.trackResize,this._bearingSnap=s.bearingSnap,this._refreshExpiredTiles=s.refreshExpiredTiles,this._fadeDuration=s.fadeDuration,this._crossSourceCollisions=s.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=s.collectResourceTiming,this._renderTaskQueue=new Wi,this._controls=[],this._mapId=u.uniqueId(),this._locale=u.extend({},Jr,s.locale),this._clickTolerance=s.clickTolerance,this._requestManager=new u.RequestManager(s.transformRequest,s.accessToken),typeof s.container=="string"){if(this._container=u.window.document.getElementById(s.container),!this._container)throw new Error("Container '"+s.container+"' not found.")}else{if(!(s.container instanceof $u))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=s.container}if(s.maxBounds&&this.setMaxBounds(s.maxBounds),u.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return p._update(!1)})),this.on("moveend",(function(){return p._update(!1)})),this.on("zoom",(function(){return p._update(!0)})),u.window!==void 0&&(u.window.addEventListener("online",this._onWindowOnline,!1),u.window.addEventListener("resize",this._onWindowResize,!1),u.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new _e(this,s),this._hash=s.hash&&new Kn(typeof s.hash=="string"&&s.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:s.center,zoom:s.zoom,bearing:s.bearing,pitch:s.pitch}),s.bounds&&(this.resize(),this.fitBounds(s.bounds,u.extend({},s.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=s.localIdeographFontFamily,s.style&&this.setStyle(s.style,{localIdeographFontFamily:s.localIdeographFontFamily}),s.attributionControl&&this.addControl(new Hr({customAttribution:s.customAttribution})),this.addControl(new _i,s.logoPosition),this.on("style.load",(function(){p.transform.unmodified&&p.jumpTo(p.style.stylesheet)})),this.on("data",(function(d){p._update(d.dataType==="style"),p.fire(new u.Event(d.dataType+"data",d))})),this.on("dataloading",(function(d){p.fire(new u.Event(d.dataType+"dataloading",d))}))}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return o.prototype._getMapId=function(){return this._mapId},o.prototype.addControl=function(s,p){if(p===void 0&&(p=s.getDefaultPosition?s.getDefaultPosition():"top-right"),!s||!s.onAdd)return this.fire(new u.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var f=s.onAdd(this);this._controls.push(s);var d=this._controlPositions[p];return p.indexOf("bottom")!==-1?d.insertBefore(f,d.firstChild):d.appendChild(f),this},o.prototype.removeControl=function(s){if(!s||!s.onRemove)return this.fire(new u.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var p=this._controls.indexOf(s);return p>-1&&this._controls.splice(p,1),s.onRemove(this),this}
497,o.prototype.hasControl=function(s){return this._controls.indexOf(s)>-1},o.prototype.resize=function(s){var p=this._containerDimensions(),f=p[0],d=p[1];this._resizeCanvas(f,d),this.transform.resize(f,d),this.painter.resize(f,d);var y=!this._moving;return y&&(this.stop(),this.fire(new u.Event("movestart",s)).fire(new u.Event("move",s))),this.fire(new u.Event("resize",s)),y&&this.fire(new u.Event("moveend",s)),this},o.prototype.getBounds=function(){return this.transform.getBounds()},o.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},o.prototype.setMaxBounds=function(s){return this.transform.setMaxBounds(u.LngLatBounds.convert(s)),this._update()},o.prototype.setMinZoom=function(s){if((s=s??-2)>=-2&&s<=this.transform.maxZoom)return this.transform.minZoom=s,this._update(),this.getZoom()<s&&this.setZoom(s),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},o.prototype.getMinZoom=function(){return this.transform.minZoom},o.prototype.setMaxZoom=function(s){if((s=s??22)>=this.transform.minZoom)return this.transform.maxZoom=s,this._update(),this.getZoom()>s&&this.setZoom(s),this;throw new Error("maxZoom must be greater than the current minZoom")},o.prototype.getMaxZoom=function(){return this.transform.maxZoom},o.prototype.setMinPitch=function(s){if((s=s??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(s>=0&&s<=this.transform.maxPitch)return this.transform.minPitch=s,this._update(),this.getPitch()<s&&this.setPitch(s),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},o.prototype.getMinPitch=function(){return this.transform.minPitch},o.prototype.setMaxPitch=function(s){if((s=s??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(s>=this.transform.minPitch)return this.transform.maxPitch=s,this._update(),this.getPitch()>s&&this.setPitch(s),this;throw new Error("maxPitch must be greater than the current minPitch")},o.prototype.getMaxPitch=function(){return this.transform.maxPitch},o.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},o.prototype.setRenderWorldCopies=function(s){return this.transform.renderWorldCopies=s,this._update()},o.prototype.project=function(s){return this.transform.locationPoint(u.LngLat.convert(s))},o.prototype.unproject=function(s){return this.transform.pointLocation(u.Point.convert(s))},o.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},o.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},o.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},o.prototype._createDelegatedListener=function(s,p,f){var d,y=this;if(s==="mouseenter"||s==="mouseover"){var v=!1;return{layer:p,listener:f,delegates:{mousemove:function(z){var C=y.getLayer(p)?y.queryRenderedFeatures(z.point,{layers:[p]}):[];C.length?v||(v=!0,f.call(y,new br(s,y,z.originalEvent,{features:C}))):v=!1},mouseout:function(){v=!1}}}}if(s==="mouseleave"||s==="mouseout"){var S=!1;return{layer:p,listener:f,delegates:{mousemove:function(z){(y.getLayer(p)?y.queryRenderedFeatures(z.point,{layers:[p]}):[]).length?S=!0:S&&(S=!1,f.call(y,new br(s,y,z.originalEvent)))},mouseout:function(z){S&&(S=!1,f.call(y,new br(s,y,z.originalEvent)))}}}}return{layer:p,listener:f,delegates:(d={},d[s]=function(z){var C=y.getLayer(p)?y.queryRenderedFeatures(z.point,{layers:[p]}):[];C.length&&(z.features=C,f.call(y,z),delete z.features)},d)}},o.prototype.on=function(s,p,f){if(f===void 0)return i.prototype.on.call(this,s,p);var d=this._createDelegatedListener(s,p,f);for(var y in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[s]=this._delegatedListeners[s]||[],this._delegatedListeners[s].push(d),d.delegates)this.on(y,d.delegates[y]);return this},o.prototype.once=function(s,p,f){if(f===void 0)return i.prototype.once.call(this,s,p);var d=this._createDelegatedListener(s,p,f);for(var y in d.delegates)this.once(y,d.delegates[y]);return this},o.prototype.off=function(s,p,f){var d=this;return f===void 0?i.prototype.off.call(this,s,p):(this._delegatedListeners&&this._delegatedListeners[s]&&(function(y){for(var v=y[s],S=0;S<v.length;S++){var z=v[S];if(z.layer===p&&z.listener===f){for(var C in z.delegates)d.off(C,z.delegates[C]);return v.splice(S,1),d}}})(this._delegatedListeners),this)},o.prototype.queryRenderedFeatures=function(s,p){if(!this.style)return[];var f;if(p!==void 0||s===void 0||s instanceof u.Point||Array.isArray(s)||(p=s,s=void 0),p=p||{},(s=s||[[0,0],[this.transform.width,this.transform.height]])instanceof u.Point||typeof s[0]=="number")f=[u.Point.convert(s)];else{var d=u.Point.convert(s[0]),y=u.Point.convert(s[1]);f=[d,new u.Point(y.x,d.y),y,new u.Point(d.x,y.y),d]}return this.style.queryRenderedFeatures(f,p,this.transform)},o.prototype.querySourceFeatures=function(s,p){return this.style.querySourceFeatures(s,p)},o.prototype.setStyle=function(s,p){return(p=u.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},p)).diff!==!1&&p.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&s?(this._diffStyle(s,p),this):(this._localIdeographFontFamily=p.localIdeographFontFamily,this._updateStyle(s,p))},o.prototype.setTransformRequest=function(s){return this._requestManager.setTransformRequest(s),this},o.prototype._getUIString=function(s){var p=this._locale[s];if(p==null)throw new Error("Missing UI string '"+s+"'");return p},o.prototype._updateStyle=function(s,p){return this.style&&(this.style.setEventedParent(null),this.style._remove()),s?(this.style=new Xi(this,p||{}),this.style.setEventedParent(this,{style:this.style}),typeof s=="string"?this.style.loadURL(s):this.style.loadJSON(s),this):(delete this.style,this)},o.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Xi(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},o.prototype._diffStyle=function(s,p){var f=this;if(typeof s=="string"){var d=this._requestManager.normalizeStyleURL(s),y=this._requestManager.transformRequest(d,u.ResourceType.Style);u.getJSON(y,(function(v,S){v?f.fire(new u.ErrorEvent(v)):S&&f._updateDiff(S,p)}))}else typeof s=="object"&&this._updateDiff(s,p)},o.prototype._updateDiff=function(s,p){try{this.style.setState(s)&&this._update(!0)}catch(f){u.warnOnce("Unable to perform style diff: "+(f.message||f.error||f)+".  Rebuilding the style from scratch."),this._updateStyle(s,p)}},o.prototype.getStyle=function(){if(this.style)return this.style.serialize()},o.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():u.warnOnce("There is no style added to the map.")},o.prototype.addSource=function(s,p){return this._lazyInitEmptyStyle(),this.style.addSource(s,p),this._update(!0)},o.prototype.isSourceLoaded=function(s){var p=this.style&&this.style.sourceCaches[s];if(p!==void 0)return p.loaded();this.fire(new u.ErrorEvent(new Error("There is no source with ID '"+s+"'")))},o.prototype.areTilesLoaded=function(){var s=this.style&&this.style.sourceCaches;for(var p in s){var f=s[p]._tiles;for(var d in f){var y=f[d];if(y.state!=="loaded"&&y.state!=="errored")return!1}}return!0},o.prototype.addSourceType=function(s,p,f){return this._lazyInitEmptyStyle(),this.style.addSourceType(s,p,f)},o.prototype.removeSource=function(s){return this.style.removeSource(s),this._update(!0)},o.prototype.getSource=function(s){return this.style.getSource(s)},o.prototype.addImage=function(s,p,f){f===void 0&&(f={});var d=f.pixelRatio;d===void 0&&(d=1);var y=f.sdf;y===void 0&&(y=!1);var v=f.stretchX,S=f.stretchY,z=f.content;if(this._lazyInitEmptyStyle(),p instanceof vi||Ki&&p instanceof Ki){var C=u.browser.getImageData(p);this.style.addImage(s,{data:new u.RGBAImage({width:C.width,height:C.height},C.data),pixelRatio:d,stretchX:v,stretchY:S,content:z,sdf:y,version:0})}else{if(p.width===void 0||p.height===void 0)return this.fire(new u.ErrorEvent(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`")));var P=p;this.style.addImage(s,{data:new u.RGBAImage({width:p.width,height:p.height},new Uint8Array(p.data)),pixelRatio:d,stretchX:v,stretchY:S,content:z,sdf:y,version:0,userImage:P}),P.onAdd&&P.onAdd(this,s)}},o.prototype.updateImage=function(s,p){var f=this.style.getImage(s);if(!f)return this.fire(new u.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var d=p instanceof vi||Ki&&p instanceof Ki?u.browser.getImageData(p):p,y=d.width,v=d.height,S=d.data;return y===void 0||v===void 0?this.fire(new u.ErrorEvent(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`"))):y!==f.data.width||v!==f.data.height?this.fire(new u.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(f.data.replace(S,!(p instanceof vi||Ki&&p instanceof Ki)),void this.style.updateImage(s,f))},o.prototype.hasImage=function(s){return s?!!this.style.getImage(s):(this.fire(new u.ErrorEvent(new Error("Missing required image id"))),!1)},o.prototype.removeImage=function(s){this.style.removeImage(s)},o.prototype.loadImage=function(s,p){u.getImage(this._requestManager.transformRequest(s,u.ResourceType.Image),p)},o.prototype.listImages=function(){return this.style.listImages()},o.prototype.addLayer=function(s,p){return this._lazyInitEmptyStyle(),this.style.addLayer(s,p),this._update(!0)},o.prototype.moveLayer=function(s,p){return this.style.moveLayer(s,p),this._update(!0)},o.prototype.removeLayer=function(s){return this.style.removeLayer(s),this._update(!0)},o.prototype.getLayer=function(s){return this.style.getLayer(s)},o.prototype.setLayerZoomRange=function(s,p,f){return this.style.setLayerZoomRange(s,p,f),this._update(!0)},o.prototype.setFilter=function(s,p,f){return f===void 0&&(f={}),this.style.setFilter(s,p,f),this._update(!0)},o.prototype.getFilter=function(s){return this.style.getFilter(s)},o.prototype.setPaintProperty=function(s,p,f,d){return d===void 0&&(d={}),this.style.setPaintProperty(s,p,f,d),this._update(!0)},o.prototype.getPaintProperty=function(s,p){return this.style.getPaintProperty(s,p)},o.prototype.setLayoutProperty=function(s,p,f,d){return d===void 0&&(d={}),this.style.setLayoutProperty(s,p,f,d),this._update(!0)},o.prototype.getLayoutProperty=function(s,p){return this.style.getLayoutProperty(s,p)},o.prototype.setLight=function(s,p){return p===void 0&&(p={}),this._lazyInitEmptyStyle(),this.style.setLight(s,p),this._update(!0)},o.prototype.getLight=function(){return this.style.getLight()},o.prototype.setFeatureState=function(s,p){return this.style.setFeatureState(s,p),this._update()},o.prototype.removeFeatureState=function(s,p){return this.style.removeFeatureState(s,p),this._update()},o.prototype.getFeatureState=function(s){return this.style.getFeatureState(s)},o.prototype.getContainer=function(){return this._container},o.prototype.getCanvasContainer=function(){return this._canvasContainer},o.prototype.getCanvas=function(){return this._canvas},o.prototype._containerDimensions=function(){var s=0,p=0;return this._container&&(s=this._container.clientWidth||400,p=this._container.clientHeight||300),[s,p]},o.prototype._setupContainer=function(){var s=this._container;s.classList.add("maplibregl-map","mapboxgl-map");var p=this._canvasContainer=se.create("div","maplibregl-canvas-container mapboxgl-canvas-container",s);this._interactive&&p.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=se.create("canvas","maplibregl-canvas mapboxgl-canvas",p),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","regi
497on");var f=this._containerDimensions();this._resizeCanvas(f[0],f[1]);var d=this._controlContainer=se.create("div","maplibregl-control-container mapboxgl-control-container",s),y=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(v){y[v]=se.create("div","maplibregl-ctrl-"+v+" mapboxgl-ctrl-"+v,d)})),this._container.addEventListener("scroll",this._onMapScroll,!1)},o.prototype._resizeCanvas=function(s,p){var f=u.browser.devicePixelRatio||1;this._canvas.width=f*s,this._canvas.height=f*p,this._canvas.style.width=s+"px",this._canvas.style.height=p+"px"},o.prototype._setupPainter=function(){var s=u.extend({},St.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),p=this._canvas.getContext("webgl",s)||this._canvas.getContext("experimental-webgl",s);p?(this.painter=new xt(p,this.transform),u.webpSupported.testSupport(p)):this.fire(new u.ErrorEvent(new Error("Failed to initialize WebGL")))},o.prototype._contextLost=function(s){s.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new u.Event("webglcontextlost",{originalEvent:s}))},o.prototype._contextRestored=function(s){this._setupPainter(),this.resize(),this._update(),this.fire(new u.Event("webglcontextrestored",{originalEvent:s}))},o.prototype._onMapScroll=function(s){if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},o.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},o.prototype._update=function(s){return this.style?(this._styleDirty=this._styleDirty||s,this._sourcesDirty=!0,this.triggerRepaint(),this):this},o.prototype._requestRenderFrame=function(s){return this._update(),this._renderTaskQueue.add(s)},o.prototype._cancelRenderFrame=function(s){this._renderTaskQueue.remove(s)},o.prototype._render=function(s){var p,f=this,d=0,y=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(p=y.createQueryEXT(),y.beginQueryEXT(y.TIME_ELAPSED_EXT,p),d=u.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(s),!this._removed){var v=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var S=this.transform.zoom,z=u.browser.now();this.style.zoomHistory.update(S,z);var C=new u.EvaluationParameters(S,{now:z,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),P=C.crossFadingFactor();P===1&&P===this._crossFadingFactor||(v=!0,this._crossFadingFactor=P),this.style.update(C)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new u.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new u.Event("load"))),this.style&&(this.style.hasTransitions()||v)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var O=u.browser.now()-d;y.endQueryEXT(y.TIME_ELAPSED_EXT,p),setTimeout((function(){var R=y.getQueryObjectEXT(p,y.QUERY_RESULT_EXT)/1e6;y.deleteQueryEXT(p),f.fire(new u.Event("gpu-timing-frame",{cpuTime:O,gpuTime:R}))}),50)}if(this.listens("gpu-timing-layer")){var B=this.painter.collectGpuTimers();setTimeout((function(){var R=f.painter.queryGpuTimers(B);f.fire(new u.Event("gpu-timing-layer",{layerTimes:R}))}),50)}var j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new u.Event("idle")),!this._loaded||this._fullyLoaded||j||(this._fullyLoaded=!0),this}},o.prototype.remove=function(){this._hash&&this._hash.remove();for(var s=0,p=this._controls;s<p.length;s+=1)p[s].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),u.window!==void 0&&(u.window.removeEventListener("resize",this._onWindowResize,!1),u.window.removeEventListener("orientationchange",this._onWindowResize,!1),u.window.removeEventListener("online",this._onWindowOnline,!1));var f=this.painter.context.gl.getExtension("WEBGL_lose_context");f&&f.loseContext(),$s(this._canvasContainer),$s(this._controlContainer),this._container.classList.remove("maplibregl-map","mapboxgl-map"),this._removed=!0,this.fire(new u.Event("remove"))},o.prototype.triggerRepaint=function(){var s=this;this.style&&!this._frame&&(this._frame=u.browser.frame((function(p){s._frame=null,s._render(p)})))},o.prototype._onWindowOnline=function(){this._update()},o.prototype._onWindowResize=function(s){this._trackResize&&this.resize({originalEvent:s})._update()},n.showTileBoundaries.get=function(){return!!this._showTileBoundaries},n.showTileBoundaries.set=function(s){this._showTileBoundaries!==s&&(this._showTileBoundaries=s,this._update())},n.showPadding.get=function(){return!!this._showPadding},n.showPadding.set=function(s){this._showPadding!==s&&(this._showPadding=s,this._update())},n.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},n.showCollisionBoxes.set=function(s){this._showCollisionBoxes!==s&&(this._showCollisionBoxes=s,s?this.style._generateCollisionBoxes():this._update())},n.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},n.showOverdrawInspector.set=function(s){this._showOverdrawInspector!==s&&(this._showOverdrawInspector=s,this._update())},n.repaint.get=function(){return!!this._repaint},n.repaint.set=function(s){this._repaint!==s&&(this._repaint=s,this.triggerRepaint())},n.vertices.get=function(){return!!this._vertices}
vendor: 4,413 bytes, line 497
497,n.vertices.set=function(s){this._vertices=s,this._update()},o.prototype._setCacheLimits=function(s,p){u.setCacheLimits(s,p)},n.version.get=function(){return u.version},Object.defineProperties(o.prototype,n),o})(Ue);function $s(i){i.parentNode&&i.parentNode.removeChild(i)}var oa={showCompass:!0,showZoom:!0,visualizePitch:!1},Hi=function(i){var o=this;this.options=u.extend({},oa,i),this._container=se.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(n){return n.preventDefault()})),this.options.showZoom&&(u.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",(function(n){return o._map.zoomIn({},{originalEvent:n})})),se.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out mapboxgl-ctrl-zoom-out",(function(n){return o._map.zoomOut({},{originalEvent:n})})),se.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(u.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass mapboxgl-ctrl-compass",(function(n){o.options.visualizePitch?o._map.resetNorthPitch({},{originalEvent:n}):o._map.resetNorth({},{originalEvent:n})})),this._compassIcon=se.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Hi.prototype._updateZoomButtons=function(){var i=this._map.getZoom(),o=i===this._map.getMaxZoom(),n=i===this._map.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())},Hi.prototype._rotateCompassArrow=function(){var i=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=i},Hi.prototype.onAdd=function(i){return this._map=i,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yr(this._map,this._compass,this.options.visualizePitch)),this._container},Hi.prototype.onRemove=function(){se.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Hi.prototype._createButton=function(i,o){var n=se.create("button",i,this._container);return n.type="button",n.addEventListener("click",o),n},Hi.prototype._setButtonTitle=function(i,o){var n=this._map._getUIString("NavigationControl."+o);i.title=n,i.setAttribute("aria-label",n)};var Yr=function(i,o,n){n===void 0&&(n=!1),this._clickTolerance=10,this.element=o,this.mouseRotate=new Wa({clickTolerance:i.dragRotate._mouseRotate._clickTolerance}),this.map=i,n&&(this.mousePitch=new Ka({clickTolerance:i.dragRotate._mousePitch._clickTolerance})),u.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),se.addEventListener(o,"mousedown",this.mousedown),se.addEventListener(o,"touchstart",this.touchstart,{passive:!1}),se.addEventListener(o,"touchmove",this.touchmove),se.addEventListener(o,"touchend",this.touchend),se.addEventListener(o,"touchcancel",this.reset)};function Ya(i,o,n){if(i=new u.LngLat(i.lng,i.lat),o){var s=new u.LngLat(i.lng-360,i.lat),p=new u.LngLat(i.lng+360,i.lat),f=n.locationPoint(i).distSqr(o);n.locationPoint(s).distSqr(o)<f?i=s:n.locationPoint(p).distSqr(o)<f&&(i=p)}for(;Math.abs(i.lng-n.center.lng)>180;){var d=n.locationPoint(i);if(d.x>=0&&d.y>=0&&d.x<=n.width&&d.y<=n.height)break;
497i.lng>n.center.lng?i.lng-=360:i.lng+=360}return i}Yr.prototype.down=function(i,o){this.mouseRotate.mousedown(i,o),this.mousePitch&&this.mousePitch.mousedown(i,o),se.disableDrag()},Yr.prototype.move=function(i,o){var n=this.map,s=this.mouseRotate.mousemoveWindow(i,o);if(s&&s.bearingDelta&&n.setBearing(n.getBearing()+s.bearingDelta),this.mousePitch){var p=this.mousePitch.mousemoveWindow(i,o);p&&p.pitchDelta&&n.setPitch(n.getPitch()+p.pitchDelta)}},Yr.prototype.off=function(){var i=this.element;se.removeEventListener(i,"mousedown",this.mousedown),se.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),se.removeEventListener(i,"touchmove",this.touchmove),se.removeEventListener(i,"touchend",this.touchend),se.removeEventListener(i,"touchcancel",this.reset),this.offTemp()},Yr.prototype.offTemp=function(){se.enableDrag(),se.removeEventListener(u.window,"mousemove",this.mousemove),se.removeEventListener(u.window,"mouseup",this.mouseup)},Yr.prototype.mousedown=function(i){this.down(u.extend({},i,{ctrlKey:!0,preventDefault:function(){return i.preventDefault()}}),se.mousePos(this.element,i)),se.addEventListener(u.window,"mousemove",this.mousemove),se.addEventListener(u.window,"mouseup",this.mouseup)},Yr.prototype.mousemove=function(i){this.move(i,se.mousePos(this.element,i))},Yr.prototype.mouseup=function(i){this.mouseRotate.mouseupWindow(i),this.mousePitch&&this.mousePitch.mouseupWindow(i),this.offTemp()},Yr.prototype.touchstart=function(i){i.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=se.touchPos(this.element,i.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return i.preventDefault()}},this._startPos))},Yr.prototype.touchmove=function(i){i.targetTouches.length!==1?this.reset():(this._lastPos=se.touchPos(this.element,i.targetTouches)[0],this.move({preventDefault:function(){return i.preventDefault()}},this._lastPos))},Yr.prototype.touchend=function(i){i.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Yr.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Yn={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 Ji(i,o,n){var s=i.classList;for(var p in Yn)s.remove("maplibregl-"+n+"-anchor-"+p,"mapboxgl-"+n+"-anchor-"+p);s.add("maplibregl-"+n+"-anchor-"+o,"mapboxgl-"+n+"-anchor-"+o)}var Po,aa=(function(i){function o(n,s){if(i.call(this),(n instanceof u.window.HTMLElement||s)&&(n=u.extend({element:n},s)),u.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._scale=n&&n.scale||1,this._draggable=n&&n.draggable||!1,this._clickTolerance=n&&n.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||"auto",this._pitchAlignment=n&&n.pitchAlignment&&n.pitchAlignment!=="auto"?n.pitchAlignment:this._rotationAlignment,n&&n.element)this._element=n.element,this._offset=u.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=se.create("div"),this._element.setAttribute("aria-label","Map marker");var p=se.createNS("http://www.w3.org/2000/svg","svg");p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height","41px"),p.setAttributeNS(null,"width","27px"),p.setAttributeNS(null,"viewBox","0 0 27 41");var f=se.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"stroke","none"),f.setAttributeNS(null,"stroke-width","1"),f.setAttributeNS(null,"fill","none"),f.setAttributeNS(null,"fill-rule","evenodd");var d=se.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill-rule","nonzero");var y=se.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(3.0, 29.0)"),y.setAttributeNS(null,"fill","#000000");for(var v=0,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"}];v<S.length;v+=1){var z=S[v],C=se.createNS("http://www.w3.org/2000/svg","ellipse");C.setAttributeNS(null,"opacity","0.04"),C.setAttributeNS(null,"cx","10.5"),C.setAttributeNS(null,"cy","5.80029008"),C.setAttributeNS(null,"rx",z.rx),C.setAttributeNS(null,"ry",z.ry),y.appendChild(C)}var P=se.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"fill",this._color);var O=se.createNS("http://www.w3.org/2000/svg","path");O.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"),P.appendChild(O);var B=se.createNS("http://www.w3.org/2000/svg","g");B.setAttributeNS(null,"opacity","0.25"),B.setAttributeNS(null,"fill","#000000");var j=se.createNS("http://www.w3.org/2000/svg","path");j.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"),B.appendChild(j);var R=se.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"transform","translate(6.0, 7.0)"),R.setAttributeNS(null,"fill","#FFFFFF");var N=se.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"transform","translate(8.0, 8.0)");var X=se.createNS("http://www.w3.org/2000/svg","circle");X.setAttributeNS(null,"fill","#000000"),X.setAttributeNS(null,"opacity","0.25"),X.setAttributeNS(null,"cx","5.5"),X.setAttributeNS(null,"cy","5.5"),X.setAttributeNS(null,"r","5.4999962");var H=se.createNS("http://www.w3.org/2000/svg","circle");H.setAttributeNS(null,"fill","#FFFFFF"),H.setAttributeNS(null,"cx","5.5"),H.setAttributeNS(null,"cy","5.5"),H.setAttributeNS(null,"r","5.4999962"),N.appendChild(X),N.appendChild(H
vendor: 2,973 bytes, line 497
497),d.appendChild(y),d.appendChild(P),d.appendChild(B),d.appendChild(R),d.appendChild(N),p.appendChild(d),p.setAttributeNS(null,"height",41*this._scale+"px"),p.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(p),this._offset=u.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",(function(te){te.preventDefault()})),this._element.addEventListener("mousedown",(function(te){te.preventDefault()})),Ji(this._element,this._anchor,"marker"),this._popup=null}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.addTo=function(n){return this.remove(),this._map=n,n.getCanvasContainer().appendChild(this._element),n.on("move",this._update),n.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},o.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),se.remove(this._element),this._popup&&this._popup.remove(),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(n){return this._lngLat=u.LngLat.convert(n),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},o.prototype.getElement=function(){return this._element},o.prototype.setPopup=function(n){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),n){if(!("offset"in n.options)){var s=Math.sqrt(Math.pow(13.5,2)/2);n.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[s,-1*(24.6+s)],"bottom-right":[-s,-1*(24.6+s)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=n,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},o.prototype._onKeyPress=function(n){var s=n.code,p=n.charCode||n.keyCode;s!=="Space"&&s!=="Enter"&&p!==32&&p!==13||this.togglePopup()},o.prototype._onMapClick=function(n){var s=n.originalEvent.target,p=this._element;this._popup&&(s===p||p.contains(s))&&this.togglePopup()},o.prototype.getPopup=function(){return this._popup},o.prototype.togglePopup=function(){var n=this._popup;return n?(n.isOpen()?n.remove():n.addTo(this._map),this):this},o.prototype._update=function(n){if(this._map){this._map.transform.renderWorldCopies&&
497(this._lngLat=Ya(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var s="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?s="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(s="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var p="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?p="rotateX(0deg)":this._pitchAlignment==="map"&&(p="rotateX("+this._map.getPitch()+"deg)"),n&&n.type!=="moveend"||(this._pos=this._pos.round()),se.setTransform(this._element,Yn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+p+" "+s)}},o.prototype.getOffset=function(){return this._offset},o.prototype.setOffset=function(n){return this._offset=u.Point.convert(n),this._update(),this},o.prototype._onMove=function(n){if(!this._isDragging){var s=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=s}this._isDragging&&(this._pos=n.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 u.Event("dragstart"))),this.fire(new u.Event("drag")))},o.prototype._onUp=function(){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 u.Event("dragend")),this._state="inactive"},o.prototype._addDragHandler=function(n){this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.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))},o.prototype.setDraggable=function(n){return this._draggable=!!n,this._map&&(n?(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},o.prototype.isDraggable=function(){return this._draggable},o.prototype.setRotation=function(n){return this._rotation=n||0,this._update(),this},o.prototype.getRotation=function(){return this._rotation},o.prototype.setRotationAlignment=function(n){return this._rotationAlignment=n||"auto",this._update(),this},o.prototype.getRotationAlignment=function(){return this._rotationAlignment},o.prototype.setPitchAlignment=function(n){return this._pitchAlignment=n&&n!=="auto"?n:this._rotationAlignment,this._update(),this},o.prototype.getPitchAlignment=function(){return this._pitchAlignment},o})(u.Evented),Qs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},sa=0,vn=!1,el=(function(i){function o(n){i.call(this),this.options=u.extend({},Qs,n),u.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.onAdd=function(n){var s;return this._map=n,this._container=se.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),s=this._setupUI,Po!==void 0?s(Po):u.window.navigator.permissions!==void 0?u.window.navigator.permissions.query({name:"geolocation"}).then((function(p){s(Po=p.state!=="denied")})):s(Po=!!u.window.navigator.geolocation),this._container},o.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(u.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(),se.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,sa=0,vn=!1},o.prototype._isOutOfMapMaxBounds=function(n){var s=this._map.getMaxBounds(),p=n.coords;return s&&(p.longitude<s.getWest()||p.longitude>s.getEast()||p.latitude<s.getSouth()||p.latitude>s.getNorth())},o.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
497RROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting")}},o.prototype._onSuccess=function(n){if(this._map){if(this._isOutOfMapMaxBounds(n))return this._setErrorState(),this.fire(new u.Event("outofmaxbounds",n)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=n,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(n),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(n),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new u.Event("geolocate",n)),this._finish()}},o.prototype._updateCamera=function(n){var s=new u.LngLat(n.coords.longitude,n.coords.latitude),p=n.coords.accuracy,f=this._map.getBearing(),d=u.extend({bearing:f},this.options.fitBoundsOptions);this._map.fitBounds(s.toBounds(p),d,{geolocateSource:!0})},o.prototype._updateMarker=function(n){if(n){var s=new u.LngLat(n.coords.longitude,n.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=n.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},o.prototype._updateCircleRadius=function(){var n=this._map._container.clientHeight/2,s=this._map.unproject([0,n]),p=this._map.unproject([1,n]),f=s.distanceTo(p),d=Math.ceil(2*this._accuracy/f);this._circleElement.style.width=d+"px",this._circleElement.style.height=d+"px"},o.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},o.prototype._onError=function(n){if(this._map){if(this.options.trackUserLocation)if(n.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(n.code===3&&vn)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new u.Event("error",n)),this._finish()}},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(n){var s=this;if(this._container.addEventListener("contextmenu",(function(d){return d.preventDefault()})),this._geolocateButton=se.create("button","maplibregl-ctrl-geolocate mapboxgl-ctrl-geolocate",this._container),se.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",n===!1){u.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var p=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=p,this._geolocateButton.setAttribute("aria-label",p)}else{var f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
497se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=se.create("div","maplibregl-user-location-dot mapboxgl-user-location-dot"),this._userLocationDotMarker=new aa(this._dotElement),this._circleElement=se.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new aa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(d){d.geolocateSource||s._watchState!=="ACTIVE_LOCK"||d.originalEvent&&d.originalEvent.type==="resize"||(s._watchState="BACKGROUND",s._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),s._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),s.fire(new u.Event("trackuserlocationend")))}))},o.prototype.trigger=function(){if(!this._setup)return u.warnOnce("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 u.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":sa--,vn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this.fire(new u.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new u.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var n;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++sa>1?(n={maximumAge:6e5,timeout:0},vn=!0):(n=this.options.positionOptions,vn=!1),this._geolocationWatchID=u.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,n)}}else u.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},o.prototype._clearWatch=function(){u.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","fal
497se"),this.options.showUserLocation&&this._updateMarker(null)},o})(u.Evented),tl={maxWidth:100,unit:"metric"},ni=function(i){this.options=u.extend({},tl,i),u.bindAll(["_onMove","setUnit"],this)};function $a(i,o,n){var s=n&&n.maxWidth||100,p=i._container.clientHeight/2,f=i.unproject([0,p]),d=i.unproject([s,p]),y=f.distanceTo(d);if(n&&n.unit==="imperial"){var v=3.2808*y;v>5280?$n(o,s,v/5280,i._getUIString("ScaleControl.Miles")):$n(o,s,v,i._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?$n(o,s,y/1852,i._getUIString("ScaleControl.NauticalMiles")):y>=1e3?$n(o,s,y/1e3,i._getUIString("ScaleControl.Kilometers")):$n(o,s,y,i._getUIString("ScaleControl.Meters"))}function $n(i,o,n,s){var p,f,d,y=(p=n,(f=Math.pow(10,(""+Math.floor(p)).length-1))*(d=(d=p/f)>=10?10:d>=5?5:d>=3?3:d>=2?2:d>=1?1:(function(v){var S=Math.pow(10,Math.ceil(-Math.log(v)/Math.LN10));return Math.round(v*S)/S})(d)));i.style.width=o*(y/n)+"px",i.innerHTML=y+"&nbsp;"+s}ni.prototype.getDefaultPosition=function(){return"bottom-left"},ni.prototype._onMove=function(){$a(this._map,this._container,this.options)},ni.prototype.onAdd=function(i){return this._map=i,this._container=se.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",i.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ni.prototype.onRemove=function(){se.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ni.prototype.setUnit=function(i){this.options.unit=i,$a(this._map,this._container,this.options)};var oi=function(i){this._fullscreen=!1,i&&i.container&&(i.container instanceof u.window.HTMLElement?this._container=i.container:u.warnOnce("Full screen control 'container' must be a DOM element.")),u.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in u.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in u.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in u.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in u.window.document&&(this._fullscreenchange="MSFullscreenChange")};oi.prototype.onAdd=function(i){return this._map=i,this._container||(this._container=this._map.getContainer()),this._controlContainer=se.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",u.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},oi.prototype.onRemove=function(){se.remove(this._controlContainer),this._map=null,u.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},oi.prototype._checkFullscreenSupport=function(){return!!(u.window.document.fullscreenEnabled||u.window.document.mozFullScreenEnabled||u.window.document.msFullscreenEnabled||u.window.document.webkitFullscreenEnabled)},oi.prototype._setupUI=function(){var i=this._fullscreenButton=se.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);se.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",i).setAttribute("aria-hidden",!0),i.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),u.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},oi.prototype._updateTitle=function(){var i=this._getTitle();this._fullscreenButton.setAttribute("aria-label",i),this._fullscreenButton.title=i},oi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},oi.prototype._isFullscreen=function(){return this._fullscreen},oi.prototype._changeIcon=function(){(u.window.document.fullscreenElement||u.window.document.mozFullScreenElement||u.window.document.webkitFullscreenElement||u.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},oi.prototype._onClickFullscreen=function(){this._isFullscreen()?u.window.document.exitFullscreen?u.window.document.exitFullscreen():u.window.document.mozCancelFullScreen?u.window.document.mozCancelFullScreen():u.window.document.msExitFullscreen?u.window.document.msExitFullscreen():u.window.document.webkitCancelFullScreen&&u.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var rl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"}
497,il=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),la=(function(i){function o(n){i.call(this),this.options=u.extend(Object.create(rl),n),u.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.addTo=function(n){return this._map&&this.remove(),this._map=n,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","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new u.Event("open")),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&se.remove(this._content),this._container&&(se.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),delete this._map),this.fire(new u.Event("close")),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(n){return this._lngLat=u.LngLat.convert(n),this._pos=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","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer","mapboxgl-track-pointer")),this},o.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=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","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")),this},o.prototype.getElement=function(){return this._container},o.prototype.setText=function(n){return this.setDOMContent(u.window.document.createTextNode(n))},o.prototype.setHTML=function(n){var s,p=u.window.document.createDocumentFragment(),f=u.window.document.createElement("body");for(f.innerHTML=n;s=f.firstChild;)p.appendChild(s);return this.setDOMContent(p)},o.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},o.prototype.setMaxWidth=function(n){return this.options.maxWidth=n,this._update(),this},o.prototype.setDOMContent=function(n){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=se.create("div","maplibregl-popup-content mapboxgl-popup-content",this._container);return this._content.appendChild(n),this._createCloseButton(),this._update(),this._focusFirstElement(),this},o.prototype.addClassName=function(n){this._container&&this._container.classList.add(n)},o.prototype.removeClassName=function(n){this._container&&this._container.classList.remove(n)},o.prototype.setOffset=function(n){return this.options.offset=n,this._update(),this},o.prototype.toggleClassName=function(n){if(this._container)return this._container.classList.toggle(n)},o.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=se.create("button","maplibregl-popup-close-button mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},o.prototype._onMouseUp=function(n){this._update(n.point)},o.prototype._onMouseMove=function(n){this._update(n.point)},o.prototype._onDrag=function(n){this._update(n.point)},o.prototype._update=function(n){var s=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=se.create("div","maplibregl-popup mapboxgl-popup",this._map.getContainer()),this._tip=se.create("div","maplibregl-popup-tip mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(C){return s._container.classList.add(C)})),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ya(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||n)){var p=this._pos=this._trackPointer&&n?n:this._map.project(this._lngLat),f=this.options.anchor,d=(function C(P){if(P){if(typeof P=="number"){var O=Math.round(Math.sqrt(.5*Math.pow(P,2)));return{center:new u.Point(0,0),top:new u.Point(0,P),"top-left":new u.Point(O,O),"top-right":new u.Point(-O,O),bottom:new u.Point(0,-P),"bottom-left":new u.Point(O,-O),"bottom-right":new u.Point(-O,-O),left:new u.Point(P,0),right:new u.Point(-P,0)}}if(P instanceof u.Point||Array.isArray(P)){var B=u.Point.convert(P);return{center:B,top:B,"top-left":B,"top-right":B,bottom:B,"bottom-left":B,"bottom-right":B,left:B,right:B}}return{center:u.Point.convert(P.center||[0,0]),top:u.Point.convert(P.top||[0,0]),"top-left":u.Point.convert(P["top-left"]||[0,0]),"top-right":u.Point.convert(P["top-right"]||[0,0]),bottom:u.Point.convert(P.bottom||[0,0]),"bottom-left":u.Point.convert(P["bottom-left"]||[0,0]),"bottom-right":u.Point.convert(P["bottom-right"]||[0,0]),left:u.Point.convert(P.left||[0,0]),right:u.Point.convert(P.right||[0,0])}}return C(new u.Point(0,0))})(this.options.offset);if(!f){var y,v=this._container.offsetWidth,S=this._container.offsetHeight;y=p.y+d.bottom.y<S?["top"]:p.y>this._map.transform.height-S?["bottom"]:[],p.x<v/2?y.push("left"):p.x>this._map.transform.width-v/2&&y.push("right"),f=y.length===0?"bottom":y.join("-")}
497var z=p.add(d[f]).round();se.setTransform(this._container,Yn[f]+" translate("+z.x+"px,"+z.y+"px)"),Ji(this._container,f,"popup")}},o.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var n=this._container.querySelector(il);n&&n.focus()}},o.prototype._onClose=function(){this.remove()},o})(u.Evented),Qa={version:u.version,supported:St,setRTLTextPlugin:u.setRTLTextPlugin,getRTLTextPluginStatus:u.getRTLTextPluginStatus,Map:dr,NavigationControl:Hi,GeolocateControl:el,AttributionControl:Hr,ScaleControl:ni,FullscreenControl:oi,Popup:la,Marker:aa,Style:Xi,LngLat:u.LngLat,LngLatBounds:u.LngLatBounds,Point:u.Point,MercatorCoordinate:u.MercatorCoordinate,Evented:u.Evented,config:u.config,prewarm:function(){Ce().acquire(Y)},clearPrewarmedResources:function(){var i=xe;i&&(i.isPreloaded()&&i.numActive()===1?(i.release(Y),xe=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()"))},get accessToken(){return u.config.ACCESS_TOKEN},set accessToken(i){u.config.ACCESS_TOKEN=i},get baseApiUrl(){return u.config.API_URL},set baseApiUrl(i){u.config.API_URL=i},get workerCount(){return ue.workerCount},set workerCount(i){ue.workerCount=i},get maxParallelImageRequests(){return u.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(i){u.config.MAX_PARALLEL_IMAGE_REQUESTS=i},clearStorage:function(i){u.clearTileCache(i)},workerUrl:"",addProtocol:function(i,o){u.config.REGISTERED_PROTOCOLS[i]=o},removeProtocol:function(i){delete u.config.REGISTERED_PROTOCOLS[i]}};return Qa})),yt}))})(Fu)),Fu.exports}var xa=rd();const id=[7.112522,50.723949],nd=0,oh=["alidade_smooth","alidade_smooth_dark","outdoors","osm_bright"];let kl=!1;function od({initialView:we,q:He,groupSlug:qe,membershipId:ut,propertyId:yt,theme:Dt}){const u=Fo.useRef(null),St=Fo.useRef(),se=Fo.useRef(!0);return Dt=Qr.includes(oh,Dt)?Dt:oh[0],Fo.useEffect(()=>{if(!u.current)return;const dt=St.current=ad({mapContainerRef:u,theme:Dt,startPosition:we?.location||id,zoomLevel:we?.zoom_level||nd});let Fe={groupSlug:qe,membershipId:ut,propertyId:yt,q:He};return Mc({q:He})?Fe={...Fe,...Lc(dt)}:Cc(dt),sd(dt,Fe),we||(Cc(dt),Fe.membershipId&&Fe.propertyId&&ud(dt),kl=!0),()=>{console.log("removeMap"),St.current?.remove()}},[u.current]),Fo.useEffect(()=>{if(Mc({q:He})&&St.current)return ld(St.current,{groupSlug:qe,membershipId:ut,propertyId:yt,q:He})},[St.current,He,qe,ut]),Fo.useEffect(()=>{const dt=St.current;dt&&(He?(kl=!0,Cc(dt)):kl=!1,se.current?(dt.on("load",()=>{Dc(dt,{q:He,membershipId:ut,propertyId:yt,groupSlug:qe})}),se.current=!1):Dc(dt,{q:He,membershipId:ut,propertyId:yt,groupSlug:qe}))},[He,ut,yt,qe]),ht.jsx("div",{className:"map-component rounded",ref:u,style:{height:"900px"}})}function Mc({q:we}){return Qr.isEmpty(we)}function Dc(we,He){const{q:qe}=He;Mc({q:qe})&&(He={...He,...Lc(we)}),console.log("updateMembershipSource!",He),we.getSource("memberships")?.setData(lh(He))}function ad({mapContainerRef:we,theme:He,startPosition:qe,zoomLevel:ut}){console.log("createMap");const yt=new xa.Map({container:we.current,style:`https://tiles.stadiamaps.com/styles/${He}.json?property_id=6633`,center:qe,zoom:ut,maxZoom:19});return yt.addControl(new xa.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0})),yt.addControl(new xa.NavigationControl),xa.getRTLTextPluginStatus()==="unavailable"&&xa.setRTLTextPlugin("/static/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js",Dt=>{console.log(Dt)},!0),yt}function lh({groupSlug:we,membershipId:He,propertyId:qe,...ut}){return`/api/v1/locations?${ah.stringify(Qr.omitBy({group_slug:we,membership_id:He,property_id:qe,...ut},Qr.isEmpty))}`}function sd(we,He){we.on("load",function(){we.addSource("memberships",{type:"geojson",data:lh(He),cluster:!0,clusterMaxZoom:14,clusterRadius:100}),we.addLayer({id:"clusters",type:"circle",source:"memberships",filter:["has","point_count"],paint:{"circle-color":["step",["get","point_count"],"#a4a4a4",50,"#a4a4a4"],"circle-radius":["step",["get","point_count"],20,50,30,100,40,250,45,500,50,1e3,55,5e3,60]}}),we.addLayer({id:"cluster-count",type:"symbol",source:"memberships",filter:["has","point_count"],layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Bold,Noto Sans Arabic Medium,Noto Sans Ethiopic Medium"],"text-size":12}}),we.on("click","clusters",function(qe){const ut=we.queryRenderedFeatures(qe.point,{layers:["clusters"]}
497),yt=ut[0].properties.cluster_id;we.getSource("memberships").getClusterExpansionZoom(yt,function(u,St){u||we.easeTo({center:ut[0].geometry.coordinates,zoom:St})})}),we.on("mouseenter","clusters",function(){we.getCanvas().style.cursor="pointer"}),we.on("mouseenter","unclustered-point",function(){we.getCanvas().style.cursor="pointer"}),we.on("mouseleave","unclustered-point",function(){we.getCanvas().style.cursor=""}),we.on("mouseleave","clusters",function(){we.getCanvas().style.cursor=""}),we.loadImage("/static/icons/location-pin-solid.png",(qe,ut)=>{if(qe)throw qe;we.addImage("profile_marker",ut),we.addLayer({id:"unclustered-point",type:"symbol",source:"memberships",filter:["!",["has","point_count"]],layout:{"icon-image":"profile_marker","icon-size":.75}}),we.on("click","unclustered-point",function(yt){const Dt=yt.features?.at(0);Dt&&uh(we,Dt,yt.lngLat)})})})}function Lc(we){return{sw:we.getBounds().getSouthWest().toArray().join(","),ne:we.getBounds().getNorthEast().toArray().join(","),nw:we.getBounds().getNorthWest().toArray().join(","),se:we.getBounds().getSouthEast().toArray().join(",")}}function ld(we,He){const qe=Qr.debounce(()=>{const ut=Lc(we);Dc(we,{...He,...ut})},500);return we.on("pitch",qe),we.on("drag",qe),we.on("rotate",qe),we.on("zoom",qe),we.on("move",qe),()=>{console.log("untrackBounds",He),we.off("pitch",qe),we.off("drag",qe),we.off("rotate",qe),we.off("zoom",qe),we.off("move",qe)}}function uh(we,He,qe){const ut=He.geometry.coordinates,yt=He.properties.membership_id;for(;Math.abs(qe.lng-ut[0])>180;)ut[0]+=qe.lng>ut[0]?360:-360;Zf(`/members/${yt}`).then(Dt=>{const u=Qr.compact(Qr.map(Dt.profile,se=>se!=null?`<div>${se}</div>`:null)).join(""),St=`<img class="inline rounded-full mr-1" src="${Dt.images.small}" alt="" aria-hidden="true"/>`;new xa.Popup({offset:25,className:"border-t-2 border-black",closeButton:!1,focusAfterOpen:!1}).setLngLat(ut).setHTML(`<div class="flex flex-col -mb-[5px]"><div><a class="font-bold" href="/members/${yt}" target="_blank">${St}${Dt.name}</a></div>${u?"<div class='mt-[3px] border-t-2 border-black'>"+u+"</div>":""}</div>`).addTo(we)})}function ud(we){setTimeout(function(){const[,He]=Qr.partition(we.querySourceFeatures("memberships"),qe=>qe.properties.cluster_id);if(ch(He)){const qe={geometry:{coordinates:He[0].geometry.coordinates},properties:{id:He[0].properties.id,membership_id:He[0].properties.membership_id}};uh(we,qe,{lng:He[0].geometry.coordinates[0],lat:He[0].geometry.coordinates[1]})}},8e3)}function ch(we){return we.every(He=>Qr.isEqual(He.geometry.coordinates,we[0].geometry.coordinates))}function Cc(we){console.log("setupFitAll"),we.on("sourcedata",async function(He){if(He.isSourceLoaded&&He.sourceId==="memberships"){if(!kl)return;console.log("FITTING");const ut=new xa.LngLatBounds;we.zoomTo(1,{duration:800,animate:!0,offset:[100,50]}),setTimeout(async function(){const yt=we.getSource("memberships"),[Dt,u]=Qr.partition(we.querySourceFeatures("memberships"),se=>se.properties.cluster_id);u.forEach(se=>ut.extend(se.geometry.coordinates)),Dt.forEach(se=>ut.extend(se.geometry.coordinates));const St=Qr.min(await Promise.all(Dt.map(se=>new Promise(dt=>{yt.getClusterExpansionZoom(se.properties.cluster_id,(Fe,li)=>{dt(li+1)})}))))||ch(u)?11:6;(!Qr.isEmpty(u)||!Qr.isEmpty(Dt))&&we.fitBounds(ut,{maxZoom:St,speed:.7,padding:100})},1e3),kl=!1}})}function cd(){return ht.jsx("div",{children:ht.jsx("div",{className:"row",children:ht.jsxs("div",{className:"span6",children:[ht.jsx("h2",{children:I18n.t("js.maps.disabled.title")}),ht.jsx("p",{children:I18n.t("js.maps.disabled.text")})]})})})}function pd({groupContext:we}){const He=Tixxt.currentNetwork.group_categories().models,qe=[{label:I18n.t("js.directory.member_tab"),url:"#"}];we||qe.push({label:I18n.t("js.directory.channel_tab"),url:"/channels"}),Qr.isEmpty(He)||Qr.forEach(He,yt=>qe.push({label:yt.attributes.plural_name,url:`directory/${yt.attributes.slug}`}));const ut=window.isApp?Qf:ed;return ht.jsx("div",{className:"tabs-region",children:ht.jsx(ut,{tabs:qe,selectTabIndex:()=>{},selectedTabIndex:0})})}function hd(){const we=Gf(),He=Xf(),{q:qe}=sh(),[ut,yt]=Fo.useState(qe||"");return Fo.useEffect(()=>{yt(qe||"")},[qe]),ht.jsxs("form",{className:Bu("search-form group",{flex:!window.isApp}),children:[ht.jsxs("div",{className:"flex",children:[ht.jsx("input",{name:"search",type:"text",className:Bu("rounded-r-none!",{"w-192":!window.isApp,flex:window.isApp}),value:ut,onChange:Dt=>yt(Dt.target.value)}),ht.jsx("button",{className:"btn btn-primary rounded-l-none",onClick:Dt=>{Dt.preventDefault(),He(`${we.pathname}?${ah.stringify({q:ut})}`)},children:ht.jsx(kc,{icon:$f})})]}),ht.jsx("div",{className:Bu("text-sm ml-2",{"invisible group-focus-within:visible":ut===""}),children:ht.jsx(Wf,{hint:I18n.t("js.maps.search.hint")})})]})}function fd(){const{groupSlug:we}=Kf();return window.isApp?ht.jsxs(Cl.Wrapper,{children:[ht.jsx(Cl.Toggle,{}),ht.jsxs(Cl,{children:[ht.jsx(Cl.Item,{title:I18n.t("js.maps.list"),text:I18n.t("js.maps.list"),url:we?`/groups/${we}/members`:"/members",icon:rh}),ht.jsx(Cl.Item,{title:I18n.t("js.maps.map"),text:I18n.t("js.maps.map"),icon:ih})]})]}):ht.jsxs("div",{className:"btn-group items-start z-0",children:[ht.jsx("a",{className:"btn btn-light",title:I18n.t("js.maps.list"),href:we?`/groups/${we}/members`:"/members",children:ht.jsx(kc,{icon:rh})}),ht.jsx("a",{className:"btn btn-light active",title:I18n.t("js.maps.map"),onClick:He=>{He.preventDefault()},children:ht.jsx(kc,{icon:ih})})]})}const dd=we=>
497we.network,md=we=>Qr.get(dd(we),["config","maps"],{});function Sd({groupContext:we}){const{x:He,y:qe,q:ut,groupSlug:yt,membership_id:Dt,property_id:u}=sh(),St=Hf(md),se=He&&qe?{location:[He,qe],zoom_level:10}:St.initial_view;return ht.jsxs(ht.Fragment,{children:[ht.jsx(Jf,{groupSlug:yt,title:I18n.t("js.maps.title")}),ht.jsx(Yf,{groupSlug:yt}),He||qe||yt||Dt?null:ht.jsxs(ht.Fragment,{children:[ht.jsx(pd,{groupContext:we}),ht.jsxs("div",{className:Bu("btn-toolbar my-4",{"flex gap-2 flex-nowrap items-start":window.isApp}),children:[ht.jsx(hd,{}),ht.jsx(fd,{})]})]}),St.enabled?ht.jsx(od,{initialView:se,q:ut,groupSlug:yt,membershipId:Dt,propertyId:u,theme:St.theme}):ht.jsx(cd,{})]})}export{Sd as default};
498//# sourceMappingURL=MemberMapPage-C_2Y-dC2.js.map

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.