PageSourceSearch

https://perfma.com/_next/static/chunks/2c796e83.ae629da5b259de78.js

js perfma.com collected 2026-10-04 00:26:24 UTC 760,646 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2634],{6158:function(a){!function(c,b){a.exports=b()}(this,function(){"use strict";var c,d,b;function a(g,a){if(c){if(d){var f="var sharedChunk = {}; ("+c+")(sharedChunk); ("+d+")(sharedChunk);",e={};c(e),b=a(e),"undefined"!=typeof window&&(b.workerUrl=window.URL.createObjectURL(new Blob([f],{type:"text/javascript"})))}else d=a}else c=a}return a(["exports"],function(a){function aK(b,a){return b(a={exports:{}},a.exports),a.exports}var aL,au,aX,dU=av;function av(a,c,d,b){this.cx=3*a,this.bx=3*(d-a)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(b-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=a,this.p1y=b,this.p2x=d,this.p2y=b}av.prototype.sampleCurveX=function(a){return((this.ax*a+this.bx)*a+this.cx)*a},av.prototype.sampleCurveY=function(a){return((this.ay*a+this.by)*a+this.cy)*a},av.prototype.sampleCurveDerivativeX=function(a){return(3*this.ax*a+2*this.bx)*a+this.cx},av.prototype.solveCurveX=function(c,e){var b,d,a,f,g;for(void 0===e&&(e=1e-6),a=c,g=0;g<8;g++){if(Math.abs(f=this.sampleCurveX(a)-c)<e)return a;var h=this.sampleCurveDerivativeX(a);if(1e-6>Math.abs(h))break;a-=f/h}if((a=c)<(b=0))return b;if(a>(d=1))return d;for(;b<d&&!(Math.abs((f=this.sampleCurveX(a))-c)<e);)c>f?b=a:d=a,a=.5*(d-b)+b;return a},av.prototype.solve=function(a,b){return this.sampleCurveY(this.solveCurveX(a,b))};var aY=bn;function bn(a,b){this.x=a,this.y=b}bn.prototype={clone:function(){return new bn(this.x,this.y)},add:function(a){return this.clone()._add(a)},sub:function(a){return this.clone()._sub(a)},multByPoint:function(a){return this.clone()._multByPoint(a)},divByPoint:function(a){return this.clone()._divByPoint(a)},mult:function(a){return this.clone()._mult(a)},div:function(a){return this.clone()._div(a)},rotate:function(a){return this.clone()._rotate(a)},rotateAround:function(a,b){return this.clone()._rotateAround(a,b)},matMult:function(a){return this.clone()._matMult(a)},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(a){return this.x===a.x&&this.y===a.y},dist:function(a){return Math.sqrt(this.distSqr(a))},distSqr:function(a){var b=a.x-this.x,c=a.y-this.y;return b*b+c*c},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(a){return Math.atan2(this.y-a.y,this.x-a.x)},angleWith:function(a){return this.angleWithSep(a.x,a.y)},angleWithSep:function(a,b){return Math.atan2(this.x*b-this.y*a,this.x*a+this.y*b)},_matMult:function(a){var b=a[2]*this.x+a[3]*this.y;return this.x=a[0]*this.x+a[1]*this.y,this.y=b,this},_add:function(a){return this.x+=a.x,this.y+=a.y,this},_sub:function(a){return this.x-=a.x,this.y-=a.y,this},_mult:function(a){return this.x*=a,this.y*=a,this},_div:function(a){return this.x/=a,this.y/=a,this},_multByPoint:function(a){return this.x*=a.x,this.y*=a.y,this},_divByPoint:function(a){return this.x/=a.x,this.y/=a.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var a=this.y;return this.y=this.x,this.x=-a,this},_rotate:function(a){var b=Math.cos(a),c=Math.sin(a),d=c*this.x+b*this.y;return this.x=b*this.x-c*this.y,this.y=d,this},_rotateAround:function(b,a){var c=Math.cos(b),d=Math.sin(b),e=a.y+d*(this.x-a.x)+c*(this.y-a.y);return this.x=a.x+c*(this.x-a.x)-d*(this.y-a.y),this.y=e,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},bn.convert=function(a){return a instanceof bn?a:Array.isArray(a)?new bn(a[0],a[1]):a};var j="undefined"!=typeof self?self:{};function bo(a,b,c,d){var e=new dU(a,b,c,d);return function(a){return e.solve(a)}}var b_=bo(.25,.1,.25,1);function b0(a,b,c){return Math.min(c,Math.max(b,a))}function b1(e,a,c){var b=c-a,d=((e-a)%b+b)%b+a;return d===a?c:d}function b2(c){for(var d=[],a=arguments.length-1;a-- >0;)d[a]=arguments[a+1];for(var b=0,e=d;b<e.length;b+=1){var f=e[b];for(var g in f)c[g]=f[g]}return c}var dV=1;function b3(){return dV++}function dW(){return function b(a){return a?(a^16*Math.random()>>a/4).toString(16):([1e7]+ -[1e3]+ -4e3+ -8e3+ -1e11).replace(/[018]/g,b)}()}function dX(a){return!!a&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(a)}
vendor: 7,251 bytes, line 1
1function b4(a,b){a.forEach(function(a){b[a]&&(b[a]=b[a].bind(b))})}function b5(a,b){return -1!==a.indexOf(b,a.length-b.length)}function b6(a,d,e){var c={};for(var b in a)c[b]=d.call(e||this,a[b],b,a);return c}function b7(a,d,e){var c={};for(var b in a)d.call(e||this,a[b],b,a)&&(c[b]=a[b]);return c}function b8(a){return Array.isArray(a)?a.map(b8):"object"==typeof a&&a?b6(a,b8):a}var dY={};function b9(a){dY[a]||("undefined"!=typeof console&&console.warn(a),dY[a]=!0)}function dZ(a,b,c){return(c.y-a.y)*(b.x-a.x)>(b.y-a.y)*(c.x-a.x)}function d$(a){for(var c=0,b=0,d=a.length,e=d-1,f=void 0,g=void 0;b<d;e=b++)c+=((g=a[e]).x-(f=a[b]).x)*(f.y+g.y);return c}function ca(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function d_(c){var a={};if(c.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(f,c,d,e){var b=d||e;return a[c]=!b||b.toLowerCase(),""}),a["max-age"]){var b=parseInt(a["max-age"],10);isNaN(b)?delete a["max-age"]:a["max-age"]=b}return a}var d0=null;function d1(b){if(null==d0){var a=b.navigator?b.navigator.userAgent:null;d0=!!b.safari||!(!a||!(/\b(iPad|iPhone|iPod)\b/.test(a)||a.match("Safari")&&!a.match("Chrome")))}return d0}function d2(b){try{var a=j[b];return a.setItem("_mapbox_test_",1),a.removeItem("_mapbox_test_"),!0}catch(c){return!1}}var d3,aZ,d4,a$,cb=j.performance&&j.performance.now?j.performance.now.bind(j.performance):Date.now.bind(Date),d5=j.requestAnimationFrame||j.mozRequestAnimationFrame||j.webkitRequestAnimationFrame||j.msRequestAnimationFrame,d6=j.cancelAnimationFrame||j.mozCancelAnimationFrame||j.webkitCancelAnimationFrame||j.msCancelAnimationFrame,cc={now:cb,frame:function(a){var b=d5(a);return{cancel:function(){return d6(b)}}},getImageData:function(a,b){void 0===b&&(b=0);var c=j.document.createElement("canvas"),d=c.getContext("2d");if(!d)throw Error("failed to create canvas 2d context");return c.width=a.width,c.height=a.height,d.drawImage(a,0,0,a.width,a.height),d.getImageData(-b,-b,a.width+2*b,a.height+2*b)},resolveURL:function(a){return d3||(d3=j.document.createElement("a")),d3.href=a,d3.href},hardwareConcurrency:j.navigator&&j.navigator.hardwareConcurrency||4,get devicePixelRatio(){return j.devicePixelRatio},get prefersReducedMotion(){return!!j.matchMedia&&(null==aZ&&(aZ=j.matchMedia("(prefers-reduced-motion: reduce)")),aZ.matches)}},cd={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"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},ce={supported:!1,testSupport:function(a){!d7&&a$&&(d8?d9(a):d4=a)}},d7=!1,d8=!1;function d9(a){var b=a.createTexture();a.bindTexture(a.TEXTURE_2D,b);try{if(a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,a$),a.isContextLost())return;ce.supported=!0}catch(c){}a.deleteTexture(b),d7=!0}j.document&&((a$=j.document.createElement("img")).onload=function(){d4&&d9(d4),d4=null,d8=!0},a$.onerror=function(){d7=!0,d4=null},a$.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var w=function(a,b){this._transformRequestFn=a,this._customAccessToken=b,this._createSkuToken()};function cf(a){return 0===a.indexOf("mapbox:")}w.prototype._createSkuToken=function(){var a=function(){for(var a="",b=0;b<10;b++)a+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1","01",a].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=a.token,this._skuTokenExpiresAt=a.tokenExpiresAt},w.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},w.prototype.transformRequest=function(a,b){return this._transformRequestFn&&this._transformRequestFn(a,b)||{url:a}},w.prototype.normalizeStyleURL=function(a,c){if(!cf(a))return a;var b=ed(a);return b.path="/styles/v1"+b.path,this._makeAPIURL(b,this._customAccessToken||c)},w.prototype.normalizeGlyphsURL=function(a,c){if(!cf(a))return a;var b=ed(a);return b.path="/fonts/v1"+b.path,this._makeAPIURL(b,this._customAccessToken||c)},w.prototype.normalizeSourceURL=function(b,c){if(!cf(b))return b;var a=ed(b);return a.path="/v4/"+a.authority+".json",a.params.push("secure"),this._makeAPIURL(a,this._customAccessToken||c)},w.prototype.normalizeSpriteURL=function(b,c,d,e){var a=ed(b);return cf(b)?(a.path="/styles/v1"+a.path+"/sprite"+c+d,this._makeAPIURL(a,this._customAccessToken||e)):(a.path+=""+c+d,ee(a))},w.prototype.normalizeTileURL=function(b,d){if(this._isSkuTokenExpired()&&this._createSkuToken(),b&&!cf(b))return b;var a=ed(b);a.path=a.path.replace(/(\.(png|jpg)\d*)(?=$)/,(cc.devicePixelRatio>=2||512===d?"@2x":"")+(ce.supported?".webp":"$1")),a.path=a.path.replace(/^.+\/v4\//,"/"),a.path="/v4"+a.path;var c=this._customAccessToken||function(d){for(var a=0,b=d;a<b.length;a+=1){var c=b[a].match(/^access_token=(.*)$/);if(c)return c[1]}return null}(a.params)||cd.ACCESS_TOKEN;return cd.REQUIRE_ACCESS_TOKEN&&c&&this._skuToken&&a.params.push("sku="+this._skuToken),this._makeAPIURL(a,c)},w.prototype.canonicalizeTileURL=function(d,e){var a=ed(d);if(!a.path.match(/(^\/v4\/)/)||!a.path.match(/\.[\w]+$/))return d;var c="mapbox://tiles/";c+=a.path.replace("/v4/","");var b=a.params;return e&&(b=b.filter(function(a){return!a.match(/^access_token=/)})),b.length&&(c+="?"+b.join("&")),c},w.prototype.canonicalizeTileset=function(f,d){for(var g=!!d&&cf(d),a=[],b=0,e=f.tiles||[];b<e.length;b+=1){var c=e[b];eb(c)?a.push(this.canonicalizeTileURL(c,g)):a.push(c)}return a},w.prototype._makeAPIURL=function(a,b){var d="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",c=ed(cd.API_URL);if(a.protocol=c.protocol,a.authority=c.authority,"http"===a.protocol){var e=a.params.indexOf("secure");e>=0&&a.params.splice(e,1)}if("/"!==c.path&&(a.path=""+c.path+a.path),!cd.REQUIRE_ACCESS_TOKEN)return ee(a);if(!(b=b||cd.ACCESS_TOKEN))throw Error("An API access token is required to use Mapbox GL. "+d);if("s"===b[0])throw Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+d);return a.params=a.params.filter(function(a){return -1===a.indexOf("access_token")}),a.params.push("access_token="+b),ee(a)};var ea=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function eb(a){return ea.test(a)}var ec=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ed(b){var a=b.match(ec);if(!a)throw Error("Unable to parse URL object");return{protocol:a[1],authority:a[2],path:a[3]||"/",params:a[4]?a[4].split("&"):[]}}function ee(a){var b=a.params.length?"?"+a.params.join("&"):"";return a.protocol+"://"+a.authority+a.path+b}function ef(b){if(!b)return null;var a=b.split(".");if(!a||3!==a.length)return null;try{return JSON.parse(decodeURIComponent(j.atob(a[1]).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch(c){return null}}var I=function(a){this.type=a,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};
1I.prototype.getStorageKey=function(c){var a,b=ef(cd.ACCESS_TOKEN);return a=b&&b.u?j.btoa(encodeURIComponent(b.u).replace(/%([0-9A-F]{2})/g,function(b,a){return String.fromCharCode(Number("0x"+a))})):cd.ACCESS_TOKEN||"",c?"mapbox.eventData."+c+":"+a:"mapbox.eventData:"+a},I.prototype.fetchEventData=function(){var c=d2("localStorage"),d=this.getStorageKey(),e=this.getStorageKey("uuid");if(c)try{var a=j.localStorage.getItem(d);a&&(this.eventData=JSON.parse(a));var b=j.localStorage.getItem(e);b&&(this.anonId=b)}catch(f){b9("Unable to read from LocalStorage")}},I.prototype.saveEventData=function(){var a=d2("localStorage"),b=this.getStorageKey(),c=this.getStorageKey("uuid");if(a)try{j.localStorage.setItem(c,this.anonId),Object.keys(this.eventData).length>=1&&j.localStorage.setItem(b,JSON.stringify(this.eventData))}catch(d){b9("Unable to write to LocalStorage")}},I.prototype.processRequests=function(a){},I.prototype.postEvent=function(d,a,h,e){var i=this;if(cd.EVENTS_URL){var b=ed(cd.EVENTS_URL);b.params.push("access_token="+(e||cd.ACCESS_TOKEN||""));var c={event:this.type,created:new Date(d).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.2",skuId:"01",userId:this.anonId},f=a?b2(c,a):c,g={url:ee(b),headers:{"Content-Type":"text/plain"},body:JSON.stringify([f])};this.pendingRequest=ep(g,function(a){i.pendingRequest=null,h(a),i.saveEventData(),i.processRequests(e)})}},I.prototype.queueRequest=function(a,b){this.queue.push(a),this.processRequests(b)};var eg,eh,cg=function(b){function a(){b.call(this,"map.load"),this.success={},this.skuToken=""}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.postMapLoadEvent=function(a,c,d,b){this.skuToken=d,(cd.EVENTS_URL&&b||cd.ACCESS_TOKEN&&Array.isArray(a)&&a.some(function(a){return cf(a)||eb(a)}))&&this.queueRequest({id:c,timestamp:Date.now()},b)},a.prototype.processRequests=function(c){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var a=this.queue.shift(),b=a.id,d=a.timestamp;b&&this.success[b]||(this.anonId||this.fetchEventData(),dX(this.anonId)||(this.anonId=dW()),this.postEvent(d,{skuToken:this.skuToken},function(a){a||b&&(e.success[b]=!0)},c))}},a}(I),bp=new(function(b){function a(a){b.call(this,"appUserTurnstile"),this._customAccessToken=a}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.postTurnstileEvent=function(a,b){cd.EVENTS_URL&&cd.ACCESS_TOKEN&&Array.isArray(a)&&a.some(function(a){return cf(a)||eb(a)})&&this.queueRequest(Date.now(),b)},a.prototype.processRequests=function(e){var i=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var c=ef(cd.ACCESS_TOKEN),f=c?c.u:cd.ACCESS_TOKEN,a=f!==this.eventData.tokenU;dX(this.anonId)||(this.anonId=dW(),a=!0);var b=this.queue.shift();if(this.eventData.lastSuccess){var g=new Date(this.eventData.lastSuccess),h=new Date(b),d=(b-this.eventData.lastSuccess)/864e5;a=a||d>=1||d< -1||g.getDate()!==h.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(b,{"enabled.telemetry":!1},function(a){a||(i.eventData.lastSuccess=b,i.eventData.tokenU=f)},e)}},a}(I)),ch=bp.postTurnstileEvent.bind(bp),bq=new cg,ci=bq.postMapLoadEvent.bind(bq),ei=500,ej=50;function ek(){j.caches&&!eg&&(eg=j.caches.open("mapbox-tiles"))}function el(a){var b=a.indexOf("?");return b<0?a:a.slice(0,b)}var em,en=1/0;function cj(){return null==em&&(em=j.OffscreenCanvas&&new j.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof j.createImageBitmap),em}var br={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(br);var ck,cl,eo=function(b){function a(a,c,d){401===c&&eb(d)&&(a+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),b.call(this,a),this.status=c,this.url=d,this.name=this.constructor.name,this.message=a}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},a}(Error),cm=ca()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===j.location.protocol?j.parent:j).location.href},cn=function(b,d){var f,a,k,g,h,c,l,m,i,e,n;if(!(/^file:/.test(f=b.url)||/^file:/.test(cm())&&!/^\w+:/.test(f))){if
1(j.fetch&&j.Request&&j.AbortController&&j.Request.prototype.hasOwnProperty("signal"))return a=b,k=d,h=new j.AbortController,c=new j.Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,referrer:cm(),signal:h.signal}),l=!1,m=!1,i=(g=c.url).indexOf("sku=")>0&&eb(g),"json"===a.type&&c.headers.set("Accept","application/json"),e=function(b,d,e){if(!m){if(b&&"SecurityError"!==b.message&&b9(b),d&&e)return n(d);var f=Date.now();j.fetch(c).then(function(b){if(b.ok){var c=i?b.clone():null;return n(b,c,f)}return k(new eo(b.statusText,b.status,a.url))}).catch(function(a){20!==a.code&&k(Error(a.message))})}},n=function(b,d,e){("arrayBuffer"===a.type?b.arrayBuffer():"json"===a.type?b.json():b.text()).then(function(a){m||(d&&e&&function(e,a,c){if(ek(),eg){var d={status:a.status,statusText:a.statusText,headers:new j.Headers};a.headers.forEach(function(a,b){return d.headers.set(b,a)});var b=d_(a.headers.get("Cache-Control")||"");b["no-store"]||(b["max-age"]&&d.headers.set("Expires",new Date(c+1e3*b["max-age"]).toUTCString()),new Date(d.headers.get("Expires")).getTime()-c<42e4||function(a,b){if(void 0===eh)try{new Response(new ReadableStream),eh=!0}catch(c){eh=!1}eh?b(a.body):a.blob().then(b)}(a,function(a){var b=new j.Response(a,d);ek(),eg&&eg.then(function(a){return a.put(el(e.url),b)}).catch(function(a){return b9(a.message)})}))}}(c,d,e),l=!0,k(null,a,b.headers.get("Cache-Control"),b.headers.get("Expires")))}).catch(function(a){m||k(Error(a.message))})},i?function(b,a){if(ek(),!eg)return a(null);var c=el(b.url);eg.then(function(b){b.match(c).then(function(d){var e=function(a){if(!a)return!1;var b=new Date(a.headers.get("Expires")||0),c=d_(a.headers.get("Cache-Control")||"");return b>Date.now()&&!c["no-cache"]}(d);b.delete(c),e&&b.put(c,d.clone()),a(null,d,e)}).catch(a)}).catch(a)}(c,e):e(null,null),{cancel:function(){m=!0,l||h.abort()}};if(ca()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",b,d,void 0,!0)}return function(b,d){var a=new j.XMLHttpRequest;for(var c in a.open(b.method||"GET",b.url,!0),"arrayBuffer"===b.type&&(a.responseType="arraybuffer"),b.headers)a.setRequestHeader(c,b.headers[c]);return"json"===b.type&&(a.responseType="text",a.setRequestHeader("Accept","application/json")),a.withCredentials="include"===b.credentials,a.onerror=function(){d(Error(a.statusText))},a.onload=function(){if((a.status>=200&&a.status<300||0===a.status)&&null!==a.response){var c=a.response;if("json"===b.type)try{c=JSON.parse(a.response)}catch(e){return d(e)}d(null,c,a.getResponseHeader("Cache-Control"),a.getResponseHeader("Expires"))}else d(new eo(a.statusText,a.status,b.url))},a.send(b.body),{cancel:function(){return a.abort()}}}(b,d)},co=function(a,b){return cn(b2(a,{type:"arrayBuffer"}),b)},ep=function(a,b){return cn(b2(a,{method:"POST"}),b)},eq="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";ck=[],cl=0;var cp=function(a,c){if(ce.supported&&(a.headers||(a.headers={}),a.headers.accept="image/webp,*/*"),cl>=cd.MAX_PARALLEL_IMAGE_REQUESTS){var b={requestParameters:a,callback:c,cancelled:!1,cancel:function(){this.cancelled=!0}};return ck.push(b),b}cl++;var d=!1,e=function(){if(!d)for(d=!0,cl--;ck.length&&cl<cd.MAX_PARALLEL_IMAGE_REQUESTS;){var a=ck.shift();a.cancelled||(a.cancel=cp(a.requestParameters,a.callback).cancel)}},f=co(a,function(f,b,l,m){var d,n,g,h,a,i,k;e(),f?c(f):b&&(cj()?function(a,c){var b=new j.Blob([new Uint8Array(a)],{type:"image/png"});j.createImageBitmap(b).then(function(a){c(null,a)}).catch(function(a){c(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."))})}(b,c):(d=b,n=c,g=l,h=m,a=new j.Image,i=j.URL,a.onload=function(){n(null,a),i.revokeObjectURL(a.src),a.onload=null,j.requestAnimationFrame(function(){a.src=eq})},a.onerror=function(){return n(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."))},k=new j.Blob([new Uint8Array(d)],{type:"image/png"}),a.cacheControl=g,a.expires=h,a.src=d.byteLength?i.createObjectURL(k):eq))});return{cancel:function(){f.cancel(),e()}}};
vendor: 1,697 bytes, line 1
1function er(a,c,b){b[a]&& -1!==b[a].indexOf(c)||(b[a]=b[a]||[],b[a].push(c))}function es(b,d,a){if(a&&a[b]){var c=a[b].indexOf(d);-1!==c&&a[b].splice(c,1)}}var bs=function(b,a){void 0===a&&(a={}),b2(this,a),this.type=b},cq=function(a){function b(c,b){void 0===b&&(b={}),a.call(this,"error",b2({error:c},b))}return a&&(b.__proto__=a),(b.prototype=Object.create(a&&a.prototype)).constructor=b,b}(bs),B=function(){};B.prototype.on=function(a,b){return this._listeners=this._listeners||{},er(a,b,this._listeners),this},B.prototype.off=function(a,b){return es(a,b,this._listeners),es(a,b,this._oneTimeListeners),this},B.prototype.once=function(a,b){return this._oneTimeListeners=this._oneTimeListeners||{},er(a,b,this._oneTimeListeners),this},B.prototype.fire=function(a,i){"string"==typeof a&&(a=new bs(a,i||{}));var b=a.type;if(this.listens(b)){a.target=this;for(var c=0,e=this._listeners&&this._listeners[b]?this._listeners[b].slice():[];c<e.length;c+=1)e[c].call(this,a);for(var d=0,f=this._oneTimeListeners&&this._oneTimeListeners[b]?this._oneTimeListeners[b].slice():[];d<f.length;d+=1){var g=f[d];es(b,g,this._oneTimeListeners),g.call(this,a)}var h=this._eventedParent;h&&(b2(a,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),h.fire(a))}else a instanceof cq&&console.error(a.error);return this},B.prototype.listens=function(a){return this._listeners&&this._listeners[a]&&this._listeners[a].length>0||this._oneTimeListeners&&this._oneTimeListeners[a]&&this._oneTimeListeners[a].length>0||this._eventedParent&&this._eventedParent.listens(a)},B.prototype.setEventedParent=function(a,b){return this._eventedParent=a,this._eventedParentData=b,this};var b
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"}}}
vendor: 50,591 bytes, line 1
1,cr=function(b,a,d,c){this.message=(b?b+": ":"")+d,c&&(this.identifier=c),null!=a&&a.__line__&&(this.line=a.__line__)};function cs(a){var b=a.value;return b?[new cr(a.key,b,"constants have been deprecated as of v8")]:[]}function et(c){for(var d=[],a=arguments.length-1;a-- >0;)d[a]=arguments[a+1];for(var b=0,e=d;b<e.length;b+=1){var f=e[b];for(var g in f)c[g]=f[g]}return c}function eu(a){return a instanceof Number||a instanceof String||a instanceof Boolean?a.valueOf():a}function ev(a){if(Array.isArray(a))return a.map(ev);if(a instanceof Object&&!(a instanceof Number||a instanceof String||a instanceof Boolean)){var b={};for(var c in a)b[c]=ev(a[c]);return b}return eu(a)}var ew=function(a){function b(c,b){a.call(this,b),this.message=b,this.key=c}return a&&(b.__proto__=a),(b.prototype=Object.create(a&&a.prototype)).constructor=b,b}(Error),a_=function(e,a){void 0===a&&(a=[]),this.parent=e,this.bindings={};for(var b=0,c=a;b<c.length;b+=1){var d=c[b];this.bindings[d[0]]=d[1]}};a_.prototype.concat=function(a){return new a_(this,a)},a_.prototype.get=function(a){if(this.bindings[a])return this.bindings[a];if(this.parent)return this.parent.get(a);throw Error(a+" not found in scope.")},a_.prototype.has=function(a){return!!this.bindings[a]|| !!this.parent&&this.parent.has(a)};var ct={kind:"null"},d={kind:"number"},k={kind:"string"},g={kind:"boolean"},R={kind:"color"},aw={kind:"object"},l={kind:"value"},cu={kind:"collator"},cv={kind:"formatted"},cw={kind:"resolvedImage"};function S(a,b){return{kind:"array",itemType:a,N:b}}function ex(a){if("array"===a.kind){var b=ex(a.itemType);return"number"==typeof a.N?"array<"+b+", "+a.N+">":"value"===a.itemType.kind?"array":"array<"+b+">"}return a.kind}var ey=[ct,d,k,g,R,cv,aw,S(l),cw];function ez(b,a){if("error"===a.kind)return null;if("array"===b.kind){if("array"===a.kind&&(0===a.N&&"value"===a.itemType.kind||!ez(b.itemType,a.itemType))&&("number"!=typeof b.N||b.N===a.N))return null}else{if(b.kind===a.kind)return null;if("value"===b.kind){for(var c=0,d=ey;c<d.length;c+=1)if(!ez(d[c],a))return null}}return"Expected "+ex(b)+" but found "+ex(a)+" instead."}function eA(b,a){return a.some(function(a){return a.kind===b.kind})}function eB(b,a){return a.some(function(a){return"null"===a?null===b:"array"===a?Array.isArray(b):"object"===a?b&&!Array.isArray(b)&&"object"==typeof b:a===typeof b})}var eC=aK(function(b,a){var c={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 d(a){return(a=Math.round(a))<0?0:a>255?255:a}function e(a){return d("%"===a[a.length-1]?parseFloat(a)/100*255:parseInt(a))}function f(a){var b;return(b="%"===a[a.length-1]?parseFloat(a)/100:parseFloat(a))<0?0:b>1?1:b}function g(b,c,a){return a<0?a+=1:a>1&&(a-=1),6*a<1?b+(c-b)*a*6:2*a<1?c:3*a<2?b+(c-b)*(2/3-a)*6:b}try{a.parseCSSColor=function(q){var a,b=q.replace(/ /g,"").toLowerCase();if(b in c)return c[b].slice();if("#"===b[0])return 4===b.length?(a=parseInt(b.substr(1),16))>=0&&a<=4095?[(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,1]:null:7===b.length&&(a=parseInt(b.substr(1),16))>=0&&a<=16777215?[(16711680&a)>>16,(65280&a)>>8,255&a,1]:null;var j=b.indexOf("("),p=b.indexOf(")");if(-1!==j&&p+1===b.length){var r=b.substr(0,j),h=b.substr(j+1,p-(j+1)).split(","),k=1;switch(r){case"rgba":if(4!==h.length)break;k=f(h.pop());case"rgb":return 3!==h.length?null:[e(h[0]),e(h[1]),e(h[2]),k];case"hsla":if(4!==h.length)break;k=f(h.pop());case"hsl":if(3!==h.length)break;var m=(parseFloat(h[0])%360+360)%360/360,n=f(h[1]),i=f(h[2]),l=i<=.5?i*(n+1):i+n-i*n,o=2*i-l;return[d(255*g(o,l,m+1/3)),d(255*g(o,l,m)),d(255*g(o,l,m-1/3)),k]}}return null}}catch(h){}}).parseCSSColor,u=function(b,c,d,a){void 0===a&&(a=1),this.r=b,this.g=c,this.b=d,this.a=a};u.parse=function(b){if(b){if(b instanceof u)return b;if("string"==typeof b){var a=eC(b);if(a)return new u(a[0]/255*a[3],a[1]/255*a[3],a[2]/255*a[3],a[3])}}},u.prototype.toString=function(){var a=this.toArray(),b=a[1],c=a[2],d=a[3];return"rgba("+Math.round(a[0])+","+Math.round(b)+","+Math.round(c)+","+d+")"},u.prototype.toArray=function(){var a=this.a;return 0===a?[0,0,0,0]:[255*this.r/a,255*this.g/a,255*this.b/a,a]},u.black=new u(0,0,0,1),u.white=new u(1,1,1,1),u.transparent=new u(0,0,0,0),u.red=new u(1,0,0,1);var bt=function(b,a,c){this.sensitivity=b?a?"variant":"case":a?"accent":"base",this.locale=c,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};bt.prototype.compare=function(a,b){return this.collator.compare(a,b)},bt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var eD=function(a,b,c,d,e){this.text=a,this.image=b,this.scale=c,this.fontStack=d,this.textColor=e},ax=function(a){this.sections=a};ax.fromString=function(a){return new ax([new eD(a,null,null,null,null)])},ax.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(a){return 0!==a.text.length||a.image&&0!==a.image.name.length})},ax.factory=function(a){return a instanceof ax?a:ax.fromString(a)},ax.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(a){return a.text}).join("")},ax.prototype.serialize=function(){for(var b=["format"],d=0,e=this.sections;d<e.length;d+=1){var a=e[d];if(a.image)b.push(["image",a.image.name]);else{b.push(a.text);var c={};a.fontStack&&(c["text-font"]=["literal",a.fontStack.split(",")]),a.scale&&(c["font-scale"]=a.scale),a.textColor&&(c["text-color"]=["rgba"].concat(a.textColor.toArray())),b.push(c)}}return b};var aM=function(a){this.name=a.name,this.available=a.available};function eE(b,c,d,a){return"number"==typeof b&&b>=0&&b<=255&&"number"==typeof c&&c>=0&&c<=255&&"number"==typeof d&&d>=0&&d<=255?void 0===a||"number"==typeof a&&a>=0&&a<=1?null:"Invalid rgba value ["+[b,c,d,a].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof a?[b,c,d,a]:[b,c,d]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function eF(a){if(null===a||"string"==typeof a||"boolean"==typeof a||"number"==typeof a||a instanceof u||a instanceof bt||a instanceof ax||a instanceof aM)return!0;if(Array.isArray(a)){for(var b=0,c=a;b<c.length;b+=1)if(!eF(c[b]))return!1;return!0}if("object"==typeof a){for(var d in a)if(!eF(a[d]))return!1;return!0}return!1}function eG(a){if(null===a)return ct;if("string"==typeof a)return k;if("boolean"==typeof a)return g;if("number"==typeof a)return d;if(a instanceof u)return R;if(a instanceof bt)return cu;if(a instanceof ax)return cv;if(a instanceof aM)return cw;if(Array.isArray(a)){for(var b,h=a.length,c=0,e=a;c<e.length;c+=1){var f=eG(e[c]);if(b){if(b===f)continue;b=l;break}b=f}return S(b||l,h)}return aw}function eH(a){var b=typeof a;return null===a?"":"string"===b||"number"===b||"boolean"===b?String(a):a instanceof u||a instanceof ax||a instanceof aM?a.toString():JSON.stringify(a)}aM.prototype.toString=function(){return this.name},aM.fromString=function(a){return a?new aM({name:a,available:!1}):null},aM.prototype.serialize=function(){return["image",this.name]};var T=function(a,b){this.type=a,this.value=b};T.parse=function(b,d){if(2!==b.length)return d.error("'literal' expression requires exactly one argument, but found "+(b.length-1)+" instead.");if(!eF(b[1]))return d.error("invalid value");var e=b[1],c=eG(e),a=d.expectedType;return"array"===c.kind&&0===c.N&&a&&"array"===a.kind&&("number"!=typeof a.N||0===a.N)&&(c=a),new T(c,e)},T.prototype.evaluate=function(){return this.value},T.prototype.eachChild=function(){},T.prototype.outputDefined=function(){return!0},T.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof u?["rgba"].concat(this.value.toArray()):this.value instanceof ax?this.value.serialize():this.value};var cx=function(a){this.name="ExpressionEvaluationError",this.message=a};cx.prototype.toJSON=function(){return this.message};var eI={string:k,number:d,boolean:g,object:aw},x=function(a,b){this.type=a,this.args=b};x.parse=function(a,c){if(a.length<2)return c.error("Expected at least one argument.");var e,g,f,b=1,h=a[0];if("array"===h){if(a.length>2){var d=a[1];if("string"!=typeof d||!(d in eI)||"object"===d)return c.error('The item type argument of "array" must be one of string, number, boolean',1);e=eI[d],b++}else e=l;if(a.length>3){if(null!==a[2]&&("number"!=typeof a[2]||a[2]<0||a[2]!==Math.floor(a[2])))return c.error('The length argument to "array" must be a positive integer literal',2);g=a[2],b++}f=S(e,g)}else f=eI[h];for(var i=[];b<a.length;b++){var j=c.parse(a[b],b,l);if(!j)return null;i.push(j)}return new x(f,i)},x.prototype.evaluate=function(c){for(var a=0;a<this.args.length;a++){var b=this.args[a].evaluate(c);if(!ez(this.type,eG(b)))return b;if(a===this.args.length-1)throw new cx("Expected value to be of type "+ex(this.type)+", but found "+ex(eG(b))+" instead.")}return null},x.prototype.eachChild=function(a){this.args.forEach(a)},x.prototype.outputDefined=function(){return this.args.every(function(a){return a.outputDefined()})},x.prototype.serialize=function(){var a=this.type,c=[a.kind];if("array"===a.kind){var b=a.itemType;if("string"===b.kind||"number"===b.kind||"boolean"===b.kind){c.push(b.kind);var d=a.N;("number"==typeof d||this.args.length>1)&&c.push(d)}}return c.concat(this.args.map(function(a){return a.serialize()}))};var U=function(a){this.type=cv,this.sections=a};U.parse=function(c,b){if(c.length<2)return b.error("Expected at least one argument.");var m=c[1];if(!Array.isArray(m)&&"object"==typeof m)return b.error("First argument must be an image or text section.");for(var e=[],h=!1,f=1;f<=c.length-1;++f){var a=c[f];if(h&&"object"==typeof a&&!Array.isArray(a)){h=!1;var n=null;if(a["font-scale"]&&!(n=b.parse(a["font-scale"],1,d)))return null;var o=null;if(a["text-font"]&&!(o=b.parse(a["text-font"],1,S(k))))return null;var p=null;if(a["text-color"]&&!(p=b.parse(a["text-color"],1,R)))return null;var i=e[e.length-1];i.scale=n,i.font=o,i.textColor=p}else{var j=b.parse(c[f],1,l);if(!j)return null;var g=j.type.kind;if("string"!==g&&"value"!==g&&"null"!==g&&"resolvedImage"!==g)return b.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,e.push({content:j,scale:null,font:null,textColor:null})}}return new U(e)},U.prototype.evaluate=function(a){return new ax(this.sections.map(function(b){var c=b.content.evaluate(a);return eG(c)===cw?new eD("",c,null,null,null):new eD(eH(c),null,b.scale?b.scale.evaluate(a):null,b.font?b.font.evaluate(a).join(","):null,b.textColor?b.textColor.evaluate(a):null)}))},U.prototype.eachChild=function(b){for(var c=0,d=this.sections;c<d.length;c+=1){var a=d[c];b(a.content),a.scale&&b(a.scale),a.font&&b(a.font),a.textColor&&b(a.textColor)}},U.prototype.outputDefined=function(){return!1},U.prototype.serialize=function(){for(var c=["format"],d=0,e=this.sections;d<e.length;d+=1){var a=e[d];c.push(a.content.serialize());var b={};a.scale&&(b["font-scale"]=a.scale.serialize()),a.font&&(b["text-font"]=a.font.serialize()),a.textColor&&(b["text-color"]=a.textColor.serialize()),c.push(b)}return c};var V=function(a){this.type=cw,this.input=a};V.parse=function(b,a){if(2!==b.length)return a.error("Expected two arguments.");var c=a.parse(b[1],1,k);return c?new V(c):a.error("No image name provided.")},V.prototype.evaluate=function(a){var c=this.input.evaluate(a),b=aM.fromString(c);return b&&a.availableImages&&(b.available=a.availableImages.indexOf(c)> -1),b},V.prototype.eachChild=function(a){a(this.input)},V.prototype.outputDefined=function(){return!1},V.prototype.serialize=function(){return["image",this.input.serialize()]};var eJ={"to-boolean":g,"to-color":R,"to-number":d,"to-string":k},C=function(a,b){this.type=a,this.args=b};C.parse=function(a,c){if(a.length<2)return c.error("Expected at least one argument.");var d=a[0];if(("to-boolean"===d||"to-string"===d)&&2!==a.length)return c.error("Expected one argument.");for(var g=eJ[d],e=[],b=1;b<a.length;b++){var f=c.parse(a[b],b,l);if(!f)return null;e.push(f)}return new C(g,e)},C.prototype.evaluate=function(b){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(b));if("color"===this.type.kind){for(var a,c,d=0,g=this.args;d<g.length;d+=1){if(c=null,(a=g[d].evaluate(b))instanceof u)return a;if("string"==typeof a){var h=b.parseColor(a);if(h)return h}else if(Array.isArray(a)&&!(c=a.length<3||a.length>4?"Invalid rbga value "+JSON.stringify(a)+": expected an array containing either three or four numeric values.":eE(a[0],a[1],a[2],a[3])))return new u(a[0]/255,a[1]/255,a[2]/255,a[3])}throw new cx(c||"Could not parse color from value '"+("string"==typeof a?a:String(JSON.stringify(a)))+"'")}if("number"===this.type.kind){for(var e=null,f=0,i=this.args;f<i.length;f+=1){if(null===(e=i[f].evaluate(b)))return 0;var j=Number(e);if(!isNaN(j))return j}throw new cx("Could not convert "+JSON.stringify(e)+" to number.")}return"formatted"===this.type.kind?ax.fromString(eH(this.args[0].evaluate(b))):"resolvedImage"===this.type.kind?aM.fromString(eH(this.args[0].evaluate(b))):eH(this.args[0].evaluate(b))},C.prototype.eachChild=function(a){this.args.forEach(a)},C.prototype.outputDefined=function(){return this.args.every(function(a){return a.outputDefined()})},C.prototype.serialize=function(){if("formatted"===this.type.kind)return new U([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new V(this.args[0]).serialize();var a=["to-"+this.type.kind];return this.eachChild(function(b){a.push(b.serialize())}),a};var eK=["Unknown","Point","LineString","Polygon"],W=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};W.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},W.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?eK[this.feature.type]:this.feature.type:null},W.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},W.prototype.canonicalID=function(){return this.canonical},W.prototype.properties=function(){return this.feature&&this.feature.properties||{}},W.prototype.parseColor=function(a){var b=this._parseColorCache[a];return b||(b=this._parseColorCache[a]=u.parse(a)),b};var J=function(a,b,c,d){this.name=a,this.type=b,this._evaluate=c,this.args=d};J.prototype.evaluate=function(a){return this._evaluate(a,this.args)},J.prototype.eachChild=function(a){this.args.forEach(a)},J.prototype.outputDefined=function(){return!1},J.prototype.serialize=function(){return[this.name].concat(this.args.map(function(a){return a.serialize()}))},J.parse=function(f,c){var n,j=f[0],b=J.definitions[j];if(!b)return c.error('Unknown expression "'+j+'". If you wanted a literal array, use ["literal", [...]].',0);for(var u=Array.isArray(b)?b[0]:b.type,o=Array.isArray(b)?[[b[1],b[2]]]:b.overloads,h=o.filter(function(b){var a=b[0];return!Array.isArray(a)||a.length===f.length-1}),e=null,k=0,p=h;k<p.length;k+=1){var q=p[k],a=q[0],v=q[1];e=new ay(c.registry,c.path,null,c.scope);for(var d=[],r=!1,i=1;i<f.length;i++){var w=f[i],x=Array.isArray(a)?a[i-1]:a.type,s=e.parse(w,1+d.length,x);if(!s){r=!0;break}d.push(s)}if(!r){if(Array.isArray(a)&&a.length!==d.length)e.error("Expected "+a.length+" arguments, but found "+d.length+" instead.");else{for(var g=0;g<d.length;g++){var y=Array.isArray(a)?a[g]:a.type,z=d[g];e.concat(g+1).checkSubtype(y,z.type)}if(0===e.errors.length)return new J(j,u,v,d)}}}if(1===h.length)(n=c.errors).push.apply(n,e.errors);else{for(var A=(h.length?h:o).map(function(b){var a;return Array.isArray(a=b[0])?"("+a.map(ex).join(", ")+")":"("+ex(a.type)+"...)"}).join(" | "),l=[],m=1;m<f.length;m++){var t=c.parse(f[m],1+l.length);if(!t)return null;l.push(ex(t.type))}c.error("Expected arguments of type "+A+", but found ("+l.join(", ")+") instead.")}return null},J.register=function(b,a){for(var c in J.definitions=a,a)b[c]=J};var X=function(a,b,c){this.type=cu,this.locale=c,this.caseSensitive=a,this.diacriticSensitive=b};function eL(a,b){a[0]=Math.min(a[0],b[0]),a[1]=Math.min(a[1],b[1]),a[2]=Math.max(a[2],b[0]),a[3]=Math.max(a[3],b[1])}function eM(a,b){return!(a[0]<=b[0]||a[2]>=b[2]||a[1]<=b[1]||a[3]>=b[3])}function eN(a,c){var d=(180+a[0])/360,e=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a[1]*Math.PI/360)))/360,b=Math.pow(2,c.z);return[Math.round(d*b*8192),Math.round(e*b*8192)]}function eO(b,a,c){return a[1]>b[1]!=c[1]>b[1]&&b[0]<(c[0]-a[0])*(b[1]-a[1])/(c[1]-a[1])+a[0]}function eP(f,g){for(var c,h,i,j,k,l,m,d=!1,e=0,n=g.length;e<n;e++)for(var b=g[e],a=0,o=b.length;a<o-1;a++){if((j=(c=f)[0]-(h=b[a])[0])*(m=c[1]-(i=b[a+1])[1])-(l=c[0]-i[0])*(k=c[1]-h[1])==0&&j*l<=0&&k*m<=0)return!1;eO(f,b[a],b[a+1])&&(d=!d)}return d}function eQ(c,b){for(var a=0;a<b.length;a++)if(eP(c,b[a]))return!0;return!1}function eR(b,c,a,d){var e=d[0]-a[0],f=d[1]-a[1],g=(b[0]-a[0])*f-e*(b[1]-a[1]),h=(c[0]-a[0])*f-e*(c[1]-a[1]);return g>0&&h<0||g<0&&h>0}function eS(k,l,m){for(var a,b,c,d,h,i,f=0,j=m;f<j.length;f+=1)for(var g=j[f],e=0;e<g.length-1;++e)if(0!=(h=[(d=g[e+1])[0]-(c=g[e])[0],d[1]-c[1]])[0]*(i=[(b=l)[0]-(a=k)[0],b[1]-a[1]])[1]-h[1]*i[0]&&eR(a,b,c,d)&&eR(c,d,a,b))return!0;return!1}function eT(a,d){for(var c=0;c<a.length;++c)if(!eP(a[c],d))return!1;for(var b=0;b<a.length-1;++b)if(eS(a[b],a[b+1],d))return!1;return!0}function eU(c,b){for(var a=0;a<b.length;a++)if(eT(c,b[a]))return!0;return!1}function eV(b,g,h){for(var d=[],a=0;a<b.length;a++){for(var e=[],c=0;c<b[a].length;c++){var f=eN(b[a][c],h);eL(g,f),e.push(f)}d.push(e)}return d}function eW(b,d,e){for(var c=[],a=0;a<b.length;a++){var f=eV(b[a],d,e);c.push(f)}return c}function eX(a,f,b,c){if(a[0]<b[0]||a[0]>b[2]){var d=.5*c,e=a[0]-b[0]>d?-c:b[0]-a[0]>d?c:0;0===e&&(e=a[0]-b[2]>d?-c:b[2]-a[0]>d?c:0),a[0]+=e}eL(f,a)}function eY(j,k,l,a){for(var m=8192*Math.pow(2,a.z),d=[8192*a.x,8192*a.y],e=[],b=0,f=j;b<f.length;b+=1)for(var c=0,g=f[b];c<g.length;c+=1){var h=g[c],i=[h.x+d[0],h.y+d[1]];eX(i,k,l,m),e.push(i)}return e}function eZ(r,a,s,c){for(var b,i=8192*Math.pow(2,c.z),j=[8192*c.x,8192*c.y],d=[],e=0,k=r;e<k.length;e+=1){for(var l=[],f=0,m=k[e];f<m.length;f+=1){var n=m[f],o=[n.x+j[0],n.y+j[1]];eL(a,o),l.push(o)}d.push(l)}if(a[2]-a[0]<=i/2){(b=a)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(var g=0,p=d;g<p.length;g+=1)for(var h=0,q=p[g];h<q.length;h+=1)eX(q[h],a,s,i)}return d}X.parse=function(c,b){if(2!==c.length)return b.error("Expected one argument.");var a=c[1];if("object"!=typeof a||Array.isArray(a))return b.error("Collator options argument must be an object.");var d=b.parse(void 0!==a["case-sensitive"]&&a["case-sensitive"],1,g);if(!d)return null;var e=b.parse(void 0!==a["diacritic-sensitive"]&&a["diacritic-sensitive"],1,g);if(!e)return null;var f=null;return!a.locale||(f=b.parse(a.locale,1,k))?new X(d,e,f):null},X.prototype.evaluate=function(a){return new bt(this.caseSensitive.evaluate(a),this.diacriticSensitive.evaluate(a),this.locale?this.locale.evaluate(a):null)},X.prototype.eachChild=function(a){a(this.caseSensitive),a(this.diacriticSensitive),this.locale&&a(this.locale)},X.prototype.outputDefined=function(){return!1},X.prototype.serialize=function(){var a={};return a["case-sensitive"]=this.caseSensitive.serialize(),a["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(a.locale=this.locale.serialize()),["collator",a]};var Y=function(a,b){this.type=g,this.geojson=a,this.geometries=b};function e$(a){if(a instanceof J&&("get"===a.name&&1===a.args.length||"feature-state"===a.name||"has"===a.name&&1===a.args.length||"properties"===a.name||"geometry-type"===a.name||"id"===a.name||/^filter-/.test(a.name))||a instanceof Y)return!1;var b=!0;return a.eachChild(function(a){b&&!e$(a)&&(b=!1)}),b}function e_(a){if(a instanceof J&&"feature-state"===a.name)return!1;var b=!0;return a.eachChild(function(a){b&&!e_(a)&&(b=!1)}),b}function e0(a,b){if(a instanceof J&&b.indexOf(a.name)>=0)return!1;var c=!0;return a.eachChild(function(a){c&&!e0(a,b)&&(c=!1)}),c}Y.parse=function(b,d){if(2!==b.length)return d.error("'within' expression requires exactly one argument, but found "+(b.length-1)+" instead.");if(eF(b[1])){var a=b[1];if("FeatureCollection"===a.type)for(var c=0;c<a.features.length;++c){var e=a.features[c].geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new Y(a,a.features[c].geometry)}else if("Feature"===a.type){var f=a.geometry.type;if("Polygon"===f||"MultiPolygon"===f)return new Y(a,a.geometry)}else if("Polygon"===a.type||"MultiPolygon"===a.type)return new Y(a,a)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Y.prototype.evaluate=function(a){if(null!=a.geometry()&&null!=a.canonicalID()){if("Point"===a.geometryType())return function(e,b){var c=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],d=e.canonicalID();if("Polygon"===b.type){var j=eV(b.coordinates,a,d),k=eY(e.geometry(),c,a,d);if(!eM(c,a))return!1;for(var f=0,h=k;f<h.length;f+=1)if(!eP(h[f],j))return!1}if("MultiPolygon"===b.type){var l=eW(b.coordinates,a,d),m=eY(e.geometry(),c,a,d);if(!eM(c,a))return!1;for(var g=0,i=m;g<i.length;g+=1)if(!eQ(i[g],l))return!1}return!0}(a,this.geometries);if("LineString"===a.geometryType())return function(e,b){var c=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],d=e.canonicalID();if("Polygon"===b.type){var j=eV(b.coordinates,a,d),k=eZ(e.geometry(),c,a,d);if(!eM(c,a))return!1;for(var f=0,h=k;f<h.length;f+=1)if(!eT(h[f],j))return!1}if("MultiPolygon"===b.type){var l=eW(b.coordinates,a,d),m=eZ(e.geometry(),c,a,d);if(!eM(c,a))return!1;for(var g=0,i=m;g<i.length;g+=1)if(!eU(i[g],l))return!1}return!0}(a,this.geometries)}return!1},Y.prototype.eachChild=function(){},Y.prototype.outputDefined=function(){return!0},Y.prototype.serialize=function(){return["within",this.geojson]};var Z=function(b,a){this.type=a.type,this.name=b,this.boundExpression=a};Z.parse=function(c,b){if(2!==c.length||"string"!=typeof c[1])return b.error("'var' expression requires exactly one string literal argument.");var a=c[1];return b.scope.has(a)?new Z(a,b.scope.get(a)):b.error('Unknown variable "'+a+'". Make sure "'+a+'" has been bound in an enclosing "let" expression before using it.',1)},Z.prototype.evaluate=function(a){return this.boundExpression.evaluate(a)},Z.prototype.eachChild=function(){},Z.prototype.outputDefined=function(){return!1},Z.prototype.serialize=function(){return["var",this.name]};var ay=function(d,a,e,b,c){void 0===a&&(a=[]),void 0===b&&(b=new a_),void 0===c&&(c=[]),this.registry=d,this.path=a,this.key=a.map(function(a){return"["+a+"]"}).join(""),this.scope=b,this.errors=c,this.expectedType=e};function e1(b,c){for(var f,g=b.length-1,d=0,e=g,a=0;d<=e;)if((f=b[a=Math.floor((d+e)/2)])<=c){if(a===g||c<b[a+1])return a;d=a+1}else{if(!(f>c))throw new cx("Input is not a number.");e=a-1}return 0}ay.prototype.parse=function(b,c,d,e,a){return void 0===a&&(a={}),c?this.concat(c,d,e)._parse(b,a):this._parse(b,a)},ay.prototype._parse=function(a,f){function g(a,b,c){return"assert"===c?new x(b,[a]):"coerce"===c?new C(b,[a]):a}if(null!==a&&"string"!=typeof a&&"boolean"!=typeof a&&"number"!=typeof a||(a=["literal",a]),Array.isArray(a)){if(0===a.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var d=a[0];if("string"!=typeof d)return this.error("Expression name must be a string, but found "+typeof d+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var h=this.registry[d];if(h){var b=h.parse(a,this);if(!b)return null;if(this.expectedType){var c=this.expectedType,e=b.type;if("string"!==c.kind&&"number"!==c.kind&&"boolean"!==c.kind&&"object"!==c.kind&&"array"!==c.kind||"value"!==e.kind){if("color"!==c.kind&&"formatted"!==c.kind&&"resolvedImage"!==c.kind||"value"!==e.kind&&"string"!==e.kind){if(this.checkSubtype(c,e))return null}else b=g(b,c,f.typeAnnotation||"coerce")}else b=g(b,c,f.typeAnnotation||"assert")}if(!(b instanceof T)&&"resolvedImage"!==b.type.kind&&function b(a){if(a instanceof Z)return b(a.boundExpression);if(a instanceof J&&"error"===a.name||a instanceof X||a instanceof Y)return!1;var d=a instanceof C||a instanceof x,c=!0;return a.eachChild(function(a){c=d?c&&b(a):c&&a instanceof T}),!!c&&e$(a)&&e0(a,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(b)){var i=new W;try{b=new T(b.type,b.evaluate(i))}catch(j){return this.error(j.message),null}}return b}return this.error('Unknown expression "'+d+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===a?"'undefined' value invalid. Use null instead.":"object"==typeof a?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof a+" instead.")},ay.prototype.concat=function(a,c,b){var d="number"==typeof a?this.path.concat(a):this.path,e=b?this.scope.concat(b):this.scope;return new ay(this.registry,d,c||null,e,this.errors)},ay.prototype.error=function(c){for(var b=[],a=arguments.length-1;a-- >0;)b[a]=arguments[a+1];var d=""+this.key+b.map(function(a){return"["+a+"]"}).join("");this.errors.push(new ew(d,c))},ay.prototype.checkSubtype=function(b,c){var a=ez(b,c);return a&&this.error(a),a};var $=function(d,e,f){this.type=d,this.input=e,this.labels=[],this.outputs=[];for(var a=0,b=f;a<b.length;a+=1){var c=b[a],g=c[1];this.labels.push(c[0]),this.outputs.push(g)}};function bu(b,c,a){return b*(1-a)+c*a}$.parse=function(b,a){if(b.length-1<4)return a.error("Expected at least 4 arguments, but found only "+(b.length-1)+".");if((b.length-1)%2!=0)return a.error("Expected an even number of arguments.");var i=a.parse(b[1],1,d);if(!i)return null;var e=[],f=null;a.expectedType&&"value"!==a.expectedType.kind&&(f=a.expectedType);for(var c=1;c<b.length;c+=2){var g=1===c?-1/0:b[c],k=b[c+1],j=c,l=c+1;if("number"!=typeof g)return a.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',j);if(e.length&&e[e.length-1][0]>=g)return a.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',j);var h=a.parse(k,l,f);if(!h)return null;f=f||h.type,e.push([g,h])}return new $(f,i,e)},$.prototype.evaluate=function(a){var b=this.labels,c=this.outputs;if(1===b.length)return c[0].evaluate(a);var d=this.input.evaluate(a);if(d<=b[0])return c[0].evaluate(a);var e=b.length;return d>=b[e-1]?c[e-1].evaluate(a):c[e1(b,d)].evaluate(a)},$.prototype.eachChild=function(b){b(this.input);for(var a=0,c=this.outputs;a<c.length;a+=1)b(c[a])},$.prototype.outputDefined=function(){return this.outputs.every(function(a){return a.outputDefined()})},$.prototype.serialize=function(){for(var b=["step",this.input.serialize()],a=0;a<this.labels.length;a++)a>0&&b.push(this.labels[a]),b.push(this.outputs[a].serialize());return b};var e2=Object.freeze({__proto__:null,number:bu,color:function(a,b,c){return new u(bu(a.r,b.r,c),bu(a.g,b.g,c),bu(a.b,b.b,c),bu(a.a,b.a,c))},array:function(a,b,c){return a.map(function(a,d){return bu(a,b[d],c)})}}),e3=6/29*3*(6/29),e4=Math.PI/180,e5=180/Math.PI;function e6(a){return a>.008856451679035631?Math.pow(a,1/3):a/e3+4/29}function e7(a){return a>6/29?a*a*a:e3*(a-4/29)}function e8(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function e9(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function cy(a){var b=e9(a.r),c=e9(a.g),d=e9(a.b),f=e6((.4124564*b+.3575761*c+.1804375*d)/.95047),e=e6((.2126729*b+.7151522*c+.072175*d)/1);return{l:116*e-16,a:500*(f-e),b:200*(e-e6((.0193339*b+.119192*c+.9503041*d)/1.08883)),alpha:a.a}}function cz(b){var a=(b.l+16)/116,c=isNaN(b.a)?a:a+b.a/500,d=isNaN(b.b)?a:a-b.b/200;return a=1*e7(a),c=.95047*e7(c),d=1.08883*e7(d),new u(e8(3.2404542*c-1.5371385*a-.4985314*d),e8(-0.969266*c+1.8760108*a+.041556*d),e8(.0556434*c-.2040259*a+1.0572252*d),b.alpha)}var cA={forward:cy,reverse:cz,interpolate:function(a,b,c){return{l:bu(a.l,b.l,c),a:bu(a.a,b.a,c),b:bu(a.b,b.b,c),alpha:bu(a.alpha,b.alpha,c)}}},cB={forward:function(e){var a=cy(e),f=a.l,b=a.a,c=a.b,d=Math.atan2(c,b)*e5;return{h:d<0?d+360:d,c:Math.sqrt(b*b+c*c),l:f,alpha:e.a}},reverse:function(a){var b=a.h*e4,c=a.c;return cz({l:a.l,a:Math.cos(b)*c,b:Math.sin(b)*c,alpha:a.alpha})},interpolate:function(b,c,d){var e,f,g,a;return{h:(e=b.h,f=c.h,g=d,a=f-e,e+g*(a>180||a< -180?a-360*Math.round(a/360):a)),c:bu(b.c,c.c,d),l:bu(b.l,c.l,d),alpha:bu(b.alpha,c.alpha,d)}}},fa=Object.freeze({__proto__:null,lab:cA,hcl:cB}),D=function(d,e,f,g,h){this.type=d,this.operator=e,this.interpolation=f,this.input=g,this.labels=[],this.outputs=[];for(var a=0,b=h;a<b.length;a+=1){var c=b[a],i=c[1];this.labels.push(c[0]),this.outputs.push(i)}};function fb(e,a,c,f){var b=f-c,d=e-c;return 0===b?0:1===a?d/b:(Math.pow(a,d)-1)/(Math.pow(a,b)-1)}D.interpolationFactor=function(a,d,e,f){var b=0;if("exponential"===a.name)b=fb(d,a.base,e,f);else if("linear"===a.name)b=fb(d,1,e,f);else if("cubic-bezier"===a.name){var c=a.controlPoints;b=new dU(c[0],c[1],c[2],c[3]).solve(fb(d,1,e,f))}return b},D.parse=function(e,a){var h=e[0],b=e[1],i=e[2],j=e.slice(3);if(!Array.isArray(b)||0===b.length)return a.error("Expected an interpolation type expression.",1);if("linear"===b[0])b={name:"linear"};else if("exponential"===b[0]){var n=b[1];if("number"!=typeof n)return a.error("Exponential interpolation requires a numeric base.",1,1);b={name:"exponential",base:n}}else{if("cubic-bezier"!==b[0])return a.error("Unknown interpolation type "+String(b[0]),1,0);var k=b.slice(1);if(4!==k.length||k.some(function(a){return"number"!=typeof a||a<0||a>1}))return a.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);b={name:"cubic-bezier",controlPoints:k}}if(e.length-1<4)return a.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return a.error("Expected an even number of arguments.");if(!(i=a.parse(i,2,d)))return null;var g=[],c=null;"interpolate-hcl"===h||"interpolate-lab"===h?c=R:a.expectedType&&"value"!==a.expectedType.kind&&(c=a.expectedType);for(var f=0;f<j.length;f+=2){var l=j[f],p=j[f+1],o=f+3,q=f+4;if("number"!=typeof l)return a.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',o);if(g.length&&g[g.length-1][0]>=l)return a.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',o);var m=a.parse(p,q,c);if(!m)return null;c=c||m.type,g.push([l,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new D(c,h,b,i,g):a.error("Type "+ex(c)+" is not interpolatable.")},D.prototype.evaluate=function(b){var a=this.labels,c=this.outputs;if(1===a.length)return c[0].evaluate(b);var d=this.input.evaluate(b);if(d<=a[0])return c[0].evaluate(b);var i=a.length;if(d>=a[i-1])return c[i-1].evaluate(b);var e=e1(a,d),f=D.interpolationFactor(this.interpolation,d,a[e],a[e+1]),g=c[e].evaluate(b),h=c[e+1].evaluate(b);return"interpolate"===this.operator?e2[this.type.kind.toLowerCase()](g,h,f):"interpolate-hcl"===this.operator?cB.reverse(cB.interpolate(cB.forward(g),cB.forward(h),f)):cA.reverse(cA.interpolate(cA.forward(g),cA.forward(h),f))},D.prototype.eachChild=function(b){b(this.input);for(var a=0,c=this.outputs;a<c.length;a+=1)b(c[a])},D.prototype.outputDefined=function(){return this.outputs.every(function(a){return a.outputDefined()})},D.prototype.serialize=function(){var b;b="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var c=[this.operator,b,this.input.serialize()],a=0;a<this.labels.length;a++)c.push(this.labels[a],this.outputs[a].serialize());return c};var _=function(a,b){this.type=a,this.args=b};_.parse=function(g,d){if(g.length<2)return d.error("Expectected at least one argument.");var a=null,b=d.expectedType;b&&"value"!==b.kind&&(a=b);for(var c=[],e=0,h=g.slice(1);e<h.length;e+=1){var f=d.parse(h[e],1+c.length,a,void 0,{typeAnnotation:"omit"});if(!f)return null;a=a||f.type,c.push(f)}var i=b&&c.some(function(a){return ez(b,a.type)});return new _(i?l:a,c)},_.prototype.evaluate=function(f){for(var b,a=null,d=0,c=0,e=this.args;c<e.length&&(d++,(a=e[c].evaluate(f))&&a instanceof aM&&!a.available&&(b||(b=a.name),a=null,d===this.args.length&&(a=b)),null===a);c+=1);return a},_.prototype.eachChild=function(a){this.args.forEach(a)},_.prototype.outputDefined=function(){return this.args.every(function(a){return a.outputDefined()})},_.prototype.serialize=function(){var a=["coalesce"];return this.eachChild(function(b){a.push(b.serialize())}),a};var aa=function(b,a){this.type=a.type,this.bindings=[].concat(b),this.result=a};aa.prototype.evaluate=function(a){return this.result.evaluate(a)},aa.prototype.eachChild=function(b){for(var a=0,c=this.bindings;a<c.length;a+=1)b(c[a][1]);b(this.result)},aa.parse=function(a,c){if(a.length<4)return c.error("Expected at least 3 arguments, but found "+(a.length-1)+" instead.");for(var e=[],b=1;b<a.length-1;b+=2){var d=a[b];if("string"!=typeof d)return c.error("Expected string, but found "+typeof d+" instead.",b);if(/[^a-zA-Z0-9_]/.test(d))return c.error("Variable names must contain only alphanumeric characters or '_'.",b);var f=c.parse(a[b+1],b+1);if(!f)return null;e.push([d,f])}var g=c.parse(a[a.length-1],a.length-1,c.expectedType,e);return g?new aa(e,g):null},aa.prototype.outputDefined=function(){return this.result.outputDefined()},aa.prototype.serialize=function(){for(var a=["let"],b=0,c=this.bindings;b<c.length;b+=1){var d=c[b];a.push(d[0],d[1].serialize())}return a.push(this.result.serialize()),a};var ab=function(a,b,c){this.type=a,this.index=b,this.input=c};ab.parse=function(a,b){if(3!==a.length)return b.error("Expected 2 arguments, but found "+(a.length-1)+" instead.");var e=b.parse(a[1],1,d),c=b.parse(a[2],2,S(b.expectedType||l));return e&&c?new ab(c.type.itemType,e,c):null},ab.prototype.evaluate=function(c){var a=this.index.evaluate(c),b=this.input.evaluate(c);if(a<0)throw new cx("Array index out of bounds: "+a+" < 0.");if(a>=b.length)throw new cx("Array index out of bounds: "+a+" > "+(b.length-1)+".");if(a!==Math.floor(a))throw new cx("Array index must be an integer, but found "+a+" instead.");return b[a]},ab.prototype.eachChild=function(a){a(this.index),a(this.input)},ab.prototype.outputDefined=function(){return!1},ab.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ac=function(a,b){this.type=g,this.needle=a,this.haystack=b};ac.parse=function(a,b){if(3!==a.length)return b.error("Expected 2 arguments, but found "+(a.length-1)+" instead.");var c=b.parse(a[1],1,l),e=b.parse(a[2],2,l);return c&&e?eA(c.type,[g,k,d,ct,l])?new ac(c,e):b.error("Expected first argument to be of type boolean, string, number or null, but found "+ex(c.type)+" instead"):null},ac.prototype.evaluate=function(c){var b=this.needle.evaluate(c),a=this.haystack.evaluate(c);if(!a)return!1;if(!eB(b,["boolean","string","number","null"]))throw new cx("Expected first argument to be of type boolean, string, number or null, but found "+ex(eG(b))+" instead.");if(!eB(a,["string","array"]))throw new cx("Expected second argument to be of type array or string, but found "+ex(eG(a))+" instead.");return a.indexOf(b)>=0},ac.prototype.eachChild=function(a){a(this.needle),a(this.haystack)},ac.prototype.outputDefined=function(){return!0},ac.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ad=function(a,b,c){this.type=d,this.needle=a,this.haystack=b,this.fromIndex=c};ad.parse=function(a,b){if(a.length<=2||a.length>=5)return b.error("Expected 3 or 4 arguments, but found "+(a.length-1)+" instead.");var c=b.parse(a[1],1,l),e=b.parse(a[2],2,l);if(!c||!e)return null;if(!eA(c.type,[g,k,d,ct,l]))return b.error("Expected first argument to be of type boolean, string, number or null, but found "+ex(c.type)+" instead");if(4===a.length){var f=b.parse(a[3],3,d);return f?new ad(c,e,f):null}return new ad(c,e)},ad.prototype.evaluate=function(c){var a=this.needle.evaluate(c),b=this.haystack.evaluate(c);if(!eB(a,["boolean","string","number","null"]))throw new cx("Expected first argument to be of type boolean, string, number or null, but found "+ex(eG(a))+" instead.");if(!eB(b,["string","array"]))throw new cx("Expected second argument to be of type array or string, but found "+ex(eG(b))+" instead.");if(this.fromIndex){var d=this.fromIndex.evaluate(c);return b.indexOf(a,d)}return b.indexOf(a)},ad.prototype.eachChild=function(a){a(this.needle),a(this.haystack),this.fromIndex&&a(this.fromIndex)},ad.prototype.outputDefined=function(){return!1},ad.prototype.serialize=function(){if(null!=this.fromIndex&& void 0!==this.fromIndex){var a=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),a]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ae=function(a,b,c,d,e,f){this.inputType=a,this.type=b,this.input=c,this.cases=d,this.outputs=e,this.otherwise=f};ae.parse=function(b,c){if(b.length<5)return c.error("Expected at least 4 arguments, but found only "+(b.length-1)+".");if(b.length%2!=1)return c.error("Expected an even number of arguments.");c.expectedType&&"value"!==c.expectedType.kind&&(g=c.expectedType);for(var f,g,j={},k=[],d=2;d<b.length-1;d+=2){var h=b[d],q=b[d+1];Array.isArray(h)||(h=[h]);var e=c.concat(d);if(0===h.length)return e.error("Expected at least one branch label.");for(var m=0,o=h;m<o.length;m+=1){var a=o[m];if("number"!=typeof a&&"string"!=typeof a)return e.error("Branch labels must be numbers or strings.");if("number"==typeof a&&Math.abs(a)>Number.MAX_SAFE_INTEGER)return e.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof a&&Math.floor(a)!==a)return e.error("Numeric branch labels must be integer values.");if(f){if(e.checkSubtype(f,eG(a)))return null}else f=eG(a);if(void 0!==j[String(a)])return e.error("Branch labels must be unique.");j[String(a)]=k.length}var n=c.parse(q,d,g);if(!n)return null;g=g||n.type,k.push(n)}var i=c.parse(b[1],1,l);if(!i)return null;var p=c.parse(b[b.length-1],b.length-1,g);return p?"value"!==i.type.kind&&c.concat(1).checkSubtype(f,i.type)?null:new ae(f,g,i,j,k,p):null},ae.prototype.evaluate=function(a){var b=this.input.evaluate(a);return(eG(b)===this.inputType&&this.outputs[this.cases[b]]||this.otherwise).evaluate(a)},ae.prototype.eachChild=function(a){a(this.input),this.outputs.forEach(a),a(this.otherwise)},ae.prototype.outputDefined=function(){return this.outputs.every(function(a){return a.outputDefined()})&&this.otherwise.outputDefined()},ae.prototype.serialize=function(){for(var l=this,b=["match",this.input.serialize()],c=[],g={},d=0,h=Object.keys(this.cases).sort();d<h.length;d+=1){var a=h[d];void 0===(m=g[this.cases[a]])?(g[this.cases[a]]=c.length,c.push([this.cases[a],[a]])):c[m][1].push(a)}for(var i=function(a){return"number"===l.inputType.kind?Number(a):a},e=0,j=c;e<j.length;e+=1){var k=j[e],m=k[0],f=k[1];b.push(1===f.length?i(f[0]):f.map(i)),b.push(this.outputs[outputIndex$1].serialize())}return b.push(this.otherwise.serialize()),b};var af=function(a,b,c){this.type=a,this.branches=b,this.otherwise=c};af.parse=function(a,b){if(a.length<4)return b.error("Expected at least 3 arguments, but found only "+(a.length-1)+".");if(a.length%2!=0)return b.error("Expected an odd number of arguments.");b.expectedType&&"value"!==b.expectedType.kind&&(d=b.expectedType);for(var d,f=[],c=1;c<a.length-1;c+=2){var h=b.parse(a[c],c,g);if(!h)return null;var e=b.parse(a[c+1],c+1,d);if(!e)return null;f.push([h,e]),d=d||e.type}var i=b.parse(a[a.length-1],a.length-1,d);return i?new af(d,f,i):null},af.prototype.evaluate=function(a){for(var b=0,c=this.branches;b<c.length;b+=1){var d=c[b],e=d[1];if(d[0].evaluate(a))return e.evaluate(a)}return this.otherwise.evaluate(a)},af.prototype.eachChild=function(a){for(var b=0,c=this.branches;b<c.length;b+=1){var d=c[b],e=d[1];a(d[0]),a(e)}a(this.otherwise)},af.prototype.outputDefined=function(){return this.branches.every(function(a){return a[1].outputDefined()})&&this.otherwise.outputDefined()},af.prototype.serialize=function(){var a=["case"];return this.eachChild(function(b){a.push(b.serialize())}),a};var ag=function(a,b,c,d){this.type=a,this.input=b,this.beginIndex=c,this.endIndex=d};function fc(b,a){return"=="===b||"!="===b?"boolean"===a.kind||"string"===a.kind||"number"===a.kind||"null"===a.kind||"value"===a.kind:"string"===a.kind||"number"===a.kind||"value"===a.kind}function cC(d,a,b,c){return 0===c.compare(a,b)}function ah(a,b,c){var d="=="!==a&&"!="!==a;return function(){function e(a,b,c){this.type=g,this.lhs=a,this.rhs=b,this.collator=c,this.hasUntypedArgument="value"===a.type.kind||"value"===b.type.kind}return e.parse=function(f,c){if(3!==f.length&&4!==f.length)return c.error("Expected two or three arguments.");var g=f[0],a=c.parse(f[1],1,l);if(!a)return null;if(!fc(g,a.type))return c.concat(1).error('"'+g+"\" comparisons are not supported for type '"+ex(a.type)+"'.");var b=c.parse(f[2],2,l);if(!b)return null;if(!fc(g,b.type))return c.concat(2).error('"'+g+"\" comparisons are not supported for type '"+ex(b.type)+"'.");if(a.type.kind!==b.type.kind&&"value"!==a.type.kind&&"value"!==b.type.kind)return c.error("Cannot compare types '"+ex(a.type)+"' and '"+ex(b.type)+"'.");d&&("value"===a.type.kind&&"value"!==b.type.kind?a=new x(b.type,[a]):"value"!==a.type.kind&&"value"===b.type.kind&&(b=new x(a.type,[b])));var h=null;if(4===f.length){if("string"!==a.type.kind&&"string"!==b.type.kind&&"value"!==a.type.kind&&"value"!==b.type.kind)return c.error("Cannot use collator to compare non-string types.");if(!(h=c.parse(f[3],3,cu)))return null}return new e(a,b,h)},e.prototype.evaluate=function(e){var f=this.lhs.evaluate(e),g=this.rhs.evaluate(e);if(d&&this.hasUntypedArgument){var h=eG(f),i=eG(g);if(h.kind!==i.kind||"string"!==h.kind&&"number"!==h.kind)throw new cx('Expected arguments for "'+a+'" to be (string, string) or (number, number), but found ('+h.kind+", "+i.kind+") instead.")}if(this.collator&&!d&&this.hasUntypedArgument){var j=eG(f),k=eG(g);if("string"!==j.kind||"string"!==k.kind)return b(e,f,g)}return this.collator?c(e,f,g,this.collator.evaluate(e)):b(e,f,g)},e.prototype.eachChild=function(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)},e.prototype.outputDefined=function(){return!0},e.prototype.serialize=function(){var b=[a];return this.eachChild(function(a){b.push(a.serialize())}),b},e}()}ag.parse=function(a,c){if(a.length<=2||a.length>=5)return c.error("Expected 3 or 4 arguments, but found "+(a.length-1)+" instead.");var b=c.parse(a[1],1,l),e=c.parse(a[2],2,d);if(!b||!e)return null;if(!eA(b.type,[S(l),k,l]))return c.error("Expected first argument to be of type array or string, but found "+ex(b.type)+" instead");if(4===a.length){var f=c.parse(a[3],3,d);return f?new ag(b.type,b,e,f):null}return new ag(b.type,b,e)},ag.prototype.evaluate=function(b){var a=this.input.evaluate(b),c=this.beginIndex.evaluate(b);if(!eB(a,["string","array"]))throw new cx("Expected first argument to be of type array or string, but found "+ex(eG(a))+" instead.");if(this.endIndex){var d=this.endIndex.evaluate(b);return a.slice(c,d)}return a.slice(c)},ag.prototype.eachChild=function(a){a(this.input),a(this.beginIndex),this.endIndex&&a(this.endIndex)},ag.prototype.outputDefined=function(){return!1},ag.prototype.serialize=function(){if(null!=this.endIndex&& void 0!==this.endIndex){var a=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),a]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var cD=ah("==",function(c,a,b){return a===b},cC),cE=ah("!=",function(c,a,b){return a!==b},function(d,a,b,c){return!cC(0,a,b,c)}),cF=ah("<",function(c,a,b){return a<b},function(d,a,b,c){return 0>c.compare(a,b)}),cG=ah(">",function(c,a,b){return a>b},function(d,a,b,c){return c.compare(a,b)>0}),cH=ah("<=",function(c,a,b){return a<=b},function(d,a,b,c){return 0>=c.compare(a,b)}),cI=ah(">=",function(c,a,b){return a>=b},function(d,a,b,c){return c.compare(a,b)>=0}),ai=function(a,b,c,d,e){this.type=k,this.number=a,this.locale=b,this.currency=c,this.minFractionDigits=d,this.maxFractionDigits=e};ai.parse=function(c,b){if(3!==c.length)return b.error("Expected two arguments.");var e=b.parse(c[1],1,d);if(!e)return null;var a=c[2];if("object"!=typeof a||Array.isArray(a))return b.error("NumberFormat options argument must be an object.");var f=null;if(a.locale&&!(f=b.parse(a.locale,1,k)))return null;var g=null;if(a.currency&&!(g=b.parse(a.currency,1,k)))return null;var h=null;if(a["min-fraction-digits"]&&!(h=b.parse(a["min-fraction-digits"],1,d)))return null;var i=null;return!a["max-fraction-digits"]||(i=b.parse(a["max-fraction-digits"],1,d))?new ai(e,f,g,h,i):null},ai.prototype.evaluate=function(a){return new Intl.NumberFormat(this.locale?this.locale.evaluate(a):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(a):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(a):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(a):void 0}).format(this.number.evaluate(a))},ai.prototype.eachChild=function(a){a(this.number),this.locale&&a(this.locale),this.currency&&a(this.currency),this.minFractionDigits&&a(this.minFractionDigits),this.maxFractionDigits&&a(this.maxFractionDigits)},ai.prototype.outputDefined=function(){return!1},ai.prototype.serialize=function(){var a={};return this.locale&&(a.locale=this.locale.serialize()),this.currency&&(a.currency=this.currency.serialize()),this.minFractionDigits&&(a["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(a["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),a]};var aj=function(a){this.type=d,this.input=a};aj.parse=function(b,c){if(2!==b.length)return c.error("Expected 1 argument, but found "+(b.length-1)+" instead.");var a=c.parse(b[1],1);return a?"array"!==a.type.kind&&"string"!==a.type.kind&&"value"!==a.type.kind?c.error("Expected argument of type string or array, but found "+ex(a.type)+" instead."):new aj(a):null},aj.prototype.evaluate=function(b){var a=this.input.evaluate(b);if("string"==typeof a||Array.isArray(a))return a.length;throw new cx("Expected value to be of type string or array, but found "+ex(eG(a))+" instead.")},aj.prototype.eachChild=function(a){a(this.input)},aj.prototype.outputDefined=function(){return!1},aj.prototype.serialize=function(){var a=["length"];return this.eachChild(function(b){a.push(b.serialize())}),a};var aN={"==":cD,"!=":cE,">":cG,"<":cF,">
1=":cI,"<=":cH,array:x,at:ab,boolean:x,case:af,coalesce:_,collator:X,format:U,image:V,in:ac,"index-of":ad,interpolate:D,"interpolate-hcl":D,"interpolate-lab":D,length:aj,let:aa,literal:T,match:ae,number:x,"number-format":ai,object:x,slice:ag,step:$,string:x,"to-boolean":C,"to-color":C,"to-number":C,"to-string":C,var:Z,within:Y};function bv(b,c){var d=c[0],e=c[1],f=c[2],g=c[3];d=d.evaluate(b),e=e.evaluate(b),f=f.evaluate(b);var a=g?g.evaluate(b):1,h=eE(d,e,f,a);if(h)throw new cx(h);return new u(d/255*a,e/255*a,f/255*a,a)}function fd(b,c){var a=c[b];return void 0===a?null:a}function M(a){return{type:a}}function fe(a){return{result:"success",value:a}}function ff(a){return{result:"error",value:a}}function fg(a){return"data-driven"===a["property-type"]||"cross-faded-data-driven"===a["property-type"]}function fh(a){return!!a.expression&&a.expression.parameters.indexOf("zoom")> -1}function fi(a){return!!a.expression&&a.expression.interpolated}function fj(a){return a instanceof Number?"number":a instanceof String?"string":a instanceof Boolean?"boolean":Array.isArray(a)?"array":null===a?"null":typeof a}function fk(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function fl(a){return a}function fm(a,b,c){return void 0!==a?a:void 0!==b?b:void 0!==c?c:void 0}function fn(b,c,a,d,e){return fm(typeof a===e?d[a]:void 0,b.default,c.default)}function fo(a,d,b){if("number"!==fj(b))return fm(a.default,d.default);var c=a.stops.length;if(1===c||b<=a.stops[0][0])return a.stops[0][1];if(b>=a.stops[c-1][0])return a.stops[c-1][1];var e=e1(a.stops.map(function(a){return a[0]}),b);return a.stops[e][1]}function fp(a,i,b){var n=void 0!==a.base?a.base:1;if("number"!==fj(b))return fm(a.default,i.default);var f=a.stops.length;if(1===f||b<=a.stops[0][0])return a.stops[0][1];if(b>=a.stops[f-1][0])return a.stops[f-1][1];var j,c,g,k,d,h,e=e1(a.stops.map(function(a){return a[0]}),b),o=(j=b,c=n,g=a.stops[e][0],k=a.stops[e+1][0],d=k-g,h=j-g,0===d?0:1===c?h/d:(Math.pow(c,h)-1)/(Math.pow(c,d)-1)),l=a.stops[e][1],p=a.stops[e+1][1],m=e2[i.type]||fl;if(a.colorSpace&&"rgb"!==a.colorSpace){var q=fa[a.colorSpace];m=function(a,b){return q.reverse(q.interpolate(q.forward(a),q.forward(b),o))}}return"function"==typeof l.evaluate?{evaluate:function(){for(var a=[],b=arguments.length;b--;)a[b]=arguments[b];var c=l.evaluate.apply(void 0,a),d=p.evaluate.apply(void 0,a);if(void 0!==c&& void 0!==d)return m(c,d,o)}}:m(l,p,o)}function fq(c,b,a){return"color"===b.type?a=u.parse(a):"formatted"===b.type?a=ax.fromString(a.toString()):"resolvedImage"===b.type?a=aM.fromString(a.toString()):fj(a)===b.type||"enum"===b.type&&b.values[a]||(a=void 0),fm(a,c.default,b.default)}J.register(aN,{error:[{kind:"error"},[k],function(a,b){throw new cx(b[0].evaluate(a))}],typeof:[k,[l],function(a,b){return ex(eG(b[0].evaluate(a)))}],"to-rgba":[S(d,4),[R],function(a,b){return b[0].evaluate(a).toArray()}],rgb:[R,[d,d,d],bv],rgba:[R,[d,d,d,d],bv],has:{type:g,overloads:[[[k],function(a,d){var b,c;return b=d[0].evaluate(a),c=a.properties(),b in c}],[[k,aw],function(a,b){var c,d,e=b[1];return c=b[0].evaluate(a),c in(d=e.evaluate(a))}]]},get:{type:l,overloads:[[[k],function(a,b){return fd(b[0].evaluate(a),a.properties())}],[[k,aw],function(a,b){var c=b[1];return fd(b[0].evaluate(a),c.evaluate(a))}]]},"feature-state":[l,[k],function(a,b){return fd(b[0].evaluate(a),a.featureState||{})}],properties:[aw,[],function(a){return a.properties()}],"geometry-type":[k,[],function(a){return a.geometryType()}],id:[l,[],function(a){return a.id()}],zoom:[d,[],function(a){return a.globals.zoom}],"heatmap-density":[d,[],function(a){return a.globals.heatmapDensity||0}],"line-progress":[d,[],function(a){return a.globals.lineProgress||0}],accumulated:[l,[],function(a){return void 0===a.globals.accumulated?null:a.globals.accumulated}],"+":[d,M(d),function(d,e){for(var b=0,a=0,c=e;a<c.length;a+=1)b+=c[a].evaluate(d);return b}],"*":[d,M(d),function(d,e){for(var b=1,a=0,c=e;a<c.length;a+=1)b*=c[a].evaluate(d);return b}],"-":{type:d,overloads:[[[d,d],function(a,b){var c=b[1];return b[0].evaluate(a)-c.evaluate(a)}],[[d],function(a,b){return-b[0].evaluate(a)}]]},"/":[d,[d,d],function(a,b){var c=b[1];return b[0].evaluate(a)/c.evaluate(a)}],"%":[d,[d,d],function(a,b){var c=b[1];return b[0].evaluate(a)%c.evaluate(a)}],ln2:[d,[],function(){return Math.LN2}],pi:[d,[],function(){return Math.PI}],e:[d,[],function(){return Math.E}],"^":[d,[d,d],function(a,b){var c=b[1];return Math.pow(b[0].evaluate(a),c.evaluate(a))}],sqrt:[d,[d],function(a,b){return Math.sqrt(b[0].evaluate(a))}],log10:[d,[d],function(a,b){return Math.log(b[0].evaluate(a))/Math.LN10}],ln:[d,[d],function(a,b){return Math.log(b[0].evaluate(a))}],log2:[d,[d],function(a,b){return Math.log(b[0].evaluate(a))/Math.LN2}],sin:[d,[d],function(a,b){return Math.sin(b[0].evaluate(a))}],cos:[d,[d],function(a,b){return Math.cos(b[0].evaluate(a))}],tan:[d,[d],function(a,b){return Math.tan(b[0].evaluate(a))}],asin:[d,[d],function(a,b){return Math.asin(b[0].evaluate(a))}],acos:[d,[d],function(a,b){return Math.acos(b[0].evaluate(a))}],atan:[d,[d],function(a,b){return Math.atan(b[0].evaluate(a))}],min:[d,M(d),function(b,a){return Math.min.apply(Math,a.map(function(a){return a.evaluate(b)}))}],max:[d,M(d),function(b,a){return Math.max.apply(Math,a.map(function(a){return a.evaluate(b)}))}],abs:[d,[d],function(a,b){return Math.abs(b[0].evaluate(a))}],round:[d,[d],function(b,c){var a=c[0].evaluate(b);return a<0?-Math.round(-a):Math.round(a)}
vendor: 91,293 bytes, line 1
1],floor:[d,[d],function(a,b){return Math.floor(b[0].evaluate(a))}],ceil:[d,[d],function(a,b){return Math.ceil(b[0].evaluate(a))}],"filter-==":[g,[k,l],function(b,a){var c=a[0],d=a[1];return b.properties()[c.value]===d.value}],"filter-id-==":[g,[l],function(a,b){var c=b[0];return a.id()===c.value}],"filter-type-==":[g,[k],function(a,b){var c=b[0];return a.geometryType()===c.value}],"filter-<":[g,[k,l],function(d,a){var e=a[0],f=a[1],b=d.properties()[e.value],c=f.value;return typeof b==typeof c&&b<c}],"filter-id-<":[g,[l],function(c,d){var e=d[0],a=c.id(),b=e.value;return typeof a==typeof b&&a<b}],"filter->":[g,[k,l],function(d,a){var e=a[0],f=a[1],b=d.properties()[e.value],c=f.value;return typeof b==typeof c&&b>c}],"filter-id->":[g,[l],function(c,d){var e=d[0],a=c.id(),b=e.value;return typeof a==typeof b&&a>b}],"filter-<=":[g,[k,l],function(d,a){var e=a[0],f=a[1],b=d.properties()[e.value],c=f.value;return typeof b==typeof c&&b<=c}],"filter-id-<=":[g,[l],function(c,d){var e=d[0],a=c.id(),b=e.value;return typeof a==typeof b&&a<=b}],"filter->=":[g,[k,l],function(d,a){var e=a[0],f=a[1],b=d.properties()[e.value],c=f.value;return typeof b==typeof c&&b>=c}],"filter-id->=":[g,[l],function(c,d){var e=d[0],a=c.id(),b=e.value;return typeof a==typeof b&&a>=b}],"filter-has":[g,[l],function(a,b){return b[0].value in a.properties()}],"filter-has-id":[g,[],function(a){return null!==a.id()&& void 0!==a.id()}],"filter-type-in":[g,[S(k)],function(a,b){return b[0].value.indexOf(a.geometryType())>=0}],"filter-id-in":[g,[S(l)],function(a,b){return b[0].value.indexOf(a.id())>=0}],"filter-in-small":[g,[k,S(l)],function(b,a){var c=a[0];return a[1].value.indexOf(b.properties()[c.value])>=0}],"filter-in-large":[g,[k,S(l)],function(c,a){var d=a[0],b=a[1];return function(d,e,b,c){for(;b<=c;){var a=b+c>>1;if(e[a]===d)return!0;e[a]>d?c=a-1:b=a+1}return!1}(c.properties()[d.value],b.value,0,b.value.length-1)}],all:{type:g,overloads:[[[g,g],function(a,b){var c=b[1];return b[0].evaluate(a)&&c.evaluate(a)}],[M(g),function(c,d){for(var a=0,b=d;a<b.length;a+=1)if(!b[a].evaluate(c))return!1;return!0}]]},any:{type:g,overloads:[[[g,g],function(a,b){var c=b[1];return b[0].evaluate(a)||c.evaluate(a)}],[M(g),function(c,d){for(var a=0,b=d;a<b.length;a+=1)if(b[a].evaluate(c))return!0;return!1}]]},"!":[g,[g],function(a,b){return!b[0].evaluate(a)}],"is-supported-script":[g,[k],function(a,c){var b=a.globals&&a.globals.isSupportedScript;return!b||b(c[0].evaluate(a))}],upcase:[k,[k],function(a,b){return b[0].evaluate(a).toUpperCase()}],downcase:[k,[k],function(a,b){return b[0].evaluate(a).toLowerCase()}],concat:[k,M(l),function(b,a){return a.map(function(a){return eH(a.evaluate(b))}).join("")}],"resolved-locale":[k,[cu],function(a,b){return b[0].evaluate(a).resolvedLocale()}]});var a0=function(c,b){var a;this.expression=c,this._warningHistory={},this._evaluator=new W,this._defaultValue=b?"color"===(a=b).type&&fk(a.default)?new u(0,0,0,0):"color"===a.type?u.parse(a.default)||null:void 0===a.default?null:a.default:null,this._enumValues=b&&"enum"===b.type?b.values:null};function fr(a){return Array.isArray(a)&&a.length>0&&"string"==typeof a[0]&&a[0]in aN}function cJ(h,a){var b,c,e=new ay(aN,[],a?(b=a,c={color:R,string:k,number:d,enum:k,boolean:g,formatted:cv,resolvedImage:cw},"array"===b.type?S(c[b.value]||l,b.length):c[b.type]):void 0),f=e.parse(h,void 0,void 0,void 0,a&&"string"===a.type?{typeAnnotation:"coerce"}:void 0);return f?fe(new a0(f,a)):ff(e.errors)}a0.prototype.evaluateWithoutErrorHandling=function(a,b,c,d,e,f){return this._evaluator.globals=a,this._evaluator.feature=b,this._evaluator.featureState=c,this._evaluator.canonical=d,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=f,this.expression.evaluate(this._evaluator)},a0.prototype.evaluate=function(c,d,e,f,g,h){this._evaluator.globals=c,this._evaluator.feature=d||null,this._evaluator.featureState=e||null,this._evaluator.canonical=f,this._evaluator.availableImages=g||null,this._evaluator.formattedSection=h||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new cx("Expected value to be one of "+Object.keys(this._enumValues).map(function(a){return JSON.stringify(a)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(b){return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,"undefined"!=typeof console&&console.warn(b.message)),this._defaultValue}};var a1=function(a,b){this.kind=a,this._styleExpression=b,this.isStateDependent="constant"!==a&&!e_(b.expression)};a1.prototype.evaluateWithoutErrorHandling=function(a,b,c,d,e,f){return this._styleExpression.evaluateWithoutErrorHandling(a,b,c,d,e,f)},a1.prototype.evaluate=function(a,b,c,d,e,f){return this._styleExpression.evaluate(a,b,c,d,e,f)};var aO=function(a,b,c,d){this.kind=a,this.zoomStops=c,this._styleExpression=b,this.isStateDependent="camera"!==a&&!e_(b.expression),this.interpolationType=d};function fs(b,c){if("error"===(b=cJ(b,c)).result)return b;var d=b.value.expression,e=e$(d);if(!e&&!fg(c))return ff([new ew("","data expressions not supported")]);var f=e0(d,["zoom"]);if(!f&&!fh(c))return ff([new ew("","zoom expressions not supported")]);var a=function d(a){var b=null;if(a instanceof aa)b=d(a.result);else if(a instanceof _)for(var c=0,e=a.args;c<e.length&&!(b=d(e[c]));c+=1);else(a instanceof $||a instanceof D)&&a.input instanceof J&&"zoom"===a.input.name&&(b=a);return b instanceof ew||a.eachChild(function(c){var a=d(c);a instanceof ew?b=a:!b&&a?b=new ew("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):b&&a&&b!==a&&(b=new ew("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),b}(d);return a||f?a instanceof ew?ff([a]):a instanceof D&&!fi(c)?ff([new ew("",'"interpolate" expressions cannot be used with this property')]):fe(a?new aO(e?"camera":"composite",b.value,a.labels,a instanceof D?a.interpolation:void 0):new a1(e?"constant":"source",b.value)):ff([new ew("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}aO.prototype.evaluateWithoutErrorHandling=function(a,b,c,d,e,f){return this._styleExpression.evaluateWithoutErrorHandling(a,b,c,d,e,f)},aO.prototype.evaluate=function(a,b,c,d,e,f){return this._styleExpression.evaluate(a,b,c,d,e,f)},aO.prototype.interpolationFactor=function(a,b,c){return this.interpolationType?D.interpolationFactor(this.interpolationType,a,b,c):0};var a2=function(a,b){this._parameters=a,this._specification=b,et(this,function v(a,e){var f,l,w,x="color"===e.type,g=a.stops&&"object"==typeof a.stops[0][0],y=g||!(g|| void 0!==a.property),b=a.type||(fi(e)?"exponential":"interval");if(x&&((a=et({},a)).stops&&(a.stops=a.stops.map(function(a){return[a[0],u.parse(a[1])]})),a.default=u.parse(a.default?a.default:e.default)),a.colorSpace&&"rgb"!==a.colorSpace&&!fa[a.colorSpace])throw Error("Unknown color space: "+a.colorSpace);if("exponential"===b)f=fp;else if("interval"===b)f=fo;else if("categorical"===b){f=fn,l=Object.create(null);for(var h=0,m=a.stops;h<m.length;h+=1){var n=m[h];l[n[0]]=n[1]}w=typeof a.stops[0][0]}else{if("identity"!==b)throw Error('Unknown function type "'+b+'"');f=fq}if(g){for(var c={},o=[],i=0;i<a.stops.length;i++){var j=a.stops[i],d=j[0].zoom;void 0===c[d]&&(c[d]={zoom:d,type:a.type,property:a.property,default:a.default,stops:[]},o.push(d)),c[d].stops.push([j[0].value,j[1]])}for(var p=[],k=0,q=o;k<q.length;k+=1){var r=q[k];p.push([c[r].zoom,v(c[r],e)])}var s={name:"linear"};return{kind:"composite",interpolationType:s,interpolationFactor:D.interpolationFactor.bind(void 0,s),zoomStops:p.map(function(a){return a[0]}),evaluate:function(c,d){var b=c.zoom;return fp({stops:p,base:a.base},e,b).evaluate(b,d)}}}if(y){var t="exponential"===b?{name:"exponential",base:void 0!==a.base?a.base:1}:null;return{kind:"camera",interpolationType:t,interpolationFactor:D.interpolationFactor.bind(void 0,t),zoomStops:a.stops.map(function(a){return a[0]}),evaluate:function(b){return f(a,e,b.zoom,l,w)}}}return{kind:"source",evaluate:function(d,b){var c=b&&b.properties?b.properties[a.property]:void 0;return void 0===c?fm(a.default,e.default):f(a,e,c,l,w)}}}(this._parameters,this._specification))};function cK(c){var d=c.key,a=c.value,b=c.valueSpec||{},f=c.objectElementValidators||{},l=c.style,m=c.styleSpec,g=[],k=fj(a);if("object"!==k)return[new cr(d,a,"object expected, "+k+" found")];for(var e in a){var j=e.split(".")[0],n=b[j]||b["*"],h=void 0;if(f[j])h=f[j];else if(b[j])h=fF;else if(f["*"])h=f["*"];else{if(!b["*"]){g.push(new cr(d,a[e],'unknown property "'+e+'"'));continue}h=fF}g=g.concat(h({key:(d?d+".":d)+e,value:a[e],valueSpec:n,style:l,styleSpec:m,object:a,objectKey:e},a))}for(var i in b)f[i]||b[i].required&& void 0===b[i].default&& void 0===a[i]&&g.push(new cr(d,a,'missing required property "'+i+'"'));return g}function cL(c){var a=c.value,b=c.valueSpec,i=c.style,h=c.styleSpec,e=c.key,j=c.arrayElementValidator||fF;if("array"!==fj(a))return[new cr(e,a,"array expected, "+fj(a)+" found")];if(b.length&&a.length!==b.length)return[new cr(e,a,"array length "+b.length+" expected, length "+a.length+" found")];if(b["min-length"]&&a.length<b["min-length"])return[new cr(e,a,"array length at least "+b["min-length"]+" expected, length "+a.length+" found")];var f={type:b.value,values:b.values};h.$version<7&&(f.function=b.function),"object"===fj(b.value)&&(f=b.value);for(var g=[],d=0;d<a.length;d++)g=g.concat(j({array:a,arrayIndex:d,value:a[d],valueSpec:f,style:i,styleSpec:h,key:e+"["+d+"]"}));return g}function cM(d){var e=d.key,a=d.value,b=d.valueSpec,c=fj(a);return"number"===c&&a!=a&&(c="NaN"),"number"!==c?[new cr(e,a,"number expected, "+c+" found")]:"minimum"in b&&a<b.minimum?[new cr(e,a,a+" is less than the minimum value "+b.minimum)]:"maximum"in b&&a>b.maximum?[new cr(e,a,a+" is greater than the maximum value "+b.maximum)]:[]}function cN(a){var f,g,h,i=a.valueSpec,c=eu(a.value.type),j={},d="categorical"!==c&& void 0===a.value.property,e="array"===fj(a.value.stops)&&"array"===fj(a.value.stops[0])&&"object"===fj(a.value.stops[0][0]),b=cK({key:a.key,value:a.value,valueSpec:a.styleSpec.function,style:a.style,styleSpec:a.styleSpec,objectElementValidators:{stops:function(a){if("identity"===c)return[new cr(a.key,a.value,'identity function may not have a "stops" property')];var b=[],d=a.value;return b=b.concat(cL({key:a.key,value:d,valueSpec:a.valueSpec,style:a.style,styleSpec:a.styleSpec,arrayElementValidator:k})),"array"===fj(d)&&0===d.length&&b.push(new cr(a.key,d,"array must have at least one stop")),b},default:function(a){return fF({key:a.key,value:a.value,valueSpec:i,style:a.style,styleSpec:a.styleSpec})}}});return"identity"===c&&d&&b.push(new cr(a.key,a.value,'missing required property "property"')),"identity"===c||a.value.stops||b.push(new cr(a.key,a.value,'missing required property "stops"')),"exponential"===c&&a.valueSpec.expression&&!fi(a.valueSpec)&&b.push(new cr(a.key,a.value,"exponential functions not supported")),a.styleSpec.$version>=8&&(d||fg(a.valueSpec)?d&&!fh(a.valueSpec)&&b.push(new cr(a.key,a.value,"zoom functions not supported")):b.push(new cr(a.key,a.value,"property functions not supported"))),("categorical"===c||e)&& void 0===a.value.property&&b.push(new cr(a.key,a.value,'"property" property is required')),b;function k(c){var d=[],a=c.value,b=c.key;if("array"!==fj(a))return[new cr(b,a,"array expected, "+fj(a)+" found")];if(2!==a.length)return[new cr(b,a,"array length 2 expected, length "+a.length+" found")];if(e){if("object"!==fj(a[0]))return[new cr(b,a,"object expected, "+fj(a[0])+" found")];if(void 0===a[0].zoom)return[new cr(b,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new cr(b,a,"object stop key must have value")];if(h&&h>eu(a[0].zoom))return[new cr(b,a[0].zoom,"stop zoom values must appear in ascending order")];eu(a[0].zoom)!==h&&(h=eu(a[0].zoom),g=void 0,j={}),d=d.concat(cK({key:b+"[0]",value:a[0],valueSpec:{zoom:{}},style:c.style,styleSpec:c.styleSpec,objectElementValidators:{zoom:cM,value:l}}))}else d=d.concat(l({key:b+"[0]",value:a[0],valueSpec:{},style:c.style,styleSpec:c.styleSpec},a));return fr(ev(a[1]))?d.concat([new cr(b+"[1]",a[1],"expressions are not allowed in function stops.")]):d.concat(fF({key:b+"[1]",value:a[1],valueSpec:i,style:c.style,styleSpec:c.styleSpec}))}function l(a,k){var b=fj(a.value),d=eu(a.value),e=null!==a.value?a.value:k;if(f){if(b!==f)return[new cr(a.key,e,b+" stop domain type must match previous stop domain type "+f)]}else f=b;if("number"!==b&&"string"!==b&&"boolean"!==b)return[new cr(a.key,e,"stop domain value must be a number, string, or boolean")];if("number"!==b&&"categorical"!==c){var h="number expected, "+b+" found";return fg(i)&& void 0===c&&(h+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new cr(a.key,e,h)]}return"categorical"!==c||"number"!==b||isFinite(d)&&Math.floor(d)===d?"categorical"!==c&&"number"===b&& void 0!==g&&d<g?[new cr(a.key,e,"stop domain values must appear in ascending order")]:(g=d,"categorical"===c&&d in j?[new cr(a.key,e,"stop domain values must be unique")]:(j[d]=!0,[])):[new cr(a.key,e,"integer expected, found "+d)]}}function ft(a){var c=("property"===a.expressionContext?fs:cJ)(ev(a.value),a.valueSpec);if("error"===c.result)return c.value.map(function(b){return new cr(""+a.key+b.key,a.value,b.message)});var b=c.value.expression||c.value._styleExpression.expression;if("property"===a.expressionContext&&"text-font"===a.propertyKey&&!b.outputDefined())return[new cr(a.key,a.value,'Invalid data expression for "'+a.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===a.expressionContext&&"layout"===a.propertyType&&!e_(b))return[new cr(a.key,a.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===a.expressionContext&&!e_(b))return[new cr(a.key,a.value,'"feature-state" data expressions are not supported with filters.')];if(a.expressionContext&&0===a.expressionContext.indexOf("cluster")){if(!e0(b,["zoom","feature-state"]))return[new cr(a.key,a.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===a.expressionContext&&!e$(b))return[new cr(a.key,a.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function cO(c){var e=c.key,a=c.value,b=c.valueSpec,d=[];return Array.isArray(b.values)?-1===b.values.indexOf(eu(a))&&d.push(new cr(e,a,"expected one of ["+b.values.join(", ")+"], "+JSON.stringify(a)+" found")):-1===Object.keys(b.values).indexOf(eu(a))&&d.push(new cr(e,a,"expected one of ["+Object.keys(b.values).join(", ")+"], "+JSON.stringify(a)+" found")),d}function fu(a){if(!0===a|| !1===a)return!0;if(!Array.isArray(a)||0===a.length)return!1;switch(a[0]){case"has":return a.length>=2&&"$id"!==a[1]&&"$type"!==a[1];case"in":return a.length>=3&&("string"!=typeof a[1]||Array.isArray(a[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==a.length||Array.isArray(a[1])||Array.isArray(a[2]);case"any":case"all":for(var b=0,c=a.slice(1);b<c.length;b+=1){var d=c[b];if(!fu(d)&&"boolean"!=typeof d)return!1}return!0;default:return!0}}a2.deserialize=function(a){return new a2(a._parameters,a._specification)},a2.serialize=function(a){return{_parameters:a._parameters,_specification:a._specification}};var fv={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cP(a){if(null==a)return{filter:function(){return!0},needGeometry:!1};fu(a)||(a=fx(a));var b=cJ(a,fv);if("error"===b.result)throw Error(b.value.map(function(a){return a.key+": "+a.message}).join(", "));return{filter:function(a,c,d){return b.value.evaluate(a,c,{},d)},needGeometry:function c(a){if(!Array.isArray(a))return!1;if("within"===a[0])return!0;for(var b=1;b<a.length;b++)if(c(a[b]))return!0;return!1}(a)}}function fw(a,b){return a<b?-1:a>b?1:0}function fx(a){if(!a)return!0;var c,b=a[0];return a.length<=1?"any"!==b:"=="===b?fy(a[1],a[2],"=="):"!="===b?fB(fy(a[1],a[2],"==")):"<"===b||">"===b||"<="===b||">="===b?fy(a[1],a[2],b):"any"===b?["any"].concat(a.slice(1).map(fx)):"all"===b?["all"].concat(a.slice(1).map(fx)):"none"===b?["all"].concat(a.slice(1).map(fx).map(fB)):"in"===b?fz(a[1],a.slice(2)):"!in"===b?fB(fz(a[1],a.slice(2))):"has"===b?fA(a[1]):"!has"===b?fB(fA(a[1])):"within"!==b||a}function fy(c,a,b){switch(c){case"$type":return["filter-type-"+b,a];case"$id":return["filter-id-"+b,a];default:return["filter-"+b,c,a]}}function fz(b,a){if(0===a.length)return!1;switch(b){case"$type":return["filter-type-in",["literal",a]];case"$id":return["filter-id-in",["literal",a]];default:return a.length>200&&!a.some(function(b){return typeof b!=typeof a[0]})?["filter-in-large",b,["literal",a.sort(fw)]]:["filter-in-small",b,["literal",a]]}}function fA(a){switch(a){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",a]}}function fB(a){return["!",a]}function bw(a){return fu(ev(a.value))?ft(et({},a,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function i(e){var a=e.value,c=e.key;if("array"!==fj(a))return[new cr(c,a,"array expected, "+fj(a)+" found")];var d,h=e.styleSpec,b=[];if(a.length<1)return[new cr(c,a,"filter array must have at least 1 element")];switch(b=b.concat(cO({key:c+"[0]",value:a[0],valueSpec:h.filter_operator,style:e.style,styleSpec:e.styleSpec})),eu(a[0])){case"<":case"<=":case">":case">=":a.length>=2&&"$type"===eu(a[1])&&b.push(new cr(c,a,'"$type" cannot be use with operator "'+a[0]+'"'));case"==":case"!=":3!==a.length&&b.push(new cr(c,a,'filter array for operator "'+a[0]+'" must have 3 elements'));case"in":case"!in":a.length>=2&&"string"!==(d=fj(a[1]))&&b.push(new cr(c+"[1]",a[1],"string expected, "+d+" found"));for(var f=2;f<a.length;f++)d=fj(a[f]),"$type"===eu(a[1])?b=b.concat(cO({key:c+"["+f+"]",value:a[f],valueSpec:h.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==d&&"number"!==d&&"boolean"!==d&&b.push(new cr(c+"["+f+"]",a[f],"string, number, or boolean expected, "+d+" found"));break;case"any":case"all":case"none":for(var g=1;g<a.length;g++)b=b.concat(i({key:c+"["+g+"]",value:a[g],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":d=fj(a[1]),2!==a.length?b.push(new cr(c,a,'filter array for "'+a[0]+'" operator must have 2 elements')):"string"!==d&&b.push(new cr(c+"[1]",a[1],"string expected, "+d+" found"));break;case"within":d=fj(a[1]),2!==a.length?b.push(new cr(c,a,'filter array for "'+a[0]+'" operator must have 2 elements')):"object"!==d&&b.push(new cr(c+"[1]",a[1],"object expected, "+d+" found"))}return b}(a)}function fC(b,i){var d=b.key,e=b.style,f=b.styleSpec,a=b.value,c=b.objectKey,g=f[i+"_"+b.layerType];if(!g)return[];var j=c.match(/^(.*)-transition$/);if("paint"===i&&j&&g[j[1]]&&g[j[1]].transition)return fF({key:d,value:a,valueSpec:f.transition,style:e,styleSpec:f});var l,h=b.valueSpec||g[c];if(!h)return[new cr(d,a,'unknown property "'+c+'"')];if("string"===fj(a)&&fg(h)&&!h.tokens&&(l=/^{([^}]+)}$/.exec(a)))return[new cr(d,a,'"'+c+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var k=[];return"symbol"===b.layerType&&("text-field"===c&&e&&!e.glyphs&&k.push(new cr(d,a,'use of "text-field" requires a style "glyphs" property')),"text-font"===c&&fk(ev(a))&&"identity"===eu(a.type)&&k.push(new cr(d,a,'"text-font" does not support identity functions'))),k.concat(fF({key:b.key,value:a,valueSpec:h,style:e,styleSpec:f,expressionContext:"property",propertyType:i,propertyKey:c}))}function cQ(a){return fC(a,"paint")}function cR(a){return fC(a,"layout")}function bx(d){var b=[],a=d.value,c=d.key,g=d.style,l=d.styleSpec;a.type||a.ref||b.push(new cr(c,a,'either "type" or "ref" is required'));var i,e=eu(a.type),m=eu(a.ref);if(a.id)for(var n=eu(a.id),j=0;j<d.arrayIndex;j++){var k=g.layers[j];eu(k.id)===n&&b.push(new cr(c,a.id,'duplicate layer id "'+a.id+'", previously used at line '+k.id.__line__))}if("ref"in a)["type","source","source-layer","filter","layout"].forEach(function(d){d in a&&b.push(new cr(c,a[d],'"'+d+'" is prohibited for ref layers'))}),g.layers.forEach(function(a){eu(a.id)===m&&(i=a)}),i?i.ref?b.push(new cr(c,a.ref,"ref cannot reference another ref layer")):e=eu(i.type):b.push(new cr(c,a.ref,'ref layer "'+m+'" not found'));else if("background"!==e){if(a.source){var h=g.sources&&g.sources[a.source],f=h&&eu(h.type);h?"vector"===f&&"raster"===e?b.push(new cr(c,a.source,'layer "'+a.id+'" requires a raster source')):"raster"===f&&"raster"!==e?b.push(new cr(c,a.source,'layer "'+a.id+'" requires a vector source')):"vector"!==f||a["source-layer"]?"raster-dem"===f&&"hillshade"!==e?b.push(new cr(c,a.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"===e&&a.paint&&a.paint["line-gradient"]&&("geojson"!==f||!h.lineMetrics)&&b.push(new cr(c,a,'layer "'+a.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):b.push(new cr(c,a,'layer "'+a.id+'" must specify a "source-layer"')):b.push(new cr(c,a.source,'source "'+a.source+'" not found'))}else b.push(new cr(c,a,'missing required property "source"'))}return b=b.concat(cK({key:c,value:a,valueSpec:l.layer,style:d.style,styleSpec:d.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return fF({key:c+".type",value:a.type,valueSpec:l.layer.type,style:d.style,styleSpec:d.styleSpec,object:a,objectKey:"type"})},filter:bw,layout:function(b){return cK({layer:a,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,objectElementValidators:{"*":function(a){return cR(et({layerType:e},a))}}})},paint:function(b){return cK({layer:a,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,objectElementValidators:{"*":function(a){return cQ(et({layerType:e},a))}}})}}}))}function cS(a){var b=a.value,d=a.key,c=fj(b);return"string"!==c?[new cr(d,b,"string expected, "+c+" found")]:[]}var fD={promoteId:function(c){var d=c.key,a=c.value;if("string"===fj(a))return cS({key:d,value:a});var b=[];for(var e in a)b.push.apply(b,cS({key:d+"."+e,value:a[e]}));return b}};function by(e){var a=e.value,b=e.key,c=e.styleSpec,f=e.style;if(!a.type)return[new cr(b,a,'"type" is required')];var d,i=eu(a.type);switch(i){case"vector":case"raster":case"raster-dem":return cK({key:b,value:a,valueSpec:c["source_"+i.replace("-","_")],style:e.style,styleSpec:c,objectElementValidators:fD});case"geojson":if(d=cK({key:b,value:a,valueSpec:c.source_geojson,style:f,styleSpec:c,objectElementValidators:fD}),a.cluster)for(var g in a.clusterProperties){var j=a.clusterProperties[g],h=j[0],k="string"==typeof h?[h,["accumulated"],["get",g]]:h;d.push.apply(d,ft({key:b+"."+g+".map",value:j[1],expressionContext:"cluster-map"})),d.push.apply(d,ft({key:b+"."+g+".reduce",value:k,expressionContext:"cluster-reduce"}))}return d;case"video":return cK({key:b,value:a,valueSpec:c.source_video,style:f,styleSpec:c});case"image":return cK({key:b,value:a,valueSpec:c.source_image,style:f,styleSpec:c});case"canvas":return[new cr(b,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return cO({key:b+".type",value:a.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:f,styleSpec:c})}}function bz(f){var b=f.value,d=f.styleSpec,e=d.light,h=f.style,c=[],i=fj(b);if(void 0===b)return c;if("object"!==i)return c.concat([new cr("light",b,"object expected, "+i+" found")]);for(var a in b){var g=a.match(/^(.*)-transition$/);c=c.concat(g&&e[g[1]]&&e[g[1]].transition?fF({key:a,value:b[a],valueSpec:d.transition,style:h,styleSpec:d}):e[a]?fF({key:a,value:b[a],valueSpec:e[a],style:h,styleSpec:d}):[new cr(a,b[a],'unknown property "'+a+'"')])}return c}var fE={"*":function(){return[]},array:cL,boolean:function(a){var b=a.value,d=a.key,c=fj(b);return"boolean"!==c?[new cr(d,b,"boolean expected, "+c+" found")]:[]},number:cM,color:function(b){var c=b.key,a=b.value,d=fj(a);return"string"!==d?[new cr(c,a,"color expected, "+d+" found")]:null===eC(a)?[new cr(c,a,'color expected, "'+a+'" found')]:[]},constants:cs,enum:cO,filter:bw,function:cN,layer:bx,object:cK,source:by,light:bz,string:cS,formatted:function(a){return 0===cS(a).length?[]:ft(a)},resolvedImage:function(a){return 0===cS(a).length?[]:ft(a)}};function fF(b){var c=b.value,a=b.valueSpec,d=b.styleSpec;return a.expression&&fk(eu(c))?cN(b):a.expression&&fr(ev(c))?ft(b):a.type&&fE[a.type]?fE[a.type](b):cK(et({},b,{valueSpec:a.type?d[a.type]:a}))}function fG(c){var a=c.value,d=c.key,b=cS(c);return b.length||(-1===a.indexOf("{fontstack}")&&b.push(new cr(d,a,'"glyphs" url must include a "{fontstack}" token')),-1===a.indexOf("{range}")&&b.push(new cr(d,a,'"glyphs" url must include a "{range}" token'))),b}function N(a,c){void 0===c&&(c=b);var d=[];return d=d.concat(fF({key:"",value:a,valueSpec:c.$root,styleSpec:c,style:a,objectElementValidators:{glyphs:fG,"*":function(){return[]}}})),a.constants&&(d=d.concat(cs({key:"constants",value:a.constants,style:a,styleSpec:c}))),fH(d)}function fH(a){return[].concat(a).sort(function(a,b){return a.line-b.line})}function ak(a){return function(){for(var c=[],b=arguments.length;b--;)c[b]=arguments[b];return fH(a.apply(this,c))}}N.source=ak(by),N.light=ak(bz),N.layer=ak(bx),N.filter=ak(bw),N.paintProperty=ak(cQ),N.layoutProperty=ak(cR);var aP=N,cT=aP.light,fI=aP.paintProperty,fJ=aP.layoutProperty;function cU(e,a){var c=!1;if(a&&a.length)for(var b=0,d=a;b<d.length;b+=1)e.fire(new cq(Error(d[b].message))),c=!0;return c}var a3=E;function E(b,c,d){var e=this.cells=[];if(b instanceof ArrayBuffer){this.arrayBuffer=b;var a=new Int32Array(this.arrayBuffer);b=a[0],this.d=(c=a[1])+2*(d=a[2]);for(var f=0;f<this.d*this.d;f++){var g=a[3+f],h=a[3+f+1];e.push(g===h?null:a.subarray(g,h))}var i=a[3+e.length+1];this.keys=a.subarray(a[3+e.length],i),this.bboxes=a.subarray(i),this.insert=this._insertReadonly}else{this.d=c+2*d;for(var j=0;j<this.d*this.d;j++)e.push([]);this.keys=[],this.bboxes=[]}this.n=c,this.extent=b,this.padding=d,this.scale=c/b,this.uid=0;var k=d/c*b;this.min=-k,this.max=b+k}E.prototype.insert=function(e,a,b,c,d){this._forEachCell(a,b,c,d,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(a),this.bboxes.push(b),this.bboxes.push(c),this.bboxes.push(d)},E.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},E.prototype._insertCell=function(c,d,e,f,a,b){this.cells[a].push(b)},E.prototype.query=function(a,b,c,d,e){var f=this.min,g=this.max;if(a<=f&&b<=f&&g<=c&&g<=d&&!e)return Array.prototype.slice.call(this.keys);var h=[];return this._forEachCell(a,b,c,d,this._queryCell,h,{},e),h},E.prototype._queryCell=function(h,i,j,k,l,m,d,g){var e=this.cells[l];if(null!==e)for(var n=this.keys,a=this.bboxes,f=0;f<e.length;f++){var c=e[f];if(void 0===d[c]){var b=4*c;(g?g(a[b+0],a[b+1],a[b+2],a[b+3]):h<=a[b+2]&&i<=a[b+3]&&j>=a[b+0]&&k>=a[b+1])?(d[c]=!0,m.push(n[c])):d[c]=!1}}},E.prototype._forEachCell=function(d,e,f,g,h,i,j,c){for(var k=this._convertToCellCoord(d),l=this._convertToCellCoord(e),m=this._convertToCellCoord(f),n=this._convertToCellCoord(g),a=k;a<=m;a++)for(var b=l;b<=n;b++){var o=this.d*b+a;if((!c||c(this._convertFromCellCoord(a),this._convertFromCellCoord(b),this._convertFromCellCoord(a+1),this._convertFromCellCoord(b+1)))&&h.call(this,d,e,f,g,o,i,j,c))return}},E.prototype._convertFromCellCoord=function(a){return(a-this.padding)/this.scale},E.prototype._convertToCellCoord=function(a){return Math.max(0,Math.min(this.d-1,Math.floor(a*this.scale)+this.padding))},E.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var c=this.cells,f=3+this.cells.length+1+1,g=0,e=0;e<this.cells.length;e++)g+=this.cells[e].length;var a=new Int32Array(f+g+this.keys.length+this.bboxes.length);a[0]=this.extent,a[1]=this.n,a[2]=this.padding;for(var b=f,d=0;d<c.length;d++){var h=c[d];a[3+d]=b,a.set(h,b),b+=h.length}return a[3+c.length]=b,a.set(this.keys,b),a[3+c.length+1]=b+=this.keys.length,a.set(this.bboxes,b),b+=this.bboxes.length,a.buffer};var fK=j.ImageData,fL=j.ImageBitmap,fM={};function c(b,c,a){void 0===a&&(a={}),Object.defineProperty(c,"_classRegistryKey",{value:b,writeable:!1}),fM[b]={klass:c,omit:a.omit||[],shallow:a.shallow||[]}}for(var a4 in c("Object",Object),a3.serialize=function(c,a){var b=c.toArrayBuffer();return a&&a.push(b),{buffer:b}},a3.deserialize=function(a){return new a3(a.buffer)},c("Grid",a3),c("Color",u),c("Error",Error),c("ResolvedImage",aM),c("StylePropertyFunction",a2),c("StyleExpression",a0,{omit:["_evaluator"]}),c("ZoomDependentExpression",aO),c("ZoomConstantExpression",a1),c("CompoundExpression",J,{omit:["_evaluate"]}),aN)aN[a4]._classRegistryKey||c("Expression_"+a4,aN[a4]);function fN(a){return a&&"undefined"!=typeof ArrayBuffer&&(a instanceof ArrayBuffer||a.constructor&&"ArrayBuffer"===a.constructor.name)}function fO(a){return fL&&a instanceof fL}function fP(a,b){if(null==a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||a instanceof Boolean||a instanceof Number||a instanceof String||a instanceof Date||a instanceof RegExp)return a;if(fN(a)||fO(a))return b&&b.push(a),a;if(ArrayBuffer.isView(a)){var h=a;return b&&b.push(h.buffer),h}if(a instanceof fK)return b&&b.push(a.data.buffer),a;if(Array.isArray(a)){for(var i=[],g=0,j=a;g<j.length;g+=1)i.push(fP(j[g],b));return i}if("object"==typeof a){var f=a.constructor,c=f._classRegistryKey;if(!c)throw Error("can't serialize object of unregistered class");var d=f.serialize?f.serialize(a,b):{};if(!f.serialize){for(var e in a)if(a.hasOwnProperty(e)&&!(fM[c].omit.indexOf(e)>=0)){var k=a[e];d[e]=fM[c].shallow.indexOf(e)>=0?k:fP(k,b)}a instanceof Error&&(d.message=a.message)}if(d.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==c&&(d.$name=c),d}throw Error("can't serialize object of type "+typeof a)}function fQ(a){if(null==a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||a instanceof Boolean||a instanceof Number||a instanceof String||a instanceof Date||a instanceof RegExp||fN(a)||fO(a)||ArrayBuffer.isView(a)||a instanceof fK)return a;if(Array.isArray(a))return a.map(fQ);if("object"==typeof a){var d=a.$name||"Object",b=fM[d].klass;if(!b)throw Error("can't deserialize unregistered class "+d);if(b.deserialize)return b.deserialize(a);for(var f=Object.create(b.prototype),e=0,g=Object.keys(a);e<g.length;e+=1){var c=g[e];if("$name"!==c){var h=a[c];f[c]=fM[d].shallow.indexOf(c)>=0?h:fQ(h)}}return f}throw Error("can't deserialize object of type "+typeof a)}var bA=function(){this.first=!0};bA.prototype.update=function(b,c){var a=Math.floor(b);return this.first?(this.first=!1,this.lastIntegerZoom=a,this.lastIntegerZoomTime=0,this.lastZoom=b,this.lastFloorZoom=a,!0):(this.lastFloorZoom>a?(this.lastIntegerZoom=a+1,this.lastIntegerZoomTime=c):this.lastFloorZoom<a&&(this.lastIntegerZoom=a,this.lastIntegerZoomTime=c),b!==this.lastZoom&&(this.lastZoom=b,this.lastFloorZoom=a,!0))};var cV={"Latin-1 Supplement":function(a){return a>=128&&a<=255},Arabic:function(a){return a>=1536&&a<=1791},"Arabic Supplement":function(a){return a>=1872&&a<=1919},"Arabic Extended-A":function(a){return a>=2208&&a<=2303},"Hangul Jamo":function(a){return a>=4352&&a<=4607},"Unified Canadian Aboriginal Syllabics":function(a){return a>=5120&&a<=5759},Khmer:function(a){return a>=6016&&a<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(a){return a>=6320&&a<=6399},"General Punctuation":function(a){return a>=8192&&a<=8303},"Letterlike Symbols":function(a){return a>=8448&&a<=8527},"Number Forms":function(a){return a>=8528&&a<=8591},"Miscellaneous Technical":function(a){return a>=8960&&a<=9215},"Control Pictures":function(a){return a>=9216&&a<=9279},"Optical Character Recognition":function(a){return a>=9280&&a<=9311},"Enclosed Alphanumerics":function(a){return a>=9312&&a<=9471},"Geometric Shapes":function(a){return a>=9632&&a<=9727},"Miscellaneous Symbols":function(a){return a>=9728&&a<=9983},"Miscellaneous Symbols and Arrows":function(a){return a>=11008&&a<=11263},"CJK Radicals Supplement":function(a){return a>=11904&&a<=12031},"Kangxi Radicals":function(a){return a>=12032&&a<=12255},"Ideographic Description Characters":function(a){return a>=12272&&a<=12287},"CJK Symbols and Punctuation":function(a){return a>=12288&&a<=12351},Hiragana:function(a){return a>=12352&&a<=12447},Katakana:function(a){return a>=12448&&a<=12543},Bopomofo:function(a){return a>=12544&&a<=12591},"Hangul Compatibility Jamo":function(a){return a>=12592&&a<=12687},Kanbun:function(a){return a>=12688&&a<=12703},"Bopomofo Extended":function(a){return a>=12704&&a<=12735},"CJK Strokes":function(a){return a>=12736&&a<=12783},"Katakana Phonetic Extensions":function(a){return a>=12784&&a<=12799},"Enclosed CJK Letters and Months":function(a){return a>=12800&&a<=13055},"CJK Compatibility":function(a){return a>=13056&&a<=13311},"CJK Unified Ideographs Extension A":function(a){return a>=13312&&a<=19903},"Yijing Hexagram Symbols":function(a){return a>=19904&&a<=19967},"CJK Unified Ideographs":function(a){return a>=19968&&a<=40959},"Yi Syllables":function(a){return a>=40960&&a<=42127},"Yi Radicals":function(a){return a>=42128&&a<=42191},"Hangul Jamo Extended-A":function(a){return a>=43360&&a<=43391},"Hangul Syllables":function(a){return a>=44032&&a<=55215},"Hangul Jamo Extended-B":function(a){return a>=55216&&a<=55295},"Private Use Area":function(a){return a>=57344&&a<=63743},"CJK Compatibility Ideographs":function(a){return a>=63744&&a<=64255},"Arabic Presentation Forms-A":function(a){return a>=64336&&a<=65023},"Vertical Forms":function(a){return a>=65040&&a<=65055},"CJK Compatibility Forms":function(a){return a>=65072&&a<=65103},"Small Form Variants":function(a){return a>=65104&&a<=65135},"Arabic Presentation Forms-B":function(a){return a>=65136&&a<=65279},"Halfwidth and Fullwidth Forms":function(a){return a>=65280&&a<=65519}};function fR(c){for(var a=0,b=c;a<b.length;a+=1)if(fS(b[a].charCodeAt(0)))return!0;return!1}function fS(a){return!(746!==a&&747!==a&&(a<4352||!(cV["Bopomofo Extended"](a)||cV.Bopomofo(a)||cV["CJK Compatibility Forms"](a)&&!(a>=65097&&a<=65103)||cV["CJK Compatibility Ideographs"](a)||cV["CJK Compatibility"](a)||cV["CJK Radicals Supplement"](a)||cV["CJK Strokes"](a)||!(!cV["CJK Symbols and Punctuation"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||12336===a)||cV["CJK Unified Ideographs Extension A"](a)||cV["CJK Unified Ideographs"](a)||cV["Enclosed CJK Letters and Months"](a)||cV["Hangul Compatibility Jamo"](a)||cV["Hangul Jamo Extended-A"](a)||cV["Hangul Jamo Extended-B"](a)||cV["Hangul Jamo"](a)||cV["Hangul Syllables"](a)||cV.Hiragana(a)||cV["Ideographic Description Characters"](a)||cV.Kanbun(a)||cV["Kangxi Radicals"](a)||cV["Katakana Phonetic Extensions"](a)||cV.Katakana(a)&&12540!==a||!(!cV["Halfwidth and Fullwidth Forms"](a)||65288===a||65289===a||65293===a||a>=65306&&a<=65310||65339===a||65341===a||65343===a||a>=65371&&a<=65503||65507===a||a>=65512&&a<=65519)||!(!cV["Small Form Variants"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||cV["Unified Canadian Aboriginal Syllabics"](a)||cV["Unified Canadian Aboriginal Syllabics Extended"](a)||cV["Vertical Forms"](a)||cV["Yijing Hexagram Symbols"](a)||cV["Yi Syllables"](a)||cV["Yi Radicals"](a))))}function fT(b){var a;return!(fS(b)||(a=b,cV["Latin-1 Supplement"](a)&&(167===a||169===a||174===a||177===a||188===a||189===a||190===a||215===a||247===a)||cV["General Punctuation"](a)&&(8214===a||8224===a||8225===a||8240===a||8241===a||8251===a||8252===a||8258===a||8263===a||8264===a||8265===a||8273===a)||cV["Letterlike Symbols"](a)||cV["Number Forms"](a)||cV["Miscellaneous Technical"](a)&&(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||9003===a||a>=9085&&a<=9114||a>=9150&&a<=9165||9167===a||a>=9169&&a<=9179||a>=9186&&a<=9215)||cV["Control Pictures"](a)&&9251!==a||cV["Optical Character Recognition"](a)||cV["Enclosed Alphanumerics"](a)||cV["Geometric Shapes"](a)||cV["Miscellaneous Symbols"](a)&&!(a>=9754&&a<=9759)||cV["Miscellaneous Symbols and Arrows"](a)&&(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243)||cV["CJK Symbols and Punctuation"](a)||cV.Katakana(a)||cV["Private Use Area"](a)||cV["CJK Compatibility Forms"](a)||cV["Small Form Variants"](a)||cV["Halfwidth and Fullwidth Forms"](a)||8734===a||8756===a||8757===a||a>=9984&&a<=10087||a>=10102&&a<=10131||65532===a||65533===a))}function fU(a){return a>=1424&&a<=2303||cV["Arabic Presentation Forms-A"](a)||cV["Arabic Presentation Forms-B"](a)}function fV(a,b){return!(!b&&fU(a)||a>=2304&&a<=3583||a>=3840&&a<=4255||cV.Khmer(a))}function fW(c){for(var a=0,b=c;a<b.length;a+=1)if(fU(b[a].charCodeAt(0)))return!0;return!1}var fX=null,fY="unavailable",fZ=null,cW=function(a){a&&"string"==typeof a&&a.indexOf("NetworkError")> -1&&(fY="error"),fX&&fX(a)};function f$(){cX.fire(new bs("pluginStateChange",{pluginStatus:fY,pluginURL:fZ}))}var cX=new B,cY=function(){return fY},f_=function(){if("deferred"!==fY||!fZ)throw Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");fY="loading",f$(),fZ&&co({url:fZ},function(a){a?cW(a):(fY="loaded",f$())})},cZ={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===fY||null!=cZ.applyArabicShaping},isLoading:function(){return"loading"===fY},setState:function(a){fY=a.pluginStatus,fZ=a.pluginURL},isParsed:function(){return null!=cZ.applyArabicShaping&&null!=cZ.processBidirectionalText&&null!=cZ.processStyledBidirectionalText},getPluginURL:function(){return fZ}},aQ=function(b,a){this.zoom=b,a?(this.now=a.now,this.fadeDuration=a.fadeDuration,this.zoomHistory=a.zoomHistory,this.transition=a.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new bA,this.transition={})};aQ.prototype.isSupportedScript=function(a){return function(c,d){for(var a=0,b=c;a<b.length;a+=1)if(!fV(b[a].charCodeAt(0),d))return!1;return!0}(a,cZ.isLoaded())},aQ.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},aQ.prototype.getCrossfadeParameters=function(){var a=this.zoom,b=a-Math.floor(a),c=this.crossFadingFactor();return a>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:b+(1-b)*c}:{fromScale:.5,toScale:1,t:1-(1-c)*b}};var bB=function(a,b){this.property=a,this.value=b,this.expression=function(a,b){if(fk(a))return new a2(a,b);if(fr(a)){var c=fs(a,b);if("error"===c.result)throw Error(c.value.map(function(a){return a.key+": "+a.message}).join(", "));return c.value}var d=a;return"string"==typeof a&&"color"===b.type&&(d=u.parse(a)),{kind:"constant",evaluate:function(){return d}}}(void 0===b?a.specification.default:b,a.specification)};bB.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},bB.prototype.possiblyEvaluate=function(a,b,c){return this.property.possiblyEvaluate(this,a,b,c)};var bC=function(a){this.property=a,this.value=new bB(a,void 0)};bC.prototype.transitioned=function(a,b){return new c$(this.property,this.value,b,b2({},a.transition,this.transition),a.now)},bC.prototype.untransitioned=function(){return new c$(this.property,this.value,null,{},0)};var K=function(a){this._properties=a,this._values=Object.create(a.defaultTransitionablePropertyValues)};K.prototype.getValue=function(a){return b8(this._values[a].value.value)},K.prototype.setValue=function(a,b){this._values.hasOwnProperty(a)||(this._values[a]=new bC(this._values[a].property)),this._values[a].value=new bB(this._values[a].property,null===b?void 0:b8(b))},K.prototype.getTransition=function(a){return b8(this._values[a].transition)},K.prototype.setTransition=function(a,b){this._values.hasOwnProperty(a)||(this._values[a]=new bC(this._values[a].property)),this._values[a].transition=b8(b)||void 0},K.prototype.serialize=function(){for(var b={},c=0,d=Object.keys(this._values);c<d.length;c+=1){var a=d[c],e=this.getValue(a);void 0!==e&&(b[a]=e);var f=this.getTransition(a);void 0!==f&&(b[a+"-transition"]=f)}return b},K.prototype.transitioned=function(e,f){for(var c=new bD(this._properties),a=0,d=Object.keys(this._values);a<d.length;a+=1){var b=d[a];c._values[b]=this._values[b].transitioned(e,f._values[b])}return c},K.prototype.untransitioned=function(){for(var b=new bD(this._properties),a=0,c=Object.keys(this._values);a<c.length;a+=1){var d=c[a];b._values[d]=this._values[d].untransitioned()}return b};var c$=function(b,c,d,a,e){this.property=b,this.value=c,this.begin=e+a.delay||0,this.end=this.begin+a.duration||0,b.specification.transition&&(a.delay||a.duration)&&(this.prior=d)};c$.prototype.possiblyEvaluate=function(a,b,c){var d=a.now||0,e=this.value.possiblyEvaluate(a,b,c),f=this.prior;if(f){if(d>this.end||this.value.isDataDriven())return this.prior=null,e;if(d<this.begin)return f.possiblyEvaluate(a,b,c);var g=(d-this.begin)/(this.end-this.begin);return this.property.interpolate(f.possiblyEvaluate(a,b,c),e,function(a){if(a<=0)return 0;if(a>=1)return 1;var b=a*a,c=b*a;return 4*(a<.5?c:3*(a-b)+c-.75)}(g))}return e};var bD=function(a){this._properties=a,this._values=Object.create(a.defaultTransitioningPropertyValues)};bD.prototype.possiblyEvaluate=function(e,f,g){for(var b=new c_(this._properties),a=0,c=Object.keys(this._values);a<c.length;a+=1){var d=c[a];b._values[d]=this._values[d].possiblyEvaluate(e,f,g)}return b},bD.prototype.hasTransition=function(){for(var a=0,b=Object.keys(this._values);a<b.length;a+=1)if(this._values[b[a]].prior)return!0;return!1};var aR=function(a){this._properties=a,this._values=Object.create(a.defaultPropertyValues)};aR.prototype.getValue=function(a){return b8(this._values[a].value)},aR.prototype.setValue=function(a,b){this._values[a]=new bB(this._values[a].property,null===b?void 0:b8(b))},aR.prototype.serialize=function(){for(var b={},a=0,c=Object.keys(this._values);a<c.length;a+=1){var d=c[a],e=this.getValue(d);void 0!==e&&(b[d]=e)}return b},aR.prototype.possiblyEvaluate=function(e,f,g){for(var b=new c_(this._properties),a=0,c=Object.keys(this._values);a<c.length;a+=1){var d=c[a];b._values[d]=this._values[d].possiblyEvaluate(e,f,g)}return b};var a5=function(a,b,c){this.property=a,this.value=b,this.parameters=c};a5.prototype.isConstant=function(){return"constant"===this.value.kind},a5.prototype.constantOr=function(a){return"constant"===this.value.kind?this.value.value:a},a5.prototype.evaluate=function(a,b,c,d){return this.property.evaluate(this.value,this.parameters,a,b,c,d)};var c_=function(a){this._properties=a,this._values=Object.create(a.defaultPossiblyEvaluatedValues)};c_.prototype.get=function(a){return this._values[a]};var e=function(a){this.specification=a};e.prototype.possiblyEvaluate=function(a,b){return a.expression.evaluate(b)},e.prototype.interpolate=function(a,c,d){var b=e2[this.specification.type];return b?b(a,c,d):a};var f=function(a,b){this.specification=a,this.overrides=b};f.prototype.possiblyEvaluate=function(a,b,c,d){return new a5(this,"constant"===a.expression.kind||"camera"===a.expression.kind?{kind:"constant",value:a.expression.evaluate(b,null,{},c,d)}:a.expression,b)},f.prototype.interpolate=function(a,b,d){if("constant"!==a.value.kind||"constant"!==b.value.kind)return a;if(void 0===a.value.value|| void 0===b.value.value)return new a5(this,{kind:"constant",value:void 0},a.parameters);var c=e2[this.specification.type];return c?new a5(this,{kind:"constant",value:c(a.value.value,b.value.value,d)},a.parameters):a},f.prototype.evaluate=function(a,b,c,d,e,f){return"constant"===a.kind?a.value:a.evaluate(b,c,d,e,f)};var aS=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.possiblyEvaluate=function(b,a,e,f){if(void 0===b.value)return new a5(this,{kind:"constant",value:void 0},a);if("constant"===b.expression.kind){var c=b.expression.evaluate(a,null,{},e,f),d="resolvedImage"===b.property.specification.type&&"string"!=typeof c?c.name:c,g=this._calculate(d,d,d,a);return new a5(this,{kind:"constant",value:g},a)}if("camera"===b.expression.kind){var h=this._calculate(b.expression.evaluate({zoom:a.zoom-1}),b.expression.evaluate({zoom:a.zoom}),b.expression.evaluate({zoom:a.zoom+1}),a);return new a5(this,{kind:"constant",value:h},a)}return new a5(this,b.expression,a)},a.prototype.evaluate=function(a,b,c,d,f,g){if("source"===a.kind){var e=a.evaluate(b,c,d,f,g);return this._calculate(e,e,e,b)}return"composite"===a.kind?this._calculate(a.evaluate({zoom:Math.floor(b.zoom)-1},c,d),a.evaluate({zoom:Math.floor(b.zoom)},c,d),a.evaluate({zoom:Math.floor(b.zoom)+1},c,d),b):a.value},a.prototype._calculate=function(c,a,d,b){return b.zoom>b.zoomHistory.lastIntegerZoom?{from:c,to:a}:{from:d,to:a}},a.prototype.interpolate=function(a){return a},a}(f),al=function(a){this.specification=a};al.prototype.possiblyEvaluate=function(b,a,d,e){if(void 0!==b.value){if("constant"===b.expression.kind){var c=b.expression.evaluate(a,null,{},d,e);return this._calculate(c,c,c,a)}return this._calculate(b.expression.evaluate(new aQ(Math.floor(a.zoom-1),a)),b.expression.evaluate(new aQ(Math.floor(a.zoom),a)),b.expression.evaluate(new aQ(Math.floor(a.zoom+1),a)),a)}},al.prototype._calculate=function(c,a,d,b){return b.zoom>b.zoomHistory.lastIntegerZoom?{from:c,to:a}:{from:d,to:a}},al.prototype.interpolate=function(a){return a};var az=function(a){this.specification=a};az.prototype.possiblyEvaluate=function(a,b,c,d){return!!a.expression.evaluate(b,null,{},c,d)},az.prototype.interpolate=function(){return!1};var q=function(b){for(var a in this.properties=b,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],b){var c=b[a];c.specification.overridable&&this.overridableProperties.push(a);var d=this.defaultPropertyValues[a]=new bB(c,void 0),e=this.defaultTransitionablePropertyValues[a]=new bC(c);this.defaultTransitioningPropertyValues[a]=e.untransitioned(),this.defaultPossiblyEvaluatedValues[a]=d.possiblyEvaluate({})}};c("DataDrivenProperty",f),c("DataConstantProperty",e),c("CrossFadedDataDrivenProperty",aS),c("CrossFadedProperty",al),c("ColorRampProperty",az);var y=function(c){function a(a,b){if(c.call(this),this.id=a.id,this.type=a.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==a.type&&(this.metadata=a.metadata,this.minzoom=a.minzoom,this.maxzoom=a.maxzoom,"background"!==a.type&&(this.source=a.source,this.sourceLayer=a["source-layer"],this.filter=a.filter),b.layout&&(this._unevaluatedLayout=new aR(b.layout)),b.paint)){for(var d in this._transitionablePaint=new K(b.paint),a.paint)this.setPaintProperty(d,a.paint[d],{validate:!1});for(var e in a.layout)this.setLayoutProperty(e,a.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new c_(b.paint)}}return c&&(a.__proto__=c),(a.prototype=Object.create(c&&c.prototype)).constructor=a,a.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},a.prototype.getLayoutProperty=function(a){return"visibility"===a?this.visibility:this._unevaluatedLayout.getValue(a)},a.prototype.setLayoutProperty=function(a,b,c){void 0===c&&(c={}),null!=b&&this._validate(fJ,"layers."+this.id+".layout."+a,a,b,c)||("visibility"!==a?this._unevaluatedLayout.setValue(a,b):this.visibility=b)},a.prototype.getPaintProperty=function(a){return b5(a,"-transition")?this._transitionablePaint.getTransition(a.slice(0,-11)):this._transitionablePaint.getValue(a)},a.prototype.setPaintProperty=function(a,b,c){if(void 0===c&&(c={}),null!=b&&this._validate(fI,"layers."+this.id+".paint."+a,a,b,c))return!1;if(b5(a,"-transition"))return this._transitionablePaint.setTransition(a.slice(0,-11),b||void 0),!1;var d=this._transitionablePaint._values[a],f="cross-faded-data-driven"===d.property.specification["property-type"],g=d.value.isDataDriven(),h=d.value;this._transitionablePaint.setValue(a,b),this._handleSpecialPaintPropertyUpdate(a);var e=this._transitionablePaint._values[a].value;return e.isDataDriven()||g||f||this._handleOverridablePaintPropertyUpdate(a,h,e)},a.prototype._handleSpecialPaintPropertyUpdate=function(a){},a.prototype._handleOverridablePaintPropertyUpdate=function(a,b,c){return!1},a.prototype.isHidden=function(a){return!!(this.minzoom&&a<this.minzoom)||!!(this.maxzoom&&a>=this.maxzoom)||"none"===this.visibility},a.prototype.updateTransitions=function(a){this._transitioningPaint=this._transitionablePaint.transitioned(a,this._transitioningPaint)},a.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},a.prototype.recalculate=function(a,b){a.getCrossfadeParameters&&(this._crossfadeParameters=a.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(a,void 0,b)),this.paint=this._transitioningPaint.possiblyEvaluate(a,void 0,b)},a.prototype.serialize=function(){var a={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&&(a.layout=a.layout||{},a.layout.visibility=this.visibility),b7(a,function(a,b){return!(void 0===a||"layout"===b&&!Object.keys(a).length||"paint"===b&&!Object.keys(a).length)})},a.prototype._validate=function(c,d,e,f,a){return void 0===a&&(a={}),(!a|| !1!==a.validate)&&cU(this,c.call(aP,{key:d,layerType:this.type,objectKey:e,value:f,styleSpec:b,style:{glyphs:!0,sprite:!0}}))},a.prototype.is3D=function(){return!1},a.prototype.isTileClipped=function(){return!1},a.prototype.hasOffscreenPass=function(){return!1},a.prototype.resize=function(){},a.prototype.isStateDependent=function(){for(var b in this.paint._values){var a=this.paint.get(b);if(a instanceof a5&&fg(a.property.specification)&&("source"===a.value.kind||"composite"===a.value.kind)&&a.value.isStateDependent)return!0}return!1},a}(B),f0={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},aT=function(a,b){this._structArray=a,this._pos1=b*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function n(b,a){void 0===a&&(a=1);var c=0,d=0;return{members:b.map(function(b){var e=f0[b.type].BYTES_PER_ELEMENT,g=c=f1(c,Math.max(a,e)),f=b.components||1;return d=Math.max(d,e),c+=e*f,{name:b.name,type:b.type,components:f,offset:g}}),size:f1(c,Math.max(d,a)),alignment:a}}function f1(b,a){return Math.ceil(b/a)*a}i.serialize=function(a,b){return a._trim(),b&&(a.isTransferred=!0,b.push(a.arrayBuffer)),{length:a.length,arrayBuffer:a.arrayBuffer}},i.deserialize=function(b){var a=Object.create(this.prototype);return a.arrayBuffer=b.arrayBuffer,a.length=b.length,a.capacity=b.arrayBuffer.byteLength/a.bytesPerElement,a._refreshViews(),a},i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},i.prototype.clear=function(){this.length=0},i.prototype.resize=function(a){this.reserve(a),this.length=a},i.prototype.reserve=function(a){if(a>this.capacity){this.capacity=Math.max(a,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var b=this.uint8;this._refreshViews(),b&&this.uint8.set(b)}},i.prototype._refreshViews=function(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")};var a6=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c){var a=this.length;return this.resize(a+1),this.emplace(a,b,c)},a.prototype.emplace=function(a,c,d){var b=2*a;return this.int16[b+0]=c,this.int16[b+1]=d,a},a}(i);a6.prototype.bytesPerElement=4,c("StructArrayLayout2i4",a6);var a7=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e)},a.prototype.emplace=function(b,c,d,e,f){var a=4*b;return this.int16[a+0]=c,this.int16[a+1]=d,this.int16[a+2]=e,this.int16[a+3]=f,b},a}(i);a7.prototype.bytesPerElement=8,c("StructArrayLayout4i8",a7);var bE=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e,f,g){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g)},a.prototype.emplace=function(b,c,d,e,f,g,h){var a=6*b;return this.int16[a+0]=c,this.int16[a+1]=d,this.int16[a+2]=e,this.int16[a+3]=f,this.int16[a+4]=g,this.int16[a+5]=h,b},a}(i);bE.prototype.bytesPerElement=12,c("StructArrayLayout2i4i12",bE);var bF=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e,f,g){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g)},a.prototype.emplace=function(b,d,e,f,g,h,i){var c=4*b,a=8*b;return this.int16[c+0]=d,this.int16[c+1]=e,this.uint8[a+4]=f,this.uint8[a+5]=g,this.uint8[a+6]=h,this.uint8[a+7]=i,b},a}(i);bF.prototype.bytesPerElement=8,c("StructArrayLayout2i4ub8",bF);var bG=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c){var a=this.length;return this.resize(a+1),this.emplace(a,b,c)},a.prototype.emplace=function(a,c,d){var b=2*a;return this.float32[b+0]=c,this.float32[b+1]=d,a},a}(i);bG.prototype.bytesPerElement=8,c("StructArrayLayout2f8",bG);var bH=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e,f,g,h,i,j,k){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g,h,i,j,k)},a.prototype.emplace=function(b,c,d,e,f,g,h,i,j,k,l){var a=10*b;return this.uint16[a+0]=c,this.uint16[a+1]=d,this.uint16[a+2]=e,this.uint16[a+3]=f,this.uint16[a+4]=g,this.uint16[a+5]=h,this.uint16[a+6]=i,this.uint16[a+7]=j,this.uint16[a+8]=k,this.uint16[a+9]=l,b},a}(i);bH.prototype.bytesPerElement=20,c("StructArrayLayout10ui20",bH);var bI=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e,f,g,h,i,j,k,l,m){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g,h,i,j,k,l,m)},a.prototype.emplace=function(b,c,d,e,f,g,h,i,j,k,l,m,n){var a=12*b;return this.int16[a+0]=c,this.int16[a+1]=d,this.int16[a+2]=e,this.int16[a+3]=f,this.uint16[a+4]=g,this.uint16[a+5]=h,this.uint16[a+6]=i,this.uint16[a+7]=j,this.int16[a+8]=k,this.int16[a+9]=l,this.int16[a+10]=m,this.int16[a+11]=n,b},a}(i);bI.prototype.bytesPerElement=24,c("StructArrayLayout4i4ui4i24",bI);var bJ=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d)},a.prototype.emplace=function(b,c,d,e){var a=3*b;return this.float32[a+0]=c,this.float32[a+1]=d,this.float32[a+2]=e,b},a}(i);bJ.prototype.bytesPerElement=12,c("StructArrayLayout3f12",bJ);var bK=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b){var a=this.length;return this.resize(a+1),this.emplace(a,b)},a.prototype.emplace=function(a,b){return this.uint32[1*a+0]=b,a},a}(i);bK.prototype.bytesPerElement=4,c("StructArrayLayout1ul4",bK);var a8=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.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)},a.prototype.emplaceBack=function(b,c,d,e,f,g,h,i,j){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g,h,i,j)},a.prototype.emplace=function(b,c,d,e,f,g,h,i,j,k){var a=10*b,l=5*b;return this.int16[a+0]=c,this.int16[a+1]=d,this.int16[a+2]=e,this.int16[a+3]=f,this.int16[a+4]=g,this.int16[a+5]=h,this.uint32[l+3]=i,this.uint16[a+8]=j,this.uint16[a+9]=k,b},a}(i);a8.prototype.bytesPerElement=20,c("StructArrayLayout6i1ul2ui20",a8);var bL=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e,f,g){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g)},a.prototype.emplace=function(b,c,d,e,f,g,h){var a=6*b;return this.int16[a+0]=c,this.int16[a+1]=d,this.int16[a+2]=e,this.int16[a+3]=f,this.int16[a+4]=g,this.int16[a+5]=h,b},a}(i);bL.prototype.bytesPerElement=12,c("StructArrayLayout2i2i2i12",bL);var a9=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e,f){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f)},a.prototype.emplace=function(a,d,e,f,g,h){var b=4*a,c=8*a;return this.float32[b+0]=d,this.float32[b+1]=e,this.float32[b+2]=f,this.int16[c+6]=g,this.int16[c+7]=h,a},a}(i);a9.prototype.bytesPerElement=16,c("StructArrayLayout2f1f2i16",a9);var bM=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e)},a.prototype.emplace=function(a,d,e,f,g){var b=12*a,c=3*a;return this.uint8[b+0]=d,this.uint8[b+1]=e,this.float32[c+1]=f,this.float32[c+2]=g,a},a}(i);bM.prototype.bytesPerElement=12,c("StructArrayLayout2ub2f12",bM);var ba=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d)},a.prototype.emplace=function(b,c,d,e){var a=3*b;return this.uint16[a+0]=c,this.uint16[a+1]=d,this.uint16[a+2]=e,b},a}(i);ba.prototype.bytesPerElement=6,c("StructArrayLayout3ui6",ba);var bb=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.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)},a.prototype.emplaceBack=function(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)},a.prototype.emplace=function(c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){var a=24*c,b=12*c,d=48*c;return this.int16[a+0]=e,this.int16[a+1]=f,this.uint16[a+2]=g,this.uint16[a+3]=h,this.uint32[b+2]=i,this.uint32[b+3]=j,this.uint32[b+4]=k,this.uint16[a+10]=l,this.uint16[a+11]=m,this.uint16[a+12]=n,this.float32[b+7]=o,this.float32[b+8]=p,this.uint8[d+36]=q,this.uint8[d+37]=r,this.uint8[d+38]=s,this.uint32[b+10]=t,this.int16[a+22]=u,c},a}(i);bb.prototype.bytesPerElement=48,c("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",bb);var bc=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.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)},a.prototype.emplaceBack=function(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C)},a.prototype.emplace=function(c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E){var a=34*c,b=17*c;return this.int16[a+0]=d,this.int16[a+1]=e,this.int16[a+2]=f,this.int16[a+3]=g,this.int16[a+4]=h,this.int16[a+5]=i,this.int16[a+6]=j,this.int16[a+7]=k,this.uint16[a+8]=l,this.uint16[a+9]=m,this.uint16[a+10]=n,this.uint16[a+11]=o,this.uint16[a+12]=p,this.uint16[a+13]=q,this.uint16[a+14]=r,this.uint16[a+15]=s,this.uint16[a+16]=t,this.uint16[a+17]=u,this.uint16[a+18]=v,this.uint16[a+19]=w,this.uint16[a+20]=x,this.uint16[a+21]=y,this.uint16[a+22]=z,this.uint32[b+12]=A,this.float32[b+13]=B,this.float32[b+14]=C,this.float32[b+15]=D,this.float32[b+16]=E,c},a}(i);bc.prototype.bytesPerElement=68,c("StructArrayLayout8i15ui1ul4f68",bc);var bd=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b){var a=this.length;return this.resize(a+1),this.emplace(a,b)},a.prototype.emplace=function(a,b){return this.float32[1*a+0]=b,a},a}(i);bd.prototype.bytesPerElement=4,c("StructArrayLayout1f4",bd);var be=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d)},a.prototype.emplace=function(b,c,d,e){var a=3*b;return this.int16[a+0]=c,this.int16[a+1]=d,this.int16[a+2]=e,b},a}(i);be.prototype.bytesPerElement=6,c("StructArrayLayout3i6",be);var bf=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d)},a.prototype.emplace=function(a,c,d,e){var b=4*a;return this.uint32[2*a+0]=c,this.uint16[b+2]=d,this.uint16[b+3]=e,a},a}(i);bf.prototype.bytesPerElement=8,c("StructArrayLayout1ul2ui8",bf);var bN=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c){var a=this.length;return this.resize(a+1),this.emplace(a,b,c)},a.prototype.emplace=function(a,c,d){var b=2*a;return this.uint16[b+0]=c,this.uint16[b+1]=d,a},a}(i);bN.prototype.bytesPerElement=4,c("StructArrayLayout2ui4",bN);var bg=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b){var a=this.length;return this.resize(a+1),this.emplace(a,b)},a.prototype.emplace=function(a,b){return this.uint16[1*a+0]=b,a},a}(i);bg.prototype.bytesPerElement=2,c("StructArrayLayout1ui2",bg);var bO=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},a.prototype.emplaceBack=function(b,c,d,e){var a=this.length;return this.resize(a+1),this.emplace(a,b,c,d,e)},a.prototype.emplace=function(b,c,d,e,f){var a=4*b;return this.float32[a+0]=c,this.float32[a+1]=d,this.float32[a+2]=e,this.float32[a+3]=f,b},a}(i);bO.prototype.bytesPerElement=16,c("StructArrayLayout4f16",bO);var c0=function(c){function b(){c.apply(this,arguments)}c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b;var a={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 a.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},a.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},a.x1.get=function(){return this._structArray.int16[this._pos2+2]},a.y1.get=function(){return this._structArray.int16[this._pos2+3]},a.x2.get=function(){return this._structArray.int16[this._pos2+4]},a.y2.get=function(){return this._structArray.int16[this._pos2+5]},a.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},a.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},a.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},a.anchorPoint.get=function(){return new aY(this.anchorPointX,this.anchorPointY)},Object.defineProperties(b.prototype,a),b}(aT);c0.prototype.size=20;var bP=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.get=function(a){return new c0(this,a)},a}(a8);c("CollisionBoxArray",bP);var c1=function(c){function b(){c.apply(this,arguments)}c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b;var a={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 a.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},a.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},a.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},a.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},a.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},a.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},a.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},a.segment.get=function(){return this._structArray.uint16[this._pos2+10]},a.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},a.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},a.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},a.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},a.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},a.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},a.placedOrientation.set=function(a){this._structArray.uint8[this._pos1+37]=a},a.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},a.hidden.set=function(a){this._structArray.uint8[this._pos1+38]=a},a.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},a.crossTileID.set=function(a){this._structArray.uint32[this._pos4+10]=a},a.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(b.prototype,a),b}(aT);c1.prototype.size=48;var c2=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.get=function(a){return new c1(this,a)},a}(bb);c("PlacedSymbolArray",c2);var c3=function(c){function b(){c.apply(this,arguments)}c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b;var a={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 a.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},a.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},a.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},a.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},a.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},a.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},a.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},a.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},a.key.get=function(){return this._structArray.uint16[this._pos2+8]},a.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},a.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},a.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},a.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},a.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},a.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},a.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},a.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},a.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},a.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},a.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},a.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},a.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},a.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},a.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},a.crossTileID.set=function(a){this._structArray.uint32[this._pos4+12]=a},a.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},a.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},a.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},a.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(b.prototype,a),b}(aT);c3.prototype.size=68;var c4=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.get=function(a){return new c3(this,a)},a}(bc);c("SymbolInstanceArray",c4);var c5=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getoffsetX=function(a){return this.float32[1*a+0]},a}(bd);c("GlyphOffsetArray",c5);var c6=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getx=function(a){return this.int16[3*a+0]},a.prototype.gety=function(a){return this.int16[3*a+1]},a.prototype.gettileUnitDistanceFromAnchor=function(a){return this.int16[3*a+2]},a}(be);c("SymbolLineVertexArray",c6);var c7=function(b){function a(){b.apply(this,arguments)}b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a;var c={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return c.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},c.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},c.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(a.prototype,c),a}(aT);c7.prototype.size=8;var c8=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.get=function(a){return new c7(this,a)},a}(bf);c("FeatureIndexArray",c8);var f2=n([{name:"a_pos",components:2,type:"Int16"}],4).members,O=function(a){void 0===a&&(a=[]),this.segments=a};function f3(a,b){return 256*(a=b0(Math.floor(a),0,255))+b0(Math.floor(b),0,255)}O.prototype.prepareSegment=function(b,d,e,c){var a=this.segments[this.segments.length-1];return b>O.MAX_VERTEX_ARRAY_LENGTH&&b9("Max vertices per segment is "+O.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+b),(!a||a.vertexLength+b>O.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==c)&&(a={vertexOffset:d.length,primitiveOffset:e.length,vertexLength:0,primitiveLength:0},void 0!==c&&(a.sortKey=c),this.segments.push(a)),a},O.prototype.get=function(){return this.segments},O.prototype.destroy=function(){for(var a=0,b=this.segments;a<b.length;a+=1){var c=b[a];for(var d in c.vaos)c.vaos[d].destroy()}},O.simpleSegment=function(a,b,c,d){return new O([{vertexOffset:a,primitiveOffset:b,vertexLength:c,primitiveLength:d,vaos:{},sortKey:0}])},O.MAX_VERTEX_ARRAY_LENGTH=65535,c("SegmentVector",O);var f4=n([{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"}]),bQ=aK(function(a){a.exports=function(c,j){var g,h,a,i,e,f,b,d;for(h=c.length-(g=3&c.length),a=j,e=3432918353,f=461845907,d=0;d<h;)b=255&c.charCodeAt(d)|(255&c.charCodeAt(++d))<<8|(255&c.charCodeAt(++d))<<16|(255&c.charCodeAt(++d))<<24,++d,a=27492+(65535&(i=5*(65535&(a=(a^=b=(65535&(b=(b=(65535&b)*e+(((b>>>16)*e&65535)<<16)&4294967295)<<15|b>>>17))*f+(((b>>>16)*f&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(b=0,g){case 3:b^=(255&c.charCodeAt(d+2))<<16;case 2:b^=(255&c.charCodeAt(d+1))<<8;case 1:a^=b=(65535&(b=(b=(65535&(b^=255&c.charCodeAt(d)))*e+(((b>>>16)*e&65535)<<16)&4294967295)<<15|b>>>17))*f+(((b>>>16)*f&65535)<<16)&4294967295}return a^=c.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}}),c9=aK(function(a){a.exports=function(b,f){for(var d,e=b.length,a=f^e,c=0;e>=4;)d=1540483477*(65535&(d=255&b.charCodeAt(c)|(255&b.charCodeAt(++c))<<8|(255&b.charCodeAt(++c))<<16|(255&b.charCodeAt(++c))<<24))+((1540483477*(d>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(d=1540483477*(65535&(d^=d>>>24))+((1540483477*(d>>>16)&65535)<<16)),e-=4,++c;switch(e){case 3:a^=(255&b.charCodeAt(c+2))<<16;case 2:a^=(255&b.charCodeAt(c+1))<<8;case 1:a=1540483477*(65535&(a^=255&b.charCodeAt(c)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}}),bR=bQ;bR.murmur3=bQ,bR.murmur2=c9;var aA=function(){this.ids=[],this.positions=[],this.indexed=!1};aA.prototype.add=function(a,b,c,d){this.ids.push(f5(a)),this.positions.push(b,c,d)},aA.prototype.getPositions=function(f){for(var d=f5(f),a=0,b=this.ids.length-1;a<b;){var c=a+b>>1;this.ids[c]>=d?b=c:a=c+1}for(var e=[];this.ids[a]===d;)e.push({index:this.positions[3*a],start:this.positions[3*a+1],end:this.positions[3*a+2]}),a++;return e},aA.serialize=function(c,d){var a=new Float64Array(c.ids),b=new Uint32Array(c.positions);return function g(c,f,d,e){for(;d<e;){for(var h=c[d+e>>1],b=d-1,a=e+1;;){do b++;while(c[b]<h)do a--;while(c[a]>h)if(b>=a)break;f6(c,b,a),f6(f,3*b,3*a),f6(f,3*b+1,3*a+1),f6(f,3*b+2,3*a+2)}a-d<e-a?(g(c,f,d,a),d=a+1):(g(c,f,a+1,e),e=a)}}(a,b,0,a.length-1),d&&d.push(a.buffer,b.buffer),{ids:a,positions:b}},aA.deserialize=function(b){var a=new aA;return a.ids=b.ids,a.positions=b.positions,a.indexed=!0,a};function f5(b){var a=+b;return!isNaN(a)&&a<=9007199254740991?a:bR(String(b))}function f6(a,b,c){var d=a[b];a[b]=a[c],a[c]=d}c("FeaturePositionMap",aA);var P=function(a,b){this.gl=a.gl,this.location=b},da=function(b){function a(a,c){b.call(this,a,c),this.current=0}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){this.current!==a&&(this.current=a,this.gl.uniform1i(this.location,a))},a}(P),db=function(b){function a(a,c){b.call(this,a,c),this.current=0}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){this.current!==a&&(this.current=a,this.gl.uniform1f(this.location,a))},a}(P),dc=function(b){function a(a,c){b.call(this,a,c),this.current=[0,0]}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){a[0]===this.current[0]&&a[1]===this.current[1]||(this.current=a,this.gl.uniform2f(this.location,a[0],a[1]))},a}(P),dd=function(b){function a(a,c){b.call(this,a,c),this.current=[0,0,0]}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){a[0]===this.current[0]&&a[1]===this.current[1]&&a[2]===this.current[2]||(this.current=a,this.gl.uniform3f(this.location,a[0],a[1],a[2]))},a}(P),de=function(b){function a(a,c){b.call(this,a,c),this.current=[0,0,0,0]}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){a[0]===this.current[0]&&a[1]===this.current[1]&&a[2]===this.current[2]&&a[3]===this.current[3]||(this.current=a,this.gl.uniform4f(this.location,a[0],a[1],a[2],a[3]))},a}(P),df=function(b){function a(a,c){b.call(this,a,c),this.current=u.transparent}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){a.r===this.current.r&&a.g===this.current.g&&a.b===this.current.b&&a.a===this.current.a||(this.current=a,this.gl.uniform4f(this.location,a.r,a.g,a.b,a.a))},a}(P),f7=new Float32Array(16),dg=function(b){function a(a,c){b.call(this,a,c),this.current=f7}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(a){if(a[12]!==this.current[12]||a[0]!==this.current[0])return this.current=a,void this.gl.uniformMatrix4fv(this.location,!1,a);for(var b=1;b<16;b++)if(a[b]!==this.current[b]){this.current=a,this.gl.uniformMatrix4fv(this.location,!1,a);break}},a}(P);function f8(a){return[f3(255*a.r,255*a.g),f3(255*a.b,255*a.a)]}var bh=function(a,b,c){this.value=a,this.uniformNames=b.map(function(a){return"u_"+a}),this.type=c};bh.prototype.setUniform=function(a,c,b){a.set(b.constantOr(this.value))},bh.prototype.getBinding=function(a,b,c){return"color"===this.type?new df(a,b):new db(a,b)};var aU=function(b,a){this.uniformNames=a.map(function(a){return"u_"+a}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};aU.prototype.setConstantPatternPositions=function(a,b){this.pixelRatioFrom=b.pixelRatio,this.pixelRatioTo=a.pixelRatio,this.patternFrom=b.tlbr,this.patternTo=a.tlbr},aU.prototype.setUniform=function(c,d,e,a){var b="u_pattern_to"===a?this.patternTo:"u_pattern_from"===a?this.patternFrom:"u_pixel_ratio_to"===a?this.pixelRatioTo:"u_pixel_ratio_from"===a?this.pixelRatioFrom:null;b&&c.set(b)},aU.prototype.getBinding=function(a,b,c){return"u_pattern"===c.substr(0,9)?new de(a,b):new db(a,b)};var am=function(a,b,c,d){this.expression=a,this.type=c,this.maxValue=0,this.paintVertexAttributes=b.map(function(a){return{name:"a_"+a,type:"Float32",components:"color"===c?2:1,offset:0}}),this.paintVertexArray=new d};am.prototype.populatePaintArray=function(a,b,g,c,d){var e=this.paintVertexArray.length,f=this.expression.evaluate(new aQ(0),b,{},c,[],d);this.paintVertexArray.resize(a),this._setPaintValue(e,a,f)},am.prototype.updatePaintArray=function(a,b,c,d){var e=this.expression.evaluate({zoom:0},c,d);this._setPaintValue(a,b,e)},am.prototype._setPaintValue=function(d,e,a){if("color"===this.type)for(var f=f8(a),b=d;b<e;b++)this.paintVertexArray.emplace(b,f[0],f[1]);else{for(var c=d;c<e;c++)this.paintVertexArray.emplace(c,a);this.maxValue=Math.max(this.maxValue,Math.abs(a))}},am.prototype.upload=function(a){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=a.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},am.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var L=function(b,a,c,d,e,f){this.expression=b,this.uniformNames=a.map(function(a){return"u_"+a+"_t"}),this.type=c,this.useIntegerZoom=d,this.zoom=e,this.maxValue=0,this.paintVertexAttributes=a.map(function(a){return{name:"a_"+a,type:"Float32",components:"color"===c?4:2,offset:0}}),this.paintVertexArray=new f};L.prototype.populatePaintArray=function(a,b,h,c,d){var e=this.expression.evaluate(new aQ(this.zoom),b,{},c,[],d),f=this.expression.evaluate(new aQ(this.zoom+1),b,{},c,[],d),g=this.paintVertexArray.length;this.paintVertexArray.resize(a),this._setPaintValue(g,a,e,f)},L.prototype.updatePaintArray=function(c,d,a,b){var e=this.expression.evaluate({zoom:this.zoom},a,b),f=this.expression.evaluate({zoom:this.zoom+1},a,b);this._setPaintValue(c,d,e,f)},L.prototype._setPaintValue=function(e,f,a,b){if("color"===this.type)for(var g=f8(a),h=f8(b),c=e;c<f;c++)this.paintVertexArray.emplace(c,g[0],g[1],h[0],h[1]);else{for(var d=e;d<f;d++)this.paintVertexArray.emplace(d,a,b);this.maxValue=Math.max(this.maxValue,Math.abs(a),Math.abs(b))}},L.prototype.upload=function(a){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=a.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},L.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},L.prototype.setUniform=function(b,a){var c=this.useIntegerZoom?Math.floor(a.zoom):a.zoom,d=b0(this.expression.interpolationFactor(c,this.zoom,this.zoom+1),0,1);b.set(d)},L.prototype.getBinding=function(a,b,c){return new db(a,b)};var an=function(b,c,d,e,a,f){this.expression=b,this.type=c,this.useIntegerZoom=d,this.zoom=e,this.layerId=f,this.zoomInPaintVertexArray=new a,this.zoomOutPaintVertexArray=new a};an.prototype.populatePaintArray=function(a,b,c){var d=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(a),this.zoomOutPaintVertexArray.resize(a),this._setPaintValues(d,a,b.patterns&&b.patterns[this.layerId],c)},an.prototype.updatePaintArray=function(b,c,a,e,d){this._setPaintValues(b,c,a.patterns&&a.patterns[this.layerId],d)},an.prototype._setPaintValues=function(g,h,d,e){if(e&&d){var b=e[d.min],a=e[d.mid],c=e[d.max];if(b&&a&&c)for(var f=g;f<h;f++)this.zoomInPaintVertexArray.emplace(f,a.tl[0],a.tl[1],a.br[0],a.br[1],b.tl[0],b.tl[1],b.br[0],b.br[1],a.pixelRatio,b.pixelRatio),this.zoomOutPaintVertexArray.emplace(f,a.tl[0],a.tl[1],a.br[0],a.br[1],c.tl[0],c.tl[1],c.br[0],c.br[1],a.pixelRatio,c.pixelRatio)}},an.prototype.upload=function(a){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=a.createVertexBuffer(this.zoomInPaintVertexArray,f4.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=a.createVertexBuffer(this.zoomOutPaintVertexArray,f4.members,this.expression.isStateDependent))},an.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var r=function(e,i,m){this.binders={},this._buffers=[];var f=[];for(var a in e.paint._values)if(m(a)){var c=e.paint.get(a);if(c instanceof a5&&fg(c.property.specification)){var g=f9(a,e.type),b=c.value,d=c.property.specification.type,j=c.property.useIntegerZoom,k=c.property.specification["property-type"],h="cross-faded"===k||"cross-faded-data-driven"===k;if("constant"===b.kind)this.binders[a]=h?new aU(b.value,g):new bh(b.value,g,d),f.push("/u_"+a);else if("source"===b.kind||h){var l=ga(a,d,"source");this.binders[a]=h?new an(b,d,j,i,l,e.id):new am(b,g,d,l),f.push("/a_"+a)}else{var n=ga(a,d,"composite");this.binders[a]=new L(b,g,d,j,i,n),f.push("/z_"+a)}}}this.cacheKey=f.sort().join("")};r.prototype.getMaxValue=function(b){var a=this.binders[b];return a instanceof am||a instanceof L?a.maxValue:0},r.prototype.populatePaintArrays=function(b,c,d,e,f){for(var g in this.binders){var a=this.binders[g];(a instanceof am||a instanceof L||a instanceof an)&&a.populatePaintArray(b,c,d,e,f)}},r.prototype.setConstantPatternPositions=function(b,c){for(var d in this.binders){var a=this.binders[d];a instanceof aU&&a.setConstantPatternPositions(b,c)}},r.prototype.updatePaintArrays=function(d,i,j,k,l){var e=!1;for(var f in d)for(var b=0,g=i.getPositions(f);b<g.length;b+=1){var c=g[b],m=j.feature(c.index);for(var h in this.binders){var a=this.binders[h];if((a instanceof am||a instanceof L||a instanceof an)&& !0===a.expression.isStateDependent){var n=k.paint.get(h);a.expression=n.value,a.updatePaintArray(c.start,c.end,m,d[f],l),e=!0}}}return e},r.prototype.defines=function(){var a=[];for(var c in this.binders){var b=this.binders[c];(b instanceof bh||b instanceof aU)&&a.push.apply(a,b.uniformNames.map(function(a){return"#define HAS_UNIFORM_"+a}))}return a},r.prototype.getBinderAttributes=function(){var b=[];for(var e in this.binders){var a=this.binders[e];if(a instanceof am||a instanceof L)for(var c=0;c<a.paintVertexAttributes.length;c++)b.push(a.paintVertexAttributes[c].name);else if(a instanceof an)for(var d=0;d<f4.members.length;d++)b.push(f4.members[d].name)}return b},r.prototype.getBinderUniforms=function(){var c=[];for(var e in this.binders){var a=this.binders[e];if(a instanceof bh||a instanceof aU||a instanceof L)for(var b=0,d=a.uniformNames;b<d.length;b+=1)c.push(d[b])}return c},r.prototype.getPaintVertexBuffers=function(){return this._buffers},r.prototype.getUniforms=function(h,d){var e=[];for(var f in this.binders){var a=this.binders[f];if(a instanceof bh||a instanceof aU||a instanceof L)for(var c=0,g=a.uniformNames;c<g.length;c+=1){var b=g[c];if(d[b]){var i=a.getBinding(h,d[b],b);e.push({name:b,property:f,binding:i})}}}return e},r.prototype.setUniforms=function(i,e,f,g){for(var a=0,c=e;a<c.length;a+=1){var b=c[a],h=b.name,d=b.property;this.binders[d].setUniform(b.binding,g,f.get(d),h)}},r.prototype.updatePaintBuffers=function(b){for(var d in this._buffers=[],this.binders){var a=this.binders[d];if(b&&a instanceof an){var c=2===b.fromScale?a.zoomInPaintVertexBuffer:a.zoomOutPaintVertexBuffer;c&&this._buffers.push(c)}else(a instanceof am||a instanceof L)&&a.paintVertexBuffer&&this._buffers.push(a.paintVertexBuffer)}},r.prototype.upload=function(b){for(var c in this.binders){var a=this.binders[c];(a instanceof am||a instanceof L||a instanceof an)&&a.upload(b)}this.updatePaintBuffers()},r.prototype.destroy=function(){for(var b in this.binders){var a=this.binders[b];(a instanceof am||a instanceof L||a instanceof an)&&a.destroy()}};var ao=function(e,f,a){void 0===a&&(a=function(){return!0}),this.programConfigurations={};for(var b=0,c=e;b<c.length;b+=1){var d=c[b];this.programConfigurations[d.id]=new r(d,f,a)}this.needsUpload=!1,this._featureMap=new aA,this._bufferOffset=0};function f9(a,b){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":["ga
1pwidth"],"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"]})[a]||[a.replace(b+"-","").replace(/-/g,"_")]}function ga(c,d,a){var e,b={"line-pattern":{source:bH,composite:bH},"fill-pattern":{source:bH,composite:bH},"fill-extrusion-pattern":{source:bH,composite:bH}}[e=c];return b&&b[a]||({color:{source:bG,composite:bO},number:{source:bd,composite:bG}})[d][a]}ao.prototype.populatePaintArrays=function(a,b,c,d,e,f){for(var g in this.programConfigurations)this.programConfigurations[g].populatePaintArrays(a,b,d,e,f);void 0!==b.id&&this._featureMap.add(b.id,c,this._bufferOffset,a),this._bufferOffset=a,this.needsUpload=!0},ao.prototype.updatePaintArrays=function(d,e,f,g){for(var a=0,b=f;a<b.length;a+=1){var c=b[a];this.needsUpload=this.programConfigurations[c.id].updatePaintArrays(d,this._featureMap,e,c,g)||this.needsUpload}},ao.prototype.get=function(a){return this.programConfigurations[a]},ao.prototype.upload=function(a){if(this.needsUpload){for(var b in this.programConfigurations)this.programConfigurations[b].upload(a);this.needsUpload=!1}},ao.prototype.destroy=function(){for(var a in this.programConfigurations)this.programConfigurations[a].destroy()},c("ConstantBinder",bh),c("CrossFadedConstantBinder",aU),c("SourceExpressionBinder",am),c("CrossFadedCompositeBinder",an),c("CompositeExpressionBinder",L),c("ProgramConfiguration",r,{omit:["_buffers"]}),c("ProgramConfigurationSet",ao);var gb=-16383-1;function gc(g){for(var h=8192/g.extent,b=g.loadGeometry(),c=0;c<b.length;c++)for(var i=b[c],d=0;d<i.length;d++){var a=i[d],e=Math.round(a.x*h),f=Math.round(a.y*h);a.x=b0(e,gb,16383),a.y=b0(f,gb,16383),(e<a.x||e>a.x+1||f<a.y||f>a.y+1)&&b9("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return b}function gd(a,b){return{type:a.type,id:a.id,properties:a.properties,geometry:b?gc(a):[]}}function ge(a,b,c,d,e){a.emplaceBack(2*b+(d+1)/2,2*c+(e+1)/2)}var F=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(a){return a.id}),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new a6,this.indexArray=new ba,this.segments=new O,this.programConfigurations=new ao(a.layers,a.zoom),this.stateDependentLayerIds=this.layers.filter(function(a){return a.isStateDependent()}).map(function(a){return a.id})};function dh(a,b){for(var c=0;c<a.length;c++)if(gn(b,a[c]))return!0;for(var d=0;d<b.length;d++)if(gn(a,b[d]))return!0;return!!gi(a,b)}function gf(a,b,c){return!!gn(a,b)||!!gk(b,a,c)}function gg(a,b){if(1===a.length)return gm(b,a[0]);for(var c=0;c<b.length;c++)for(var g=b[c],d=0;d<g.length;d++)if(gn(a,g[d]))return!0;for(var e=0;e<a.length;e++)if(gm(b,a[e]))return!0;for(var f=0;f<b.length;f++)if(gi(a,b[f]))return!0;return!1}function gh(a,b,e){if(a.length>1){if(gi(a,b))return!0;for(var c=0;c<b.length;c++)if(gk(b[c],a,e))return!0}for(var d=0;d<a.length;d++)if(gk(a[d],b,e))return!0;return!1}function gi(a,b){if(0===a.length||0===b.length)return!1;for(var c=0;c<a.length-1;c++)for(var e=a[c],f=a[c+1],d=0;d<b.length-1;d++)if(gj(e,f,b[d],b[d+1]))return!0;return!1}function gj(a,b,c,d){return dZ(a,c,d)!==dZ(b,c,d)&&dZ(a,b,c)!==dZ(a,b,d)}function gk(c,a,d){var e=d*d;if(1===a.length)return c.distSqr(a[0])<e;for(var b=1;b<a.length;b++)if(gl(c,a[b-1],a[b])<e)return!0;return!1}function gl(c,a,b){var e=a.distSqr(b);if(0===e)return c.distSqr(a);var d=((c.x-a.x)*(b.x-a.x)+(c.y-a.y)*(b.y-a.y))/e;return c.distSqr(d<0?a:d>1?b:b.sub(a)._mult(d)._add(a))}function gm(h,b){for(var c,a,d,e=!1,f=0;f<h.length;f++)for(var g=0,i=(c=h[f]).length-1;g<c.length;i=g++)(a=c[g]).y>b.y!=(d=c[i]).y>b.y&&b.x<(d.x-a.x)*(b.y-a.y)/(d.y-a.y)+a.x&&(e=!e);return e}function gn(b,c){for(var d=!1,e=0,g=b.length-1;e<b.length;g=e++){var a=b[e],f=b[g];a.y>c.y!=f.y>c.y&&c.x<(f.x-a.x)*(c.y-a.y)/(f.y-a.y)+a.x&&(d=!d)}return d}function go(a,b,c){var d=c[0],e=c[2];if(a.x<d.x&&b.x<d.x||a.x>e.x&&b.x>e.x||a.y<d.y&&b.y<d.y||a.y>e.y&&b.y>e.y)return!1;var f=dZ(a,b,c[0]);return f!==dZ(a,b,c[1])||f!==dZ(a,b,c[2])||f!==dZ(a,b,c[3])}function gp(a,b,d){var c=b.paint.get(a).value;return"constant"===c.kind?c.value:d.programConfigurations.get(b.id).getMaxValue(a)}function gq(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1])}function gr(a,b,f,g,h){if(!b[0]&&!b[1])return a;var d=aY.convert(b)._mult(h);"viewport"===f&&d._rotate(-g);for(var e=[],c=0;c<a.length;c++)e.push(a[c].sub(d));return e}F.prototype.populate=function(k,q,e){var l=this.layers[0],f=[],a=null;
vendor: 25,296 bytes, line 1
1"circle"===l.type&&(a=l.layout.get("circle-sort-key"));for(var g=0,m=k;g<m.length;g+=1){var b=m[g],c=b.feature,r=b.id,s=b.index,t=b.sourceLayerIndex,n=this.layers[0]._featureFilter.needGeometry,h=gd(c,n);if(this.layers[0]._featureFilter.filter(new aQ(this.zoom),h,e)){var u=a?a.evaluate(h,{},e):void 0,v={id:r,properties:c.properties,type:c.type,sourceLayerIndex:t,index:s,geometry:n?h.geometry:gc(c),patterns:{},sortKey:u};f.push(v)}}a&&f.sort(function(a,b){return a.sortKey-b.sortKey});for(var i=0,o=f;i<o.length;i+=1){var d=o[i],p=d.geometry,j=d.index,w=d.sourceLayerIndex,x=k[j].feature;this.addFeature(d,p,j,e),q.featureIndex.insert(x,p,j,w,this.index)}},F.prototype.update=function(a,b,c){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,b,this.stateDependentLayers,c)},F.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},F.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},F.prototype.upload=function(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,f2),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0},F.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},F.prototype.addFeature=function(g,k,l,m){for(var d=0,h=k;d<h.length;d+=1)for(var e=0,i=h[d];e<i.length;e+=1){var j=i[e],a=j.x,b=j.y;if(!(a<0||a>=8192||b<0||b>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,g.sortKey),c=f.vertexLength;ge(this.layoutVertexArray,a,b,-1,-1),ge(this.layoutVertexArray,a,b,1,-1),ge(this.layoutVertexArray,a,b,1,1),ge(this.layoutVertexArray,a,b,-1,1),this.indexArray.emplaceBack(c,c+1,c+2),this.indexArray.emplaceBack(c,c+3,c+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,l,{},m)},c("CircleBucket",F,{omit:["layers"]});var di=new q({"circle-sort-key":new f(b.layout_circle["circle-sort-key"])}),gs={paint:new q({"circle-radius":new f(b.paint_circle["circle-radius"]),"circle-color":new f(b.paint_circle["circle-color"]),"circle-blur":new f(b.paint_circle["circle-blur"]),"circle-opacity":new f(b.paint_circle["circle-opacity"]),"circle-translate":new e(b.paint_circle["circle-translate"]),"circle-translate-anchor":new e(b.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new e(b.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new e(b.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new f(b.paint_circle["circle-stroke-width"]),"circle-stroke-color":new f(b.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new f(b.paint_circle["circle-stroke-opacity"])}),layout:di},ap="undefined"!=typeof Float32Array?Float32Array:Array;function dj(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}function bS(a,b,c){var h=b[0],i=b[1],j=b[2],k=b[3],l=b[4],m=b[5],n=b[6],o=b[7],p=b[8],q=b[9],r=b[10],s=b[11],t=b[12],u=b[13],v=b[14],w=b[15],d=c[0],e=c[1],f=c[2],g=c[3];return a[0]=d*h+e*l+f*p+g*t,a[1]=d*i+e*m+f*q+g*u,a[2]=d*j+e*n+f*r+g*v,a[3]=d*k+e*o+f*s+g*w,a[4]=(d=c[4])*h+(e=c[5])*l+(f=c[6])*p+(g=c[7])*t,a[5]=d*i+e*m+f*q+g*u,a[6]=d*j+e*n+f*r+g*v,a[7]=d*k+e*o+f*s+g*w,a[8]=(d=c[8])*h+(e=c[9])*l+(f=c[10])*p+(g=c[11])*t,a[9]=d*i+e*m+f*q+g*u,a[10]=d*j+e*n+f*r+g*v,a[11]=d*k+e*o+f*s+g*w,a[12]=(d=c[12])*h+(e=c[13])*l+(f=c[14])*p+(g=c[15])*t,a[13]=d*i+e*m+f*q+g*u,a[14]=d*j+e*n+f*r+g*v,a[15]=d*k+e*o+f*s+g*w,a}function dk(b,c,a){var d=c[0],e=c[1],f=c[2],g=c[3];return b[0]=a[0]*d+a[4]*e+a[8]*f+a[12]*g,b[1]=a[1]*d+a[5]*e+a[9]*f+a[13]*g,b[2]=a[2]*d+a[6]*e+a[10]*f+a[14]*g,b[3]=a[3]*d+a[7]*e+a[11]*f+a[15]*g,b}Math.hypot||(Math.hypot=function(){for(var b=arguments,c=0,a=arguments.length;a--;)c+=b[a]*b[a];return Math.sqrt(c)}),aL=new ap(3),ap!=Float32Array&&(aL[0]=0,aL[1]=0,aL[2]=0),au=new ap(4),ap!=Float32Array&&(au[0]=0,au[1]=0,au[2]=0,au[3]=0);var dl=(aX=new ap(2),ap!=Float32Array&&(aX[0]=0,aX[1]=0),function(b){function a(a){b.call(this,a,gs)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.createBucket=function(a){return new F(a)},a.prototype.queryRadius=function(b){var a=b;return gp("circle-radius",this,a)+gp("circle-stroke-width",this,a)+gq(this.paint.get("circle-translate"))},a.prototype.queryIntersectsFeature=function(q,h,i,r,w,b,j,c){for(var k,s,l=gr(q,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),b.angle,j),m=this.paint.get("circle-radius").evaluate(h,i)+this.paint.get("circle-stroke-width").evaluate(h,i),d="map"===this.paint.get("circle-pitch-alignment"),t=d?l:(k=l,s=c,k.map(function(a){return gt(a,s)})),u=d?m*j:m,e=0,n=r;e<n.length;e+=1)for(var f=0,o=n[e];f<o.length;f+=1){var a=o[f],v=d?a:gt(a,c),g=u,p=dk([],[a.x,a.y,0,1],c);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?g*=p[3]/b.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(g*=b.cameraToCenterDistance/p[3]),gf(t,v,g))return!0}return!1},a}(y));function gt(b,c){var a=dk([],[b.x,b.y,0,1],c);return new aY(a[0]/a[3],a[1]/a[3])}var dm=function(a){function b(){a.apply(this,arguments)}return a&&(b.__proto__=a),(b.prototype=Object.create(a&&a.prototype)).constructor=b,b}(F);function gu(b,e,f,a){var c=e.width,d=e.height;if(a){if(a instanceof Uint8ClampedArray)a=new Uint8Array(a.buffer);else if(a.length!==c*d*f)throw RangeError("mismatched image size")}else a=new Uint8Array(c*d*f);return b.width=c,b.height=d,b.data=a,b}function gv(a,d,e){var b=d.width,c=d.height;if(b!==a.width||c!==a.height){var f=gu({},{width:b,height:c},e);gw(a,f,{x:0,y:0},{x:0,y:0},{width:Math.min(a.width,b),height:Math.min(a.height,c)},e),a.width=b,a.height=c,a.data=f.data}}function gw(c,b,d,e,a,h){if(0===a.width||0===a.height)return b;if(a.width>c.width||a.height>c.height||d.x>c.width-a.width||d.y>c.height-a.height)throw RangeError("out of range source coordinates for image copy");if(a.width>b.width||a.height>b.height||e.x>b.width-a.width||e.y>b.height-a.height)throw RangeError("out of range destination coordinates for image copy");for(var i=c.data,j=b.data,f=0;f<a.height;f++)for(var k=((d.y+f)*c.width+d.x)*h,l=((e.y+f)*b.width+e.x)*h,g=0;g<a.width*h;g++)j[l+g]=i[k+g];return b}c("HeatmapBucket",dm,{omit:["layers"]});var aB=function(a,b){gu(this,a,1,b)};aB.prototype.resize=function(a){gv(this,a,1)},aB.prototype.clone=function(){return new aB({width:this.width,height:this.height},new Uint8Array(this.data))},aB.copy=function(a,b,c,d,e){gw(a,b,c,d,e,1)};var aq=function(a,b){gu(this,a,4,b)};aq.prototype.resize=function(a){gv(this,a,4)},aq.prototype.replace=function(a,b){b?this.data.set(a):this.data=a instanceof Uint8ClampedArray?new Uint8Array(a.buffer):a},aq.prototype.clone=function(){return new aq({width:this.width,height:this.height},new Uint8Array(this.data))},aq.copy=function(a,b,c,d,e){gw(a,b,c,d,e,4)},c("AlphaImage",aB),c("RGBAImage",aq);var gx={paint:new q({"heatmap-radius":new f(b.paint_heatmap["heatmap-radius"]),"heatmap-weight":new f(b.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new e(b.paint_heatmap["heatmap-intensity"]),"heatmap-color":new az(b.paint_heatmap["heatmap-color"]),"heatmap-opacity":new e(b.paint_heatmap["heatmap-opacity"])})};function dn(a){var n={},b=a.resolution||256,f=a.clips?a.clips.length:1,m=a.image||new aq({width:b,height:f}),g=function(c,d,e){n[a.evaluationKey]=e;var b=a.expression.evaluate(n);m.data[c+d+0]=Math.floor(255*b.r/b.a),m.data[c+d+1]=Math.floor(255*b.g/b.a),m.data[c+d+2]=Math.floor(255*b.b/b.a),m.data[c+d+3]=Math.floor(255*b.a)};if(a.clips)for(var c=0,h=0;c<f;++c,h+=4*b)for(var d=0,i=0;d<b;d++,i+=4){var j=d/(b-1),k=a.clips[c];g(h,i,k.start*(1-j)+k.end*j)}else for(var e=0,l=0;e<b;e++,l+=4)g(0,l,e/(b-1));return m}var dp=function(b){function a(a){b.call(this,a,gx),this._updateColorRamp()}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.createBucket=function(a){return new dm(a)},a.prototype._handleSpecialPaintPropertyUpdate=function(a){"heatmap-color"===a&&this._updateColorRamp()},a.prototype._updateColorRamp=function(){this.colorRamp=dn({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},a.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},a.prototype.queryRadius=function(){return 0},a.prototype.queryIntersectsFeature=function(){return!1},a.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},a}(y),gy={paint:new q({"hillshade-illumination-direction":new e(b.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new e(b.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new e(b.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new e(b.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new e(b.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new e(b.paint_hillshade["hillshade-accent-color"])})},dq=function(b){function a(a){b.call(this,a,gy)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},a}(y),gz=n([{name:"a_pos",components:2,type:"Int16"}],4).members,dr=bi;function bi(b,f,a){a=a||2;var d,e,g,h,i,j,k,n=f&&f.length,o=n?f[0]*a:b.length,c=gA(b,0,o,a,!0),m=[];if(!c||c.next===c.prev)return m;if(n&&(c=function(h,e,b,f){var a,g,c,d=[];for(a=0,g=e.length;a<g;a++)(c=gA(h,e[a]*f,a<g-1?e[a+1]*f:h.length,f,!1))===c.next&&(c.steiner=!0),d.push(gL(c));for(d.sort(gH),a=0;a<d.length;a++)gI(d[a],b),b=gB(b,b.next);return b}(b,f,c,a)),b.length>80*a){d=g=b[0],e=h=b[1];for(var l=a;l<o;l+=a)(i=b[l])<d&&(d=i),(j=b[l+1])<e&&(e=j),i>g&&(g=i),j>h&&(h=j);k=0!==(k=Math.max(g-d,h-e))?1/k:0}return gC(c,m,a,d,e,k),m}function gA(c,e,f,d,g){var a,b;if(g===gY(c,e,f,d)>0)for(a=e;a<f;a+=d)b=gV(a,c[a],c[a+1],b);else for(a=f-d;a>=e;a-=d)b=gV(a,c[a],c[a+1],b);return b&&gP(b,b.next)&&(gW(b),b=b.next),b}function gB(c,b){if(!c)return c;b||(b=c);var d,a=c;do if(d=!1,a.steiner|| !gP(a,a.next)&&0!==gO(a.prev,a,a.next))a=a.next;else{if(gW(a),(a=b=a.prev)===a.next)break;d=!0}while(d||a!==b)return b}function gC(a,b,c,e,f,d,h){if(a){!h&&d&&function(b,c,d,e){var a=b;do null===a.z&&(a.z=gK(a.x,a.y,c,d,e)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==b)a.prevZ.nextZ=null,a.prevZ=null,function(g){var h,b,a,c,d,i,e,f,j=1;do{for(b=g,g=null,d=null,i=0;b;){for(i++,a=b,e=0,h=0;h<j&&(e++,a=a.nextZ);h++);for(f=j;e>0||f>0&&a;)0!==e&&(0===f||!a||b.z<=a.z)?(c=b,b=b.nextZ,e--):(c=a,a=a.nextZ,f--),d?d.nextZ=c:g=c,c.prevZ=d,d=c;b=a}d.nextZ=null,j*=2}while(i>1)}(a)}(a,e,f,d);for(var i,g,j=a;a.prev!==a.next;)if(i=a.prev,g=a.next,d?gE(a,e,f,d):gD(a))b.push(i.i/c),b.push(a.i/c),b.push(g.i/c),gW(a),a=g.next,j=g.next;else if((a=g)===j){h?1===h?gC(a=gF(gB(a),b,c),b,c,e,f,d,2):2===h&&gG(a,b,c,e,f,d):gC(gB(a),b,c,e,f,d,1);break}}}function gD(b){var c=b.prev,d=b,e=b.next;if(gO(c,d,e)>=0)return!1;for(var a=b.next.next;a!==b.prev;){if(gM(c.x,c.y,d.x,d.y,e.x,e.y,a.x,a.y)&&gO(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function gE(f,g,h,i){var d=f.prev,e=f,a=f.next;if(gO(d,e,a)>=0)return!1;for(var l=d.x>e.x?d.x>a.x?d.x:a.x:e.x>a.x?e.x:a.x,m=d.y>e.y?d.y>a.y?d.y:a.y:e.y>a.y?e.y:a.y,j=gK(d.x<e.x?d.x<a.x?d.x:a.x:e.x<a.x?e.x:a.x,d.y<e.y?d.y<a.y?d.y:a.y:e.y<a.y?e.y:a.y,g,h,i),k=gK(l,m,g,h,i),b=f.prevZ,c=f.nextZ;b&&b.z>=j&&c&&c.z<=k;){if(b!==f.prev&&b!==f.next&&gM(d.x,d.y,e.x,e.y,a.x,a.y,b.x,b.y)&&gO(b.prev,b,b.next)>=0||(b=b.prevZ,c!==f.prev&&c!==f.next&&gM(d.x,d.y,e.x,e.y,a.x,a.y,c.x,c.y)&&gO(c.prev,c,c.next)>=0))return!1;c=c.nextZ}for(;b&&b.z>=j;){if(b!==f.prev&&b!==f.next&&gM(d.x,d.y,e.x,e.y,a.x,a.y,b.x,b.y)&&gO(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;c&&c.z<=k;){if(c!==f.prev&&c!==f.next&&gM(d.x,d.y,e.x,e.y,a.x,a.y,c.x,c.y)&&gO(c.prev,c,c.next)>=0)return!1;c=c.nextZ}return!0}function gF(d,e,f){var a=d;do{var c=a.prev,b=a.next.next;!gP(c,b)&&gQ(c,a,a.next,b)&&gT(c,b)&&gT(b,c)&&(e.push(c.i/f),e.push(a.i/f),e.push(b.i/f),gW(a),gW(a.next),a=d=b),a=a.next}while(a!==d)return gB(a)}function gG(d,e,f,g,h,i){var a=d;do{for(var b=a.next.next;b!==a.prev;){if(a.i!==b.i&&gN(a,b)){var c=gU(a,b);return a=gB(a,a.next),c=gB(c,c.next),gC(a,e,f,g,h,i),void gC(c,e,f,g,h,i)}b=b.next}a=a.next}while(a!==d)}function gH(a,b){return a.x-b.x}function gI(b,a){if(a=function(h,k){var b,a=k,d=h.x,c=h.y,e=-1/0;do{if(c<=a.y&&c>=a.next.y&&a.next.y!==a.y){var f=a.x+(c-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(f<=d&&f>e){if(e=f,f===d){if(c===a.y)return a;if(c===a.next.y)return a.next}b=a.x<a.next.x?a:a.next}}a=a.next}while(a!==k)if(!b)return null;if(d===e)return b;var g,m=b,l=b.x,i=b.y,j=1/0;a=b;do d>=a.x&&a.x>=l&&d!==a.x&&gM(c<i?d:e,c,l,i,c<i?e:d,c,a.x,a.y)&&(g=Math.abs(c-a.y)/(d-a.x),gT(a,h)&&(g<j||g===j&&(a.x>b.x||a.x===b.x&&gJ(b,a)))&&(b=a,j=g)),a=a.next;while(a!==m)return b}(b,a)){var c=gU(a,b);gB(a,a.next),gB(c,c.next)}}function gJ(a,b){return 0>gO(a.prev,a,b.prev)&&0>gO(b.next,a,a.next)}function gK(a,b,d,e,c){return(a=1431655765&((a=858993459&((a=252645135&((a=16711935&((a=32767*(a-d)*c)|a<<8))|a<<4))|a<<2))|a<<1))|(b=1431655765&((b=858993459&((b=252645135&((b=16711935&((b=32767*(b-e)*c)|b<<8))|b<<4))|b<<2))|b<<1))<<1}function gL(c){var a=c,b=c;do(a.x<b.x||a.x===b.x&&a.y<b.y)&&(b=a),a=a.next;while(a!==c)return b}function gM(c,d,e,f,g,h,a,b){return(g-a)*(d-b)-(c-a)*(h-b)>=0&&(c-a)*(f-b)-(e-a)*(d-b)>=0&&(e-a)*(h-b)-(g-a)*(f-b)>=0}function gN(a,b){return a.next.i!==b.i&&a.prev.i!==b.i&&!function(b,c){var a=b;do{if(a.i!==b.i&&a.next.i!==b.i&&a.i!==c.i&&a.next.i!==c.i&&gQ(a,a.next,b,c))return!0;a=a.next}while(a!==b)return!1}(a,b)&&(gT(a,b)&&gT(b,a)&&function(b,e){var a=b,c=!1,f=(b.x+e.x)/2,d=(b.y+e.y)/2;do a.y>d!=a.next.y>d&&a.next.y!==a.y&&f<(a.next.x-a.x)*(d-a.y)/(a.next.y-a.y)+a.x&&(c=!c),a=a.next;while(a!==b)return c}(a,b)&&(gO(a.prev,a,b.prev)||gO(a,b.prev,b))||gP(a,b)&&gO(a.prev,a,a.next)>0&&gO(b.prev,b,b.next)>0)}function gO(b,a,c){return(a.y-b.y)*(c.x-a.x)-(a.x-b.x)*(c.y-a.y)}function gP(a,b){return a.x===b.x&&a.y===b.y}function gQ(a,b,c,d){var e=gS(gO(a,b,c)),f=gS(gO(a,b,d)),g=gS(gO(c,d,a)),h=gS(gO(c,d,b));return e!==f&&g!==h||!(0!==e||!gR(a,c,b))||!(0!==f||!gR(a,d,b))||!(0!==g||!gR(c,a,d))||!(0!==h||!gR(c,b,d))}function gR(a,b,c){return b.x<=Math.max(a.x,c.x)&&b.x>=Math.min(a.x,c.x)&&b.y<=Math.max(a.y,c.y)&&b.y>=Math.min(a.y,c.y)}function gS(a){return a>0?1:a<0?-1:0}function gT(a,b){return 0>gO(a.prev,a,a.next)?gO(a,b,a.next)>=0&&gO(a,a.prev,b)>=0:0>gO(a,b,a.prev)||0>gO(a,a.next,b)}function gU(a,b){var d=new gX(a.i,a.x,a.y),c=new gX(b.i,b.x,b.y),e=a.next,f=b.prev;return a.next=b,b.prev=a,d.next=e,e.prev=d,c.next=d,d.prev=c,f.next=c,c.prev=f,c}function gV(c,d,e,b){var a=new gX(c,d,e);return b?(a.next=b.next,a.prev=b,b.next.prev=a,b.next=a):(a.prev=a,a.next=a),a}function gW(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function gX(a,b,c){this.i=a,this.x=b,this.y=c,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function gY(b,g,d,e){for(var f=0,a=g,c=d-e;a<d;a+=e)f+=(b[c]-b[a])*(b[a+1]+b[c+1]),c=a;return f}function gZ(a,b,c,d,e){!function n(a,e,b,d,g){for(;d>b;){if(d-b>600){var f=d-b+1,k=e-b+1,l=Math.log(f),i=.5*Math.exp(2*l/3),m=.5*Math.sqrt(l*i*(f-i)/f)*(k-f/2<0?-1:1);n(a,e,Math.max(b,Math.floor(e-k*i/f+m)),Math.min(d,Math.floor(e+(f-k)*i/f+m)),g)}var j=a[e],h=b,c=d;for(g$(a,b,e),g(a[d],j)>0&&g$(a,b,d);h<c;){for(g$(a,h,c),h++,c--;0>g(a[h],j);)h++;for(;g(a[c],j)>0;)c--}0===g(a[b],j)?g$(a,b,c):g$(a,++c,d),c<=e&&(b=c+1),e<=c&&(d=c-1)}}(a,b,c||0,d||a.length-1,e||g_)}function g$(a,b,c){var d=a[b];a[b]=a[c],a[c]=d}function g_(a,b){return a<b?-1:a>b?1:0}function g0(c,f){var i=c.length;if(i<=1)return[c];for(var d,h,a=[],e=0;e<i;e++){var g=d$(c[e]);0!==g&&(c[e].area=Math.abs(g),void 0===h&&(h=g<0),h===g<0?(d&&a.push(d),d=[c[e]]):d.push(c[e]))}if(d&&a.push(d),f>1)for(var b=0;b<a.length;b++)a[b].length<=f||(gZ(a[b],f,1,a[b].length-1,g1),a[b]=a[b].slice(0,f));return a}function g1(a,b){return b.area-a.area}function g2(g,h,i){for(var d=i.patternDependencies,a=!1,b=0,e=h;b<e.length;b+=1){var f=e[b].paint.get(g+"-pattern");f.isConstant()||(a=!0);var c=f.constantOr(null);c&&(a=!0,d[c.to]=!0,d[c.from]=!0)}return a}function g3(l,m,d,g,e){for(var h=e.patternDependencies,i=0,j=m;i<j.length;i+=1){var k=j[i],f=k.paint.get(l+"-pattern").value;if("constant"!==f.kind){var c=f.evaluate({zoom:g-1},d,{},e.availableImages),a=f.evaluate({zoom:g},d,{},e.availableImages),b=f.evaluate({zoom:g+1},d,{},e.availableImages);a=a&&a.name?a.name:a,b=b&&b.name?b.name:b,h[c=c&&c.name?c.name:c]=!0,h[a]=!0,h[b]=!0,d.patterns[k.id]={min:c,mid:a,max:b}}}return d}bi.deviation=function(a,d,c,e){var i=d&&d.length,f=Math.abs(gY(a,0,i?d[0]*c:a.length,c));if(i)for(var b=0,j=d.length;b<j;b++)f-=Math.abs(gY(a,d[b]*c,b<j-1?d[b+1]*c:a.length,c));var h=0;for(b=0;b<e.length;b+=3){var g=e[b]*c,k=e[b+1]*c,l=e[b+2]*c;h+=Math.abs((a[g]-a[l])*(a[k+1]-a[g+1])-(a[g]-a[k])*(a[l+1]-a[g+1]))}return 0===f&&0===h?0:Math.abs((h-f)/f)},bi.flatten=function(b){for(var f=b[0][0].length,c={vertices:[],holes:[],dimensions:f},g=0,a=0;a<b.length;a++){for(var d=0;d<b[a].length;d++)for(var e=0;e<f;e++)c.vertices.push(b[a][d][e]);a>0&&c.holes.push(g+=b[a-1].length)}return c},dr.default=bi;var z=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(a){return a.id}),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new a6,this.indexArray=new ba,this.indexArray2=new bN,this.programConfigurations=new ao(a.layers,a.zoom),this.segments=new O,this.segments2=new O,this.stateDependentLayerIds=this.layers.filter(function(a){return a.isStateDependent()}).map(function(a){return a.id})};z.prototype.populate=function(l,b,e){this.hasPattern=g2("fill",this.layers,b);for(var f=this.layers[0].layout.get("fill-sort-key"),g=[],h=0,m=l;h<m.length;h+=1){var c=m[h],d=c.feature,q=c.id,r=c.index,s=c.sourceLayerIndex,n=this.layers[0]._featureFilter.needGeometry,i=gd(d,n);if(this.layers[0]._featureFilter.filter(new aQ(this.zoom),i,e)){var t=f?f.evaluate(i,{},e,b.availableImages):void 0,u={id:q,properties:d.properties,type:d.type,sourceLayerIndex:s,index:r,geometry:n?i.geometry:gc(d),patterns:{},sortKey:t};g.push(u)}}f&&g.sort(function(a,b){return a.sortKey-b.sortKey});for(var j=0,o=g;j<o.length;j+=1){var a=o[j],p=a.geometry,k=a.index,v=a.sourceLayerIndex;if(this.hasPattern){var w=g3("fill",this.layers,a,this.zoom,b);this.patternFeatures.push(w)}else this.addFeature(a,p,k,e,{});b.featureIndex.insert(l[k].feature,p,k,v,this.index)}},z.prototype.update=function(a,b,c){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,b,this.stateDependentLayers,c)},z.prototype.addFeatures=function(f,d,e){for(var a=0,c=this.patternFeatures;a<c.length;a+=1){var b=c[a];this.addFeature(b,b.geometry,b.index,d,e)}},z.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},z.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},z.prototype.upload=function(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,gz),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.indexBuffer2=a.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(a),this.uploaded=!0},z.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},z.prototype.addFeature=function(s,t,u,v,w){for(var g=0,o=g0(t,500);g<o.length;g+=1){for(var h=o[g],i=0,j=0,p=h;j<p.length;j+=1)i+=p[j].length;for(var k=this.segments.prepareSegment(i,this.layoutVertexArray,this.indexArray),l=k.vertexLength,c=[],q=[],m=0,r=h;m<r.length;m+=1){var a=r[m];if(0!==a.length){a!==h[0]&&q.push(c.length/2);var n=this.segments2.prepareSegment(a.length,this.layoutVertexArray,this.indexArray2),f=n.vertexLength;this.layoutVertexArray.emplaceBack(a[0].x,a[0].y),this.indexArray2.emplaceBack(f+a.length-1,f),c.push(a[0].x),c.push(a[0].y);for(var b=1;b<a.length;b++)this.layoutVertexArray.emplaceBack(a[b].x,a[b].y),this.indexArray2.emplaceBack(f+b-1,f+b),c.push(a[b].x),c.push(a[b].y);n.vertexLength+=a.length,n.primitiveLength+=a.length}}for(var d=dr(c,q),e=0;e<d.length;e+=3)this.indexArray.emplaceBack(l+d[e],l+d[e+1],l+d[e+2]);k.vertexLength+=i,k.primitiveLength+=d.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,u,w,v)},c("FillBucket",z,{omit:["layers","patternFeatures"]});var ds=new q({"fill-sort-key":new f(b.layout_fill["fill-sort-key"])}),g4={paint:new q({"fill-antialias":new e(b.paint_fill["fill-antialias"]),"fill-opacity":new f(b.paint_fill["fill-opacity"]),"fill-color":new f(b.paint_fill["fill-color"]),"fill-outline-color":new f(b.paint_fill["fill-outline-color"]),"fill-translate":new e(b.paint_fill["fill-translate"]),"fill-translate-anchor":new e(b.paint_fill["fill-translate-anchor"]),"fill-pattern":new aS(b.paint_fill["fill-pattern"])}),layout:ds},dt=function(b){function a(a){b.call(this,a,g4)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.recalculate=function(c,d){b.prototype.recalculate.call(this,c,d);var a=this.paint._values["fill-outline-color"];"constant"===a.value.kind&& void 0===a.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},a.prototype.createBucket=function(a){return new z(a)},a.prototype.queryRadius=function(){return gq(this.paint.get("fill-translate"))},a.prototype.queryIntersectsFeature=function(a,e,f,b,g,c,d){return gg(gr(a,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),c.angle,d),b)},a.prototype.isTileClipped=function(){return!0},a}(y),g5=n([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,du=aV;function aV(a,b,c,d,e){this.properties={},this.extent=c,this.type=0,this._pbf=a,this._geometry=-1,this._keys=d,this._values=e,a.readFields(g6,this,b)}function g6(a,b,c){1==a?b.id=c.readVarint():2==a?function(a,b){for(var c=a.readVarint()+a.pos;a.pos<c;){var d=b._keys[a.readVarint()],e=b._values[a.readVarint()];b.properties[d]=e}}(c,b):3==a?b.type=c.readVarint():4==a&&(b._geometry=c.pos)}function g7(a){for(var c,d,e=0,b=0,f=a.length,g=f-1;b<f;g=b++)e+=((d=a[g]).x-(c=a[b]).x)*(c.y+d.y);return e}aV.types=["Unknown","Point","LineString","Polygon"],aV.prototype.loadGeometry=function(){var b=this._pbf;b.pos=this._geometry;for(var a,i=b.readVarint()+b.pos,c=1,d=0,f=0,g=0,e=[];b.pos<i;){if(d<=0){var h=b.readVarint();c=7&h,d=h>>3}if(d--,1===c||2===c)f+=b.readSVarint(),g+=b.readSVarint(),1===c&&(a&&e.push(a),a=[]),a.push(new aY(f,g));else{if(7!==c)throw Error("unknown command "+c);a&&a.push(a[0].clone())}}return a&&e.push(a),e},aV.prototype.bbox=function(){var a=this._pbf;a.pos=this._geometry;for(var k=a.readVarint()+a.pos,b=1,e=0,c=0,d=0,f=1/0,g=-1/0,h=1/0,i=-1/0;a.pos<k;){if(e<=0){var j=a.readVarint();b=7&j,e=j>>3}if(e--,1===b||2===b)(c+=a.readSVarint())<f&&(f=c),c>g&&(g=c),(d+=a.readSVarint())<h&&(h=d),d>i&&(i=d);else if(7!==b)throw Error("unknown command "+b)}return[f,h,g,i]},aV.prototype.toGeoJSON=function(h,i,j){var a,c,k=this.extent*Math.pow(2,j),l=this.extent*h,m=this.extent*i,b=this.loadGeometry(),d=aV.types[this.type];function e(b){for(var a=0;a<b.length;a++){var c=b[a];b[a]=[360*(c.x+l)/k-180,360/Math.PI*Math.atan(Math.exp((180-360*(c.y+m)/k)*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(a=0;a<b.length;a++)f[a]=b[a][0];e(b=f);break;case 2:for(a=0;a<b.length;a++)e(b[a]);break;case 3:for(b=function(b){var g=b.length;if(g<=1)return[b];for(var a,d,e=[],c=0;c<g;c++){var f=g7(b[c]);0!==f&&(void 0===d&&(d=f<0),d===f<0?(a&&e.push(a),a=[b[c]]):a.push(b[c]))}return a&&e.push(a),e}(b),a=0;a<b.length;a++)for(c=0;c<b[a].length;c++)e(b[a][c])}1===b.length?b=b[0]:d="Multi"+d;var g={type:"Feature",geometry:{type:d,coordinates:b},properties:this.properties};return"id"in this&&(g.id=this.id),g};var dv=dw;function dw(a,b){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=a,this._keys=[],this._values=[],this._features=[],a.readFields(g8,this,b),this.length=this._features.length}function g8(a,b,c){15===a?b.version=c.readVarint():1===a?b.name=c.readString():5===a?b.extent=c.readVarint():2===a?b._features.push(c.pos):3===a?b._keys.push(c.readString()):4===a&&b._values.push(function(a){for(var c=null,d=a.readVarint()+a.pos;a.pos<d;){var b=a.readVarint()>>3;c=1===b?a.readString():2===b?a.readFloat():3===b?a.readDouble():4===b?a.readVarint64():5===b?a.readVarint():6===b?a.readSVarint():7===b?a.readBoolean():null}return c}(c))}function g9(c,d,a){if(3===c){var b=new dv(a,a.readVarint()+a.pos);b.length&&(d[b.name]=b)}}
1dw.prototype.feature=function(a){if(a<0||a>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[a];var b=this._pbf.readVarint()+this._pbf.pos;return new du(this._pbf,b,this.extent,this._keys,this._values)};var aC={VectorTile:function(a,b){this.layers=a.readFields(g9,{},b)},VectorTileFeature:du,VectorTileLayer:dv},ha=aC.VectorTileFeature.types;function hb(a,b,c,d,e,f,g,h){a.emplaceBack(b,c,2*Math.floor(8192*d)+g,16384*e,16384*f,Math.round(h))}var A=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(a){return a.id}),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new bE,this.indexArray=new ba,this.programConfigurations=new ao(a.layers,a.zoom),this.segments=new O,this.stateDependentLayerIds=this.layers.filter(function(a){return a.isStateDependent()}).map(function(a){return a.id})};function hc(a,b){return a.x===b.x&&(a.x<0||a.x>8192)||a.y===b.y&&(a.y<0||a.y>8192)}A.prototype.populate=function(l,d,g){this.features=[],this.hasPattern=g2("fill-extrusion",this.layers,d);for(var e=0,h=l;e<h.length;e+=1){var b=h[e],a=b.feature,m=b.id,f=b.index,i=b.sourceLayerIndex,j=this.layers[0]._featureFilter.needGeometry,k=gd(a,j);if(this.layers[0]._featureFilter.filter(new aQ(this.zoom),k,g)){var c={id:m,sourceLayerIndex:i,index:f,geometry:j?k.geometry:gc(a),properties:a.properties,type:a.type,patterns:{}};this.hasPattern?this.features.push(g3("fill-extrusion",this.layers,c,this.zoom,d)):this.addFeature(c,c.geometry,f,g,{}),d.featureIndex.insert(a,c.geometry,f,i,this.index,!0)}}},A.prototype.addFeatures=function(f,d,e){for(var a=0,c=this.features;a<c.length;a+=1){var b=c[a];this.addFeature(b,b.geometry,b.index,d,e)}},A.prototype.update=function(a,b,c){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,b,this.stateDependentLayers,c)},A.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},A.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},A.prototype.upload=function(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,g5),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0},A.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},A.prototype.addFeature=function(w,D,E,F,G){for(var k,q=0,x=g0(D,500);q<x.length;q+=1){for(var l=x[q],m=0,r=0,y=l;r<y.length;r+=1)m+=y[r].length;for(var a=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),s=0,z=l;s<z.length;s+=1){var g=z[s];if(0!==g.length&&!((k=g).every(function(a){return a.x<0})||k.every(function(a){return a.x>8192})||k.every(function(a){return a.y<0})||k.every(function(a){return a.y>8192})))for(var e=0,h=0;h<g.length;h++){var c=g[h];if(h>=1){var d=g[h-1];if(!hc(c,d)){a.vertexLength+4>O.MAX_VERTEX_ARRAY_LENGTH&&(a=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var b=c.sub(d)._perp()._unit(),A=d.dist(c);e+A>32768&&(e=0),hb(this.layoutVertexArray,c.x,c.y,b.x,b.y,0,0,e),hb(this.layoutVertexArray,c.x,c.y,b.x,b.y,0,1,e),hb(this.layoutVertexArray,d.x,d.y,b.x,b.y,0,0,e+=A),hb(this.layoutVertexArray,d.x,d.y,b.x,b.y,0,1,e);var f=a.vertexLength;this.indexArray.emplaceBack(f,f+2,f+1),this.indexArray.emplaceBack(f+1,f+2,f+3),a.vertexLength+=4,a.primitiveLength+=2}}}}if(a.vertexLength+m>O.MAX_VERTEX_ARRAY_LENGTH&&(a=this.segments.prepareSegment(m,this.layoutVertexArray,this.indexArray)),"Polygon"===ha[w.type]){for(var n=[],B=[],t=a.vertexLength,u=0,C=l;u<C.length;u+=1){var o=C[u];if(0!==o.length){o!==l[0]&&B.push(n.length/2);for(var v=0;v<o.length;v++){var p=o[v];hb(this.layoutVertexArray,p.x,p.y,0,0,1,1,0),n.push(p.x),n.push(p.y)}}}for(var i=dr(n,B),j=0;j<i.length;j+=3)this.indexArray.emplaceBack(t+i[j],t+i[j+2],t+i[j+1]);a.primitiveLength+=i.length/3,a.vertexLength+=m}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,w,E,G,F)},c("FillExtrusionBucket",A,{omit:["layers","features"]});var hd={paint:new q({"fill-extrusion-opacity":new e(b["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new f(b["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new e(b["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new e(b["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new aS(b["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new f(b["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new f(b["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new e(b["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},dx=function(b){function a(a){b.call(this,a,hd)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.createBucket=function(a){return new A(a)},a.prototype.queryRadius=function(){return gq(this.paint.get("fill-extrusion-translate"))},a.prototype.is3D=function(){return!0},a.prototype.queryIntersectsFeature=function(e,a,b,f,m,g,h,c){var i=gr(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),g.angle,h),j=this.paint.get("fill-extrusion-height").evaluate(a,b),k=this.paint.get("fill-extrusion-base").evaluate(a,b),l=function(f,g,h,i){for(var c=[],b=0,d=f;b<d.length;b+=1){var e=d[b],a=[e.x,e.y,0,1];
vendor: 36,703 bytes, line 1
1dk(a,a,g),c.push(new aY(a[0]/a[3],a[1]/a[3]))}return c}(i,c),d=function(w,b,c,a){for(var j=[],k=[],x=a[8]*b,y=a[9]*b,z=a[10]*b,A=a[11]*b,B=a[8]*c,C=a[9]*c,D=a[10]*c,E=a[11]*c,f=0,l=w;f<l.length;f+=1){for(var m=[],n=[],g=0,o=l[f];g<o.length;g+=1){var p=o[g],d=p.x,e=p.y,q=a[0]*d+a[4]*e+a[12],r=a[1]*d+a[5]*e+a[13],s=a[2]*d+a[6]*e+a[14],t=a[3]*d+a[7]*e+a[15],F=s+z,h=t+A,G=q+B,H=r+C,I=s+D,i=t+E,u=new aY((q+x)/h,(r+y)/h);u.z=F/h,m.push(u);var v=new aY(G/i,H/i);v.z=I/i,n.push(v)}j.push(m),k.push(n)}return[j,k]}(f,k,j,c);return function(j,c,d){var b=1/0;gg(d,c)&&(b=hf(d,c[0]));for(var e=0;e<c.length;e++)for(var f=c[e],g=j[e],a=0;a<f.length-1;a++){var h=f[a],i=[h,f[a+1],g[a+1],g[a],h];dh(d,i)&&(b=Math.min(b,hf(d,i)))}return b!==1/0&&b}(d[0],d[1],l)},a}(y);function he(a,b){return a.x*b.x+a.y*b.y}function hf(j,a){if(1===j.length){for(var b,c=0,d=a[c++];!b||d.equals(b);)if(!(b=a[c++]))return 1/0;for(;c<a.length;c++){var k=a[c],v=j[0],e=b.sub(d),f=k.sub(d),l=v.sub(d),m=he(e,e),g=he(e,f),n=he(f,f),o=he(l,e),p=he(l,f),q=m*n-g*g,r=(n*o-g*p)/q,s=(m*p-g*o)/q,t=d.z*(1-r-s)+b.z*r+k.z*s;if(isFinite(t))return t}return 1/0}for(var h=1/0,i=0,u=a;i<u.length;i+=1)h=Math.min(h,u[i].z);return h}var hg=n([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,hh=n([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,hi=aC.VectorTileFeature.types,hj=Math.cos(Math.PI/180*37.5),p=function(a){var b=this;this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(a){return a.id}),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(a){b.gradients[a.id]={}}),this.layoutVertexArray=new bF,this.layoutVertexArray2=new bG,this.indexArray=new ba,this.programConfigurations=new ao(a.layers,a.zoom),this.segments=new O,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(a){return a.isStateDependent()}).map(function(a){return a.id})};p.prototype.populate=function(l,d,e){this.hasPattern=g2("line",this.layers,d);for(var f=this.layers[0].layout.get("line-sort-key"),g=[],h=0,m=l;h<m.length;h+=1){var b=m[h],c=b.feature,q=b.id,r=b.index,s=b.sourceLayerIndex,n=this.layers[0]._featureFilter.needGeometry,i=gd(c,n);if(this.layers[0]._featureFilter.filter(new aQ(this.zoom),i,e)){var t=f?f.evaluate(i,{},e):void 0,u={id:q,properties:c.properties,type:c.type,sourceLayerIndex:s,index:r,geometry:n?i.geometry:gc(c),patterns:{},sortKey:t};g.push(u)}}f&&g.sort(function(a,b){return a.sortKey-b.sortKey});for(var j=0,o=g;j<o.length;j+=1){var a=o[j],p=a.geometry,k=a.index,v=a.sourceLayerIndex;if(this.hasPattern){var w=g3("line",this.layers,a,this.zoom,d);this.patternFeatures.push(w)}else this.addFeature(a,p,k,e,{});d.featureIndex.insert(l[k].feature,p,k,v,this.index)}},p.prototype.update=function(a,b,c){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,b,this.stateDependentLayers,c)},p.prototype.addFeatures=function(f,d,e){for(var a=0,c=this.patternFeatures;a<c.length;a+=1){var b=c[a];this.addFeature(b,b.geometry,b.index,d,e)}},p.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},p.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},p.prototype.upload=function(a){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=a.createVertexBuffer(this.layoutVertexArray2,hh)),this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,hg),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0},p.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},p.prototype.lineFeatureClips=function(a){if(a.properties&&a.properties.hasOwnProperty("mapbox_clip_start")&&a.properties.hasOwnProperty("mapbox_clip_end"))return{start:+a.properties.mapbox_clip_start,end:+a.properties.mapbox_clip_end}},p.prototype.addFeature=function(a,e,f,g,h){var b=this.layers[0].layout,i=b.get("line-join").evaluate(a,{}),j=b.get("line-cap"),k=b.get("line-miter-limit"),l=b.get("line-round-limit");this.lineClips=this.lineFeatureClips(a);for(var c=0,d=e;c<d.length;c+=1)this.addLine(d[c],a,i,j,k,l);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,f,h,g)},p.prototype.addLine=function(e,K,z,L,u,M){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var q=0;q<e.length-1;q++)this.totalDistance+=e[q].dist(e[q+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var r="Polygon"===hi[K.type],i=e.length;i>=2&&e[i-1].equals(e[i-2]);)i--;for(var l=0;l<i-1&&e[l].equals(e[l+1]);)l++;if(!(i<(r?3:2))){"bevel"===z&&(u=1.05);var a,s=this.overscaling<=16?122880/(512*this.overscaling):0,f=this.segments.prepareSegment(10*i,this.layoutVertexArray,this.indexArray),h=void 0,j=void 0,c=void 0,b=void 0;this.e1=this.e2=-1,r&&(b=e[l].sub(a=e[i-2])._unit()._perp());for(var m=l;m<i;m++)if(!(j=m===i-1?r?e[l+1]:void 0:e[m+1])||!e[m].equals(j)){b&&(c=b),a&&(h=a),a=e[m],b=j?j.sub(a)._unit()._perp():c;var g=(c=c||b).add(b);0===g.x&&0===g.y||g._unit();var o=c.x*b.x+c.y*b.y,t=g.x*b.x+g.y*b.y,k=0!==t?1/t:1/0,N=2*Math.sqrt(2-2*t),A=t<hj&&h&&j,p=c.x*b.y-c.y*b.x>0;if(A&&m>l){var B=a.dist(h);if(B>2*s){var v=a.sub(a.sub(h)._mult(s/B)._round());this.updateDistance(h,v),this.addCurrentVertex(v,c,0,0,f),h=v}}var C=h&&j,d=C?z:r?"butt":L;if(C&&"round"===d&&(k<M?d="miter":k<=2&&(d="fakeround")),"miter"===d&&k>u&&(d="bevel"),"bevel"===d&&(k>2&&(d="flipbevel"),k<u&&(d="miter")),h&&this.updateDistance(h,a),"miter"===d)g._mult(k),this.addCurrentVertex(a,g,0,0,f);else if("flipbevel"===d){if(k>100)g=b.mult(-1);else{var O=k*c.add(b).mag()/c.sub(b).mag();g._perp()._mult(O*(p?-1:1))}this.addCurrentVertex(a,g,0,0,f),this.addCurrentVertex(a,g.mult(-1),0,0,f)}else if("bevel"===d||"fakeround"===d){var D=-Math.sqrt(k*k-1),E=p?D:0,F=p?0:D;if(h&&this.addCurrentVertex(a,c,E,F,f),"fakeround"===d)for(var G=Math.round(180*N/Math.PI/20),w=1;w<G;w++){var n=w/G;if(.5!==n){var x=n-.5;n+=n*x*(n-1)*((1.0904+o*(o*(3.55645-1.43519*o)-3.2452))*x*x+(.848013+o*(.215638*o-1.06021)))}var H=b.sub(c)._mult(n)._add(c)._unit()._mult(p?-1:1);this.addHalfVertex(a,H.x,H.y,!1,p,0,f)}j&&this.addCurrentVertex(a,b,-E,-F,f)}else if("butt"===d)this.addCurrentVertex(a,g,0,0,f);else if("square"===d){var I=h?1:-1;this.addCurrentVertex(a,g,I,I,f)}else"round"===d&&(h&&(this.addCurrentVertex(a,c,0,0,f),this.addCurrentVertex(a,c,1,1,f,!0)),j&&(this.addCurrentVertex(a,b,-1,-1,f,!0),this.addCurrentVertex(a,b,0,0,f)));if(A&&m<i-1){var J=a.dist(j);if(J>2*s){var y=a.add(j.sub(a)._mult(s/J)._round());this.updateDistance(a,y),this.addCurrentVertex(y,b,0,0,f),a=y}}}}},p.prototype.addCurrentVertex=function(e,a,c,d,f,b){void 0===b&&(b=!1);var g=a.y*d-a.x,h=-a.y-a.x*d;this.addHalfVertex(e,a.x+a.y*c,a.y-a.x*c,b,!1,c,f),this.addHalfVertex(e,g,h,b,!0,-d,f),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,a,c,d,f,b))},p.prototype.addHalfVertex=function(b,g,h,i,c,d,e){var f=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((b.x<<1)+(i?1:0),(b.y<<1)+(c?1:0),Math.round(63*g)+128,Math.round(63*h)+128,1+(0===d?0:d<0?-1:1)|(63&f)<<2,f>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var a=e.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,a),e.primitiveLength++),c?this.e2=a:this.e1=a},p.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},p.prototype.updateDistance=function(a,b){this.distance+=a.dist(b),this.updateScaledDistance()},c("LineBucket",p,{omit:["layers","patternFeatures"]});var dy=new q({"line-cap":new e(b.layout_line["line-cap"]),"line-join":new f(b.layout_line["line-join"]),"line-miter-limit":new e(b.layout_line["line-miter-limit"]),"line-round-limit":new e(b.layout_line["line-round-limit"]),"line-sort-key":new f(b.layout_line["line-sort-key"])}),dz={paint:new q({"line-opacity":new f(b.paint_line["line-opacity"]),"line-color":new f(b.paint_line["line-color"]),"line-translate":new e(b.paint_line["line-translate"]),"line-translate-anchor":new e(b.paint_line["line-translate-anchor"]),"line-width":new f(b.paint_line["line-width"]),"line-gap-width":new f(b.paint_line["line-gap-width"]),"line-offset":new f(b.paint_line["line-offset"]),"line-blur":new f(b.paint_line["line-blur"]),"line-dasharray":new al(b.paint_line["line-dasharray"]),"line-pattern":new aS(b.paint_line["line-pattern"]),"line-gradient":new az(b.paint_line["line-gradient"])}),layout:dy},dA=new(function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.possiblyEvaluate=function(c,a){return a=new aQ(Math.floor(a.zoom),{now:a.now,fadeDuration:a.fadeDuration,zoomHistory:a.zoomHistory,transition:a.transition}),b.prototype.possiblyEvaluate.call(this,c,a)},a.prototype.evaluate=function(c,a,d,e){return a=b2({},a,{zoom:Math.floor(a.zoom)}),b.prototype.evaluate.call(this,c,a,d,e)},a}(f))(dz.paint.properties["line-width"].specification);dA.useIntegerZoom=!0;var dB=function(b){function a(a){b.call(this,a,dz),this.gradientVersion=0}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._handleSpecialPaintPropertyUpdate=function(a){"line-gradient"===a&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof $,this.gradientVersion=(this.gradientVersion+1)%9007199254740991)},a.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},a.prototype.recalculate=function(a,c){b.prototype.recalculate.call(this,a,c),this.paint._values["line-floorwidth"]=dA.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,a)},a.prototype.createBucket=function(a){return new p(a)},a.prototype.queryRadius=function(b){var a=b,c=hk(gp("line-width",this,a),gp("line-gap-width",this,a)),d=gp("line-offset",this,a);return c/2+Math.abs(d)+gq(this.paint.get("line-translate"))},a.prototype.queryIntersectsFeature=function(f,a,b,c,j,g,d){var h=gr(f,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),g.angle,d),i=d/2*hk(this.paint.get("line-width").evaluate(a,b),this.paint.get("line-gap-width").evaluate(a,b)),e=this.paint.get("line-offset").evaluate(a,b);return e&&(c=function(g,k){for(var h=[],i=new aY(0,0),d=0;d<g.length;d++){for(var b=g[d],j=[],a=0;a<b.length;a++){var e=b[a],l=b[a+1],m=0===a?i:e.sub(b[a-1])._unit()._perp(),f=a===b.length-1?i:l.sub(e)._unit()._perp(),c=m._add(f)._unit();c._mult(1/(c.x*f.x+c.y*f.y)),j.push(c._mult(k)._add(e))}h.push(j)}return h}(c,e*d)),function(a,e,f){for(var b=0;b<e.length;b++){var c=e[b];if(a.length>=3){for(var d=0;d<c.length;d++)if(gn(a,c[d]))return!0}if(gh(a,c,f))return!0}return!1}(h,c,i)},a.prototype.isTileClipped=function(){return!0},a}(y);function hk(a,b){return b>0?b+2*a:a}var hl=n([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),hm=n([{name:"a_projected_pos",components:3,type:"Float32"}],4),hn=(n([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),n([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),ho=(n([{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"}]),n([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),dC=n([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function hp(a,b,c){return a.sections.forEach(function(d){var a,e,f,g;d.text=(a=d.text,e=b,f=c,"uppercase"===(g=e.layout.get("text-transform").evaluate(f,{}))?a=a.toLocaleUpperCase():"lowercase"===g&&(a=a.toLocaleLowerCase()),cZ.applyArabicShaping&&(a=cZ.applyArabicShaping(a)),a)}),a}n([{name:"triangle",components:3,type:"Uint16"}]),n([{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"}]),n([{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"}]),n([{type:"Float32",name:"offsetX"}]),n([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var hq={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xa2":"\uFFE0","\xa3":"\uFFE1","\xa5":"\uFFE5","\xa6":"\uFFE4","\xac":"\uFFE2","\xaf":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},hr=function(g,h,j,e,k){var a,c,l=8*k-e-1,m=(1<<l)-1,n=m>>1,b=-7,d=j?k-1:0,i=j?-1:1,f=g[h+d];for(d+=i,a=f&(1<< -b)-1,f>>=-b,b+=l;b>0;a=256*a+g[h+d],d+=i,b-=8);for(c=a&(1<< -b)-1,a>>=-b,b+=e;b>0;c=256*c+g[h+d],d+=i,b-=8);if(0===a)a=1-n;else{if(a===m)return c?NaN:1/0*(f?-1:1);c+=Math.pow(2,e),a-=n}return(f?-1:1)*c*Math.pow(2,a-e)},hs=function(j,b,k,m,c,n){var a,d,e,h=8*n-c-1,i=(1<<h)-1,f=i>>1,o=23===c?5960464477539062e-23:0,g=m?0:n-1,l=m?1:-1,p=b<0||0===b&&1/b<0?1:0;for(isNaN(b=Math.abs(b))||b===1/0?(d=isNaN(b)?1:0,a=i):(a=Math.floor(Math.log(b)/Math.LN2),b*(e=Math.pow(2,-a))<1&&(a--,e*=2),(b+=a+f>=1?o/e:o*Math.pow(2,1-f))*e>=2&&(a++,e/=2),a+f>=i?(d=0,a=i):a+f>=1?(d=(b*e-1)*Math.pow(2,c),a+=f):(d=b*Math.pow(2,f-1)*Math.pow(2,c),a=0));c>=8;j[k+g]=255&d,g+=l,d/=256,c-=8);for(a=a<<c|d,h+=c;h>0;j[k+g]=255&a,g+=l,a/=256,h-=8);j[k+g-l]|=128*p},bT=aD;function aD(a){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0),this.pos=0,this.type=0,this.length=this.buf.length}aD.Varint=0,aD.Fixed64=1,aD.Bytes=2,aD.Fixed32=5;var ht="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function hu(a){return a.type===aD.Bytes?a.readVarint()+a.pos:a.pos+1}function hv(e,a,b){var d=a<=16383?1:a<=2097151?2:a<=268435455?3:Math.floor(Math.log(a)/(7*Math.LN2));b.realloc(d);for(var c=b.pos-1;c>=e;c--)b.buf[c+d]=b.buf[c]}function hw(b,c){for(var a=0;a<b.length;a++)c.writeVarint(b[a])}function hx(b,c){for(var a=0;a<b.length;a++)c.writeSVarint(b[a])}function hy(b,c){for(var a=0;a<b.length;a++)c.writeFloat(b[a])}function hz(b,c){for(var a=0;a<b.length;a++)c.writeDouble(b[a])}function hA(b,c){for(var a=0;a<b.length;a++)c.writeBoolean(b[a])}function hB(b,c){for(var a=0;a<b.length;a++)c.writeFixed32(b[a])}function hC(b,c){for(var a=0;a<b.length;a++)c.writeSFixed32(b[a])}function hD(b,c){for(var a=0;a<b.length;a++)c.writeFixed64(b[a])}function hE(b,c){for(var a=0;a<b.length;a++)c.writeSFixed64(b[a])}function hF(a,b){return(a[b]|a[b+1]<<8|a[b+2]<<16)+16777216*a[b+3]}function hG(a,b,c){a[c]=b,a[c+1]=b>>>8,a[c+2]=b>>>16,a[c+3]=b>>>24}function hH(a,b){return(a[b]|a[b+1]<<8|a[b+2]<<16)+(a[b+3]<<24)}function hI(a,b,c){1===a&&c.readMessage(hJ,b)}function hJ(d,e,f){if(3===d){var a=f.readMessage(hK,{}),b=a.width,c=a.height,g=a.left,h=a.top,i=a.advance;e.push({id:a.id,bitmap:new aB({width:b+6,height:c+6},a.bitmap),metrics:{width:b,height:c,left:g,top:h,advance:i}})}}function hK(a,b,c){1===a?b.id=c.readVarint():2===a?b.bitmap=c.readBytes():3===a?b.width=c.readVarint():4===a?b.height=c.readVarint():5===a?b.left=c.readSVarint():6===a?b.top=c.readSVarint():7===a&&(b.advance=c.readVarint())}function dD(g){for(var h=0,i=0,j=0,m=g;j<m.length;j+=1){var k=m[j];h+=k.w*k.h,i=Math.max(i,k.w)}g.sort(function(a,b){return b.h-a.h});for(var c=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(h/.95)),i),h:1/0}],e=0,f=0,l=0,n=g;l<n.length;l+=1)for(var a=n[l],d=c.length-1;d>=0;d--){var b=c[d];if(!(a.w>b.w||a.h>b.h)){if(a.x=b.x,a.y=b.y,f=Math.max(f,a.y+a.h),e=Math.max(e,a.x+a.w),a.w===b.w&&a.h===b.h){var o=c.pop();d<c.length&&(c[d]=o)}else a.h===b.h?(b.x+=a.w,b.w-=a.w):a.w===b.w?(b.y+=a.h,b.h-=a.h):(c.push({x:b.x+a.w,y:b.y,w:b.w-a.w,h:a.h}),b.y+=a.h,b.h-=a.h);break}}return{w:e,h:f,fill:h/(e*f)||0}}aD.prototype={destroy:function(){this.buf=null},readFields:function(d,c,a){for(a=a||this.length;this.pos<a;){var b=this.readVarint(),e=b>>3,f=this.pos;this.type=7&b,d(e,c,this),this.pos===f&&this.skip(b)}return c},readMessage:function(a,b){return this.readFields(a,b,this.readVarint()+this.pos)},readFixed32:function(){var a=hF(this.buf,this.pos);return this.pos+=4,a},readSFixed32:function(){var a=hH(this.buf,this.pos);return this.pos+=4,a},readFixed64:function(){var a=hF(this.buf,this.pos)+4294967296*hF(this.buf,this.pos+4);return this.pos+=8,a},readSFixed64:function(){var a=hF(this.buf,this.pos)+4294967296*hH(this.buf,this.pos+4);return this.pos+=8,a},readFloat:function(){var a=hr(this.buf,this.pos,!0,23,4);return this.pos+=4,a},readDouble:function(){var a=hr(this.buf,this.pos,!0,52,8);return this.pos+=8,a},readVarint:function(d){var a,b,c=this.buf;return a=127&(b=c[this.pos++]),b<128?a:(a|=(127&(b=c[this.pos++]))<<7,b<128?a:(a|=(127&(b=c[this.pos++]))<<14,b<128?a:(a|=(127&(b=c[this.pos++]))<<21,b<128?a:function(h,i,b){var e,f,g,c,a,d=b.buf;if(c=(112&(a=d[b.pos++]))>>4,a<128||(c|=(127&(a=d[b.pos++]))<<3,a<128)||(c|=(127&(a=d[b.pos++]))<<10,a<128)||(c|=(127&(a=d[b.pos++]))<<17,a<128)||(c|=(127&(a=d[b.pos++]))<<24,a<128)||(c|=(1&(a=d[b.pos++]))<<31,a<128)){return e=h,f=c,g=i,g?4294967296*f+(e>>>0):4294967296*(f>>>0)+(e>>>0)}throw Error("Expected varint not more than 10 bytes")}(a|=(15&(b=c[this.pos]))<<28,d,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var a=this.readVarint();return a%2==1?-((a+1)/2):a/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var c,d,e,a=this.readVarint()+this.pos,b=this.pos;return this.pos=a,a-b>=12&&ht?(c=this.buf,d=b,e=a,ht.decode(c.subarray(d,e))):function(d,k,j){for(var h="",b=k;b<j;){var f,g,i,c=d[b],a=null,e=c>239?4:c>223?3:c>191?2:1;if(b+e>j)break;1===e?c<128&&(a=c):2===e?128==(192&(f=d[b+1]))&&(a=(31&c)<<6|63&f)<=127&&(a=null):3===e?(g=d[b+2],128==(192&(f=d[b+1]))&&128==(192&g)&&((a=(15&c)<<12|(63&f)<<6|63&g)<=2047||a>=55296&&a<=57343)&&(a=null)):4===e&&(g=d[b+2],i=d[b+3],128==(192&(f=d[b+1]))&&128==(192&g)&&128==(192&i)&&((a=(15&c)<<18|(63&f)<<12|(63&g)<<6|63&i)<=65535||a>=1114112)&&(a=null)),null===a?(a=65533,e=1):a>65535&&(a-=65536,h+=String.fromCharCode(a>>>10&1023|55296),a=56320|1023&a),h+=String.fromCharCode(a),b+=e}return h}(this.buf,b,a)},readBytes:function(){var a=this.readVarint()+this.pos,b=this.buf.subarray(this.pos,a);return this.pos=a,b},readPackedVarint:function(a,b){if(this.type!==aD.Bytes)return a.push(this.readVarint(b));var c=hu(this);for(a=a||[];this.pos<c;)a.push(this.readVarint(b));return a},readPackedSVarint:function(a){if(this.type!==aD.Bytes)return a.push(this.readSVarint());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readSVarint());return a},readPackedBoolean:function(a){if(this.type!==aD.Bytes)return a.push(this.readBoolean());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readBoolean());return a},readPackedFloat:function(a){if(this.type!==aD.Bytes)return a.push(this.readFloat());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readFloat());return a},readPackedDouble:function(a){if(this.type!==aD.Bytes)return a.push(this.readDouble());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readDouble());return a},readPackedFixed32:function(a){if(this.type!==aD.Bytes)return a.push(this.readFixed32());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readFixed32());return a},readPackedSFixed32:function(a){if(this.type!==aD.Bytes)return a.push(this.readSFixed32());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readSFixed32());return a},readPackedFixed64:function(a){if(this.type!==aD.Bytes)return a.push(this.readFixed64());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readFixed64());return a},readPackedSFixed64:function(a){if(this.type!==aD.Bytes)return a.push(this.readSFixed64());var b=hu(this);for(a=a||[];this.pos<b;)a.push(this.readSFixed64());return a},skip:function(b){var a=7&b;if(a===aD.Varint)for(;this.buf[this.pos++]>127;);else if(a===aD.Bytes)this.pos=this.readVarint()+this.pos;else if(a===aD.Fixed32)this.pos+=4;else{if(a!==aD.Fixed64)throw Error("Unimplemented type: "+a);this.pos+=8}},writeTag:function(a,b){this.writeVarint(a<<3|b)},realloc:function(c){for(var a=this.length||16;a<this.pos+c;)a*=2;if(a!==this.length){var b=new Uint8Array(a);b.set(this.buf),this.buf=b,this.length=a}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(a){this.realloc(4),hG(this.buf,a,this.pos),this.pos+=4},writeSFixed32:function(a){this.realloc(4),hG(this.buf,a,this.pos),this.pos+=4},writeFixed64:function(a){this.realloc(8),hG(this.buf,-1&a,this.pos),hG(this.buf,Math.floor(a*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(a){this.realloc(8),hG(this.buf,-1&a,this.pos),hG(this.buf,Math.floor(a*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(a){(a=+a||0)>268435455||a<0?function(e,h){var f,g,d,j,c,a,b,i;if(e>=0?(f=e%4294967296|0,g=e/4294967296|0):(g=~(-e/4294967296),4294967295^(f=~(-e%4294967296))?f=f+1|0:(f=0,g=g+1|0)),e>=18446744073709552e3||e< -18446744073709552e3)throw Error("Given varint doesn't fit into 10 bytes");h.realloc(10),d=f,(c=h).buf[c.pos++]=127&d|128,d>>>=7,c.buf[c.pos++]=127&d|128,d>>>=7,c.buf[c.pos++]=127&d|128,d>>>=7,c.buf[c.pos++]=127&d|128,c.buf[c.pos]=127&(d>>>=7),a=g,b=h,i=(7&a)<<4,b.buf[b.pos++]|=i|((a>>>=3)?128:0),a&&(b.buf[b.pos++]=127&a|((a>>>=7)?128:0),a&&(b.buf[b.pos++]=127&a|((a>>>=7)?128:0),a&&(b.buf[b.pos++]=127&a|((a>>>=7)?128:0),a&&(b.buf[b.pos++]=127&a|((a>>>=7)?128:0),a&&(b.buf[b.pos++]=127&a)))))}(a,this):(this.realloc(4),this.buf[this.pos++]=127&a|(a>127?128:0),a<=127||(this.buf[this.pos++]=127&(a>>>=7)|(a>127?128:0),a<=127||(this.buf[this.pos++]=127&(a>>>=7)|(a>127?128:0),a<=127||(this.buf[this.pos++]=a>>>7&127))))},writeSVarint:function(a){this.writeVarint(a<0?-(2*a)-1:2*a)},writeBoolean:function(a){this.writeVarint(Boolean(a))},writeString:function(a){a=String(a),this.realloc(4*a.length),this.pos++;var c=this.pos;this.pos=function(c,f,b){for(var a,d,e=0;e<f.length;e++){if((a=f.charCodeAt(e))>55295&&a<57344){if(!d){a>56319||e+1===f.length?(c[b++]=239,c[b++]=191,c[b++]=189):d=a;continue}if(a<56320){c[b++]=239,c[b++]=191,c[b++]=189,d=a;continue}a=d-55296<<10|a-56320|65536,d=null}else d&&(c[b++]=239,c[b++]=191,c[b++]=189,d=null);a<128?c[b++]=a:(a<2048?c[b++]=a>>6|192:(a<65536?c[b++]=a>>12|224:(c[b++]=a>>18|240,c[b++]=a>>12&63|128),c[b++]=a>>6&63|128),c[b++]=63&a|128)}return b}(this.buf,a,this.pos);var b=this.pos-c;b>=128&&hv(c,b,this),this.pos=c-1,this.writeVarint(b),this.pos+=b},writeFloat:function(a){this.realloc(4),hs(this.buf,a,this.pos,!0,23,4),this.pos+=4},writeDouble:function(a){this.realloc(8),hs(this.buf,a,this.pos,!0,52,8),this.pos+=8},writeBytes:function(c){var a=c.length;this.writeVarint(a),this.realloc(a);for(var b=0;b<a;b++)this.buf[this.pos++]=c[b]},writeRawMessage:function(c,d){this.pos++;var b=this.pos;c(d,this);var a=this.pos-b;a>=128&&hv(b,a,this),this.pos=b-1,this.writeVarint(a),this.pos+=a},writeMessage:function(a,b,c){this.writeTag(a,aD.Bytes),this.writeRawMessage(b,c)},writePackedVarint:function(b,a){a.length&&this.writeMessage(b,hw,a)},writePackedSVarint:function(b,a){a.length&&this.writeMessage(b,hx,a)},writePackedBoolean:function(b,a){a.length&&this.writeMessage(b,hA,a)},writePackedFloat:function(b,a){a.length&&this.writeMessage(b,hy,a)},writePackedDouble:function(b,a){a.length&&this.writeMessage(b,hz,a)},writePackedFixed32:function(b,a){a.length&&this.writeMessage(b,hB,a)},writePackedSFixed32:function(b,a){a.length&&this.writeMessage(b,hC,a)},writePackedFixed64:function(b,a){a.length&&this.writeMessage(b,hD,a)},writePackedSFixed64:function(b,a){a.length&&this.writeMessage(b,hE,a)},writeBytesField:function(a,b){this.writeTag(a,aD.Bytes),this.writeBytes(b)},writeFixed32Field:function(a,b){this.writeTag(a,aD.Fixed32),this.writeFixed32(b)},writeSFixed32Field:function(a,b){this.writeTag(a,aD.Fixed32),this.writeSFixed32(b)},writeFixed64Field:function(a,b){this.writeTag(a,aD.Fixed64),this.writeFixed64(b)},writeSFixed64Field:function(a,b){this.writeTag(a,aD.Fixed64),this.writeSFixed64(b)},writeVarintField:function(a,b){this.writeTag(a,aD.Varint),this.writeVarint(b)},writeSVarintField:function(a,b){this.writeTag(a,aD.Varint),this.writeSVarint(b)},writeStringField:function(a,b){this.writeTag(a,aD.Bytes),this.writeString(b)},writeFloatField:function(a,b){this.writeTag(a,aD.Fixed32),this.writeFloat(b)},writeDoubleField:function(a,b){this.writeTag(a,aD.Fixed64),this.writeDouble(b)},writeBooleanField:function(a,b){this.writeVarintField(a,Boolean(b))}};var bj=function(b,a){var c=a.pixelRatio,d=a.version,e=a.stretchX,f=a.stretchY,g=a.content;this.paddedRect=b,this.pixelRatio=c,this.stretchX=e,this.stretchY=f,this.content=g,this.version=d},aE={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};aE.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},aE.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},aE.tlbr.get=function(){return this.tl.concat(this.br)},aE.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(bj.prototype,aE);var aF=function(g,h){var i={},j={};this.haveRenderCallbacks=[];var k=[];this.addImages(g,i,k),this.addImages(h,j,k);var l=dD(k),b=new aq({width:l.w||1,height:l.h||1});for(var m in g){var n=g[m],o=i[m].paddedRect;aq.copy(n.data,b,{x:0,y:0},{x:o.x+1,y:o.y+1},n.data)}for(var p in h){var a=h[p],q=j[p].paddedRect,c=q.x+1,d=q.y+1,e=a.data.width,f=a.data.height;aq.copy(a.data,b,{x:0,y:0},{x:c,y:d},a.data),aq.copy(a.data,b,{x:0,y:f-1},{x:c,y:d-1},{width:e,height:1}),aq.copy(a.data,b,{x:0,y:0},{x:c,y:d+f},{width:e,height:1}),aq.copy(a.data,b,{x:e-1,y:0},{x:c-1,y:d},{width:1,height:f}),aq.copy(a.data,b,{x:0,y:0},{x:c+e,y:d},{width:1,height:f})}this.image=b,this.iconPositions=i,this.patternPositions=j};aF.prototype.addImages=function(c,e,f){for(var b in c){var a=c[b],d={x:0,y:0,w:a.data.width+2,h:a.data.height+2};f.push(d),e[b]=new bj(d,a),a.hasRenderCallback&&this.haveRenderCallbacks.push(b)}},aF.prototype.patchUpdatedImages=function(a,c){for(var b in a.dispatchRenderCallbacks(this.haveRenderCallbacks),a.updatedImages)this.patchUpdatedImage(this.iconPositions[b],a.getImage(b),c),this.patchUpdatedImage(this.patternPositions[b],a.getImage(b),c)},aF.prototype.patchUpdatedImage=function(a,b,d){if(a&&b&&a.version!==b.version){a.version=b.version;var c=a.tl;d.update(b.data,void 0,{x:c[0],y:c[1]})}},c("ImagePosition",bj),c("ImageAtlas",aF);var dE={horizontal:1,vertical:2,horizontalOnly:3},bU=function(){this.scale=1,this.fontStack="",this.imageName=null};bU.forText=function(b,c){var a=new bU;return a.scale=b||1,a.fontStack=c,a},bU.forImage=function(b){var a=new bU;return a.imageName=b,a};var v=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function hL(y,c,z,d,A,i,B,C,D,e,f,j,E,k,l,F){var b,a=v.fromFeature(y,A);j===dE.vertical&&a.verticalizePunctuation();var o=cZ.processBidirectionalText,p=cZ.processStyledBidirectionalText;if(o&&1===a.sections.length){b=[];for(var m=0,q=o(a.toString(),hR(a,e,i,c,d,k,l));m<q.length;m+=1){var r=q[m],g=new v;g.text=r,g.sections=a.sections;for(var s=0;s<r.length;s++)g.sectionIndex.push(0);b.push(g)}}else if(p){b=[];for(var n=0,t=p(a.text,a.sectionIndex,hR(a,e,i,c,d,k,l));n<t.length;n+=1){var u=t[n],h=new v;h.text=u[0],h.sectionIndex=u[1],h.sections=a.sections,b.push(h)}}else b=function(b,h){for(var c=[],e=b.text,a=0,d=0,f=h;d<f.length;d+=1){var g=f[d];c.push(b.substring(a,g)),a=g}return a<e.length&&c.push(b.substring(a,e.length)),c}(a,hR(a,e,i,c,d,k,l));var w=[],x={positionedLines:w,text:a.toString(),top:f[1],bottom:f[1],left:f[0],right:f[0],writingMode:j,iconsInText:!1,verticalizable:!1};return function(b,Q,R,S,B,r,T,C,U,s,D,V){for(var f=0,h=-17,i=0,t=0,E="right"===C?1:"left"===C?0:.5,u=0,v=0,F=B;v<F.length;v+=1){var c=F[v];c.trim();var j=c.getMaxScale(),G=24*(j-1),w={positionedGlyphs:[],lineOffset:0};b.positionedLines[u]=w;var k=w.positionedGlyphs,l=0;if(c.length()){for(var m=0;m<c.length();m++){var a=c.getSection(m),H=c.getSectionIndex(m),d=c.getCharCode(m),o=0,g=null,p=null,x=null,I=24,n=!(U===dE.horizontal|| !D&&!fS(d)||D&&(hM[d]||(W=d,cV.Arabic(W)||cV["Arabic Supplement"](W)||cV["Arabic Extended-A"](W)||cV["Arabic Presentation Forms-A"](W)||cV["Arabic Presentation Forms-B"](W))));if(a.imageName){var y=S[a.imageName];if(!y)continue;x=a.imageName,b.iconsInText=b.iconsInText||!0,p=y.paddedRect;var e=y.displaySize;a.scale=24*a.scale/V,o=G+(24-e[1]*a.scale),I=(g={width:e[0],height:e[1],left:1,top:-3,advance:n?e[1]:e[0]}).advance;var z=n?e[0]*a.scale-24*j:e[1]*a.scale-24*j;z>0&&z>l&&(l=z)}else{var J=R[a.fontStack],q=J&&J[d];if(q&&q.rect)p=q.rect,g=q.metrics;else{var K=Q[a.fontStack],L=K&&K[d];if(!L)continue;g=L.metrics}o=24*(j-a.scale)}n?(b.verticalizable=!0,k.push({glyph:d,imageName:x,x:f,y:h+o,vertical:n,scale:a.scale,fontStack:a.fontStack,sectionIndex:H,metrics:g,rect:p}),f+=I*a.scale+s):(k.push({glyph:d,imageName:x,x:f,y:h+o,vertical:n,scale:a.scale,fontStack:a.fontStack,sectionIndex:H,metrics:g,rect:p}),f+=g.advance*a.scale+s)}0!==k.length&&(i=Math.max(f-s,i),hS(k,0,k.length-1,E,l)),f=0;var M=r*j+l;w.lineOffset=Math.max(l,G),h+=M,t=Math.max(M,t),++u}else h+=r,++u}var W,A=h- -17,N=dF(T),O=N.horizontalAlign,P=N.verticalAlign;(function(i,j,k,c,l,m,d,n,o){var e,p=(j-k)*l;e=m!==d?-n*c- -17:(-c*o+.5)*d;for(var a=0,f=i;a<f.length;a+=1)for(var b=0,g=f[a].positionedGlyphs;b<g.length;b+=1){var h=g[b];h.x+=p,h.y+=e}})(b.positionedLines,E,O,P,i,t,r,A,B.length),b.top+=-P*A,b.bottom=b.top+A,b.left+=-O*i,b.right=b.left+i}(x,c,z,d,b,B,C,D,j,e,E,F),!function(c){for(var a=0,b=c;a<b.length;a+=1)if(0!==b[a].positionedGlyphs.length)return!1;return!0}(w)&&x}v.fromFeature=function(d,e){for(var a=new v,b=0;b<d.sections.length;b++){var c=d.sections[b];c.image?a.addImageSection(c):a.addTextSection(c,e)}return a},v.prototype.length=function(){return this.text.length},v.prototype.getSection=function(a){return this.sections[this.sectionIndex[a]]},v.prototype.getSectionIndex=function(a){return this.sectionIndex[a]},v.prototype.getCharCode=function(a){return this.text.charCodeAt(a)},v.prototype.verticalizePunctuation=function(){this.text=function(b){for(var c="",a=0;a<b.length;a++){var d=b.charCodeAt(a+1)||null,e=b.charCodeAt(a-1)||null;c+=d&&fT(d)&&!hq[b[a+1]]||e&&fT(e)&&!hq[b[a-1]]||!hq[b[a]]?b[a]:hq[b[a]]}return c}(this.text)},v.prototype.trim=function(){for(var a=0,c=0;c<this.text.length&&hM[this.text.charCodeAt(c)];c++)a++;for(var d=this.text.length,b=this.text.length-1;b>=0&&b>=a&&hM[this.text.charCodeAt(b)];b--)d--;this.text=this.text.substring(a,d),this.sectionIndex=this.sectionIndex.slice(a,d)},v.prototype.substring=function(b,c){var a=new v;return a.text=this.text.substring(b,c),a.sectionIndex=this.sectionIndex.slice(b,c),a.sections=this.sections,a},v.prototype.toString=function(){return this.text},v.prototype.getMaxScale=function(){var a=this;return this.sectionIndex.reduce(function(b,c){return Math.max(b,a.sections[c].scale)},0)},v.prototype.addTextSection=function(a,c){this.text+=a.text,this.sections.push(bU.forText(a.scale,a.fontStack||c));for(var d=this.sections.length-1,b=0;b<a.text.length;++b)this.sectionIndex.push(d)},v.prototype.addImageSection=function(a){var b=a.image?a.image.name:"";if(0!==b.length){var c=this.getNextImageSectionCharCode();c?(this.text+=String.fromCharCode(c),this.sections.push(bU.forImage(b)),this.sectionIndex.push(this.sections.length-1)):b9("Reached maximum number of images 6401")}else b9("Can't add FormattedSection with an empty image.")},v.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var hM={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},s={};function hN(f,a,g,h,b,i){if(a.imageName){var c=h[a.imageName];return c?c.displaySize[0]*a.scale*24/i+b:0}var d=g[a.fontStack],e=d&&d[f];return e?e.metrics.advance*a.scale+b:0}function hO(b,c,d,e){var a=Math.pow(b-c,2);return e?b<c?a/2:2*a:a+Math.abs(d)*d}function hP(b,c,d){var a=0;return 10===b&&(a-=1e4),d&&(a+=150),40!==b&&65288!==b||(a+=50),41!==c&&65289!==c||(a+=50),a}function hQ(k,a,e,l,f,g){for(var h=null,b=hO(a,e,f,g),c=0,i=l;c<i.length;c+=1){var d=i[c],j=hO(a-d.x,e,f,g)+d.badness;j<=b&&(h=d,b=j)}return{index:k,x:a,priorBreak:h,badness:b}}function hR(b,g,n,h,i,o,j){if("point"!==o||!b)return[];for(var a,e=[],k=function(b,d,e,f,g,h){for(var c=0,a=0;a<b.length();a++){var i=b.getSection(a);c+=hN(b.getCharCode(a),i,f,g,d,h)}return c/Math.max(1,Math.ceil(c/e))}(b,g,n,h,i,j),p=b.text.indexOf("\u200B")>=0,f=0,c=0;c<b.length();c++){var l=b.getSection(c),d=b.getCharCode(c);if(hM[d]||(f+=hN(d,l,h,i,g,j)),c<b.length()-1){var m=!((a=d)<11904||!(cV["Bopomofo Extended"](a)||cV.Bopomofo(a)||cV["CJK Compatibility Forms"](a)||cV["CJK Compatibility Ideographs"](a)||cV["CJK Compatibility"](a)||cV["CJK Radicals Supplement"](a)||cV["CJK Strokes"](a)||cV["CJK Symbols and Punctuation"](a)||cV["CJK Unified Ideographs Extension A"](a)||cV["CJK Unified Ideographs"](a)||cV["Enclosed CJK Letters and Months"](a)||cV["Halfwidth and Fullwidth Forms"](a)||cV.Hiragana(a)||cV["Ideographic Description Characters"](a)||cV["Kangxi Radicals"](a)||cV["Katakana Phonet
1ic Extensions"](a)||cV.Katakana(a)||cV["Vertical Forms"](a)||cV["Yi Radicals"](a)||cV["Yi Syllables"](a)));(s[d]||m||l.imageName)&&e.push(hQ(c+1,f,k,e,hP(d,b.getCharCode(c+1),m&&p),!1))}}return function b(a){return a?b(a.priorBreak).concat(a.index):[]}(hQ(b.length(),f,k,e,0,!0))}function dF(c){var a=.5,b=.5;switch(c){case"right":case"top-right":case"bottom-right":a=1;break;case"left":case"top-left":case"bottom-left":a=0}switch(c){case"bottom":case"bottom-right":case"bottom-left":b=1;break;case"top":case"top-right":case"top-left":b=0}return{horizontalAlign:a,verticalAlign:b}}function hS(a,g,c,d,e){if(d||e)for(var f=a[c],h=(a[c].x+f.metrics.advance*f.scale)*d,b=g;b<=c;b++)a[b].x-=h,a[b].y+=e}function hT(r,c,d,e,b,f){var m,a=r.image;if(a.content){var g=a.content,h=a.pixelRatio||1;m=[g[0]/h,g[1]/h,a.displaySize[0]-g[2]/h,a.displaySize[1]-g[3]/h]}var i,j,k,l,n=c.left*f,o=c.right*f;"width"===d||"both"===d?(l=b[0]+n-e[3],j=b[0]+o+e[1]):j=(l=b[0]+(n+o-a.displaySize[0])/2)+a.displaySize[0];var p=c.top*f,q=c.bottom*f;return"height"===d||"both"===d?(i=b[1]+p-e[0],k=b[1]+q+e[2]):k=(i=b[1]+(p+q-a.displaySize[1])/2)+a.displaySize[1],{image:a,top:i,right:j,bottom:k,left:l,collisionPadding:m}}s[10]=!0,s[32]=!0,s[38]=!0,s[40]=!0,s[41]=!0,s[43]=!0,s[45]=!0,s[47]=!0,s[173]=!0,s[183]=!0,s[8203]=!0,s[8208]=!0,s[8211]=!0,s[8231]=!0;var dG=function(b){function a(c,d,e,a){b.call(this,c,d),this.angle=e,void 0!==a&&(this.segment=a)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.clone=function(){return new a(this.x,this.y,this.angle,this.segment)},a}(aY);function dH(e,i){var a=i.expression;if("constant"===a.kind)return{kind:"constant",layoutSize:a.evaluate(new aQ(e+1))};if("source"===a.kind)return{kind:"source"};for(var b=a.zoomStops,h=a.interpolationType,c=0;c<b.length&&b[c]<=e;)c++;for(var d=c=Math.max(0,c-1);d<b.length&&b[d]<e+1;)d++;d=Math.min(b.length-1,d);var f=b[c],g=b[d];return"composite"===a.kind?{kind:"composite",minZoom:f,maxZoom:g,interpolationType:h}:{kind:"camera",minZoom:f,maxZoom:g,minSize:a.evaluate(new aQ(f)),maxSize:a.evaluate(new aQ(g)),interpolationType:h}}function bV(a,b,c){var e=b.uSize,d=c.lowerSize;return"source"===a.kind?d/128:"composite"===a.kind?bu(d/128,c.upperSize/128,b.uSizeT):e}function bW(a,f){var c=0,b=0;if("constant"===a.kind)b=a.layoutSize;else if("source"!==a.kind){var d=a.interpolationType,e=d?b0(D.interpolationFactor(d,f,a.minZoom,a.maxZoom),0,1):0;"camera"===a.kind?b=bu(a.minSize,a.maxSize,e):c=e}return{uSizeT:c,uSize:b}}c("Anchor",dG);var dI=Object.freeze({__proto__:null,getSizeData:dH,evaluateSizeForFeature:bV,evaluateSizeForZoom:bW,SIZE_PACK_FACTOR:128});function hU(b,e,j,l,m){if(void 0===e.segment)return!0;for(var k=e,a=e.segment+1,c=0;c> -j/2;){if(--a<0)return!1;c-=b[a].dist(k),k=b[a]}c+=b[a].dist(b[a+1]),a++;for(var f=[],g=0;c<j/2;){var h=b[a],i=b[a+1];if(!i)return!1;var d=b[a-1].angleTo(h)-h.angleTo(i);for(d=Math.abs((d+3*Math.PI)%(2*Math.PI)-Math.PI),f.push({distance:c,angleDelta:d}),g+=d;c-f[0].distance>l;)g-=f.shift().angleDelta;if(g>m)return!1;a++,c+=h.dist(i)}return!0}function hV(b){for(var c=0,a=0;a<b.length-1;a++)c+=b[a].dist(b[a+1]);return c}function hW(a,b,c){return a?.6*b*c:0}function hX(a,b){return Math.max(a?a.right-a.left:0,b?b.right-b.left:0)}function hY(a,m,h,n,o,i){for(var j=hW(h,o,i),p=hX(h,n)*i,e=0,k=hV(a)/2,b=0;b<a.length-1;b++){var c=a[b],d=a[b+1],f=c.dist(d);if(e+f>k){var l=(k-e)/f,q=bu(c.x,d.x,l),r=bu(c.y,d.y,l),g=new dG(q,r,d.angleTo(c),b);return g._round(),!j||hU(a,g,p,j,m)?g:void 0}e+=f}}function hZ(b,a,k,f,l,g,c,h,d){var m=hW(f,g,c),i=hX(f,l),e=i*c,j=0===b[0].x||b[0].x===d||0===b[0].y||b[0].y===d;return a-e<a/4&&(a=e+a/4),function t(a,u,c,i,p,j,q,v,k){for(var r=j/2,w=hV(a),d=0,e=u-c,f=[],b=0;b<a.length-1;b++){for(var g=a[b],h=a[b+1],l=g.dist(h),x=h.angleTo(g);e+c<d+l;){var s=((e+=c)-d)/l,m=bu(g.x,h.x,s),n=bu(g.y,h.y,s);if(m>=0&&m<k&&n>=0&&n<k&&e-r>=0&&e+r<=w){var o=new dG(m,n,x,b);o._round(),i&&!hU(a,o,j,i,p)||f.push(o)}}d+=l}return v||f.length||q||(f=t(a,d/2,c,i,p,j,q,!0,k)),f}(b,j?a/2*h%a:(i/2+2*g)*c*h%a,a,m,k,e,j,!1,d)}function dJ(k,c,d,e,f){for(var l=[],i=0;i<k.length;i++)for(var j=k[i],g=void 0,h=0;h<j.length-1;h++){var a=j[h],b=j[h+1];a.x<c&&b.x<c||(a.x<c?a=new aY(c,a.y+(c-a.x)/(b.x-a.x)*(b.y-a.y))._round():b.x<c&&(b=new aY(c,a.y+(c-a.x)/(b.x-a.x)*(b.y-a.y))._round()),a.y<d&&b.y<d||(a.y<d?a=new aY(a.x+(d-a.y)/(b.y-a.y)*(b.x-a.x),d)._round():b.y<d&&(b=new aY(a.x+(d-a.y)/(b.y-a.y)*(b.x-a.x),d)._round()),a.x>=e&&b.x>=e||(a.x>=e?a=new aY(e,a.y+(e-a.x)/(b.x-a.x)*(b.y-a.y))._round():b.x>=e&&(b=new aY(e,a.y+(e-a.x)/(b.x-a.x)*(b.y-a.y))._round()),a.y>=f&&b.y>=f||(a.y>=f?a=new aY(a.x+(f-a.y)/(b.y-a.y)*(b.x-a.x),f)._round():b.y>
vendor: 34,485 bytes, line 1
1=f&&(b=new aY(a.x+(f-a.y)/(b.y-a.y)*(b.x-a.x),f)._round()),g&&a.equals(g[g.length-1])||l.push(g=[a]),g.push(b)))))}return l}function h$(c,D,E,o){var h=[],b=c.image,F=b.pixelRatio,i=b.paddedRect.w-2,j=b.paddedRect.h-2,G=c.right-c.left,H=c.bottom-c.top,d=b.stretchX||[[0,i]],e=b.stretchY||[[0,j]],p=function(b,a){return b+a[1]-a[0]},k=d.reduce(p,0),l=e.reduce(p,0),q=i-k,r=j-l,s=0,t=k,u=0,v=l,x=0,y=q,z=0,A=r;if(b.content&&o){var a=b.content;s=h_(d,0,a[0]),u=h_(e,0,a[1]),t=h_(d,a[0],a[2]),v=h_(e,a[1],a[3]),x=a[0]-s,z=a[1]-u,y=a[2]-a[0]-t,A=a[3]-a[1]-v}var w=function(a,d,e,f){var i,j,m,n,o,p,q,r,w,B,C,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ab=(i=a.stretch-s,j=t,m=G,n=c.left,i/j*m+n),an=(o=a.fixed-x,p=y,q=a.stretch,r=k,o-p*q/r),ac=(w=d.stretch-u,B=v,C=H,I=c.top,w/B*C+I),ao=(J=d.fixed-z,K=A,L=d.stretch,M=l,J-K*L/M),ad=(N=e.stretch-s,O=t,P=G,Q=c.left,N/O*P+Q),ap=(R=e.fixed-x,S=y,T=e.stretch,U=k,R-S*T/U),ae=(V=f.stretch-u,W=v,X=H,Y=c.top,V/W*X+Y),aq=(Z=f.fixed-z,$=A,_=f.stretch,aa=l,Z-$*_/aa),af=new aY(ab,ac),ag=new aY(ad,ac),ah=new aY(ad,ae),ai=new aY(ab,ae),ar=new aY(an/F,ao/F),as=new aY(ap/F,aq/F),h=D*Math.PI/180;if(h){var aj=Math.sin(h),ak=Math.cos(h),g=[ak,-aj,aj,ak];af._matMult(g),ag._matMult(g),ai._matMult(g),ah._matMult(g)}var al=a.stretch+a.fixed,am=d.stretch+d.fixed;return{tl:af,tr:ag,bl:ai,br:ah,tex:{x:b.paddedRect.x+1+al,y:b.paddedRect.y+1+am,w:e.stretch+e.fixed-al,h:f.stretch+f.fixed-am},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ar,pixelOffsetBR:as,minFontScaleX:y/F/G,minFontScaleY:A/F/H,isSDF:E}};if(o&&(b.stretchX||b.stretchY))for(var m=h0(d,q,k),n=h0(e,r,l),f=0;f<m.length-1;f++)for(var B=m[f],C=m[f+1],g=0;g<n.length-1;g++)h.push(w(B,n[g],C,n[g+1]));else h.push(w({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:i+1},{fixed:0,stretch:j+1}));return h}function h_(g,b,c){for(var d=0,a=0,e=g;a<e.length;a+=1){var f=e[a];d+=Math.max(b,Math.min(c,f[1]))-Math.max(b,Math.min(c,f[0]))}return d}function h0(g,h,i){for(var a=[{fixed:-1,stretch:0}],c=0,e=g;c<e.length;c+=1){var f=e[c],d=f[0],j=f[1],b=a[a.length-1];a.push({fixed:d-b.stretch,stretch:b.stretch}),a.push({fixed:d-b.stretch,stretch:b.stretch+(j-d)})}return a.push({fixed:h+1,stretch:i}),a}var h1=function(o,q,u,v,w,a,b,l,x,r){if(this.boxStartIndex=o.length,x){var s=a.top,t=a.bottom,p=a.collisionPadding;p&&(s-=p[1],t+=p[3]);var m=t-s;m>0&&(m=Math.max(10,m),this.circleDiameter=m)}else{var c=a.top*b-l,d=a.bottom*b+l,e=a.left*b-l,f=a.right*b+l,g=a.collisionPadding;if(g&&(e-=g[0]*b,c-=g[1]*b,f+=g[2]*b,d+=g[3]*b),r){var h=new aY(e,c),i=new aY(f,c),j=new aY(e,d),k=new aY(f,d),n=r*Math.PI/180;h._rotate(n),i._rotate(n),j._rotate(n),k._rotate(n),e=Math.min(h.x,i.x,j.x,k.x),f=Math.max(h.x,i.x,j.x,k.x),c=Math.min(h.y,i.y,j.y,k.y),d=Math.max(h.y,i.y,j.y,k.y)}o.emplaceBack(q.x,q.y,e,c,f,d,u,v,w)}this.boxEndIndex=o.length},aG=function(a,b){if(void 0===a&&(a=[]),void 0===b&&(b=h2),this.data=a,this.length=this.data.length,this.compare=b,this.length>0)for(var c=(this.length>>1)-1;c>=0;c--)this._down(c)};function h2(a,b){return a<b?-1:a>b?1:0}function h3(e,n,j){void 0===n&&(n=1),void 0===j&&(j=!1);for(var h=1/0,i=1/0,k=-1/0,l=-1/0,r=e[0],f=0;f<r.length;f++){var c=r[f];(!f||c.x<h)&&(h=c.x),(!f||c.y<i)&&(i=c.y),(!f||c.x>k)&&(k=c.x),(!f||c.y>l)&&(l=c.y)}var m=Math.min(k-h,l-i),a=m/2,d=new aG([],h4);if(0===m)return new aY(h,i);for(var o=h;o<k;o+=m)for(var p=i;p<l;p+=m)d.push(new h5(o+a,p+a,a,e));for(var g=function(g){for(var c=0,h=0,i=0,d=g[0],e=0,j=d.length,k=j-1;e<j;k=e++){var a=d[e],b=d[k],f=a.x*b.y-b.x*a.y;h+=(a.x+b.x)*f,i+=(a.y+b.y)*f,c+=3*f}return new h5(h/c,i/c,0,g)}(e),q=d.length;d.length;){var b=d.pop();(b.d>g.d||!g.d)&&(g=b,j&&console.log("found best %d after %d probes",Math.round(1e4*b.d)/1e4,q)),b.max-g.d<=n||(d.push(new h5(b.p.x-(a=b.h/2),b.p.y-a,a,e)),d.push(new h5(b.p.x+a,b.p.y-a,a,e)),d.push(new h5(b.p.x-a,b.p.y+a,a,e)),d.push(new h5(b.p.x+a,b.p.y+a,a,e)),q+=4)}return j&&(console.log("num probes: "+q),console.log("best distance: "+g.d)),g.p}function h4(a,b){return b.max-a.max}function h5(a,b,c,d){this.p=new aY(a,b),this.h=c,this.d=function(b,i){for(var d=!1,e=1/0,f=0;f<i.length;f++)for(var g=i[f],h=0,j=g.length,k=j-1;h<j;k=h++){var a=g[h],c=g[k];a.y>b.y!=c.y>b.y&&b.x<(c.x-a.x)*(b.y-a.y)/(c.y-a.y)+a.x&&(d=!d),e=Math.min(e,gl(b,a,c))}return(d?1:-1)*Math.sqrt(e)}(this.p,d),this.max=this.d+this.h*Math.SQRT2}aG.prototype.push=function(a){this.data.push(a),this.length++,this._up(this.length-1)},aG.prototype.pop=function(){if(0!==this.length){var a=this.data[0],b=this.data.pop();return this.length--,this.length>0&&(this.data[0]=b,this._down(0)),a}},aG.prototype.peek=function(){return this.data[0]},aG.prototype._up=function(a){for(var b=this.data,f=this.compare,c=b[a];a>0;){var d=a-1>>1,e=b[d];if(f(c,e)>=0)break;b[a]=e,a=d}b[a]=c},aG.prototype._down=function(a){for(var b=this.data,f=this.compare,h=this.length>>1,g=b[a];a<h;){var c=1+(a<<1),d=b[c],e=c+1;if(e<this.length&&0>f(b[e],d)&&(c=e,d=b[e]),f(d,g)>=0)break;b[a]=d,a=c}b[a]=g};var h6=Number.POSITIVE_INFINITY;function dK(b,a){return a[1]!==h6?function(e,a,b){var c=0,d=0;switch(a=Math.abs(a),b=Math.abs(b),e){case"top-right":case"top-left":case"top":d=b-7;break;case"bottom-right":case"bottom-left":case"bottom":d=7-b}switch(e){case"top-right":case"bottom-right":case"right":c=-a;break;case"top-left":case"bottom-left":case"left":c=a}return[c,d]}(b,a[0],a[1]):function(e,a){var b=0,c=0;a<0&&(a=0);var d=a/Math.sqrt(2);switch(e){case"top-right":case"top-left":c=d-7;break;case"bottom-right":case"bottom-left":c=7-d;break;case"bottom":c=7-a;break;case"top":c=a-7}switch(e){case"top-right":case"bottom-right":b=-d;break;case"top-left":case"bottom-left":b=d;break;case"left":b=a;break;case"right":b=-a}return[b,c]}(b,a[0])}function dL(a){switch(a){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function h7(a,n,o,p,f,g,b,h,i,q,r,s,t,j,d){var k=function(S,i,w,M,j,N,O,x){for(var k=M.layout.get("text-rotate").evaluate(N,{})*Math.PI/180,y=[],l=0,z=i.positionedLines;l<z.length;l+=1)for(var A=z[l],m=0,B=A.positionedGlyphs;m<B.length;m+=1){var a=B[m];if(a.rect){var n=a.rect||{},o=4,C=!0,p=1,D=0,E=(j||x)&&a.vertical,b=a.metrics.advance*a.scale/2;if(x&&i.verticalizable&&(D=A.lineOffset/2-(a.imageName?-(24-a.metrics.width*a.scale)/2:24*(a.scale-1))),a.imageName){var F=O[a.imageName];C=F.sdf,o=1/(p=F.pixelRatio)}var P=j?[a.x+b,a.y]:[0,0],c=j?[0,0]:[a.x+b+w[0],a.y+w[1]-D],G=[0,0];E&&(G=c,c=[0,0]);var q=(a.metrics.left-o)*a.scale-b+c[0],r=(-a.metrics.top-o)*a.scale+c[1],H=q+n.w*a.scale/p,I=r+n.h*a.scale/p,s=new aY(q,r),t=new aY(H,r),u=new aY(q,I),v=new aY(H,I);if(E){var d=new aY(-b,b- -17),e=-Math.PI/2,J=12-b,f=new aY(22-J,-(a.imageName?J:0)),g=new(Function.prototype.bind.apply(aY,[null].concat(G)));s._rotateAround(e,d)._add(f)._add(g),t._rotateAround(e,d)._add(f)._add(g),u._rotateAround(e,d)._add(f)._add(g),v._rotateAround(e,d)._add(f)._add(g)}if(k){var K=Math.sin(k),L=Math.cos(k),h=[L,-K,K,L];s._matMult(h),t._matMult(h),u._matMult(h),v._matMult(h)}var Q=new aY(0,0),R=new aY(0,0);y.push({tl:s,tr:t,bl:u,br:v,tex:n,writingMode:i.writingMode,glyphOffset:P,sectionIndex:a.sectionIndex,isSDF:C,pixelOffsetTL:Q,pixelOffsetBR:R,minFontScaleX:0,minFontScaleY:0})}}return y}(0,o,h,f,g,b,p,a.allowVerticalPlacement),l=a.textSizeData,c=null;"source"===l.kind?(c=[128*f.layout.get("text-size").evaluate(b,{})])[0]>32640&&b9(a.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===l.kind&&((c=[128*j.compositeTextSizes[0].evaluate(b,{},d),128*j.compositeTextSizes[1].evaluate(b,{},d)])[0]>32640||c[1]>32640)&&b9(a.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),a.addSymbols(a.text,k,c,h,g,b,q,n,i.lineStartIndex,i.lineLength,t,d);for(var e=0,m=r;e<m.length;e+=1)s[m[e]]=a.text.placedSymbolArray.length-1;return 4*k.length}function h8(a){for(var b in a)return a[b];return null}function h9(f,a,g,d){var b=f.compareText;if(a in b){for(var e=b[a],c=e.length-1;c>=0;c--)if(d.dist(e[c])<g)return!0}else b[a]=[];return b[a].push(d),!1}var ia=aC.VectorTileFeature.types,ib=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ic(b,c,d,e,f,g,h,a,i,j,k,l,m){var n=a?Math.min(32640,Math.round(a[0])):0,o=a?Math.min(32640,Math.round(a[1])):0;b.emplaceBack(c,d,Math.round(32*e),Math.round(32*f),g,h,(n<<1)+(i?1:0),o,16*j,16*k,256*l,256*m)}function bX(b,a,c){b.emplaceBack(a.x,a.y,c),b.emplaceBack(a.x,a.y,c),b.emplaceBack(a.x,a.y,c),b.emplaceBack(a.x,a.y,c)}function id(c){for(var a=0,b=c.sections;a<b.length;a+=1)if(fW(b[a].text))return!0;return!1}var aW=function(a){this.layoutVertexArray=new bI,this.indexArray=new ba,this.programConfigurations=a,this.segments=new O,this.dynamicLayoutVertexArray=new bJ,this.opacityVertexArray=new bK,this.placedSymbolArray=new c2};aW.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},aW.prototype.upload=function(a,c,b,d){this.isEmpty()||(b&&(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,hl.members),this.indexBuffer=a.createIndexBuffer(this.indexArray,c),this.dynamicLayoutVertexBuffer=a.createVertexBuffer(this.dynamicLayoutVertexArray,hm.members,!0),this.opacityVertexBuffer=a.createVertexBuffer(this.opacityVertexArray,ib,!0),this.opacityVertexBuffer.itemSize=1),(b||d)&&this.programConfigurations.upload(a))},aW.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},c("SymbolBuffers",aW);var bk=function(a,b,c){this.layoutVertexArray=new a,this.layoutAttributes=b,this.indexArray=new c,this.segments=new O,this.collisionVertexArray=new bM};bk.prototype.upload=function(a){this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=a.createVertexBuffer(this.collisionVertexArray,hn.members,!0)},bk.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},c("CollisionBuffers",bk);var h=function(a){this.collisionBoxArray=a.collisionBoxArray,this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(a){return a.id}),this.index=a.index,this.pixelRatio=a.pixelRatio,this.sourceLayerIndex=a.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=dj([]),this.placementViewportMatrix=dj([]);var d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=dH(this.zoom,d["text-size"]),this.iconSizeData=dH(this.zoom,d["icon-size"]);var b=this.layers[0].layout,e=b.get("symbol-sort-key"),c=b.get("symbol-z-order");this.canOverlap=b.get("text-allow-overlap")||b.get("icon-allow-overlap")||b.get("text-ignore-placement")||b.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==c&& void 0!==e.constantOr(1),this.sortFeaturesByY=("viewport-y"===c||"auto"===c&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===b.get("symbol-placement")&&(this.writingModes=b.get("text-writing-mode").map(function(a){return dE[a]})),this.stateDependentLayerIds=this.layers.filter(function(a){return a.isStateDependent()}).map(function(a){return a.id}),this.sourceID=a.sourceID};h.prototype.createArrays=function(){this.text=new aW(new ao(this.layers,this.zoom,function(a){return/^text/.test(a)})),this.icon=new aW(new ao(this.layers,this.zoom,function(a){return/^icon/.test(a)})),this.glyphOffsetArray=new c5,this.lineVertexArray=new c6,this.symbolInstances=new c4},h.prototype.calculateGlyphDependencies=function(b,c,e,f,g){for(var a=0;a<b.length;a++)if(c[b.charCodeAt(a)]=!0,(e||f)&&g){var d=hq[b.charAt(a)];d&&(c[d.charCodeAt(0)]=!0)}},h.prototype.populate=function(A,k,e){var c=this.layers[0],b=c.layout,l=b.get("text-font"),g=b.get("text-field"),m=b.get("icon-image"),q=("constant"!==g.value.kind||g.value.value instanceof ax&&!g.value.value.isEmpty()||g.value.value.toString().length>0)&&("constant"!==l.value.kind||l.value.value.length>0),r="constant"!==m.value.kind||!!m.value.value||Object.keys(m.parameters).length>0,B=b.get("symbol-sort-key");if(this.features=[],q||r){for(var s=k.iconDependencies,t=k.glyphDependencies,u=k.availableImages,C=new aQ(this.zoom),n=0,v=A;n<v.length;n+=1){var h=v[n],i=h.feature,D=h.id,E=h.index,F=h.sourceLayerIndex,w=c._featureFilter.needGeometry,a=gd(i,w);if(c._featureFilter.filter(C,a,e)){w||(a.geometry=gc(i));var d=void 0;if(q){var G=c.getValueAndResolveTokens("text-field",a,e,u),x=ax.factory(G);id(x)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===cY()||this.hasRTLText&&cZ.isParsed())&&(d=hp(x,c,a))}var f=void 0;if(r){var o=c.getValueAndResolveTokens("icon-image",a,e,u);f=o instanceof aM?o:aM.fromString(o)}if(d||f){var H=this.sortFeaturesByKey?B.evaluate(a,{},e):void 0;if(this.features.push({id:D,text:d,icon:f,index:E,sourceLayerIndex:F,geometry:a.geometry,properties:i.properties,type:ia[i.type],sortKey:H}),f&&(s[f.name]=!0),d){var I=l.evaluate(a,{},e).join(","),J="map"===b.get("text-rotation-alignment")&&"point"!==b.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(dE.vertical)>=0;for(var p=0,y=d.sections;p<y.length;p+=1){var j=y[p];if(j.image)s[j.image.name]=!0;else{var K=fR(d.toString()),z=j.fontStack||I,L=t[z]=t[z]||{};this.calculateGlyphDependencies(j.text,L,J,this.allowVerticalPlacement,K)}}}}}}"line"===b.get("symbol-placement")&&(this.features=function(k){var d={},c={},g=[],l=0;function m(a){g.push(k[a]),l++}function n(b,d,e){var a=c[b];return delete c[b],c[d]=a,g[a].geometry[0].pop(),g[a].geometry[0]=g[a].geometry[0].concat(e[0]),a}function o(c,b,e){var a=d[b];return delete d[b],d[c]=a,g[a].geometry[0].shift(),g[a].geometry[0]=e[0].concat(g[a].geometry[0]),a}function i(c,a,d){var b=d?a[0][a[0].length-1]:a[0][0];return c+":"+b.x+":"+b.y}for(var e=0;e<k.length;e++){var j=k[e],f=j.geometry,h=j.text?j.text.toString():null;if(h){var a=i(h,f),b=i(h,f,!0);if(a in c&&b in d&&c[a]!==d[b]){var p=o(a,b,f),q=n(a,b,g[p].geometry);delete d[a],delete c[b],c[i(h,g[q].geometry,!0)]=q,g[p].geometry=null}else a in c?n(a,b,f):b in d?o(a,b,f):(m(e),d[a]=l-1,c[b]=l-1)}else m(e)}return g.filter(function(a){return a.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(a,b){return a.sortKey-b.sortKey})}},h.prototype.update=function(a,b,c){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(a,b,this.layers,c),this.icon.programConfigurations.updatePaintArrays(a,b,this.layers,c))},h.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},h.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},h.prototype.upload=function(a){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(a),this.iconCollisionBox.upload(a)),this.text.upload(a,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(a,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},h.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},h.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},h.prototype.addToLineVertexArray=function(d,a){var h=this.lineVertexArray.length;if(void 0!==d.segment){for(var i=d.dist(a[d.segment+1]),j=d.dist(a[d.segment]),e={},b=d.segment+1;b<a.length;b++)e[b]={x:a[b].x,y:a[b].y,tileUnitDistanceFromAnchor:i},b<a.length-1&&(i+=a[b+1].dist(a[b]));for(var c=d.segment||0;c>=0;c--)e[c]={x:a[c].x,y:a[c].y,tileUnitDistanceFromAnchor:j},c>0&&(j+=a[c-1].dist(a[c]));for(var f=0;f<a.length;f++){var g=e[f];this.lineVertexArray.emplaceBack(g.x,g.y,g.tileUnitDistanceFromAnchor)}}return{lineStartIndex:h,lineLength:this.lineVertexArray.length-h}},h.prototype.addSymbols=function(e,h,d,s,I,i,t,a,C,D,E,F){for(var r=e.indexArray,f=e.layoutVertexArray,k=e.segments.prepareSegment(4*h.length,f,r,this.canOverlap?i.sortKey:void 0),u=this.glyphOffsetArray.length,G=k.vertexLength,H=this.allowVerticalPlacement&&t===dE.vertical?Math.PI/2:0,v=i.text&&i.text.sections,j=0;j<h.length;j++){var b=h[j],w=b.tl,x=b.tr,y=b.bl,z=b.br,c=b.tex,l=b.pixelOffsetTL,m=b.pixelOffsetBR,n=b.minFontScaleX,o=b.minFontScaleY,A=b.glyphOffset,p=b.isSDF,B=b.sectionIndex,g=k.vertexLength,q=A[1];ic(f,a.x,a.y,w.x,q+w.y,c.x,c.y,d,p,l.x,l.y,n,o),ic(f,a.x,a.y,x.x,q+x.y,c.x+c.w,c.y,d,p,m.x,l.y,n,o),ic(f,a.x,a.y,y.x,q+y.y,c.x,c.y+c.h,d,p,l.x,m.y,n,o),ic(f,a.x,a.y,z.x,q+z.y,c.x+c.w,c.y+c.h,d,p,m.x,m.y,n,o),bX(e.dynamicLayoutVertexArray,a,H),r.emplaceBack(g,g+1,g+2),r.emplaceBack(g+1,g+2,g+3),k.vertexLength+=4,k.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(A[0]),j!==h.length-1&&B===h[j+1].sectionIndex||e.programConfigurations.populatePaintArrays(f.length,i,i.index,{},F,v&&v[B])}e.placedSymbolArray.emplaceBack(a.x,a.y,u,this.glyphOffsetArray.length-u,G,C,D,a.segment,d?d[0]:0,d?d[1]:0,s[0],s[1],t,0,!1,0,E)},h.prototype._addCollisionDebugVertex=function(c,d,a,e,f,b){return d.emplaceBack(0,0),c.emplaceBack(a.x,a.y,e,f,Math.round(b.x),Math.round(b.y))},h.prototype.addCollisionDebugVertices=function(j,k,l,m,b,c,n){var i=b.segments.prepareSegment(4,b.layoutVertexArray,b.indexArray),a=i.vertexLength,d=b.layoutVertexArray,e=b.collisionVertexArray,f=n.anchorX,g=n.anchorY;this._addCollisionDebugVertex(d,e,c,f,g,new aY(j,k)),this._addCollisionDebugVertex(d,e,c,f,g,new aY(l,k)),this._addCollisionDebugVertex(d,e,c,f,g,new aY(l,m)),this._addCollisionDebugVertex(d,e,c,f,g,new aY(j,m)),i.vertexLength+=4;var h=b.indexArray;h.emplaceBack(a,a+1),h.emplaceBack(a+1,a+2),h.emplaceBack(a+2,a+3),h.emplaceBack(a+3,a),i.primitiveLength+=4},h.prototype.addDebugCollisionBoxes=function(c,d,e,f){for(var b=c;b<d;b++){var a=this.collisionBoxArray.get(b);this.addCollisionDebugVertices(a.x1,a.y1,a.x2,a.y2,f?this.textCollisionBox:this.iconCollisionBox,a.anchorPoint,e)}},h.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new bk(bL,ho.members,bN),this.iconCollisionBox=new bk(bL,ho.members,bN);for(var b=0;b<this.symbolInstances.length;b++){var a=this.symbolInstances.get(b);this.addDebugCollisionBoxes(a.textBoxStartIndex,a.textBoxEndIndex,a,!0),this.addDebugCollisionBoxes(a.verticalTextBoxStartIndex,a.verticalTextBoxEndIndex,a,!0),this.addDebugCollisionBoxes(a.iconBoxStartIndex,a.iconBoxEndIndex,a,!1),this.addDebugCollisionBoxes(a.verticalIconBoxStartIndex,a.verticalIconBoxEndIndex,a,!1)}},h.prototype._deserializeCollisionBoxesForSymbol=function(f,k,l,m,n,o,p,q,r){for(var a={},g=k;g<l;g++){var b=f.get(g);a.textBox={x1:b.x1,y1:b.y1,x2:b.x2,y2:b.y2,anchorPointX:b.anchorPointX,anchorPointY:b.anchorPointY},a.textFeatureIndex=b.featureIndex;break}for(var h=m;h<n;h++){var c=f.get(h);a.verticalTextBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},a.verticalTextFeatureIndex=c.featureIndex;break}for(var i=o;i<p;i++){var d=f.get(i);a.iconBox={x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,anchorPointX:d.anchorPointX,anchorPointY:d.anchorPointY},a.iconFeatureIndex=d.featureIndex;break}for(var j=q;j<r;j++){var e=f.get(j);a.verticalIconBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,anchorPointX:e.anchorPointX,anchorPointY:e.anchorPointY},a.verticalIconFeatureIndex=e.featureIndex;break}return a},h.prototype.deserializeCollisionBoxes=function(c){this.collisionArrays=[];for(var b=0;b<this.symbolInstances.length;b++){var a=this.symbolInstances.get(b);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(c,a.textBoxStartIndex,a.textBoxEndIndex,a.verticalTextBoxStartIndex,a.verticalTextBoxEndIndex,a.iconBoxStartIndex,a.iconBoxEndIndex,a.verticalIconBoxStartIndex,a.verticalIconBoxEndIndex))}},h.prototype.hasTextData=function(){return this.text.segments.get().length>0},h.prototype.hasIconData=function(){return this.icon.segments.get().length>0},h.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},h.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},h.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},h.prototype.addIndicesForPlacedSymbol=function(b,d){for(var c=b.placedSymbolArray.get(d),e=c.vertexStartIndex+4*c.numGlyphs,a=c.vertexStartIndex;a<e;a+=4)b.indexArray.emplaceBack(a,a+1,a+2),b.indexArray.emplaceBack(a+1,a+2,a+3)},h.prototype.getSortedSymbolIndexes=function(b){if(this.sortedAngle===b&& void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(b),f=Math.cos(b),g=[],h=[],c=[],a=0;a<this.symbolInstances.length;++a){c.push(a);var d=this.symbolInstances.get(a);g.push(0|Math.round(e*d.anchorX+f*d.anchorY)),h.push(d.featureIndex)}return c.sort(function(a,b){return g[a]-g[b]||h[b]-h[a]}),c},h.prototype.addToSortKeyRanges=function(a,c){var b=this.sortKeyRanges[this.sortKeyRanges.length-1];b&&b.sortKey===c?b.symbolInstanceEnd=a+1:this.sortKeyRanges.push({sortKey:c,symbolInstanceStart:a,symbolInstanceEnd:a+1})},h.prototype.sortFeatures=function(b){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==b&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(b),this.sortedAngle=b,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var c=0,d=this.symbolInstanceIndexes;c<d.length;c+=1){var a=this.symbolInstances.get(d[c]);this.featureSortOrder.push(a.featureIndex),[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach(function(a,b,c){a>=0&&c.indexOf(a)===b&&e.addIndicesForPlacedSymbol(e.text,a)}),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},c("SymbolBucket",h,{omit:["layers","collisionBoxArray","features","compareText"]}),h.MAX_GLYPHS=65535,h.addDynamicAttributes=bX;var dM=new q({"symbol-placement":new e(b.layout_symbol["symbol-placement"]),"symbol-spacing":new e(b.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new e(b.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new f(b.layout_symbol["symbol-sort-key"]),"symbol-z-order":new e(b.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new e(b.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new e(b.layout_symbol["icon-ignore-placement"]),"icon-optional":new e(b.layout_symbol["icon-optional"]),"icon-rotation-alignment":new e(b.layout_symbol["icon-rotation-alignment"]),"icon-size":new f(b.layout_symbol["icon-size"]),"icon-text-fit":new e(b.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new e(b.layout_symbol["icon-text-fit-padding"]),"icon-image":new f(b.layout_symbol["icon-image"]),"icon-rotate":new f(b.layout_symbol["icon-rotate"]),"icon-padding":new e(b.layout_symbol["icon-padding"]),"icon-keep-upright":new e(b.layout_symbol["icon-keep-upright"]),"icon-offset":new f(b.layout_symbol["icon-offset"]),"icon-anchor":new f(b.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new e(b.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new e(b.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new e(b.layout_symbol["text-rotation-alignment"]),"text-field":new f(b.layout_symbol["text-field"]),"text-font":new f(b.layout_symbol["text-font"]),"text-size":new f(b.layout_symbol["text-size"]),"text-max-width":new f(b.layout_symbol["text-max-width"]),"text-line-height":new e(b.layout_symbol["text-line-height"]),"text-letter-spacing":new f(b.layout_symbol["text-letter-spacing"]),"text-justify":new f(b.layout_symbol["text-justify"]),"text-radial-offset":new f(b.layout_symbol["text-radial-offset"]),"text-variable-anchor":new e(b.layout_symbol["text-variable-anchor"]),"text-anchor":new f(b.layout_symbol["text-anchor"]),"text-max-angle":new e(b.layout_symbol["text-max-angle"]),"text-writing-mode":new e(b.layout_symbol["text-writing-mode"]),"text-rotate":new f(b.layout_symbol["text-rotate"]),"text-padding":new e(b.layout_symbol["text-padding"]),"text-keep-upright":new e(b.layout_symbol["text-keep-upright"]),"text-transform":new f(b.layout_symbol["text-transform"]),"text-offset":new f(b.layout_symbol["text-offset"]),"text-allow-overlap":new e(b.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new e(b.layout_symbol["text-ignore-placement"]),"text-optional":new e(b.layout_symbol["text-optional"])}),ie={paint:new q({"icon-opacity":new f(b.paint_symbol["icon-opacity"]),"icon-color":new f(b.paint_symbol["icon-color"]),"icon-halo-color":new f(b.paint_symbol["icon-halo-color"]),"icon-halo-width":new f(b.paint_symbol["icon-halo-width"]),"icon-halo-blur":new f(b.paint_symbol["icon-halo-blur"]),"icon-translate":new e(b.paint_symbol["icon-translate"]),"icon-translate-anchor":new e(b.paint_symbol["icon-translate-anchor"]),"text-opacity":new f(b.paint_symbol["text-opacity"]),"text-color":new f(b.paint_symbol["text-color"],{runtimeType:R,getOverride:function(a){return a.textColor},hasOverride:function(a){return!!a.textColor}}),"text-halo-color":new f(b.paint_symbol["text-halo-color"]),"text-halo-width":new f(b.paint_symbol["text-halo-width"]),"text-halo-blur":new f(b.paint_symbol["text-halo-blur"]),"text-translate":new e(b.paint_symbol["text-translate"]),"text-translate-anchor":new e(b.paint_symbol["text-translate-anchor"])}),layout:dM},aH=function(a){this.type=a.property.overrides?a.property.overrides.runtimeType:ct,this.defaultValue=a};aH.prototype.evaluate=function(a){if(a.formattedSection){var b=this.defaultValue.property.overrides;if(b&&b.hasOverride(a.formattedSection))return b.getOverride(a.formattedSection)}return a.feature&&a.featureState?this.defaultValue.evaluate(a.feature,a.featureState):this.defaultValue.property.specification.default},aH.prototype.eachChild=function(a){this.defaultValue.isConstant()||a(this.defaultValue.value._styleExpression.expression)},aH.prototype.outputDefined=function(){return!1},aH.prototype.serialize=function(){return null},c("FormatSectionOverride",aH,{omit:["defaultValue"]});var dN=function(b){function a(a){b.call(this,a,ie)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.recalculate=function(g,h){if(b.prototype.recalculate.call(this,g,h),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var d=this.layout.get("text-writing-mode");if(d){for(var a=[],c=0,e=d;c<e.length;c+=1){var f=e[c];0>a.indexOf(f)&&a.push(f)}this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},a.prototype.getValueAndResolveTokens=function(b,c,e,f){var g,h,a=this.layout.get(b).evaluate(c,{},e,f),d=this._unevaluatedLayout._values[b];return d.isDataDriven()||fr(d.value)||!a?a:(g=c.properties,(h=a).replace(/{([^{}]+)}/g,function(b,a){return a in g?String(g[a]):""}))},a.prototype.createBucket=function(a){return new h(a)},a.prototype.queryRadius=function(){return 0},a.prototype.queryIntersectsFeature=function(){return!1},a.prototype._setPaintOverrides=function(){for(var c=0,e=ie.paint.overridableProperties;c<e.length;c+=1){var d=e[c];if(a.hasPaintOverride(this.layout,d)){var f,b=this.paint.get(d),h=new aH(b),g=new a0(h,b.property.specification);f="constant"===b.value.kind||"source"===b.value.kind?new a1("source",g):new aO("composite",g,b.value.zoomStops,b.value._interpolationType),this.paint._values[d]=new a5(b.property,f,b.parameters)}}},a.prototype._handleOverridablePaintPropertyUpdate=function(b,c,d){return!(!this.layout||c.isDataDriven()||d.isDataDriven())&&a.hasPaintOverride(this.layout,b)},a.hasPaintOverride=function(c,d){var a=c.get("text-field"),h=ie.paint.properties[d],e=!1,f=function(c){for(var a=0,b=c;a<b.length;a+=1)if(h.overrides&&h.overrides.hasOverride(b[a]))return void(e=!0)};if("constant"===a.value.kind&&a.value.value instanceof ax)f(a.value.value.sections);else if("source"===a.value.kind){var g=function(a){e||(a instanceof T&&eG(a.value)===cv?f(a.value.sections):a instanceof U?f(a.sections):a.eachChild(g))},b=a.value;b._styleExpression&&g(b._styleExpression.expression)}return e},a}(y),ig={paint:new q({"background-color":new e(b.paint_background["background-color"]),"background-pattern":new al(b.paint_background["background-pattern"]),"background-opacity":new e(b.paint_background["background-opacity"])})},dO=function(a){function b(b){a.call(this,b,ig)}return a&&(b.__proto__=a),(b.prototype=Object.create(a&&a.prototype)).constructor=b,b}(y),ih={paint:new q({"raster-opacity":new e(b.paint_raster["raster-opacity"]),"raster-hue-rotate":new e(b.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new e(b.paint_raster["raster-brightness-min"]),"raster-brightness-max":new e(b.paint_raster["raster-brightness-max"]),"raster-saturation":new e(b.paint_raster["raster-saturation"]),"raster-contrast":new e(b.paint_raster["raster-contrast"]),"raster-resampling":new e(b.paint_raster["raster-resampling"]),"raster-fade-duration":new e(b.paint_raster["raster-fade-duration"])})},dP=function(a){function b(b){a.call(this,b,ih)}return a&&(b.__proto__=a),(b.prototype=Object.create(a&&a.prototype)).constructor=b,b}(y),ii=function(b){function a(a){b.call(this,a,{}),this.implementation=a}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},a.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},a.prototype.recalculate=function(){},a.prototype.updateTransitions=function(){},a.prototype.hasTransition=function(){},a.prototype.serialize=function(){},a.prototype.onAdd=function(a){this.implementation.onAdd&&this.implementation.onAdd(a,a.painter.context.gl)},a.prototype.onRemove=function(a){this.implementation.onRemove&&this.implementation.onRemove(a,a.painter.context.gl)},a}(y),ij={circle:dl,heatmap:dp,hillshade:dq,fill:dt,"fill-extrusion":dx,line:dB,symbol:dN,background:dO,raster:dP},ik=j.HTMLImageElement,il=j.HTMLCanvasElement,im=j.HTMLVideoElement,io=j.ImageData,ip=j.ImageBitmap,aI=function(a,b,c,d){this.context=a,this.format=c,this.texture=a.gl.createTexture(),this.update(b,d)};aI.prototype.update=function(b,c,g){var d=b.width,e=b.height,k=!(this.size&&this.size[0]===d&&this.size[1]===e||g),f=this.context,a=f.gl;if(this.useMipmap=Boolean(c&&c.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),f.pixelStoreUnpackFlipY.set(!1),f.pixelStoreUnpack.set(1),f.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!c|| !1!==c.premultiply)),k)this.size=[d,e],b instanceof ik||b instanceof il||b instanceof im||b instanceof io||ip&&b instanceof ip?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,b):a.texImage2D(a.TEXTURE_2D,0,this.format,d,e,0,this.format,a.UNSIGNED_BYTE,b.data);else{var h=g||{x:0,y:0},i=h.x,j=h.y;b instanceof ik||b instanceof il||b instanceof im||b instanceof io||ip&&b instanceof ip?a.texSubImage2D(a.TEXTURE_2D,0,i,j,a.RGBA,a.UNSIGNED_BYTE,b):a.texSubImage2D(a.TEXTURE_2D,0,i,j,d,e,a.RGBA,a.UNSIGNED_BYTE,b.data)}this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},aI.prototype.bind=function(b,c,d){var a=this.context.gl;a.bindTexture(a.TEXTURE_2D,this.texture),d!==a.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(d=a.LINEAR),b!==this.filter&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,b),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,d||b),this.filter=b),c!==this.wrap&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,c),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,c),this.wrap=c)},aI.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},aI.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var bY=function(a){var b=this;this._callback=a,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){b._triggered=!1,b._callback()})};bY.prototype.trigger=function(){var a=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){a._triggered=!1,a._callback()},0))},bY.prototype.remove=function(){delete this._channel,this._callback=function(){}};var ar=function(a,b,c){this.target=a,this.parent=b,this.mapId=c,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},b4(["receive","process"],this),this.invoker=new bY(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=ca()?a:j};function iq(b,c,d){var a=2*Math.PI*6378137/256/Math.pow(2,d);return[b*a-2*Math.PI*6378137/2,c*a-2*Math.PI*6378137/2]}ar.prototype.send=function(e,f,a,g,b){var h=this;void 0===b&&(b=!1);var c=Math.round(1e18*Math.random()).toString(36).substring(0,10);a&&(this.callbacks[c]=a);var d=d1(this.globalScope)?void 0:[];return this.target.postMessage({id:c,type:e,hasCallback:!!a,targetMapId:g,mustQueue:b,sourceMapId:this.mapId,data:fP(f,d)},d),{cancel:function(){a&&delete h.callbacks[c],h.target.postMessage({id:c,type:"<cancel>
1",targetMapId:g,sourceMapId:h.mapId})}}},ar.prototype.receive=function(d){var a=d.data,b=a.id;if(b&&(!a.targetMapId||this.mapId===a.targetMapId)){if("<cancel>"===a.type){delete this.tasks[b];var c=this.cancelCallbacks[b];delete this.cancelCallbacks[b],c&&c()}else ca()||a.mustQueue?(this.tasks[b]=a,this.taskQueue.push(b),this.invoker.trigger()):this.processTask(b,a)}},ar.prototype.process=function(){if(this.taskQueue.length){var a=this.taskQueue.shift(),b=this.tasks[a];delete this.tasks[a],this.taskQueue.length&&this.invoker.trigger(),b&&this.processTask(a,b)}},ar.prototype.processTask=function(c,a){var i=this;if("<response>"===a.type){var d=this.callbacks[c];delete this.callbacks[c],d&&(a.error?d(fQ(a.error)):d(null,fQ(a.data)))}else{var h=!1,j=d1(this.globalScope)?void 0:[],e=a.hasCallback?function(a,b){h=!0,delete i.cancelCallbacks[c],i.target.postMessage({id:c,type:"<response>",sourceMapId:i.mapId,error:a?fP(a):null,data:fP(b,j)},j)}:function(a){h=!0},b=null,f=fQ(a.data);if(this.parent[a.type])b=this.parent[a.type](a.sourceMapId,f,e);else if(this.parent.getWorkerSource){var g=a.type.split(".");b=this.parent.getWorkerSource(a.sourceMapId,g[0],f.source)[g[1]](f,e)}else e(Error("Could not find function "+a.type));!h&&b&&b.cancel&&(this.cancelCallbacks[c]=b.cancel)}},ar.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var o=function(a,b){a&&(b?this.setSouthWest(a).setNorthEast(b):4===a.length?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1]))};o.prototype.setNorthEast=function(a){return this._ne=a instanceof Q?new Q(a.lng,a.lat):Q.convert(a),this},o.prototype.setSouthWest=function(a){return this._sw=a instanceof Q?new Q(a.lng,a.lat):Q.convert(a),this},o.prototype.extend=function(a){var c,b,d=this._sw,e=this._ne;if(a instanceof Q)c=a,b=a;else{if(!(a instanceof o))return Array.isArray(a)?4===a.length||a.every(Array.isArray)?this.extend(o.convert(a)):this.extend(Q.convert(a)):this;if(b=a._ne,!(c=a._sw)||!b)return this}return d||e?(d.lng=Math.min(c.lng,d.lng),d.lat=Math.min(c.lat,d.lat),e.lng=Math.max(b.lng,e.lng),e.lat=Math.max(b.lat,e.lat)):(this._sw=new Q(c.lng,c.lat),this._ne=new Q(b.lng,b.lat)),this},o.prototype.getCenter=function(){return new Q((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},o.prototype.getSouthWest=function(){return this._sw},o.prototype.getNorthEast=function(){return this._ne},o.prototype.getNorthWest=function(){return new Q(this.getWest(),this.getNorth())},o.prototype.getSouthEast=function(){return new Q(this.getEast(),this.getSouth())},o.prototype.getWest=function(){return this._sw.lng},o.prototype.getSouth=function(){return this._sw.lat},o.prototype.getEast=function(){return this._ne.lng},o.prototype.getNorth=function(){return this._ne.lat},o.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},o.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},o.prototype.isEmpty=function(){return!(this._sw&&this._ne)},o.prototype.contains=function(e){var b=Q.convert(e),a=b.lng,c=b.lat,d=this._sw.lng<=a&&a<=this._ne.lng;return this._sw.lng>this._ne.lng&&(d=this._sw.lng>=a&&a>=this._ne.lng),this._sw.lat<=c&&c<=this._ne.lat&&d},o.convert=function(a){return!a||a instanceof o?a:new o(a)};var Q=function(a,b){if(isNaN(a)||isNaN(b))throw Error("Invalid LngLat object: ("+a+", "+b+")");if(this.lng=+a,this.lat=+b,this.lat>90||this.lat< -90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")};Q.prototype.wrap=function(){return new Q(b1(this.lng,-180,180),this.lat)},Q.prototype.toArray=function(){return[this.lng,this.lat]},Q.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Q.prototype.distanceTo=function(b){var a=Math.PI/180,c=this.lat*a,d=b.lat*a,e=Math.sin(c)*Math.sin(d)+Math.cos(c)*Math.cos(d)*Math.cos((b.lng-this.lng)*a);return 6371008.8*Math.acos(Math.min(e,1))},Q.prototype.toBounds=function(a){void 0===a&&(a=0);var b=360*a/40075017,c=b/Math.cos(Math.PI/180*this.lat);return new o(new Q(this.lng-c,this.lat-b),new Q(this.lng+c,this.lat+b))}
vendor: 66,132 bytes, line 1
1,Q.convert=function(a){if(a instanceof Q)return a;if(Array.isArray(a)&&(2===a.length||3===a.length))return new Q(Number(a[0]),Number(a[1]));if(!Array.isArray(a)&&"object"==typeof a&&null!==a)return new Q(Number("lng"in a?a.lng:a.lon),Number(a.lat));throw 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 ir=2*Math.PI*6371008.8;function is(a){return ir*Math.cos(a*Math.PI/180)}function dQ(a){return(180+a)/360}function dR(a){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360}function dS(a,b){return a/is(b)}function it(a){return 360/Math.PI*Math.atan(Math.exp((180-360*a)*Math.PI/180))-90}var aJ=function(b,c,a){void 0===a&&(a=0),this.x=+b,this.y=+c,this.z=+a};aJ.fromLngLat=function(c,a){void 0===a&&(a=0);var b=Q.convert(c);return new aJ(dQ(b.lng),dR(b.lat),dS(a,b.lat))},aJ.prototype.toLngLat=function(){return new Q(360*this.x-180,it(this.y))},aJ.prototype.toAltitude=function(){return this.z*is(it(this.y))},aJ.prototype.meterInMercatorCoordinateUnits=function(){var a;return 1/ir*(1/Math.cos(it(this.y)*Math.PI/180))};var as=function(a,b,c){this.z=a,this.x=b,this.y=c,this.key=iu(0,a,a,b,c)};as.prototype.equals=function(a){return this.z===a.z&&this.x===a.x&&this.y===a.y},as.prototype.url=function(e,g){var f,a,b,c,d,h=(a=this.y,b=this.z,c=iq(256*(f=this.x),256*(a=Math.pow(2,b)-a-1),b),d=iq(256*(f+1),256*(a+1),b),c[0]+","+c[1]+","+d[0]+","+d[1]),i=function(d,e,f){for(var b,c="",a=d;a>0;a--)c+=(e&(b=1<<a-1)?1:0)+(f&b?2:0);return c}(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("tms"===g?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",i).replace("{bbox-epsg-3857}",h)},as.prototype.getTilePoint=function(a){var b=Math.pow(2,this.z);return new aY(8192*(a.x*b-this.x),8192*(a.y*b-this.y))},as.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var dT=function(b,a){this.wrap=b,this.canonical=a,this.key=iu(b,a.z,a.z,a.x,a.y)},t=function(a,b,c,d,e){this.overscaledZ=a,this.wrap=b,this.canonical=new as(c,+d,+e),this.key=iu(b,a,c,d,e)};function iu(a,d,c,e,f){(a*=2)<0&&(a=-1*a-1);var b=1<<c;return(b*b*a+b*f+e).toString(36)+c.toString(36)+d.toString(36)}t.prototype.equals=function(a){return this.overscaledZ===a.overscaledZ&&this.wrap===a.wrap&&this.canonical.equals(a.canonical)},t.prototype.scaledTo=function(a){var b=this.canonical.z-a;return a>this.canonical.z?new t(a,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new t(a,this.wrap,a,this.canonical.x>>b,this.canonical.y>>b)},t.prototype.calculateScaledKey=function(a,b){var c=this.canonical.z-a;return a>this.canonical.z?iu(this.wrap*+b,a,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+b,a,a,this.canonical.x>>c,this.canonical.y>>c)},t.prototype.isChildOf=function(a){if(a.wrap!==this.wrap)return!1;var b=this.canonical.z-a.canonical.z;return 0===a.overscaledZ||a.overscaledZ<this.overscaledZ&&a.canonical.x===this.canonical.x>>b&&a.canonical.y===this.canonical.y>>b},t.prototype.children=function(d){if(this.overscaledZ>=d)return[new t(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var a=this.canonical.z+1,b=2*this.canonical.x,c=2*this.canonical.y;return[new t(a,this.wrap,a,b,c),new t(a,this.wrap,a,b+1,c),new t(a,this.wrap,a,b,c+1),new t(a,this.wrap,a,b+1,c+1)]},t.prototype.isLessThan=function(a){return this.wrap<a.wrap|| !(this.wrap>a.wrap)&&(this.overscaledZ<a.overscaledZ|| !(this.overscaledZ>a.overscaledZ)&&(this.canonical.x<a.canonical.x|| !(this.canonical.x>a.canonical.x)&&this.canonical.y<a.canonical.y))},t.prototype.wrapped=function(){return new t(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},t.prototype.unwrapTo=function(a){return new t(this.overscaledZ,a,this.canonical.z,this.canonical.x,this.canonical.y)},t.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},t.prototype.toUnwrapped=function(){return new dT(this.wrap,this.canonical)},t.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},t.prototype.getTilePoint=function(a){return this.canonical.getTilePoint(new aJ(a.x-this.wrap,a.y))},c("CanonicalTileID",as),c("OverscaledTileID",t,{omit:["posMatrix"]});var G=function(e,c,d){if(this.uid=e,c.height!==c.width)throw RangeError("DEM tiles must be square");if(d&&"mapbox"!==d&&"terrarium"!==d)return b9('"'+d+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=c.height;var a=this.dim=c.height-2;this.data=new Uint32Array(c.data.buffer),this.encoding=d||"mapbox";for(var b=0;b<a;b++)this.data[this._idx(-1,b)]=this.data[this._idx(0,b)],this.data[this._idx(a,b)]=this.data[this._idx(a-1,b)],this.data[this._idx(b,-1)]=this.data[this._idx(b,0)],this.data[this._idx(b,a)]=this.data[this._idx(b,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)]};G.prototype.get=function(c,d){var a=new Uint8Array(this.data.buffer),b=4*this._idx(c,d);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(a[b],a[b+1],a[b+2])},G.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},G.prototype._idx=function(a,b){if(a< -1||a>=this.dim+1||b< -1||b>=this.dim+1)throw RangeError("out of range source coordinates for DEM data");return(b+1)*this.stride+(a+1)},G.prototype._unpackMapbox=function(a,b,c){return(256*a*256+256*b+c)/10-1e4},G.prototype._unpackTerrarium=function(a,b,c){return 256*a+b+c/256-32768},G.prototype.getPixels=function(){return new aq({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},G.prototype.backfillBorder=function(i,a,b){if(this.dim!==i.dim)throw Error("dem dimension mismatch");var e=a*this.dim,f=a*this.dim+this.dim,g=b*this.dim,h=b*this.dim+this.dim;switch(a){case -1:e=f-1;break;case 1:f=e+1}switch(b){case -1:g=h-1;break;case 1:h=g+1}for(var j=-a*this.dim,k=-b*this.dim,c=g;c<h;c++)for(var d=e;d<f;d++)this.data[this._idx(d,c)]=i.data[this._idx(d+j,c+k)]},c("DEMData",G);var bl=function(b){this._stringToNumber={},this._numberToString=[];for(var a=0;a<b.length;a++){var c=b[a];this._stringToNumber[c]=a,this._numberToString[a]=c}};bl.prototype.encode=function(a){return this._stringToNumber[a]},bl.prototype.decode=function(a){return this._numberToString[a]};var bZ=function(a,b,c,d,e){this.type="Feature",this._vectorTileFeature=a,a._z=b,a._x=c,a._y=d,this.properties=a.properties,this.id=e},bm={geometry:{configurable:!0}};bm.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},bm.geometry.set=function(a){this._geometry=a},bZ.prototype.toJSON=function(){var b={geometry:this.geometry};for(var a in this)"_geometry"!==a&&"_vectorTileFeature"!==a&&(b[a]=this[a]);return b},Object.defineProperties(bZ.prototype,bm);var at=function(){this.state={},this.stateChanges={},this.deletedStates={}};at.prototype.updateState=function(a,g,c){var b=String(g);if(this.stateChanges[a]=this.stateChanges[a]||{},this.stateChanges[a][b]=this.stateChanges[a][b]||{},b2(this.stateChanges[a][b],c),null===this.deletedStates[a])for(var d in this.deletedStates[a]={},this.state[a])d!==b&&(this.deletedStates[a][d]=null);else if(this.deletedStates[a]&&null===this.deletedStates[a][b])for(var e in this.deletedStates[a][b]={},this.state[a][b])c[e]||(this.deletedStates[a][b][e]=null);else for(var f in c)this.deletedStates[a]&&this.deletedStates[a][b]&&null===this.deletedStates[a][b][f]&&delete this.deletedStates[a][b][f]},at.prototype.removeFeatureState=function(a,d,c){if(null!==this.deletedStates[a]){var b=String(d);if(this.deletedStates[a]=this.deletedStates[a]||{},c&& void 0!==d)null!==this.deletedStates[a][b]&&(this.deletedStates[a][b]=this.deletedStates[a][b]||{},this.deletedStates[a][b][c]=null);else if(void 0!==d){if(this.stateChanges[a]&&this.stateChanges[a][b])for(c in this.deletedStates[a][b]={},this.stateChanges[a][b])this.deletedStates[a][b][c]=null;else this.deletedStates[a][b]=null}else this.deletedStates[a]=null}},at.prototype.getState=function(a,b){var c=String(b),d=b2({},(this.state[a]||{})[c],(this.stateChanges[a]||{})[c]);if(null===this.deletedStates[a])return{};if(this.deletedStates[a]){var e=this.deletedStates[a][b];if(null===e)return{};for(var f in e)delete d[f]}return d},at.prototype.initializeTileState=function(a,b){a.setFeatureState(this.state,b)},at.prototype.coalesceChanges=function(h,l){var c={};for(var b in this.stateChanges){this.state[b]=this.state[b]||{};var i={};for(var d in this.stateChanges[b])this.state[b][d]||(this.state[b][d]={}),b2(this.state[b][d],this.stateChanges[b][d]),i[d]=this.state[b][d];c[b]=i}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var f={};if(null===this.deletedStates[a])for(var j in this.state[a])f[j]={},this.state[a][j]={};else for(var e in this.deletedStates[a]){if(null===this.deletedStates[a][e])this.state[a][e]={};else for(var g=0,k=Object.keys(this.deletedStates[a][e]);g<k.length;g+=1)delete this.state[a][e][k[g]];f[e]=this.state[a][e]}c[a]=c[a]||{},b2(c[a],f)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(c).length)for(var m in h)h[m].setFeatureState(c,l)};var H=function(a,b){this.tileID=a,this.x=a.canonical.x,this.y=a.canonical.y,this.z=a.canonical.z,this.grid=new a3(8192,16,0),this.grid3D=new a3(8192,16,0),this.featureIndexArray=new c8,this.promoteId=b};function iv(a,b,c,d,e){return b6(a,function(g,f){var a=b instanceof c_?b.get(f):null;return a&&a.evaluate?a.evaluate(c,d,e):a})}function iw(h){for(var b=1/0,c=1/0,d=-1/0,e=-1/0,f=0,g=h;f<g.length;f+=1){var a=g[f];b=Math.min(b,a.x),c=Math.min(c,a.y),d=Math.max(d,a.x),e=Math.max(e,a.y)}return{minX:b,minY:c,maxX:d,maxY:e}}function ix(a,b){return b-a}H.prototype.insert=function(m,e,g,h,i,j){var k=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(g,h,i);for(var l=j?this.grid3D:this.grid,c=0;c<e.length;c++){for(var f=e[c],a=[1/0,1/0,-1/0,-1/0],d=0;d<f.length;d++){var b=f[d];a[0]=Math.min(a[0],b.x),a[1]=Math.min(a[1],b.y),a[2]=Math.max(a[2],b.x),a[3]=Math.max(a[3],b.y)}a[0]<8192&&a[1]<8192&&a[2]>=0&&a[3]>=0&&l.insert(k,a[0],a[1],a[2],a[3])}},H.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new aC.VectorTile(new bT(this.rawTileData)).layers,this.sourceLayerCoder=new bl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},H.prototype.query=function(b,n,o,p){var q=this;this.loadVTLayers();for(var i=b.params||{},j=8192/b.tileSize/b.scale,r=cP(i.filter),k=b.queryGeometry,a=b.queryPadding*j,c=iw(k),e=this.grid.query(c.minX-a,c.minY-a,c.maxX+a,c.maxY+a),d=iw(b.cameraQueryGeometry),l=this.grid3D.query(d.minX-a,d.minY-a,d.maxX+a,d.maxY+a,function(c,d,e,f){return function(a,d,e,f,g){for(var h=0,j=a;h<j.length;h+=1){var b=j[h];if(d<=b.x&&e<=b.y&&f>=b.x&&g>=b.y)return!0}var k=[new aY(d,e),new aY(d,g),new aY(f,g),new aY(f,e)];if(a.length>2){for(var i=0,l=k;i<l.length;i+=1)if(gn(a,l[i]))return!0}for(var c=0;c<a.length-1;c++)if(go(a[c],a[c+1],k))return!0;return!1}(b.cameraQueryGeometry,c-a,d-a,e+a,f+a)}),f=0,h=l;f<h.length;f+=1)e.push(h[f]);e.sort(ix);for(var s,m={},g=0;g<e.length;g++)(function(d){var a=e[d];if(a!==s){s=a;var c=q.featureIndexArray.get(a),f=null;q.loadMatchingFeature(m,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,r,i.layers,i.availableImages,n,o,p,function(a,c,d){return f||(f=gc(a)),c.queryIntersectsFeature(k,a,d,f,q.z,b.transform,j,b.pixelPosMatrix)})}})(g);return m},H.prototype.loadMatchingFeature=function(l,t,u,m,g,e,n,v,w,o,p){var h=this.bucketLayerIDs[t];if(!e||function(b,c){for(var a=0;a<b.length;a++)if(c.indexOf(b[a])>=0)return!0;return!1}(e,h)){var q=this.sourceLayerCoder.decode(u),a=this.vtLayers[q].feature(m);if(g.needGeometry){var x=gd(a,!0);if(!g.filter(new aQ(this.tileID.overscaledZ),x,this.tileID.canonical))return}else if(!g.filter(new aQ(this.tileID.overscaledZ),a))return;for(var i=this.getId(a,q),j=0;j<h.length;j++){var b=h[j];if(!(e&&0>e.indexOf(b))){var c=v[b];if(c){var f={};void 0!==i&&o&&(f=o.getState(c.sourceLayer||"_geojsonTileLayer",i));var d=b2({},w[b]);d.paint=iv(d.paint,c.paint,a,f,n),d.layout=iv(d.layout,c.layout,a,f,n);var r=!p||p(a,c,f);if(r){var s=new bZ(a,this.z,this.x,this.y,i);s.layer=d;var k=l[b];void 0===k&&(k=l[b]=[]),k.push({featureIndex:m,feature:s,intersectionZ:r})}}}}}},H.prototype.lookupSymbolFeatures=function(d,e,f,g,h,i,j,k){var b={};this.loadVTLayers();for(var l=cP(h),a=0,c=d;a<c.length;a+=1)this.loadMatchingFeature(b,f,g,c[a],l,i,j,k,e);return b},H.prototype.hasLayer=function(e){for(var a=0,c=this.bucketLayerIDs;a<c.length;a+=1)for(var b=0,d=c[a];b<d.length;b+=1)if(e===d[b])return!0;return!1},H.prototype.getId=function(b,c){var a=b.id;return this.promoteId&&"boolean"==typeof(a=b.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[c]])&&(a=Number(a)),a},c("FeatureIndex",H,{omit:["rawTileData","sourceLayerCoder"]});var m=function(a,b){this.tileID=a,this.uid=b3(),this.uses=0,this.tileSize=b,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};m.prototype.registerFadeDuration=function(b){var a=b+this.timeAdded;a<cc.now()||this.fadeEndTime&&a<this.fadeEndTime||(this.fadeEndTime=a)},m.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},m.prototype.loadVectorData=function(a,b,f){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",a){for(var g in a.featureIndex&&(this.latestFeatureIndex=a.featureIndex,a.rawTileData?(this.latestRawTileData=a.rawTileData,this.latestFeatureIndex.rawTileData=a.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=a.collisionBoxArray,this.buckets=function(c,d){var a={};if(!d)return a;for(var e=function(){var c=f[b],e=c.layerIds.map(function(a){return d.getLayer(a)}).filter(Boolean);if(0!==e.length){c.layers=e,c.stateDependentLayerIds&&(c.stateDependentLayers=c.stateDependentLayerIds.map(function(a){return e.filter(function(b){return b.id===a})[0]}));for(var g=0,h=e;g<h.length;g+=1)a[h[g].id]=c}},b=0,f=c;b<f.length;b+=1)e();return a}(a.buckets,b.style),this.hasSymbolBuckets=!1,this.buckets){var c=this.buckets[g];if(c instanceof h){if(this.hasSymbolBuckets=!0,!f)break;c.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var i in this.buckets){var d=this.buckets[i];if(d instanceof h&&d.hasRTLText){this.hasRTLText=!0,cZ.isLoading()||cZ.isLoaded()||"deferred"!==cY()||f_();break}}for(var e in this.queryPadding=0,this.buckets){var j=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,b.style.getLayer(e).queryRadius(j))}a.imageAtlas&&(this.imageAtlas=a.imageAtlas),a.glyphAtlasImage&&(this.glyphAtlasImage=a.glyphAtlasImage)}else this.collisionBoxArray=new bP},m.prototype.unloadVectorData=function(){for(var a in this.buckets)this.buckets[a].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},m.prototype.getBucket=function(a){return this.buckets[a.id]},m.prototype.upload=function(a){for(var d in this.buckets){var b=this.buckets[d];b.uploadPending()&&b.upload(a)}var c=a.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new aI(a,this.imageAtlas.image,c.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new aI(a,this.glyphAtlasImage,c.ALPHA),this.glyphAtlasImage=null)},m.prototype.prepare=function(a){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(a,this.imageAtlasTexture)},m.prototype.queryRenderedFeatures=function(a,b,c,d,e,f,g,h,i,j){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:d,cameraQueryGeometry:e,scale:f,tileSize:this.tileSize,pixelPosMatrix:j,transform:h,params:g,queryPadding:this.queryPadding*i},a,b,c):{}},m.prototype.querySourceFeatures=function(n,a){var b=this.latestFeatureIndex;if(b&&b.rawTileData){var h=b.loadVTLayers(),i=a?a.sourceLayer:"",d=h._geojsonTileLayer||h[i];if(d)for(var e=cP(a&&a.filter),f=this.tileID.canonical,j=f.z,k=f.x,l=f.y,o={z:j,x:k,y:l},g=0;g<d.length;g++){var c=d.feature(g);if(e.needGeometry){var p=gd(c,!0);if(!e.filter(new aQ(this.tileID.overscaledZ),p,this.tileID.canonical))continue}else if(!e.filter(new aQ(this.tileID.overscaledZ),c))continue;var q=b.getId(c,i),m=new bZ(c,j,k,l,q);m.tile=o,n.push(m)}}},m.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},m.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},m.prototype.setExpiryData=function(b){var c=this.expirationTime;if(b.cacheControl){var d=d_(b.cacheControl);d["max-age"]&&(this.expirationTime=Date.now()+1e3*d["max-age"])}else b.expires&&(this.expirationTime=new Date(b.expires).getTime());if(this.expirationTime){var e=Date.now(),a=!1;if(this.expirationTime>e)a=!1;else if(c){if(this.expirationTime<c)a=!0;else{var f=this.expirationTime-c;f?this.expirationTime=e+Math.max(f,3e4):a=!0}}else a=!0;a?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},m.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),2147483647)},m.prototype.setFeatureState=function(e,a){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(e).length){var i=this.latestFeatureIndex.loadVTLayers();for(var b in this.buckets)if(a.style.hasLayer(b)){var c=this.buckets[b],f=c.layers[0].sourceLayer||"_geojsonTileLayer",g=i[f],d=e[f];if(g&&d&&0!==Object.keys(d).length){c.update(d,g,this.imageAtlas&&this.imageAtlas.patternPositions||{});var h=a&&a.style&&a.style.getLayer(b);h&&(this.queryPadding=Math.max(this.queryPadding,h.queryRadius(c)))}}}},m.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},m.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<cc.now()},m.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},m.prototype.setHoldDuration=function(a){this.symbolFadeHoldUntil=cc.now()+a},m.prototype.setDependencies=function(d,e){for(var b={},a=0,c=e;a<c.length;a+=1)b[c[a]]=!0;this.dependencies[d]=b},m.prototype.hasDependency=function(f,g){for(var a=0,c=f;a<c.length;a+=1){var d=this.dependencies[c[a]];if(d){for(var b=0,e=g;b<e.length;b+=1)if(d[e[b]])return!0}}return!1};var iy=j.performance,b$=function(a){this._marks={start:[a.url,"start"].join("#"),end:[a.url,"end"].join("#"),measure:a.url.toString()},iy.mark(this._marks.start)};b$.prototype.finish=function(){iy.mark(this._marks.end);var a=iy.getEntriesByName(this._marks.measure);return 0===a.length&&(iy.measure(this._marks.measure,this._marks.start,this._marks.end),a=iy.getEntriesByName(this._marks.measure),iy.clearMarks(this._marks.start),iy.clearMarks(this._marks.end),iy.clearMeasures(this._marks.measure)),a},a.Actor=ar,a.AlphaImage=aB,a.CanonicalTileID=as,a.CollisionBoxArray=bP,a.Color=u,a.DEMData=G,a.DataConstantProperty=e,a.DictionaryCoder=bl,a.EXTENT=8192,a.ErrorEvent=cq,a.EvaluationParameters=aQ,a.Event=bs,a.Evented=B,a.FeatureIndex=H,a.FillBucket=z,a.FillExtrusionBucket=A,a.ImageAtlas=aF,a.ImagePosition=bj,a.LineBucket=p,a.LngLat=Q,a.LngLatBounds=o,a.MercatorCoordinate=aJ,a.ONE_EM=24,a.OverscaledTileID=t,a.Point=aY,a.Point$1=aY,a.Properties=q,a.Protobuf=bT,a.RGBAImage=aq,a.RequestManager=w,a.RequestPerformance=b$,a.ResourceType=br,a.SegmentVector=O,a.SourceFeatureState=at,a.StructArrayLayout1ui2=bg,a.StructArrayLayout2f1f2i16=a9,a.StructArrayLayout2i4=a6,a.StructArrayLayout3ui6=ba,a.StructArrayLayout4i8=a7,a.SymbolBucket=h,a.Texture=aI,a.Tile=m,a.Transitionable=K,a.Uniform1f=db,a.Uniform1i=da,a.Uniform2f=dc,a.Uniform3f=dd,a.Uniform4f=de,a.UniformColor=df,a.UniformMatrix4f=dg,a.UnwrappedTileID=dT,a.ValidationError=cr,a.WritingMode=dE,a.ZoomHistory=bA,a.add=function(a,b,c){return a[0]=b[0]+c[0],a[1]=b[1]+c[1],a[2]=b[2]+c[2],a},a.addDynamicAttributes=bX,a.asyncAll=function(a,c,b){if(!a.length)return b(null,[]);var d=a.length,e=Array(a.length),f=null;a.forEach(function(a,g){c(a,function(a,c){a&&(f=a),e[g]=c,0== --d&&b(f,e)})})},a.bezier=bo,a.bindAll=b4,a.browser=cc,a.cacheEntryPossiblyAdded=function(a){++en>ej&&(a.getActor().send("enforceCacheSizeLimit",ei),en=0)},a.clamp=b0,a.clearTileCache=function(a){var b=j.caches.delete("mapbox-tiles");a&&b.catch(a).then(function(){return a()})},a.clipLine=dJ,a.clone=function(b){var a=new ap(16);return a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a[4]=b[4],a[5]=b[5],a[6]=b[6],a[7]=b[7],a[8]=b[8],a[9]=b[9],a[10]=b[10],a[11]=b[11],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15],a},a.clone$1=b8,a.clone$2=function(b){var a=new ap(3);return a[0]=b[0],a[1]=b[1],a[2]=b[2],a},a.collisionCircleLayout=dC,a.config=cd,a.create=function(){var a=new ap(16);return ap!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[11]=0,a[12]=0,a[13]=0,a[14]=0),a[0]=1,a[5]=1,a[10]=1,a[15]=1,a},a.create$1=function(){var a=new ap(9);return ap!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[5]=0,a[6]=0,a[7]=0),a[0]=1,a[4]=1,a[8]=1,a},a.create$2=function(){var a=new ap(4);return ap!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a},a.createCommonjsModule=aK,a.createExpression=cJ,a.createLayout=n,a.createStyleLayer=function(a){return"custom"===a.type?new ii(a):new ij[a.type](a)},a.cross=function(a,b,c){var d=b[0],e=b[1],f=b[2],g=c[0],h=c[1],i=c[2];return a[0]=e*i-f*h,a[1]=f*g-d*i,a[2]=d*h-e*g,a},a.deepEqual=function d(a,b){if(Array.isArray(a)){if(!Array.isArray(b)||a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(!d(a[c],b[c]))return!1;return!0}if("object"==typeof a&&null!==a&&null!==b){if("object"!=typeof b||Object.keys(a).length!==Object.keys(b).length)return!1;for(var e in a)if(!d(a[e],b[e]))return!1;return!0}return a===b},a.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]},a.dot$1=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]},a.ease=b_,a.emitValidationErrors=cU,a.endsWith=b5,a.enforceCacheSizeLimit=function(a){ek(),eg&&eg.then(function(b){b.keys().then(function(d){for(var c=0;c<d.length-a;c++)b.delete(d[c])})})},a.evaluateSizeForFeature=bV,a.evaluateSizeForZoom=bW,a.evaluateVariableOffset=dK,a.evented=cX,a.extend=b2,a.featureFilter=cP,a.filterObject=b7,a.fromRotation=function(a,b){var c=Math.sin(b),d=Math.cos(b);return a[0]=d,a[1]=c,a[2]=0,a[3]=-c,a[4]=d,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a},a.getAnchorAlignment=dF,a.getAnchorJustification=dL,a.getArrayBuffer=co,a.getImage=cp,a.getJSON=function(a,b){return cn(b2(a,{type:"json"}),b)},a.getRTLTextPluginStatus=cY,a.getReferrer=cm,a.getVideo=function(d,g){var e,a,b=j.document.createElement("video");b.muted=!0,b.onloadstart=function(){g(null,b)};for(var c=0;c<d.length;c++){var f=j.document.createElement("source");e=d[c],a=void 0,(a=j.document.createElement("a")).href=e,(a.protocol!==j.document.location.protocol||a.host!==j.document.location.host)&&(b.crossOrigin="Anonymous"),f.src=d[c],b.appendChild(f)}return{cancel:function(){}}},a.identity=dj,a.invert=function(b,c){var d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],j=c[6],k=c[7],l=c[8],m=c[9],n=c[10],o=c[11],p=c[12],q=c[13],r=c[14],s=c[15],t=d*i-e*h,u=d*j-f*h,v=d*k-g*h,w=e*j-f*i,x=e*k-g*i,y=f*k-g*j,z=l*q-m*p,A=l*r-n*p,B=l*s-o*p,C=m*r-n*q,D=m*s-o*q,E=n*s-o*r,a=t*E-u*D+v*C+w*B-x*A+y*z;return a?(b[0]=(i*E-j*D+k*C)*(a=1/a),b[1]=(f*D-e*E-g*C)*a,b[2]=(q*y-r*x+s*w)*a,b[3]=(n*x-m*y-o*w)*a,b[4]=(j*B-h*E-k*A)*a,b[5]=(d*E-f*B+g*A)*a,b[6]=(r*v-p*y-s*u)*a,b[7]=(l*y-n*v+o*u)*a,b[8]=(h*D-i*B+k*z)*a,b[9]=(e*B-d*D-g*z)*a,b[10]=(p*x-q*v+s*t)*a,b[11]=(m*v-l*x-o*t)*a,b[12]=(i*A-h*C-j*z)*a,b[13]=(d*C-e*A+f*z)*a,b[14]=(q*u-p*w-r*t)*a,b[15]=(l*w-m*u+n*t)*a,b):null},a.isChar=cV,a.isMapboxURL=cf,a.keysDifference=function(c,d){var a=[];for(var b in c)b in d||a.push(b);return a},a.makeRequest=cn,a.mapObject=b6,a.mercatorXfromLng=dQ,a.mercatorYfromLat=dR,a.mercatorZfromAltitude=dS,a.mul=bS,a.multiply=bS,a.mvt=aC,a.nextPowerOfTwo=function(a){return a<=1?1:Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},a.normalize=function(c,a){var d=a[0],e=a[1],f=a[2],b=d*d+e*e+f*f;return b>0&&(b=1/Math.sqrt(b)),c[0]=a[0]*b,c[1]=a[1]*b,c[2]=a[2]*b,c},a.number=bu,a.offscreenCanvasSupported=cj,a.ortho=function(a,b,c,d,e,f,g){var h=1/(b-c),i=1/(d-e),j=1/(f-g);return a[0]=-2*h,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*i,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*j,a[11]=0,a[12]=(b+c)*h,a[13]=(e+d)*i,a[14]=(g+f)*j,a[15]=1,a},a.parseGlyphPBF=function(a){return new bT(a).readFields(hI,[])},a.pbf=bT,a.performSymbolLayout=function(a,o,p,q,r,j,c){a.createArrays(),a.tilePixelRatio=8192/(512*a.overscaling),a.compareText={},a.iconsNeedLinear=!1;var d=a.layers[0].layout,b=a.layers[0]._unevaluatedLayout._values,e={};if("composite"===a.textSizeData.kind){var f=a.textSizeData,k=f.maxZoom;e.compositeTextSizes=[b["text-size"].possiblyEvaluate(new aQ(f.minZoom),c),b["text-size"].possiblyEvaluate(new aQ(k),c)]}if("composite"===a.iconSizeData.kind){var g=a.iconSizeData,l=g.maxZoom;e.compositeIconSizes=[b["icon-size"].possiblyEvaluate(new aQ(g.minZoom),c),b["icon-size"].possiblyEvaluate(new aQ(l),c)]}e.layoutTextSize=b["text-size"].possiblyEvaluate(new aQ(a.zoom+1),c),e.layoutIconSize=b["icon-size"].possiblyEvaluate(new aQ(a.zoom+1),c),e.textMaxSize=b["text-size"].possiblyEvaluate(new aQ(18));for(var s=24*d.get("text-line-height"),t="map"===d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),u=d.get("text-keep-upright"),v=d.get("text-size"),m=function(){var b=n[i],A=d.get("text-font").evaluate(b,{},c).join(","),B=v.evaluate(b,{},c),w=e.layoutTextSize.evaluate(b,{},c),V=e.layoutIconSize.evaluate(b,{},c),f={horizontal:{},vertical:void 0},k=b.text,l=[0,0];if(k){var N=k.toString(),W=24*d.get("text-letter-spacing").evaluate(b,{},c),C=!function(d){for(var a,b=0,c=d;b<c.length;b+=1)if(a=c[b].charCodeAt(0),cV.Arabic(a)||cV["Arabic Supplement"](a)||cV["Arabic Extended-A"](a)||cV["Arabic Presentation Forms-A"](a)||cV["Arabic Presentation Forms-B"](a))return!1;return!0}(N)?0:W,x=d.get("text-anchor").evaluate(b,{},c),D=d.get("text-variable-anchor");if(!D){var O=d.get("text-radial-offset").evaluate(b,{},c);l=O?dK(x,[24*O,h6]):d.get("text-offset").evaluate(b,{},c).map(function(a){return 24*a})}var g=t?"center":d.get("text-justify").evaluate(b,{},c),y=d.get("symbol-placement"),E="point"===y?24*d.get("text-max-width").evaluate(b,{},c):0,P=function(){a.allowVerticalPlacement&&fR(N)&&(f.vertical=hL(k,o,p,r,A,E,s,x,"left",C,l,dE.vertical,!0,y,w,B))};if(!t&&D){for(var Q="auto"===g?D.map(function(a){return dL(a)}):[g],R=!1,F=0;F<Q.length;F++){var z=Q[F];if(!f.horizontal[z]){if(R)f.horizontal[z]=f.horizontal[0];else{var G=hL(k,o,p,r,A,E,s,"center",z,C,l,dE.horizontal,!1,y,w,B);G&&(f.horizontal[z]=G,R=1===G.positionedLines.length)}}}P()}else{"auto"===g&&(g=dL(x));var S=hL(k,o,p,r,A,E,s,x,g,C,l,dE.horizontal,!1,y,w,B);S&&(f.horizontal[g]=S),P(),fR(N)&&t&&u&&(f.vertical=hL(k,o,p,r,A,E,s,x,g,C,l,dE.vertical,!1,y,w,B))}}var H=void 0,T=!1;if(b.icon&&b.icon.name){var j,I,U,J,K,L,m=q[b.icon.name];m&&(H=(j=r[b.icon.name],I=d.get("icon-offset").evaluate(b,{},c),U=d.get("icon-anchor").evaluate(b,{},c),J=dF(U),K=I[0]-j.displaySize[0]*J.horizontalAlign,L=I[1]-j.displaySize[1]*J.verticalAlign,{image:j,top:L,bottom:L+j.displaySize[1],left:K,right:K+j.displaySize[0]}),T=m.sdf,void 0===a.sdfIcons?a.sdfIcons=m.sdf:a.sdfIcons!==m.sdf&&b9("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(m.pixelRatio!==a.pixelRatio||0!==d.get("icon-rotate").constantOr(1))&&(a.iconsNeedLinear=!0))}var M=h8(f.horizontal)||f.vertical;a.iconsInText=!!M&&M.iconsInText,(M||H)&&function(b,c,f,d,S,N,v,O,T,U,P){var i=N.textMaxSize.evaluate(c,{});void 0===i&&(i=v);var Q,a=b.layers[0].layout,w=a.get("icon-offset").evaluate(c,{},P),e=h8(f.horizontal),j=v/24,V=b.tilePixelRatio*j,x=b.tilePixelRatio*i/24,W=b.tilePixelRatio*O,y=b.tilePixelRatio*a.get("symbol-spacing"),X=a.get("text-padding")*b.tilePixelRatio,Y=a.get("icon-padding")*b.tilePixelRatio,z=a.get("text-max-angle")/180*Math.PI,Z="map"===a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement"),$="map"===a.get("icon-rotation-alignment")&&"point"!==a.get("symbol-placement"),A=a.get("symbol-placement"),R=y/2,k=a.get("icon-text-fit");d&&"none"!==k&&(b.allowVerticalPlacement&&f.vertical&&(Q=hT(d,f.vertical,k,a.get("icon-text-fit-padding"),w,j)),e&&(d=hT(d,e,k,a.get("icon-text-fit-padding"),w,j)));var g=function(e,a){a.x<0||a.x>=8192||a.y<0||a.y>=8192||function(a,c,_,i,y,G,r,d,s,o,t,u,z,H,p,I,J,K,L,M,b,v,N,e,aa){var O,j,k,l,m,n=a.addToLineVertexArray(c,_),P=0,Q=0,R=0,S=0,A=-1,B=-1,g={},T=bR(""),C=0,D=0;if(void 0===d._unevaluatedLayout.getValue("text-radial-offset")?(C=(O=d.layout.get("text-offset").evaluate(b,{},e).map(function(a){return 24*a}))[0],D=O[1]):(C=24*d.layout.get("text-radial-offset").evaluate(b,{},e),D=h6),a.allowVerticalPlacement&&i.vertical){var U=d.layout.get("text-rotate").evaluate(b,{},e)+90;l=new h1(s,c,o,t,u,i.vertical,z,H,p,U),r&&(m=new h1(s,c,o,t,u,r,J,K,p,U))}if(y){var E=d.layout.get("icon-rotate").evaluate(b,{}),V="none"!==d.layout.get("icon-text-fit"),W=h$(y,E,N,V),F=r?h$(r,E,N,V):void 0;k=new h1(s,c,o,t,u,y,J,K,!1,E),P=4*W.length;var X=a.iconSizeData,q=null;"source"===X.kind?(q=[128*d.layout.get("icon-size").evaluate(b,{})])[0]>32640&&b9(a.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===X.kind&&((q=[128*v.compositeIconSizes[0].evaluate(b,{},e),128*v.compositeIconSizes[1].evaluate(b,{},e)])[0]>32640||q[1]>32640)&&b9(a.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),a.addSymbols(a.icon,W,q,M,L,b,!1,c,n.lineStartIndex,n.lineLength,-1,e),A=a.icon.placedSymbolArray.length-1,F&&(Q=4*F.length,a.addSymbols(a.icon,F,q,M,L,b,dE.vertical,c,n.lineStartIndex,n.lineLength,-1,e),B=a.icon.placedSymbolArray.length-1)}for(var Y in i.horizontal){var w=i.horizontal[Y];if(!j){T=bR(w.text);var ab=d.layout.get("text-rotate").evaluate(b,{},e);j=new h1(s,c,o,t,u,w,z,H,p,ab)}var Z=1===w.positionedLines.length;if(R+=h7(a,c,w,G,d,p,b,I,n,i.vertical?dE.horizontal:dE.horizontalOnly,Z?Object.keys(i.horizontal):[Y],g,A,v,e),Z)break}i.vertical&&(S+=h7(a,c,i.vertical,G,d,p,b,I,n,dE.vertical,["vertical"],g,B,v,e));var ac=j?j.boxStartIndex:a.collisionBoxArray.length,ad=j?j.boxEndIndex:a.collisionBoxArray.length,ae=l?l.boxStartIndex:a.collisionBoxArray.length,af=l?l.boxEndIndex:a.collisionBoxArray.length,ag=k?k.boxStartIndex:a.collisionBoxArray.length,ah=k?k.boxEndIndex:a.collisionBoxArray.length,ai=m?m.boxStartIndex:a.collisionBoxArray.length,aj=m?m.boxEndIndex:a.collisionBoxArray.length,f=-1,x=function(a,b){return a&&a.circleDiameter?Math.max(a.circleDiameter,b):b};f=x(j,f),f=x(l,f),f=x(k,f);var $=(f=x(m,f))> -1?1:0;$&&(f*=aa/24),a.glyphOffsetArray.length>=h.MAX_GLYPHS&&b9("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&a.addToSortKeyRanges(a.symbolInstances.length,b.sortKey),a.symbolInstances.emplaceBack(c.x,c.y,g.right>=0?g.right:-1,g.center>=0?g.center:-1,g.left>=0?g.left:-1,g.vertical|| -1,A,B,T,ac,ad,ae,af,ag,ah,ai,aj,o,R,S,P,Q,$,0,z,C,D,f)}(b,a,e,f,d,S,Q,b.layers[0],b.collisionBoxArray,c.index,c.sourceLayerIndex,b.index,V,X,Z,T,W,Y,$,w,c,N,U,P,v)};if("line"===A)for(var l=0,B=dJ(c.geometry,0,0,8192,8192);l<B.length;l+=1)for(var C=B[l],m=0,D=hZ(C,y,z,f.vertical||e,d,24,x,b.overscaling,8192);m<D.length;m+=1){var E=D[m];e&&h9(b,e.text,R,E)||g(C,E)}else if("line-center"===A)for(var n=0,F=c.geometry;n<F.length;n+=1){var o=F[n];if(o.length>1){var G=hY(o,z,f.vertical||e,d,24,x);G&&g(o,G)}}else if("Polygon"===c.type)for(var p=0,H=g0(c.geometry,0);p<H.length;p+=1){var I=H[p],J=h3(I,16);g(I[0],new dG(J.x,J.y,0))}else if("LineString"===c.type)for(var q=0,K=c.geometry;q<K.length;q+=1){var r=K[q];g(r,new dG(r[0].x,r[0].y,0))}else if("Point"===c.type)for(var s=0,L=c.geometry;s<L.length;s+=1)for(var t=0,M=L[s];t<M.length;t+=1){var u=M[t];g([u],new dG(u.x,u.y,0))}}(a,b,f,H,q,e,w,V,l,T,c)},i=0,n=a.features;i<n.length;i+=1)m();j&&a.generateCollisionDebugBuffers()},a.perspective=function(a,f,g,c,b){var d,e=1/Math.tan(f/2);return a[0]=e/g,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=e,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[11]=-1,a[12]=0,a[13]=0,a[15]=0,null!=b&&b!==1/0?(a[10]=(b+c)*(d=1/(c-b)),a[14]=2*b*c*d):(a[10]=-1,a[14]=-2*c),a},a.pick=function(c,d){for(var e={},a=0;a<d.length;a++){var b=d[a];b in c&&(e[b]=c[b])}return e},a.plugin=cZ,a.polygonIntersectsPolygon=dh,a.postMapLoadEvent=ci,a.postTurnstileEvent=ch,a.potpack=dD,a.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],a.register=c,a.registerForPluginStateChange=function(a){return a({pluginStatus:fY,pluginURL:fZ}),cX.on("pluginStateChange",a),a},a.renderColorRamp=dn,a.rotate=function(a,b,e){var f=b[0],g=b[1],h=b[2],i=b[3],c=Math.sin(e),d=Math.cos(e);return a[0]=f*d+h*c,a[1]=g*d+i*c,a[2]=-(f*c)+h*d,a[3]=-(g*c)+i*d,a},a.rotateX=function(a,b,e){var c=Math.sin(e),d=Math.cos(e),f=b[4],g=b[5],h=b[6],i=b[7],j=b[8],k=b[9],l=b[10],m=b[11];return b!==a&&(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15]),a[4]=f*d+j*c,a[5]=g*d+k*c,a[6]=h*d+l*c,a[7]=i*d+m*c,a[8]=j*d-f*c,a[9]=k*d-g*c,a[10]=l*d-h*c,a[11]=m*d-i*c,a},a.rotateZ=function(a,b,e){var c=Math.sin(e),d=Math.cos(e),f=b[0],g=b[1],h=b[2],i=b[3],j=b[4],k=b[5],l=b[6],m=b[7];return b!==a&&(a[8]=b[8],a[9]=b[9],a[10]=b[10],a[11]=b[11],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15]),a[0]=f*d+j*c,a[1]=g*d+k*c,a[2]=h*d+l*c,a[3]=i*d+m*c,a[4]=j*d-f*c,a[5]=k*d-g*c,a[6]=l*d-h*c,a[7]=m*d-i*c,a},a.scale=function(a,b,f){var c=f[0],d=f[1],e=f[2];return a[0]=b[0]*c,a[1]=b[1]*c,a[2]=b[2]*c,a[3]=b[3]*c,a[4]=b[4]*d,a[5]=b[5]*d,a[6]=b[6]*d,a[7]=b[7]*d,a[8]=b[8]*e,a[9]=b[9]*e,a[10]=b[10]*e,a[11]=b[11]*e,a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15],a},a.scale$1=function(a,b,c){return a[0]=b[0]*c,a[1]=b[1]*c,a[2]=b[2]*c,a[3]=b[3]*c,a},a.scale$2=function(a,b,c){return a[0]=b[0]*c,a[1]=b[1]*c,a[2]=b[2]*c,a},a.setCacheLimits=function(a,b){ei=a,ej=b},a.setRTLTextPlugin=function(b,c,a){if(void 0===a&&(a=!1),"deferred"===fY||"loading"===fY||"loaded"===fY)throw Error("setRTLTextPlugin cannot be called multiple times.");fZ=cc.resolveURL(b),fY="deferred",fX=c,f$(),a||f_()},a.sphericalToCartesian=function(c){var d=c[0],a=c[1],b=c[2];return a+=90,a*=Math.PI/180,b*=Math.PI/180,{x:d*Math.cos(a)*Math.sin(b),y:d*Math.sin(a)*Math.sin(b),z:d*Math.cos(b)}},a.sqrLen=function(a){var b=a[0],c=a[1];return b*b+c*c},a.styleSpec=b,a.sub=function(a,b,c){return a[0]=b[0]-c[0],a[1]=b[1]-c[1],a[2]=b[2]-c[2],a},a.symbolSize=dI,a.transformMat3=function(b,c,a){var d=c[0],e=c[1],f=c[2];return b[0]=d*a[0]+e*a[3]+f*a[6],b[1]=d*a[1]+e*a[4]+f*a[7],b[2]=d*a[2]+e*a[5]+f*a[8],b},a.transformMat4=dk,a.translate=function(b,a,f){var r,g,h,i,j,k,l,m,n,o,p,q,c=f[0],d=f[1],e=f[2];return a===b?(b[12]=a[0]*c+a[4]*d+a[8]*e+a[12],b[13]=a[1]*c+a[5]*d+a[9]*e+a[13],b[14]=a[2]*c+a[6]*d+a[10]*e+a[14],b[15]=a[3]*c+a[7]*d+a[11]*e+a[15]):(g=a[1],h=a[2],i=a[3],j=a[4],k=a[5],l=a[6],m=a[7],n=a[8],o=a[9],p=a[10],q=a[11],b[0]=r=a[0],b[1]=g,b[2]=h,b[3]=i,b[4]=j,b[5]=k,b[6]=l,b[7]=m,b[8]=n,b[9]=o,b[10]=p,b[11]=q,b[12]=r*c+j*d+n*e+a[12],b[13]=g*c+k*d+o*e+a[13],b[14]=h*c+l*d+p*e+a[14],b[15]=i*c+m*d+q*e+a[15]),b},a.triggerPluginCompletionEvent=cW,a.uniqueId=b3,a.validateCustomStyleLayer=function(a){var b=[],c=a.id;return void 0===c&&b.push({message:"layers."+c+': missing required property "id"'}),void 0===a.render&&b.push({message:"layers."+c+': missing required method "render"'}),a.renderingMode&&"2d"!==a.renderingMode&&"3d"!==a.renderingMode&&b.push({message:"layers."+c+': property "renderingMode" must be either "2d" or "3d"'}),b},a.validateLight=cT,a.validateStyle=aP,a.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},a.vectorTile=aC,a.version="1.13.2",a.warnOnce=b9,a.webpSupported=ce,a.window=j,a.wrap=b1}),a(["./shared"],function(d){function s(a){var c=typeof a;if("number"===c||"boolean"===c||"string"===c||null==a)return JSON.stringify(a);if(Array.isArray(a)){for(var f="[",d=0,g=a;d<g.length;d+=1)f+=s(g[d])+",";return f+"]"}for(var e=Object.keys(a).sort(),h="{",b=0;b<e.length;b++)h+=JSON.stringify(e[b])+":"+s(a[e[b]])+",";return h+"}"}function t(e){for(var b="",a=0,c=d.refProperties;a<c.length;a+=1)b+="/"+s(e[c[a]]);return b}var i=function(a){this.keyCache={},a&&this.replace(a)};i.prototype.replace=function(a){this._layerConfigs={},this._layers={},this.update(a,[])},i.prototype.update=function(q,r){for(var s=this,c=0,j=q;c<j.length;c+=1){var a=j[c];this._layerConfigs[a.id]=a;var k=this._layers[a.id]=d.createStyleLayer(a);k._featureFilter=d.featureFilter(k.filter),this.keyCache[a.id]&&delete this.keyCache[a.id]}for(var e=0,l=r;e<l.length;e+=1){var f=l[e];delete this.keyCache[f],delete this._layerConfigs[f],delete this._layers[f]}this.familiesBySource={};for(var g=0,m=function(b,c){for(var d={},a=0;a<b.length;a++){var e=c&&c[b[a].id]||t(b[a]);c&&(c[b[a].id]=e);var f=d[e];f||(f=d[e]=[]),f.push(b[a])}var g=[];for(var h in d)g.push(d[h]);return g}(d.values(this._layerConfigs),this.keyCache);g<m.length;g+=1){var n=m[g].map(function(a){return s._layers[a.id]}),h=n[0];if("none"!==h.visibility){var o=h.source||"",b=this.familiesBySource[o];b||(b=this.familiesBySource[o]={});var p=h.sourceLayer||"_geojsonTileLayer",i=b[p];i||(i=b[p]=[]),i.push(n)}}};var l=function(c){var e={},f=[];for(var g in c){var h=c[g],q=e[g]={};for(var i in h){var a=h[+i];if(a&&0!==a.bitmap.width&&0!==a.bitmap.height){var j={x:0,y:0,w:a.bitmap.width+2,h:a.bitmap.height+2};f.push(j),q[i]={rect:j,metrics:a.metrics}}}}var k=d.potpack(f),l=new d.AlphaImage({width:k.w||1,height:k.h||1});for(var m in c){var n=c[m];for(var o in n){var b=n[+o];if(b&&0!==b.bitmap.width&&0!==b.bitmap.height){var p=e[m][o].rect;d.AlphaImage.copy(b.bitmap,l,{x:0,y:0},{x:p.x+1,y:p.y+1},b.bitmap)}}}this.image=l,this.positions=e};d.register("GlyphAtlas",l);var m=function(a){this.tileID=new d.OverscaledTileID(a.tileID.overscaledZ,a.tileID.wrap,a.tileID.canonical.z,a.tileID.canonical.x,a.tileID.canonical.y),this.uid=a.uid,this.zoom=a.zoom,this.pixelRatio=a.pixelRatio,this.tileSize=a.tileSize,this.source=a.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=a.showCollisionBoxes,this.collectResourceTiming=!!a.collectResourceTiming,this.returnDependencies=!!a.returnDependencies,this.promoteId=a.promoteId};function u(c,e,f){for(var g=new d.EvaluationParameters(e),a=0,b=c;a<b.length;a+=1)b[a].recalculate(g,f)}function v(a,b){var c=d.getArrayBuffer(a.request,function(c,a,e,f){c?b(c):a&&b(null,{vectorTile:new d.vectorTile.VectorTile(new d.pbf(a)),rawData:a,cacheControl:e,expires:f})});return function(){c.cancel(),b()}}m.prototype.parse=function(i,w,m,j,E){var F=this;this.status="parsing",this.data=i,this.collisionBoxArray=new d.CollisionBoxArray;var x=new d.DictionaryCoder(Object.keys(i.layers).sort()),b=new d.FeatureIndex(this.tileID,this.promoteId);b.bucketLayerIDs=[];var G,y,z,A,B={},e={featureIndex:b,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:m},n=w.familiesBySource[this.source];for(var c in n){var f=i.layers[c];if(f){1===f.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+c+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var o=x.encode(c),p=[],g=0;g<f.length;g++){var q=f.feature(g),C=b.getId(q,c);p.push({feature:q,id:C,index:g,sourceLayerIndex:o})}for(var k=0,r=n[c];k<r.length;k+=1){var h=r[k],a=h[0];a.minzoom&&this.zoom<Math.floor(a.minzoom)||a.maxzoom&&this.zoom>=a.maxzoom||"none"!==a.visibility&&(u(h,this.zoom,m),(B[a.id]=a.createBucket({index:b.bucketLayerIDs.length,layers:h,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source})).populate(p,e,this.tileID.canonical),b.bucketLayerIDs.push(h.map(function(a){return a.id})))}}}var s=d.mapObject(e.glyphDependencies,function(a){return Object.keys(a).map(Number)});Object.keys(s).length?j.send("getGlyphs",{uid:this.uid,stacks:s},function(a,b){G||(G=a,y=b,D.call(F))}):y={};var t=Object.keys(e.iconDependencies);t.length?j.send("getImages",{icons:t,source:this.source,tileID:this.tileID,type:"icons"},function(a,b){G||(G=a,z=b,D.call(F))}):z={};var v=Object.keys(e.patternDependencies);function D(){if(G)return E(G);if(y&&z&&A){var c=new l(y),f=new d.ImageAtlas(z,A);for(var g in B){var a=B[g];a instanceof d.SymbolBucket?(u(a.layers,this.zoom,m),d.performSymbolLayout(a,y,c.positions,z,f.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):a.hasPattern&&(a instanceof d.LineBucket||a instanceof d.FillBucket||a instanceof d.FillExtrusionBucket)&&(u(a.layers,this.zoom,m),a.addFeatures(e,this.tileID.canonical,f.patternPositions))}this.status="done",E(null,{buckets:d.values(B).filter(function(a){return!a.isEmpty()}),featureIndex:b,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:c.image,imageAtlas:f,glyphMap:this.returnDependencies?y:null,iconMap:this.returnDependencies?z:null,glyphPositions:this.returnDependencies?c.positions:null})}}v.length?j.send("getImages",{icons:v,source:this.source,tileID:this.tileID,type:"patterns"},function(a,b){G||(G=a,A=b,D.call(F))}):A={},D.call(this)};var c=function(a,b,c,d){this.actor=a,this.layerIndex=b,this.availableImages=c,this.loadVectorData=d||v,this.loading={},this.loaded={}};c.prototype.loadTile=function(a,e){var f=this,b=a.uid;this.loading||(this.loading={});var g=!!(a&&a.request&&a.request.collectResourceTiming)&&new d.RequestPerformance(a.request),c=this.loading[b]=new m(a);c.abort=this.loadVectorData(a,function(h,a){if(delete f.loading[b],h||!a)return c.status="done",f.loaded[b]=c,e(h);var l=a.rawData,i={};a.expires&&(i.expires=a.expires),a.cacheControl&&(i.cacheControl=a.cacheControl);var k={};if(g){var j=g.finish();j&&(k.resourceTiming=JSON.parse(JSON.stringify(j)))}c.vectorTile=a.vectorTile,c.parse(a.vectorTile,f.layerIndex,f.availableImages,f.actor,function(a,b){if(a||!b)return e(a);e(null,d.extend({rawTileData:l.slice(0)},b,i,k))}),f.loaded=f.loaded||{},f.loaded[b]=c})},c.prototype.reloadTile=function(d,f){var g=this,b=this.loaded,e=d.uid,h=this;if(b&&b[e]){var a=b[e];a.showCollisionBoxes=d.showCollisionBoxes;var c=function(c,d){var b=a.reloadCallback;b&&(delete a.reloadCallback,a.parse(a.vectorTile,h.layerIndex,g.availableImages,h.actor,b)),f(c,d)};"parsing"===a.status?a.reloadCallback=c:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,c):c())}},c.prototype.abortTile=function(c,d){var a=this.loading,b=c.uid;a&&a[b]&&a[b].abort&&(a[b].abort(),delete a[b]),d()},c.prototype.removeTile=function(c,d){var a=this.loaded,b=c.uid;a&&a[b]&&delete a[b],d()};var w=d.window.ImageBitmap,e=function(){this.loaded={}};function x(a,c){if(0!==a.length){y(a[0],c);for(var b=1;b<a.length;b++)y(a[b],!c)}}function y(a,f){for(var d=0,b=0,e=a.length,c=e-1;b<e;c=b++)d+=(a[b][0]-a[c][0])*(a[c][1]+a[b][1]);d>=0!= !!f&&a.reverse()}e.prototype.loadTile=function(a,f){var c=a.uid,g=a.encoding,b=a.rawImageData,h=w&&b instanceof w?this.getImageData(b):b,e=new d.DEMData(c,h,g);this.loaded=this.loaded||{},this.loaded[c]=e,f(null,e)},e.prototype.getImageData=function(a){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(a.width,a.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=a.width,this.offscreenCanvas.height=a.height,this.offscreenCanvasContext.drawImage(a,0,0,a.width,a.height);var b=this.offscreenCanvasContext.getImageData(-1,-1,a.width+2,a.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new d.RGBAImage({width:b.width,height:b.height},b.data)},e.prototype.removeTile=function(c){var a=this.loaded,b=c.uid;a&&a[b]&&delete a[b]};var z=d.vectorTile.VectorTileFeature.prototype.toGeoJSON,j=function(a){this._feature=a,this.extent=d.EXTENT,this.type=a.type,this.properties=a.tags,"id"in a&&!isNaN(a.id)&&(this.id=parseInt(a.id,10))};j.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],a=0,f=this._feature.geometry;a<f.length;a+=1){var g=f[a];e.push([new d.Point$1(g[0],g[1])])}return e}for(var h=[],b=0,i=this._feature.geometry;b<i.length;b+=1){for(var j=[],c=0,k=i[b];c<k.length;c+=1){var l=k[c];j.push(new d.Point$1(l[0],l[1]))}h.push(j)}return h},j.prototype.toGeoJSON=function(a,b,c){return z.call(this,a,b,c)};var n=function(a){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=d.EXTENT,this.length=a.length,this._features=a};n.prototype.feature=function(a){return new j(this._features[a])};var o=d.vectorTile.VectorTileFeature,p=q;function q(a,b){this.options=b||{},this.features=a,this.length=a.length}function f(a,b){this.id="number"==typeof a.id?a.id:void 0,this.type=a.type,this.rawGeometry=1===a.type?[a.geometry]:a.geometry,this.properties=a.tags,this.extent=b||4096}q.prototype.feature=function(a){return new f(this.features[a],this.options.extent)},f.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var b=0;b<e.length;b++){for(var c=e[b],f=[],a=0;a<c.length;a++)f.push(new d.Point$1(c[a][0],c[a][1]));this.geometry.push(f)}return this.geometry},f.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var h=this.geometry,b=1/0,c=-1/0,d=1/0,e=-1/0,f=0;f<h.length;f++)for(var i=h[f],g=0;g<i.length;g++){var a=i[g];b=Math.min(b,a.x),c=Math.max(c,a.x),d=Math.min(d,a.y),e=Math.max(e,a.y)}return[b,d,c,e]},f.prototype.toGeoJSON=o.prototype.toGeoJSON;var g=r;function r(b){var a=new d.pbf;return function(a,b){for(var c in a.layers)b.writeMessage(3,A,a.layers[c])}(b,a),a.finish()}function A(c,b){b.writeVarintField(15,c.version||1),b.writeStringField(1,c.name||""),b.writeVarintField(5,c.extent||4096);var a,d={keys:[],values:[],keycache:{},valuecache:{}};for(a=0;a<c.length;a++)d.feature=c.feature(a),b.writeMessage(2,B,d);var e=d.keys;for(a=0;a<e.length;a++)b.writeStringField(3,e[a]);var f=d.values;for(a=0;a<f.length;a++)b.writeMessage(4,G,f[a])}function B(c,a){var b=c.feature;void 0!==b.id&&a.writeVarintField(1,b.id),a.writeMessage(2,C,c),a.writeVarintField(3,b.type),a.writeMessage(4,F,b)}function C(a,g){var h=a.feature,i=a.keys,j=a.values,k=a.keycache,l=a.valuecache;for(var c in h.properties){var e=k[c];void 0===e&&(i.push(c),k[c]=e=i.length-1),g.writeVarint(e);var b=h.properties[c],d=typeof b;"string"!==d&&"boolean"!==d&&"number"!==d&&(b=JSON.stringify(b));var m=d+":"+b,f=l[m];void 0===f&&(j.push(b),l[m]=f=j.length-1),g.writeVarint(f)}}function D(a,b){return(b<<3)+(7&a)}function E(a){return a<<1^a>>31}function F(f,a){for(var g=f.loadGeometry(),d=f.type,h=0,i=0,n=g.length,e=0;e<n;e++){var b=g[e],j=1;1===d&&(j=b.length),a.writeVarint(D(1,j));for(var k=3===d?b.length-1:b.length,c=0;c<k;c++){1===c&&1!==d&&a.writeVarint(D(2,k-1));var l=b[c].x-h,m=b[c].y-i;a.writeVarint(E(l)),a.writeVarint(E(m)),h+=l,i+=m}3===d&&a.writeVarint(D(7,1))}}function G(a,b){var c=typeof a;"string"===c?b.writeStringField(1,a):"boolean"===c?b.writeBooleanField(7,a):"number"===c&&(a%1!=0?b.writeDoubleField(3,a):a<0?b.writeSVarintField(6,a):b.writeVarintField(5,a))}function H(d,c,a,b){I(d,a,b),I(c,2*a,2*b),I(c,2*a+1,2*b+1)}function I(a,b,c){var d=a[b];a[b]=a[c],a[c]=d}function J(c,d,e,f){var a=c-e,b=d-f;return a*a+b*b}g.fromVectorTileJs=r,g.fromGeojsonVt=function(d,b){b=b||{};var c={};for(var a in d)c[a]=new p(d[a].features,b),c[a].name=a,c[a].version=b.version,c[a].extent=b.extent;return r({layers:c})},g.GeoJSONWrapper=p;var k=function(b,d,e,c,f){void 0===d&&(d=function(a){return a[0]}),void 0===e&&(e=function(a){return a[1]}),void 0===c&&(c=64),void 0===f&&(f=Float64Array),this.nodeSize=c,this.points=b;for(var i=b.length<65536?Uint16Array:Uint32Array,g=this.ids=new i(b.length),h=this.coords=new f(2*b.length),a=0;a<b.length;a++)g[a]=a,h[2*a]=d(b[a]),h[2*a+1]=e(b[a]);!function h(c,d,e,a,b,f){if(!(b-a<=e)){var g=a+b>>1;(function o(g,a,e,b,d,h){for(;d>b;){if(d-b>600){var f=d-b+1,l=e-b+1,m=Math.log(f),j=.5*Math.exp(2*m/3),n=.5*Math.sqrt(m*j*(f-j)/f)*(l-f/2<0?-1:1);o(g,a,e,Math.max(b,Math.floor(e-l*j/f+n)),Math.min(d,Math.floor(e+(f-l)*j/f+n)),h)}var k=a[2*e+h],i=b,c=d;for(H(g,a,b,e),a[2*d+h]>k&&H(g,a,b,d);i<c;){for(H(g,a,i,c),i++,c--;a[2*i+h]<k;)i++;for(;a[2*c+h]>k;)c--}a[2*b+h]===k?H(g,a,b,c):H(g,a,++c,d),c<=e&&(b=c+1),e<=c&&(d=c-1)}})(c,d,g,a,b,f%2),h(c,d,e,a,g-1,f+1),h(c,d,e,g+1,b,f+1)}}(g,h,c,0,g.length-1,0)};k.prototype.range=function(a,b,c,d){return function(i,f,j,k,l,m,q){for(var c,b,a=[0,i.length-1,0],n=[];a.length;){var o=a.pop(),g=a.pop(),h=a.pop();if(g-h<=q)for(var d=h;d<=g;d++)b=f[2*d+1],(c=f[2*d])>=j&&c<=l&&b>=k&&b<=m&&n.push(i[d]);else{var e=Math.floor((h+g)/2);b=f[2*e+1],(c=f[2*e])>=j&&c<=l&&b>=k&&b<=m&&n.push(i[e]);var p=(o+1)%2;(0===o?j<=c:k<=b)&&(a.push(h),a.push(e-1),a.push(p)),(0===o?l>=c:m>=b)&&(a.push(e+1),a.push(g),a.push(p))}}return n}(this.ids,this.coords,a,b,c,d,this.nodeSize)},k.prototype.within=function(a,b,c){return function(j,e,f,g,b,q){for(var a=[0,j.length-1,0],k=[],o=b*b;a.length;){var l=a.pop(),h=a.pop(),i=a.pop();if(h-i<=q)for(var c=i;c<=h;c++)J(e[2*c],e[2*c+1],f,g)<=o&&k.push(j[c]);else{var d=Math.floor((i+h)/2),m=e[2*d],n=e[2*d+1];J(m,n,f,g)<=o&&k.push(j[d]);var p=(l+1)%2;(0===l?f-b<=m:g-b<=n)&&(a.push(i),a.push(d-1),a.push(p)),(0===l?f+b>=m:g+b>=n)&&(a.push(d+1),a.push(h),a.push(p))}}return k}(this.ids,this.coords,a,b,c,this.nodeSize)};var K={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(a){return a}},b=function(a){this.options=R(Object.create(K),a),this.trees=Array(this.options.maxZoom+1)};function L(a,b,c,d,e){return{x:a,y:b,zoom:1/0,id:c,parentId:-1,numPoints:d,properties:e}}function M(b,c){var a=b.geometry.coordinates,d=a[1];return{x:P(a[0]),y:Q(d),zoom:1/0,index:c,parentId:-1}}function N(a){var c,b,d;return{type:"Feature",id:a.id,properties:O(a),geometry:{type:"Point",coordinates:[360*(a.x-.5),(b=(180-360*a.y)*Math.PI/180,360*Math.atan(Math.exp(b))/Math.PI-90)]}}}function O(b){var a=b.numPoints;return R(R({},b.properties),{cluster:!0,cluster_id:b.id,point_count:a,point_count_abbreviated:a>=1e4?Math.round(a/1e3)+"k":a>=1e3?Math.round(a/100)/10+"k":a})}function P(a){return a/360+.5}function Q(c){var b=Math.sin(c*Math.PI/180),a=.5-.25*Math.log((1+b)/(1-b))/Math.PI;return a<0?0:a>1?1:a}function R(a,b){for(var c in b)a[c]=b[c];return a}function S(a){return a.x}function T(a){return a.y}function U(f,g,c,d,h,i){var a=h-c,b=i-d;if(0!==a||0!==b){var e=((f-c)*a+(g-d)*b)/(a*a+b*b);e>1?(c=h,d=i):e>0&&(c+=a*e,d+=b*e)}return(a=f-c)*a+(b=g-d)*b}function V(a,c,d,e){var b={id:void 0===a?null:a,type:c,geometry:d,tags:e,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(d){var b=d.geometry,c=d.type;if("Point"===c||"MultiPoint"===c||"LineString"===c)W(d,b);else if("Polygon"===c||"MultiLineString"===c)for(var a=0;a<b.length;a++)W(d,b[a]);else if("MultiPolygon"===c)for(a=0;a<b.length;a++)for(var e=0;e<b[a].length;e++)W(d,b[a][e])}(b),b}function W(a,c){for(var b=0;b<c.length;b+=3)a.minX=Math.min(a.minX,c[b]),a.minY=Math.min(a.minY,c[b+1]),a.maxX=Math.max(a.maxX,c[b]),a.maxY=Math.max(a.maxY,c[b+1])}function X(i,b,e,j){if(b.geometry){var c=b.geometry.coordinates,f=b.geometry.type,g=Math.pow(e.tolerance/((1<<e.maxZoom)*e.extent),2),d=[],h=b.id;if(e.promoteId?h=b.properties[e.promoteId]:e.generateId&&(h=j||0),"Point"===f)Y(c,d);else if("MultiPoint"===f)for(var a=0;a<c.length;a++)Y(c[a],d);else if("LineString"===f)Z(c,d,g,!1);else if("MultiLineString"===f){if(e.lineMetrics){for(a=0;a<c.length;a++)Z(c[a],d=[],g,!1),i.push(V(h,"LineString",d,b.properties));return}$(c,d,g,!1)}else if("Polygon"===f)$(c,d,g,!0);else{if("MultiPolygon"!==f){if("GeometryCollection"===f){for(a=0;a<b.geometry.geometries.length;a++)X(i,{id:h,geometry:b.geometry.geometries[a],properties:b.properties},e,j);return}throw Error("Input data is not a valid GeoJSON object.")}for(a=0;a<c.length;a++){var k=[];$(c[a],k,g,!0),d.push(k)}}i.push(V(h,f,d,b.properties))}}function Y(b,a){a.push(_(b[0])),a.push(aa(b[1])),a.push(0)}function Z(e,a,j,k){for(var f,g,h=0,b=0;b<e.length;b++){var c=_(e[b][0]),d=aa(e[b][1]);a.push(c),a.push(d),a.push(0),b>0&&(h+=k?(f*d-c*g)/2:Math.sqrt(Math.pow(c-f,2)+Math.pow(d-g,2))),f=c,g=d}var i=a.length-3;a[2]=1,function i(a,b,c,g){for(var d,f=g,l=c-b>>1,j=c-b,m=a[b],n=a[b+1],o=a[c],p=a[c+1],e=b+3;e<c;e+=3){var h=U(a[e],a[e+1],m,n,o,p);if(h>f)d=e,f=h;else if(h===f){var k=Math.abs(e-l);k<j&&(d=e,j=k)}}f>g&&(d-b>3&&i(a,b,d,g),a[d+2]=f,c-d>3&&i(a,d,c,g))}(a,0,i,j),a[i+2]=1,a.size=Math.abs(h),a.start=0,a.end=a.size}function $(b,d,e,f){for(var a=0;a<b.length;a++){var c=[];Z(b[a],c,e,f),d.push(c)}}function _(a){return a/360+.5}function aa(c){var b=Math.sin(c*Math.PI/180),a=.5-.25*Math.log((1+b)/(1-b))/Math.PI;return a<0?0:a>1?1:a}function ab(j,m,e,d,f,n,o,p){if(d/=m,n>=(e/=m)&&o<d)return j;if(o<e||n>=d)return null;for(var i=[],k=0;k<j.length;k++){var c=j[k],h=c.geometry,a=c.type,q=0===f?c.minX:c.minY,r=0===f?c.maxX:c.maxY;if(q>=e&&r<d)i.push(c);else if(!(r<e||q>=d)){var b=[];if("Point"===a||"MultiPoint"===a)ac(h,b,e,d,f);else if("LineString"===a)ad(h,b,e,d,f,!1,p.lineMetrics);else if("MultiLineString"===a)af(h,b,e,d,f,!1);else if("Polygon"===a)af(h,b,e,d,f,!0);else if("MultiPolygon"===a)for(var g=0;g<h.length;g++){var l=[];af(h[g],l,e,d,f,!0),l.length&&b.push(l)}if(b.length){if(p.lineMetrics&&"LineString"===a){for(g=0;g<b.length;g++)i.push(V(c.id,a,b[g],c.tags));continue}"LineString"!==a&&"MultiLineString"!==a||(1===b.length?(a="LineString",b=b[0]):a="MultiLineString"),"Point"!==a&&"MultiPoint"!==a||(a=3===b.length?"Point":"MultiPoint"),i.push(V(c.id,a,b,c.tags))}}}return i.length?i:null}function ac(b,c,e,f,g){for(var a=0;a<b.length;a+=3){var d=b[a+g];d>=e&&d<=f&&(c.push(b[a]),c.push(b[a+1]),c.push(b[a+2]))}}function ad(b,u,e,f,o,v,m){for(var n,g,a=ae(b),p=0===o?ah:ai,q=b.start,h=0;h<b.length-3;h+=3){var c=b[h],d=b[h+1],s=b[h+2],j=b[h+3],k=b[h+4],l=0===o?c:d,r=0===o?j:k,t=!1;m&&(n=Math.sqrt(Math.pow(c-j,2)+Math.pow(d-k,2))),l<e?r>e&&(g=p(a,c,d,j,k,e),m&&(a.start=q+n*g)):l>f?r<f&&(g=p(a,c,d,j,k,f),m&&(a.start=q+n*g)):ag(a,c,d,s),r<e&&l>=e&&(g=p(a,c,d,j,k,e),t=!0),r>f&&l<=f&&(g=p(a,c,d,j,k,f),t=!0),!v&&t&&(m&&(a.end=q+n*g),u.push(a),a=ae(b)),m&&(q+=n)}var i=b.length-3;c=b[i],d=b[i+1],s=b[i+2],(l=0===o?c:d)>=e&&l<=f&&ag(a,c,d,s),i=a.length-3,v&&i>=3&&(a[i]!==a[0]||a[i+1]!==a[1])&&ag(a,a[0],a[1],a[2]),a.length&&u.push(a)}function ae(b){var a=[];return a.size=b.size,a.start=b.start,a.end=b.end,a}function af(b,c,d,e,f,g){for(var a=0;a<b.length;a++)ad(b[a],c,d,e,f,g,!1)}function ag(a,b,c,d){a.push(b),a.push(c),a.push(d)}function ah(a,b,c,f,g,d){var e=(d-b)/(f-b);return a.push(d),a.push(c+(g-c)*e),a.push(1),e}function ai(a,b,c,f,g,d){var e=(d-c)/(g-c);return a.push(b+(f-b)*e),a.push(d),a.push(1),e}function aj(h,e){for(var i=[],f=0;f<h.length;f++){var d,a=h[f],c=a.type;if("Point"===c||"MultiPoint"===c||"LineString"===c)d=ak(a.geometry,e);else if("MultiLineString"===c||"Polygon"===c){d=[];for(var b=0;b<a.geometry.length;b++)d.push(ak(a.geometry[b],e))}else if("MultiPolygon"===c)for(d=[],b=0;b<a.geometry.length;b++){for(var j=[],g=0;g<a.geometry[b].length;g++)j.push(ak(a.geometry[b][g],e));d.push(j)}i.push(V(a.id,c,d,a.tags))}return i}function ak(a,d){var b=[];b.size=a.size,void 0!==a.start&&(b.start=a.start,b.end=a.end);for(var c=0;c<a.length;c+=3)b.push(a[c]+d,a[c+1],a[c+2]);return b}function al(b,g){if(b.transformed)return b;var f,a,d,h=1<<b.z,i=b.x,j=b.y;for(f=0;f<b.features.length;f++){var e=b.features[f],c=e.geometry,l=e.type;if(e.geometry=[],1===l)for(a=0;a<c.length;a+=2)e.geometry.push(am(c[a],c[a+1],g,h,i,j));else for(a=0;a<c.length;a++){var k=[];for(d=0;d<c[a].length;d+=2)k.push(am(c[a][d],c[a][d+1],g,h,i,j));e.geometry.push(k)}}return b.transformed=!0,b}function am(c,d,a,b,e,f){return[Math.round(a*(c*b-e)),Math.round(a*(d*b-f))]}function an(c,e,j,k,d){for(var l=e===d.maxZoom?0:d.tolerance/((1<<e)*d.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:j,y:k,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},b=0;b<c.length;b++){a.numFeatures++,ao(a,c[b],l,d);var f=c[b].minX,g=c[b].minY,h=c[b].maxX,i=c[b].maxY;f<a.minX&&(a.minX=f),g<a.minY&&(a.minY=g),h>a.maxX&&(a.maxX=h),i>a.maxY&&(a.maxY=i)}return a}function ao(f,d,h,m){var b=d.geometry,c=d.type,e=[];if("Point"===c||"MultiPoint"===c)for(var a=0;a<b.length;a+=3)e.push(b[a]),e.push(b[a+1]),f.numPoints++,f.numSimplified++;else if("LineString"===c)ap(e,b,f,h,!1,!1);else if("MultiLineString"===c||"Polygon"===c)for(a=0;a<b.length;a++)ap(e,b[a],f,h,"Polygon"===c,0===a);else if("MultiPolygon"===c)for(var i=0;i<b.length;i++){var j=b[i];for(a=0;a<j.length;a++)ap(e,j[a],f,h,!0,0===a)}if(e.length){var g=d.tags||null;if("LineString"===c&&m.lineMetrics){for(var k in g={},d.tags)g[k]=d.tags[k];g.mapbox_clip_start=b.start/b.size,g.mapbox_clip_end=b.end/b.size}var l={geometry:e,type:"Polygon"===c||"MultiPolygon"===c?3:"LineString"===c||"MultiLineString"===c?2:1,tags:g};null!==d.id&&(l.id=d.id),f.features.push(l)}}function ap(h,a,e,b,f,i){var g=b*b;if(b>0&&a.size<(f?g:b))e.numPoints+=a.length/3;else{for(var d=[],c=0;c<a.length;c+=3)(0===b||a[c+2]>g)&&(e.numSimplified++,d.push(a[c]),d.push(a[c+1])),e.numPoints++;f&&function(b,f){for(var e=0,a=0,c=b.length,d=c-2;a<c;d=a,a+=2)e+=(b[a]-b[d])*(b[a+1]+b[d+1]);if(e>0===f)for(a=0,c=b.length;a<c/2;a+=2){var g=b[a],h=b[a+1];b[a]=b[c-2-a],b[a+1]=b[c-1-a],b[c-2-a]=g,b[c-1-a]=h}}(d,i),h.push(d)}}function h(j,a){var i=(a=this.options=function(a,b){for(var c in b)a[c]=b[c];return a}(Object.create(this.options),a)).debug;if(i&&console.time("preprocess data"),a.maxZoom<0||a.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(a.promoteId&&a.generateId)throw Error("promoteId and generateId cannot be used together.");var d,e,b,c,f,g,h=function(a,d){var c=[];if("FeatureCollection"===a.type)for(var b=0;b<a.features.length;b++)X(c,a.features[b],d,b);else X(c,"Feature"===a.type?a:{geometry:a},d);return c}(j,a);this.tiles={},this.tileCoords=[],i&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",a.indexMaxZoom,a.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(h=(d=h,b=(e=a).buffer/e.extent,c=d,f=ab(d,1,-1-b,b,0,-1,2,e),g=ab(d,1,1-b,2+b,0,-1,2,e),(f||g)&&(c=ab(d,1,-b,1+b,0,-1,2,e)||[],f&&(c=aj(f,1).concat(c)),g&&(c=c.concat(aj(g,-1)))),c)).length&&this.splitTile(h,0,0,0),i&&(h.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 aq(a,b,c){return 32*((1<<a)*c+b)+a}function ar(f,b){var c=f.tileID.canonical;if(!this._geoJSONIndex)return b(null,null);var d=this._geoJSONIndex.getTile(c.z,c.x,c.y);if(!d)return b(null,null);var e=new n(d.features),a=g(e);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),b(null,{vectorTile:e,rawData:a.buffer})}b.prototype.load=function(b){var f=this.options,c=f.log,j=f.minZoom,g=f.maxZoom,h=f.nodeSize;c&&console.time("total time");var i="prepare "+b.length+" points";c&&console.time(i),this.points=b;for(var a=[],d=0;d<b.length;d++)b[d].geometry&&a.push(M(b[d],d));this.trees[g+1]=new k(a,S,T,h,Float32Array),c&&console.timeEnd(i);for(var e=g;e>=j;e--){var l=+Date.now();a=this._cluster(a,e),this.trees[e]=new k(a,S,T,h,Float32Array),c&&console.log("z%d: %d clusters in %dms",e,a.length,+Date.now()-l)}return c&&console.timeEnd("total time"),this},b.prototype.getClusters=function(a,d){var b=((a[0]+180)%360+360)%360-180,e=Math.max(-90,Math.min(90,a[1])),c=180===a[2]?180:((a[2]+180)%360+360)%360-180,f=Math.max(-90,Math.min(90,a[3]));if(a[2]-a[0]>=360)b=-180,c=180;else if(b>c){var l=this.getClusters([b,e,180,f],d),m=this.getClusters([-180,e,c,f],d);return l.concat(m)}for(var i=this.trees[this._limitZoom(d)],j=[],g=0,k=i.range(P(b),Q(f),P(c),Q(e));g<k.length;g+=1){var h=i.points[k[g]];j.push(h.numPoints?N(h):this.points[h.index])}return j},b.prototype.getChildren=function(c){var j=this._getOriginId(c),h=this._getOriginZoom(c),d="No cluster with the specified id.",a=this.trees[h];if(!a)throw Error(d);var e=a.points[j];if(!e)throw Error(d);for(var k=this.options.radius/(this.options.extent*Math.pow(2,h-1)),f=[],g=0,i=a.within(e.x,e.y,k);g<i.length;g+=1){var b=a.points[i[g]];b.parentId===c&&f.push(b.numPoints?N(b):this.points[b.index])}if(0===f.length)throw Error(d);return f},b.prototype.getLeaves=function(d,a,b){var c=[];return this._appendLeaves(c,d,a=a||10,b=b||0,0),c},b.prototype.getTile=function(i,d,e){var b=this.trees[this._limitZoom(i)],a=Math.pow(2,i),j=this.options,c=j.radius/j.extent,g=(e-c)/a,h=(e+1+c)/a,f={features:[]};return this._addTileFeatures(b.range((d-c)/a,g,(d+1+c)/a,h),b.points,d,e,a,f),0===d&&this._addTileFeatures(b.range(1-c/a,g,1,h),b.points,a,e,a,f),d===a-1&&this._addTileFeatures(b.range(0,g,c/a,h),b.points,-1,e,a,f),f.features.length?f:null},b.prototype.getClusterExpansionZoom=function(a){for(var b=this._getOriginZoom(a)-1;b<=this.options.maxZoom;){var c=this.getChildren(a);if(b++,1!==c.length)break;a=c[0].properties.cluster_id}return b},b.prototype._appendLeaves=function(c,i,f,d,a){for(var e=0,g=this.getChildren(i);e<g.length;e+=1){var h=g[e],b=h.properties;if(b&&b.cluster?a+b.point_count<=d?a+=b.point_count:a=this._appendLeaves(c,b.cluster_id,f,d,a):a<d?a++:c.push(h),c.length===f)break}return a},b.prototype._addTileFeatures=function(h,i,j,k,d,l){for(var c=0,e=h;c<e.length;c+=1){var a=i[e[c]],f=a.numPoints,g={type:1,geometry:[[Math.round(this.options.extent*(a.x*d-j)),Math.round(this.options.extent*(a.y*d-k))]],tags:f?O(a):this.points[a.index].properties},b=void 0;f?b=a.id:this.options.generateId?b=a.index:this.points[a.index].id&&(b=this.points[a.index].id),void 0!==b&&(g.id=b),l.features.push(g)}},b.prototype._limitZoom=function(a){return Math.max(this.options.minZoom,Math.min(+a,this.options.maxZoom+1))},b.prototype._cluster=function(r,b){for(var e=[],f=this.options,k=f.reduce,z=f.minPoints,A=f.radius/(f.extent*Math.pow(2,b)),g=0;g<r.length;g++){var a=r[g];if(!(a.zoom<=b)){a.zoom=b;for(var h=this.trees[b+1],l=h.within(a.x,a.y,A),i=a.numPoints||1,d=i,m=0,s=l;m<s.length;m+=1){var t=h.points[s[m]];t.zoom>b&&(d+=t.numPoints||1)}if(d>=z){for(var u=a.x*i,v=a.y*i,j=k&&i>1?this._map(a,!0):null,n=(g<<5)+(b+1)+this.points.length,o=0,w=l;o<w.length;o+=1){var c=h.points[w[o]];if(!(c.zoom<=b)){c.zoom=b;var x=c.numPoints||1;u+=c.x*x,v+=c.y*x,c.parentId=n,k&&(j||(j=this._map(a,!0)),k(j,this._map(c)))}}a.parentId=n,e.push(L(u/d,v/d,n,d,j))}else if(e.push(a),d>1)for(var p=0,y=l;p<y.length;p+=1){var q=h.points[y[p]];q.zoom<=b||(q.zoom=b,e.push(q))}}}return e},b.prototype._getOriginId=function(a){return a-this.points.length>>5},b.prototype._getOriginZoom=function(a){return(a-this.points.length)%32},b.prototype._map=function(a,c){if(a.numPoints)return c?R({},a.properties):a.properties;var d=this.points[a.index].properties,b=this.options.map(d);return c&&b===d?R({},b):b},h.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},h.prototype.splitTile=function(g,c,d,b,m,x,y){for(var f=[g,c,d,b],e=this.options,j=e.debug;f.length;){b=f.pop(),d=f.pop(),c=f.pop(),g=f.pop();var h=1<<c,u=aq(c,d,b),a=this.tiles[u];if(!a&&(j>1&&console.time("creation"),a=this.tiles[u]=an(g,c,d,b,e),this.tileCoords.push({z:c,x:d,y:b}),j)){j>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",c,d,b,a.numFeatures,a.numPoints,a.numSimplified),console.timeEnd("creation"));var v="z"+c;this.stats[v]=(this.stats[v]||0)+1,this.total++}if(a.source=g,m){if(c===e.maxZoom||c===m)continue;var w=1<<m-c;if(d!==Math.floor(x/w)||b!==Math.floor(y/w))continue}else if(c===e.indexMaxZoom||a.numPoints<=e.indexMaxPoints)continue;if(a.source=null,0!==g.length){j>1&&console.time("clipping");var n,o,p,q,k,l,i=.5*e.buffer/e.extent,r=.5-i,s=.5+i,t=1+i;n=o=p=q=null,k=ab(g,h,d-i,d+s,0,a.minX,a.maxX,e),l=ab(g,h,d+r,d+t,0,a.minX,a.maxX,e),g=null,k&&(n=ab(k,h,b-i,b+s,1,a.minY,a.maxY,e),o=ab(k,h,b+r,b+t,1,a.minY,a.maxY,e),k=null),l&&(p=ab(l,h,b-i,b+s,1,a.minY,a.maxY,e),q=ab(l,h,b+r,b+t,1,a.minY,a.maxY,e),l=null),j>1&&console.timeEnd("clipping"),f.push(n||[],c+1,2*d,2*b),f.push(o||[],c+1,2*d,2*b+1),f.push(p||[],c+1,2*d+1,2*b),f.push(q||[],c+1,2*d+1,2*b+1)}}},h.prototype.getTile=function(a,b,g){var k=this.options,l=k.extent,h=k.debug;if(a<0||a>24)return null;var j=1<<a,i=aq(a,b=(b%j+j)%j,g);if(this.tiles[i])return al(this.tiles[i],l);h>1&&console.log("drilling down to z%d-%d-%d",a,b,g);for(var c,d=a,e=b,f=g;!c&&d>0;)d--,e=Math.floor(e/2),f=Math.floor(f/2),c=this.tiles[aq(d,e,f)];return c&&c.source?(h>1&&console.log("found parent tile z%d-%d-%d",d,e,f),h>1&&console.time("drilling down"),this.splitTile(c.source,d,e,f,a,b,g),h>1&&console.timeEnd("drilling down"),this.tiles[i]?al(this.tiles[i],l):null):null};var as=function(c){function a(b,d,e,a){c.call(this,b,d,e,ar),a&&(this.loadGeoJSON=a)}return c&&(a.__proto__=c),(a.prototype=Object.create(c&&c.prototype)).constructor=a,a.prototype.loadData=function(a,b){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=b,this._pendingLoadDataParams=a,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},a.prototype._loadData=function(){var c=this;
1if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,a=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var f=!!(a&&a.request&&a.request.collectResourceTiming)&&new d.RequestPerformance(a.request);this.loadGeoJSON(a,function(j,g){if(j||!g)return e(j);if("object"!=typeof g)return e(Error("Input data given to '"+a.source+"' is not a valid GeoJSON object."));!function e(b,c){var a,d=b&&b.type;if("FeatureCollection"===d)for(a=0;a<b.features.length;a++)e(b.features[a],c);else if("GeometryCollection"===d)for(a=0;a<b.geometries.length;a++)e(b.geometries[a],c);else if("Feature"===d)e(b.geometry,c);else if("Polygon"===d)x(b.coordinates,c);else if("MultiPolygon"===d)for(a=0;a<b.coordinates.length;a++)x(b.coordinates[a],c);return b}(g,!0);try{if(a.filter){var k,l,m=d.createExpression(a.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===m.result)throw Error(m.value.map(function(a){return a.key+": "+a.message}).join(", "));var o=g.features.filter(function(a){return m.value.evaluate({zoom:0},a)});g={type:"FeatureCollection",features:o}}c._geoJSONIndex=a.cluster?new b(function(g){var a=g.superclusterOptions,c=g.clusterProperties;if(!c||!a)return a;for(var j={},k={},o={accumulated:null,zoom:0},p={properties:null},l=Object.keys(c),e=0,h=l;e<h.length;e+=1){var b=h[e],i=c[b],f=i[0],m=d.createExpression(i[1]),n=d.createExpression("string"==typeof f?[f,["accumulated"],["get",b]]:f);j[b]=m.value,k[b]=n.value}return a.map=function(e){p.properties=e;for(var b={},a=0,c=l;a<c.length;a+=1){var d=c[a];b[d]=j[d].evaluate(o,p)}return b},a.reduce=function(c,e){p.properties=e;for(var a=0,d=l;a<d.length;a+=1){var b=d[a];o.accumulated=c[b],c[b]=k[b].evaluate(o,p)}},a}(a)).load(g.features):(k=g,l=a.geojsonVtOptions,new h(k,l))}catch(p){return e(p)}c.loaded={};var i={};if(f){var n=f.finish();n&&(i.resourceTiming={},i.resourceTiming[a.source]=JSON.parse(JSON.stringify(n)))}e(null,i)})}},a.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},a.prototype.reloadTile=function(a,b){var d=this.loaded;return d&&d[a.uid]?c.prototype.reloadTile.call(this,a,b):this.loadTile(a,b)},a.prototype.loadGeoJSON=function(a,b){if(a.request)d.getJSON(a.request,b);else{if("string"!=typeof a.data)return b(Error("Input data given to '"+a.source+"' is not a valid GeoJSON object."));try{return b(null,JSON.parse(a.data))}catch(c){return b(Error("Input data given to '"+a.source+"' is not a valid GeoJSON object."))}}},a.prototype.removeSource=function(b,a){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),a()},a.prototype.getClusterExpansionZoom=function(b,a){try{a(null,this._geoJSONIndex.getClusterExpansionZoom(b.clusterId))}catch(c){a(c)}},a.prototype.getClusterChildren=function(b,a){try{a(null,this._geoJSONIndex.getChildren(b.clusterId))}catch(c){a(c)}},a.prototype.getClusterLeaves=function(a,b){try{b(null,this._geoJSONIndex.getLeaves(a.clusterId,a.limit,a.offset))}catch(c){b(c)}},a}(c),a=function(a){var b=this;this.self=a,this.actor=new d.Actor(a,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:c,geojson:as},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(a,c){if(b.workerSourceTypes[a])throw Error('Worker source with name "'+a+'" already registered.');b.workerSourceTypes[a]=c},this.self.registerRTLTextPlugin=function(a){if(d.plugin.isParsed())throw Error("RTL text plugin already registered.");d.plugin.applyArabicShaping=a.applyArabicShaping,d.plugin.processBidirectionalText=a.processBidirectionalText,d.plugin.processStyledBidirectionalText=a.processStyledBidirectionalText}};return a.prototype.setReferrer=function(b,a){this.referrer=a},a.prototype.setImages=function(a,b,d){for(var e in this.availableImages[a]=b,this.workerSources[a]){var c=this.workerSources[a][e];for(var f in c)c[f].availableImages=b}d()},a.prototype.setLayers=function(a,b,c){this.getLayerIndex(a).replace(b),c()},a.prototype.updateLayers=function(b,a,c){this.getLayerIndex(b).update(a.layers,a.removedIds),c()},a.prototype.loadTile=function(b,a,c){this.getWorkerSource(b,a.type,a.source).loadTile(a,c)},a.prototype.loadDEMTile=function(b,a,c){this.getDEMWorkerSource(b,a.source).loadTile(a,c)},a.prototype.reloadTile=function(b,a,c){this.getWorkerSource(b,a.type,a.source).reloadTile(a,c)},a.prototype.abortTile=function(b,a,c){this.getWorkerSource(b,a.type,a.source).abortTile(a,c)},a.prototype.removeTile=function(b,a,c){this.getWorkerSource(b,a.type,a.source).removeTile(a,c)},a.prototype.removeDEMTile=function(b,a){this.getDEMWorkerSource(b,a.source).removeTile(a)},a.prototype.removeSource=function(b,a,c){if(this.workerSources[b]&&this.workerSources[b][a.type]&&this.workerSources[b][a.type][a.source]){var d=this.workerSources[b][a.type][a.source];delete this.workerSources[b][a.type][a.source],void 0!==d.removeSource?d.removeSource(a,c):c()}},a.prototype.loadWorkerSource=function(d,b,a){try{this.self.importScripts(b.url),a()}catch(c){a(c.toString())}},a.prototype.syncRTLPluginState=function(g,e,b){try{d.plugin.setState(e);var a=d.plugin.getPluginURL();if(d.plugin.isLoaded()&&!d.plugin.isParsed()&&null!=a){this.self.importScripts(a);var c=d.plugin.isParsed();b(c?void 0:Error("RTL Text Plugin failed to import scripts from "+a),c)}}catch(f){b(f.toString())}},a.prototype.getAvailableImages=function(b){var a=this.availableImages[b];return a||(a=[]),a},a.prototype.getLayerIndex=function(b){var a=this.layerIndexes[b];return a||(a=this.layerIndexes[b]=new i),a},a.prototype.getWorkerSource=function(a,b,c){var d=this;
1return this.workerSources[a]||(this.workerSources[a]={}),this.workerSources[a][b]||(this.workerSources[a][b]={}),this.workerSources[a][b][c]||(this.workerSources[a][b][c]=new this.workerSourceTypes[b]({send:function(b,c,e){d.actor.send(b,c,e,a)}},this.getLayerIndex(a),this.getAvailableImages(a))),this.workerSources[a][b][c]},a.prototype.getDEMWorkerSource=function(a,b){return this.demWorkerSources[a]||(this.demWorkerSources[a]={}),this.demWorkerSources[a][b]||(this.demWorkerSources[a][b]=new e),this.demWorkerSources[a][b]},a.prototype.enforceCacheSizeLimit=function(b,a){d.enforceCacheSizeLimit(a)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new a(self)),a}),a(["./shared"],function(a){var ap=a.createCommonjsModule(function(b){function a(a){return!c(a)}function c(c){var b;return"undefined"==typeof window||"undefined"==typeof document?"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 a,b,d=new Blob([""],{type:"text/javascript"}),c=URL.createObjectURL(d);try{b=new Worker(c),a=!0}catch(e){a=!1}return b&&b.terminate(),URL.revokeObjectURL(c),a}()?"insufficient worker support":"Uint8ClampedArray"in window?ArrayBuffer.isView?!function(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d");if(!b)return!1;var c=b.getImageData(0,0,1,1);return c&&c.width===a.width}()?"insufficient Canvas/getImageData support":(void 0===d[b=c&&c.failIfMajorPerformanceCaveat]&&(d[b]=function(g){var f,b,d,c=(f=g,b=document.createElement("canvas"),(d=Object.create(a.webGLContextAttributes)).failIfMajorPerformanceCaveat=f,b.probablySupportsContext?b.probablySupportsContext("webgl",d)||b.probablySupportsContext("experimental-webgl",d):b.supportsContext?b.supportsContext("webgl",d)||b.supportsContext("experimental-webgl",d):b.getContext("webgl",d)||b.getContext("experimental-webgl",d));if(!c)return!1;var e=c.createShader(c.VERTEX_SHADER);return!(!e||c.isContextLost())&&(c.shaderSource(e,"void main() {}"),c.compileShader(e),!0===c.getShaderParameter(e,c.COMPILE_STATUS))}(b)),d[b]?void 0:"insufficient WebGL support"):"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support"}b.exports?b.exports=a:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=a,window.mapboxgl.notSupportedReason=c);var d={};a.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),p={create:function(e,c,d){var b=a.window.document.createElement(e);return void 0!==c&&(b.className=c),d&&d.appendChild(b),b},createNS:function(b,c){return a.window.document.createElementNS(b,c)}},a9=a.window.document&&a.window.document.documentElement.style;function ad(a){if(!a9)return a[0];for(var b=0;b<a.length;b++)if(a[b]in a9)return a[b];return a[0]}var ba,bb=ad(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);p.disableDrag=function(){a9&&bb&&(ba=a9[bb],a9[bb]="none")},p.enableDrag=function(){a9&&bb&&(a9[bb]=ba)};var bc=ad(["transform","WebkitTransform"]);p.setTransform=function(a,b){a.style[bc]=b};var aq=!1;try{var M=Object.defineProperty({},"passive",{get:function(){aq=!0}});a.window.addEventListener("test",M,M),a.window.removeEventListener("test",M,M)}catch(bd){aq=!1}p.addEventListener=function(b,c,d,a){void 0===a&&(a={}),b.addEventListener(c,d,"passive"in a&&aq?a:a.capture)},p.removeEventListener=function(b,c,d,a){void 0===a&&(a={}),b.removeEventListener(c,d,"passive"in a&&aq?a:a.capture)};var be=function(b){b.preventDefault(),b.stopPropagation(),a.window.removeEventListener("click",be,!0)};function bf(b){var a=b.userImage;return!!(a&&a.render&&a.render())&&(b.data.replace(new Uint8Array(a.data.buffer)),!0)}p.suppressClick=function(){a.window.addEventListener("click",be,!0),a.window.setTimeout(function(){a.window.removeEventListener("click",be,!0)},0)},p.mousePos=function(b,c){var d=b.getBoundingClientRect();return new a.Point(c.clientX-d.left-b.clientLeft,c.clientY-d.top-b.clientTop)},p.touchPos=function(c,d){for(var e=c.getBoundingClientRect(),f=[],b=0;b<d.length;b++)f.push(new a.Point(d[b].clientX-e.left-c.clientLeft,d[b].clientY-e.top-c.clientTop));return f}
vendor: 14,294 bytes, line 1
1,p.mouseButton=function(b){return void 0!==a.window.InstallTrigger&&2===b.button&&b.ctrlKey&&a.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:b.button},p.remove=function(a){a.parentNode&&a.parentNode.removeChild(a)};var bg=function(c){function b(){c.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.isLoaded=function(){return this.loaded},b.prototype.setLoaded=function(a){if(this.loaded!==a&&(this.loaded=a,a)){for(var b=0,c=this.requestors;b<c.length;b+=1){var d=c[b];this._notify(d.ids,d.callback)}this.requestors=[]}},b.prototype.getImage=function(a){return this.images[a]},b.prototype.addImage=function(a,b){this._validate(a,b)&&(this.images[a]=b)},b.prototype._validate=function(d,b){var c=!0;return this._validateStretch(b.stretchX,b.data&&b.data.width)||(this.fire(new a.ErrorEvent(Error('Image "'+d+'" has invalid "stretchX" value'))),c=!1),this._validateStretch(b.stretchY,b.data&&b.data.height)||(this.fire(new a.ErrorEvent(Error('Image "'+d+'" has invalid "stretchY" value'))),c=!1),this._validateContent(b.content,b)||(this.fire(new a.ErrorEvent(Error('Image "'+d+'" has invalid "content" value'))),c=!1),c},b.prototype._validateStretch=function(c,f){if(!c)return!0;for(var d=0,b=0,e=c;b<e.length;b+=1){var a=e[b];if(a[0]<d||a[1]<a[0]||f<a[1])return!1;d=a[1]}return!0},b.prototype._validateContent=function(a,b){return!(a&&(4!==a.length||a[0]<0||b.data.width<a[0]||a[1]<0||b.data.height<a[1]||a[2]<0||b.data.width<a[2]||a[3]<0||b.data.height<a[3]||a[2]<a[0]||a[3]<a[1]))},b.prototype.updateImage=function(a,b){b.version=this.images[a].version+1,this.images[a]=b,this.updatedImages[a]=!0},b.prototype.removeImage=function(a){var b=this.images[a];delete this.images[a],delete this.patterns[a],b.userImage&&b.userImage.onRemove&&b.userImage.onRemove()},b.prototype.listImages=function(){return Object.keys(this.images)},b.prototype.getImages=function(a,c){var d=!0;if(!this.isLoaded())for(var b=0,e=a;b<e.length;b+=1)this.images[e[b]]||(d=!1);this.isLoaded()||d?this._notify(a,c):this.requestors.push({ids:a,callback:c})},b.prototype._notify=function(g,h){for(var e={},d=0,f=g;d<f.length;d+=1){var c=f[d];this.images[c]||this.fire(new a.Event("styleimagemissing",{id:c}));var b=this.images[c];b?e[c]={data:b.data.clone(),pixelRatio:b.pixelRatio,sdf:b.sdf,version:b.version,stretchX:b.stretchX,stretchY:b.stretchY,content:b.content,hasRenderCallback:Boolean(b.userImage&&b.userImage.render)}:a.warnOnce('Image "'+c+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}h(null,e)},b.prototype.getPixelSize=function(){var a=this.atlasImage;return{width:a.width,height:a.height}},b.prototype.getPattern=function(d){var c=this.patterns[d],b=this.getImage(d);if(!b)return null;if(c&&c.position.version===b.version)return c.position;if(c)c.position.version=b.version;else{var e={w:b.data.width+2,h:b.data.height+2,x:0,y:0},f=new a.ImagePosition(e,b);this.patterns[d]={bin:e,position:f}}return this._updatePatternAtlas(),this.patterns[d].position},b.prototype.bind=function(c){var b=c.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new a.Texture(c,this.atlasImage,b.RGBA),this.atlasTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE)},b.prototype._updatePatternAtlas=function(){var h=[];for(var l in this.patterns)h.push(this.patterns[l].bin);var i=a.potpack(h),m=i.w,n=i.h,c=this.atlasImage;for(var j in c.resize({width:m||1,height:n||1}),this.patterns){var k=this.patterns[j].bin,d=k.x+1,e=k.y+1,b=this.images[j].data,f=b.width,g=b.height;a.RGBAImage.copy(b,c,{x:0,y:0},{x:d,y:e},{width:f,height:g}),a.RGBAImage.copy(b,c,{x:0,y:g-1},{x:d,y:e-1},{width:f,height:1}),a.RGBAImage.copy(b,c,{x:0,y:0},{x:d,y:e+g},{width:f,height:1}),a.RGBAImage.copy(b,c,{x:f-1,y:0},{x:d-1,y:e},{width:1,height:g}),a.RGBAImage.copy(b,c,{x:0,y:0},{x:d+f,y:e},{width:1,height:g})}this.dirty=!0},b.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},b.prototype.dispatchRenderCallbacks=function(e){for(var b=0,c=e;b<c.length;b+=1){var a=c[b];if(!this.callbackDispatchedThisFrame[a]){this.callbackDispatchedThisFrame[a]=!0;var d=this.images[a];bf(d)&&this.updateImage(a,d)}}},b}(a.Evented),ae=af;function af(c,b,d,e,f,g){this.fontSize=c||24,this.buffer=void 0===b?3:b,this.cutoff=e||.25,this.fontFamily=f||"sans-serif",this.fontWeight=g||"normal",this.radius=d||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,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(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function bh(d,c,e,f,g,h,i){for(var a=0;a<c;a++){for(var b=0;b<e;b++)f[b]=d[b*c+a];for(bi(f,g,h,i,e),b=0;b<e;b++)d[b*c+a]=g[b]}for(b=0;b<e;b++){for(a=0;a<c;a++)f[a]=d[b*c+a];for(bi(f,g,h,i,c),a=0;a<c;a++)d[b*c+a]=Math.sqrt(g[a])}}function bi(e,h,c,d,g){c[0]=0,d[0]=-1e20,d[1]=1e20;for(var b=1,a=0;b<g;b++){for(var f=(e[b]+b*b-(e[c[a]]+c[a]*c[a]))/(2*b-2*c[a]);f<=d[a];)a--,f=(e[b]+b*b-(e[c[a]]+c[a]*c[a]))/(2*b-2*c[a]);c[++a]=b,d[a]=f,d[a+1]=1e20}for(b=0,a=0;b<g;b++){for(;d[a+1]<b;)a++;h[b]=(b-c[a])*(b-c[a])+e[c[a]]}}af.prototype.draw=function(d){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(d,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),c=new Uint8ClampedArray(this.size*this.size),a=0;a<this.size*this.size;a++){var b=e.data[4*a+3]/255;this.gridOuter[a]=1===b?0:0===b?1e20:Math.pow(Math.max(0,.5-b),2),this.gridInner[a]=1===b?1e20:0===b?0:Math.pow(Math.max(0,b-.5),2)}for(bh(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),bh(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),a=0;a<this.size*this.size;a++)c[a]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[a]-this.gridInner[a])/this.radius+this.cutoff))));return c},ae.default=af;var D=function(a,b){this.requestManager=a,this.localIdeographFontFamily=b,this.entries={}};D.prototype.setURL=function(a){this.url=a},D.prototype.getGlyphs=function(c,g){var h=this,d=[];for(var e in c)for(var b=0,f=c[e];b<f.length;b+=1)d.push({stack:e,id:f[b]});a.asyncAll(d,function(i,f){var b=i.stack,c=i.id,a=h.entries[b];a||(a=h.entries[b]={glyphs:{},requests:{},ranges:{}});var d=a.glyphs[c];if(void 0===d){if(d=h._tinySDF(a,b,c))return a.glyphs[c]=d,void f(null,{stack:b,id:c,glyph:d});var e=Math.floor(c/256);if(256*e>65535)f(Error("glyphs > 65535 not supported"));else if(a.ranges[e])f(null,{stack:b,id:c,glyph:d});else{var g=a.requests[e];g||(g=a.requests[e]=[],D.loadGlyphRange(b,e,h.url,h.requestManager,function(i,b){if(b){for(var c in b)h._doesCharSupportLocalGlyph(+c)||(a.glyphs[+c]=b[+c]);a.ranges[e]=!0}for(var d=0,f=g;d<f.length;d+=1)(0,f[d])(i,b);delete a.requests[e]})),g.push(function(a,d){a?f(a):d&&f(null,{stack:b,id:c,glyph:d[c]||null})})}}else f(null,{stack:b,id:c,glyph:d})},function(e,f){if(e)g(e);else if(f){for(var b={},c=0,h=f;c<h.length;c+=1){var d=h[c],i=d.stack,j=d.id,a=d.glyph;(b[i]||(b[i]={}))[j]=a&&{id:a.id,bitmap:a.bitmap.clone(),metrics:a.metrics}}g(null,b)}})},D.prototype._doesCharSupportLocalGlyph=function(b){return!!this.localIdeographFontFamily&&(a.isChar["CJK Unified Ideographs"](b)||a.isChar["Hangul Syllables"](b)||a.isChar.Hiragana(b)||a.isChar.Katakana(b))},D.prototype._tinySDF=function(f,c,d){var g=this.localIdeographFontFamily;if(g&&this._doesCharSupportLocalGlyph(d)){var e=f.tinySDF;if(!e){var b="400";/bold/i.test(c)?b="900":/medium/i.test(c)?b="500":/light/i.test(c)&&(b="200"),e=f.tinySDF=new D.TinySDF(24,3,8,.25,g,b)}return{id:d,bitmap:new a.AlphaImage({width:30,height:30},e.draw(String.fromCharCode(d))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},D.loadGlyphRange=function(d,e,f,b,h){var c=256*e,g=b.transformRequest(b.normalizeGlyphsURL(f).replace("{fontstack}",d).replace("{range}",c+"-"+(c+255)),a.ResourceType.Glyphs);a.getArrayBuffer(g,function(c,d){if(c)h(c);else if(d){for(var e={},b=0,f=a.parseGlyphPBF(d);b<f.length;b+=1){var g=f[b];e[g.id]=g}h(null,e)}})},D.TinySDF=ae;var $=function(){this.specification=a.styleSpec.light.position};$.prototype.possiblyEvaluate=function(b,c){return a.sphericalToCartesian(b.expression.evaluate(c))},$.prototype.interpolate=function(b,c,d){return{x:a.number(b.x,c.x,d),y:a.number(b.y,c.y,d),z:a.number(b.z,c.z,d)}};var bj=new a.Properties({anchor:new a.DataConstantProperty(a.styleSpec.light.anchor),position:new $,color:new a.DataConstantProperty(a.styleSpec.light.color),intensity:new a.DataConstantProperty(a.styleSpec.light.intensity)}),bk=function(c){function b(b){c.call(this),this._transitionable=new a.Transitionable(bj),this.setLight(b),this._transitioning=this._transitionable.untransitioned()}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.getLight=function(){return this._transitionable.serialize()},b.prototype.setLight=function(c,d){if(void 0===d&&(d={}),!this._validate(a.validateLight,c,d))for(var b in c){var e=c[b];a.endsWith(b,"-transition")?this._transitionable.setTransition(b.slice(0,-11),e):this._transitionable.setValue(b,e)}},b.prototype.updateTransitions=function(a){this._transitioning=this._transitionable.transitioned(a,this._transitioning)},b.prototype.hasTransition=function(){return this._transitioning.hasTransition()},b.prototype.recalculate=function(a){this.properties=this._transitioning.possiblyEvaluate(a)},b.prototype._validate=function(c,d,b){return(!b|| !1!==b.validate)&&a.emitValidationErrors(this,c.call(a.validateStyle,a.extend({value:d,style:{glyphs:!0,sprite:!0},styleSpec:a.styleSpec})))},b}(a.Evented),E=function(a,b){this.width=a,this.height=b,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};E.prototype.getDash=function(b,c){var a=b.join(",")+String(c);return this.dashEntry[a]||(this.dashEntry[a]=this.addDash(b,c)),this.dashEntry[a]},E.prototype.getDashRanges=function(a,j,b){var c=[],f=a.length%2==1?-a[a.length-1]*b:0,g=a[0]*b,d=!0;c.push({left:f,right:g,isDash:d,zeroLength:0===a[0]});for(var h=a[0],e=1;e<a.length;e++){var i=a[e];c.push({left:f=h*b,right:g=(h+=i)*b,isDash:d=!d,zeroLength:0===i})}return c},E.prototype.addRoundDash=function(i,l,c){for(var f=l/2,d=-c;d<=c;d++)for(var m=this.width*(this.nextRow+c+d),j=0,b=i[j],a=0;a<this.width;a++){a/b.right>1&&(b=i[++j]);var n=Math.abs(a-b.left),o=Math.abs(a-b.right),e=Math.min(n,o),g=void 0,h=d/c*(f+1);if(b.isDash){var k=f-Math.abs(h);g=Math.sqrt(e*e+k*k)}else g=f-Math.sqrt(e*e+h*h);this.data[m+a]=Math.max(0,Math.min(255,g+128))}},E.prototype.addRegularDash=function(a){for(var b=a.length-1;b>=0;--b){var e=a[b],f=a[b+1];e.zeroLength?a.splice(b,1):f&&f.isDash===e.isDash&&(f.left=e.left,a.splice(b,1))}var g=a[0],h=a[a.length-1];g.isDash===h.isDash&&(g.left=h.left-this.width,h.right=g.right+this.width);for(var k=this.width*this.nextRow,i=0,d=a[i],c=0;c<this.width;c++){c/d.right>1&&(d=a[++i]);var l=Math.abs(c-d.left),m=Math.abs(c-d.right),j=Math.min(l,m);this.data[k+c]=Math.max(0,Math.min(255,(d.isDash?j:-j)+128))}},E.prototype.addDash=function(d,f){var b=f?7:0,g=2*b+1;if(this.nextRow+g>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var c=0,e=0;e<d.length;e++)c+=d[e];if(0!==c){var h=this.width/c,i=this.getDashRanges(d,this.width,h);f?this.addRoundDash(i,h,b):this.addRegularDash(i)}var j={y:(this.nextRow+b+.5)/this.height,height:2*b/this.height,width:c};return this.nextRow+=g,this.dirty=!0,j},E.prototype.bind=function(b){var a=b.gl;this.texture?(a.bindTexture(a.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,a.texSubImage2D(a.TEXTURE_2D,0,0,0,this.width,this.height,a.ALPHA,a.UNSIGNED_BYTE,this.data))):(this.texture=a.createTexture(),a.bindTexture(a.TEXTURE_2D,this.texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.ALPHA,this.width,this.height,0,a.ALPHA,a.UNSIGNED_BYTE,this.data))};var N=function e(f,g){this.workerPool=f,this.actors=[],this.currentActor=0,this.id=a.uniqueId();for(var c=this.workerPool.acquire(this.id),b=0;b<c.length;b++){var d=new e.Actor(c[b],g,this.id);d.name="Worker "+b,this.actors.push(d)}};function bl(b,c,e){var d=function(g,f){if(g)return e(g);if(f){var d=a.pick(a.extend(f,b),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);f.vector_layers&&(d.vectorLayers=f.vector_layers,d.vectorLayerIds=d.vectorLayers.map(function(a){return a.id})),d.tiles=c.canonicalizeTileset(d,b.url),e(null,d)}};return b.url?a.getJSON(c.transformRequest(c.normalizeSourceURL(b.url),a.ResourceType.Source),d):a.browser.frame(function(){return d(null,b)})}N.prototype.broadcast=function(c,d,b){a.asyncAll(this.actors,function(a,b){a.send(c,d,b)},b=b||function(){})},N.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},N.prototype.remove=function(){this.actors.forEach(function(a){a.remove()}),this.actors=[],this.workerPool.release(this.id)},N.Actor=a.Actor;var ag=function(b,c,d){this.bounds=a.LngLatBounds.convert(this.validateBounds(b)),this.minzoom=c||0,this.maxzoom=d||24};ag.prototype.validateBounds=function(a){return Array.isArray(a)&&4===a.length?[Math.max(-180,a[0]),Math.max(-90,a[1]),Math.min(180,a[2]),Math.min(90,a[3])]:[-180,-90,180,90]},ag.prototype.contains=function(b){var c=Math.pow(2,b.z),d=Math.floor(a.mercatorXfromLng(this.bounds.getWest())*c),e=Math.floor(a.mercatorYfromLat(this.bounds.getNorth())*c),f=Math.ceil(a.mercatorXfromLng(this.bounds.getE
1ast())*c),g=Math.ceil(a.mercatorYfromLat(this.bounds.getSouth())*c);return b.x>=d&&b.x<f&&b.y>=e&&b.y<g};var ar=function(c){function b(d,b,e,f){if(c.call(this),this.id=d,this.dispatcher=e,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.extend(this,a.pick(b,["url","scheme","tileSize","promoteId"])),this._options=a.extend({type:"vector"},b),this._collectResourceTiming=b.collectResourceTiming,512!==this.tileSize)throw Error("vector tile sources must have a tileSize of 512");this.setEventedParent(f)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.load=function(){var b=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=bl(this._options,this.map._requestManager,function(d,c){b._tileJSONRequest=null,b._loaded=!0,d?b.fire(new a.ErrorEvent(d)):c&&(a.extend(b,c),c.bounds&&(b.tileBounds=new ag(c.bounds,b.minzoom,b.maxzoom)),a.postTurnstileEvent(c.tiles,b.map._requestManager._customAccessToken),a.postMapLoadEvent(c.tiles,b.map._getMapId(),b.map._requestManager._skuToken,b.map._requestManager._customAccessToken),b.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),b.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})},b.prototype.loaded=function(){return this._loaded},b.prototype.hasTile=function(a){return!this.tileBounds||this.tileBounds.contains(a.canonical)},b.prototype.onAdd=function(a){this.map=a,this.load()},b.prototype.setSourceProperty=function(a){this._tileJSONRequest&&this._tileJSONRequest.cancel(),a(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},b.prototype.setTiles=function(a){var b=this;return this.setSourceProperty(function(){b._options.tiles=a}),this},b.prototype.setUrl=function(a){var b=this;return this.setSourceProperty(function(){b.url=a,b._options.url=a}),this},b.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},b.prototype.serialize=function(){return a.extend({},this._options)},b.prototype.loadTile=function(b,e){var f=this.map._requestManager.normalizeTileURL(b.tileID.canonical.url(this.tiles,this.scheme)),c={request:this.map._requestManager.transformRequest(f,a.ResourceType.Tile),uid:b.uid,tileID:b.tileID,zoom:b.tileID.overscaledZ,tileSize:this.tileSize*b.tileID.overscaleFactor(),type:this.t
vendor: 39,893 bytes, line 1
1ype,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(d,c){return delete b.request,b.aborted?e(null):d&&404!==d.status?e(d):(c&&c.resourceTiming&&(b.resourceTiming=c.resourceTiming),this.map._refreshExpiredTiles&&c&&b.setExpiryData(c),b.loadVectorData(c,this.map.painter),a.cacheEntryPossiblyAdded(this.dispatcher),e(null),void(b.reloadCallback&&(this.loadTile(b,b.reloadCallback),b.reloadCallback=null)))}c.request.collectResourceTiming=this._collectResourceTiming,b.actor&&"expired"!==b.state?"loading"===b.state?b.reloadCallback=e:b.request=b.actor.send("reloadTile",c,d.bind(this)):(b.actor=this.dispatcher.getActor(),b.request=b.actor.send("loadTile",c,d.bind(this)))},b.prototype.abortTile=function(a){a.request&&(a.request.cancel(),delete a.request),a.actor&&a.actor.send("abortTile",{uid:a.uid,type:this.type,source:this.id},void 0)},b.prototype.unloadTile=function(a){a.unloadVectorData(),a.actor&&a.actor.send("removeTile",{uid:a.uid,type:this.type,source:this.id},void 0)},b.prototype.hasTransition=function(){return!1},b}(a.Evented),ah=function(c){function b(d,b,e,f){c.call(this),this.id=d,this.dispatcher=e,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=a.extend({type:"raster"},b),a.extend(this,a.pick(b,["url","scheme","tileSize"]))}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.load=function(){var b=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=bl(this._options,this.map._requestManager,function(d,c){b._tileJSONRequest=null,b._loaded=!0,d?b.fire(new a.ErrorEvent(d)):c&&(a.extend(b,c),c.bounds&&(b.tileBounds=new ag(c.bounds,b.minzoom,b.maxzoom)),a.postTurnstileEvent(c.tiles),a.postMapLoadEvent(c.tiles,b.map._getMapId(),b.map._requestManager._skuToken),b.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),b.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})},b.prototype.loaded=function(){return this._loaded},b.prototype.onAdd=function(a){this.map=a,this.load()},b.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},b.prototype.serialize=function(){return a.extend({},this._options)},b.prototype.hasTile=function(a){return!this.tileBounds||this.tileBounds.contains(a.canonical)},b.prototype.loadTile=function(b,d){var e=this,c=this.map._requestManager.normalizeTileURL(b.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);b.request=a.getImage(this.map._requestManager.transformRequest(c,a.ResourceType.Tile),function(h,c){if(delete b.request,b.aborted)b.state="unloaded",d(null);else if(h)b.state="errored",d(h);else if(c){e.map._refreshExpiredTiles&&b.setExpiryData(c),delete c.cacheControl,delete c.expires;var g=e.map.painter.context,f=g.gl;b.texture=e.map.painter.getTileTexture(c.width),b.texture?b.texture.update(c,{useMipmap:!0}):(b.texture=new a.Texture(g,c,f.RGBA,{useMipmap:!0}),b.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),g.extTextureFilterAnisotropic&&f.texParameterf(f.TEXTURE_2D,g.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,g.extTextureFilterAnisotropicMax)),b.state="loaded",a.cacheEntryPossiblyAdded(e.dispatcher),d(null)}})},b.prototype.abortTile=function(a,b){a.request&&(a.request.cancel(),delete a.request),b()},b.prototype.unloadTile=function(a,b){a.texture&&this.map.painter.saveTileTexture(a.texture),b()},b.prototype.hasTransition=function(){return!1},b}(a.Evented),as=function(c){function b(d,b,e,f){c.call(this,d,b,e,f),this.type="raster-dem",this.maxzoom=22,this._options=a.extend({type:"raster-dem"},b),this.encoding=b.encoding||"mapbox"}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},b.prototype.loadTile=function(b,d){var c=this.map._requestManager.normalizeTileURL(b.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function e(a,c){a&&(b.state="errored",d(a)),c&&(b.dem=c,b.needsHillshadePrepare=!0,b.state="loaded",d(null))}b.request=a.getImage(this.map._requestManager.transformRequest(c,a.ResourceType.Tile),(function(f,c){if(delete b.request,b.aborted)b.state="unloaded",d(null);else if(f)b.state="errored",d(f);else if(c){this.map._refreshExpiredTiles&&b.setExpiryData(c),delete c.cacheControl,delete c.expires;var g=a.window.ImageBitmap&&c instanceof a.window.ImageBitmap&&a.offscreenCanvasSupported()?c:a.browser.getImageData(c,1),h={uid:b.uid,coord:b.tileID,source:this.id,rawImageData:g,encoding:this.encoding};b.actor&&"expired"!==b.state||(b.actor=this.dispatcher.getActor(),b.actor.send("loadDEMTile",h,e.bind(this)))}}).bind(this)),b.neighboringTiles=this._getNeighboringTiles(b.tileID)},b.prototype._getNeighboringTiles=function(c){var b=c.canonical,e=Math.pow(2,b.z),f=(b.x-1+e)%e,g=0===b.x?c.wrap-1:c.wrap,h=(b.x+1+e)%e,i=b.x+1===e?c.wrap+1:c.wrap,d={};return d[new a.OverscaledTileID(c.overscaledZ,g,b.z,f,b.y).key]={backfilled:!1},d[new a.OverscaledTileID(c.overscaledZ,i,b.z,h,b.y).key]={backfilled:!1},b.y>0&&(d[new a.OverscaledTileID(c.overscaledZ,g,b.z,f,b.y-1).key]={backfilled:!1},d[new a.OverscaledTileID(c.overscaledZ,c.wrap,b.z,b.x,b.y-1).key]={backfilled:!1},d[new a.OverscaledTileID(c.overscaledZ,i,b.z,h,b.y-1).key]={backfilled:!1}),b.y+1<e&&(d[new a.OverscaledTileID(c.overscaledZ,g,b.z,f,b.y+1).key]={backfilled:!1},d[new a.OverscaledTileID(c.overscaledZ,c.wrap,b.z,b.x,b.y+1).key]={backfilled:!1},d[new a.OverscaledTileID(c.overscaledZ,i,b.z,h,b.y+1).key]={backfilled:!1}),d},b.prototype.unloadTile=function(a){a.demTexture&&this.map.painter.saveTileTexture(a.demTexture),a.fbo&&(a.fbo.destroy(),delete a.fbo),a.dem&&delete a.dem,delete a.neighboringTiles,a.state="unloaded",a.actor&&a.actor.send("removeDEMTile",{uid:a.uid,source:this.id})},b}(ah),at=function(c){function b(e,b,f,g){c.call(this),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=f.getActor(),this.setEventedParent(g),this._data=b.data,this._options=a.extend({},b),this._collectResourceTiming=b.collectResourceTiming,this._resourceTiming=[],void 0!==b.maxzoom&&(this.maxzoom=b.maxzoom),b.type&&(this.type=b.type),b.attribution&&(this.attribution=b.attribution),this.promoteId=b.promoteId;var d=a.EXTENT/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:b.cluster||!1,geojsonVtOptions:{buffer:(void 0!==b.buffer?b.buffer:128)*d,tolerance:(void 0!==b.tolerance?b.tolerance:.375)*d,extent:a.EXTENT,maxZoom:this.maxzoom,lineMetrics:b.lineMetrics||!1,generateId:b.generateId||!1},superclusterOptions:{maxZoom:void 0!==b.clusterMaxZoom?Math.min(b.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,b.clusterMinPoints||2),extent:a.EXTENT,radius:(b.clusterRadius||50)*d,log:!1,generateId:b.generateId||!1},clusterProperties:b.clusterProperties,filter:b.filter},b.workerOptions)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.load=function(){var b=this;this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(c){if(c)b.fire(new a.ErrorEvent(c));else{var d={dataType:"source",sourceDataType:"metadata"};b._collectResourceTiming&&b._resourceTiming&&b._resourceTiming.length>0&&(d.resourceTiming=b._resourceTiming,b._resourceTiming=[]),b.fire(new a.Event("data",d))}})},b.prototype.onAdd=function(a){this.map=a,this.load()},b.prototype.setData=function(b){var c=this;return this._data=b,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(b){if(b)c.fire(new a.ErrorEvent(b));else{var d={dataType:"source",sourceDataType:"content"};c._collectResourceTiming&&c._resourceTiming&&c._resourceTiming.length>0&&(d.resourceTiming=c._resourceTiming,c._resourceTiming=[]),c.fire(new a.Event("data",d))}}),this},b.prototype.getClusterExpansionZoom=function(a,b){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:a,source:this.id},b),this},b.prototype.getClusterChildren=function(a,b){return this.actor.send("geojson.getClusterChildren",{clusterId:a,source:this.id},b),this},b.prototype.getClusterLeaves=function(a,b,c,d){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:a,limit:b,offset:c},d),this},b.prototype._updateWorkerData=function(d){var e=this;this._loaded=!1;var b=a.extend({},this.workerOptions),c=this._data;"string"==typeof c?(b.request=this.map._requestManager.transformRequest(a.browser.resolveURL(c),a.ResourceType.Source),b.request.collectResourceTiming=this._collectResourceTiming):b.data=JSON.stringify(c),this.actor.send(this.type+".loadData",b,function(c,a){e._removed||a&&a.abandoned||(e._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[e.id]&&(e._resourceTiming=a.resourceTiming[e.id].slice(0)),e.actor.send(e.type+".coalesce",{source:b.source},null),d(c))})},b.prototype.loaded=function(){return this._loaded},b.prototype.loadTile=function(b,d){var e=this,c=b.actor?"reloadTile":"loadTile";b.actor=this.actor,b.request=this.actor.send(c,{type:this.type,uid:b.uid,tileID:b.tileID,zoom:b.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(a,f){return delete b.request,b.unloadVectorData(),b.aborted?d(null):a?d(a):(b.loadVectorData(f,e.map.painter,"reloadTile"===c),d(null))})},b.prototype.abortTile=function(a){a.request&&(a.request.cancel(),delete a.request),a.aborted=!0},b.prototype.unloadTile=function(a){a.unloadVectorData(),this.actor.send("removeTile",{uid:a.uid,type:this.type,source:this.id})},b.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},b.prototype.serialize=function(){return a.extend({},this._options,{type:this.type,data:this._data})},b.prototype.hasTransition=function(){return!1},b}(a.Evented),bm=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),_=function(c){function b(b,a,d,e){c.call(this),this.id=b,this.dispatcher=d,this.coordinates=a.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(e),this.options=a}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.load=function(b,c){var d=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),function(e,f){d._loaded=!0,e?d.fire(new a.ErrorEvent(e)):f&&(d.image=f,b&&(d.coordinates=b),c&&c(),d._finishLoading())})},b.prototype.loaded=function(){return this._loaded},b.prototype.updateImage=function(a){var b=this;return this.image&&a.url&&(this.options.url=a.url,this.load(a.coordinates,function(){b.texture=null})),this},b.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},b.prototype.onAdd=function(a){this.map=a,this.load()},b.prototype.setCoordinates=function(c){var e=this;this.coordinates=c;var d=c.map(a.MercatorCoordinate.fromLngLat);this.tileID=function(k){for(var b=1/0,c=1/0,d=-1/0,e=-1/0,g=0,h=k;g<h.length;g+=1){var f=h[g];b=Math.min(b,f.x),c=Math.min(c,f.y),d=Math.max(d,f.x),e=Math.max(e,f.y)}var l=Math.max(d-b,e-c),i=Math.max(0,Math.floor(-Math.log(l)/Math.LN2)),j=Math.pow(2,i);return new a.CanonicalTileID(i,Math.floor((b+d)/2*j),Math.floor((c+e)/2*j))}(d),this.minzoom=this.maxzoom=this.tileID.z;var b=d.map(function(a){return e.tileID.getTilePoint(a)._round()});return this._boundsArray=new a.StructArrayLayout4i8,this._boundsArray.emplaceBack(b[0].x,b[0].y,0,0),this._boundsArray.emplaceBack(b[1].x,b[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(b[3].x,b[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(b[2].x,b[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this},b.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var b=this.map.painter.context,c=b.gl;for(var e in this.boundsBuffer||(this.boundsBuffer=b.createVertexBuffer(this._boundsArray,bm.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new a.Texture(b,this.image,c.RGBA),this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE)),this.tiles){var d=this.tiles[e];"loaded"!==d.state&&(d.state="loaded",d.texture=this.texture)}}},b.prototype.loadTile=function(a,b){this.tileID&&this.tileID.equals(a.tileID.canonical)?(this.tiles[String(a.tileID.wrap)]=a,a.buckets={},b(null)):(a.state="errored",b(null))},b.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},b.prototype.hasTransition=function(){return!1},b}(a.Evented),au=function(c){function b(b,a,d,e){c.call(this,b,a,d,e),this.roundZoom=!0,this.type="video",this.options=a}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.load=function(){var e=this;this._loaded=!1;var d=this.options;this.urls=[];for(var b=0,c=d.urls;b<c.length;b+=1)this.urls.push(this.map._requestManager.transformRequest(c[b],a.ResourceType.Source).url);a.getVideo(this.urls,function(b,c){e._loaded=!0,b?e.fire(new a.ErrorEvent(b)):c&&(e.video=c,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},b.prototype.pause=function(){this.video&&this.video.pause()},b.prototype.play=function(){this.video&&this.video.play()},b.prototype.seek=function(c){if(this.video){var b=this.video.seekable;c<b.start(0)||c>b.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+b.start(0)+" and "+b.end(0)+"-second mark."))):this.video.currentTime=c}},b.prototype.getVideo=function(){return this.video},b.prototype.onAdd=function(a){this.map||(this.map=a,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},b.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var c=this.map.painter.context,b=c.gl;for(var e in this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,bm.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE),b.texSubImage2D(b.TEXTURE_2D,0,0,0,b.RGBA,b.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(c,this.video,b.RGBA),this.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE)),this.tiles){var d=this.tiles[e];"loaded"!==d.state&&(d.state="loaded",d.texture=this.texture)}}},b.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},b.prototype.hasTransition=function(){return this.video&&!this.video.paused},b}(_),av=function(c){function b(d,b,e,f){c.call(this,d,b,e,f),b.coordinates?Array.isArray(b.coordinates)&&4===b.coordinates.length&&!b.coordinates.some(function(a){return!Array.isArray(a)||2!==a.length||a.some(function(a){return"number"!=typeof a})})||this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'missing required property "coordinates"'))),b.animate&&"boolean"!=typeof b.animate&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'optional "animate" property must be a boolean value'))),b.canvas?"string"==typeof b.canvas||b.canvas instanceof a.window.HTMLCanvasElement||this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'missing required property "canvas"'))),this.options=b,this.animate=void 0===b.animate||b.animate}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof a.window.HTMLCanvasElement?this.options.canvas:a.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.ErrorEvent(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())},b.prototype.getCanvas=function(){return this.canvas},b.prototype.onAdd=function(a){this.map=a,this.load(),this.canvas&&this.animate&&this.play()},b.prototype.onRemove=function(){this.pause()},b.prototype.prepare=function(){var b=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,b=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,b=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var c=this.map.painter.context,e=c.gl;for(var f in this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,bm.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(b||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(c,this.canvas,e.RGBA,{premultiply:!0}),this.tiles){var d=this.tiles[f];"loaded"!==d.state&&(d.state="loaded",d.texture=this.texture)}}},b.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},b.prototype.hasTransition=function(){return this._playing},b.prototype._hasInvalidDimensions=function(){for(var a=0,b=[this.canvas.width,this.canvas.height];a<b.length;a+=1){var c=b[a];if(isNaN(c)||c<=0)return!0}return!1},b}(_),bn={vector:ar,raster:ah,"raster-dem":as,geojson:at,video:au,image:_,canvas:av};function bo(c,d){var b=a.identity([]);return a.translate(b,b,[1,1,0]),a.scale(b,b,[.5*c.width,.5*c.height,1]),a.multiply(b,b,c.calculatePosMatrix(d.toUnwrapped()))}function bp(b,f,l,m,c,g){var n=function(d,a,e){if(d)for(var b=0,f=d;b<f.length;b+=1){var c=a[f[b]];if(c&&c.source===e&&"fill-extrusion"===c.type)return!0}else for(var h in a){var g=a[h];if(g.source===e&&"fill-extrusion"===g.type)return!0}return!1}(c&&c.layers,f,b.id),h=g.maxPitchScaleFactor(),i=b.tilesIn(m,h,n);i.sort(bq);for(var j=[],d=0,k=i;d<k.length;d+=1){var a=k[d];j.push({wrappedTileID:a.tileID.wrapped().key,queryResults:a.tile.queryRenderedFeatures(f,l,b._state,a.queryGeometry,a.cameraQueryGeometry,a.scale,c,g,h,bo(b.transform,a.tileID))})}var e=function(n){for(var b={},f={},c=0,g=n;c<g.length;c+=1){var h=g[c],i=h.queryResults,j=h.wrappedTileID,k=f[j]=f[j]||{};for(var a in i)for(var o=i[a],l=k[a]=k[a]||{},p=b[a]=b[a]||[],d=0,m=o;d<m.length;d+=1){var e=m[d];l[e.featureIndex]||(l[e.featureIndex]=!0,p.push(e))}}return b}(j);for(var o in e)e[o].forEach(function(c){var a=c.feature,d=b.getFeatureState(a.layer["source-layer"],a.id);a.source=a.layer.source,a.layer["source-layer"]&&(a.sourceLayer=a.layer["source-layer"]),a.state=d});return e}function bq(c,d){var a=c.tileID,b=d.tileID;return a.overscaledZ-b.overscaledZ||a.canonical.y-b.canonical.y||a.wrap-b.wrap||a.canonical.x-b.canonical.x}var q=function(a,b){this.max=a,this.onRemove=b,this.reset()};q.prototype.reset=function(){for(var d in this.data)for(var a=0,c=this.data[d];a<c.length;a+=1){var b=c[a];b.timeout&&clearTimeout(b.timeout),this.onRemove(b.value)}return this.data={},this.order=[],this},q.prototype.add=function(e,f,b){var g=this,a=e.wrapped().key;void 0===this.data[a]&&(this.data[a]=[]);var c={value:f,timeout:void 0};if(void 0!==b&&(c.timeout=setTimeout(function(){g.remove(e,c)},b)),this.data[a].push(c),this.order.push(a),this.order.length>this.max){var d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this},q.prototype.has=function(a){return a.wrapped().key in this.data},q.prototype.getAndRemove=function(a){return this.has(a)?this._getAndRemoveByKey(a.wrapped().key):null},q.prototype._getAndRemoveByKey=function(a){var b=this.data[a].shift();return b.timeout&&clearTimeout(b.timeout),0===this.data[a].length&&delete this.data[a],this.order.splice(this.order.indexOf(a),1),b.value},q.prototype.getByKey=function(b){var a=this.data[b];return a?a[0].value:null},q.prototype.get=function(a){return this.has(a)?this.data[a.wrapped().key][0].value:null},q.prototype.remove=function(c,d){if(!this.has(c))return this;var a=c.wrapped().key,e=void 0===d?0:this.data[a].indexOf(d),b=this.data[a][e];return this.data[a].splice(e,1),b.timeout&&clearTimeout(b.timeout),0===this.data[a].length&&delete this.data[a],this.onRemove(b.value),this.order.splice(this.order.indexOf(a),1),this},q.prototype.setMaxSize=function(b){for(this.max=b;this.order.length>this.max;){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},q.prototype.filter=function(h){var c=[];for(var i in this.data)for(var a=0,d=this.data[i];a<d.length;a+=1){var e=d[a];h(e.value)||c.push(e)}for(var b=0,f=c;b<f.length;b+=1){var g=f[b];this.remove(g.value.tileID,g)}};var aa=function(b,c,d){this.context=b;var a=b.gl;this.buffer=a.createBuffer(),this.dynamicDraw=Boolean(d),this.context.unbindVAO(),b.bindElementBuffer.set(this.buffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,c.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete c.arrayBuffer};aa.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},aa.prototype.updateData=function(b){var a=this.context.gl;this.context.unbindVAO(),this.bind(),a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,0,b.arrayBuffer)},aa.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var br={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},J=function(c,b,d,e){this.length=b.length,this.attributes=d,this.itemSize=b.bytesPerElement,this.dynamicDraw=e,this.context=c;var a=c.gl;this.buffer=a.createBuffer(),c.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,b.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete b.arrayBuffer};J.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},J.prototype.updateData=function(b){var a=this.context.gl;this.bind(),a.bufferSubData(a.ARRAY_BUFFER,0,b.arrayBuffer)},J.prototype.enableAttributes=function(c,d){for(var a=0;a<this.attributes.length;a++){var b=d.attributes[this.attributes[a].name];void 0!==b&&c.enableVertexAttribArray(b)}},J.prototype.setVertexAttribPointers=function(c,e,f){for(var b=0;b<this.attributes.length;b++){var a=this.attributes[b],d=e.attributes[a.name];void 0!==d&&c.vertexAttribPointer(d,a.components,c[br[a.type]],!1,this.itemSize,a.offset+this.itemSize*(f||0))}},J.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var b=function(a){this.gl=a.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};b.prototype.get=function(){return this.current},b.prototype.set=function(a){},b.prototype.getDefault=function(){return this.default},b.prototype.setDefault=function(){this.set(this.default)};var bs=function(c){function b(){c.apply(this,arguments)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.getDefault=function(){return a.Color.transparent},b.prototype.set=function(a){var b=this.current;(a.r!==b.r||a.g!==b.g||a.b!==b.b||a.a!==b.a||this.dirty)&&(this.gl.clearColor(a.r,a.g,a.b,a.a),this.current=a,this.dirty=!1)},b}(b),bt=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return 1},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.clearDepth(a),this.current=a,this.dirty=!1)},a}(b),bu=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return 0},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.clearStencil(a),this.current=a,this.dirty=!1)},a}(b),bv=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return[!0,!0,!0,!0]},a.prototype.set=function(a){var b=this.current;(a[0]!==b[0]||a[1]!==b[1]||a[2]!==b[2]||a[3]!==b[3]||this.dirty)&&(this.gl.colorMask(a[0],a[1],a[2],a[3]),this.current=a,this.dirty=!1)},a}(b),bw=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!0},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.depthMask(a),this.current=a,this.dirty=!1)},a}(b),bx=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return 255},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.stencilMask(a),this.current=a,this.dirty=!1)},a}(b),by=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},a.prototype.set=function(a){var b=this.current;(a.func!==b.func||a.ref!==b.ref||a.mask!==b.mask||this.dirty)&&(this.gl.stencilFunc(a.func,a.ref,a.mask),this.current=a,this.dirty=!1)},a}(b),bz=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){var a=this.gl;return[a.KEEP,a.KEEP,a.KEEP]},a.prototype.set=function(a){var b=this.current;(a[0]!==b[0]||a[1]!==b[1]||a[2]!==b[2]||this.dirty)&&(this.gl.stencilOp(a[0],a[1],a[2]),this.current=a,this.dirty=!1)},a}(b),bA=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!1},a.prototype.set=function(b){if(b!==this.current||this.dirty){var a=this.gl;b?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST),this.current=b,this.dirty=!1}},a}(b),bB=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return[0,1]},a.prototype.set=function(a){var b=this.current;(a[0]!==b[0]||a[1]!==b[1]||this.dirty)&&(this.gl.depthRange(a[0],a[1]),this.current=a,this.dirty=!1)},a}(b),bC=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!1},a.prototype.set=function(b){if(b!==this.current||this.dirty){var a=this.gl;b?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST),this.current=b,this.dirty=!1}},a}(b),bD=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return this.gl.LESS},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.depthFunc(a),this.current=a,this.dirty=!1)},a}(b),bE=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!1},a.prototype.set=function(b){if(b!==this.current||this.dirty){var a=this.gl;b?a.enable(a.BLEND):a.disable(a.BLEND),this.current=b,this.dirty=!1}},a}(b),bF=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){var a=this.gl;return[a.ONE,a.ZERO]},a.prototype.set=function(a){var b=this.current;(a[0]!==b[0]||a[1]!==b[1]||this.dirty)&&(this.gl.blendFunc(a[0],a[1]),this.current=a,this.dirty=!1)},a}(b),bG=function(c){function b(){c.apply(this,arguments)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.getDefault=function(){return a.Color.transparent},b.prototype.set=function(a){var b=this.current;(a.r!==b.r||a.g!==b.g||a.b!==b.b||a.a!==b.a||this.dirty)&&(this.gl.blendColor(a.r,a.g,a.b,a.a),this.current=a,this.dirty=!1)},b}(b),bH=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return this.gl.FUNC_ADD},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.blendEquation(a),this.current=a,this.dirty=!1)},a}(b),bI=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!1},a.prototype.set=function(b){if(b!==this.current||this.dirty){var a=this.gl;b?a.enable(a.CULL_FACE):a.disable(a.CULL_FACE),this.current=b,this.dirty=!1}},a}(b),bJ=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return this.gl.BACK},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.cullFace(a),this.current=a,this.dirty=!1)},a}(b),bK=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return this.gl.CCW},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.frontFace(a),this.current=a,this.dirty=!1)},a}(b),bL=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.useProgram(a),this.current=a,this.dirty=!1)},a}(b),bM=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return this.gl.TEXTURE0},a.prototype.set=function(a){(a!==this.current||this.dirty)&&(this.gl.activeTexture(a),this.current=a,this.dirty=!1)},a}(b),bN=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){var a=this.gl;return[0,0,a.drawingBufferWidth,a.drawingBufferHeight]},a.prototype.set=function(a){var b=this.current;(a[0]!==b[0]||a[1]!==b[1]||a[2]!==b[2]||a[3]!==b[3]||this.dirty)&&(this.gl.viewport(a[0],a[1],a[2],a[3]),this.current=a,this.dirty=!1)},a}(b),bO=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.bindFramebuffer(b.FRAMEBUFFER,a),this.current=a,this.dirty=!1}},a}(b),bP=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.bindRenderbuffer(b.RENDERBUFFER,a),this.current=a,this.dirty=!1}},a}(b),bQ=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.bindTexture(b.TEXTURE_2D,a),this.current=a,this.dirty=!1}},a}(b),bR=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.bindBuffer(b.ARRAY_BUFFER,a),this.current=a,this.dirty=!1}},a}(b),bS=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){var b=this.gl;b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,a),this.current=a,this.dirty=!1},a}(b),bT=function(b){function a(a){b.call(this,a),this.vao=a.extVertexArrayObject}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a.prototype.set=function(a){this.vao&&(a!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(a),this.current=a,this.dirty=!1)},a}(b),bU=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return 4},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.pixelStorei(b.UNPACK_ALIGNMENT,a),this.current=a,this.dirty=!1}},a}(b),bV=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!1},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a),this.current=a,this.dirty=!1}},a}(b),bW=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return!1},a.prototype.set=function(a){if(a!==this.current||this.dirty){var b=this.gl;b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,a),this.current=a,this.dirty=!1}},a}(b),ai=function(b){function a(a,c){b.call(this,a),this.context=a,this.parent=c}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.getDefault=function(){return null},a}(b),bX=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.setDirty=function(){this.dirty=!0},a.prototype.set=function(b){if(b!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var a=this.gl;a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,b,0),this.current=b,this.dirty=!1}},a}(ai),bY=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.set=function(b){if(b!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var a=this.gl;a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,b),this.current=b,this.dirty=!1}},a}(ai),aw=function(a,c,d,e){this.context=a,this.width=c,this.height=d;var b=this.framebuffer=a.gl.createFramebuffer();this.colorAttachment=new bX(a,b),e&&(this.depthAttachment=new bY(a,b))};aw.prototype.destroy=function(){var a=this.context.gl,b=this.colorAttachment.get();if(b&&a.deleteTexture(b),this.depthAttachment){var c=this.depthAttachment.get();c&&a.deleteRenderbuffer(c)}a.deleteFramebuffer(this.framebuffer)};var K=function(a,b,c){this.func=a,this.mask=b,this.range=c};K.ReadOnly=!1,K.ReadWrite=!0,K.disabled=new K(519,K.ReadOnly,[0,1]);var aj=function(a,b,c,d,e,f){this.test=a,this.ref=b,this.mask=c,this.fail=d,this.depthFail=e,this.pass=f};aj.disabled=new aj({func:519,mask:0},0,0,7680,7680,7680);var z=function(a,b,c){this.blendFunction=a,this.blendColor=b,this.mask=c};z.disabled=new z(z.Replace=[1,0],a.Color.transparent,[!1,!1,!1,!1]),z.unblended=new z(z.Replace,a.Color.transparent,[!0,!0,!0,!0]),z.alphaBlended=new z([1,771],a.Color.transparent,[!0,!0,!0,!0]);var O=function(a,b,c){this.enable=a,this.mode=b,this.frontFace=c};O.disabled=new O(!1,1029,2305),O.backCCW=new O(!0,1029,2305);var m=function(a){this.gl=a,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new bs(this),this.clearDepth=new bt(this),this.clearStencil=new bu(this),this.colorMask=new bv(this),this.depthMask=new bw(this),this.stencilMask=new bx(this),this.stencilFunc=new by(this),this.stencilOp=new bz(this),this.stencilTest=new bA(this),this.depthRange=new bB(this),this.depthTest=new bC(this),this.depthFunc=new bD(this),this.blend=new bE(this),this.blendFunc=new bF(this),this.blendColor=new bG(this),this.blendEquation=new bH(this),this.cullFace=new bI(this),this.cullFaceSide=new bJ(this),this.frontFace=new bK(this),this.program=new bL(this),this.activeTexture=new bM(this),this.viewport=new bN(this),this.bindFramebuffer=new bO(this),this.bindRenderbuffer=new bP(this),this.bindTexture=new bQ(this),this.bindVertexBuffer=new bR(this),this.bindElementBuffer=new bS(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new bT(this),this.pixelStoreUnpack=new bU(this),this.pixelStoreUnpackPremultiplyAlpha=new bV(this),this.pixelStoreUnpackFlipY=new bW(this),this.extTextureFilterAnisotropic=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=a.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=a.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(a.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=a.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=a.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=a.getParameter(a.MAX_TEXTURE_SIZE)};m.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()},m.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},m.prototype.createIndexBuffer=function(a,b){return new aa(this,a,b)}
1,m.prototype.createVertexBuffer=function(a,b,c){return new J(this,a,b,c)},m.prototype.createRenderbuffer=function(c,d,e){var a=this.gl,b=a.createRenderbuffer();return this.bindRenderbuffer.set(b),a.renderbufferStorage(a.RENDERBUFFER,c,d,e),this.bindRenderbuffer.set(null),b},m.prototype.createFramebuffer=function(a,b,c){return new aw(this,a,b,c)},m.prototype.clear=function(c){var d=c.color,e=c.depth,a=this.gl,b=0;d&&(b|=a.COLOR_BUFFER_BIT,this.clearColor.set(d),this.colorMask.set([!0,!0,!0,!0])),void 0!==e&&(b|=a.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(e),this.depthMask.set(!0)),a.clear(b)},m.prototype.setCullFace=function(a){!1===a.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(a.mode),this.frontFace.set(a.frontFace))},m.prototype.setDepthMode=function(a){a.func!==this.gl.ALWAYS||a.mask?(this.depthTest.set(!0),this.depthFunc.set(a.func),this.depthMask.set(a.mask),this.depthRange.set(a.range)):this.depthTest.set(!1)},m.prototype.setStencilMode=function(a){a.test.func!==this.gl.ALWAYS||a.mask?(this.stencilTest.set(!0),this.stencilMask.set(a.mask),this.stencilOp.set([a.fail,a.depthFail,a.pass]),this.stencilFunc.set({func:a.test.func,ref:a.ref,mask:a.test.mask})):this.stencilTest.set(!1)},m.prototype.setColorMode=function(b){a.deepEqual(b.blendFunction,z.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(b.blendFunction),this.blendColor.set(b.blendColor)),this.colorMask.set(b.mask)},m.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ak=function(c){function b(b,e,d){var f=this;c.call(this),this.id=b,this.dispatcher=d,this.on("data",function(a){"source"===a.dataType&&"metadata"===a.sourceDataType&&(f._sourceLoaded=!0),f._sourceLoaded&&!f._paused&&"source"===a.dataType&&"content"===a.sourceDataType&&(f.reload(),f.transform&&f.update(f.transform))}),this.on("error",function(){f._sourceErrored=!0}),this._source=function(c,d,e,f){var b=new bn[d.type](c,d,e,f);if(b.id!==c)throw Error("Expected Source id to be "+c+" instead of "+b.id);return a.bindAll(["load","abort","unload","serialize","prepare"],b),b}(b,e,d,this),this._tiles={},this._cache=new q(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new a.SourceFeatureState}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.onAdd=function(a){this.map=a,this._maxTileCacheSize=a?a._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(a)},b.prototype.onRemove=function(a){this._source&&this._source.onRemove&&this._source.onRemove(a)},b.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var b in this._tiles){var a=this._tiles[b];if("loaded"!==a.state&&"errored"!==a.state)return!1}return!0},b.prototype.getSource=function(){return this._source},b.prototype.pause=function(){this._paused=!0},b.prototype.resume=function(){if(this._paused){var a=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,a&&this.reload(),this.transform&&this.update(this.transform)}},b.prototype._loadTile=function(a,b){return this._source.loadTile(a,b)},b.prototype._unloadTile=function(a){if(this._source.unloadTile)return this._source.unloadTile(a,function(){})},b.prototype._abortTile=function(a){if(this._source.abortTile)return this._source.abortTile(a,function(){})},b.prototype.serialize=function(){return this._source.serialize()},b.prototype.prepare=function(b){for(var c in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var a=this._tiles[c];a.upload(b),a.prepare(this.map.style.imageManager)}},b.prototype.getIds=function(){return a.values(this._tiles).map(function(a){return a.tileID}).sort(bZ).map(function(a){return a.key})},b.prototype.getRenderableIds=function(c){var e=this,b=[];for(var d in this._tiles)this._isIdRenderable(d,c)&&b.push(this._tiles[d]);return c?b.sort(function(g,h){var b=g.tileID,c=h.tileID,d=new a.Point(b.canonical.x,b.canonical.y)._rotate(e.transform.angle),f=new a.Point(c.canonical.x,c.canonical.y)._rotate(e.transform.angle);return b.overscaledZ-c.overscaledZ||f.y-d.y||f.x-d.x}).map(function(a){return a.tileID.key}):b.map(function(a){return a.tileID}).sort(bZ).map(function(a){return a.key})},b.prototype.hasRenderableParent=function(b){var a=this.findLoadedParent(b,0);return!!a&&this._isIdRenderable(a.tileID.key)},b.prototype._isIdRenderable=function(a,b){return this._tiles[a]&&this._tiles[a].hasData()&&!this._coveredTiles[a]&&(b||!this._tiles[a].holdingForFade())},b.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var a in this._cache.reset(),this._tiles)"errored"!==this._tiles[a].state&&this._reloadTile(a,"reloading")},b.prototype._reloadTile=function(b,c){var a=this._tiles[b];a&&("loading"!==a.state&&(a.state=c),this._loadTile(a,this._tileLoaded.bind(this,a,b,c)))},b.prototype._tileLoaded=function(b,d,e,c){if(c)return b.state="errored",void(4
vendor: 4,638 bytes, line 1
104!==c.status?this._source.fire(new a.ErrorEvent(c,{tile:b})):this.update(this.transform));b.timeAdded=a.browser.now(),"expired"===e&&(b.refreshedUponExpiration=!0),this._setTileReloadTimer(d,b),"raster-dem"===this.getSource().type&&b.dem&&this._backfillDEM(b),this._state.initializeTileState(b,this.map?this.map.painter:null),this._source.fire(new a.Event("data",{dataType:"source",tile:b,coord:b.tileID}))},b.prototype._backfillDEM=function(a){for(var c=this.getRenderableIds(),b=0;b<c.length;b++){var d=c[b];if(a.neighboringTiles&&a.neighboringTiles[d]){var e=this.getTileByID(d);f(a,e),f(e,a)}}function f(a,c){a.needsHillshadePrepare=!0;var b=c.tileID.canonical.x-a.tileID.canonical.x,e=c.tileID.canonical.y-a.tileID.canonical.y,d=Math.pow(2,a.tileID.canonical.z),f=c.tileID.key;0===b&&0===e||Math.abs(e)>1||(Math.abs(b)>1&&(1===Math.abs(b+d)?b+=d:1===Math.abs(b-d)&&(b-=d)),c.dem&&a.dem&&(a.dem.backfillBorder(c.dem,b,e),a.neighboringTiles&&a.neighboringTiles[f]&&(a.neighboringTiles[f].backfilled=!0)))}},b.prototype.getTile=function(a){return this.getTileByID(a.key)},b.prototype.getTileByID=function(a){return this._tiles[a]},b.prototype._retainLoadedChildren=function(h,d,i,e){for(var f in this._tiles){var a=this._tiles[f];if(!(e[f]||!a.hasData()||a.tileID.overscaledZ<=d||a.tileID.overscaledZ>i)){for(var b=a.tileID;a&&a.tileID.overscaledZ>d+1;){var g=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[g.key])&&a.hasData()&&(b=g)}for(var c=b;c.overscaledZ>d;)if(h[(c=c.scaledTo(c.overscaledZ-1)).key]){e[b.key]=b;break}}}},b.prototype.findLoadedParent=function(a,d){if(a.key in this._loadedParentTiles){var b=this._loadedParentTiles[a.key];return b&&b.tileID.overscaledZ>=d?b:null}for(var c=a.overscaledZ-1;c>=d;c--){var f=a.scaledTo(c),e=this._getLoadedTile(f);if(e)return e}},b.prototype._getLoadedTile=function(b){var a=this._tiles[b.key];return a&&a.hasData()?a:this._cache.getByKey(b.wrapped().key)},b.prototype.updateCacheSize=function(a){var c=Math.ceil(a.width/this._source.tileSize)+1,d=Math.ceil(a.height/this._source.tileSize)+1,b=Math.floor(c*d*5),e="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,b):b;this._cache.setMaxSize(e)},b.prototype.handleWrapJump=function(b){var c=Math.round((b-(void 0===this._prevLng?b:this._prevLng))/360);if(this._prevLng=b,c){var d={};for(var g in this._tiles){var a=this._tiles[g];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+c),d[a.tileID.key]=a}for(var e in this._tiles=d,this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(var f in this._tiles)this._setTileReloadTimer(f,this._tiles[f])}},b.prototype.update=function(d){var w=this;if(this.transform=d,this._sourceLoaded&&!this._paused){this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?s=d.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(b){return new a.OverscaledTileID(b.canonical.z,b.wrap,b.canonical.z,b.canonical.x,b.canonical.y)}):(s=d.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(s=s.filter(function(a){return w._source.hasTile(a)}))):s=[];var s,f=d.coveringZoomLevel(this._source),t=Math.max(f-b.maxOverzooming,this._source.minzoom),u=Math.max(f+b.maxUnderzooming,this._source.minzoom),c=this._updateRetainedTiles(s,f);if(b$(this._source.type)){for(var i={},n={},j=0,o=Object.keys(c);j<o.length;j+=1){var k=o[j],p=c[k],l=this._tiles[k];if(l&&!(l.fadeEndTime&&l.fadeEndTime<=a.browser.now())){var g=this.findLoadedParent(p,t);g&&(this._addTile(g.tileID),i[g.tileID.key]=g.tileID),n[k]=p}}for(var h in this._retainLoadedChildren(n,f,u,c),i)c[h]||(this._coveredTiles[h]=!0,c[h]=i[h])}for(var v in c)this._tiles[v].clearFadeHold();for(var m=0,q=a.keysDifference(this._tiles,c);m<q.length;m+=1){var r=q[m],e=this._tiles[r];e.hasSymbolBuckets&&!e.holdingForFade()?e.setHoldDuration(this.map._fadeDuration):e.hasSymbolBuckets&&!e.symbolFadeFinished()||this._removeTile(r)}this._updateLoadedParentTileCache()}},b.prototype.releaseSymbolFadeTiles=function(){for(var a in this._tiles)this._tiles[a].holdingForFade()&&this._removeTile(a)},b.prototype._updateRetainedTiles=function(m,e){for(var a={},n={},t=Math.max(e-b.maxOverzooming,this._source.minzoom),u=Math.max(e+b.maxUnderzooming,this._source.minzoom),o={},i=0,p=m;i<p.length;i+=1){var f=p[i],v=this._addTile(f);a[f.key]=f,v.hasData()||e<this._source.maxzoom&&(o[f.key]=f)}this._retainLoadedChildren(o,e,u,a);for(var j=0,q=m;j<q.length;j+=1){var g=q[j],c=this._tiles[g.key];
1if(!c.hasData()){if(e+1>this._source.maxzoom){var k=g.children(this._source.maxzoom)[0],r=this.getTile(k);if(r&&r.hasData()){a[k.key]=k;continue}}else{var h=g.children(this._source.maxzoom);if(a[h[0].key]&&a[h[1].key]&&a[h[2].key]&&a[h[3].key])continue}for(var s=c.wasRequested(),l=g.overscaledZ-1;l>=t;--l){var d=g.scaledTo(l);if(n[d.key]||(n[d.key]=!0,(c=this.getTile(d))||!s||(c=this._addTile(d)),c&&(a[d.key]=d,s=c.wasRequested(),c.hasData())))break}}}return a},b.prototype._updateLoadedParentTileCache=function(){for(var g in this._loadedParentTiles={},this._tiles){for(var d=[],b=void 0,a=this._tiles[g].tileID;a.overscaledZ>0;){if(a.key in this._loadedParentTiles){b=this._loadedParentTiles[a.key];break}d.push(a.key);var e=a.scaledTo(a.overscaledZ-1);if(b=this._getLoadedTile(e))break;a=e}for(var c=0,f=d;c<f.length;c+=1)this._loadedParentTiles[f[c]]=b}},b.prototype._addTile=function(c){var b=this._tiles[c.key];if(b)return b;(b=this._cache.getAndRemove(c))&&(this._setTileReloadTimer(c.key,b),b.tileID=c,this._state.initializeTileState(b,this.map?this.map.painter:null),this._cacheTimers[c.key]&&(clearTimeout(this._cacheTimers[c.key]),delete this._cacheTimers[c.key],this._setTileReloadTimer(c.key,b)));var d=Boolean(b);return d||(b=new a.Tile(c,this._source.tileSize*c.overscaleFactor()),this._loadTile(b,this._tileLoaded.bind(this,b,c.key,b.state))),b?(b.uses++,this._tiles[c.key]=b,d||this._source.fire(new a.Event("dataloading",{tile:b,coord:b.tileID,dataType:"source"})),b):null},b.prototype._setTileReloadTimer=function(a,c){var d=this;a in this._timers&&(clearTimeout(this._timers[a]),delete this._timers[a]);var b=c.getExpiryTimeout();b&&(this._timers[a]=setTimeout(function(){d._reloadTile(a,"expired"),delete d._timers[a]},b))},b.prototype._removeTile=function(b){var a=this._tiles[b];a&&(a.uses--,delete this._tiles[b],this._timers[b]&&(clearTimeout(this._timers[b]),delete this._timers[b]),a.uses>0||(a.hasData()&&"reloading"!==a.state?this._cache.add(a.tileID,a,a.getExpiryTimeout()):(a.aborted=!0,this._abortTile(a),this._unloadTile(a))))},b.prototype.clearTiles=function(){for(var a in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(a);this._cache.reset()},b.prototype.tilesIn=function(c,r,m){var s=this,f=[],g=this.transform;if(!g)return f;for(var n=m?g.getCameraQueryGeometry(c):c,t=c.map(function(a){return g.pointCoordinate(a)}),o=n.map(function(a){return g.pointCoordinate(a)}),p=this.getIds(),h=1/0,i=1/0,j=-1/0,k=-1/0,d=0,l=o;d<l.length;d+=1){var b=l[d];h=Math.min(h,b.x),i=Math.min(i,b.y),j=Math.max(j,b.x),k=Math.max(k,b.y)}for(var q=function(m){var b=s._tiles[p[m]];if(!b.holdingForFade()){var e=b.tileID,l=Math.pow(2,g.zoom-b.tileID.overscaledZ),c=r*b.queryPadding*a.EXTENT/b.tileSize/l,d=[e.getTilePoint(new a.MercatorCoordinate(h,i)),e.getTilePoint(new a.MercatorCoordinate(j,k))];if(d[0].x-c<a.EXTENT&&d[0].y-c<a.EXTENT&&d[1].x+c>=0&&d[1].y+c>=0){var n=t.map(function(a){return e.getTilePoint(a)}),q=o.map(function(a){return e.getTilePoint(a)});f.push({tile:b,tileID:e,queryGeometry:n,cameraQueryGeometry:q,scale:l})}}},e=0;e<p.length;e++)q(e);return f},b.prototype.getVisibleCoordinates=function(e){for(var f=this,b=this.getRenderableIds(e).map(function(a){return f._tiles[a].tileID}),a=0,c=b;a<c.length;a+=1){var d=c[a];d.posMatrix=this.transform.calculatePosMatrix(d.toUnwrapped())}return b},b.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(b$(this._source.type))for(var c in this._tiles){var b=this._tiles[c];if(void 0!==b.fadeEndTime&&b.fadeEndTime>=a.browser.now())return!0}return!1},b.prototype.setFeatureState=function(a,b,c){this._state.updateState(a=a||"_geojsonTileLayer",b,c)},b.prototype.removeFeatureState=function(a,b,c){this._state.removeFeatureState(a=a||"_geojsonTileLayer",b,c)},b.prototype.getFeatureState=function(a,b){return this._state.getState(a=a||"_geojsonTileLayer",b)},b.prototype.setDependencies=function(b,c,d){var a=this._tiles[b];a&&a.setDependencies(c,d)},b.prototype.reloadTilesForDependencies=function(b,c){for(var a in this._tiles)this._tiles[a].hasDependency(b,c)&&this._reloadTile(a,"reloading");this._cache.filter(function(a){return!a.hasDependency(b,c)})},b}(a.Evented);function bZ(a,b){var c=Math.abs(2*a.wrap)- +(a.wrap<0),d=Math.abs(2*b.wrap)- +(b.wrap<0);return a.overscaledZ-b.overscaledZ||d-c||b.canonical.y-a.canonical.y||b.canonical.x-a.canonical.x}function b$(a){return"raster"===a||"image"===a||"video"===a}function b_(){return new a.window.Worker(a8.workerUrl)}ak.maxOverzooming=10,ak.maxUnderzooming=3;var b0="mapboxgl_preloaded_worker_pool",A=function(){this.active={}};
vendor: 34,334 bytes, line 1
1A.prototype.acquire=function(a){if(!this.workers)for(this.workers=[];this.workers.length<A.workerCount;)this.workers.push(new b_);return this.active[a]=!0,this.workers.slice()},A.prototype.release=function(a){delete this.active[a],0===this.numActive()&&(this.workers.forEach(function(a){a.terminate()}),this.workers=null)},A.prototype.isPreloaded=function(){return!!this.active[b0]},A.prototype.numActive=function(){return Object.keys(this.active).length};var b1,ax=Math.floor(a.browser.hardwareConcurrency/2);function b2(){return b1||(b1=new A),b1}function b3(c,e){var d={};for(var b in c)"ref"!==b&&(d[b]=c[b]);return a.refProperties.forEach(function(a){a in e&&(d[a]=e[a])}),d}function b4(a){a=a.slice();for(var d=Object.create(null),c=0;c<a.length;c++)d[a[c].id]=a[c];for(var b=0;b<a.length;b++)"ref"in a[b]&&(a[b]=b3(a[b],d[a[b].ref]));return a}A.workerCount=Math.max(Math.min(ax,6),1);var al={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 b5(a,b,c){c.push({command:al.addSource,args:[a,b[a]]})}function b6(a,b,c){b.push({command:al.removeSource,args:[a]}),c[a]=!0}function b7(a,c,b,d){b6(a,b,d),b5(a,c,b)}function b8(d,e,c){var b;for(b in d[c])if(d[c].hasOwnProperty(b)&&"data"!==b&&!a.deepEqual(d[c][b],e[c][b]))return!1;for(b in e[c])if(e[c].hasOwnProperty(b)&&"data"!==b&&!a.deepEqual(d[c][b],e[c][b]))return!1;return!0}function b9(d,c,e,f,g,h){var b;for(b in c=c||{},d=d||{})d.hasOwnProperty(b)&&(a.deepEqual(d[b],c[b])||e.push({command:h,args:[f,b,c[b],g]}));for(b in c)c.hasOwnProperty(b)&&!d.hasOwnProperty(b)&&(a.deepEqual(d[b],c[b])||e.push({command:h,args:[f,b,c[b],g]}))}function ca(a){return a.id}function cb(a,b){return a[b.id]=b,a}var am=function(a,b){this.reset(a,b)};am.prototype.reset=function(b,c){this.points=b||[],this._distances=[0];for(var a=1;a<this.points.length;a++)this._distances[a]=this._distances[a-1]+this.points[a].dist(this.points[a-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(c||0,.5*this.length),this.paddedLength=this.length-2*this.padding},am.prototype.lerp=function(c){if(1===this.points.length)return this.points[0];c=a.clamp(c,0,1);for(var b=1,d=this._distances[b],e=c*this.paddedLength+this.padding;d<e&&b<this._distances.length;)d=this._distances[++b];var f=b-1,g=this._distances[f],h=d-g,i=h>0?(e-g)/h:0;return this.points[f].mult(1-i).add(this.points[b].mult(i))};var g=function(a,b,c){var e=this.boxCells=[],f=this.circleCells=[];this.xCellCount=Math.ceil(a/c),this.yCellCount=Math.ceil(b/c);for(var d=0;d<this.xCellCount*this.yCellCount;d++)e.push([]),f.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=a,this.height=b,this.xScale=this.xCellCount/a,this.yScale=this.yCellCount/b,this.boxUid=0,this.circleUid=0};function cc(e,f,g,c,d){var b=a.create();return f?(a.scale(b,b,[1/d,1/d,1]),g||a.rotateZ(b,b,c.angle)):a.multiply(b,c.labelPlaneMatrix,e),b}function cd(e,f,g,c,d){if(f){var b=a.clone(e);return a.scale(b,b,[d,d,1]),g||a.rotateZ(b,b,-c.angle),b}return c.glCoordMatrix}function ce(d,e){var b=[d.x,d.y,0,1];cp(b,b,e);var c=b[3];return{point:new a.Point(b[0]/c,b[1]/c),signedDistanceFromCamera:c}}function cf(a,b){return .5+a/b*.5}function cg(a,b){var c=a[0]/a[3],d=a[1]/a[3];return c>= -b[0]&&c<=b[0]&&d>= -b[1]&&d<=b[1]}function ch(c,i,e,f,j,n,y,o){var p=f?c.textSizeData:c.iconSizeData,z=a.evaluateSizeForZoom(p,e.transform.zoom),A=[256/e.width*2+1,256/e.height*2+1],d=f?c.text.dynamicLayoutVertexArray:c.icon.dynamicLayoutVertexArray;d.clear();for(var q=c.lineVertexArray,r=f?c.text.placedSymbolArray:c.icon.placedSymbolArray,s=e.transform.width/e.transform.height,g=!1,k=0;k<r.length;k++){var b=r.get(k);if(b.hidden||b.writingMode===a.WritingMode.vertical&&!g)co(b.numGlyphs,d);else{g=!1;var h=[b.anchorX,b.anchorY,0,1];if(a.transformMat4(h,h,i),cg(h,A)){var t=cf(e.transform.cameraToCenterDistance,h[3]),u=a.evaluateSizeForFeature(p,z,b),v=y?u/t:u*t,l=new a.Point(b.anchorX,b.anchorY),w=ce(l,j).point,x={},m=ck(b,v,!1,o,i,j,n,c.glyphOffsetArray,q,d,w,l,x,s);g=m.useVertical,(m.notEnoughRoom||g||m.needsFlipping&&ck(b,v,!0,o,i,j,n,c.glyphOffsetArray,q,d,w,l,x,s).notEnoughRoom)&&co(b.numGlyphs,d)}else co(b.numGlyphs,d)}}f?c.text.dynamicLayoutVertexBuffer.updateData(d):c.icon.dynamicLayoutVertexBuffer.updateData(d)}function ci(b,c,d,e,f,g,h,a,i,j,k){var p=a.glyphStartIndex+a.numGlyphs,l=a.lineStartIndex,m=a.lineStartIndex+a.lineLength,q=c.getoffsetX(a.glyphStartIndex),r=c.getoffsetX(p-1),n=cm(b*q,d,e,f,g,h,a.segment,l,m,i,j,k);if(!n)return null;var o=cm(b*r,d,e,f,g,h,a.segment,l,m,i,j,k);return o?{first:n,last:o}:null}function cj(d,b,c,e){return d===a.WritingMode.horizontal&&Math.abs(c.y-b.y)>Math.abs(c.x-b.x)*e?{useVertical:!0}:(d===a.WritingMode.vertical?b.y<c.y:b.x>c.x)?{needsFlipping:!0}:null}function ck(b,D,c,r,i,j,s,k,d,E,l,e,m,t){var f,g=D/24,n=b.lineOffsetX*g,o=b.lineOffsetY*g;if(b.numGlyphs>1){var F=b.glyphStartIndex+b.numGlyphs,G=b.lineStartIndex,H=b.lineStartIndex+b.lineLength,h=ci(g,k,n,o,c,l,e,b,d,j,m);if(!h)return{notEnoughRoom:!0};var I=ce(h.first.point,s).point,J=ce(h.last.point,s).point;if(r&&!c){var u=cj(b.writingMode,I,J,t);if(u)return u}f=[h.first];for(var p=b.glyphStartIndex+1;p<F-1;p++)f.push(cm(g*k.getoffsetX(p),n,o,c,l,e,b.segment,G,H,d,j,m));f.push(h.last)}else{if(r&&!c){var v=ce(e,i).point,w=b.lineStartIndex+b.segment+1,x=new a.Point(d.getx(w),d.gety(w)),y=ce(x,i),K=y.signedDistanceFromCamera>0?y.point:cl(e,x,v,1,i),z=cj(b.writingMode,v,K,t);if(z)return z}var A=cm(g*k.getoffsetX(b.glyphStartIndex),n,o,c,l,e,b.segment,b.lineStartIndex,b.lineStartIndex+b.lineLength,d,j,m);if(!A)return{notEnoughRoom:!0};f=[A]}for(var q=0,B=f;q<B.length;q+=1){var C=B[q];a.addDynamicAttributes(E,C.point,C.angle)}return{}}function cl(a,d,b,e,f){var g=ce(a.add(a.sub(d)._unit()),f).point,c=b.sub(g);return b.add(c._mult(e/c.mag()))}function cm(n,o,z,p,q,A,r,i,B,g,s,t){var u=p?n-o:n+o,e=u>0?1:-1,j=0;p&&(e*=-1,j=Math.PI),e<0&&(j+=Math.PI);for(var c=e>0?i+r:i+r+1,b=q,d=q,f=0,h=0,k=Math.abs(u),l=[];f+h<=k;){if((c+=e)<i||c>=B)return null;if(d=b,l.push(b),void 0===(b=t[c])){var v=new a.Point(g.getx(c),g.gety(c)),w=ce(v,s);if(w.signedDistanceFromCamera>0)b=t[c]=w.point;else{var x=c-e;b=cl(0===f?A:new a.Point(g.getx(x),g.gety(x)),v,d,k-f+1,s)}}f+=h,h=d.dist(b)}var C=(k-f)/h,y=b.sub(d),m=y.mult(C)._add(d);m._add(y._unit()._perp()._mult(z*e));var D=j+Math.atan2(b.y-d.y,b.x-d.x);return l.push(m),{point:m,angle:D,path:l}}g.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},g.prototype.insert=function(e,a,b,c,d){this._forEachCell(a,b,c,d,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(a),this.bboxes.push(b),this.bboxes.push(c),this.bboxes.push(d)},g.prototype.insertCircle=function(d,b,c,a){this._forEachCell(b-a,c-a,b+a,c+a,this._insertCircleCell,this.circleUid++),this.circleKeys.push(d),this.circles.push(b),this.circles.push(c),this.circles.push(a)},g.prototype._insertBoxCell=function(c,d,e,f,a,b){this.boxCells[a].push(b)},g.prototype._insertCircleCell=function(c,d,e,f,a,b){this.circleCells[a].push(b)},g.prototype._query=function(f,g,h,i,d,j){if(h<0||f>this.width||i<0||g>this.height)return!d&&[];var a=[];if(f<=0&&g<=0&&this.width<=h&&this.height<=i){if(d)return!0;for(var b=0;b<this.boxKeys.length;b++)a.push({key:this.boxKeys[b],x1:this.bboxes[4*b],y1:this.bboxes[4*b+1],x2:this.bboxes[4*b+2],y2:this.bboxes[4*b+3]});for(var c=0;c<this.circleKeys.length;c++){var k=this.circles[3*c],l=this.circles[3*c+1],e=this.circles[3*c+2];a.push({key:this.circleKeys[c],x1:k-e,y1:l-e,x2:k+e,y2:l+e})}return j?a.filter(j):a}return this._forEachCell(f,g,h,i,this._queryCell,a,{hitTest:d,seenUids:{box:{},circle:{}}},j),d?a.length>0:a},g.prototype._queryCircle=function(b,c,a,d,j){var f=b-a,g=b+a,h=c-a,i=c+a;if(g<0||f>this.width||i<0||h>this.height)return!d&&[];var e=[];return this._forEachCell(f,h,g,i,this._queryCellCircle,e,{hitTest:d,circle:{x:b,y:c,radius:a},seenUids:{box:{},circle:{}}},j),d?e.length>0:e},g.prototype.query=function(a,b,c,d,e){return this._query(a,b,c,d,!1,e)},g.prototype.hitTest=function(a,b,c,d,e){return this._query(a,b,c,d,!0,e)},g.prototype.hitTestCircle=function(a,b,c,d){return this._queryCircle(a,b,c,!0,d)},g.prototype._queryCell=function(n,o,p,q,r,g,k,h){var i=k.seenUids,s=this.boxCells[r];if(null!==s)for(var a=this.bboxes,l=0,t=s;l<t.length;l+=1){var e=t[l];if(!i.box[e]){i.box[e]=!0;var b=4*e;if(n<=a[b+2]&&o<=a[b+3]&&p>=a[b+0]&&q>=a[b+1]&&(!h||h(this.boxKeys[e]))){if(k.hitTest)return g.push(!0),!0;g.push({key:this.boxKeys[e],x1:a[b],y1:a[b+1],x2:a[b+2],y2:a[b+3]})}}}var u=this.circleCells[r];if(null!==u)for(var c=this.circles,m=0,v=u;m<v.length;m+=1){var f=v[m];if(!i.circle[f]){i.circle[f]=!0;var d=3*f;if(this._circleAndRectCollide(c[d],c[d+1],c[d+2],n,o,p,q)&&(!h||h(this.circleKeys[f]))){if(k.hitTest)return g.push(!0),!0;var w=c[d],x=c[d+1],j=c[d+2];g.push({key:this.circleKeys[f],x1:w-j,y1:x-j,x2:w+j,y2:x+j})}}}},g.prototype._queryCellCircle=function(s,t,u,v,l,m,n,b){var a=n.circle,c=n.seenUids,o=this.boxCells[l];if(null!==o)for(var d=this.bboxes,h=0,p=o;h<p.length;h+=1){var e=p[h];if(!c.box[e]){c.box[e]=!0;var f=4*e;if(this._circleAndRectCollide(a.x,a.y,a.radius,d[f+0],d[f+1],d[f+2],d[f+3])&&(!b||b(this.boxKeys[e])))return m.push(!0),!0}}var q=this.circleCells[l];if(null!==q)for(var i=this.circles,j=0,r=q;j<r.length;j+=1){var g=r[j];if(!c.circle[g]){c.circle[g]=!0;var k=3*g;if(this._circlesCollide(i[k],i[k+1],i[k+2],a.x,a.y,a.radius)&&(!b||b(this.circleKeys[g])))return m.push(!0),!0}}},g.prototype._forEachCell=function(c,d,e,f,g,h,i,j){for(var k=this._convertToXCellCoord(c),l=this._convertToYCellCoord(d),m=this._convertToXCellCoord(e),n=this._convertToYCellCoord(f),a=k;a<=m;a++)for(var b=l;b<=n;b++)if(g.call(this,c,d,e,f,this.xCellCount*b+a,h,i,j))return},g.prototype._convertToXCellCoord=function(a){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(a*this.xScale)))},g.prototype._convertToYCellCoord=function(a){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(a*this.yScale)))},g.prototype._circlesCollide=function(d,e,f,g,h,i){var a=g-d,b=h-e,c=f+i;return c*c>a*a+b*b},g.prototype._circleAndRectCollide=function(j,k,a,f,g,l,m){var b=(l-f)/2,d=Math.abs(j-(f+b));if(d>b+a)return!1;var c=(m-g)/2,e=Math.abs(k-(g+c));if(e>c+a)return!1;if(d<=b||e<=c)return!0;var h=d-b,i=e-c;return h*h+i*i<=a*a};var cn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function co(d,a){for(var b=0;b<d;b++){var c=a.length;a.resize(c+4),a.float32.set(cn,3*c)}}function cp(b,e,a){var c=e[0],d=e[1];return b[0]=a[0]*c+a[4]*d+a[12],b[1]=a[1]*c+a[5]*d+a[13],b[3]=a[3]*c+a[7]*d+a[15],b}var u=function(a,b,c){void 0===b&&(b=new g(a.width+200,a.height+200,25)),void 0===c&&(c=new g(a.width+200,a.height+200,25)),this.transform=a,this.grid=b,this.ignoredGrid=c,this.pitchfactor=Math.cos(a._pitch)*a.cameraToCenterDistance,this.screenRightBoundary=a.width+100,this.screenBottomBoundary=a.height+100,this.gridRightBoundary=a.width+200,this.gridBottomBoundary=a.height+200};function cq(b,c,d){return c*(a.EXTENT/(b.tileSize*Math.pow(2,d-b.tileID.overscaledZ)))}u.prototype.placeCollisionBox=function(a,h,i,j,k){var b=this.projectAndGetPerspectiveRatio(j,a.anchorPointX,a.anchorPointY),c=i*b.perspectiveRatio,d=a.x1*c+b.point.x,e=a.y1*c+b.point.y,f=a.x2*c+b.point.x,g=a.y2*c+b.point.y;return!this.isInsideGrid(d,e,f,g)|| !h&&this.grid.hitTest(d,e,f,g,k)?{box:[],offscreen:!1}:{box:[d,e,f,g],offscreen:this.isOffscreen(d,e,f,g)}},u.prototype.placeCollisionCircles=function(M,i,N,O,y,P,z,Q,A,R,S,T,U){var B=[],n=new a.Point(i.anchorX,i.anchorY),V=ce(n,P),o=cf(this.transform.cameraToCenterDistance,V.signedDistanceFromCamera),p=(R?y/o:y*o)/a.ONE_EM,W=ce(n,z).point,q=ci(p,O,i.lineOffsetX*p,i.lineOffsetY*p,!1,W,n,i,N,z,{}),j=!1,r=!1,s=!0;if(q){for(var t,c=.5*T*o+U,f=new a.Point(-100,-100),g=new a.Point(this.screenRightBoundary,this.screenBottomBoundary),k=new am,C=q.first,D=q.last,b=[],u=C.path.length-1;u>=1;u--)b.push(C.path[u]);for(var v=1;v<D.path.length;v++)b.push(D.path[v]);var X=2.5*c;if(Q){var E=b.map(function(a){return ce(a,Q)});b=E.some(function(a){return a.signedDistanceFromCamera<=0})?[]:E.map(function(a){return a.point})}var F=[];if(b.length>0){for(var d=b[0].clone(),e=b[0].clone(),h=1;h<b.length;h++)d.x=Math.min(d.x,b[h].x),d.y=Math.min(d.y,b[h].y),e.x=Math.max(e.x,b[h].x),e.y=Math.max(e.y,b[h].y);F=d.x>=f.x&&e.x<=g.x&&d.y>=f.y&&e.y<=g.y?[b]:e.x<f.x||d.x>g.x||e.y<f.y||d.y>g.y?[]:a.clipLine([b],f.x,f.y,g.x,g.y)}for(var w=0,G=F;w<G.length;w+=1){k.reset(G[w],.25*c),t=k.length<=.5*c?1:Math.ceil(k.paddedLength/X)+1;for(var x=0;x<t;x++){var Y=x/Math.max(t-1,1),H=k.lerp(Y),l=H.x+100,m=H.y+100;B.push(l,m,c,0);var I=l-c,J=m-c,K=l+c,L=m+c;if(s=s&&this.isOffscreen(I,J,K,L),r=r||this.isInsideGrid(I,J,K,L),!M&&this.grid.hitTestCircle(l,m,c,S)&&(j=!0,!A))return{circles:[],offscreen:!1,collisionDetected:j}}}}return{circles:(A||!j)&&r?B:[],offscreen:s,collisionDetected:j}},u.prototype.queryRenderedSymbols=function(m){if(0===m.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var n=[],e=1/0,f=1/0,g=-1/0,h=-1/0,k=0,o=m;k<o.length;k+=1){var p=o[k],d=new a.Point(p.x+100,p.y+100);e=Math.min(e,d.x),f=Math.min(f,d.y),g=Math.max(g,d.x),h=Math.max(h,d.y),n.push(d)}for(var i={},j={},l=0,q=this.grid.query(e,f,g,h).concat(this.ignoredGrid.query(e,f,g,h));l<q.length;l+=1){var c=q[l],b=c.key;if(void 0===i[b.bucketInstanceId]&&(i[b.bucketInstanceId]={}),!i[b.bucketInstanceId][b.featureIndex]){var r=[new a.Point(c.x1,c.y1),new a.Point(c.x2,c.y1),new a.Point(c.x2,c.y2),new a.Point(c.x1,c.y2)];a.polygonIntersectsPolygon(n,r)&&(i[b.bucketInstanceId][b.featureIndex]=!0,void 0===j[b.bucketInstanceId]&&(j[b.bucketInstanceId]=[]),j[b.bucketInstanceId].push(b.featureIndex))}}return j},u.prototype.insertCollisionBox=function(a,b,c,d,e){(b?this.ignoredGrid:this.grid).insert({bucketInstanceId:c,featureIndex:d,collisionGroupID:e},a[0],a[1],a[2],a[3])},u.prototype.insertCollisionCircles=function(b,c,d,e,f){for(var g=c?this.ignoredGrid:this.grid,h={bucketInstanceId:d,featureIndex:e,collisionGroupID:f},a=0;a<b.length;a+=4)g.insertCircle(h,b[a],b[a+1],b[a+2])},u.prototype.projectAndGetPerspectiveRatio=function(c,d,e){var b=[d,e,0,1];return cp(b,b,c),{point:new a.Point((b[0]/b[3]+1)/2*this.transform.width+100,(-b[1]/b[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/b[3]*.5}},u.prototype.isOffscreen=function(a,b,c,d){return c<100||a>=this.screenRightBoundary||d<100||b>this.screenBottomBoundary},u.prototype.isInsideGrid=function(a,b,c,d){return c>=0&&a<this.gridRightBoundary&&d>=0&&b<this.gridBottomBoundary},u.prototype.getViewportMatrix=function(){var b=a.identity([]);return a.translate(b,b,[-100,-100,0]),b};var ay=function(a,b,c,d){this.opacity=a?Math.max(0,Math.min(1,a.opacity+(a.placed?b:-b))):d&&c?1:0,this.placed=c};ay.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var az=function(a,b,d,e,c){this.text=new ay(a?a.text:null,b,d,c),this.icon=new ay(a?a.icon:null,b,e,c)};az.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var cr=function(a,b,c){this.text=a,this.icon=b,this.skipFade=c},cs=function(){this.invProjMatrix=a.create(),this.viewportMatrix=a.create(),this.circles=[]},ct=function(a,b,c,d,e){this.bucketInstanceId=a,this.featureIndex=b,this.sourceLayerIndex=c,this.bucketIndex=d,this.tileID=e},aA=function(a){this.crossSourceCollisions=a,this.maxGroupID=0,this.collisionGroups={}};function cu(b,f,g,h,c){var d=a.getAnchorAlignment(b),i=-(d.horizontalAlign-.5)*f,j=-(d.verticalAlign-.5)*g,e=a.evaluateVariableOffset(b,h);return new a.Point(i+e[0]*c,j+e[1]*c)}function cv(b,e,f,g,h,d){var i=b.x1,j=b.x2,k=b.y1,l=b.y2,m=b.anchorPointX,n=b.anchorPointY,c=new a.Point(e,f);return g&&c._rotate(h?d:-d),{x1:i+c.x,y1:k+c.y,x2:j+c.x,y2:l+c.y,anchorPointX:m,anchorPointY:n}}aA.prototype.get=function(a){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[a]){var b=++this.maxGroupID;this.collisionGroups[a]={ID:b,predicate:function(a){return a.collisionGroupID===b}}}return this.collisionGroups[a]};var l=function(b,c,d,a){this.transform=b.clone(),this.collisionIndex=new u(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=c,this.retainedQueryData={},this.collisionGroups=new aA(d),this.collisionCircleArrays={},this.prevPlacement=a,a&&(a.prevPlacement=void 0),this.placedOrientations={}};function cw(a,b,c,d,e){a.emplaceBack(b?1:0,c?1:0,d||0,e||0),a.emplaceBack(b?1:0,c?1:0,d||0,e||0),a.emplaceBack(b?1:0,c?1:0,d||0,e||0),a.emplaceBack(b?1:0,c?1:0,d||0,e||0)}function cx(a){if(0===a.opacity&&!a.placed)return 0;if(1===a.opacity&&a.placed)return 4294967295;var b=a.placed?1:0,c=Math.floor(127*a.opacity);return 33554432*c+16777216*b+131072*c+65536*b+512*c+256*b+2*c+b}l.prototype.getBucketParts=function(i,j,c,q){var b=c.getBucket(j),k=c.latestFeatureIndex;if(b&&k&&j.id===b.layerIds[0]){var r=c.collisionBoxArray,d=b.layers[0].layout,s=Math.pow(2,this.transform.zoom-c.tileID.overscaledZ),t=c.tileSize/a.EXTENT,e=this.transform.calculatePosMatrix(c.tileID.toUnwrapped()),f="map"===d.get("text-pitch-alignment"),l="map"===d.get("text-rotation-alignment"),m=cq(c,1,this.transform.zoom),u=cc(e,f,l,this.transform,m),n=null;if(f){var v=cd(e,f,l,this.transform,m);n=a.multiply([],this.transform.labelPlaneMatrix,v)}this.retainedQueryData[b.bucketInstanceId]=new ct(b.bucketInstanceId,k,b.sourceLayerIndex,b.index,c.tileID);var o={bucket:b,layout:d,posMatrix:e,textLabelPlaneMatrix:u,labelToScreenMatrix:n,scale:s,textPixelRatio:t,holdingForFade:c.holdingForFade(),collisionBoxArray:r,partiallyEvaluatedTextSize:a.evaluateSizeForZoom(b.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(b.sourceID)};if(q)for(var g=0,p=b.sortKeyRanges;g<p.length;g+=1){var h=p[g];i.push({sortKey:h.sortKey,symbolInstanceStart:h.symbolInstanceStart,symbolInstanceEnd:h.symbolInstanceEnd,parameters:o})}else i.push({symbolInstanceStart:0,symbolInstanceEnd:b.symbolInstances.length,parameters:o})}},l.prototype.attemptAnchorPlacement=function(c,s,f,g,h,i,j,k,l,m,n,a,d,e,o){var p,q=[a.textOffset0,a.textOffset1],b=cu(c,f,g,q,h),r=this.collisionIndex.placeCollisionBox(cv(s,b.x,b.y,i,j,this.transform.angle),n,k,l,m.predicate);if(!o||0!==this.collisionIndex.placeCollisionBox(cv(o,b.x,b.y,i,j,this.transform.angle),n,k,l,m.predicate).box.length)return r.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[a.crossTileID]&&this.prevPlacement.placements[a.crossTileID]&&this.prevPlacement.placements[a.crossTileID].text&&(p=this.prevPlacement.variableOffsets[a.crossTileID].anchor),this.variableOffsets[a.crossTileID]={textOffset:q,width:f,height:g,anchor:c,textBoxScale:h,prevAnchor:p},this.markUsedJustification(d,c,a,e),d.allowVerticalPlacement&&(this.markUsedOrientation(d,e,a),this.placedOrientations[a.crossTileID]=e),{shift:b,placedGlyphBoxes:r}):void 0},l.prototype.placeLayerBucketPart=function(f,t,o){var u=this,c=f.parameters,b=c.bucket,d=c.layout,p=c.posMatrix,v=c.textLabelPlaneMatrix,w=c.labelToScreenMatrix,x=c.textPixelRatio,y=c.holdingForFade,h=c.collisionBoxArray,z=c.partiallyEvaluatedTextSize,A=c.collisionGroup,q=d.get("text-optional"),r=d.get("icon-optional"),i=d.get("text-allow-overlap"),j=d.get("icon-allow-overlap"),B="map"===d.get("text-rotation-alignment"),C="map"===d.get("text-pitch-alignment"),D="none"!==d.get("icon-text-fit"),s="viewport-y"===d.get("symbol-z-order"),E=i&&(j||!b.hasIconData()||r),F=j&&(i||!b.hasTextData()||q);!b.collisionArrays&&h&&b.deserializeCollisionBoxes(h);var k=function(c,f){if(!t[c.crossTileID]){if(y)u.placements[c.crossTileID]=new cr(!1,!1,!1);else{var k,e=!1,l=!1,m=!0,Z=null,h={box:null,offscreen:null},s={box:null,offscreen:null},g=null,G=null,I=0,J=0,M=0;f.textFeatureIndex?I=f.textFeatureIndex:c.useRuntimeCollisionCircles&&(I=c.featureIndex),f.verticalTextFeatureIndex&&(J=f.verticalTextFeatureIndex);var V=f.textBox;if(V){var N=function(f){var e=a.WritingMode.horizontal;if(b.allowVerticalPlacement&&!f&&u.prevPlacement){var d=u.prevPlacement.placedOrientations[c.crossTileID];d&&(u.placedOrientations[c.crossTileID]=d,u.markUsedOrientation(b,e=d,c))}return e},O=function(e,i){if(b.allowVerticalPlacement&&c.numVerticalGlyphVertices>0&&f.verticalTextBox)for(var d=0,g=b.writingModes;d<g.length&&(g[d]===a.WritingMode.vertical?s=h=i():h=e(),!(h&&h.box&&h.box.length));d+=1);else h=e()};if(d.get("text-variable-anchor")){var K=d.get("text-variable-anchor");if(u.prevPlacement&&u.prevPlacement.variableOffsets[c.crossTileID]){var P=u.prevPlacement.variableOffsets[c.crossTileID];K.indexOf(P.anchor)>0&&(K=K.filter(function(a){return a!==P.anchor})).unshift(P.anchor)}var $=function(a,h,k){for(var l=a.x2-a.x1,m=a.y2-a.y1,n=c.textBoxScale,o=D&&!j?h:null,d={box:[],offscreen:!1},q=i?2*K.length:K.length,f=0;f<q;++f){var g=u.attemptAnchorPlacement(K[f%K.length],a,l,m,n,B,C,x,p,A,f>=K.length,c,b,k,o);if(g&&(d=g.placedGlyphBoxes)&&d.box&&d.box.length){e=!0,Z=g.shift;break}}return d};O(function(){return $(V,f.iconBox,a.WritingMode.horizontal)},function(){var d=f.verticalTextBox;return b.allowVerticalPlacement&&!(h&&h.box&&h.box.length)&&c.numVerticalGlyphVertices>0&&d?$(d,f.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}}),h&&(e=h.box,m=h.offscreen);var W=N(h&&h.box);if(!e&&u.prevPlacement){var L=u.prevPlacement.variableOffsets[c.crossTileID];L&&(u.variableOffsets[c.crossTileID]=L,u.markUsedJustification(b,L.anchor,c,W))}}else{var _=function(e,d){var a=u.collisionIndex.placeCollisionBox(e,i,x,p,A.predicate);return a&&a.box&&a.box.length&&(u.markUsedOrientation(b,d,c),u.placedOrientations[c.crossTileID]=d),a};O(function(){return _(V,a.WritingMode.horizontal)},function(){var d=f.verticalTextBox;return b.allowVerticalPlacement&&c.numVerticalGlyphVertices>0&&d?_(d,a.WritingMode.vertical):{box:null,offscreen:null}}),N(h&&h.box&&h.box.length)}}if(e=(k=h)&&k.box&&k.box.length>0,m=k&&k.offscreen,c.useRuntimeCollisionCircles){var Q=b.text.placedSymbolArray.get(c.centerJustifiedTextSymbolIndex),X=a.evaluateSizeForFeature(b.textSizeData,z,Q),Y=d.get("text-padding");g=u.collisionIndex.placeCollisionCircles(i,Q,b.lineVertexArray,b.glyphOffsetArray,X,p,v,w,o,C,A.predicate,c.collisionCircleDiameter,Y),e=i||g.circles.length>0&&!g.collisionDetected,m=m&&g.offscreen}if(f.iconFeatureIndex&&(M=f.iconFeatureIndex),f.iconBox){var R=function(a){var b=D&&Z?cv(a,Z.x,Z.y,B,C,u.transform.angle):a;return u.collisionIndex.placeCollisionBox(b,j,x,p,A.predicate)};l=s&&s.box&&s.box.length&&f.verticalIconBox?(G=R(f.verticalIconBox)).box.length>0:(G=R(f.iconBox)).box.length>0,m=m&&G.offscreen}var S=q||0===c.numHorizontalGlyphVertices&&0===c.numVerticalGlyphVertices,T=r||0===c.numIconVertices;if(S||T?T?S||(l=l&&e):e=l&&e:l=e=l&&e,e&&k&&k.box&&u.collisionIndex.insertCollisionBox(k.box,d.get("text-ignore-placement"),b.bucketInstanceId,s&&s.box&&J?J:I,A.ID),l&&G&&u.collisionIndex.insertCollisionBox(G.box,d.get("icon-ignore-placement"),b.bucketInstanceId,M,A.ID),g&&(e&&u.collisionIndex.insertCollisionCircles(g.circles,d.get("text-ignore-placement"),b.bucketInstanceId,I,A.ID),o)){var U=b.bucketInstanceId,n=u.collisionCircleArrays[U];void 0===n&&(n=u.collisionCircleArrays[U]=new cs);for(var H=0;H<g.circles.length;H+=4)n.circles.push(g.circles[H+0]),n.circles.push(g.circles[H+1]),n.circles.push(g.circles[H+2]),n.circles.push(g.collisionDetected?1:0)}u.placements[c.crossTileID]=new cr(e||E,l||F,m||b.justReloaded),t[c.crossTileID]=!0}}};if(s)for(var l=b.getSortedSymbolIndexes(this.transform.angle),g=l.length-1;g>=0;--g){var m=l[g];k(b.symbolInstances.get(m),b.collisionArrays[m])}else for(var e=f.symbolInstanceStart;e<f.symbolInstanceEnd;e++)k(b.symbolInstances.get(e),b.collisionArrays[e]);if(o&&b.bucketInstanceId in this.collisionCircleArrays){var n=this.collisionCircleArrays[b.bucketInstanceId];a.invert(n.invProjMatrix,p),n.viewportMatrix=this.collisionIndex.getViewportMatrix()}b.justReloaded=!1},l.prototype.markUsedJustification=function(g,h,b,i){var c;c=i===a.WritingMode.vertical?b.verticalPlacedTextSymbolIndex:({left:b.leftJustifiedTextSymbolIndex,center:b.centerJustifiedTextSymbolIndex,right:b.rightJustifiedTextSymbolIndex})[a.getAnchorJustification(h)];for(var d=0,f=[b.leftJustifiedTextSymbolIndex,b.centerJustifiedTextSymbolIndex,b.rightJustifiedTextSymbolIndex,b.verticalPlacedTextSymbolIndex];d<f.length;d+=1){var e=f[d];e>=0&&(g.text.placedSymbolArray.get(e).crossTileID=c>=0&&e!==c?0:b.crossTileID)}},l.prototype.markUsedOrientation=function(e,b,c){for(var g=b===a.WritingMode.horizontal||b===a.WritingMode.horizontalOnly?b:0,h=b===a.WritingMode.vertical?b:0,d=0,f=[c.leftJustifiedTextSymbolIndex,c.centerJustifiedTextSymbolIndex,c.rightJustifiedTextSymbolIndex];d<f.length;d+=1)e.text.placedSymbolArray.get(f[d]).placedOrientation=g;c.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(c.verticalPlacedTextSymbolIndex).placedOrientation=h)},l.prototype.commit=function(f){this.commitTime=f,this.zoomAtLastRecencyCheck=this.transform.zoom;var a=this.prevPlacement,c=!1;this.prevZoomAdjustment=a?a.zoomAdjustment(this.transform.zoom):0;var i=a?a.symbolFadeChange(f):1,j=a?a.opacities:{},m=a?a.variableOffsets:{},n=a?a.placedOrientations:{};for(var g in this.placements){var b=this.placements[g],h=j[g];h?(this.opacities[g]=new az(h,i,b.text,b.icon),c=c||b.text!==h.text.placed||b.icon!==h.icon.placed):(this.opacities[g]=new az(null,i,b.text,b.icon,b.skipFade),c=c||b.text||b.icon)}for(var k in j){var l=j[k];if(!this.opacities[k]){var o=new az(l,i,!1,!1);o.isHidden()||(this.opacities[k]=o,c=c||l.text.placed||l.icon.placed)}}for(var d in m)this.variableOffsets[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.variableOffsets[d]=m[d]);for(var e in n)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=n[e]);c?this.lastPlacementChangeTime=f:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=a?a.lastPlacementChangeTime:f)},l.prototype.updateLayerOpacities=function(d,f){for(var g={},a=0,e=f;a<e.length;a+=1){var b=e[a],c=b.getBucket(d);c&&b.latestFeatureIndex&&d.id===c.layerIds[0]&&this.updateBucketOpacities(c,g,b.collisionBoxArray)}},l.prototype.updateBucketOpacities=function(b,i,f){var j=this;b.hasTextData()&&b.text.opacityVertexArray.clear(),b.hasIconData()&&b.icon.opacityVertexArray.clear(),b.hasIconCollisionBoxData()&&b.iconCollisionBox.collisionVertexArray.clear(),b.hasTextCollisionBoxData()&&b.textCollisionBox.collisionVertexArray.clear();var c=b.layers[0].layout,k=new az(null,0,!1,!1,!0),g=c.get("text-allow-overlap"),h=c.get("icon-allow-overlap"),l=c.get("text-variable-anchor"),m="map"===c.get("text-rotation-alignment"),n="map"===c.get("text-pitch-alignment"),o="none"!==c.get("icon-text-fit"),p=new az(null,0,g&&(h||!b.hasIconData()||c.get("icon-optional")),h&&(g||!b.hasTextData()||c.get("text-optional")),!0);!b.collisionArrays&&f&&(b.hasIconCollisionBoxData()||b.hasTextCollisionBoxData())&&b.deserializeCollisionBoxes(f);for(var q=function(b,c,d){for(var a=0;a<c/4;a++)b.opacityVertexArray.emplaceBack(d)},d=0;d<b.symbolInstances.length;d++)(function(w){var c=b.symbolInstances.get(w),x=c.numHorizontalGlyphVertices,y=c.numVerticalGlyphVertices,h=c.crossTileID,d=j.opacities[h];i[h]?d=k:d||(j.opacities[h]=d=p),i[h]=!0;var E=c.numIconVertices>0,r=j.placedOrientations[c.crossTileID],t=r===a.WritingMode.vertical,s=r===a.WritingMode.horizontal||r===a.WritingMode.horizontalOnly;if(x>0||y>0){var z=cx(d.text);q(b.text,x,t?cy:z),q(b.text,y,s?cy:z);var F=d.text.isHidden();[c.rightJustifiedTextSymbolIndex,c.centerJustifiedTextSymbolIndex,c.leftJustifiedTextSymbolIndex].forEach(function(a){a>=0&&(b.text.placedSymbolArray.get(a).hidden=F||t?1:0)}),c.verticalPlacedTextSymbolIndex>=0&&(b.text.placedSymbolArray.get(c.verticalPlacedTextSymbolIndex).hidden=F||s?1:0);var A=j.variableOffsets[c.crossTileID];A&&j.markUsedJustification(b,A.anchor,c,r);var u=j.placedOrientations[c.crossTileID];u&&(j.markUsedJustification(b,"left",c,u),j.markUsedOrientation(b,u,c))}if(E){var B=cx(d.icon),C=!(o&&c.verticalPlacedIconSymbolIndex&&t);c.placedIconSymbolIndex>=0&&(q(b.icon,c.numIconVertices,C?B:cy),b.icon.placedSymbolArray.get(c.placedIconSymbolIndex).hidden=d.icon.isHidden()),c.verticalPlacedIconSymbolIndex>=0&&(q(b.icon,c.numVerticalIconVertices,C?cy:B),b.icon.placedSymbolArray.get(c.verticalPlacedIconSymbolIndex).hidden=d.icon.isHidden())}if(b.hasIconCollisionBoxData()||b.hasTextCollisionBoxData()){var f=b.collisionArrays[w];if(f){var e=new a.Point(0,0);if(f.textBox||f.verticalTextBox){var v=!0;if(l){var g=j.variableOffsets[h];g?(e=cu(g.anchor,g.width,g.height,g.textOffset,g.textBoxScale),m&&e._rotate(n?j.transform.angle:-j.transform.angle)):v=!1}f.textBox&&cw(b.textCollisionBox.collisionVertexArray,d.text.placed,!v||t,e.x,e.y),f.verticalTextBox&&cw(b.textCollisionBox.collisionVertexArray,d.text.placed,!v||s,e.x,e.y)}var D=Boolean(!s&&f.verticalIconBox);f.iconBox&&cw(b.iconCollisionBox.collisionVertexArray,d.icon.placed,D,o?e.x:0,o?e.y:0),f.verticalIconBox&&cw(b.iconCollisionBox.collisionVertexArray,d.icon.placed,!D,o?e.x:0,o?e.y:0)}}})(d);if(b.sortFeatures(this.transform.angle),this.retainedQueryData[b.bucketInstanceId]&&(this.retainedQueryData[b.bucketInstanceId].featureSortOrder=b.featureSortOrder),b.hasTextData()&&b.text.opacityVertexBuffer&&b.text.opacityVertexBuffer.updateData(b.text.opacityVertexArray),b.hasIconData()&&b.icon.opacityVertexBuffer&&b.icon.opacityVertexBuffer.updateData(b.icon.opacityVertexArray),b.hasIconCollisionBoxData()&&b.iconCollisionBox.collisionVertexBuffer&&b.iconCollisionBox.collisionVertexBuffer.updateData(b.iconCollisionBox.collisionVertexArray),b.hasTextCollisionBoxData()&&b.textCollisionBox.collisionVertexBuffer&&b.textCollisionBox.collisionVertexBuffer.updateData(b.textCollisionBox.collisionVertexArray),b.bucketInstanceId in this.collisionCircleArrays){var e=this.collisionCircleArrays[b.bucketInstanceId];b.placementInvProjMatrix=e.invProjMatrix,b.placementViewportMatrix=e.viewportMatrix,b.collisionCircleArray=e.circles,delete this.collisionCircleArrays[b.bucketInstanceId]}},l.prototype.symbolFadeChange=function(a){return 0===this.fadeDuration?1:(a-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},l.prototype.zoomAdjustment=function(a){return Math.max(0,(this.transform.zoom-a)/1.5)},l.prototype.hasTransitions=function(a){return this.stale||a-this.lastPlacementChangeTime<this.fadeDuration},l.prototype.stillRecent=function(b,a){var c=this.zoomAtLastRecencyCheck===a?1-this.zoomAdjustment(a):1;return this.zoomAtLastRecencyCheck=a,this.commitTime+this.fadeDuration*c>b},l.prototype.setStale=function(){this.stale=!0};var cy=0,aB=function(a){this._sortAcrossTiles="viewport-y"!==a.layout.get("symbol-z-order")&& void 0!==a.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};aB.prototype.continuePlacement=function(b,c,e,f,d){for(var a=this._bucketParts;this._currentTileIndex<b.length;)if(c.getBucketParts(a,f,b[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,d())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,a.sort(function(a,b){return a.sortKey-b.sortKey}));this._currentPartIndex<a.length;)if(c.placeLayerBucketPart(a[this._currentPartIndex],this._seenCrossTileIDs,e),this._currentPartIndex++,d())return!0;return!1};var ab=function(a,b,c,d,e,f,g){this.placement=new l(a,e,f,g),this._currentPlacementIndex=b.length-1,this._forceFullPlacement=c,this._showCollisionBoxes=d,this._done=!1};ab.prototype.isDone=function(){return this._done},ab.prototype.continuePlacement=function(d,e,f){for(var g=this,h=a.browser.now();this._currentPlacementIndex>=0;){var b=e[d[this._currentPlacementIndex]],c=this.placement.collisionIndex.transform.zoom;if("symbol"===b.type&&(!b.minzoom||b.minzoom<=c)&&(!b.maxzoom||b.maxzoom>c)){if(this._inProgressLayer||(this._inProgressLayer=new aB(b)),this._inProgressLayer.continuePlacement(f[b.source],this.placement,this._showCollisionBoxes,b,function(){var b=a.browser.now()-h;return!g._forceFullPlacement&&b>2}))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ab.prototype.commit=function(a){return this.placement.commit(a),this.placement};var cz=512/a.EXTENT/2,an=function(d,e,f){this.tileID=d,this.indexedSymbolInstances={},this.bucketInstanceId=f;for(var a=0;a<e.length;a++){var b=e.get(a),c=b.key;this.indexedSymbolInstances[c]||(this.indexedSymbolInstances[c]=[]),this.indexedSymbolInstances[c].push({crossTileID:b.crossTileID,coord:this.getScaledCoordinates(b,d)})}};an.prototype.getScaledCoordinates=function(c,b){var d=cz/Math.pow(2,b.canonical.z-this.tileID.canonical.z);return{x:Math.floor((b.canonical.x*a.EXTENT+c.anchorX)*d),y:Math.floor((b.canonical.y*a.EXTENT+c.anchorY)*d)}},an.prototype.findMatches=function(f,c,g){for(var h=this.tileID.canonical.z<c.canonical.z?1:Math.pow(2,this.tileID.canonical.z-c.canonical.z),d=0;d<f.length;d++){var b=f.get(d);if(!b.crossTileID){var i=this.indexedSymbolInstances[b.key];if(i)for(var j=this.getScaledCoordinates(b,c),e=0,k=i;e<k.length;e+=1){var a=k[e];if(Math.abs(a.coord.x-j.x)<=h&&Math.abs(a.coord.y-j.y)<=h&&!g[a.crossTileID]){g[a.crossTileID]=!0,b.crossTileID=a.crossTileID;break}}}}};var aC=function(){this.maxCrossTileID=0};aC.prototype.generate=function(){return++this.maxCrossTileID};var P=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};P.prototype.handleWrapJump=function(b){var c=Math.round((b-this.lng)/360);if(0!==c)for(var d in this.indexes){var e=this.indexes[d],f={};for(var g in e){var a=e[g];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+c),f[a.tileID.key]=a}this.indexes[d]=f}this.lng=b},P.prototype.addBucket=function(a,b,k){if(this.indexes[a.overscaledZ]&&this.indexes[a.overscaledZ][a.key]){if
1(this.indexes[a.overscaledZ][a.key].bucketInstanceId===b.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(a.overscaledZ,this.indexes[a.overscaledZ][a.key])}for(var c=0;c<b.symbolInstances.length;c++)b.symbolInstances.get(c).crossTileID=0;this.usedCrossTileIDs[a.overscaledZ]||(this.usedCrossTileIDs[a.overscaledZ]={});var d=this.usedCrossTileIDs[a.overscaledZ];for(var e in this.indexes){var f=this.indexes[e];if(Number(e)>a.overscaledZ)for(var l in f){var i=f[l];i.tileID.isChildOf(a)&&i.findMatches(b.symbolInstances,a,d)}else{var j=f[a.scaledTo(Number(e)).key];j&&j.findMatches(b.symbolInstances,a,d)}}for(var g=0;g<b.symbolInstances.length;g++){var h=b.symbolInstances.get(g);h.crossTileID||(h.crossTileID=k.generate(),d[h.crossTileID]=!0)}return void 0===this.indexes[a.overscaledZ]&&(this.indexes[a.overscaledZ]={}),this.indexes[a.overscaledZ][a.key]=new an(a,b.symbolInstances,b.bucketInstanceId),!0},P.prototype.removeBucketCrossTileIDs=function(d,b){for(var e in b.indexedSymbolInstances)for(var a=0,c=b.indexedSymbolInstances[e];a<c.length;a+=1)delete this.usedCrossTileIDs[d][c[a].crossTileID]},P.prototype.removeStaleBuckets=function(e){var c=!1;for(var d in this.indexes){var a=this.indexes[d];for(var b in a)e[a[b].bucketInstanceId]||(this.removeBucketCrossTileIDs(d,a[b]),delete a[b],c=!0)}return c};var ao=function(){this.layerIndexes={},this.crossTileIDs=new aC,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};ao.prototype.addLayer=function(c,i,j){var b=this.layerIndexes[c.id];void 0===b&&(b=this.layerIndexes[c.id]=new P);var d=!1,f={};b.handleWrapJump(j);for(var e=0,g=i;e<g.length;e+=1){var h=g[e],a=h.getBucket(c);a&&c.id===a.layerIds[0]&&(a.bucketInstanceId||(a.bucketInstanceId=++this.maxBucketInstanceId),b.addBucket(h.tileID,a,this.crossTileIDs)&&(d=!0),f[a.bucketInstanceId]=!0)}return b.removeStaleBuckets(f)&&(d=!0),d},ao.prototype.pruneUnusedLayers=function(b){var c={};for(var a in b.forEach(function(a){c[a]=!0}),this.layerIndexes)c[a]||delete this.layerIndexes[a]};var cA=function(c,b){return a.emitValidationErrors(c,b&&b.filter(function(a){return"source.canvas"!==a.identifier}))},cB=a.pick(al,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),cC=a.pick(al,["setCenter","setZoom","setBearing","setPitch"]),cD=function(){var c={},f=a.styleSpec.$version;for(var b in a.styleSpec.$root){var d,e=a.styleSpec.$root[b];e.required&&null!=(d="version"===b?f:"array"===e.type?[]:{})&&(c[b]=d)}return c}(),Q=function(c){function b(e,d){var f=this;void 0===d&&(d={}),c.call(this),this.map=e,this.dispatcher=new N(b2(),this),this.imageManager=new bg,this.imageManager.setEventedParent(this),this.glyphManager=new D(e._requestManager,d.localIdeographFontFamily),this.lineAtlas=new E(256,512),this.crossTileSymbolIndex=new ao,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",a.getReferrer());var g=this;this._rtlTextPluginCallback=b.registerForPluginStateChange(function(b){g.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:b.pluginStatus,pluginURL:b.pluginURL},function(c,b){if(a.triggerPluginCompletionEvent(c),b&&b.every(function(a){return a}))for(var d in g.sourceCaches)g.sourceCaches[d].reload()})}),this.on("data",function(a){if("source"===a.dataType&&"metadata"===a.sourceDataType){var c=f.sourceCaches[a.sourceId];if(c){var b=c.getSource();if(b&&b.vectorLayerIds)for(var e in f._layers){var d=f._layers[e];d.source===b.id&&f._validateLayer(d)}}}})}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.loadURL=function(c,b){var e=this;void 0===b&&(b={}),this.fire(new a.Event("dataloading",{dataType:"style"}));var f="boolean"==typeof b.validate?b.validate:!a.isMapboxURL(c);c=this.map._requestManager.normalizeStyleURL(c,b.accessToken);var d=this.map._requestManager.transformRequest(c,a.ResourceType.Style);this._request=a.getJSON(d,function(b,c){e._request=null,b?e.fire(new a.ErrorEvent(b)):c&&e._load(c,f)})},b.prototype.loadJSON=function(c,b){var d=this;void 0===b&&(b={}),this.fire(new a.Event("dataloading",{dataType:"style"})),this._request=a.browser.frame(function(){d._request=null,d._load(c,!1!==b.validate)})},b.prototype.loadEmpty=function(){this.fire(new a.Event("dataloading",{dataType:"style"})),this._load(cD,!1)},b.prototype._load=function(b,h){if(!h||!cA(this,a.validateStyle(b))){for(var e in this._loaded=!0,this.stylesheet=b,b.sources)this.addSource(e,b.sources[e],{validate:!1});b.sprite?this._loadSprite(b.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(b.glyphs);
vendor: 5,581 bytes, line 1
1var f=b4(this.stylesheet.layers);this._order=f.map(function(a){return a.id}),this._layers={},this._serializedLayers={};for(var d=0,g=f;d<g.length;d+=1){var c=g[d];(c=a.createStyleLayer(c)).setEventedParent(this,{layer:{id:c.id}}),this._layers[c.id]=c,this._serializedLayers[c.id]=c.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new bk(this.stylesheet.light),this.fire(new a.Event("data",{dataType:"style"})),this.fire(new a.Event("style.load"))}},b.prototype._loadSprite=function(b){var c=this;this._spriteRequest=function(c,b,e){var f,g,h,d=a.browser.devicePixelRatio>1?"@2x":"",i=a.getJSON(b.transformRequest(b.normalizeSpriteURL(c,d,".json"),a.ResourceType.SpriteJSON),function(a,b){i=null,h||(h=a,f=b,k())}),j=a.getImage(b.transformRequest(b.normalizeSpriteURL(c,d,".png"),a.ResourceType.SpriteImage),function(a,b){j=null,h||(h=a,g=b,k())});function k(){if(h)e(h);else if(f&&g){var l=a.browser.getImageData(g),c={};for(var d in f){var b=f[d],i=b.width,j=b.height,m=b.x,n=b.y,o=b.sdf,p=b.pixelRatio,q=b.stretchX,r=b.stretchY,s=b.content,k=new a.RGBAImage({width:i,height:j});a.RGBAImage.copy(l,k,{x:m,y:n},{x:0,y:0},{width:i,height:j}),c[d]={data:k,pixelRatio:p,sdf:o,stretchX:q,stretchY:r,content:s}}e(null,c)}}return{cancel:function(){i&&(i.cancel(),i=null),j&&(j.cancel(),j=null)}}}(b,this.map._requestManager,function(d,b){if(c._spriteRequest=null,d)c.fire(new a.ErrorEvent(d));else if(b)for(var e in b)c.imageManager.addImage(e,b[e]);c.imageManager.setLoaded(!0),c._availableImages=c.imageManager.listImages(),c.dispatcher.broadcast("setImages",c._availableImages),c.fire(new a.Event("data",{dataType:"style"}))})},b.prototype._validateLayer=function(c){var e=this.sourceCaches[c.source];if(e){var d=c.sourceLayer;if(d){var b=e.getSource();("geojson"===b.type||b.vectorLayerIds&& -1===b.vectorLayerIds.indexOf(d))&&this.fire(new a.ErrorEvent(Error('Source layer "'+d+'" does not exist on source "'+b.id+'" as specified by style layer "'+c.id+'"')))}}},b.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var a in this.sourceCaches)if(!this.sourceCaches[a].loaded())return!1;return!!this.imageManager.isLoaded()},b.prototype._serializeLayers=function(e){for(var b=[],a=0,c=e;a<c.length;a+=1){var d=this._layers[c[a]];"custom"!==d.type&&b.push(d.serialize())}return b},b.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var a in this.sourceCaches)if(this.sourceCaches[a].hasTransition())return!0;for(var b in this._layers)if(this._layers[b].hasTransition())return!0;return!1},b.prototype._checkLoaded=function(){if(!this._loaded)throw Error("Style is not done loading")},b.prototype.update=function(b){if(this._loaded){var o=this._changed;if(this._changed){var h=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var d in(h.length||i.length)&&this._updateWorkerLayers(h,i),this._updatedSources){var j=this._updatedSources[d];"reload"===j?this._reloadSource(d):"clear"===j&&this._clearSource(d)}for(var p in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[p].updateTransitions(b);this.light.updateTransitions(b),this._resetUpdates()}var e={};for(var k in this.sourceCaches){var l=this.sourceCaches[k];e[k]=l.used,l.used=!1}for(var f=0,m=this._order;f<m.length;f+=1){var c=this._layers[m[f]];c.recalculate(b,this._availableImages),!c.isHidden(b.zoom)&&c.source&&(this.sourceCaches[c.source].used=!0)}for(var g in e){var n=this.sourceCaches[g];e[g]!==n.used&&n.fire(new a.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:g}))}this.light.recalculate(b),this.z=b.zoom,o&&this.fire(new a.Event("data",{dataType:"style"}))}},b.prototype._updateTilesForChangedImages=function(){var a=Object.keys(this._changedImages);if(a.length){for(var b in this.sourceCaches)this.sourceCaches[b].reloadTilesForDependencies(["icons","patterns"],a);this._changedImages={}}},b.prototype._updateWorkerLayers=function(a,b){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(a),removedIds:b})},b.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},b.prototype.setState=function(b){var e=this;if(this._checkLoaded(),cA(this,a.validateStyle(b)))return!1;(b=a.clone$1(b)).layers=b4(b.layers);var c=(function(c,b){if(!c)return[{command:al.setStyle,args:[b]}];var d=[];try{if(!a.deepEqual(c.version,b.version))return[{command:al.setStyle,args:[b]}];a.deepEqual(c.center,b.center)||d.push({command:al.setCenter,args:[b.center]}),a.deepEqual(c.zoom,b.zoom)||d.push({command:al.setZoom,args:[b.zoom]}),a.deepEqual(c.bearing,b.bearing)||d.push({command:al.setBearing,args:[b.bearing]}),a.deepEqual(c.pitch,b.pitch)||d.push({command:al.setPitch,args:[b.pitch]}),a.deepEqual(c.sprite,b.sprite)||d.push({command:al.setSprite,args:[b.sprite]}),a.deepEqual(c.glyphs,b.glyphs)||d.push({command:al.setGlyphs,args:[b.glyphs]}),a.deepEqual(c.transition,b.transition)||d.push({command:al.setTransition,args:[b.transition]}),a.deepEqual(c.light,b.light)||d.push({command:al.setLight,args:[b.light]});var f={},e=[];!function(d,c,e,f){var b;for(b in c=c||{},d=d||{})d.hasOwnProperty(b)&&(c.hasOwnProperty(b)||b6(b,e,f));for(b in c)c.hasOwnProperty(b)&&(d.hasOwnProperty(b)?a.deepEqual(d[b],c[b])||("geojson"===d[b].type&&"geojson"===c[b].type&&b8(d,c,b)?e.push({command:al.setGeoJSONSourceData,args:[b,c[b].data]}):b7(b,c,e,f)):b5(b,c,e))}(c.sources,b.sources,e,f);var g=[];
1c.layers&&c.layers.forEach(function(a){f[a.source]?d.push({command:al.removeLayer,args:[a.id]}):g.push(a)}),d=d.concat(e),function(l,k,g){k=k||[];var f,i,c,e,d,m,b,n=(l=l||[]).map(ca),j=k.map(ca),p=l.reduce(cb,{}),o=k.reduce(cb,{}),h=n.slice(),q=Object.create(null);for(f=0,i=0;f<n.length;f++)o.hasOwnProperty(c=n[f])?i++:(g.push({command:al.removeLayer,args:[c]}),h.splice(h.indexOf(c,i),1));for(f=0,i=0;f<j.length;f++)h[h.length-1-f]!==(c=j[j.length-1-f])&&(p.hasOwnProperty(c)?(g.push({command:al.removeLayer,args:[c]}),h.splice(h.lastIndexOf(c,h.length-i),1)):i++,g.push({command:al.addLayer,args:[o[c],m=h[h.length-f]]}),h.splice(h.length-f,0,c),q[c]=!0);for(f=0;f<j.length;f++)if(e=p[c=j[f]],d=o[c],!q[c]&&!a.deepEqual(e,d)){if(a.deepEqual(e.source,d.source)&&a.deepEqual(e["source-layer"],d["source-layer"])&&a.deepEqual(e.type,d.type)){for(b in b9(e.layout,d.layout,g,c,null,al.setLayoutProperty),b9(e.paint,d.paint,g,c,null,al.setPaintProperty),a.deepEqual(e.filter,d.filter)||g.push({command:al.setFilter,args:[c,d.filter]}),a.deepEqual(e.minzoom,d.minzoom)&&a.deepEqual(e.maxzoom,d.maxzoom)||g.push({command:al.setLayerZoomRange,args:[c,d.minzoom,d.maxzoom]}),e)e.hasOwnProperty(b)&&"layout"!==b&&"paint"!==b&&"filter"!==b&&"metadata"!==b&&"minzoom"!==b&&"maxzoom"!==b&&(0===b.indexOf("paint.")?b9(e[b],d[b],g,c,b.slice(6),al.setPaintProperty):a.deepEqual(e[b],d[b])||g.push({command:al.setLayerProperty,args:[c,b,d[b]]}));for(b in d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&"layout"!==b&&"paint"!==b&&"filter"!==b&&"metadata"!==b&&"minzoom"!==b&&"maxzoom"!==b&&(0===b.indexOf("paint.")?b9(e[b],d[b],g,c,b.slice(6),al.setPaintProperty):a.deepEqual(e[b],d[b])||g.push({command:al.setLayerProperty,args:[c,b,d[b]]}))}else g.push({command:al.removeLayer,args:[c]}),m=h[h.lastIndexOf(c)+1],g.push({command:al.addLayer,args:[d,m]})}}(g,b.layers,d)}catch(h){console.warn("Unable to compute style diff:",h),d=[{command:al.setStyle,args:[b]}]}return d})(this.serialize(),b).filter(function(a){return!(a.command in cC)});if(0===c.length)return!1;var d=c.filter(function(a){return!(a.command in cB)});if(d.length>0)throw Error("Unimplemented: "+d.map(function(a){return a.command}).join(", ")+".");return c.forEach(function(a){"setTransition"!==a.command&&e[a.command].apply(e,a.args)}),this.stylesheet=b,!0},b.prototype.addImage=function(b,c){if(this.getImage(b))return this.fire(new a.ErrorEvent(Error("An image with this name already exists.")));this.imageManager.addImage(b,c),this._afterImageUpdated(b)},b.prototype.updateImage=function(a,b){this.imageManager.updateImage(a,b)},b.prototype.getImage=function(a){return this.imageManager.getImage(a)},b.prototype.removeImage=function(b){if(!this.getImage(b))return this.fire(new a.ErrorEvent(Error("No image with this name exists.")));this.imageManager.removeImage(b),this._afterImageUpdated(b)},b.prototype._afterImageUpdated=function(b){this._availableImages=this.imageManager.listImages(),this._changedImages[b]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))},b.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},b.prototype.addSource=function(c,b,d){var f=this;if(void 0===d&&(d={}),this._checkLoaded(),void 0!==this.sourceCaches[c])throw Error("There is already a source with this ID");if(!b.type)throw Error("The type property must be defined, but only the following properties were given: "+Object.keys(b).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(b.type)>=0&&this._validate(a.validateStyle.source,"sources."+c,b,null,d))){this.map&&this.map._collectResourceTiming&&(b.collectResourceTiming=!0);var e=this.sourceCaches[c]=new ak(c,b,this.dispatcher);e.style=this,e.setEventedParent(this,function(){return{isSourceLoaded:f.loaded(),source:e.serialize(),sourceId:c}}),e.onAdd(this.map),this._changed=!0}},b.prototype.removeSource=function(b){if(this._checkLoaded(),void 0===this.sourceCaches[b])throw Error("There is no source with this ID");for(var d in this._layers)if(this._layers[d].source===b)return this.fire(new a.ErrorEvent(Error('Source "'+b+'" cannot be removed while layer "'+d+'" is using it.')));var c=this.sourceCaches[b];delete this.sourceCaches[b],delete this._updatedSources[b],c.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:b})),c.setEventedParent(null),c.clearTiles(),c.onRemove&&c.onRemove(this.map),this._changed=!0},b.prototype.setGeoJSONSourceData=function(a,b){this._checkLoaded(),this.sourceCaches[a].getSource().setData(b),this._changed=!0},b.prototype.getSource=function(a){return this.sourceCaches[a]&&this.sourceCaches[a].getSource()},b.prototype.addLayer=function(b,e,f){void 0===f&&(f={}),this._checkLoaded();var c=b.id;if(this.getLayer(c))this.fire(new a.ErrorEvent(Error('Layer with i
1d "'+c+'" already exists on this map')));else{if("custom"===b.type){if(cA(this,a.validateCustomStyleLayer(b)))return;d=a.createStyleLayer(b)}else{if("object"==typeof b.source&&(this.addSource(c,b.source),b=a.clone$1(b),b=a.extend(b,{source:c})),this._validate(a.validateStyle.layer,"layers."+c,b,{arrayIndex:-1},f))return;d=a.createStyleLayer(b),this._validateLayer(d),d.setEventedParent(this,{layer:{id:c}}),this._serializedLayers[d.id]=d.serialize()}var d,g=e?this._order.indexOf(e):this._order.length;if(e&& -1===g)this.fire(new a.ErrorEvent(Error('Layer with id "'+e+'" does not exist on this map.')));else{if(this._order.splice(g,0,c),this._layerOrderChanged=!0,this._layers[c]=d,this._removedLayers[c]&&d.source&&"custom"!==d.type){var h=this._removedLayers[c];delete this._removedLayers[c],h.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)}}},b.prototype.moveLayer=function(b,c){if(this._checkLoaded(),this._changed=!0,this._layers[b]){if(b!==c){var e=this._order.indexOf(b);this._order.splice(e,1);var d=c?this._order.indexOf(c):this._order.length;
vendor: 11,493 bytes, line 1
1c&& -1===d?this.fire(new a.ErrorEvent(Error('Layer with id "'+c+'" does not exist on this map.'))):(this._order.splice(d,0,b),this._layerOrderChanged=!0)}}else this.fire(new a.ErrorEvent(Error("The layer '"+b+"' does not exist in the map's style and cannot be moved.")))},b.prototype.removeLayer=function(b){this._checkLoaded();var c=this._layers[b];if(c){c.setEventedParent(null);var d=this._order.indexOf(b);this._order.splice(d,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[b]=c,delete this._layers[b],delete this._serializedLayers[b],delete this._updatedLayers[b],delete this._updatedPaintProps[b],c.onRemove&&c.onRemove(this.map)}else this.fire(new a.ErrorEvent(Error("The layer '"+b+"' does not exist in the map's style and cannot be removed.")))},b.prototype.getLayer=function(a){return this._layers[a]},b.prototype.hasLayer=function(a){return a in this._layers},b.prototype.setLayerZoomRange=function(e,c,d){this._checkLoaded();var b=this.getLayer(e);b?b.minzoom===c&&b.maxzoom===d||(null!=c&&(b.minzoom=c),null!=d&&(b.maxzoom=d),this._updateLayer(b)):this.fire(new a.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},b.prototype.setFilter=function(e,c,d){void 0===d&&(d={}),this._checkLoaded();var b=this.getLayer(e);if(b){if(!a.deepEqual(b.filter,c))return null==c?(b.filter=void 0,void this._updateLayer(b)):void(this._validate(a.validateStyle.filter,"layers."+b.id+".filter",c,null,d)||(b.filter=a.clone$1(c),this._updateLayer(b)))}else this.fire(new a.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},b.prototype.getFilter=function(b){return a.clone$1(this.getLayer(b).filter)},b.prototype.setLayoutProperty=function(d,e,f,c){void 0===c&&(c={}),this._checkLoaded();var b=this.getLayer(d);b?a.deepEqual(b.getLayoutProperty(e),f)||(b.setLayoutProperty(e,f,c),this._updateLayer(b)):this.fire(new a.ErrorEvent(Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")))},b.prototype.getLayoutProperty=function(b,d){var c=this.getLayer(b);if(c)return c.getLayoutProperty(d);this.fire(new a.ErrorEvent(Error("The layer '"+b+"' does not exist in the map's style.")))},b.prototype.setPaintProperty=function(c,e,f,d){void 0===d&&(d={}),this._checkLoaded();var b=this.getLayer(c);b?a.deepEqual(b.getPaintProperty(e),f)||(b.setPaintProperty(e,f,d)&&this._updateLayer(b),this._changed=!0,this._updatedPaintProps[c]=!0):this.fire(new a.ErrorEvent(Error("The layer '"+c+"' does not exist in the map's style and cannot be styled.")))},b.prototype.getPaintProperty=function(a,b){return this.getLayer(a).getPaintProperty(b)},b.prototype.setFeatureState=function(b,g){this._checkLoaded();var e=b.source,c=b.sourceLayer,d=this.sourceCaches[e];if(void 0!==d){var f=d.getSource().type;"geojson"===f&&c?this.fire(new a.ErrorEvent(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==f||c?(void 0===b.id&&this.fire(new a.ErrorEvent(Error("The feature id parameter must be provided."))),d.setFeatureState(c,b.id,g)):this.fire(new a.ErrorEvent(Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(Error("The source '"+e+"' does not exist in the map's style.")))},b.prototype.removeFeatureState=function(b,d){this._checkLoaded();var e=b.source,c=this.sourceCaches[e];if(void 0!==c){var f=c.getSource().type,g="vector"===f?b.sourceLayer:void 0;"vector"!==f||g?d&&"string"!=typeof b.id&&"number"!=typeof b.id?this.fire(new a.ErrorEvent(Error("A feature id is required to remove its specific state property."))):c.removeFeatureState(g,b.id,d):this.fire(new a.ErrorEvent(Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(Error("The source '"+e+"' does not exist in the map's style.")))},b.prototype.getFeatureState=function(b){this._checkLoaded();var d=b.source,e=b.sourceLayer,c=this.sourceCaches[d];if(void 0!==c){if("vector"!==c.getSource().type||e)return void 0===b.id&&this.fire(new a.ErrorEvent(Error("The feature id parameter must be provided."))),c.getFeatureState(e,b.id);this.fire(new a.ErrorEvent(Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(Error("The source '"+d+"' does not exist in the map's style.")))},b.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},b.prototype.serialize=function(){return a.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:a.mapObject(this.sourceCaches,function(a){return a.serialize()}),layers:this._serializeLayers(this._order)},function(a){return void 0!==a})},b.prototype._updateLayer=function(a){this._updatedLayers[a.id]=!0,a.source&&!this._updatedSources[a.source]&&"raster"!==this.sourceCaches[a.source].getSource().type&&(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause()),this._changed=!0},b.prototype._flattenAndSortRenderedFeatures=function(k){for(var v=this,l=function(a){return"fill-extrusion"===v._layers[a].type},m={},a=[],b=this._order.length-1;b>=0;b--){var d=this._order[b];if(l(d)){m[d]=b;for(var e=0,n=k;e<n.length;e+=1){var o=n[e][d];if(o)for(var f=0,p=o;f<p.length;f+=1)a.push(p[f])}}}a.sort(function(a,b){return b.intersectionZ-a.intersectionZ});for(var g=[],c=this._order.length-1;c>=0;c--){var q=this._order[c];if(l(q))for(var h=a.length-1;h>=0;h--){var r=a[h].feature;if(m[r.layer.id]<c)break;g.push(r),a.pop()}else for(var i=0,s=k;i<s.length;i+=1){var t=s[i][q];if(t)for(var j=0,u=t;j<u.length;j+=1)g.push(u[j].feature)}}return g},b.prototype.queryRenderedFeatures=function(e,b,k){b&&b.filter&&this._validate(a.validateStyle.filter,"queryRenderedFeatures.filter",b.filter,null,b);var f={};if(b&&b.layers){if(!Array.isArray(b.layers))return this.fire(new a.ErrorEvent(Error("parameters.layers must be an Array."))),[];for(var c=0,g=b.layers;c<g.length;c+=1){var h=g[c],i=this._layers[h];if(!i)return this.fire(new a.ErrorEvent(Error("The layer '"+h+"' does not exist in the map's style and cannot be queried for features."))),[];f[i.source]=!0}}var d=[];for(var j in b.availableImages=this._availableImages,this.sourceCaches)b.layers&&!f[j]||d.push(bp(this.sourceCaches[j],this._layers,this._serializedLayers,e,b,k));return this.placement&&d.push(function(n,o,p,f,q,g,h){for(var c={},i=g.queryRenderedSymbols(f),a=[],b=0,d=Object.keys(i).map(Number);b<d.length;b+=1)a.push(h[d[b]]);a.sort(bq);for(var j=function(){var a=k[e],f=a.featureIndex.lookupSymbolFeatures(i[a.bucketInstanceId],o,a.bucketIndex,a.sourceLayerIndex,q.filter,q.layers,q.availableImages,n);for(var b in f){var j=c[b]=c[b]||[],g=f[b];g.sort(function(c,d){var b=a.featureSortOrder;if(b){var e=b.indexOf(c.featureIndex);return b.indexOf(d.featureIndex)-e}return d.featureIndex-c.featureIndex});for(var d=0,h=g;d<h.length;d+=1)j.push(h[d])}},e=0,k=a;e<k.length;e+=1)j();var l=function(a){c[a].forEach(function(c){var b=c.feature,d=p[n[a].source].getFeatureState(b.layer["source-layer"],b.id);b.source=b.layer.source,b.layer["source-layer"]&&(b.sourceLayer=b.layer["source-layer"]),b.state=d})};for(var m in c)l(m);return c}(this._layers,this._serializedLayers,this.sourceCaches,e,b,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)},b.prototype.querySourceFeatures=function(d,b){b&&b.filter&&this._validate(a.validateStyle.filter,"querySourceFeatures.filter",b.filter,null,b);var c=this.sourceCaches[d];return c?function(g,h){for(var b=g.getRenderableIds().map(function(a){return g.getTileByID(a)}),c=[],d={},a=0;a<b.length;a++){var e=b[a],f=e.tileID.canonical.key;d[f]||(d[f]=!0,e.querySourceFeatures(c,h))}return c}(c,b):[]},b.prototype.addSourceType=function(a,c,d){return b.getSourceType(a)?d(Error('A source type called "'+a+'" already exists.')):(b.setSourceType(a,c),c.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:a,url:c.workerSourceURL},d):d(null,null))},b.prototype.getLight=function(){return this.light.getLight()},b.prototype.setLight=function(b,c){void 0===c&&(c={}),this._checkLoaded();var f=this.light.getLight(),d=!1;for(var e in b)if(!a.deepEqual(b[e],f[e])){d=!0;break}if(d){var g={now:a.browser.now(),transition:a.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(b,c),this.light.updateTransitions(g)}},b.prototype._validate=function(c,d,e,f,b){return void 0===b&&(b={}),(!b|| !1!==b.validate)&&cA(this,c.call(a.validateStyle,a.extend({key:d,style:this.serialize(),value:e,styleSpec:a.styleSpec},f)))},b.prototype._remove=function(){for(var c in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),a.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[c].setEventedParent(null);for(var b in this.sourceCaches)this.sourceCaches[b].clearTiles(),this.sourceCaches[b].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},b.prototype._clearSource=function(a){this.sourceCaches[a].clearTiles()},b.prototype._reloadSource=function(a){this.sourceCaches[a].resume(),this.sourceCaches[a].reload()},b.prototype._updateSources=function(a){for(var b in this.sourceCaches)this.sourceCaches[b].update(a)},b.prototype._generateCollisionBoxes=function(){for(var a in this.sourceCaches)this._reloadSource(a)},b.prototype._updatePlacement=function(f,n,j,o,c){void 0===c&&(c=!1);for(var e=!1,k=!1,d={},g=0,l=this._order;g<l.length;g+=1){var b=this._layers[l[g]];if("symbol"===b.type){if(!d[b.source]){var p=this.sourceCaches[b.source];d[b.source]=p.getRenderableIds(!0).map(function(a){return p.getTileByID(a)}).sort(function(a,b){return b.tileID.overscaledZ-a.tileID.overscaledZ||(a.tileID.isLessThan(b.tileID)?-1:1)})}var q=this.crossTileSymbolIndex.addLayer(b,d[b.source],f.center.lng);e=e||q}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((c=c||this._layerOrderChanged||0===j)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.browser.now(),f.zoom))&&(this.pauseablePlacement=new ab(f,this._order,c,n,j,o,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,d),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.browser.now()),k=!0),e&&this.pauseablePlacement.placement.setStale()),k||e)for(var h=0,m=this._order;h<m.length;h+=1){var i=this._layers[m[h]];"symbol"===i.type&&this.placement.updateLayerOpacities(i,d[i.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.browser.now())},b.prototype._releaseSymbolFadeTiles=function(){for(var a in this.sourceCaches)this.sourceCaches[a].releaseSymbolFadeTiles()},b.prototype.getImages=function(d,a,c){this.imageManager.getImages(a.icons,c),this._updateTilesForChangedImages();var b=this.sourceCaches[a.source];b&&b.setDependencies(a.tileID.key,a.type,a.icons)},b.prototype.getGlyphs=function(c,a,b){this.glyphManager.getGlyphs(a.stacks,b)}
1,b.prototype.getResource=function(d,b,c){return a.makeRequest(b,c)},b}(a.Evented);Q.getSourceType=function(a){return bn[a]},Q.setSourceType=function(a,b){bn[a]=b},Q.registerForPluginStateChange=a.registerForPluginStateChange;var cE=a.createLayout([{name:"a_pos",type:"Int16",components:2}]),aD=cF("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 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\n);}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;}"),aE=cF("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),aF=cF("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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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);}"),aG=cF("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 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
1/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 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);}"),aH=cF("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);}"),aI=cF("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 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;}"),aJ=cF("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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","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;}"),aK=cF("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;}"),aL=cF("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);}"),aM=cF("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);}"),aN=cF("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),aO=cF("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),aP=cF("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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;}"),aQ=cF("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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);}"),aR=cF("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 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;}"),aS=cF("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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixe
1l_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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\n? a_pos\n: 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;}"),aT=cF("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),aU=cF("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;\n#define PI 3.141592653589793\nvoid 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),aV=cF("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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);}"),aW=cF("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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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);}"),aX=cF("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;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat 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;}"),aY=cF("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
1uniform 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);}"),aZ=cF("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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),a$=cF("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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));}"),a_=cF("#define SDF_PX 8.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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);}"),a0=cF("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
1gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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 cF(b,a){var c=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,f=a.match(/attribute ([\w]+) ([\w]+)/g),d=b.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),e=a.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=e?e.concat(d):d,h={};return{fragmentSource:b=b.replace(c,function(e,d,b,c,a){return h[a]=!0,"define"===d?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+b+" "+c+" "+a+";\n#else\nuniform "+b+" "+c+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n    "+b+" "+c+" "+a+" = u_"+a+";\n#endif\n"}),vertexSource:a=a.replace(c,function(g,f,b,c,a){var e="float"===c?"vec2":"vec4",d=a.match(/color/)?"color":e;return h[a]?"define"===f?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+b+" "+e+" a_"+a+";\nvarying "+b+" "+c+" "+a+";\n#else\nuniform "+b+" "+c+" u_"+a+";\n#endif\n":"vec4"===d?"\n#ifndef HAS_UNIFORM_u_"+a+"\n    "+a+" = a_"+a+";\n#else\n    "+b+" "+c+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n    "+a+" = unpack_mix_"+d+"(a_"+a+", u_"+a+"_t);\n#else\n    "+b+" "+c+" "+a+" = u_"+a+";\n#endif\n":"define"===f?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+b+" "+e+" a_"+a+";\n#else\nuniform "+b+" "+c+" u_"+a+";\n#endif\n":"vec4"===d?"\n#ifndef HAS_UNIFORM_u_"+a+"\n    "+b+" "+c+" "+a+" = a_"+a+";\n#else\n    "+b+" "+c+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n    "+b+" "+c+" "+a+" = unpack_mix_"+d+"(a_"+a+", u_"+a+"_t);\n#else\n    "+b+" "+c+" "+a+" = u_"+a+";\n#endif\n"}),staticAttributes:f,staticUniforms:g}}var cG=Object.freeze({__proto__:null,prelude:aD,background:aE,backgroundPattern:aF,circle:aG,clippingMask:aH,heatmap:aI,heatmapTexture:aJ,collisionBox:aK,collisionCircle:aL,debug:aM,fill:aN,fillOutline:aO,fillOutlinePattern:aP,fillPattern:aQ,fillExtrusion:aR,fillExtrusionPattern:aS,hillshadePrepare:aT,hillshade:aU,line:aV,lineGradient:aW,linePattern:aX,lineSDF:aY,raster:aZ,symbolIcon:a$,symbolSDF:a_,symbolTextAndIcon:a0}),ac=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function cH(b){for(var c=[],a=0;a<b.length;a++)if(null!==b[a]){var d=b[a].split(" ");c.push(d.pop())}return c}ac.prototype.bind=function(f,h,i,b,a,j,c,d){this.context=f;for(var g=this.boundPaintVertexBuffers.length!==b.length,e=0;!g&&e<b.length;e++)this.boundPaintVertexBuffers[e]!==b[e]&&(g=!0);f.extVertexArrayObject&&this.vao&&this.boundProgram===h&&this.boundLayoutVertexBuffer===i&&!g&&this.boundIndexBuffer===a&&this.boundVertexOffset===j&&this.boundDynamicVertexBuffer===c&&this.boundDynamicVertexBuffer2===d?(f.bindVertexArrayOES.set(this.vao),c&&c.bind(),a&&a.dynamicDraw&&a.bind(),d&&d.bind()):this.freshBind(h,i,b,a,j,c,d)}
vendor: 5,602 bytes, line 1
1,ac.prototype.freshBind=function(a,g,h,i,f,c,d){var j,n=a.numAttributes,e=this.context,b=e.gl;if(e.extVertexArrayObject)this.vao&&this.destroy(),this.vao=e.extVertexArrayObject.createVertexArrayOES(),e.bindVertexArrayOES.set(this.vao),j=0,this.boundProgram=a,this.boundLayoutVertexBuffer=g,this.boundPaintVertexBuffers=h,this.boundIndexBuffer=i,this.boundVertexOffset=f,this.boundDynamicVertexBuffer=c,this.boundDynamicVertexBuffer2=d;else{j=e.currentNumAttributes||0;for(var k=n;k<j;k++)b.disableVertexAttribArray(k)}g.enableAttributes(b,a);for(var l=0,o=h;l<o.length;l+=1)o[l].enableAttributes(b,a);c&&c.enableAttributes(b,a),d&&d.enableAttributes(b,a),g.bind(),g.setVertexAttribPointers(b,a,f);for(var m=0,p=h;m<p.length;m+=1){var q=p[m];q.bind(),q.setVertexAttribPointers(b,a,f)}c&&(c.bind(),c.setVertexAttribPointers(b,a,f)),i&&i.bind(),d&&(d.bind(),d.setVertexAttribPointers(b,a,f)),e.currentNumAttributes=n},ac.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var a1=function(k,z,d,b,r,s){var a=k.gl;this.program=a.createProgram();for(var t=cH(d.staticAttributes),u=b?b.getBinderAttributes():[],e=t.concat(u),v=d.staticUniforms?cH(d.staticUniforms):[],w=b?b.getBinderUniforms():[],f=[],l=0,o=v.concat(w);l<o.length;l+=1){var p=o[l];0>f.indexOf(p)&&f.push(p)}var m=b?b.defines():[];s&&m.push("#define OVERDRAW_INSPECTOR;");var x=m.concat(aD.fragmentSource,d.fragmentSource).join("\n"),y=m.concat(aD.vertexSource,d.vertexSource).join("\n"),g=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(g,x),a.compileShader(g),a.attachShader(this.program,g);var h=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(h,y),a.compileShader(h),a.attachShader(this.program,h),this.attributes={};var i={};this.numAttributes=e.length;for(var c=0;c<this.numAttributes;c++)e[c]&&(a.bindAttribLocation(this.program,c,e[c]),this.attributes[e[c]]=c);a.linkProgram(this.program),a.deleteShader(h),a.deleteShader(g);for(var n=0;n<f.length;n++){var j=f[n];if(j&&!i[j]){var q=a.getUniformLocation(this.program,j);q&&(i[j]=q)}}this.fixedUniforms=r(k,i),this.binderUniforms=b?b.getUniforms(k,i):[]}}};function cI(b,c,a){var h=1/cq(a,1,c.transform.tileZoom),d=Math.pow(2,a.tileID.overscaledZ),e=a.tileSize*Math.pow(2,c.transform.tileZoom)/d,f=e*(a.tileID.canonical.x+a.tileID.wrap*d),g=e*a.tileID.canonical.y;return{u_image:0,u_texsize:a.imageAtlasTexture.size,u_scale:[h,b.fromScale,b.toScale],u_fade:b.t,u_pixel_coord_upper:[f>>16,g>>16],u_pixel_coord_lower:[65535&f,65535&g]}}a1.prototype.draw=function(a,g,m,n,o,p,q,h,r,s,t,u,v,d,w,x){var e,b=a.gl;if(!this.failedToCreate){for(var i in a.program.set(this.program),a.setDepthMode(m),a.setStencilMode(n),a.setColorMode(o),a.setCullFace(p),this.fixedUniforms)this.fixedUniforms[i].set(q[i]);d&&d.setUniforms(a,this.binderUniforms,u,{zoom:v});for(var j=((e={})[b.LINES]=2,e[b.TRIANGLES]=3,e[b.LINE_STRIP]=1,e)[g],f=0,k=t.get();f<k.length;f+=1){var c=k[f],l=c.vaos||(c.vaos={});(l[h]||(l[h]=new ac)).bind(a,this,r,d?d.getPaintVertexBuffers():[],s,c.vertexOffset,w,x),b.drawElements(g,c.primitiveLength*j,b.UNSIGNED_SHORT,c.primitiveOffset*j*2)}}};var cJ=function(h,f,i,j){var b=f.style.light,c=b.properties.get("position"),d=[c.x,c.y,c.z],g=a.create$1();"viewport"===b.properties.get("anchor")&&a.fromRotation(g,-f.transform.angle),a.transformMat3(d,d,g);var e=b.properties.get("color");return{u_matrix:h,u_lightpos:d,u_lightintensity:b.properties.get("intensity"),u_lightcolor:[e.r,e.g,e.b],u_vertical_gradient:+i,u_opacity:j}},cK=function(a){return{u_matrix:a}},cL=function(b,c,d,e){return a.extend(cK(b),cI(d,c,e))},cM=function(f,i,g,b){var c,d,e=f.transform;if("map"===b.paint.get("circle-pitch-alignment")){var h=cq(g,1,e.zoom);c=!0,d=[h,h]}else c=!1,d=e.pixelsToGLUnits;return{u_camera_to_center_distance:e.cameraToCenterDistance,u_scale_with_map:+("map"===b.paint.get("circle-pitch-scale")),u_matrix:f.translatePosMatrix(i.posMatrix,g,b.paint.get("circle-translate"),b.paint.get("circle-translate-anchor")),u_pitch_with_map:+c,u_device_pixel_ratio:a.browser.devicePixelRatio,u_extrude_scale:d}},cN=function(e,a,b){var c=cq(b,1,a.zoom),d=Math.pow(2,a.zoom-b.tileID.overscaledZ),f=b.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:a.cameraToCenterDistance,u_pixels_to_tile_units:c,u_extrude_scale:[a.pixelsToGLUnits[0]/(c*d),a.pixelsToGLUnits[1]/(c*d)],u_overscale_factor:f}},cO=function(b,c,a){return void 0===a&&(a=1),{u_matrix:b,u_color:c,u_overlay:0,u_overlay_scale:a}},cP=function(a){return{u_matrix:a}},cQ=function(c,d,e){var b=c.transform;return{u_matrix:cV(c,d,e),u_ratio:1/cq(d,1,b.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},cR=function(b,c,d,e){return a.extend(cQ(b,c,d),{u_image:0,u_image_height:e})},cS=function(e,b,f,d){var c=e.transform,g=cU(b,c);return{u_matrix:cV(e,b,f),u_texsize:b.imageAtlasTexture.size,u_ratio:1/cq(b,1,c.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_image:0,u_scale:[g,d.fromScale,d.toScale],u_fade:d.t,u_units_to_pixels:[1/c.pixelsToGLUnits[0],1/c.pixelsToGLUnits[1]]}},cT=function(b,g,h,i,c){var d=b.lineAtlas,j=cU(g,b.transform),k="round"===h.layout.get("line-cap"),e=d.getDash(i.from,k),f=d.getDash(i.to,k),l=e.width*c.fromScale,m=f.width*c.toScale;return a.extend(cQ(b,g,h),{u_patternscale_a:[j/l,-e.height/2],u_patternscale_b:[j/m,-f.height/2],u_sdfgamma:d.width/(256*Math.min(l,m)*a.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:e.y,u_tex_y_b:f.y,u_mi
1x:c.t})};function cU(a,b){return 1/cq(a,1,b.tileZoom)}function cV(c,a,b){return c.translatePosMatrix(a.tileID.posMatrix,a,b.paint.get("line-translate"),b.paint.get("line-translate-anchor"))}var cW=function(e,f,g,d,a){var b,c;return{u_matrix:e,u_tl_parent:f,u_scale_parent:g,u_buffer_scale:1,u_fade_t:d.mix,u_opacity:d.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(c=a.paint.get("raster-saturation"))>0?1-1/(1.001-c):-c,u_contrast_factor:(b=a.paint.get("raster-contrast"))>0?1/(1-b):1+b,u_spin_weights:cX(a.paint.get("raster-hue-rotate"))}};function cX(a){a*=Math.PI/180;var c=Math.sin(a),b=Math.cos(a);return[(2*b+1)/3,(-Math.sqrt(3)*c-b+1)/3,(Math.sqrt(3)*c-b+1)/3]}var cY,cZ=function(a,b,e,f,d,g,h,i,j,k){var c=d.transform;return{u_is_size_zoom_constant:+("constant"===a||"source"===a),u_is_size_feature_constant:+("constant"===a||"camera"===a),u_size_t:b?b.uSizeT:0,u_size:b?b.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+e,u_aspect_ratio:c.width/c.height,u_fade_change:d.options.fadeDuration?d.symbolFadeChange:1,u_matrix:g,u_label_plane_matrix:h,u_coord_matrix:i,u_is_text:+j,u_pitch_with_map:+f,u_texsize:k,u_texture:0}},c$=function(e,f,g,b,c,h,i,j,k,l,m){var d=c.transform;return a.extend(cZ(e,f,g,b,c,h,i,j,k,l),{u_gamma_scale:b?Math.cos(d._pitch)*d.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:+m})},c_=function(o,p,q,r,s,t){var g,d,c,b,e,f,h,m,n,i,j,k,l;return a.extend((g=r,d=t,c=q,b=s,e=c.imageManager.getPattern(g.from.toString()),f=c.imageManager.getPattern(g.to.toString()),h=c.imageManager.getPixelSize(),m=h.width,n=h.height,i=Math.pow(2,b.tileID.overscaledZ),j=b.tileSize*Math.pow(2,c.transform.tileZoom)/i,k=j*(b.tileID.canonical.x+b.tileID.wrap*i),l=j*b.tileID.canonical.y,{u_image:0,u_pattern_tl_a:e.tl,u_pattern_br_a:e.br,u_pattern_tl_b:f.tl,u_pattern_br_b:f.br,u_texsize:[m,n],u_mix:d.t,u_pattern_size_a:e.displaySize,u_pattern_size_b:f.displaySize,u_scale_a:d.fromScale,u_scale_b:d.toScale,u_tile_units_to_pixels:1/cq(b,1,c.transform.tileZoom),u_pixel_coord_upper:[k>>16,l>>16],u_pixel_coord_lower:[65535&k,65535&l]}),{u_matrix:o,u_opacity:p})},c0={fillExtrusion:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_lightpos:new a.Uniform3f(b,c.u_lightpos),u_lightintensity:new a.Uniform1f(b,c.u_lightintensity),u_lightcolor:new a.Uniform3f(b,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(b,c.u_vertical_gradient),u_opacity:new a.Uniform1f(b,c.u_opacity)}},fillExtrusionPattern:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_lightpos:new a.Uniform3f(b,c.u_lightpos),u_lightintensity:new a.Uniform1f(b,c.u_lightintensity),u_lightcolor:new a.Uniform3f(b,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(b,c.u_vertical_gradient),u_height_factor:new a.Uniform1f(b,c.u_height_factor),u_image:new a.Uniform1i(b,c.u_image),u_texsize:new a.Uniform2f(b,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(b,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(b,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(b,c.u_scale),u_fade:new a.Uniform1f(b,c.u_fade),u_opacity:new a.Uniform1f(b,c.u_opacity)}},fill:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix)}},fillPattern:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_image:new a.Uniform1i(b,c.u_image),u_texsize:new a.Uniform2f(b,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(b,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(b,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(b,c.u_scale),u_fade:new a.Uniform1f(b,c.u_fade)}},fillOutline:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_world:new a.Uniform2f(b,c.u_world)}},fillOutlinePattern:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_world:new a.Uniform2f(b,c.u_world),u_image:new a.Uniform1i(b,c.u_image),u_texsize:new a.Uniform2f(b,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(b,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(b,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(b,c.u_scale),u_fade:new a.Uniform1f(b,c.u_fade)}},circle:function(b,c){return{u_camera_to_center_distance:new a.Uniform1f(b,c.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(b,c.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(b,c.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(b,c.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(b,c.u_matrix)}},collisionBox:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_camera_to_center_distance:new a.Uniform1f(b,c.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(b,c.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(b,c.u_extrude_scale),u_overscale_factor:new a.Uniform1f(b,c.u_overscale_factor)}},collisionCircle:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_inv_matrix:new a.UniformMatrix4f(b,c.u_inv_matrix
1),u_camera_to_center_distance:new a.Uniform1f(b,c.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(b,c.u_viewport_size)}},debug:function(b,c){return{u_color:new a.UniformColor(b,c.u_color),u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_overlay:new a.Uniform1i(b,c.u_overlay),u_overlay_scale:new a.Uniform1f(b,c.u_overlay_scale)}},clippingMask:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix)}},heatmap:function(b,c){return{u_extrude_scale:new a.Uniform1f(b,c.u_extrude_scale),u_intensity:new a.Uniform1f(b,c.u_intensity),u_matrix:new a.UniformMatrix4f(b,c.u_matrix)}},heatmapTexture:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_world:new a.Uniform2f(b,c.u_world),u_image:new a.Uniform1i(b,c.u_image),u_color_ramp:new a.Uniform1i(b,c.u_color_ramp),u_opacity:new a.Uniform1f(b,c.u_opacity)}},hillshade:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_image:new a.Uniform1i(b,c.u_image),u_latrange:new a.Uniform2f(b,c.u_latrange),u_light:new a.Uniform2f(b,c.u_light),u_shadow:new a.UniformColor(b,c.u_shadow),u_highlight:new a.UniformColor(b,c.u_highlight),u_accent:new a.UniformColor(b,c.u_accent)}},hillshadePrepare:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_image:new a.Uniform1i(b,c.u_image),u_dimension:new a.Uniform2f(b,c.u_dimension),u_zoom:new a.Uniform1f(b,c.u_zoom),u_unpack:new a.Uniform4f(b,c.u_unpack)}},line:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_ratio:new a.Uniform1f(b,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(b,c.u_units_to_pixels)}},lineGradient:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_ratio:new a.Uniform1f(b,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(b,c.u_units_to_pixels),u_image:new a.Uniform1i(b,c.u_image),u_image_height:new a.Uniform1f(b,c.u_image_height)}},linePattern:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_texsize:new a.Uniform2f(b,c.u_texsize),u_ratio:new a.Uniform1f(b,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_image:new a.Uniform1i(b,c.u_image),u_units_to_pixels:new a.Uniform2f(b,c.u_units_to_pixels),u_scale:new a.Uniform3f(b,c.u_scale),u_fade:new a.Uniform1f(b,c.u_fade)}},lineSDF:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_ratio:new a.Uniform1f(b,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(b,c.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(b,c.u_patternscale_a),u_patternscale_b:new a.Uniform2f(b,c.u_patternscale_b),u_sdfgamma:new a.Uniform1f(b,c.u_sdfgamma),u_image:new a.Uniform1i(b,c.u_image),u_tex_y_a:new a.Uniform1f(b,c.u_tex_y_a),u_tex_y_b:new a.Uniform1f(b,c.u_tex_y_b),u_mix:new a.Uniform1f(b,c.u_mix)}},raster:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_tl_parent:new a.Uniform2f(b,c.u_tl_parent),u_scale_parent:new a.Uniform1f(b,c.u_scale_parent),u_buffer_scale:new a.Uniform1f(b,c.u_buffer_scale),u_fade_t:new a.Uniform1f(b,c.u_fade_t),u_opacity:new a.Uniform1f(b,c.u_opacity),u_image0:new a.Uniform1i(b,c.u_image0),u_image1:new a.Uniform1i(b,c.u_image1),u_brightness_low:new a.Uniform1f(b,c.u_brightness_low),u_brightness_high:new a.Uniform1f(b,c.u_brightness_high),u_saturation_factor:new a.Uniform1f(b,c.u_saturation_factor),u_contrast_factor:new a.Uniform1f(b,c.u_contrast_factor),u_spin_weights:new a.Uniform3f(b,c.u_spin_weights)}},symbolIcon:function(b,c){return{u_is_size_zoom_constant:new a.Uniform1i(b,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(b,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(b,c.u_size_t),u_size:new a.Uniform1f(b,c.u_size),u_camera_to_center_distance:new a.Uniform1f(b,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(b,c.u_pitch),u_rotate_symbol:new a.Uniform1i(b,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(b,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(b,c.u_fade_change),u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(b,c.u_label_plane_matrix
vendor: 11,901 bytes, line 1
1),u_coord_matrix:new a.UniformMatrix4f(b,c.u_coord_matrix),u_is_text:new a.Uniform1i(b,c.u_is_text),u_pitch_with_map:new a.Uniform1i(b,c.u_pitch_with_map),u_texsize:new a.Uniform2f(b,c.u_texsize),u_texture:new a.Uniform1i(b,c.u_texture)}},symbolSDF:function(b,c){return{u_is_size_zoom_constant:new a.Uniform1i(b,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(b,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(b,c.u_size_t),u_size:new a.Uniform1f(b,c.u_size),u_camera_to_center_distance:new a.Uniform1f(b,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(b,c.u_pitch),u_rotate_symbol:new a.Uniform1i(b,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(b,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(b,c.u_fade_change),u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(b,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(b,c.u_coord_matrix),u_is_text:new a.Uniform1i(b,c.u_is_text),u_pitch_with_map:new a.Uniform1i(b,c.u_pitch_with_map),u_texsize:new a.Uniform2f(b,c.u_texsize),u_texture:new a.Uniform1i(b,c.u_texture),u_gamma_scale:new a.Uniform1f(b,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(b,c.u_is_halo)}},symbolTextAndIcon:function(b,c){return{u_is_size_zoom_constant:new a.Uniform1i(b,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(b,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(b,c.u_size_t),u_size:new a.Uniform1f(b,c.u_size),u_camera_to_center_distance:new a.Uniform1f(b,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(b,c.u_pitch),u_rotate_symbol:new a.Uniform1i(b,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(b,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(b,c.u_fade_change),u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(b,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(b,c.u_coord_matrix),u_is_text:new a.Uniform1i(b,c.u_is_text),u_pitch_with_map:new a.Uniform1i(b,c.u_pitch_with_map),u_texsize:new a.Uniform2f(b,c.u_texsize),u_texsize_icon:new a.Uniform2f(b,c.u_texsize_icon),u_texture:new a.Uniform1i(b,c.u_texture),u_texture_icon:new a.Uniform1i(b,c.u_texture_icon),u_gamma_scale:new a.Uniform1f(b,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(b,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(b,c.u_is_halo)}},background:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_opacity:new a.Uniform1f(b,c.u_opacity),u_color:new a.UniformColor(b,c.u_color)}},backgroundPattern:function(b,c){return{u_matrix:new a.UniformMatrix4f(b,c.u_matrix),u_opacity:new a.Uniform1f(b,c.u_opacity),u_image:new a.Uniform1i(b,c.u_image),u_pattern_tl_a:new a.Uniform2f(b,c.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(b,c.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(b,c.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(b,c.u_pattern_br_b),u_texsize:new a.Uniform2f(b,c.u_texsize),u_mix:new a.Uniform1f(b,c.u_mix),u_pattern_size_a:new a.Uniform2f(b,c.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(b,c.u_pattern_size_b),u_scale_a:new a.Uniform1f(b,c.u_scale_a),u_scale_b:new a.Uniform1f(b,c.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(b,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(b,c.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(b,c.u_tile_units_to_pixels)}}};function c1(b,N,s,C,t,P,D){for(var e=b.context,E=e.gl,Q=b.useProgram("collisionBox"),i=[],j=0,F=0,u=0;u<C.length;u++){var v=C[u],w=N.getTile(v),d=w.getBucket(s);if(d){var x=v.posMatrix;0===t[0]&&0===t[1]||(x=b.translatePosMatrix(v.posMatrix,w,t,P));var f=D?d.textCollisionBox:d.iconCollisionBox,y=d.collisionCircleArray;if(y.length>0){var k=a.create(),R=x;a.mul(k,d.placementInvProjMatrix,b.transform.glCoordMatrix),a.mul(k,k,d.placementViewportMatrix),i.push({circleArray:y,circleOffset:F,transform:R,invTransform:k}),F=j+=y.length/4}f&&Q.draw(e,E.LINES,K.disabled,aj.disabled,b.colorModeForRenderPass(),O.disabled,cN(x,b.transform,w),s.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,null,b.transform.zoom,null,null,f.collisionVertexBuffer)}}if(D&&i.length){var S=b.useProgram("collisionCircle"),c=new a.StructArrayLayout2f1f2i16;c.resize(4*j),c._trim();for(var l=0,z=0,G=i;z<G.length;z+=1)for(var g=G[z],A=0;A<g.circleArray.length/4;A++){var m=4*A,n=g.circleArray[m+0],o=g.circleArray[m+1],p=g.circleArray[m+2],q=g.circleArray[m+3];c.emplace(l++,n,o,p,q,0),c.emplace(l++,n,o,p,q,1),c.emplace(l++,n,o,p,q,2),c.emplace(l++,n,o,p,q,3)}(!cY||cY.length<2*j)&&(cY=function(f){var e=2*f,b=new a.StructArrayLayout3ui6;b.resize(e),b._trim();for(var c=0;c<e;c++){var d=6*c;b.uint16[d+0]=4*c+0,b.uint16[d+1]=4*c+1,b.uint16[d+2]=4*c+2,b.uint16[d+3]=4*c+2,b.uint16[d+4]=4*c+3,b.uint16[d+5]=4*c+0}return b}(j));for(var H=e.createIndexBuffer(cY,!0),I=e.createVertexBuffer(c,a.collisionCircleLayout.members,!0),B=0,J=i;B<J.length;B+=1){var L,M,r,h=J[B],T=(L=h.transform,M=h.invTransform,r=b.transform,{u_matrix:L,u_inv_matrix:M,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]});S.draw(e,E.TRIANGLES,K.disabled,aj.disabled,b.colorModeForRenderPass(),O.disabled,T,s.id,I,H,a.SegmentVector.simpleSegment(0,2*h.circleOffset,h.circleArray.length,h.circleArray.length/2),null,b.transform.zoom,null,null,null)}I.destroy(),H.destroy()}}var c2=a.identity(new Float32Array(16));function c3(b,g,h,i,c,d){var e=a.getAnchorAlignment(b),j=-(e.horizontalAlign-.5)*g,k=-(e.verticalAlign-.5)*h,f=a.evaluateVariableOffset(b,i);return new a.Point((j/c+f[0])*d,(k/c+f[1])*d)}function c4(c,z,i,A,B,m,n,C,D,E,o){var p=c.text.placedSymbolArray,f=c.text.dynamicLayoutVertexArray,e=c.icon.dynamicLayoutVertexArray,q={};f.clear();for(var j=0;j<p.length;j++){var b=p.get(j),d=b.hidden||!b.crossTileID||c.allowVerticalPlacement&&!b.placedOrientation?null:A[b.crossTileID];if(d){var r=new a.Point(b.anchorX,b.anchorY),s=ce(r,i?C:n),F=cf(m.cameraToCenterDistance,s.signedDistanceFromCamera),t=B.evaluateSizeForFeature(c.textSizeData,E,b)*F/a.ONE_EM;i&&(t*=c.tilePixelRatio/D);for(var k=c3(d.anchor,d.width,d.height,d.textOffset,d.textBoxScale,t),u=i?ce(r.add(k),n).point:s.point.add(z?k.rotate(-m.angle):k),v=c.allowVerticalPlacement&&b.placedOrientation===a.WritingMode.vertical?Math.PI/2:0,w=0;w<b.numGlyphs;w++)a.addDynamicAttributes(f,u,v);o&&b.associatedIconIndex>=0&&(q[b.associatedIconIndex]={shiftedAnchor:u,angle:v})}else co(b.numGlyphs,f)}if(o){e.clear();for(var x=c.icon.placedSymbolArray,g=0;g<x.length;g++){var h=x.get(g);if(h.hidden)co(h.numGlyphs,e);else{var l=q[g];if(l)for(var y=0;y<h.numGlyphs;y++)a.addDynamicAttributes(e,l.shiftedAnchor,l.angle);else co(h.numGlyphs,e)}}c.icon.dynamicLayoutVertexBuffer.updateData(e)}c.text.dynamicLayoutVertexBuffer.updateData(f)}function c5(a,b,c){return c.iconsInText&&b?"symbolTextAndIcon":a?"symbolSDF":"symbolIcon"}function c6(b,ah,e,ai,f,E,F,aj,ak,al,G,H){for(var q=b.context,h=q.gl,I=b.transform,o="map"===aj,i="map"===ak,r=o&&"point"!==e.layout.get("symbol-placement"),s=o&&!i&&!r,am=void 0!==e.layout.get("symbol-sort-key").constantOr(1),J=!1,L=b.depthModeForSublayer(0,K.ReadOnly),M=e.layout.get("text-variable-anchor"),p=[],t=0,N=ai;t<N.length;t+=1){var l=N[t],g=ah.getTile(l),c=g.getBucket(e);if(c){var j=f?c.text:c.icon;if(j&&j.segments.get().length){var an=j.programConfigurations.get(e.id),m=f||c.sdfIcons,k=f?c.textSizeData:c.iconSizeData,O=i||0!==I.pitch,ao=b.useProgram(c5(m,f,c),an),u=a.evaluateSizeForZoom(k,I.zoom),n=void 0,P=[0,0],v=void 0,w=void 0,Q=null,R=void 0;if(f)v=g.glyphAtlasTexture,w=h.LINEAR,n=g.glyphAtlasTexture.size,c.iconsInText&&(P=g.imageAtlasTexture.size,Q=g.imageAtlasTexture,R=O||b.options.rotating||b.options.zooming||"composite"===k.kind||"camera"===k.kind?h.LINEAR:h.NEAREST);else{var ap=1!==e.layout.get("icon-size").constantOr(0)||c.iconsNeedLinear;v=g.imageAtlasTexture,w=m||b.options.rotating||b.options.zooming||ap||O?h.LINEAR:h.NEAREST,n=g.imageAtlasTexture.size}var S,T,U,V,W,X,Y,Z,$,_,aa=cq(g,1,b.transform.zoom),ab=cc(l.posMatrix,i,o,b.transform,aa),ac=cd(l.posMatrix,i,o,b.transform,aa),aq=M&&c.hasTextData(),ar="none"!==e.layout.get("icon-text-fit")&&aq&&c.hasIconData();r&&ch(c,l.posMatrix,b,f,ab,ac,i,al);var x=b.translatePosMatrix(l.posMatrix,g,E,F),y=r||f&&M||ar?c2:ab,z=b.translatePosMatrix(ac,g,E,F,!0),as=m&&0!==e.paint.get(f?"text-halo-width":"icon-halo-width").constantOr(1),ad={program:ao,buffers:j,uniformValues:m?c.iconsInText?(S=k.kind,T=u,U=s,V=i,W=b,X=x,Y=y,Z=z,$=n,_=P,a.extend(c$(S,T,U,V,W,X,Y,Z,!0,$,!0),{u_texsize_icon:_,u_texture_icon:1})):c$(k.kind,u,s,i,b,x,y,z,f,n,!0):cZ(k.kind,u,s,i,b,x,y,z,f,n),atlasTexture:v,atlasTextureIcon:Q,atlasInterpolation:w,atlasInterpolationIcon:R,isSDF:m,hasHalo:as};if(am&&c.canOverlap){J=!0;for(var A=0,ae=j.segments.get();A<ae.length;A+=1){var af=ae[A];p.push({segments:new a.SegmentVector([af]),sortKey:af.sortKey,state:ad})}}else p.push({segments:j.segments,sortKey:0,state:ad})}}}J&&p.sort(function(a,b){return a.sortKey-b.sortKey});for(var B=0,ag=p;B<ag.length;B+=1){var C=ag[B],d=C.state;if(q.activeTexture.set(h.TEXTURE0),d.atlasTexture.bind(d.atlasInterpolation,h.CLAMP_TO_EDGE),d.atlasTextureIcon&&(q.activeTexture.set(h.TEXTURE1),d.atlasTextureIcon&&d.atlasTextureIcon.bind(d.atlasInterpolationIcon,h.CLAMP_TO_EDGE)),d.isSDF){var D=d.uniformValues;d.hasHalo&&(D.u_is_halo=1,c7(d.buffers,C.segments,e,b,d.program,L,G,H,D)),D.u_is_halo=0}c7(d.buffers,C.segments,e,b,d.program,L,G,H,d.uniformValues)}}function c7(a,e,b,c,f,g,h,i,j){var d=c.context;f.draw(d,d.gl.TRIANGLES,g,h,i,O.disabled,j,b.id,a.layoutVertexBuffer,a.indexBuffer,e,b.paint,c.transform.zoom,a.programConfigurations.get(b.id),a.dynamicLayoutVertexBuffer,a.opacityVertexBuffer)}function c8(b,F,c,G,H,I,t){var k,h,l,m,n,e=b.context.gl,o=c.paint.get("fill-pattern"),g=o&&o.constantOr(1),p=c.getCrossfadeParameters();t?(h=g&&!c.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",k=e.LINES):(h=g?"fillPattern":"fill",k=e.TRIANGLES);for(var q=0,u=G;q<u.length;q+=1){var r=u[q],d=F.getTile(r);if(!g||d.patternsLoaded()){var f=d.getBucket(c);if(f){var i=f.programConfigurations.get(c.id),J=b.useProgram(h,i);g&&(b.context.activeTexture.set(e.TEXTURE0),d.imageAtlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE),i.updatePaintBuffers(p));var s=o.constantOr(null);if(s&&d.imageAtlas){var v=d.imageAtlas,w=v.patternPositions[s.to.toString()],x=v.patternPositions[s.from.toString()];w&&x&&i.setConstantPatternPositions(w,x)}var j=b.translatePosMatrix(r.posMatrix,d,c.paint.get("fill-translate"),c.paint.get("fill-translate-anchor"));if(t){m=f.indexBuffer2,n=f.segments2;var y,z,A,B,C,D,K,E=[e.drawingBufferWidth,e.drawingBufferHeight];l="fillOutlinePattern"===h&&g?(y=j,z=b,A=p,B=d,C=E,a.extend(cL(y,z,A,B),{u_world:C})):(D=j,{u_matrix:D,u_world:K=E})}else m=f.indexBuffer,n=f.segments,l=g?cL(j,b,p,d):cK(j);J.draw(b.context,k,H,b.stencilModeForClipping(r),I,O.disabled,l,c.id,f.layoutVertexBuffer,m,n,c.paint,b.transform.zoom,i)}}}}function c9(c,C,b,D,E,F,G){for(var g=c.context,h=g.gl,o=b.paint.get("fill-extrusion-pattern"),i=o.constantOr(1),p=b.getCrossfadeParameters(),q=b.paint.get("fill-extrusion-opacity"),j=0,r=D;j<r.length;j+=1){var k=r[j],d=C.getTile(k),e=d.getBucket(b);if(e){var f=e.programConfigurations.get(b.id),H=c.useProgram(i?"fillExtrusionPattern":"fillExtrusion",f);i&&(c.context.activeTexture.set(h.TEXTURE0),d.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),f.updatePaintBuffers(p));var l=o.constantOr(null);if(l&&d.imageAtlas){var s=d.imageAtlas,t=s.patternPositions[l.to.toString()],u=s.patternPositions[l.from.toString()];t&&u&&f.setConstantPatternPositions(t,u)}var v,m,w,x,y,z,n,A=c.translatePosMatrix(k.posMatrix,d,b.paint.get("fill-extrusion-translate"),b.paint.get("fill-extrusion-translate-anchor")),B=b.paint.get("fill-extrusion-vertical-gradient"),I=i?(v=A,m=c,w=B,x=q,y=k,z=p,n=d,a.extend(cJ(v,m,w,x),cI(z,m,n),{u_height_factor:-Math.pow(2,y.overscaledZ
1)/n.tileSize/8})):cJ(A,c,B,q);H.draw(g,g.gl.TRIANGLES,E,F,G,O.backCCW,I,b.id,e.layoutVertexBuffer,e.indexBuffer,e.segments,b.paint,c.transform.zoom,f)}}}function da(b,k,l,s,t,u){var f=b.context,d=f.gl,m=k.fbo;if(m){var e,g,c,n,o,p,h,q,i,j,r,v=b.useProgram("hillshade");f.activeTexture.set(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,m.colorAttachment.get());var w=(e=b,g=k,n=(c=l).paint.get("hillshade-shadow-color"),o=c.paint.get("hillshade-highlight-color"),p=c.paint.get("hillshade-accent-color"),h=c.paint.get("hillshade-illumination-direction")*(Math.PI/180),"viewport"===c.paint.get("hillshade-illumination-anchor")&&(h-=e.transform.angle),r=!e.options.moving,{u_matrix:e.transform.calculatePosMatrix(g.tileID.toUnwrapped(),r),u_image:0,u_latrange:(i=Math.pow(2,(q=g.tileID).canonical.z),j=q.canonical.y,[new a.MercatorCoordinate(0,j/i).toLngLat().lat,new a.MercatorCoordinate(0,(j+1)/i).toLngLat().lat]),u_light:[c.paint.get("hillshade-exaggeration"),h],u_shadow:n,u_highlight:o,u_accent:p});v.draw(f,d.TRIANGLES,s,t,u,O.disabled,w,l.id,b.rasterBoundsBuffer,b.quadTriangleIndexBuffer,b.rasterBoundsSegments)}}function db(e,b,p,q,r,s){var d=e.context,c=d.gl,f=b.dem;if(f&&f.data){var k,l,i,h,g=f.dim,t=f.stride,m=f.getPixels();if(d.activeTexture.set(c.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),b.demTexture=b.demTexture||e.getTileTexture(t),b.demTexture){var n=b.demTexture;n.update(m,{premultiply:!1}),n.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else b.demTexture=new a.Texture(d,m,c.RGBA,{premultiply:!1}),b.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);d.activeTexture.set(c.TEXTURE0);var j=b.fbo;if(!j){var o=new a.Texture(d,{width:g,height:g,data:null},c.RGBA);o.bind(c.LINEAR,c.CLAMP_TO_EDGE),(j=b.fbo=d.createFramebuffer(g,g,!0)).colorAttachment.set(o.texture)}d.bindFramebuffer.set(j.framebuffer),d.viewport.set([0,0,g,g]),e.useProgram("hillshadePrepare").draw(d,c.TRIANGLES,q,r,s,O.disabled,(k=b.tileID,i=(l=f).stride,h=a.create(),a.ortho(h,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(h,h,[0,-a.EXTENT,0]),{u_matrix:h,u_image:1,u_dimension:[i,i],u_zoom:k.overscaledZ,u_unpack:l.getUnpackVector()}),p.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),b.needsHillshadePrepare=!1}}function dc(b,c,k,l,m){var d=l.paint.get("raster-fade-duration");if(d>0){var e=a.browser.now(),f=(e-b.timeAdded)/d,n=c?(e-c.timeAdded)/d:-1,g=k.getSource(),h=m.coveringZoomLevel({tileSize:g.tileSize,roundZoom:g.roundZoom}),i=!c||Math.abs(c.tileID.overscaledZ-h)>Math.abs(b.tileID.overscaledZ-h),j=i&&b.refreshedUponExpiration?1:a.clamp(i?f:1-n,0,1);return b.refreshedUponExpiration&&f>=1&&(b.refreshedUponExpiration=!1),c?{opacity:1,mix:1-j}:{opacity:j,mix:0}}return{opacity:1,mix:0}}var dd=new a.Color(1,0,0,1),de=new a.Color(0,1,0,1),df=new a.Color(0,0,1,1),dg=new a.Color(1,0,1,1),dh=new a.Color(0,1,1,1);function di(a,c,b,d){dk(a,0,c+b/2,a.transform.width,b,d)}function dj(a,c,b,d){dk(a,c-b/2,0,b,a.transform.height,d)}function dk(d,e,f,g,h,i){var c=d.context,b=c.gl;b.enable(b.SCISSOR_TEST),b.scissor(e*a.browser.devicePixelRatio,f*a.browser.devicePixelRatio,g*a.browser.devicePixelRatio,h*a.browser.devicePixelRatio),c.clear({color:i}),b.disable(b.SCISSOR_TEST)}function dl(b,f,c){var e=b.context,d=e.gl,g=c.posMatrix,h=b.useProgram("debug"),i=K.disabled,j=aj.disabled,m=b.colorModeForRenderPass();e.activeTexture.set(d.TEXTURE0),b.emptyTexture.bind(d.LINEAR,d.CLAMP_TO_EDGE),h.draw(e,d.LINE_STRIP,i,j,m,O.disabled,cO(g,a.Color.red),"$debug",b.debugBuffer,b.tileBorderIndexBuffer,b.debugSegments);var k=f.getTileByID(c.key).latestRawTileData,n=Math.floor((k&&k.byteLength||0)/1024),o=512/Math.min(f.getTile(c).tileSize,512)*(c.overscaledZ/b.transform.zoom)*.5,l=c.canonical.toString();c.overscaledZ!==c.canonical.z&&(l+=" => "+c.overscaledZ),function(b,d){b.initDebugOverlayCanvas();var c=b.debugOverlayCanvas,e=b.context.gl,a=b.debugOverlayCanvas.getContext("2d");a.clearRect(0,0,c.width,c.height),a.shadowColor="white",a.shadowBlur=2,a.lineWidth=1.5,a.strokeStyle="white",a.textBaseline="top",a.font="bold 36px Open Sans, sans-serif",a.fillText(d,5,5),a.strokeText(d,5,5),b.debugOverlayTexture.update(c),b.debugOverlayTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)}(b,l+" "+n+"kb"),h.draw(e,d.TRIANGLES,i,j,z.alphaBlended,O.disabled,cO(g,a.Color.transparent,o),"$debug",b.debugBuffer,b.quadTriangleIndexBuffer,b.debugSegments)}var dm={symbol:function(c,d,b,e,h){if("translucent"===c.renderPass){var f=aj.disabled,g=c.colorModeForRenderPass();b.layout.get("text-variable-anchor")&&function(m,c,h,n,o,p,q){for(var d=c.transform,i="map"===o,j="map"===p,e=0,k=m;e<k.length;e+=1){var f=k[e],g=n.getTile(f),b=g.getBucket(h);if(b&&b.text&&b.text.segments.get().length){var l=a.evaluateSizeForZoom(b.textSizeData,d.zoom),r=cq(g,1,c.transform.zoom),s=cc(f.posMatrix,j,i,c.transform,r),t="none"!==h.layout.get("icon-text-fit")&&b.hasIconData();
1if(l){var u=Math.pow(2,d.zoom-g.tileID.overscaledZ);c4(b,i,j,q,a.symbolSize,d,s,f.posMatrix,u,l,t)}}}}(e,c,b,d,b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),h),0!==b.paint.get("icon-opacity").constantOr(1)&&c6(c,d,b,e,!1,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),b.layout.get("icon-rotation-alignment"),b.layout.get("icon-pitch-alignment"),b.layout.get("icon-keep-upright"),f,g),0!==b.paint.get("text-opacity").constantOr(1)&&c6(c,d,b,e,!0,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),b.layout.get("text-keep-upright"),f,g),d.map.showCollisionBoxes&&(c1(c,d,b,e,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),!0),c1(c,d,b,e,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),!1))}},circle:function(c,u,b,j){if("translucent"===c.renderPass){var v=b.paint.get("circle-opacity"),w=b.paint.get("circle-stroke-width"),x=b.paint.get("circle-stroke-opacity"),k=void 0!==b.layout.get("circle-sort-key").constantOr(1);if(0!==v.constantOr(1)||0!==w.constantOr(1)&&0!==x.constantOr(1)){for(var l=c.context,y=l.gl,z=c.depthModeForSublayer(0,K.ReadOnly),A=aj.disabled,B=c.colorModeForRenderPass(),f=[],g=0;g<j.length;g++){var m=j[g],n=u.getTile(m),d=n.getBucket(b);if(d){var o=d.programConfigurations.get(b.id),p={programConfiguration:o,program:c.useProgram("circle",o),layoutVertexBuffer:d.layoutVertexBuffer,indexBuffer:d.indexBuffer,uniformValues:cM(c,m,n,b)};if(k)for(var h=0,q=d.segments.get();h<q.length;h+=1){var r=q[h];f.push({segments:new a.SegmentVector([r]),sortKey:r.sortKey,state:p})}else f.push({segments:d.segments,sortKey:0,state:p})}}k&&f.sort(function(a,b){return a.sortKey-b.sortKey});for(var i=0,s=f;i<s.length;i+=1){var t=s[i],e=t.state;e.program.draw(l,y.TRIANGLES,z,A,B,O.disabled,e.uniformValues,b.id,e.layoutVertexBuffer,e.indexBuffer,t.segments,b.paint,c.transform.zoom,e.programConfiguration)}}}},heatmap:function(b,i,c,j){if(0!==c.paint.get("heatmap-opacity")){if("offscreen"===b.renderPass){var d=b.context,f=d.gl,q=aj.disabled,r=new z([f.ONE,f.ONE],a.Color.transparent,[!0,!0,!0,!0]);(function(b,d,h){var a=b.gl;b.activeTexture.set(a.TEXTURE1),b.viewport.set([0,0,d.width/4,d.height/4]);var e=h.heatmapFbo;if(e)a.bindTexture(a.TEXTURE_2D,e.colorAttachment.get()),b.bindFramebuffer.set(e.framebuffer);else{var f,g,i,j,c,k=a.createTexture();a.bindTexture(a.TEXTURE_2D,k),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),e=h.heatmapFbo=b.createFramebuffer(d.width/4,d.height/4,!1),f=b,g=d,i=k,j=e,c=f.gl,c.texImage2D(c.TEXTURE_2D,0,c.RGBA,g.width/4,g.height/4,0,c.RGBA,f.extRenderToTextureHalfFloat?f.extTextureHalfFloat.HALF_FLOAT_OES:c.UNSIGNED_BYTE,null),j.colorAttachment.set(i)}})(d,b,c),d.clear({color:a.Color.transparent});for(var g=0;g<j.length;g++){var h=j[g];if(!i.hasRenderableParent(h)){var k=i.getTile(h),e=k.getBucket(c);if(e){var l,m,n,o,p=e.programConfigurations.get(c.id);b.useProgram("heatmap",p).draw(d,f.TRIANGLES,K.disabled,q,r,O.disabled,(l=h.posMatrix,m=k,n=b.transform.zoom,o=c.paint.get("heatmap-intensity"),{u_matrix:l,u_extrude_scale:cq(m,1,n),u_intensity:o}),c.id,e.layoutVertexBuffer,e.indexBuffer,e.segments,c.paint,b.transform.zoom,p)}}}d.viewport.set([0,0,b.width,b.height])}else"translucent"===b.renderPass&&(b.context.setColorMode(b.colorModeForRenderPass()),function(b,d){var e=b.context,c=e.gl,j=d.heatmapFbo;if(j){e.activeTexture.set(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,j.colorAttachment.get()),e.activeTexture.set(c.TEXTURE1);var f,k,g,h,i=d.colorRampTexture;i||(i=d.colorRampTexture=new a.Texture(e,d.colorRamp,c.RGBA)),i.bind(c.LINEAR,c.CLAMP_TO_EDGE),b.useProgram("heatmapTexture").draw(e,c.TRIANGLES,K.disabled,aj.disabled,b.colorModeForRenderPass(),O.disabled,(f=b,k=d,g=a.create(),a.ortho(g,0,f.width,f.height,0,0,1),h=f.context.gl,{u_matrix:g,u_world:[h.drawingBufferWidth,h.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:k.paint.get("heatmap-opacity")}),d.id,b.viewportBuffer,b.quadTriangleIndexBuffer,b.viewportSegments,d.paint,b.transform.zoom)}}(b,c))}},line:function(c,q,b,A){if("translucent"===c.renderPass){var B=b.paint.get("line-opacity"),C=b.paint.get("line-width");if(0!==B.constantOr(1)&&0!==C.constantOr(1))for(var D=c.depthModeForSublayer(0,K.ReadOnly),E=c.colorModeForRenderPass(),i=b.paint.get("line-dasharray"),r=b.paint.get("line-pattern"),j=r.constantOr(1),m=b.paint.get("line-gradient"),n=b.getCrossfadeParameters(),F=j?"linePattern":i?"lineSDF":m?"lineGradient":"line",h=c.context,e=h.gl,s=!0,o=0,t=A;o<t.length;o+=1){var k=t[o],g=q.getTile(k);if(!j||g.patternsLoaded()){var f=g.getBucket(b);if(f){var l=f.programConfigurations.get(b.id),G=c.context.program.get(),u=c.useProgram(F,l),H=s||u.program!==G,p=r.constantOr(null);if(p&&g.imageAtlas){var v=g.imageAtlas,w=v.patternPositions[p.to.toString()],x=v.patternPositions[p.from.toString()];w&&x&&l.setConstantPatternPositions(w,x)}var I=j?cS(c,g,b,n):i?cT(c,g,b,i,n):m?cR(c,g,b,f.lineClipsArray.length):cQ(c,g,b);if(j)h.activeTexture.set(e.TEXTURE0),g.imageAtlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE),l.updatePaintBuffers(n);else if(i&&(H||c.lineAtlas.dirty))h.activeTexture.set(e.TEXTURE0),c.lineAtlas.bind(h);else if(m){var d=f.gradients[b.id],y=d.texture;if(b.gradientVersion!==d.version){var z=256;if(b.stepInterpolant){var J=q.getSource().maxzoom,L=k.canonical.z===J?Math.ceil(1<<c.transform.maxZoom-k.canonical.z):1;z=a.clamp(a.nextPowerOfTwo(f.maxLineLength/a.EXTENT*1024*L),256,h.maxTextureSize)}
vendor: 50,731 bytes, line 1
1d.gradient=a.renderColorRamp({expression:b.gradientExpression(),evaluationKey:"lineProgress",resolution:z,image:d.gradient||void 0,clips:f.lineClipsArray}),d.texture?d.texture.update(d.gradient):d.texture=new a.Texture(h,d.gradient,e.RGBA),d.version=b.gradientVersion,y=d.texture}h.activeTexture.set(e.TEXTURE0),y.bind(b.stepInterpolant?e.NEAREST:e.LINEAR,e.CLAMP_TO_EDGE)}u.draw(h,e.TRIANGLES,D,c.stencilModeForClipping(k),E,O.disabled,I,b.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,b.paint,c.transform.zoom,l,f.layoutVertexBuffer2),s=!1}}}}},fill:function(b,d,c,e){var h=c.paint.get("fill-color"),f=c.paint.get("fill-opacity");if(0!==f.constantOr(1)){var g=b.colorModeForRenderPass(),i=c.paint.get("fill-pattern"),j=b.opaquePassEnabledForLayer()&&!i.constantOr(1)&&1===h.constantOr(a.Color.transparent).a&&1===f.constantOr(0)?"opaque":"translucent";if(b.renderPass===j){var k=b.depthModeForSublayer(1,"opaque"===b.renderPass?K.ReadWrite:K.ReadOnly);c8(b,d,c,e,k,g,!1)}if("translucent"===b.renderPass&&c.paint.get("fill-antialias")){var l=b.depthModeForSublayer(c.getPaintProperty("fill-outline-color")?2:0,K.ReadOnly);c8(b,d,c,e,l,g,!0)}}},"fill-extrusion":function(a,c,b,d){var f=b.paint.get("fill-extrusion-opacity");if(0!==f&&"translucent"===a.renderPass){var e=new K(a.context.gl.LEQUAL,K.ReadWrite,a.depthRangeFor3D);if(1!==f||b.paint.get("fill-extrusion-pattern").constantOr(1))c9(a,c,b,d,e,aj.disabled,z.disabled),c9(a,c,b,d,e,a.stencilModeFor3D(),a.colorModeForRenderPass());else{var g=a.colorModeForRenderPass();c9(a,c,b,d,e,aj.disabled,g)}}},hillshade:function(a,k,d,e){if("offscreen"===a.renderPass||"translucent"===a.renderPass){for(var l=a.context,f=a.depthModeForSublayer(0,K.ReadOnly),g=a.colorModeForRenderPass(),h="translucent"===a.renderPass?a.stencilConfigForOverlap(e):[{},e],m=h[0],b=0,i=h[1];b<i.length;b+=1){var j=i[b],c=k.getTile(j);c.needsHillshadePrepare&&"offscreen"===a.renderPass?db(a,c,d,f,aj.disabled,g):"translucent"===a.renderPass&&da(a,c,d,f,m[j.overscaledZ],g)}l.viewport.set([0,0,a.width,a.height])}},raster:function(a,g,c,k){if("translucent"===a.renderPass&&0!==c.paint.get("raster-opacity")&&k.length)for(var e=a.context,b=e.gl,h=g.getSource(),o=a.useProgram("raster"),p=a.colorModeForRenderPass(),q=h instanceof _?[{},k]:a.stencilConfigForOverlap(k),v=q[0],l=q[1],w=l[l.length-1].overscaledZ,x=!a.options.moving,m=0,r=l;m<r.length;m+=1){var f=r[m],s=a.depthModeForSublayer(f.overscaledZ-w,1===c.paint.get("raster-opacity")?K.ReadWrite:K.ReadOnly,b.LESS),d=g.getTile(f),y=a.transform.calculatePosMatrix(f.toUnwrapped(),x);d.registerFadeDuration(c.paint.get("raster-fade-duration"));var i=g.findLoadedParent(f,0),z=dc(d,i,g,c,a.transform),j=void 0,t=void 0,n="nearest"===c.paint.get("raster-resampling")?b.NEAREST:b.LINEAR;e.activeTexture.set(b.TEXTURE0),d.texture.bind(n,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST),e.activeTexture.set(b.TEXTURE1),i?(i.texture.bind(n,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST),j=Math.pow(2,i.tileID.overscaledZ-d.tileID.overscaledZ),t=[d.tileID.canonical.x*j%1,d.tileID.canonical.y*j%1]):d.texture.bind(n,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST);var u=cW(y,t||[0,0],j||1,z,c);h instanceof _?o.draw(e,b.TRIANGLES,s,aj.disabled,p,O.disabled,u,c.id,h.boundsBuffer,a.quadTriangleIndexBuffer,h.boundsSegments):o.draw(e,b.TRIANGLES,s,v[f.overscaledZ],p,O.disabled,u,c.id,a.rasterBoundsBuffer,a.quadTriangleIndexBuffer,a.rasterBoundsSegments)}},background:function(a,y,c){var g=c.paint.get("background-color"),d=c.paint.get("background-opacity");if(0!==d){var e=a.context,h=e.gl,i=a.transform,j=i.tileSize,b=c.paint.get("background-pattern");if(!a.isPatternMissing(b)){var k=!b&&1===g.a&&1===d&&a.opaquePassEnabledForLayer()?"opaque":"translucent";if(a.renderPass===k){var q=aj.disabled,r=a.depthModeForSublayer(0,"opaque"===k?K.ReadWrite:K.ReadOnly),s=a.colorModeForRenderPass(),t=a.useProgram(b?"backgroundPattern":"background"),u=i.coveringTiles({tileSize:j});b&&(e.activeTexture.set(h.TEXTURE0),a.imageManager.bind(a.context));for(var v=c.getCrossfadeParameters(),f=0,l=u;f<l.length;f+=1){var m,n,w,o=l[f],p=a.transform.calculatePosMatrix(o.toUnwrapped()),x=b?c_(p,d,a,b,{tileID:o,tileSize:j},v):(m=p,n=d,{u_matrix:m,u_opacity:n,u_color:w=g});t.draw(e,h.TRIANGLES,r,q,s,O.disabled,x,c.id,a.tileExtentBuffer,a.quadTriangleIndexBuffer,a.tileExtentSegments)}}}}},debug:function(c,d,b){for(var a=0;a<b.length;a++)dl(c,d,b[a])},custom:function(a,g,e){var b=a.context,c=e.implementation;if("offscreen"===a.renderPass){var d=c.prerender;d&&(a.setCustomLayerDefaults(),b.setColorMode(a.colorModeForRenderPass()),d.call(c,b.gl,a.transform.customLayerMatrix()),b.setDirty(),a.setBaseState())}else if("translucent"===a.renderPass){a.setCustomLayerDefaults(),b.setColorMode(a.colorModeForRenderPass()),b.setStencilMode(aj.disabled);var f="3d"===c.renderingMode?new K(a.context.gl.LEQUAL,K.ReadWrite,a.depthRangeFor3D):a.depthModeForSublayer(0,K.ReadOnly);b.setDepthMode(f),c.render(b.gl,a.transform.customLayerMatrix()),b.setDirty(),a.setBaseState(),b.bindFramebuffer.set(null)}}},e=function(a,b){this.context=new m(a),this.transform=b,this._tileTextures={},this.setup(),this.numSublayers=ak.maxUnderzooming+ak.maxOverzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new ao,this.gpuTimers={}};e.prototype.resize=function(d,e){if(this.width=d*a.browser.devicePixelRatio,this.height=e*a.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var b=0,c=this.style._order;b<c.length;b+=1)this.style._layers[c[b]].resize()},e.prototype.setup=function(){var b=this.context,d=new a.StructArrayLayout2i4;d.emplaceBack(0,0),d.emplaceBack(a.EXTENT,0),d.emplaceBack(0,a.EXTENT),d.emplaceBack(a.EXTENT,a.EXTENT),this.tileExtentBuffer=b.createVertexBuffer(d,cE.members),this.tileExtentSegments=a.SegmentVector.simpleSegment(0,0,4,2);var e=new a.StructArrayLayout2i4;e.emplaceBack(0,0),e.emplaceBack(a.EXTENT,0),e.emplaceBack(0,a.EXTENT),e.emplaceBack(a.EXTENT,a.EXTENT),this.debugBuffer=b.createVertexBuffer(e,cE.members),this.debugSegments=a.SegmentVector.simpleSegment(0,0,4,5);var f=new a.StructArrayLayout4i8;f.emplaceBack(0,0,0,0),f.emplaceBack(a.EXTENT,0,a.EXTENT,0),f.emplaceBack(0,a.EXTENT,0,a.EXTENT),f.emplaceBack(a.EXTENT,a.EXTENT,a.EXTENT,a.EXTENT),this.rasterBoundsBuffer=b.createVertexBuffer(f,bm.members),this.rasterBoundsSegments=a.SegmentVector.simpleSegment(0,0,4,2);var g=new a.StructArrayLayout2i4;g.emplaceBack(0,0),g.emplaceBack(1,0),g.emplaceBack(0,1),g.emplaceBack(1,1),this.viewportBuffer=b.createVertexBuffer(g,cE.members),this.viewportSegments=a.SegmentVector.simpleSegment(0,0,4,2);var c=new a.StructArrayLayout1ui2;c.emplaceBack(0),c.emplaceBack(1),c.emplaceBack(3),c.emplaceBack(2),c.emplaceBack(0),this.tileBorderIndexBuffer=b.createIndexBuffer(c);var i=new a.StructArrayLayout3ui6;i.emplaceBack(0,1,2),i.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=b.createIndexBuffer(i),this.emptyTexture=new a.Texture(b,{width:1,height:1,data:new Uint8Array([0,0,0,0])},b.gl.RGBA);var h=this.context.gl;this.stencilClearMode=new aj({func:h.ALWAYS,mask:0},0,255,h.ZERO,h.ZERO,h.ZERO)},e.prototype.clearStencil=function(){var d=this.context,c=d.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var b=a.create();a.ortho(b,0,this.width,this.height,0,0,1),a.scale(b,b,[c.drawingBufferWidth,c.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(d,c.TRIANGLES,K.disabled,this.stencilClearMode,z.disabled,O.disabled,cP(b),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},e.prototype._renderTileClippingMasks=function(d,b){if(this.currentStencilSource!==d.source&&d.isTileClipped()&&b&&b.length){this.currentStencilSource=d.source;var c=this.context,a=c.gl;this.nextStencilID+b.length>256&&this.clearStencil(),c.setColorMode(z.disabled),c.setDepthMode(K.disabled);var h=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var e=0,f=b;e<f.length;e+=1){var g=f[e],i=this._tileClippingMaskIDs[g.key]=this.nextStencilID++;h.draw(c,a.TRIANGLES,K.disabled,new aj({func:a.ALWAYS,mask:0},i,255,a.KEEP,a.KEEP,a.REPLACE),z.disabled,O.disabled,cP(g.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},e.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var b=this.nextStencilID++,a=this.context.gl;return new aj({func:a.NOTEQUAL,mask:255},b,255,a.KEEP,a.KEEP,a.REPLACE)},e.prototype.stencilModeForClipping=function(b){var a=this.context.gl;return new aj({func:a.EQUAL,mask:255},this._tileClippingMaskIDs[b.key],0,a.KEEP,a.KEEP,a.REPLACE)},e.prototype.stencilConfigForOverlap=function(h){var f,b=this.context.gl,a=h.sort(function(a,b){return b.overscaledZ-a.overscaledZ}),e=a[a.length-1].overscaledZ,c=a[0].overscaledZ-e+1;if(c>1){this.currentStencilSource=void 0,this.nextStencilID+c>256&&this.clearStencil();for(var g={},d=0;d<c;d++)g[d+e]=new aj({func:b.GEQUAL,mask:255},d+this.nextStencilID,255,b.KEEP,b.KEEP,b.REPLACE);return this.nextStencilID+=c,[g,a]}return[((f={})[e]=aj.disabled,f),a]},e.prototype.colorModeForRenderPass=function(){var b=this.context.gl;return this._showOverdrawInspector?new z([b.CONSTANT_COLOR,b.ONE],new a.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?z.unblended:z.alphaBlended},e.prototype.depthModeForSublayer=function(b,c,d){if(!this.opaquePassEnabledForLayer())return K.disabled;var a=1-((1+this.currentLayer)*this.numSublayers+b)*this.depthEpsilon;return new K(d||this.context.gl.LEQUAL,c,[a,a])},e.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},e.prototype.render=function(e,m){var b,h,n,o,p,q,r,F=this;this.style=e,this.options=m,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(a.browser.now()),this.imageManager.beginFrame();var c=this.style._order,d=this.style.sourceCaches;for(var B in d){var v=d[B];v.used&&v.prepare(this.context)}var s,G,j={},t={},w={};for(var i in d){var x=d[i];j[i]=x.getVisibleCoordinates(),t[i]=j[i].slice().reverse(),w[i]=x.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var k=0;k<c.length;k++)if(this.style._layers[c[k]].is3D()){this.opaquePassCutoff=k;break}this.renderPass="offscreen";for(var u=0,y=c;u<y.length;u+=1){var f=this.style._layers[y[u]];if(f.hasOffscreenPass()&&!f.isHidden(this.transform.zoom)){var z=t[f.source];("custom"===f.type||z.length)&&this.renderLayer(this,d[f.source],f,z)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:m.showOverdrawInspector?a.Color.black:a.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=m.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=c.length-1;this.currentLayer>=0;this.currentLayer--){var l=this.style._layers[c[this.currentLayer]],C=d[l.source],A=j[l.source];this._renderTileClippingMasks(l,A),this.renderLayer(this,C,l,A)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<c.length;this.currentLayer++){var g=this.style._layers[c[this.currentLayer]],D=d[g.source],E=("symbol"===g.type?w:t)[g.source];this._renderTileClippingMasks(g,j[g.source]),this.renderLayer(this,D,g,E)}this.options.showTileBoundaries&&(a.values(this.style._layers).forEach(function(a){a.source&&!a.isHidden(F.transform.zoom)&&(a.source!==(G&&G.id)&&(G=F.style.sourceCaches[a.source]),(!s||s.getSource().maxzoom<G.getSource().maxzoom)&&(s=G))}),s&&dm.debug(this,s,s.getVisibleCoordinates())),this.options.showPadding&&(b=this,h=b.transform.padding,di(b,b.transform.height-(h.top||0),3,dd),di(b,h.bottom||0,3,de),dj(b,h.left||0,3,df),dj(b,b.transform.width-(h.right||0),3,dg),n=b.transform.centerPoint,o=b,p=n.x,q=b.transform.height-n.y,r=dh,dk(o,p-1,q-10,2,20,r),dk(o,p-10,q-1,20,2,r)),this.context.setDefault()},e.prototype.renderLayer=function(c,d,a,b){a.isHidden(this.transform.zoom)||("background"===a.type||"custom"===a.type||b.length)&&(this.id=a.id,this.gpuTimingStart(a),dm[a.type](c,d,a,b,this.style.placement.variableOffsets),this.gpuTimingEnd())},e.prototype.gpuTimingStart=function(c){if(this.options.gpuTiming){var b=this.context.extTimerQuery,a=this.gpuTimers[c.id];a||(a=this.gpuTimers[c.id]={calls:0,cpuTime:0,query:b.createQueryEXT()}),a.calls++,b.beginQueryEXT(b.TIME_ELAPSED_EXT,a.query)}},e.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var a=this.context.extTimerQuery;a.endQueryEXT(a.TIME_ELAPSED_EXT)}},e.prototype.collectGpuTimers=function(){var a=this.gpuTimers;return this.gpuTimers={},a},e.prototype.queryGpuTimers=function(b){var c={};for(var d in b){var e=b[d],a=this.context.extTimerQuery,f=a.getQueryObjectEXT(e.query,a.QUERY_RESULT_EXT)/1e6;a.deleteQueryEXT(e.query),c[d]=f}return c},e.prototype.translatePosMatrix=function(e,f,b,g,c){if(!b[0]&&!b[1])return e;var d=c?"map"===g?this.transform.angle:0:"viewport"===g?-this.transform.angle:0;if(d){var h=Math.sin(d),i=Math.cos(d);b=[b[0]*i-b[1]*h,b[0]*h+b[1]*i]}var k=[c?b[0]:cq(f,b[0],this.transform.zoom),c?b[1]:cq(f,b[1],this.transform.zoom),0],j=new Float32Array(16);return a.translate(j,e,k),j},e.prototype.saveTileTexture=function(a){var b=this._tileTextures[a.size[0]];b?b.push(a):this._tileTextures[a.size[0]]=[a]},e.prototype.getTileTexture=function(b){var a=this._tileTextures[b];return a&&a.length>0?a.pop():null},e.prototype.isPatternMissing=function(a){if(!a)return!1;if(!a.from||!a.to)return!0;var b=this.imageManager.getPattern(a.from.toString()),c=this.imageManager.getPattern(a.to.toString());return!b||!c},e.prototype.useProgram=function(a,b){this.cache=this.cache||{};var c=""+a+(b?b.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[c]||(this.cache[c]=new a1(this.context,a,cG[a],b,c0[a],this._showOverdrawInspector)),this.cache[c]},e.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()},e.prototype.setBaseState=function(){var a=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(a.FUNC_ADD)},e.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},e.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var a2=function(a,b){this.points=a,this.planes=b};a2.fromInvProjectionMatrix=function(e,f,b){var g=Math.pow(2,b),c=[[-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(b){return a.transformMat4([],b,e)}).map(function(b){return a.scale$1([],b,1/b[3]/f*g)}),d=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(b){var e=a.sub([],c[b[0]],c[b[1]]),f=a.sub([],c[b[2]],c[b[1]]),d=a.normalize([],a.cross([],e,f)),g=-a.dot(d,c[b[1]]);return d.concat(g)});return new a2(c,d)};var R=function(b,c){this.min=b,this.max=c,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};R.prototype.quadrant=function(e){for(var c=[e%2==0,e<2],f=a.clone$2(this.min),d=a.clone$2(this.max),b=0;b<c.length;b++)f[b]=c[b]?this.min[b]:this.center[b],d[b]=c[b]?this.center[b]:this.max[b];return d[2]=this.max[2],new R(f,d)},R.prototype.distanceX=function(a){return Math.max(Math.min(this.max[0],a[0]),this.min[0])-a[0]},R.prototype.distanceY=function(a){return Math.max(Math.min(this.max[1],a[1]),this.min[1])-a[1]},R.prototype.intersects=function(c){for(var d=[[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]],k=!0,e=0;e<c.planes.length;e++){for(var m=c.planes[e],f=0,g=0;g<d.length;g++)f+=a.dot$1(m,d[g])>=0;if(0===f)return 0;f!==d.length&&(k=!1)}if(k)return 2;for(var b=0;b<3;b++){for(var h=Number.MAX_VALUE,i=-Number.MAX_VALUE,j=0;j<c.points.length;j++){var l=c.points[j][b]-this.min[b];h=Math.min(h,l),i=Math.max(i,l)}if(i<0||h>this.max[b]-this.min[b])return 0}return 1};var L=function(a,b,c,d){if(void 0===a&&(a=0),void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),isNaN(a)||a<0||isNaN(b)||b<0||isNaN(c)||c<0||isNaN(d)||d<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=a,this.bottom=b,this.left=c,this.right=d};L.prototype.interpolate=function(b,c,d){return null!=c.top&&null!=b.top&&(this.top=a.number(b.top,c.top,d)),null!=c.bottom&&null!=b.bottom&&(this.bottom=a.number(b.bottom,c.bottom,d)),null!=c.left&&null!=b.left&&(this.left=a.number(b.left,c.left,d)),null!=c.right&&null!=b.right&&(this.right=a.number(b.right,c.right,d)),this},L.prototype.getCenter=function(b,c){var d=a.clamp((this.left+b-this.right)/2,0,b),e=a.clamp((this.top+c-this.bottom)/2,0,c);return new a.Point(d,e)},L.prototype.equals=function(a){return this.top===a.top&&this.bottom===a.bottom&&this.left===a.left&&this.right===a.right},L.prototype.clone=function(){return new L(this.top,this.bottom,this.left,this.right)},L.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var c=function(e,f,b,c,d){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===d||d,this._minZoom=e||0,this._maxZoom=f||22,this._minPitch=null==b?0:b,this._maxPitch=null==c?60:c,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new L,this._posMatrixCache={},this._alignedPosMatrixCache={}},d={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}};c.prototype.clone=function(){var a=new c(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return a.tileSize=this.tileSize,a.latRange=this.latRange,a.width=this.width,a.height=this.height,a._center=this._center,a.zoom=this.zoom,a.angle=this.angle,a._fov=this._fov,a._pitch=this._pitch,a._unmodified=this._unmodified,a._edgeInsets=this._edgeInsets.clone(),a._calcMatrices(),a},d.minZoom.get=function(){return this._minZoom},d.minZoom.set=function(a){this._minZoom!==a&&(this._minZoom=a,this.zoom=Math.max(this.zoom,a))},d.maxZoom.get=function(){return this._maxZoom},d.maxZoom.set=function(a){this._maxZoom!==a&&(this._maxZoom=a,this.zoom=Math.min(this.zoom,a))},d.minPitch.get=function(){return this._minPitch},d.minPitch.set=function(a){this._minPitch!==a&&(this._minPitch=a,this.pitch=Math.max(this.pitch,a))},d.maxPitch.get=function(){return this._maxPitch},d.maxPitch.set=function(a){this._maxPitch!==a&&(this._maxPitch=a,this.pitch=Math.min(this.pitch,a))},d.renderWorldCopies.get=function(){return this._renderWorldCopies},d.renderWorldCopies.set=function(a){void 0===a?a=!0:null===a&&(a=!1),this._renderWorldCopies=a},d.worldSize.get=function(){return this.tileSize*this.scale},d.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},d.size.get=function(){return new a.Point(this.width,this.height)},d.bearing.get=function(){return-this.angle/Math.PI*180},d.bearing.set=function(c){var b=-a.wrap(c,-180,180)*Math.PI/180;this.angle!==b&&(this._unmodified=!1,this.angle=b,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},d.pitch.get=function(){return this._pitch/Math.PI*180},d.pitch.set=function(c){var b=a.clamp(c,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==b&&(this._unmodified=!1,this._pitch=b,this._calcMatrices())},d.fov.get=function(){return this._fov/Math.PI*180},d.fov.set=function(a){a=Math.max(.01,Math.min(60,a)),this._fov!==a&&(this._unmodified=!1,this._fov=a/180*Math.PI,this._calcMatrices())},d.zoom.get=function(){return this._zoom},d.zoom.set=function(b){var a=Math.min(Math.max(b,this.minZoom),this.maxZoom);this._zoom!==a&&(this._unmodified=!1,this._zoom=a,this.scale=this.zoomScale(a),this.tileZoom=Math.floor(a),this.zoomFraction=a-this.tileZoom,this._constrain(),this._calcMatrices())},d.center.get=function(){return this._center},d.center.set=function(a){a.lat===this._center.lat&&a.lng===this._center.lng||(this._unmodified=!1,this._center=a,this._constrain(),this._calcMatrices())},d.padding.get=function(){return this._edgeInsets.toJSON()},d.padding.set=function(a){this._edgeInsets.equals(a)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,a,1),this._calcMatrices())},d.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},c.prototype.isPaddingEqual=function(a){return this._edgeInsets.equals(a)},c.prototype.interpolatePadding=function(a,b,c){this._unmodified=!1,this._edgeInsets.interpolate(a,b,c),this._constrain(),this._calcMatrices()},c.prototype.coveringZoomLevel=function(a){var b=(a.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/a.tileSize));return Math.max(0,b)},c.prototype.getVisibleUnwrappedCoordinates=function(c){var d=[new a.UnwrappedTileID(0,c)];if(this._renderWorldCopies)for(var e=this.pointCoordinate(new a.Point(0,0)),f=this.pointCoordinate(new a.Point(this.width,0)),g=this.pointCoordinate(new a.Point(this.width,this.height)),h=this.pointCoordinate(new a.Point(0,this.height)),i=Math.floor(Math.min(e.x,f.x,g.x,h.x)),j=Math.floor(Math.max(e.x,f.x,g.x,h.x)),b=i-1;b<=j+1;b++)0!==b&&d.push(new a.UnwrappedTileID(b,c));return d},c.prototype.coveringTiles=function(d){var c=this.coveringZoomLevel(d),s=c;if(void 0!==d.minzoom&&c<d.minzoom)return[];void 0!==d.maxzoom&&c>d.maxzoom&&(c=d.maxzoom);var n=a.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,c),g=[o*n.x,o*n.y,0],t=a2.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,c),p=d.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(p=c);var i=function(a){return{aabb:new R([a*o,0,0],[(a+1)*o,o,0]),zoom:0,x:0,y:0,wrap:a,fullyVisible:!1}},e=[],q=[],j=c,u=d.reparseOverscaled?s:c;if(this._renderWorldCopies)for(var h=1;h<=3;h++)e.push(i(-h)),e.push(i(h));for(e.push(i(0));e.length>0;){var b=e.pop(),k=b.x,l=b.y,m=b.fullyVisible;if(!m){var r=b.aabb.intersects(t);if(0===r)continue;m=2===r}var v=b.aabb.distanceX(g),w=b.aabb.distanceY(g),x=Math.max(Math.abs(v),Math.abs(w));if(b.zoom===j||x>3+(1<<j-b.zoom)-2&&b.zoom>=p)q.push({tileID:new a.OverscaledTileID(b.zoom===j?u:b.zoom,b.wrap,b.zoom,k,l),distanceSq:a.sqrLen([g[0]-.5-k,g[1]-.5-l])});else for(var f=0;f<4;f++){var y=(k<<1)+f%2,z=(l<<1)+(f>>1);e.push({aabb:b.aabb.quadrant(f),zoom:b.zoom+1,x:y,y:z,wrap:b.wrap,fullyVisible:m})}}return q.sort(function(a,b){return a.distanceSq-b.distanceSq}).map(function(a){return a.tileID})},c.prototype.resize=function(a,b){this.width=a,this.height=b,this.pixelsToGLUnits=[2/a,-2/b],this._constrain(),this._calcMatrices()},d.unmodified.get=function(){return this._unmodified},c.prototype.zoomScale=function(a){return Math.pow(2,a)},c.prototype.scaleZoom=function(a){return Math.log(a)/Math.LN2},c.prototype.project=function(b){var c=a.clamp(b.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(b.lng)*this.worldSize,a.mercatorYfromLat(c)*this.worldSize)},c.prototype.unproject=function(b){return new a.MercatorCoordinate(b.x/this.worldSize,b.y/this.worldSize).toLngLat()},d.point.get=function(){return this.project(this.center)},c.prototype.setLocationAtPoint=function(e,f){var b=this.pointCoordinate(f),c=this.pointCoordinate(this.centerPoint),d=this.locationCoordinate(e),g=new a.MercatorCoordinate(d.x-(b.x-c.x),d.y-(b.y-c.y));this.center=this.coordinateLocation(g),this._renderWorldCopies&&(this.center=this.center.wrap())},c.prototype.locationPoint=function(a){return this.coordinatePoint(this.locationCoordinate(a))},c.prototype.pointLocation=function(a){return this.coordinateLocation(this.pointCoordinate(a))},c.prototype.locationCoordinate=function(b){return a.MercatorCoordinate.fromLngLat(b)},c.prototype.coordinateLocation=function(a){return a.toLngLat()},c.prototype.pointCoordinate=function(d){var b=[d.x,d.y,0,1],c=[d.x,d.y,1,1];a.transformMat4(b,b,this.pixelMatrixInverse),a.transformMat4(c,c,this.pixelMatrixInverse);var e=b[3],f=c[3],j=b[1]/e,k=c[1]/f,g=b[2]/e,h=c[2]/f,i=g===h?0:(0-g)/(h-g);return new a.MercatorCoordinate(a.number(b[0]/e,c[0]/f,i)/this.worldSize,a.number(j,k,i)/this.worldSize)},c.prototype.coordinatePoint=function(c){var b=[c.x*this.worldSize,c.y*this.worldSize,0,1];return a.transformMat4(b,b,this.pixelMatrix),new a.Point(b[0]/b[3],b[1]/b[3])},c.prototype.getBounds=function(){return(new a.LngLatBounds).extend(this.pointLocation(new a.Point(0,0))).extend(this.pointLocation(new a.Point(this.width,0))).extend(this.pointLocation(new a.Point(this.width,this.height))).extend(this.pointLocation(new a.Point(0,this.height)))},c.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},c.prototype.setMaxBounds=function(a){a?(this.lngRange=[a.getWest(),a.getEast()],this.latRange=[a.getSouth(),a.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},c.prototype.calculatePosMatrix=function(h,c){void 0===c&&(c=!1);var d=h.key,e=c?this._alignedPosMatrixCache:this._posMatrixCache;if(e[d])return e[d];var f=h.canonical,g=this.worldSize/this.zoomScale(f.z),i=f.x+Math.pow(2,f.z)*h.wrap,b=a.identity(new Float64Array(16));return a.translate(b,b,[i*g,f.y*g,0]),a.scale(b,b,[g/a.EXTENT,g/a.EXTENT,1]),a.multiply(b,c?this.alignedProjMatrix:this.projMatrix,b),e[d]=new Float32Array(b),e[d]},c.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},c.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var l,m,f,g,b=-90,h=90,c=-180,i=180,d=this.size,n=this._unmodified;if(this.latRange){var o=this.latRange;b=a.mercatorYfromLat(o[1])*this.worldSize,l=(h=a.mercatorYfromLat(o[0])*this.worldSize)-b<d.y?d.y/(h-b):0}if(this.lngRange){var p=this.lngRange;c=a.mercatorXfromLng(p[0])*this.worldSize,m=(i=a.mercatorXfromLng(p[1])*this.worldSize)-c<d.x?d.x/(i-c):0}var e=this.point,q=Math.max(m||0,l||0);if(q)return this.center=this.unproject(new a.Point(m?(i+c)/2:e.x,l?(h+b)/2:e.y)),this.zoom+=this.scaleZoom(q),this._unmodified=n,void(this._constraining=!1);if(this.latRange){var r=e.y,j=d.y/2;r-j<b&&(g=b+j),r+j>h&&(g=h-j)}if(this.lngRange){var s=e.x,k=d.x/2;s-k<c&&(f=c+k),s+k>i&&(f=i-k)}void 0===f&& void 0===g||(this.center=this.unproject(new a.Point(void 0!==f?f:e.x,void 0!==g?g:e.y))),this._unmodified=n,this._constraining=!1}},c.prototype._calcMatrices=function(){if(this.height){var c=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var o=Math.PI/2+this._pitch,i=this._fov*(.5+c.y/this.height),p=Math.sin(i)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-o-i,.01,Math.PI-.01)),j=this.point,d=j.x,e=j.y,q=1.01*(Math.cos(Math.PI/2-this._pitch)*p+this.cameraToCenterDistance),r=this.height/50,b=new Float64Array(16);a.perspective(b,this._fov,this.width/this.height,r,q),b[8]=-(2*c.x)/this.width,b[9]=2*c.y/this.height,a.scale(b,b,[1,-1,1]),a.translate(b,b,[0,0,-this.cameraToCenterDistance]),a.rotateX(b,b,this._pitch),a.rotateZ(b,b,this.angle),a.translate(b,b,[-d,-e,0]),this.mercatorMatrix=a.scale([],b,[this.worldSize,this.worldSize,this.worldSize]),a.scale(b,b,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=b,this.invProjMatrix=a.invert([],this.projMatrix);var k=this.width%2/2,l=this.height%2/2,m=Math.cos(this.angle),n=Math.sin(this.angle),f=d-Math.round(d)+m*k+n*l,g=e-Math.round(e)+m*l+n*k,h=new Float64Array(b);if(a.translate(h,h,[f>.5?f-1:f,g>.5?g-1:g,0]),this.alignedProjMatrix=h,b=a.create(),a.scale(b,b,[this.width/2,-this.height/2,1]),a.translate(b,b,[1,-1,0]),this.labelPlaneMatrix=b,b=a.create(),a.scale(b,b,[1,-1,1]),a.translate(b,b,[-1,-1,0]),a.scale(b,b,[2/this.width,2/this.height,1]),this.glCoordMatrix=b,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(b=a.invert(new Float64Array(16),this.pixelMatrix)))throw Error("failed to invert matrix");this.pixelMatrixInverse=b,this._posMatrixCache={},this._alignedPosMatrixCache={}}},c.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var b=this.pointCoordinate(new a.Point(0,0)),c=[b.x*this.worldSize,b.y*this.worldSize,0,1];return a.transformMat4(c,c,this.pixelMatrix)[3]/this.cameraToCenterDistance},c.prototype.getCameraPoint=function(){var b=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,b))},c.prototype.getCameraQueryGeometry=function(h){var b=this.getCameraPoint();if(1===h.length)return[h[0],b];for(var c=b.x,d=b.y,e=b.x,f=b.y,i=0,j=h;i<j.length;i+=1){var g=j[i];c=Math.min(c,g.x),d=Math.min(d,g.y),e=Math.max(e,g.x),f=Math.max(f,g.y)}return[new a.Point(c,d),new a.Point(e,d),new a.Point(e,f),new a.Point(c,f),new a.Point(c,d)]},Object.defineProperties(c.prototype,d);var F=function(b){var c,d,e,f;this._hashName=b&&encodeURIComponent(b),a.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(c=this._updateHashUnthrottled.bind(this),d=!1,e=null,f=function(){e=null,d&&(c(),e=setTimeout(f,300),d=!1)},function(){return d=!0,e||f(),e})};F.prototype.addTo=function(b){return this._map=b,a.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},F.prototype.remove=function(){return a.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},F.prototype.getHashString=function(k){var f=this._map.getCenter(),d=Math.round(100*this._map.getZoom())/100,c=Math.pow(10,Math.ceil((d*Math.LN2+Math.log(512/360/.5))/Math.LN10)),g=Math.round(f.lng*c)/c,h=Math.round(f.lat*c)/c,i=this._map.getBearing(),e=this._map.getPitch(),b="";if(b+=k?"/"+g+"/"+h+"/"+d:d+"/"+h+"/"+g,(i||e)&&(b+="/"+Math.round(10*i)/10),e&&(b+="/"+Math.round(e)),this._hashName){var l=this._hashName,m=!1,j=a.window.location.hash.slice(1).split("&").map(function(a){var c=a.split("=")[0];return c===l?(m=!0,c+"="+b):a}).filter(function(a){return a});return m||j.push(l+"="+b),"#"+j.join("&")}return"#"+b},F.prototype._getCurrentHash=function(){var b,d=this,c=a.window.location.hash.replace("#","");return this._hashName?(c.split("&").map(function(a){return a.split("=")}).forEach(function(a){a[0]===d._hashName&&(b=a)}),(b&&b[1]||"").split("/")):c.split("/")},F.prototype._onHashChange=function(){var a=this._getCurrentHash();if(a.length>=3&&!a.some(function(a){return isNaN(a)})){var b=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(a[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+a[2],+a[1]],zoom:+a[0],bearing:b,pitch:+(a[4]||0)}),!0}return!1},F.prototype._updateHashUnthrottled=function(){var b=a.window.location.href.replace(/(#.+)?$/,this.getHashString());try{a.window.history.replaceState(a.window.history.state,null,b)}catch(c){}};var S={linearity:.3,easing:a.bezier(0,0,.3,1)},dn=a.extend({deceleration:2500,maxSpeed:1400},S),dp=a.extend({deceleration:20,maxSpeed:1400},S),dq=a.extend({deceleration:1e3,maxSpeed:360},S),dr=a.extend({deceleration:1e3,maxSpeed:90},S),T=function(a){this._map=a,this.clear()};function ds(a,b){(!a.duration||a.duration<b.duration)&&(a.duration=b.duration,a.easing=b.easing)}function dt(g,h,b){var c=b.maxSpeed,d=b.linearity,i=b.deceleration,e=a.clamp(g*d/(h/1e3),-c,c),f=Math.abs(e)/(i*d);return{easing:b.easing,duration:1e3*f,amount:e*(f/2)}}T.prototype.clear=function(){this._inertiaBuffer=[]},T.prototype.record=function(b){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.browser.now(),settings:b})},T.prototype._drainInertiaBuffer=function(){for(var b=this._inertiaBuffer,c=a.browser.now();b.length>0&&c-b[0].time>160;)b.shift()},T.prototype._onMoveEnd=function(m){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var b={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},f=0,g=this._inertiaBuffer;f<g.length;f+=1){var d=g[f].settings;b.zoom+=d.zoomDelta||0,b.bearing+=d.bearingDelta||0,b.pitch+=d.pitchDelta||0,d.panDelta&&b.pan._add(d.panDelta),d.around&&(b.around=d.around),d.pinchAround&&(b.pinchAround=d.pinchAround)}var e=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,c={};if(b.pan.mag()){var h=dt(b.pan.mag(),e,a.extend({},dn,m||{}));c.offset=b.pan.mult(h.amount/b.pan.mag()),c.center=this._map.transform.center,ds(c,h)}if(b.zoom){var i=dt(b.zoom,e,dp);c.zoom=this._map.transform.zoom+i.amount,ds(c,i)}if(b.bearing){var j=dt(b.bearing,e,dq);c.bearing=this._map.transform.bearing+a.clamp(j.amount,-179,179),ds(c,j)}if(b.pitch){var k=dt(b.pitch,e,dr);c.pitch=this._map.transform.pitch+k.amount,ds(c,k)}if(c.zoom||c.bearing){var l=void 0===b.pinchAround?b.around:b.pinchAround;c.around=l?this._map.unproject(l):this._map.getCenter()}return this.clear(),a.extend(c,{noMoveStart:!0})}};var du=function(c){function b(g,b,e,d){void 0===d&&(d={});var f=p.mousePos(b.getCanvasContainer(),e),h=b.unproject(f);c.call(this,g,a.extend({point:f,lngLat:h,originalEvent:e},d)),this._defaultPrevented=!1,this.target=b}c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b;var d={defaultPrevented:{configurable:!0}};return b.prototype.preventDefault=function(){this._defaultPrevented=!0},d.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(b.prototype,d),b}(a.Event),dv=function(c){function b(e,f,b){var h="touchend"===e?b.changedTouches:b.touches,d=p.touchPos(f.getCanvasContainer(),h),i=d.map(function(a){return f.unproject(a)}),g=d.reduce(function(a,b,d,c){return a.add(b.div(c.length))},new a.Point(0,0)),j=f.unproject(g);c.call(this,e,{points:d,point:g,lngLats:i,lngLat:j,originalEvent:b}),this._defaultPrevented=!1}c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b;var d={defaultPrevented:{configurable:!0}};return b.prototype.preventDefault=function(){this._defaultPrevented=!0},d.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(b.prototype,d),b}(a.Event),dw=function(b){function a(a,d,c){b.call(this,a,{originalEvent:c}),this._defaultPrevented=!1}b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a;var c={defaultPrevented:{configurable:!0}};return a.prototype.preventDefault=function(){this._defaultPrevented=!0},c.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(a.prototype,c),a}(a.Event),h=function(a,b){this._map=a,this._clickTolerance=b.clickTolerance};h.prototype.reset=function(){delete this._mousedownPos},h.prototype.wheel=function(a){return this._firePreventable(new dw(a.type,this._map,a))},h.prototype.mousedown=function(a,b){return this._mousedownPos=b,this._firePreventable(new du(a.type,this._map,a))},h.prototype.mouseup=function(a){this._map.fire(new du(a.type,this._map,a))},h.prototype.click=function(a,b){this._mousedownPos&&this._mousedownPos.dist(b)>=this._clickTolerance||this._map.fire(new du(a.type,this._map,a))},h.prototype.dblclick=function(a){return this._firePreventable(new du(a.type,this._map,a))},h.prototype.mouseover=function(a){this._map.fire(new du(a.type,this._map,a))},h.prototype.mouseout=function(a){this._map.fire(new du(a.type,this._map,a))},h.prototype.touchstart=function(a){return this._firePreventable(new dv(a.type,this._map,a))},h.prototype.touchmove=function(a){this._map.fire(new dv(a.type,this._map,a))},h.prototype.touchend=function(a){this._map.fire(new dv(a.type,this._map,a))},h.prototype.touchcancel=function(a){this._map.fire(new dv(a.type,this._map,a))},h.prototype._firePreventable=function(a){if(this._map.fire(a),a.defaultPrevented)return{}},h.prototype.isEnabled=function(){return!0},h.prototype.isActive=function(){return!1},h.prototype.enable=function(){},h.prototype.disable=function(){};var v=function(a){this._map=a};v.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},v.prototype.mousemove=function(a){this._map.fire(new du(a.type,this._map,a))},v.prototype.mousedown=function(){this._delayContextMenu=!0},v.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new du("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},v.prototype.contextmenu=function(a){this._delayContextMenu?this._contextMenuEvent=a:this._map.fire(new du(a.type,this._map,a)),this._map.listens("contextmenu")&&a.preventDefault()},v.prototype.isEnabled=function(){return!0},v.prototype.isActive=function(){return!1},v.prototype.enable=function(){},v.prototype.disable=function(){};var n=function(a,b){this._map=a,this._el=a.getCanvasContainer(),this._container=a.getContainer(),this._clickTolerance=b.clickTolerance||1};function dx(b,d){for(var c={},a=0;a<b.length;a++)c[b[a].identifier]=d[a];return c}n.prototype.isEnabled=function(){return!!this._enabled},n.prototype.isActive=function(){return!!this._active},n.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},n.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},n.prototype.mousedown=function(a,b){this.isEnabled()&&a.shiftKey&&0===a.button&&(p.disableDrag(),this._startPos=this._lastPos=b,this._active=!0)},n.prototype.mousemoveWindow=function(e,f){if(this._active){var a=f;if(!(this._lastPos.equals(a)|| !this._box&&a.dist(this._startPos)<this._clickTolerance)){var b=this._startPos;this._lastPos=a,this._box||(this._box=p.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",e));var c=Math.min(b.x,a.x),g=Math.max(b.x,a.x),d=Math.min(b.y,a.y),h=Math.max(b.y,a.y);p.setTransform(this._box,"translate("+c+"px,"+d+"px)"),this._box.style.width=g-c+"px",this._box.style.height=h-d+"px"}}},n.prototype.mouseupWindow=function(b,e){var f=this;if(this._active&&0===b.button){var c=this._startPos,d=e;if(this.reset(),p.suppressClick(),c.x!==d.x||c.y!==d.y)return this._map.fire(new a.Event("boxzoomend",{originalEvent:b})),{cameraAnimation:function(a){return a.fitScreenCoordinates(c,d,f._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",b)}},n.prototype.keydown=function(a){this._active&&27===a.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",a))},n.prototype.blur=function(){this.reset()},n.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(p.remove(this._box),this._box=null),p.enableDrag(),delete this._startPos,delete this._lastPos},n.prototype._fireEvent=function(b,c){return this._map.fire(new a.Event(b,{originalEvent:c}))};var U=function(a){this.reset(),this.numTouches=a.numTouches};U.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},U.prototype.touchstart=function(d,c,b){(this.centroid||b.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=d.timeStamp),b.length===this.numTouches&&(this.centroid=function(c){for(var d=new a.Point(0,0),b=0,e=c;b<e.length;b+=1)d._add(e[b]);return d.div(c.length)}(c),this.touches=dx(b,c)))},U.prototype.touchmove=function(f,c,d){if(!this.aborted&&this.centroid){var e=dx(d,c);for(var a in this.touches){var b=e[a];(!b||b.dist(this.touches[a])>30)&&(this.aborted=!0)}}},U.prototype.touchend=function(b,d,c){if((!this.centroid||b.timeStamp-this.startTime>500)&&(this.aborted=!0),0===c.length){var a=!this.aborted&&this.centroid;if(this.reset(),a)return a}};var V=function(a){this.singleTap=new U(a),this.numTaps=a.numTaps,this.reset()};V.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},V.prototype.touchstart=function(a,b,c){this.singleTap.touchstart(a,b,c)},V.prototype.touchmove=function(a,b,c){this.singleTap.touchmove(a,b,c)},V.prototype.touchend=function(b,c,d){var a=this.singleTap.touchend(b,c,d);if(a){var e=b.timeStamp-this.lastTime<500,f=!this.lastTap||30>this.lastTap.dist(a);if(e&&f||this.reset(),this.count++,this.lastTime=b.timeStamp,this.lastTap=a,this.count===this.numTaps)return this.reset(),a}};var w=function(){this._zoomIn=new V({numTouches:1,numTaps:2}),this._zoomOut=new V({numTouches:2,numTaps:1}),this.reset()};w.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},w.prototype.touchstart=function(a,b,c){this._zoomIn.touchstart(a,b,c),this._zoomOut.touchstart(a,b,c)},w.prototype.touchmove=function(a,b,c){this._zoomIn.touchmove(a,b,c),this._zoomOut.touchmove(a,b,c)},w.prototype.touchend=function(a,b,c){var f=this,d=this._zoomIn.touchend(a,b,c),e=this._zoomOut.touchend(a,b,c);return d?(this._active=!0,a.preventDefault(),setTimeout(function(){return f.reset()},0),{cameraAnimation:function(b){return b.easeTo({duration:300,zoom:b.getZoom()+1,around:b.unproject(d)},{originalEvent:a})}}):e?(this._active=!0,a.preventDefault(),setTimeout(function(){return f.reset()},0),{cameraAnimation:function(b){return b.easeTo({duration:300,zoom:b.getZoom()-1,around:b.unproject(e)},{originalEvent:a})}}):void 0},w.prototype.touchcancel=function(){this.reset()},w.prototype.enable=function(){this._enabled=!0},w.prototype.disable=function(){this._enabled=!1,this.reset()},w.prototype.isEnabled=function(){return this._enabled},w.prototype.isActive=function(){return this._active};var dy={0:1,2:2},i=function(a){this.reset(),this._clickTolerance=a.clickTolerance||1};i.prototype.blur=function(){this.reset()},i.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},i.prototype._correctButton=function(a,b){return!1},i.prototype._move=function(a,b){return{}},i.prototype.mousedown=function(a,c){if(!this._lastPoint){var b=p.mouseButton(a);this._correctButton(a,b)&&(this._lastPoint=c,this._eventButton=b)}},i.prototype.mousemoveWindow=function(e,a){var b,f,c,d=this._lastPoint;if(d){if(e.preventDefault(),b=e,c=dy[this._eventButton],void 0===b.buttons||(b.buttons&c)!==c)this.reset();else if(this._moved||!(a.dist(d)<this._clickTolerance))return this._moved=!0,this._lastPoint=a,this._move(d,a)}},i.prototype.mouseupWindow=function(a){this._lastPoint&&p.mouseButton(a)===this._eventButton&&(this._moved&&p.suppressClick(),this.reset())},i.prototype.enable=function(){this._enabled=!0},i.prototype.disable=function(){this._enabled=!1,this.reset()},i.prototype.isEnabled=function(){return this._enabled},i.prototype.isActive=function(){return this._active};var dz=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.mousedown=function(a,c){b.prototype.mousedown.call(this,a,c),this._lastPoint&&(this._active=!0)},a.prototype._correctButton=function(a,b){return 0===b&&!a.ctrlKey},a.prototype._move=function(b,a){return{around:a,panDelta:a.sub(b)}},a}(i),dA=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._correctButton=function(b,a){return 0===a&&b.ctrlKey||2===a},a.prototype._move=function(b,c){var a=.8*(c.x-b.x);if(a)return this._active=!0,{bearingDelta:a}},a.prototype.contextmenu=function(a){a.preventDefault()},a}(i),dB=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype._correctButton=function(b,a){return 0===a&&b.ctrlKey||2===a},a.prototype._move=function(b,c){var a=-0.5*(c.y-b.y);if(a)return this._active=!0,{pitchDelta:a}},a.prototype.contextmenu=function(a){a.preventDefault()},a}(i),r=function(a){this._minTouches=1,this._clickTolerance=a.clickTolerance||1,this.reset()};r.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new a.Point(0,0)},r.prototype.touchstart=function(a,b,c){return this._calculateTransform(a,b,c)},r.prototype.touchmove=function(a,c,b){if(this._active&&!(b.length<this._minTouches))return a.preventDefault(),this._calculateTransform(a,c,b)},r.prototype.touchend=function(b,c,a){this._calculateTransform(b,c,a),this._active&&a.length<this._minTouches&&this.reset()},r.prototype.touchcancel=function(){this.reset()},r.prototype._calculateTransform=function(l,k,g){g.length>0&&(this._active=!0);var b=dx(g,k),h=new a.Point(0,0),d=new a.Point(0,0),c=0;for(var e in b){var f=b[e],i=this._touches[e];i&&(h._add(f),d._add(f.sub(i)),c++,b[e]=f)}if(this._touches=b,!(c<this._minTouches)&&d.mag()){var j=d.div(c);if(this._sum._add(j),!(this._sum.mag()<this._clickTolerance))return{around:h.div(c),panDelta:j}}},r.prototype.enable=function(){this._enabled=!0},r.prototype.disable=function(){this._enabled=!1,this.reset()},r.prototype.isEnabled=function(){return this._enabled},r.prototype.isActive=function(){return this._active};var j=function(){this.reset()};function dC(b,c,d){for(var a=0;a<b.length;a++)if(b[a].identifier===d)return c[a]}function dD(a,b){return Math.log(a/b)/Math.LN2}j.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},j.prototype._start=function(a){},j.prototype._move=function(a,b,c){return{}},j.prototype.touchstart=function(c,b,a){this._firstTwoTouches||a.length<2||(this._firstTwoTouches=[a[0].identifier,a[1].identifier],this._start([b[0],b[1]]))},j.prototype.touchmove=function(c,d,e){if(this._firstTwoTouches){c.preventDefault();var f=this._firstTwoTouches,g=f[1],a=dC(e,d,f[0]),b=dC(e,d,g);if(a&&b){var h=this._aroundCenter?null:a.add(b).div(2);return this._move([a,b],h,c)}}},j.prototype.touchend=function(g,a,b){if(this._firstTwoTouches){var c=this._firstTwoTouches,d=c[1],e=dC(b,a,c[0]),f=dC(b,a,d);e&&f||(this._active&&p.suppressClick(),this.reset())}},j.prototype.touchcancel=function(){this.reset()},j.prototype.enable=function(a){this._enabled=!0,this._aroundCenter=!!a&&"center"===a.around},j.prototype.disable=function(){this._enabled=!1,this.reset()},j.prototype.isEnabled=function(){return this._enabled},j.prototype.isActive=function(){return this._active};var dE=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.reset=function(){b.prototype.reset.call(this),delete this._distance,delete this._startDistance},a.prototype._start=function(a){this._startDistance=this._distance=a[0].dist(a[1])},a.prototype._move=function(a,b){var c=this._distance;if(this._distance=a[0].dist(a[1]),this._active||!(.1>Math.abs(dD(this._distance,this._startDistance))))return this._active=!0,{zoomDelta:dD(this._distance,c),pinchAround:b}},a}(j);function dF(a,b){return 180*a.angleWith(b)/Math.PI}var dG=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.reset=function(){b.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},a.prototype._start=function(a){this._startVector=this._vector=a[0].sub(a[1]),this._minDiameter=a[0].dist(a[1])},a.prototype._move=function(a,b){var c=this._vector;if(this._vector=a[0].sub(a[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:dF(this._vector,c),pinchAround:b}},a.prototype._isBelowThreshold=function(a){this._minDiameter=Math.min(this._minDiameter,a.mag());var b=25/(Math.PI*this._minDiameter)*360;return Math.abs(dF(a,this._startVector))<b},a}(j);function dH(a){return Math.abs(a.y)>Math.abs(a.x)}var dI=function(b){function a(){b.apply(this,arguments)}return b&&(a.__proto__=b),(a.prototype=Object.create(b&&b.prototype)).constructor=a,a.prototype.reset=function(){b.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},a.prototype._start=function(a){this._lastPoints=a,dH(a[0].sub(a[1]))&&(this._valid=!1)},a.prototype._move=function(a,e,d){var b=a[0].sub(this._lastPoints[0]),c=a[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(b,c,d.timeStamp),this._valid)return this._lastPoints=a,this._active=!0,{pitchDelta:-((b.y+c.y)/2*.5)}},a.prototype.gestureBeginsVertically=function(a,b,c){if(void 0!==this._valid)return this._valid;var d=a.mag()>=2,e=b.mag()>=2;if(d||e){if(!d||!e)return void 0===this._firstMove&&(this._firstMove=c),c-this._firstMove<100&&void 0;var f=a.y>0==b.y>0;return dH(a)&&dH(b)&&f}},a}(j),dJ={panStep:100,bearingStep:15,pitchStep:10},x=function(){var a=dJ;this._panStep=a.panStep,this._bearingStep=a.bearingStep,this._pitchStep=a.pitchStep,this._rotationDisabled=!1};function dK(a){return a*(2-a)}x.prototype.blur=function(){this.reset()},x.prototype.reset=function(){this._active=!1},x.prototype.keydown=function(a){var g=this;if(!(a.altKey||a.ctrlKey||a.metaKey)){var d=0,b=0,c=0,e=0,f=0;switch(a.keyCode){case 61:case 107:case 171:case 187:d=1;break;case 189:case 109:case 173:d=-1;break;case 37:a.shiftKey?b=-1:(a.preventDefault(),e=-1);break;case 39:a.shiftKey?b=1:(a.preventDefault(),e=1);break;case 38:a.shiftKey?c=1:(a.preventDefault(),f=-1);break;case 40:a.shiftKey?c=-1:(a.preventDefault(),f=1);break;default:return}return this._rotationDisabled&&(b=0,c=0),{cameraAnimation:function(h){var i=h.getZoom();h.easeTo({duration:300,easeId:"keyboardHandler",easing:dK,zoom:d?Math.round(i)+d*(a.shiftKey?2:1):i,bearing:h.getBearing()+b*g._bearingStep,pitch:h.getPitch()+c*g._pitchStep,offset:[-e*g._panStep,-f*g._panStep],center:h.getCenter()},{originalEvent:a})}}}},x.prototype.enable=function(){this._enabled=!0},x.prototype.disable=function(){this._enabled=!1,this.reset()},x.prototype.isEnabled=function(){return this._enabled},x.prototype.isActive=function(){return this._active},x.prototype.disableRotation=function(){this._rotationDisabled=!0},x.prototype.enableRotation=function(){this._rotationDisabled=!1};var k=function(b,c){this._map=b,this._el=b.getCanvasContainer(),this._handler=c,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,a.bindAll(["_onT
1imeout"],this)};k.prototype.setZoomRate=function(a){this._defaultZoomRate=a},k.prototype.setWheelZoomRate=function(a){this._wheelZoomRate=a},k.prototype.isEnabled=function(){return!!this._enabled},k.prototype.isActive=function(){return!!this._active|| void 0!==this._finishTimeout},k.prototype.isZooming=function(){return!!this._zooming},k.prototype.enable=function(a){this.isEnabled()||(this._enabled=!0,this._aroundCenter=a&&"center"===a.around)},k.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},k.prototype.wheel=function(c){if(this.isEnabled()){var b=c.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?40*c.deltaY:c.deltaY,d=a.browser.now(),e=d-(this._lastWheelEventTime||0);this._lastWheelEventTime=d,0!==b&&b%4.000244140625==0?this._type="wheel":0!==b&&4>Math.abs(b)?this._type="trackpad":e>400?(this._type=null,this._lastValue=b,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=200>Math.abs(e*b)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,b+=this._lastValue)),c.shiftKey&&b&&(b/=4),this._type&&(this._lastWheelEvent=c,this._delta-=b,this._active||this._start(c)),c.preventDefault()}}
vendor: 25,414 bytes, line 1
1,k.prototype._onTimeout=function(a){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},k.prototype._start=function(b){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 c=p.mousePos(this._el,b);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(c)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},k.prototype.renderFrame=function(){var m=this;if(this._frameId&&(this._frameId=null,this.isActive())){var b=this._map.transform;if(0!==this._delta){var j="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,c=2/(1+Math.exp(-Math.abs(this._delta*j)));this._delta<0&&0!==c&&(c=1/c);var k="number"==typeof this._targetZoom?b.zoomScale(this._targetZoom):b.scale;this._targetZoom=Math.min(b.maxZoom,Math.max(b.minZoom,b.scaleZoom(k*c))),"wheel"===this._type&&(this._startZoom=b.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var e,f="number"==typeof this._targetZoom?this._targetZoom:b.zoom,g=this._startZoom,h=this._easing,d=!1;if("wheel"===this._type&&g&&h){var i=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),l=h(i);e=a.number(g,f,l),i<1?this._frameId||(this._frameId=!0):d=!0}else e=f,d=!0;return this._active=!0,d&&(this._active=!1,this._finishTimeout=setTimeout(function(){m._zooming=!1,m._handler._triggerRenderFrame(),delete m._targetZoom,delete m._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!d,zoomDelta:e-b.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},k.prototype._smoothOutEasing=function(g){var c=a.ease;if(this._prevEase){var b=this._prevEase,e=(a.browser.now()-b.start)/b.duration,f=b.easing(e+.01)-b.easing(e),d=.27/Math.sqrt(f*f+1e-4)*.01,h=Math.sqrt(.0729-d*d);c=a.bezier(d,h,.25,1)}return this._prevEase={start:a.browser.now(),duration:g,easing:c},c},k.prototype.blur=function(){this.reset()},k.prototype.reset=function(){this._active=!1};var W=function(a,b){this._clickZoom=a,this._tapZoom=b};W.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},W.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},W.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},W.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var B=function(){this.reset()};B.prototype.reset=function(){this._active=!1},B.prototype.blur=function(){this.reset()},B.prototype.dblclick=function(a,b){return a.preventDefault(),{cameraAnimation:function(c){c.easeTo({duration:300,zoom:c.getZoom()+(a.shiftKey?-1:1),around:c.unproject(b)},{originalEvent:a})}}},B.prototype.enable=function(){this._enabled=!0},B.prototype.disable=function(){this._enabled=!1,this.reset()},B.prototype.isEnabled=function(){return this._enabled},B.prototype.isActive=function(){return this._active};var y=function(){this._tap=new V({numTouches:1,numTaps:1}),this.reset()};y.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},y.prototype.touchstart=function(b,c,a){this._swipePoint||(this._tapTime&&b.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?a.length>0&&(this._swipePoint=c[0],this._swipeTouch=a[0].identifier):this._tap.touchstart(b,c,a))},y.prototype.touchmove=function(a,b,c){if(this._tapTime){if(this._swipePoint&&c[0].identifier===this._swipeTouch){var d=b[0],e=d.y-this._swipePoint.y;return this._swipePoint=d,a.preventDefault(),this._active=!0,{zoomDelta:e/128}}}else this._tap.touchmove(a,b,c)},y.prototype.touchend=function(a,c,b){this._tapTime?this._swipePoint&&0===b.length&&this.reset():this._tap.touchend(a,c,b)&&(this._tapTime=a.timeStamp)},y.prototype.touchcancel=function(){this.reset()},y.prototype.enable=function(){this._enabled=!0},y.prototype.disable=function(){this._enabled=!1,this.reset()},y.prototype.isEnabled=function(){return this._enabled},y.prototype.isActive=function(){return this._active};var X=function(a,b,c){this._el=a,this._mousePan=b,this._touchPan=c};X.prototype.enable=function(a){this._inertiaOptions=a||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},X.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},X.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},X.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Y=function(a,b,c){this._pitchWithRotate=a.pitchWithRotate,this._mouseRotate=b,this._mousePitch=c};Y.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Y.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Y.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Y.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var G=function(a,b,c,d){this._el=a,this._touchZoom=b,this._touchRotate=c,this._tapDragZoom=d,this._rotationDisabled=!1,this._enabled=!0};G.prototype.enable=function(a){this._touchZoom.enable(a),this._rotationDisabled||this._touchRotate.enable(a),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},G.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},G.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},G.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},G.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},G.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var dL=function(a){return a.zoom||a.drag||a.pitch||a.rotate},dM=function(a){function b(){a.apply(this,arguments)}return a&&(b.__proto__=a),(b.prototype=Object.create(a&&a.prototype)).constructor=b,b}(a.Event);function dN(a){return a.panDelta&&a.panDelta.mag()||a.zoomDelta||a.bearingDelta||a.pitchDelta}var f=function(e,f){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new T(e),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f),a.bindAll(["handleEvent","handleWindowEvent"],this);var b=this._el;this._listeners=[[b,"touchstart",{passive:!0}],[b,"touchmove",{passive:!1}],[b,"touchend",void 0],[b,"touchcancel",void 0],[b,"mousedown",void 0],[b,"mousemove",void 0],[b,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[b,"mouseover",void 0],[b,"mouseout",void 0],[b,"dblclick",void 0],[b,"click",void 0],[b,"keydown",{capture:!1}],[b,"keyup",void 0],[b,"wheel",{passive:!1}],[b,"contextmenu",void 0],[a.window,"blur",void 0]];for(var c=0,g=this._listeners;c<g.length;c+=1){var d=g[c],h=d[0];p.addEventListener(h,d[1],h===a.window.document?this.handleWindowEvent:this.handleEvent,d[2])}};f.prototype.destroy=function(){for(var b=0,d=this._listeners;b<d.length;b+=1){var c=d[b],e=c[0];p.removeEventListener(e,c[1],e===a.window.document?this.handleWindowEvent:this.handleEvent,c[2])}},f.prototype._addDefaultHandlers=function(b){var a=this._map,e=a.getCanvasContainer();this._add("mapEvent",new h(a,b));var t=a.boxZoom=new n(a,b);this._add("boxZoom",t);var f=new w,g=new B;a.doubleClickZoom=new W(g,f),this._add("tapZoom",f),this._add("clickZoom",g);var i=new y;this._add("tapDragZoom",i);var u=a.touchPitch=new dI;this._add("touchPitch",u);var j=new dA(b),l=new dB(b);a.dragRotate=new Y(b,j,l),this._add("mouseRotate",j,["mousePitch"]),this._add("mousePitch",l,["mouseRotate"]);var m=new dz(b),o=new r(b);a.dragPan=new X(e,m,o),this._add("mousePan",m),this._add("touchPan",o,["touchZoom","touchRotate"]);var p=new dG,q=new dE;a.touchZoomRotate=new G(e,q,p,i),this._add("touchRotate",p,["touchPan","touchZoom"]),this._add("touchZoom",q,["touchPan","touchRotate"]);var z=a.scrollZoom=new k(a,this);this._add("scrollZoom",z,["mousePan"]);var A=a.keyboard=new x;this._add("keyboard",A),this._add("blockableMapEvent",new v(a));for(var c=0,s=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];c<s.length;c+=1){var d=s[c];b.interactive&&b[d]&&a[d].enable(b[d])}},f.prototype._add=function(a,b,c){this._handlers.push({handlerName:a,handler:b,allowed:c}),this._handlersById[a]=b},f.prototype.stop=function(c){if(!this._updatingCamera){for(var a=0,b=this._handlers;a<b.length;a+=1)b[a].handler.reset();this._inertia.clear(),this._fireEvents({},{},c),this._changes=[]}},f.prototype.isActive=function(){for(var a=0,b=this._handlers;a<b.length;a+=1)if(b[a].handler.isActive())return!0;return!1},f.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},f.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},f.prototype.isMoving=function(){return Boolean(dL(this._eventsInProgress))||this.isZooming()},f.prototype._blockedByActive=function(c,a,d){for(var b in c)if(b!==d&&(!a||0>a.indexOf(b)))return!0;return!1},f.prototype.handleWindowEvent=function(a){this.handleEvent(a,a.type+"Window")},f.prototype._getMapTouches=function(e){for(var b=[],a=0,c=e;a<c.length;a+=1){var d=c[a];this._el.contains(d.target)&&b.push(d)}return b},f.prototype.handleEvent=function(a,k){this._updatingCamera=!0;for(var l="renderFrame"===a.type?void 0:a,c={needsRenderFrame:!1},m={},d={},f=a.touches?this._getMapTouches(a.touches):void 0,r=f?p.touchPos(this._el,f):p.mousePos(this._el,a),g=0,n=this._handlers;g<n.length;g+=1){var h=n[g],i=h.handlerName,b=h.handler,s=h.allowed;if(b.isEnabled()){var e=void 0;this._blockedByActive(d,s,i)?b.reset():b[k||a.type]&&(e=b[k||a.type](a,r,f),this.mergeHandlerResult(c,m,e,i,l),e&&e.needsRenderFrame&&this._triggerRenderFrame()),(e||b.isActive())&&(d[i]=b)}}var j={};for(var o in this._previousActiveHandlers)d[o]||(j[o]=l);this._previousActiveHandlers=d,(Object.keys(j).length||dN(c))&&(this._changes.push([c,m,j]),this._triggerRenderFrame()),(Object.keys(d).length||dN(c))&&this._map._stop(!0),this._updatingCamera=!1;var q=c.cameraAnimation;q&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],q(this._map))},f.prototype.mergeHandlerResult=function(e,c,b,f,g){if(b){a.extend(e,b);var d={handlerName:f,originalEvent:b.originalEvent||g};void 0!==b.zoomDelta&&(c.zoom=d),void 0!==b.panDelta&&(c.drag=d),void 0!==b.pitchDelta&&(c.pitch=d),void 0!==b.bearingDelta&&(c.rotate=d)}},f.prototype._applyChanges=function(){for(var c={},f={},g={},d=0,h=this._changes;d<h.length;d+=1){var e=h[d],b=e[0],i=e[1],j=e[2];b.panDelta&&(c.panDelta=(c.panDelta||new a.Point(0,0))._add(b.panDelta)),b.zoomDelta&&(c.zoomDelta=(c.zoomDelta||0)+b.zoomDelta),b.bearingDelta&&(c.bearingDelta=(c.bearingDelta||0)+b.bearingDelta),b.pitchDelta&&(c.pitchDelta=(c.pitchDelta||0)+b.pitchDelta),void 0!==b.around&&(c.around=b.around),void 0!==b.pinchAround&&(c.pinchAround=b.pinchAround),b.noInertia&&(c.noInertia=b.noInertia),a.extend(f,i),a.extend(g,j)}this._updateMapTransform(c,f,g),this._changes=[]},f.prototype._updateMapTransform=function(a,e,f){var d=this._map,c=d.transform;if(!dN(a))return this._fireEvents(e,f,!0);var g=a.panDelta,h=a.zoomDelta,i=a.bearingDelta,j=a.pitchDelta,b=a.around,k=a.pinchAround;void 0!==k&&(b=k),d._stop(!0),b=b||d.transform.centerPoint;var l=c.pointLocation(g?b.sub(g):b);i&&(c.bearing+=i),j&&(c.pitch+=j),h&&(c.zoom+=h),c.setLocationAtPoint(l,b),this._map._update(),a.noInertia||this._inertia.record(a),this._fireEvents(e,f,!0)},f.prototype._fireEvents=function(b,q,r){var u=this,j=dL(this._eventsInProgress),c=dL(b),f={};for(var d in b)this._eventsInProgress[d]||(f[d+"start"]=b[d].originalEvent),this._eventsInProgress[d]=b[d];for(var k in!j&&c&&this._fireEvent("movestart",c.originalEvent),f)this._fireEvent(k,f[k]);for(var l in c&&this._fireEvent("move",c.originalEvent),b)this._fireEvent(l,b[l].originalEvent);var g,h={};for(var i in this._eventsInProgress){var m=this._eventsInProgress[i],n=m.handlerName,s=m.originalEvent;this._handlersById[n].isActive()||(delete this._eventsInProgress[i],h[i+"end"]=g=q[n]||s)}for(var o in h)this._fireEvent(o,h[o]);var t=dL(this._eventsInProgress);if(r&&(j||c)&&!t){this._updatingCamera=!0;var e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),p=function(a){return 0!==a&& -u._bearingSnap<a&&a<u._bearingSnap};e?(p(e.bearing||this._map.getBearing())&&(e.bearing=0),this._map.easeTo(e,{originalEvent:g})):(this._map.fire(new a.Event("moveend",{originalEvent:g})),p(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},f.prototype._fireEvent=function(c,b){this._map.fire(new a.Event(c,b?{originalEvent:b}:{}))},f.prototype._requestFrame=function(){var a=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(b){delete a._frameId,a.handleEvent(new dM("renderFrame",{timeStamp:b})),a._applyChanges()})},f.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};var a3=function(c){function b(b,d){c.call(this),this._moving=!1,this._zooming=!1,this.transform=b,this._bearingSnap=d.bearingSnap,a.bindAll(["_renderFrameCallback"],this)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.getCenter=function(){return new a.LngLat(this.transform.center.lng,this.transform.center.lat)},b.prototype.setCenter=function(a,b){return this.jumpTo({center:a},b)},b.prototype.panBy=function(b,c,d){return b=a.Point.convert(b).mult(-1),this.panTo(this.transform.center,a.extend({offset:b},c),d)},b.prototype.panTo=function(b,c,d){return this.easeTo(a.extend({center:b},c),d)},b.prototype.getZoom=function(){return this.transform.zoom},b.prototype.setZoom=function(a,b){return this.jumpTo({zoom:a},b),this},b.prototype.zoomTo=function(b,c,d){return this.easeTo(a.extend({zoom:b},c),d)},b.prototype.zoomIn=function(a,b){return this.zoomTo(this.getZoom()+1,a,b),this},b.prototype.zoomOut=function(a,b){return this.zoomTo(this.getZoom()-1,a,b),this},b.prototype.getBearing=function(){return this.transform.bearing},b.prototype.setBearing=function(a,b){return this.jumpTo({bearing:a},b),this},b.prototype.getPadding=function(){return this.transform.padding},b.prototype.setPadding=function(a,b){return this.jumpTo({padding:a},b),this},b.prototype.rotateTo=function(b,c,d){return this.easeTo(a.extend({bearing:b},c),d)},b.prototype.resetNorth=function(b,c){return this.rotateTo(0,a.extend({duration:1e3},b),c),this},b.prototype.resetNorthPitch=function(b,c){return this.easeTo(a.extend({bearing:0,pitch:0,duration:1e3},b),c),this},b.prototype.snapToNorth=function(a,b){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(a,b):this},b.prototype.getPitch=function(){return this.transform.pitch},b.prototype.setPitch=function(a,b){return this.jumpTo({pitch:a},b),this},b.prototype.cameraForBounds=function(b,c){b=a.LngLatBounds.convert(b);var d=c&&c.bearing||0;return this._cameraForBoxAndBearing(b.getNorthWest(),b.getSouthEast(),d,c)},b.prototype._cameraForBoxAndBearing=function(p,q,d,b){var i={top:0,bottom:0,right:0,left:0};if("number"==typeof(b=a.extend({padding:i,offset:[0,0],maxZoom:this.transform.maxZoom},b)).padding){var e=b.padding;b.padding={top:e,bottom:e,right:e,left:e}}b.padding=a.extend(i,b.padding);var c=this.transform,f=c.padding,j=c.project(a.LngLat.convert(p)),k=c.project(a.LngLat.convert(q)),g=j.rotate(-d*Math.PI/180),h=k.rotate(-d*Math.PI/180),r=new a.Point(Math.max(g.x,h.x),Math.max(g.y,h.y)),s=new a.Point(Math.min(g.x,h.x),Math.min(g.y,h.y)),l=r.sub(s),m=(c.width-(f.left+f.right+b.padding.left+b.padding.right))/l.x,n=(c.height-(f.top+f.bottom+b.padding.top+b.padding.bottom))/l.y;if(!(n<0||m<0)){var o=Math.min(c.scaleZoom(c.scale*Math.min(m,n)),b.maxZoom),t="number"==typeof b.offset.x?new a.Point(b.offset.x,b.offset.y):a.Point.convert(b.offset),u=new a.Point((b.padding.left-b.padding.right)/2,(b.padding.top-b.padding.bottom)/2).rotate(d*Math.PI/180),v=t.add(u).mult(c.scale/c.zoomScale(o));return{center:c.unproject(j.add(k).div(2).sub(v)),zoom:o,bearing:d}}a.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},b.prototype.fitBounds=function(b,a,c){return this._fitInternal(this.cameraForBounds(b,a),a,c)},b.prototype.fitScreenCoordinates=function(c,d,e,b,f){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.Point.convert(c)),this.transform.pointLocation(a.Point.convert(d)),e,b),b,f)},b.prototype._fitInternal=function(c,b,d){return c?(delete(b=a.extend(c,b)).padding,b.linear?this.easeTo(b,d):this.flyTo(b,d)):this},b.prototype.jumpTo=function(b,c){this.stop();var d=this.transform,e=!1,f=!1,g=!1;return"zoom"in b&&d.zoom!== +b.zoom&&(e=!0,d.zoom=+b.zoom),void 0!==b.center&&(d.center=a.LngLat.convert(b.center)),"bearing"in b&&d.bearing!== +b.bearing&&(f=!0,d.bearing=+b.bearing),"pitch"in b&&d.pitch!== +b.pitch&&(g=!0,d.pitch=+b.pitch),null==b.padding||d.isPaddingEqual(b.padding)||(d.padding=b.padding),this.fire(new a.Event("movestart",c)).fire(new a.Event("move",c)),e&&this.fire(new a.Event("zoomstart",c)).fire(new a.Event("zoom",c)).fire(new a.Event("zoomend",c)),f&&this.fire(new a.Event("rotatestart",c)).fire(new a.Event("rotate",c)).fire(new a.Event("rotateend",c)),g&&this.fire(new a.Event("pitchstart",c)).fire(new a.Event("pitch",c)).fire(new a.Event("pitchend",c)),this.fire(new a.Event("moveend",c))},b.prototype.easeTo=function(b,k){var t=this;this._stop(!1,b.easeId),(!1===(b=a.extend({offset:[0,0],duration:500,easing:a.ease},b)).animate|| !b.essential&&a.browser.prefersReducedMotion)&&(b.duration=0);var c=this.transform,d=this.getZoom(),e=this.getBearing(),f=this.getPitch(),u=this.getPadding(),g="zoom"in b?+b.zoom:d,l="bearing"in b?this._normalizeBearing(b.bearing,e):e,m="pitch"in b?+b.pitch:f,n="padding"in b?b.padding:c.padding,o=a.Point.convert(b.offset),p=c.centerPoint.add(o),h=c.pointLocation(p),i=a.LngLat.convert(b.center||h);this._normalizeCenter(i);var j,q,r=c.project(h),v=c.project(i).sub(r),w=c.zoomScale(g-d);b.around&&(j=a.LngLat.convert(b.around),q=c.locationPoint(j));var s={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||g!==d,this._rotating=this._rotating||e!==l,this._pitching=this._pitching||m!==f,this._padding=!c.isPaddingEqual(n),this._easeId=b.easeId,this._prepareEase(k,b.noMoveStart,s),this._ease(function(b){if(t._zooming&&(c.zoom=a.number(d,g,b)),t._rotating&&(c.bearing=a.number(e,l,b)),t._pitching&&(c.pitch=a.number(f,m,b)),t._padding&&(c.interpolatePadding(u,n,b),p=c.centerPoint.add(o)),j)c.setLocationAtPoint(j,q);else{var i=c.zoomScale(c.zoom-d),s=g>d?Math.min(2,w):Math.max(.5,w),x=Math.pow(s,1-b),h=c.unproject(r.add(v.mult(b*x)).mult(i));c.setLocationAtPoint(c.renderWorldCopies?h.wrap():h,p)}t._fireMoveEvents(k)},function(a){t._afterEase(k,a)},b),this},b.prototype._prepareEase=function(c,d,b){void 0===b&&(b={}),this._moving=!0,d||b.moving||this.fire(new a.Event("movestart",c)),this._zooming&&!b.zooming&&this.fire(new a.Event("zoomstart",c)),this._rotating&&!b.rotating&&this.fire(new a.Event("rotatestart",c)),this._pitching&&!b.pitching&&this.fire(new a.Event("pitchstart",c))},b.prototype._fireMoveEvents=function(b){this.fire(new a.Event("move",b)),this._zooming&&this.fire(new a.Event("zoom",b)),this._rotating&&this.fire(new a.Event("rotate",b)),this._pitching&&this.fire(new a.Event("pitch",b))},b.prototype._afterEase=function(b,c){if(!this._easeId||!c||this._easeId!==c){delete this._easeId;var d=this._zooming,e=this._rotating,f=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,d&&this.fire(new a.Event("zoomend",b)),e&&this.fire(new a.Event("rotateend",b)),f&&this.fire(new a.Event("pitchend",b)),this.fire(new a.Event("moveend",b))}},b.prototype.flyTo=function(b,g){var D=this;if(!b.essential&&a.browser.prefersReducedMotion){var q=a.pick(b,["center","zoom","bearing","pitch","around"]);return this.jumpTo(q,g)}this.stop(),b=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},b);var c=this.transform,f=this.getZoom(),h=this.getBearing(),k=this.getPitch(),E=this.getPadding(),l="zoom"in b?a.clamp(+b.zoom,c.minZoom,c.maxZoom):f,r="bearing"in b?this._normalizeBearing(b.bearing,h):h,s="pitch"in b?+b.pitch:k,t="padding"in b?b.padding:c.padding,u=c.zoomScale(l-f),v=a.Point.convert(b.offset),w=c.centerPoint.add(v),m=c.pointLocation(w),n=a.LngLat.convert(b.center||m);this._normalizeCenter(n);var x=c.project(m),y=c.project(n).sub(x),d=b.curve,e=Math.max(c.width,c.height),i=e/u,o=y.mag();if("minZoom"in b){var z=a.clamp(Math.min(b.minZoom,f,l),c.minZoom,c.maxZoom);d=Math.sqrt(e/c.zoomScale(z-f)/o*2)}var F=d*d;function p(b){var a=(i*i-e*e+(b?-1:1)*F*F*o*o)/(2*(b?i:e)*F*o);return Math.log(Math.sqrt(a*a+1)-a)}function G(a){return(Math.exp(a)-Math.exp(-a))/2}function H(a){return(Math.exp(a)+Math.exp(-a))/2}var A=p(0),B=function(a){return H(A)/H(A+d*a)},C=function(b){var a;return e*((H(A)*(G(a=A+d*b)/H(a))-G(A))/F)/o},j=(p(1)-A)/d;if(1e-6>Math.abs(o)||!isFinite(j)){if(1e-6>Math.abs(e-i))return this.easeTo(b,g);var I=i<e?-1:1;j=Math.abs(Math.log(i/e))/d,C=function(){return 0},B=function(a){return Math.exp(I*d*a)}}return b.duration="duration"in b?+b.duration:1e3*j/("screenSpeed"in b?+b.screenSpeed/d:+b.speed),b.maxDuration&&b.duration>b.maxDuration&&(b.duration=0),this._zooming=!0,this._rotating=h!==r,this._pitching=s!==k,this._padding=!c.isPaddingEqual(t),this._prepareEase(g,!1),this._ease(function(b){var d=b*j,e=1/B(d);c.zoom=1===b?l:f+c.scaleZoom(e),D._rotating&&(c.bearing=a.number(h,r,b)),D._pitching&&(c.pitch=a.number(k,s,b)),D._padding&&(c.interpolatePadding(E,t,b),w=c.centerPoint.add(v));var i=1===b?n:c.unproject(x.add(y.mult(C(d))).mult(e));c.setLocationAtPoint(c.renderWorldCopies?i.wrap():i,w),D._fireMoveEvents(g)},function(){return D._afterEase(g)},b),this},b.prototype.isEasing=function(){return!!this._easeFrameId},b.prototype.stop=function(){return this._stop()},b.prototype._stop=function(b,c){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var d=this._onEaseEnd;delete this._onEaseEnd,d.call(this,c)}if(!b){var a=this.handlers;a&&a.stop(!1)}return this},b.prototype._ease=function(c,d,b){!1===b.animate||0===b.duration?(c(1),d()):(this._easeStart=a.browser.now(),this._easeOptions=b,this._onEaseFrame=c,this._onEaseEnd=d,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},b.prototype._renderFrameCallback=function(){var b=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(b)),b<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},b.prototype._normalizeBearing=function(b,c){var d=Math.abs((b=a.wrap(b,-180,180))-c);return Math.abs(b-360-c)<d&&(b-=360),Math.abs(b+360-c)<d&&(b+=360),b},b.prototype._normalizeCenter=function(b){var a=this.transform;if(a.renderWorldCopies&&!a.lngRange){var c=b.lng-a.center.lng;b.lng+=c>180?-360:c< -180?360:0}},b}(a.Evented),s=function(b){void 0===b&&(b={}),this.options=b,a.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};s.prototype.getDefaultPosition=function(){return"bottom-right"},s.prototype.onAdd=function(b){var a=this.options&&this.options.compact;return this._map=b,this._container=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=p.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=p.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),a&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===a&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},s.prototype.onRemove=function(){p.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},s.prototype._setElementTitle=function(a,c){var b=this._map._getUIString("AttributionControl."+c);a.title=b,a.setAttribute("aria-label",b)},s.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","fal
1se")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},s.prototype._updateEditLink=function(){var b=this._editLink;b||(b=this._editLink=this._container.querySelector(".mapbox-improve-map"));var c=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||a.config.ACCESS_TOKEN}];if(b){var d=c.reduce(function(b,a,d){return a.value&&(b+=a.key+"="+a.value+(d<c.length-1?"&":"")),b},"?");b.href=a.config.FEEDBACK_URL+"/"+d+(this._map._hash?this._map._hash.getHashString(!0):""),b.rel="noopener nofollow",this._setElementTitle(b,"MapFeedback")}},s.prototype._updateData=function(a){a&&("metadata"===a.sourceDataType||"visibility"===a.sourceDataType||"style"===a.dataType)&&(this._updateAttributions(),this._updateEditLink())},s.prototype._updateAttributions=function(){if(this._map.style){var a=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?a=a.concat(this.options.customAttribution.map(function(a){return"string"!=typeof a?"":a})):"string"==typeof this.options.customAttribution&&a.push(this.options.customAttribution)),this._map.style.stylesheet){var d=this._map.style.stylesheet;this.styleOwner=d.owner,this.styleId=d.id}var e=this._map.style.sourceCaches;for(var g in e){var f=e[g];if(f.used){var b=f.getSource();b.attribution&&0>a.indexOf(b.attribution)&&a.push(b.attribution)}}a.sort(function(a,b){return a.length-b.length});var c=(a=a.filter(function(c,d){for(var b=d+1;b<a.length;b++)if(a[b].indexOf(c)>=0)return!1;return!0})).join(" | ");c!==this._attribHTML&&(this._attribHTML=c,a.length?(this._innerContainer.innerHTML=c,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},s.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var H=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};H.prototype.onAdd=function(b){this._map=b,this._container=p.create("div","mapboxgl-ctrl");var a=p.create("a","mapboxgl-ctrl-logo");return a.target="_blank",a.rel="noopener nofollow",a.href="https://www.mapbox.com/",a.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),a.setAttribute("rel","noopener nofollow"),this._container.appendChild(a),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},H.prototype.onRemove=function(){p.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},H.prototype.getDefaultPosition=function(){return"bottom-left"},H.prototype._updateLogo=function(a){a&&"metadata"!==a.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},H.prototype._logoRequired=function(){if(this._map.style){var a=this._map.style.sourceCaches;for(var b in a)if(a[b].getSource().mapbox_logo)return!0;return!1}},H.prototype._updateCompact=function(){var a=this._container.children;if(a.length){var b=a[0];this._map.getCanvasContainer().offsetWidth<250?b.classList.add("mapboxgl-compact"):b.classList.remove("mapboxgl-compact")}};var Z=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Z.prototype.add=function(b){var a=++this._id;return this._queue.push({callback:b,id:a,cancelled:!1}),a},Z.prototype.remove=function(e){for(var b=this._currentlyRunning,a=0,c=b?this._queue.concat(b):this._queue;a<c.length;a+=1){var d=c[a];if(d.id===e)return void(d.cancelled=!0)}},Z.prototype.run=function(a){void 0===a&&(a=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var b=0,c=e;b<c.length;b+=1){var d=c[b];if(!d.cancelled&&(d.callback(a),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Z.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var dO={"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"},dP=a.window.HTMLImageElement,dQ=a.window.HTMLElement,dR=a.window.ImageBitmap,dS={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
1acheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},a4=function(g){function b(b){var e=this;if(null!=(b=a.extend({},dS,b)).minZoom&&null!=b.maxZoom&&b.minZoom>b.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=b.minPitch&&null!=b.maxPitch&&b.minPitch>b.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=b.minPitch&&b.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=b.maxPitch&&b.maxPitch>60)throw Error("maxPitch must be less than or equal to 60");var d=new c(b.minZoom,b.maxZoom,b.minPitch,b.maxPitch,b.renderWorldCopies);if(g.call(this,d,b),this._interactive=b.interactive,this._maxTileCacheSize=b.maxTileCacheSize,this._failIfMajorPerformanceCaveat=b.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=b.preserveDrawingBuffer,this._antialias=b.antialias,this._trackResize=b.trackResize,this._bearingSnap=b.bearingSnap,this._refreshExpiredTiles=b.refreshExpiredTiles,this._fadeDuration=b.fadeDuration,this._crossSourceCollisions=b.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=b.collectResourceTiming,this._renderTaskQueue=new Z,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},dO,b.locale),this._clickTolerance=b.clickTolerance,this._requestManager=new a.RequestManager(b.transformRequest,b.accessToken),"string"==typeof b.container){if(this._container=a.window.document.getElementById(b.container),!this._container)throw Error("Container '"+b.container+"' not found.")}else{if(!(b.container instanceof dQ))throw Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=b.container}if(b.maxBounds&&this.setMaxBounds(b.maxBounds),a.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw Error("Failed to initialize WebGL.");this.on("move",function(){return e._update(!1)}),this.on("moveend",function(){return e._update(!1)}),this.on("zoom",function(){return e._update(!0)}),void 0!==a.window&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1),a.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new f(this,b),this._hash=b.hash&&new F("string"==typeof b.hash&&b.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:b.center,zoom:b.zoom,bearing:b.bearing,pitch:b.pitch}),b.bounds&&(this.resize(),this.fitBounds(b.bounds,a.extend({},b.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=b.localIdeographFontFamily,b.style&&this.setStyle(b.style,{localIdeographFontFamily:b.localIdeographFontFamily}),b.attributionControl&&this.addControl(new s({customAttribution:b.customAttribution})),this.addControl(new H,b.logoPosition),this.on("style.load",function(){e.transform.unmodified&&e.jumpTo(e.style.stylesheet)}),this.on("data",function(b){e._update("style"===b.dataType),e.fire(new a.Event(b.dataType+"data",b))}),this.on("dataloading",function(b){e.fire(new a.Event(b.dataType+"dataloading",b))})}g&&(b.__proto__=g),(b.prototype=Object.create(g&&g.prototype)).constructor=b;var d={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return b.prototype._getMapId=function(){return this._mapId},b.prototype.addControl=function(b,c){if(void 0===c&&(c=b.getDefaultPosition?b.getDefaultPosition():"top-right"),!b||!b.onAdd)return this.fire(new a.ErrorEvent(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var e=b.onAdd(this);this._controls.push(b);var d=this._controlPositions[c];return -1!==c.indexOf("bottom")?d.insertBefore(e,d.firstChild):d.appendChild(e),this},b.prototype.removeControl=function(b){if(!b||!b.onRemove)return this.fire(new a.ErrorEvent(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var c=this._controls.indexOf(b);return c> -1&&this._controls.splice(c,1),b.onRemove(this),this}
vendor: 12,475 bytes, line 1
1,b.prototype.hasControl=function(a){return this._controls.indexOf(a)> -1},b.prototype.resize=function(b){var e=this._containerDimensions(),c=e[0],d=e[1];if(c===this.transform.width&&d===this.transform.height)return this;this._resizeCanvas(c,d),this.transform.resize(c,d),this.painter.resize(c,d);var f=!this._moving;return f&&this.fire(new a.Event("movestart",b)).fire(new a.Event("move",b)),this.fire(new a.Event("resize",b)),f&&this.fire(new a.Event("moveend",b)),this},b.prototype.getBounds=function(){return this.transform.getBounds()},b.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},b.prototype.setMaxBounds=function(b){return this.transform.setMaxBounds(a.LngLatBounds.convert(b)),this._update()},b.prototype.setMinZoom=function(a){if((a=null==a?-2:a)>= -2&&a<=this.transform.maxZoom)return this.transform.minZoom=a,this._update(),this.getZoom()<a&&this.setZoom(a),this;throw Error("minZoom must be between -2 and the current maxZoom, inclusive")},b.prototype.getMinZoom=function(){return this.transform.minZoom},b.prototype.setMaxZoom=function(a){if((a=null==a?22:a)>=this.transform.minZoom)return this.transform.maxZoom=a,this._update(),this.getZoom()>a&&this.setZoom(a),this;throw Error("maxZoom must be greater than the current minZoom")},b.prototype.getMaxZoom=function(){return this.transform.maxZoom},b.prototype.setMinPitch=function(a){if((a=null==a?0:a)<0)throw Error("minPitch must be greater than or equal to 0");if(a>=0&&a<=this.transform.maxPitch)return this.transform.minPitch=a,this._update(),this.getPitch()<a&&this.setPitch(a),this;throw Error("minPitch must be between 0 and the current maxPitch, inclusive")},b.prototype.getMinPitch=function(){return this.transform.minPitch},b.prototype.setMaxPitch=function(a){if((a=null==a?60:a)>60)throw Error("maxPitch must be less than or equal to 60");if(a>=this.transform.minPitch)return this.transform.maxPitch=a,this._update(),this.getPitch()>a&&this.setPitch(a),this;throw Error("maxPitch must be greater than the current minPitch")},b.prototype.getMaxPitch=function(){return this.transform.maxPitch},b.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},b.prototype.setRenderWorldCopies=function(a){return this.transform.renderWorldCopies=a,this._update()},b.prototype.project=function(b){return this.transform.locationPoint(a.LngLat.convert(b))},b.prototype.unproject=function(b){return this.transform.pointLocation(a.Point.convert(b))},b.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},b.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},b.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},b.prototype._createDelegatedListener=function(a,b,c){var d,e=this;if("mouseenter"===a||"mouseover"===a){var f=!1;return{layer:b,listener:c,delegates:{mousemove:function(d){var g=e.getLayer(b)?e.queryRenderedFeatures(d.point,{layers:[b]}):[];g.length?f||(f=!0,c.call(e,new du(a,e,d.originalEvent,{features:g}))):f=!1},mouseout:function(){f=!1}}}}if("mouseleave"===a||"mouseout"===a){var g=!1;return{layer:b,listener:c,delegates:{mousemove:function(d){(e.getLayer(b)?e.queryRenderedFeatures(d.point,{layers:[b]}):[]).length?g=!0:g&&(g=!1,c.call(e,new du(a,e,d.originalEvent)))},mouseout:function(b){g&&(g=!1,c.call(e,new du(a,e,b.originalEvent)))}}}}return{layer:b,listener:c,delegates:((d={})[a]=function(a){var d=e.getLayer(b)?e.queryRenderedFeatures(a.point,{layers:[b]}):[];d.length&&(a.features=d,c.call(e,a),delete a.features)},d)}},b.prototype.on=function(a,c,d){if(void 0===d)return g.prototype.on.call(this,a,c);var b=this._createDelegatedListener(a,c,d);for(var e in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[a]=this._delegatedListeners[a]||[],this._delegatedListeners[a].push(b),b.delegates)this.on(e,b.delegates[e]);return this},b.prototype.once=function(a,b,c){if(void 0===c)return g.prototype.once.call(this,a,b);var d=this._createDelegatedListener(a,b,c);for(var e in d.delegates)this.once(e,d.delegates[e]);return this},b.prototype.off=function(a,b,c){var d=this;return void 0===c?g.prototype.off.call(this,a,b):(this._delegatedListeners&&this._delegatedListeners[a]&&function(i){for(var g=i[a],e=0;e<g.length;e++){var f=g[e];if(f.layer===b&&f.listener===c){for(var h in f.delegates)d.off(h,f.delegates[h]);return g.splice(e,1),d}}}(this._delegatedListeners),this)},b.prototype.queryRenderedFeatures=function(b,c){if(!this.style)return[];if(void 0!==c|| void 0===b||b instanceof a.Point||Array.isArray(b)||(c=b,b=void 0),c=c||{},(b=b||[[0,0],[this.transform.width,this.transform.height]])instanceof a.Point||"number"==typeof b[0])f=[a.Point.convert(b)];else{var f,d=a.Point.convert(b[0]),e=a.Point.convert(b[1]);f=[d,new a.Point(e.x,d.y),e,new a.Point(d.x,e.y),d]}return this.style.queryRenderedFeatures(f,c,this.transform)},b.prototype.querySourceFeatures=function(a,b){return this.style.querySourceFeatures(a,b)},b.prototype.setStyle=function(c,b){return!1!==(b=a.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},b)).diff&&b.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&c?(this._diffStyle(c,b),this):(this._localIdeographFontFamily=b.localIdeographFontFamily,this._updateStyle(c,b))},b.prototype._getUIString=function(a){var b=this._locale[a];if(null==b)throw Error("Missing UI string '"+a+"'");return b},b.prototype._updateStyle=function(a,b){return this.style&&(this.style.setEventedParent(null),this.style._remove()),a?(this.style=new Q(this,b||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof a?this.style.loadURL(a):this.style.loadJSON(a),this):(delete this.style,this)},b.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Q(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},b.prototype._diffStyle=function(b,c){var f=this;if("string"==typeof b){var d=this._requestManager.normalizeStyleURL(b),e=this._requestManager.transformRequest(d,a.ResourceType.Style);a.getJSON(e,function(b,d){b?f.fire(new a.ErrorEvent(b)):d&&f._updateDiff(d,c)})}else"object"==typeof b&&this._updateDiff(b,c)},b.prototype._updateDiff=function(c,d){try{this.style.setState(c)&&this._update(!0)}catch(b){a.warnOnce("Unable to perform style diff: "+(b.message||b.error||b)+".  Rebuilding the style from scratch."),this._updateStyle(c,d)}},b.prototype.getStyle=function(){if(this.style)return this.style.serialize()},b.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():a.warnOnce("There is no style added to the map.")},b.prototype.addSource=function(a,b){return this._lazyInitEmptyStyle(),this.style.addSource(a,b),this._update(!0)},b.prototype.isSourceLoaded=function(b){var c=this.style&&this.style.sourceCaches[b];if(void 0!==c)return c.loaded();this.fire(new a.ErrorEvent(Error("There is no source with ID '"+b+"'")))},b.prototype.areTilesLoaded=function(){var a=this.style&&this.style.sourceCaches;for(var d in a){var b=a[d]._tiles;for(var e in b){var c=b[e];if("loaded"!==c.state&&"errored"!==c.state)return!1}}return!0},b.prototype.addSourceType=function(a,b,c){return this._lazyInitEmptyStyle(),this.style.addSourceType(a,b,c)},b.prototype.removeSource=function(a){return this.style.removeSource(a),this._update(!0)},b.prototype.getSource=function(a){return this.style.getSource(a)},b.prototype.addImage=function(f,b,c){void 0===c&&(c={});var d=c.pixelRatio;void 0===d&&(d=1);var e=c.sdf;void 0===e&&(e=!1);var i=c.stretchX,j=c.stretchY,k=c.content;if(this._lazyInitEmptyStyle(),b instanceof dP||dR&&b instanceof dR){var g=a.browser.getImageData(b);this.style.addImage(f,{data:new a.RGBAImage({width:g.width,height:g.height},g.data),pixelRatio:d,stretchX:i,stretchY:j,content:k,sdf:e,version:0})}else{if(void 0===b.width|| void 0===b.height)return this.fire(new a.ErrorEvent(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 h=b;this.style.addImage(f,{data:new a.RGBAImage({width:b.width,height:b.height},new Uint8Array(b.data)),pixelRatio:d,stretchX:i,stretchY:j,content:k,sdf:e,version:0,userImage:h}),h.onAdd&&h.onAdd(this,f)}},b.prototype.updateImage=function(e,b){var c=this.style.getImage(e);if(!c)return this.fire(new a.ErrorEvent(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var d=b instanceof dP||dR&&b instanceof dR?a.browser.getImageData(b):b,f=d.width,g=d.height,h=d.data;return void 0===f|| void 0===g?this.fire(new a.ErrorEvent(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`"))):f!==c.data.width||g!==c.data.height?this.fire(new a.ErrorEvent(Error("The width and height of the updated image must be that same as the previous version of the image"))):(c.data.replace(h,!(b instanceof dP||dR&&b instanceof dR)),void this.style.updateImage(e,c))},b.prototype.hasImage=function(b){return b?!!this.style.getImage(b):(this.fire(new a.ErrorEvent(Error("Missing required image id"))),!1)},b.prototype.removeImage=function(a){this.style.removeImage(a)},b.prototype.loadImage=function(b,c){a.getImage(this._requestManager.transformRequest(b,a.ResourceType.Image),c)},b.prototype.listImages=function(){return this.style.listImages()},b.prototype.addLayer=function(a,b){return this._lazyInitEmptyStyle(),this.style.addLayer(a,b),this._update(!0)},b.prototype.moveLayer=function(a,b){return this.style.moveLayer(a,b),this._update(!0)},b.prototype.removeLayer=function(a){return this.style.removeLayer(a),this._update(!0)},b.prototype.getLayer=function(a){return this.style.getLayer(a)},b.prototype.setLayerZoomRange=function(a,b,c){return this.style.setLayerZoomRange(a,b,c),this._update(!0)},b.prototype.setFilter=function(b,c,a){return void 0===a&&(a={}),this.style.setFilter(b,c,a),this._update(!0)},b.prototype.getFilter=function(a){return this.style.getFilter(a)},b.prototype.setPaintProperty=function(b,c,d,a){return void 0===a&&(a={}),this.style.setPaintProperty(b,c,d,a),this._update(!0)},b.prototype.getPaintProperty=function(a,b){return this.style.getPaintProperty(a,b)},b.prototype.setLayoutProperty=function(b,c,d,a){return void 0===a&&(a={}),this.style.setLayoutProperty(b,c,d,a),this._update(!0)},b.prototype.getLayoutProperty=function(a,b){return this.style.getLayoutProperty(a,b)},b.prototype.setLight=function(b,a){return void 0===a&&(a={}),this._lazyInitEmptyStyle(),this.style.setLight(b,a),this._update(!0)},b.prototype.getLight=function(){return this.style.getLight()},b.prototype.setFeatureState=function(a,b){return this.style.setFeatureState(a,b),this._update()},b.prototype.removeFeatureState=function(a,b){return this.style.removeFeatureState(a,b),this._update()},b.prototype.getFeatureState=function(a){return this.style.getFeatureState(a)},b.prototype.getContainer=function(){return this._container},b.prototype.getCanvasContainer=function(){return this._canvasContainer},b.prototype.getCanvas=function(){return this._canvas},b.prototype._containerDimensions=function(){var a=0,b=0;return this._container&&(a=this._container.clientWidth||400,b=this._container.clientHeight||300),[a,b]},b.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==a.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&a.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},b.prototype._setupContainer=function(){var a=this._container;a.classList.add("mapboxgl-map"),(this._missingCSSCanary=p.create("div","mapboxgl-canary",a)).style.visibility="hidden",this._detectMissingCSS();var b=this._canvasContainer=p.create("div","mapboxgl-canvas-container",a);this._interactive&&b.classList.add("mapboxgl-interactive"),this._canvas=p.create("canvas","mapboxgl-canvas",b),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
1on");var c=this._containerDimensions();this._resizeCanvas(c[0],c[1]);var d=this._controlContainer=p.create("div","mapboxgl-control-container",a),e=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(a){e[a]=p.create("div","mapboxgl-ctrl-"+a,d)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},b.prototype._resizeCanvas=function(b,c){var d=a.browser.devicePixelRatio||1;this._canvas.width=d*b,this._canvas.height=d*c,this._canvas.style.width=b+"px",this._canvas.style.height=c+"px"},b.prototype._setupPainter=function(){var c=a.extend({},ap.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),b=this._canvas.getContext("webgl",c)||this._canvas.getContext("experimental-webgl",c);b?(this.painter=new e(b,this.transform),a.webpSupported.testSupport(b)):this.fire(new a.ErrorEvent(Error("Failed to initialize WebGL")))},b.prototype._contextLost=function(b){b.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.Event("webglcontextlost",{originalEvent:b}))},b.prototype._contextRestored=function(b){this._setupPainter(),this.resize(),this._update(),this.fire(new a.Event("webglcontextrestored",{originalEvent:b}))},b.prototype._onMapScroll=function(a){if(a.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},b.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},b.prototype._update=function(a){return this.style&&(this._styleDirty=this._styleDirty||a,this._sourcesDirty=!0,this.triggerRepaint()),this},b.prototype._requestRenderFrame=function(a){return this._update(),this._renderTaskQueue.add(a)},b.prototype._cancelRenderFrame=function(a){this._renderTaskQueue.remove(a)},b.prototype._render=function(k){var c,l=this,e=0,b=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(c=b.createQueryEXT(),b.beginQueryEXT(b.TIME_ELAPSED_EXT,c),e=a.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(k),!this._removed){var f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var g=this.transform.zoom,h=a.browser.now();this.style.zoomHistory.update(g,h);var i=new a.EvaluationParameters(g,{now:h,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),d=i.crossFadingFactor();1===d&&d===this._crossFadingFactor||(f=!0,this._crossFadingFactor=d),this.style.update(i)}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 a.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new a.Event("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var m=a.browser.now()-e;b.endQueryEXT(b.TIME_ELAPSED_EXT,c),setTimeout(function(){var d=b.getQueryObjectEXT(c,b.QUERY_RESULT_EXT)/1e6;b.deleteQueryEXT(c),l.fire(new a.Event("gpu-timing-frame",{cpuTime:m,gpuTime:d}))},50)}if(this.listens("gpu-timing-layer")){var n=this.painter.collectGpuTimers();setTimeout(function(){var b=l.painter.queryGpuTimers(n);l.fire(new a.Event("gpu-timing-layer",{layerTimes:b}))},50)}var j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.Event("idle")),!this._loaded||this._fullyLoaded||j||(this._fullyLoaded=!0),this}},b.prototype.remove=function(){this._hash&&this._hash.remove();for(var b=0,c=this._controls;b<c.length;b+=1)c[b].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),void 0!==a.window&&(a.window.removeEventListener("resize",this._onWindowResize,!1),a.window.removeEventListener("orientationchange",this._onWindowResize,!1),a.window.removeEventListener("online",this._onWindowOnline,!1));var d=this.painter.context.gl.getExtension("WEBGL_lose_context");d&&d.loseContext(),dT(this._canvasContainer),dT(this._controlContainer),dT(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new a.Event("remove"))},b.prototype.triggerRepaint=function(){var b=this;this.style&&!this._frame&&(this._frame=a.browser.frame(function(a){b._frame=null,b._render(a)}))},b.prototype._onWindowOnline=function(){this._update()},b.prototype._onWindowResize=function(a){this._trackResize&&this.resize({originalEvent:a})._update()},d.showTileBoundaries.get=function(){return!!this._showTileBoundaries},d.showTileBoundaries.set=function(a){this._showTileBoundaries!==a&&(this._showTileBoundaries=a,this._update())},d.showPadding.get=function(){return!!this._showPadding},d.showPadding.set=function(a){this._showPadding!==a&&(this._showPadding=a,this._update())},d.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},d.showCollisionBoxes.set=function(a){this._showCollisionBoxes!==a&&(this._showCollisionBoxes=a,a?this.style._generateCollisionBoxes():this._update())},d.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},d.showOverdrawInspector.set=function(a){this._showOverdrawInspector!==a&&(this._showOverdrawInspector=a,this._update())},d.repaint.get=function(){return!!this._repaint},d.repaint.set=function(a){this._repaint!==a&&(this._repaint=a,this.triggerRepaint())},d.vertices.get=function(){return!!this._vertices}
vendor: 10,832 bytes, line 1
1,d.vertices.set=function(a){this._vertices=a,this._update()},b.prototype._setCacheLimits=function(b,c){a.setCacheLimits(b,c)},d.version.get=function(){return a.version},Object.defineProperties(b.prototype,d),b}(a3);function dT(a){a.parentNode&&a.parentNode.removeChild(a)}var dU={showCompass:!0,showZoom:!0,visualizePitch:!1},C=function(b){var c=this;this.options=a.extend({},dU,b),this._container=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(a){return a.preventDefault()}),this.options.showZoom&&(a.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(a){return c._map.zoomIn({},{originalEvent:a})}),p.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(a){return c._map.zoomOut({},{originalEvent:a})}),p.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(a.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(a){c.options.visualizePitch?c._map.resetNorthPitch({},{originalEvent:a}):c._map.resetNorth({},{originalEvent:a})}),this._compassIcon=p.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};C.prototype._updateZoomButtons=function(){var a=this._map.getZoom(),b=a===this._map.getMaxZoom(),c=a===this._map.getMinZoom();this._zoomInButton.disabled=b,this._zoomOutButton.disabled=c,this._zoomInButton.setAttribute("aria-disabled",b.toString()),this._zoomOutButton.setAttribute("aria-disabled",c.toString())},C.prototype._rotateCompassArrow=function(){var a=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=a},C.prototype.onAdd=function(a){return this._map=a,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 o(this._map,this._compass,this.options.visualizePitch)),this._container},C.prototype.onRemove=function(){p.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},C.prototype._createButton=function(b,c){var a=p.create("button",b,this._container);return a.type="button",a.addEventListener("click",c),a},C.prototype._setButtonTitle=function(a,c){var b=this._map._getUIString("NavigationControl."+c);a.title=b,a.setAttribute("aria-label",b)};var o=function(c,b,d){void 0===d&&(d=!1),this._clickTolerance=10,this.element=b,this.mouseRotate=new dA({clickTolerance:c.dragRotate._mouseRotate._clickTolerance}),this.map=c,d&&(this.mousePitch=new dB({clickTolerance:c.dragRotate._mousePitch._clickTolerance})),a.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),p.addEventListener(b,"mousedown",this.mousedown),p.addEventListener(b,"touchstart",this.touchstart,{passive:!1}),p.addEventListener(b,"touchmove",this.touchmove),p.addEventListener(b,"touchend",this.touchend),p.addEventListener(b,"touchcancel",this.reset)};function dV(b,d,c){if(b=new a.LngLat(b.lng,b.lat),d){var f=new a.LngLat(b.lng-360,b.lat),g=new a.LngLat(b.lng+360,b.lat),h=c.locationPoint(b).distSqr(d);c.locationPoint(f).distSqr(d)<h?b=f:c.locationPoint(g).distSqr(d)<h&&(b=g)}for(;Math.abs(b.lng-c.center.lng)>180;){var e=c.locationPoint(b);if(e.x>=0&&e.y>=0&&e.x<=c.width&&e.y<=c.height)break;b.lng>c.center.lng?b.lng-=360:b.lng+=360}return b}o.prototype.down=function(a,b){this.mouseRotate.mousedown(a,b),this.mousePitch&&this.mousePitch.mousedown(a,b),p.disableDrag()},o.prototype.move=function(d,e){var a=this.map,b=this.mouseRotate.mousemoveWindow(d,e);if(b&&b.bearingDelta&&a.setBearing(a.getBearing()+b.bearingDelta),this.mousePitch){var c=this.mousePitch.mousemoveWindow(d,e);c&&c.pitchDelta&&a.setPitch(a.getPitch()+c.pitchDelta)}},o.prototype.off=function(){var a=this.element;p.removeEventListener(a,"mousedown",this.mousedown),p.removeEventListener(a,"touchstart",this.touchstart,{passive:!1}),p.removeEventListener(a,"touchmove",this.touchmove),p.removeEventListener(a,"touchend",this.touchend),p.removeEventListener(a,"touchcancel",this.reset),this.offTemp()},o.prototype.offTemp=function(){p.enableDrag(),p.removeEventListener(a.window,"mousemove",this.mousemove),p.removeEventListener(a.window,"mouseup",this.mouseup)},o.prototype.mousedown=function(b){this.down(a.extend({},b,{ctrlKey:!0,preventDefault:function(){return b.preventDefault()}}),p.mousePos(this.element,b)),p.addEventListener(a.window,"mousemove",this.mousemove),p.addEventListener(a.window,"mouseup",this.mouseup)},o.prototype.mousemove=function(a){this.move(a,p.mousePos(this.element,a))},o.prototype.mouseup=function(a){this.mouseRotate.mouseupWindow(a),this.mousePitch&&this.mousePitch.mouseupWindow(a),this.offTemp()},o.prototype.touchstart=function(a){1!==a.targetTouches.length?this.reset():(this._startPos=this._lastPos=p.touchPos(this.element,a.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return a.preventDefault()}},this._startPos))},o.prototype.touchmove=function(a){1!==a.targetTouches.length?this.reset():(this._lastPos=p.touchPos(this.element,a.targetTouches)[0],this.move({preventDefault:function(){return a.preventDefault()}},this._lastPos))},o.prototype.touchend=function(a){0===a.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},o.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var dW={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 dX(c,d,a){var b=c.classList;for(var e in dW)b.remove("mapboxgl-"+a+"-anchor-"+e);b.add("mapboxgl-"+a+"-anchor-"+d)}var dY,a5=function(c){function b(b,q){if(c.call(this),(b instanceof a.window.HTMLElement||q)&&(b=a.extend({element:b},q)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=b&&b.anchor||"center",this._color=b&&b.color||"#3FB1CE",this._scale=b&&b.scale||1,this._draggable=b&&b.draggable||!1,this._clickTolerance=b&&b.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=b&&b.rotation||0,this._rotationAlignment=b&&b.rotationAlignment||"auto",this._pitchAlignment=b&&b.pitchAlignment&&"auto"!==b.pitchAlignment?b.pitchAlignment:this._rotationAlignment,b&&b.element)this._element=b.element,this._offset=a.Point.convert(b&&b.offset||[0,0]);else{this._defaultMarker=!0,this._element=p.create("div"),this._element.setAttribute("aria-label","Map marker");var d=p.createNS("http://www.w3.org/2000/svg","svg");d.setAttributeNS(null,"display","block"),d.setAttributeNS(null,"height","41px"),d.setAttributeNS(null,"width","27px"),d.setAttributeNS(null,"viewBox","0 0 27 41");var i=p.createNS("http://www.w3.org/2000/svg","g");i.setAttributeNS(null,"stroke","none"),i.setAttributeNS(null,"stroke-width","1"),i.setAttributeNS(null,"fill","none"),i.setAttributeNS(null,"fill-rule","evenodd");var e=p.createNS("http://www.w3.org/2000/svg","g");e.setAttributeNS(null,"fill-rule","nonzero");var j=p.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"transform","translate(3.0, 29.0)"),j.setAttributeNS(null,"fill","#000000");for(var m=0,r=[{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"}];m<r.length;m+=1){var s=r[m],f=p.createNS("http://www.w3.org/2000/svg","ellipse");f.setAttributeNS(null,"opacity","0.04"),f.setAttributeNS(null,"cx","10.5"),f.setAttributeNS(null,"cy","5.80029008"),f.setAttributeNS(null,"rx",s.rx),f.setAttributeNS(null,"ry",s.ry),j.appendChild(f)}var n=p.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"fill",this._color);var t=p.createNS("http://www.w3.org/2000/svg","path");t.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),n.appendChild(t);var k=p.createNS("http://www.w3.org/2000/svg","g");k.setAttributeNS(null,"opacity","0.25"),k.setAttributeNS(null,"fill","#000000");var u=p.createNS("http://www.w3.org/2000/svg","path");u.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"),k.appendChild(u);var o=p.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"transform","translate(6.0, 7.0)"),o.setAttributeNS(null,"fill","#FFFFFF");var l=p.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(8.0, 8.0)");var g=p.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");var h=p.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"),l.appendChild(g),l.a
1ppendChild(h),e.appendChild(j),e.appendChild(n),e.appendChild(k),e.appendChild(o),e.appendChild(l),d.appendChild(e),d.setAttributeNS(null,"height",41*this._scale+"px"),d.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(d),this._offset=a.Point.convert(b&&b.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(a){a.preventDefault()}),this._element.addEventListener("mousedown",function(a){a.preventDefault()}),dX(this._element,this._anchor,"marker"),this._popup=null}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.addTo=function(a){return this.remove(),this._map=a,a.getCanvasContainer().appendChild(this._element),a.on("move",this._update),a.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},b.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),p.remove(this._element),this._popup&&this._popup.remove(),this},b.prototype.getLngLat=function(){return this._lngLat},b.prototype.setLngLat=function(b){return this._lngLat=a.LngLat.convert(b),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},b.prototype.getElement=function(){return this._element},b.prototype.setPopup=function(a){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),a){if(!("offset"in a.options)){var b=Math.sqrt(91.125);a.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[b,-1*(24.6+b)],"bottom-right":[-b,-1*(24.6+b)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=a,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},b.prototype._onKeyPress=function(a){var b=a.code,c=a.charCode||a.keyCode;"Space"!==b&&"Enter"!==b&&32!==c&&13!==c||this.togglePopup()},b.prototype._onMapClick=function(c){var a=c.originalEvent.target,b=this._element;this._popup&&(a===b||b.contains(a))&&this.togglePopup()},b.prototype.getPopup=function(){return this._popup},b.prototype.togglePopup=function(){var a=this._popup;return a&&(a.isOpen()?a.remove():a.addTo(this._map)),this},b.prototype._update=function(c){if(this._map){this._map.transform.renderWorldCopies&&
vendor: 4,376 bytes, line 1
1(this._lngLat=dV(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var a="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?a="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(a="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var b="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?b="rotateX(0deg)":"map"===this._pitchAlignment&&(b="rotateX("+this._map.getPitch()+"deg)"),c&&"moveend"!==c.type||(this._pos=this._pos.round()),p.setTransform(this._element,dW[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+b+" "+a)}},b.prototype.getOffset=function(){return this._offset},b.prototype.setOffset=function(b){return this._offset=a.Point.convert(b),this._update(),this},b.prototype._onMove=function(b){if(!this._isDragging){var c=this._clickTolerance||this._map._clickTolerance;this._isDragging=b.point.dist(this._pointerdownPos)>=c}this._isDragging&&(this._pos=b.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new a.Event("dragstart"))),this.fire(new a.Event("drag")))},b.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),"active"===this._state&&this.fire(new a.Event("dragend")),this._state="inactive"},b.prototype._addDragHandler=function(a){this._element.contains(a.originalEvent.target)&&(a.preventDefault(),this._positionDelta=a.point.sub(this._pos).add(this._offset),this._pointerdownPos=a.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))},b.prototype.setDraggable=function(a){return this._draggable=!!a,this._map&&(a?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},b.prototype.isDraggable=function(){return this._draggable},b.prototype.setRotation=function(a){return this._rotation=a||0,this._update(),this},b.prototype.getRotation=function(){return this._rotation},b.prototype.setRotationAlignment=function(a){return this._rotationAlignment=a||"auto",this._update(),this},b.prototype.getRotationAlignment=function(){return this._rotationAlignment},b.prototype.setPitchAlignment=function(a){return this._pitchAlignment=a&&"auto"!==a?a:this._rotationAlignment,this._update(),this},b.prototype.getPitchAlignment=function(){return this._pitchAlignment},b}(a.Evented),dZ={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},d$=0,d_=!1,a6=function(c){function b(b){c.call(this),this.options=a.extend({},dZ,b),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.onAdd=function(c){var b;return this._map=c,this._container=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),b=this._setupUI,void 0!==dY?b(dY):void 0!==a.window.navigator.permissions?a.window.navigator.permissions.query({name:"geolocation"}).then(function(a){b(dY="denied"!==a.state)}):b(dY=!!a.window.navigator.geolocation),this._container},b.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(a.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(),p.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,d$=0,d_=!1},b.prototype._isOutOfMapMaxBounds=function(c){var a=this._map.getMaxBounds(),b=c.coords;return a&&(b.longitude<a.getWest()||b.longitude>a.getEast()||b.latitude<a.getSouth()||b.latitude>a.getNorth())},b.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
1RROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},b.prototype._onSuccess=function(b){if(this._map){if(this._isOutOfMapMaxBounds(b))return this._setErrorState(),this.fire(new a.Event("outofmaxbounds",b)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=b,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(b),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(b),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",b)),this._finish()}},b.prototype._updateCamera=function(b){var c=new a.LngLat(b.coords.longitude,b.coords.latitude),d=b.coords.accuracy,e=this._map.getBearing(),f=a.extend({bearing:e},this.options.fitBoundsOptions);this._map.fitBounds(c.toBounds(d),f,{geolocateSource:!0})},b.prototype._updateMarker=function(b){if(b){var c=new a.LngLat(b.coords.longitude,b.coords.latitude);this._accuracyCircleMarker.setLngLat(c).addTo(this._map),this._userLocationDotMarker.setLngLat(c).addTo(this._map),this._accuracy=b.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},b.prototype._updateCircleRadius=function(){var a=this._map._container.clientHeight/2,c=this._map.unproject([0,a]),d=this._map.unproject([1,a]),e=c.distanceTo(d),b=Math.ceil(2*this._accuracy/e);this._circleElement.style.width=b+"px",this._circleElement.style.height=b+"px"},b.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},b.prototype._onError=function(b){if(this._map){if(this.options.trackUserLocation){if(1===b.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===b.code&&d_)return;this._setErrorState()}}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",b)),this._finish()}},b.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},b.prototype._setupUI=function(d){var e=this;if(this._container.addEventListener("contextmenu",function(a){return a.preventDefault()}),this._geolocateButton=p.create("button","mapboxgl-ctrl-geolocate",this._container),p.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===d){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var b=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=b,this._geolocateButton.setAttribute("aria-label",b)}else{var c=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
1se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=p.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new a5(this._dotElement),this._circleElement=p.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new a5({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(b){b.geolocateSource||"ACTIVE_LOCK"!==e._watchState||b.originalEvent&&"resize"===b.originalEvent.type||(e._watchState="BACKGROUND",e._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),e._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),e.fire(new a.Event("trackuserlocationend")))})},b.prototype.trigger=function(){if(!this._setup)return a.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 a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":d$--,d_=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new a.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&& void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var b;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++d$>1?(b={maximumAge:6e5,timeout:0},d_=!0):(b=this.options.positionOptions,d_=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,b)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},b.prototype._clearWatch=function(){a.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},b}(a.Evented),d0={maxWidth:100,unit:"metric"},I=function(b){this.options=a.extend({},d0,b),a.bindAll(["_onMove","setUnit"],this)};function d1(a,d,b){var c=b&&b.maxWidth||100,g=a._container.clientHeight/2,h=a.unproject([0,g]),i=a.unproject([c,g]),e=h.distanceTo(i);if(b&&"imperial"===b.unit){var f=3.2808*e;f>5280?d2(d,c,f/5280,a._getUIString("ScaleControl.Miles")):d2(d,c,f,a._getUIString("ScaleControl.Feet"))}else b&&"nautical"===b.unit?d2(d,c,e/1852,a._getUIString("ScaleControl.NauticalMiles")):e>=1e3?d2(d,c,e/1e3,a._getUIString("ScaleControl.Kilometers")):d2(d,c,e,a._getUIString("ScaleControl.Meters"))}function d2(c,i,d,j){var e,b,f,g,a,h=(g=Math.pow(10,(""+Math.floor(f=d)).length-1))*(a=(a=f/g)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:(b=Math.pow(10,Math.ceil(-Math.log(e=a)/Math.LN10)),Math.round(e*b)/b));c.style.width=i*(h/d)+"px",c.innerHTML=h+"&nbsp;"+j}I.prototype.getDefaultPosition=function(){return"bottom-left"},I.prototype._onMove=function(){d1(this._map,this._container,this.options)},I.prototype.onAdd=function(a){return this._map=a,this._container=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",a.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},I.prototype.onRemove=function(){p.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},I.prototype.setUnit=function(a){this.options.unit=a,d1(this._map,this._container,this.options)};var t=function(b){this._fullscreen=!1,b&&b.container&&(b.container instanceof a.window.HTMLElement?this._container=b.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.window.document&&(this._fullscreenchange="MSFullscreenChange")};t.prototype.onAdd=function(b){return this._map=b,this._container||(this._container=this._map.getContainer()),this._controlContainer=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},t.prototype.onRemove=function(){p.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},t.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},t.prototype._setupUI=function(){var b=this._fullscreenButton=p.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);p.create("span","mapboxgl-ctrl-icon",b).setAttribute("aria-hidden",!0),b.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},t.prototype._updateTitle=function(){var a=this._getTitle();this._fullscreenButton.setAttribute("aria-label",a),this._fullscreenButton.title=a},t.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},t.prototype._isFullscreen=function(){return this._fullscreen},t.prototype._changeIcon=function(){(a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},t.prototype._onClickFullscreen=function(){this._isFullscreen()?a.window.document.exitFullscreen?a.window.document.exitFullscreen():a.window.document.mozCancelFullScreen?a.window.document.mozCancelFullScreen():a.window.document.msExitFullscreen?a.window.document.msExitFullscreen():a.window.document.webkitCancelFullScreen&&a.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 d3={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},a7=function(c){function b(b){c.call(this),this.options=a.extend(Object.create(d3),b),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return c&&(b.__proto__=c),(b.prototype=Object.create(c&&c.prototype)).constructor=b,b.prototype.addTo=function(b){return this._map&&this.remove(),this._map=b,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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new a.Event("open")),this},b.prototype.isOpen=function(){return!!this._map},b.prototype.remove=function(){return this._content&&p.remove(this._content),this._container&&(p.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 a.Event("close")),this},b.prototype.getLngLat=function(){return this._lngLat},b.prototype.setLngLat=function(b){return this._lngLat=a.LngLat.convert(b),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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},b.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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},b.prototype.getElement=function(){return this._container},b.prototype.setText=function(b){return this.setDOMContent(a.window.document.createTextNode(b))},b.prototype.setHTML=function(e){var b,c=a.window.document.createDocumentFragment(),d=a.window.document.createElement("body");for(d.innerHTML=e;b=d.firstChild;)c.appendChild(b);return this.setDOMContent(c)},b.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},b.prototype.setMaxWidth=function(a){return this.options.maxWidth=a,this._update(),this}
vendor: 5,086 bytes, line 1
1,b.prototype.setDOMContent=function(a){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=p.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(a),this._createCloseButton(),this._update(),this._focusFirstElement(),this},b.prototype.addClassName=function(a){this._container&&this._container.classList.add(a)},b.prototype.removeClassName=function(a){this._container&&this._container.classList.remove(a)},b.prototype.setOffset=function(a){return this.options.offset=a,this._update(),this},b.prototype.toggleClassName=function(a){if(this._container)return this._container.classList.toggle(a)},b.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=p.create("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))},b.prototype._onMouseUp=function(a){this._update(a.point)},b.prototype._onMouseMove=function(a){this._update(a.point)},b.prototype._onDrag=function(a){this._update(a.point)},b.prototype._update=function(e){var j=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=p.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=p.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(a){return j._container.classList.add(a)}),this._trackPointer&&this._container.classList.add("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=dV(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var b=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),c=this.options.anchor,f=function e(b){if(b){if("number"==typeof b){var d=Math.round(Math.sqrt(.5*Math.pow(b,2)));return{center:new a.Point(0,0),top:new a.Point(0,b),"top-left":new a.Point(d,d),"top-right":new a.Point(-d,d),bottom:new a.Point(0,-b),"bottom-left":new a.Point(d,-d),"bottom-right":new a.Point(-d,-d),left:new a.Point(b,0),right:new a.Point(-b,0)}}if(b instanceof a.Point||Array.isArray(b)){var c=a.Point.convert(b);return{center:c,top:c,"top-left":c,"top-right":c,bottom:c,"bottom-left":c,"bottom-right":c,left:c,right:c}}return{center:a.Point.convert(b.center||[0,0]),top:a.Point.convert(b.top||[0,0]),"top-left":a.Point.convert(b["top-left"]||[0,0]),"top-right":a.Point.convert(b["top-right"]||[0,0]),bottom:a.Point.convert(b.bottom||[0,0]),"bottom-left":a.Point.convert(b["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(b["bottom-right"]||[0,0]),left:a.Point.convert(b.left||[0,0]),right:a.Point.convert(b.right||[0,0])}}return e(new a.Point(0,0))}(this.options.offset);if(!c){var d,g=this._container.offsetWidth,h=this._container.offsetHeight;d=b.y+f.bottom.y<h?["top"]:b.y>this._map.transform.height-h?["bottom"]:[],b.x<g/2?d.push("left"):b.x>this._map.transform.width-g/2&&d.push("right"),c=0===d.length?"bottom":d.join("-")}var i=b.add(f[c]).round();p.setTransform(this._container,dW[c]+" translate("+i.x+"px,"+i.y+"px)"),dX(this._container,c,"popup")}},b.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var a=this._container.querySelector("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");a&&a.focus()}},b.prototype._onClose=function(){this.remove()},b}(a.Evented),a8={version:a.version,supported:ap,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:a4,NavigationControl:C,GeolocateControl:a6,AttributionControl:s,ScaleControl:I,FullscreenControl:t,Popup:a7,Marker:a5,Style:Q,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:function(){b2().acquire(b0)},clearPrewarmedResources:function(){var a=b1;a&&(a.isPreloaded()&&1===a.numActive()?(a.release(b0),b1=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 a.config.ACCESS_TOKEN},set accessToken(e){a.config.ACCESS_TOKEN=e},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(e){a.config.API_URL=e},get workerCount(){return A.workerCount},set workerCount(t){A.workerCount=t},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){a.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(b){a.clearTileCache(b)},workerUrl:""};return a8}),b})}}])

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.