PageSourceSearch

https://vsmpo.ru/front/js/library/mapbox-gl.min.js

js vsmpo.ru collected 2026-10-02 10:27:20 UTC 758,211 bytes, 1 lines download raw bytes

vendor: 5,083 bytes, line 1
1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).mapboxgl=e()}(this,function(){"use strict";var n,o,a;function t(t,e){var i,r;n?o?(i="var sharedChunk = {}; ("+n+")(sharedChunk); ("+o+")(sharedChunk);",n(r={}),a=e(r),"undefined"!=typeof window&&(a.workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"})))):o=e:n=e}return t(0,function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var o=i;function i(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var i,r,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(i=0))return i;if(n>(r=1))return r;for(;i<r;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;o<t?i=n:r=n,n=.5*(r-i)+i}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var st=r;function r(t,e){this.x=t,this.y=e}r.prototype={clone:function(){return new r(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,t=t.y-this.y;return e*e+t*t},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),i=Math.sin(t),t=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=t,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),t=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=t,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return!(t instanceof r)&&Array.isArray(t)?new r(t[0],t[1]):t};var f="undefined"!=typeof self?self:{},n=Math.pow(2,53)-1;function a(t,e,i,r){var n=new o(t,e,i,r);return function(t){return n.solve(t)}}var s=a(.25,.1,.25,1);function u(t,e,i){return Math.min(i,Math.max(e,t))}function l(t,e,i){var r=i-e,r=((t-e)%r+r)%r+e;return r===e?i:r}function v(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];for(var r=0,n=e;r<n.length;r+=1){var o,a=n[r];for(o in a)t[o]=a[o]}return t}var c=1;function p(){return c++}function h(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function m(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function _(t,e,i){var r,n={};for(r in t)n[r]=e.call(i||this,t[r],r,t);return n}function g(t,e,i){var r,n={};for(r in t)e.call(i||this,t[r],r,t)&&(n[r]=t[r]);return n}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?_(t,x):t}var b={};function lt(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function w(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function S(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function T(t){var n={};return t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}
1\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,e,i,r){r=i||r;return n[e]=!r||r.toLowerCase(),""}),n["max-age"]&&(t=parseInt(n["max-age"],10),isNaN(t)?delete n["max-age"]:n["max-age"]=t),n}var I=null;function E(t){var e;return null==I&&(e=t.navigator?t.navigator.userAgent:null,I=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))),I}function A(t){try{var e=f[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var z,P,C,k,M=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),D=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,L=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,B={now:M,frame:function(t){var e=D(t);return{cancel:function(){return L(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var i=f.document.createElement("canvas"),r=i.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return i.width=t.width,i.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return(z=z||f.document.createElement("a")).href=t,z.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return!!f.matchMedia&&(null==P&&(P=f.matchMedia("(prefers-reduced-motion: reduce)")),P.matches)}},R={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},F={supported:!1,testSupport:function(t){!O&&k&&(U?V(t):C=t)}},O=!1,U=!1;function V(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,k),t.isContextLost())return;F.supported=!0}
1catch(t){}t.deleteTexture(e),O=!0}f.document&&((k=f.document.createElement("img")).onload=function(){C&&V(C),U=!(C=null)},k.onerror=function(){O=!0,C=null},k.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function N(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()}var j="01";function q(t){return 0===t.indexOf("mapbox:")}N.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",j,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},N.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},N.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},N.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;t=W(t);return t.path="/styles/v1"+t.path,this._makeAPIURL(t,this._customAccessToken||e)},N.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;t=W(t);return t.path="/fonts/v1"+t.path,this._makeAPIURL(t,this._customAccessToken||e)},N.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;t=W(t);return t.path="/v4/"+t.authority+".json",t.params.push("secure"),this._makeAPIURL(t,this._customAccessToken||e)},N.prototype.normalizeSpriteURL=function(t,e,i,r){var n=W(t);return q(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+i,this._makeAPIURL(n,this._customAccessToken||r)):(n.path+=""+e+i,K(n))},N.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=W(t);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(2<=B.devicePixelRatio||512===e?"@2x":"")+(F.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;e=this._customAccessToken||function(){for(var t=0,e=r.params;t<e.length;t+=1){var i=e[t].match(/^access_token=(.*)$/);if(i)return i[1]}return null}()||R.ACCESS_TOKEN;return R.REQUIRE_ACCESS_TOKEN&&e&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,e)},N.prototype.canonicalizeTileURL=function(t,e){var i=W(t);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(/\.[\w]+$/))return t;t="mapbox://tiles/";t+=i.path.replace("/v4/","");i=i.params;return e&&(i=i.filter(function(t){return!t.match(/^access_token=/)})),i.length&&(t+="?"+i.join("&")),t},N.prototype.canonicalizeTileset=function(t,e){for(var i=!!e&&q(e),r=[],n=0,o=t.tiles||[];n<o.length;n+=1){var a=o[n];G(a)?r.push(this.canonicalizeTileURL(a,i)):r.push(a)}return r},N.prototype._makeAPIURL=function(t,e){var i,r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",n=W(R.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"http"===t.protocol&&0<=(i=t.params.indexOf("secure"))&&t.params.splice(i,1),"/"!==n.path&&(t.path=""+n.path+t.path),!R.REQUIRE_ACCESS_TOKEN)return K(t);if(!(e=e||R.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return t.params=t.params.filter(function(t){return-1===t.indexOf("access_token")}),t.params.push("access_token="+e),K(t)};var Z=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function G(t){return Z.test(t)}var X=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function W(t){t=t.match(X);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function K(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function H(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(f.atob(e[1]).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch(t){return null}}var J=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};J.prototype.getStorageKey=function(t){var e=H(R.ACCESS_TOKEN),e=e&&e.u?f.btoa(encodeURIComponent(e.u).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))})):R.ACCESS_TOKEN||"";return t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},J.prototype.fetchEventData=function(){var t=A("localStorage"),e=this.getStorageKey(),i=this.getStorageKey("uuid");if(t)try{var r=f.localStorage.getItem(e);r&&(this.eventData=JSON.parse(r));r=f.localStorage.getItem(i);r&&(this.anonId=r)}catch(t){lt("Unable to read from LocalStorage")}},J.prototype.saveEventData=function(){var t=A("localStorage"),e=this.getStorageKey(),i=this.getStorageKey("uuid");if(t)try{f.localStorage.setItem(i,this.anonId),1<=Object.keys(this.eventData).length&&f.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){lt("Unable to write to LocalStorage")}},J.prototype.processRequests=function(t){}
1,J.prototype.postEvent=function(t,e,i,r){var n,o=this;R.EVENTS_URL&&((n=W(R.EVENTS_URL)).params.push("access_token="+(r||R.ACCESS_TOKEN||"")),t={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.1",skuId:j,userId:this.anonId},t=e?v(t,e):t,t={url:K(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([t])},this.pendingRequest=Tt(t,function(t){o.pendingRequest=null,i(t),o.saveEventData(),o.processRequests(r)}))},J.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Y,Q,$,tt,et=((tt=J)&&(pt.__proto__=tt),((pt.prototype=Object.create(tt&&tt.prototype)).constructor=pt).prototype.postMapLoadEvent=function(t,e,i,r){this.skuToken=i,(R.EVENTS_URL&&r||R.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return q(t)||G(t)}))&&this.queueRequest({id:e,timestamp:Date.now()},r)},pt.prototype.processRequests=function(t){var e,i,r=this;this.pendingRequest||0===this.queue.length||(i=this.queue.shift(),e=i.id,i=i.timestamp,e&&this.success[e]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=h()),this.postEvent(i,{skuToken:this.skuToken},function(t){t||e&&(r.success[e]=!0)},t)))},pt),it=(($=J)&&(ct.__proto__=$),((ct.prototype=Object.create($&&$.prototype)).constructor=ct).prototype.postTurnstileEvent=function(t,e){R.EVENTS_URL&&R.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return q(t)||G(t)})&&this.queueRequest(Date.now(),e)},ct.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var i=H(R.ACCESS_TOKEN),r=i?i.u:R.ACCESS_TOKEN,n=r!==this.eventData.tokenU;d(this.anonId)||(this.anonId=h(),n=!0);var o,a,s=this.queue.shift();if(!(n=!this.eventData.lastSuccess||(o=new Date(this.eventData.lastSuccess),a=new Date(s),i=(s-this.eventData.lastSuccess)/864e5,n||1<=i||i<-1||o.getDate()!==a.getDate())))return this.processRequests();this.postEvent(s,{"enabled.telemetry":!1},function(t){t||(e.eventData.lastSuccess=s,e.eventData.tokenU=r)},t)}},new ct),rt=it.postTurnstileEvent.bind(it),nt=new et,ot=nt.postMapLoadEvent.bind(nt),at=500,ut=50;function ct(t){$.call(this,"appUserTurnstile"),this._customAccessToken=t}function pt(){tt.call(this,"map.load"),this.success={},this.skuToken=""}function ht(){f.caches&&!Y&&(Y=f.caches.open("mapbox-tiles"))}function ft(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var dt,mt=1/0;function yt(){return null==dt&&(dt=f.OffscreenCanvas&&new f.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof f.createImageBitmap),dt}var _t={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(_t);var gt,vt=((gt=Error)&&(bt.__proto__=gt),((bt.prototype=Object.create(gt&&gt.prototype)).constructor=bt).prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},bt),xt=S()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===f.location.protocol?f.parent:f).location.href};function bt(t,e,i){401===e&&G(i)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),gt.call(this,t),this.status=e,this.url=i,this.name=this.constructor.name,this.message=t}function wt(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(xt())&&!/^\w+:/.test(i))){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return function(n,u){var t=new f.AbortController,c=new f.Request(n.url,{method:n.method||"GET",body:n.body,credentials:n.credentials,headers:n.headers,referrer:xt(),signal:t.signal}),p=!1,h=!1,o=0<(e=c.url).indexOf("sku=")&&G(e);"json"===n.type&&c.headers.set("Accept","application/json");var e=function(t,e,i){if(!h){if(t&&"SecurityError"!==t.message&&lt(t),e&&i)return a(e);var r=Date.now();f.fetch(c).then(function(t){if(t.ok){var e=o?t.clone():null;return a(t,e,r)}return u(new vt(t.statusText,t.status,n.url))}).catch(function(t){20!==t.code&&u(new Error(t.message))})}},a=function(a,s,l){("arrayBuffer"===n.type?a.arrayBuffer():"json"===n.type?a.json():a.text()).then(function(t){var i,e,r,n,o;h||(s&&l&&(i=c,e=s,r=l,ht(),Y&&(n={status:e.status,statusText:e.statusText,headers:new f.Headers}
1,e.headers.forEach(function(t,e){return n.headers.set(e,t)}),(o=T(e.headers.get("Cache-Control")||""))["no-store"]||(o["max-age"]&&n.headers.set("Expires",new Date(r+1e3*o["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<42e4||function(t,e){if(void 0===Q)try{new Response(new ReadableStream),Q=!0}catch(t){Q=!1}Q?e(t.body):t.blob().then(e)}(e,function(t){var e=new f.Response(t,n);ht(),Y&&Y.then(function(t){return t.put(ft(i.url),e)}).catch(function(t){return lt(t.message)})})))),p=!0,u(null,t,a.headers.get("Cache-Control"),a.headers.get("Expires")))}).catch(function(t){h||u(new Error(t.message))})};return o?function(t,r){if(ht(),!Y)return r(null);var n=ft(t.url);Y.then(function(i){i.match(n).then(function(t){var e=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),t=T(t.headers.get("Cache-Control")||"");return e>Date.now()&&!t["no-cache"]}(t);i.delete(n),e&&i.put(n,t.clone()),r(null,t,e)}).catch(r)}).catch(r)}(c,e):e(null,null),{cancel:function(){h=!0,p||t.abort()}}}(t,e);if(S()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(e,i){var t,r=new f.XMLHttpRequest;for(t in r.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(r.responseType="arraybuffer"),e.headers)r.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===e.credentials,r.onerror=function(){i(new Error(r.statusText))},r.onload=function(){if((200<=r.status&&r.status<300||0===r.status)&&null!==r.response){var t=r.response;if("json"===e.type)try{t=JSON.parse(r.response)}catch(t){return i(t)}i(null,t,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else i(new vt(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}(t,e)}function St(t,e){return wt(v(t,{type:"arrayBuffer"}),e)}var Tt=function(t,e){return wt(v(t,{method:"POST"}),e)},It="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",Et=[],At=0,zt=function(t,o){if(F.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),At>=R.MAX_PARALLEL_IMAGE_REQUESTS){var e={requestParameters:t,callback:o,cancelled:!1,cancel:function(){this.cancelled=!0}};return Et.push(e),e}At++;function a(){if(!i)for(i=!0,At--;Et.length&&At<R.MAX_PARALLEL_IMAGE_REQUESTS;){var t=Et.shift();t.cancelled||(t.cancel=zt(t.requestParameters,t.callback).cancel)}}var i=!1,r=St(t,function(t,e,i,r){var n;a(),t?o(t):e&&(yt()?(n=o,t=new f.Blob([new Uint8Array(e)],{type:"image/png"}),f.createImageBitmap(t).then(function(t){n(null,t)}).catch(function(t){n(new Error("Could not load image because of "+t.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})):function(t,e,i,r){var n=new f.Image,o=f.URL;n.onload=function(){e(null,n),o.revokeObjectURL(n.src),n.onload=null,f.requestAnimationFrame(function(){n.src=It})},n.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var a=new f.Blob([new Uint8Array(t)],{type:"image/png"});n.cacheControl=i,n.expires=r,n.src=t.byteLength?o.createObjectURL(a):It}(e,o,i,r))});return{cancel:function(){r.cancel(),a()}}};function Pt(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function Ct(t,e,i){i&&i[t]&&(-1!==(e=i[t].indexOf(e))&&i[t].splice(e,1))}function kt(t,e){void 0===e&&(e={}),v(this,e),this.type=t}function Mt(){}var Dt,Lt=((Dt=kt)&&(Bt.__proto__=Dt),(Bt.prototype=Object.create(Dt&&Dt.prototype)).constructor=Bt);function Bt(t,e){void 0===e&&(e={}),Dt.call(this,"error",v({error:t},e))}Mt.prototype.on=function(t,e){return this._listeners=this._listeners||{},Pt(t,e,this._listeners),this},Mt.prototype.off=function(t,e){return Ct(t,e,this._listeners),Ct(t,e,this._oneTimeListeners),this},Mt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},Pt(t,e,this._oneTimeListeners),this},Mt.prototype.fire=function(t,e){"string"==typeof t&&(t=new kt(t,e||{}));var i=t.type;if(this.listens(i)){for(var r=0,n=(t.target=this)._listeners&&this._listeners[i]?this._listeners[i].slice():[];r<n.length;r+=1)n[r].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[i]?this._oneTimeListeners[i].slice():[];o<a.length;o+=1){var s=a[o];Ct(i,s,this._oneTimeListeners),s.call(this,t)}e=this._eventedParent;e&&(v(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),e.fire(t))}else t instanceof Lt&&console.error(t.error);return this},Mt.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&0<this._listeners[t].length||this._oneTimeListeners&&this._oneTimeListeners[t]&&0<this._oneTimeListeners[t].length||this._eventedParent&&this._eventedParent.listens(t)};var Rt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"}
vendor: 963 bytes, line 1
1,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:!(Mt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this})
vendor: 17,984 bytes, line 1
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: 12,314 bytes, line 1
1,Ft=function(t,e,i,r){this.message=(t?t+": ":"")+i,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)};function Ot(t){var e=t.value;return e?[new Ft(t.key,e,"constants have been deprecated as of v8")]:[]}function Ut(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];for(var r=0,n=e;r<n.length;r+=1){var o,a=n[r];for(o in a)t[o]=a[o]}return t}function Vt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Nt(t){if(Array.isArray(t))return t.map(Nt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e,i={};for(e in t)i[e]=Nt(t[e]);return i}return Vt(t)}function jt(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var i=0,r=e;i<r.length;i+=1){var n=r[i];this.bindings[n[0]]=n[1]}}var qt,Zt=((qt=Error)&&(Gt.__proto__=qt),(Gt.prototype=Object.create(qt&&qt.prototype)).constructor=Gt);function Gt(t,e){qt.call(this,e),this.message=e,this.key=t}jt.prototype.concat=function(t){return new jt(this,t)},jt.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},jt.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Xt={kind:"null"},Wt={kind:"number"},Kt={kind:"string"},Ht={kind:"boolean"},Jt={kind:"color"},Yt={kind:"object"},Qt={kind:"value"},$t={kind:"collator"},te={kind:"formatted"},ee={kind:"resolvedImage"};function ie(t,e){return{kind:"array",itemType:t,N:e}}function re(t){if("array"!==t.kind)return t.kind;var e=re(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}var ne=[Xt,Wt,Kt,Ht,Jt,te,Yt,ie(Qt),ee];function oe(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!oe(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var i=0,r=ne;i<r.length;i+=1)if(!oe(r[i],e))return null}return"Expected "+re(t)+" but found "+re(e)+" instead."}function ae(e,t){return t.some(function(t){return t.kind===e.kind})}function se(e,t){return t.some(function(t){return"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e})}var le=e(function(t,e){var n={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 o(t){return(t=Math.round(t))<0?0:255<t?255:t}function a(t){return o("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function s(t){return(t="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:1<t?1:t}function l(t,e,i){return i<0?i+=1:1<i&&--i,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.parseCSSColor=function(t){var e=t.replace(/ /g,"").toLowerCase();if(e in n)return n[e].slice();if("#"===e[0])return 4===e.length?0<=(r=parseInt(e.substr(1),16))&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null:7===e.length&&0<=(r=parseInt(e.substr(1),16))&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null;var i=e.indexOf("("),t=e.indexOf(")");if(-1!==i&&t+1===e.length){var r=e.substr(0,i),e=e.substr(i+1,t-(i+1)).split(","),t=1;switch(r){case"rgba":if(4!==e.length)return null;t=s(e.pop());case"rgb":return 3!==e.length?null:[a(e[0]),a(e[1]),a(e[2]),t];case"hsla":if(4!==e.length)return null;t=s(e.pop());case"hsl":if(3!==e.length)return null;i=(parseFloat(e[0])%360+360)%360/360,r=s(e[1]),e=s(e[2]),r=e<=.5?e*(r+1):e+r-e*r,e=2*e-r;return[o(255*l(e,r,i+1/3)),o(255*l(e,r,i)),o(255*l(e,r,i-1/3)),t];default:return null}}return null}}catch(t){}}).parseCSSColor,ue=function(t,e,i,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=i,this.a=r};ue.parse=function(t){if(t){if(t instanceof ue)return t;if("string"==typeof t){t=le(t);if(t)return new ue(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},ue.prototype.toString=function(){var t=this.toArray(),e=t[1],i=t[2],r=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(i)+","+r+")"},ue.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},ue.black=new ue(0,0,0,1),ue.white=new ue(1,1,1,1),ue.transparent=new ue(0,0,0,0),ue.red=new ue(1,0,0,1);var ce=function(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale||[],{sensitivity:this.sensitivity,usage:"search"})};ce.prototype.compare=function(t,e){return this.collator.compare(t,e)},ce.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale||[]).resolvedOptions().locale};function pe(t,e,i,r,n){this.text=t,this.image=e,this.scale=i,this.fontStack=r,this.textColor=n}var he=function(t){this.sections=t};he.fromString=function(t){return new he([new pe(t,null,null,null,null)])},he.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length})},he.factory=function(t){return t instanceof he?t:he.fromString(t)},he.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(t){return t.text}).join("")},he.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var r,n=i[e];n.image?t.push(["image",n.image.name]):(t.push(n.text),r={},n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(r))}return t};var fe=function(t){this.name=t.name,this.available=t.available};function de(t,e,i,r){return"number"==typeof t&&0<=t&&t<=255&&"number"==typeof e&&0<=e&&e<=255&&"number"==typeof i&&0<=i&&i<=255?void 0===r||"number"==typeof r&&0<=r&&r<=1?null:"Invalid rgba value ["+[t,e,i,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,i,r]:[t,e,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function me(t){if(null===t)return 1;if("string"==typeof t)return 1;if("boolean"==typeof t)return 1;if("number"==typeof t)return 1;if(t instanceof ue)return 1;if(t instanceof ce)return 1;if(t instanceof he)return 1;if(t instanceof fe)return 1;if(Array.isArray(t)){for(var e=0,i=t;e<i.length;e+=1)if(!me(i[e]))return;return 1}if("object"==typeof t){for(var r in t)if(!me(t[r]))return;return 1}}function ye(t){if(null===t)return Xt;if("string"==typeof t)return Kt;if("boolean"==typeof t)return Ht;if("number"==typeof t)return Wt;if(t instanceof ue)return Jt;if(t instanceof ce)return $t;if(t instanceof he)return te;if(t instanceof fe)return ee;if(Array.isArray(t)){for(var e,i=t.length,r=0,n=t;r<n.length;r+=1){var o=ye(n[r]);if(e){if(e===o)continue;e=Qt;break}e=o}return ie(e||Qt,i)}return Yt}function _e(t){var e=typeof t;return null===t?"":"string"==e||"number"==e||"boolean"==e?String(t):t instanceof ue||t instanceof he||t instanceof fe?t.toString():JSON.stringify(t)}fe.prototype.toString=function(){return this.name},fe.fromString=function(t){return t?new fe({name:t,available:!1}):null},fe.prototype.serialize=function(){return["image",this.name]};function ge(t,e){this.type=t,this.value=e}ge.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!me(t[1]))return e.error("invalid value");var i=t[1],t=ye(i),e=e.expectedType;return"array"!==t.kind||0!==t.N||!e||"array"!==e.kind||"number"==typeof e.N&&0!==e.N||(t=e),new ge(t,i)},ge.prototype.evaluate=function(){return this.value},ge.prototype.eachChild=function(){},ge.prototype.outputDefined=function(){return!0},ge.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ue?["rgba"].concat(this.value.toArray()):this.value instanceof he?this.value.serialize():this.value};var ve=function(t){this.name="ExpressionEvaluationError",this.message=t};ve.prototype.toJSON=function(){return this.message};function xe(t,e){this.type=t,this.args=e}var be={string:Kt,number:Wt,boolean:Ht,object:Yt};xe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i,r=1,n=t[0];if("array"===n){if(2<t.length){var o=t[1];if("string"!=typeof o||!(o in be)||"object"===o)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=be[o],r++}else o=Qt;if(3<t.length){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);i=t[2],r++}i=ie(o,i)}else i=be[n];for(var a=[];r<t.length;r++){var s=e.parse(t[r],r,Qt);
1if(!s)return null;a.push(s)}return new xe(i,a)},xe.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var i=this.args[e].evaluate(t);if(!oe(this.type,ye(i)))return i;if(e===this.args.length-1)throw new ve("Expected value to be of type "+re(this.type)+", but found "+re(ye(i))+" instead.")}return null},xe.prototype.eachChild=function(t){this.args.forEach(t)},xe.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},xe.prototype.serialize=function(){var t,e=this.type,i=[e.kind];return"array"===e.kind&&("string"!==(t=e.itemType).kind&&"number"!==t.kind&&"boolean"!==t.kind||(i.push(t.kind),("number"==typeof(e=e.N)||1<this.args.length)&&i.push(e))),i.concat(this.args.map(function(t){return t.serialize()}))};function we(t){this.type=te,this.sections=t}we.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");for(var r=[],n=!1,o=1;o<=t.length-1;++o){var a=t[o];if(n&&"object"==typeof a&&!Array.isArray(a)){n=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Wt)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,ie(Kt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Jt)))return null;var c=r[r.length-1];c.scale=s,c.font=l,c.textColor=u}else{c=e.parse(t[o],1,Qt);if(!c)return null;u=c.type.kind;if("string"!==u&&"value"!==u&&"null"!==u&&"resolvedImage"!==u)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new we(r)},we.prototype.evaluate=function(i){return new he(this.sections.map(function(t){var e=t.content.evaluate(i);return ye(e)===ee?new pe("",e,null,null,null):new pe(_e(e),null,t.scale?t.scale.evaluate(i):null,t.font?t.font.evaluate(i).join(","):null,t.textColor?t.textColor.evaluate(i):null)}))},we.prototype.eachChild=function(t){for(var e=0,i=this.sections;e<i.length;e+=1){var r=i[e];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},we.prototype.outputDefined=function(){return!1},we.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var r=i[e];t.push(r.content.serialize());var n={};r.scale&&(n["font-scale"]=r.scale.serialize()),r.font&&(n["text-font"]=r.font.serialize()),r.textColor&&(n["text-color"]=r.textColor.serialize()),t.push(n)}return t};function Se(t){this.type=ee,this.input=t}Se.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");t=e.parse(t[1],1,Kt);return t?new Se(t):e.error("No image name provided.")},Se.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=fe.fromString(e);return i&&t.availableImages&&(i.available=-1<t.availableImages.indexOf(e)),i},Se.prototype.eachChild=function(t){t(this.input)},Se.prototype.outputDefined=function(){return!1},Se.prototype.serialize=function(){return["image",this.input.serialize()]};function Te(t,e){this.type=t,this.args=e}var Ie={"to-boolean":Ht,"to-color":Jt,"to-number":Wt,"to-string":Kt};Te.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");for(var i=Ie[i],r=[],n=1;n<t.length;n++){var o=e.parse(t[n],n,Qt);if(!o)return null;r.push(o)}return new Te(i,r)},Te.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,i,r=0,n=this.args;r<n.length;r+=1){if(i=null,(e=n[r].evaluate(t))instanceof ue)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(i=e.length<3||4<e.length?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":de(e[0],e[1],e[2],e[3])))return new ue(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ve(i||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"!==this.type.kind)return"formatted"===this.type.kind?he.fromString(_e(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?fe.fromString(_e(this.args[0].evaluate(t))):_e(this.args[0].evaluate(t));for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(t)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new ve("Could not convert "+JSON.stringify(a)+" to number.")}
1,Te.prototype.eachChild=function(t){this.args.forEach(t)},Te.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Te.prototype.serialize=function(){if("formatted"===this.type.kind)return new we([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Se(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild(function(t){e.push(t.serialize())}),e};function Ee(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}var Ae=["Unknown","Point","LineString","Polygon"];Ee.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ee.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Ae[this.feature.type]:this.feature.type:null},Ee.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ee.prototype.canonicalID=function(){return this.canonical},Ee.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ee.prototype.parseColor=function(t){return this._parseColorCache[t]||(this._parseColorCache[t]=ue.parse(t))};var ze=function(t,e,i,r){this.name=t,this.type=e,this._evaluate=i,this.args=r};ze.prototype.evaluate=function(t){return this._evaluate(t,this.args)},ze.prototype.eachChild=function(t){this.args.forEach(t)},ze.prototype.outputDefined=function(){return!1},ze.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},ze.parse=function(e,t){var i=e[0],r=ze.definitions[i];if(!r)return t.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var n=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter(function(t){t=t[0];return!Array.isArray(t)||t.length===e.length-1}),s=null,l=0,u=a;l<u.length;l+=1){for(var c=u[l],p=c[0],c=c[1],s=new Ge(t.registry,t.path,null,t.scope),h=[],f=!1,d=1;d<e.length;d++){var m=e[d],y=Array.isArray(p)?p[d-1]:p.type,y=s.parse(m,1+h.length,y);if(!y){f=!0;break}h.push(y)}if(!f)if(Array.isArray(p)&&p.length!==h.length)s.error("Expected "+p.length+" arguments, but found "+h.length+" instead.");else{for(var _=0;_<h.length;_++){var g=Array.isArray(p)?p[_]:p.type,v=h[_];s.concat(_+1).checkSubtype(g,v.type)}if(0===s.errors.length)return new ze(i,n,c,h)}}if(1===a.length)(r=t.errors).push.apply(r,s.errors);else{for(var o=(a.length?a:o).map(function(t){t=t[0];return Array.isArray(t)?"("+t.map(re).join(", ")+")":"("+re(t.type)+"...)"}).join(" | "),x=[],b=1;b<e.length;b++){var w=t.parse(e[b],1+x.length);if(!w)return null;x.push(re(w.type))}t.error("Expected arguments of type "+o+", but found ("+x.join(", ")+") instead.")}return null},ze.register=function(t,e){for(var i in ze.definitions=e)t[i]=ze};function Pe(t,e,i){this.type=$t,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}function Ce(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ke(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Me(t,e){for(var i,r,n,o,a=!1,s=0,l=e.length;s<l;s++)for(var u=e[s],c=0,p=u.length;c<p-1;c++){if((i=t[0]-(n=u[c])[0])*(o=t[1]-(r=u[c+1])[1])-(r=t[0]-r[0])*(n=t[1]-n[1])==0&&i*r<=0&&n*o<=0)return;r=t,n=u[c],o=u[c+1],n[1]>r[1]!=o[1]>r[1]&&r[0]<(o[0]-n[0])*(r[1]-n[1])/(o[1]-n[1])+n[0]&&(a=!a)}return a}function De(t,e,i,r){var n=r[0]-i[0],r=r[1]-i[1],t=(t[0]-i[0])*r-n*(t[1]-i[1]),i=(e[0]-i[0])*r-n*(e[1]-i[1]);return 0<t&&i<0||t<0&&0<i}function Le(t,e){for(var i=0;i<t.length;++i)if(!Me(t[i],e))return;for(var r=0;r<t.length-1;++r)if(function(t,e,i){for(var r,n,o,a,s=0,l=i;s<l.length;s+=1)for(var u=l[s],c=0;c<u.length-1;++c)if(0!=(o=[(n=u[c+1])[0]-(r=u[c])[0],n[1]-r[1]])[0]*(a=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*a[0]&&De(t,e,r,n)&&De(r,n,t,e))return 1}(t[r],t[r+1],e))return;return 1}function Be(t,e,i){for(var r,n,o=[],a=0;a<t.length;a++){for(var s=[],l=0;l<t[a].length;l++){var u=(r=t[a][l],u=i,n=void 0,n=(180+r[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,u=Math.pow(2,u.z),[Math.round(n*u*8192),Math.round(r*u*8192)]);Ce(e,u),s.push(u)}o.push(s)}return o}function Re(t,e,i){for(var r=[],n=0;n<t.length;n++){var o=Be(t[n],e,i);r.push(o)}return r}function Fe(t,e,i,r){var n,o;(t[0]<i[0]||t[0]>i[2])&&(n=.5*r,0===(o=t[0]-i[0]>n?-r:i[0]-t[0]>n?r:0)&&(o=t[0]-i[2]>n?-r:i[2]-t[0]>n?r:0),t[0]+=o),Ce(e,t)}function Oe(t,e,i,r){for(var n=8192*Math.pow(2,r.z),o=[8192*r.x,8192*r.y],a=[],s=0,l=t;s<l.length;s+=1)for(var u=0,c=l[s];u<c.length;u+=1){var p=c[u],p=[p.x+o[0],p.y+o[1]];Fe(p,e,i,n),a.push(p)}return a}function Ue(t,e,i,r){for(var n=8192*Math.pow(2,r.z),o=[8192*r.x,8192*r.y],a=[],s=0,l=t;s<l.length;s+=1){for(var u=[],c=0,p=l[s];c<p.length;c+=1){var h=p[c],h=[h.x+o[0],h.y+o[1]];Ce(e,h),u.push(h)}a.push(u)}if(e[2]-e[0]<=n/2){(t=e)[0]=t[1]=1/0,t[2]=t[3]=-1/0;for(var f=0,d=a;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1)Fe(y[m],e,i,n)}return a}Pe.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var i=t[1];if("object"!=typeof i||Array.isArray(i))return e.error("Collator options argument must be an object.");var r=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,Ht);if(!r)return null;var n=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,Ht);if(!n)return null;t=null;
vendor: 8,342 bytes, line 1
1return i.locale&&!(t=e.parse(i.locale,1,Kt))?null:new Pe(r,n,t)},Pe.prototype.evaluate=function(t){return new ce(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Pe.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Pe.prototype.outputDefined=function(){return!1},Pe.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Ve=function(t,e){this.type=Ht,this.geojson=t,this.geometries=e};function Ne(t){if(t instanceof ze){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Ve)return!1;var e=!0;return t.eachChild(function(t){e&&!Ne(t)&&(e=!1)}),e}function je(t){if(!(t instanceof ze&&"feature-state"===t.name)){var e=!0;return t.eachChild(function(t){e&&!je(t)&&(e=!1)}),e}}function qe(t,e){if(t instanceof ze&&0<=e.indexOf(t.name))return!1;var i=!0;return t.eachChild(function(t){i&&!qe(t,e)&&(i=!1)}),i}Ve.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(me(t[1])){var i=t[1];if("FeatureCollection"===i.type)for(var r=0;r<i.features.length;++r){var n=i.features[r].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new Ve(i,i.features[r].geometry)}else if("Feature"===i.type){t=i.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new Ve(i,i.geometry)}else if("Polygon"===i.type||"MultiPolygon"===i.type)return new Ve(i,i)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Ve.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=Be(e.coordinates,r,n),a=Oe(t.geometry(),i,r,n);if(!ke(i,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Me(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Re(e.coordinates,r,n),n=Oe(t.geometry(),i,r,n);if(!ke(i,r))return!1;for(var c=0,p=n;c<p.length;c+=1)if(!function(t,e){for(var i=0;i<e.length;i++)if(Me(t,e[i]))return 1}(p[c],u))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=Be(e.coordinates,r,n),a=Ue(t.geometry(),i,r,n);if(!ke(i,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Le(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Re(e.coordinates,r,n),n=Ue(t.geometry(),i,r,n);if(!ke(i,r))return!1;for(var c=0,p=n;c<p.length;c+=1)if(!function(t,e){for(var i=0;i<e.length;i++)if(Le(t,e[i]))return 1}(p[c],u))return!1}return!0}(t,this.geometries)}return!1},Ve.prototype.eachChild=function(){},Ve.prototype.outputDefined=function(){return!0},Ve.prototype.serialize=function(){return["within",this.geojson]};function Ze(t,e){this.type=e.type,this.name=t,this.boundExpression=e}Ze.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");t=t[1];return e.scope.has(t)?new Ze(t,e.scope.get(t)):e.error('Unknown variable "'+t+'". Make sure "'+t+'" has been bound in an enclosing "let" expression before using it.',1)},Ze.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Ze.prototype.eachChild=function(){},Ze.prototype.outputDefined=function(){return!1},Ze.prototype.serialize=function(){return["var",this.name]};var Ge=function(t,e,i,r,n){void 0===e&&(e=[]),void 0===r&&(r=new jt),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=r,this.errors=n,this.expectedType=i};function Xe(t,e){for(var i,r,n=t.length-1,o=0,a=n;o<=a;)if((i=t[r=Math.floor((o+a)/2)])<=e){if(r===n||e<t[r+1])return r;o=r+1}else{if(!(e<i))throw new ve("Input is not a number.");a=r-1}return 0}Ge.prototype.parse=function(t,e,i,r,n){return void 0===n&&(n={}),(e?this.concat(e,i,r):this)._parse(t,n)},Ge.prototype._parse=function(t,e){function i(t,e,i){return"assert"===i?new xe(e,[t]):"coerce"===i?new Te(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[r];if(n){var o=n.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,n=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==n.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(a,n))return null}else o=i(o,a,e.typeAnnotation||"coerce");else o=i(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ge)&&"resolvedImage"!==o.type.kind&&function e(t){if(t instanceof Ze)return e(t.boundExpression);if(t instanceof ze&&"error"===t.name)return!1;if(t instanceof Pe)return!1;if(t instanceof Ve)return!1;var i=t instanceof Te||t instanceof xe,r=!0;return t.eachChild(function(t){r=i?r&&e(t):r&&t instanceof ge}),!!r&&Ne(t)&&qe(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var s=new Ee;try{o=new ge(o.type,o.evaluate(s))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},Ge.prototype.concat=function(t,e,i){t="number"==typeof t?this.path.concat(t):this.path,i=i?this.scope.concat(i):this.scope;return new Ge(this.registry,t,e||null,i,this.errors)},Ge.prototype.error=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var r=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new Zt(r,t))},Ge.prototype.checkSubtype=function(t,e){e=oe(t,e);return e&&this.error(e),e};var We=function(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,n=i;r<n.length;r+=1){var o=n[r],a=o[1];this.labels.push(o[0]),this.outputs.push(a)}};function Ke(t,e,i){return t*(1-i)+e*i}We.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var i=e.parse(t[1],1,Wt);if(!i)return null;var r=[],n=null;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],l=o,u=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(r.length&&r[r.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);u=e.parse(s,u,n);if(!u)return null;n=n||u.type,r.push([a,u])}return new We(n,i,r)},We.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);var n=e.length;return(r>=e[n-1]?i[n-1]:i[Xe(e,r)]).evaluate(t)},We.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},We.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},We.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)0<e&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var He=Object.freeze({__proto__:null,number:Ke,color:function(t,e,
1i){return new ue(Ke(t.r,e.r,i),Ke(t.g,e.g,i),Ke(t.b,e.b,i),Ke(t.a,e.a,i))},array:function(t,i,r){return t.map(function(t,e){return Ke(t,i[e],r)})}}),Je=6/29*3*(6/29),Ye=Math.PI/180,Qe=180/Math.PI;function $e(t){return.008856451679035631<t?Math.pow(t,1/3):t/Je+4/29}function ti(t){return 6/29<t?t*t*t:Je*(t-4/29)}function ei(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ii(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ri(t){var e=ii(t.r),i=ii(t.g),r=ii(t.b),n=$e((.4124564*e+.3575761*i+.1804375*r)/.95047),o=$e(.2126729*e+.7151522*i+.072175*r);return{l:116*o-16,a:500*(n-o),b:200*(o-$e((.0193339*e+.119192*i+.9503041*r)/1.08883)),alpha:t.a}}function ni(t){var e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200,e=+ti(e),i=.95047*ti(i),r=1.08883*ti(r);return new ue(ei(3.2404542*i-1.5371385*e-.4985314*r),ei(-.969266*i+1.8760108*e+.041556*r),ei(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}var oi={forward:ri,reverse:ni,interpolate:function(t,e,i){return{l:Ke(t.l,e.l,i),a:Ke(t.a,e.a,i),b:Ke(t.b,e.b,i),alpha:Ke(t.alpha,e.alpha,i)}}},ai={forward:function(t){var e=ri(t),i=e.l,r=e.a,n=e.b,e=Math.atan2(n,r)*Qe;return{h:e<0?360+e:e,c:Math.sqrt(r*r+n*n),l:i,alpha:t.a}},reverse:function(t){var e=t.h*Ye,i=t.c;return ni({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:(r=t.h,n=e.h,r+i*(180<(n-=r)||n<-180?n-360*Math.round(n/360):n)),c:Ke(t.c,e.c,i),l:Ke(t.l,e.l,i),alpha:Ke(t.alpha,e.alpha,i)};var r,n}},si=Object.freeze({__proto__:null,lab:oi,hcl:ai}),li=function(t,e,i,r,n){this.type=t,this.operator=e,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=n;o<a.length;o+=1){var s=a[o],l=s[1];this.labels.push(s[0]),this.outputs.push(l)}};function ui(t,e,i,r){r-=i,i=t-i;return 0==r?0:1===e?i/r:(Math.pow(e,i)-1)/(Math.pow(e,r)-1)}li.interpolationFactor=function(t,e,i,r){var n=0;return"exponential"===t.name?n=ui(e,t.base,i,r):"linear"===t.name?n=ui(e,1,i,r):"cubic-bezier"===t.name&&(t=t.controlPoints,n=new o(t[0],t[1],t[2],t[3]).solve(ui(e,1,i,r))),n},li.parse=function(t,e){var i=t[0],r=t[1],n=t[2],o=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var a=r[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else{if("cubic-bezier"!==r[0])return e.error("Unknown interpolation type "+String(r[0]),1,0);a=r.slice(1);if(4!==a.length||a.some(function(t){return"number"!=typeof t||t<0||1<t}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,Wt)))return null;var s=[],l=null;"interpolate-hcl"===i||"interpolate-lab"===i?l=Jt:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var u=0;u<o.length;u+=2){var c=o[u],p=o[u+1],h=u+3,f=u+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&&s[s.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);f=e.parse(p,f,l);if(!f)return null;l=l||f.type,s.push([c,f])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new li(l,i,r,n,s):e.error("Type "+re(l)+" is not interpolatable.")},li.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);var n=e.length;if(r>=e[n-1])return i[n-1].evaluate(t);n=Xe(e,r),r=li.interpolationFactor(this.interpolation,r,e[n],e[n+1]),e=i[n].evaluate(t),t=i[n+1].evaluate(t);return"interpolate"===this.operator?He[this.type.kind.toLowerCase()](e,t,r):"interpolate-hcl"===this.operator?ai.reverse(ai.interpolate(ai.forward(e),ai.forward(t),r)):oi.reverse(oi.interpolate(oi.forward(e),oi.forward(t),r))},li.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},li.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},li.prototype.serialize=function(){for(var t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints),e=[this.operator,t,this.input.serialize()],i=0;i<this.labels.length;i++)e.push(this.labels[i],this.outputs[i].serialize());return e};var ci=function(t,e){this.type=t,this.args=e};ci.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var i=null,r=e.expectedType;r&&"value"!==r.kind&&(i=r);for(var n=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=e.parse(a[o],1+n.length,i,void 0,{typeAnnotation:"omit"});if(!s)return null;i=i||s.type,n.push(s)}t=r&&n.some(function(t){return oe(r,t.type)});return new ci(t?Qt:i,n)},ci.prototype.evaluate=function(t){for(var e,i=null,r=0,n=0,o=this.args;n<o.length&&(r++,(i=o[n].evaluate(t))&&i instanceof fe&&!i.available&&(e=e||i.name,i=null,r===this.args.length&&(i=e)),null===i);n+=1);return i}
vendor: 11,396 bytes, line 1
1,ci.prototype.eachChild=function(t){this.args.forEach(t)},ci.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},ci.prototype.serialize=function(){var e=["coalesce"];return this.eachChild(function(t){e.push(t.serialize())}),e};var pi=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};pi.prototype.evaluate=function(t){return this.result.evaluate(t)},pi.prototype.eachChild=function(t){for(var e=0,i=this.bindings;e<i.length;e+=1)t(i[e][1]);t(this.result)},pi.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var i=[],r=1;r<t.length-1;r+=2){var n=t[r];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",r);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=e.parse(t[r+1],r+1);if(!o)return null;i.push([n,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,i);return a?new pi(i,a):null},pi.prototype.outputDefined=function(){return this.result.outputDefined()},pi.prototype.serialize=function(){for(var t=["let"],e=0,i=this.bindings;e<i.length;e+=1){var r=i[e];t.push(r[0],r[1].serialize())}return t.push(this.result.serialize()),t};function hi(t,e,i){this.type=t,this.index=e,this.input=i}hi.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,Wt),e=e.parse(t[2],2,ie(e.expectedType||Qt));return i&&e?new hi(e.type.itemType,i,e):null},hi.prototype.evaluate=function(t){var e=this.index.evaluate(t),t=this.input.evaluate(t);if(e<0)throw new ve("Array index out of bounds: "+e+" < 0.");if(e>=t.length)throw new ve("Array index out of bounds: "+e+" > "+(t.length-1)+".");if(e!==Math.floor(e))throw new ve("Array index must be an integer, but found "+e+" instead.");return t[e]},hi.prototype.eachChild=function(t){t(this.index),t(this.input)},hi.prototype.outputDefined=function(){return!1},hi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};function fi(t,e){this.type=Ht,this.needle=t,this.haystack=e}fi.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,Qt),t=e.parse(t[2],2,Qt);return i&&t?ae(i.type,[Ht,Kt,Wt,Xt,Qt])?new fi(i,t):e.error("Expected first argument to be of type boolean, string, number or null, but found "+re(i.type)+" instead"):null},fi.prototype.evaluate=function(t){var e=this.needle.evaluate(t),t=this.haystack.evaluate(t);if(!t)return!1;if(!se(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+re(ye(e))+" instead.");if(!se(t,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+re(ye(t))+" instead.");return 0<=t.indexOf(e)},fi.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};function di(t,e,i){this.type=Wt,this.needle=t,this.haystack=e,this.fromIndex=i}di.parse=function(t,e){if(t.length<=2||5<=t.length)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,Qt),r=e.parse(t[2],2,Qt);if(!i||!r)return null;if(!ae(i.type,[Ht,Kt,Wt,Xt,Qt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+re(i.type)+" instead");if(4!==t.length)return new di(i,r);t=e.parse(t[3],3,Wt);return t?new di(i,r,t):null},di.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!se(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+re(ye(e))+" instead.");if(!se(i,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+re(ye(i))+" instead.");if(this.fromIndex){t=this.fromIndex.evaluate(t);return i.indexOf(e,t)}return i.indexOf(e)},di.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},di.prototype.outputDefined=function(){return!1},di.prototype.serialize=function(){if(null==this.fromIndex||void 0===this.fromIndex)return["index-of",this.needle.serialize(),this.haystack.serialize()];var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]};function mi(t,e,i,r,n,o){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=n,this.otherwise=o}mi.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var i,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],l=t[a+1];Array.isArray(s)||(s=[s]);var u=e.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var h=p[c];if("number"!=typeof h&&"string"!=typeof h)return u.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,ye(h)))return null}else i=ye(h);if(void 0!==n[String(h)])return u.error("Branch labels must be unique.");n[String(h)]=o.length}l=e.parse(l,a,r);if(!l)return null;r=r||l.type,o.push(l)}var f=e.parse(t[1],1,Qt);if(!f)return null;var d=e.parse(t[t.length-1],t.length-1,r);return!d||"value"!==f.type.kind&&e.concat(1).checkSubtype(i,f.type)?null:new mi(i,r,f,n,o,d)},mi.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ye(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},mi.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},mi.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},mi.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],r={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var a=o[n];void 0===(p=r[this.cases[a]])?(r[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[p][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],p=c[0],c=c[1];t.push(1===c.length?s(c[0]):c.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};function yi(t,e,i){this.type=t,this.branches=e,this.otherwise=i}yi.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var r=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,Ht);if(!o)return null;var a=e.parse(t[n+1],n+1,i);if(!a)return null;r.push([o,a]),i=i||a.type}var s=e.parse(t[t.length-1],t.length-1,i);return s?new yi(i,r,s):null},yi.prototype.evaluate=function(t){for(var e=0,i=this.branches;e<i.length;e+=1){var r=i[e],n=r[1];if(r[0].evaluate(t))return n.evaluate(t)}return this.otherwise.evaluate(t)},yi.prototype.eachChild=function(t){for(var e=0,i=this.branches;e<i.length;e+=1){var r=i[e],n=r[1];t(r[0]),t(n)}t(this.otherwise)},yi.prototype.outputDefined=function(){return this.branches.every(function(t){return t[1].outputDefined()})&&this.otherwise.outputDefined()},yi.prototype.serialize=function(){var e=["case"];return this.eachChild(function(t){e.push(t.serialize())}),e};function _i(t,e,i,r){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=r}function gi(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function vi(t,e,i,r){return 0===r.compare(e,i)}function xi(o,a,s){var l="=="!==o&&"!="!==o;return u.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var i=t[0],r=e.parse(t[1],1,Qt);if(!r)return null;if(!gi(i,r.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+re(r.type)+"'.");var n=e.parse(t[2],2,Qt);if(!n)return null;if(!gi(i,n.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+re(n.type)+"'.");if(r.type.kind!==n.type.kind&&"value"!==r.type.kind&&"value"!==n.type.kind)return e.error("Cannot compare types '"+re(r.type)+"' and '"+re(n.type)+"'.");l&&("value"===r.type.kind&&"value"!==n.type.kind?r=new xe(n.type,[r]):"value"!==r.type.kind&&"value"===n.type.kind&&(n=new xe(r.type,[n])));i=null;if(4===t.length){if("string"!==r.type.kind&&"string"!==n.type.kind&&"value"!==r.type.kind&&"value"!==n.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(i=e.parse(t[3],3,$t)))return null}return new u(r,n,i)},u.prototype.evaluate=function(t){var e=this.lhs.evaluate(t),i=this.rhs.evaluate(t);if(l&&this.hasUntypedArgument){var r=ye(e),n=ye(i);if(r.kind!==n.kind||"string"!==r.kind&&"number"!==r.kind)throw new ve('Expected arguments for "'+o+'" to be (string, string) or (number, number), but found ('+r.kind+", "+n.kind+") instead.")}if(this.collator&&!l&&this.hasUntypedArgument){r=ye(e),n=ye(i);if("string"!==r.kind||"string"!==n.kind)return a(t,e,i)}return this.collator?s(t,e,i,this.collator.evaluate(t)):a(t,e,i)},u.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},u.prototype.outputDefined=function(){return!0},u.prototype.serialize=function(){var e=[o];return this.eachChild(function(t){e.push(t.serialize())}),e},u;function u(t,e,i){this.type=Ht,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}}_i.parse=function(t,e){if(t.length<=2||5<=t.length)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,Qt),r=e.parse(t[2],2,Wt);if(!i||!r)return null;if(!ae(i.type,[ie(Qt),Kt,Qt]))return e.error("Expected first argument to be of type array or string, but found "+re(i.type)+" instead");if(4!==t.length)return new _i(i.type,i,r);t=e.parse(t[3],3,Wt);return t?new _i(i.type,i,r,t):null},_i.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!se(e,["string","array"]))throw new ve("Expected first argument to be of type array or string, but found "+re(ye(e))+" instead.");if(this.endIndex){t=this.endIndex.evaluate(t);return e.slice(i,t)}return e.slice(i)},_i.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},_i.prototype.outputDefined=function(){return!1},_i.prototype.serialize=function(){if(null==this.endIndex||void 0===this.endIndex)return["slice",this.input.serialize(),this.beginIndex.serialize()];var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]};function bi(t,e,i,r,n){this.type=Kt,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=n}
1var wi=xi("==",function(t,e,i){return e===i},vi),Si=xi("!=",function(t,e,i){return e!==i},function(t,e,i,r){return!vi(0,e,i,r)}),Ti=xi("<",function(t,e,i){return e<i},function(t,e,i,r){return r.compare(e,i)<0}),Ii=xi(">",function(t,e,i){return i<e},function(t,e,i,r){return 0<r.compare(e,i)}),Ei=xi("<=",function(t,e,i){return e<=i},function(t,e,i,r){return r.compare(e,i)<=0}),Ai=xi(">=",function(t,e,i){return i<=e},function(t,e,i,r){return 0<=r.compare(e,i)});bi.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,Wt);if(!i)return null;var r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var n=null;if(r.locale&&!(n=e.parse(r.locale,1,Kt)))return null;var o=null;if(r.currency&&!(o=e.parse(r.currency,1,Kt)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=e.parse(r["min-fraction-digits"],1,Wt)))return null;t=null;return r["max-fraction-digits"]&&!(t=e.parse(r["max-fraction-digits"],1,Wt))?null:new bi(i,n,o,a,t)},bi.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},bi.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},bi.prototype.outputDefined=function(){return!1},bi.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};function zi(t){this.type=Wt,this.input=t}zi.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");t=e.parse(t[1],1);return t?"array"!==t.type.kind&&"string"!==t.type.kind&&"value"!==t.type.kind?e.error("Expected argument of type string or array, but found "+re(t.type)+" instead."):new zi(t):null},zi.prototype.evaluate=function(t){t=this.input.evaluate(t);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new ve("Expected value to be of type string or array, but found "+re(ye(t))+" instead.")},zi.prototype.eachChild=function(t){t(this.input)},zi.prototype.outputDefined=function(){return!1},zi.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Pi={"==":wi,"!=":Si,">":Ii,"<":Ti,">=":Ai,"<=":Ei,array:xe,at:hi,boolean:xe,case:yi,coalesce:ci,collator:Pe,format:we,image:Se,in:fi,"index-of":di,interpolate:li,"interpolate-hcl":li,"interpolate-lab":li,length:zi,let:pi,literal:ge,match:mi,number:xe,"number-format":bi,object:xe,slice:_i,step:We,string:xe,"to-boolean":Te,"to-color":Te,"to-number":Te,"to-string":Te,var:Ze,within:Ve};function Ci(t,e){var i=e[0],r=e[1],n=e[2],e=e[3],i=i.evaluate(t),r=r.evaluate(t),n=n.evaluate(t),e=e?e.evaluate(t):1,t=de(i,r,n,e);if(t)throw new ve(t);return new ue(i/255*e,r/255*e,n/255*e,e)}function ki(t,e){t=e[t];return void 0===t?null:t}function Mi(t){return{type:t}}function Di(t){return{result:"success",value:t}}function Li(t){return{result:"error",value:t}}function Bi(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ri(t){return t.expression&&-1<t.expression.parameters.indexOf("zoom")}function Fi(t){return t.expression&&t.expression.interpolated}function Oi(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Ui(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Vi(t){return t}
vendor: 30,707 bytes, line 1
1function Ni(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function ji(t,e,i,r,n){return Ni(typeof i===n?r[i]:void 0,t.default,e.default)}function qi(t,e,i){if("number"!==Oi(i))return Ni(t.default,e.default);e=t.stops.length;if(1===e)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[e-1][0])return t.stops[e-1][1];i=Xe(t.stops.map(function(t){return t[0]}),i);return t.stops[i][1]}function Zi(t,e,i){var r=void 0!==t.base?t.base:1;if("number"!==Oi(i))return Ni(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[n-1][0])return t.stops[n-1][1];var o,a,s=Xe(t.stops.map(function(t){return t[0]}),i),l=(o=r,n=t.stops[s][0],r=t.stops[s+1][0]-n,n=i-n,0==r?0:1===o?n/r:(Math.pow(o,n)-1)/(Math.pow(o,r)-1)),u=t.stops[s][1],c=t.stops[s+1][1],p=He[e.type]||Vi;return t.colorSpace&&"rgb"!==t.colorSpace&&(a=si[t.colorSpace],p=function(t,e){return a.reverse(a.interpolate(a.forward(t),a.forward(e),l))}),"function"==typeof u.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=u.evaluate.apply(void 0,t),r=c.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==r)return p(i,r,l)}}:p(u,c,l)}function Gi(t,e,i){return"color"===e.type?i=ue.parse(i):"formatted"===e.type?i=he.fromString(i.toString()):"resolvedImage"===e.type?i=fe.fromString(i.toString()):Oi(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),Ni(i,t.default,e.default)}ze.register(Pi,{error:[{kind:"error"},[Kt],function(t,e){throw new ve(e[0].evaluate(t))}],typeof:[Kt,[Qt],function(t,e){return re(ye(e[0].evaluate(t)))}],"to-rgba":[ie(Wt,4),[Jt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Jt,[Wt,Wt,Wt],Ci],rgba:[Jt,[Wt,Wt,Wt,Wt],Ci],has:{type:Ht,overloads:[[[Kt],function(t,e){return e[0].evaluate(t)in t.properties()}],[[Kt,Yt],function(t,e){var i=e[1];return e[0].evaluate(t)in i.evaluate(t)}]]},get:{type:Qt,overloads:[[[Kt],function(t,e){return ki(e[0].evaluate(t),t.properties())}],[[Kt,Yt],function(t,e){var i=e[1];return ki(e[0].evaluate(t),i.evaluate(t))}]]},"feature-state":[Qt,[Kt],function(t,e){return ki(e[0].evaluate(t),t.featureState||{})}],properties:[Yt,[],function(t){return t.properties()}],"geometry-type":[Kt,[],function(t){return t.geometryType()}],id:[Qt,[],function(t){return t.id()}],zoom:[Wt,[],function(t){return t.globals.zoom}],"heatmap-density":[Wt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Wt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Qt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Wt,Mi(Wt),function(t,e){for(var i=0,r=0,n=e;r<n.length;r+=1)i+=n[r].evaluate(t);return i}],"*":[Wt,Mi(Wt),function(t,e){for(var i=1,r=0,n=e;r<n.length;r+=1)i*=n[r].evaluate(t);return i}],"-":{type:Wt,overloads:[[[Wt,Wt],function(t,e){var i=e[1];return e[0].evaluate(t)-i.evaluate(t)}],[[Wt],function(t,e){return-e[0].evaluate(t)}]]},"/":[Wt,[Wt,Wt],function(t,e){var i=e[1];return e[0].evaluate(t)/i.evaluate(t)}],"%":[Wt,[Wt,Wt],function(t,e){var i=e[1];return e[0].evaluate(t)%i.evaluate(t)}],ln2:[Wt,[],function(){return Math.LN2}],pi:[Wt,[],function(){return Math.PI}],e:[Wt,[],function(){return Math.E}],"^":[Wt,[Wt,Wt],function(t,e){var i=e[1];return Math.pow(e[0].evaluate(t),i.evaluate(t))}],sqrt:[Wt,[Wt],function(t,e){return Math.sqrt(e[0].evaluate(t))}],log10:[Wt,[Wt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN10}],ln:[Wt,[Wt],function(t,e){return Math.log(e[0].evaluate(t))}],log2:[Wt,[Wt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN2}],sin:[Wt,[Wt],function(t,e){return Math.sin(e[0].evaluate(t))}],cos:[Wt,[Wt],function(t,e){return Math.cos(e[0].evaluate(t))}],tan:[Wt,[Wt],function(t,e){return Math.tan(e[0].evaluate(t))}],asin:[Wt,[Wt],function(t,e){return Math.asin(e[0].evaluate(t))}],acos:[Wt,[Wt],function(t,e){return Math.acos(e[0].evaluate(t))}],atan:[Wt,[Wt],function(t,e){return Math.atan(e[0].evaluate(t))}],min:[Wt,Mi(Wt),function(e,t){return Math.min.apply(Math,t.map(function(t){return t.evaluate(e)}))}],max:[Wt,Mi(Wt),function(e,t){return Math.max.apply(Math,t.map(function(t){return t.evaluate(e)}))}],abs:[Wt,[Wt],function(t,e){return Math.abs(e[0].evaluate(t))}],round:[Wt,[Wt],function(t,e){t=e[0].evaluate(t);return t<0?-Math.round(-t):Math.round(t)}],floor:[Wt,[Wt],function(t,e){return Math.floor(e[0].evaluate(t))}],ceil:[Wt,[Wt],function(t,e){return Math.ceil(e[0].evaluate(t))}],"filter-==":[Ht,[Kt,Qt],function(t,e){var i=e[0],e=e[1];return t.properties()[i.value]===e.value}],"filter-id-==":[Ht,[Qt],function(t,e){e=e[0];return t.id()===e.value}],"filter-type-==":[Ht,[Kt],function(t,e){e=e[0];return t.geometryType()===e.value}],"filter-<":[Ht,[Kt,Qt],function(t,e){var i=e[0],e=e[1],i=t.properties()[i.value],e=e.value;return typeof i==typeof e&&i<e}],"filter-id-<":[Ht,[Qt],function(t,e){e=e[0],t=t.id(),e=e.value;return typeof t==typeof e&&t<e}],"filter->":[Ht,[Kt,Qt],function(t,e){var i=e[0],e=e[1],i=t.properties()[i.value],e=e.value;return typeof i==typeof e&&e<i}],"filter-id->":[Ht,[Qt],function(t,e){e=e[0],t=t.id(),e=e.value;return typeof t==typeof e&&e<t}],"filter-<=":[Ht,[Kt,Qt],function(t,e){var i=e[0],e=e[1],i=t.properties()[i.value],e=e.value;return typeof i==typeof e&&i<=e}],"filter-id-<=":[Ht,[Qt],function(t,e){e=e[0],t=t.id(),e=e.value;return typeof t==typeof e&&t<=e}],"filter->=":[Ht,[Kt,Qt],function(t,e){var i=e[0],e=e[1],i=t.properties()[i.value],e=e.value;return typeof i==typeof e&&e<=i}],"filter-id->=":[Ht,[Qt],function(t,e){e=e[0],t=t.id(),e=e.value;return typeof t==typeof e&&e<=t}],"filter-has":[Ht,[Qt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ht,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ht,[ie(Kt)],function(t,e){return 0<=e[0].value.indexOf(t.geometryType())}],"filter-id-in":[Ht,[ie(Qt)],function(t,e){return 0<=e[0].value.indexOf(t.id())}],"filter-in-small":[Ht,[Kt,ie(Qt)],function(t,e){var i=e[0];return 0<=e[1].value.indexOf(t.properties()[i.value])}],"filter-in-large":[Ht,[Kt,ie(Qt)],function(t,e){var i=e[0],e=e[1];return function(t,e,i,r){for(;i<=r;){var n=i+r>>1;if(e[n]===t)return!0;e[n]>t?r=n-1:i=1+n}return!1}(t.properties()[i.value],e.value,0,e.value.length-1)}],all:{type:Ht,overloads:[[[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)&&i.evaluate(t)}],[Mi(Ht),function(t,e){for(var i=0,r=e;i<r.length;i+=1)if(!r[i].evaluate(t))return!1;return!0}]]},any:{type:Ht,overloads:[[[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)||i.evaluate(t)}],[Mi(Ht),function(t,e){for(var i=0,r=e;i<r.length;i+=1)if(r[i].evaluate(t))return!0;return!1}]]},"!":[Ht,[Ht],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Ht,[Kt],function(t,e){var i=t.globals&&t.globals.isSupportedScript;return!i||i(e[0].evaluate(t))}],upcase:[Kt,[Kt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Kt,[Kt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Kt,Mi(Qt),function(e,t){return t.map(function(t){return _e(t.evaluate(e))}).join("")}],"resolved-locale":[Kt,[$t],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Xi=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Ee,this._defaultValue=e?"color"===(t=e).type&&Ui(t.default)?new ue(0,0,0,0):"color"===t.type?ue.parse(t.default)||null:void 0===t.default?null:t.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Wi(t){return Array.isArray(t)&&0<t.length&&"string"==typeof t[0]&&t[0]in Pi}function Ki(t,e){var i,i=new Ge(Pi,[],e?(i={color:Jt,string:Kt,number:Wt,enum:Kt,boolean:Ht,formatted:te,resolvedImage:ee},"array"===e.type?ie(i[e.value]||Qt,e.length):i[e.type]):void 0),t=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return t?Di(new Xi(t,e)):Li(i.errors)}Xi.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Xi.prototype.evaluate=function(t,e,i,r,n,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||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 ve("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Hi=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!je(e.expression)};Hi.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)},Hi.prototype.evaluate=function(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)};var Ji=function(t,e,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!je(e.expression),this.interpolationType=r};function Yi(t,e){if("error"===(t=Ki(t,e)).result)return t;var i=t.value.expression,r=Ne(i);if(!r&&!Bi(e))return Li([new Zt("","data expressions not supported")]);var n=qe(i,["zoom"]);if(!n&&!Ri(e))return Li([new Zt("","zoom expressions not supported")]);i=function e(t){var i=null;if(t instanceof pi)i=e(t.result);else if(t instanceof ci)for(var r=0,n=t.args;r<n.length&&!(i=e(n[r]));r+=1);else(t instanceof We||t instanceof li)&&t.input instanceof ze&&"zoom"===t.input.name&&(i=t);return i instanceof Zt||t.eachChild(function(t){t=e(t);t instanceof Zt?i=t:!i&&t?i=new Zt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):i&&t&&i!==t&&(i=new Zt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),i}(i);return i||n?i instanceof Zt?Li([i]):i instanceof li&&!Fi(e)?Li([new Zt("",'"interpolate" expressions cannot be used with this property')]):Di(i?new Ji(r?"camera":"composite",t.value,i.labels,i instanceof li?i.interpolation:void 0):new Hi(r?"constant":"source",t.value)):Li([new Zt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Ji.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)},Ji.prototype.evaluate=function(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)},Ji.prototype.interpolationFactor=function(t,e,i){return this.interpolationType?li.interpolationFactor(this.interpolationType,t,e,i):0};function Qi(t,e){this._parameters=t,this._specification=e,Ut(this,function t(i,r){var n,o,a,e="color"===r.type,s=i.stops&&"object"==typeof i.stops[0][0],l=s||!(s||void 0!==i.property),u=i.type||(Fi(r)?"exponential":"interval");if(e&&((i=Ut({},i)).stops&&(i.stops=i.stops.map(function(t){return[t[0],ue.parse(t[1])]})),i.default=ue.parse(i.default||r.default)),i.colorSpace&&"rgb"!==i.colorSpace&&!si[i.colorSpace])throw new Error("Unknown color space: "+i.colorSpace);if("exponential"===u)n=Zi;else if("interval"===u)n=qi;else if("categorical"===u){n=ji,o=Object.create(null);for(var c=0,p=i.stops;c<p.length;c+=1){var h=p[c];o[h[0]]=h[1]}a=typeof i.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');n=Gi}if(s){for(var f={},d=[],m=0;m<i.stops.length;m++){var y=i.stops[m],_=y[0].zoom;void 0===f[_]&&(f[_]={zoom:_,type:i.type,property:i.property,default:i.default,stops:[]},d.push(_)),f[_].stops.push([y[0].value,y[1]])}for(var g=[],v=0,x=d;v<x.length;v+=1){var b=x[v];g.push([f[b].zoom,t(f[b],r)])}s={name:"linear"};return{kind:"composite",interpolationType:s,interpolationFactor:li.interpolationFactor.bind(void 0,s),zoomStops:g.map(function(t){return t[0]}),evaluate:function(t,e){t=t.zoom;return Zi({stops:g,base:i.base},r,t).evaluate(t,e)}}}if(l){u="exponential"===u?{name:"exponential",base:void 0!==i.base?i.base:1}:null;return{kind:"camera",interpolationType:u,interpolationFactor:li.interpolationFactor.bind(void 0,u),zoomStops:i.stops.map(function(t){return t[0]}),evaluate:function(t){return n(i,r,t.zoom,o,a)}}}return{kind:"source",evaluate:function(t,e){e=e&&e.properties?e.properties[i.property]:void 0;return void 0===e?Ni(i.default,r.default):n(i,r,e,o,a)}}}(this._parameters,this._specification))}function $i(t){var e,i,r=t.key,n=t.value,o=t.valueSpec||{},a=t.objectElementValidators||{},s=t.style,l=t.styleSpec,u=[],t=Oi(n);if("object"!==t)return[new Ft(r,n,"object expected, "+t+" found")];for(e in n){var c=e.split(".")[0],p=o[c]||o["*"],h=void 0;if(a[c])h=a[c];else if(o[c])h=Tr;else if(a["*"])h=a["*"];else{if(!o["*"]){u.push(new Ft(r,n[e],'unknown property "'+e+'"'));continue}h=Tr}u=u.concat(h({key:(r&&r+".")+e,value:n[e],valueSpec:p,style:s,styleSpec:l,object:n,objectKey:e},n))}for(i in o)a[i]||o[i].required&&void 0===o[i].default&&void 0===n[i]&&u.push(new Ft(r,n,'missing required property "'+i+'"'));return u}function tr(t){var e=t.value,i=t.valueSpec,r=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||Tr;if("array"!==Oi(e))return[new Ft(o,e,"array expected, "+Oi(e)+" found")];if(i.length&&e.length!==i.length)return[new Ft(o,e,"array length "+i.length+" expected, length "+e.length+" found")];if(i["min-length"]&&e.length<i["min-length"])return[new Ft(o,e,"array length at least "+i["min-length"]+" expected, length "+e.length+" found")];var s={type:i.value,values:i.values};n.$version<7&&(s.function=i.function),"object"===Oi(i.value)&&(s=i.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:r,styleSpec:n,key:o+"["+u+"]"}));return l}function er(t){var e=t.key,i=t.value,r=t.valueSpec,t=Oi(i);return"number"===t&&i!=i&&(t="NaN"),"number"!==t?[new Ft(e,i,"number expected, "+t+" found")]:"minimum"in r&&i<r.minimum?[new Ft(e,i,i+" is less than the minimum value "+r.minimum)]:"maximum"in r&&i>r.maximum?[new Ft(e,i,i+" is greater than the maximum value "+r.maximum)]:[]}function ir(t){var n,o,a,s=t.valueSpec,l=Vt(t.value.type),u={},e="categorical"!==l&&void 0===t.value.property,i=!e,c="array"===Oi(t.value.stops)&&"array"===Oi(t.value.stops[0])&&"object"===Oi(t.value.stops[0][0]),r=$i({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===l)return[new Ft(t.key,t.value,'identity function may not have a "stops" property')];var e=[],i=t.value,e=e.concat(tr({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p}));return"array"===Oi(i)&&0===i.length&&e.push(new Ft(t.key,i,"array must have at least one stop")),e},default:function(t){return Tr({key:t.key,value:t.value,valueSpec:s,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===l&&e&&r.push(new Ft(t.key,t.value,'missing required property "property"')),"identity"===l||t.value.stops||r.push(new Ft(t.key,t.value,'missing required property "stops"')),"exponential"===l&&t.valueSpec.expression&&!Fi(t.valueSpec)&&r.push(new Ft(t.key,t.value,"exponential functions not supported")),8<=t.styleSpec.$version&&(i&&!Bi(t.valueSpec)?r.push(new Ft(t.key,t.value,"property functions not supported")):e&&!Ri(t.valueSpec)&&r.push(new Ft(t.key,t.value,"zoom functions not supported"))),"categorical"!==l&&!c||void 0!==t.value.property||r.push(new Ft(t.key,t.value,'"property" property is required')),r;function p(t){var e=[],i=t.value,r=t.key;if("array"!==Oi(i))return[new Ft(r,i,"array expected, "+Oi(i)+" found")];if(2!==i.length)return[new Ft(r,i,"array length 2 expected, length "+i.length+" found")];if(c){if("object"!==Oi(i[0]))return[new Ft(r,i,"object expected, "+Oi(i[0])+" found")];if(void 0===i[0].zoom)return[new Ft(r,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new Ft(r,i,"object stop key must have value")];if(a&&a>Vt(i[0].zoom))return[new Ft(r,i[0].zoom,"stop zoom values must appear in ascending order")];Vt(i[0].zoom)!==a&&(a=Vt(i[0].zoom),o=void 0,u={}),e=e.concat($i({key:r+"[0]",value:i[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:er,value:h}}))}else e=e.concat(h({key:r+"[0]",value:i[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},i));return Wi(Nt(i[1]))?e.concat([new Ft(r+"[1]",i[1],"expressions are not allowed in function stops.")]):e.concat(Tr({key:r+"[1]",value:i[1],valueSpec:s,style:t.style,styleSpec:t.styleSpec}))}function h(t,e){var i=Oi(t.value),r=Vt(t.value),e=null!==t.value?t.value:e;if(n){if(i!==n)return[new Ft(t.key,e,i+" stop domain type must match previous stop domain type "+n)]}else n=i;if("number"!==i&&"string"!==i&&"boolean"!==i)return[new Ft(t.key,e,"stop domain value must be a number, string, or boolean")];if("number"===i||"categorical"===l)return"categorical"!==l||"number"!==i||isFinite(r)&&Math.floor(r)===r?"categorical"!==l&&"number"===i&&void 0!==o&&r<o?[new Ft(t.key,e,"stop domain values must appear in ascending order")]:(o=r,"categorical"===l&&r in u?[new Ft(t.key,e,"stop domain values must be unique")]:(u[r]=!0,[])):[new Ft(t.key,e,"integer expected, found "+r)];i="number expected, "+i+" found";return Bi(s)&&void 0===l&&(i+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ft(t.key,e,i)]}}function rr(e){var t=("property"===e.expressionContext?Yi:Ki)(Nt(e.value),e.valueSpec);if("error"===t.result)return t.value.map(function(t){return new Ft(""+e.key+t.key,e.value,t.message)});t=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!t.outputDefined())return[new Ft(e.key,e.value,'Invalid data expression for "'+e.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===e.expressionContext&&"layout"===e.propertyType&&!je(t))return[new Ft(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!je(t))return[new Ft(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!qe(t,["zoom","feature-state"]))return[new Ft(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!Ne(t))return[new Ft(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function nr(t){var e=t.key,i=t.value,r=t.valueSpec,t=[];return Array.isArray(r.values)?-1===r.values.indexOf(Vt(i))&&t.push(new Ft(e,i,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(i)+" found")):-1===Object.keys(r.values).indexOf(Vt(i))&&t.push(new Ft(e,i,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(i)+" found")),t}function or(t){if(!0===t||!1===t)return 1;if(Array.isArray(t)&&0!==t.length)switch(t[0]){case"has":return 2<=t.length&&"$id"!==t[1]&&"$type"!==t[1];case"in":return 3<=t.length&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,i=t.slice(1);e<i.length;e+=1){var r=i[e];if(!or(r)&&"boolean"!=typeof r)return}return 1;default:return 1}}Qi.deserialize=function(t){return new Qi(t._parameters,t._specification)};var ar={type:"boolean",default:!(Qi.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}}),transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function sr(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};or(t)||(t=ur(t));var r=Ki(t,ar);if("error"===r.result)throw new Error(r.value.map(function(t){return t.key+": "+t.message}).join(", "));return{filter:function(t,e,i){return r.value.evaluate(t,e,{},i)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var i=1;i<e.length;i++)if(t(e[i]))return!0;return!1}(t)}}function lr(t,e){return t<e?-1:e<t?1:0}function ur(t){if(!t)return!0;var e,i=t[0];return t.length<=1?"any"!==i:"=="===i?cr(t[1],t[2],"=="):"!="===i?fr(cr(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?cr(t[1],t[2],i):"any"===i?(e=t.slice(1),["any"].concat(e.map(ur))):"all"===i?["all"].concat(t.slice(1).map(ur)):"none"===i?["all"].concat(t.slice(1).map(ur).map(fr)):"in"===i?pr(t[1],t.slice(2)):"!in"===i?fr(pr(t[1],t.slice(2))):"has"===i?hr(t[1]):"!has"===i?fr(hr(t[1])):"within"!==i||t}function cr(t,e,i){switch(t){case"$type":return["filter-type-"+i,e];case"$id":return["filter-id-"+i,e];default:return["filter-"+i,t,e]}}function pr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return 200<e.length&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(lr)]]:["filter-in-small",t,["literal",e]]}}function hr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function fr(t){return["!",t]}function dr(t){return or(Nt(t.value))?rr(Ut({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var i=e.value,r=e.key;if("array"!==Oi(i))return[new Ft(r,i,"array expected, "+Oi(i)+" found")];var n,o=e.styleSpec,a=[];if(i.length<1)return[new Ft(r,i,"filter array must have at least 1 element")];switch(a=a.concat(nr({key:r+"[0]",value:i[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Vt(i[0])){case"<":case"<=":case">":case">=":2<=i.length&&"$type"===Vt(i[1])&&a.push(new Ft(r,i,'"$type" cannot be use with operator "'+i[0]+'"'));case"==":case"!=":3!==i.length&&a.push(new Ft(r,i,'filter array for operator "'+i[0]+'" must have 3 elements'));case"in":case"!in":2<=i.length&&"string"!==(n=Oi(i[1]))&&a.push(new Ft(r+"[1]",i[1],"string expected, "+n+" found"));for(var s=2;s<i.length;s++)n=Oi(i[s]),"$type"===Vt(i[1])?a=a.concat(nr({key:r+"["+s+"]",value:i[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new Ft(r+"["+s+"]",i[s],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var l=1;l<i.length;l++)a=a.concat(t({key:r+"["+l+"]",value:i[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Oi(i[1]),2!==i.length?a.push(new Ft(r,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new Ft(r+"[1]",i[1],"string expected, "+n+" found"));break;case"within":n=Oi(i[1]),2!==i.length?a.push(new Ft(r,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"object"!==n&&a.push(new Ft(r+"[1]",i[1],"object expected, "+n+" found"))}return a}(t)}function mr(t,e){var i=t.key,r=t.style,n=t.styleSpec,o=t.value,a=t.objectKey,s=n[e+"_"+t.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return Tr({key:i,value:o,valueSpec:n.transition,style:r,styleSpec:n});s=t.valueSpec||s[a];if(!s)return[new Ft(i,o,'unknown property "'+a+'"')];if("string"===Oi(o)&&Bi(s)&&!s.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new Ft(i,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var u=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&u.push(new Ft(i,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Ui(Nt(o))&&"identity"===Vt(o.type)&&u.push(new Ft(i,o,'"text-font" does not support identity functions'))),u.concat(Tr({key:t.key,value:o,valueSpec:s,style:r,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function yr(t){return mr(t,"paint")}function _r(t){return mr(t,"layout")}function gr(t){var e=[],i=t.value,r=t.key,n=t.style,o=t.styleSpec;i.type||i.ref||e.push(new Ft(r,i,'either "type" or "ref" is required'));var a,s,l,u=Vt(i.type),c=Vt(i.ref);if(i.id)for(var p=Vt(i.id),h=0;h<t.arrayIndex;h++){var f=n.layers[h];Vt(f.id)===p&&e.push(new Ft(r,i.id,'duplicate layer id "'+i.id+'", previously used at line '+f.id.__line__))}return"ref"in i?(["type","source","source-layer","filter","layout"].forEach(function(t){t in i&&e.push(new Ft(r,i[t],'"'+t+'" is prohibited for ref layers'))}),n.layers.forEach(function(t){Vt(t.id)===c&&(a=t)}),a?a.ref?e.push(new Ft(r,i.ref,"ref cannot reference another ref layer")):u=Vt(a.type):e.push(new Ft(r,i.ref,'ref layer "'+c+'" not found'))):"background"!==u&&(i.source?(l=(s=n.sources&&n.sources[i.source])&&Vt(s.type),s?"vector"===l&&"raster"===u?e.push(new Ft(r,i.source,'layer "'+i.id+'" requires a raster source')):"raster"===l&&"raster"!==u?e.push(new Ft(r,i.source,'layer "'+i.id+'" requires a vector source')):"vector"!==l||i["source-layer"]?"raster-dem"===l&&"hillshade"!==u?e.push(new Ft(r,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==u||!i.paint||!i.paint["line-gradient"]||"geojson"===l&&s.lineMetrics||e.push(new Ft(r,i,'layer "'+i.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Ft(r,i,'layer "'+i.id+'" must specify a "source-layer"')):e.push(new Ft(r,i.source,'source "'+i.source+'" not found'))):e.push(new Ft(r,i,'missing required property "source"'))),e=e.concat($i({key:r,value:i,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Tr({key:r+".type",value:i.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:i,objectKey:"type"})},filter:dr,layout:function(t){return $i({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return _r(Ut({layerType:u},t))}}})},paint:function(t){return $i({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return yr(Ut({layerType:u},t))}}})}}}))}function vr(t){var e=t.value,i=t.key,t=Oi(e);return"string"!==t?[new Ft(i,e,"string expected, "+t+" found")]:[]}var xr={promoteId:function(t){var e=t.key,i=t.value;if("string"===Oi(i))return vr({key:e,value:i});var r,n=[];for(r in i)n.push.apply(n,vr({key:e+"."+r,value:i[r]}));return n}};function br(t){var e=t.value,i=t.key,r=t.styleSpec,n=t.style;if(!e.type)return[new Ft(i,e,'"type" is required')];var o,a=Vt(e.type);switch(a){case"vector":case"raster":case"raster-dem":return $i({key:i,value:e,valueSpec:r["source_"+a.replace("-","_")],style:t.style,styleSpec:r,objectElementValidators:xr});case"geojson":if(o=$i({key:i,value:e,valueSpec:r.source_geojson,style:n,styleSpec:r,objectElementValidators:xr}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],u="string"==typeof u?[u,["accumulated"],["get",s]]:u;o.push.apply(o,rr({key:i+"."+s+".map",value:l[1],expressionContext:"cluster-map"})),o.push.apply(o,rr({key:i+"."+s+".reduce",value:u,expressionContext:"cluster-reduce"}))}return o;case"video":return $i({key:i,value:e,valueSpec:r.source_video,style:n,styleSpec:r});case"image":return $i({key:i,value:e,valueSpec:r.source_image,style:n,styleSpec:r});case"canvas":return[new Ft(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return nr({key:i+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:r})}}function wr(t){var e,i=t.value,r=t.styleSpec,n=r.light,o=t.style,a=[],t=Oi(i);if(void 0===i)return a;if("object"!==t)return a.concat([new Ft("light",i,"object expected, "+t+" found")]);for(e in i)var s=e.match(/^(.*)-transition$/),a=a.concat(s&&n[s[1]]&&n[s[1]].transition?Tr({key:e,value:i[e],valueSpec:r.transition,style:o,styleSpec:r}):n[e]?Tr({key:e,value:i[e],valueSpec:n[e],style:o,styleSpec:r}):[new Ft(e,i[e],'unknown property "'+e+'"')]);return a}var Sr={"*":function(){return[]},array:tr,boolean:function(t){var e=t.value,i=t.key,t=Oi(e);return"boolean"!==t?[new Ft(i,e,"boolean expected, "+t+" found")]:[]},number:er,color:function(t){var e=t.key,i=t.value,t=Oi(i);return"string"!==t?[new Ft(e,i,"color expected, "+t+" found")]:null===le(i)?[new Ft(e,i,'color expected, "'+i+'" found')]:[]},constants:Ot,enum:nr,filter:dr,function:ir,layer:gr,object:$i,source:br,light:wr,string:vr,formatted:function(t){return 0===vr(t).length?[]:rr(t)},resolvedImage:function(t){return 0===vr(t).length?[]:rr(t)}};function Tr(t){var e=t.value,i=t.valueSpec,r=t.styleSpec;return i.expression&&Ui(Vt(e))?ir(t):i.expression&&Wi(Nt(e))?rr(t):i.type&&Sr[i.type]?Sr[i.type](t):$i(Ut({},t,{valueSpec:i.type?r[i.type]:i}))}function Ir(t){var e=t.value,i=t.key,t=vr(t);return t.length||(-1===e.indexOf("{fontstack}")&&t.push(new Ft(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&t.push(new Ft(i,e,'"glyphs" url must include a "{range}" token'))),t}function Er(t,e){void 0===e&&(e=Rt);var i=(i=[]).concat(Tr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Ir,"*":function(){return[]}}}));return t.constants&&(i=i.concat(Ot({key:"constants",value:t.constants,style:t,styleSpec:e}))),Ar(i)}function Ar(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function zr(i){return function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ar(i.apply(this,t))}}Er.source=zr(br),Er.light=zr(wr),Er.layer=zr(gr),Er.filter=zr(dr),Er.paintProperty=zr(yr),Er.layoutProperty=zr(_r);var Pr=Er,Cr=Pr.light,kr=Pr.paintProperty,Mr=Pr.layoutProperty;function Dr(t,e){var i=!1;if(e&&e.length)for(var r=0,n=e;r<n.length;r+=1)t.fire(new Lt(new Error(n[r].message))),i=!0;return i}var Lr=Br;function Br(t,e,i){var r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],this.d=(e=n[1])+2*(i=n[2]);for(var o=0;o<this.d*this.d;o++){var a=n[3+o],s=n[3+o+1];r.push(a===s?null:n.subarray(a,s))}var l=n[3+r.length+1];this.keys=n.subarray(n[3+r.length],l),this.bboxes=n.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*i;for(var u=0;u<this.d*this.d;u++)r.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=i,this.scale=e/t,this.uid=0;e=i/e*t;this.min=-e,this.max=t+e}
1Br.prototype.insert=function(t,e,i,r,n){this._forEachCell(e,i,r,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(i),this.bboxes.push(r),this.bboxes.push(n)},Br.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Br.prototype._insertCell=function(t,e,i,r,n,o){this.cells[n].push(o)},Br.prototype.query=function(t,e,i,r,n){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=i&&a<=r&&!n)return Array.prototype.slice.call(this.keys);a=[];return this._forEachCell(t,e,i,r,this._queryCell,a,{},n),a},Br.prototype._queryCell=function(t,e,i,r,n,o,a,s){var l=this.cells[n];if(null!==l)for(var u=this.keys,c=this.bboxes,p=0;p<l.length;p++){var h,f=l[p];void 0===a[f]&&(h=4*f,(s?s(c[0+h],c[1+h],c[2+h],c[3+h]):t<=c[2+h]&&e<=c[3+h]&&i>=c[0+h]&&r>=c[1+h])?(a[f]=!0,o.push(u[f])):a[f]=!1)}},Br.prototype._forEachCell=function(t,e,i,r,n,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(i),p=this._convertToCellCoord(r),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&n.call(this,t,e,i,r,d,o,a,s))return}},Br.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Br.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Br.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,i=0,r=0;r<this.cells.length;r++)i+=this.cells[r].length;var n=new Int32Array(e+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];n[3+a]=o,n.set(s,o),o+=s.length}return n[3+t.length]=o,n.set(this.keys,o),n[3+t.length+1]=o+=this.keys.length,n.set(this.bboxes,o),o+=this.bboxes.length,n.buffer};var Rr,Fr=f.ImageData,Or=f.ImageBitmap,Ur={};function Vr(t,e,i){void 0===i&&(i={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Ur[t]={klass:e,omit:i.omit||[],shallow:i.shallow||[]}}for(Rr in Vr("Object",Object),Lr.serialize=function(t,e){t=t.toArrayBuffer();return e&&e.push(t),{buffer:t}},Lr.deserialize=function(t){return new Lr(t.buffer)},Vr("Grid",Lr),Vr("Color",ue),Vr("Error",Error),Vr("ResolvedImage",fe),Vr("StylePropertyFunction",Qi),Vr("StyleExpression",Xi,{omit:["_evaluator"]}),Vr("ZoomDependentExpression",Ji),Vr("ZoomConstantExpression",Hi),Vr("CompoundExpression",ze,{omit:["_evaluate"]}),Pi)Pi[Rr]._classRegistryKey||Vr("Expression_"+Rr,Pi[Rr]);function Nr(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function jr(t){return Or&&t instanceof Or}function qr(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(Nr(t)||jr(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var i=t;return e&&e.push(i.buffer),i}if(t instanceof Fr)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var r=[],n=0,o=t;n<o.length;n+=1)r.push(qr(o[n],e));return r}if("object"!=typeof t)throw new Error("can't serialize object of type "+typeof t);var i=t.constructor,a=i._classRegistryKey;if(!a)throw new Error("can't serialize object of unregistered class");var s,l=i.serialize?i.serialize(t,e):{};if(!i.serialize){for(var u in t)!t.hasOwnProperty(u)||0<=Ur[a].omit.indexOf(u)||(s=t[u],l[u]=0<=Ur[a].shallow.indexOf(u)?s:qr(s,e));t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==a&&(l.$name=a),l}function Zr(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Nr(t)||jr(t)||ArrayBuffer.isView(t)||t instanceof Fr)return t;if(Array.isArray(t))return t.map(Zr);if("object"!=typeof t)throw new Error("can't deserialize object of type "+typeof t);var e=t.$name||"Object",i=Ur[e].klass;if(!i)throw new Error("can't deserialize unregistered class "+e);if(i.deserialize)return i.deserialize(t);for(var r=Object.create(i.prototype),n=0,o=Object.keys(t);n<o.length;n+=1){var a,s=o[n];"$name"!==s&&(a=t[s],r[s]=0<=Ur[e].shallow.indexOf(s)?a:Zr(a))}return r}function Gr(){this.first=!0}Gr.prototype.update=function(t,e){var i=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=i,!0))};var Xr={"Latin-1 Supplement":function(t){return 128<=t&&t<=255},Arabic:function(t){return 1536<=t&&t<=1791},"Arabic Supplement":function(t){return 1872<=t&&t<=1919},"Arabic Extended-A":function(t){return 2208<=t&&t<=2303},"Hangul Jamo":function(t){return 4352<=t&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return 5120<=t&&t<=5759},Khmer:function(t){return 6016<=t&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return 6320<=t&&t<=6399},"General Punctuation":function(t){return 8192<=t&&t<=8303},"Letterlike Symbols":function(t){return 8448<=t&&t<=8527},"Number Forms":function(t){return 8528<=t&&t<=8591},"Miscellaneous Technical":function(t){return 8960<=t&&t<=9215},"Control Pictures":function(t){return 9216<=t&&t<=9279},"Optical Character Recognition":function(t){return 9280<=t&&t<=9311},"Enclosed Alphanumerics":function(t){return 9312<=t&&t<=9471},"Geometric Shapes":function(t){return 9632<=t&&t<=9727},"Miscellaneous Symbols":function(t){return 9728<=t&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return 11008<=t&&t<=11263},"CJK Radicals Supplement":function(t){return 11904<=t&&t<=12031},"Kangxi Radicals":function(t){return 12032<=t&&t<=12255},"Ideographic Description Characters":function(t){return 12272<=t&&t<=12287}
1,"CJK Symbols and Punctuation":function(t){return 12288<=t&&t<=12351},Hiragana:function(t){return 12352<=t&&t<=12447},Katakana:function(t){return 12448<=t&&t<=12543},Bopomofo:function(t){return 12544<=t&&t<=12591},"Hangul Compatibility Jamo":function(t){return 12592<=t&&t<=12687},Kanbun:function(t){return 12688<=t&&t<=12703},"Bopomofo Extended":function(t){return 12704<=t&&t<=12735},"CJK Strokes":function(t){return 12736<=t&&t<=12783},"Katakana Phonetic Extensions":function(t){return 12784<=t&&t<=12799},"Enclosed CJK Letters and Months":function(t){return 12800<=t&&t<=13055},"CJK Compatibility":function(t){return 13056<=t&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return 13312<=t&&t<=19903},"Yijing Hexagram Symbols":function(t){return 19904<=t&&t<=19967},"CJK Unified Ideographs":function(t){return 19968<=t&&t<=40959},"Yi Syllables":function(t){return 40960<=t&&t<=42127},"Yi Radicals":function(t){return 42128<=t&&t<=42191},"Hangul Jamo Extended-A":function(t){return 43360<=t&&t<=43391},"Hangul Syllables":function(t){return 44032<=t&&t<=55215},"Hangul Jamo Extended-B":function(t){return 55216<=t&&t<=55295},"Private Use Area":function(t){return 57344<=t&&t<=63743},"CJK Compatibility Ideographs":function(t){return 63744<=t&&t<=64255},"Arabic Presentation Forms-A":function(t){return 64336<=t&&t<=65023},"Vertical Forms":function(t){return 65040<=t&&t<=65055},"CJK Compatibility Forms":function(t){return 65072<=t&&t<=65103},"Small Form Variants":function(t){return 65104<=t&&t<=65135},"Arabic Presentation Forms-B":function(t){return 65136<=t&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return 65280<=t&&t<=65519}};function Wr(t){for(var e=0,i=t;e<i.length;e+=1)if(Kr(i[e].charCodeAt(0)))return!0;return!1}function Kr(t){return 746===t||747===t||!(t<4352)&&(Xr["Bopomofo Extended"](t)||Xr.Bopomofo(t)||Xr["CJK Compatibility Forms"](t)&&!(65097<=t&&t<=65103)||Xr["CJK Compatibility Ideographs"](t)||Xr["CJK Compatibility"](t)||Xr["CJK Radicals Supplement"](t)||Xr["CJK Strokes"](t)||!(!Xr["CJK Symbols and Punctuation"](t)||12296<=t&&t<=12305||12308<=t&&t<=12319||12336===t)||Xr["CJK Unified Ideographs Extension A"](t)||Xr["CJK Unified Ideographs"](t)||Xr["Enclosed CJK Letters and Months"](t)||Xr["Hangul Compatibility Jamo"](t)||Xr["Hangul Jamo Extended-A"](t)||Xr["Hangul Jamo Extended-B"](t)||Xr["Hangul Jamo"](t)||Xr["Hangul Syllables"](t)||Xr.Hiragana(t)||Xr["Ideographic Description Characters"](t)||Xr.Kanbun(t)||Xr["Kangxi Radicals"](t)||Xr["Katakana Phonetic Extensions"](t)||Xr.Katakana(t)&&12540!==t||!(!Xr["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||65306<=t&&t<=65310||65339===t||65341===t||65343===t||65371<=t&&t<=65503||65507===t||65512<=t&&t<=65519)||!(!Xr["Small Form Variants"](t)||65112<=t&&t<=65118||65123<=t&&t<=65126)||Xr["Unified Canadian Aboriginal Syllabics"](t)||Xr["Unified Canadian Aboriginal Syllabics Extended"](t)||Xr["Vertical Forms"](t)||Xr["Yijing Hexagram Symbols"](t)||Xr["Yi Syllables"](t)||Xr["Yi Radicals"](t))}function Hr(t){return!(Kr(t)||(t=t,Xr["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Xr["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Xr["Letterlike Symbols"](t)||Xr["Number Forms"](t)||Xr["Miscellaneous Technical"](t)&&(8960<=t&&t<=8967||8972<=t&&t<=8991||8996<=t&&t<=9e3||9003===t||9085<=t&&t<=9114||9150<=t&&t<=9165||9167===t||9169<=t&&t<=9179||9186<=t&&t<=9215)||Xr["Control Pictures"](t)&&9251!==t||Xr["Optical Character Recognition"](t)||Xr["Enclosed Alphanumerics"](t)||Xr["Geometric Shapes"](t)||Xr["Miscellaneous Symbols"](t)&&!(9754<=t&&t<=9759)||Xr["Miscellaneous Symbols and Arrows"](t)&&(11026<=t&&t<=11055||11088<=t&&t<=11097||11192<=t&&t<=11243)||Xr["CJK Symbols and Punctuation"](t)||Xr.Katakana(t)||Xr["Private Use Area"](t)||Xr["CJK Compatibility Forms"](t)||Xr["Small Form Variants"](t)||Xr["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||9984<=t&&t<=10087||10102<=t&&t<=10131||65532===t||65533===t))}function Jr(t){return 1424<=t&&t<=2303||Xr["Arabic Presentation Forms-A"](t)||Xr["Arabic Presentation Forms-B"](t)}function Yr(t){t&&"string"==typeof t&&-1<t.indexOf("NetworkError")&&($r="error"),Qr&&Qr(t)}
1var Qr=null,$r="unavailable",tn=null;function en(){an.fire(new kt("pluginStateChange",{pluginStatus:$r,pluginURL:tn}))}function rn(){return $r}function nn(){if("deferred"!==$r||!tn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");$r="loading",en(),tn&&St({url:tn},function(t){t?Yr(t):($r="loaded",en())})}function on(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Gr,this.transition={})}var an=new Mt,sn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===$r||null!=sn.applyArabicShaping},isLoading:function(){return"loading"===$r},setState:function(t){$r=t.pluginStatus,tn=t.pluginURL},isParsed:function(){return null!=sn.applyArabicShaping&&null!=sn.processBidirectionalText&&null!=sn.processStyledBidirectionalText},getPluginURL:function(){return tn}};on.prototype.isSupportedScript=function(t){return function(t,e){for(var i,r=0,n=t;r<n.length;r+=1)if(i=n[r].charCodeAt(0),!e&&Jr(i)||2304<=i&&i<=3583||3840<=i&&i<=4255||Xr.Khmer(i))return!1;return!0}(t,sn.isLoaded())},on.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},on.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),i=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*e}};function ln(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Ui(t))return new Qi(t,e);if(Wi(t)){var i=Yi(t,e);if("error"===i.result)throw new Error(i.value.map(function(t){return t.key+": "+t.message}).join(", "));return i.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=ue.parse(t)),{kind:"constant",evaluate:function(){return r}}}(void 0===e?t.specification.default:e,t.specification)}ln.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ln.prototype.possiblyEvaluate=function(t,e,i){return this.property.possiblyEvaluate(this,t,e,i)};function un(t){this.property=t,this.value=new ln(t,void 0)}un.prototype.transitioned=function(t,e){return new pn(this.property,this.value,e,v({},t.transition,this.transition),t.now)},un.prototype.untransitioned=function(){return new pn(this.property,this.value,null,{},0)};function cn(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}cn.prototype.getValue=function(t){return x(this._values[t].value.value)},cn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new un(this._values[t].property)),this._values[t].value=new ln(this._values[t].property,null===e?void 0:x(e))},cn.prototype.getTransition=function(t){return x(this._values[t].transition)},cn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new un(this._values[t].property)),this._values[t].transition=x(e)||void 0},cn.prototype.serialize=function(){for(var t={},e=0,i=Object.keys(this._values);e<i.length;e+=1){var r=i[e],n=this.getValue(r);void 0!==n&&(t[r]=n);n=this.getTransition(r);void 0!==n&&(t[r+"-transition"]=n)}return t},cn.prototype.transitioned=function(t,e){for(var i=new hn(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var o=n[r];i._values[o]=this._values[o].transitioned(t,e._values[o])}return i},cn.prototype.untransitioned=function(){for(var t=new hn(this._properties),e=0,i=Object.keys(this._values);e<i.length;e+=1){var r=i[e];t._values[r]=this._values[r].untransitioned()}return t};var pn=function(t,e,i,r,n){this.property=t,this.value=e,this.begin=n+r.delay||0,this.end=this.begin+r.duration||0,t.specification.transition&&(r.delay||r.duration)&&(this.prior=i)};pn.prototype.possiblyEvaluate=function(t,e,i){var r=t.now||0,n=this.value.possiblyEvaluate(t,e,i),o=this.prior;if(o){if(r>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(r<this.begin)return o.possiblyEvaluate(t,e,i);var a=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,i),n,function(){if(a<=0)return 0;if(1<=a)return 1;var t=a*a,e=t*a;return 4*(a<.5?e:3*(a-t)+e-.75)}())}return n};var hn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};
vendor: 7,168 bytes, line 1
1hn.prototype.possiblyEvaluate=function(t,e,i){for(var r=new mn(this._properties),n=0,o=Object.keys(this._values);n<o.length;n+=1){var a=o[n];r._values[a]=this._values[a].possiblyEvaluate(t,e,i)}return r},hn.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1)if(this._values[e[t]].prior)return!0;return!1};function fn(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}fn.prototype.getValue=function(t){return x(this._values[t].value)},fn.prototype.setValue=function(t,e){this._values[t]=new ln(this._values[t].property,null===e?void 0:x(e))},fn.prototype.serialize=function(){for(var t={},e=0,i=Object.keys(this._values);e<i.length;e+=1){var r=i[e],n=this.getValue(r);void 0!==n&&(t[r]=n)}return t},fn.prototype.possiblyEvaluate=function(t,e,i){for(var r=new mn(this._properties),n=0,o=Object.keys(this._values);n<o.length;n+=1){var a=o[n];r._values[a]=this._values[a].possiblyEvaluate(t,e,i)}return r};function dn(t,e,i){this.property=t,this.value=e,this.parameters=i}dn.prototype.isConstant=function(){return"constant"===this.value.kind},dn.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},dn.prototype.evaluate=function(t,e,i,r){return this.property.evaluate(this.value,this.parameters,t,e,i,r)};var mn=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};mn.prototype.get=function(t){return this._values[t]};function yn(t){this.specification=t}yn.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},yn.prototype.interpolate=function(t,e,i){var r=He[this.specification.type];return r?r(t,e,i):t};var _n=function(t,e){this.specification=t,this.overrides=e};_n.prototype.possiblyEvaluate=function(t,e,i,r){return new dn(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},i,r)}:t.expression,e)},_n.prototype.interpolate=function(t,e,i){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new dn(this,{kind:"constant",value:void 0},t.parameters);var r=He[this.specification.type];return r?new dn(this,{kind:"constant",value:r(t.value.value,e.value.value,i)},t.parameters):t},_n.prototype.evaluate=function(t,e,i,r,n,o){return"constant"===t.kind?t.value:t.evaluate(e,i,r,n,o)};var gn,vn=((gn=_n)&&(bn.__proto__=gn),((bn.prototype=Object.create(gn&&gn.prototype)).constructor=bn).prototype.possiblyEvaluate=function(t,e,i,r){if(void 0===t.value)return new dn(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){r=t.expression.evaluate(e,null,{},i,r),r="resolvedImage"===t.property.specification.type&&"string"!=typeof r?r.name:r,r=this._calculate(r,r,r,e);return new dn(this,{kind:"constant",value:r},e)}if("camera"!==t.expression.kind)return new dn(this,t.expression,e);t=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new dn(this,{kind:"constant",value:t},e)},bn.prototype.evaluate=function(t,e,i,r,n,o){if("source"!==t.kind)return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},i,r),t.evaluate({zoom:Math.floor(e.zoom)},i,r),t.evaluate({zoom:Math.floor(e.zoom)+1},i,r),e):t.value;o=t.evaluate(e,i,r,n,o);return this._calculate(o,o,o,e)},bn.prototype._calculate=function(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},bn.prototype.interpolate=function(t){return t},bn),xn=function(t){this.specification=t};function bn(){gn.apply(this,arguments)}xn.prototype.possiblyEvaluate=function(t,e,i,r){if(void 0!==t.value){if("constant"!==t.expression.kind)return this._calculate(t.expression.evaluate(new on(Math.floor(e.zoom-1),e)),t.expression.evaluate(new on(Math.floor(e.zoom),e)),t.expression.evaluate(new on(Math.floor(e.zoom+1),e)),e);r=t.expression.evaluate(e,null,{},i,r);return this._calculate(r,r,r,e)}},xn.prototype._calculate=function(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},xn.prototype.interpolate=function(t){return t};var wn=function(t){this.specification=t};wn.prototype.possiblyEvaluate=function(t,e,i,r){return!!t.expression.evaluate(e,null,{},i,r)},wn.prototype.interpolate=function(){return!1};function Sn(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var i=t[e];i.specification.overridable&&this.overridableProperties.push(e);var r=this.defaultPropertyValues[e]=new ln(i,void 0),i=this.defaultTransitionablePropertyValues[e]=new un(i);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}}Vr("DataDrivenProperty",_n),Vr("DataConstantProperty",yn),Vr("CrossFadedDataDrivenProperty",vn),Vr("CrossFadedProperty",xn),Vr("ColorRampProperty",wn);var Tn,In=((Tn=Mt)&&(Pn.__proto__=Tn),((Pn.prototype=Object.create(Tn&&Tn.prototype)).constructor=Pn).prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},Pn.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},Pn.prototype.setLayoutProperty=function(t,e,i){void 0===i&&(i={}),null!=e&&this._validate(Mr,"layers."+this.id+".layout."+t,t,e,i)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},Pn.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},Pn.prototype.setPaintProperty=function(t,e,i){if(void 0===i&&(i={}),null!=e&&this._validate(kr,"layers."+this.id+".paint."+t,t,e,i))return!1;if(y(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var r=this._transitionablePaint._values[t],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),r=r.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);e=this._transitionablePaint._values[t].value;return e.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(t,r,e)},Pn.prototype._handleSpecialPaintPropertyUpdate=function(t){},Pn.prototype._handleOverridablePaintPropertyUpdate=function(t,e,i){return!1},Pn.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},Pn.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},Pn.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},Pn.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},Pn.prototype.serialize=function(){var t={id:this.id,type:this.t
1ype,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),g(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},Pn.prototype._validate=function(t,e,i,r,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&Dr(this,t.call(Pr,{key:e,layerType:this.type,objectKey:i,value:r,styleSpec:Rt,style:{glyphs:!0,sprite:!0}}))},Pn.prototype.is3D=function(){return!1},Pn.prototype.isTileClipped=function(){return!1},Pn.prototype.hasOffscreenPass=function(){return!1},Pn.prototype.resize=function(){},Pn.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof dn&&Bi(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},Pn),En={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},An=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},zn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Pn(t,e){if(Tn.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),e.layout&&(this._unevaluatedLayout=new fn(e.layout)),e.paint)){for(var i in this._transitionablePaint=new cn(e.paint),t.paint)this.setPaintProperty(i,t.paint[i],{validate:!1});for(var r in t.layout)this.setLayoutProperty(r,t.layout[r],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new mn(e.paint)}}function Cn(t,n){void 0===n&&(n=1);var o=0,a=0;return{members:t.map(function(t){var e=En[t.type].BYTES_PER_ELEMENT,i=o=kn(o,Math.max(n,e)),r=t.components||1;return a=Math.max(a,e),o+=e*r,{name:t.name,type:t.type,components:r,offset:i}}),size:kn(o,Math.max(a,n)),alignment:n}}function kn(t,e){return Math.ceil(t/e)*e}zn.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},zn.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},zn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},zn.prototype.clear=function(){this.length=0},zn.prototype.resize=function(t){this.reserve(t),this.length=t},zn.prototype.reserve=function(t){t>this.capacity&&(this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement),t=this.uint8,this._refreshViews(),t&&this.uint8.set(t))},zn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Mn,Dn=((Mn=zn)&&(Ln.__proto__=Mn),((Ln.prototype=Object.create(Mn&&Mn.prototype)).constructor=Ln).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Ln.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Ln.prototype.emplace=function(t,e,i){var r=2*t;return this.int16[0+r]=e,this.int16[1+r]=i,t},Ln);function Ln(){Mn.apply(this,arguments)}Dn.prototype.bytesPerElement=4,Vr("StructArrayLayout2i4",Dn);var Bn,Rn=((Bn=zn)&&(Fn.__proto__=Bn),((Fn.prototype=Object.create(Bn&&Bn.prototype)).constructor=Fn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
1,Fn.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},Fn.prototype.emplace=function(t,e,i,r,n){var o=4*t;return this.int16[0+o]=e,this.int16[1+o]=i,this.int16[2+o]=r,this.int16[3+o]=n,t},Fn);function Fn(){Bn.apply(this,arguments)}Rn.prototype.bytesPerElement=8,Vr("StructArrayLayout4i8",Rn);var On,Un=((On=zn)&&(Vn.__proto__=On),((Vn.prototype=Object.create(On&&On.prototype)).constructor=Vn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Vn.prototype.emplaceBack=function(t,e,i,r,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,n,o)},Vn.prototype.emplace=function(t,e,i,r,n,o,a){var s=6*t;return this.int16[0+s]=e,this.int16[1+s]=i,this.int16[2+s]=r,this.int16[3+s]=n,this.int16[4+s]=o,this.int16[5+s]=a,t},Vn);function Vn(){On.apply(this,arguments)}Un.prototype.bytesPerElement=12,Vr("StructArrayLayout2i4i12",Un);var Nn,jn=((Nn=zn)&&(qn.__proto__=Nn),((qn.prototype=Object.create(Nn&&Nn.prototype)).constructor=qn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},qn.prototype.emplaceBack=function(t,e,i,r,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,n,o)},qn.prototype.emplace=function(t,e,i,r,n,o,a){var s=4*t,l=8*t;return this.int16[0+s]=e,this.int16[1+s]=i,this.uint8[4+l]=r,this.uint8[5+l]=n,this.uint8[6+l]=o,this.uint8[7+l]=a,t},qn);function qn(){Nn.apply(this,arguments)}jn.prototype.bytesPerElement=8,Vr("StructArrayLayout2i4ub8",jn);var Zn,Gn=((Zn=zn)&&(Xn.__proto__=Zn),((Xn.prototype=Object.create(Zn&&Zn.prototype)).constructor=Xn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Xn.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Xn.prototype.emplace=function(t,e,i){var r=2*t;return this.float32[0+r]=e,this.float32[1+r]=i,t},Xn);function Xn(){Zn.apply(this,arguments)}Gn.prototype.bytesPerElement=8,Vr("StructArrayLayout2f8",Gn);var Wn,Kn=((Wn=zn)&&(Hn.__proto__=Wn),((Hn.prototype=Object.create(Wn&&Wn.prototype)).constructor=Hn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Hn.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,i,r,n,o,a,s,l,u)},Hn.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c){var p=10*t;return this.uint16[0+p]=e,this.uint16[1+p]=i,this.uint16[2+p]=r,this.uint16[3+p]=n,this.uint16[4+p]=o,this.uint16[5+p]=a,this.uint16[6+p]=s,this.uint16[7+p]=l,this.uint16[8+p]=u,this.uint16[9+p]=c,t},Hn);function Hn(){Wn.apply(this,arguments)}Kn.prototype.bytesPerElement=20,Vr("StructArrayLayout10ui20",Kn);var Jn,Yn=((Jn=zn)&&(Qn.__proto__=Jn),((Qn.prototype=Object.create(Jn&&Jn.prototype)).constructor=Qn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Qn.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,i,r,n,o,a,s,l,u,c,p)},Qn.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h){var f=12*t;return this.int16[0+f]=e,this.int16[1+f]=i,this.int16[2+f]=r,this.int16[3+f]=n,this.uint16[4+f]=o,this.uint16[5+f]=a,this.uint16[6+f]=s,this.uint16[7+f]=l,this.int16[8+f]=u,this.int16[9+f]=c,this.int16[10+f]=p,this.int16[11+f]=h,t},Qn);function Qn(){Jn.apply(this,arguments)}Yn.prototype.bytesPerElement=24,Vr("StructArrayLayout4i4ui4i24",Yn);var $n,to=(($n=zn)&&(eo.__proto__=$n),((eo.prototype=Object.create($n&&$n.prototype)).constructor=eo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},eo.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},eo.prototype.emplace=function(t,e,i,r){var n=3*t;return this.float32[0+n]=e,this.float32[1+n]=i,this.float32[2+n]=r,t},eo);function eo(){$n.apply(this,arguments)}to.prototype.bytesPerElement=12,Vr("StructArrayLayout3f12",to);var io,ro=((io=zn)&&(no.__proto__=io),((no.prototype=Object.create(io&&io.prototype)).constructor=no).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},no.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},no.prototype.emplace=function(t,e){return this.uint32[+t+0]=e,t},no);function no(){io.apply(this,arguments)}ro.prototype.bytesPerElement=4,Vr("StructArrayLayout1ul4",ro);var oo,ao=((oo=zn)&&(so.__proto__=oo),((so.prototype=Object.create(oo&&oo.prototype)).constructor=so).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)}
1,so.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,i,r,n,o,a,s,l)},so.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u){var c=10*t,p=5*t;return this.int16[0+c]=e,this.int16[1+c]=i,this.int16[2+c]=r,this.int16[3+c]=n,this.int16[4+c]=o,this.int16[5+c]=a,this.uint32[3+p]=s,this.uint16[8+c]=l,this.uint16[9+c]=u,t},so);function so(){oo.apply(this,arguments)}ao.prototype.bytesPerElement=20,Vr("StructArrayLayout6i1ul2ui20",ao);var lo,uo=((lo=zn)&&(co.__proto__=lo),((co.prototype=Object.create(lo&&lo.prototype)).constructor=co).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},co.prototype.emplaceBack=function(t,e,i,r,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,n,o)},co.prototype.emplace=function(t,e,i,r,n,o,a){var s=6*t;return this.int16[0+s]=e,this.int16[1+s]=i,this.int16[2+s]=r,this.int16[3+s]=n,this.int16[4+s]=o,this.int16[5+s]=a,t},co);function co(){lo.apply(this,arguments)}uo.prototype.bytesPerElement=12,Vr("StructArrayLayout2i2i2i12",uo);var po,ho=((po=zn)&&(fo.__proto__=po),((fo.prototype=Object.create(po&&po.prototype)).constructor=fo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},fo.prototype.emplaceBack=function(t,e,i,r,n){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r,n)},fo.prototype.emplace=function(t,e,i,r,n,o){var a=4*t,s=8*t;return this.float32[0+a]=e,this.float32[1+a]=i,this.float32[2+a]=r,this.int16[6+s]=n,this.int16[7+s]=o,t},fo);function fo(){po.apply(this,arguments)}ho.prototype.bytesPerElement=16,Vr("StructArrayLayout2f1f2i16",ho);var mo,yo=((mo=zn)&&(_o.__proto__=mo),((_o.prototype=Object.create(mo&&mo.prototype)).constructor=_o).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_o.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},_o.prototype.emplace=function(t,e,i,r,n){var o=12*t,a=3*t;return this.uint8[0+o]=e,this.uint8[1+o]=i,this.float32[1+a]=r,this.float32[2+a]=n,t},_o);function _o(){mo.apply(this,arguments)}yo.prototype.bytesPerElement=12,Vr("StructArrayLayout2ub2f12",yo);var go,vo=((go=zn)&&(xo.__proto__=go),((xo.prototype=Object.create(go&&go.prototype)).constructor=xo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},xo.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},xo.prototype.emplace=function(t,e,i,r){var n=3*t;return this.uint16[0+n]=e,this.uint16[1+n]=i,this.uint16[2+n]=r,t},xo);function xo(){go.apply(this,arguments)}vo.prototype.bytesPerElement=6,Vr("StructArrayLayout3ui6",vo);var bo,M=((bo=zn)&&(wo.__proto__=bo),((wo.prototype=Object.create(bo&&bo.prototype)).constructor=wo).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)},wo.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m,y){var _=this.length;return this.resize(_+1),this.emplace(_,t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m,y)},wo.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m,y,_){var g=24*t,v=12*t,x=48*t;return this.int16[0+g]=e,this.int16[1+g]=i,this.uint16[2+g]=r,this.uint16[3+g]=n,this.uint32[2+v]=o,this.uint32[3+v]=a,this.uint32[4+v]=s,this.uint16[10+g]=l,this.uint16[11+g]=u,this.uint16[12+g]=c,this.float32[7+v]=p,this.float32[8+v]=h,this.uint8[36+x]=f,this.uint8[37+x]=d,this.uint8[38+x]=m,this.uint32[10+v]=y,this.int16[22+g]=_,t},wo);function wo(){bo.apply(this,arguments)}M.prototype.bytesPerElement=48,Vr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",M);var So,J=((So=zn)&&(To.__proto__=So),((To.prototype=Object.create(So&&So.prototype)).constructor=To).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)}
1,To.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m,y,_,g,v,x,b,w,S,T,I,E,A){var z=this.length;return this.resize(z+1),this.emplace(z,t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m,y,_,g,v,x,b,w,S,T,I,E,A)},To.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m,y,_,g,v,x,b,w,S,T,I,E,A,z){var P=34*t,C=17*t;return this.int16[0+P]=e,this.int16[1+P]=i,this.int16[2+P]=r,this.int16[3+P]=n,this.int16[4+P]=o,this.int16[5+P]=a,this.int16[6+P]=s,this.int16[7+P]=l,this.uint16[8+P]=u,this.uint16[9+P]=c,this.uint16[10+P]=p,this.uint16[11+P]=h,this.uint16[12+P]=f,this.uint16[13+P]=d,this.uint16[14+P]=m,this.uint16[15+P]=y,this.uint16[16+P]=_,this.uint16[17+P]=g,this.uint16[18+P]=v,this.uint16[19+P]=x,this.uint16[20+P]=b,this.uint16[21+P]=w,this.uint16[22+P]=S,this.uint32[12+C]=T,this.float32[13+C]=I,this.float32[14+C]=E,this.float32[15+C]=A,this.float32[16+C]=z,t},To);function To(){So.apply(this,arguments)}J.prototype.bytesPerElement=68,Vr("StructArrayLayout8i15ui1ul4f68",J);var Io,Eo=((Io=zn)&&(Ao.__proto__=Io),((Ao.prototype=Object.create(Io&&Io.prototype)).constructor=Ao).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Ao.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Ao.prototype.emplace=function(t,e){return this.float32[+t+0]=e,t},Ao);function Ao(){Io.apply(this,arguments)}Eo.prototype.bytesPerElement=4,Vr("StructArrayLayout1f4",Eo);var zo,it=((zo=zn)&&(Po.__proto__=zo),((Po.prototype=Object.create(zo&&zo.prototype)).constructor=Po).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Po.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},Po.prototype.emplace=function(t,e,i,r){var n=3*t;return this.int16[0+n]=e,this.int16[1+n]=i,this.int16[2+n]=r,t},Po);function Po(){zo.apply(this,arguments)}it.prototype.bytesPerElement=6,Vr("StructArrayLayout3i6",it);var Co,et=((Co=zn)&&(ko.__proto__=Co),((ko.prototype=Object.create(Co&&Co.prototype)).constructor=ko).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},ko.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},ko.prototype.emplace=function(t,e,i,r){var n=4*t;return this.uint32[2*t+0]=e,this.uint16[2+n]=i,this.uint16[3+n]=r,t},ko);function ko(){Co.apply(this,arguments)}et.prototype.bytesPerElement=8,Vr("StructArrayLayout1ul2ui8",et);var Mo,Do=((Mo=zn)&&(Lo.__proto__=Mo),((Lo.prototype=Object.create(Mo&&Mo.prototype)).constructor=Lo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Lo.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Lo.prototype.emplace=function(t,e,i){var r=2*t;return this.uint16[0+r]=e,this.uint16[1+r]=i,t},Lo);function Lo(){Mo.apply(this,arguments)}Do.prototype.bytesPerElement=4,Vr("StructArrayLayout2ui4",Do);var Bo,nt=((Bo=zn)&&(Ro.__proto__=Bo),((Ro.prototype=Object.create(Bo&&Bo.prototype)).constructor=Ro).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Ro.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Ro.prototype.emplace=function(t,e){return this.uint16[+t+0]=e,t},Ro);function Ro(){Bo.apply(this,arguments)}nt.prototype.bytesPerElement=2,Vr("StructArrayLayout1ui2",nt);var Fo,Oo=((Fo=zn)&&(Uo.__proto__=Fo),((Uo.prototype=Object.create(Fo&&Fo.prototype)).constructor=Uo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Uo.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},Uo.prototype.emplace=function(t,e,i,r,n){var o=4*t;return this.float32[0+o]=e,this.float32[1+o]=i,this.float32[2+o]=r,this.float32[3+o]=n,t},Uo);function Uo(){Fo.apply(this,arguments)}Oo.prototype.bytesPerElement=16,Vr("StructArrayLayout4f16",Oo);var Vo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var i={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 i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]}
1,i.anchorPoint.get=function(){return new st(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,i),e}(An);Vo.prototype.size=20;var No,jo=((No=ao)&&(qo.__proto__=No),((qo.prototype=Object.create(No&&No.prototype)).constructor=qo).prototype.get=function(t){return new Vo(this,t)},qo);function qo(){No.apply(this,arguments)}Vr("CollisionBoxArray",jo);var Zo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var i={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 i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,i),e}(An);Zo.prototype.size=48;var Go,Xo=((Go=M)&&(Wo.__proto__=Go),((Wo.prototype=Object.create(Go&&Go.prototype)).constructor=Wo).prototype.get=function(t){return new Zo(this,t)},Wo);function Wo(){Go.apply(this,arguments)}Vr("PlacedSymbolArray",Xo);var Ko=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var i={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 i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]}
1,i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},i.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},i.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,i),e}(An);Ko.prototype.size=68;var Ho,Jo=((Ho=J)&&(Yo.__proto__=Ho),((Yo.prototype=Object.create(Ho&&Ho.prototype)).constructor=Yo).prototype.get=function(t){return new Ko(this,t)},Yo);function Yo(){Ho.apply(this,arguments)}Vr("SymbolInstanceArray",Jo);var Qo,$o=((Qo=Eo)&&(ta.__proto__=Qo),((ta.prototype=Object.create(Qo&&Qo.prototype)).constructor=ta).prototype.getoffsetX=function(t){return this.float32[+t+0]},ta);function ta(){Qo.apply(this,arguments)}Vr("GlyphOffsetArray",$o);var ea,ia=((ea=it)&&(ra.__proto__=ea),((ra.prototype=Object.create(ea&&ea.prototype)).constructor=ra).prototype.getx=function(t){return this.int16[3*t+0]},ra.prototype.gety=function(t){return this.int16[3*t+1]},ra.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},ra);function ra(){ea.apply(this,arguments)}Vr("SymbolLineVertexArray",ia);var na=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,i),e}(An);na.prototype.size=8;var oa,aa=((oa=et)&&(sa.__proto__=oa),((sa.prototype=Object.create(oa&&oa.prototype)).constructor=sa).prototype.get=function(t){return new na(this,t)},sa);function sa(){oa.apply(this,arguments)}Vr("FeatureIndexArray",aa);function la(t){void 0===t&&(t=[]),this.segments=t}var ua=Cn([{name:"a_pos",components:2,type:"Int16"}],4).members;function ca(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}la.prototype.prepareSegment=function(t,e,i,r){var n=this.segments[this.segments.length-1];return la.MAX_VERTEX_ARRAY_LENGTH<t&&lt("Max vertices per segment is "+la.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>la.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==r)&&(n={vertexOffset:e.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==r&&(n.sortKey=r),this.segments.push(n)),n},la.prototype.get=function(){return this.segments},la.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var i,r=e[t];for(i in r.vaos)r.vaos[i].destroy()}},la.simpleSegment=function(t,e,i,r){return new la([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])},la.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Vr("SegmentVector",la);var pa=Cn([{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"}]),wi=e(function(t){t.exports=function(t,e){for(var i,r,n,o=t.length-(i=3&t.length),a=e,s=3432918353,l=461845907,u=0;u<o;)n=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,a=27492+(65535&(r=5*(65535&(a=(a^=n=(65535&(n=(n=(65535&n)*s+(((n>>>16)*s&65535)<<16)&4294967295)<<15|n>>>17))*l+(((n>>>16)*l&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(n=0,i){case 3:n^=(255&t.charCodeAt(u+2))<<16;case 2:n^=(255&t.charCodeAt(u+1))<<8;case 1:a^=n=(65535&(n=(n=(65535&(n^=255&t.charCodeAt(u)))*s+(((n>>>16)*s&65535)<<16)&4294967295)<<15|n>>>17))*l+(((n>>>16)*l&65535)<<16)&4294967295}
1return a^=t.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}}),Si=e(function(t){t.exports=function(t,e){for(var i,r=t.length,n=e^r,o=0;4<=r;)i=1540483477*(65535&(i=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(i>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16),r-=4,++o;switch(r){case 3:n^=(255&t.charCodeAt(o+2))<<16;case 2:n^=(255&t.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}}),ha=wi,Ii=Si;ha.murmur3=wi,ha.murmur2=Ii;function fa(){this.ids=[],this.positions=[],this.indexed=!1}fa.prototype.add=function(t,e,i,r){this.ids.push(ma(t)),this.positions.push(e,i,r)},fa.prototype.getPositions=function(t){for(var e=ma(t),i=0,r=this.ids.length-1;i<r;){var n=i+r>>1;this.ids[n]>=e?r=n:i=1+n}for(var o=[];this.ids[i]===e;)o.push({index:this.positions[3*i],start:this.positions[3*i+1],end:this.positions[3*i+2]}),i++;return o},fa.serialize=function(t,e){var i=new Float64Array(t.ids),t=new Uint32Array(t.positions);return function t(e,i,r,n){for(;r<n;){for(var o=e[r+n>>1],a=r-1,s=n+1;;){for(;a++,e[a]<o;);for(;s--,e[s]>o;);if(s<=a)break;ya(e,a,s),ya(i,3*a,3*s),ya(i,3*a+1,3*s+1),ya(i,3*a+2,3*s+2)}s-r<n-s?(t(e,i,r,s),r=s+1):(t(e,i,s+1,n),n=s)}}(i,t,0,i.length-1),e&&e.push(i.buffer,t.buffer),{ids:i,positions:t}},fa.deserialize=function(t){var e=new fa;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var da=Math.pow(2,53)-1;function ma(t){var e=+t;return!isNaN(e)&&e<=da?e:ha(String(t))}function ya(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}Vr("FeaturePositionMap",fa);var _a,ga,va,xa,ba,wa,Sa,Ti=function(t,e){this.gl=t.gl,this.location=e},Ai=((Sa=Ti)&&(La.__proto__=Sa),((La.prototype=Object.create(Sa&&Sa.prototype)).constructor=La).prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},La),Ta=((wa=Ti)&&(Da.__proto__=wa),((Da.prototype=Object.create(wa&&wa.prototype)).constructor=Da).prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},Da),Ei=((ba=Ti)&&(Ma.__proto__=ba),((Ma.prototype=Object.create(ba&&ba.prototype)).constructor=Ma).prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},Ma),zn=((xa=Ti)&&(ka.__proto__=xa),((ka.prototype=Object.create(xa&&xa.prototype)).constructor=ka).prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},ka),Ia=((va=Ti)&&(Ca.__proto__=va),((Ca.prototype=Object.create(va&&va.prototype)).constructor=Ca).prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},Ca),Ea=((ga=Ti)&&(Pa.__proto__=ga),((Pa.prototype=Object.create(ga&&ga.prototype)).constructor=Pa).prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},Pa),Aa=new Float32Array(16),ao=((_a=Ti)&&(za.__proto__=_a),((za.prototype=Object.create(_a&&_a.prototype)).constructor=za).prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},za);function za(t,e){_a.call(this,t,e),this.current=Aa}function Pa(t,e){ga.call(this,t,e),this.current=ue.transparent}function Ca(t,e){va.call(this,t,e),this.current=[0,0,0,0]}function ka(t,e){xa.call(this,t,e),this.current=[0,0,0]}function Ma(t,e){ba.call(this,t,e),this.current=[0,0]}function Da(t,e){wa.call(this,t,e),this.current=0}function La(t,e){Sa.call(this,t,e),this.current=0}function Ba(t){return[ca(255*t.r,255*t.g),ca(255*t.b,255*t.a)]}function Ra(t,e,i){this.value=t,this.uniformNames=e.map(function(t){return"u_"+t}),this.type=i}
1Ra.prototype.setUniform=function(t,e,i){t.set(i.constantOr(this.value))},Ra.prototype.getBinding=function(t,e,i){return new("color"===this.type?Ea:Ta)(t,e)};function Fa(t,e){this.uniformNames=e.map(function(t){return"u_"+t}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}Fa.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr},Fa.prototype.setUniform=function(t,e,i,r){r="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;r&&t.set(r)},Fa.prototype.getBinding=function(t,e,i){return new("u_pattern"===i.substr(0,9)?Ia:Ta)(t,e)};function Oa(t,e,i,r){this.expression=t,this.type=i,this.maxValue=0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===i?2:1,offset:0}}),this.paintVertexArray=new r}Oa.prototype.populatePaintArray=function(t,e,i,r,n){var o=this.paintVertexArray.length,n=this.expression.evaluate(new on(0),e,{},r,[],n);this.paintVertexArray.resize(t),this._setPaintValue(o,t,n)},Oa.prototype.updatePaintArray=function(t,e,i,r){r=this.expression.evaluate({zoom:0},i,r);this._setPaintValue(t,e,r)},Oa.prototype._setPaintValue=function(t,e,i){if("color"===this.type)for(var r=Ba(i),n=t;n<e;n++)this.paintVertexArray.emplace(n,r[0],r[1]);else{for(var o=t;o<e;o++)this.paintVertexArray.emplace(o,i);this.maxValue=Math.max(this.maxValue,Math.abs(i))}},Oa.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Oa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};function Ua(t,e,i,r,n,o){this.expression=t,this.uniformNames=e.map(function(t){return"u_"+t+"_t"}),this.type=i,this.useIntegerZoom=r,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===i?4:2,offset:0}}),this.paintVertexArray=new o}Ua.prototype.populatePaintArray=function(t,e,i,r,n){var o=this.expression.evaluate(new on(this.zoom),e,{},r,[],n),r=this.expression.evaluate(new on(this.zoom+1),e,{},r,[],n),n=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(n,t,o,r)},Ua.prototype.updatePaintArray=function(t,e,i,r){var n=this.expression.evaluate({zoom:this.zoom},i,r),r=this.expression.evaluate({zoom:this.zoom+1},i,r);this._setPaintValue(t,e,n,r)},Ua.prototype._setPaintValue=function(t,e,i,r){if("color"===this.type)for(var n=Ba(i),o=Ba(r),a=t;a<e;a++)this.paintVertexArray.emplace(a,n[0],n[1],o[0],o[1]);else{for(var s=t;s<e;s++)this.paintVertexArray.emplace(s,i,r);this.maxValue=Math.max(this.maxValue,Math.abs(i),Math.abs(r))}},Ua.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ua.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ua.prototype.setUniform=function(t,e){e=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,e=u(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1);t.set(e)},Ua.prototype.getBinding=function(t,e,i){return new Ta(t,e)};function Va(t,e,i,r,n,o){this.expression=t,this.type=e,this.useIntegerZoom=i,this.zoom=r,this.layerId=o,this.zoomInPaintVertexArray=new n,this.zoomOutPaintVertexArray=new n}Va.prototype.populatePaintArray=function(t,e,i){var r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(r,t,e.patterns&&e.patterns[this.layerId],i)}
1,Va.prototype.updatePaintArray=function(t,e,i,r,n){this._setPaintValues(t,e,i.patterns&&i.patterns[this.layerId],n)},Va.prototype._setPaintValues=function(t,e,i,r){if(r&&i){var n=r[i.min],o=r[i.mid],a=r[i.max];if(n&&o&&a)for(var s=t;s<e;s++)this.zoomInPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],n.tl[0],n.tl[1],n.br[0],n.br[1],o.pixelRatio,n.pixelRatio),this.zoomOutPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],a.tl[0],a.tl[1],a.br[0],a.br[1],o.pixelRatio,a.pixelRatio)}},Va.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,pa.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,pa.members,this.expression.isStateDependent))},Va.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};function Na(t,e,i){this.binders={},this._buffers=[];var r,n,o,a,s,l,u,c=[];for(r in t.paint._values)!i(r)||(a=t.paint.get(r))instanceof dn&&Bi(a.property.specification)&&(l=r,u=t.type,n={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[l]||[l.replace(u+"-","").replace(/-/g,"_")],o=a.value,l=a.property.specification.type,u=a.property.useIntegerZoom,a="cross-faded"===(a=a.property.specification["property-type"])||"cross-faded-data-driven"===a,"constant"===o.kind?(this.binders[r]=a?new Fa(o.value,n):new Ra(o.value,n,l),c.push("/u_"+r)):"source"===o.kind||a?(s=qa(r,l,"source"),this.binders[r]=a?new Va(o,l,u,e,s,t.id):new Oa(o,n,l,s),c.push("/a_"+r)):(s=qa(r,l,"composite"),this.binders[r]=new Ua(o,n,l,u,e,s),c.push("/z_"+r)));this.cacheKey=c.sort().join("")}Na.prototype.getMaxValue=function(t){t=this.binders[t];return t instanceof Oa||t instanceof Ua?t.maxValue:0},Na.prototype.populatePaintArrays=function(t,e,i,r,n){for(var o in this.binders){var a=this.binders[o];(a instanceof Oa||a instanceof Ua||a instanceof Va)&&a.populatePaintArray(t,e,i,r,n)}},Na.prototype.setConstantPatternPositions=function(t,e){for(var i in this.binders){var r=this.binders[i];r instanceof Fa&&r.setConstantPatternPositions(t,e)}},Na.prototype.updatePaintArrays=function(t,e,i,r,n){var o,a=!1;for(o in t)for(var s=0,l=e.getPositions(o);s<l.length;s+=1){var u,c=l[s],p=i.feature(c.index);for(u in this.binders){var h,f=this.binders[u];(f instanceof Oa||f instanceof Ua||f instanceof Va)&&!0===f.expression.isStateDependent&&(h=r.paint.get(u),f.expression=h.value,f.updatePaintArray(c.start,c.end,p,t[o],n),a=!0)}}return a},Na.prototype.defines=function(){var t,e=[];for(t in this.binders){var i=this.binders[t];(i instanceof Ra||i instanceof Fa)&&e.push.apply(e,i.uniformNames.map(function(t){return"#define HAS_UNIFORM_"+t}))}return e},Na.prototype.getBinderAttributes=function(){var t,e=[];for(t in this.binders){var i=this.binders[t];if(i instanceof Oa||i instanceof Ua)for(var r=0;r<i.paintVertexAttributes.length;r++)e.push(i.paintVertexAttributes[r].name);else if(i instanceof Va)for(var n=0;n<pa.members.length;n++)e.push(pa.members[n].name)}return e},Na.prototype.getBinderUniforms=function(){var t,e=[];for(t in this.binders){var i=this.binders[t];if(i instanceof Ra||i instanceof Fa||i instanceof Ua)for(var r=0,n=i.uniformNames;r<n.length;r+=1)e.push(n[r])}return e},Na.prototype.getPaintVertexBuffers=function(){return this._buffers},Na.prototype.getUniforms=function(t,e){var i,r=[];for(i in this.binders){var n=this.binders[i];if(n instanceof Ra||n instanceof Fa||n instanceof Ua)for(var o=0,a=n.uniformNames;o<a.length;o+=1){var s,l=a[o];e[l]&&(s=n.getBinding(t,e[l],l),r.push({name:l,property:i,binding:s}))}}return r}
vendor: 4,846 bytes, line 1
1,Na.prototype.setUniforms=function(t,e,i,r){for(var n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.name,l=a.property;this.binders[l].setUniform(a.binding,r,i.get(l),s)}},Na.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var i,r=this.binders[e];t&&r instanceof Va?(i=2===t.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer)&&this._buffers.push(i):(r instanceof Oa||r instanceof Ua)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},Na.prototype.upload=function(t){for(var e in this.binders){var i=this.binders[e];(i instanceof Oa||i instanceof Ua||i instanceof Va)&&i.upload(t)}this.updatePaintBuffers()},Na.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof Oa||e instanceof Ua||e instanceof Va)&&e.destroy()}};function ja(t,e,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var r=0,n=t;r<n.length;r+=1){var o=n[r];this.programConfigurations[o.id]=new Na(o,e,i)}this.needsUpload=!1,this._featureMap=new fa,this._bufferOffset=0}function qa(t,e,i){var r={color:{source:Gn,composite:Oo},number:{source:Eo,composite:Gn}},t={"line-pattern":{source:Kn,composite:Kn},"fill-pattern":{source:Kn,composite:Kn},"fill-extrusion-pattern":{source:Kn,composite:Kn}}[t];return t&&t[i]||r[e][i]}ja.prototype.populatePaintArrays=function(t,e,i,r,n,o){for(var a in this.programConfigurations)this.programConfigurations[a].populatePaintArrays(t,e,r,n,o);void 0!==e.id&&this._featureMap.add(e.id,i,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0},ja.prototype.updatePaintArrays=function(t,e,i,r){for(var n=0,o=i;n<o.length;n+=1){var a=o[n];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,this._featureMap,e,a,r)||this.needsUpload}},ja.prototype.get=function(t){return this.programConfigurations[t]},ja.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},ja.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Vr("ConstantBinder",Ra),Vr("CrossFadedConstantBinder",Fa),Vr("SourceExpressionBinder",Oa),Vr("CrossFadedCompositeBinder",Va),Vr("CompositeExpressionBinder",Ua),Vr("ProgramConfiguration",Na,{omit:["_buffers"]}),Vr("ProgramConfigurationSet",ja);var Za=Math.pow(2,14)-1,Ga=-Za-1;function Xa(t){for(var e=8192/t.extent,i=t.loadGeometry(),r=0;r<i.length;r++)for(var n=i[r],o=0;o<n.length;o++){var a=n[o],s=Math.round(a.x*e),l=Math.round(a.y*e);a.x=u(s,Ga,Za),a.y=u(l,Ga,Za),(s<a.x||s>a.x+1||l<a.y||l>a.y+1)&&lt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return i}function Wa(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Xa(t):[]}}function Ka(t,e,i,r,n){t.emplaceBack(2*e+(r+1)/2,2*i+(n+1)/2)}function Ha(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Dn,this.indexArray=new vo,this.segments=new la,this.programConfigurations=new ja(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})}function Ja(t,e){for(var i=0;i<t.length;i++)if(is(e,t[i]))return!0;for(var r=0;r<e.length;r++)if(is(t,e[r]))return!0;return!!Qa(t,e)}function Ya(t,e){if(1===t.length)return es(e,t[0]);for(var i=0;i<e.length;i++)for(var r=e[i],n=0;n<r.length;n++)if(is(t,r[n]))return!0;for(var o=0;o<t.length;o++)if(es(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(Qa(t,e[a]))return!0;return!1}function Qa(t,e){if(0!==t.length&&0!==e.length)for(var i,r,n,o,a=0;a<t.length-1;a++)for(var s=t[a],l=t[a+1],u=0;u<e.length-1;u++)if(i=s,r=l,n=e[u],o=e[u+1],w(i,n,o)!==w(r,n,o)&&w(i,r,n)!==w(i,r,o))return 1}function $a(t,e,i){var r=i*i;if(1===e.length)return t.distSqr(e[0])<r;for(var n=1;n<e.length;n++)if(ts(t,e[n-1],e[n])<r)return 1}function ts(t,e,i){var r=e.distSqr(i);if(0===r)return t.distSqr(e);r=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/r;return t.distSqr(r<0?e:1<r?i:i.sub(e)._mult(r)._add(e))}function es(t,e){for(var i,r,n,o=!1,a=0;a<t.length;a++)for(var s=0,l=(i=t[a]).length-1;s<i.length;l=s++)(r=i[s]).y>e.y!=(n=i[l]).y>e.y&&e.x<(n.x-r.x)*(e.y-r.y)/(n.y-r.y)+r.x&&(o=!o);return o}function is(t,e){for(var i=!1,r=0,n=t.length-1;r<t.length;n=r++){var o=t[r],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}function rs(t,e,i){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:i.programConfigurations.get(e.id).getMaxValue(t)}function ns(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function os(t,e,i,r,n){if(!e[0]&&!e[1])return t;var o=st.convert(e)._mult(n);"viewport"===i&&o._rotate(-r);for(var a=[],s=0;s<t.length;s++)a.push(t[s].sub(o));return a}
1Ha.prototype.populate=function(t,e,i){var r=this.layers[0],n=[],o=null;"circle"===r.type&&(o=r.layout.get("circle-sort-key"));for(var a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.feature,c=l.id,p=l.index,h=l.sourceLayerIndex,f=this.layers[0]._featureFilter.needGeometry,d=Wa(u,f);this.layers[0]._featureFilter.filter(new on(this.zoom),d,i)&&(l=o?o.evaluate(d,{},i):void 0,l={id:c,properties:u.properties,type:u.type,sourceLayerIndex:h,index:p,geometry:f?d.geometry:Xa(u),patterns:{},sortKey:l},n.push(l))}o&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var m=0,y=n;m<y.length;m+=1){var _=y[m],g=_.geometry,v=_.index,x=_.sourceLayerIndex,b=t[v].feature;this.addFeature(_,g,v,i),e.featureIndex.insert(b,g,v,x,this.index)}},Ha.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},Ha.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ha.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ha.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ua),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ha.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ha.prototype.addFeature=function(t,e,i,r){for(var n=0,o=e;n<o.length;n+=1)for(var a=0,s=o[n];a<s.length;a+=1){var l,u=s[a],c=u.x,p=u.y;c<0||8192<=c||p<0||8192<=p||(u=(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey)).vertexLength,Ka(this.layoutVertexArray,c,p,-1,-1),Ka(this.layoutVertexArray,c,p,1,-1),Ka(this.layoutVertexArray,c,p,1,1),Ka(this.layoutVertexArray,c,p,-1,1),this.indexArray.emplaceBack(u,u+1,u+2),this.indexArray.emplaceBack(u,u+3,u+2),l.vertexLength+=4,l.primitiveLength+=2)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{},r)},Vr("CircleBucket",Ha,{omit:["layers"]});var M=new Sn({"circle-sort-key":new _n(Rt.layout_circle["circle-sort-key"])}),as={paint:new Sn({"circle-radius":new _n(Rt.paint_circle["circle-radius"]),"circle-color":new _n(Rt.paint_circle["circle-color"]),"circle-blur":new _n(Rt.paint_circle["circle-blur"]),"circle-opacity":new _n(Rt.paint_circle["circle-opacity"]),"circle-translate":new yn(Rt.paint_circle["circle-translate"]),"circle-translate-anchor":new yn(Rt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new yn(Rt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new yn(Rt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _n(Rt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _n(Rt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _n(Rt.paint_circle["circle-stroke-opacity"])}),layout:M},ss="undefined"!=typeof Float32Array?Float32Array:Array;function ls(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function us(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],_=e[14],g=e[15],v=i[0],x=i[1],b=i[2],e=i[3];return t[0]=v*r+x*s+b*p+e*m,t[1]=v*n+x*l+b*h+e*y,t[2]=v*o+x*u+b*f+e*_,t[3]=v*a+x*c+b*d+e*g,t[4]=(v=i[4])*r+(x=i[5])*s+(b=i[6])*p+(e=i[7])*m,t[5]=v*n+x*l+b*h+e*y,t[6]=v*o+x*u+b*f+e*_,t[7]=v*a+x*c+b*d+e*g,t[8]=(v=i[8])*r+(x=i[9])*s+(b=i[10])*p+(e=i[11])*m,t[9]=v*n+x*l+b*h+e*y,t[10]=v*o+x*u+b*f+e*_,t[11]=v*a+x*c+b*d+e*g,t[12]=(v=i[12])*r+(x=i[13])*s+(b=i[14])*p+(e=i[15])*m,t[13]=v*n+x*l+b*h+e*y,t[14]=v*o+x*u+b*f+e*_,t[15]=v*a+x*c+b*d+e*g,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,i=arguments.length;i--;)e+=t[i]*t[i];return Math.sqrt(e)});J=us;function cs(t,e,i){var r=e[0],n=e[1],o=e[2],e=e[3];return t[0]=i[0]*r+i[4]*n+i[8]*o+i[12]*e,t[1]=i[1]*r+i[5]*n+i[9]*o+i[13]*e,t[2]=i[2]*r+i[6]*n+i[10]*o+i[14]*e,t[3]=i[3]*r+i[7]*n+i[11]*o+i[15]*e,t}it=new ss(3),ss!=Float32Array&&(it[0]=0,it[1]=0,it[2]=0),An=new ss(4),ss!=Float32Array&&(An[0]=0,An[1]=0,An[2]=0,An[3]=0);var ps,Si=(et=new ss(2),ss!=Float32Array&&(et[0]=0,et[1]=0),(ps=In)&&(hs.__proto__=ps),((hs.prototype=Object.create(ps&&ps.prototype)).constructor=hs).prototype.createBucket=function(t){return new Ha(t)},hs.prototype.queryRadius=function(t){return rs("circle-radius",this,t)+rs("circle-stroke-width",this,t)+ns(this.paint.get("circle-translate"))}
1,hs.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a,s){for(var l,t=os(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),i=this.paint.get("circle-radius").evaluate(e,i)+this.paint.get("circle-stroke-width").evaluate(e,i),u="map"===this.paint.get("circle-pitch-alignment"),c=u?t:(l=s,t.map(function(t){return fs(t,l)})),p=u?i*a:i,h=0,f=r;h<f.length;h+=1)for(var d=0,m=f[h];d<m.length;d+=1){var y=m[d],_=u?y:fs(y,s),g=p,y=cs([],[y.x,y.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?g*=y[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(g*=o.cameraToCenterDistance/y[3]),y=g,is(g=c,_=_)||$a(_,g,y))return!0}return!1},hs);function hs(t){ps.call(this,t,as)}function fs(t,e){e=cs([],[t.x,t.y,0,1],e);return new st(e[0]/e[3],e[1]/e[3])}var ds,ms=((ds=Ha)&&(ys.__proto__=ds),(ys.prototype=Object.create(ds&&ds.prototype)).constructor=ys);function ys(){ds.apply(this,arguments)}function _s(t,e,i,r){var n=e.width,e=e.height;if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==n*e*i)throw new RangeError("mismatched image size")}else r=new Uint8Array(n*e*i);return t.width=n,t.height=e,t.data=r,t}function gs(t,e,i){var r=e.width,n=e.height;r===t.width&&n===t.height||(vs(t,e=_s({},{width:r,height:n},i),{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,r),height:Math.min(t.height,n)},i),t.width=r,t.height=n,t.data=e.data)}function vs(t,e,i,r,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<n.height;l++)for(var u=((i.y+l)*t.width+i.x)*o,c=((r.y+l)*e.width+r.x)*o,p=0;p<n.width*o;p++)s[c+p]=a[u+p];return e}Vr("HeatmapBucket",ms,{omit:["layers"]});var xs=function(t,e){_s(this,t,1,e)};xs.prototype.resize=function(t){gs(this,t,1)},xs.prototype.clone=function(){return new xs({width:this.width,height:this.height},new Uint8Array(this.data))},xs.copy=function(t,e,i,r,n){vs(t,e,i,r,n,1)};function bs(t,e){_s(this,t,4,e)}bs.prototype.resize=function(t){gs(this,t,4)},bs.prototype.replace=function(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t},bs.prototype.clone=function(){return new bs({width:this.width,height:this.height},new Uint8Array(this.data))},bs.copy=function(t,e,i,r,n){vs(t,e,i,r,n,4)},Vr("AlphaImage",xs),Vr("RGBAImage",bs);var ws={paint:new Sn({"heatmap-radius":new _n(Rt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new _n(Rt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new yn(Rt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new wn(Rt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new yn(Rt.paint_heatmap["heatmap-opacity"])})};function Ss(r){function t(t,e,i){n[r.evaluationKey]=i,i=r.expression.evaluate(n),o.data[t+e+0]=Math.floor(255*i.r/i.a),o.data[t+e+1]=Math.floor(255*i.g/i.a),o.data[t+e+2]=Math.floor(255*i.b/i.a),o.data[t+e+3]=Math.floor(255*i.a)}var n={},e=r.resolution||256,i=r.clips?r.clips.length:1,o=r.image||new bs({width:e,height:i});if(r.clips)for(var a=0,s=0;a<i;++a,s+=4*e)for(var l=0,u=0;l<e;l++,u+=4){var c=l/(e-1),p=r.clips[a];t(s,u,p.start*(1-c)+p.end*c)}else for(var h=0,f=0;h<e;h++,f+=4)t(0,f,h/(e-1));return o}var Ts,Is,wi=((Is=In)&&(Cs.__proto__=Is),((Cs.prototype=Object.create(Is&&Is.prototype)).constructor=Cs).prototype.createBucket=function(t){return new ms(t)},Cs.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},Cs.prototype._updateColorRamp=function(){this.colorRamp=Ss({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},Cs.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},Cs.prototype.queryRadius=function(){return 0},Cs.prototype.queryIntersectsFeature=function(){return!1},Cs.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},Cs),Es={paint:new Sn({"hillshade-illumination-direction":new yn(Rt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new yn(Rt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new yn(Rt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new yn(Rt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new yn(Rt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new yn(Rt.paint_hillshade["hillshade-accent-color"])})},Ii=((Ts=In)&&(Ps.__proto__=Ts),((Ps.prototype=Object.create(Ts&&Ts.prototype)).constructor=Ps).prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},Ps),As=Cn([{name:"a_pos",components:2,type:"Int16"}],4).members,zs=ks,Ti=ks;function Ps(t){Ts.call(this,t,Es)}function Cs(t){Is.call(this,t,ws),this._updateColorRamp()}function ks(t,e,i){i=i||2;var r,n,o,a,s,l,u,c=e&&e.length,p=c?e[0]*i:t.length,h=Ms(t,0,p,i,!0),f=[];if(!h||h.next===h.prev)return f;
1if(c&&(h=function(t,e,i,r){for(var n,o,a,s=[],l=0,u=e.length;l<u;l++)(n=Ms(t,e[l]*r,l<u-1?e[l+1]*r:t.length,r,!1))===n.next&&(n.steiner=!0),s.push(function(t){var e=t,i=t;for(;(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next,e!==t;);return i}(n));for(s.sort(Bs),l=0;l<s.length;l++)o=s[l],(a=function(t,e){var i,r=e,n=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&a<s){if((a=s)===n){if(o===r.y)return r;if(o===r.next.y)return r.next}i=r.x<r.next.x?r:r.next}}}while((r=r.next)!==e);if(!i)return null;if(n===a)return i;for(var l,u,c,p=i,h=i.x,f=i.y,d=1/0,r=i;n>=r.x&&r.x>=h&&n!==r.x&&Fs(o<f?n:a,o,h,f,o<f?a:n,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(n-r.x),qs(r,t)&&(l<d||l===d&&(r.x>i.x||r.x===i.x&&(c=r,Os((u=i).prev,u,c.prev)<0&&Os(c.next,u,u.next)<0)))&&(i=r,d=l)),r=r.next,r!==p;);return i}(o,a=i))&&(o=Zs(a,o),Ds(a,a.next),Ds(o,o.next)),i=Ds(i,i.next);return i}(t,e,h,i)),t.length>80*i){r=o=t[0],n=a=t[1];for(var d=i;d<p;d+=i)(s=t[d])<r&&(r=s),(l=t[d+1])<n&&(n=l),o<s&&(o=s),a<l&&(a=l);u=0!==(u=Math.max(o-r,a-n))?1/u:0}return Ls(h,f,i,r,n,u),f}function Ms(t,e,i,r,n){var o,a;if(n===0<Ks(t,e,i,r))for(o=e;o<i;o+=r)a=Gs(o,t[o],t[o+1],a);else for(o=i-r;e<=o;o-=r)a=Gs(o,t[o],t[o+1],a);return a&&Us(a,a.next)&&(Xs(a),a=a.next),a}function Ds(t,e){if(!t)return t;e=e||t;var i,r=t;do{if(i=!1,r.steiner||!Us(r,r.next)&&0!==Os(r.prev,r,r.next))r=r.next;else{if(Xs(r),(r=e=r.prev)===r.next)break;i=!0}}while(i||r!==e);return e}
1function Ls(t,e,i,r,n,o,a){if(t){!a&&o&&function(t,e,i,r){for(var n=t;null===n.z&&(n.z=Rs(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next,n!==t;);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,r,n,o,a,s,l,u=1;do{for(i=t,o=t=null,a=0;i;){for(a++,r=i,e=s=0;e<u&&(s++,r=r.nextZ);e++);for(l=u;0<s||0<l&&r;)0!==s&&(0===l||!r||i.z<=r.z)?(i=(n=i).nextZ,s--):(r=(n=r).nextZ,l--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;i=r}}while(o.nextZ=null,u*=2,1<a)}(n)}(t,r,n,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?function(t,e,i,r){var n=t.prev,o=t,a=t.next;if(0<=Os(n,o,a))return!1;for(var s=(n.x>o.x?n.x>a.x?n:a:o.x>a.x?o:a).x,l=(n.y>o.y?n.y>a.y?n:a:o.y>a.y?o:a).y,u=Rs((n.x<o.x?n.x<a.x?n:a:o.x<a.x?o:a).x,(n.y<o.y?n.y<a.y?n:a:o.y<a.y?o:a).y,e,i,r),c=Rs(s,l,e,i,r),p=t.prevZ,h=t.nextZ;p&&p.z>=u&&h&&h.z<=c;){if(p!==t.prev&&p!==t.next&&Fs(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=Os(p.prev,p,p.next))return!1;if(p=p.prevZ,h!==t.prev&&h!==t.next&&Fs(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&0<=Os(h.prev,h,h.next))return!1;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Fs(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=Os(p.prev,p,p.next))return!1;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&Fs(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&0<=Os(h.prev,h,h.next))return!1;h=h.nextZ}return!0}(t,r,n,o):function(t){var e=t.prev,i=t,r=t.next;if(0<=Os(e,i,r))return!1;for(var n=t.next.next;n!==t.prev;){if(Fs(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&0<=Os(n.prev,n,n.next))return!1;n=n.next}return!0}(t))e.push(s.i/i),e.push(t.i/i),e.push(l.i/i),Xs(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Ls(t=function(t,e,i){var r=t;do{var n=r.prev,o=r.next.next}while(!Us(n,o)&&Vs(n,r,r.next,o)&&qs(n,o)&&qs(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),Xs(r),Xs(r.next),r=t=o),r=r.next,r!==t);return Ds(r)}(Ds(t),e,i),e,i,r,n,o,2):2===a&&function(t,e,i,r,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&Vs(i,i.next,t,e))return 1}while((i=i.next)!==t)}(t,e)&&(qs(t,e)&&qs(e,t)&&function(t,e){for(var i=t,r=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;i.y>o!=i.next.y>o&&i.next.y!==i.y&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next,i!==t;);return r}(t,e)&&(Os(t.prev,t,e.prev)||Os(t,e.prev,e))||Us(t,e)&&0<Os(t.prev,t,t.next)&&0<Os(e.prev,e,e.next))}(a,s)){var l=Zs(a,s);return a=Ds(a,a.next),l=Ds(l,l.next),Ls(a,e,i,r,n,o),Ls(l,e,i,r,n,o)}s=s.next}}while(a=a.next,a!==t)}(t,e,i,r,n,o):Ls(Ds(t),e,i,r,n,o,1);break}}}function Bs(t,e){return t.x-e.x}function Rs(t,e,i,r,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Fs(t,e,i,r,n,o,a,s){return 0<=(n-a)*(e-s)-(t-a)*(o-s)&&0<=(t-a)*(r-s)-(i-a)*(e-s)&&0<=(i-a)*(o-s)-(n-a)*(r-s)}function Os(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Us(t,e){return t.x===e.x&&t.y===e.y}function Vs(t,e,i,r){var n=js(Os(t,e,i)),o=js(Os(t,e,r)),a=js(Os(i,r,t)),s=js(Os(i,r,e));return n!==o&&a!==s||0===n&&Ns(t,i,e)||0===o&&Ns(t,r,e)||0===a&&Ns(i,t,r)||0===s&&Ns(i,e,r)}function Ns(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function js(t){return 0<t?1:t<0?-1:0}function qs(t,e){return Os(t.prev,t,t.next)<0?0<=Os(t,e,t.next)&&0<=Os(t,t.prev,e):Os(t,e,t.prev)<0||Os(t,t.next,e)<0}function Zs(t,e){var i=new Ws(t.i,t.x,t.y),r=new Ws(e.i,e.x,e.y),n=t.next,o=e.prev;return(t.next=e).prev=t,(i.next=n).prev=i,(r.next=i).prev=r,(o.next=r).prev=o,r}function Gs(t,e,i,r){i=new Ws(t,e,i);return r?(i.next=r.next,(i.prev=r).next.prev=i,r.next=i):(i.prev=i).next=i,i}function Xs(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Ws(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ks(t,e,i,r){for(var n=0,o=e,a=i-r;o<i;o+=r)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}function Hs(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function Js(t,e){return t<e?-1:e<t?1:0}function Ys(t,e){var i=t.length;if(i<=1)return[t];for(var r,n,o,a,s,l,u,c=[],p=0;p<i;p++){var h=function(t){for(var e,i,r=0,n=0,o=t.length,a=o-1;n<o;a=n++)r+=((i=t[a]).x-(e=t[n]).x)*(e.y+i.y);return r}(t[p]);0!==h&&(t[p].area=Math.abs(h),void 0===n&&(n=h<0),n===h<0?(r&&c.push(r),r=[t[p]]):r.push(t[p]))}if(r&&c.push(r),1<e)for(var f=0;f<c.length;f++)c[f].length<=e||(o=c[f],a=e,s=1,l=c[f].length-1,u=Qs,function t(e,i,r,n,o){for(;r<n;){var a,s,l,u;600<n-r&&(a=n-r+1,s=i-r+1,u=Math.log(a),l=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1),t(e,i,Math.max(r,Math.floor(i-s*l/a+u)),Math.min(n,Math.floor(i+(a-s)*l/a+u)),o));var c=e[i],p=r,h=n;for(Hs(e,r,i),0<o(e[n],c)&&Hs(e,r,n);p<h;){for(Hs(e,p,h),p++,h--;o(e[p],c)<0;)p++;for(;0<o(e[h],c);)h--}0===o(e[r],c)?Hs(e,r,h):Hs(e,++h,n),h<=i&&(r=h+1),i<=h&&(n=h-1)}}(o,a,s||0,l||o.length-1,u||Js),c[f]=c[f].slice(0,e));return c}function Qs(t,e){return e.area-t.area}function $s(t,e,i){for(var r=i.patternDependencies,n=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(n=!0);s=s.constantOr(null);
1s&&(n=!0,r[s.to]=!0,r[s.from]=!0)}return n}function tl(t,e,i,r,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var l,u,c=s[a],p=c.paint.get(t+"-pattern").value;"constant"!==p.kind&&(l=p.evaluate({zoom:r-1},i,{},n.availableImages),u=p.evaluate({zoom:r},i,{},n.availableImages),p=p.evaluate({zoom:r+1},i,{},n.availableImages),u=u&&u.name?u.name:u,p=p&&p.name?p.name:p,o[l=l&&l.name?l.name:l]=!0,o[u]=!0,o[p]=!0,i.patterns[c.id]={min:l,mid:u,max:p})}return i}ks.deviation=function(t,e,i,r){var n=e&&e.length,o=Math.abs(Ks(t,0,n?e[0]*i:t.length,i));if(n)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(Ks(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i));for(var l=0,a=0;a<r.length;a+=3){var u=r[a]*i,c=r[a+1]*i,p=r[a+2]*i;l+=Math.abs((t[u]-t[p])*(t[1+c]-t[1+u])-(t[u]-t[c])*(t[1+p]-t[1+u]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},ks.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},r=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)i.vertices.push(t[n][o][a]);0<n&&i.holes.push(r+=t[n-1].length)}return i},zs.default=Ti;function el(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Dn,this.indexArray=new vo,this.indexArray2=new Do,this.programConfigurations=new ja(t.layers,t.zoom),this.segments=new la,this.segments2=new la,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})}el.prototype.populate=function(t,e,i){this.hasPattern=$s("fill",this.layers,e);for(var r=this.layers[0].layout.get("fill-sort-key"),n=[],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f=Wa(l,h);this.layers[0]._featureFilter.filter(new on(this.zoom),f,i)&&(s=r?r.evaluate(f,{},i,e.availableImages):void 0,s={id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:h?f.geometry:Xa(l),patterns:{},sortKey:s},n.push(s))}r&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var d=0,m=n;d<m.length;d+=1){var y,_=m[d],g=_.geometry,v=_.index,x=_.sourceLayerIndex;this.hasPattern?(y=tl("fill",this.layers,_,this.zoom,e),this.patternFeatures.push(y)):this.addFeature(_,g,v,i,{}),e.featureIndex.insert(t[v].feature,g,v,x,this.index)}},el.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},el.prototype.addFeatures=function(t,e,i){for(var r=0,n=this.patternFeatures;r<n.length;r+=1){var o=n[r];this.addFeature(o,o.geometry,o.index,e,i)}},el.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},el.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},el.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,As),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},el.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},el.prototype.addFeature=function(t,e,i,r,n){for(var o=0,a=Ys(e,500);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),h=p.vertexLength,f=[],d=[],m=0,y=s;m<y.length;m+=1){var _=y[m];if(0!==_.length){_!==s[0]&&d.push(f.length/2);var g=this.segments2.prepareSegment(_.length,this.layoutVertexArray,this.indexArray2),v=g.vertexLength;this.layoutVertexArray.emplaceBack(_[0].x,_[0].y),this.indexArray2.emplaceBack(v+_.length-1,v),f.push(_[0].x),f.push(_[0].y);for(var x=1;x<_.length;x++)this.layoutVertexArray.emplaceBack(_[x].x,_[x].y),this.indexArray2.emplaceBack(v+x-1,v+x),f.push(_[x
vendor: 5,478 bytes, line 1
1].x),f.push(_[x].y);g.vertexLength+=_.length,g.primitiveLength+=_.length}}for(var b=zs(f,d),w=0;w<b.length;w+=3)this.indexArray.emplaceBack(h+b[w],h+b[w+1],h+b[w+2]);p.vertexLength+=l,p.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n,r)},Vr("FillBucket",el,{omit:["layers","patternFeatures"]});var il,M=new Sn({"fill-sort-key":new _n(Rt.layout_fill["fill-sort-key"])}),rl={paint:new Sn({"fill-antialias":new yn(Rt.paint_fill["fill-antialias"]),"fill-opacity":new _n(Rt.paint_fill["fill-opacity"]),"fill-color":new _n(Rt.paint_fill["fill-color"]),"fill-outline-color":new _n(Rt.paint_fill["fill-outline-color"]),"fill-translate":new yn(Rt.paint_fill["fill-translate"]),"fill-translate-anchor":new yn(Rt.paint_fill["fill-translate-anchor"]),"fill-pattern":new vn(Rt.paint_fill["fill-pattern"])}),layout:M},it=((il=In)&&(al.__proto__=il),((al.prototype=Object.create(il&&il.prototype)).constructor=al).prototype.recalculate=function(t,e){il.prototype.recalculate.call(this,t,e);e=this.paint._values["fill-outline-color"];"constant"===e.value.kind&&void 0===e.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},al.prototype.createBucket=function(t){return new el(t)},al.prototype.queryRadius=function(){return ns(this.paint.get("fill-translate"))},al.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a){return Ya(os(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)},al.prototype.isTileClipped=function(){return!0},al),nl=Cn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,ol=sl;function al(t){il.call(this,t,rl)}function sl(t,e,i,r,n){this.properties={},this.extent=i,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=n,t.readFields(ll,this,e)}function ll(t,e,i){1==t?e.id=i.readVarint():2==t?function(t,e){for(var i=t.readVarint()+t.pos;t.pos<i;){var r=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[r]=n}}(i,e):3==t?e.type=i.readVarint():4==t&&(e._geometry=i.pos)}sl.types=["Unknown","Point","LineString","Polygon"],sl.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,i,r=t.readVarint()+t.pos,n=1,o=0,a=0,s=0,l=[];t.pos<r;)if(o<=0&&(n=7&(i=t.readVarint()),o=i>>3),o--,1===n||2===n)a+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new st(a,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}return e&&l.push(e),l},sl.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e,i=t.readVarint()+t.pos,r=1,n=0,o=0,a=0,s=1/0,l=-1/0,u=1/0,c=-1/0;t.pos<i;)if(n<=0&&(r=7&(e=t.readVarint()),n=e>>3),n--,1===r||2===r)(o+=t.readSVarint())<s&&(s=o),l<o&&(l=o),(a+=t.readSVarint())<u&&(u=a),c<a&&(c=a);else if(7!==r)throw new Error("unknown command "+r);return[s,u,l,c]},sl.prototype.toGeoJSON=function(t,e,i){var r,n=this.extent*Math.pow(2,i),o=this.extent*t,a=this.extent*e,s=this.loadGeometry(),e=sl.types[this.type];function l(t){for(var e=0;e<t.length;e++){var i=t[e];t[e]=[360*(i.x+o)/n-180,360/Math.PI*Math.atan(Math.exp((180-360*(i.y+a)/n)*Math.PI/180))-90]}}switch(this.type){case 1:for(var u=[],c=0;c<s.length;c++)u[c]=s[c][0];l(s=u);break;case 2:for(c=0;c<s.length;c++)l(s[c]);break;case 3:for(s=function(t){var e=t.length;if(e<=1)return[t];for(var i,r,n=[],o=0;o<e;o++){var a=function(t){for(var e,i,r=0,n=0,o=t.length,a=o-1;n<o;a=n++)r+=((i=t[a]).x-(e=t[n]).x)*(e.y+i.y);return r}(t[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(i&&n.push(i),i=[t[o]]):i.push(t[o]))}return i&&n.push(i),n}(s),c=0;c<s.length;c++)for(r=0;r<s[c].length;r++)l(s[c][r])}1===s.length?s=s[0]:e="Multi"+e;e={type:"Feature",geometry:{type:e,coordinates:s},properties:this.properties};return"id"in this&&(e.id=this.id),e};var ul=cl;function cl(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(pl,this,e),this.length=this._features.length}function pl(t,e,i){15===t?e.version=i.readVarint():1===t?e.name=i.readString():5===t?e.extent=i.readVarint():2===t?e._features.push(i.pos):3===t?e._keys.push(i.readString()):4===t&&e._values.push(function(t){for(var e=null,i=t.readVarint()+t.pos;t.pos<i;)var r=t.readVarint()>>3,e=1==r?t.readString():2==r?t.readFloat():3==r?t.readDouble():4==r?t.readVarint64():5==r?t.readVarint():6==r?t.readSVarint():7==r?t.readBoolean():null;return e}(i))}function hl(t,e,i){3!==t||(i=new ul(i,i.readVarint()+i.pos)).length&&(e[i.name]=i)}cl.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];t=this._pbf.readVarint()+this._pbf.pos;return new ol(this._pbf,t,this.extent,this._keys,this._values)};var fl={VectorTile:function(t,e){this.layers=t.readFields(hl,{},e)},VectorTileFeature:ol,VectorTileLayer:ul},dl=fl.VectorTileFeature.types,ml=Math.pow(2,13);function yl(t,e,i,r,n,o,a,s){t.emplaceBack(e,i,2*Math.floor(r*ml)+a,n*ml*2,o*ml*2,Math.round(s))}function _l(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Un,this.indexArray=new vo,this.programConfigurations=new ja(t.layers,t.zoom),this.segments=new la,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})}
1_l.prototype.populate=function(t,e,i){this.features=[],this.hasPattern=$s("fill-extrusion",this.layers,e);for(var r=0,n=t;r<n.length;r+=1){var o=n[r],a=o.feature,s=o.id,l=o.index,u=o.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,o=Wa(a,c);this.layers[0]._featureFilter.filter(new on(this.zoom),o,i)&&(o={id:s,sourceLayerIndex:u,index:l,geometry:c?o.geometry:Xa(a),properties:a.properties,type:a.type,patterns:{}},this.hasPattern?this.features.push(tl("fill-extrusion",this.layers,o,this.zoom,e)):this.addFeature(o,o.geometry,l,i,{}),e.featureIndex.insert(a,o.geometry,l,u,this.index,!0))}},_l.prototype.addFeatures=function(t,e,i){for(var r=0,n=this.features;r<n.length;r+=1){var o=n[r];this.addFeature(o,o.geometry,o.index,e,i)}},_l.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},_l.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_l.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_l.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,nl),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},_l.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_l.prototype.addFeature=function(t,e,i,r,n){for(var o,a=0,s=Ys(e,500);a<s.length;a+=1){for(var l=s[a],u=0,c=0,p=l;c<p.length;c+=1)u+=p[c].length;for(var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),f=0,d=l;f<d.length;f+=1){var m=d[f];if(0!==m.length&&!((o=m).every(function(t){return t.x<0})||o.every(function(t){return 8192<t.x})||o.every(function(t){return t.y<0})||o.every(function(t){return 8192<t.y})))for(var y=0,_=0;_<m.length;_++){var g,v,x,b=m[_];1<=_&&(g=m[_-1],x=g,(v=b).x===x.x&&(v.x<0||8192<v.x)||v.y===x.y&&(v.y<0||8192<v.y)||(h.vertexLength+4>la.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)),x=b.sub(g)._perp()._unit(),32768<y+(v=g.dist(b))&&(y=0),yl(this.layoutVertexArray,b.x,b.y,x.x,x.y,0,0,y),yl(this.layoutVertexArray,b.x,b.y,x.x,x.y,0,1,y),yl(this.layoutVertexArray,g.x,g.y,x.x,x.y,0,0,y+=v),yl(this.layoutVertexArray,g.x,g.y,x.x,x.y,0,1,y),x=h.vertexLength,this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),h.vertexLength+=4,h.primitiveLength+=2))}}if(h.vertexLength+u>la.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray)),"Polygon"===dl[t.type]){for(var w=[],S=[],T=h.vertexLength,I=0,E=l;I<E.length;I+=1){var A=E[I];if(0!==A.length){A!==l[0]&&S.push(w.length/2);for(var z=0;z<A.length;z++){var P=A[z];yl(this.layoutVertexArray,P.x,P.y,0,0,1,1,0),w.push(P.x),w.push(P.y)}}}for(var C=zs(w,S),k=0;k<C.length;k+=3)this.indexArray.emplaceBack(T+C[k],T+C[k+2],T+C[k+1]);h.primitiveLength+=C.length/3,h.vertexLength+=u}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n,r)},Vr("FillExtrusionBucket",_l,{omit:["layers","features"]});var gl,vl={paint:new Sn({"fill-extrusion-opacity":new yn(Rt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new _n(Rt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new yn(Rt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new yn(Rt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new vn(Rt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new _n(Rt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new _n(Rt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new yn(Rt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},An=((gl=In)&&(xl.__proto__=gl),((xl.prototype=Object.create(gl&&gl.prototype)).constructor=xl).prototype.createBucket=function(t){return new _l(t)},xl.prototype.queryRadius=function(){return ns(this.paint.get("fill-extrusion-translate"))},xl.prototype.is3D=function(){return!0}
1,xl.prototype.queryIntersectsFeature=function(t,e,i,I,r,n,o,a){var s=os(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),n.angle,o),E=this.paint.get("fill-extrusion-height").evaluate(e,i),A=this.paint.get("fill-extrusion-base").evaluate(e,i),i=function(t){for(var e=[],i=0,r=s;i<r.length;i+=1){var n=r[i],n=[n.x,n.y,0,1];cs(n,n,t),e.push(new st(n[0]/n[3],n[1]/n[3]))}return e}(a),a=function(t){for(var e=[],i=[],r=t[8]*A,n=t[9]*A,o=t[10]*A,a=t[11]*A,s=t[8]*E,l=t[9]*E,u=t[10]*E,c=t[11]*E,p=0,h=I;p<h.length;p+=1){for(var f=[],d=[],m=0,y=h[p];m<y.length;m+=1){var _=y[m],g=_.x,v=_.y,x=t[0]*g+t[4]*v+t[12],b=t[1]*g+t[5]*v+t[13],w=t[2]*g+t[6]*v+t[14],S=t[3]*g+t[7]*v+t[15],T=w+o,_=S+a,g=x+s,v=b+l,w=w+u,S=S+c,b=new st((x+r)/_,(b+n)/_);b.z=T/_,f.push(b);v=new st(g/S,v/S);v.z=w/S,d.push(v)}e.push(f),i.push(d)}return[e,i]}(a);return function(t,e,i){var r=1/0;Ya(i,e)&&(r=wl(i,e[0]));for(var n=0;n<e.length;n++)for(var o=e[n],a=t[n],s=0;s<o.length-1;s++){var l=o[s],l=[l,o[s+1],a[s+1],a[s],l];Ja(i,l)&&(r=Math.min(r,wl(i,l)))}return r!==1/0&&r}(a[0],a[1],i)},xl);function xl(t){gl.call(this,t,vl)}function bl(t,e){return t.x*e.x+t.y*e.y}function wl(t,e){if(1===t.length){for(var i,r=0,n=e[r++];!i||n.equals(i);)if(!(i=e[r++]))return 1/0;for(;r<e.length;r++){var o=e[r],a=t[0],s=i.sub(n),l=o.sub(n),u=a.sub(n),c=bl(s,s),p=bl(s,l),a=bl(l,l),s=bl(u,s),u=bl(u,l),l=c*a-p*p,a=(a*s-p*u)/l,l=(c*u-p*s)/l,l=n.z*(1-a-l)+i.z*a+o.z*l;if(isFinite(l))return l}return 1/0}for(var h=1/0,f=0,d=e;f<d.length;f+=1)h=Math.min(h,d[f].z);return h}function Sl(t){var e=this;this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(t){e.gradients[t.id]={}}),this.layoutVertexArray=new jn,this.layoutVertexArray2=new Gn,this.indexArray=new vo,this.programConfigurations=new ja(t.layers,t.zoom),this.segments=new la,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})}var Tl=Cn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Il=Cn([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,El=fl.VectorTileFeature.types,Al=Math.cos(Math.PI/180*37.5),zl=Math.pow(2,14)/.5;Sl.prototype.populate=function(t,e,i){this.hasPattern=$s("line",this.layers,e);for(var r=this.layers[0].layout.get("line-sort-key"),n=[],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f=Wa(l,h);this.layers[0]._featureFilter.filter(new on(this.zoom),f,i)&&(s=r?r.evaluate(f,{},i):void 0,s={id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:h?f.geometry:Xa(l),patterns:{},sortKey:s},n.push(s))}r&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var d=0,m=n;d<m.length;d+=1){var y,_=m[d],g=_.geometry,v=_.index,x=_.sourceLayerIndex;this.hasPattern?(y=tl("line",this.layers,_,this.zoom,e),this.patternFeatures.push(y)):this.addFeature(_,g,v,i,{}),e.featureIndex.insert(t[v].feature,g,v,x,this.index)}},Sl.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},Sl.prototype.addFeatures=function(t,e,i){for(var r=0,n=this.patternFeatures;r<n.length;r+=1){var o=n[r];this.addFeature(o,o.geometry,o.index,e,i)}},Sl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Sl.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Sl.prototype.upload=function(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,Il)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Tl),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Sl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Sl.prototype.lineFeatureClips=function(t){if(t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}
1,Sl.prototype.addFeature=function(t,e,i,r,n){var o=this.layers[0].layout,a=o.get("line-join").evaluate(t,{}),s=o.get("line-cap"),l=o.get("line-miter-limit"),u=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(var c=0,p=e;c<p.length;c+=1)this.addLine(p[c],t,a,s,l,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n,r)},Sl.prototype.addLine=function(t,e,i,r,n,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var a=0;a<t.length-1;a++)this.totalDistance+=t[a].dist(t[a+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var s="Polygon"===El[e.type],l=t.length;2<=l&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u<l-1&&t[u].equals(t[u+1]);)u++;if(!(l<(s?3:2))){"bevel"===i&&(n=1.05);var c,p=this.overscaling<=16?122880/(512*this.overscaling):0,h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray),f=void 0,d=void 0,m=void 0,y=void 0;this.e1=this.e2=-1,s&&(y=t[u].sub(c=t[l-2])._unit()._perp());for(var _=u;_<l;_++)if(!(d=_===l-1?s?t[u+1]:void 0:t[_+1])||!t[_].equals(d)){y&&(m=y),c&&(f=c),c=t[_],y=d?d.sub(c)._unit()._perp():m;var g=(m=m||y).add(y);0===g.x&&0===g.y||g._unit();var v=m.x*y.x+m.y*y.y,x=g.x*y.x+g.y*y.y,b=0!=x?1/x:1/0,w=2*Math.sqrt(2-2*x),x=x<Al&&f&&d,S=0<m.x*y.y-m.y*y.x;x&&u<_&&(2*p<(T=c.dist(f))&&(I=c.sub(c.sub(f)._mult(p/T)._round()),this.updateDistance(f,I),this.addCurrentVertex(I,m,0,0,h),f=I));var T=f&&d,I=T?i:s?"butt":r;if(T&&"round"===I&&(b<o?I="miter":b<=2&&(I="fakeround")),"miter"===I&&n<b&&(I="bevel"),"bevel"===I&&(2<b&&(I="flipbevel"),b<n&&(I="miter")),f&&this.updateDistance(f,c),"miter"===I)g._mult(b),this.addCurrentVertex(c,g,0,0,h);else if("flipbevel"===I)100<b?g=y.mult(-1):(T=b*m.add(y).mag()/m.sub(y).mag(),g._perp()._mult(T*(S?-1:1))),this.addCurrentVertex(c,g,0,0,h),this.addCurrentVertex(c,g.mult(-1),0,0,h);else if("bevel"===I||"fakeround"===I){var E=-Math.sqrt(b*b-1),b=S?E:0,E=S?0:E;if(f&&this.addCurrentVertex(c,m,b,E,h),"fakeround"===I)for(var A=Math.round(180*w/Math.PI/20),z=1;z<A;z++){var P,C=z/A;.5!==C&&(C+=C*(P=C-.5)*(C-1)*((1.0904+v*(v*(3.55645-1.43519*v)-3.2452))*P*P+(.848013+v*(.215638*v-1.06021))));C=y.sub(m)._mult(C)._add(m)._unit()._mult(S?-1:1);this.addHalfVertex(c,C.x,C.y,!1,S,0,h)}d&&this.addCurrentVertex(c,y,-b,-E,h)}else"butt"===I?this.addCurrentVertex(c,g,0,0,h):"square"===I?(E=f?1:-1,this.addCurrentVertex(c,g,E,E,h)):"round"===I&&(f&&(this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m,1,1,h,!0)),d&&(this.addCurrentVertex(c,y,-1,-1,h,!0),this.addCurrentVertex(c,y,0,0,h)));x&&_<l-1&&(2*p<(x=c.dist(d))&&(x=c.add(d.sub(c)._mult(p/x)._round()),this.updateDistance(c,x),this.addCurrentVertex(x,y,0,0,h),c=x))}}},Sl.prototype.addCurrentVertex=function(t,e,i,r,n,o){void 0===o&&(o=!1);var a=e.y*r-e.x,s=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*i,e.y-e.x*i,o,!1,i,n),this.addHalfVertex(t,a,s,o,!0,-r,n),this.distance>zl/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,i,r,n,o))},Sl.prototype.addHalfVertex=function(t,e,i,r,n,o,a){var s=.5*(this.lineClips?this.scaledDistance*(zl-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t.x<<1)+(r?1:0),(t.y<<1)+(n?1:0),Math.round(63*e)+128,Math.round(63*i)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);s=a.vertexLength++;0<=this.e1&&0<=this.e2&&(this.indexArray.emplaceBack(this.e1,this.e2,s),a.primitiveLength++),n?this.e2=s:this.e1=s},Sl.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Sl.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Vr("LineBucket",Sl,{omit:["layers","patternFeatures"]});var Pl,et=new Sn({"line-cap":new yn(Rt.layout_line["line-cap"]),"line-join":new _n(Rt.layout_line["line-join"]),"line-miter-limit":new yn(Rt.layout_line["line-miter-limit"]),"line-round-limit":new yn(Rt.layout_line["line-round-limit"]),"line-sort-key":new _n(Rt.layout_line["line-sort-key"])}),Cl={paint:new Sn({"line-opacity":new _n(Rt.paint_line["line-opacity"]),"line-color":new _n(Rt.paint_line["line-color"]),"line-translate":new yn(Rt.paint_line["line-translate"]),"line-translate-anchor":new yn(Rt.paint_line["line-translate-anchor"]),"line-width":new _n(Rt.paint_line["line-width"]),"line-gap-width":new _n(Rt.paint_line["line-gap-width"]),"line-offset":new _n(Rt.paint_line["line-offset"]),"line-blur"
1:new _n(Rt.paint_line["line-blur"]),"line-dasharray":new xn(Rt.paint_line["line-dasharray"]),"line-pattern":new vn(Rt.paint_line["line-pattern"]),"line-gradient":new wn(Rt.paint_line["line-gradient"])}),layout:et},kl=((Pl=_n)&&(Ml.__proto__=Pl),((Ml.prototype=Object.create(Pl&&Pl.prototype)).constructor=Ml).prototype.possiblyEvaluate=function(t,e){return e=new on(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),Pl.prototype.possiblyEvaluate.call(this,t,e)},Ml.prototype.evaluate=function(t,e,i,r){return e=v({},e,{zoom:Math.floor(e.zoom)}),Pl.prototype.evaluate.call(this,t,e,i,r)},new Ml(Cl.paint.properties["line-width"].specification));function Ml(){Pl.apply(this,arguments)}kl.useIntegerZoom=!0;var Dl,Ti=((Dl=In)&&(Ll.__proto__=Dl),((Ll.prototype=Object.create(Dl&&Dl.prototype)).constructor=Ll).prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof We,this.gradientVersion=(this.gradientVersion+1)%n)},Ll.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},Ll.prototype.recalculate=function(t,e){Dl.prototype.recalculate.call(this,t,e),this.paint._values["line-floorwidth"]=kl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},Ll.prototype.createBucket=function(t){return new Sl(t)},Ll.prototype.queryRadius=function(t){var e=t,t=Bl(rs("line-width",this,e),rs("line-gap-width",this,e)),e=rs("line-offset",this,e);return t/2+Math.abs(e)+ns(this.paint.get("line-translate"))},Ll.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a){t=os(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),o=a/2*Bl(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),i=this.paint.get("line-offset").evaluate(e,i);return i&&(r=function(t,e){for(var i=[],r=new st(0,0),n=0;n<t.length;n++){for(var o=t[n],a=[],s=0;s<o.length;s++){var l=o[s],u=o[s+1],c=0===s?r:l.sub(o[s-1])._unit()._perp(),u=s===o.length-1?r:u.sub(l)._unit()._perp(),c=c._add(u)._unit();c._mult(1/(c.x*u.x+c.y*u.y)),a.push(c._mult(e)._add(l))}i.push(a)}return i}(r,i*a)),function(t,e,i){for(var r=0;r<e.length;r++){var n=e[r];if(3<=t.length)for(var o=0;o<n.length;o++)if(is(t,n[o]))return!0;if(function(t,e,i){if(1<t.length){if(Qa(t,e))return 1;for(var r=0;r<e.length;r++)if($a(e[r],t,i))return 1}for(var n=0;n<t.length;n++)if($a(t[n],e,i))return 1}(t,n,i))return!0}return!1}(t,r,o)},Ll.prototype.isTileClipped=function(){return!0},Ll);function Ll(t){Dl.call(this,t,Cl),this.gradientVersion=0}function Bl(t,e){return 0<e?e+2*t:t}var Rl=Cn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Fl=Cn([{name:"a_projected_pos",components:3,type:"Float32"}],4),Ol=(Cn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Cn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ul=(Cn([{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"}]),Cn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),M=Cn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Cn([{name:"triangle",components:3,type:"Uint16"}]),Cn([{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"}]),Cn([{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"}]),Cn([{type:"Float32",name:"offsetX"}
vendor: 4,311 bytes, line 1
1]),Cn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function Vl(t,e,i,r,n){var o,a,s=8*n-r-1,l=(1<<s)-1,u=l>>1,c=-7,p=i?n-1:0,h=i?-1:1,i=t[e+p];for(p+=h,o=i&(1<<-c)-1,i>>=-c,c+=s;0<c;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;0<c;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(i?-1:1);a+=Math.pow(2,r),o-=u}return(i?-1:1)*a*Math.pow(2,o-r)}function Nl(t,e,i,r,n,o){var a,s,l=8*o-n-1,u=(1<<l)-1,c=u>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,f=r?1:-1,o=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(e+=1<=a+c?p/r:p*Math.pow(2,1-c))*r&&(a++,r/=2),u<=a+c?(s=0,a=u):1<=a+c?(s=(e*r-1)*Math.pow(2,n),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,n),a=0));8<=n;t[i+h]=255&s,h+=f,s/=256,n-=8);for(a=a<<n|s,l+=n;0<l;t[i+h]=255&a,h+=f,a/=256,l-=8);t[i+h-f]|=128*o}var jl={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},ql=Zl;function Zl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Zl.Varint=0,Zl.Fixed64=1,Zl.Bytes=2,Zl.Fixed32=5;var Gl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Xl(t){return t.type===Zl.Bytes?t.readVarint()+t.pos:t.pos+1}function Wl(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Kl(t,e,i){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(r);for(var n=i.pos-1;t<=n;n--)i.buf[n+r]=i.buf[n]}function Hl(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function Jl(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function Yl(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function Ql(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function $l(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function tu(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function eu(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function iu(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function ru(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function nu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function ou(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function au(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function su(t,e,i){1===t&&i.readMessage(lu,e)}function lu(t,e,i){var r,n,o,a;3===t&&(n=(r=i.readMessage(uu,{})).width,o=r.height,a=r.left,t=r.top,i=r.advance,e.push({id:r.id,bitmap:new xs({width:n+6,height:o+6},r.bitmap),metrics:{width:n,height:o,left:a,top:t,advance:i}}))}function uu(t,e,i){1===t?e.id=i.readVarint():2===t?e.bitmap=i.readBytes():3===t?e.width=i.readVarint():4===t?e.height=i.readVarint():5===t?e.left=i.readSVarint():6===t?e.top=i.readSVarint():7===t&&(e.advance=i.readVarint())}function cu(t){for(var e=0,i=0,r=0,n=t;r<n.length;r+=1){var o=n[r];e+=o.w*o.h,i=Math.max(i,o.w)}t.sort(function(t,e){return e.h-t.h});for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),i),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var p=c[u],h=a.length-1;0<=h;h--){var f,d=a[h];if(!(p.w>d.w||p.h>d.h)){p.x=d.x,p.y=d.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===d.w&&p.h===d.h?(f=a.pop(),h<a.length&&(a[h]=f)):p.h===d.h?(d.x+=p.w,d.w-=p.w):(p.w===d.w||a.push({x:d.x+p.w,y:d.y,w:d.w-p.w,h:p.h}),d.y+=p.h,d.h-=p.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}
1Zl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),n=r>>3,o=this.pos;this.type=7&r,t(n,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=nu(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=au(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=nu(this.buf,this.pos)+4294967296*nu(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=nu(this.buf,this.pos)+4294967296*au(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Vl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Vl(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i=this.buf,r=127&(e=i[this.pos++]);return e<128?r:(r|=(127&(e=i[this.pos++]))<<7,e<128?r:(r|=(127&(e=i[this.pos++]))<<14,e<128?r:(r|=(127&(e=i[this.pos++]))<<21,e<128?r:function(t,e,i){var r,n=i.buf,o=(112&(r=n[i.pos++]))>>4;if(r<128)return Wl(t,o,e);if(o|=(127&(r=n[i.pos++]))<<3,r<128)return Wl(t,o,e);if(o|=(127&(r=n[i.pos++]))<<10,r<128)return Wl(t,o,e);if(o|=(127&(r=n[i.pos++]))<<17,r<128)return Wl(t,o,e);if(o|=(127&(r=n[i.pos++]))<<24,r<128)return Wl(t,o,e);if(o|=(1&(r=n[i.pos++]))<<31,r<128)return Wl(t,o,e);throw new Error("Expected varint not more than 10 bytes")}(r|=(15&i[this.pos])<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t,e=this.readVarint()+this.pos,c=this.pos;return 12<=(this.pos=e)-c&&Gl?(t=this.buf,Gl.decode(t.subarray(c,e))):function(t,e){for(var i="",r=c;r<e;){var n,o,a,s=t[r],l=null,u=239<s?4:223<s?3:191<s?2:1;if(e<r+u)break;1===u?s<128&&(l=s):2===u?128==(192&(n=t[r+1]))&&(l=(31&s)<<6|63&n)<=127&&(l=null):3===u?(o=t[r+2],128==(192&(n=t[r+1]))&&128==(192&o)&&((l=(15&s)<<12|(63&n)<<6|63&o)<=2047||55296<=l&&l<=57343)&&(l=null)):4===u&&(o=t[r+2],a=t[r+3],128==(192&(n=t[r+1]))&&128==(192&o)&&128==(192&a)&&((l=(15&s)<<18|(63&n)<<12|(63&o)<<6|63&a)<=65535||1114112<=l)&&(l=null)),null===l?(l=65533,u=1):65535<l&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),r+=u}return i}(this.buf,e)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Zl.Bytes)return t.push(this.readVarint(e));var i=Xl(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Zl.Bytes)return t.push(this.readSVarint());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Zl.Bytes)return t.push(this.readBoolean());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Zl.Bytes)return t.push(this.readFloat());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Zl.Bytes)return t.push(this.readDouble());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Zl.Bytes)return t.push(this.readFixed32());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Zl.Bytes)return t.push(this.readSFixed32());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Zl.Bytes)return t.push(this.readFixed64());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Zl.Bytes)return t.push(this.readSFixed64());var e=Xl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){t&=7;if(t===Zl.Varint)for(;127<this.buf[this.pos++];);else if(t===Zl.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Zl.Fixed32)this.pos+=4;else{if(t!==Zl.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e,i=this.length||16;i<this.pos+t;)i*=2;
1i!==this.length&&((e=new Uint8Array(i)).set(this.buf),this.buf=e,this.length=i)},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),ou(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),ou(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),ou(this.buf,-1&t,this.pos),ou(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),ou(this.buf,-1&t,this.pos),ou(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(n){268435455<(n=+n||0)||n<0?function(t){var e,i,r;if(0<=n?(r=n%4294967296|0,e=n/4294967296|0):(e=~(-n/4294967296),4294967295^(r=~(-n%4294967296))?r=r+1|0:e=e+1|(r=0)),0x10000000000000000<=n||n<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),i=r,(r=t).buf[r.pos++]=127&i|128,i>>>=7,r.buf[r.pos++]=127&i|128,i>>>=7,r.buf[r.pos++]=127&i|128,i>>>=7,r.buf[r.pos++]=127&i|128,r.buf[r.pos]=127&(i>>>=7),e=(7&(i=e))<<4,(t=t).buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=127&i|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=127&i|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=127&i|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=127&i|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=127&i)))))}(this):(this.realloc(4),this.buf[this.pos++]=127&n|(127<n?128:0),n<=127||(this.buf[this.pos++]=127&(n>>>=7)|(127<n?128:0),n<=127||(this.buf[this.pos++]=127&(n>>>=7)|(127<n?128:0),n<=127||(this.buf[this.pos++]=n>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var r,n,o=0;o<e.length;o++){if(55295<(r=e.charCodeAt(o))&&r<57344){if(!n){56319<r||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):n=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,n=r;continue}r=n-55296<<10|r-56320|65536,n=null}else n&&(t[i++]=239,t[i++]=191,t[i++]=189,n=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);t=this.pos-e;128<=t&&Kl(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(t){this.realloc(4),Nl(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Nl(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);e=this.pos-i;128<=e&&Kl(i,e,this),this.pos=i-1,this.writeVarint(e),this.pos+=e},writeMessage:function(t,e,i){this.writeTag(t,Zl.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Hl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Jl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,$l,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Yl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Ql,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,tu,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,eu,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,iu,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,ru,e)},writeBytesField:function(t,e){this.writeTag(t,Zl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Zl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Zl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Zl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Zl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Zl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Zl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Zl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Zl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Zl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function pu(t,e){var i=e.pixelRatio,r=e.version,n=e.stretchX,o=e.stretchY,e=e.content;this.paddedRect=t,this.pixelRatio=i,this.stretchX=n,this.stretchY=o,this.content=e,this.version=r}vn={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};vn.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},vn.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},vn.tlbr.get=function(){return this.tl.concat(this.br)},vn.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(pu.prototype,vn);wn=function(t,e){var i={},r={};this.haveRenderCallbacks=[];var n=[];this.addImages(t,i,n),this.addImages(e,r,n);var o,a,n=cu(n),s=new bs({width:n.w||1,height:n.h||1});for(o in t){var l=t[o],u=i[o].paddedRect;bs.copy(l.data,s,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(a in e){var c=e[a],p=r[a].paddedRect,h=p.x+1,f=p.y+1,d=c.data.width,p=c.data.height;bs.copy(c.data,s,{x:0,y:0},{x:h,y:f},c.data),bs.copy(c.data,s,{x:0,y:p-1},{x:h,y:f-1},{width:d,height:1}),bs.copy(c.data,s,{x:0,y:0},{x:h,y:f+p},{width:d,height:1}),bs.copy(c.data,s,{x:d-1,y:0},{x:h-1,y:f},{width:1,height:p}),bs.copy(c.data,s,{x:0,y:0},{x:h+d,y:f},{width:1,height:p})}this.image=s,this.iconPositions=i,this.patternPositions=r};
vendor: 6,488 bytes, line 1
1wn.prototype.addImages=function(t,e,i){for(var r in t){var n=t[r],o={x:0,y:0,w:n.data.width+2,h:n.data.height+2};i.push(o),e[r]=new pu(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},wn.prototype.patchUpdatedImages=function(t,e){for(var i in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[i],t.getImage(i),e),this.patchUpdatedImage(this.patternPositions[i],t.getImage(i),e)},wn.prototype.patchUpdatedImage=function(t,e,i){t&&e&&t.version!==e.version&&(t.version=e.version,t=t.tl,i.update(e.data,void 0,{x:t[0],y:t[1]}))},Vr("ImagePosition",pu),Vr("ImageAtlas",wn);function hu(){this.scale=1,this.fontStack="",this.imageName=null}var fu={horizontal:1,vertical:2,horizontalOnly:3};hu.forText=function(t,e){var i=new hu;return i.scale=t||1,i.fontStack=e,i},hu.forImage=function(t){var e=new hu;return e.imageName=t,e};function du(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}function mu(t,e,i,r,n,o,a,s,V,l,u,c,p,h,f,d){var m,y=du.fromFeature(t,n);c===fu.vertical&&y.verticalizePunctuation();t=sn.processBidirectionalText,n=sn.processStyledBidirectionalText;if(t&&1===y.sections.length){m=[];for(var _=0,g=t(y.toString(),bu(y,l,o,e,r,h,f));_<g.length;_+=1){var v=g[_],x=new du;x.text=v,x.sections=y.sections;for(var b=0;b<v.length;b++)x.sectionIndex.push(0);m.push(x)}}else if(n){m=[];for(var w=0,S=n(y.text,y.sectionIndex,bu(y,l,o,e,r,h,f));w<S.length;w+=1){var T=S[w],I=new du;I.text=T[0],I.sectionIndex=T[1],I.sections=y.sections,m.push(I)}}else m=function(t,e){for(var i=[],r=t.text,n=0,o=0,a=e;o<a.length;o+=1){var s=a[o];i.push(t.substring(n,s)),n=s}return n<r.length&&i.push(t.substring(n,r.length)),i}(y,bu(y,l,o,e,r,h,f));var E=[],u={positionedLines:E,text:y.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:c,iconsInText:!1,verticalizable:!1};return function(t,e,i,r,n,u,o,a,s,l,c){for(var p=0,h=-17,f=0,d=0,m="right"===V?1:"left"===V?0:.5,y=0,_=0,g=n;_<g.length;_+=1){var v=g[_];v.trim();var x=v.getMaxScale(),b=24*(x-1),w={positionedGlyphs:[],lineOffset:0},S=(t.positionedLines[y]=w).positionedGlyphs,T=0;if(v.length()){for(var I=0;I<v.length();I++){var E=v.getSection(I),A=v.getSectionIndex(I),z=v.getCharCode(I),P=0,C=null,k=null,M=null,D=24,L=!(a===fu.horizontal||!l&&!Kr(z)||l&&(yu[z]||(L=z,Xr.Arabic(L)||Xr["Arabic Supplement"](L)||Xr["Arabic Extended-A"](L)||Xr["Arabic Presentation Forms-A"](L)||Xr["Arabic Presentation Forms-B"](L))));if(E.imageName){var B=r[E.imageName];if(!B)continue;M=E.imageName,t.iconsInText=t.iconsInText||!0,k=B.paddedRect;B=B.displaySize;E.scale=24*E.scale/c,P=b+(24-B[1]*E.scale),D=(C={width:B[0],height:B[1],left:1,top:-3,advance:L?B[1]:B[0]}).advance;B=L?B[0]*E.scale-24*x:B[1]*E.scale-24*x;0<B&&T<B&&(T=B)}else{B=i[E.fontStack],B=B&&B[z];if(B&&B.rect)k=B.rect,C=B.metrics;else{B=e[E.fontStack],B=B&&B[z];if(!B)continue;C=B.metrics}P=24*(x-E.scale)}L?(t.verticalizable=!0,S.push({glyph:z,imageName:M,x:p,y:h+P,vertical:L,scale:E.scale,fontStack:E.fontStack,sectionIndex:A,metrics:C,rect:k}),p+=D*E.scale+s):(S.push({glyph:z,imageName:M,x:p,y:h+P,vertical:L,scale:E.scale,fontStack:E.fontStack,sectionIndex:A,metrics:C,rect:k}),p+=C.advance*E.scale+s)}0!==S.length&&(f=Math.max(p-s,f),function(t,e,i,r,n){if(r||n)for(var o=t[i],a=(t[i].x+o.metrics.advance*o.scale)*r,s=e;s<=i;s++)t[s].x-=a,t[s].y+=n}(S,0,S.length-1,m,T)),p=0;var R=u*x+T;w.lineOffset=Math.max(T,b),h+=R,d=Math.max(R,d),++y}else h+=u,++y}var L,F=h- -17,o=wu(o),O=o.horizontalAlign,U=o.verticalAlign;(function(t,e){for(var i=(m-O)*f,r=d!==u?-F*U+17:(-U*e+.5)*u,n=0,o=t;n<o.length;n+=1)for(var a=0,s=o[n].positionedGlyphs;a<s.length;a+=1){var l=s[a];l.x+=i,l.y+=r}})(t.positionedLines,n.length),t.top+=-U*F,t.bottom=t.top+F,t.left+=-O*f,t.right=t.left+f}(u,e,i,r,m,a,s,c,l,p,d),!function(){for(var t=0,e=E;t<e.length;t+=1)if(0!==e[t].positionedGlyphs.length)return;return 1}()&&u}du.fromFeature=function(t,e){for(var i=new du,r=0;r<t.sections.length;r++){var n=t.sections[r];n.image?i.addImageSection(n):i.addTextSection(n,e)}return i},du.prototype.length=function(){return this.text.length},du.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},du.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},du.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},du.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",i=0;i<t.length;i++){var r=t.charCodeAt(i+1)||null,n=t.charCodeAt(i-1)||null;e+=r&&Hr(r)&&!jl[t[i+1]]||n&&Hr(n)&&!jl[t[i-1]]||!jl[t[i]]?t[i]:jl[t[i]]}return e}(this.text)},du.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&yu[this.text.charCodeAt(e)];e++)t++;for(var i=this.text.length,r=this.text.length-1;0<=r&&t<=r&&yu[this.text.charCodeAt(r)];r--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)},du.prototype.substring=function(t,e){var i=new du;return i.text=this.text.substring(t,e),i.sectionIndex=this.sectionIndex.slice(t,e),i.sections=this.sections,i},du.prototype.toString=function(){return this.text},du.prototype.getMaxScale=function(){var i=this;return this.sectionIndex.reduce(function(t,e){return Math.max(t,i.sections[e].scale)},0)},du.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(hu.forText(t.scale,t.fontStack||e));for(var i=this.sections.length-1,r=0;r<t.text.length;++r)this.sectionIndex.push(i)},du.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";0!==e.length?(t=this.getNextImageSectionCharCode())?(this.text+=String.fromCharCode(t),this.sections.push(hu.forImage(e)),this.sectionIndex.push(this.sections.length-1)):lt("Reached maximum number of images 6401"):lt("Can't add FormattedSection with an empty image.")},du.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?63743<=this.imageSectionID?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var yu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},_u={};function gu(t,e,i,r,n,o){if(e.imageName){r=r[e.imageName];return r?r.displaySize[0]*e.scale*24/o+n:0}i=i[e.fontStack],t=i&&i[t];return t?t.metrics.advance*e.scale+n:0}function vu(t,e,i,r){var n=Math.pow(t-e,2);return r?t<e?n/2:2*n:n+Math.abs(i)*i}function xu(t,e,i,r,n,o){for(var a=null,s=vu(e,i,n,o),l=0,u=r;l<u.length;l+=1){var c=u[l],p=vu(e-c.x,i,n,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function bu(t,e,i,r,n,o,a){if("point"!==o)return[];if(!t)return[];
1for(var s,l=[],u=function(t,e,i,r,n,o){for(var a=0,s=0;s<t.length();s++){var l=t.getSection(s);a+=gu(t.getCharCode(s),l,r,n,e,o)}return a/Math.max(1,Math.ceil(a/i))}(t,e,i,r,n,a),c=0<=t.text.indexOf("​"),p=0,h=0;h<t.length();h++){var f,d=t.getSection(h),m=t.getCharCode(h);yu[m]||(p+=gu(m,d,r,n,e,a)),h<t.length()-1&&(f=!((s=m)<11904||!(Xr["Bopomofo Extended"](s)||Xr.Bopomofo(s)||Xr["CJK Compatibility Forms"](s)||Xr["CJK Compatibility Ideographs"](s)||Xr["CJK Compatibility"](s)||Xr["CJK Radicals Supplement"](s)||Xr["CJK Strokes"](s)||Xr["CJK Symbols and Punctuation"](s)||Xr["CJK Unified Ideographs Extension A"](s)||Xr["CJK Unified Ideographs"](s)||Xr["Enclosed CJK Letters and Months"](s)||Xr["Halfwidth and Fullwidth Forms"](s)||Xr.Hiragana(s)||Xr["Ideographic Description Characters"](s)||Xr["Kangxi Radicals"](s)||Xr["Katakana Phonetic Extensions"](s)||Xr.Katakana(s)||Xr["Vertical Forms"](s)||Xr["Yi Radicals"](s)||Xr["Yi Syllables"](s))),(_u[m]||f||d.imageName)&&l.push(xu(h+1,p,u,l,(s=m,d=t.getCharCode(h+1),m=void 0,m=0,10===s&&(m-=1e4),f&&c&&(m+=150),40!==s&&65288!==s||(m+=50),41!==d&&65289!==d||(m+=50),m),!1)))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(xu(t.length(),p,u,l,0,!0))}function wu(t){var e=.5,i=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:e,verticalAlign:i}}function Su(t,e,i,r,n,o){var a,t=t.image;t.content&&(u=t.content,c=t.pixelRatio||1,a=[u[0]/c,u[1]/c,t.displaySize[0]-u[2]/c,t.displaySize[1]-u[3]/c]);var s,l,u=e.left*o,c=e.right*o,u="width"===i||"both"===i?(l=n[0]+u-r[3],n[0]+c+r[1]):(l=n[0]+(u+c-t.displaySize[0])/2)+t.displaySize[0],c=e.top*o,o=e.bottom*o,o="height"===i||"both"===i?(s=n[1]+c-r[0],n[1]+o+r[2]):(s=n[1]+(c+o-t.displaySize[1])/2)+t.displaySize[1];return{image:t,top:s,right:u,bottom:o,left:l,collisionPadding:a}}_u[10]=!0,_u[32]=!0,_u[38]=!0,_u[40]=!0,_u[41]=!0,_u[43]=!0,_u[45]=!0,_u[47]=!0,_u[173]=!0,_u[183]=!0,_u[8203]=!0,_u[8208]=!0,_u[8211]=!0,_u[8231]=!0;var Tu,Iu=((Tu=st)&&(Eu.__proto__=Tu),((Eu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Eu).prototype.clone=function(){return new Eu(this.x,this.y,this.angle,this.segment)},Eu);function Eu(t,e,i,r){Tu.call(this,t,e),this.angle=i,void 0!==r&&(this.segment=r)}function Au(t,e){var i=e.expression;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new on(t+1))};if("source"===i.kind)return{kind:"source"};for(var r=i.zoomStops,n=i.interpolationType,o=0;o<r.length&&r[o]<=t;)o++;for(var a=o=Math.max(0,o-1);a<r.length&&r[a]<t+1;)a++;a=Math.min(r.length-1,a);var s=r[o],e=r[a];return"composite"===i.kind?{kind:"composite",minZoom:s,maxZoom:e,interpolationType:n}:{kind:"camera",minZoom:s,maxZoom:e,minSize:i.evaluate(new on(s)),maxSize:i.evaluate(new on(e)),interpolationType:n}}function zu(t,e,i){var r=e.uSize,n=i.lowerSize;return"source"===t.kind?n/128:"composite"===t.kind?Ke(n/128,i.upperSize/128,e.uSizeT):r}function Pu(t,e){var i,r=0,n=0;return"constant"===t.kind?n=t.layoutSize:"source"!==t.kind&&(e=(i=t.interpolationType)?u(li.interpolationFactor(i,e,t.minZoom,t.maxZoom),0,1):0,"camera"===t.kind?n=Ke(t.minSize,t.maxSize,e):r=e),{uSizeT:r,uSize:n}}Vr("Anchor",Iu);et=Object.freeze({__proto__:null,getSizeData:Au,evaluateSizeForFeature:zu,evaluateSizeForZoom:Pu,SIZE_PACK_FACTOR:128});function Cu(t,e,i,r,n){if(void 0===e.segment)return 1;for(var o=e,a=e.segment+1,s=0;-i/2<s;){if(--a<0)return;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<i/2;){var c=t[a],p=t[a+1];if(!p)return;var h=t[a-1].angleTo(c)-c.angleTo(p),h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI);for(l.push({distance:s,angleDelta:h}),u+=h;s-l[0].distance>r;)u-=l.shift().angleDelta;if(n<u)return;a++,s+=c.dist(p)}return 1}function ku(t){for(var e=0,i=0;i<t.length-1;i++)e+=t[i].dist(t[i+1]);return e}function Mu(t,e,i){return t?.6*e*i:0}function Du(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Lu(t,e,i,r,n){for(var o=[],a=0;a<t.length;a++)for(var s=t[a],l=void 0,u=0;u<s.length-1;u++){var c=s[u],p=s[u+1];c.x<e&&p.x<e||(c.x<e?c=new st(e,c.y+(e-c.x)/(p.x-c.x)*(p.y-c.y))._round():p.x<e&&(p=new st(e,c.y+(e-c.x)/(p.x-c.x)*(p.y-c.y))._round()),c.y<i&&p.y<i||(c.y<i?c=new st(c.x+(i-c.y)/(p.y-c.y)*(p.x-c.x),i)._round():p.y<i&&(p=new st(c.x+(i-c.y)/(p.y-c.y)*(p.x-c.x),i)._round()),c.x>=r&&p.x>=r||(c.x>=r?c=new st(r,c.y+(r-c.x)/(p.x-c.x)*(p.y-c.y))._round():p.x>=r&&(p=new st(r,c.y+(r-c.x)/(p.x-c.x)*(p.y-c.y))._round()),c.y>=n&&p.y>=n||(c.y>=n?c=new st(c.x+(n-c.y)/(p.y-c.y)*(p.x-c.x),n)._round():p.y>=n&&(p=new st(c.x+(n-c.y)/(p.y-c.y)*(p.x-c.x),n)._round()),l&&c.equals(l[l.length-1])||o.push(l=[c]),l.push(p)))))}return o}function Bu(f,d,m,t){var e=[],y=f.image,_=y.pixelRatio,i=y.paddedRect.w-2,r=y.paddedRect.h-2,g=f.right-f.left,v=f.bottom-f.top,n=y.stretchX||[[0,i]],o=y.stretchY||[[0,r]],a=function(t,e){return t+e[1]-e[0]},x=n.reduce(a,0),b=o.reduce(a,0),s=i-x,l=r-b,w=0,S=x,T=0,I=b,E=0,A=s,z=0,P=l;y.content&&t&&(a=y.content,w=Ru(n,0,a[0]),T=Ru(o,0,a[1]),S=Ru(n,a[0],a[2]),I=Ru(o,a[1],a[3]),E=a[0]-w,z=a[1]-T,A=a[2]-a[0]-S,P=a[3]-a[1]-I);function u(t,e,i,r){var n=(t.stretch-w)/S*g+f.left,o=t.fixed-E-A*t.stretch/x,a=(e.stretch-T)/I*v+f.top,s=e.fixed-z-P*e.stretch/b,l=(i.stretch-w)/S*g+f.left,u=i.fixed-E-A*i.stretch/x,c=(r.stretch-T)/I*v+f.top,p=r.fixed-z-P*r.stretch/b,h=new st(n,a),a=new st(l,a),l=new st(l,c),c=new st(n,c),o=new st(o/_,s/_),s=new st(u/_,p/_);return(u=d*Math.PI/180)&&(p=Math.sin(u),u=[u=Math.cos(u),-p,p,u],h._matMult(u),a._matMult(u),c._matMult(u),l._matMult(u)),t=t.stretch+t.fixed,e=e.stretch+e.fixed,{tl:h,tr:a,bl:c,br:l,tex:{x:y.paddedRect.x+1+t,y:y.paddedRect.y+1+e,w:i.stretch+i.fixed-t,h:r.stretch+r.fixed-e},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:o,pixelOffsetBR:s,minFontScaleX:A/_/g,minFontScaleY:P/_/v,isSDF:m}}if(t&&(y.stretchX||y.stretchY))for(var c=Fu(n,s,x),p=Fu(o,l,b),h=0;h<c.length-1;h++)for(var C=c[h],k=c[h+1],M=0;M<p.length-1;
1M++)e.push(u(C,p[M],k,p[M+1]));else e.push(u({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:1+i},{fixed:0,stretch:1+r}));return e}function Ru(t,e,i){for(var r=0,n=0,o=t;n<o.length;n+=1){var a=o[n];r+=Math.max(e,Math.min(i,a[1]))-Math.max(e,Math.min(i,a[0]))}return r}function Fu(t,e,i){for(var r=[{fixed:-1,stretch:0}],n=0,o=t;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],a=r[r.length-1];r.push({fixed:s-a.stretch,stretch:a.stretch}),r.push({fixed:s-a.stretch,stretch:a.stretch+(l-s)})}return r.push({fixed:e+1,stretch:i}),r}function Ou(t,e,i,r,n,o,a,s,l,u){var c,p,h,f;this.boxStartIndex=t.length,l?(h=o.top,p=o.bottom,(c=o.collisionPadding)&&(h-=c[1],p+=c[3]),0<(f=p-h)&&(f=Math.max(10,f),this.circleDiameter=f)):(l=o.top*a-s,c=o.bottom*a+s,p=o.left*a-s,h=o.right*a+s,(f=o.collisionPadding)&&(p-=f[0]*a,l-=f[1]*a,h+=f[2]*a,c+=f[3]*a),u&&(s=new st(p,l),o=new st(h,l),f=new st(p,c),a=new st(h,c),u=u*Math.PI/180,s._rotate(u),o._rotate(u),f._rotate(u),a._rotate(u),p=Math.min(s.x,o.x,f.x,a.x),h=Math.max(s.x,o.x,f.x,a.x),l=Math.min(s.y,o.y,f.y,a.y),c=Math.max(s.y,o.y,f.y,a.y)),t.emplaceBack(e.x,e.y,p,l,h,c,i,r,n)),this.boxEndIndex=t.length}var Uu=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Vu),this.data=t,this.length=this.data.length,this.compare=e,0<this.length)for(var i=(this.length>>1)-1;0<=i;i--)this._down(i)};function Vu(t,e){return t<e?-1:e<t?1:0}function Nu(t,e){return e.max-t.max}function ju(t,e,i,r){this.p=new st(t,e),this.h=i,this.d=function(t,e){for(var i=!1,r=1/0,n=0;n<e.length;n++)for(var o=e[n],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l];u.y>t.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(i=!i),r=Math.min(r,ts(t,u,c))}return(i?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}Uu.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Uu.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,0<this.length&&(this.data[0]=e,this._down(0)),t}},Uu.prototype.peek=function(){return this.data[0]},Uu.prototype._up=function(t){for(var e=this.data,i=this.compare,r=e[t];0<t;){var n=t-1>>1,o=e[n];if(0<=i(r,o))break;e[t]=o,t=n}e[t]=r},Uu.prototype._down=function(t){for(var e=this.data,i=this.compare,r=this.length>>1,n=e[t];t<r;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&i(e[s],a)<0&&(a=e[o=s]),0<=i(a,n))break;e[t]=a,t=o}e[t]=n};var qu=Number.POSITIVE_INFINITY;function Zu(t,e){return e[1]!==qu?function(t,e,i){var r=0,n=0;switch(e=Math.abs(e),i=Math.abs(i),t){case"top-right":case"top-left":case"top":n=i-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-i}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,n]}(t,e[0],e[1]):function(t,e){var i=0,r=0;e<0&&(e=0);var n=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":r=n-7;break;case"bottom-right":case"bottom-left":r=7-n;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":i=-n;break;case"top-left":case"bottom-left":i=n;break;case"left":i=e;break;case"right":i=-e}return[i,r]}(t,e[0])}function Gu(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Xu(t,e,i,r,A,n,o,a,s,l,u,c,p,h,f){var d=function(t,e,i,r,n,o){for(var a=A.layout.get("text-rotate").evaluate(r,{})*Math.PI/180,s=[],l=0,u=t.positionedLines;l<u.length;l+=1)for(var c=u[l],p=0,h=c.positionedGlyphs;p<h.length;p+=1){var f,d,m,y,_,g,v,x,b,w,S,T,I,E=h[p];E.rect&&(f=E.rect||{},v=4,d=!0,y=1,_=0,b=(i||o)&&E.vertical,w=E.metrics.advance*E.scale/2,o&&t.verticalizable&&(_=c.lineOffset/2-(E.imageName?-(24-E.metrics.width*E.scale)/2:24*(E.scale-1))),E.imageName&&(d=(g=n[E.imageName]).sdf,v=1/(y=g.pixelRatio)),m=i?[E.x+w,E.y]:[0,0],x=i?[0,0]:[E.x+w+e[0],E.y+e[1]-_],S=[0,0],b&&(S=x,x=[0,0]),g=(E.metrics.left-v)*E.scale-w+x[0],_=(-E.metrics.top-v)*E.scale+x[1],v=g+f.w*E.scale/y,x=_+f.h*E.scale/y,y=new st(g,_),_=new st(v,_),g=new st(g,x),v=new st(v,x),b&&(x=new st(-w,w+17),b=-Math.PI/2,w=new st(22-(w=12-w),-(E.imageName?w:0)),S=new(Function.prototype.bind.apply(st,[null].concat(S))),y._rotateAroun
1d(b,x)._add(w)._add(S),_._rotateAround(b,x)._add(w)._add(S),g._rotateAround(b,x)._add(w)._add(S),v._rotateAround(b,x)._add(w)._add(S)),a&&(I=Math.sin(a),I=[T=Math.cos(a),-I,I,T],y._matMult(I),_._matMult(I),g._matMult(I),v._matMult(I)),T=new st(0,0),I=new st(0,0),s.push({tl:y,tr:_,bl:g,br:v,tex:f,writingMode:t.writingMode,glyphOffset:m,sectionIndex:E.sectionIndex,isSDF:d,pixelOffsetTL:T,pixelOffsetBR:I,minFontScaleX:0,minFontScaleY:0}))}return s}(i,a,n,o,r,t.allowVerticalPlacement),i=t.textSizeData,r=null;"source"===i.kind?32640<(r=[128*A.layout.get("text-size").evaluate(o,{})])[0]&&lt(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===i.kind&&(32640<(r=[128*h.compositeTextSizes[0].evaluate(o,{},f),128*h.compositeTextSizes[1].evaluate(o,{},f)])[0]||32640<r[1])&&lt(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,d,r,a,n,o,l,e,s.lineStartIndex,s.lineLength,p,f);for(var m=0,y=u;m<y.length;m+=1)c[y[m]]=t.text.placedSymbolArray.length-1;return 4*d.length}function Wu(t){for(var e in t)return t[e];return null}var Ku=fl.VectorTileFeature.types,Hu=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Ju(t,e,i,r,n,o,a,s,l,u,c,p,h){var f=s?Math.min(32640,Math.round(s[0])):0,s=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,i,Math.round(32*r),Math.round(32*n),o,a,(f<<1)+(l?1:0),s,16*u,16*c,256*p,256*h)}function Yu(t,e,i){t.emplaceBack(e.x,e.y,i),t.emplaceBack(e.x,e.y,i),t.emplaceBack(e.x,e.y,i),t.emplaceBack(e.x,e.y,i)}function Qu(t){for(var e=0,i=t.sections;e<i.length;e+=1)if(function(t){for(var e=0,i=t;e<i.length;e+=1)if(Jr(i[e].charCodeAt(0)))return 1}(i[e].text))return 1}function $u(t){this.layoutVertexArray=new Yn,this.indexArray=new vo,this.programConfigurations=t,this.segments=new la,this.dynamicLayoutVertexArray=new to,this.opacityVertexArray=new ro,this.placedSymbolArray=new Xo}$u.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},$u.prototype.upload=function(t,e,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Rl.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Fl.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Hu,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))},$u.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Vr("SymbolBuffers",$u);function tc(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new la,this.collisionVertexArray=new yo}tc.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Ol.members,!0)},tc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Vr("CollisionBuffers",tc);function ec(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ls([]),this.placementViewportMatrix=ls([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Au(this.zoom,e["text-size"]),this.iconSizeData=Au(this.zoom,e["icon-size"]);var i=this.layers[0].layout,r=i.get("symbol-sort-key"),e=i.get("symbol-z-order");this.canOverlap=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==e&&void 0!==r.constantOr(1),this.sortFeaturesByY=("viewport-y"===e||"auto"===e&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map(function(t){return fu[t]})),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id}),this.sourceID=t.sourceID}ec.prototype.createArrays=function(){this.text=new $u(new ja(this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new $u(new ja(this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.glyphOffsetArray=new $o,this.lineVertexArray=new ia,this.symbolInstances=new Jo}
1,ec.prototype.calculateGlyphDependencies=function(t,e,i,r,n){for(var o,a=0;a<t.length;a++)e[t.charCodeAt(a)]=!0,(i||r)&&n&&(o=jl[t.charAt(a)])&&(e[o.charCodeAt(0)]=!0)},ec.prototype.populate=function(t,e,i){var r=this.layers[0],n=r.layout,o=n.get("text-font"),a=n.get("text-field"),s=n.get("icon-image"),l=("constant"!==a.value.kind||a.value.value instanceof he&&!a.value.value.isEmpty()||0<a.value.value.toString().length)&&("constant"!==o.value.kind||0<o.value.value.length),u="constant"!==s.value.kind||!!s.value.value||0<Object.keys(s.parameters).length,c=n.get("symbol-sort-key");if(this.features=[],l||u){for(var p=e.iconDependencies,h=e.glyphDependencies,f=e.availableImages,d=new on(this.zoom),m=0,y=t;m<y.length;m+=1){var _=y[m],g=_.feature,v=_.id,x=_.index,b=_.sourceLayerIndex,w=r._featureFilter.needGeometry,_=Wa(g,w);if(r._featureFilter.filter(d,_,i)){w||(_.geometry=Xa(g));var S=void 0;l&&(T=r.getValueAndResolveTokens("text-field",_,i,f),Qu(T=he.factory(T))&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===$r||this.hasRTLText&&sn.isParsed())&&(S=function(t,i,e){return t.sections.forEach(function(t){t.text=function(t,e){e=i.layout.get("text-transform").evaluate(e,{});return"uppercase"===e?t=t.toLocaleUpperCase():"lowercase"===e&&(t=t.toLocaleLowerCase()),sn.applyArabicShaping&&(t=sn.applyArabicShaping(t)),t}(t.text,e)}),t}(T,r,_)));var T=void 0;if(u&&(T=(I=r.getValueAndResolveTokens("icon-image",_,i,f))instanceof fe?I:fe.fromString(I)),S||T){var I=this.sortFeaturesByKey?c.evaluate(_,{},i):void 0;if(this.features.push({id:v,text:S,icon:T,index:x,sourceLayerIndex:b,geometry:_.geometry,properties:g.properties,type:Ku[g.type],sortKey:I}),T&&(p[T.name]=!0),S){var E=o.evaluate(_,{},i).join(","),A="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&0<=this.writingModes.indexOf(fu.vertical);for(var z=0,P=S.sections;z<P.length;z+=1){var C,k,M=P[z];M.image?p[M.image.name]=!0:(C=Wr(S.toString()),k=h[k=M.fontStack||E]=h[k]||{},this.calculateGlyphDependencies(M.text,k,A,this.allowVerticalPlacement,C))}}}}}"line"===n.get("symbol-placement")&&(this.features=function(e){var n={},o={},a=[],i=0;function t(t){a.push(e[t]),i++}function r(t,e,i){var r=o[t];return delete o[t],o[e]=r,a[r].geometry[0].pop(),a[r].geometry[0]=a[r].geometry[0].concat(i[0]),r}function s(t,e,i){var r=n[e];return delete n[e],n[t]=r,a[r].geometry[0].shift(),a[r].geometry[0]=i[0].concat(a[r].geometry[0]),r}function l(t,e,i){e=i?e[0][e[0].length-1]:e[0][0];return t+":"+e.x+":"+e.y}for(var u=0;u<e.length;u++){var c,p,h,f=e[u],d=f.geometry,m=f.text?f.text.toString():null;m?(c=l(m,d),p=l(m,d,!0),c in o&&p in n&&o[c]!==n[p]?(h=s(c,p,d),f=r(c,p,a[h].geometry),delete n[c],delete o[p],o[l(m,a[f].geometry,!0)]=f,a[h].geometry=null):c in o?r(c,p,d):p in n?s(c,p,d):(t(u),n[c]=i-1,o[p]=i-1)):t(u)}return a.filter(function(t){return t.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(t,e){return t.sortKey-e.sortKey})}},ec.prototype.update=function(t,e,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,i),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,i))},ec.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},ec.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},ec.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},ec.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},ec.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},ec.prototype.addToLineVertexArray=function(t,e){var i=this.lineVertexArray.length;if(void 0!==t.segment){for(var r=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:r},a<e.length-1&&(r+=e[a+1].dist(e[a]));for(var s=t.segment||0;0<=s;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},0<s&&(n+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}}
vendor: 4,647 bytes, line 1
1,ec.prototype.addSymbols=function(t,e,i,r,n,o,a,s,l,u,c,p){for(var h=t.indexArray,f=t.layoutVertexArray,d=t.segments.prepareSegment(4*e.length,f,h,this.canOverlap?o.sortKey:void 0),m=this.glyphOffsetArray.length,y=d.vertexLength,_=this.allowVerticalPlacement&&a===fu.vertical?Math.PI/2:0,g=o.text&&o.text.sections,v=0;v<e.length;v++){var x=e[v],b=x.tl,w=x.tr,S=x.bl,T=x.br,I=x.tex,E=x.pixelOffsetTL,A=x.pixelOffsetBR,z=x.minFontScaleX,P=x.minFontScaleY,C=x.glyphOffset,k=x.isSDF,M=x.sectionIndex,D=d.vertexLength,x=C[1];Ju(f,s.x,s.y,b.x,x+b.y,I.x,I.y,i,k,E.x,E.y,z,P),Ju(f,s.x,s.y,w.x,x+w.y,I.x+I.w,I.y,i,k,A.x,E.y,z,P),Ju(f,s.x,s.y,S.x,x+S.y,I.x,I.y+I.h,i,k,E.x,A.y,z,P),Ju(f,s.x,s.y,T.x,x+T.y,I.x+I.w,I.y+I.h,i,k,A.x,A.y,z,P),Yu(t.dynamicLayoutVertexArray,s,_),h.emplaceBack(D,D+1,D+2),h.emplaceBack(D+1,D+2,D+3),d.vertexLength+=4,d.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(C[0]),v!==e.length-1&&M===e[v+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,o,o.index,{},p,g&&g[M])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,y,l,u,s.segment,i?i[0]:0,i?i[1]:0,r[0],r[1],a,0,!1,0,c)},ec.prototype._addCollisionDebugVertex=function(t,e,i,r,n,o){return e.emplaceBack(0,0),t.emplaceBack(i.x,i.y,r,n,Math.round(o.x),Math.round(o.y))},ec.prototype.addCollisionDebugVertices=function(t,e,i,r,n,o,a){var s=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),l=s.vertexLength,u=n.layoutVertexArray,c=n.collisionVertexArray,p=a.anchorX,a=a.anchorY;this._addCollisionDebugVertex(u,c,o,p,a,new st(t,e)),this._addCollisionDebugVertex(u,c,o,p,a,new st(i,e)),this._addCollisionDebugVertex(u,c,o,p,a,new st(i,r)),this._addCollisionDebugVertex(u,c,o,p,a,new st(t,r)),s.vertexLength+=4;n=n.indexArray;n.emplaceBack(l,l+1),n.emplaceBack(l+1,l+2),n.emplaceBack(l+2,l+3),n.emplaceBack(l+3,l),s.primitiveLength+=4},ec.prototype.addDebugCollisionBoxes=function(t,e,i,r){for(var n=t;n<e;n++){var o=this.collisionBoxArray.get(n);this.addCollisionDebugVertices(o.x1,o.y1,o.x2,o.y2,r?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i)}},ec.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new tc(uo,Ul.members,Do),this.iconCollisionBox=new tc(uo,Ul.members,Do);for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},ec.prototype._deserializeCollisionBoxesForSymbol=function(t,e,i,r,n,o,a,s,l){for(var u={},c=e;c<i;c++){var p=t.get(c);u.textBox={x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,anchorPointX:p.anchorPointX,anchorPointY:p.anchorPointY},u.textFeatureIndex=p.featureIndex;break}for(var h=r;h<n;h++){var f=t.get(h);u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}for(var d=o;d<a;d++){var m=t.get(d);u.iconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},u.iconFeatureIndex=m.featureIndex;break}for(var y=s;y<l;y++){var _=t.get(y);u.verticalIconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.verticalIconFeatureIndex=_.featureIndex;break}return u},ec.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var i=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},ec.prototype.hasTextData=function(){return 0<this.text.segments.get().length},ec.prototype.hasIconData=function(){return 0<this.icon.segments.get().length},ec.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ec.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&0<this.textCollisionBox.segments.get().length},ec.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&0<this.iconCollisionBox.segments.get().length},ec.prototype.addIndicesForPlacedSymbol=function(t,e){for(var e=t.placedSymbolArray.get(e),i=e.vertexStartIndex+4*e.numGlyphs,r=e.vertexStartIndex;r<i;r+=4)t.indexArray.emplaceBack(r,r+1,r+2),t.indexArray.emplaceBack(r+1,r+2,r+3)}
1,ec.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),i=Math.cos(t),r=[],n=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);r.push(0|Math.round(e*s.anchorX+i*s.anchorY)),n.push(s.featureIndex)}return o.sort(function(t,e){return r[t]-r[e]||n[e]-n[t]}),o},ec.prototype.addToSortKeyRanges=function(t,e){var i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===e?i.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})},ec.prototype.sortFeatures=function(t){var r=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(1<this.text.segments.get().length||1<this.icon.segments.get().length)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var e=0,i=this.symbolInstanceIndexes;e<i.length;e+=1){var n=this.symbolInstances.get(i[e]);this.featureSortOrder.push(n.featureIndex),[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex].forEach(function(t,e,i){0<=t&&i.indexOf(t)===e&&r.addIndicesForPlacedSymbol(r.text,t)}),0<=n.verticalPlacedTextSymbolIndex&&this.addIndicesForPlacedSymbol(this.text,n.verticalPlacedTextSymbolIndex),0<=n.placedIconSymbolIndex&&this.addIndicesForPlacedSymbol(this.icon,n.placedIconSymbolIndex),0<=n.verticalPlacedIconSymbolIndex&&this.addIndicesForPlacedSymbol(this.icon,n.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Vr("SymbolBucket",ec,{omit:["layers","collisionBoxArray","features","compareText"]}),ec.MAX_GLYPHS=65535,ec.addDynamicAttributes=Yu;function ic(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Xt,this.defaultValue=t}var vn=new Sn({"symbol-placement":new yn(Rt.layout_symbol["symbol-placement"]),"symbol-spacing":new yn(Rt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new yn(Rt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _n(Rt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new yn(Rt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new yn(Rt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new yn(Rt.layout_symbol["icon-ignore-placement"]),"icon-optional":new yn(Rt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new yn(Rt.layout_symbol["icon-rotation-alignment"]),"icon-size":new _n(Rt.layout_symbol["icon-size"]),"icon-text-fit":new yn(Rt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new yn(Rt.layout_symbol["icon-text-fit-padding"]),"icon-image":new _n(Rt.layout_symbol["icon-image"]),"icon-rotate":new _n(Rt.layout_symbol["icon-rotate"]),"icon-padding":new yn(Rt.layout_symbol["icon-padding"]),"icon-keep-upright":new yn(Rt.layout_symbol["icon-keep-upright"]),"icon-offset":new _n(Rt.layout_symbol["icon-offset"]),"icon-anchor":new _n(Rt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new yn(Rt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new yn(Rt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new yn(Rt.layout_symbol["text-rotation-alignment"]),"text-field":new _n(Rt.layout_symbol["text-field"]),"text-font":new _n(Rt.layout_symbol["text-font"]),"text-size":new _n(Rt.layout_symbol["text-size"]),"text-max-width":new _n(Rt.layout_symbol["text-max-width"]),"text-line-height":new yn(Rt.layout_symbol["text-line-height"]),"text-letter-spacing":new _n(Rt.layout_symbol["text-letter-spacing"]),"text-justify":new _n(Rt.layout_symbol["text-justify"]),"text-radial-offset":new _n(Rt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new yn(Rt.layout_symbol["text-variable-anchor"]),"text-anchor":new _n(Rt.layout_symbol["text-anchor"]),"text-max-angle":new yn(Rt.layout_symbol["text-max-angle"]),"text-writing-mode":new yn(Rt.layout_symbol["text-writing-mode"]),"text-rotate":new _n(Rt.layout_symbol["text-rotate"]),"text-padding":new yn(Rt.layout_symbol["text-padding"]),"text-keep-upright":new yn(Rt.layout_symbol["text-keep-upright"]),"text-transform":new _n(Rt.layout_symbol["text-transform"]),"text-offset":new _n(Rt.layout_symbol["text-offset"]),"text-allow-overlap":new yn(Rt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new yn(Rt.layout_symbol["text-ignore-placement"]),"text-optional":new yn(Rt.layout_symbol["text-optional"])}),rc={paint:new Sn({"icon-opacity":new _n(Rt.paint_symbol["icon-opacity"]),"icon-color":new _n(Rt.paint_symbol["icon-color"]),"icon-halo-color":new _n(Rt.paint_symbol["icon-halo-color"]),"icon-halo-width":new _n(Rt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _n(Rt.paint_symbol["icon-halo-blur"]),"icon-translate":new yn(Rt.paint_symbol["icon-translate"]),"icon-translate-anchor":new yn(Rt.paint_symbol["icon-translate-anchor"]),"text-opacity":new _n(Rt.paint_symbol["text-opacity"]),"text-color":new _n(Rt.paint_symbol["text-color"],{runtimeType:Jt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new _n(Rt.paint_symbol["text-halo-color"]),"text-halo-width":new _n(Rt.paint_symbol["text-halo-width"]),"text-halo-blur":new _n(Rt.paint_symbol["text-halo-blur"]),"text-translate":new yn(Rt.paint_symbol["text-translate"]),"text-translate-anchor":new yn(Rt.paint_symbol["text-translate-anchor"])}),layout:vn};ic.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},ic.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},ic.prototype.outputDefined=function(){return!1},ic.prototype.serialize=function(){return null},Vr("FormatSectionOverride",ic,{omit:["defaultValue"]});function nc(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,r)}var oc,ac,sc,lc,_n=((lc=In)&&(bc.__proto__=lc),((bc.prototype=Object.create(lc&&lc.prototype)).constructor=bc).prototype.recalculate=function(t,e){if(lc.prototype.recalculate.call(this,t,e),"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")){e=this.layout.get("text-writing-mode");if(e){for(var i=[],r=0,n=e;r<n.length;r+=1){var o=n[r];i.indexOf(o)<0&&i.push(o)}this.layout._values["text-writing-mode"]=i}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}
1,bc.prototype.getValueAndResolveTokens=function(t,e,i,r){var n,r=this.layout.get(t).evaluate(e,{},i,r),t=this._unevaluatedLayout._values[t];return t.isDataDriven()||Wi(t.value)||!r?r:(n=e.properties,r.replace(/{([^{}]+)}/g,function(t,e){return e in n?String(n[e]):""}))},bc.prototype.createBucket=function(t){return new ec(t)},bc.prototype.queryRadius=function(){return 0},bc.prototype.queryIntersectsFeature=function(){return!1},bc.prototype._setPaintOverrides=function(){for(var t=0,e=rc.paint.overridableProperties;t<e.length;t+=1){var i,r,n=e[t];bc.hasPaintOverride(this.layout,n)&&(i=this.paint.get(n),r=new ic(i),r=new Xi(r,i.property.specification),r="constant"===i.value.kind||"source"===i.value.kind?new Hi("source",r):new Ji("composite",r,i.value.zoomStops,i.value._interpolationType),this.paint._values[n]=new dn(i.property,r,i.parameters))}},bc.prototype._handleOverridablePaintPropertyUpdate=function(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&bc.hasPaintOverride(this.layout,t)},bc.hasPaintOverride=function(t,e){function i(t){for(var e=0,i=t;e<i.length;e+=1)if(n.overrides&&n.overrides.hasOverride(i[e]))return o=!0,0}var r,t=t.get("text-field"),n=rc.paint.properties[e],o=!1;return"constant"===t.value.kind&&t.value.value instanceof he?i(t.value.value.sections):"source"===t.value.kind&&(r=function(t){o||(t instanceof ge&&ye(t.value)===te?i(t.value.sections):t instanceof we?i(t.sections):t.eachChild(r))},(t=t.value)._styleExpression&&r(t._styleExpression.expression)),o},bc),uc={paint:new Sn({"background-color":new yn(Rt.paint_background["background-color"]),"background-pattern":new xn(Rt.paint_background["background-pattern"]),"background-opacity":new yn(Rt.paint_background["background-opacity"])})},vn=((sc=In)&&(xc.__proto__=sc),(xc.prototype=Object.create(sc&&sc.prototype)).constructor=xc),cc={paint:new Sn({"raster-opacity":new yn(Rt.paint_raster["raster-opacity"]),"raster-hue-rotate":new yn(Rt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new yn(Rt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new yn(Rt.paint_raster["raster-brightness-max"]),"raster-saturation":new yn(Rt.paint_raster["raster-saturation"]),"raster-contrast":new yn(Rt.paint_raster["raster-contrast"]),"raster-resampling":new yn(Rt.paint_raster["raster-resampling"]),"raster-fade-duration":new yn(Rt.paint_raster["raster-fade-duration"])})},xn=((ac=In)&&(vc.__proto__=ac),(vc.prototype=Object.create(ac&&ac.prototype)).constructor=vc),pc=((oc=In)&&(gc.__proto__=oc),((gc.prototype=Object.create(oc&&oc.prototype)).constructor=gc).prototype.is3D=function(){return"3d"===this.implementation.renderingMode},gc.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},gc.prototype.recalculate=function(){},gc.prototype.updateTransitions=function(){},gc.prototype.hasTransition=function(){},gc.prototype.serialize=function(){},gc.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},gc.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},gc),hc={circle:Si,heatmap:wi,hillshade:Ii,fill:it,"fill-extrusion":An,line:Ti,symbol:_n,background:vn,raster:xn},fc=f.HTMLImageElement,dc=f.HTMLCanvasElement,mc=f.HTMLVideoElement,yc=f.ImageData,_c=f.ImageBitmap;function gc(t){oc.call(this,t,{}),this.implementation=t}function vc(t){ac.call(this,t,cc)}function xc(t){sc.call(this,t,uc)}function bc(t){lc.call(this,t,rc)}nc.prototype.update=function(t,e,i){var r=t.width,n=t.height,o=!(this.size&&this.size[0]===r&&this.size[1]===n||i),a=this.context,s=a.gl;this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),o?(this.size=[r,n],t instanceof fc||t instanceof dc||t instanceof mc||t instanceof yc||_c&&t instanceof _c?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,r,n,0,this.format,s.UNSIGNED_BYTE,t.data)):(i=(o=i||{x:0,y:0}).x,o=o.y,t instanceof fc||t instanceof dc||t instanceof mc||t instanceof yc||_c&&t instanceof _c?s.texSubImage2D(s.TEXTURE_2D,0,i,o,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,i,o,r,n,s.RGBA,s.UNSIGNED_BYTE,t.data)),this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)}
1,nc.prototype.bind=function(t,e,i){var r=this.context.gl;r.bindTexture(r.TEXTURE_2D,this.texture),i!==r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=r.LINEAR),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,i||t),this.filter=t),e!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,e),this.wrap=e)},nc.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},nc.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};function wc(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})}wc.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){t._triggered=!1,t._callback()},0))},wc.prototype.remove=function(){delete this._channel,this._callback=function(){}};it=function(t,e,i){this.target=t,this.parent=e,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},m(["receive","process"],this),this.invoker=new wc(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=S()?t:f};function Sc(t,e,i){i=2*Math.PI*6378137/256/Math.pow(2,i);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}it.prototype.send=function(t,e,i,r,n){var o=this;void 0===n&&(n=!1);var a=Math.round(1e18*Math.random()).toString(36).substring(0,10);i&&(this.callbacks[a]=i);var s=E(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!i,targetMapId:r,mustQueue:n,sourceMapId:this.mapId,data:qr(e,s)},s),{cancel:function(){i&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:r,sourceMapId:o.mapId})}}},it.prototype.receive=function(t){var e=t.data,i=e.id;!i||e.targetMapId&&this.mapId!==e.targetMapId||("<cancel>"===e.type?(delete this.tasks[i],t=this.cancelCallbacks[i],delete this.cancelCallbacks[i],t&&t()):S()||e.mustQueue?(this.tasks[i]=e,this.taskQueue.push(i),this.invoker.trigger()):this.processTask(i,e))},it.prototype.process=function(){var t,e;this.taskQueue.length&&(t=this.taskQueue.shift(),e=this.tasks[t],delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e))},it.prototype.processTask=function(i,t){var r,n,e,o,a,s,l=this;"<response>"===t.type?(a=this.callbacks[i],delete this.callbacks[i],a&&(t.error?a(Zr(t.error)):a(null,Zr(t.data)))):(r=!1,n=E(this.globalScope)?void 0:[],e=t.hasCallback?function(t,e){r=!0,delete l.cancelCallbacks[i],l.target.postMessage({id:i,type:"<response>",sourceMapId:l.mapId,error:t?qr(t):null,data:qr(e,n)},n)}:function(t){r=!0},s=null,o=Zr(t.data),this.parent[t.type]?s=this.parent[t.type](t.sourceMapId,o,e):this.parent.getWorkerSource?(a=t.type.split("."),s=this.parent.getWorkerSource(t.sourceMapId,a[0],o.source)[a[1]](o,e)):e(new Error("Could not find function "+t.type)),!r&&s&&s.cancel&&(this.cancelCallbacks[i]=s.cancel))},it.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function Tc(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))}Tc.prototype.setNorthEast=function(t){return this._ne=t instanceof Ic?new Ic(t.lng,t.lat):Ic.convert(t),this},Tc.prototype.setSouthWest=function(t){return this._sw=t instanceof Ic?new Ic(t.lng,t.lat):Ic.convert(t),this},Tc.prototype.extend=function(t){var e,i,r=this._sw,n=this._ne;if(t instanceof Ic)i=e=t;else{if(!(t instanceof Tc))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Tc.convert(t)):this.extend(Ic.convert(t)):this;if(i=t._ne,!(e=t._sw)||!i)return this}return r||n?(r.lng=Math.min(e.lng,r.lng),r.lat=Math.min(e.lat,r.lat),n.lng=Math.max(i.lng,n.lng),n.lat=Math.max(i.lat,n.lat)):(this._sw=new Ic(e.lng,e.lat),this._ne=new Ic(i.lng,i.lat)),this},Tc.prototype.getCenter=function(){return new Ic((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tc.prototype.getSouthWest=function(){return this._sw},Tc.prototype.getNorthEast=function(){return this._ne},Tc.prototype.getNorthWest=function(){return new Ic(this.getWest(),this.getNorth())},Tc.prototype.getSouthEast=function(){return new Ic(this.getEast(),this.get
vendor: 9,575 bytes, line 1
1South())},Tc.prototype.getWest=function(){return this._sw.lng},Tc.prototype.getSouth=function(){return this._sw.lat},Tc.prototype.getEast=function(){return this._ne.lng},Tc.prototype.getNorth=function(){return this._ne.lat},Tc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tc.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tc.prototype.contains=function(t){var e=Ic.convert(t),i=e.lng,t=e.lat,e=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(e=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=t&&t<=this._ne.lat&&e},Tc.convert=function(t){return!t||t instanceof Tc?t:new Tc(t)};var Ic=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,90<this.lat||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ic.prototype.wrap=function(){return new Ic(l(this.lng,-180,180),this.lat)},Ic.prototype.toArray=function(){return[this.lng,this.lat]},Ic.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ic.prototype.distanceTo=function(t){var e=Math.PI/180,i=this.lat*e,r=t.lat*e,e=Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(e,1))},Ic.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,t=e/Math.cos(Math.PI/180*this.lat);return new Tc(new Ic(this.lng-t,this.lat-e),new Ic(this.lng+t,this.lat+e))},Ic.convert=function(t){if(t instanceof Ic)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Ic(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Ic(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Ec=2*Math.PI*6371008.8;function Ac(t){return Ec*Math.cos(t*Math.PI/180)}function zc(t){return(180+t)/360}function Pc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Cc(t,e){return t/Ac(e)}function kc(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}function Mc(t,e,i){void 0===i&&(i=0),this.x=+t,this.y=+e,this.z=+i}Mc.fromLngLat=function(t,e){void 0===e&&(e=0);t=Ic.convert(t);return new Mc(zc(t.lng),Pc(t.lat),Cc(e,t.lat))},Mc.prototype.toLngLat=function(){return new Ic(360*this.x-180,kc(this.y))},Mc.prototype.toAltitude=function(){return this.z*Ac(kc(this.y))},Mc.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ec*(t=kc(this.y),1/Math.cos(t*Math.PI/180));var t};function Dc(t,e,i){this.z=t,this.x=e,this.y=i,this.key=Rc(0,t,t,e,i)}Dc.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Dc.prototype.url=function(t,e){var i,r,n=(r=this.y,o=this.z,n=Sc(256*(i=this.x),256*(r=Math.pow(2,o)-r-1),o),o=Sc(256*(i+1),256*(1+r),o),n[0]+","+n[1]+","+o[0]+","+o[1]),o=function(t,e,i){for(var r,n="",o=t;0<o;o--)n+=(e&(r=1<<o-1)?1:0)+(i&r?2:0);return n}(this.z,this.x,this.y);return t[(this.x+this.y)%t.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"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",o).replace("{bbox-epsg-3857}",n)},Dc.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new st(8192*(t.x*e-this.x),8192*(t.y*e-this.y))},Dc.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};function Lc(t,e){this.wrap=t,this.canonical=e,this.key=Rc(t,e.z,e.z,e.x,e.y)}function Bc(t,e,i,r,n){this.overscaledZ=t,this.wrap=e,this.canonical=new Dc(i,+r,+n),this.key=Rc(e,t,i,r,n)}function Rc(t,e,i,r,n){(t*=2)<0&&(t=-1*t-1);var o=1<<i;return(o*o*t+o*n+r).toString(36)+i.toString(36)+e.toString(36)}Bc.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Bc.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Bc(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Bc(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Bc.prototype.calculateScaledKey=function(t,e){var i=this.canonical.z-t;return t>this.canonical.z?Rc(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Rc(this.wrap*+e,t,t,this.canonical.x>>i,this.canonical.y>>i)},Bc.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},Bc.prototype.children=function(t){if(this.overscaledZ>=t)return[new Bc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,i=2*this.canonical.x,t=2*this.canonical.y;return[new Bc(e,this.wrap,e,i,t),new Bc(e,this.wrap,e,1+i,t),new Bc(e,this.wrap,e,i,1+t),new Bc(e,this.wrap,e,1+i,1+t)]},Bc.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},Bc.prototype.wrapped=function(){return new Bc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Bc.prototype.unwrapTo=function(t){return new Bc(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Bc.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Bc.prototype.toUnwrapped=function(){return new Lc(this.wrap,this.canonical)},Bc.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Bc.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Mc(t.x-this.wrap,t.y))},Vr("CanonicalTileID",Dc),Vr("OverscaledTileID",Bc,{omit:["posMatrix"]});An=function(t,e,i){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(i&&"mapbox"!==i&&"terrarium"!==i)return lt('"'+i+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=e.height;var r=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=i||"mapbox";for(var n=0;n<r;n++)this.data[this._idx(-1,n)]=this.data[this._idx(0,n)],this.data[this._idx(r,n)]=this.data[this._idx(r-1,n)],this.data[this._idx(n,-1)]=this.data[this._idx(n,0)],this.data[this._idx(n,r)]=this.data[this._idx(n,r-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(r,-1)]=this.data[this._idx(r-1,0)],this.data[this._idx(-1,r)]=this.data[this._idx(0,r-1)],this.data[this._idx(r,r)]=this.data[this._idx(r-1,r-1)]};An.prototype.get=function(t,e){var i=new Uint8Array(this.data.buffer),e=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(i[e],i[1+e],i[2+e])},An.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},An.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},An.prototype._unpackMapbox=function(t,e,i){return(256*t*256+256*e+i)/10-1e4},An.prototype._unpackTerrarium=function(t,e,i){return 256*t+e+i/256-32768},An.prototype.getPixels=function(){return new bs({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},An.prototype.backfillBorder=function(t,e,i){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var r=e*this.dim,n=e*this.dim+this.dim,o=i*this.dim,a=i*this.dim+this.dim;switch(e){case-1:r=n-1;break;case 1:n=r+1}switch(i){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-i*this.dim,u=o;u<a;u++)for(var c=r;c<n;c++)this.data[this._idx(c,u)]=t.data[this._idx(c+s,u+l)]},Vr("DEMData",An);function Fc(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var i=t[e];this._stringToNumber[i]=e,this._numberToString[e]=i}}Fc.prototype.encode=function(t){return this._stringToNumber[t]},Fc.prototype.decode=function(t){return this._numberToString[t]};function Oc(t,e,i,r,n){this.type="Feature",(this._vectorTileFeature=t)._z=e,t._x=i,t._y=r,this.properties=t.properties,this.id=n}Ti={geometry:{configurable:!0}};Ti.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},Ti.geometry.set=function(t){this._geometry=t},Oc.prototype.toJSON=function(){var t,e={geometry:this.geometry};for(t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e},Object.defineProperties(Oc.prototype,Ti);_n=function(){this.state={},this.stateChanges={},this.deletedStates={}};_n.prototype.updateState=function(t,e,i){var r=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][r]=this.stateChanges[t][r]||{},v(this.stateChanges[t][r],i),null===this.deletedStates[t])for(var n in this.deletedStates[t]={},this.state[t])n!==r&&(this.deletedStates[t][n]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][r])for(var o in this.deletedStates[t][r]={},this.state[t][r])i[o]||(this.deletedStates[t][r][o]=null);else for(var a in i)this.deletedStates[t]&&this.deletedStates[t][r]&&null===this.deletedStates[t][r][a]&&delete this.deletedStates[t][r][a]}
1,_n.prototype.removeFeatureState=function(t,e,i){if(null!==this.deletedStates[t]){var r=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},i&&void 0!==e)null!==this.deletedStates[t][r]&&(this.deletedStates[t][r]=this.deletedStates[t][r]||{},this.deletedStates[t][r][i]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][r])for(i in this.deletedStates[t][r]={},this.stateChanges[t][r])this.deletedStates[t][r][i]=null;else this.deletedStates[t][r]=null;else this.deletedStates[t]=null}},_n.prototype.getState=function(t,e){var i=String(e),r=v({},(this.state[t]||{})[i],(this.stateChanges[t]||{})[i]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var n,e=this.deletedStates[t][e];if(null===e)return{};for(n in e)delete r[n]}return r},_n.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},_n.prototype.coalesceChanges=function(t,e){var i,r,n={};for(i in this.stateChanges){this.state[i]=this.state[i]||{};var o,a={};for(o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),v(this.state[i][o],this.stateChanges[i][o]),a[o]=this.state[i][o];n[i]=a}for(r in this.deletedStates){this.state[r]=this.state[r]||{};var s={};if(null===this.deletedStates[r])for(var l in this.state[r])s[l]={},this.state[r][l]={};else for(var u in this.deletedStates[r]){if(null===this.deletedStates[r][u])this.state[r][u]={};else for(var c=0,p=Object.keys(this.deletedStates[r][u]);c<p.length;c+=1)delete this.state[r][u][p[c]];s[u]=this.state[r][u]}n[r]=n[r]||{},v(n[r],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(var h in t)t[h].setFeatureState(n,e)};vn=function(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Lr(8192,16,0),this.grid3D=new Lr(8192,16,0),this.featureIndexArray=new aa,this.promoteId=e};function Uc(t,i,r,n,o){return _(t,function(t,e){e=i instanceof mn?i.get(e):null;return e&&e.evaluate?e.evaluate(r,n,o):e})}function Vc(t){for(var e=1/0,i=1/0,r=-1/0,n=-1/0,o=0,a=t;o<a.length;o+=1)var s=a[o],e=Math.min(e,s.x),i=Math.min(i,s.y),r=Math.max(r,s.x),n=Math.max(n,s.y);return{minX:e,minY:i,maxX:r,maxY:n}}function Nc(t,e){return e-t}vn.prototype.insert=function(t,e,i,r,n,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,r,n);for(var s=o?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],p=0;p<u.length;p++){var h=u[p];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<8192&&c[1]<8192&&0<=c[2]&&0<=c[3]&&s.insert(a,c[0],c[1],c[2],c[3])}},vn.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new fl.VectorTile(new ql(this.rawTileData)).layers,this.sourceLayerCoder=new Fc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},vn.prototype.query=function(n,e,i,o){var a=this;this.loadVTLayers();for(var s=n.params||{},l=8192/n.tileSize/n.scale,u=sr(s.filter),c=n.queryGeometry,p=n.queryPadding*l,t=Vc(c),h=this.grid.query(t.minX-p,t.minY-p,t.maxX+p,t.maxY+p),t=Vc(n.cameraQueryGeometry),r=0,f=this.grid3D.query(t.minX-p,t.minY-p,t.maxX+p,t.maxY+p,function(t,e,i,r){return function(t,e,i,r,n){for(var o=0,a=t;o<a.length;o+=1){var s=a[o];if(e<=s.x&&i<=s.y&&r>=s.x&&n>=s.y)return!0}var l=[new st(e,i),new st(e,n),new st(r,n),new st(r,i)];if(2<t.length)for(var u=0,c=l;u<c.length;u+=1)if(is(t,c[u]))return!0;for(var p=0;p<t.length-1;p++)if(function(t,e,i){var r=i[0],n=i[2];if(!(t.x<r.x&&e.x<r.x||t.x>n.x&&e.x>n.x||t.y<r.y&&e.y<r.y||t.y>n.y&&e.y>n.y)){n=w(t,e,i[0]);return n!==w(t,e,i[1])||n!==w(t,e,i[2])||n!==w(t,e,i[3])}}(t[p],t[p+1],l))return!0;return!1}(n.cameraQueryGeometry,t-p,e-p,i+p,r+p)});r<f.length;r+=1)h.push(f[r]);h.sort(Nc);for(var d,m={},y=0;y<h.length;y++)!function(t){var r,t=h[t];t!==d&&(d=t,t=a.featureIndexArray.get(t),r=null,a.loadMatchingFeature(m,t.bucketIndex,t.sourceLayerIndex,t.featureIndex,u,s.layers,s.availableImages,e,i,o,function(t,e,i){return r=r||Xa(t),e.queryIntersectsFeature(c,t,i,r,a.z,n.transform,l,n.pixelPosMatrix)}))}(y);return m}
1,vn.prototype.loadMatchingFeature=function(t,e,i,r,n,o,a,s,l,u,c){var p=this.bucketLayerIDs[e];if(!o||function(t,e){for(var i=0;i<t.length;i++)if(0<=e.indexOf(t[i]))return 1}(o,p)){var e=this.sourceLayerCoder.decode(i),h=this.vtLayers[e].feature(r);if(n.needGeometry){i=Wa(h,!0);if(!n.filter(new on(this.tileID.overscaledZ),i,this.tileID.canonical))return}else if(!n.filter(new on(this.tileID.overscaledZ),h))return;for(var f=this.getId(h,e),d=0;d<p.length;d++){var m,y,_,g=p[d];o&&o.indexOf(g)<0||(m=s[g])&&(y={},void 0!==f&&u&&(y=u.getState(m.sourceLayer||"_geojsonTileLayer",f)),(_=v({},l[g])).paint=Uc(_.paint,m.paint,h,y,a),_.layout=Uc(_.layout,m.layout,h,y,a),(m=!c||c(h,m,y))&&((y=new Oc(h,this.z,this.x,this.y,f)).layer=_,void 0===(_=t[g])&&(_=t[g]=[]),_.push({featureIndex:r,feature:y,intersectionZ:m})))}}},vn.prototype.lookupSymbolFeatures=function(t,e,i,r,n,o,a,s){var l={};this.loadVTLayers();for(var u=sr(n),c=0,p=t;c<p.length;c+=1)this.loadMatchingFeature(l,i,r,p[c],u,o,a,s,e);return l},vn.prototype.hasLayer=function(t){for(var e=0,i=this.bucketLayerIDs;e<i.length;e+=1)for(var r=0,n=i[e];r<n.length;r+=1)if(t===n[r])return!0;return!1},vn.prototype.getId=function(t,e){var i=t.id;return this.promoteId&&"boolean"==typeof(i=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]])&&(i=Number(i)),i},Vr("FeatureIndex",vn,{omit:["rawTileData","sourceLayerCoder"]});xn=function(t,e){this.tileID=t,this.uid=c++,this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};xn.prototype.registerFadeDuration=function(t){t+=this.timeAdded;t<B.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)},xn.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},xn.prototype.loadVectorData=function(t,e,i){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var r in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,n){var o={};if(!n)return o;for(var a=0,s=t;a<s.length;a+=1)!function(){var t=s[a],i=t.layerIds.map(function(t){return n.getLayer(t)}).filter(Boolean);if(0!==i.length){t.layers=i,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map(function(e){return i.filter(function(t){return t.id===e})[0]}));for(var e=0,r=i;e<r.length;e+=1)o[r[e].id]=t}}();return o}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[r];if(n instanceof ec){if(this.hasSymbolBuckets=!0,!i)break;n.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var o in this.buckets){var a=this.buckets[o];if(a instanceof ec&&a.hasRTLText){this.hasRTLText=!0,sn.isLoading()||sn.isLoaded()||"deferred"!==$r||nn();break}}for(var s in this.queryPadding=0,this.buckets){var l=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(s).queryRadius(l))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new jo},xn.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},xn.prototype.getBucket=function(t){return this.buckets[t.id]},xn.prototype.upload=function(t){for(var e in this.buckets){var i=this.buckets[e];i.uploadPending()&&i.upload(t)}var r=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new nc(t,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new nc(t,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)},xn.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}
1,xn.prototype.queryRenderedFeatures=function(t,e,i,r,n,o,a,s,l,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:n,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:a,queryPadding:this.queryPadding*l},t,e,i):{}},xn.prototype.querySourceFeatures=function(t,e){var i=this.latestFeatureIndex;if(i&&i.rawTileData){var r=i.loadVTLayers(),n=e?e.sourceLayer:"",o=r._geojsonTileLayer||r[n];if(o)for(var a=sr(e&&e.filter),e=this.tileID.canonical,s=e.z,l=e.x,u=e.y,c={z:s,x:l,y:u},p=0;p<o.length;p++){var h=o.feature(p);if(a.needGeometry){var f=Wa(h,!0);if(!a.filter(new on(this.tileID.overscaledZ),f,this.tileID.canonical))continue}else if(!a.filter(new on(this.tileID.overscaledZ),h))continue;f=i.getId(h,n),f=new Oc(h,s,l,u,f);f.tile=c,t.push(f)}}},xn.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},xn.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},xn.prototype.setExpiryData=function(t){var e,i,r=this.expirationTime;t.cacheControl?(e=T(t.cacheControl))["max-age"]&&(this.expirationTime=Date.now()+1e3*e["max-age"]):t.expires&&(this.expirationTime=new Date(t.expires).getTime()),this.expirationTime&&(e=Date.now(),t=!1,this.expirationTime>e?t=!1:r&&!(this.expirationTime<r)&&(i=this.expirationTime-r)?this.expirationTime=e+Math.max(i,3e4):t=!0,t?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0)},xn.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},xn.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var i,r,n,o,a=this.latestFeatureIndex.loadVTLayers();for(i in this.buckets)e.style.hasLayer(i)&&(o=a[n=(r=this.buckets[i]).layers[0].sourceLayer||"_geojsonTileLayer"],n=t[n],o&&n&&0!==Object.keys(n).length&&(r.update(n,o,this.imageAtlas&&this.imageAtlas.patternPositions||{}),(o=e&&e.style&&e.style.getLayer(i))&&(this.queryPadding=Math.max(this.queryPadding,o.queryRadius(r)))))}},xn.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},xn.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<B.now()},xn.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},xn.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=B.now()+t},xn.prototype.setDependencies=function(t,e){for(var i={},r=0,n=e;r<n.length;r+=1)i[n[r]]=!0;this.dependencies[t]=i},xn.prototype.hasDependency=function(t,e){for(var i=0,r=t;i<r.length;i+=1){var n=this.dependencies[r[i]];if(n)for(var o=0,a=e;o<a.length;o+=1)if(n[a[o]])return!0}return!1};var jc=f.performance,Ti=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},jc.mark(this._marks.start)};Ti.prototype.finish=function(){jc.mark(this._marks.end);var t=jc.getEntriesByName(this._marks.measure);return 0===t.length&&(jc.measure(this._marks.measure,this._marks.start,this._marks.end),t=jc.getEntriesByName(this._marks.measure),jc.clearMarks(this._marks.start),jc.clearMarks(this._marks.end),jc.clearMeasures(this._marks.measure)),t},t.Actor=it,t.AlphaImage=xs,t.CanonicalTileID=Dc,t.CollisionBoxArray=jo,t.Color=ue,t.DEMData=An,t.DataConstantProperty=yn,t.DictionaryCoder=Fc,t.EXTENT=8192,t.ErrorEvent=Lt,t.EvaluationParameters=on,t.Event=kt,t.Evented=Mt,t.FeatureIndex=vn,t.FillBucket=el,t.FillExtrusionBucket=_l,t.ImageAtlas=wn,t.ImagePosition=pu,t.LineBucket=Sl,t.LngLat=Ic,t.LngLatBounds=Tc,t.MercatorCoordinate=Mc,t.ONE_EM=24,t.OverscaledTileID=Bc,t.Point=st,t.Point$1=st,t.Properties=Sn,t.Protobuf=ql,t.RGBAImage=bs,t.RequestManager=N,t.RequestPerformance=Ti,t.ResourceType=_t,t.SegmentVector=la,t.SourceFeatureState=_n,t.StructArrayLayout1ui2=nt,t.StructArrayLayout2f1f2i16=ho,t.StructArrayLayout2i4=Dn,t.StructArrayLayout3ui6=vo,t.StructArrayLayout4i8=Rn,t.SymbolBucket=ec,t.Texture=nc,t.Tile=xn,t.Transitionable=cn,t.Uniform1f=Ta,t.Uniform1i=Ai,t.Uniform2f=Ei,t.Uniform3f=zn,t.Uniform4f=Ia,t.UniformColor=Ea,t.UniformMatrix4f=ao,t.UnwrappedTileID=Lc,t.ValidationError=Ft,t.WritingMode=fu,t.ZoomHistory=Gr,t.add=function(t,e,
1i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t},t.addDynamicAttributes=Yu,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,o=new Array(t.length),a=null;t.forEach(function(t,i){e(t,function(t,e){t&&(a=t),o[i]=e,0==--n&&r(a,o)})})},t.bezier=a,t.bindAll=m,t.browser=B,t.cacheEntryPossiblyAdded=function(t){++mt>ut&&(t.getActor().send("enforceCacheSizeLimit",at),mt=0)},t.clamp=u,t.clearTileCache=function(t){var e=f.caches.delete("mapbox-tiles");t&&e.catch(t).then(function(){return t()})},t.clipLine=Lu,t.clone=function(t){var e=new ss(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=x,t.clone$2=function(t){var e=new ss(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=M,t.config=R,t.create=function(){var t=new ss(16);return ss!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new ss(9);return ss!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new ss(4);return ss!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Ki,t.createLayout=Cn,t.createStyleLayer=function(t){return new("custom"===t.type?pc:hc[t.type])(t)},t.cross=function(t,e,i){var r=e[0],n=e[1],o=e[2],a=i[0],e=i[1],i=i[2];return t[0]=n*i-o*e,t[1]=o*a-r*i,t[2]=r*e-n*a,t},t.deepEqual=function t(e,i){if(Array.isArray(e)){if(!Array.isArray(i)||e.length!==i.length)return!1;for(var r=0;r<e.length;r++)if(!t(e[r],i[r]))return!1;return!0}if("object"!=typeof e||null===e||null===i)return e===i;if("object"!=typeof i)return!1;if(Object.keys(e).length!==Object.keys(i).length)return!1;for(var n in e)if(!t(e[n],i[n]))return!1;return!0},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=s,t.emitValidationErrors=Dr,t.endsWith=y,t.enforceCacheSizeLimit=function(r){ht(),Y&&Y.then(function(i){i.keys().then(function(t){for(var e=0;e<t.length-r;e++)i.delete(t[e])})})},t.evaluateSizeForFeature=zu,t.evaluateSizeForZoom=Pu,t.evaluateVariableOffset=Zu,t.evented=an,t.extend=v,t.featureFilter=sr,t.filterObject=g,t.fromRotation=function(t,e){var i=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=i,t[2]=0,t[3]=-i,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=wu,t.getAnchorJustification=Gu,t.getArrayBuffer=St,t.getImage=zt,t.getJSON=function(t,e){return wt(v(t,{type:"json"}),e)},t.getRTLTextPluginStatus=rn,t.getReferrer=xt,t.getVideo=function(t,e){var i=f.document.createElement("video");i.muted=!0,i.onloadstart=function(){e(null,i)};for(var r=0;r<t.length;r++){var n=f.document.createElement("source"),o=t[r],a=void 0;(a=f.document.createElement("a")).href=o,a.protocol===f.document.location.protocol&&a.host===f.document.location.host||(i.crossOrigin="Anonymous"),n.src=t[r],i.appendChild(n)}return{cancel:function(){}}},t.identity=ls,t.invert=function(t,e){var i=e[0],r=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],_=e[15],g=i*s-r*a,v=i*l-n*a,x=i*u-o*a,b=r*l-n*s,w=r*u-o*s,S=n*u-o*l,T=c*m-p*d,I=c*y-h*d,E=c*_-f*d,A=p*y-h*m,z=p*_-f*m,P=h*_-f*y,e=g*P-v*z+x*A+b*E-w*I+S*T;return e?(t[0]=(s*P-l*z+u*A)*(e=1/e),t[1]=(n*z-r*P-o*A)*e,t[2]=(m*S-y*w+_*b)*e,t[3]=(h*w-p*S-f*b)*e,t[4]=(l*E-a*P-u*I)*e,t[5]=(i*P-n*E+o*I)*e,t[6]=(y*x-d*S-_*v)*e,t[7]=(c*S-h*x+f*v)*e,t[8]=(a*z-s*E+u*T)*e,t[9]=(r*E-i*z-o*T)*e,t[10]=(d*w-m*x+_*g)*e,t[11]=(p*x-c*w-f*g)*e,t[12]=(s*I-a*A-l*T)*e,t[13]=(i*A-r*I+n*T)*e,t[14]=(m*v-d*b-y*g)*e,t[15]=(c*b-p*v+h*g)*e,t):null},t.isChar=Xr,t.isMapboxURL=q,t.keysDifference=function(t,e){var i,r=[];for(i in t)i in e||r.push(i);return r},t.makeRequest=wt,t.mapObject=_,t.mercatorXfromLng=zc,t.mercatorYfromLat=Pc,t.mercatorZfromAltitude=Cc,t.mul=J,t.multiply=us,t.mvt=fl,t.nextPowerOfTwo=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.normalize=function(t,e){var i=e[0],r=e[1],n=e[2],n=i*i+r*r+n*n;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},t.number=Ke,t.offscreenCanvasSupported=yt,t.ortho=function(t,e,
1i,r,n,o,a){var s=1/(e-i),l=1/(r-n),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+i)*s,t[13]=(n+r)*l,t[14]=(a+o)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new ql(t).readFields(su,[])},t.pbf=ql,t.performSymbolLayout=function(I,E,A,z,P,t,C){I.createArrays(),I.tilePixelRatio=8192/(512*I.overscaling),I.compareText={},I.iconsNeedLinear=!1;var e,i,k=I.layers[0].layout,r=I.layers[0]._unevaluatedLayout._values,M={};"composite"===I.textSizeData.kind&&(i=(e=I.textSizeData).maxZoom,M.compositeTextSizes=[r["text-size"].possiblyEvaluate(new on(e.minZoom),C),r["text-size"].possiblyEvaluate(new on(i),C)]),"composite"===I.iconSizeData.kind&&(i=(e=I.iconSizeData).maxZoom,M.compositeIconSizes=[r["icon-size"].possiblyEvaluate(new on(e.minZoom),C),r["icon-size"].possiblyEvaluate(new on(i),C)]),M.layoutTextSize=r["text-size"].possiblyEvaluate(new on(I.zoom+1),C),M.layoutIconSize=r["icon-size"].possiblyEvaluate(new on(I.zoom+1),C),M.textMaxSize=r["text-size"].possiblyEvaluate(new on(18));for(var D=24*k.get("text-line-height"),L="map"===k.get("text-rotation-alignment")&&"point"!==k.get("symbol-placement"),B=k.get("text-keep-upright"),R=k.get("text-size"),n=function(){var t=O[F],e=k.get("text-font").evaluate(t,{},C).join(","),i=R.evaluate(t,{},C),r=M.layoutTextSize.evaluate(t,{},C),n=M.layoutIconSize.evaluate(t,{},C),o={horizontal:{},vertical:void 0},a=t.text,s=[0,0];if(a){var l=a.toString(),u=24*k.get("text-letter-spacing").evaluate(t,{},C),c=function(){for(var t,e=0,i=l;e<i.length;e+=1)if(t=i[e].charCodeAt(0),Xr.Arabic(t)||Xr["Arabic Supplement"](t)||Xr["Arabic Extended-A"](t)||Xr["Arabic Presentation Forms-A"](t)||Xr["Arabic Presentation Forms-B"](t))return;return 1}()?u:0,p=k.get("text-anchor").evaluate(t,{},C),h=k.get("text-variable-anchor");h||(S=k.get("text-radial-offset").evaluate(t,{},C),s=S?Zu(p,[24*S,qu]):k.get("text-offset").evaluate(t,{},C).map(function(t){return 24*t}));var f=L?"center":k.get("text-justify").evaluate(t,{},C),d=k.get("symbol-placement"),m="point"===d?24*k.get("text-max-width").evaluate(t,{},C):0,y=function(){I.allowVerticalPlacement&&Wr(l)&&(o.vertical=mu(a,E,A,P,e,m,D,p,"left",c,s,fu.vertical,!0,d,r,i))};if(!L&&h){for(var _="auto"===f?h.map(Gu):[f],g=!1,v=0;v<_.length;v++){var x,b=_[v];o.horizontal[b]||(g?o.horizontal[b]=o.horizontal[0]:(x=mu(a,E,A,P,e,m,D,"center",b,c,s,fu.horizontal,!1,d,r,i))&&(g=1===(o.horizontal[b]=x).positionedLines.length))}y()}else{"auto"===f&&(f=Gu(p));var w=mu(a,E,A,P,e,m,D,p,f,c,s,fu.horizontal,!1,d,r,i);w&&(o.horizontal[f]=w),y(),Wr(l)&&L&&B&&(o.vertical=mu(a,E,A,P,e,m,D,p,f,c,s,fu.vertical,!1,d,r,i))}}var u=void 0,S=!1;t.icon&&t.icon.name&&((T=z[t.icon.name])&&(h=P[t.icon.name],w=k.get("icon-offset").evaluate(t,{},C),y=wu(k.get("icon-anchor").evaluate(t,{},C)),f=w[0]-h.displaySize[0]*y.horizontalAlign,y=w[1]-h.displaySize[1]*y.verticalAlign,u={image:h,top:y,bottom:y+h.displaySize[1],left:f,right:f+h.displaySize[0]},S=T.sdf,void 0===I.sdfIcons?I.sdfIcons=T.sdf:I.sdfIcons!==T.sdf&&lt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),T.pixelRatio===I.pixelRatio&&0===k.get("icon-rotate").constantOr(1)||(I.iconsNeedLinear=!0)));var T=Wu(o.horizontal)||o.vertical;I.iconsInText=!!T&&T.iconsInText,(T||u)&&function(e,i,r,n,o,a,s,t,l,u,c){var p=a.textMaxSize.evaluate(i,{});void 0===p&&(p=s);var h,f=e.layers[0].layout,d=f.get("icon-offset").evaluate(i,{},c),m=Wu(r.horizontal),y=s/24,_=e.tilePixelRatio*y,g=e.tilePixelRatio*p/24,v=e.tilePixelRatio*t,x=e.tilePixelRatio*f.get("symbol-spacing"),b=f.get("text-padding")*e.tilePixelRatio,w=f.get("icon-padding")*e.tilePixelRatio,S=f.get("text-max-angle")/180*Math.PI,T="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),I="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),p=f.get("symbol-placement"),E=x/2,t=f.get("icon-text-fit");n&&"none"!==t&&(e.allowVerticalPlacement&&r.vertical&&(h=Su(n,r.vertical,t,f.get("icon-text-fit-padding"),d,y)),m&&(n=Su(n,m,t,f.get("icon-text-fit-padding"),d,y)));function A(K,t){t.x<0||8192<=t.x||t.y<0||8192<=t.y||function(t,e,
1i,r,n,o,a,s,l,u,c,p,h,f,d,m,y,_,g,v,x,b,w,S){var T,I,E,A,z,P=t.addToLineVertexArray(e,K),C=0,k=0,M=0,D=0,L=-1,B=-1,R={},F=ha(""),O=0,U=0,U=void 0===a._unevaluatedLayout.getValue("text-radial-offset")?(O=(I=a.layout.get("text-offset").evaluate(v,{},w).map(function(t){return 24*t}))[0],I[1]):(O=24*a.layout.get("text-radial-offset").evaluate(v,{},w),qu);for(z in t.allowVerticalPlacement&&i.vertical&&(I=a.layout.get("text-rotate").evaluate(v,{},w)+90,E=new Ou(s,e,l,u,c,i.vertical,p,h,f,I),o&&(T=new Ou(s,e,l,u,c,o,m,y,f,I))),r&&(G=Bu(r,q=a.layout.get("icon-rotate").evaluate(v,{}),b,Z="none"!==a.layout.get("icon-text-fit")),X=o?Bu(o,q,b,Z):void 0,A=new Ou(s,e,l,u,c,r,m,y,!1,q),C=4*G.length,W=null,"source"===(Z=t.iconSizeData).kind?32640<(W=[128*a.layout.get("icon-size").evaluate(v,{})])[0]&&lt(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===Z.kind&&(32640<(W=[128*x.compositeIconSizes[0].evaluate(v,{},w),128*x.compositeIconSizes[1].evaluate(v,{},w)])[0]||32640<W[1])&&lt(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,G,W,g,_,v,!1,e,P.lineStartIndex,P.lineLength,-1,w),L=t.icon.placedSymbolArray.length-1,X&&(k=4*X.length,t.addSymbols(t.icon,X,W,g,_,v,fu.vertical,e,P.lineStartIndex,P.lineLength,-1,w),B=t.icon.placedSymbolArray.length-1)),i.horizontal){var V,N=i.horizontal[z];V||(F=ha(N.text),j=a.layout.get("text-rotate").evaluate(v,{},w),V=new Ou(s,e,l,u,c,N,p,h,f,j));var j=1===N.positionedLines.length;if(M+=Xu(t,e,N,n,a,f,v,d,P,i.vertical?fu.horizontal:fu.horizontalOnly,j?Object.keys(i.horizontal):[z],R,L,x,w),j)break}i.vertical&&(D+=Xu(t,e,i.vertical,n,a,f,v,d,P,fu.vertical,["vertical"],R,B,x,w));var r=V?V.boxStartIndex:t.collisionBoxArray.length,m=V?V.boxEndIndex:t.collisionBoxArray.length,y=E?E.boxStartIndex:t.collisionBoxArray.length,q=E?E.boxEndIndex:t.collisionBoxArray.length,Z=A?A.boxStartIndex:t.collisionBoxArray.length,G=A?A.boxEndIndex:t.collisionBoxArray.length,X=T?T.boxStartIndex:t.collisionBoxArray.length,W=T?T.boxEndIndex:t.collisionBoxArray.length,g=-1,_=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e},_=-1<(g=_(T,g=_(A,g=_(E,g=_(V,g)))))?1:0;_&&(g*=S/24),t.glyphOffsetArray.length>=ec.MAX_GLYPHS&&lt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==v.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,v.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,0<=R.right?R.right:-1,0<=R.center?R.center:-1,0<=R.left?R.left:-1,R.vertical||-1,L,B,F,r,m,y,q,Z,G,X,W,l,M,D,C,k,_,0,p,O,U,g)}(e,t,r,n,o,h,e.layers[0],e.collisionBoxArray,i.index,i.sourceLayerIndex,e.index,_,b,T,l,v,w,I,d,i,a,u,c,s)}var z,P,C,k,M,D,L,B,R,F,O;if("line"===p)for(var U=0,V=Lu(i.geometry,0,0,8192,8192);U<V.length;U+=1)for(var N=V[U],j=0,q=(z=N,P=x,C=S,k=r.vertical||m,M=n,D=24,L=g,B=e.overscaling,R=8192,O=F=void 0,F=Mu(k,D,L),O=Du(k,M),k=O*L,M=0===z[0].x||z[0].x===R||0===z[0].y||z[0].y===R,P-k<P/4&&(P=k+P/4),function t(e,i,r,n,o,a,s,l,u){for(var c=a/2,p=ku(e),h=0,f=i-r,d=[],m=0;m<e.length-1;m++){for(var y=e[m],_=e[m+1],g=y.dist(_),v=_.angleTo(y);f+r<h+g;){var x=((f+=r)-h)/g,b=Ke(y.x,_.x,x),x=Ke(y.y,_.y,x);0<=b&&b<u&&0<=x&&x<u&&0<=f-c&&f+c<=p&&((x=new Iu(b,x,v,m))._round(),n&&!Cu(e,x,a,n,o)||d.push(x))}h+=g}return l||d.length||s||(d=t(e,h/2,r,n,o,a,s,!0,u)),d}(z,M?P/2*B%P:(O/2+2*D)*L*B%P,P,F,C,k,M,!1,R));j<q.length;j+=1){var Z=q[j];m&&function(t,e,i,r){if(t=t.compareText,e in t){for(var n=t[e],o=n.length-1;0<=o;o--)if(r.dist(n[o])<i)return 1}else t[e]=[];return t[e].push(r),0}(e,m.text,E,Z)||A(N,Z)}else if("line-center"===p)for(var G=0,X=i.geometry;G<X.length;G+=1){var W,K=X[G];1<K.length&&((W=function(t,e,i,r,n,o){for(var a=Mu(i,n,o),s=Du(i,r)*o,l=0,u=ku(t)/2,c=0;c<t.length-1;c++){var p=t[c],h=t[c+1],f=p.dist(h);if(u<l+f){var d=(u-l)/f,m=Ke(p.x,h.x,d),d=Ke(p.y,h.y,d),p=new Iu(m,d,h.angleTo(p),c);return p._round(),!a||Cu(t,p,s,a,e)?p:void 0}l+=f}}(K,S,r.vertical||m,n,24,g))&&A(K,W))}else if("Polygon"===i.type)for(var H=0,J=Ys(i.geometry,0);H<J.length;H+=1){var Y=J[H],Q=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);for(var r=1/0,n=1/0,o=-1/0,a=-1/0,s=t[0],l=0;l<s.length;l++){var u=s[l];(!l||u.x<r)&&(r=u.x),(!l||u.y<n)&&(n=u.y),(!l||u.x>o)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var c=Math.min(o-r,a-n),p=c/2,h=new Uu([],Nu);
vendor: 6,636 bytes, line 1
1if(0===c)return new st(r,n);for(var f=r;f<o;f+=c)for(var d=n;d<a;d+=c)h.push(new ju(f+p,d+p,p,t));for(var m=function(t){for(var e=0,i=0,r=0,n=t[0],o=0,a=n.length,s=a-1;o<a;s=o++){var l=n[o],u=n[s],c=l.x*u.y-u.x*l.y;i+=(l.x+u.x)*c,r+=(l.y+u.y)*c,e+=3*c}return new ju(i/e,r/e,0,t)}(t),y=h.length;h.length;){var _=h.pop();(_.d>m.d||!m.d)&&(m=_,i&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,y)),_.max-m.d<=e||(h.push(new ju(_.p.x-(p=_.h/2),_.p.y-p,p,t)),h.push(new ju(_.p.x+p,_.p.y-p,p,t)),h.push(new ju(_.p.x-p,_.p.y+p,p,t)),h.push(new ju(_.p.x+p,_.p.y+p,p,t)),y+=4)}return i&&(console.log("num probes: "+y),console.log("best distance: "+m.d)),m.p}(Y,16);A(Y[0],new Iu(Q.x,Q.y,0))}else if("LineString"===i.type)for(var $=0,tt=i.geometry;$<tt.length;$+=1){var et=tt[$];A(et,new Iu(et[0].x,et[0].y,0))}else if("Point"===i.type)for(var it=0,rt=i.geometry;it<rt.length;it+=1)for(var nt=0,ot=rt[it];nt<ot.length;nt+=1){var at=ot[nt];A([at],new Iu(at.x,at.y,0))}}(I,t,o,u,z,M,r,n,s,S,C)},F=0,O=I.features;F<O.length;F+=1)n();t&&I.generateCollisionDebugBuffers()},t.perspective=function(t,e,i,r,n){var e=1/Math.tan(e/2);return t[0]=e/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(t[10]=(n+r)*(e=1/(r-n)),t[14]=2*n*r*e):(t[10]=-1,t[14]=-2*r),t},t.pick=function(t,e){for(var i={},r=0;r<e.length;r++){var n=e[r];n in t&&(i[n]=t[n])}return i},t.plugin=sn,t.polygonIntersectsPolygon=Ja,t.postMapLoadEvent=ot,t.postTurnstileEvent=rt,t.potpack=cu,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Vr,t.registerForPluginStateChange=function(t){return t({pluginStatus:$r,pluginURL:tn}),an.on("pluginStateChange",t),t},t.renderColorRamp=Ss,t.rotate=function(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3],e=Math.sin(i),i=Math.cos(i);return t[0]=r*i+o*e,t[1]=n*i+a*e,t[2]=r*-e+o*i,t[3]=n*-e+a*i,t},t.rotateX=function(t,e,i){var r=Math.sin(i),n=Math.cos(i),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],i=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+u*r,t[5]=a*n+c*r,t[6]=s*n+p*r,t[7]=l*n+i*r,t[8]=u*n-o*r,t[9]=c*n-a*r,t[10]=p*n-s*r,t[11]=i*n-l*r,t},t.rotateZ=function(t,e,i){var r=Math.sin(i),n=Math.cos(i),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],i=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+u*r,t[1]=a*n+c*r,t[2]=s*n+p*r,t[3]=l*n+i*r,t[4]=u*n-o*r,t[5]=c*n-a*r,t[6]=p*n-s*r,t[7]=i*n-l*r,t},t.scale=function(t,e,i){var r=i[0],n=i[1],i=i[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.scale$1=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t},t.scale$2=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t},t.setCacheLimits=function(t,e){at=t,ut=e},t.setRTLTextPlugin=function(t,e,i){if(void 0===i&&(i=!1),"deferred"===$r||"loading"===$r||"loaded"===$r)throw new Error("setRTLTextPlugin cannot be called multiple times.");tn=B.resolveURL(t),$r="deferred",Qr=e,en(),i||nn()},t.sphericalToCartesian=function(t){var e=t[0],i=t[1],t=t[2];return i+=90,i*=Math.PI/180,t*=Math.PI/180,{x:e*Math.cos(i)*Math.sin(t),y:e*Math.sin(i)*Math.sin(t),z:e*Math.cos(t)}},t.sqrLen=function(t){var e=t[0],t=t[1];return e*e+t*t},t.styleSpec=Rt,t.sub=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t},t.symbolSize=et,t.transformMat3=function(t,e,i){var r=e[0],n=e[1],e=e[2];return t[0]=r*i[0]+n*i[3]+e*i[6],t[1]=r*i[1]+n*i[4]+e*i[7],t[2]=r*i[2]+n*i[5]+e*i[8],t},t.transformMat4=cs,t.translate=function(t,e,i){var r,n,o,a,s,l,u,c,p,h,f,d=i[0],m=i[1],y=i[2];return e===t?(t[12]=e[0]*d+e[4]*m+e[8]*y+e[12],t[13]=e[1]*d+e[5]*m+e[9]*y+e[13],t[14]=e[2]*d+e[6]*m+e[10]*y+e[14],t[15]=e[3]*d+e[7]*m+e[11]*y+e[15]):(r=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],t[0]=i=e[0],t[1]=r,t[2]=n,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t[9]=p,t[10]=h,t[11]=f,t[12]=i*d+a*m+c*y+e[12],t[13]=r*d+s*m+p*y+e[13],t[14]=n*d+l*m+h*y+e[14],t[15]=o*d+u*m+f*y+e[15]),t},t.triggerPluginCompletionEvent=Yr,t.uniqueId=p,t.validateCustomStyleLayer=function(t){var e=[],i=t.id;return void 0===i&&e.push({message:"layers."+i+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+i+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+i+': property "renderingMode" must be either "2d" or "3d"'}),e},t.validateLight=Cr,t.validateStyle=Pr,t.values=function(t){var e,i=[];for(e in t)i.push(t[e]);return i},t.vectorTile=fl,t.version="1.13.1",t.warnOnce=lt,t.webpSupported=F,t.window=f,t.wrap=l}),t(0,function(A){function y(t){for(var e="",i=0,r=A.refProperties;i<r.length;i+=1)e+="/"+function t(e){var i=typeof e;if("number"==i||"boolean"==i||"string"==i||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var r="[",n=0,o=e;n<o.length;n+=1)r+=t(o[n])+",";return r+"]"}for(var a=Object.keys(e).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+t(e[a[l]])+",";return s+"}"}(t[r[i]]);return e}function e(t){this.keyCache={},t&&this.replace(t)}e.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},e.prototype.update=function(t,e){for(var i=this,r=0,n=t;r<n.length;r+=1){var o=n[r];this._layerConfigs[o.id]=o;var a=this._layers[o.id]=A.createStyleLayer(o);a._featureFilter=A.featureFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id]}for(var s=0,l=e;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,p=function(t,e){for(var i={},r=0;r<t.length;r++){var n=e&&e[t[r].id]||y(t[r]);e&&(e[t[r].id]=n),(i[n]||(i[n]=[])).push(t[r])}var o,a=[];for(o in i)a.push(i[o]);return a}(A.values(this._layerConfigs),this.keyCache);c<p.length;c+=1){var h,f,d=p[c].map(function(t){return i._layers[t.id]}),m=d[0];"none"!==m.visibility&&(h=m.source||"",((f=(f=this.familiesBySource[h])||(this.familiesBySource[h]={}))[m=m.sourceLayer||"_geojsonTileLayer"]||(f[m]=[])).push(d))}};function z(t){var e,i={},r=[];for(e in t){var n,o=t[e],a=i[e]={};for(n in o){var s,l=o[+n];l&&0!==l.bitmap.width&&0!==l.bitmap.height&&(s={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2},r.push(s),a[n]={rect:s,metrics:l.metrics})}}var u,c=A.potpack(r),p=new A.AlphaImage({width:c.w||1,height:c.h||1});for(u in t){var h,f=t[u];for(h in f){var d,m=f[+h];
1m&&0!==m.bitmap.width&&0!==m.bitmap.height&&(d=i[u][h].rect,A.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:d.x+1,y:d.y+1},m.bitmap))}}this.image=p,this.positions=i}A.register("GlyphAtlas",z);function i(t){this.tileID=new A.OverscaledTileID(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId}function P(t,e,i){for(var r=new A.EvaluationParameters(e),n=0,o=t;n<o.length;n+=1)o[n].recalculate(r,i)}function n(t,n){var e=A.getArrayBuffer(t.request,function(t,e,i,r){t?n(t):e&&n(null,{vectorTile:new A.vectorTile.VectorTile(new A.pbf(e)),rawData:e,cacheControl:i,expires:r})});return function(){e.cancel(),n()}}i.prototype.parse=function(t,e,n,i,o){var r=this;this.status="parsing",this.data=t,this.collisionBoxArray=new A.CollisionBoxArray;var a=new A.DictionaryCoder(Object.keys(t.layers).sort()),s=new A.FeatureIndex(this.tileID,this.promoteId);s.bucketLayerIDs=[];var l,u,c,p,h,f={},d={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n},m=e.familiesBySource[this.source];for(h in m){var y=t.layers[h];if(y){1===y.version&&A.warnOnce('Vector tile source "'+this.source+'" layer "'+h+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var _=a.encode(h),g=[],v=0;v<y.length;v++){var x=y.feature(v),b=s.getId(x,h);g.push({feature:x,id:b,index:v,sourceLayerIndex:_})}for(var w=0,S=m[h];w<S.length;w+=1){var T=S[w],I=T[0];I.minzoom&&this.zoom<Math.floor(I.minzoom)||I.maxzoom&&this.zoom>=I.maxzoom||"none"!==I.visibility&&(P(T,this.zoom,n),(f[I.id]=I.createBucket({index:s.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(g,d,this.tileID.canonical),s.bucketLayerIDs.push(T.map(function(t){return t.id})))}}}e=A.mapObject(d.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(e).length?i.send("getGlyphs",{uid:this.uid,stacks:e},function(t,e){l||(l=t,u=e,E.call(r))}):u={};e=Object.keys(d.iconDependencies);e.length?i.send("getImages",{icons:e,source:this.source,tileID:this.tileID,type:"icons"},function(t,e){l||(l=t,c=e,E.call(r))}):c={};e=Object.keys(d.patternDependencies);function E(){if(l)return o(l);if(u&&c&&p){var t,e=new z(u),i=new A.ImageAtlas(c,p);for(t in f){var r=f[t];r instanceof A.SymbolBucket?(P(r.layers,this.zoom,n),A.performSymbolLayout(r,u,e.positions,c,i.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):r.hasPattern&&(r instanceof A.LineBucket||r instanceof A.FillBucket||r instanceof A.FillExtrusionBucket)&&(P(r.layers,this.zoom,n),r.addFeatures(d,this.tileID.canonical,i.patternPositions))}this.status="done",o(null,{buckets:A.values(f).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:i,glyphMap:this.returnDependencies?u:null,iconMap:this.returnDependencies?c:null,glyphPositions:this.returnDependencies?e.positions:null})}}
1e.length?i.send("getImages",{icons:e,source:this.source,tileID:this.tileID,type:"patterns"},function(t,e){l||(l=t,p=e,E.call(r))}):p={},E.call(this)};function r(t,e,i,r){this.actor=t,this.layerIndex=e,this.availableImages=i,this.loadVectorData=r||n,this.loading={},this.loaded={}}r.prototype.loadTile=function(t,o){var a=this,s=t.uid;this.loading||(this.loading={});var l=!!(t&&t.request&&t.request.collectResourceTiming)&&new A.RequestPerformance(t.request),u=this.loading[s]=new i(t);u.abort=this.loadVectorData(t,function(t,e){if(delete a.loading[s],t||!e)return u.status="done",a.loaded[s]=u,o(t);var i=e.rawData,r={};e.expires&&(r.expires=e.expires),e.cacheControl&&(r.cacheControl=e.cacheControl);var n={};!l||(t=l.finish())&&(n.resourceTiming=JSON.parse(JSON.stringify(t))),u.vectorTile=e.vectorTile,u.parse(e.vectorTile,a.layerIndex,a.availableImages,a.actor,function(t,e){return t||!e?o(t):void o(null,A.extend({rawTileData:i.slice(0)},e,r,n))}),a.loaded=a.loaded||{},a.loaded[s]=u})},r.prototype.reloadTile=function(t,r){var n,o=this,e=this.loaded,i=t.uid,a=this;e&&e[i]&&((n=e[i]).showCollisionBoxes=t.showCollisionBoxes,t=function(t,e){var i=n.reloadCallback;i&&(delete n.reloadCallback,n.parse(n.vectorTile,a.layerIndex,o.availableImages,a.actor,i)),r(t,e)},"parsing"===n.status?n.reloadCallback=t:"done"===n.status&&(n.vectorTile?n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor,t):t()))},r.prototype.abortTile=function(t,e){var i=this.loading,t=t.uid;i&&i[t]&&i[t].abort&&(i[t].abort(),delete i[t]),e()},r.prototype.removeTile=function(t,e){var i=this.loaded,t=t.uid;i&&i[t]&&delete i[t],e()};function o(){this.loaded={}}var a=A.window.ImageBitmap;function l(t,e){if(0!==t.length){s(t[0],e);for(var i=1;i<t.length;i++)s(t[i],!e)}}function s(t,e){for(var i=0,r=0,n=t.length,o=n-1;r<n;o=r++)i+=(t[r][0]-t[o][0])*(t[o][1]+t[r][1]);0<=i!=!!e&&t.reverse()}o.prototype.loadTile=function(t,e){var i=t.uid,r=t.encoding,t=t.rawImageData,t=a&&t instanceof a?this.getImageData(t):t,r=new A.DEMData(i,t,r);this.loaded=this.loaded||{},e(null,this.loaded[i]=r)},o.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);t=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new A.RGBAImage({width:t.width,height:t.height},t.data)},o.prototype.removeTile=function(t){var e=this.loaded,t=t.uid;e&&e[t]&&delete e[t]};function u(t){this._feature=t,this.extent=A.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))}var c=A.vectorTile.VectorTileFeature.prototype.toGeoJSON;u.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],e=0,i=this._feature.geometry;e<i.length;e+=1){var r=i[e];t.push([new A.Point$1(r[0],r[1])])}return t}for(var n=[],o=0,a=this._feature.geometry;o<a.length;o+=1){for(var s=[],l=0,u=a[o];l<u.length;l+=1){var c=u[l];s.push(new A.Point$1(c[0],c[1]))}n.push(s)}return n},u.prototype.toGeoJSON=function(t,e,i){return c.call(this,t,e,i)};var p=function(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=A.EXTENT,this.length=t.length,this._features=t};p.prototype.feature=function(t){return new u(this._features[t])};var t=A.vectorTile.VectorTileFeature,h=f;function f(t,e){this.options=e||{},this.features=t,this.length=t.length}function d(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}f.prototype.feature=function(t){return new d(this.features[t],this.options.extent)},d.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var i=t[e],r=[],n=0;n<i.length;n++)r.push(new A.Point$1(i[n][0],i[n][1]));this.geometry.push(r)}return this.geometry},d.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,i=-1/0,r=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++)var l=a[s],e=Math.min(e,l.x),i=Math.max(i,l.x),r=Math.min(r,l.y),n=Math.max(n,l.y);return[e,r,i,n]},d.prototype.toGeoJSON=t.prototype.toGeoJSON;var m=_,t=h;function _(t){var e=new A.pbf;
1return function(t,e){for(var i in t.layers)e.writeMessage(3,g,t.layers[i])}(t,e),e.finish()}function g(t,e){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);for(var i={keys:[],values:[],keycache:{},valuecache:{}},r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,v,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,T,o[r])}function v(t,e){var i=t.feature;void 0!==i.id&&e.writeVarintField(1,i.id),e.writeMessage(2,x,t),e.writeVarintField(3,i.type),e.writeMessage(4,S,i)}function x(t,e){var i,r=t.feature,n=t.keys,o=t.values,a=t.keycache,s=t.valuecache;for(i in r.properties){var l=a[i];void 0===l&&(n.push(i),a[i]=l=n.length-1),e.writeVarint(l);var u=r.properties[i],c=typeof u;"string"!=c&&"boolean"!=c&&"number"!=c&&(u=JSON.stringify(u));l=c+":"+u,c=s[l];void 0===c&&(o.push(u),s[l]=c=o.length-1),e.writeVarint(c)}}function b(t,e){return(e<<3)+(7&t)}function w(t){return t<<1^t>>31}function S(t,e){for(var i=t.loadGeometry(),r=t.type,n=0,o=0,a=i.length,s=0;s<a;s++){var l=i[s],u=1;1===r&&(u=l.length),e.writeVarint(b(1,u));for(var c=3===r?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==r&&e.writeVarint(b(2,c-1));var h=l[p].x-n,f=l[p].y-o;e.writeVarint(w(h)),e.writeVarint(w(f)),n+=h,o+=f}3===r&&e.writeVarint(15)}}function T(t,e){var i=typeof t;"string"==i?e.writeStringField(1,t):"boolean"==i?e.writeBooleanField(7,t):"number"==i&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function I(t,e,i,r){E(t,i,r),E(e,2*i,2*r),E(e,2*i+1,2*r+1)}function E(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function C(t,e,i,r){i=t-i,r=e-r;return i*i+r*r}m.fromVectorTileJs=_,m.fromGeojsonVt=function(t,e){e=e||{};var i,r={};for(i in t)r[i]=new h(t[i].features,e),r[i].name=i,r[i].version=e.version,r[i].extent=e.extent;return _({layers:r})},m.GeoJSONWrapper=t;function k(t){return t[0]}function M(t){return t[1]}function D(t,e,i,r,n){void 0===e&&(e=k),void 0===i&&(i=M),void 0===r&&(r=64),void 0===n&&(n=Float64Array),this.nodeSize=r;for(var o=(this.points=t).length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new n(2*t.length),l=0;l<t.length;l++)s[2*(a[l]=l)]=e(t[l]),s[2*l+1]=i(t[l]);!function t(e,i,r,n,o,a){var s;o-n<=r||(function t(e,i,r,n,o,a){for(;n<o;){var s,l,u,c;600<o-n&&(s=o-n+1,l=r-n+1,c=Math.log(s),u=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1),t(e,i,r,Math.max(n,Math.floor(r-l*u/s+c)),Math.min(o,Math.floor(r+(s-l)*u/s+c)),a));var p=i[2*r+a],h=n,f=o;for(I(e,i,n,r),i[2*o+a]>p&&I(e,i,n,o);h<f;){for(I(e,i,h,f),h++,f--;i[2*h+a]<p;)h++;for(;i[2*f+a]>p;)f--}i[2*n+a]===p?I(e,i,n,f):I(e,i,++f,o),f<=r&&(n=f+1),r<=f&&(o=f-1)}}(e,i,s=n+o>>1,n,o,a%2),t(e,i,r,n,s-1,a+1),t(e,i,r,1+s,o,a+1))}(a,s,r,0,a.length-1,0)}D.prototype.range=function(t,e,i,r){return function(t,e,i,r,n,o,a){for(var s,l=[0,t.length-1,0],u=[];l.length;){var c=l.pop(),p=l.pop(),h=l.pop();if(p-h<=a)for(var f=h;f<=p;f++)m=e[2*f+1],(s=e[2*f])>=i&&s<=n&&r<=m&&m<=o&&u.push(t[f]);else{var d=Math.floor((h+p)/2),m=e[2*d+1];(s=e[2*d])>=i&&s<=n&&r<=m&&m<=o&&u.push(t[d]);var y=(c+1)%2;(0===c?i<=s:r<=m)&&(l.push(h),l.push(d-1),l.push(y)),(0===c?s<=n:m<=o)&&(l.push(d+1),l.push(p),l.push(y))}}return u}(this.ids,this.coords,t,e,i,r,this.nodeSize)};function L(t){this.options=V(Object.create(B),t),this.trees=new Array(this.options.maxZoom+1)}var B={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!(D.prototype.within=function(t,e,i){return function(t,e,i,r,n,o){for(var a=[0,t.length-1,0],s=[],l=n*n;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)C(e[2*h],e[2*h+1],i,r)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];C(d,m,i,r)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?i-n<=d:r-n<=m)&&(a.push(p),a.push(f-1),a.push(y)),(0===u?d<=i+n:m<=r+n)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,i,this.nodeSize)}),generateId:!1,reduce:null,map:function(t){return t}};function R(t){return{type:"Feature",id:t.id,properties:F(t),geometry:{type:"Point",coordinates:[360*(t.x-.5),(t=(180-360*t.y)*Math.PI/180,360*Math.atan(Math.exp(t))/Math.PI-90)]}}}function F(t){var e=t.numPoints,i=1e4<=e?Math.round(e/1e3)+"k":1e3<=e?Math.round(e/100)/10+"k":e;return V(V({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:i})}function O(t){return t/360+.5}
vendor: 2,530 bytes, line 1
1function U(t){t=Math.sin(t*Math.PI/180),t=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return t<0?0:1<t?1:t}function V(t,e){for(var i in e)t[i]=e[i];return t}function N(t){return t.x}function j(t){return t.y}function q(t,e,i,r){r={id:void 0===t?null:t,type:e,geometry:i,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,i=t.type;if("Point"===i||"MultiPoint"===i||"LineString"===i)Z(t,e);else if("Polygon"===i||"MultiLineString"===i)for(var r=0;r<e.length;r++)Z(t,e[r]);else if("MultiPolygon"===i)for(r=0;r<e.length;r++)for(var n=0;n<e[r].length;n++)Z(t,e[r][n])}(r),r}function Z(t,e){for(var i=0;i<e.length;i+=3)t.minX=Math.min(t.minX,e[i]),t.minY=Math.min(t.minY,e[i+1]),t.maxX=Math.max(t.maxX,e[i]),t.maxY=Math.max(t.maxY,e[i+1])}function G(t,e,i,r){if(e.geometry){var n=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2),s=[],l=e.id;if(i.promoteId?l=e.properties[i.promoteId]:i.generateId&&(l=r||0),"Point"===o)X(n,s);else if("MultiPoint"===o)for(var u=0;u<n.length;u++)X(n[u],s);else if("LineString"===o)W(n,s,a,!1);else if("MultiLineString"===o){if(i.lineMetrics){for(u=0;u<n.length;u++)W(n[u],s=[],a,!1),t.push(q(l,"LineString",s,e.properties));return}K(n,s,a,!1)}else if("Polygon"===o)K(n,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"!==o)throw new Error("Input data is not a valid GeoJSON object.");for(u=0;u<e.geometry.geometries.length;u++)G(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},i,r);return}for(u=0;u<n.length;u++){var c=[];K(n[u],c,a,!0),s.push(c)}}t.push(q(l,o,s,e.properties))}}function X(t,e){e.push(H(t[0])),e.push(J(t[1])),e.push(0)}function W(t,e,i,r){for(var n,o,a=0,s=0;s<t.length;s++){var l=H(t[s][0]),u=J(t[s][1]);e.push(l),e.push(u),e.push(0),0<s&&(a+=r?(n*u-l*o)/2:Math.sqrt(Math.pow(l-n,2)+Math.pow(u-o,2))),n=l,o=u}var c=e.length-3;e[2]=1,function t(e,i,r,n){for(var o,a,s,l,u,c,p,h,f,d=n,m=r-i>>1,y=r-i,_=e[i],g=e[i+1],v=e[r],x=e[r+1],b=i+3;b<r;b+=3){var w=(a=e[b],s=e[b+1],w=f=h=void 0,w=(p=x)-(u=g),0===(f=(c=v)-(l=_))&&0===w||(1<(h=((a-l)*f+(s-u)*w)/(f*f+w*w))?(l=c,u=p):0<h&&(l+=f*h,u+=w*h)),(f=a-l)*f+(w=s-u)*w);d<w?(o=b,d=w):w!==d||(w=Math.abs(b-m))<y&&(o=b,y=w)}n<d&&(3<o-i&&t(e,i,o,n),e[o+2]=d,3<r-o&&t(e,o,r,n))}(e,0,c,i),e[2+c]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function K(t,e,i,r){for(var n=0;n<t.length;n++){var o=[];W(t[n],o,i,r),e.push(o)}}function H(t){return t/360+.5}function J(t){t=Math.sin(t*Math.PI/180),t=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return t<0?0:1<t?1:t}
vendor: 7,692 bytes, line 1
1function Y(t,e,i,r,n,o,a,s){if(r/=e,o>=(i/=e)&&a<r)return t;if(a<i||r<=o)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.type,f=0===n?c.minX:c.minY,d=0===n?c.maxX:c.maxY;if(i<=f&&d<r)l.push(c);else if(!(d<i||r<=f)){var m=[];if("Point"===h||"MultiPoint"===h)!function(t,e,i,r,n){for(var o=0;o<t.length;o+=3){var a=t[o+n];i<=a&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}(p,m,i,r,n);else if("LineString"===h)Q(p,m,i,r,n,!1,s.lineMetrics);else if("MultiLineString"===h)tt(p,m,i,r,n,!1);else if("Polygon"===h)tt(p,m,i,r,n,!0);else if("MultiPolygon"===h)for(var y=0;y<p.length;y++){var _=[];tt(p[y],_,i,r,n,!0),_.length&&m.push(_)}if(m.length)if(s.lineMetrics&&"LineString"===h)for(y=0;y<m.length;y++)l.push(q(c.id,h,m[y],c.tags));else"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),l.push(q(c.id,h,m,c.tags))}}return l.length?l:null}function Q(t,e,i,r,n,o,a){for(var s,l,u=$(t),c=0===n?it:rt,p=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],_=t[h+4],g=0===n?f:d,v=0===n?y:_,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-_,2))),g<i?i<v&&(l=c(u,f,d,y,_,i),a&&(u.start=p+s*l)):r<g?v<r&&(l=c(u,f,d,y,_,r),a&&(u.start=p+s*l)):et(u,f,d,m),v<i&&i<=g&&(l=c(u,f,d,y,_,i),x=!0),r<v&&g<=r&&(l=c(u,f,d,y,_,r),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=$(t)),a&&(p+=s)}var b=t.length-3,f=t[b],d=t[1+b],m=t[2+b];(g=0===n?f:d)>=i&&g<=r&&et(u,f,d,m),b=u.length-3,o&&3<=b&&(u[b]!==u[0]||u[1+b]!==u[1])&&et(u,u[0],u[1],u[2]),u.length&&e.push(u)}function $(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function tt(t,e,i,r,n,o){for(var a=0;a<t.length;a++)Q(t[a],e,i,r,n,o,!1)}function et(t,e,i,r){t.push(e),t.push(i),t.push(r)}function it(t,e,i,r,n,o){e=(o-e)/(r-e);return t.push(o),t.push(i+(n-i)*e),t.push(1),e}function rt(t,e,i,r,n,o){i=(o-i)/(n-i);return t.push(e+(r-e)*i),t.push(o),t.push(1),i}function nt(t,e){for(var i=[],r=0;r<t.length;r++){var n,o=t[r],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)n=ot(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(ot(o.geometry[s],e))}else if("MultiPolygon"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(ot(o.geometry[s][u],e));n.push(l)}i.push(q(o.id,a,n,o.tags))}return i}function ot(t,e){var i=[];i.size=t.size,void 0!==t.start&&(i.start=t.start,i.end=t.end);for(var r=0;r<t.length;r+=3)i.push(t[r]+e,t[r+1],t[r+2]);return i}function at(t,e){if(t.transformed)return t;for(var i,r=1<<t.z,n=t.x,o=t.y,a=0;a<t.features.length;a++){var s=t.features[a],l=s.geometry,u=s.type;if(s.geometry=[],1===u)for(i=0;i<l.length;i+=2)s.geometry.push(st(l[i],l[i+1],e,r,n,o));else for(i=0;i<l.length;i++){for(var c=[],p=0;p<l[i].length;p+=2)c.push(st(l[i][p],l[i][p+1],e,r,n,o));s.geometry.push(c)}}return t.transformed=!0,t}function st(t,e,i,r,n,o){return[Math.round(i*(t*r-n)),Math.round(i*(e*r-o))]}function lt(t,e,i,r,n){for(var o=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:i,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,function(t,e,i,r){var n=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)ut(a,n,t,i,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)ut(a,n[s],t,i,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<n.length;l++){var u=n[l];for(s=0;s<u.length;s++)ut(a,u[s],t,i,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=n.start/n.size,c.mapbox_clip_end=n.end/n.size}r={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(r.id=e.id),t.features.push(r)}}(a,t[s],o,n);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,p=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function ut(t,e,i,r,n,o){var a=r*r;if(0<r&&e.size<(n?a:r))i.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===r||e[l+2]>a)&&(i.numSimplified++,s.push(e[l]),s.push(e[l+1])),i.numPoints++;n&&function(t,e){for(var i=0,r=0,n=t.length,o=n-2;r<n;o=r,r+=2)i+=(t[r]-t[o])*(t[r+1]+t[o+1]);if(0<i===e)for(r=0,n=t.length;r<n/2;r+=2){var a=t[r],s=t[r+1];t[r]=t[n-2-r],t[r+1]=t[n-1-r],t[n-2-r]=a,t[n-1-r]=s}}(s,o),t.push(s)}}function ct(t,e){var i=(e=this.options=function(t,e){for(var i in e)t[i]=e[i];return t}(Object.create(this.options),e)).debug;if(i&&console.time("preprocess data"),e.maxZoom<0||24<e.maxZoom)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r,n,o,a,s=function(t,e){var i=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)G(i,t.features[r],e,r);else G(i,"Feature"===t.type?t:{geometry:t},e);return i}(t,e);this.tiles={},this.tileCoords=[],i&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),r=s,o=(n=e).buffer/n.extent,t=Y(a=r,1,-1-o,o,0,-1,2,n),e=Y(r,1,1-o,2+o,0,-1,2,n),(t||e)&&(a=Y(r,1,-o,1+o,0,-1,2,n)||[],t&&(a=nt(t,1).concat(a)),e&&(a=a.concat(nt(e,-1)))),(s=a).length&&this.splitTile(s,0,0,0),i&&(s.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 pt(t,e,i){return 32*((1<<t)*i+e)+t}function ht(t,e){var i=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);t=this._geoJSONIndex.getTile(i.z,i.x,i.y);if(!t)return e(null,null);i=new p(t.features),t=m(i);0===t.byteOffset&&t.byteLength===t.buffer.byteLength||(t=new Uint8Array(t)),e(null,{vectorTile:i,rawData:t.buffer})}L.prototype.load=function(t){var e=this.options,i=e.log,r=e.minZoom,n=e.maxZoom,o=e.nodeSize;i&&console.time("total time");e="prepare "+t.length+" points";i&&console.time(e),this.points=t;for(var a,s,l,u=[],c=0;c<t.length;c++)t[c].geometry&&u.push((a=t[c],s=c,l=void 0,l=a.geometry.coordinates,a=l[1],{x:O(l[0]),y:U(a),zoom:1/0,index:s,parentId:-1}));this.trees[n+1]=new D(u,N,j,o,Float32Array),i&&console.timeEnd(e);for(var p=n;r<=p;p--){var h=+Date.now(),u=this._cluster(u,p);this.trees[p]=new D(u,N,j,o,Float32Array),i&&console.log("z%d: %d clusters in %dms",p,u.length,+Date.now()-h)}return i&&console.timeEnd("total time"),this},L.prototype.getClusters=function(t,e){var i=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),n=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(360<=t[2]-t[0])i=-180,n=180;else if(n<i){var a=this.getClusters([i,r,180,o],e),t=this.getClusters([-180,r,n,o],e);return a.concat(t)}for(var s=this.trees[this._limitZoom(e)],l=[],u=0,c=s.range(O(i),U(o),O(n),U(r));u<c.length;u+=1){var p=s.points[c[u]];l.push(p.numPoints?R(p):this.points[p.index])}return l},L.prototype.getChildren=function(t){var e=this._getOriginId(t),i=this._getOriginZoom(t),r="No cluster with the specified id.",n=this.trees[i];if(!n)throw new Error(r);e=n.points[e];if(!e)throw new Error(r);for(var i=this.options.radius/(this.options.extent*Math.pow(2,i-1)),o=[],a=0,s=n.within(e.x,e.y,i);a<s.length;a+=1){var l=n.points[s[a]];l.parentId===t&&o.push(l.numPoints?R(l):this.points[l.index])}if(0===o.length)throw new Error(r);return o}
1,L.prototype.getLeaves=function(t,e,i){var r=[];return this._appendLeaves(r,t,e=e||10,i=i||0,0),r},L.prototype.getTile=function(t,e,i){var r=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options,a=o.radius/o.extent,s=(i-a)/n,t=(i+1+a)/n,o={features:[]};return this._addTileFeatures(r.range((e-a)/n,s,(e+1+a)/n,t),r.points,e,i,n,o),0===e&&this._addTileFeatures(r.range(1-a/n,s,1,t),r.points,n,i,n,o),e===n-1&&this._addTileFeatures(r.range(0,s,a/n,t),r.points,-1,i,n,o),o.features.length?o:null},L.prototype.getClusterExpansionZoom=function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var i=this.getChildren(t);if(e++,1!==i.length)break;t=i[0].properties.cluster_id}return e},L.prototype._appendLeaves=function(t,e,i,r,n){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],l=s.properties;if(l&&l.cluster?n+l.point_count<=r?n+=l.point_count:n=this._appendLeaves(t,l.cluster_id,i,r,n):n<r?n++:t.push(s),t.length===i)break}return n},L.prototype._addTileFeatures=function(t,e,i,r,n,o){for(var a=0,s=t;a<s.length;a+=1){var l=e[s[a]],u=l.numPoints,c={type:1,geometry:[[Math.round(this.options.extent*(l.x*n-i)),Math.round(this.options.extent*(l.y*n-r))]],tags:u?F(l):this.points[l.index].properties},p=void 0;u?p=l.id:this.options.generateId?p=l.index:this.points[l.index].id&&(p=this.points[l.index].id),void 0!==p&&(c.id=p),o.features.push(c)}},L.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))},L.prototype._cluster=function(t,e){for(var i=[],r=this.options,n=r.reduce,o=r.minPoints,a=r.radius/(r.extent*Math.pow(2,e)),s=0;s<t.length;s++){var l=t[s];if(!(l.zoom<=e)){l.zoom=e;for(var u=this.trees[e+1],c=u.within(l.x,l.y,a),p=l.numPoints||1,h=p,f=0,d=c;f<d.length;f+=1){var m=u.points[d[f]];m.zoom>e&&(h+=m.numPoints||1)}if(o<=h){for(var y=l.x*p,_=l.y*p,g=n&&1<p?this._map(l,!0):null,v=(s<<5)+(e+1)+this.points.length,x=0,b=c;x<b.length;x+=1){var w,S=u.points[b[x]];S.zoom<=e||(S.zoom=e,w=S.numPoints||1,y+=S.x*w,_+=S.y*w,S.parentId=v,n&&n(g=g||this._map(l,!0),this._map(S)))}l.parentId=v,i.push({x:y/h,y:_/h,zoom:1/0,id:v,parentId:-1,numPoints:h,properties:g})}else if(i.push(l),1<h)for(var T=0,I=c;T<I.length;T+=1){var E=u.points[I[T]];E.zoom<=e||(E.zoom=e,i.push(E))}}}return i},L.prototype._getOriginId=function(t){return t-this.points.length>>5},L.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},ct.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!(L.prototype._map=function(t,e){if(t.numPoints)return e?V({},t.properties):t.properties;var i=this.points[t.index].properties,t=this.options.map(i);return e&&t===i?V({},t):t}),promoteId:null,generateId:!1,debug:0},ct.prototype.splitTile=function(t,e,i,r,n,o,a){for(var s=[t,e,i,r],l=this.options,u=l.debug;s.length;){r=s.pop(),i=s.pop(),e=s.pop(),t=s.pop();var c,p,h,f,d,m,y,_,g=1<<e,v=pt(e,i,r),x=this.tiles[v];if(!x&&(1<u&&console.time("creation"),x=this.tiles[v]=lt(t,e,i,r,l),this.tileCoords.push({z:e,x:i,y:r}),u)&&(1<u&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,i,r,x.numFeatures,x.numPoints,x.numSimplified),console.timeEnd("creation")),_="z"+e,this.stats[_]=(this.stats[_]||0)+1,this.total++),x.source=t,n){if(e===l.maxZoom||e===n)continue;var b=1<<n-e;if(i!==Math.floor(o/b)||r!==Math.floor(a/b))continue}else if(e===l.indexMaxZoom||x.numPoints<=l.indexMaxPoints)continue;x.source=null,0!==t.length&&(1<u&&console.time("clipping"),d=.5-(f=.5*l.buffer/l.extent),m=1+f,y=c=p=h=null,_=Y(t,g,i-f,i+(v=.5+f),0,x.minX,x.maxX,l),b=Y(t,g,i+d,i+m,0,x.minX,x.maxX,l),t=null,_&&(y=Y(_,g,r-f,r+v,1,x.minY,x.maxY,l),c=Y(_,g,r+d,r+m,1,x.minY,x.maxY,l),_=null),b&&(p=Y(b,g,r-f,r+v,1,x.minY,x.maxY,l),h=Y(b,g,r+d,r+m,1,x.minY,x.maxY,l),b=null),1<u&&console.timeEnd("clipping"),s.push(y||[],e+1,2*i,2*r),s.push(c||[],e+1,2*i,2*r+1),s.push(p||[],e+1,2*i+1,2*r),s.push(h||[],e+1,2*i+1,2*r+1))}},ct.prototype.getTile=function(t,e,i){var r=this.options,n=r.extent,o=r.debug;if(t<0||24<t)return null;r=1<<t,r=pt(t,e=(e%r+r)%r,i);if(this.tiles[r])return at(this.tiles[r],n);1<o&&console.log("drilling down to z%d-%d-%d",t,e,i);for(var a,s=t,l=e,u=i;!a&&0<s;)s--,l=Math.floor(l/2),u=Math.floor(u/2),a=this.tiles[pt(s,l,u)];return a&&a.source?(1<o&&console.log("found parent tile z%d-%d-%d",s,l,u),1<o&&console.time("drilling down"),this.splitTile(a.source,s,l,u,t,e,i),1<o&&console.timeEnd("drilling down"),this.tiles[r]?at(this.tiles[r],n):null):null};
1var ft,dt=((ft=r)&&(mt.__proto__=ft),((mt.prototype=Object.create(ft&&ft.prototype)).constructor=mt).prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},mt.prototype._loadData=function(){var o,h,a,s=this;this._pendingCallback&&this._pendingLoadDataParams&&(o=this._pendingCallback,h=this._pendingLoadDataParams,delete this._pendingCallback,delete this._pendingLoadDataParams,a=!!(h&&h.request&&h.request.collectResourceTiming)&&new A.RequestPerformance(h.request),this.loadGeoJSON(h,function(t,e){if(t||!e)return o(t);if("object"!=typeof e)return o(new Error("Input data given to '"+h.source+"' is not a valid GeoJSON object."));!function t(e,i){var r,n=e&&e.type;if("FeatureCollection"===n)for(r=0;r<e.features.length;r++)t(e.features[r],i);else if("GeometryCollection"===n)for(r=0;r<e.geometries.length;r++)t(e.geometries[r],i);else if("Feature"===n)t(e.geometry,i);else if("Polygon"===n)l(e.coordinates,i);else if("MultiPolygon"===n)for(r=0;r<e.coordinates.length;r++)l(e.coordinates[r],i);return e}(e,!0);try{if(h.filter){var i=A.createExpression(h.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===i.result)throw new Error(i.value.map(function(t){return t.key+": "+t.message}).join(", "));e={type:"FeatureCollection",features:e.features.filter(function(t){return i.value.evaluate({zoom:0},t)})}}s._geoJSONIndex=h.cluster?new L(function(){var t=h.superclusterOptions,e=h.clusterProperties;if(!e||!t)return t;for(var o={},a={},s={accumulated:null,zoom:0},l={properties:null},u=Object.keys(e),i=0,r=u;i<r.length;i+=1){var n=r[i],c=e[n],p=c[0],c=A.createExpression(c[1]),p=A.createExpression("string"==typeof p?[p,["accumulated"],["get",n]]:p);o[n]=c.value,a[n]=p.value}return t.map=function(t){l.properties=t;for(var e={},i=0,r=u;i<r.length;i+=1){var n=r[i];e[n]=o[n].evaluate(s,l)}return e},t.reduce=function(t,e){l.properties=e;for(var i=0,r=u;i<r.length;i+=1){var n=r[i];s.accumulated=t[n],t[n]=a[n].evaluate(s,l)}},t}()).load(e.features):new ct(e,h.geojsonVtOptions)}catch(t){return o(t)}s.loaded={};var r,n={};!a||(r=a.finish())&&(n.resourceTiming={},n.resourceTiming[h.source]=JSON.parse(JSON.stringify(r))),o(null,n)}))},mt.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},mt.prototype.reloadTile=function(t,e){var i=this.loaded;return i&&i[t.uid]?ft.prototype.reloadTile.call(this,t,e):this.loadTile(t,e)},mt.prototype.loadGeoJSON=function(e,i){if(e.request)A.getJSON(e.request,i);else{if("string"!=typeof e.data)return i(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return i(null,JSON.parse(e.data))}catch(t){return i(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},mt.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},mt.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},mt.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},mt.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},mt),t=function(t){var i=this;this.self=t,this.actor=new A.Actor(t,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:r,geojson:dt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(i.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');i.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(t){if(A.plugin.isParsed())throw new Error("RTL text plugin already registered.");A.plugin.applyArabicShaping=t.applyArabicShaping,A.plugin.processBidirectionalText=t.processBidirectionalText,A.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}};function mt(t,e,i,r){ft.call(this,t,e,i,ht),r&&(this.loadGeoJSON=r)}return t.prototype.setReferrer=function(t,e){this.referrer=e}
1,t.prototype.setImages=function(t,e,i){for(var r in this.availableImages[t]=e,this.workerSources[t]){var n,o=this.workerSources[t][r];for(n in o)o[n].availableImages=e}i()},t.prototype.setLayers=function(t,e,i){this.getLayerIndex(t).replace(e),i()},t.prototype.updateLayers=function(t,e,i){this.getLayerIndex(t).update(e.layers,e.removedIds),i()},t.prototype.loadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).loadTile(e,i)},t.prototype.loadDEMTile=function(t,e,i){this.getDEMWorkerSource(t,e.source).loadTile(e,i)},t.prototype.reloadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).reloadTile(e,i)},t.prototype.abortTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).abortTile(e,i)},t.prototype.removeTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).removeTile(e,i)},t.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},t.prototype.removeSource=function(t,e,i){var r;this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]&&(r=this.workerSources[t][e.type][e.source],delete this.workerSources[t][e.type][e.source],void 0!==r.removeSource?r.removeSource(e,i):i())},t.prototype.loadWorkerSource=function(t,e,i){try{this.self.importScripts(e.url),i()}catch(t){i(t.toString())}},t.prototype.syncRTLPluginState=function(t,e,i){try{A.plugin.setState(e);var r,n=A.plugin.getPluginURL();A.plugin.isLoaded()&&!A.plugin.isParsed()&&null!=n&&(this.self.importScripts(n),i((r=A.plugin.isParsed())?void 0:new Error("RTL Text Plugin failed to import scripts from "+n),r))}catch(t){i(t.toString())}},t.prototype.getAvailableImages=function(t){return this.availableImages[t]||[]},t.prototype.getLayerIndex=function(t){return this.layerIndexes[t]||(this.layerIndexes[t]=new e)},t.prototype.getWorkerSource=function(r,t,e){var n=this;return this.workerSources[r]||(this.workerSources[r]={}),this.workerSources[r][t]||(this.workerSources[r][t]={}),this.workerSources[r][t][e]||(this.workerSources[r][t][e]=new this.workerSourceTypes[t]({send:function(t,e,i){n.actor.send(t,e,i,r)}},this.getLayerIndex(r),this.getAvailableImages(r))),this.workerSources[r][t][e]},t.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new o),this.demWorkerSources[t][e]},t.prototype.enforceCacheSizeLimit=function(t,e){A.enforceCacheSizeLimit(e)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new t(self)),t}),t(0,function(ot){var i=ot.createCommonjsModule(function(t){function n(t){return!e(t)}function e(t){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){var t,e,i=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(i);try{e=new Worker(r),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(r),t}}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(e){e=e.getImageData(0,0,1,1);return e&&e.width===t.width}}()?(void 0===i[r=t&&t.failIfMajorPerformanceCaveat]&&(i[r]=function(){var t,e,e=(t=r,e=document.createElement("canvas"),(i=Object.create(n.webGLContextAttributes)).failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",i)||e.probablySupportsContext("experimental-webgl",i):e.supportsContext?e.supportsContext("webgl",i)||e.supportsContext("experimental-webgl",i):e.getContext("webgl",i)||e.getContext("experimental-webgl",i));if(!e)return!1;var i=e.createShader(e.VERTEX_SHADER);return!(!i||e.isContextLost())&&(e.shaderSource(i,"void main() {}"),e.compileShader(i),!0===e.getShaderParameter(i,e.COMPILE_STATUS))}()),i[r]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray supp
1ort":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var r}t.exports?t.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n,window.mapboxgl.notSupportedReason=e);var i={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),_={create:function(t,e,i){t=ot.window.document.createElement(t);return void 0!==e&&(t.className=e),i&&i.appendChild(t),t},createNS:function(t,e){return ot.window.document.createElementNS(t,e)}},r=ot.window.document&&ot.window.document.documentElement.style;function t(t){if(!r)return t[0];for(var e=0;e<t.length;e++)if(t[e]in r)return t[e];return t[0]}var e,n=t(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);_.disableDrag=function(){r&&n&&(e=r[n],r[n]="none")},_.enableDrag=function(){r&&n&&(r[n]=e)};var o=t(["transform","WebkitTransform"]),a=!(_.setTransform=function(t,e){t.style[o]=e});try{var s=Object.defineProperty({},"passive",{get:function(){a=!0}});ot.window.addEventListener("test",s,s),ot.window.removeEventListener("test",s,s)}catch(ot){a=!1}_.addEventListener=function(t,e,i,r){void 0===r&&(r={}),t.addEventListener(e,i,"passive"in r&&a?r:r.capture)},_.removeEventListener=function(t,e,i,r){void 0===r&&(r={}),t.removeEventListener(e,i,"passive"in r&&a?r:r.capture)};var l=function(t){t.preventDefault(),t.stopPropagation(),ot.window.removeEventListener("click",l,!0)};_.suppressClick=function(){ot.window.addEventListener("click",l,!0),ot.window.setTimeout(function(){ot.window.removeEventListener("click",l,!0)},0)},_.mousePos=function(t,e){var i=t.getBoundingClientRect();return new ot.Point(e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop)},_.touchPos=function(t,e){for(var i=t.getBoundingClientRect(),r=[],n=0;n<e.length;n++)r.push(new ot.Point(e[n].clientX-i.left-t.clientLeft,e[n].clientY-i.top-t.clientTop));return r},_.mouseButton=function(t){return void 0!==ot.window.InstallTrigger&&2===t.button&&t.ctrlKey&&0<=ot.window.navigator.platform.toUpperCase().indexOf("MAC")?0:t.button},_.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var u,c=((u=ot.Evented)&&(d.__proto__=u),((d.prototype=Object.create(u&&u.prototype)).constructor=d).prototype.isLoaded=function(){return this.loaded},d.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t)){for(var e=0,i=this.requestors;e<i.length;e+=1){var r=i[e];this._notify(r.ids,r.callback)}this.requestors=[]}},d.prototype.getImage=function(t){return this.images[t]},d.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},d.prototype._validate=function(t,e){var i=!0;return this._validateStretch(e.stretchX,e.data&&e.data.width)||(this.fire(new ot.ErrorEvent(new Error('Image "'+t+'" has invalid "stretchX" value'))),i=!1),this._validateStretch(e.stretchY,e.data&&e.data.height)||(this.fire(new ot.ErrorEvent(new Error('Image "'+t+'" has invalid "stretchY" value'))),i=!1),this._validateContent(e.content,e)||(this.fire(new ot.ErrorEvent(new Error('Image "'+t+'" has invalid "content" value'))),i=!1),i},d.prototype._validateStretch=function(t,e){if(!t)return!0;for(var i=0,r=0,n=t;r<n.length;r+=1){var o=n[r];if(o[0]<i||o[1]<o[0]||e<o[1])return!1;i=o[1]}return!0},d.prototype._validateContent=function(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))},d.prototype.updateImage=function(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0},d.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},d.prototype.listImages=function(){return Object.keys(this.images)},d.prototype.getImages=function(t,e){var i=!0;if(!this.isLoaded())for(var r=0,n=t;r<n.length;r+=1)this.images[n[r]]||(i=!1);this.isLoaded()||i?this._notify(t,e):this.requestors.push({ids:t,callback:e})},d.prototype._notify=function(t,e){for(var i={},r=0,n=t;r<n.length;r+=1){var o=n[r];
1this.images[o]||this.fire(new ot.Event("styleimagemissing",{id:o}));var a=this.images[o];a?i[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf,version:a.version,stretchX:a.stretchX,stretchY:a.stretchY,content:a.content,hasRenderCallback:Boolean(a.userImage&&a.userImage.render)}:ot.warnOnce('Image "'+o+'" 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.')}e(null,i)},d.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},d.prototype.getPattern=function(t){var e=this.patterns[t],i=this.getImage(t);return i?e&&e.position.version===i.version?e.position:(e?e.position.version=i.version:(e={w:i.data.width+2,h:i.data.height+2,x:0,y:0},i=new ot.ImagePosition(e,i),this.patterns[t]={bin:e,position:i}),this._updatePatternAtlas(),this.patterns[t].position):null},d.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new ot.Texture(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)},d.prototype._updatePatternAtlas=function(){var t,e=[];for(t in this.patterns)e.push(this.patterns[t].bin);var i,r=ot.potpack(e),n=r.w,r=r.h,o=this.atlasImage;for(i in o.resize({width:n||1,height:r||1}),this.patterns){var a=this.patterns[i].bin,s=a.x+1,l=a.y+1,u=this.images[i].data,c=u.width,a=u.height;ot.RGBAImage.copy(u,o,{x:0,y:0},{x:s,y:l},{width:c,height:a}),ot.RGBAImage.copy(u,o,{x:0,y:a-1},{x:s,y:l-1},{width:c,height:1}),ot.RGBAImage.copy(u,o,{x:0,y:0},{x:s,y:l+a},{width:c,height:1}),ot.RGBAImage.copy(u,o,{x:c-1,y:0},{x:s-1,y:l},{width:1,height:a}),ot.RGBAImage.copy(u,o,{x:0,y:0},{x:s+c,y:l},{width:1,height:a})}this.dirty=!0},d.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},d.prototype.dispatchRenderCallbacks=function(t){for(var e,i,r=0,n=t;r<n.length;r+=1){var o,a=n[r];this.callbackDispatchedThisFrame[a]||(this.callbackDispatchedThisFrame[a]=!0,o=this.images[a],i=void 0,(i=(e=o).userImage)&&i.render&&i.render()&&(e.data.replace(new Uint8Array(i.data.buffer)),1)&&this.updateImage(a,o))}},d),p=m,h=m,f=1e20;function d(){u.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new ot.RGBAImage({width:1,height:1}),this.dirty=!0}function m(t,e,i,r,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=r||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;i=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=i,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(i*i),this.gridInner=new Float64Array(i*i),this.f=new Float64Array(i),this.d=new Float64Array(i),this.z=new Float64Array(i+1),this.v=new Int16Array(i),this.middle=Math.round(i/2*(0<=navigator.userAgent.indexOf("Gecko/")?1.2:1))}function y(t,e,i,r,n,o,a){for(var s=0;s<e;s++){for(var l=0;l<i;l++)r[l]=t[l*e+s];for(g(r,n,o,a,i),l=0;l<i;l++)t[l*e+s]=n[l]}for(l=0;l<i;l++){for(s=0;s<e;s++)r[s]=t[l*e+s];for(g(r,n,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(n[s])}}function g(t,e,i,r,n){r[i[0]=0]=-f,r[1]=+f;for(var o=1,a=0;o<n;o++){for(var s=(t[o]+o*o-(t[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=r[a];)a--,s=(t[o]+o*o-(t[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,r[a]=s,r[a+1]=+f}for(a=o=0;o<n;o++){for(;r[a+1]<o;)a++;e[o]=(o-i[a])*(o-i[a])+t[i[a]]}}m.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),r=0;r<this.size*this.size;r++){var n=e.data[4*r+3]/255;this.gridOuter[r]=1==n?0:0==n?f:Math.pow(Math.max(0,.5-n),2),this.gridInner[r]=1==n?f:0==n?0:Math.pow(Math.max(0,n-.5),2)}for(y(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),y(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),r=0;r<this.size*this.size;r++)i[r]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[r]-this.gridInner[r])/this.radius+this.cutoff))));return i},p.default=h;var v=function(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}};v.prototype.setURL=function(t){this.url=t},v.prototype.getGlyphs=function(t,l){var e,u=this,i=[];for(e in t)for(var r=0,n=t[e];r<n.length;r+=1)i.push({stack:e,id:n[r]});ot.asyncAll(i,function(t,i){var r=t.stack,n=t.id,o=u.entries[r],t=(o=o||(u.entries[r]={glyphs:{},requests:{},ranges:{}})).glyphs[n];if(void 0===t){if(t=u._tinySDF(o,r,n))return o.glyphs[n]=t,void i(null,{stack:r,id:n,glyph:t});var a,s=Math.floor(n/256);65535<256*s?i(new Error("glyphs > 65535 not supported")):o.ranges[s]?i(null,{stack:r,id:n,glyph:t}):((a=o.requests[s])||(a=o.requests[s]=[],v.loadGlyphRange(r,s,u.url,u.requestManager,function(t,e){if(e){for(var i in e)u._doesCharSupportLocalGlyph(+i)||(o.glyphs[+i]=e[+i]);o.ranges[s]=!0}for(var r=0,n=a;r<n.length;r+=1)(0,n[r])(t,e);delete o.requests[s]})),a.push(function(t,e){t?i(t):e&&i(null,{stack:r,id:n,glyph:e[n]||null})}))}else i(null,{stack:r,id:n,glyph:t})},function(t,e){if(t)l(t);else if(e){for(var i={},r=0,n=e;r<n.length;r+=1){var o=n[r],a=o.stack,s=o.id,o=o.glyph;(i[a]||(i[a]={}))[s]=o&&{id:o.id,bitmap:o.bitmap.clone(),metrics:o.metrics}}l(null,i)}})},v.prototype._doesCharSupportLocalGlyph=function(t){return!!this.localIdeographFontFamily&&
1(ot.isChar["CJK Unified Ideographs"](t)||ot.isChar["Hangul Syllables"](t)||ot.isChar.Hiragana(t)||ot.isChar.Katakana(t))},v.prototype._tinySDF=function(t,e,i){var r=this.localIdeographFontFamily;if(r&&this._doesCharSupportLocalGlyph(i)){var n,o=t.tinySDF;return o||(n="400",/bold/i.test(e)?n="900":/medium/i.test(e)?n="500":/light/i.test(e)&&(n="200"),o=t.tinySDF=new v.TinySDF(24,3,8,.25,r,n)),{id:i,bitmap:new ot.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},v.loadGlyphRange=function(t,e,i,r,a){var n=256*e,e=255+n,e=r.transformRequest(r.normalizeGlyphsURL(i).replace("{fontstack}",t).replace("{range}",n+"-"+e),ot.ResourceType.Glyphs);ot.getArrayBuffer(e,function(t,e){if(t)a(t);else if(e){for(var i={},r=0,n=ot.parseGlyphPBF(e);r<n.length;r+=1){var o=n[r];i[o.id]=o}a(null,i)}})},v.TinySDF=p;var x=function(){this.specification=ot.styleSpec.light.position};x.prototype.possiblyEvaluate=function(t,e){return ot.sphericalToCartesian(t.expression.evaluate(e))},x.prototype.interpolate=function(t,e,i){return{x:ot.number(t.x,e.x,i),y:ot.number(t.y,e.y,i),z:ot.number(t.z,e.z,i)}};var b,w=new ot.Properties({anchor:new ot.DataConstantProperty(ot.styleSpec.light.anchor),position:new x,color:new ot.DataConstantProperty(ot.styleSpec.light.color),intensity:new ot.DataConstantProperty(ot.styleSpec.light.intensity)}),S=((b=ot.Evented)&&(I.__proto__=b),((I.prototype=Object.create(b&&b.prototype)).constructor=I).prototype.getLight=function(){return this._transitionable.serialize()},I.prototype.setLight=function(t,e){if(void 0===e&&(e={}),!this._validate(ot.validateLight,t,e))for(var i in t){var r=t[i];ot.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),r):this._transitionable.setValue(i,r)}},I.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},I.prototype.hasTransition=function(){return this._transitioning.hasTransition()},I.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},I.prototype._validate=function(t,e,i){return(!i||!1!==i.validate)&&ot.emitValidationErrors(this,t.call(ot.validateStyle,ot.extend({value:e,style:{glyphs:!0,sprite:!0},styleSpec:ot.styleSpec})))},I),T=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};function I(t){b.call(this),this._transitionable=new ot.Transitionable(w),this.setLight(t),this._transitioning=this._transitionable.untransitioned()}T.prototype.getDash=function(t,e){var i=t.join(",")+String(e);return this.dashEntry[i]||(this.dashEntry[i]=this.addDash(t,e)),this.dashEntry[i]},T.prototype.getDashRanges=function(t,e,i){var r=[],n=t.length%2==1?-t[t.length-1]*i:0,o=t[0]*i,a=!0;r.push({left:n,right:o,isDash:a,zeroLength:0===t[0]});for(var s=t[0],l=1;l<t.length;l++){var u=t[l];r.push({left:s*i,right:(s+=u)*i,isDash:a=!a,zeroLength:0===u})}return r},T.prototype.addRoundDash=function(t,e,i){for(var r=e/2,n=-i;n<=i;n++)for(var o=this.width*(this.nextRow+i+n),a=0,s=t[a],l=0;l<this.width;l++){1<l/s.right&&(s=t[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),p=Math.min(u,c),h=void 0,u=n/i*(1+r);h=s.isDash?(c=r-Math.abs(u),Math.sqrt(p*p+c*c)):r-Math.sqrt(p*p+u*u),this.data[o+l]=Math.max(0,Math.min(255,h+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;0<=e;--e){var i=t[e],r=t[e+1];i.zeroLength?t.splice(e,1):r&&r.isDash===i.isDash&&(r.left=i.left,t.splice(e,1))}var n=t[0],o=t[t.length-1];n.isDash===o.isDash&&(n.left=o.left-this.width,o.right=n.right+this.width);for(var a=this.width*this.nextRow,s=0,l=t[s],u=0;u<this.width;u++){1<u/l.right&&(l=t[++s]);var c=Math.abs(u-l.left),p=Math.abs(u-l.right),p=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?p:-p)+128))}},T.prototype.addDash=function(t,e){var i=e?7:0,r=2*i+1;if(this.nextRow+r>this.height)return ot.warnOnce("LineAtlas out of space"),null;for(var n,o,a=0,s=0;s<t.length;s++)a+=t[s];0!==a&&(n=this.width/a,o=this.getDashRanges(t,this.width,n),e?this.addRoundDash(o,n,i):this.addRegularDash(o));i={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:a};return this.nextRow+=r,this.dirty=!0,i},T.prototype.bind=function(t){t=t.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))};var E=function t(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=ot.uniqueId();
1for(var r=this.workerPool.acquire(this.id),n=0;n<r.length;n++){var o=new t.Actor(r[n],i,this.id);o.name="Worker "+n,this.actors.push(o)}};function A(i,r,n){function t(t,e){if(t)return n(t);e&&(t=ot.pick(ot.extend(e,i),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]),e.vector_layers&&(t.vectorLayers=e.vector_layers,t.vectorLayerIds=t.vectorLayers.map(function(t){return t.id})),t.tiles=r.canonicalizeTileset(t,i.url),n(null,t))}return i.url?ot.getJSON(r.transformRequest(r.normalizeSourceURL(i.url),ot.ResourceType.Source),t):ot.browser.frame(function(){return t(null,i)})}E.prototype.broadcast=function(i,r,t){ot.asyncAll(this.actors,function(t,e){t.send(i,r,e)},t=t||function(){})},E.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},E.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},E.Actor=ot.Actor;function z(t,e,i){this.bounds=ot.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=i||24}z.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},z.prototype.contains=function(t){var e=Math.pow(2,t.z),i=Math.floor(ot.mercatorXfromLng(this.bounds.getWest())*e),r=Math.floor(ot.mercatorYfromLat(this.bounds.getNorth())*e),n=Math.ceil(ot.mercatorXfromLng(this.bounds.getEast())*e),e=Math.ceil(ot.mercatorYfromLat(this.bounds.getSouth())*e);return t.x>=i&&t.x<n&&t.y>=r&&t.y<e};var P,C,k,M,D,L,B,R=((B=ot.Evented)&&(Y.__proto__=B),((Y.prototype=Object.create(B&&B.prototype)).constructor=Y).prototype.load=function(){var i=this;this._loaded=!1,this.fire(new ot.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=A(this._options,this.map._requestManager,function(t,e){i._tileJSONRequest=null,i._loaded=!0,t?i.fire(new ot.ErrorEvent(t)):e&&(
1ot.extend(i,e),e.bounds&&(i.tileBounds=new z(e.bounds,i.minzoom,i.maxzoom)),ot.postTurnstileEvent(e.tiles,i.map._requestManager._customAccessToken),ot.postMapLoadEvent(e.tiles,i.map._getMapId(),i.map._requestManager._skuToken,i.map._requestManager._customAccessToken),i.fire(new ot.Event("data",{dataType:"source",sourceDataType:"metadata"})),i.fire(new ot.Event("data",{dataType:"source",sourceDataType:"content"})))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},Y.prototype.onAdd=function(t){this.map=t,this.load()},Y.prototype.setSourceProperty=function(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},Y.prototype.setTiles=function(t){var e=this;return this.setSourceProperty(function(){e._options.tiles=t}),this},Y.prototype.setUrl=function(t){var e=this;return this.setSourceProperty(function(){e.url=t,e._options.url=t}),this},Y.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Y.prototype.serialize=function(){return ot.extend({},this._options)},Y.prototype.loadTile=function(i,r){var t=this.map._requestManager.normalizeTileURL(i.tileID.canonical.url(this.tiles,this.scheme)),t={request:this.map._requestManager.transformRequest(t,ot.ResourceType.Tile),uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,tileSize:this.tileSize*i.tileID.overscaleFactor(),type:this.t
vendor: 1,044 bytes, line 1
1ype,source:this.id,pixelRatio:ot.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function e(t,e){return delete i.request,i.aborted?r(null):t&&404!==t.status?r(t):(e&&e.resourceTiming&&(i.resourceTiming=e.resourceTiming),this.map._refreshExpiredTiles&&e&&i.setExpiryData(e),i.loadVectorData(e,this.map.painter),ot.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(i.reloadCallback&&(this.loadTile(i,i.reloadCallback),i.reloadCallback=null)))}t.request.collectResourceTiming=this._collectResourceTiming,i.actor&&"expired"!==i.state?"loading"===i.state?i.reloadCallback=r:i.request=i.actor.send("reloadTile",t,e.bind(this)):(i.actor=this.dispatcher.getActor(),i.request=i.actor.send("loadTile",t,e.bind(this)))},Y.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)},Y.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.t
1ype,source:this.id},void 0)},Y.prototype.hasTransition=function(){return!1},Y),F=((L=ot.Evented)&&(J.__proto__=L),((J.prototype=Object.create(L&&L.prototype)).constructor=J).prototype.load=function(){var i=this;this._loaded=!1,this.fire(new ot.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=A(this._options,this.map._requestManager,function(t,e){i._tileJSONRequest=null,i._loaded=!0,t?i.fire(new ot.ErrorEvent(t)):e&&(ot.extend(i,e),e.bounds&&(i.tileBounds=new z(e.bounds,i.minzoom,i.maxzoom)),ot.postTurnstileEvent(e.tiles),ot.postMapLoadEvent(e.tiles,i.map._getMapId(),i.map._requestManager._skuToken),i.fire(new ot.Event("data",{dataType:"source",sourceDataType:"metadata"})),i.fire(new ot.Event("data",{dataType:"source",sourceDataType:"content"})))})},J.prototype.loaded=function(){return this._loaded},J.prototype.onAdd=function(t){this.map=t,this.load()},J.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},J.prototype.serialize=function(){return ot.extend({},this._options)},J.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},J.prototype.loadTile=function(r,n){var o=this,t=this.map._requestManager.normalizeTileURL(r.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);r.request=ot.getImage(this.map._requestManager.transformRequest(t,ot.ResourceType.Tile),function(t,e){var i;delete r.request,r.aborted?(r.state="unloaded",n(null)):t?(r.state="errored",n(t)):e&&(o.map._refreshExpiredTiles&&r.setExpiryData(e),delete e.cacheControl,delete e.expires,t=(i=o.map.painter.context).gl,r.texture=o.map.painter.getTileTexture(e.width),r.texture?r.texture.update(e,{useMipmap:!0}):(r.texture=new ot.Texture(i,e,t.RGBA,{useMipmap:!0}),r.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE,t.LINEAR_MIPMAP_NEAREST),i.extTextureFilterAnisotropic&&t.texParameterf(t.TEXTURE_2D,i.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,i.extTextureFilterAnisotropicMax)),r.state="loaded",ot.cacheEntryPossiblyAdded(o.dispatcher),n(null))})},J.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},J.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},J.prototype.hasTransition=function(){return!1},J),O=((D=F)&&(H.__proto__=D),((H.prototype=Object.create(D&&D.prototype)).constructor=H).prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},H.prototype.loadTile=function(i,r){var t=this.map._requestManager.normalizeTileURL(i.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);i.request=ot.getImage(this.map._requestManager.transformRequest(t,ot.ResourceType.Tile),function(t,e){delete i.request,i.aborted?(i.state="unloaded",r(null)):t?(i.state="errored",r(t)):e&&(this.map._refreshExpiredTiles&&i.setExpiryData(e),delete e.cacheControl,delete e.expires,e=ot.window.ImageBitmap&&e instanceof ot.window.ImageBitmap&&ot.offscreenCanvasSupported()?e:ot.browser.getImageData(e,1),e={uid:i.uid,coord:i.tileID,source:this.id,rawImageData:e,encoding:this.encoding},i.actor&&"expired"!==i.state||(i.actor=this.dispatcher.getActor(),i.actor.send("loadDEMTile",e,function(t,e){t&&(i.state="errored",r(t)),e&&(i.dem=e,i.needsHillshadePrepare=!0,i.state="loaded",r(null))}.bind(this))))}.bind(this)),i.neighboringTiles=this._getNeighboringTiles(i.tileID)},H.prototype._getNeighboringTiles=function(t){var e=t.canonical,i=Math.pow(2,e.z),r=(e.x-1+i)%i,n=0===e.x?t.wrap-1:t.wrap,o=(e.x+1+i)%i,a=e.x+1===i?t.wrap+1:t.wrap,s={};return s[new ot.OverscaledTileID(t.overscaledZ,n,e.z,r,e.y).key]={backfilled:!1},s[new ot.OverscaledTileID(t.overscaledZ,a,e.z,o,e.y).key]={backfilled:!1},0<e.y&&(s[new ot.OverscaledTileID(t.overscaledZ,n,e.z,r,e.y-1).key]={backfilled:!1},s[new ot.OverscaledTileID(t.overscaledZ,t.wrap,e.z,e.x,e.y-1).key]={backfilled:!1},s[new ot.OverscaledTileID(t.overscaledZ,a,e.z,o,e.y-1).key]={backfilled:!1}),e.y+1<i&&(s[new ot.OverscaledTileID(t.overscaledZ,n,e.z,r,e.y+1).key]={backfilled:!1},s[new ot.OverscaledTileID(t.overscaledZ,t.wrap,e.z,e.x,e.y+1).key]={backfilled:!1},s[new ot.OverscaledTileID(t.overscaledZ,a,e.z,o,e.y+1).key]={backfilled:!1}),s},H.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&t.actor.send("removeDEMTile",{uid:t.uid,source:this.id})},H),U=((M=ot.Evented)&&(K.__proto__=M),((K.prototype=Object.create(M&&M.prototype)).constructor=K).prototype.load=function(){var e=this;
1this.fire(new ot.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(t){t?e.fire(new ot.ErrorEvent(t)):(t={dataType:"source",sourceDataType:"metadata"},e._collectResourceTiming&&e._resourceTiming&&0<e._resourceTiming.length&&(t.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new ot.Event("data",t)))})},K.prototype.onAdd=function(t){this.map=t,this.load()},K.prototype.setData=function(t){var e=this;return this._data=t,this.fire(new ot.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(t){t?e.fire(new ot.ErrorEvent(t)):(t={dataType:"source",sourceDataType:"content"},e._collectResourceTiming&&e._resourceTiming&&0<e._resourceTiming.length&&(t.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new ot.Event("data",t)))}),this},K.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},K.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},K.prototype.getClusterLeaves=function(t,e,i,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:i},r),this},K.prototype._updateWorkerData=function(i){var r=this;this._loaded=!1;var n=ot.extend({},this.workerOptions),t=this._data;"string"==typeof t?(n.request=this.map._requestManager.transformRequest(ot.browser.resolveURL(t),ot.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(t),this.actor.send(this.type+".loadData",n,function(t,e){r._removed||e&&e.abandoned||(r._loaded=!0,e&&e.resourceTiming&&e.resourceTiming[r.id]&&(r._resourceTiming=e.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),i(t))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(i,r){var n=this,o=i.actor?"reloadTile":"loadTile";
1i.actor=this.actor,i.request=this.actor.send(o,{type:this.type,uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:ot.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(t,e){return delete i.request,i.unloadVectorData(),i.aborted?r(null):t?r(t):(i.loadVectorData(e,n.map.painter,"reloadTile"==o),r(null))})},K.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},K.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return ot.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K),V=ot.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),N=((k=ot.Evented)&&(W.__proto__=k),((W.prototype=Object.create(k&&k.prototype)).constructor=W).prototype.load=function(i,r){var n=this;this._loaded=!1,this.fire(new ot.Event("dataloading",{dataType:"source"})),this.url=this.options.url,ot.getImage(this.map._requestManager.transformRequest(this.url,ot.ResourceType.Image),function(t,e){n._loaded=!0,t?n.fire(new ot.ErrorEvent(t)):e&&(n.image=e,i&&(n.coordinates=i),r&&r(),n._finishLoading())})},W.prototype.loaded=function(){return this._loaded},W.prototype.updateImage=function(t){var e=this;return this.image&&t.url&&(this.options.url=t.url,this.load(t.coordinates,function(){e.texture=null})),this},W.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new ot.Event("data",{dataType:"source",sourceDataType:"metadata"})))},W.prototype.onAdd=function(t){this.map=t,this.load()},W.prototype.setCoordinates=function(t){var e=this,u=(this.coordinates=t).map(ot.MercatorCoordinate.fromLngLat);this.tileID=function(){for(var t=1/0,e=1/0,i=-1/0,r=-1/0,n=0,o=u;n<o.length;n+=1)var a=o[n],t=Math.min(t,a.x),e=Math.min(e,a.y),i=Math.max(i,a.x),r=Math.max(r,a.y);var s=Math.max(i-t,r-e),l=Math.max(0,Math.floor(-Math.log(s)/Math.LN2)),s=Math.pow(2,l);return new ot.CanonicalTileID(l,Math.floor((t+i)/2*s),Math.floor((e+r)/2*s))}(),this.minzoom=this.maxzoom=this.tileID.z;t=u.map(function(t){return e.tileID.getTilePoint(t)._round()});return this._boundsArray=new ot.StructArrayLayout4i8,this._boundsArray.emplaceBack(t[0].x,t[0].y,0,0),this._boundsArray.emplaceBack(t[1].x,t[1].y,ot.EXTENT,0),this._boundsArray.emplaceBack(t[3].x,t[3].y,0,ot.EXTENT),this._boundsArray.emplaceBack(t[2].x,t[2].y,ot.EXTENT,ot.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new ot.Event("data",{dataType:"source",sourceDataType:"content"})),this},W.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t,e=this.map.painter.context,i=e.gl;for(t in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=ot.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new ot.Texture(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[t];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},W.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t).buckets={}:t.state="errored",e(null)},W.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return!1},W),j=((C=N)&&(X.__proto__=C),((X.prototype=Object.create(C&&C.prototype)).constructor=X).prototype.load=function(){var i=this;this._loaded=!1;var t=this.options;this.urls=[];for(var e=0,r=t.urls;e<r.length;e+=1)this.urls.push(this.map._requestManager.transformRequest(r[e],ot.ResourceType.Source).url);ot.getVideo(this.urls,function(t,e){i._loaded=!0,t?i.fire(new ot.ErrorEvent(t)):e&&(i.video=e,i.video.loop=!0,i.video.addEventListener("playing",function(){i.map.triggerRepaint()}),i.map&&i.video.play(),i._finishLoading())})},X.prototype.pause=function(){this.video&&this.video.pause()},X.prototype.play=function(){this.video&&this.video.play()},X.prototype.seek=function(t){var e;
vendor: 4,184 bytes, line 1
1this.video&&(t<(e=this.video.seekable).start(0)||t>e.end(0)?this.fire(new ot.ErrorEvent(new ot.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+e.start(0)+" and "+e.end(0)+"-second mark."))):this.video.currentTime=t)},X.prototype.getVideo=function(){return this.video},X.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},X.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t,e=this.map.painter.context,i=e.gl;for(t in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=ot.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new ot.Texture(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[t];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},X.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},X.prototype.hasTransition=function(){return this.video&&!this.video.paused},X),q=((P=N)&&(G.__proto__=P),((G.prototype=Object.create(P&&P.prototype)).constructor=G).prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof ot.window.HTMLCanvasElement?this.options.canvas:ot.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new ot.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},G.prototype.getCanvas=function(){return this.canvas},G.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},G.prototype.onRemove=function(){this.pause()},G.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var e,i=this.map.painter.context,r=i.gl;for(e in this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=ot.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ot.Texture(i,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var n=this.tiles[e];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},G.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},G.prototype.hasTransition=function(){return this._playing},G.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var i=e[t];if(isNaN(i)||i<=0)return!0}return!1},G),Z={vector:R,raster:F,"raster-dem":O,geojson:U,video:j,image:N,canvas:q};function G(t,e,i,r){P.call(this,t,e,i,r),e.coordinates?Array.isArray(e.coordinates)&&4===e.coordinates.length&&!e.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new ot.ErrorEvent(new ot.ValidationError("sources."+t,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new ot.ErrorEvent(new ot.ValidationError("sources."+t,null,'missing required property "coordinates"'))),e.animate&&"boolean"!=typeof e.animate&&this.fire(new ot.ErrorEvent(new ot.ValidationError("sources."+t,null,'optional "animate" property must be a boolean value'))),e.canvas?"string"==typeof e.canvas||e.canvas instanceof ot.window.HTMLCanvasElement||this.fire(new ot.ErrorEvent(new ot.ValidationError("sources."+t,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 ot.
1ErrorEvent(new ot.ValidationError("sources."+t,null,'missing required property "canvas"'))),this.options=e,this.animate=void 0===e.animate||e.animate}function X(t,e,i,r){C.call(this,t,e,i,r),this.roundZoom=!0,this.type="video",this.options=e}function W(t,e,i,r){k.call(this),this.id=t,this.dispatcher=i,this.coordinates=e.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=e}function K(t,e,i,r){M.call(this),this.id=t,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=i.getActor(),this.setEventedParent(r),this._data=e.data,this._options=ot.extend({},e),this._collectResourceTiming=e.collectResourceTiming,this._resourceTiming=[],void 0!==e.maxzoom&&(this.maxzoom=e.maxzoom),e.type&&(this.type=e.type),e.attribution&&(this.attribution=e.attribution),this.promoteId=e.promoteId;r=ot.EXTENT/this.tileSize;this.workerOptions=ot.extend({source:this.id,cluster:e.cluster||!1,geojsonVtOptions:{buffer:(void 0!==e.buffer?e.buffer:128)*r,tolerance:(void 0!==e.tolerance?e.tolerance:.375)*r,extent:ot.EXTENT,maxZoom:this.maxzoom,lineMetrics:e.lineMetrics||!1,generateId:e.generateId||!1},superclusterOptions:{maxZoom:void 0!==e.clusterMaxZoom?Math.min(e.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,e.clusterMinPoints||2),extent:ot.EXTENT,radius:(e.clusterRadius||50)*r,log:!1,generateId:e.generateId||!1},clusterProperties:e.clusterProperties,filter:e.filter},e.workerOptions)}function H(t,e,i,r){D.call(this,t,e,i,r),this.type="raster-dem",this.maxzoom=22,this._options=ot.extend({type:"raster-dem"},e),this.encoding=e.encoding||"mapbox"}function J(t,e,i,r){L.call(this),this.id=t,this.dispatcher=i,this.setEventedParent(r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=ot.extend({type:"raster"},e),ot.extend(this,ot.pick(e,["url","scheme","tileSize"]))}function Y(t,e,i,r){if(B.call(this),this.id=t,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,ot.extend(this,ot.pick(e,["url","scheme","tileSize","promoteId"])),this._options=ot.extend({type:"vector"},e),this._collectResourceTiming=e.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(r)}function Q(i,t,e,r,n,o){var a=function(t,e,i){if(t)for(var r=0,n=t;r<n.length;r+=1){var o=e[n[r]];if(o&&o.source===i&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===i&&"fill-extrusion"===s.type)return!0}return!1}(n&&n.layers,t,i.id),s=o.maxPitchScaleFactor(),a=i.tilesIn(r,s,a);a.sort($);for(var l,u,d=[],c=0,p=a;c<p.length;c+=1){var h=p[c];d.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(t,e,i._state,h.queryGeometry,h.cameraQueryGeometry,h.scale,n,o,s,(l=i.transform,u=h.tileID,h=void 0,h=ot.identity([]),ot.translate(h,h,[1,1,0]),ot.scale(h,h,[.5*l.width,.5*l.height,1]),ot.multiply(h,h,l.calculatePosMatrix(u.toUnwrapped()))))})}var f,m=function(){for(var t={},e={},i=0,r=d;i<r.length;i+=1){var n,o=r[i],a=o.queryResults,o=o.wrappedTileID,s=e[o]=e[o]||{};for(n in a)for(var l=a[n],u=s[n]=s[n]||{},c=t[n]=t[n]||[],p=0,h=l;p<h.length;p+=1){var f=h[p];u[f.featureIndex]||(u[f.featureIndex]=!0,c.push(f))}}return t}();for(f in m)m[f].forEach(function(t){var e=t.feature,t=i.getFeatureState(e.layer["source-layer"],e.id);e.source=e.layer.source,e.layer["source-layer"]&&(e.sourceLayer=e.layer["source-layer"]),e.state=t});return m}function $(t,e){t=t.tileID,e=e.tileID;return t.overscaledZ-e.overscaledZ||t.canonical.y-e.canonical.y||t.wrap-e.wrap||t.canonical.x-e.canonical.x}function tt(t,e){this.max=t,this.onRemove=e,this.reset()}tt.prototype.reset=function(){for(var t in this.data)for(var e=0,i=this.data[t];e<i.length;e+=1){var r=i[e];r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value)}return this.data={},this.order=[],this}
1,tt.prototype.add=function(t,e,i){var r=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o,a={value:e,timeout:void 0};return void 0!==i&&(a.timeout=setTimeout(function(){r.remove(t,a)},i)),this.data[n].push(a),this.order.push(n),this.order.length>this.max&&(o=this._getAndRemoveByKey(this.order[0]))&&this.onRemove(o),this},tt.prototype.has=function(t){return t.wrapped().key in this.data},tt.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},tt.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},tt.prototype.getByKey=function(t){t=this.data[t];return t?t[0].value:null},tt.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},tt.prototype.remove=function(t,e){if(!this.has(t))return this;var i=t.wrapped().key,t=void 0===e?0:this.data[i].indexOf(e),e=this.data[i][t];return this.data[i].splice(t,1),e.timeout&&clearTimeout(e.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(e.value),this.order.splice(this.order.indexOf(i),1),this},tt.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},tt.prototype.filter=function(t){var e,i=[];for(e in this.data)for(var r=0,n=this.data[e];r<n.length;r+=1){var o=n[r];t(o.value)||i.push(o)}for(var a=0,s=i;a<s.length;a+=1){var l=s[a];this.remove(l.value.tileID,l)}};function et(t,e,i){var r=(this.context=t).gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer}et.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},et.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},et.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};function it(t,e,i,r){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,r=(this.context=t).gl,this.buffer=r.createBuffer(),t.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer}var rt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};it.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},it.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},it.prototype.enableAttributes=function(t,e){for(var i=0;i<this.attributes.length;i++){var r=e.attributes[this.attributes[i].name];void 0!==r&&t.enableVertexAttribArray(r)}},it.prototype.setVertexAttribPointers=function(t,e,i){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],o=e.attributes[n.name];void 0!==o&&t.vertexAttribPointer(o,n.components,t[rt[n.type]],!1,this.itemSize,n.offset+this.itemSize*(i||0))}},it.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var nt=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};nt.prototype.get=function(){return this.current},nt.prototype.set=function(t){},nt.prototype.getDefault=function(){return this.default},nt.prototype.setDefault=function(){this.set(this.default)};function at(t,e,i,r){this.context=t,this.width=e,this.height=i,i=this.framebuffer=t.gl.createFramebuffer(),this.colorAttachment=new ve(t,i),r&&(this.depthAttachment=new xe(t,i))}var st,lt,ut,ct,pt,ht,ft,dt,mt,yt,_t,gt,vt,xt,bt,wt,St,Tt,It,Et,At,zt,Pt,Ct,kt,Mt,Dt,Lt,Bt,Rt,Ft,Ot,Ut,Vt,Nt=((Vt=nt)&&(ti.__proto__=Vt),((ti.prototype=Object.create(Vt&&Vt.prototype)).constructor=ti).prototype.getDefault=function(){return ot.Color.transparent},ti.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a&&!this.dirty||(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},ti),jt=((Ut=nt)&&($e.__proto__=Ut),(($e.prototype=Object.create(Ut&&Ut.prototype)).constructor=$e).prototype.getDefault=function(){return 1},$e.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},$e),qt=((Ot=nt)&&(Qe.__proto__=Ot),((Qe.prototype=Object.create(Ot&&Ot.prototype)).constructor=Qe).prototype.getDefault=function(){return 0},Qe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},Qe),Zt=((Ft=nt)&&(Ye.__proto__=Ft),((Ye.prototype=Object.create(Ft&&Ft.prototype)).constructor=Ye).prototype.getDefault=function(){return[!0,
1!0,!0,!0]},Ye.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&!this.dirty||(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},Ye),Gt=((Rt=nt)&&(Je.__proto__=Rt),((Je.prototype=Object.create(Rt&&Rt.prototype)).constructor=Je).prototype.getDefault=function(){return!0},Je.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.depthMask(t),this.current=t,this.dirty=!1)},Je),Xt=((Bt=nt)&&(He.__proto__=Bt),((He.prototype=Object.create(Bt&&Bt.prototype)).constructor=He).prototype.getDefault=function(){return 255},He.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},He),Wt=((Lt=nt)&&(Ke.__proto__=Lt),((Ke.prototype=Object.create(Lt&&Lt.prototype)).constructor=Ke).prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},Ke.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask&&!this.dirty||(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},Ke),Kt=((Dt=nt)&&(We.__proto__=Dt),((We.prototype=Object.create(Dt&&Dt.prototype)).constructor=We).prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},We.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&!this.dirty||(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},We),Ht=((Mt=nt)&&(Xe.__proto__=Mt),((Xe.prototype=Object.create(Mt&&Mt.prototype)).constructor=Xe).prototype.getDefault=function(){return!1},Xe.prototype.set=function(t){var e;t===this.current&&!this.dirty||(e=this.gl,t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1)},Xe),Jt=((kt=nt)&&(Ge.__proto__=kt),((Ge.prototype=Object.create(kt&&kt.prototype)).constructor=Ge).prototype.getDefault=function(){return[0,1]},Ge.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&!this.dirty||(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},Ge),Yt=((Ct=nt)&&(Ze.__proto__=Ct),((Ze.prototype=Object.create(Ct&&Ct.prototype)).constructor=Ze).prototype.getDefault=function(){return!1},Ze.prototype.set=function(t){var e;t===this.current&&!this.dirty||(e=this.gl,t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1)},Ze),Qt=((Pt=nt)&&(qe.__proto__=Pt),((qe.prototype=Object.create(Pt&&Pt.prototype)).constructor=qe).prototype.getDefault=function(){return this.gl.LESS},qe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},qe),$t=((zt=nt)&&(je.__proto__=zt),((je.prototype=Object.create(zt&&zt.prototype)).constructor=je).prototype.getDefault=function(){return!1},je.prototype.set=function(t){var e;t===this.current&&!this.dirty||(e=this.gl,t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1)},je),te=((At=nt)&&(Ne.__proto__=At),((Ne.prototype=Object.create(At&&At.prototype)).constructor=Ne).prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},Ne.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&!this.dirty||(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},Ne),ee=((Et=nt)&&(Ve.__proto__=Et),((Ve.prototype=Object.create(Et&&Et.prototype)).constructor=Ve).prototype.getDefault=function(){return ot.Color.transparent},Ve.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a&&!this.dirty||(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},Ve),ie=((It=nt)&&(Ue.__proto__=It),((Ue.prototype=Object.create(It&&It.prototype)).constructor=Ue).prototype.getDefault=function(){return this.gl.FUNC_ADD},Ue.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},Ue),re=((Tt=nt)&&(Oe.__proto__=Tt),((Oe.prototype=Object.create(Tt&&Tt.prototype)).constructor=Oe).prototype.getDefault=function(){return!1},Oe.prototype.set=function(t){var e;t===this.current&&!this.dirty||(e=this.gl,t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1)},Oe),ne=((St=nt)&&(Fe.__proto__=St),((Fe.prototype=Object.create(St&&St.prototype)).constructor=Fe).prototype.getDefault=function(){return this.gl.BACK}
1,Fe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.cullFace(t),this.current=t,this.dirty=!1)},Fe),oe=((wt=nt)&&(Re.__proto__=wt),((Re.prototype=Object.create(wt&&wt.prototype)).constructor=Re).prototype.getDefault=function(){return this.gl.CCW},Re.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.frontFace(t),this.current=t,this.dirty=!1)},Re),ae=((bt=nt)&&(Be.__proto__=bt),((Be.prototype=Object.create(bt&&bt.prototype)).constructor=Be).prototype.getDefault=function(){return null},Be.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.useProgram(t),this.current=t,this.dirty=!1)},Be),se=((xt=nt)&&(Le.__proto__=xt),((Le.prototype=Object.create(xt&&xt.prototype)).constructor=Le).prototype.getDefault=function(){return this.gl.TEXTURE0},Le.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},Le),le=((vt=nt)&&(De.__proto__=vt),((De.prototype=Object.create(vt&&vt.prototype)).constructor=De).prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},De.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&!this.dirty||(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},De),ue=((gt=nt)&&(Me.__proto__=gt),((Me.prototype=Object.create(gt&&gt.prototype)).constructor=Me).prototype.getDefault=function(){return null},Me.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1)},Me),ce=((_t=nt)&&(ke.__proto__=_t),((ke.prototype=Object.create(_t&&_t.prototype)).constructor=ke).prototype.getDefault=function(){return null},ke.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1)},ke),pe=((yt=nt)&&(Ce.__proto__=yt),((Ce.prototype=Object.create(yt&&yt.prototype)).constructor=Ce).prototype.getDefault=function(){return null},Ce.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1)},Ce),he=((mt=nt)&&(Pe.__proto__=mt),((Pe.prototype=Object.create(mt&&mt.prototype)).constructor=Pe).prototype.getDefault=function(){return null},Pe.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1)},Pe),fe=((dt=nt)&&(ze.__proto__=dt),((ze.prototype=Object.create(dt&&dt.prototype)).constructor=ze).prototype.getDefault=function(){return null},ze.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},ze),de=((ft=nt)&&(Ae.__proto__=ft),((Ae.prototype=Object.create(ft&&ft.prototype)).constructor=Ae).prototype.getDefault=function(){return null},Ae.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},Ae),me=((ht=nt)&&(Ee.__proto__=ht),((Ee.prototype=Object.create(ht&&ht.prototype)).constructor=Ee).prototype.getDefault=function(){return 4},Ee.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1)},Ee),ye=((pt=nt)&&(Ie.__proto__=pt),((Ie.prototype=Object.create(pt&&pt.prototype)).constructor=Ie).prototype.getDefault=function(){return!1},Ie.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1)},Ie),_e=((ct=nt)&&(Te.__proto__=ct),((Te.prototype=Object.create(ct&&ct.prototype)).constructor=Te).prototype.getDefault=function(){return!1},Te.prototype.set=function(t){var e;t===this.current&&!this.dirty||((e=this.gl).pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1)},Te),ge=((ut=nt)&&(Se.__proto__=ut),((Se.prototype=Object.create(ut&&ut.prototype)).constructor=Se).prototype.getDefault=function(){return null},Se),ve=((lt=ge)&&(we.__proto__=lt),((we.prototype=Object.create(lt&&lt.prototype)).constructor=we).prototype.setDirty=function(){this.dirty=!0},we.prototype.set=function(t){var e;t===this.current&&!this.dirty||(this.context.bindFramebuffer.set(this.parent),(e=this.gl).framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1)},we),xe=((st=ge)&&(be.__proto__=st),((be.prototype=Object.create(st&&st.prototype)).constructor=be).prototype.set=function(t){var e;t===this.current&&!this.dirty||(this.context.bindFramebuffer.set(this.parent),(e=this.gl).framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1)},be);function be(){st.apply(this,arguments)}function we(){lt.apply(this,arguments)}function Se(t,e){ut.call(this,t),this.context=t,this.parent=e}function Te(){ct.apply(this,arguments)}function Ie(){pt.apply(this,arguments)}function Ee(){ht.apply(this,arguments)}function Ae(t){ft.call(this,t),this.vao=t.extVertexArrayObject}function ze(){dt.apply(this,arguments)}function Pe(){mt.apply(this,arguments)}function Ce(){yt.apply(this,arguments)}function ke(){_t.apply(this,arguments)}function Me(){gt.apply(this,arguments)}function De(){vt.apply(this,arguments)}function Le(){xt.apply(this,arguments)}function Be(){bt.apply(this,arguments)}function Re(){wt.apply(this,arguments)}function Fe(){St.apply(this,arguments)}function Oe(){Tt.apply(this,arguments)}function Ue(){It.apply(this,arguments)}function Ve(){Et.apply(this,arguments)}function Ne(){At.apply(this,arguments)}function je(){zt.apply(this,arguments)}function qe(){Pt.apply(this,arguments)}function Ze(){Ct.apply(this,arguments)}function Ge(){kt.apply(this,arguments)}function Xe(){Mt.apply(this,arguments)}function We(){Dt.apply(this,arguments)}function Ke(){Lt.apply(this,arguments)}function He(){Bt.apply(this,arguments)}function Je(){Rt.apply(this,arguments)}function Ye(){Ft.apply(this,arguments)}function Qe(){Ot.apply(this,arguments)}function $e(){Ut.apply(this,arguments)}function ti(){Vt.apply(this,arguments)}at.prototype.destroy=function(){var t,e=this.context.gl,i=this.colorAttachment.get();i&&e.deleteTexture(i),this.depthAttachment&&(t=this.depthAttachment.get())&&e.deleteRenderbuffer(t),e.deleteFramebuffer(this.framebuffer)};
vendor: 13,312 bytes, line 1
1var ei=function(t,e,i){this.func=t,this.mask=e,this.range=i};ei.ReadOnly=!1,ei.ReadWrite=!0,ei.disabled=new ei(519,ei.ReadOnly,[0,1]);var ii=function(t,e,i,r,n,o){this.test=t,this.ref=e,this.mask=i,this.fail=r,this.depthFail=n,this.pass=o};ii.disabled=new ii({func:519,mask:0},0,0,7680,7680,7680);var ri=function(t,e,i){this.blendFunction=t,this.blendColor=e,this.mask=i};ri.disabled=new ri(ri.Replace=[1,0],ot.Color.transparent,[!1,!1,!1,!1]),ri.unblended=new ri(ri.Replace,ot.Color.transparent,[!0,!0,!0,!0]),ri.alphaBlended=new ri([1,771],ot.Color.transparent,[!0,!0,!0,!0]);var ni=function(t,e,i){this.enable=t,this.mode=e,this.frontFace=i};ni.disabled=new ni(!1,1029,2305),ni.backCCW=new ni(!0,1029,2305);function oi(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Nt(this),this.clearDepth=new jt(this),this.clearStencil=new qt(this),this.colorMask=new Zt(this),this.depthMask=new Gt(this),this.stencilMask=new Xt(this),this.stencilFunc=new Wt(this),this.stencilOp=new Kt(this),this.stencilTest=new Ht(this),this.depthRange=new Jt(this),this.depthTest=new Yt(this),this.depthFunc=new Qt(this),this.blend=new $t(this),this.blendFunc=new te(this),this.blendColor=new ee(this),this.blendEquation=new ie(this),this.cullFace=new re(this),this.cullFaceSide=new ne(this),this.frontFace=new oe(this),this.program=new ae(this),this.activeTexture=new se(this),this.viewport=new le(this),this.bindFramebuffer=new ue(this),this.bindRenderbuffer=new ce(this),this.bindTexture=new pe(this),this.bindVertexBuffer=new he(this),this.bindElementBuffer=new fe(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new de(this),this.pixelStoreUnpack=new me(this),this.pixelStoreUnpackPremultiplyAlpha=new ye(this),this.pixelStoreUnpackFlipY=new _e(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE)}oi.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()},oi.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},oi.prototype.createIndexBuffer=function(t,e){return new et(this,t,e)},oi.prototype.createVertexBuffer=function(t,e,i){return new it(this,t,e,i)},oi.prototype.createRenderbuffer=function(t,e,i){var r=this.gl,n=r.createRenderbuffer();return this.bindRenderbuffer.set(n),r.renderbufferStorage(r.RENDERBUFFER,t,e,i),this.bindRenderbuffer.set(null),n},oi.prototype.createFramebuffer=function(t,e,i){return new at(this,t,e,i)},oi.prototype.clear=function(t){var e=t.color,i=t.depth,r=this.gl,t=0;e&&(t|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(t|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),r.clear(t)},oi.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},oi.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},oi.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},oi.prototype.setColorMode=function(t){ot.deepEqual(t.blendFunction,ri.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)},oi.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ai,si=((ai=ot.Evented)&&(li.__proto__=ai),((li.prototype=Object.create(ai&&ai.prototype)).constructor=li).prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},li.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},li.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},li.prototype.getSource=function(){return this._source},li.prototype.pause=function(){this._paused=!0},li.prototype.resume=function(){var t;this._paused&&(t=this._shouldReloadOnResume,this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform))},li.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},li.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},li.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},li.prototype.serialize=function(){return this._source.serialize()},li.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var i=this._tiles[e];i.upload(t),i.prepare(this.map.style.imageManager)}},li.prototype.getIds=function(){return ot.values(this._tiles).map(function(t){return t.tileID}).sort(ui).map(function(t){return t.key})},li.prototype.getRenderableIds=function(t){var e,n=this,i=[];for(e in this._tiles)this._isIdRenderable(e,t)&&i.push(this._tiles[e]);return t?i.sort(function(t,e){var i=t.tileID,r=e.tileID,t=new ot.Point(i.canonical.x,i.canonical.y)._rotate(n.transform.angle),e=new ot.Point(r.canonical.x,r.canonical.y)._rotate(n.transform.angle);return i.overscaledZ-r.overscaledZ||e.y-t.y||e.x-t.x}).map(function(t){return t.tileID.key}):i.map(function(t){return t.tileID}).sort(ui).map(function(t){return t.key})},li.prototype.hasRenderableParent=function(t){t=this.findLoadedParent(t,0);return!!t&&this._isIdRenderable(t.tileID.key)},li.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},li.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},li.prototype._reloadTile=function(t,e){var i=this._tiles[t];i&&("loading"!==i.state&&(i.state=e),this._loadTile(i,this._tileLoaded.bind(this,i,t,e)))},li.prototype._tileLoaded=function(t,e,i,r){if(r)return t.state="errored",void(404!==r.status?this._source.fire(new ot.ErrorEvent(r,{tile:t})):this.update(this.transform));t.timeAdded=ot.browser.now(),"expired"===i&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),"raster-dem"===this.getSource().type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),this._source.fire(new ot.Event("data",{dataType:"source",tile:t,coord:t.tileID}))},li.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),i=0;i<e.length;i++){var r=e[i];t.neighboringTiles&&t.neighboringTiles[r]&&(n(t,r=this.getTileByID(r)),n(r,t))}function n(t,e){t.needsHillshadePrepare=!0;var i=e.tileID.canonical.x-t.tileID.canonical.x,r=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===i&&0==r||1<Math.abs(r)||(1<Math.abs(i)&&(1===Math.abs(i+n)?i+=n:1===Math.abs(i-n)&&(i-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,i,r),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},li.prototype.getTile=function(t){return this.getTileByID(t.key)},li.prototype.getTileByID=function(t){return this._tiles[t]},li.prototype._retainLoadedChildren=function(t,e,i,r){for(var n in this._tiles){var o=this._tiles[n];if(!(r[n]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>i)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){r[a.key]=a;break}}}},li.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var i=this._loadedParentTiles[t.key];return i&&i.tileID.overscaledZ>=e?i:null}for(var r=t.overscaledZ-1;e<=r;r--){var n=t.scaledTo(r),n=this._getLoadedTile(n);if(n)return n}},li.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},li.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,t=Math.ceil(t.height/this._source.tileSize)+1,t=Math.floor(e*t*5),t="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,t):t;this._cache.setMaxSize(t)},li.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var i,r,n,o={};for(i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),o[a.tileID.key]=a}for(r in this._tiles=o,this._timers)clearTimeout(this._timers[r]),delete this._timers[r];for(n in this._tiles)this._setTileReloadTimer(n,this._tiles[n])}},li.prototype.update=function(t){var e,i=this;if(this.transform=t,this._sourceLoaded&&!this._paused){this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?e=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(t){return new ot.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)}):(e=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(e=e.filter(function(t){return i._source.hasTile(t)}))):e=[];var r,n=t.coveringZoomLevel(this._source),o=Math.max(n-li.maxOverzooming,this._source.minzoom),t=Math.max(n+li.maxUnderzooming,this._source.minzoom),a=this._updateRetainedTiles(e,n);if(ci(this._source.type)){for(var s,l={},u={},c=0,p=Object.keys(a);c<p.length;c+=1){var h=p[c],f=a[h],d=this._tiles[h];!d||d.fadeEndTime&&d.fadeEndTime<=ot.browser.now()||((d=this.findLoadedParent(f,o))&&(this._addTile(d.tileID),l[d.tileID.key]=d.tileID),u[h]=f)}for(s in this._retainLoadedChildren(u,n,t,a),l)a[s]||(this._coveredTiles[s]=!0,a[s]=l[s])}for(r in a)this._tiles[r].clearFadeHold();for(var m=0,y=ot.keysDifference(this._tiles,a);m<y.length;m+=1){var _=y[m],g=this._tiles[_];g.hasSymbolBuckets&&!g.holdingForFade()?g.setHoldDuration(this.map._fadeDuration):g.hasSymbolBuckets&&!g.symbolFadeFinished()||this._removeTile(_)}this._updateLoadedParentTileCache()}},li.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},li.prototype._updateRetainedTiles=function(t,e){for(var i={},r={},n=Math.max(e-li.maxOverzooming,this._source.minzoom),o=Math.max(e+li.maxUnderzooming,this._source.minzoom),a={},s=0,l=t;s<l.length;s+=1){var u=l[s],c=this._addTile(u);i[u.key]=u,c.hasData()||e<this._source.maxzoom&&(a[u.key]=u)}this._retainLoadedChildren(a,e,o,i);for(var p=0,h=t;p<h.length;p+=1){var f=h[p],d=this._tiles[f.key];
1if(!d.hasData()){if(e+1>this._source.maxzoom){var m=f.children(this._source.maxzoom)[0],y=this.getTile(m);if(y&&y.hasData()){i[m.key]=m;continue}}else{m=f.children(this._source.maxzoom);if(i[m[0].key]&&i[m[1].key]&&i[m[2].key]&&i[m[3].key])continue}for(var _=d.wasRequested(),g=f.overscaledZ-1;n<=g;--g){var v=f.scaledTo(g);if(r[v.key])break;if(r[v.key]=!0,!(d=this.getTile(v))&&_&&(d=this._addTile(v)),d&&(i[v.key]=v,_=d.wasRequested(),d.hasData()))break}}}return i},li.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],i=void 0,r=this._tiles[t].tileID;0<r.overscaledZ;){if(r.key in this._loadedParentTiles){i=this._loadedParentTiles[r.key];break}e.push(r.key);var n=r.scaledTo(r.overscaledZ-1);if(i=this._getLoadedTile(n))break;r=n}for(var o=0,a=e;o<a.length;o+=1)this._loadedParentTiles[a[o]]=i}},li.prototype._addTile=function(t){var e=this._tiles[t.key];if(e)return e;(e=this._cache.getAndRemove(t))&&(this._setTileReloadTimer(t.key,e),e.tileID=t,this._state.initializeTileState(e,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,e)));var i=Boolean(e);return i||(e=new ot.Tile(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(e,this._tileLoaded.bind(this,e,t.key,e.state))),e?(e.uses++,this._tiles[t.key]=e,i||this._source.fire(new ot.Event("dataloading",{tile:e,coord:e.tileID,dataType:"source"})),e):null},li.prototype._setTileReloadTimer=function(t,e){var i=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);e=e.getExpiryTimeout();e&&(this._timers[t]=setTimeout(function(){i._reloadTile(t,"expired"),delete i._timers[t]},e))},li.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),0<e.uses||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},li.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},li.prototype.tilesIn=function(t,o,e){var a=this,s=[],l=this.transform;if(!l)return s;for(var e=e?l.getCameraQueryGeometry(t):t,u=t.map(function(t){return l.pointCoordinate(t)}),c=e.map(function(t){return l.pointCoordinate(t)}),p=this.getIds(),h=1/0,f=1/0,d=-1/0,m=-1/0,i=0,r=c;i<r.length;i+=1)var n=r[i],h=Math.min(h,n.x),f=Math.min(f,n.y),d=Math.max(d,n.x),m=Math.max(m,n.y);for(var y=0;y<p.length;y++)!function(t){var e,i,r,n=a._tiles[p[t]];n.holdingForFade()||(e=n.tileID,i=Math.pow(2,l.zoom-n.tileID.overscaledZ),r=o*n.queryPadding*ot.EXTENT/n.tileSize/i,(t=[e.getTilePoint(new ot.MercatorCoordinate(h,f)),e.getTilePoint(new ot.MercatorCoordinate(d,m))])[0].x-r<ot.EXTENT&&t[0].y-r<ot.EXTENT&&0<=t[1].x+r&&0<=t[1].y+r&&(t=u.map(function(t){return e.getTilePoint(t)}),r=c.map(function(t){return e.getTilePoint(t)}),s.push({tile:n,tileID:e,queryGeometry:t,cameraQueryGeometry:r,scale:i})))}(y);return s},li.prototype.getVisibleCoordinates=function(t){for(var e=this,t=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),i=0,r=t;i<r.length;i+=1){var n=r[i];n.posMatrix=this.transform.calculatePosMatrix(n.toUnwrapped())}return t},li.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ci(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=ot.browser.now())return!0}return!1},li.prototype.setFeatureState=function(t,e,i){this._state.updateState(t=t||"_geojsonTileLayer",e,i)},li.prototype.removeFeatureState=function(t,e,i){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,i)},li.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},li.prototype.setDependencies=function(t,e,i){t=this._tiles[t];t&&t.setDependencies(e,i)},li.prototype.reloadTilesForDependencies=function(e,i){for(var t in this._tiles)this._tiles[t].hasDependency(e,i)&&this._reloadTile(t,"reloading");this._cache.filter(function(t){return!t.hasDependency(e,i)})},li);function li(t,i,r){var e=this;ai.call(this),this.id=t,this.dispatcher=r,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(e._sourceLoaded=!0),e._sourceLoaded&&!e._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(e.reload(),e.transform&&e.update(e.transform))}),this.on("error",function(){e._sourceErrored=!0}),this._source=function(t,e){e=new Z[i.type](t,i,r,e);if(e.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+e.id);return ot.bindAll(["load","abort","unload","serialize","prepare"],e),e}(t,this),this._tiles={},this._cache=new tt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={}
vendor: 4,718 bytes, line 1
1,this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ot.SourceFeatureState}function ui(t,e){var i=Math.abs(2*t.wrap)-(t.wrap<0),r=Math.abs(2*e.wrap)-(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-i||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function ci(t){return"raster"===t||"image"===t||"video"===t}function pi(){return new ot.window.Worker(ra.workerUrl)}si.maxOverzooming=10,si.maxUnderzooming=3;var hi="mapboxgl_preloaded_worker_pool",fi=function(){this.active={}};fi.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<fi.workerCount;)this.workers.push(new pi);return this.active[t]=!0,this.workers.slice()},fi.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},fi.prototype.isPreloaded=function(){return!!this.active[hi]},fi.prototype.numActive=function(){return Object.keys(this.active).length};var di,mi=Math.floor(ot.browser.hardwareConcurrency/2);function yi(){return di=di||new fi}function _i(t){t=t.slice();for(var e=Object.create(null),i=0;i<t.length;i++)e[t[i].id]=t[i];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=function(t,e){var i,r={};for(i in t)"ref"!==i&&(r[i]=t[i]);return ot.refProperties.forEach(function(t){t in e&&(r[t]=e[t])}),r}(t[r],e[t[r].ref]));return t}fi.workerCount=Math.max(Math.min(mi,6),1);var gi={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 vi(t,e,i){i.push({command:gi.addSource,args:[t,e[t]]})}function xi(t,e,i){e.push({command:gi.removeSource,args:[t]}),i[t]=!0}function bi(t,e,i,r,n,o){for(var a in e=e||{},t=t||{})t.hasOwnProperty(a)&&(ot.deepEqual(t[a],e[a])||i.push({command:o,args:[r,a,e[a],n]}));for(a in e)e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(ot.deepEqual(t[a],e[a])||i.push({command:o,args:[r,a,e[a],n]}))}function wi(t){return t.id}function Si(t,e){return t[e.id]=e,t}function Ti(t,e){this.reset(t,e)}Ti.prototype.reset=function(t,e){this.points=t||[],this._distances=[0];for(var i=1;i<this.points.length;i++)this._distances[i]=this._distances[i-1]+this.points[i].dist(this.points[i-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Ti.prototype.lerp=function(t){if(1===this.points.length)return this.points[0];t=ot.clamp(t,0,1);for(var e=1,i=this._distances[e],r=t*this.paddedLength+this.padding;i<r&&e<this._distances.length;)i=this._distances[++e];var n=e-1,o=this._distances[n],t=i-o,t=0<t?(r-o)/t:0;return this.points[n].mult(1-t).add(this.points[e].mult(t))};function Ii(t,e,i){var r=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/i),this.yCellCount=Math.ceil(e/i);for(var o=0;o<this.xCellCount*this.yCellCount;o++)r.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0}function Ei(t,e,i,r,n){var o=ot.create();return e?(ot.scale(o,o,[1/n,1/n,1]),i||ot.rotateZ(o,o,r.angle)):ot.multiply(o,r.labelPlaneMatrix,t),o}function Ai(t,e,i,r,n){if(e){t=ot.clone(t);return ot.scale(t,t,[n,n,1]),i||ot.rotateZ(t,t,-r.angle),t}return r.glCoordMatrix}function zi(t,e){t=[t.x,t.y,0,1];Fi(t,t,e);e=t[3];return{point:new ot.Point(t[0]/e,t[1]/e),signedDistanceFromCamera:e}}function Pi(t,e){return.5+t/e*.5}function Ci(t,e,i,r,n,o,a,s,l,u,c){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),p=e.getoffsetX(p-1),d=Li(t*d,i,r,n,o,a,s.segment,h,f,l,u,c);if(!d)return null;c=Li(t*p,i,r,n,o,a,s.segment,h,f,l,u,c);return c?{first:d,last:c}:null}function ki(t,e,i,r){return t===ot.WritingMode.horizontal&&Math.abs(i.y-e.y)>Math.abs(i.x-e.x)*r?{useVertical:!0}:(t===ot.WritingMode.vertical?e.y<i.y:e.x>i.x)?{needsFlipping:!0}:null}function Mi(t,e,i,r,n,o,a,s,l,u,c,p,h,f){var d,m=e/24,y=t.lineOffsetX*m,_=t.lineOffsetY*m;if(1<t.numGlyphs){var g=t.glyphStartIndex+t.numGlyphs,v=t.lineStartIndex,x=t.lineStartIndex+t.lineLength,b=Ci(m,s,y,_,i,c,p,t,l,o,h);if(!b)return{notEnoughRoom:!0};e=zi(b.first.point,a).point,a=zi(b.last.point,a).point;if(r&&!i){a=ki(t.writingMode,e,a,f);
1if(a)return a}d=[b.first];for(var w=t.glyphStartIndex+1;w<g-1;w++)d.push(Li(m*s.getoffsetX(w),y,_,i,c,p,t.segment,v,x,l,o,h));d.push(b.last)}else{if(r&&!i){var b=zi(p,n).point,r=t.lineStartIndex+t.segment+1,S=new ot.Point(l.getx(r),l.gety(r)),r=zi(S,n),S=0<r.signedDistanceFromCamera?r.point:Di(p,S,b,1,n),S=ki(t.writingMode,b,S,f);if(S)return S}S=Li(m*s.getoffsetX(t.glyphStartIndex),y,_,i,c,p,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,l,o,h);if(!S)return{notEnoughRoom:!0};d=[S]}for(var T=0,I=d;T<I.length;T+=1){var E=I[T];ot.addDynamicAttributes(u,E.point,E.angle)}return{}}function Di(t,e,i,r,n){n=zi(t.add(t.sub(e)._unit()),n).point,n=i.sub(n);return i.add(n._mult(r/n.mag()))}function Li(t,e,i,r,n,o,a,s,l,u,c,p){var t=r?t-e:t+e,h=0<t?1:-1,e=0;r&&(h*=-1,e=Math.PI),h<0&&(e+=Math.PI);for(var f=0<h?s+a:s+a+1,d=n,m=n,y=0,_=0,g=Math.abs(t),v=[];y+_<=g;){if((f+=h)<s||l<=f)return null;var x,b,m=d;v.push(d),void 0===(d=p[f])&&(d=0<(b=zi(x=new ot.Point(u.getx(f),u.gety(f)),c)).signedDistanceFromCamera?p[f]=b.point:(b=f-h,Di(0===y?o:new ot.Point(u.getx(b),u.gety(b)),x,m,g-y+1,c))),y+=_,_=m.dist(d)}n=(g-y)/_,t=d.sub(m),n=t.mult(n)._add(m);n._add(t._unit()._perp()._mult(i*h));e+=Math.atan2(d.y-m.y,d.x-m.x);return v.push(n),{point:n,angle:e,path:v}}Ii.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Ii.prototype.insert=function(t,e,i,r,n){this._forEachCell(e,i,r,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(i),this.bboxes.push(r),this.bboxes.push(n)},Ii.prototype.insertCircle=function(t,e,i,r){this._forEachCell(e-r,i-r,e+r,i+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(i),this.circles.push(r)},Ii.prototype._insertBoxCell=function(t,e,i,r,n,o){this.boxCells[n].push(o)},Ii.prototype._insertCircleCell=function(t,e,i,r,n,o){this.circleCells[n].push(o)},Ii.prototype._query=function(t,e,i,r,n,o){if(i<0||t>this.width||r<0||e>this.height)return!n&&[];var a=[];if(t<=0&&e<=0&&this.width<=i&&this.height<=r){if(n)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],p=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-p,y1:c-p,x2:u+p,y2:c+p})}return o?a.filter(o):a}return this._forEachCell(t,e,i,r,this._queryCell,a,{hitTest:n,seenUids:{box:{},circle:{}}},o),n?0<a.length:a},Ii.prototype._queryCircle=function(t,e,i,r,n){var o=t-i,a=t+i,s=e-i,l=e+i;if(a<0||o>this.width||l<0||s>this.height)return!r&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:r,circle:{x:t,y:e,radiu
1s:i},seenUids:{box:{},circle:{}}},n),r?0<u.length:u},Ii.prototype.query=function(t,e,i,r,n){return this._query(t,e,i,r,!1,n)},Ii.prototype.hitTest=function(t,e,i,r,n){return this._query(t,e,i,r,!0,n)},Ii.prototype.hitTestCircle=function(t,e,i,r){return this._queryCircle(t,e,i,!0,r)},Ii.prototype._queryCell=function(t,e,i,r,n,o,a,s){var l=a.seenUids,u=this.boxCells[n];if(null!==u)for(var c=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[2+d]&&e<=c[3+d]&&i>=c[0+d]&&r>=c[1+d]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[1+d],x2:c[2+d],y2:c[3+d]})}}}n=this.circleCells[n];if(null!==n)for(var m=this.circles,y=0,_=n;y<_.length;y+=1){var g=_[y];if(!l.circle[g]){l.circle[g]=!0;var v=3*g;if(this._circleAndRectCollide(m[v],m[1+v],m[2+v],t,e,i,r)&&(!s||s(this.circleKeys[g]))){if(a.hitTest)return o.push(!0),!0;var x=m[v],b=m[1+v],v=m[2+v];o.push({key:this.circleKeys[g],x1:x-v,y1:b-v,x2:x+v,y2:b+v})}}}},Ii.prototype._queryCellCircle=function(t,e,i,r,n,o,a,s){var l=a.circle,u=a.seenUids,a=this.boxCells[n];if(null!==a)for(var c=this.bboxes,p=0,h=a;p<h.length;p+=1){var f=h[p];if(!u.box[f]){u.box[f]=!0;var d=4*f;if(this._circleAndRectCollide(l.x,l.y,l.radius,c[0+d],c[1+d],c[2+d],c[3+d])&&(!s||s(this.boxKeys[f])))return o.push(!0),!0}}n=this.circleCells[n];if(null!==n)for(var m=this.circles,y=0,_=n;y<_.length;y+=1){var g=_[y];if(!u.circle[g]){u.circle[g]=!0;var v=3*g;if(this._circlesCollide(m[v],m[1+v],m[2+v],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[g])))return o.push(!0),!0}}},Ii.prototype._forEachCell=function(t,e,i,r,n,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(i),p=this._convertToYCellCoord(r),h=l;h<=c;h++)for(var f=u;f<=p;f++)if(n.call(this,t,e,i,r,this.xCellCount*f+h,o,a,s))return},Ii.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Ii.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Ii.prototype._circlesCollide=function(t,e,i,r,n,o){t=r-t,e=n-e,o=i+o;return t*t+e*e<o*o},Ii.prototype._circleAndRectCollide=function(t,e,i,r,n,o,a){o=(o-r)/2,r=Math.abs(t-(r+o));if(o+i<r)return!1;a=(a-n)/2,n=Math.abs(e-(n+a));if(a+i<n)return!1;if(r<=o||n<=a)return!0;o=r-o,a=n-a;return o*o+a*a<=i*i};var Bi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ri(t,e){for(var i=0;i<t;i++){var r=e.length;e.resize(r+4),e.float32.set(Bi,3*r)}}function Fi(t,e,i){var r=e[0],e=e[1];return t[0]=i[0]*r+i[4]*e+i[12],t[1]=i[1]*r+i[5]*e+i[13],t[3]=i[3]*r+i[7]*e+i[15],t}function Oi(t,e,i){void 0===e&&(e=new Ii(t.width+200,t.height+200,25)),void 0===i&&(i=new Ii(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=i,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200}
1function Ui(t,e,i){return e*(ot.EXTENT/(t.tileSize*Math.pow(2,i-t.tileID.overscaledZ)))}Oi.prototype.placeCollisionBox=function(t,e,i,r,n){var o=this.projectAndGetPerspectiveRatio(r,t.anchorPointX,t.anchorPointY),a=i*o.perspectiveRatio,s=t.x1*a+o.point.x,r=t.y1*a+o.point.y,i=t.x2*a+o.point.x,o=t.y2*a+o.point.y;return!this.isInsideGrid(s,r,i,o)||!e&&this.grid.hitTest(s,r,i,o,n)?{box:[],offscreen:!1}:{box:[s,r,i,o],offscreen:this.isOffscreen(s,r,i,o)}},Oi.prototype.placeCollisionCircles=function(t,e,i,r,n,o,a,s,l,u,c,p,h){var f=[],d=new ot.Point(e.anchorX,e.anchorY),o=zi(d,o),o=Pi(this.transform.cameraToCenterDistance,o.signedDistanceFromCamera),u=(u?n/o:n*o)/ot.ONE_EM,n=zi(d,a).point,a=Ci(u,r,e.lineOffsetX*u,e.lineOffsetY*u,!1,n,d,e,i,a,{}),m=!1,y=!1,_=!0;if(a){for(var g=.5*p*o+h,o=new ot.Point(-100,-100),h=new ot.Point(this.screenRightBoundary,this.screenBottomBoundary),v=new Ti,x=a.first,b=a.last,w=[],S=x.path.length-1;1<=S;S--)w.push(x.path[S]);for(var T=1;T<b.path.length;T++)w.push(b.path[T]);var I=2.5*g;s&&(w=(E=w.map(function(t){return zi(t,s)})).some(function(t){return t.signedDistanceFromCamera<=0})?[]:E.map(function(t){return t.point}));var E=[];if(0<w.length){for(var A=w[0].clone(),z=w[0].clone(),P=1;P<w.length;P++)A.x=Math.min(A.x,w[P].x),A.y=Math.min(A.y,w[P].y),z.x=Math.max(z.x,w[P].x),z.y=Math.max(z.y,w[P].y);E=A.x>=o.x&&z.x<=h.x&&A.y>=o.y&&z.y<=h.y?[w]:z.x<o.x||A.x>h.x||z.y<o.y||A.y>h.y?[]:ot.clipLine([w],o.x,o.y,h.x,h.y)}for(var C,k=0,M=E;k<M.length;k+=1){v.reset(M[k],.25*g),C=v.length<=.5*g?1:Math.ceil(v.paddedLength/I)+1;for(var D=0;D<C;D++){var L=D/Math.max(C-1,1),B=v.lerp(L),R=B.x+100,F=B.y+100;f.push(R,F,g,0);var O=R-g,U=F-g,L=R+g,B=F+g,_=_&&this.isOffscreen(O,U,L,B),y=y||this.isInsideGrid(O,U,L,B);if(!t&&this.grid.hitTestCircle(R,F,g,c)&&(m=!0,!l))return{circles:[],offscreen:!1,collisionDetected:m}}}}return{circles:!l&&m||!y?[]:f,offscreen:_,collisionDetected:m}},Oi.prototype.queryRenderedSymbols=function(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var e=[],i=1/0,r=1/0,n=-1/0,o=-1/0,a=0,s=t;a<s.length;a+=1){var l=s[a],l=new ot.Point(l.x+100,l.y+100),i=Math.min(i,l.x),r=Math.min(r,l.y),n=Math.max(n,l.x),o=Math.max(o,l.y);e.push(l)}for(var u={},c={},p=0,h=this.grid.query(i,r,n,o).concat(this.ignoredGrid.query(i,r,n,o));p<h.length;p+=1){var f=h[p],d=f.key;void 0===u[d.bucketInstanceId]&&(u[d.bucketInstanceId]={}),u[d.bucketInstanceId][d.featureIndex]||(f=[new ot.Point(f.x1,f.y1),new ot.Point(f.x2,f.y1),new ot.Point(f.x2,f.y2),new ot.Point(f.x1,f.y2)],ot.polygonIntersectsPolygon(e,f)&&(u[d.bucketInstanceId][d.featureIndex]=!0,void 0===c[d.bucketInstanceId]&&(c[d.bucketInstanceId]=[]),c[d.bucketInstanceId].push(d.featureIndex)))}return c},Oi.prototype.insertCollisionBox=function(t,e,i,r,n){(e?this.ignoredGrid:this.grid).insert({bucketInstanceId:i,featureIndex:r,collisionGroupID:n},t[0],t[1],t[2],t[3])},Oi.prototype.insertCollisionCircles=function(t,e,i,r,n){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:i,featureIndex:r,collisionGroupID:n},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},Oi.prototype.projectAndGetPerspectiveRatio=function(t,e,i){i=[e,i,0,1];return Fi(i,i,t),{point:new ot.Point((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},Oi.prototype.isOffscreen=function(t,e,i,r){return i<100||t>=this.screenRightBoundary||r<100||e>this.screenBottomBoundary},Oi.prototype.isInsideGrid=function(t,e,i,r){return 0<=i&&t<this.gridRightBoundary&&0<=r&&e<this.gridBottomBoundary},Oi.prototype.getViewportMatrix=function(){var t=ot.identity([]);return ot.translate(t,t,[-100,-100,0]),t};function Vi(t,e,i,r){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):r&&i?1:0,this.placed=i}Vi.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};function Ni(t,e,i,r,n){this.text=new Vi(t?t.text:null,e,i,n),this.icon=new Vi(t?t.icon:null,e,r,n)}Ni.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};
1function ji(t,e,i){this.text=t,this.icon=e,this.skipFade=i}function qi(){this.invProjMatrix=ot.create(),this.viewportMatrix=ot.create(),this.circles=[]}function Zi(t,e,i,r,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=i,this.bucketIndex=r,this.tileID=n}function Gi(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}function Xi(t,e,i,r,n){var o=ot.getAnchorAlignment(t),e=-(o.horizontalAlign-.5)*e,i=-(o.verticalAlign-.5)*i,r=ot.evaluateVariableOffset(t,r);return new ot.Point(e+r[0]*n,i+r[1]*n)}function Wi(t,e,i,r,n,o){var a=t.x1,s=t.x2,l=t.y1,u=t.y2,c=t.anchorPointX,t=t.anchorPointY,i=new ot.Point(e,i);return r&&i._rotate(n?o:-o),{x1:a+i.x,y1:l+i.y,x2:s+i.x,y2:u+i.y,anchorPointX:c,anchorPointY:t}}Gi.prototype.get=function(t){return this.crossSourceCollisions?{ID:0,predicate:null}:(this.collisionGroups[t]||(e=++this.maxGroupID,this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}),this.collisionGroups[t]);var e};function Ki(t,e,i,r){this.transform=t.clone(),this.collisionIndex=new Oi(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new Gi(i),this.collisionCircleArrays={},(this.prevPlacement=r)&&(r.prevPlacement=void 0),this.placedOrientations={}}function Hi(t,e,i,r,n){t.emplaceBack(e?1:0,i?1:0,r||0,n||0),t.emplaceBack(e?1:0,i?1:0,r||0,n||0),t.emplaceBack(e?1:0,i?1:0,r||0,n||0),t.emplaceBack(e?1:0,i?1:0,r||0,n||0)}Ki.prototype.getBucketParts=function(t,e,i,r){var n=i.getBucket(e),o=i.latestFeatureIndex;if(n&&o&&e.id===n.layerIds[0]){var a=i.collisionBoxArray,s=n.layers[0].layout,l=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),u=i.tileSize/ot.EXTENT,c=this.transform.calculatePosMatrix(i.tileID.toUnwrapped()),p="map"===s.get("text-pitch-alignment"),h="map"===s.get("text-rotation-alignment"),f=Ui(i,1,this.transform.zoom),d=Ei(c,p,h,this.transform,f),e=null;p&&(f=Ai(c,p,h,this.transform,f),e=ot.multiply([],this.transform.labelPlaneMatrix,f)),this.retainedQueryData[n.bucketInstanceId]=new Zi(n.bucketInstanceId,o,n.sourceLayerIndex,n.index,i.tileID);var m={bucket:n,layout:s,posMatrix:c,textLabelPlaneMatrix:d,labelToScreenMatrix:e,scale:l,textPixelRatio:u,holdingForFade:i.holdingForFade(),collisionBoxArray:a,partiallyEvaluatedTextSize:ot.evaluateSizeForZoom(n.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(n.sourceID)};if(r)for(var y=0,_=n.sortKeyRanges;y<_.length;y+=1){var g=_[y];t.push({sortKey:g.sortKey,symbolInstanceStart:g.symbolInstanceStart,symbolInstanceEnd:g.symbolInstanceEnd,parameters:m})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:n.symbolInstances.length,parameters:m})}},Ki.prototype.attemptAnchorPlacement=function(t,e,i,r,n,o,a,s,l,u,c,p,h,f,d){var m,y=[p.textOffset0,p.textOffset1],_=Xi(t,i,r,y,n),e=this.collisionIndex.placeCollisionBox(Wi(e,_.x,_.y,o,a,this.transform.angle),c,s,l,u.predicate);if(!d||0!==this.collisionIndex.placeCollisionBox(Wi(d,_.x,_.y,o,a,this.transform.angle),c,s,l,u.predicate).box.length)return 0<e.box.length?(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(m=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={textOffset:y,width:i,height:r,anchor:t,textBoxScale:n,prevAnchor:m},this.markUsedJustification(h,t,p,f),h.allowVerticalPlacement&&(this.markUsedOrientation(h,f,p),this.placedOrientations[p.crossTileID]=f),{shift:_,placedGlyphBoxes:e}):void 0},Ki.prototype.placeLayerBucketPart=function(t,E,A){var z=this,e=t.parameters,P=e.bucket,C=e.layout,k=e.posMatrix,M=e.textLabelPlaneMatrix,D=e.labelToScreenMatrix,L=e.textPixelRatio,B=e.holdingForFade,i=e.collisionBoxArray,R=e.partiallyEvaluatedTextSize,F=e.collisionGroup,O=C.get("text-optional"),U=C.get("icon-optional"),V=C.get("text-allow-overlap"),N=C.get("icon-allow-overlap"),j="map"===C.get("text-rotation-alignment"),q="map"===C.get("text-pitch-alignment"),Z="none"!==C.get("icon-text-fit"),e="viewport-y"===C.get("symbol-z-order"),G=V&&(N||!P.hasIconData()||U),X=N&&(V||!P.hasTextData()||O);!P.collisionArrays&&i&&P.deserializeCollisionBoxes(i);
1function r(p,n){if(!E[p.crossTileID])if(B)z.placements[p.crossTileID]=new ji(!1,!1,!1);else{var h=!1,t=!1,e=!0,f=null,o={box:null,offscreen:null},a={box:null,offscreen:null},i=null,r=null,s=0,l=0,u=0;n.textFeatureIndex?s=n.textFeatureIndex:p.useRuntimeCollisionCircles&&(s=p.featureIndex),n.verticalTextFeatureIndex&&(l=n.verticalTextFeatureIndex);var d,c,m,y,_,g,v,x,b=n.textBox;b&&(x=function(t){var e=ot.WritingMode.horizontal;return!P.allowVerticalPlacement||t||!z.prevPlacement||(t=z.prevPlacement.placedOrientations[p.crossTileID])&&(z.placedOrientations[p.crossTileID]=t,z.markUsedOrientation(P,e=t,p)),e},v=function(t,e){if(P.allowVerticalPlacement&&0<p.numVerticalGlyphVertices&&n.verticalTextBox)for(var i=0,r=P.writingModes;i<r.length&&(r[i]===ot.WritingMode.vertical?(o=e(),a=o):o=t(),!(o&&o.box&&o.box.length));i+=1);else o=t()},C.get("text-variable-anchor")?(d=C.get("text-variable-anchor"),z.prevPlacement&&z.prevPlacement.variableOffsets[p.crossTileID]&&(c=z.prevPlacement.variableOffsets[p.crossTileID],0<d.indexOf(c.anchor)&&(d=d.filter(function(t){return t!==c.anchor})).unshift(c.anchor)),m=function(t,e,i){for(var r=t.x2-t.x1,n=t.y2-t.y1,o=p.textBoxScale,a=Z&&!N?e:null,s={box:[],offscreen:!1},l=V?2*d.length:d.length,u=0;u<l;++u){var c=z.attemptAnchorPlacement(d[u%d.length],t,r,n,o,j,q,L,k,F,u>=d.length,p,P,i,a);if(c&&(s=c.placedGlyphBoxes)&&s.box&&s.box.length){h=!0,f=c.shift;break}}return s},v(function(){return m(b,n.iconBox,ot.WritingMode.horizontal)},function(){var t=n.verticalTextBox;return P.allowVerticalPlacement&&!(o&&o.box&&o.box.length)&&0<p.numVerticalGlyphVertices&&t?m(t,n.verticalIconBox,ot.WritingMode.vertical):{box:null,offscreen:null}}),o&&(h=o.box,e=o.offscreen),y=x(o&&o.box),h||!z.prevPlacement||(_=z.prevPlacement.variableOffsets[p.crossTileID])&&(z.variableOffsets[p.crossTileID]=_,z.markUsedJustification(P,_.anchor,p,y))):(g=function(t,e){t=z.collisionIndex.placeCollisionBox(t,V,L,k,F.predicate);return t&&t.box&&t.box.length&&(z.markUsedOrientation(P,e,p),z.placedOrientations[p.crossTileID]=e),t},v(function(){return g(b,ot.WritingMode.horizontal)},function(){var t=n.verticalTextBox;return P.allowVerticalPlacement&&0<p.numVerticalGlyphVertices&&t?g(t,ot.WritingMode.vertical):{box:null,offscreen:null}}),x(o&&o.box&&o.box.length))),h=(y=o)&&y.box&&0<y.box.length,e=y&&y.offscreen,p.useRuntimeCollisionCircles&&(v=P.text.placedSymbolArray.get(p.centerJustifiedTextSymbolIndex),x=ot.evaluateSizeForFeature(P.textSizeData,R,v),w=C.get("text-padding"),i=z.collisionIndex.placeCollisionCircles(V,v,P.lineVertexArray,P.glyphOffsetArray,x,k,M,D,A,q,F.predicate,p.collisionCircleDiameter,w),h=V||0<i.circles.length&&!i.collisionDetected,e=e&&i.offscreen),n.iconFeatureIndex&&(u=n.iconFeatureIndex),n.iconBox&&(S=function(t){t=Z&&f?Wi(t,f.x,f.y,j,q,z.transform.angle):t;return z.collisionIndex.placeCollisionBox(t,N,L,k,F.predicate)},t=a&&a.box&&a.box.length&&n.verticalIconBox?0<(r=S(n.verticalIconBox)).box.length:0<(r=S(n.iconBox)).box.length,e=e&&r.offscreen);var w=O||0===p.numHorizontalGlyphVertices&&0===p.numVerticalGlyphVertices,S=U||0===p.numIconVertices;if(w||S?S?w||(t=t&&h):h=t&&h:t=h=t&&h,h&&y&&y.box&&z.collisionIndex.insertCollisionBox(y.box,C.get("text-ignore-placement"),P.bucketInstanceId,a&&a.box&&l?l:s,F.ID),t&&r&&z.collisionIndex.insertCollisionBox(r.box,C.get("icon-ignore-placement"),P.bucketInstanceId,u,F.ID),i&&(h&&z.collisionIndex.insertCollisionCircles(i.circles,C.get("text-ignore-placement"),P.bucketInstanceId,s,F.ID),A)){var s=P.bucketInstanceId,T=z.collisionCircleArrays[s];void 0===T&&(T=z.collisionCircleArrays[s]=new qi);for(var I=0;I<i.circles.length;I+=4)T.circles.push(i.circles[I+0]),T.circles.push(i.circles[I+1]),T.circles.push(i.circles[I+2]),T.circles.push(i.collisionDetected?1:0)}z.placements[p.crossTileID]=new ji(h||G,t||X,e||P.justReloaded),E[p.crossTileID]=!0}}if(e)for(var n=P.getSortedSymbolIndexes(this.transform.angle),o=n.length-1;0<=o;--o){var a=n[o];r(P.symbolInstances.get(a),P.collisionArrays[a])}else for(var s=t.symbolInstanceStart;s<t.symbolInstanceEnd;s++)r(P.symbolInstances.get(s),P.collisionArrays[s]);A&&P.bucketInstanceId in this.collisionCircleArrays&&(e=this.collisionCircleArrays[P.bucketInstanceId],ot.invert(e.invProjMatrix,k),e.viewportMatrix=this.collisionIndex.getViewportMatrix()),P.justReloaded=!1}
1,Ki.prototype.markUsedJustification=function(t,e,i,r){for(var n=r===ot.WritingMode.vertical?i.verticalPlacedTextSymbolIndex:{left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex}[ot.getAnchorJustification(e)],o=0,a=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex];o<a.length;o+=1){var s=a[o];0<=s&&(t.text.placedSymbolArray.get(s).crossTileID=0<=n&&s!==n?0:i.crossTileID)}},Ki.prototype.markUsedOrientation=function(t,e,i){for(var r=e===ot.WritingMode.horizontal||e===ot.WritingMode.horizontalOnly?e:0,e=e===ot.WritingMode.vertical?e:0,n=0,o=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];n<o.length;n+=1)t.text.placedSymbolArray.get(o[n]).placedOrientation=r;i.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=e)},Ki.prototype.commit=function(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;var e=this.prevPlacement,i=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;var r,n,o,a,s=e?e.symbolFadeChange(t):1,l=e?e.opacities:{},u=e?e.variableOffsets:{},c=e?e.placedOrientations:{};for(r in this.placements)var p=this.placements[r],h=l[r],i=h?(this.opacities[r]=new Ni(h,s,p.text,p.icon),i||p.text!==h.text.placed||p.icon!==h.icon.placed):(this.opacities[r]=new Ni(null,s,p.text,p.icon,p.skipFade),i||p.text||p.icon);for(n in l){var f,d=l[n];this.opacities[n]||((f=new Ni(d,s,!1,!1)).isHidden()||(this.opacities[n]=f,i=i||d.text.placed||d.icon.placed))}for(o in u)this.variableOffsets[o]||!this.opacities[o]||this.opacities[o].isHidden()||(this.variableOffsets[o]=u[o]);for(a in c)this.placedOrientations[a]||!this.opacities[a]||this.opacities[a].isHidden()||(this.placedOrientations[a]=c[a]);i?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},Ki.prototype.updateLayerOpacities=function(t,e){for(var i={},r=0,n=e;r<n.length;r+=1){var o=n[r],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,i,o.collisionBoxArray)}},Ki.prototype.updateBucketOpacities=function(f,d,t){var m=this;f.hasTextData()&&f.text.opacityVertexArray.clear(),f.hasIconData()&&f.icon.opacityVertexArray.clear(),f.hasIconCollisionBoxData()&&f.iconCollisionBox.collisionVertexArray.clear(),f.hasTextCollisionBoxData()&&f.textCollisionBox.collisionVertexArray.clear();var e=f.layers[0].layout,y=new Ni(null,0,!1,!1,!0),i=e.get("text-allow-overlap"),r=e.get("icon-allow-overlap"),_=e.get("text-variable-anchor"),g="map"===e.get("text-rotation-alignment"),v="map"===e.get("text-pitch-alignment"),x="none"!==e.get("icon-text-fit"),b=new Ni(null,0,i&&(r||!f.hasIconData()||e.get("icon-optional")),r&&(i||!f.hasTextData()||e.get("text-optional")),!0);!f.collisionArrays&&t&&(f.hasIconCollisionBoxData()||f.hasTextCollisionBoxData())&&f.deserializeCollisionBoxes(t);for(var w=function(t,e,i){for(var r=0;r<e/4;r++)t.opacityVertexArray.emplaceBack(i)},n=0;n<f.symbolInstances.length;n++)!function(t){var e=f.symbolInstances.get(t),i=e.numHorizontalGlyphVertices,r=e.numVerticalGlyphVertices,n=e.crossTileID,o=m.opacities[n];d[n]?o=y:o||(m.opacities[n]=o=b),d[n]=!0;var a,s,l,u=0<e.numIconVertices,c=m.placedOrientations[e.crossTileID],p=c===ot.WritingMode.vertical,h=c===ot.WritingMode.horizontal||c===ot.WritingMode.horizontalOnly;(0<i||0<r)&&(s=rr(o.text),w(f.text,i,p?or:s),w(f.text,r,h?or:s),a=o.text.isHidden(),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach(function(t){0<=t&&(f.text.placedSymbolArray.get(t).hidden=a||p?1:0)}),0<=e.verticalPlacedTextSymbolIndex&&(f.text.placedSymbolArray.get(e.verticalPlacedTextSymbolIndex).hidden=a||h?1:0),(s=m.variableOffsets[e.crossTileID])&&m.markUsedJustification(f,s.anchor,e,c),(c=m.placedOrientations[e.crossTileID])&&(m.markUsedJustification(f,"left",e,c),m.markUsedOrientation(f,c,e))),u&&(l=rr(o.icon),u=!(x&&e.verticalPlacedIconSymbolIndex&&p),0<=e.placedIconSymbolIndex&&(w(f.icon,e.numIconVertices,u?l:or),f.icon.placedSymbolArray.get(e.placedIconSymbolIndex).hidden=o.icon.isHidden()),0<=e.verticalPlacedIconSymbolIndex&&(w(f.icon,e.numVerticalIconVertices,u?or:l),f.icon.placedSymbolArray.get(e.verticalPlacedIconSymbolIndex).hidden=o.icon.isHidden())),!f.hasIconCollisionBoxData()&&!f.hasTextCollisionBoxData()||(l=f.collisionArrays[t])&&(e=new ot.Point(0,0),(l.textBox||l.verticalTextBox)&&(t=!0,_&&((n=m.variableOffsets[n])?(e=Xi(n.anchor,
vendor: 4,115 bytes, line 1
1n.width,n.height,n.textOffset,n.textBoxScale),g&&e._rotate(v?m.transform.angle:-m.transform.angle)):t=!1),l.textBox&&Hi(f.textCollisionBox.collisionVertexArray,o.text.placed,!t||p,e.x,e.y),l.verticalTextBox&&Hi(f.textCollisionBox.collisionVertexArray,o.text.placed,!t||h,e.x,e.y)),h=Boolean(!h&&l.verticalIconBox),l.iconBox&&Hi(f.iconCollisionBox.collisionVertexArray,o.icon.placed,h,x?e.x:0,x?e.y:0),l.verticalIconBox&&Hi(f.iconCollisionBox.collisionVertexArray,o.icon.placed,!h,x?e.x:0,x?e.y:0))}(n);f.sortFeatures(this.transform.angle),this.retainedQueryData[f.bucketInstanceId]&&(this.retainedQueryData[f.bucketInstanceId].featureSortOrder=f.featureSortOrder),f.hasTextData()&&f.text.opacityVertexBuffer&&f.text.opacityVertexBuffer.updateData(f.text.opacityVertexArray),f.hasIconData()&&f.icon.opacityVertexBuffer&&f.icon.opacityVertexBuffer.updateData(f.icon.opacityVertexArray),f.hasIconCollisionBoxData()&&f.iconCollisionBox.collisionVertexBuffer&&f.iconCollisionBox.collisionVertexBuffer.updateData(f.iconCollisionBox.collisionVertexArray),f.hasTextCollisionBoxData()&&f.textCollisionBox.collisionVertexBuffer&&f.textCollisionBox.collisionVertexBuffer.updateData(f.textCollisionBox.collisionVertexArray),f.bucketInstanceId in this.collisionCircleArrays&&(t=this.collisionCircleArrays[f.bucketInstanceId],f.placementInvProjMatrix=t.invProjMatrix,f.placementViewportMatrix=t.viewportMatrix,f.collisionCircleArray=t.circles,delete this.collisionCircleArrays[f.bucketInstanceId])},Ki.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Ki.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},Ki.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},Ki.prototype.stillRecent=function(t,e){var i=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*i>t},Ki.prototype.setStale=function(){this.stale=!0};var Ji=Math.pow(2,25),Yi=Math.pow(2,24),Qi=Math.pow(2,17),$i=Math.pow(2,16),tr=Math.pow(2,9),er=Math.pow(2,8),ir=Math.pow(2,1);function rr(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,t=Math.floor(127*t.opacity);return t*Ji+e*Yi+t*Qi+e*$i+t*tr+e*er+t*ir+e}function nr(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}var or=0;nr.prototype.continuePlacement=function(t,e,i,r,n){for(var o=this._bucketParts;this._currentTileIndex<t.length;)if(e.getBucketParts(o,r,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,n())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort(function(t,e){return t.sortKey-e.sortKey}));this._currentPartIndex<o.length;)if(e.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,i),this._currentPartIndex++,n())return!0;return!1};function ar(t,e,i,r,n,o,a){this.placement=new Ki(t,n,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=r,this._done=!1}ar.prototype.isDone=function(){return this._done},ar.prototype.continuePlacement=function(t,e,i){for(var r=this,n=ot.browser.now(),o=function(){var t=ot.browser.now()-n;return!r._forceFullPlacement&&2<t};0<=this._currentPlacementIndex;){var a=e[t[this._currentPlacementIndex]],s=this.placement.collisionIndex.transform.zoom;if("symbol"===a.type&&(!a.minzoom||a.minzoom<=s)&&(!a.maxzoom||a.maxzoom>s)){if(this._inProgressLayer||(this._inProgressLayer=new nr(a)),this._inProgressLayer.continuePlacement(i[a.source],this.placement,this._showCollisionBoxes,a,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ar.prototype.commit=function(t){return this.placement.commit(t),this.placement};function sr(t,e,i){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=i;for(var r=0;r<e.length;r++){var n=e.get(r),o=n.key;
1this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}}var lr=512/ot.EXTENT/2;sr.prototype.getScaledCoordinates=function(t,e){var i=lr/Math.pow(2,e.canonical.z-this.tileID.canonical.z);return{x:Math.floor((e.canonical.x*ot.EXTENT+t.anchorX)*i),y:Math.floor((e.canonical.y*ot.EXTENT+t.anchorY)*i)}},sr.prototype.findMatches=function(t,e,i){for(var r=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),n=0;n<t.length;n++){var o=t.get(n);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),l=0,u=a;l<u.length;l+=1){var c=u[l];if(Math.abs(c.coord.x-s.x)<=r&&Math.abs(c.coord.y-s.y)<=r&&!i[c.crossTileID]){i[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};function ur(){this.maxCrossTileID=0}ur.prototype.generate=function(){return++this.maxCrossTileID};function cr(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}cr.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var i in this.indexes){var r,n=this.indexes[i],o={};for(r in n){var a=n[r];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),o[a.tileID.key]=a}this.indexes[i]=o}this.lng=t},cr.prototype.addBucket=function(t,e,i){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var r=0;r<e.symbolInstances.length;r++)e.symbolInstances.get(r).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var n,o=this.usedCrossTileIDs[t.overscaledZ];for(n in this.indexes){var a=this.indexes[n];if(Number(n)>t.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,o)}else{var u=a[t.scaledTo(Number(n)).key];u&&u.findMatches(e.symbolInstances,t,o)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=i.generate(),o[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new sr(t,e.symbolInstances,e.bucketInstanceId),!0},cr.prototype.removeBucketCrossTileIDs=function(t,e){for(var i in e.indexedSymbolInstances)for(var r=0,n=e.indexedSymbolInstances[i];r<n.length;r+=1)delete this.usedCrossTileIDs[t][n[r].crossTileID]},cr.prototype.removeStaleBuckets=function(t){var e,i=!1;for(e in this.indexes){var r,n=this.indexes[e];for(r in n)t[n[r].bucketInstanceId]||(this.removeBucketCrossTileIDs(e,n[r]),delete n[r],i=!0)}return i};var pr=function(){this.layerIndexes={},this.crossTileIDs=new ur,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};pr.prototype.addLayer=function(t,e,i){var r=this.layerIndexes[t.id];void 0===r&&(r=this.layerIndexes[t.id]=new cr);var n=!1,o={};r.handleWrapJump(i);for(var a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(l.tileID,u,this.crossTileIDs)&&(n=!0),o[u.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(n=!0),n},pr.prototype.pruneUnusedLayers=function(t){var e,i={};for(e in t.forEach(function(t){i[t]=!0}),this.layerIndexes)i[e]||delete this.layerIndexes[e]};function hr(t,e){return ot.emitValidationErrors(t,e&&e.filter(function(t){return"source.canvas"!==t.identifier}))}var fr,dr=ot.pick(gi,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),mr=ot.pick(gi,["setCenter","setZoom","setBearing","setPitch"]),yr=function(){var t,e={},i=ot.styleSpec.$version;for(t in ot.styleSpec.$root){var r,n=ot.styleSpec.$root[t];n.required&&null!=(r="version"===t?i:"array"===n.type?[]:{})&&(e[t]=r)}return e}(),_r=((fr=ot.Evented)&&(gr.__proto__=fr),((gr.prototype=Object.create(fr&&fr.prototype)).constructor=gr).prototype.loadURL=function(t,e){var i=this;void 0===e&&(e={}
1),this.fire(new ot.Event("dataloading",{dataType:"style"}));var r="boolean"==typeof e.validate?e.validate:!ot.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,e.accessToken);t=this.map._requestManager.transformRequest(t,ot.ResourceType.Style);this._request=ot.getJSON(t,function(t,e){i._request=null,t?i.fire(new ot.ErrorEvent(t)):e&&i._load(e,r)})},gr.prototype.loadJSON=function(t,e){var i=this;void 0===e&&(e={}),this.fire(new ot.Event("dataloading",{dataType:"style"})),this._request=ot.browser.frame(function(){i._request=null,i._load(t,!1!==e.validate)})},gr.prototype.loadEmpty=function(){this.fire(new ot.Event("dataloading",{dataType:"style"})),this._load(yr,!1)},gr.prototype._load=function(t,e){if(!e||!hr(this,ot.validateStyle(t))){for(var i in this._loaded=!0,(this.stylesheet=t).sources)this.addSource(i,t.sources[i],{validate:!1});t.sprite?this._loadSprite(t.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);e=_i(this.stylesheet.layers);this._order=e.map(function(t){return t.id}),this._layers={},this._serializedLayers={};for(var r=0,n=e;r<n.length;r+=1){var o=n[r];(o=ot.createStyleLayer(o)).setEventedParent(this,{layer:{id:o.id}}),this._layers[o.id]=o,this._serializedLayers[o.id]=o.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new S(this.stylesheet.light),this.fire(new ot.Event("data",{dataType:"style"})),this.fire(new ot.Event("style.load"))}},gr.prototype._loadSprite=function(t){var e,i,f,d,m,y,r,n,o=this;function a(){if(y)f(y);else if(d&&m){var t,e=ot.browser.getImageData(m),i={};for(t in d){var r=d[t],n=r.width,o=r.height,a=r.x,s=r.y,l=r.sdf,u=r.pixelRatio,c=r.stretchX,p=r.stretchY,h=r.content,r=new ot.RGBAImage({width:n,height:o});ot.RGBAImage.copy(e,r,{x:a,y:s},{x:0,y:0},{width:n,height:o}),i[t]={data:r,pixelRatio:u,sdf:l,stretchX:c,stretchY:p,content:h}}f(null,i)}}this._spriteRequest=(e=t,i=this.map._requestManager,f=function(t,e){if(o._spriteRequest=null,t)o.fire(new ot.ErrorEvent(t));else if(e)for(var i in e)o.imageManager.addImage(i,e[i]);o.imageManager.setLoaded(!0),o._availableImages=o.imageManager.listImages(),o.dispatcher.broadcast("setImages",o._availableImages),o.fire(new ot.Event("data",{dataType:"style"}))},t=1<ot.browser.devicePixelRatio?"@2x":"",r=ot.getJSON(i.transformRequest(i.normalizeSpriteURL(e,t,".json"),ot.ResourceType.SpriteJSON),function(t,e){r=null,y||(y=t,d=e,a())}),n=ot.getImage(i.transformRequest(i.normalizeSpriteURL(e,t,".png"),ot.ResourceType.SpriteImage),function(t,e){n=null,y||(y=t,m=e,a())}),{cancel:function(){r&&(r.cancel(),r=null),n&&(n.cancel(),n=null)}})},gr.prototype._validateLayer=function(t){var e,i=this.sourceCaches[t.source];i&&(!(e=t.sourceLayer)||("geojson"===(i=i.getSource()).type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(e))&&this.fire(new ot.ErrorEvent(new Error('Source layer "'+e+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"'))))},gr.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},gr.prototype._serializeLayers=function(t){for(var e=[],i=0,r=t;i<r.length;i+=1){var n=this._layers[r[i]];"custom"!==n.type&&e.push(n.serialize())}return e},gr.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},gr.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},gr.prototype.update=function(t){if(this._loaded){var e=this._changed;if(this._changed){var i,r,n=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);for(i in(n.length||o.length)&&this._updateWorkerLayers(n,o),this._updatedSources){var a=this._updatedSources[i];"reload"===a?this._reloadSource(i):"clear"===a&&this._clearSource(i)}for(r in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[r].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}var s,l={};for(s in this.sourceCaches){var u=this.sourceCaches[s];l[s]=u.used,u.used=!1}for(var c,p=0,h=this._order;p<h.length;p+=1){var f=this._layers[h[p]];f.recalculate(t,this._availableImages),!f.isHidden(t.zoom)&&f.source&&(this.sourceCaches[f.source].used=!0)}for(c in l){var d=this.sourceCaches[c];
vendor: 4,509 bytes, line 1
1l[c]!==d.used&&d.fire(new ot.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:c}))}this.light.recalculate(t),this.z=t.zoom,e&&this.fire(new ot.Event("data",{dataType:"style"}))}},gr.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}},gr.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},gr.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},gr.prototype.setState=function(t){var e=this;if(this._checkLoaded(),hr(this,ot.validateStyle(t)))return!1;(t=ot.clone$1(t)).layers=_i(t.layers);var i=function(t,e){if(!t)return[{command:gi.setStyle,args:[e]}];var i=[];try{if(!ot.deepEqual(t.version,e.version))return[{command:gi.setStyle,args:[e]}];ot.deepEqual(t.center,e.center)||i.push({command:gi.setCenter,args:[e.center]}),ot.deepEqual(t.zoom,e.zoom)||i.push({command:gi.setZoom,args:[e.zoom]}),ot.deepEqual(t.bearing,e.bearing)||i.push({command:gi.setBearing,args:[e.bearing]}),ot.deepEqual(t.pitch,e.pitch)||i.push({command:gi.setPitch,args:[e.pitch]}),ot.deepEqual(t.sprite,e.sprite)||i.push({command:gi.setSprite,args:[e.sprite]}),ot.deepEqual(t.glyphs,e.glyphs)||i.push({command:gi.setGlyphs,args:[e.glyphs]}),ot.deepEqual(t.transition,e.transition)||i.push({command:gi.setTransition,args:[e.transition]}),ot.deepEqual(t.light,e.light)||i.push({command:gi.setLight,args:[e.light]});var r={},n=[];!function(t,e,i,r){var n,o,a,s,l;for(n in e=e||{},t=t||{})t.hasOwnProperty(n)&&(e.hasOwnProperty(n)||xi(n,i,r));for(n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)?ot.deepEqual(t[n],e[n])||("geojson"===t[n].type&&"geojson"===e[n].type&&function(t,e,i){for(var r in t[i])if(t[i].hasOwnProperty(r)&&"data"!==r&&!ot.deepEqual(t[i][r],e[i][r]))return;for(r in e[i])if(e[i].hasOwnProperty(r)&&"data"!==r&&!ot.deepEqual(t[i][r],e[i][r]))return;return 1}(t,e,n)?i.push({command:gi.setGeoJSONSourceData,args:[n,e[n].data]}):(o=n,a=e,s=i,l=r,xi(o,s,l),vi(o,a,s))):vi(n,e,i))}(t.sources,e.sources,n,r);var o=[];t.layers&&t.layers.forEach(function(t){r[t.source]?i.push({command:gi.removeLayer,args:[t.id]}):o.push(t)}),i=i.concat(n),function(t,e,i){e=e||[];for(var r,n,o,a,s,l=(t=t||[]).map(wi),u=e.map(wi),c=t.reduce(Si,{}),p=e.reduce(Si,{}),h=l.slice(),f=Object.create(null),d=0,m=0;d<l.length;d++)p.hasOwnProperty(r=l[d])?m++:(i.push({command:gi.removeLayer,args:[r]}),h.splice(h.indexOf(r,m),1));for(m=d=0;d<u.length;d++)h[h.length-1-d]!==(r=u[u.length-1-d])&&(c.hasOwnProperty(r)?(i.push({command:gi.removeLayer,args:[r]}),h.splice(h.lastIndexOf(r,h.length-m),1)):m++,i.push({command:gi.addLayer,args:[p[r],a=h[h.length-d]]}),h.splice(h.length-d,0,r),f[r]=!0);for(d=0;d<u.length;d++)if(n=c[r=u[d]],o=p[r],!f[r]&&!ot.deepEqual(n,o))if(ot.deepEqual(n.source,o.source)&&ot.deepEqual(n["source-layer"],o["source-layer"])&&ot.deepEqual(n.type,o.type)){for(s in bi(n.layout,o.layout,i,r,null,gi.setLayoutProperty),bi(n.paint,o.paint,i,r,null,gi.setPaintProperty),ot.deepEqual(n.filter,o.filter)||i.push({command:gi.setFilter,args:[r,o.filter]}),ot.deepEqual(n.minzoom,o.minzoom)&&ot.deepEqual(n.maxzoom,o.maxzoom)||i.push({command:gi.setLayerZoomRange,args:[r,o.minzoom,o.maxzoom]}),n)n.hasOwnProperty(s)&&"layout"!==s&&"paint"!==s&&"filter"!==s&&"metadata"!==s&&"minzoom"!==s&&"maxzoom"!==s&&(0===s.indexOf("paint.")?bi(n[s],o[s],i,r,s.slice(6),gi.setPaintProperty):ot.deepEqual(n[s],o[s])||i.push({command:gi.setLayerProperty,args:[r,s,o[s]]}));for(s in o)o.hasOwnProperty(s)&&!n.hasOwnProperty(s)&&"layout"!==s&&"paint"!==s&&"filter"!==s&&"metadata"!==s&&"minzoom"!==s&&"maxzoom"!==s&&(0===s.indexOf("paint.")?bi(n[s],o[s],i,r,s.slice(6),gi.setPaintProperty):ot.deepEqual(n[s],o[s])||i.push({command:gi.setLayerProperty,args:[r,s,o[s]]}))}else i.push({command:gi.removeLayer,args:[r]}),a=h[h.lastIndexOf(r)+1],i.push({command:gi.addLayer,args:[o,a]})}(o,e.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:gi.setStyle,args:[e]}]}return i}(this.serialize(),t).filter(function(t){return!(t.command in mr)});if(0===i.length)return!1;var r=i.filter(function(t){return!(t.command in dr)});if(0<r.length)throw new Error("Unimplemented: "+r.map(function(t){return t.command}).join(", ")+".");
1return i.forEach(function(t){"setTransition"!==t.command&&e[t.command].apply(e,t.args)}),this.stylesheet=t,!0},gr.prototype.addImage=function(t,e){if(this.getImage(t))return this.fire(new ot.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,e),this._afterImageUpdated(t)},gr.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},gr.prototype.getImage=function(t){return this.imageManager.getImage(t)},gr.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new ot.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._afterImageUpdated(t)},gr.prototype._afterImageUpdated=function(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new ot.Event("data",{dataType:"style"}))},gr.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},gr.prototype.addSource=function(t,e,i){var r,n=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!e.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(e).join(", ")+".");0<=["vector","raster","geojson","video","image"].indexOf(e.type)&&this._validate(ot.validateStyle.source,"sources."+t,e,null,i)||(this.map&&this.map._collectResourceTiming&&(e.collectResourceTiming=!0),(r=this.sourceCaches[t]=new si(t,e,this.dispatcher)).style=this,r.setEventedParent(this,function(){return{isSourceLoaded:n.loaded(),source:r.serialize(),sourceId:t}}),r.onAdd(this.map),this._changed=!0)},gr.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var e in this._layers)if(this._layers[e].source===t)return this.fire(new ot.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+e+'" is using it.')));var i=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],i.fire(new ot.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},gr.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},gr.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},gr.prototype.addLayer=function(t,e,i){void 0===i&&(i={}),this._checkLoaded();var r,n=t.id;if(this.getLayer(n))this.fire(new ot.ErrorEvent(new Error('Layer with i
1d "'+n+'" already exists on this map')));else{if("custom"===t.type){if(hr(this,ot.validateCustomStyleLayer(t)))return;r=ot.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(n,t.source),t=ot.clone$1(t),t=ot.extend(t,{source:n})),this._validate(ot.validateStyle.layer,"layers."+n,t,{arrayIndex:-1},i))return;r=ot.createStyleLayer(t),this._validateLayer(r),r.setEventedParent(this,{layer:{id:n}}),this._serializedLayers[r.id]=r.serialize()}t=e?this._order.indexOf(e):this._order.length;e&&-1===t?this.fire(new ot.ErrorEvent(new Error('Layer with id "'+e+'" does not exist on this map.'))):(this._order.splice(t,0,n),this._layerOrderChanged=!0,this._layers[n]=r,this._removedLayers[n]&&r.source&&"custom"!==r.type&&(t=this._removedLayers[n],delete this._removedLayers[n],t.type!==r.type?this._updatedSources[r.source]="clear":(this._updatedSources[r.source]="reload",this.sourceCaches[r.source].pause())),this._updateLayer(r),r.onAdd&&r.onAdd(this.map))}},gr.prototype.moveLayer=function(t,e){var i;this._checkLoaded(),this._changed=!0,this._layers[t]?t!==e&&(i=this._order.indexOf(t),this._order.splice(i,1),i=e?this._order.indexOf(e):this._order.length,e&&-1===i?this.fire(new ot.ErrorEvent(new Error('Layer with i
1d "'+e+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)):this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},gr.prototype.removeLayer=function(t){this._checkLoaded();var e,i=this._layers[t];i?(i.setEventedParent(null),e=this._order.indexOf(t),this._order.splice(e,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=i,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],i.onRemove&&i.onRemove(this.map)):this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},gr.prototype.getLayer=function(t){return this._layers[t]},gr.prototype.hasLayer=function(t){return t in this._layers},gr.prototype.setLayerZoomRange=function(t,e,i){this._checkLoaded();var r=this.getLayer(t);r?r.minzoom===e&&r.maxzoom===i||(null!=e&&(r.minzoom=e),null!=i&&(r.maxzoom=i),this._updateLayer(r)):this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},gr.prototype.setFilter=function(t,e,i){void 0===i&&(i={}),this._checkLoaded();var r=this.getLayer(t);if(r){if(!ot.deepEqual(r.filter,e))return null==e?(r.filter=void 0,void this._updateLayer(r)):void(this._validate(ot.validateStyle.filter,"layers."+r.id+".filter",e,null,i)||(r.filter=ot.clone$1(e),this._updateLayer(r)))}else this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},gr.prototype.getFilter=function(t){return ot.clone$1(this.getLayer(t).filter)},gr.prototype.setLayoutProperty=function(t,e,i,r){void 0===r&&(r={}),this._checkLoaded();var n=this.getLayer(t);n?ot.deepEqual(n.getLayoutProperty(e),i)||(n.setLayoutProperty(e,i,r),this._updateLayer(n)):this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},gr.prototype.getLayoutProperty=function(t,e){var i=this.getLayer(t);if(i)return i.getLayoutProperty(e);this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},gr.prototype.setPaintProperty=function(t,e,i,r){void 0===r&&(r={}),this._checkLoaded();var n=this.getLayer(t);n?ot.deepEqual(n.getPaintProperty(e),i)||(n.setPaintProperty(e,i,r)&&this._updateLayer(n),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new ot.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},gr.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},gr.prototype.setFeatureState=function(t,e){this._checkLoaded();var i,r=t.source,n=t.sourceLayer,o=this.sourceCaches[r];void 0!==o?"geojson"===(i=o.getSource().type)&&n?this.fire(new ot.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==i||n?(void 0===t.id&&this.fire(new ot.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(n,t.id,e)):this.fire(new ot.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types."))):this.fire(new ot.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},gr.prototype.removeFeatureState=function(t,e){this._checkLoaded();var i,r,n=t.source,o=this.sourceCaches[n];void 0!==o?(r="vector"===(i=o.getSource().type)?t.sourceLayer:void 0,"vector"!==i||r?e&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new ot.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):o.removeFeatureState(r,t.id,e):this.fire(new ot.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))):this.fire(new ot.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},gr.prototype.getFeatureState=function(t){this._checkLoaded();var e=t.source,i=t.sourceLayer,r=this.sourceCaches[e];if(void 0!==r){if("vector"!==r.getSource().type||i)return void 0===t.id&&this.fire(new ot.ErrorEvent(new Error("The feature id parameter must be provided."))),r.getFeatureState(i,t.id);
1this.fire(new ot.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new ot.ErrorEvent(new Error("The source '"+e+"' does not exist in the map's style.")))},gr.prototype.getTransition=function(){return ot.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},gr.prototype.serialize=function(){return ot.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:ot.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._serializeLayers(this._order)},function(t){return void 0!==t})},gr.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},gr.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,i=function(t){return"fill-extrusion"===e._layers[t].type},r={},n=[],o=this._order.length-1;0<=o;o--){var a=this._order[o];if(i(a)){r[a]=o;for(var s=0,l=t;s<l.length;s+=1){var u=l[s][a];if(u)for(var c=0,p=u;c<p.length;c+=1)n.push(p[c])}}}n.sort(function(t,e){return e.intersectionZ-t.intersectionZ});for(var h=[],f=this._order.length-1;0<=f;f--){var d=this._order[f];if(i(d))for(var m=n.length-1;0<=m;m--){var y=n[m].feature;if(r[y.layer.id]<f)break;h.push(y),n.pop()}else for(var _=0,g=t;_<g.length;_+=1){var v=g[_][d];if(v)for(var x=0,b=v;x<b.length;x+=1)h.push(b[x].feature)}}return h},gr.prototype.queryRenderedFeatures=function(d,t,e){t&&t.filter&&this._validate(ot.validateStyle.filter,"queryRenderedFeatures.filter",t.filter,null,t);var i={};if(t&&t.layers){if(!Array.isArray(t.layers))return this.fire(new ot.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var r=0,n=t.layers;r<n.length;r+=1){var o=n[r],a=this._layers[o];if(!a)return this.fire(new ot.ErrorEvent(new Error("The layer '"+o+"' does not exist in the map's style and cannot be queried for features."))),[];i[a.source]=!0}}var s,l=[];for(s in t.availableImages=this._availableImages,this.sourceCaches)t.layers&&!i[s]||l.push(Q(this.sourceCaches[s],this._layers,this._serializedLayers,d,t,e));return this.placement&&l.push(function(s,l,r,u,t,e){for(var c={},p=t.queryRenderedSymbols(d),i=[],n=0,o=Object.keys(p).map(Number);n<o.length;n+=1)i.push(e[o[n]]);i.sort($);for(var h=0,f=i;h<f.length;h+=1)!function(){var t,n=f[h],e=n.featureIndex.lookupSymbolFeatures(p[n.bucketInstanceId],l,n.bucketIndex,n.sourceLayerIndex,u.filter,u.layers,u.availableImages,s);for(t in e){var i=c[t]=c[t]||[],r=e[t];r.sort(function(t,e){var i=n.featureSortOrder;if(i){var r=i.indexOf(t.featureIndex);return i.indexOf(e.featureIndex)-r}return e.featureIndex-t.featureIndex});for(var o=0,a=r;o<a.length;o+=1)i.push(a[o])}}();for(var a in c)!function(i){c[i].forEach(function(t){var e=t.feature,t=r[s[i].source].getFeatureState(e.layer["source-layer"],e.id);e.source=e.layer.source,e.layer["source-layer"]&&(e.sourceLayer=e.layer["source-layer"]),e.state=t})}(a);return c}(this._layers,this._serializedLayers,this.sourceCaches,t,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(l)},gr.prototype.querySourceFeatures=function(t,e){e&&e.filter&&this._validate(ot.validateStyle.filter,"querySourceFeatures.filter",e.filter,null,e);t=this.sourceCaches[t];return t?function(e,t){for(var i=e.getRenderableIds().map(function(t){return e.getTileByID(t)}),r=[],n={},o=0;o<i.length;o++){var a=i[o],s=a.tileID.canonical.key;n[s]||(n[s]=!0,a.querySourceFeatures(r,t))}return r}(t,e):[]},gr.prototype.addSourceType=function(t,e,i){return gr.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(gr.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},gr.prototype.getLight=function(){return this.light.getLight()},gr.prototype.setLight=function(t,e){void 0===e&&(e={}),this._checkLoaded();var i,r,n=this.light.getLight(),o=!1;for(i in t)if(!ot.deepEqual(t[i],n[i])){o=!0;break}
1o&&(r={now:ot.browser.now(),transition:ot.extend({duration:300,delay:0},this.stylesheet.transition)},this.light.setLight(t,e),this.light.updateTransitions(r))},gr.prototype._validate=function(t,e,i,r,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&hr(this,t.call(ot.validateStyle,ot.extend({key:e,style:this.serialize(),value:i,styleSpec:ot.styleSpec},r)))},gr.prototype._remove=function(){for(var t in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),ot.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[t].setEventedParent(null);for(var e in this.sourceCaches)this.sourceCaches[e].clearTiles(),this.sourceCaches[e].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},gr.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},gr.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},gr.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},gr.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},gr.prototype._updatePlacement=function(t,e,i,r,n){void 0===n&&(n=!1);for(var o=!1,a=!1,s={},l=0,u=this._order;l<u.length;l+=1){var c,p=this._layers[u[l]];"symbol"===p.type&&(s[p.source]||(c=this.sourceCaches[p.source],s[p.source]=c.getRenderableIds(!0).map(function(t){return c.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})),p=this.crossTileSymbolIndex.addLayer(p,s[p.source],t.center.lng),o=o||p)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((n=n||this._layerOrderChanged||0===i)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(ot.browser.now(),t.zoom))&&(this.pauseablePlacement=new ar(t,this._order,n,e,i,r,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(ot.browser.now()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(var h=0,f=this._order;h<f.length;h+=1){var d=this._layers[f[h]];"symbol"===d.type&&this.placement.updateLayerOpacities(d,s[d.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(ot.browser.now())},gr.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},gr.prototype.getImages=function(t,e,i){this.imageManager.getImages(e.icons,i),this._updateTilesForChangedImages();i=this.sourceCaches[e.source];i&&i.setDependencies(e.tileID.key,e.type,e.icons)},gr.prototype.getGlyphs=function(t,e,i){this.glyphManager.getGlyphs(e.stacks,i)},gr.prototype.getResource=function(t,e,i){return ot.makeRequest(e,i)},gr);function gr(t,e){var n=this;void 0===e&&(e={}),fr.call(this),this.map=t,this.dispatcher=new E(yi(),this),this.imageManager=new c,this.imageManager.setEventedParent(this),this.glyphManager=new v(t._requestManager,e.localIdeographFontFamily),this.lineAtlas=new T(256,512),this.crossTileSymbolIndex=new pr,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new ot.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",ot.getReferrer());var r=this;this._rtlTextPluginCallback=gr.registerForPluginStateChange(function(t){r.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:t.pluginStatus,pluginURL:t.pluginURL},function(t,e){if(ot.triggerPluginCompletionEvent(t),e&&e.every(function(t){return t}))for(var i in r.sourceCaches)r.sourceCaches[i].reload()})}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){t=n.sourceCaches[t.sourceId];if(t){var e=t.getSource();if(e&&e.vectorLayerIds)for(var i in n._layers){var r=n._layers[i];r.source===e.id&&n._validateLayer(r)}}}})}_r.getSourceType=function(t){return Z[t]},_r.setSourceType=function(t,e){Z[t]=e},_r.registerForPluginStateChange=ot.registerForPluginStateChange;var vr=ot.createLayout([{name:"a_pos",type:"Int16",components:2}]),xr=Lr("#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);
1return (tile_units_to_pixels*pos+offset)/pattern_size;}"),br=Lr("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);}"),wr=Lr("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);}"),Sr=Lr("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/(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);}"),Tr=Lr("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);}"),Ir=Lr("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;}"),Er=Lr("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;}"),Ar=Lr("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;}"),zr=Lr("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);}"),Pr=Lr("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);}"),Cr=Lr("#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);}"),kr=Lr("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;}"),Mr=Lr("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;}"),Dr=Lr("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);}"),h=Lr("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+=ambi
1entlight;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;}"),p=Lr("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 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;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;}"),x=Lr("#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;}"),R=Lr("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;
1\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;}"),F=Lr("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);}"),O=Lr("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);}"),U=Lr("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;}"),j=Lr("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);}"),q=Lr("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;}"),nt=Lr("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));}"),ge=Lr("#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);}"),mi=Lr("#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 Lr(t,e){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=e.match(/attribute ([\w]+) ([\w]+)/g),n=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),n=o?o.concat(n):n,s={};return{fragmentSource:t=t.replace(i,function(t,e,i,r,n){return s[n]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+n+"\
1nvarying "+i+" "+r+" "+n+";\n#else\nuniform "+i+" "+r+" u_"+n+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+n+"\n    "+i+" "+r+" "+n+" = u_"+n+";\n#endif\n"}),vertexSource:e=e.replace(i,function(t,e,i,r,n){var o="float"===r?"vec2":"vec4",a=n.match(/color/)?"color":o;return s[n]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+n+"\nuniform lowp float u_"+n+"_t;\nattribute "+i+" "+o+" a_"+n+";\nvarying "+i+" "+r+" "+n+";\n#else\nuniform "+i+" "+r+" u_"+n+";\n#endif\n":"vec4"==a?"\n#ifndef HAS_UNIFORM_u_"+n+"\n    "+n+" = a_"+n+";\n#else\n    "+i+" "+r+" "+n+" = u_"+n+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+n+"\n    "+n+" = unpack_mix_"+a+"(a_"+n+", u_"+n+"_t);\n#else\n    "+i+" "+r+" "+n+" = u_"+n+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+n+"\nuniform lowp float u_"+n+"_t;\nattribute "+i+" "+o+" a_"+n+";\n#else\nuniform "+i+" "+r+" u_"+n+";\n#endif\n":"vec4"==a?"\n#ifndef HAS_UNIFORM_u_"+n+"\n    "+i+" "+r+" "+n+" = a_"+n+";\n#else\n    "+i+" "+r+" "+n+" = u_"+n+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+n+"\n    "+i+" "+r+" "+n+" = unpack_mix_"+a+"(a_"+n+", u_"+n+"_t);\n#else\n    "+i+" "+r+" "+n+" = u_"+n+";\n#endif\n"}),staticAttributes:r,staticUniforms:n}}function Br(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}var Rr=Object.freeze({__proto__:null,prelude:xr,background:br,backgroundPattern:wr,circle:Sr,clippingMask:Tr,heatmap:Ir,heatmapTexture:Er,collisionBox:Ar,collisionCircle:zr,debug:Pr,fill:Cr,fillOutline:kr,fillOutlinePattern:Mr,fillPattern:Dr,fillExtrusion:h,fillExtrusionPattern:p,hillshadePrepare:x,hillshade:R,line:F,lineGradient:O,linePattern:U,lineSDF:j,raster:q,symbolIcon:nt,symbolSDF:ge,symbolTextAndIcon:mi});function Fr(t){for(var e,i=[],r=0;r<t.length;r++)null!==t[r]&&(e=t[r].split(" "),i.push(e.pop()));return i}Br.prototype.bind=function(t,e,i,r,n,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==r.length,u=0;!l&&u<r.length;u++)this.boundPaintVertexBuffers[u]!==r[u]&&(l=!0);t.extVertexArrayObject&&this.vao&&this.boundProgram===e&&this.boundLayoutVertexBuffer===i&&!l&&this.boundIndexBuffer===n&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===a&&this.boundDynamicVertexBuffer2===s?(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),n&&n.dynamicDraw&&n.bind(),s&&s.bind()):this.freshBind(e,i,r,n,o,a,s)},Br.prototype.freshBind=function(t,e,i,r,n,o,a){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=i,this.boundIndexBuffer=r,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var p=l;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var h=0,f=i;h<f.length;h+=1)f[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,n);for(var d=0,m=i;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,n)}o&&(o.bind(),o.setVertexAttribPointers(c,t,n)),r&&r.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,n)),u.currentNumAttributes=l},Br.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Or(t,e,i,r,n,o){var a=t.gl;this.program=a.createProgram();for(var s=Fr(i.staticAttributes),l=r?r.getBinderAttributes():[],u=s.concat(l),s=i.staticUniforms?Fr(i.staticUniforms):[],l=r?r.getBinderUniforms():[],c=[],p=0,h=s.concat(l);p<h.length;p+=1){var f=h[p];c.indexOf(f)<0&&c.push(f)}if(l=r?r.defines():[],o&&l.push("#define OVERDRAW_INSPECTOR;"),o=l.concat(xr.fragmentSource,i.fragmentSource).join("\n"),l=l.concat(xr.vertexSource,i.vertexSource).join("\n"),i=a.createShader(a.FRAGMENT_SHADER),a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(i,o),a.compileShader(i),a.attachShader(this.program,i);o=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(o,l),a.compileShader(o),a.attachShader(this.program,o),this.attributes={};var d={};this.numAttributes=u.length;for(var m=0;m<this.numAttributes;m++)u[m]&&(a.bindAttribLocation(this.program,m,u[m]),this.attributes[u[m]]=m);a.linkProgram(this.program),a.deleteShader(o),a.deleteShader(i);for(var y=0;y<c.length;y++){var _,g=c[y];!g||d[g]||(_=a.getUniformLocation(this.program,g))&&(d[g]=_)}this.fixedUniforms=n(t,d),this.binderUniforms=r?r.getUniforms(t,d):[]}}}function Ur(t,e,i){var r=1/Ui(i,1,e.transform.tileZoom),n=Math.pow(2,i.tileID.overscaledZ
1),e=i.tileSize*Math.pow(2,e.transform.tileZoom)/n,n=e*(i.tileID.canonical.x+i.tileID.wrap*n),e=e*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[r,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[n>>16,e>>16],u_pixel_coord_lower:[65535&n,65535&e]}}Or.prototype.draw=function(t,e,i,r,n,o,a,s,l,u,c,p,h,f,d,m){var y=t.gl;if(!this.failedToCreate){for(var _ in t.program.set(this.program),t.setDepthMode(i),t.setStencilMode(r),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[_].set(a[_]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var g=((h={})[y.LINES]=2,h[y.TRIANGLES]=3,h[y.LINE_STRIP]=1,h[e]),v=0,x=c.get();v<x.length;v+=1){var b=x[v],w=b.vaos||(b.vaos={});(w[s]||(w[s]=new Br)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,b.vertexOffset,d,m),y.drawElements(e,b.primitiveLength*g,y.UNSIGNED_SHORT,b.primitiveOffset*g*2)}}};function Vr(t,e,i,r){var n=e.style.light,o=[(a=n.properties.get("position")).x,a.y,a.z],a=ot.create$1();return"viewport"===n.properties.get("anchor")&&ot.fromRotation(a,-e.transform.angle),ot.transformMat3(o,o,a),a=n.properties.get("color"),{u_matrix:t,u_lightpos:o,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[a.r,a.g,a.b],u_vertical_gradient:+i,u_opacity:r}}function Nr(t){return{u_matrix:t}}function jr(t,e,i,r){return ot.extend(Nr(t),Ur(i,e,r))}function qr(t){return{u_matrix:t}}function Zr(t,e,i){var r=t.transform;return{u_matrix:Wr(t,e,i),u_ratio:1/Ui(e,1,r.zoom),u_device_pixel_ratio:ot.browser.devicePixelRatio,u_units_to_pixels:[1/r.pixelsToGLUnits[0],1/r.pixelsToGLUnits[1]]}}var Gr=function(t,e,i){return void 0===i&&(i=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:i}};
1function Xr(t,e){return 1/Ui(t,1,e.tileZoom)}function Wr(t,e,i){return t.translatePosMatrix(e.tileID.posMatrix,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}function Kr(t,e,i,r,n){return{u_matrix:t,u_tl_parent:e,u_scale_parent:i,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*n.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:n.paint.get("raster-brightness-min"),u_brightness_high:n.paint.get("raster-brightness-max"),u_saturation_factor:0<(r=n.paint.get("raster-saturation"))?1-1/(1.001-r):-r,u_contrast_factor:0<(r=n.paint.get("raster-contrast"))?1/(1-r):1+r,u_spin_weights:function(t){t*=Math.PI/180;var e=Math.sin(t),t=Math.cos(t);return[(2*t+1)/3,(-Math.sqrt(3)*e-t+1)/3,(Math.sqrt(3)*e-t+1)/3]}(n.paint.get("raster-hue-rotate"))}}function Hr(t,e,i,r,n,o,a,s,l,u){var c=n.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:c.width/c.height,u_fade_change:n.options.fadeDuration?n.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:u,u_texture:0}}function Jr(t,e,i,r,n,o,a,s,l,u,c){var p=n.transform;return ot.extend(Hr(t,e,i,r,n,o,a,s,l,u),{u_gamma_scale:r?Math.cos(p._pitch)*p.cameraToCenterDistance:1,u_device_pixel_ratio:ot.browser.devicePixelRatio,u_is_halo:+c})}var Yr,Qr={fillExtrusion:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_lightpos:new ot.Uniform3f(t,e.u_lightpos),u_lightintensity:new ot.Uniform1f(t,e.u_lightintensity),u_lightcolor:new ot.Uniform3f(t,e.u_lightcolor),u_vertical_gradient:new ot.Uniform1f(t,e.u_vertical_gradient),u_opacity:new ot.Uniform1f(t,e.u_opacity)}},fillExtrusionPattern:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_lightpos:new ot.Uniform3f(t,e.u_lightpos),u_lightintensity:new ot.Uniform1f(t,e.u_lightintensity),u_lightcolor:new ot.Uniform3f(t,e.u_lightcolor),u_vertical_gradient:new ot.Uniform1f(t,e.u_vertical_gradient),u_height_factor:new ot.Uniform1f(t,e.u_height_factor),u_image:new ot.Uniform1i(t,e.u_image),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_pixel_coord_upper:new ot.Uniform2f(t,e.u_pixel_coord_upper),u_pixel_coord_lower:new ot.Uniform2f(t,e.u_pixel_coord_lower),u_scale:new ot.Uniform3f(t,e.u_scale),u_fade:new ot.Uniform1f(t,e.u_fade),u_opacity:new ot.Uniform1f(t,e.u_opacity)}},fill:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix)}},fillPattern:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_image:new ot.Uniform1i(t,e.u_image),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_pixel_coord_upper:new ot.Uniform2f(t,e.u_pixel_coord_upper),u_pixel_coord_lower:new ot.Uniform2f(t,e.u_pixel_coord_lower),u_scale:new ot.Uniform3f(t,e.u_scale),u_fade:new ot.Uniform1f(t,e.u_fade)}},fillOutline:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_world:new ot.Uniform2f(t,e.u_world)}},fillOutlinePattern:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_world:new ot.Uniform2f(t,e.u_world),u_image:new ot.Uniform1i(t,e.u_image),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_pixel_coord_upper:new ot.Uniform2f(t,e.u_pixel_coord_upper),u_pixel_coord_lower:new ot.Uniform2f(t,e.u_pixel_coord_lower),u_scale:new ot.Uniform3f(t,e.u_scale),u_fade:new ot.Uniform1f(t,e.u_fade)}},circle:function(t,e){return{u_camera_to_center_distance:new ot.Uniform1f(t,e.u_camera_to_center_distance),u_scale_with_map:new ot.Uniform1i(t,e.u_scale_with_map),u_pitch_with_map:new ot.Uniform1i(t,e.u_pitch_with_map),u_extrude_scale:new ot.Uniform2f(t,e.u_extrude_scale),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_matrix:new ot.UniformMatrix4f(t,e.u_matrix)}},collisionBox:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_camera_to_center_distance:new ot.Uniform1f(t,e.u_camera_to_center_distance),u_pixels_to_tile_units:new ot.Uniform1f(t,e.u_pixels_to_tile_units),u_extrude_scale:new ot.Uniform2f(t,e.u_extrude_scale),u_overscale_factor:new ot.Uniform1f(t,e.u_overscale_factor)}},collisionCircle:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_inv_matrix:new ot.UniformMatrix4f(t,e.u_inv_matrix
1),u_camera_to_center_distance:new ot.Uniform1f(t,e.u_camera_to_center_distance),u_viewport_size:new ot.Uniform2f(t,e.u_viewport_size)}},debug:function(t,e){return{u_color:new ot.UniformColor(t,e.u_color),u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_overlay:new ot.Uniform1i(t,e.u_overlay),u_overlay_scale:new ot.Uniform1f(t,e.u_overlay_scale)}},clippingMask:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix)}},heatmap:function(t,e){return{u_extrude_scale:new ot.Uniform1f(t,e.u_extrude_scale),u_intensity:new ot.Uniform1f(t,e.u_intensity),u_matrix:new ot.UniformMatrix4f(t,e.u_matrix)}},heatmapTexture:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_world:new ot.Uniform2f(t,e.u_world),u_image:new ot.Uniform1i(t,e.u_image),u_color_ramp:new ot.Uniform1i(t,e.u_color_ramp),u_opacity:new ot.Uniform1f(t,e.u_opacity)}},hillshade:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_image:new ot.Uniform1i(t,e.u_image),u_latrange:new ot.Uniform2f(t,e.u_latrange),u_light:new ot.Uniform2f(t,e.u_light),u_shadow:new ot.UniformColor(t,e.u_shadow),u_highlight:new ot.UniformColor(t,e.u_highlight),u_accent:new ot.UniformColor(t,e.u_accent)}},hillshadePrepare:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_image:new ot.Uniform1i(t,e.u_image),u_dimension:new ot.Uniform2f(t,e.u_dimension),u_zoom:new ot.Uniform1f(t,e.u_zoom),u_unpack:new ot.Uniform4f(t,e.u_unpack)}},line:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_ratio:new ot.Uniform1f(t,e.u_ratio),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_units_to_pixels:new ot.Uniform2f(t,e.u_units_to_pixels)}},lineGradient:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_ratio:new ot.Uniform1f(t,e.u_ratio),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_units_to_pixels:new ot.Uniform2f(t,e.u_units_to_pixels),u_image:new ot.Uniform1i(t,e.u_image),u_image_height:new ot.Uniform1f(t,e.u_image_height)}},linePattern:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_ratio:new ot.Uniform1f(t,e.u_ratio),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_image:new ot.Uniform1i(t,e.u_image),u_units_to_pixels:new ot.Uniform2f(t,e.u_units_to_pixels),u_scale:new ot.Uniform3f(t,e.u_scale),u_fade:new ot.Uniform1f(t,e.u_fade)}},lineSDF:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_ratio:new ot.Uniform1f(t,e.u_ratio),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_units_to_pixels:new ot.Uniform2f(t,e.u_units_to_pixels),u_patternscale_a:new ot.Uniform2f(t,e.u_patternscale_a),u_patternscale_b:new ot.Uniform2f(t,e.u_patternscale_b),u_sdfgamma:new ot.Uniform1f(t,e.u_sdfgamma),u_image:new ot.Uniform1i(t,e.u_image),u_tex_y_a:new ot.Uniform1f(t,e.u_tex_y_a),u_tex_y_b:new ot.Uniform1f(t,e.u_tex_y_b),u_mix:new ot.Uniform1f(t,e.u_mix)}},raster:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_tl_parent:new ot.Uniform2f(t,e.u_tl_parent),u_scale_parent:new ot.Uniform1f(t,e.u_scale_parent),u_buffer_scale:new ot.Uniform1f(t,e.u_buffer_scale),u_fade_t:new ot.Uniform1f(t,e.u_fade_t),u_opacity:new ot.Uniform1f(t,e.u_opacity),u_image0:new ot.Uniform1i(t,e.u_image0),u_image1:new ot.Uniform1i(t,e.u_image1),u_brightness_low:new ot.Uniform1f(t,e.u_brightness_low),u_brightness_high:new ot.Uniform1f(t,e.u_brightness_high),u_saturation_factor:new ot.Uniform1f(t,e.u_saturation_factor),u_contrast_factor:new ot.Uniform1f(t,e.u_contrast_factor),u_spin_weights:new ot.Uniform3f(t,e.u_spin_weights)}},symbolIcon:function(t,e){return{u_is_size_zoom_constant:new ot.Uniform1i(t,e.u_is_size_zoom_constant),u_is_size_feature_constant:new ot.Uniform1i(t,e.u_is_size_feature_constant),u_size_t:new ot.Uniform1f(t,e.u_size_t),u_size:new ot.Uniform1f(t,e.u_size),u_camera_to_center_distance:new ot.Uniform1f(t,e.u_camera_to_center_distance),u_pitch:new ot.Uniform1f(t,e.u_pitch),u_rotate_symbol:new ot.Uniform1i(t,e.u_rotate_symbol),u_aspect_ratio:new ot.Uniform1f(t,e.u_aspect_ratio),u_fade_change:new ot.Uniform1f(t,e.u_fade_change),u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_label_plane_matrix:new ot.UniformMatrix4f(t,e.u_label_plane_matrix
1),u_coord_matrix:new ot.UniformMatrix4f(t,e.u_coord_matrix),u_is_text:new ot.Uniform1i(t,e.u_is_text),u_pitch_with_map:new ot.Uniform1i(t,e.u_pitch_with_map),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_texture:new ot.Uniform1i(t,e.u_texture)}},symbolSDF:function(t,e){return{u_is_size_zoom_constant:new ot.Uniform1i(t,e.u_is_size_zoom_constant),u_is_size_feature_constant:new ot.Uniform1i(t,e.u_is_size_feature_constant),u_size_t:new ot.Uniform1f(t,e.u_size_t),u_size:new ot.Uniform1f(t,e.u_size),u_camera_to_center_distance:new ot.Uniform1f(t,e.u_camera_to_center_distance),u_pitch:new ot.Uniform1f(t,e.u_pitch),u_rotate_symbol:new ot.Uniform1i(t,e.u_rotate_symbol),u_aspect_ratio:new ot.Uniform1f(t,e.u_aspect_ratio),u_fade_change:new ot.Uniform1f(t,e.u_fade_change),u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_label_plane_matrix:new ot.UniformMatrix4f(t,e.u_label_plane_matrix),u_coord_matrix:new ot.UniformMatrix4f(t,e.u_coord_matrix),u_is_text:new ot.Uniform1i(t,e.u_is_text),u_pitch_with_map:new ot.Uniform1i(t,e.u_pitch_with_map),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_texture:new ot.Uniform1i(t,e.u_texture),u_gamma_scale:new ot.Uniform1f(t,e.u_gamma_scale),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_is_halo:new ot.Uniform1i(t,e.u_is_halo)}},symbolTextAndIcon:function(t,e){return{u_is_size_zoom_constant:new ot.Uniform1i(t,e.u_is_size_zoom_constant),u_is_size_feature_constant:new ot.Uniform1i(t,e.u_is_size_feature_constant),u_size_t:new ot.Uniform1f(t,e.u_size_t),u_size:new ot.Uniform1f(t,e.u_size),u_camera_to_center_distance:new ot.Uniform1f(t,e.u_camera_to_center_distance),u_pitch:new ot.Uniform1f(t,e.u_pitch),u_rotate_symbol:new ot.Uniform1i(t,e.u_rotate_symbol),u_aspect_ratio:new ot.Uniform1f(t,e.u_aspect_ratio),u_fade_change:new ot.Uniform1f(t,e.u_fade_change),u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_label_plane_matrix:new ot.UniformMatrix4f(t,e.u_label_plane_matrix),u_coord_matrix:new ot.UniformMatrix4f(t,e.u_coord_matrix),u_is_text:new ot.Uniform1i(t,e.u_is_text),u_pitch_with_map:new ot.Uniform1i(t,e.u_pitch_with_map),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_texsize_icon:new ot.Uniform2f(t,e.u_texsize_icon),u_texture:new ot.Uniform1i(t,e.u_texture),u_texture_icon:new ot.Uniform1i(t,e.u_texture_icon),u_gamma_scale:new ot.Uniform1f(t,e.u_gamma_scale),u_device_pixel_ratio:new ot.Uniform1f(t,e.u_device_pixel_ratio),u_is_halo:new ot.Uniform1i(t,e.u_is_halo)}},background:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_opacity:new ot.Uniform1f(t,e.u_opacity),u_color:new ot.UniformColor(t,e.u_color)}},backgroundPattern:function(t,e){return{u_matrix:new ot.UniformMatrix4f(t,e.u_matrix),u_opacity:new ot.Uniform1f(t,e.u_opacity),u_image:new ot.Uniform1i(t,e.u_image),u_pattern_tl_a:new ot.Uniform2f(t,e.u_pattern_tl_a),u_pattern_br_a:new ot.Uniform2f(t,e.u_pattern_br_a),u_pattern_tl_b:new ot.Uniform2f(t,e.u_pattern_tl_b),u_pattern_br_b:new ot.Uniform2f(t,e.u_pattern_br_b),u_texsize:new ot.Uniform2f(t,e.u_texsize),u_mix:new ot.Uniform1f(t,e.u_mix),u_pattern_size_a:new ot.Uniform2f(t,e.u_pattern_size_a),u_pattern_size_b:new ot.Uniform2f(t,e.u_pattern_size_b),u_scale_a:new ot.Uniform1f(t,e.u_scale_a),u_scale_b:new ot.Uniform1f(t,e.u_scale_b),u_pixel_coord_upper:new ot.Uniform2f(t,e.u_pixel_coord_upper),u_pixel_coord_lower:new ot.Uniform2f(t,e.u_pixel_coord_lower),u_tile_units_to_pixels:new ot.Uniform1f(t,e.u_tile_units_to_pixels)}}};function $r(t,e,i,r,n,o,a){for(var s,l,u=t.context,c=u.gl,p=t.useProgram("collisionBox"),h=[],f=0,d=0,m=0;m<r.length;m++){var y,_,g,v,x=r[m],b=e.getTile(x),w=b.getBucket(i);w&&(y=x.posMatrix,0===n[0]&&0===n[1]||(y=t.translatePosMatrix(x.posMatrix,b,n,o)),_=a?w.textCollisionBox:w.iconCollisionBox,0<(x=w.collisionCircleArray).length&&(g=ot.create(),v=y,ot.mul(g,w.placementInvProjMatrix,t.transform.glCoordMatrix),ot.mul(g,g,w.placementViewportMatrix),h.push({circleArray:x,circleOffset:d,transform:v,invTransform:g}),d=f+=x.length/4),_&&p.draw(u,c.LINES,ei.disabled,ii.disabled,t.colorModeForRenderPass(),ni.disabled,(v=y,g=t.transform,y=x=void 0,x=Ui(b=b,1,g.zoom),y=Math.pow(2,g.zoom-b.tileID.overscaledZ
1),b=b.tileID.overscaleFactor(),{u_matrix:v,u_camera_to_center_distance:g.cameraToCenterDistance,u_pixels_to_tile_units:x,u_extrude_scale:[g.pixelsToGLUnits[0]/(x*y),g.pixelsToGLUnits[1]/(x*y)],u_overscale_factor:b}),i.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,t.transform.zoom,null,null,_.collisionVertexBuffer))}if(a&&h.length){var S=t.useProgram("collisionCircle"),T=new ot.StructArrayLayout2f1f2i16;T.resize(4*f),T._trim();for(var I=0,E=0,A=h;E<A.length;E+=1)for(var z=A[E],P=0;P<z.circleArray.length/4;P++){var C=4*P,k=z.circleArray[0+C],M=z.circleArray[1+C],D=z.circleArray[2+C],C=z.circleArray[3+C];T.emplace(I++,k,M,D,C,0),T.emplace(I++,k,M,D,C,1),T.emplace(I++,k,M,D,C,2),T.emplace(I++,k,M,D,C,3)}(!Yr||Yr.length<2*f)&&(Yr=function(){var t=2*f,e=new ot.StructArrayLayout3ui6;e.resize(t),e._trim();for(var i=0;i<t;i++){var r=6*i;e.uint16[0+r]=4*i+0,e.uint16[1+r]=4*i+1,e.uint16[2+r]=4*i+2,e.uint16[3+r]=4*i+2,e.uint16[4+r]=4*i+3,e.uint16[5+r]=4*i+0}return e}());for(var L=u.createIndexBuffer(Yr,!0),B=u.createVertexBuffer(T,ot.collisionCircleLayout.members,!0),R=0,F=h;R<F.length;R+=1){var O=F[R],U=(s=O.transform,l=O.invTransform,U=t.transform,{u_matrix:s,u_inv_matrix:l,u_camera_to_center_distance:U.cameraToCenterDistance,u_viewport_size:[U.width,U.height]});S.draw(u,c.TRIANGLES,ei.disabled,ii.disabled,t.colorModeForRenderPass(),ni.disabled,U,i.id,B,L,ot.SegmentVector.simpleSegment(0,2*O.circleOffset,O.circleArray.length,O.circleArray.length/2),null,t.transform.zoom,null,null,null)}B.destroy(),L.destroy()}}var tn=ot.identity(new Float32Array(16));function en(t,e,i,r,n,o,a,s,l,u,c){var p=t.text.placedSymbolArray,h=t.text.dynamicLayoutVertexArray,f=t.icon.dynamicLayoutVertexArray,d={};h.clear();for(var m,y,_,g,v=0;v<p.length;v++){var x=p.get(v),b=x.hidden||!x.crossTileID||t.allowVerticalPlacement&&!x.placedOrientation?null:r[x.crossTileID];if(b){var w=new ot.Point(x.anchorX,x.anchorY),S=zi(w,i?s:a),T=Pi(o.cameraToCenterDistance,S.signedDistanceFromCamera),I=n.evaluateSizeForFeature(t.textSizeData,u,x)*T/ot.ONE_EM;i&&(I*=t.tilePixelRatio/l);for(var b=(m=b.anchor,y=b.width,_=b.height,g=b.textOffset,T=b.textBoxScale,b=I,I=void 0,I=ot.getAnchorAlignment(m),y=-(I.horizontalAlign-.5)*y,_=-(I.verticalAlign-.5)*_,g=ot.evaluateVariableOffset(m,g),new ot.Point((y/T+g[0])*b,(_/T+g[1])*b)),E=i?zi(w.add(b),a).point:S.point.add(e?b.rotate(-o.angle):b),A=t.allowVerticalPlacement&&x.placedOrientation===ot.WritingMode.vertical?Math.PI/2:0,z=0;z<x.numGlyphs;z++)ot.addDynamicAttributes(h,E,A);c&&0<=x.associatedIconIndex&&(d[x.associatedIconIndex]={shiftedAnchor:E,angle:A})}else Ri(x.numGlyphs,h)}if(c){f.clear();for(var P=t.icon.placedSymbolArray,C=0;C<P.length;C++){var k=P.get(C);if(k.hidden)Ri(k.numGlyphs,f);else{var M=d[C];if(M)for(var D=0;D<k.numGlyphs;D++)ot.addDynamicAttributes(f,M.shiftedAnchor,M.angle);else Ri(k.numGlyphs,f)}}t.icon.dynamicLayoutVertexBuffer.updateData(f)}t.text.dynamicLayoutVertexBuffer.updateData(h)}function rn(t,e,i,r,n,o,a,s,l,u,c,p){for(var h=t.context,f=h.gl,d=t.transform,m="map"===s,y="map"===l,_=m&&"point"!==i.layout.get("symbol-placement"),g=m&&!y&&!_,v=void 0!==i.layout.get("symbol-sort-key").constantOr(1),x=!1,b=t.depthModeForSublayer(0,ei.ReadOnly),w=i.layout.get("text-variable-anchor"),S=[],T=0,I=r;T<I.length;T+=1){var E=I[T],A=e.getTile(E),z=A.getBucket(i);if(z){var P=n?z.text:z.icon;if(P&&P.segments.get().length){var C=P.programConfigurations.get(i.id),k=n||z.sdfIcons,M=n?z.textSizeData:z.iconSizeData,D=y||0!==d.pitch,L=t.useProgram((K=k,W=n,z.iconsInText&&W?"symbolTextAndIcon":K?"symbolSDF":"symbolIcon"),C),B=ot.evaluateSizeForZoom(M,d.zoom),R=void 0,F=[0,0],O=void 0,U=void 0,V=null,N=void 0;n?(O=A.glyphAtlasTexture,U=f.LINEAR,R=A.glyphAtlasTexture.size,z.iconsInText&&(F=A.imageAtlasTexture.size,V=A.imageAtlasTexture,N=D||t.options.rotating||t.options.zooming||"composite"===M.kind||"camera"===M.kind?f.LINEAR:f.NEAREST)):(H=1!==i.layout.get("icon-size").constantOr(0)||z.iconsNeedLinear,O=A.imageAtlasTexture,U=k||t.options.rotating||t.options.zooming||H||D?f.LINEAR:f.NEAREST,R=A.imageAtlasTexture.size);var j=Ui(A,1,t.transform.zoom),q=Ei(E.posMatrix,y,m,t.transform,j),Z=Ai(E.posMatrix,y,m,t.transform,j),G=w&&z.hasTextData(),X="none"!==i.layout.get("icon-text-fit")&&G&&z.hasIconData();
1_&&function(t,e,i,r,n,o,a,s){var l=r?t.textSizeData:t.iconSizeData,u=ot.evaluateSizeForZoom(l,i.transform.zoom),c=[256/i.width*2+1,256/i.height*2+1],p=(r?t.text:t.icon).dynamicLayoutVertexArray;p.clear();for(var h=t.lineVertexArray,f=(r?t.text:t.icon).placedSymbolArray,d=i.transform.width/i.transform.height,m=!1,y=0;y<f.length;y++){var _,g,v,x,b,w=f.get(y);w.hidden||w.writingMode===ot.WritingMode.vertical&&!m?Ri(w.numGlyphs,p):(m=!1,v=[w.anchorX,w.anchorY,0,1],ot.transformMat4(v,v,e),g=c,x=void 0,x=(_=v)[0]/_[3],_=_[1]/_[3],x>=-g[0]&&x<=g[0]&&_>=-g[1]&&_<=g[1]?(b=Pi(i.transform.cameraToCenterDistance,v[3]),x=ot.evaluateSizeForFeature(l,u,w),_=a?x/b:x*b,v=zi(g=new ot.Point(w.anchorX,w.anchorY),n).point,m=(b=Mi(w,_,!(x={}),s,e,n,o,t.glyphOffsetArray,h,p,v,g,x,d)).useVertical,(b.notEnoughRoom||m||b.needsFlipping&&Mi(w,_,!0,s,e,n,o,t.glyphOffsetArray,h,p,v,g,x,d).notEnoughRoom)&&Ri(w.numGlyphs,p)):Ri(w.numGlyphs,p))}(r?t.text:t.icon).dynamicLayoutVertexBuffer.updateData(p)}(z,E.posMatrix,t,n,q,Z,y,u);var W=t.translatePosMatrix(E.posMatrix,A,o,a),K=_||n&&w||X?tn:q,C=t.translatePosMatrix(Z,A,o,a,!0),H=k&&0!==i.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1),J={program:L,buffers:P,uniformValues:k?z.iconsInText?(D=M.kind,j=B,G=g,E=y,X=t,q=W,Z=K,A=C,L=R,F=F,ot.extend(Jr(D,j,G,E,X,q,Z,A,!0,L,!0),{u_texsize_icon:F,u_texture_icon:1})):Jr(M.kind,B,g,y,t,W,K,C,n,R,!0):Hr(M.kind,B,g,y,t,W,K,C,n,R),atlasTexture:O,atlasTextureIcon:V,atlasInterpolation:U,atlasInterpolationIcon:N,isSDF:k,hasHalo:H};if(v&&z.canOverlap){x=!0;for(var Y=0,Q=P.segments.get();Y<Q.length;Y+=1){var $=Q[Y];S.push({segments:new ot.SegmentVector([$]),sortKey:$.sortKey,state:J})}}else S.push({segments:P.segments,sortKey:0,state:J})}}}x&&S.sort(function(t,e){return t.sortKey-e.sortKey});for(var tt=0,et=S;tt<et.length;tt+=1){var it,rt=et[tt],nt=rt.state;h.activeTexture.set(f.TEXTURE0),nt.atlasTexture.bind(nt.atlasInterpolation,f.CLAMP_TO_EDGE),nt.atlasTextureIcon&&(h.activeTexture.set(f.TEXTURE1),nt.atlasTextureIcon&&nt.atlasTextureIcon.bind(nt.atlasInterpolationIcon,f.CLAMP_TO_EDGE)),nt.isSDF&&(it=nt.uniformValues,nt.hasHalo&&(it.u_is_halo=1,nn(nt.buffers,rt.segments,i,t,nt.program,b,c,p,it)),it.u_is_halo=0),nn(nt.buffers,rt.segments,i,t,nt.program,b,c,p,nt.uniformValues)}}function nn(t,e,i,r,n,o,a,s,l){var u=r.context;n.draw(u,u.gl.TRIANGLES,o,a,s,ni.disabled,l,i.id,t.layoutVertexBuffer,t.indexBuffer,e,i.paint,r.transform.zoom,t.programConfigurations.get(i.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function on(t,e,i,r,n,o,a){for(var s,l,u,c,p=t.context.gl,h=i.paint.get("fill-pattern"),f=h&&h.constantOr(1),d=i.getCrossfadeParameters(),m=a?(s=f&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",p.LINES):(s=f?"fillPattern":"fill",p.TRIANGLES),y=0,_=r;y<_.length;y+=1){var g,v,x,b,w,S,T,I,E,A=_[y],z=e.getTile(A);f&&!z.patternsLoaded()||(g=z.getBucket(i))&&(v=g.programConfigurations.get(i.id),x=t.useProgram(s,v),f&&(t.context.activeTexture.set(p.TEXTURE0),z.imageAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),v.updatePaintBuffers(d)),(b=h.constantOr(null))&&z.imageAtlas&&(S=(w=z.imageAtlas).patternPositions[b.to.toString()],T=w.patternPositions[b.from.toString()],S&&T&&v.setConstantPatternPositions(S,T)),E=t.translatePosMatrix(A.posMatrix,z,i.paint.get("fill-translate"),i.paint.get("fill-translate-anchor")),E=a?(l=g.indexBuffer2,u=g.segments2,I=[p.drawingBufferWidth,p.drawingBufferHeight],"fillOutlinePattern"===s&&f?(c=E,w=t,b=d,S=z,T=I,ot.extend(jr(c,w,b,S),{u_world:T})):{u_matrix:E,u_world:I}):(l=g.indexBuffer,u=g.segments,f?jr(E,t,d,z):Nr(E)),x.draw(t.context,m,n,t.stencilModeForClipping(A),o,ni.disabled,E,i.id,g.layoutVertexBuffer,l,u,i.paint,t.transform.zoom,v))}}function an(t,e,i,r,n,o,a){for(var s,l=t.context,u=l.gl,c=i.paint.get("fill-extrusion-pattern"),p=c.constantOr(1),h=i.getCrossfadeParameters(),f=i.paint.get("fill-extrusion-opacity"),d=0,m=r;d<m.length;d+=1){var y,_,g,v,x,b,w,S,T=m[d],I=e.getTile(T),E=I.getBucket(i);E&&(y=E.programConfigurations.get(i.id),_=t.useProgram(p?"fillExtrusionPattern":"fillExtrusion",y),p&&(t.context.activeTexture.set(u.TEXTURE0),I.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),y.updatePaintBuffers(h)),(g=c.constantOr(null))&&I.imageAtlas&&(x=(v=I.imageAtlas).patternPositions[g.to.toString()],b=v.patternPositions[g.from.toString()],x&&b&&y.setConstantPatternPositions(x,b)),w=t.translatePosMatrix(T.posMatrix,I,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),S=i.paint.get("fill-extrusion-vertical-gradient"),S=p?(s=w,v=t,g=S,x=f,b=T,T=h,I=I,ot.extend(Vr(s,v,g,x),Ur(T,v,I),{u_height_factor:-Math.pow(2,b.overscaledZ
1)/I.tileSize/8})):Vr(w,t,S,f),_.draw(l,l.gl.TRIANGLES,n,o,a,ni.backCCW,S,i.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,i.paint,t.transform.zoom,y))}}var sn=new ot.Color(1,0,0,1),ln=new ot.Color(0,1,0,1),un=new ot.Color(0,0,1,1),cn=new ot.Color(1,0,1,1),pn=new ot.Color(0,1,1,1);function hn(t,e,i,r){dn(t,0,e+i/2,t.transform.width,i,r)}function fn(t,e,i,r){dn(t,e-i/2,0,i,t.transform.height,r)}function dn(t,e,i,r,n,o){var a=t.context,t=a.gl;t.enable(t.SCISSOR_TEST),t.scissor(e*ot.browser.devicePixelRatio,i*ot.browser.devicePixelRatio,r*ot.browser.devicePixelRatio,n*ot.browser.devicePixelRatio),a.clear({color:o}),t.disable(t.SCISSOR_TEST)}function mn(t,e){this.context=new oi(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=si.maxUnderzooming+si.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new pr,this.gpuTimers={}}var yn={symbol:function(t,e,i,r,n){var o,a;"translucent"===t.renderPass&&(o=ii.disabled,a=t.colorModeForRenderPass(),i.layout.get("text-variable-anchor")&&function(t,e,i,r,n,o,a){for(var s=e.transform,l="map"===n,u="map"===o,c=0,p=t;c<p.length;c+=1){var h,f,d,m=p[c],y=r.getTile(m),_=y.getBucket(i);_&&_.text&&_.text.segments.get().length&&(h=ot.evaluateSizeForZoom(_.textSizeData,s.zoom),d=Ui(y,1,e.transform.zoom),f=Ei(m.posMatrix,u,l,e.transform,d),d="none"!==i.layout.get("icon-text-fit")&&_.hasIconData(),h&&(y=Math.pow(2,s.zoom-y.tileID.overscaledZ),en(_,l,u,a,ot.symbolSize,s,f,m.posMatrix,y,h,d)))}}(r,t,i,e,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),n),0!==i.paint.get("icon-opacity").constantOr(1)&&rn(t,e,i,r,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),o,a),0!==i.paint.get("text-opacity").constantOr(1)&&rn(t,e,i,r,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),o,a),e.map.showCollisionBoxes&&($r(t,e,i,r,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),!0),$r(t,e,i,r,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),!1)))},circle:function(t,e,i,r){if("translucent"===t.renderPass){var n=i.paint.get("circle-opacity"),o=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),s=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==n.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){for(var l=t.context,u=l.gl,c=t.depthModeForSublayer(0,ei.ReadOnly),p=ii.disabled,h=t.colorModeForRenderPass(),f=[],d=0;d<r.length;d++){var m=r[d],y=e.getTile(m),_=y.getBucket(i);if(_){var g=_.programConfigurations.get(i.id),v={programConfiguration:g,program:t.useProgram("circle",g),layoutVertexBuffer:_.layoutVertexBuffer,indexBuffer:_.indexBuffer,uniformValues:(A=m,z=y,P=i,m=g=C=void 0,m=(y=t).transform,g="map"===P.paint.get("circle-pitch-alignment")?(C=!0,[g=Ui(z,1,m.zoom),g]):(C=!1,m.pixelsToGLUnits),{u_camera_to_center_distance:m.cameraToCenterDistance,u_scale_with_map:+("map"===P.paint.get("circle-pitch-scale")),u_matrix:y.translatePosMatrix(A.posMatrix,z,P.paint.get("circle-translate"),P.paint.get("circle-translate-anchor")),u_pitch_with_map:+C,u_device_pixel_ratio:ot.browser.devicePixelRatio,u_extrude_scale:g})};if(s)for(var x=0,b=_.segments.get();x<b.length;x+=1){var w=b[x];f.push({segments:new ot.SegmentVector([w]),sortKey:w.sortKey,state:v})}else f.push({segments:_.segments,sortKey:0,state:v})}}s&&f.sort(function(t,e){return t.sortKey-e.sortKey});for(var S=0,T=f;S<T.length;S+=1){var I=T[S],E=I.state;E.program.draw(l,u.TRIANGLES,c,p,h,ni.disabled,E.uniformValues,i.id,E.layoutVertexBuffer,E.indexBuffer,I.segments,i.paint,t.transform.zoom,E.programConfiguration)}}}var A,z,P,C},heatmap:function(t,e,i,r){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){var n=t.context,o=n.gl,a=ii.disabled,s=new ri([o.ONE,o.ONE],ot.Color.transparent,[!0,!0,!0,!0]);!function(t,e,i){var r=t.gl;t.activeTexture.set(r.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var n,o=i.heatmapFbo;o?(r.bindTexture(r.TEXTURE_2D,o.colorAttachment.get()),t.bindFramebuffer.set(o.framebuffer)):(n=r.createTexture(),r.bindTexture(r.TEXTURE_2D,n),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),o=i.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),i=n,n=o,(o=t.gl).texImage2D(o.TEXTURE_2D,0,o.RGBA,e.width/4,e.height/4,0,o.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null),n.colorAttachment.set(i))}(n,t,i),n.clear({color:ot.Color.transparent});for(var l=0;l<r.length;l++){var u,c,p=r[l];
1e.hasRenderableParent(p)||(u=(v=e.getTile(p)).getBucket(i))&&(c=u.programConfigurations.get(i.id),t.useProgram("heatmap",c).draw(n,o.TRIANGLES,ei.disabled,a,s,ni.disabled,(_=p.posMatrix,g=v,p=t.transform.zoom,v=i.paint.get("heatmap-intensity"),{u_matrix:_,u_extrude_scale:Ui(g,1,p),u_intensity:v}),i.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,i.paint,t.transform.zoom,c))}n.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),f=i,d=(h=t).context,m=d.gl,(y=f.heatmapFbo)&&(d.activeTexture.set(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,y.colorAttachment.get()),d.activeTexture.set(m.TEXTURE1),(f.colorRampTexture||(f.colorRampTexture=new ot.Texture(d,f.colorRamp,m.RGBA))).bind(m.LINEAR,m.CLAMP_TO_EDGE),h.useProgram("heatmapTexture").draw(d,m.TRIANGLES,ei.disabled,ii.disabled,h.colorModeForRenderPass(),ni.disabled,function(t,e){var i=ot.create();ot.ortho(i,0,t.width,t.height,0,0,1);t=t.context.gl;return{u_matrix:i,u_world:[t.drawingBufferWidth,t.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:e.paint.get("heatmap-opacity")}}(h,f),f.id,h.viewportBuffer,h.quadTriangleIndexBuffer,h.viewportSegments,f.paint,h.transform.zoom)));var h,f,d,m,y,_,g,v},line:function(t,e,i,r){if("translucent"===t.renderPass){var n=i.paint.get("line-opacity"),o=i.paint.get("line-width");if(0!==n.constantOr(1)&&0!==o.constantOr(1))for(var a=t.depthModeForSublayer(0,ei.ReadOnly),s=t.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),u=i.paint.get("line-pattern"),c=u.constantOr(1),p=i.paint.get("line-gradient"),h=i.getCrossfadeParameters(),f=c?"linePattern":l?"lineSDF":p?"lineGradient":"line",d=t.context,m=d.gl,y=!0,_=0,g=r;_<g.length;_+=1){var v,x,b,w,S=g[_],T=e.getTile(S);c&&!T.patternsLoaded()||(v=T.getBucket(i))&&(x=v.programConfigurations.get(i.id),z=t.context.program.get(),b=t.useProgram(f,x),w=y||b.program!==z,(z=u.constantOr(null))&&T.imageAtlas&&(P=(C=T.imageAtlas).patternPositions[z.to.toString()],C=C.patternPositions[z.from.toString()],P&&C&&x.setConstantPatternPositions(P,C)),I=c?(D=T,L=i,B=h,F=R=void 0,R=(M=t).transform,F=Xr(D,R),{u_matrix:Wr(M,D,L),u_texsize:D.imageAtlasTexture.size,u_ratio:1/Ui(D,1,R.zoom),u_device_pixel_ratio:ot.browser.devicePixelRatio,u_image:0,u_scale:[F,B.fromScale,B.toScale],u_fade:B.t,u_units_to_pixels:[1/R.pixelsToGLUnits[0],1/R.pixelsToGLUnits[1]]}):l?(z=T,P=i,C=l,k=h,D=B=F=D=L=M=void 0,M=(R=t).lineAtlas,L=Xr(z,R.transform),D="round"===P.layout.get("line-cap"),F=M.getDash(C.from,D),B=M.getDash(C.to,D),C=F.width*k.fromScale,D=B.width*k.toScale,ot.extend(Zr(R,z,P),{u_patternscale_a:[L/C,-F.height/2],u_patternscale_b:[L/D,-B.height/2],u_sdfgamma:M.width/(256*Math.min(C,D)*ot.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:F.y,u_tex_y_b:B.y,u_mix:k.t})):p?(k=t,I=T,E=i,A=v.lineClipsArray.length,ot.extend(Zr(k,I,E),{u_image:0,u_image_height:A})):Zr(t,T,i),c?(d.activeTexture.set(m.TEXTURE0),T.imageAtlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE),x.updatePaintBuffers(h)):l&&(w||t.lineAtlas.dirty)?(d.activeTexture.set(m.TEXTURE0),t.lineAtlas.bind(d)):p&&(A=(E=v.gradients[i.id]).texture,i.gradientVersion!==E.version&&(T=256,i.stepInterpolant&&(w=e.getSource().maxzoom,w=S.canonical.z===w?Math.ceil(1<<t.transform.maxZoom-S.canonical.z):1,T=ot.clamp(ot.nextPowerOfTwo(v.maxLineLength/ot.EXTENT*1024*w),256,d.maxTextureSize)),E.gradient=ot.renderColorRamp({expression:i.gradientExpression(),evaluationKey:"lineProgress",resolution:T,image:E.gradient||void 0,clips:v.lineClipsArray}),E.texture?E.texture.update(E.gradient):E.texture=new ot.Texture(d,E.gradient,m.RGBA),E.version=i.gradientVersion,A=E.texture),d.activeTexture.set(m.TEXTURE0),A.bind(i.stepInterpolant?m.NEAREST:m.LINEAR,m.CLAMP_TO_EDGE)),b.draw(d,m.TRIANGLES,a,t.stencilModeForClipping(S),s,ni.disabled,I,i.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,i.paint,t.transform.zoom,x,v.layoutVertexBuffer2),y=!1)}}var I,E,A,z,P,C,k,M,D,L,B,R,F},fill:function(t,e,i,r){var n,o,a,s=i.paint.get("fill-color"),l=i.paint.get("fill-opacity");0!==l.constantOr(1)&&(n=t.colorModeForRenderPass(),o=i.paint.get("fill-pattern"),l=t.opaquePassEnabledForLayer()&&!o.constantOr(1)&&1===s.constantOr(ot.Color.transparent).a&&1===l.constantOr(0)?"opaque":"translucent",t.renderPass===l&&(a=t.depthModeForSublayer(1,"opaque"===t.renderPass?ei.ReadWrite:ei.ReadOnly),on(t,e,i,r,a,n,!1)),"translucent"===t.renderPass&&i.paint.get("fill-antialias")&&(a=t.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,ei.ReadOnly),on(t,e,i,r,a,n,!0)))}
1,"fill-extrusion":function(t,e,i,r){var n,o=i.paint.get("fill-extrusion-opacity");0!==o&&"translucent"===t.renderPass&&(n=new ei(t.context.gl.LEQUAL,ei.ReadWrite,t.depthRangeFor3D),1!==o||i.paint.get("fill-extrusion-pattern").constantOr(1)?(an(t,e,i,r,n,ii.disabled,ri.disabled),an(t,e,i,r,n,t.stencilModeFor3D(),t.colorModeForRenderPass())):(o=t.colorModeForRenderPass(),an(t,e,i,r,n,ii.disabled,o)))},hillshade:function(t,e,i,r){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=t.depthModeForSublayer(0,ei.ReadOnly),a=t.colorModeForRenderPass(),r="translucent"===t.renderPass?t.stencilConfigForOverlap(r):[{},r],s=r[0],l=0,u=r[1];l<u.length;l+=1){var c=u[l],p=e.getTile(c);p.needsHillshadePrepare&&"offscreen"===t.renderPass?(h=t,f=p,d=i,m=o,y=ii.disabled,_=a,T=S=w=b=x=v=g=void 0,w=h.context,S=w.gl,(T=f.dem)&&T.data&&(g=T.dim,v=T.stride,b=T.getPixels(),w.activeTexture.set(S.TEXTURE1),w.pixelStoreUnpackPremultiplyAlpha.set(!1),f.demTexture=f.demTexture||h.getTileTexture(v),f.demTexture?((x=f.demTexture).update(b,{premultiply:!1}),x.bind(S.NEAREST,S.CLAMP_TO_EDGE)):(f.demTexture=new ot.Texture(w,b,S.RGBA,{premultiply:!1}),f.demTexture.bind(S.NEAREST,S.CLAMP_TO_EDGE)),w.activeTexture.set(S.TEXTURE0),(x=f.fbo)||((b=new ot.Texture(w,{width:g,height:g,data:null},S.RGBA)).bind(S.LINEAR,S.CLAMP_TO_EDGE),(x=f.fbo=w.createFramebuffer(g,g,!0)).colorAttachment.set(b.texture)),w.bindFramebuffer.set(x.framebuffer),w.viewport.set([0,0,g,g]),h.useProgram("hillshadePrepare").draw(w,S.TRIANGLES,m,y,_,ni.disabled,(m=f.tileID,_=(y=T).stride,T=ot.create(),ot.ortho(T,0,ot.EXTENT,-ot.EXTENT,0,0,1),ot.translate(T,T,[0,-ot.EXTENT,0]),{u_matrix:T,u_image:1,u_dimension:[_,_],u_zoom:m.overscaledZ,u_unpack:y.getUnpackVector()}),d.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments),f.needsHillshadePrepare=!1)):"translucent"===t.renderPass&&(S=t,T=p,_=i,m=o,y=s[c.overscaledZ],d=a,c=p=f=h=void 0,f=S.context,p=f.gl,(c=T.fbo)&&(h=S.useProgram("hillshade"),f.activeTexture.set(p.TEXTURE0),p.bindTexture(p.TEXTURE_2D,c.colorAttachment.get()),T=function(t,e,i){var r=i.paint.get("hillshade-shadow-color"),n=i.paint.get("hillshade-highlight-color"),o=i.paint.get("hillshade-accent-color"),a=i.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===i.paint.get("hillshade-illumination-anchor")&&(a-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:(s=e.tileID,e=Math.pow(2,s.canonical.z),s=s.canonical.y,[new ot.MercatorCoordinate(0,s/e).toLngLat().lat,new ot.MercatorCoordinate(0,(s+1)/e).toLngLat().lat]),u_light:[i.paint.get("hillshade-exaggeration"),a],u_shadow:r,u_highlight:n,u_accent:o}}(S,T,_),h.draw(f,p.TRIANGLES,m,y,d,ni.disabled,T,_.id,S.rasterBoundsBuffer,S.quadTriangleIndexBuffer,S.rasterBoundsSegments)))}n.viewport.set([0,0,t.width,t.height])}var h,f,d,m,y,_,g,v,x,b,w,S,T},raster:function(t,e,i,r){if("translucent"===t.renderPass&&0!==i.paint.get("raster-opacity")&&r.length)for(var n=t.context,o=n.gl,a=e.getSource(),s=t.useProgram("raster"),l=t.colorModeForRenderPass(),r=a instanceof N?[{},r]:t.stencilConfigForOverlap(r),u=r[0],r=r[1],c=r[r.length-1].overscaledZ,p=!t.options.moving,h=0,f=r;h<f.length;h+=1){var d=f[h],m=t.depthModeForSublayer(d.overscaledZ-c,1===i.paint.get("raster-opacity")?ei.ReadWrite:ei.ReadOnly,o.LESS),y=e.getTile(d),_=t.transform.calculatePosMatrix(d.toUnwrapped(),p);y.registerFadeDuration(i.paint.get("raster-fade-duration"));var g=e.findLoadedParent(d,0),v=function(t,e,i,r,n){if(0<(a=r.paint.get("raster-fade-duration"))){var o=ot.browser.now(),r=(o-t.timeAdded)/a,a=e?(o-e.timeAdded)/a:-1,i=i.getSource(),i=n.coveringZoomLevel({tileSize:i.tileSize,roundZoom:i.roundZoom}),i=!e||Math.abs(e.tileID.overscaledZ-i)>Math.abs(t.tileID.overscaledZ-i),a=i&&t.refreshedUponExpiration?1:ot.clamp(i?r:1-a,0,1);return t.refreshedUponExpiration&&1<=r&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-a}:{opacity:a,mix:0}}return{opacity:1,mix:0}}(y,g,e,i,t.transform),x=void 0,b=void 0,w="nearest"===i.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),g?(g.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,g.tileID.overscaledZ-y.tileID.overscaledZ
1),b=[y.tileID.canonical.x*x%1,y.tileID.canonical.y*x%1]):y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);v=Kr(_,b||[0,0],x||1,v,i);a instanceof N?s.draw(n,o.TRIANGLES,m,ii.disabled,l,ni.disabled,v,i.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(n,o.TRIANGLES,m,u[d.overscaledZ],l,ni.disabled,v,i.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,i){var r,n,o,a,s,l,u,c,p,h,f=i.paint.get("background-color"),d=i.paint.get("background-opacity");if(0!==d){var m=t.context,y=m.gl,_=t.transform,g=_.tileSize,v=i.paint.get("background-pattern");if(!t.isPatternMissing(v)){var x=!v&&1===f.a&&1===d&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass===x){var b=ii.disabled,w=t.depthModeForSublayer(0,"opaque"==x?ei.ReadWrite:ei.ReadOnly),S=t.colorModeForRenderPass(),T=t.useProgram(v?"backgroundPattern":"background"),_=_.coveringTiles({tileSize:g});v&&(m.activeTexture.set(y.TEXTURE0),t.imageManager.bind(t.context));for(var I=i.getCrossfadeParameters(),E=0,A=_;E<A.length;E+=1){var z=A[E],P=t.transform.calculatePosMatrix(z.toUnwrapped()),P=v?(r=P,n=d,o=t,a=v,s={tileID:z,tileSize:g},l=I,z=h=p=c=u=void 0,ot.extend((u=a,c=l,h=s,z=(p=o).imageManager.getPattern(u.from.toString()),a=p.imageManager.getPattern(u.to.toString()),l=p.imageManager.getPixelSize(),s=l.width,o=l.height,u=Math.pow(2,h.tileID.overscaledZ),l=h.tileSize*Math.pow(2,p.transform.tileZoom)/u,u=l*(h.tileID.canonical.x+h.tileID.wrap*u),l*=h.tileID.canonical.y,{u_image:0,u_pattern_tl_a:z.tl,u_pattern_br_a:z.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,o],u_mix:c.t,u_pattern_size_a:z.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:c.fromScale,u_scale_b:c.toScale,u_tile_units_to_pixels:1/Ui(h,1,p.transform.tileZoom),u_pixel_coord_upper:[u>>16,l>>16],u_pixel_coord_lower:[65535&u,65535&l]}),{u_matrix:r,u_opacity:n})):{u_matrix:P,u_opacity:d,u_color:f};T.draw(m,y.TRIANGLES,w,b,S,ni.disabled,P,i.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,i){for(var r=0;r<i.length;r++)!function(t,e,i){var r=t.context,n=r.gl,o=i.posMatrix,a=t.useProgram("debug"),s=ei.disabled,l=ii.disabled,u=t.colorModeForRenderPass();r.activeTexture.set(n.TEXTURE0),t.emptyTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE),a.draw(r,n.LINE_STRIP,s,l,u,ni.disabled,Gr(o,ot.Color.red),"$debug",t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var c=e.getTileByID(i.key).latestRawTileData,u=Math.floor((c&&c.byteLength||0)/1024),c=e.getTile(i).tileSize,e=512/Math.min(c,512)*(i.overscaledZ/t.transform.zoom)*.5,c=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(c+=" => "+i.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var i=t.debugOverlayCanvas,r=t.context.gl,n=t.debugOverlayCanvas.getContext("2d");n.clearRect(0,0,i.width,i.height),n.shadowColor="white",n.shadowBlur=2,n.lineWidth=1.5,n.strokeStyle="white",n.textBaseline="top",n.font="bold 36px Open Sans, sans-serif",n.fillText(e,5,5),n.strokeText(e,5,5),t.debugOverlayTexture.update(i),t.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(t,c+" "+u+"kb"),a.draw(r,n.TRIANGLES,s,l,ri.alphaBlended,ni.disabled,Gr(o,ot.Color.transparent,e),"$debug",t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}(t,e,i[r])},custom:function(t,e,i){var r,n=t.context,i=i.implementation;"offscreen"===t.renderPass?(r=i.prerender)&&(t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),r.call(i,n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState()):"translucent"===t.renderPass&&(t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),n.setStencilMode(ii.disabled),r="3d"===i.renderingMode?new ei(t.context.gl.LEQUAL,ei.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,ei.ReadOnly),n.setDepthMode(r),i.render(n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState(),n.bindFramebuffer.set(null))}};mn.prototype.resize=function(t,e){if(this.width=t*ot.browser.devicePixelRatio,this.height=e*ot.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,r=this.style._order;i<r.length;i+=1)this.style._layers[r[i]].resize()},mn.prototype.setup=function(){var t=this.context,e=new ot.StructArrayLayout2i4;e.emplaceBack(0,0),e.emplaceBack(ot.EXTENT,0),e.emplaceBack(0,ot.EXTENT),e.emplaceBack(ot.EXTENT,ot.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(e,vr.members),this.tileExtentSegments=ot.SegmentVector.simpleSegment(0,0,4,2);e=new ot.StructArrayLayout2i4;e.emplaceBack(0,0),e.emplaceBack(ot.EXTENT,0),e.emplaceBack(0,ot.EXTENT),e.emplaceBack(ot.EXTENT,ot.EXTENT),this.debugBuffer=t.createVertexBuffer(e,vr.members),this.debugSegments=ot.SegmentVector.simpleSegment(0,0,4,5);e=new ot.StructArrayLayout4i8;e.emplaceBack(0,0,0,0),e.emplaceBack(ot.EXTENT,0,ot.EXTENT,0),e.emplaceBack(0,ot.EXTENT,0,ot.EXTENT),e.emplaceBack(ot.EXTENT,ot.EXTENT,ot.EXTENT,ot.EXTENT),this.rasterBoundsBuffer=t.createVertexBuffer(e,V.members),this.rasterBoundsSegments=ot.SegmentVector.simpleSegment(0,0,4,2);e=new ot.StructArrayLayout2i4;
1e.emplaceBack(0,0),e.emplaceBack(1,0),e.emplaceBack(0,1),e.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(e,vr.members),this.viewportSegments=ot.SegmentVector.simpleSegment(0,0,4,2);e=new ot.StructArrayLayout1ui2;e.emplaceBack(0),e.emplaceBack(1),e.emplaceBack(3),e.emplaceBack(2),e.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(e);e=new ot.StructArrayLayout3ui6;e.emplaceBack(0,1,2),e.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(e),this.emptyTexture=new ot.Texture(t,{width:1,height:1,data:new Uint8Array([0,0,0,0])},t.gl.RGBA);t=this.context.gl;this.stencilClearMode=new ii({func:t.ALWAYS,mask:0},0,255,t.ZERO,t.ZERO,t.ZERO)},mn.prototype.clearStencil=function(){var t=this.context,e=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=ot.create();ot.ortho(i,0,this.width,this.height,0,0,1),ot.scale(i,i,[e.drawingBufferWidth,e.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,e.TRIANGLES,ei.disabled,this.stencilClearMode,ri.disabled,ni.disabled,qr(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},mn.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var i=this.context,r=i.gl;256<this.nextStencilID+e.length&&this.clearStencil(),i.setColorMode(ri.disabled),i.setDepthMode(ei.disabled);var n=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;n.draw(i,r.TRIANGLES,ei.disabled,new ii({func:r.ALWAYS,mask:0},l,255,r.KEEP,r.KEEP,r.REPLACE),ri.disabled,ni.disabled,qr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},mn.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,256<this.nextStencilID+1&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new ii({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},mn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new ii({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},mn.prototype.stencilConfigForOverlap=function(t){var e=this.context.gl,i=t.sort(function(t,e){return e.overscaledZ-t.overscaledZ}),r=i[i.length-1].overscaledZ,n=i[0].overscaledZ-r+1;if(1<n){this.currentStencilSource=void 0,256<this.nextStencilID+n&&this.clearStencil();for(var o={},a=0;a<n;a++)o[a+r]=new ii({func:e.GEQUAL,mask:255},a+this.nextStencilID,255,e.KEEP,e.KEEP,e.REPLACE);return this.nextStencilID+=n,[o,i]}return[((t={})[r]=ii.disabled,t),i]},mn.prototype.colorModeForRenderPass=function(){var t=this.context.gl;return this._showOverdrawInspector?new ri([t.CONSTANT_COLOR,t.ONE],new ot.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?ri.unblended:ri.alphaBlended},mn.prototype.depthModeForSublayer=function(t,e,i){if(!this.opaquePassEnabledForLayer())return ei.disabled;t=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new ei(i||this.context.gl.LEQUAL,e,[t,t])},mn.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},mn.prototype.render=function(t,e){var i=this;this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(ot.browser.now()),this.imageManager.beginFrame();var r,n=this.style._order,o=this.style.sourceCaches;for(r in o){var a=o[r];a.used&&a.prepare(this.context)}var s,l,u,c={},p={},h={};for(u in o){var f=o[u];c[u]=f.getVisibleCoordinates(),p[u]=c[u].slice().reverse(),h[u]=f.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var d=0;d<n.length;d++)if(this.style._layers[n[d]].is3D()){this.opaquePassCutoff=d;break}this.renderPass="offscreen";for(var m=0,y=n;m<y.length;m+=1){var _,g=this.style._layers[y[m]];g.hasOffscreenPass()&&!g.isHidden(this.transform.zoom)&&(_=p[g.source],"custom"!==g.type&&!_.length||this.renderLayer(this,o[g.source],g,_))}for(this.context.bindFramebuffer.set(null),this.context.clear({color:e.showOverdrawInspector?ot.Color.black:ot.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=e.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=n.length-1;0<=this.currentLayer;this.currentLayer--){var v=this.style._layers[n[this.currentLayer]],x=o[v.source],b=c[v.source];this._renderTileClippingMasks(v,b),this.renderLayer(this,x,v,b)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var w=this.style._layers[n[this.currentLayer]],S=o[w.source],T=("symbol"===w.type?h:p)[w.source];this._renderTileClippingMasks(w,c[w.source]),this.renderLayer(this,S,w,T)}this.options.showTileBoundaries&&(ot.values(this.style._layers).forEac
1h(function(t){t.source&&!t.isHidden(i.transform.zoom)&&(t.source!==(l&&l.id)&&(l=i.style.sourceCaches[t.source]),(!s||s.getSource().maxzoom<l.getSource().maxzoom)&&(s=l))}),s&&yn.debug(this,s,s.getVisibleCoordinates())),this.options.showPadding&&function(t){var e=t.transform.padding;hn(t,t.transform.height-(e.top||0),3,sn),hn(t,e.bottom||0,3,ln),fn(t,e.left||0,3,un),fn(t,t.transform.width-(e.right||0),3,cn);var i,r=t.transform.centerPoint;i=t,e=r.x,t=t.transform.height-r.y,dn(i,e-1,t-10,2,20,r=pn),dn(i,e-10,t-1,20,2,r)}(this),this.context.setDefault()},mn.prototype.renderLayer=function(t,e,i,r){i.isHidden(this.transform.zoom)||"background"!==i.type&&"custom"!==i.type&&!r.length||(this.id=i.id,this.gpuTimingStart(i),yn[i.type](t,e,i,r,this.style.placement.variableOffsets),this.gpuTimingEnd())},mn.prototype.gpuTimingStart=function(t){var e,i;this.options.gpuTiming&&(e=this.context.extTimerQuery,(i=(i=this.gpuTimers[t.id])||(this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()})).calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,i.query
1))},mn.prototype.gpuTimingEnd=function(){var t;this.options.gpuTiming&&(t=this.context.extTimerQuery).endQueryEXT(t.TIME_ELAPSED_EXT)},mn.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},mn.prototype.queryGpuTimers=function(t){var e,i={};for(e in t){var r=t[e],n=this.context.extTimerQuery,o=n.getQueryObjectEXT(r.query,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(r.query),i[e]=o}return i},mn.prototype.translatePosMatrix=function(t,e,i,r,n){if(!i[0]&&!i[1])return t;var o=n?"map"===r?this.transform.angle:0:"viewport"===r?-this.transform.angle:0;o&&(r=Math.sin(o),o=Math.cos(o),i=[i[0]*o-i[1]*r,i[0]*r+i[1]*o]);e=[n?i[0]:Ui(e,i[0],this.transform.zoom),n?i[1]:Ui(e,i[1],this.transform.zoom),0],i=new Float32Array(16);return ot.translate(i,t,e),i},mn.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},mn.prototype.getTileTexture=function(t){t=this._tileTextures[t];return t&&0<t.length?t.pop():null},mn.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),t=this.imageManager.getPattern(t.to.toString());return!e||!t},mn.prototype.useProgram=function(t,e){this.cache=this.cache||{};var i=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[i]||(this.cache[i]=new Or(this.context,0,Rr[t],e,Qr[t],this._showOverdrawInspector)),this.cache[i]},mn.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()},mn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},mn.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=ot.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ot.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},mn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};function _n(t,e){this.points=t,this.planes=e}_n.fromInvProjectionMatrix=function(e,i,t){var r=Math.pow(2,t),n=[[-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(t){return ot.transformMat4([],t,e)}).map(function(t){return ot.scale$1([],t,1/t[3]/i*r)}),t=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(t){var e=ot.sub([],n[t[0]],n[t[1]]),i=ot.sub([],n[t[2]],n[t[1]]),i=ot.normalize([],ot.cross([],e,i)),t=-ot.dot(i,n[t[1]]);return i.concat(t)});return new _n(n,t)};function gn(t,e){this.min=t,this.max=e,this.center=ot.scale$2([],ot.add([],this.min,this.max),.5)}gn.prototype.quadrant=function(t){for(var e=[t%2==0,t<2],i=ot.clone$2(this.min),r=ot.clone$2(this.max),n=0;n<e.length;n++)i[n]=(e[n]?this.min:this.center)[n],r[n]=(e[n]?this.center:this.max)[n];return r[2]=this.max[2],new gn(i,r)},gn.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},gn.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},gn.prototype.intersects=function(t){for(var e=[[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]],i=!0,r=0;r<t.planes.length;r++){for(var n=t.planes[r],o=0,a=0;a<e.length;a++)o+=0<=ot.dot$1(n,e[a]);if(0===o)return 0;o!==e.length&&(i=!1)}if(i)return 2;for(var s=0;s<3;s++){for(var l=Number.MAX_VALUE,u=-Number.MAX_VALUE,c=0;c<t.points.length;c++)var p=t.points[c][s]-this.min[s],l=Math.min(l,p),u=Math.max(u,p);if(u<0||l>this.max[s]-this.min[s])return 0}return 1};function vn(t,e,i,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(i)||i<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=i,this.right=r}
vendor: 16,887 bytes, line 1
1vn.prototype.interpolate=function(t,e,i){return null!=e.top&&null!=t.top&&(this.top=ot.number(t.top,e.top,i)),null!=e.bottom&&null!=t.bottom&&(this.bottom=ot.number(t.bottom,e.bottom,i)),null!=e.left&&null!=t.left&&(this.left=ot.number(t.left,e.left,i)),null!=e.right&&null!=t.right&&(this.right=ot.number(t.right,e.right,i)),this},vn.prototype.getCenter=function(t,e){t=ot.clamp((this.left+t-this.right)/2,0,t),e=ot.clamp((this.top+e-this.bottom)/2,0,e);return new ot.Point(t,e)},vn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},vn.prototype.clone=function(){return new vn(this.top,this.bottom,this.left,this.right)},vn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};function xn(t,e,i,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=t||0,this._maxZoom=e||22,this._minPitch=null==i?0:i,this._maxPitch=null==r?60:r,this.setMaxBounds(),this.width=0,this.height=0,this._center=new ot.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new vn,this._posMatrixCache={},this._alignedPosMatrixCache={}}U={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}};xn.prototype.clone=function(){var t=new xn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},U.minZoom.get=function(){return this._minZoom},U.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},U.maxZoom.get=function(){return this._maxZoom},U.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},U.minPitch.get=function(){return this._minPitch},U.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},U.maxPitch.get=function(){return this._maxPitch},U.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},U.renderWorldCopies.get=function(){return this._renderWorldCopies},U.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},U.worldSize.get=function(){return this.tileSize*this.scale},U.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},U.size.get=function(){return new ot.Point(this.width,this.height)},U.bearing.get=function(){return-this.angle/Math.PI*180},U.bearing.set=function(t){t=-ot.wrap(t,-180,180)*Math.PI/180;this.angle!==t&&(this._unmodified=!1,this.angle=t,this._calcMatrices(),this.rotationMatrix=ot.create$2(),ot.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},U.pitch.get=function(){return this._pitch/Math.PI*180},U.pitch.set=function(t){t=ot.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==t&&(this._unmodified=!1,this._pitch=t,this._calcMatrices())},U.fov.get=function(){return this._fov/Math.PI*180},U.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},U.zoom.get=function(){return this._zoom},U.zoom.set=function(t){t=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},U.center.get=function(){return this._center},U.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},U.padding.get=function(){return this._edgeInsets.toJSON()},U.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},U.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},xn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},xn.prototype.interpolatePadding=function(t,e,i){this._unmodified=!1,this._edgeInsets.interpolate(t,e,i),this._constrain(),this._calcMatrices()},xn.prototype.coveringZoomLevel=function(t){t=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,t)},xn.prototype.getVisibleUnwrappedCoordinates=function(t){var e=[new ot.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new ot.Point(0,0)),r=this.pointCoordinate(new ot.Point(this.width,0)),n=this.pointCoordinate(new ot.Point(this.width,this.height)),o=this.pointCoordinate(new ot.Point(0,this.height)),a=Math.floor(Math.min(i.x,r.x,n.x,o.x)),s=Math.floor(Math.max(i.x,r.x,n.x,o.x)),l=a-1;l<=s+1;l++)0!==l&&e.push(new ot.UnwrappedTileID(l,t));return e},xn.prototype.coveringTiles=function(t){var e=this.coveringZoomLevel(t),i=e;if(void 0!==t.minzoom&&e<t.minzoom)return[];void 0!==t.maxzoom&&e>t.maxzoom&&(e=t.maxzoom);var r=ot.MercatorCoordinate.fromLngLat(this.center),n=Math.pow(2,e),o=[n*r.x,n*r.y,0],a=_n.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,e),s=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(s=e);function l(t){return{aabb:new gn([t*n,0,0],[(t+1)*n,n,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}}var u=[],c=[],p=e,h=t.reparseOverscaled?i:e;if(this._renderWorldCopies)for(var f=1;f<=3;f++)u.push(l(-f)),u.push(l(f));for(u.push(l(0));0<u.length;){var d=u.pop(),m=d.x,y=d.y,_=d.fullyVisible;if(!_){var g=d.aabb.intersects(a);if(0===g)continue;_=2===g}var v=d.aabb.distanceX(o),g=d.aabb.distanceY(o),g=Math.max(Math.abs(v),Math.abs(g));if(d.zoom===p||g>3+(1<<p-d.zoom)-2&&d.zoom>=s)c.push({tileID:new ot.OverscaledTileID(d.zoom===p?h:d.zoom,d.wrap,d.zoom,m,y),distanceSq:ot.sqrLen([o[0]-.5-m,o[1]-.5-y])});else for(var x=0;x<4;x++){var b=(m<<1)+x%2,w=(y<<1)+(x>>1);u.push({aabb:d.aabb.quadrant(x),zoom:d.zoom+1,x:b,y:w,wrap:d.wrap,fullyVisible:_})}}return c.sort(function(t,e){return t.distanceSq-e.distanceSq}).map(function(t){return t.tileID})},xn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},U.unmodified.get=function(){return this._unmodified},xn.prototype.zoomScale=function(t){return Math.pow(2,t)},xn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},xn.prototype.project=function(t){var e=ot.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new ot.Point(ot.mercatorXfromLng(t.lng)*this.worldSize,ot.mercatorYfromLat(e)*this.worldSize)},xn.prototype.unproject=function(t){return new ot.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},U.point.get=function(){return this.project(this.center)},xn.prototype.setLocationAtPoint=function(t,e){var i=this.pointCoordinate(e),e=this.pointCoordinate(this.centerPoint),t=this.locationCoordinate(t),e=new ot.MercatorCoordinate(t.x-(i.x-e.x),t.y-(i.y-e.y));this.center=this.coordinateLocation(e),this._renderWorldCopies&&(this.center=this.center.wrap())},xn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},xn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},xn.prototype.locationCoordinate=function(t){return ot.MercatorCoordinate.fromLngLat(t)},xn.prototype.coordinateLocation=function(t){return t.toLngLat()},xn.prototype.pointCoordinate=function(t){var e=[t.x,t.y,0,1],i=[t.x,t.y,1,1];ot.transformMat4(e,e,this.pixelMatrixInverse),ot.transformMat4(i,i,this.pixelMatrixInverse);var r=e[3],n=i[3],o=e[1]/r,a=i[1]/n,s=e[2]/r,t=i[2]/n,s=s==t?0:(0-s)/(t-s);return new ot.MercatorCoordinate(ot.number(e[0]/r,i[0]/n,s)/this.worldSize,ot.number(o,a,s)/this.worldSize)},xn.prototype.coordinatePoint=function(t){t=[t.x*this.worldSize,t.y*this.worldSize,0,1];return ot.transformMat4(t,t,this.pixelMatrix),new ot.Point(t[0]/t[3],t[1]/t[3])},xn.prototype.getBounds=function(){return(new ot.LngLatBounds).extend(this.pointLocation(new ot.Point(0,0))).extend(this.pointLocation(new ot.Point(this.width,0))).extend(this.pointLocation(new ot.Point(this.width,this.height))).extend(this.pointLocation(new ot.Point(0,this.height)))},xn.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new ot.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},xn.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},xn.prototype.calculatePosMatrix=function(t,e){void 0===e&&(e=!1);var i=t.key,r=e?this._alignedPosMatrixCache:this._posMatrixCache;if(r[i])return r[i];var n=t.canonical,o=this.worldSize/this.zoomScale(n.z),a=n.x+Math.pow(2,n.z)*t.wrap,t=ot.identity(new Float64Array(16));return ot.translate(t,t,[a*o,n.y*o,0]),ot.scale(t,t,[o/ot.EXTENT,o/ot.EXTENT,1]),ot.multiply(t,e?this.alignedProjMatrix:this.projMatrix,t),r[i]=new Float32Array(t),r[i]},xn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},xn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,i,r,n=-90,o=90,a=-180,s=180,l=this.size,u=this._unmodified;this.latRange&&(p=this.latRange,n=ot.mercatorYfromLat(p[1])*this.worldSize,i=(o=ot.mercatorYfromLat(p[0])*this.worldSize)-n<l.y?l.y/(o-n):0),this.lngRange&&(h=this.lngRange,a=ot.mercatorXfromLng(h[0])*this.worldSize,r=(s=ot.mercatorXfromLng(h[1])*this.worldSize)-a<l.x?l.x/(s-a):0);var c,p=this.point,h=Math.max(r||0,i||0);if(h)return this.center=this.unproject(new ot.Point(r?(s+a)/2:p.x,i?(o+n)/2:p.y)),this.zoom+=this.scaleZoom(h),this._unmodified=u,void(this._constraining=!1);this.latRange&&((h=p.y)-(c=l.y/2)<n&&(e=n+c),o<h+c&&(e=o-c)),this.lngRange&&((c=p.x)-(l=l.x/2)<a&&(t=a+l),s<c+l&&(t=s-l)),void 0===t&&void 0===e||(this.center=this.unproject(new ot.Point(void 0!==t?t:p.x,void 0!==e?e:p.y))),this._unmodified=u,this._constraining=!1}},xn.prototype._calcMatrices=function(){if(this.height){var t=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=Math.PI/2+this._pitch,i=this._fov*(.5+t.y/this.height),r=Math.sin(i)*this.cameraToCenterDistance/Math.sin(ot.clamp(Math.PI-e-i,.01,Math.PI-.01)),n=this.point,o=n.x,a=n.y,e=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),i=this.height/50,n=new Float64Array(16);ot.perspective(n,this._fov,this.width/this.height,i,e),n[8]=2*-t.x/this.width,n[9]=2*t.y/this.height,ot.scale(n,n,[1,-1,1]),ot.translate(n,n,[0,0,-this.cameraToCenterDistance]),ot.rotateX(n,n,this._pitch),ot.rotateZ(n,n,this.angle),ot.translate(n,n,[-o,-a,0]),this.mercatorMatrix=ot.scale([],n,[this.worldSize,this.worldSize,this.worldSize]),ot.scale(n,n,[1,1,ot.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=n,this.invProjMatrix=ot.invert([],this.projMatrix);r=this.width%2/2,i=this.height%2/2,e=Math.cos(this.angle),t=Math.sin(this.angle),o=o-Math.round(o)+e*r+t*i,t=a-Math.round(a)+e*i+t*r,r=new Float64Array(n);if(ot.translate(r,r,[.5<o?o-1:o,.5<t?t-1:t,0]),this.alignedProjMatrix=r,n=ot.create(),ot.scale(n,n,[this.width/2,-this.height/2,1]),ot.translate(n,n,[1,-1,0]),this.labelPlaneMatrix=n,n=ot.create(),ot.scale(n,n,[1,-1,1]),ot.translate(n,n,[-1,-1,0]),ot.scale(n,n,[2/this.width,2/this.height,1]),this.glCoordMatrix=n,this.pixelMatrix=ot.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(n=ot.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n,this._posMatrixCache={},this._alignedPosMatrixCache={}}},xn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new ot.Point(0,0)),t=[t.x*this.worldSize,t.y*this.worldSize,0,1];return ot.transformMat4(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance},xn.prototype.getCameraPoint=function(){var t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new ot.Point(0,t))},xn.prototype.getCameraQueryGeometry=function(t){var e=this.getCameraPoint();if(1===t.length)return[t[0],e];for(var i=e.x,r=e.y,n=e.x,o=e.y,a=0,s=t;a<s.length;a+=1)var l=s[a],i=Math.min(i,l.x),r=Math.min(r,l.y),n=Math.max(n,l.x),o=Math.max(o,l.y);return[new ot.Point(i,r),new ot.Point(n,r),new ot.Point(n,o),new ot.Point(i,o),new ot.Point(i,r)]},Object.defineProperties(xn.prototype,U);function bn(t){var e,i,r,n;this._hashName=t&&encodeURIComponent(t),ot.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),i=!1,r=null,n=function(){r=null,i&&(e(),r=setTimeout(n,300),i=!1)},function(){return i=!0,r||n(),r})}bn.prototype.addTo=function(t){return this._map=t,ot.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},bn.prototype.remove=function(){return ot.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},bn.prototype.getHashString=function(t){var e=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,r=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),n=Math.pow(10,r),o=Math.round(e.lng*n)/n,r=Math.round(e.lat*n)/n,e=this._map.getBearing(),n=this._map.getPitch(),a="";if(a+=t?"/"+o+"/"+r+"/"+i:i+"/"+r+"/"+o,(e||n)&&(a+="/"+Math.round(10*e)/10),n&&(a+="/"+Math.round(n)),this._hashName){var s=this._hashName,l=!1,n=ot.window.location.hash.slice(1).split("&").map(function(t){var e=t.split("=")[0];return e===s?(l=!0,e+"="+a):t}).filter(function(t){return t});return l||n.push(s+"="+a),"#"+n.join("&")}return"#"+a},bn.prototype._getCurrentHash=function(){var e,i=this,t=ot.window.location.hash.replace("#","");return this._hashName?(t.split("&").map(function(t){return t.split("=")}).forEach(function(t){t[0]===i._hashName&&(e=t)}),(e&&e[1]||"").split("/")):t.split("/")},bn.prototype._onHashChange=function(){var t=this._getCurrentHash();if(3<=t.length&&!t.some(function(t){return isNaN(t)})){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},bn.prototype._updateHashUnthrottled=function(){var t=ot.window.location.href.replace(/(#.+)?$/,this.getHashString());try{ot.window.history.replaceState(ot.window.history.state,null,t)}catch(t){}};function wn(t){this._map=t,this.clear()}var j={linearity:.3,easing:ot.bezier(0,0,.3,1)},Sn=ot.extend({deceleration:2500,maxSpeed:1400},j),Tn=ot.extend({deceleration:20,maxSpeed:1400},j),In=ot.extend({deceleration:1e3,maxSpeed:360},j),En=ot.extend({deceleration:1e3,maxSpeed:90},j);function An(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function zn(t,e,i){var r=i.maxSpeed,n=i.linearity,o=i.deceleration,r=ot.clamp(t*n/(e/1e3),-r,r),n=Math.abs(r)/(o*n);return{easing:i.easing,duration:1e3*n,amount:r*(n/2)}}wn.prototype.clear=function(){this._inertiaBuffer=[]},wn.prototype.record=function(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:ot.browser.now(),settings:t})},wn.prototype._drainInertiaBuffer=function(){for(var t=this._inertiaBuffer,e=ot.browser.now();0<t.length&&160<e-t[0].time;)t.shift()},wn.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var e={zoom:0,bearing:0,pitch:0,pan:new ot.Point(0,0),pinchAround:void 0,around:void 0},i=0,r=this._inertiaBuffer;i<r.length;i+=1){var n=r[i].settings;e.zoom+=n.zoomDelta||0,e.bearing+=n.bearingDelta||0,e.pitch+=n.pitchDelta||0,n.panDelta&&e.pan._add(n.panDelta),n.around&&(e.around=n.around),n.pinchAround&&(e.pinchAround=n.pinchAround)}var o,a,s=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,l={};return e.pan.mag()&&(t=zn(e.pan.mag(),s,ot.extend({},Sn,t||{})),l.offset=e.pan.mult(t.amount/e.pan.mag()),l.center=this._map.transform.center,An(l,t)),e.zoom&&(o=zn(e.zoom,s,Tn),l.zoom=this._map.transform.zoom+o.amount,An(l,o)),e.bearing&&(o=zn(e.bearing,s,In),l.bearing=this._map.transform.bearing+ot.clamp(o.amount,-1
179,179),An(l,o)),e.pitch&&(a=zn(e.pitch,s,En),l.pitch=this._map.transform.pitch+a.amount,An(l,a)),(l.zoom||l.bearing)&&(a=void 0===e.pinchAround?e.around:e.pinchAround,l.around=a?this._map.unproject(a):this._map.getCenter()),this.clear(),ot.extend(l,{noMoveStart:!0})}};function Pn(t,e){this._map=t,this._clickTolerance=e.clickTolerance}var Cn=function(a){function t(t,e,i,r){void 0===r&&(r={});var n=_.mousePos(e.getCanvasContainer(),i),o=e.unproject(n);a.call(this,t,ot.extend({point:n,lngLat:o,originalEvent:i},r)),this._defaultPrevented=!1,this.target=e}a&&(t.__proto__=a);var e={defaultPrevented:{configurable:!0}};return((t.prototype=Object.create(a&&a.prototype)).constructor=t).prototype.preventDefault=function(){this._defaultPrevented=!0},e.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,e),t}(ot.Event),kn=function(s){function t(t,e,i){var r="touchend"===t?i.changedTouches:i.touches,n=_.touchPos(e.getCanvasContainer(),r),o=n.map(function(t){return e.unproject(t)}),a=n.reduce(function(t,e,i,r){return t.add(e.div(r.length))},new ot.Point(0,0)),r=e.unproject(a);s.call(this,t,{points:n,point:a,lngLats:o,lngLat:r,originalEvent:i}),this._defaultPrevented=!1}s&&(t.__proto__=s);var e={defaultPrevented:{configurable:!0}};return((t.prototype=Object.create(s&&s.prototype)).constructor=t).prototype.preventDefault=function(){this._defaultPrevented=!0},e.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,e),t}(ot.Event),Mn=function(r){function t(t,e,i){r.call(this,t,{originalEvent:i}),this._defaultPrevented=!1}r&&(t.__proto__=r);var e={defaultPrevented:{configurable:!0}};return((t.prototype=Object.create(r&&r.prototype)).constructor=t).prototype.preventDefault=function(){this._defaultPrevented=!0},e.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,e),t}(ot.Event);Pn.prototype.reset=function(){delete this._mousedownPos},Pn.prototype.wheel=function(t){return this._firePreventable(new Mn(t.type,this._map,t))},Pn.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Cn(t.type,this._map,t))},Pn.prototype.mouseup=function(t){this._map.fire(new Cn(t.type,this._map,t))},Pn.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Cn(t.type,this._map,t))},Pn.prototype.dblclick=function(t){return this._firePreventable(new Cn(t.type,this._map,t))},Pn.prototype.mouseover=function(t){this._map.fire(new Cn(t.type,this._map,t))},Pn.prototype.mouseout=function(t){this._map.fire(new Cn(t.type,this._map,t))},Pn.prototype.touchstart=function(t){return this._firePreventable(new kn(t.type,this._map,t))},Pn.prototype.touchmove=function(t){this._map.fire(new kn(t.type,this._map,t))},Pn.prototype.touchend=function(t){this._map.fire(new kn(t.type,this._map,t))},Pn.prototype.touchcancel=function(t){this._map.fire(new kn(t.type,this._map,t))},Pn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Pn.prototype.isEnabled=function(){return!0},Pn.prototype.isActive=function(){return!1},Pn.prototype.enable=function(){},Pn.prototype.disable=function(){};function Dn(t){this._map=t}Dn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Dn.prototype.mousemove=function(t){this._map.fire(new Cn(t.type,this._map,t))},Dn.prototype.mousedown=function(){this._delayContextMenu=!0},Dn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Cn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Dn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Cn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Dn.prototype.isEnabled=function(){return!0},Dn.prototype.isActive=function(){return!1},Dn.prototype.enable=function(){},Dn.prototype.disable=function(){};function Ln(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1}function Bn(t,e){for(var i={},r=0;r<t.length;r++)i[t[r].identifier]=e[r];return i}Ln.prototype.isEnabled=function(){return!!this._enabled},Ln.prototype.isActive=function(){return!!this._active},Ln.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ln.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ln.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(_.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},Ln.prototype.mousemoveWindow=function(t,e){var i,r,n;this._active&&(n=e,this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance||(i=this._startPos,this._lastPos=n,this._box||(this._box=_.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t)),r=Math.min(i.x,n.x),e=Math.max(i.x,n.x),t=Math.min(i.y,n.y),n=Math.max(i.y,n.y),_.setTransform(this._box,"translate("+r+"px,"+t+"px)"),this._box.style.width=e-r+"px",this._box.style.height=n-t+"px"))},Ln.prototype.mouseupWindow=function(t,e){var i=this;if(this._active&&0===t.button){var r=this._startPos,n=e;if(this.reset(),_.suppressClick(),r.x!==n.x||r.y!==n.y)return this._map.fire(new ot.
1Event("boxzoomend",{originalEvent:t})),{cameraAnimation:function(t){return t.fitScreenCoordinates(r,n,i._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",t)}},Ln.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},Ln.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(_.remove(this._box),this._box=null),_.enableDrag(),delete this._startPos,delete this._lastPos},Ln.prototype._fireEvent=function(t,e){return this._map.fire(new ot.Event(t,{originalEvent:e}))};function Rn(t){this.reset(),this.numTouches=t.numTouches}Rn.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Rn.prototype.touchstart=function(t,e,i){(this.centroid||i.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),i.length===this.numTouches&&(this.centroid=function(t){for(var e=new ot.Point(0,0),i=0,r=t;i<r.length;i+=1)e._add(r[i]);return e.div(t.length)}(e),this.touches=Bn(i,e)))},Rn.prototype.touchmove=function(t,e,i){if(!this.aborted&&this.centroid){var r,n=Bn(i,e);for(r in this.touches){var o=n[r];(!o||30<o.dist(this.touches[r]))&&(this.aborted=!0)}}},Rn.prototype.touchend=function(t,e,i){if((!this.centroid||500<t.timeStamp-this.startTime)&&(this.aborted=!0),0===i.length){i=!this.aborted&&this.centroid;if(this.reset(),i)return i}};function Fn(t){this.singleTap=new Rn(t),this.numTaps=t.numTaps,this.reset()}Fn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Fn.prototype.touchstart=function(t,e,i){this.singleTap.touchstart(t,e,i)},Fn.prototype.touchmove=function(t,e,i){this.singleTap.touchmove(t,e,i)},Fn.prototype.touchend=function(t,e,i){var r=this.singleTap.touchend(t,e,i);if(r){e=t.timeStamp-this.lastTime<500,i=!this.lastTap||this.lastTap.dist(r)<30;if(e&&i||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}};function On(){this._zoomIn=new Fn({numTouches:1,numTaps:2}),this._zoomOut=new Fn({numTouches:2,numTaps:1}),this.reset()}On.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},On.prototype.touchstart=function(t,e,i){this._zoomIn.touchstart(t,e,i),this._zoomOut.touchstart(t,e,i)},On.prototype.touchmove=function(t,e,i){this._zoomIn.touchmove(t,e,i),this._zoomOut.touchmove(t,e,i)},On.prototype.touchend=function(e,t,i){var r=this,n=this._zoomIn.touchend(e,t,i),o=this._zoomOut.touchend(e,t,i);return n?(this._active=!0,e.preventDefault(),setTimeout(function(){return r.reset()},0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(n)},{originalEvent:e})}}):o?(this._active=!0,e.preventDefault(),setTimeout(function(){return r.reset()},0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(o)},{originalEvent:e})}}):void 0},On.prototype.touchcancel=function(){this.reset()},On.prototype.enable=function(){this._enabled=!0},On.prototype.disable=function(){this._enabled=!1,this.reset()},On.prototype.isEnabled=function(){return this._enabled},On.prototype.isActive=function(){return this._active};var Un={0:1,2:2},q=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};q.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},q.prototype._correctButton=function(t,e){return!1},q.prototype._move=function(t,e){return{}},q.prototype.mousedown=function(t,e){var i;this._lastPoint||(i=_.mouseButton(t),this._correctButton(t,i)&&(this._lastPoint=e,this._eventButton=i))},q.prototype.mousemoveWindow=function(e,t){var i=this._lastPoint;if(i)if(e.preventDefault(),function(t){t=Un[t];return void 0===e.buttons||(e.buttons&t)!==t}(this._eventButton))this.reset();else if(this._moved||!(t.dist(i)<this._clickTolerance))return this._moved=!0,this._lastPoint=t,this._move(i,t)},q.prototype.mouseupWindow=function(t){this._lastPoint&&_.mouseButton(t)===this._eventButton&&(this._moved&&_.suppressClick(),this.reset())},q.prototype.enable=function(){this._enabled=!0},q.prototype.disable=function(){this._enabled=!1,this.reset()},q.prototype.isEnabled=function(){return this._enabled},q.prototype.isActive=function(){return this._active};function Vn(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()}var Nn,jn,qn,Zn=((qn=q)&&(Hn.__proto__=qn),((Hn.prototype=Object.create(qn&&qn.prototype)).constructor=Hn).prototype.mousedown=function(t,e){qn.prototype.mousedown.call(this,t,e),this._lastPoint&&(this._active=!0)},Hn.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},Hn.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},Hn),Gn=((jn=q)&&(Kn.__proto__=jn),((Kn.prototype=Object.create(jn&&jn.prototype)).constructor=Kn).prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},Kn.prototype._move=function(t,e){t=.8*(e.x-t.x);if(t)return this._active=!0,{bearingDelta:t}},Kn.prototype.contextmenu=function(t){t.preventDefault()},Kn),Xn=((Nn=q)&&(Wn.__proto__=Nn),((Wn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Wn).prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},Wn.prototype._move=function(t,e){t=-.5*(e.y-t.y);if(t)return this._active=!0,{pitchDelta:t}},Wn.prototype.contextmenu=function(t){t.preventDefault()},Wn);function Wn(){Nn.apply(this,arguments)}function Kn(){jn.apply(this,arguments)}function Hn(){qn.apply(this,arguments)}Vn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new ot.Point(0,0)}
1,Vn.prototype.touchstart=function(t,e,i){return this._calculateTransform(t,e,i)},Vn.prototype.touchmove=function(t,e,i){if(this._active&&!(i.length<this._minTouches))return t.preventDefault(),this._calculateTransform(t,e,i)},Vn.prototype.touchend=function(t,e,i){this._calculateTransform(t,e,i),this._active&&i.length<this._minTouches&&this.reset()},Vn.prototype.touchcancel=function(){this.reset()},Vn.prototype._calculateTransform=function(t,e,i){0<i.length&&(this._active=!0);var r,n=Bn(i,e),o=new ot.Point(0,0),a=new ot.Point(0,0),s=0;for(r in n){var l=n[r],u=this._touches[r];u&&(o._add(l),a._add(l.sub(u)),s++,n[r]=l)}if(this._touches=n,!(s<this._minTouches)&&a.mag()){e=a.div(s);if(this._sum._add(e),!(this._sum.mag()<this._clickTolerance))return{around:o.div(s),panDelta:e}}},Vn.prototype.enable=function(){this._enabled=!0},Vn.prototype.disable=function(){this._enabled=!1,this.reset()},Vn.prototype.isEnabled=function(){return this._enabled},Vn.prototype.isActive=function(){return this._active};nt=function(){this.reset()};function Jn(t,e,i){for(var r=0;r<t.length;r++)if(t[r].identifier===i)return e[r]}function Yn(t,e){return Math.log(t/e)/Math.LN2}nt.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},nt.prototype._start=function(t){},nt.prototype._move=function(t,e,i){return{}},nt.prototype.touchstart=function(t,e,i){this._firstTwoTouches||i.length<2||(this._firstTwoTouches=[i[0].identifier,i[1].identifier],this._start([e[0],e[1]]))},nt.prototype.touchmove=function(t,e,i){if(this._firstTwoTouches){t.preventDefault();var r=this._firstTwoTouches,n=r[1],r=Jn(i,e,r[0]),e=Jn(i,e,n);if(r&&e){n=this._aroundCenter?null:r.add(e).div(2);return this._move([r,e],n,t)}}},nt.prototype.touchend=function(t,e,i){var r,n;this._firstTwoTouches&&(n=(r=this._firstTwoTouches)[1],r=Jn(i,e,r[0]),n=Jn(i,e,n),r&&n||(this._active&&_.suppressClick(),this.reset()))},nt.prototype.touchcancel=function(){this.reset()},nt.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},nt.prototype.disable=function(){this._enabled=!1,this.reset()},nt.prototype.isEnabled=function(){return this._enabled},nt.prototype.isActive=function(){return this._active};var Qn,$n=((Qn=nt)&&(to.__proto__=Qn),((to.prototype=Object.create(Qn&&Qn.prototype)).constructor=to).prototype.reset=function(){Qn.prototype.reset.call(this),delete this._distance,delete this._startDistance},to.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},to.prototype._move=function(t,e){var i=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(Yn(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Yn(this._distance,i),pinchAround:e}},to);function to(){Qn.apply(this,arguments)}function eo(t,e){return 180*t.angleWith(e)/Math.PI}var io,ro=((io=nt)&&(no.__proto__=io),((no.prototype=Object.create(io&&io.prototype)).constructor=no).prototype.reset=function(){io.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},no.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},no.prototype._move=function(t,e){var i=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:eo(this._vector,i),pinchAround:e}},no.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,t=eo(t,this._startVector);return Math.abs(t)<e},no);function no(){io.apply(this,arguments)}function oo(t){return Math.abs(t.y)>Math.abs(t.x)}function ao(){var t=uo;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}var so,lo=((so=nt)&&(co.__proto__=so),((co.prototype=Object.create(so&&so.prototype)).constructor=co).prototype.reset=function(){so.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},co.prototype._start=function(t){oo((this._lastPoints=t)[0].sub(t[1]))&&(this._valid=!1)}
1,co.prototype._move=function(t,e,i){var r=t[0].sub(this._lastPoints[0]),n=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(r,n,i.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(r.y+n.y)/2*-.5}},co.prototype.gestureBeginsVertically=function(t,e,i){if(void 0!==this._valid)return this._valid;var r=2<=t.mag(),n=2<=e.mag();if(r||n){if(!r||!n)return void 0===this._firstMove&&(this._firstMove=i),i-this._firstMove<100&&void 0;i=0<t.y==0<e.y;return oo(t)&&oo(e)&&i}},co),uo={panStep:100,bearingStep:15,pitchStep:10};function co(){so.apply(this,arguments)}function po(t){return t*(2-t)}ao.prototype.reset=function(){this._active=!1},ao.prototype.keydown=function(i){var r=this;if(!(i.altKey||i.ctrlKey||i.metaKey)){var n=0,o=0,a=0,s=0,l=0;switch(i.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:i.shiftKey?o=-1:(i.preventDefault(),s=-1);break;case 39:i.shiftKey?o=1:(i.preventDefault(),s=1);break;case 38:i.shiftKey?a=1:(i.preventDefault(),l=-1);break;case 40:i.shiftKey?a=-1:(i.preventDefault(),l=1);break;default:return}return this._rotationDisabled&&(a=o=0),{cameraAnimation:function(t){var e=t.getZoom();t.easeTo({duration:300,easeId:"keyboardHandler",easing:po,zoom:n?Math.round(e)+n*(i.shiftKey?2:1):e,bearing:t.getBearing()+o*r._bearingStep,pitch:t.getPitch()+a*r._pitchStep,offset:[-s*r._panStep,-l*r._panStep],center:t.getCenter()},{originalEvent:i})}}}},ao.prototype.enable=function(){this._enabled=!0},ao.prototype.disable=function(){this._enabled=!1,this.reset()},ao.prototype.isEnabled=function(){return this._enabled},ao.prototype.isActive=function(){return this._active},ao.prototype.disableRotation=function(){this._rotationDisabled=!0},ao.prototype.enableRotation=function(){this._rotationDisabled=!1};function ho(t,e){this._map=t,this._el=t.getCanvasContainer(),this._handler=e,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,ot.bindAll(["_onTimeout"],this)}ho.prototype.setZoomRate=function(t){this._defaultZoomRate=t},ho.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},ho.prototype.isEnabled=function(){return!!this._enabled},ho.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},ho.prototype.isZooming=function(){return!!this._zooming},ho.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},ho.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ho.prototype.wheel=function(t){var e,i,r;this.isEnabled()&&(e=t.deltaMode===ot.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,r=(i=ot.browser.now())-(this._lastWheelEventTime||0),this._lastWheelEventTime=i,0!==e&&e%4.000244140625==0?this._type="wheel":0!==e&&Math.abs(e)<4?this._type="trackpad":400<r?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(r*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&(this._lastWheelEvent=t,this._delta-=e,this._active||this._start(t)),t.preventDefault())}
1,ho.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},ho.prototype._start=function(t){this._delta&&(this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout),t=_.mousePos(this._el,t),this._around=ot.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(t)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame()))},ho.prototype.renderFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var e=this._map.transform;0!==this._delta&&(n="wheel"===this._type&&4.000244140625<Math.abs(this._delta)?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*n))),this._delta<0&&0!==a&&(a=1/a),o="number"==typeof this._targetZoom?e.zoomScale(this._targetZoom):e.scale,this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(o*a))),"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0);var i,r="number"==typeof this._targetZoom?this._targetZoom:e.zoom,n=this._startZoom,o=this._easing,a=!1;return"wheel"===this._type&&n&&o?(i=o(o=Math.min((ot.browser.now()-this._lastWheelEventTime)/200,1)),i=ot.number(n,r,i),o<1?this._frameId||(this._frameId=!0):a=!0):(i=r,a=!0),this._active=!0,a&&(this._active=!1,this._finishTimeout=setTimeout(function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!a,zoomDelta:i-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ho.prototype._smoothOutEasing=function(t){var e,i,r=ot.ease;return this._prevEase&&(i=this._prevEase,e=(ot.browser.now()-i.start)/i.duration,i=i.easing(.01+e)-i.easing(e),e=.27/Math.sqrt(i*i+1e-4)*.01,i=Math.sqrt(.0729-e*e),r=ot.bezier(e,i,.25,1)),this._prevEase={start:ot.browser.now(),duration:t,easing:r},r},ho.prototype.reset=function(){this._active=!1};function fo(t,e){this._clickZoom=t,this._tapZoom=e}fo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},fo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},fo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},fo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};function mo(){this.reset()}mo.prototype.reset=function(){this._active=!1},mo.prototype.dblclick=function(e,i){return e.preventDefault(),{cameraAnimation:function(t){t.easeTo({duration:300,zoom:t.getZoom()+(e.shiftKey?-1:1),around:t.unproject(i)},{originalEvent:e})}}},mo.prototype.enable=function(){this._enabled=!0},mo.prototype.disable=function(){this._enabled=!1,this.reset()},mo.prototype.isEnabled=function(){return this._enabled},mo.prototype.isActive=function(){return this._active};function yo(){this._tap=new Fn({numTouches:1,numTaps:1}),this.reset()}yo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},yo.prototype.touchstart=function(t,e,i){this._swipePoint||(this._tapTime&&500<t.timeStamp-this._tapTime&&this.reset(),this._tapTime?0<i.length&&(this._swipePoint=e[0],this._swipeTouch=i[0].identifier):this._tap.touchstart(t,e,i))},yo.prototype.touchmove=function(t,e,i){if(this._tapTime){if(this._swipePoint&&i[0].identifier===this._swipeTouch){var r=e[0],n=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:n/128}}}else this._tap.touchmove(t,e,i)},yo.prototype.touchend=function(t,e,i){this._tapTime?this._swipePoint&&0===i.length&&this.reset():this._tap.touchend(t,e,i)&&(this._tapTime=t.timeStamp)},yo.prototype.touchcancel=function(){this.reset()},yo.prototype.enable=function(){this._enabled=!0},yo.prototype.disable=function(){this._enabled=!1,this.reset()},yo.prototype.isEnabled=function(){return this._enabled},yo.prototype.isActive=function(){return this._active};
1function _o(t,e,i){this._el=t,this._mousePan=e,this._touchPan=i}_o.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},_o.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},_o.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},_o.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};function go(t,e,i){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=i}go.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},go.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},go.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},go.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};function vo(t,e,i,r){this._el=t,this._touchZoom=e,this._touchRotate=i,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}vo.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},vo.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},vo.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},vo.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},vo.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},vo.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};function xo(t){return t.zoom||t.drag||t.pitch||t.rotate}var bo,wo=((bo=ot.Event)&&(So.__proto__=bo),(So.prototype=Object.create(bo&&bo.prototype)).constructor=So);function So(){bo.apply(this,arguments)}function To(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}function Io(t,e){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new wn(t),this._bearingSnap=e.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(e),ot.bindAll(["handleEvent","handleWindowEvent"],this),e=this._el,this._listeners=[[e,"touchstart",{passive:!0}],[e,"touchmove",{passive:!1}],[e,"touchend",void 0],[e,"touchcancel",void 0],[e,"mousedown",void 0],[e,"mousemove",void 0],[e,"mouseup",void 0],[ot.window.document,"mousemove",{capture:!0}],[ot.window.document,"mouseup",void 0],[e,"mouseover",void 0],[e,"mouseout",void 0],[e,"dblclick",void 0],[e,"click",void 0],[e,"keydown",{capture:!1}],[e,"keyup",void 0],[e,"wheel",{passive:!1}],[e,"contextmenu",void 0],[ot.window,"blur",void 0]];for(var i=0,r=this._listeners;i<r.length;i+=1){var n=r[i],o=n[0];_.addEventListener(o,n[1],o===ot.window.document?this.handleWindowEvent:this.handleEvent,n[2])}}Io.prototype.destroy=function(){for(var t=0,e=this._listeners;t<e.length;t+=1){var i=e[t],r=i[0];_.removeEventListener(r,i[1],r===ot.window.document?this.handleWindowEvent:this.handleEvent,i[2])}},Io.prototype._addDefaultHandlers=function(t){var e=this._map,i=e.getCanvasContainer();this._add("mapEvent",new Pn(e,t));var r=e.boxZoom=new Ln(e,t);this._add("boxZoom",r);var n=new On,o=new mo;e.doubleClickZoom=new fo(o,n),this._add("tapZoom",n),this._add("clickZoom",o);r=new yo;this._add("tapDragZoom",r);n=e.touchPitch=new lo;this._add("touchPitch",n);o=new Gn(t),n=new Xn(t);e.dragRotate=new go(t,o,n),this._add("mouseRotate",o,["mousePitch"]),this._add("mousePitch",n,["mouseRotate"]);o=new Zn(t),n=new Vn(t);e.dragPan=new _o(i,o,n),this._add("mousePan",o),this._add("touchPan",n,["touchZoom","touchRotate"]);o=new ro,n=new $n;e.touchZoomRotate=new vo(i,n,o,r),this._add("touchRotate",o,["touchPan","touchZoom"]),this._add("touchZoom",n,["touchPan","touchRotate"]);n=e.scrollZoom=new ho(e,this);this._add("scrollZoom",n,["mousePan"]);n=e.keyboard=new ao;this._add("keyboard",n),this._add("blockableMapEvent",new Dn(e));for(var a=0,s=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];a<s.length;a+=1){var l=s[a];t.interactive&&t[l]&&e[l].enable(t[l])}}
vendor: 8,271 bytes, line 1
1,Io.prototype._add=function(t,e,i){this._handlers.push({handlerName:t,handler:e,allowed:i}),this._handlersById[t]=e},Io.prototype.stop=function(t){if(!this._updatingCamera){for(var e=0,i=this._handlers;e<i.length;e+=1)i[e].handler.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}},Io.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},Io.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Io.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Io.prototype.isMoving=function(){return Boolean(xo(this._eventsInProgress))||this.isZooming()},Io.prototype._blockedByActive=function(t,e,i){for(var r in t)if(r!==i&&(!e||e.indexOf(r)<0))return!0;return!1},Io.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},Io.prototype._getMapTouches=function(t){for(var e=[],i=0,r=t;i<r.length;i+=1){var n=r[i];this._el.contains(n.target)&&e.push(n)}return e},Io.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var i="renderFrame"===t.type?void 0:t,r={needsRenderFrame:!1},n={},o={},a=t.touches?this._getMapTouches(t.touches):void 0,s=a?_.touchPos(this._el,a):_.mousePos(this._el,t),l=0,u=this._handlers;l<u.length;l+=1){var c=u[l],p=c.handlerName,h=c.handler,f=c.allowed;h.isEnabled()&&(c=void 0,this._blockedByActive(o,f,p)?h.reset():h[e||t.type]&&(c=h[e||t.type](t,s,a),this.mergeHandlerResult(r,n,c,p,i),c&&c.needsRenderFrame&&this._triggerRenderFrame()),(c||h.isActive())&&(o[p]=h))}var d,m={};for(d in this._previousActiveHandlers)o[d]||(m[d]=i);this._previousActiveHandlers=o,(Object.keys(m).length||To(r))&&(this._changes.push([r,n,m]),this._triggerRenderFrame()),(Object.keys(o).length||To(r))&&this._map._stop(!0),this._updatingCamera=!1;var y=r.cameraAnimation;y&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],y(this._map))}else this.stop(!0)},Io.prototype.mergeHandlerResult=function(t,e,i,r,n){i&&(ot.extend(t,i),n={handlerName:r,originalEvent:i.originalEvent||n},void 0!==i.zoomDelta&&(e.zoom=n),void 0!==i.panDelta&&(e.drag=n),void 0!==i.pitchDelta&&(e.pitch=n),void 0!==i.bearingDelta&&(e.rotate=n))},Io.prototype._applyChanges=function(){for(var t={},e={},i={},r=0,n=this._changes;r<n.length;r+=1){var o=n[r],a=o[0],s=o[1],o=o[2];a.panDelta&&(t.panDelta=(t.panDelta||new ot.Point(0,0))._add(a.panDelta)),a.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+a.zoomDelta),a.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+a.bearingDelta),a.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+a.pitchDelta),void 0!==a.around&&(t.around=a.around),void 0!==a.pinchAround&&(t.pinchAround=a.pinchAround),a.noInertia&&(t.noInertia=a.noInertia),ot.extend(e,s),ot.extend(i,o)}this._updateMapTransform(t,e,i),this._changes=[]},Io.prototype._updateMapTransform=function(t,e,i){var r=this._map,n=r.transform;if(!To(t))return this._fireEvents(e,i,!0);var o=t.panDelta,a=t.zoomDelta,s=t.bearingDelta,l=t.pitchDelta,u=t.around,c=t.pinchAround;void 0!==c&&(u=c),r._stop(!0),u=u||r.transform.centerPoint;o=n.pointLocation(o?u.sub(o):u);s&&(n.bearing+=s),l&&(n.pitch+=l),a&&(n.zoom+=a),n.setLocationAtPoint(o,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,i,!0)},Io.prototype._fireEvents=function(t,e,i){var r,n,o,a=this,s=xo(this._eventsInProgress),l=xo(t),u={};for(r in t)this._eventsInProgress[r]||(u[r+"start"]=t[r].originalEvent),this._eventsInProgress[r]=t[r];for(n in!s&&l&&this._fireEvent("movestart",l.originalEvent),u)this._fireEvent(n,u[n]);for(o in l&&this._fireEvent("move",l.originalEvent),t)this._fireEvent(o,t[o].originalEvent);var c,p,h,f={};for(p in this._eventsInProgress){var d=this._eventsInProgress[p],m=d.handlerName,d=d.originalEvent;this._handlersById[m].isActive()||(delete this._eventsInProgress[p],f[p+"end"]=c=e[m]||d)}for(h in f)this._fireEvent(h,f[h]);var y=xo(this._eventsInProgress);i&&(s||l)&&!y&&(this._updatingCamera=!0,l=function(t){return 0!==t&&-a._bearingSnap<t&&t<a._bearingSnap},(y=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions))?(l(y.bearing||this._map.getBearing())&&(y.bearing=0),this._map.easeTo(y,{originalEvent:c})):(this._map.fire(new ot.Event("moveend",{originalEvent:c})),l(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1)},Io.prototype._fireEvent=function(t,e){this._map.fire(new ot.Event(t,e?{originalEvent:e}:{}))},Io.prototype._requestFrame=function(){var e=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(t){delete e._frameId,e.handleEvent(new wo("renderFrame",{timeStamp:t})),e._applyChanges()})},Io.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};function Eo(t){void 0===t&&(t={}),this.options=t,ot.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}var Ao,ge=((Ao=ot.Evented)&&(zo.__proto__=Ao),((zo.prototype=Object.create(Ao&&Ao.prototype)).constructor=zo).prototype.getCenter=function(){return new ot.LngLat(this.transform.center.lng,this.transform.center.lat)},zo.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},zo.prototype.panBy=function(t,e,i){return t=ot.Point.convert(t).mult(-1),this.panTo(this.transform.center,ot.extend({offset:t},e),i)},zo.prototype.panTo=function(t,e,i){return this.easeTo(ot.extend({center:t},e),i)},zo.prototype.getZoom=function(){return this.transform.zoom},zo.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},zo.prototype.zoomTo=function(t,e,i){return this.easeTo(ot.extend({zoom:t},e),i)},zo.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zo.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},zo.prototype.getBearing=function(){return this.transform.bearing},zo.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},zo.prototype.getPadding=function(){return this.transform.padding},zo.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},zo.prototype.rotateTo=function(t,e,i){return this.easeTo(ot.extend({bearing:t},e),i)},zo.prototype.resetNorth=function(t,e){return this.rotateTo(0,ot.extend({duration:1e3},t),e),this},zo.prototype.resetNorthPitch=function(t,e){return this.easeTo(ot.extend({bearing:0,pitch:0,duration:1e3},t),e),this},zo.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},zo.prototype.getPitch=function(){return this.transform.pitch},zo.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},zo.prototype.cameraForBounds=function(t,e){t=ot.LngLatBounds.convert(t);var i=e&&e.bearing||0;return this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),i,e)},zo.prototype._cameraForBoxAndBearing=function(t,e,i,r){var n={top:0,bottom:0,right:0,left:0};"number"==typeof(r=ot.extend({padding:n,offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding&&(l=r.padding,r.padding={top:l,bottom:l,right:l,left:l}),r.padding=ot.extend(n,r.padding);var o=this.transform,a=o.padding,s=o.project(ot.LngLat.convert(t)),l=o.project(ot.LngLat.convert(e)),n=s.rotate(-i*Math.PI/180),t=l.rotate(-i*Math.PI/180),e=new ot.Point(Math.max(n.x,t.x),Math.max(n.y,t.y)),t=new ot.Point(Math.min(n.x,t.x),Math.min(n.y,t.y)),e=e.sub(t),t=(o.width-(a.left+a.right+r.padding.left+r.padding.right))/e.x,e=(o.height-(a.top+a.bottom+r.padding.top+r.padding.bottom))/e.y;if(!(e<0||t<0)){t=Math.min(o.scaleZoom(o.scale*Math.min(t,e)),r.maxZoom),e="number"==typeof r.offset.x?new ot.Point(r.offset.x,r.offset.y):ot.Point.convert(r.offset),r=new ot.Point((r.padding.left-r.padding.right)/2,(r.padding.top-r.padding.bottom)/2).rotate(i*Math.PI/180),r=e.add(r).mult(o.scale/o.zoomScale(t));return{center:o.unproject(s.add(l).div(2).sub(r)),zoom:t,bearing:i}}ot.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},zo.prototype.fitBounds=function(t,e,i){return this._fitInternal(this.cameraForBounds(t,e),e,i)},zo.prototype.fitScreenCoordinates=function(t,e,i,r,n){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(ot.Point.convert(t)),this.transform.pointLocation(ot.Point.convert(e)),i,r),r,n)}
1,zo.prototype._fitInternal=function(t,e,i){return t?(delete(e=ot.extend(t,e)).padding,e.linear?this.easeTo(e,i):this.flyTo(e,i)):this},zo.prototype.jumpTo=function(t,e){this.stop();var i=this.transform,r=!1,n=!1,o=!1;return"zoom"in t&&i.zoom!==+t.zoom&&(r=!0,i.zoom=+t.zoom),void 0!==t.center&&(i.center=ot.LngLat.convert(t.center)),"bearing"in t&&i.bearing!==+t.bearing&&(n=!0,i.bearing=+t.bearing),"pitch"in t&&i.pitch!==+t.pitch&&(o=!0,i.pitch=+t.pitch),null==t.padding||i.isPaddingEqual(t.padding)||(i.padding=t.padding),this.fire(new ot.Event("movestart",e)).fire(new ot.Event("move",e)),r&&this.fire(new ot.Event("zoomstart",e)).fire(new ot.Event("zoom",e)).fire(new ot.Event("zoomend",e)),n&&this.fire(new ot.Event("rotatestart",e)).fire(new ot.Event("rotate",e)).fire(new ot.Event("rotateend",e)),o&&this.fire(new ot.Event("pitchstart",e)).fire(new ot.Event("pitch",e)).fire(new ot.Event("pitchend",e)),this.fire(new ot.Event("moveend",e))},zo.prototype.easeTo=function(t,r){var n=this;this._stop(!1,t.easeId),(!1===(t=ot.extend({offset:[0,0],duration:500,easing:ot.ease},t)).animate||!t.essential&&ot.browser.prefersReducedMotion)&&(t.duration=0);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in t?+t.zoom:a,p="bearing"in t?this._normalizeBearing(t.bearing,s):s,h="pitch"in t?+t.pitch:l,f=("padding"in t?t:o).padding,d=ot.Point.convert(t.offset),m=o.centerPoint.add(d),e=o.pointLocation(m),i=ot.LngLat.convert(t.center||e);this._normalizeCenter(i);var y,_,g=o.project(e),v=o.project(i).sub(g),x=o.zoomScale(c-a);t.around&&(y=ot.LngLat.convert(t.around),_=o.locationPoint(y));i={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||c!==a,this._rotating=this._rotating||s!==p,this._pitching=this._pitching||h!==l,this._padding=!o.isPaddingEqual(f),this._easeId=t.easeId,this._prepareEase(r,t.noMoveStart,i),this._ease(function(t){var e,i;n._zooming&&(o.zoom=ot.number(a,c,t)),n._rotating&&(o.bearing=ot.number(s,p,t)),n._pitching&&(o.pitch=ot.number(l,h,t)),n._padding&&(o.interpolatePadding(u,f,t),m=o.centerPoint.add(d)),y?o.setLocationAtPoint(y,_):(i=o.zoomScale(o.zoom-a),e=a<c?Math.min(2,x):Math.max(.5,x),e=Math.pow(e,1-t),i=o.unproject(g.add(v.mult(t*e)).mult(i)),o.setLocationAtPoint(o.renderWorldCopies?i.wrap():i,m)),n._fireMoveEvents(r)},function(t){n._afterEase(r,t)},t),this},zo.prototype._prepareEase=function(t,e,i){void 0===i&&(i={}),this._moving=!0,e||i.moving||this.fire(new ot.Event("movestart",t)),this._zooming&&!i.zooming&&this.fire(new ot.Event("zoomstart",t)),this._rotating&&!i.rotating&&this.fire(new ot.Event("rotatestart",t)),this._pitching&&!i.pitching&&this.fire(new ot.Event("pitchstart",t))},zo.prototype._fireMoveEvents=function(t){this.fire(new ot.Event("move",t)),this._zooming&&this.fire(new ot.Event("zoom",t)),this._rotating&&this.fire(new ot.Event("rotate",t)),this._pitching&&this.fire(new ot.Event("pitch",t))},zo.prototype._afterEase=function(t,e){var i,r;this._easeId&&e&&this._easeId===e||(delete this._easeId,i=this._zooming,r=this._rotating,e=this._pitching,this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new ot.Event("zoomend",t)),r&&this.fire(new ot.Event("rotateend",t)),e&&this.fire(new ot.Event("pitchend",t)),this.fire(new ot.Event("moveend",t)))},zo.prototype.flyTo=function(t,r){var n=this;if(!t.essential&&ot.browser.prefersReducedMotion){var e=ot.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(e,r)}this.stop(),t=ot.extend({offset:[0,0],speed:1.2,curve:1.42,easing:ot.ease},t);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in t?ot.clamp(+t.zoom,o.minZoom,o.maxZoom):a,p="bearing"in t?this._normalizeBearing(t.bearing,s):s,h="pitch"in t?+t.pitch:l,f=("padding"in t?t:o).padding,i=o.zoomScale(c-a),d=ot.Point.convert(t.offset),m=o.centerPoint.add(d),e=o.pointLocation(m),y=ot.LngLat.convert(t.center||e);this._normalizeCenter(y);var _=o.project(e),g=o.project(y).sub(_),v=t.curve,x=Math.max(o.width,o.height),b=x/i,w=g.mag();"minZoom"in t&&(i=ot.clamp(Math.min(t.minZoom,a,c),o.minZoom,o.maxZoom),i=x/
1o.zoomScale(i-a),v=Math.sqrt(i/w*2));var S=v*v;function T(t){t=(b*b-x*x+(t?-1:1)*S*S*w*w)/(2*(t?b:x)*S*w);return Math.log(Math.sqrt(t*t+1)-t)}function I(t){return(Math.exp(t)-Math.exp(-t))/2}function E(t){return(Math.exp(t)+Math.exp(-t))/2}var A=T(0),z=function(t){return E(A)/E(A+v*t)},P=function(t){return x*((E(A)*(I(t=A+v*t)/E(t))-I(A))/S)/w},C=(T(1)-A)/v;if(Math.abs(w)<1e-6||!isFinite(C)){if(Math.abs(x-b)<1e-6)return this.easeTo(t,r);var k=b<x?-1:1,C=Math.abs(Math.log(b/x))/v,P=function(){return 0},z=function(t){return Math.exp(k*v*t)}}return t.duration="duration"in t?+t.duration:1e3*C/("screenSpeed"in t?+t.screenSpeed/v:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(r,!1),this._ease(function(t){var e=t*C,i=1/z(e);o.zoom=1===t?c:a+o.scaleZoom(i),n._rotating&&(o.bearing=ot.number(s,p,t)),n._pitching&&(o.pitch=ot.number(l,h,t)),n._padding&&(o.interpolatePadding(u,f,t),m=o.centerPoint.add(d));i=1===t?y:o.unproject(_.add(g.mult(P(e))).mult(i));o.setLocationAtPoint(o.renderWorldCopies?i.wrap():i,m),n._fireMoveEvents(r)},function(){return n._afterEase(r)},t),this},zo.prototype.isEasing=function(){return!!this._easeFrameId},zo.prototype.stop=function(){return this._stop()},zo.prototype._stop=function(t,e){var i;return this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd&&(i=this._onEaseEnd,delete this._onEaseEnd,i.call(this,e)),t||(t=this.handlers)&&t.stop(!1),this},zo.prototype._ease=function(t,e,i){!1===i.animate||0===i.duration?(t(1),e()):(this._easeStart=ot.browser.now(),this._easeOptions=i,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},zo.prototype._renderFrameCallback=function(){var t=Math.min((ot.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},zo.prototype._normalizeBearing=function(t,e){t=ot.wrap(t,-180,180);var i=Math.abs(t-e);return Math.abs(t-360-e)<i&&(t-=360),Math.abs(t+360-e)<i&&(t+=360),t},zo.prototype._normalizeCenter=function(t){var e=this.transform;e.renderWorldCopies&&!e.lngRange&&(e=t.lng-e.center.lng,t.lng+=180<e?-360:e<-180?360:0)},zo);function zo(t,e){Ao.call(this),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=e.bearingSnap,ot.bindAll(["_renderFrameCallback"],this)}Eo.prototype.getDefaultPosition=function(){return"bottom-right"},Eo.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=_.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=_.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=_.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),e&&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===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Eo.prototype.onRemove=function(){_.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},Eo.prototype._setElementTitle=function(t,e){e=this._map._getUIString("AttributionControl."+e);t.title=e,t.setAttribute("aria-label",e)},Eo.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"))},Eo.prototype._updateEditLink=function(){var t,e=(e=this._editLink)||(this._editLink=this._container.querySelector(".mapbox-improve-map")),r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||ot.config.ACCESS_TOKEN}];e&&(t=r.reduce(function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i<r.length-1?"&":"")),t},"?"),e.href=ot.config.FEEDBACK_URL+"/"+t+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow",this._setElementTitle(e,"MapFeedback"))},Eo.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"visibility"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Eo.prototype._updateAttributions=function(){if(this._map.style){var r=[];this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?r=r.concat(this.options.customAttribution.map(function(t){return"string"!=typeof t?"":t})):"string"==typeof this.options.customAttribution&&r.push(this.options.customAttribution)),this._map.style.stylesheet&&(n=this._map.style.stylesheet,this.styleOwner=n.owner,this.styleId=n.id);var t,e=this._map.style.sourceCaches;for(t in e){var i=e[t];!i.used||(i=i.getSource()).attribution&&r.indexOf(i.attribution)<0&&r.push(i.attribution)}r.sort(function(t,e){return t.length-e.length});var n=(r=r.filter(function(t,e){for(var i=e+1;i<r.length;i++)if(0<=r[i].indexOf(t))return!1;return!0})).join(" | ");n!==this._attribHTML&&(this._attribHTML=n,r.length?(this._innerContainer.innerHTML=n,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Eo.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};function Po(){ot.bindAll(["_updateLogo"],this),ot.bindAll(["_updateCompact"],this)}Po.prototype.onAdd=function(t){this._map=t,this._container=_.create("div","mapboxgl-ctrl");t=_.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Po.prototype.onRemove=function(){_.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Po.prototype.getDefaultPosition=function(){return"bottom-left"},Po.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Po.prototype._logoRequired=function(){if(this._map.style){var t,e=this._map.style.sourceCaches;for(t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Po.prototype._updateCompact=function(){var t=this._container.children;t.length&&(t=t[0],this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact"))};function Co(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}Co.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Co.prototype.remove=function(t){for(var e=this._currentlyRunning,i=0,r=e?this._queue.concat(e):this._queue;i<r.length;i+=1){var n=r[i];if(n.id===t)return void(n.cancelled=!0)}},Co.prototype.run=function(t){void 0===t&&(t=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var i=0,r=e;i<r.length;i+=1){var n=r[i];if(!n.cancelled&&(n.callback(t),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Co.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ko={"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"},Mo=ot.window.HTMLImageElement,Do=ot.window.HTMLElement,Lo=ot.window.ImageBitmap,Bo={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},mi=function(u){function t(t){var e=this;if(null!=(t=ot.extend({},Bo,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&60<t.maxPitch)throw new Error("maxPitch must be less than or equal to 60");var i=new xn(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(u.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Co,this._controls=[],this._mapId=ot.uniqueId(),this._locale=ot.extend({},ko,t.locale),this._clickTolerance=t.clickTolerance,this._requestManager=new ot.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=ot.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Do))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),ot.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new 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!==ot.window&&(ot.window.addEventListener("online",this._onWindowOnline,!1),ot.window.addEventListener("resize",this._onWindowResize,!1),ot.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Io(this,t),this._hash=t.hash&&new bn("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,ot.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Eo({customAttribution:t.customAttribution})),this.addControl(new Po,t.logoPosition),this.on("style.load",function(){e.transform.unmodified&&e.jumpTo(e.style.stylesheet)}),this.on("data",function(t){e._update("style"===t.dataType),e.fire(new ot.Event(t.dataType+"data",t))}),this.on("dataloading",function(t){e.fire(new ot.Event(t.dataType+"dataloading",t))})}u&&(t.__proto__=u);var e={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return((t.prototype=Object.create(u&&u.prototype)).constructor=t).prototype._getMapId=function(){return this._mapId},t.prototype.addControl=function(t,e){if(void 0===e&&(e=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new ot.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=t.onAdd(this);this._controls.push(t);t=this._controlPositions[e];return-1!==e.indexOf("bottom")?t.insertBefore(i,t.firstChild):t.appendChild(i),this},t.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new ot.
1ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var e=this._controls.indexOf(t);return-1<e&&this._controls.splice(e,1),t.onRemove(this),this},t.prototype.hasControl=function(t){return-1<this._controls.indexOf(t)},t.prototype.resize=function(t){var e=this._containerDimensions(),i=e[0],e=e[1];this._resizeCanvas(i,e),this.transform.resize(i,e),this.painter.resize(i,e);e=!this._moving;return e&&(this.stop(),this.fire(new ot.Event("movestart",t)).fire(new ot.Event("move",t))),this.fire(new ot.Event("resize",t)),e&&this.fire(new ot.Event("moveend",t)),this},t.prototype.getBounds=function(){return this.transform.getBounds()},t.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},t.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(ot.LngLatBounds.convert(t)),this._update()},t.prototype.setMinZoom=function(t){if(-2<=(t=null==t?-2:t)&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},t.prototype.getMinZoom=function(){return this.transform.minZoom},t.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},t.prototype.getMaxZoom=function(){return this.transform.maxZoom},t.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(0<=t&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},t.prototype.getMinPitch=function(){return this.transform.minPitch},t.prototype.setMaxPitch=function(t){if(60<(t=null==t?60:t))throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},t.prototype.getMaxPitch=function(){return this.transform.maxPitch},t.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},t.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},t.prototype.project=function(t){return this.transform.locationPoint(ot.LngLat.convert(t))},t.prototype.unproject=function(t){return this.transform.pointLocation(ot.Point.convert(t))},t.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},t.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},t.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},t.prototype._createDelegatedListener=function(i,r,n){var t,o=this;if("mouseenter"===i||"mouseover"===i){var a=!1;return{layer:r,listener:n,delegates:{mousemove:function(t){var e=o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[];e.length?a||(a=!0,n.call(o,new Cn(i,o,t.originalEvent,{features:e}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"!==i&&"mouseout"!==i)return{layer:r,listener:n,delegates:((t={})[i]=function(t){var e=o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[];e.length&&(t.features=e,n.call(o,t),delete t.features)},t)};var e=!1;return{layer:r,listener:n,delegates:{mousemove:function(t){(o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[]).length?e=!0:e&&(e=!1,n.call(o,new Cn(i,o,t.originalEvent)))},mouseout:function(t){e&&(e=!1,n.call(o,new Cn(i,o,t.originalEvent)))}}}},t.prototype.on=function(t,e,i){if(void 0===i)return u.prototype.on.call(this,t,e);var r,n=this._createDelegatedListener(t,e,i);for(r in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(n),n.delegates)this.on(r,n.delegates[r]);return this}
1,t.prototype.once=function(t,e,i){if(void 0===i)return u.prototype.once.call(this,t,e);var r,n=this._createDelegatedListener(t,e,i);for(r in n.delegates)this.once(r,n.delegates[r]);return this},t.prototype.off=function(o,a,s){var l=this;return void 0===s?u.prototype.off.call(this,o,a):(this._delegatedListeners&&this._delegatedListeners[o]&&function(t){for(var e=t[o],i=0;i<e.length;i++){var r=e[i];if(r.layer===a&&r.listener===s){for(var n in r.delegates)l.off(n,r.delegates[n]);return e.splice(i,1)}}}(this._delegatedListeners),this)},t.prototype.queryRenderedFeatures=function(t,e){return this.style?(void 0!==e||void 0===t||t instanceof ot.Point||Array.isArray(t)||(e=t,t=void 0),e=e||{},i=(t=t||[[0,0],[this.transform.width,this.transform.height]])instanceof ot.Point||"number"==typeof t[0]?[ot.Point.convert(t)]:(i=ot.Point.convert(t[0]),t=ot.Point.convert(t[1]),[i,new ot.Point(t.x,i.y),t,new ot.Point(i.x,t.y),i]),this.style.queryRenderedFeatures(i,e,this.transform)):[];var i},t.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},t.prototype.setStyle=function(t,e){return!1!==(e=ot.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},e)).diff&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&t?(this._diffStyle(t,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(t,e))},t.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},t.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new _r(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t)):delete this.style,this},t.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new _r(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},t.prototype._diffStyle=function(t,i){var e,r=this;"string"==typeof t?(e=this._requestManager.normalizeStyleURL(t),e=this._requestManager.transformRequest(e,ot.ResourceType.Style),ot.getJSON(e,function(t,e){t?r.fire(new ot.ErrorEvent(t)):e&&r._updateDiff(e,i)})):"object"==typeof t&&this._updateDiff(t,i)},t.prototype._updateDiff=function(e,i){try{this.style.setState(e)&&this._update(!0)}catch(t){ot.warnOnce("Unable to perform style diff: "+(t.message||t.error||t)+".  Rebuilding the style from scratch."),this._updateStyle(e,i)}},t.prototype.getStyle=function(){if(this.style)return this.style.serialize()},t.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():ot.warnOnce("There is no style added to the map.")},t.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},t.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];if(void 0!==e)return e.loaded();this.fire(new ot.ErrorEvent(new Error("There is no source with ID '"+t+"'")))},t.prototype.areTilesLoaded=function(){var t,e=this.style&&this.style.sourceCaches;for(t in e){var i,r=e[t]._tiles;for(i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},t.prototype.addSourceType=function(t,e,i){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,i)},t.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},t.prototype.getSource=function(t){return this.style.getSource(t)},t.prototype.addImage=function(t,e,i){void 0===i&&(i={});var r=i.pixelRatio;void 0===r&&(r=1);var n=i.sdf;void 0===n&&(n=!1);var o=i.stretchX,a=i.stretchY,i=i.content;if(this._lazyInitEmptyStyle(),e instanceof Mo||Lo&&e instanceof Lo){var s=ot.browser.getImageData(e);this.style.addImage(t,{data:new ot.RGBAImage({width:s.width,height:s.height},s.data),pixelRatio:r,stretchX:o,stretchY:a,content:i,sdf:n,version:0})}else{if(void 0===e.width||void 0===e.height)return this.fire(new ot.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));s=e;this.style.addImage(t,{data:new ot.RGBAImage({width:e.width,height:e.height},new Uint8Array(e.data)),pixelRatio:r,stretchX:o,stretchY:a,content:i,sdf:n,version:0,userImage:s}),s.onAdd&&s.onAdd(this,t)}},t.prototype.updateImage=function(t,e){var i=this.style.getImage(t);
vendor: 4,130 bytes, line 1
1if(!i)return this.fire(new ot.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var r=e instanceof Mo||Lo&&e instanceof Lo?ot.browser.getImageData(e):e,n=r.width,o=r.height,r=r.data;return void 0===n||void 0===o?this.fire(new ot.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):n!==i.data.width||o!==i.data.height?this.fire(new ot.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(i.data.replace(r,!(e instanceof Mo||Lo&&e instanceof Lo)),void this.style.updateImage(t,i))},t.prototype.hasImage=function(t){return t?!!this.style.getImage(t):(this.fire(new ot.ErrorEvent(new Error("Missing required image id"))),!1)},t.prototype.removeImage=function(t){this.style.removeImage(t)},t.prototype.loadImage=function(t,e){ot.getImage(this._requestManager.transformRequest(t,ot.ResourceType.Image),e)},t.prototype.listImages=function(){return this.style.listImages()},t.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},t.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},t.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},t.prototype.getLayer=function(t){return this.style.getLayer(t)},t.prototype.setLayerZoomRange=function(t,e,i){return this.style.setLayerZoomRange(t,e,i),this._update(!0)},t.prototype.setFilter=function(t,e,i){return void 0===i&&(i={}),this.style.setFilter(t,e,i),this._update(!0)},t.prototype.getFilter=function(t){return this.style.getFilter(t)},t.prototype.setPaintProperty=function(t,e,i,r){return void 0===r&&(r={}),this.style.setPaintProperty(t,e,i,r),this._update(!0)},t.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},t.prototype.setLayoutProperty=function(t,e,i,r){return void 0===r&&(r={}),this.style.setLayoutProperty(t,e,i,r),this._update(!0)},t.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},t.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},t.prototype.getLight=function(){return this.style.getLight()},t.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},t.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},t.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},t.prototype.getContainer=function(){return this._container},t.prototype.getCanvasContainer=function(){return this._canvasContainer},t.prototype.getCanvas=function(){return this._canvas},t.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},t.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==ot.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&ot.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/.")},t.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=_.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=_.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=_.create("canvas","mapboxgl-canvas",e),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");e=this._containerDimensions();this._resizeCanvas(e[0],e[1]);var i=this._controlContainer=_.create("div","mapboxgl-control-container",t),r=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){r[t]=_.create("div","mapboxgl-ctrl-"+t,i)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},t.prototype._resizeCanvas=function(t,e){var i=ot.browser.devicePixelRatio||1;this._canvas.width=i*t,this._canvas.height=i*e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px"},t.prototype._setupPainter=function(){var t=ot.extend({},i.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);t?(this.painter=new mn(t,this.transform),ot.webpSupported.testSupport(t)):this.fire(new ot.ErrorEvent(new Error("Failed to initialize WebGL")))},t.prototype._contextLost=function(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new ot.Event("webglcontextlost",{originalEvent:t}))},t.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(new ot.Event("webglcontextrestored",{originalEvent:t}))},t.prototype._onMapScroll=function(t){if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},t.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},t.prototype._update=function(t){return this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint()),this},t.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},t.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},t.prototype._render=function(t){var e,i=this,r=0,n=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(e=n.createQueryEXT(),n.beginQueryEXT(n.TIME_ELAPSED_EXT,e),r=ot.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),!this._removed){var o,a,s,l=!1;this.style&&this._styleDirty&&(this._styleDirty=!1,o=this.transform.zoom,t=ot.browser.now(),this.style.zoomHistory.update(o,t),1===(t=(o=new ot.EvaluationParameters(o,{now:t,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()})).crossFadingFactor())&&t===this._crossFadingFactor||(l=!0,this._crossFadingFactor=t),this.style.update(o)),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 ot.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new ot.Event("load"))),this.style&&(this.style.hasTransitions()||l)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")&&(a=ot.browser.now()-r,n.endQueryEXT(n.TIME_ELAPSED_EXT,e),setTimeout(function(){var t=n.getQueryObjectEXT(e,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(e),i.fire(new ot.Event("gpu-timing-frame",{cpuTime:a,gpuTime:t}))},50)),this.listens("gpu-timing-layer")&&(s=this.painter.collectGpuTimers(),setTimeout(function(){var t=i.painter.queryGpuTimers(s);i.fire(new ot.Event("gpu-timing-layer",{layerTimes:t}))},50));r=this._sourcesDirty||this._styleDirty||this._placementDirty;return r||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new ot.Event("idle")),!this._loaded||this._fullyLoaded||r||(this._fullyLoaded=!0),this}},t.prototype.remove=function(){this._hash&&this._hash.remove();for(var t=0,e=this._controls;t<e.length;t+=1)e[t].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!==ot.window&&(ot.window.removeEventListener("resize",this._onWindowResize,!1),ot.window.removeEventListener("orientationchange",this._onWindowResize,!1),ot.window.removeEventListener("online",this._onWindowOnline,!1));var i=this.painter.context.gl.getExtension("WEBGL_lose_context");i&&i.loseContext(),Ro(this._canvasContainer),Ro(this._controlContainer),Ro(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new ot.
vendor: 4,499 bytes, line 1
1Event("remove"))},t.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=ot.browser.frame(function(t){e._frame=null,e._render(t)}))},t.prototype._onWindowOnline=function(){this._update()},t.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},e.showTileBoundaries.get=function(){return!!this._showTileBoundaries},e.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},e.showPadding.get=function(){return!!this._showPadding},e.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},e.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},e.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&((this._showCollisionBoxes=t)?this.style._generateCollisionBoxes():this._update())},e.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},e.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},e.repaint.get=function(){return!!this._repaint},e.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},e.vertices.get=function(){return!!this._vertices},e.vertices.set=function(t){this._vertices=t,this._update()},t.prototype._setCacheLimits=function(t,e){ot.setCacheLimits(t,e)},e.version.get=function(){return ot.version},Object.defineProperties(t.prototype,e),t}(ge);function Ro(t){t.parentNode&&t.parentNode.removeChild(t)}var Fo={showCompass:!0,showZoom:!0,visualizePitch:!1},U=function(t){var e=this;this.options=ot.extend({},Fo,t),this._container=_.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(ot.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(t){return e._map.zoomIn({},{originalEvent:t})}),_.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(t){return e._map.zoomOut({},{originalEvent:t})}),_.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(ot.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(t){e.options.visualizePitch?e._map.resetNorthPitch({},{originalEvent:t}):e._map.resetNorth({},{originalEvent:t})}),this._compassIcon=_.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};U.prototype._updateZoomButtons=function(){var t=this._map.getZoom(),e=t===this._map.getMaxZoom(),t=t===this._map.getMinZoom();this._zoomInButton.disabled=e,this._zoomOutButton.disabled=t,this._zoomInButton.setAttribute("aria-disabled",e.toString()),this._zoomOutButton.setAttribute("aria-disabled",t.toString())},U.prototype._rotateCompassArrow=function(){var t=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=t},U.prototype.onAdd=function(t){return this._map=t,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 Oo(this._map,this._compass,this.options.visualizePitch)),this._container},U.prototype.onRemove=function(){_.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},U.prototype._createButton=function(t,e){t=_.create("button",t,this._container);return t.type="button",t.addEventListener("click",e),t},U.prototype._setButtonTitle=function(t,e){e=this._map._getUIString("NavigationControl."+e);t.title=e,t.setAttribute("aria-label",e)};
1var Oo=function(t,e,i){void 0===i&&(i=!1),this._clickTolerance=10,this.element=e,this.mouseRotate=new Gn({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,i&&(this.mousePitch=new Xn({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),ot.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),_.addEventListener(e,"mousedown",this.mousedown),_.addEventListener(e,"touchstart",this.touchstart,{passive:!1}),_.addEventListener(e,"touchmove",this.touchmove),_.addEventListener(e,"touchend",this.touchend),_.addEventListener(e,"touchcancel",this.reset)};function Uo(t,e,i){var r,n,o;for(t=new ot.LngLat(t.lng,t.lat),e&&(r=new ot.LngLat(t.lng-360,t.lat),n=new ot.LngLat(t.lng+360,t.lat),o=i.locationPoint(t).distSqr(e),i.locationPoint(r).distSqr(e)<o?t=r:i.locationPoint(n).distSqr(e)<o&&(t=n));180<Math.abs(t.lng-i.center.lng);){var a=i.locationPoint(t);if(0<=a.x&&0<=a.y&&a.x<=i.width&&a.y<=i.height)break;t.lng>i.center.lng?t.lng-=360:t.lng+=360}return t}Oo.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),_.disableDrag()},Oo.prototype.move=function(t,e){var i,r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch&&(i=this.mousePitch.mousemoveWindow(t,e))&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)},Oo.prototype.off=function(){var t=this.element;_.removeEventListener(t,"mousedown",this.mousedown),_.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),_.removeEventListener(t,"touchmove",this.touchmove),_.removeEventListener(t,"touchend",this.touchend),_.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Oo.prototype.offTemp=function(){_.enableDrag(),_.removeEventListener(ot.window,"mousemove",this.mousemove),_.removeEventListener(ot.window,"mouseup",this.mouseup)},Oo.prototype.mousedown=function(t){this.down(ot.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),_.mousePos(this.element,t)),_.addEventListener(ot.window,"mousemove",this.mousemove),_.addEventListener(ot.window,"mouseup",this.mouseup)},Oo.prototype.mousemove=function(t){this.move(t,_.mousePos(this.element,t))},Oo.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Oo.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=_.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Oo.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=_.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Oo.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Oo.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Vo={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 No(t,e,i){var r,n=t.classList;for(r in Vo)n.remove("mapboxgl-"+i+"-anchor-"+r);n.add("mapboxgl-"+i+"-anchor-"+e)}var jo,qo,Zo,Go=((Zo=ot.Evented)&&(Yo.__proto__=Zo),((Yo.prototype=Object.create(Zo&&Zo.prototype)).constructor=Yo).prototype.addTo=function(t){return this.remove(),(this._map=t).getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},Yo.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),_.remove(this._element),this._popup&&this._popup.remove(),this},Yo.prototype.getLngLat=function(){return this._lngLat},Yo.prototype.setLngLat=function(t){return this._lngLat=ot.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Yo.prototype.getElement=function(){return this._element},Yo.prototype.setPopup=function(t){var e;return this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t&&("offset"in t.options||(e=Math.sqrt(Math.pow(13.5,2)/2),t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
10,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset),this._popup=t,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)),this},Yo.prototype._onKeyPress=function(t){var e=t.code,t=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==t&&13!==t||this.togglePopup()},Yo.prototype._onMapClick=function(t){var e=t.originalEvent.target,t=this._element;this._popup&&(e===t||t.contains(e))&&this.togglePopup()},Yo.prototype.getPopup=function(){return this._popup},Yo.prototype.togglePopup=function(){var t=this._popup;return t&&(t.isOpen()?t.remove():t.addTo(this._map)),this},Yo.prototype._update=function(t){var e,i;this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=Uo(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),e="","viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)"),i="","viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),_.setTransform(this._element,Vo[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+i+" "+e))},Yo.prototype.getOffset=function(){return this._offset},Yo.prototype.setOffset=function(t){return this._offset=ot.Point.convert(t),this._update(),this},Yo.prototype._onMove=function(t){var e;this._isDragging||(e=this._clickTolerance||this._map._clickTolerance,this._isDragging=t.point.dist(this._pointerdownPos)>=e),this._isDragging&&(this._pos=t.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 ot.Event("dragstart"))),this.fire(new ot.Event("drag")))},Yo.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 ot.Event("dragend")),this._state="inactive"},Yo.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.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))},Yo.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(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},Yo.prototype.isDraggable=function(){return this._draggable},Yo.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},Yo.prototype.getRotation=function(){return this._rotation},Yo.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},Yo.prototype.getRotationAlignment=function(){return this._rotationAlignment},Yo.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},Yo.prototype.getPitchAlignment=function(){return this._pitchAlignment},Yo),Xo={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wo=0,Ko=!1,j=((qo=ot.Evented)&&(Jo.__proto__=qo),((Jo.prototype=Object.create(qo&&qo.prototype)).constructor=Jo).prototype.onAdd=function(t){var e;return this._map=t,this._container=_.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),e=this._setupUI,void 0!==jo?e(jo):void 0!==ot.window.navigator.permissions?ot.window.navigator.permissions.query({name:"geolocation"}).then(function(t){e(jo="denied"!==t.state)}):e(jo=!!ot.window.navigator.geolocation),this._container},Jo.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(ot.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(),_.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wo=0,Ko=!1},Jo.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),t=t.coords;return e&&(t.longitude<e.getWest()||t.longitude>e.getEast()||t.latitude<e.getSouth()||t.latitude>e.getNorth())},Jo.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")}},Jo.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new ot.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new ot.Event("geolocate",t)),this._finish()}},Jo.prototype._updateCamera=function(t){var e=new ot.LngLat(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,t=this._map.getBearing(),t=ot.extend({bearing:t},this.options.fitBoundsOptions);this._map.fitBounds(e.toBounds(i),t,{geolocateSource:!0})},Jo.prototype._updateMarker=function(t){var e;t?(e=new ot.LngLat(t.coords.longitude,t.coords.latitude),this._accuracyCircleMarker.setLngLat(e).addTo(this._map),this._userLocationDotMarker.setLngLat(e).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()):(this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove())},Jo.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),t=this._map.unproject([1,t]),t=e.distanceTo(t),t=Math.ceil(2*this._accuracy/t);this._circleElement.style.width=t+"px",this._circleElement.style.height=t+"px"},Jo.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},Jo.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.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 e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Ko)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new ot.Event("error",t)),this._finish()}},Jo.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},Jo.prototype._setupUI=function(t){var e,i=this;this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=_.create("button","mapboxgl-ctrl-geolocate",this._container),_.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),!(this._geolocateButton.type="button")===t?(ot.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled."),e=this._map._getUIString("GeolocateControl.LocationNotAvailable"),this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)):(e=this._map._getUIString("GeolocateControl.FindMyLocation"),this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
1se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=_.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Go(this._dotElement),this._circleElement=_.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Go({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(t){t.geolocateSource||"ACTIVE_LOCK"!==i._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new ot.Event("trackuserlocationend")))})},Jo.prototype.trigger=function(){if(!this._setup)return ot.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 ot.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wo--,Ko=!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 ot.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 ot.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")}var t;"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ko=1<++Wo?(t={maximumAge:6e5,timeout:0},!0):(t=this.options.positionOptions,!1),this._geolocationWatchID=ot.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t))}else ot.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},Jo.prototype._clearWatch=function(){ot.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)},Jo),Ho={maxWidth:100,unit:"metric"},q=function(t){this.options=ot.extend({},Ho,t),ot.bindAll(["_onMove","setUnit"],this)};function Jo(t){qo.call(this),this.options=ot.extend({},Xo,t),ot.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}function Yo(t,e){if(Zo.call(this),(t instanceof ot.window.HTMLElement||e)&&(t=ot.extend({element:t},e)),ot.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&"auto"!==t.pitchAlignment?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=ot.Point.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=_.create("div"),this._element.setAttribute("aria-label","Map marker");var i=_.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var r=_.createNS("http://www.w3.org/2000/svg","g");
1r.setAttributeNS(null,"stroke","none"),r.setAttributeNS(null,"stroke-width","1"),r.setAttributeNS(null,"fill","none"),r.setAttributeNS(null,"fill-rule","evenodd");var n=_.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"fill-rule","nonzero");var o=_.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"transform","translate(3.0, 29.0)"),o.setAttributeNS(null,"fill","#000000");for(var a=0,s=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];a<s.length;a+=1){var l=s[a],u=_.createNS("http://www.w3.org/2000/svg","ellipse");u.setAttributeNS(null,"opacity","0.04"),u.setAttributeNS(null,"cx","10.5"),u.setAttributeNS(null,"cy","5.80029008"),u.setAttributeNS(null,"rx",l.rx),u.setAttributeNS(null,"ry",l.ry),o.appendChild(u)}var c=_.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"fill",this._color);var p=_.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),c.appendChild(p);var h=_.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"opacity","0.25"),h.setAttributeNS(null,"fill","#000000");var f=_.createNS("http://www.w3.org/2000/svg","path");f.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"),h.appendChild(f);e=_.createNS("http://www.w3.org/2000/svg","g");e.setAttributeNS(null,"transform","translate(6.0, 7.0)"),e.setAttributeNS(null,"fill","#FFFFFF");r=_.createNS("http://www.w3.org/2000/svg","g");r.setAttributeNS(null,"transform","translate(8.0, 8.0)");p=_.createNS("http://www.w3.org/2000/svg","circle");p.setAttributeNS(null,"fill","#000000"),p.setAttributeNS(null,"opacity","0.25"),p.setAttributeNS(null,"cx","5.5"),p.setAttributeNS(null,"cy","5.5"),p.setAttributeNS(null,"r","5.4999962");f=_.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#FFFFFF"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962"),r.appendChild(p),r.appendChild(f),n.appendChild(o),n.appendChild(c),n.appendChild(h),n.appendChild(e),n.appendChild(r),i.appendChild(n),i.setAttributeNS(null,"height",41*this._scale+"px"),i.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(i),this._offset=ot.Point.convert(t&&t.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(t){t.preventDefault()}),this._element.addEventListener("mousedown",function(t){t.preventDefault()}),No(this._element,this._anchor,"marker"),this._popup=null}function Qo(t,e,i){var r=i&&i.maxWidth||100,n=t._container.clientHeight/2,o=t.unproject([0,n]),n=t.unproject([r,n]),o=o.distanceTo(n);i&&"imperial"===i.unit?5280<(n=3.2808*o)?$o(e,r,n/5280,t._getUIString("ScaleControl.Miles")):$o(e,r,n,t._getUIString("ScaleControl.Feet")):i&&"nautical"===i.unit?$o(e,r,o/1852,t._getUIString("ScaleControl.NauticalMiles")):1e3<=o?$o(e,r,o/1e3,t._getUIString("ScaleControl.Kilometers")):$o(e,r,o,t._getUIString("ScaleControl.Meters"))}function $o(t,e,i,r){var n,o,a=(n=i,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=10<=(a=n/o)?10:5<=a?5:3<=a?3:2<=a?2:1<=a?1:(n=a,o=Math.pow(10,Math.ceil(-Math.log(n)/Math.LN10)),Math.round(n*o)/o)));t.style.width=e*(a/i)+"px",t.innerHTML=a+"&nbsp;"+r}q.prototype.getDefaultPosition=function(){return"bottom-left"},q.prototype._onMove=function(){Qo(this._map,this._container,this.options)},q.prototype.onAdd=function(t){return this._map=t,this._container=_.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},q.prototype.onRemove=function(){_.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},q.prototype.setUnit=function(t){this.options.unit=t,Qo(this._map,this._container,this.options)};nt=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof ot.window.HTMLElement?this._container=t.container:ot.warnOnce("Full screen control 'container' must be a DOM element.")),ot.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in ot.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in ot.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in ot.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in ot.window.document&&(this._fullscreenchange="MSFullscreenChange")};nt.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=_.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",ot.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},nt.prototype.onRemove=function(){_.remove(this._controlContainer),this._map=null,ot.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},nt.prototype._checkFullscreenSupport=function(){return!!(ot.window.document.fullscreenEnabled||ot.window.document.mozFullScreenEnabled||ot.window.document.msFullscreenEnabled||ot.window.document.webkitFullscreenEnabled)},nt.prototype._setupUI=function(){var t=this._fullscreenButton=_.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);_.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),ot.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},nt.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},nt.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},nt.prototype._isFullscreen=function(){return this._fullscreen},nt.prototype._changeIcon=function(){(ot.window.document.fullscreenElement||ot.
vendor: 8,997 bytes, line 1
1window.document.mozFullScreenElement||ot.window.document.webkitFullscreenElement||ot.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())},nt.prototype._onClickFullscreen=function(){this._isFullscreen()?ot.window.document.exitFullscreen?ot.window.document.exitFullscreen():ot.window.document.mozCancelFullScreen?ot.window.document.mozCancelFullScreen():ot.window.document.msExitFullscreen?ot.window.document.msExitFullscreen():ot.window.document.webkitCancelFullScreen&&ot.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 ta,ea={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ia=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ge=((ta=ot.Evented)&&(na.__proto__=ta),((na.prototype=Object.create(ta&&ta.prototype)).constructor=na).prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,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 ot.Event("open")),this},na.prototype.isOpen=function(){return!!this._map},na.prototype.remove=function(){return this._content&&_.remove(this._content),this._container&&(_.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 ot.Event("close")),this},na.prototype.getLngLat=function(){return this._lngLat},na.prototype.setLngLat=function(t){return this._lngLat=ot.LngLat.convert(t),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},na.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},na.prototype.getElement=function(){return this._container},na.prototype.setText=function(t){return this.setDOMContent(ot.window.document.createTextNode(t))},na.prototype.setHTML=function(t){var e,i=ot.window.document.createDocumentFragment(),r=ot.window.document.createElement("body");for(r.innerHTML=t;e=r.firstChild;)i.appendChild(e);return this.setDOMContent(i)},na.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},na.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},na.prototype.setDOMContent=function(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=_.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this},na.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},na.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},na.prototype.setOffset=function(t){return this.options.offset=t,this._update(),this},na.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},na.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=_.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))},na.prototype._onMouseUp=function(t){this._update(t.point)},na.prototype._onMouseMove=function(t){this._update(t.point)},na.prototype._onDrag=function(t){this._update(t.point)},na.prototype._update=function(t){var e,i,r,n,o=this;this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=_.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=_.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return o._container.classList.add(t)}),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=Uo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)&&(e=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),i=this.options.anchor,n=function t(e){if(e){if("number"==typeof e){var i=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new ot.Point(0,0),top:new ot.Point(0,e),"top-left":new ot.Point(i,i),"top-right":new ot.Point(-i,i),bottom:new ot.Point(0,-e),"bottom-left":new ot.Point(i,-i),"bottom-right":new ot.Point(-i,-i),left:new ot.Point(e,0),right:new ot.Point(-e,0)}}if(e instanceof ot.Point||Array.isArray(e)){i=ot.Point.convert(e);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:ot.Point.convert(e.center||[0,0]),top:ot.Point.convert(e.top||[0,0]),"top-left":ot.Point.convert(e["top-left"]||[0,0]),"top-right":ot.Point.convert(e["top-right"]||[0,0]),bottom:ot.Point.convert(e.bottom||[0,0]),"bottom-left":ot.Point.convert(e["bottom-left"]||[0,0]),"bottom-right":ot.Point.convert(e["bottom-right"]||[0,0]),left:ot.Point.convert(e.left||[0,0]),right:ot.Point.convert(e.right||[0,0])}}return t(new ot.Point(0,0))}(this.options.offset),i||(r=this._container.offsetWidth,t=this._container.offsetHeight,t=e.y+n.bottom.y<t?["top"]:e.y>this._map.transform.height-t?["bottom"]:[],e.x<r/2?t.push("left"):e.x>this._map.transform.width-r/2&&t.push("right"),i=0===t.length?"bottom":t.join("-")),n=e.add(n[i]).round(),_.setTransform(this._container,Vo[i]+" translate("+n.x+"px,"+n.y+"px)"),No(this._container,i,"popup"))},na.prototype._focusFirstElement=function(){var t;this.options.focusAfterOpen&&this._container&&((t=this._container.querySelector(ia))&&t.focus())},na.prototype._onClose=function(){this.remove()},na),ra={version:ot.version,supported:i,setRTLTextPlugin:ot.setRTLTextPlugin,getRTLTextPluginStatus:ot.getRTLTextPluginStatus,Map:mi,NavigationControl:U,GeolocateControl:j,AttributionControl:Eo,ScaleControl:q,FullscreenControl:nt,Popup:ge,Marker:Go,Style:_r,LngLat:ot.LngLat,LngLatBounds:ot.LngLatBounds,Point:ot.Point,MercatorCoordinate:ot.MercatorCoordinate,Evented:ot.Evented,config:ot.config,prewarm:function(){yi().acquire(hi)},clearPrewarmedResources:function(){var t=di;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(hi),di=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 ot.config.ACCESS_TOKEN},set accessToken(t){ot.config.ACCESS_TOKEN=t},get baseApiUrl(){return ot.config.API_URL},set baseApiUrl(t){ot.config.API_URL=t},get workerCount(){return fi.workerCount},set workerCount(t){fi.workerCount=t},get maxParallelImageRequests(){return ot.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){ot.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){ot.clearTileCache(t)},workerUrl:""};function na(t){ta.call(this),this.options=ot.extend(Object.create(ea),t),ot.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ra}),a});

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.