vendor: 7,613 bytes, lines 1-2
1/*! For license information please see 9637-28b802a0edb70f7d93bf.js.LICENSE.txt */ 2(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[9637],{2270:function(t,e,i){!function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var n=r((function(t,e){function i(t,e){if(r)if(n){var i="var sharedChunk = {}; ("+r+")(sharedChunk); ("+n+")(sharedChunk);",a={};r(a),o=e(a),"undefined"!=typeof window&&(o.workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"})))}else n=e;else r=e}var r,n,o;t.exports=(i(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var i=r;function r(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}r.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},r.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},r.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},r.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},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}o.prototype={clone:function(){return new o(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,i=t.y-this.y;return e*e+i*i},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),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),n=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=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o||!Array.isArray(t)?t:new o(t[0],t[1])};var a="undefined"!=typeof self?self:{};function s(t,e,r,n){var o=new i(t,e,r,n);return function(t){return o.solve(t)}}var l=s(.25,.1,.25,1);function u(t,e,i){return Math.min(i,Math.max(e,t))}function c(t,e,i){var r=i-e,n=((t-e)%r+r)%r+e;return n===e?i:n}function p(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=n[r];for(var a in o)t[a]=o[a]}return t}var h=1;function d(){return h++}function f(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(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 g(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 v(t,e,i){var r={};for(var n in t)r[n]=e.call(i||this,t[n],n,t);return r}function _(t,e,i){var r={};for(var n in t)e.call(i||this,t[n],n,t)&&(r[n]=t[n]);return r}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?v(t,x):t}var b={};function w(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function S(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function T(t){for(var e=0,i=0,r=t.length,n=r-1,o=void 0,a=void 0;i<r;n=i++)e+=((a=t[n]).x-(o=t[i]).x)*(o.y+a.y);return e}function C(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function I(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,i,r,n){var o=r||n;return e[i]=!o||o.toLowerCase(),""})),e["max-age"]){var i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}var E=null;function M(t){if(null==E){var e=t.navigator?t.navigator.userAgent:null;E=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return E}function A(t){try{var e=a[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var L,k,P,D,z=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),O=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,N=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,R={now:z,frame:function(t){var e=O(t);return{cancel:function(){return N(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var i=a.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(L=L||a.document.createElement("a")).href=t,L.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return!!a.matchMedia&&(null==k&&(k=a.matchMedia("(prefers-reduced-motion: reduce)")),k.matches)}},B={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},j={supported:!1,testSupport:function(t){!F&&D&&(U?V(t):P=t)}},F=!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,D),t.isContextLost())return;j.supported=!0}
2catch(t){}t.deleteTexture(e),F=!0}function q(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()}a.document&&((D=a.document.createElement("img")).onload=function(){P&&V(P),U=!(P=null)},D.onerror=function(){F=!0,P=null},D.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var G="01";function Z(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",G,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!Z(t))return t;var i=K(t);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!Z(t))return t;var i=K(t);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!Z(t))return t;var i=K(t);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,i,r){var n=K(t);return Z(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+i,this._makeAPIURL(n,this._customAccessToken||r)):(n.path+=""+e+i,X(n))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!Z(t))return t;var i=K(t);i.path=i.path.replace(/(\.(png|jpg)\d*)(?=$)/,(2<=R.devicePixelRatio||512===e?"@2x":"")+(j.supported?".webp":"$1")),i.path=i.path.replace(/^.+\/v4\//,"/"),i.path="/v4"+i.path;var r=this._customAccessToken||function(){for(var t=0,e=i.params;t<e.length;t+=1){var r=e[t].match(/^access_token=(.*)$/);if(r)return r[1]}return null}()||B.ACCESS_TOKEN;return B.REQUIRE_ACCESS_TOKEN&&r&&this._skuToken&&i.params.push("sku="+this._skuToken),this._makeAPIURL(i,r)},q.prototype.canonicalizeTileURL=function(t,e){var i=K(t);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(/\.[\w]+$/))return t;var r="mapbox://tiles/";r+=i.path.replace("/v4/","");var n=i.params;return e&&(n=n.filter((function(t){return!t.match(/^access_token=/)}))),n.length&&(r+="?"+n.join("&")),r},q.prototype.canonicalizeTileset=function(t,e){for(var i=!!e&&Z(e),r=[],n=0,o=t.tiles||[];n<o.length;n+=1){var a=o[n];W(a)?r.push(this.canonicalizeTileURL(a,i)):r.push(a)}return r},q.prototype._makeAPIURL=function(t,e){var i="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",r=K(B.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!B.REQUIRE_ACCESS_TOKEN)return X(t);if(!(e=e||B.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+i);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+i);return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token="+e),X(t)};var H=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function W(t){return H.test(t)}var Y=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(Y);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function X(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function J(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(a.atob(e[1]).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch(t){return null}}function Q(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}Q.prototype.getStorageKey=function(t){var e,i=J(B.ACCESS_TOKEN);return e=i&&i.u?a.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))}
2))):B.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Q.prototype.fetchEventData=function(){var t=A("localStorage"),e=this.getStorageKey(),i=this.getStorageKey("uuid");if(t)try{var r=a.localStorage.getItem(e);r&&(this.eventData=JSON.parse(r));var n=a.localStorage.getItem(i);n&&(this.anonId=n)}catch(t){w("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var t=A("localStorage"),e=this.getStorageKey(),i=this.getStorageKey("uuid");if(t)try{a.localStorage.setItem(i,this.anonId),1<=Object.keys(this.eventData).length&&a.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,i,r){var n=this;if(B.EVENTS_URL){var o=K(B.EVENTS_URL);o.params.push("access_token="+(r||B.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.11.1",skuId:G,userId:this.anonId},s=e?p(a,e):a,l={url:X(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=It(l,(function(t){n.pendingRequest=null,i(t),n.saveEventData(),n.processRequests(r)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var $,tt,et,it,rt=(pt.__proto__=it=Q,((pt.prototype=Object.create(it&&it.prototype)).constructor=pt).prototype.postMapLoadEvent=function(t,e,i,r){this.skuToken=i,(B.EVENTS_URL&&r||B.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return Z(t)||W(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},r)},pt.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var i=this.queue.shift(),r=i.id,n=i.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=f()),this.postEvent(n,{skuToken:this.skuToken},(function(t){t||r&&(e.success[r]=!0)}),t))}},pt),nt=(ct.__proto__=et=Q,((ct.prototype=Object.create(et&&et.prototype)).constructor=ct).prototype.postTurnstileEvent=function(t,e){B.EVENTS_URL&&B.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return Z(t)||W(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=J(B.ACCESS_TOKEN),r=i?i.u:B.ACCESS_TOKEN,n=r!==this.eventData.tokenU;m(this.anonId)||(this.anonId=f(),n=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;n=n||1<=l||l<-1||a.getDate()!==s.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=r)}),t)}},new ct),ot=nt.postTurnstileEvent.bind(nt),at=new rt,st=at.postMapLoadEvent.bind(at),lt=500,ut=50;function ct(t){et.call(this,"appUserTurnstile"),this._customAccessToken=t}function pt(){it.call(this,"map.load"),this.success={},this.skuToken=""}function ht(){a.caches&&!$&&($=a.caches.open("mapbox-tiles"))}function dt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var ft,mt=1/0;function gt(){return null==ft&&(ft=a.OffscreenCanvas&&new a.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof a.createImageBitmap),ft}var yt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(yt);var vt,_t=((vt=Error)&&(bt.__proto__=vt),((bt.prototype=Object.create(vt&&vt.prototype)).constructor=bt).prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},bt),xt=C()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===a.location.protocol?a.parent:a).location.href};function bt(t,e,i){401===e&&W(i)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),vt.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(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return function(t,e){var i,r=new a.AbortController,n=new a.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:xt(),signal:r.signal}),o=!1,s=!1,l=0<(i=n.url).indexOf("sku=")&&W(i);function u(i,r,o){if(!s){if(i&&"SecurityError"!==i.message&&w(i),r&&o)return c(r);var u=Date.now();a.fetch(n).then((function(i){if(i.ok){var r=l?i.clone():null;return c(i,r,u)}return e(new _t(i.statusText,i.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}}"json"===t.type&&n.headers.set("Accept","application/json");var c=function(i,r,l){("arrayBuffer"===t.type?i.arrayBuffer():"json"===t.type?i.json():i.text()).then((function(t){s||(r&&l&&function(t,e,
2i){if(ht(),$){var r={status:e.status,statusText:e.statusText,headers:new a.Headers};e.headers.forEach((function(t,e){return r.headers.set(e,t)}));var n=I(e.headers.get("Cache-Control")||"");n["no-store"]||(n["max-age"]&&r.headers.set("Expires",new Date(i+1e3*n["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-i<42e4||function(t,e){if(void 0===tt)try{new Response(new ReadableStream),tt=!0}catch(t){tt=!1}tt?e(t.body):t.blob().then(e)}(e,(function(e){var i=new a.Response(e,r);ht(),$&&$.then((function(e){return e.put(dt(t.url),i)})).catch((function(t){return w(t.message)}))})))}}(n,r,l),o=!0,e(null,t,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((function(t){s||e(new Error(t.message))}))};return l?function(t,e){if(ht(),!$)return e(null);var i=dt(t.url);$.then((function(t){t.match(i).then((function(r){var n=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),i=I(t.headers.get("Cache-Control")||"");return e>Date.now()&&!i["no-cache"]}(r);t.delete(i),n&&t.put(i,r.clone()),e(null,r,n)})).catch(e)})).catch(e)}(n,u):u(null,null),{cancel:function(){s=!0,o||r.abort()}}}(t,e);if(C()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(t,e){var i=new a.XMLHttpRequest;for(var r in i.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(i.responseType="arraybuffer"),t.headers)i.setRequestHeader(r,t.headers[r]);return"json"===t.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===t.credentials,i.onerror=function(){e(new Error(i.statusText))},i.onload=function(){if((200<=i.status&&i.status<300||0===i.status)&&null!==i.response){var r=i.response;if("json"===t.type)try{r=JSON.parse(i.response)}catch(r){return e(r)}e(null,r,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else e(new _t(i.statusText,i.status,t.url))},i.send(t.body),{cancel:function(){return i.abort()}}}(t,e)}function St(t,e){return wt(p(t,{type:"arrayBuffer"}),e)}var Tt,Ct,It=function(t,e){return wt(p(t,{method:"POST"}),e)};Tt=[],Ct=0;var Et=function(t,e){if(j.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ct>=B.MAX_PARALLEL_IMAGE_REQUESTS){var i={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return Tt.push(i),i}function r(){if(!n)for(n=!0,Ct--;Tt.length&&Ct<B.MAX_PARALLEL_IMAGE_REQUESTS;){var t=Tt.shift();t.cancelled||(t.cancel=Et(t.requestParameters,t.callback).cancel)}}Ct++;var n=!1,o=St(t,(function(t,i,n,o){var s,l,u;r(),t?e(t):i&&(gt()?(s=i,l=e,u=new a.Blob([new Uint8Array(s)],{type:"image/png"}),a.createImageBitmap(u).then((function(t){l(null,t)})).catch((function(t){l(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 a.Image,o=a.URL;n.onload=function(){e(null,n),o.revokeObjectURL(n.src)},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 s=new a.Blob([new Uint8Array(t)],{type:"image/png"});n.cacheControl=i,n.expires=r,n.src=t.byteLength?o.createObjectURL(s):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(i,e,n,o))}));return{cancel:function(){o.cancel(),r()}}};function Mt(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function At(t,e,i){if(i&&i[t]){var r=i[t].indexOf(e);-1!==r&&i[t].splice(r,1)}}function Lt(t,e){void 0===e&&(e={}),p(this,e),this.type=t}function kt(){}var Pt,Dt=(zt.__proto__=Pt=Lt,(zt.prototype=Object.create(Pt&&Pt.prototype)).constructor=zt);function zt(t,e){void 0===e&&(e={}),Pt.call(this,"error",p({error:t},e))}kt.prototype.on=function(t,e){return this._listeners=this._listeners||{},Mt(t,e,this._listeners),this},kt.prototype.off=function(t,e){return At(t,e,this._listeners),At(t,e,this._oneTimeListeners),this},kt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},Mt(t,e,this._oneTimeListeners),this},kt.prototype.fire=function(t,e){"string"==typeof t&&(t=new Lt(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];At(i,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(p(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof Dt&&console.error(t.error);return this},kt.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 Ot={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"}
2,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:!(kt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this})},"*":{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
vendor: 11,915 bytes, line 2
2},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},
vendor: 2,738 bytes, line 2
2expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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
vendor: 14,078 bytes, line 2
2}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}}
2,Nt=function(t,e,i,r){this.message=(t?t+": ":"")+i,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)};function Rt(t){var e=t.value;return e?[new Nt(t.key,e,"constants have been deprecated as of v8")]:[]}function Bt(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=n[r];for(var a in o)t[a]=o[a]}return t}function jt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Ft(t){if(Array.isArray(t))return t.map(Ft);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var i in t)e[i]=Ft(t[i]);return e}return jt(t)}function Ut(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 Vt,qt=((Vt=Error)&&(Gt.__proto__=Vt),(Gt.prototype=Object.create(Vt&&Vt.prototype)).constructor=Gt);function Gt(t,e){Vt.call(this,e),this.message=e,this.key=t}Ut.prototype.concat=function(t){return new Ut(this,t)},Ut.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.")},Ut.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Zt={kind:"null"},Ht={kind:"number"},Wt={kind:"string"},Yt={kind:"boolean"},Kt={kind:"color"},Xt={kind:"object"},Jt={kind:"value"},Qt={kind:"collator"},$t={kind:"formatted"},te={kind:"resolvedImage"};function ee(t,e){return{kind:"array",itemType:t,N:e}}function ie(t){if("array"!==t.kind)return t.kind;var e=ie(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}var re=[Zt,Ht,Wt,Yt,Kt,$t,Xt,ee(Jt),te];function ne(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ne(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=re;i<r.length;i+=1)if(!ne(r[i],e))return null}return"Expected "+ie(t)+" but found "+ie(e)+" instead."}function oe(t,e){return e.some((function(e){return e.kind===t.kind}))}function ae(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var se=e((function(t,e){var i={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 r(t){return(t=Math.round(t))<0?0:255<t?255:t}function n(t){return r("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:1<e?1:e;var e}function a(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,s=t.replace(/ /g,"").toLowerCase();if(s in i)return i[s].slice();if("#"===s[0])return 4===s.length?0<=(e=parseInt(s.substr(1),16))&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&0<=(e=parseInt(s.substr(1),16))&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=o(p.pop());case"rgb":return 3!==p.length?null:[n(p[0]),n(p[1]),n(p[2]),h];case"hsla":if(4!==p.length)return null;h=o(p.pop());case"hsl":if(3!==p.length)return null;var d=(parseFloat(p[0])%360+360)%360/360,f=o(p[1]),m=o(p[2]),g=m<=.5?m*(f+1):m+f-m*f,y=2*m-g;return[r(255*a(y,g,d+1/3)),r(255*a(y,g,d)),r(255*a(y,g,d-1/3)),h];default:return null}}return null}}catch(t){}}
2)).parseCSSColor,le=function(t,e,i,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=i,this.a=r};le.parse=function(t){if(t){if(t instanceof le)return t;if("string"==typeof t){var e=se(t);if(e)return new le(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},le.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+")"},le.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]},le.black=new le(0,0,0,1),le.white=new le(1,1,1,1),le.transparent=new le(0,0,0,0),le.red=new le(1,0,0,1);var ue=function(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};function ce(t,e,i,r,n){this.text=t,this.image=e,this.scale=i,this.fontStack=r,this.textColor=n}ue.prototype.compare=function(t,e){return this.collator.compare(t,e)},ue.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var pe=function(t){this.sections=t};pe.fromString=function(t){return new pe([new ce(t,null,null,null,null)])},pe.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}))},pe.factory=function(t){return t instanceof pe?t:pe.fromString(t)},pe.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},pe.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var r=i[e];if(r.image)t.push(["image",r.image.name]);else{t.push(r.text);var n={};r.fontStack&&(n["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(n["font-scale"]=r.scale),r.textColor&&(n["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(n)}}return t};var he=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 fe(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 le)return 1;if(t instanceof ue)return 1;if(t instanceof pe)return 1;if(t instanceof he)return 1;if(Array.isArray(t)){for(var e=0,i=t;e<i.length;e+=1)if(!fe(i[e]))return;return 1}if("object"==typeof t){for(var r in t)if(!fe(t[r]))return;return 1}}function me(t){if(null===t)return Zt;if("string"==typeof t)return Wt;if("boolean"==typeof t)return Yt;if("number"==typeof t)return Ht;if(t instanceof le)return Kt;if(t instanceof ue)return Qt;if(t instanceof pe)return $t;if(t instanceof he)return te;if(Array.isArray(t)){for(var e,i=t.length,r=0,n=t;r<n.length;r+=1){var o=me(n[r]);if(e){if(e===o)continue;e=Jt;break}e=o}return ee(e||Jt,i)}return Xt}function ge(t){var e=typeof t;return null===t?"":"string"==e||"number"==e||"boolean"==e?String(t):t instanceof le||t instanceof pe||t instanceof he?t.toString():JSON.stringify(t)}function ye(t,e){this.type=t,this.value=e}he.prototype.toString=function(){return this.name},he.fromString=function(t){return t?new he({name:t,available:!1}):null},he.prototype.serialize=function(){return["image",this.name]},ye.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!fe(t[1]))return e.error("invalid value");var i=t[1],r=me(i),n=e.expectedType;return"array"!==r.kind||0!==r.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(r=n),new ye(r,i)},ye.prototype.evaluate=function(){return this.value},ye.prototype.eachChild=function(){},ye.prototype.outputDefined=function(){return!0},ye.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof le?["rgba"].concat(this.value.toArray()):this.value instanceof pe?this.value.serialize():this.value};var ve=function(t){this.name="ExpressionEvaluationError",this.message=t};function _e(t,e){this.type=t,this.args=e}ve.prototype.toJSON=function(){return this.message};var xe={string:Wt,number:Ht,boolean:Yt,object:Xt};function be(t){this.type=$t,this.sections=t}function we(t){this.type=te,this.input=t}function Se(t,e){this.type=t,this.args=e}_e.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){var o,a;if(2<t.length){var s=t[1];if("string"!=typeof s||!(s in xe)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=xe[s],r++}else o=Jt;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);a=t[2],r++}i=ee(o,a)}else i=xe[n];for(var l=[];r<t.length;r++){var u=e.parse(t[r],r,Jt);if(!u)return null;l.push(u)}return new _e(i,l)},_e.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var i=this.args[e].evaluate(t);if(!ne(this.type,me(i)))return i;if(e===this.args.length-1)throw new ve("Expected value to be of type "+ie(this.type)+", but found "+ie(me(i))+" instead.")}return null}
vendor: 4,256 bytes, line 2
2,_e.prototype.eachChild=function(t){this.args.forEach(t)},_e.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},_e.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);var r=t.N;("number"==typeof r||1<this.args.length)&&e.push(r)}}return e.concat(this.args.map((function(t){return t.serialize()})))},be.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,Ht)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,ee(Wt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Kt)))return null;var c=r[r.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=e.parse(t[o],1,Jt);if(!p)return null;var h=p.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,r.push({content:p,scale:null,font:null,textColor:null})}}return new be(r)},be.prototype.evaluate=function(t){return new pe(this.sections.map((function(e){var i=e.content.evaluate(t);return me(i)===te?new ce("",i,null,null,null):new ce(ge(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},be.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)}},be.prototype.outputDefined=function(){return!1},be.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},we.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,Wt);return i?new we(i):e.error("No image name provided.")},we.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=he.fromString(e);return i&&t.availableImages&&(i.available=-1<t.availableImages.indexOf(e)),i},we.prototype.eachChild=function(t){t(this.input)},we.prototype.outputDefined=function(){return!1},we.prototype.serialize=function(){return["image",this.input.serialize()]};var Te={"to-boolean":Yt,"to-color":Kt,"to-number":Ht,"to-string":Wt};function Ce(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}Se.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 r=Te[i],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Jt);if(!a)return null;n.push(a)}return new Se(r,n)},Se.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 le)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 le(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?pe.fromString(ge(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?he.fromString(ge(this.args[0].evaluate(t))):ge(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.")}
2,Se.prototype.eachChild=function(t){this.args.forEach(t)},Se.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},Se.prototype.serialize=function(){if("formatted"===this.type.kind)return new be([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new we(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ie=["Unknown","Point","LineString","Polygon"];Ce.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ce.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Ie[this.feature.type]:this.feature.type:null},Ce.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ce.prototype.canonicalID=function(){return this.canonical},Ce.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ce.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(this._parseColorCache[t]=le.parse(t))};var Ee=function(t,e,i,r){this.name=t,this.type=e,this._evaluate=i,this.args=r};function Me(t,e,i){this.type=Qt,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}function Ae(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 Le(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function ke(t,e){for(var i,r,n,o,a,s,l=!1,u=0,c=e.length;u<c;u++)for(var p=e[u],h=0,d=p.length;h<d-1;h++){if((n=t[0]-(i=p[h])[0])*(s=t[1]-(r=p[h+1])[1])-(a=t[0]-r[0])*(o=t[1]-i[1])==0&&n*a<=0&&o*s<=0)return;f=t,m=p[h],g=p[h+1],m[1]>f[1]!=g[1]>f[1]&&f[0]<(g[0]-m[0])*(f[1]-m[1])/(g[1]-m[1])+m[0]&&(l=!l)}var f,m,g;return l}function Pe(t,e){for(var i=0;i<e.length;i++)if(ke(t,e[i]))return 1}function De(t,e,i,r){var n=r[0]-i[0],o=r[1]-i[1],a=(t[0]-i[0])*o-n*(t[1]-i[1]),s=(e[0]-i[0])*o-n*(e[1]-i[1]);return 0<a&&s<0||a<0&&0<s}function ze(t,e,i){for(var r=0,n=i;r<n.length;r+=1)for(var o=n[r],a=0;a<o.length-1;++a)if(0!=(u=[(l=o[a+1])[0]-(s=o[a])[0],l[1]-s[1]])[0]*(c=[e[0]-t[0],e[1]-t[1]])[1]-u[1]*c[0]&&De(t,e,s,l)&&De(s,l,t,e))return 1;var s,l,u,c}function Oe(t,e){for(var i=0;i<t.length;++i)if(!ke(t[i],e))return;for(var r=0;r<t.length-1;++r)if(ze(t[r],t[r+1],e))return;return 1}function Ne(t,e){for(var i=0;i<e.length;i++)if(Oe(t,e[i]))return 1}function Re(t,e,i){for(var r=[],n=0;n<t.length;n++){for(var o=[],a=0;a<t[n].length;a++){var s=(u=i,c=(180+(l=t[n][a])[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l[1]*Math.PI/360)))/360,h=Math.pow(2,u.z),[Math.round(c*h*8192),Math.round(p*h*8192)]);Ae(e,s),o.push(s)}r.push(o)}var l,u,c,p,h;return r}function Be(t,e,i){for(var r=[],n=0;n<t.length;n++){var o=Re(t[n],e,i);r.push(o)}return r}function je(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){var n=.5*r,o=t[0]-i[0]>n?-r:i[0]-t[0]>n?r:0;0===o&&(o=t[0]-i[2]>n?-r:i[2]-t[0]>n?r:0),t[0]+=o}Ae(e,t)}function Fe(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],h=[p.x+o[0],p.y+o[1]];je(h,e,i,n),a.push(h)}return a}function Ue(t,e,i,r){for(var n,o=8192*Math.pow(2,r.z),a=[8192*r.x,8192*r.y],s=[],l=0,u=t;l<u.length;l+=1){for(var c=[],p=0,h=u[l];p<h.length;p+=1){var d=h[p],f=[d.x+a[0],d.y+a[1]];Ae(e,f),c.push(f)}s.push(c)}if(e[2]-e[0]<=o/2){(n=e)[0]=n[1]=1/0,n[2]=n[3]=-1/0;for(var m=0,g=s;m<g.length;m+=1)for(var y=0,v=g[m];y<v.length;y+=1)je(v[y],e,i,o)}return s}Ee.prototype.evaluate=function(t){return this._evaluate(t,this.args)},Ee.prototype.eachChild=function(t){this.args.forEach(t)},Ee.prototype.outputDefined=function(){return!1},Ee.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},Ee.parse=function(t,e){var i,r=t[0],n=Ee.definitions[r];if(!n)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=a.filter((function(e){var i=e[0];return!Array.isArray(i)||i.length===t.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var p=c[u],h=p[0],d=p[1];l=new We(e.registry,e.path,null,e.scope);for(var f=[],m=!1,g=1;g<t.length;g++){var y=t[g],v=Array.isArray(h)?h[g-1]:h.type,_=l.parse(y,1+f.length,v);if(!_){m=!0;break}f.push(_)}if(!m)if(Array.isArray(h)&&h.length!==f.length)l.error("Expected "+h.length+" arguments, but found "+f.length+" instead.");else{for(var x=0;x<f.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=f[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new Ee(r,o,d,f)}}if(1===s.length)(i=e.errors).push.apply(i,l.errors);else{for(var S=(s.length?s:a).map((function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(ie).join(", ")+")":"("+ie(e.type)+"...)"})).join(" | "),T=[],C=1;C<t.length;C++){var I=e.parse(t[C],1+T.length);if(!I)return null;T.push(ie(I.type))}e.error("Expected arguments of type "+S+", but found ("+T.join(", ")+") instead.")}return null},Ee.register=function(t,e){for(var i in Ee.definitions=e)t[i]=Ee},Me.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,Yt);if(!r)return null;var n=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,Yt);if(!n)return null;var o=null;return i.locale&&!(o=e.parse(i.locale,1,Wt))?null:new Me(r,n,o)},Me.prototype.evaluate=function(t){return new ue(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Me.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Me.prototype.outputDefined=function(){return!1},Me.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=Yt,this.geojson=t,this.geometries=e};function qe(t){if(t instanceof Ee){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&&!qe(t)&&(e=!1)})),e}function Ge(t){if(!(t instanceof Ee&&"feature-state"===t.name)){var e=!0;return t.eachChild((function(t){e&&!Ge(t)&&(e=!1)})),e}}function Ze(t,e){if(t instanceof Ee&&0<=e.indexOf(t.name))return!1;var i=!0;return t.eachChild((function(t){i&&!Ze(t,e)&&(i=!1)})),i}function He(t,e){this.type=e.type,this.name=t,this.boundExpression=e}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(fe(t[1])){var i=t[1];
vendor: 26,743 bytes, line 2
2if("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){var o=i.geometry.type;if("Polygon"===o||"MultiPolygon"===o)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=Re(e.coordinates,r,n),a=Fe(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!ke(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Be(e.coordinates,r,n),c=Fe(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Pe(h[p],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=Re(e.coordinates,r,n),a=Ue(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Oe(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Be(e.coordinates,r,n),c=Ue(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Ne(h[p],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]},He.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var i=t[1];return e.scope.has(i)?new He(i,e.scope.get(i)):e.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},He.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},He.prototype.eachChild=function(){},He.prototype.outputDefined=function(){return!1},He.prototype.serialize=function(){return["var",this.name]};var We=function(t,e,i,r,n){void 0===e&&(e=[]),void 0===r&&(r=new Ut),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 Ye(t,e){for(var i,r=t.length-1,n=0,o=r,a=0;n<=o;)if((i=t[a=Math.floor((n+o)/2)])<=e){if(a===r||e<t[a+1])return a;n=a+1}else{if(!(e<i))throw new ve("Input is not a number.");o=a-1}return 0}We.prototype.parse=function(t,e,i,r,n){return void 0===n&&(n={}),e?this.concat(e,i,r)._parse(t,n):this._parse(t,n)},We.prototype._parse=function(t,e){function i(t,e,i){return"assert"===i?new _e(e,[t]):"coerce"===i?new Se(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,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,e.typeAnnotation||"coerce");else o=i(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ye)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof He)return t(e.boundExpression);if(e instanceof Ee&&"error"===e.name)return!1;if(e instanceof Me)return!1;if(e instanceof Ve)return!1;var i=e instanceof Se||e instanceof _e,r=!0;return e.eachChild((function(e){r=i?r&&t(e):r&&e instanceof ye})),!!r&&qe(e)&&Ze(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new Ce;try{o=new ye(o.type,o.evaluate(l))}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.")},We.prototype.concat=function(t,e,i){var r="number"==typeof t?this.path.concat(t):this.path,n=i?this.scope.concat(i):this.scope;return new We(this.registry,r,e||null,n,this.errors)},We.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 qt(r,t))},We.prototype.checkSubtype=function(t,e){var i=ne(t,e);return i&&this.error(i),i};var Ke=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 Xe(t,e,i){return t*(1-i)+e*i}Ke.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,Ht);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);var c=e.parse(s,u,n);if(!c)return null;n=n||c.type,r.push([a,c])}return new Ke(n,i,r)},Ke.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].evaluate(t):i[Ye(e,r)].evaluate(t)},Ke.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},Ke.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Ke.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 Je=Object.freeze({__proto__:null,number:Xe,color:function(t,e,i){return new le(Xe(t.r,e.r,i),Xe(t.g,e.g,i),Xe(t.b,e.b,i),Xe(t.a,e.a,i))},array:function(t,e,i){return t.map((function(t,r){return Xe(t,e[r],i)}))}}),Qe=6/29*3*(6/29),$e=Math.PI/180,ti=180/Math.PI;function ei(t){return.008856451679035631<t?Math.pow(t,1/3):t/Qe+4/29}function ii(t){return 6/29<t?t*t*t:Qe*(t-4/29)}function ri(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ni(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oi(t){var e=ni(t.r),i=ni(t.g),r=ni(t.b),n=ei((.4124564*e+.3575761*i+.1804375*r)/.95047),o=ei(.2126729*e+.7151522*i+.072175*r);return{l:116*o-16,a:500*(n-o),b:200*(o-ei((.0193339*e+.119192*i+.9503041*r)/1.08883)),alpha:t.a}}function ai(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;return e=+ii(e),i=.95047*ii(i),r=1.08883*ii(r),new le(ri(3.2404542*i-1.5371385*e-.4985314*r),ri(-.969266*i+1.8760108*e+.041556*r),ri(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}var si={forward:oi,reverse:ai,interpolate:function(t,e,i){return{l:Xe(t.l,e.l,i),a:Xe(t.a,e.a,i),b:Xe(t.b,e.b,i),alpha:Xe(t.alpha,e.alpha,i)}}},li={forward:function(t){var e=oi(t),i=e.l,r=e.a,n=e.b,o=Math.atan2(n,r)*ti;return{h:o<0?360+o:o,c:Math.sqrt(r*r+n*n),l:i,alpha:t.a}},reverse:function(t){var e=t.h*$e,i=t.c;return ai({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<(o=n-r)||o<-180?o-360*Math.round(o/360):o)),c:Xe(t.c,e.c,i),l:Xe(t.l,e.l,i),alpha:Xe(t.alpha,e.alpha,i)};var r,n,o}},ui=Object.freeze({__proto__:null,lab:si,hcl:li}),ci=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 pi(t,e,i,r){var n=r-i,o=t-i;return 0==n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}ci.interpolationFactor=function(t,e,r,n){var o=0;if("exponential"===t.name)o=pi(e,t.base,r,n);else if("linear"===t.name)o=pi(e,1,r,n);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new i(a[0],a[1],a[2],a[3]).solve(pi(e,1,r,n))}return o},ci.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);var s=r.slice(1);if(4!==s.length||s.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:s}}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,Ht)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Kt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],d=c+3,f=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',d);if(l.length&&l[l.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var m=e.parse(h,f,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new ci(u,i,r,n,l):e.error("Type "+ie(u)+" is not interpolatable.")},ci.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);var o=Ye(e,r),a=ci.interpolationFactor(this.interpolation,r,e[o],e[o+1]),s=i[o].evaluate(t),l=i[o+1].evaluate(t);return"interpolate"===this.operator?Je[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?li.reverse(li.interpolate(li.forward(s),li.forward(l),a)):si.reverse(si.interpolate(si.forward(s),si.forward(l),a))},ci.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},ci.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},ci.prototype.serialize=function(){var t;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);for(var 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 hi=function(t,e){this.type=t,this.args=e};hi.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)}var l=r&&n.some((function(t){return ne(r,t.type)}));return new hi(l?Jt:i,n)},hi.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 he&&!i.available&&(e=e||i.name,i=null,r===this.args.length&&(i=e)),null===i);n+=1);return i},hi.prototype.eachChild=function(t){this.args.forEach(t)},hi.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},hi.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var di=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};function fi(t,e,i){this.type=t,this.index=e,this.input=i}function mi(t,e){this.type=Yt,this.needle=t,this.haystack=e}function gi(t,e,i){this.type=Ht,this.needle=t,this.haystack=e,this.fromIndex=i}function yi(t,e,i,r,n,o){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=n,this.otherwise=o}function vi(t,e,i){this.type=t,this.branches=e,this.otherwise=i}function _i(t,e,i,r){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=r}function xi(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 bi(t,e,i,r){return 0===r.compare(e,i)}function wi(t,e,i){var r="=="!==t&&"!="!==t;return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var i=t[0],o=e.parse(t[1],1,Jt);if(!o)return null;if(!xi(i,o.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+ie(o.type)+"'.");var a=e.parse(t[2],2,Jt);if(!a)return null;if(!xi(i,a.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+ie(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+ie(o.type)+"' and '"+ie(a.type)+"'.");r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new _e(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new _e(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Qt)))return null}return new n(o,a,s)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){var s=me(o),l=me(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new ve('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var u=me(o),c=me(a);if("string"!==u.kind||"string"!==c.kind)return e(n,o,a)}return this.collator?i(n,o,a,this.collator.evaluate(n)):e(n,o,a)},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.outputDefined=function(){return!0},n.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},n;function n(t,e,i){this.type=Yt,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}}function Si(t,e,i,r,n){this.type=Wt,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=n}di.prototype.evaluate=function(t){return this.result.evaluate(t)},di.prototype.eachChild=function(t){for(var e=0,i=this.bindings;e<i.length;e+=1)t(i[e][1]);t(this.result)},di.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 di(i,a):null},di.prototype.outputDefined=function(){return this.result.outputDefined()},di.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},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,Ht),r=e.parse(t[2],2,ee(e.expectedType||Jt));return i&&r?new fi(r.type.itemType,i,r):null},fi.prototype.evaluate=function(t){var e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new ve("Array index out of bounds: "+e+" < 0.");if(e>=i.length)throw new ve("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new ve("Array index must be an integer, but found "+e+" instead.");return i[e]},fi.prototype.eachChild=function(t){t(this.index),t(this.input)},fi.prototype.outputDefined=function(){return!1},fi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]},mi.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,Jt),r=e.parse(t[2],2,Jt);return i&&r?oe(i.type,[Yt,Wt,Ht,Zt,Jt])?new mi(i,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+ie(i.type)+" instead"):null},mi.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!ae(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+ie(me(e))+" instead.");if(!ae(i,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+ie(me(i))+" instead.");return 0<=i.indexOf(e)},mi.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},mi.prototype.outputDefined=function(){return!0},mi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]},gi.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,Jt),r=e.parse(t[2],2,Jt);if(!i||!r)return null;if(!oe(i.type,[Yt,Wt,Ht,Zt,Jt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+ie(i.type)+" instead");if(4!==t.length)return new gi(i,r);var n=e.parse(t[3],3,Ht);return n?new gi(i,r,n):null},gi.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!ae(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+ie(me(e))+" instead.");if(!ae(i,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+ie(me(i))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(e,r)}return i.indexOf(e)},gi.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},gi.prototype.outputDefined=function(){return!1},gi.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]},yi.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,me(h)))return null}else i=me(h);if(void 0!==n[String(h)])return u.error("Branch labels must be unique.");n[String(h)]=o.length}var d=e.parse(l,a,r);if(!d)return null;r=r||d.type,o.push(d)}var f=e.parse(t[1],1,Jt);if(!f)return null;var m=e.parse(t[t.length-1],t.length-1,r);return!m||"value"!==f.type.kind&&e.concat(1).checkSubtype(i,f.type)?null:new yi(i,r,f,n,o,m)},yi.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(me(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},yi.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},yi.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},yi.prototype.serialize=function(){for(var t=this,e=["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(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=i;l<u.length;l+=1){var c=u[l],p=c[0],h=c[1];e.push(1===h.length?s(h[0]):h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e},vi.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,Yt);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 vi(i,r,s):null},vi.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)},vi.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)},vi.prototype.outputDefined=function(){return this.branches.every((function(t){return t[1].outputDefined()}))&&this.otherwise.outputDefined()},vi.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t},_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,Jt),r=e.parse(t[2],2,Ht);if(!i||!r)return null;if(!oe(i.type,[ee(Jt),Wt,Jt]))return e.error("Expected first argument to be of type array or string, but found "+ie(i.type)+" instead");if(4!==t.length)return new _i(i.type,i,r);var n=e.parse(t[3],3,Ht);return n?new _i(i.type,i,r,n):null},_i.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!ae(e,["string","array"]))throw new ve("Expected first argument to be of type array or string, but found "+ie(me(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(i,r)}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]};var Ti=wi("==",(function(t,e,i){return e===i}),bi),Ci=wi("!=",(function(t,e,i){return e!==i}),(function(t,e,i,r){return!bi(0,e,i,r)})),Ii=wi("<",(function(t,e,i){return e<i}),(function(t,e,i,r){return r.compare(e,i)<0})),Ei=wi(">",(function(t,e,i){return i<e}),(function(t,e,i,r){return 0<r.compare(e,i)})),Mi=wi("<=",(function(t,e,i){return e<=i}),(function(t,e,i,r){return r.compare(e,i)<=0})),Ai=wi(">=",(function(t,e,i){return i<=e}),(function(t,e,i,r){return 0<=r.compare(e,i)}));function Li(t){this.type=Ht,this.input=t}Si.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,Ht);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,Wt)))return null;var o=null;if(r.currency&&!(o=e.parse(r.currency,1,Wt)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=e.parse(r["min-fraction-digits"],1,Ht)))return null;var s=null;return r["max-fraction-digits"]&&!(s=e.parse(r["max-fraction-digits"],1,Ht))?null:new Si(i,n,o,a,s)},Si.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))},Si.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)},Si.prototype.outputDefined=function(){return!1},Si.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]},Li.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error("Expected argument of type string or array, but found "+ie(i.type)+" instead."):new Li(i):null},Li.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ve("Expected value to be of type string or array, but found "+ie(me(e))+" instead.")},Li.prototype.eachChild=function(t){t(this.input)},Li.prototype.outputDefined=function(){return!1},Li.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var ki={"==":Ti,"!=":Ci,">":Ei,"<":Ii,">
2=":Ai,"<=":Mi,array:_e,at:fi,boolean:_e,case:vi,coalesce:hi,collator:Me,format:be,image:we,in:mi,"index-of":gi,interpolate:ci,"interpolate-hcl":ci,"interpolate-lab":ci,length:Li,let:di,literal:ye,match:yi,number:_e,"number-format":Si,object:_e,slice:_i,step:Ke,string:_e,"to-boolean":Se,"to-color":Se,"to-number":Se,"to-string":Se,var:He,within:Ve};function Pi(t,e){var i=e[0],r=e[1],n=e[2],o=e[3];i=i.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=de(i,r,n,a);if(s)throw new ve(s);return new le(i/255*a,r/255*a,n/255*a,a)}function Di(t,e){return t in e}function zi(t,e){var i=e[t];return void 0===i?null:i}function Oi(t){return{type:t}}function Ni(t){return{result:"success",value:t}}function Ri(t){return{result:"error",value:t}}function Bi(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ji(t){return t.expression&&-1<t.expression.parameters.indexOf("zoom")}function Fi(t){return t.expression&&t.expression.interpolated}function Ui(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Vi(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function qi(t){return t}function Gi(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function Zi(t,e,i,r,n){return Gi(typeof i===n?r[i]:void 0,t.default,e.default)}function Hi(t,e,i){if("number"!==Ui(i))return Gi(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];var n=Ye(t.stops.map((function(t){return t[0]})),i);return t.stops[n][1]}function Wi(t,e,i){var r=void 0!==t.base?t.base:1;if("number"!==Ui(i))return Gi(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,l,u=Ye(t.stops.map((function(t){return t[0]})),i),c=(o=r,l=i-(a=t.stops[u][0]),0==(s=t.stops[u+1][0]-a)?0:1===o?l/s:(Math.pow(o,l)-1)/(Math.pow(o,s)-1)),p=t.stops[u][1],h=t.stops[u+1][1],d=Je[e.type]||qi;if(t.colorSpace&&"rgb"!==t.colorSpace){var f=ui[t.colorSpace];d=function(t,e){return f.reverse(f.interpolate(f.forward(t),f.forward(e),c))}}return"function"==typeof p.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=p.evaluate.apply(void 0,t),r=h.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==r)return d(i,r,c)}}:d(p,h,c)}function Yi(t,e,i){return"color"===e.type?i=le.parse(i):"formatted"===e.type?i=pe.fromString(i.toString()):"resolvedImage"===e.type?i=he.fromString(i.toString()):Ui(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),Gi(i,t.default,e.default)}Ee.register(ki,{error:[{kind:"error"},[Wt],function(t,e){throw new ve(e[0].evaluate(t))}],typeof:[Wt,[Jt],function(t,e){return ie(me(e[0].evaluate(t)))}],"to-rgba":[ee(Ht,4),[Kt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Kt,[Ht,Ht,Ht],Pi],rgba:[Kt,[Ht,Ht,Ht,Ht],Pi],has:{type:Yt,overloads:[[[Wt],function(t,e){return Di(e[0].evaluate(t),t.properties())}],[[Wt,Xt],function(t,e){var i=e[1];return Di(e[0].evaluate(t),i.evaluate(t))}]]},get:{type:Jt,overloads:[[[Wt],function(t,e){return zi(e[0].evaluate(t),t.properties())}],[[Wt,Xt],function(t,e){var i=e[1];return zi(e[0].evaluate(t),i.evaluate(t))}]]},"feature-state":[Jt,[Wt],function(t,e){return zi(e[0].evaluate(t),t.featureState||{})}],properties:[Xt,[],function(t){return t.properties()}],"geometry-type":[Wt,[],function(t){return t.geometryType()}],id:[Jt,[],function(t){return t.id()}],zoom:[Ht,[],function(t){return t.globals.zoom}],"heatmap-density":[Ht,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Ht,[],function(t){return t.globals.lineProgress||0}],accumulated:[Jt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Ht,Oi(Ht),function(t,e){for(var i=0,r=0,n=e;r<n.length;r+=1)i+=n[r].evaluate(t);return i}],"*":[Ht,Oi(Ht),function(t,e){for(var i=1,r=0,n=e;r<n.length;r+=1)i*=n[r].evaluate(t);return i}],"-":{type:Ht,overloads:[[[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)-i.evaluate(t)}],[[Ht],function(t,e){return-e[0].evaluate(t)}]]},"/":[Ht,[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)/i.evaluate(t)}],"%":[Ht,[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)%i.evaluate(t)}],ln2:[Ht,[],function(){return Math.LN2}],pi:[Ht,[],function(){return Math.PI}],e:[Ht,[],function(){return Math.E}],"^":[Ht,[Ht,Ht],function(t,e){var i=e[1];return Math.pow(e[0].evaluate(t),i.evaluate(t))}],sqrt:[Ht,[Ht],function(t,e){return Math.sqrt(e[0].evaluate(t))}],log10:[Ht,[Ht],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN10}],ln:[Ht,[Ht],function(t,e){return Math.log(e[0].evaluate(t))}],log2:[Ht,[Ht],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN2}],sin:[Ht,[Ht],function(t,e){return Math.sin(e[0].evaluate(t))}],cos:[Ht,[Ht],function(t,e){return Math.cos(e[0].evaluate(t))}],tan:[Ht,[Ht],function(t,e){return Math.tan(e[0].evaluate(t))}],asin:[Ht,[Ht],function(t,e){return Math.asin(e[0].evaluate(t))}],acos:[Ht,[Ht],function(t,e){return Math.acos(e[0].evaluate(t))}],atan:[Ht,[Ht],function(t,e){return Math.atan(e[0].evaluate(t))}],min:[Ht,Oi(Ht),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Ht,Oi(Ht),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Ht,[Ht],function(t,e){return Math.abs(e[0].evaluate(t))}],round:[Ht,[Ht],function(t,e){var i=e[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Ht,[Ht],function(t,e){return Math.floor(e[0].evaluate(t))}],ceil:[Ht,[Ht],function(t,e){return Math.ceil(e[0].evaluate(t))}],"filter-==":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1];return t.properties()[i.value]===r.value}],"filter-id-==":[Yt,[Jt],function(t,e){var i=e[0];return t.id()===i.value}],"filter-type-==":[Yt,[Wt],function(t,e){var i=e[0];return t.geometryType()===i.value}],"filter-<":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&n<o}],"filter-id-<":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&r<n}],"filter->":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&o<n}],"filter-id->":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&n<r}],"filter-<=":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&r<=n}],"filter->=":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&o<=n}],"filter-id->=":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&n<=r}],"filter-has":[Yt,[Jt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Yt,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Yt,[ee(Wt)],function(t,e){return 0<=e[0].value.indexOf(t.geometryType())}],"filter-id-in":[Yt,[ee(Jt)],function(t,e){return 0<=e[0].value.indexOf(t.id())}],"filter-in-small":[Yt,[Wt,ee(Jt)],function(t,e){var i=e[0];return 0<=e[1].value.indexOf(t.properties()[i.value])}],"filter-in-large":[Yt,[Wt,ee(Jt)],function(t,e){var i=e[0],r=e[1];
vendor: 11,210 bytes, line 2
2return 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],r.value,0,r.value.length-1)}],all:{type:Yt,overloads:[[[Yt,Yt],function(t,e){var i=e[1];return e[0].evaluate(t)&&i.evaluate(t)}],[Oi(Yt),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:Yt,overloads:[[[Yt,Yt],function(t,e){var i=e[1];return e[0].evaluate(t)||i.evaluate(t)}],[Oi(Yt),function(t,e){for(var i=0,r=e;i<r.length;i+=1)if(r[i].evaluate(t))return!0;return!1}]]},"!":[Yt,[Yt],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Yt,[Wt],function(t,e){var i=t.globals&&t.globals.isSupportedScript;return!i||i(e[0].evaluate(t))}],upcase:[Wt,[Wt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Wt,[Wt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Wt,Oi(Jt),function(t,e){return e.map((function(e){return ge(e.evaluate(t))})).join("")}],"resolved-locale":[Wt,[Qt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Ki=function(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new Ce,this._defaultValue=e?"color"===(i=e).type&&Vi(i.default)?new le(0,0,0,0):"color"===i.type?le.parse(i.default)||null:void 0===i.default?null:i.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Xi(t){return Array.isArray(t)&&0<t.length&&"string"==typeof t[0]&&t[0]in ki}function Ji(t,e){var i,r=new We(ki,[],e?(i={color:Kt,string:Wt,number:Ht,enum:Wt,boolean:Yt,formatted:$t,resolvedImage:te},"array"===e.type?ee(i[e.value]||Jt,e.length):i[e.type]):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Ni(new Ki(n,e)):Ri(r.errors)}Ki.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)},Ki.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 Qi=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Ge(e.expression)};Qi.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)},Qi.prototype.evaluate=function(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)};var $i=function(t,e,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Ge(e.expression),this.interpolationType=r};function tr(t,e){if("error"===(t=Ji(t,e)).result)return t;var i=t.value.expression,r=qe(i);if(!r&&!Bi(e))return Ri([new qt("","data expressions not supported")]);var n=Ze(i,["zoom"]);if(!n&&!ji(e))return Ri([new qt("","zoom expressions not supported")]);var o=function t(e){var i=null;if(e instanceof di)i=t(e.result);else if(e instanceof hi)for(var r=0,n=e.args;r<n.length&&!(i=t(n[r]));r+=1);else(e instanceof Ke||e instanceof ci)&&e.input instanceof Ee&&"zoom"===e.input.name&&(i=e);return i instanceof qt||e.eachChild((function(e){var r=t(e);r instanceof qt?i=r:!i&&r?i=new qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):i&&r&&i!==r&&(i=new qt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),i}(i);return o||n?o instanceof qt?Ri([o]):o instanceof ci&&!Fi(e)?Ri([new qt("",'"interpolate" expressions cannot be used with this property')]):Ni(o?new $i(r?"camera":"composite",t.value,o.labels,o instanceof ci?o.interpolation:void 0):new Qi(r?"constant":"source",t.value)):Ri([new qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}function er(t,e){this._parameters=t,this._specification=e,Bt(this,function t(e,i){var r,n,o,a="color"===i.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||!(s||void 0!==e.property),u=e.type||(Fi(i)?"exponential":"interval");if(a&&((e=Bt({},e)).stops&&(e.stops=e.stops.map((function(t){return[t[0],le.parse(t[1])]}))),e.default=le.parse(e.default?e.default:i.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!ui[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)r=Wi;else if("interval"===u)r=Hi;else if("categorical"===u){r=Zi,n=Object.create(null);for(var c=0,p=e.stops;c<p.length;c+=1){var h=p[c];n[h[0]]=h[1]}o=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');r=Yi}if(s){for(var d={},f=[],m=0;m<e.stops.length;m++){var g=e.stops[m],y=g[0].zoom;void 0===d[y]&&(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},f.push(y)),d[y].stops.push([g[0].value,g[1]])}for(var v=[],_=0,x=f;_<x.length;_+=1){var b=x[_];v.push([d[b].zoom,t(d[b],i)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:ci.interpolationFactor.bind(void 0,w),zoomStops:v.map((function(t){return t[0]})),evaluate:function(t,r){var n=t.zoom;return Wi({stops:v,base:e.base},i,n).evaluate(n,r)}}}if(l){var S="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:ci.interpolationFactor.bind(void 0,S),zoomStops:e.stops.map((function(t){return t[0]})),evaluate:function(t){return r(e,i,t.zoom,n,o)}}}return{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Gi(e.default,i.default):r(e,i,s,n,o)}}}(this._parameters,this._specification))}function ir(t){var e=t.key,i=t.value,r=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=Ui(i);if("object"!==l)return[new Nt(e,i,"object expected, "+l+" found")];for(var u in i){var c=u.split(".")[0],p=r[c]||r["*"],h=void 0;if(n[c])h=n[c];else if(r[c])h=Er;else if(n["*"])h=n["*"];else{if(!r["*"]){s.push(new Nt(e,i[u],'unknown property "'+u+'"'));continue}h=Er}s=s.concat(h({key:(e?e+".":e)+u,value:i[u],valueSpec:p,style:o,styleSpec:a,object:i,objectKey:u},i))}for(var d in r)n[d]||r[d].required&&void 0===r[d].default&&void 0===i[d]&&s.push(new Nt(e,i,'missing required property "'+d+'"'));return s}function rr(t){var e=t.value,i=t.valueSpec,r=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||Er;if("array"!==Ui(e))return[new Nt(o,e,"array expected, "+Ui(e)+" found")];if(i.length&&e.length!==i.length)return[new Nt(o,e,"array length "+i.length+" expected, length "+e.length+" found")];if(i["min-length"]&&e.length<i["min-length"])return[new Nt(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"===Ui(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 nr(t){var e=t.key,i=t.value,r=t.valueSpec,n=Ui(i);return"number"===n&&i!=i&&(n="NaN"),"number"!==n?[new Nt(e,i,"number expected, "+n+" found")]:"minimum"in r&&i<r.minimum?[new Nt(e,i,i+" is less than the minimum value "+r.minimum)]:"maximum"in r&&i>r.maximum?[new Nt(e,i,i+" is greater than the maximum value "+r.maximum)]:[]}function or(t){var e,i,r,n=t.valueSpec,o=jt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Ui(t.value.stops)&&"array"===Ui(t.value.stops[0])&&"object"===Ui(t.value.stops[0][0]),c=ir({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Nt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],i=t.value;return e=e.concat(rr({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Ui(i)&&0===i.length&&e.push(new Nt(t.key,i,"array must have at least one stop")),e},default:function(t){return Er({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Nt(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Nt(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Fi(t.valueSpec)&&c.push(new Nt(t.key,t.value,"exponential functions not supported")),8<=t.styleSpec.$version&&(l&&!Bi(t.valueSpec)?c.push(new Nt(t.key,t.value,"property functions not supported")):s&&!ji(t.valueSpec)&&c.push(new Nt(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new Nt(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Ui(o))return[new Nt(s,o,"array expected, "+Ui(o)+" found")];if(2!==o.length)return[new Nt(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Ui(o[0]))return[new Nt(s,o,"object expected, "+Ui(o[0])+" found")];if(void 0===o[0].zoom)return[new Nt(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Nt(s,o,"object stop key must have value")];if(r&&r>jt(o[0].zoom))return[new Nt(s,o[0].zoom,"stop zoom values must appear in ascending order")];jt(o[0].zoom)!==r&&(r=jt(o[0].zoom),i=void 0,a={}),e=e.concat(ir({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:nr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Xi(Ft(o[1]))?e.concat([new Nt(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Er({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function h(t,r){var s=Ui(t.value),l=jt(t.value),u=null!==t.value?t.value:r;if(e){if(s!==e)return[new Nt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Nt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"===s||"categorical"===o)return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==i&&l<i?[new Nt(t.key,u,"stop domain values must appear in ascending order")]:(i=l,"categorical"===o&&l in a?[new Nt(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new Nt(t.key,u,"integer expected, found "+l)];var c="number expected, "+s+" found";return Bi(n)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new
2Nt(t.key,u,c)]}}function ar(t){var e=("property"===t.expressionContext?tr:Ji)(Ft(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new Nt(""+t.key+e.key,t.value,e.message)}));var i=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!i.outputDefined())return[new Nt(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Ge(i))return[new Nt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Ge(i))return[new Nt(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Ze(i,["zoom","feature-state"]))return[new Nt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!qe(i))return[new Nt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function sr(t){var e=t.key,i=t.value,r=t.valueSpec,n=[];return Array.isArray(r.values)?-1===r.values.indexOf(jt(i))&&n.push(new Nt(e,i,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(i)+" found")):-1===Object.keys(r.values).indexOf(jt(i))&&n.push(new Nt(e,i,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(i)+" found")),n}function lr(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(!lr(r)&&"boolean"!=typeof r)return}return 1;default:return 1}}$i.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)},$i.prototype.evaluate=function(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)},$i.prototype.interpolationFactor=function(t,e,i){return this.interpolationType?ci.interpolationFactor(this.interpolationType,t,e,i):0},er.deserialize=function(t){return new er(t._parameters,t._specification)};var ur={type:"boolean",default:!(er.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}}),transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cr(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};lr(t)||(t=hr(t));var e=Ji(t,ur);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,i,r){return e.value.evaluate(t,i,{},r)},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 pr(t,e){return t<e?-1:e<t?1:0}function hr(t){if(!t)return!0;var e,i=t[0];return t.length<=1?"any"!==i:"=="===i?dr(t[1],t[2],"=="):"!="===i?gr(dr(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?dr(t[1],t[2],i):"any"===i?(e=t.slice(1),["any"].concat(e.map(hr))):"all"===i?["all"].concat(t.slice(1).map(hr)):"none"===i?["all"].concat(t.slice(1).map(hr).map(gr)):"in"===i?fr(t[1],t.slice(2)):"!in"===i?gr(fr(t[1],t.slice(2))):"has"===i?mr(t[1]):"!has"===i?gr(mr(t[1])):"within"!==i||t}function dr(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 fr(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(pr)]]:["filter-in-small",t,["literal",e]]}}function mr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function gr(t){return["!",t]}function yr(t){return lr(Ft(t.value))?ar(Bt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var i=e.value,r=e.key;if("array"!==Ui(i))return[new Nt(r,i,"array expected, "+Ui(i)+" found")];var n,o=e.styleSpec,a=[];if(i.length<1)return[new Nt(r,i,"filter array must have at least 1 element")];switch(a=a.concat(sr({key:r+"[0]",value:i[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),jt(i[0])){case"<":case"<=":case">":case">=":2<=i.length&&"$type"===jt(i[1])&&a.push(new Nt(r,i,'"$type" cannot be use with operator "'+i[0]+'"'));case"==":case"!=":3!==i.length&&a.push(new Nt(r,i,'filter array for operator "'+i[0]+'" must have 3 elements'));case"in":case"!in":2<=i.length&&"string"!==(n=Ui(i[1]))&&a.push(new Nt(r+"[1]",i[1],"string expected, "+n+" found"));for(var s=2;s<i.length;s++)n=Ui(i[s]),"$type"===jt(i[1])?a=a.concat(sr({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 Nt(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;
vendor: 8,349 bytes, line 2
2l++)a=a.concat(t({key:r+"["+l+"]",value:i[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Ui(i[1]),2!==i.length?a.push(new Nt(r,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new Nt(r+"[1]",i[1],"string expected, "+n+" found"));break;case"within":n=Ui(i[1]),2!==i.length?a.push(new Nt(r,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"object"!==n&&a.push(new Nt(r+"[1]",i[1],"object expected, "+n+" found"))}return a}(t)}function vr(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 Er({key:i,value:o,valueSpec:n.transition,style:r,styleSpec:n});var u,c=t.valueSpec||s[a];if(!c)return[new Nt(i,o,'unknown property "'+a+'"')];if("string"===Ui(o)&&Bi(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new Nt(i,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&p.push(new Nt(i,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Vi(Ft(o))&&"identity"===jt(o.type)&&p.push(new Nt(i,o,'"text-font" does not support identity functions'))),p.concat(Er({key:t.key,value:o,valueSpec:c,style:r,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function _r(t){return vr(t,"paint")}function xr(t){return vr(t,"layout")}function br(t){var e=[],i=t.value,r=t.key,n=t.style,o=t.styleSpec;i.type||i.ref||e.push(new Nt(r,i,'either "type" or "ref" is required'));var a,s=jt(i.type),l=jt(i.ref);if(i.id)for(var u=jt(i.id),c=0;c<t.arrayIndex;c++){var p=n.layers[c];jt(p.id)===u&&e.push(new Nt(r,i.id,'duplicate layer id "'+i.id+'", previously used at line '+p.id.__line__))}if("ref"in i)["type","source","source-layer","filter","layout"].forEach((function(t){t in i&&e.push(new Nt(r,i[t],'"'+t+'" is prohibited for ref layers'))})),n.layers.forEach((function(t){jt(t.id)===l&&(a=t)})),a?a.ref?e.push(new Nt(r,i.ref,"ref cannot reference another ref layer")):s=jt(a.type):e.push(new Nt(r,i.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(i.source){var h=n.sources&&n.sources[i.source],d=h&&jt(h.type);h?"vector"===d&&"raster"===s?e.push(new Nt(r,i.source,'layer "'+i.id+'" requires a raster source')):"raster"===d&&"raster"!==s?e.push(new Nt(r,i.source,'layer "'+i.id+'" requires a vector source')):"vector"!==d||i["source-layer"]?"raster-dem"===d&&"hillshade"!==s?e.push(new Nt(r,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!i.paint||!i.paint["line-gradient"]||"geojson"===d&&h.lineMetrics||e.push(new Nt(r,i,'layer "'+i.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Nt(r,i,'layer "'+i.id+'" must specify a "source-layer"')):e.push(new Nt(r,i.source,'source "'+i.source+'" not found'))}else e.push(new Nt(r,i,'missing required property "source"'));return e=e.concat(ir({key:r,value:i,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Er({key:r+".type",value:i.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:i,objectKey:"type"})},filter:yr,layout:function(t){return ir({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return xr(Bt({layerType:s},t))}}})},paint:function(t){return ir({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return _r(Bt({layerType:s},t))}}})}}}))}function wr(t){var e=t.value,i=t.key,r=Ui(e);return"string"!==r?[new Nt(i,e,"string expected, "+r+" found")]:[]}var Sr={promoteId:function(t){var e=t.key,i=t.value;if("string"===Ui(i))return wr({key:e,value:i});var r=[];for(var n in i)r.push.apply(r,wr({key:e+"."+n,value:i[n]}));return r}};function Tr(t){var e=t.value,i=t.key,r=t.styleSpec,n=t.style;if(!e.type)return[new Nt(i,e,'"type" is required')];var o,a=jt(e.type);switch(a){case"vector":case"raster":case"raster-dem":return ir({key:i,value:e,valueSpec:r["source_"+a.replace("-","_")],style:t.style,styleSpec:r,objectElementValidators:Sr});case"geojson":if(o=ir({key:i,value:e,valueSpec:r.source_geojson,style:n,styleSpec:r,objectElementValidators:Sr}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],c="string"==typeof u?[u,["accumulated"],["get",s]]:u;o.push.apply(o,ar({key:i+"."+s+".map",value:l[1],expressionContext:"cluster-map"})),o.push.apply(o,ar({key:i+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return ir({key:i,value:e,valueSpec:r.source_video,style:n,styleSpec:r});case"image":return ir({key:i,value:e,valueSpec:r.source_image,style:n,styleSpec:r});case"canvas":return[new Nt(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sr({key:i+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:r})}}function Cr(t){var e=t.value,i=t.styleSpec,r=i.light,n=t.style,o=[],a=Ui(e);if(void 0===e)return o;if("object"!==a)return o.concat([new Nt("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=o.concat(l&&r[l[1]]&&r[l[1]].transition?Er({key:s,value:e[s],valueSpec:i.transition,style:n,styleSpec:i}):r[s]?Er({key:s,value:e[s],valueSpec:r[s],style:n,styleSpec:i}):[new Nt(s,e[s],'unknown property "'+s+'"')])}return o}var Ir={"*":function(){return[]},array:rr,boolean:function(t){var e=t.value,i=t.key,r=Ui(e);return"boolean"!==r?[new Nt(i,e,"boolean expected, "+r+" found")]:[]},number:nr,color:function(t){var e=t.key,i=t.value,r=Ui(i);return"string"!==r?[new Nt(e,i,"color expected, "+r+" found")]:null===se(i)?[new Nt(e,i,'color expected, "'+i+'" found')]:[]},constants:Rt,enum:sr,filter:yr,function:or,layer:br,object:ir,source:Tr,light:Cr,string:wr,formatted:function(t){return 0===wr(t).length?[]:ar(t)},resolvedImage:function(t){return 0===wr(t).length?[]:ar(t)}};function Er(t){var e=t.value,i=t.valueSpec,r=t.styleSpec;return i.expression&&Vi(jt(e))?or(t):i.expression&&Xi(Ft(e))?ar(t):i.type&&Ir[i.type]?Ir[i.type](t):ir(Bt({},t,{valueSpec:i.type?r[i.type]:i}))}function Mr(t){var e=t.value,i=t.key,r=wr(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new Nt(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Nt(i,e,'"glyphs" url must include a "{range}" token'))),r}function Ar(t,e){void 0===e&&(e=Ot);var i=[];return i=i.concat(Er({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Mr,"*":function(){return[]}}})),t.constants&&(i=i.concat(Rt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Lr(i)}function Lr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function kr(t){return function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];return Lr(t.apply(this,e))}}Ar.source=kr(Tr),Ar.light=kr(Cr),Ar.layer=kr(br),Ar.filter=kr(yr),Ar.paintProperty=kr(_r),Ar.layoutProperty=kr(xr);var Pr=Ar,Dr=Pr.light,zr=Pr.paintProperty,Or=Pr.layoutProperty;function Nr(t,e){var i=!1;if(e&&e.length)for(var r=0,n=e;r<n.length;r+=1)t.fire(new Dt(new Error(n[r].message))),i=!0;return i}var Rr=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;var c=i/e*t;this.min=-c,this.max=t+c}Br.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."}
2,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);var s=[];return this._forEachCell(t,e,i,r,this._queryCell,s,{},n),s},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=l[p];if(void 0===a[h]){var d=4*h;(s?s(c[0+d],c[1+d],c[2+d],c[3+d]):t<=c[2+d]&&e<=c[3+d]&&i>=c[0+d]&&r>=c[1+d])?(a[h]=!0,o.push(u[h])):a[h]=!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 d=u;d<=p;d++){var f=this.d*d+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(d),this._convertFromCellCoord(h+1),this._convertFromCellCoord(d+1)))&&n.call(this,t,e,i,r,f,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 jr=a.ImageData,Fr=a.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(var qr in Vr("Object",Object),Rr.serialize=function(t,e){var i=t.toArrayBuffer();return e&&e.push(i),{buffer:i}},Rr.deserialize=function(t){return new Rr(t.buffer)},Vr("Grid",Rr),Vr("Color",le),Vr("Error",Error),Vr("ResolvedImage",he),Vr("StylePropertyFunction",er),Vr("StyleExpression",Ki,{omit:["_evaluator"]}),Vr("ZoomDependentExpression",$i),Vr("ZoomConstantExpression",Qi),Vr("CompoundExpression",Ee,{omit:["_evaluate"]}),ki)ki[qr]._classRegistryKey||Vr("Expression_"+qr,ki[qr]);function Gr(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Zr(t){return Fr&&t instanceof Fr}function Hr(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(Gr(t)||Zr(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var i=t;return e&&e.push(i.buffer),i}if(t instanceof jr)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(Hr(o[n],e));return r}if("object"!=typeof t)throw new Error("can't serialize object of type "+typeof t);var a=t.constructor,s=a._classRegistryKey;if(!s)throw new Error("can't serialize object of unregistered class");var l=a.serialize?a.serialize(t,e):{};if(!a.serialize){for(var u in t)if(t.hasOwnProperty(u)&&!(0<=Ur[s].omit.indexOf(u))){var c=t[u];l[u]=0<=Ur[s].shallow.indexOf(u)?c:Hr(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}function Wr(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||Gr(t)||Zr(t)||ArrayBuffer.isView(t)||t instanceof jr)return t;if(Array.isArray(t))return t.map(Wr);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=o[n];if("$name"!==a){var s=t[a];r[a]=0<=Ur[e].shallow.indexOf(a)?s:Wr(s)}}return r}function Yr(){this.first=!0}Yr.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 Kr={"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}
2,"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 Xr(t){for(var e=0,i=t;e<i.length;e+=1)if(Jr(i[e].charCodeAt(0)))return!0;return!1}function Jr(t){return 746===t||747===t||!(t<4352)&&(Kr["Bopomofo Extended"](t)||Kr.Bopomofo(t)||Kr["CJK Compatibility Forms"](t)&&!(65097<=t&&t<=65103)||Kr["CJK Compatibility Ideographs"](t)||Kr["CJK Compatibility"](t)||Kr["CJK Radicals Supplement"](t)||Kr["CJK Strokes"](t)||!(!Kr["CJK Symbols and Punctuation"](t)||12296<=t&&t<=12305||12308<=t&&t<=12319||12336===t)||Kr["CJK Unified Ideographs Extension A"](t)||Kr["CJK Unified Ideographs"](t)||Kr["Enclosed CJK Letters and Months"](t)||Kr["Hangul Compatibility Jamo"](t)||Kr["Hangul Jamo Extended-A"](t)||Kr["Hangul Jamo Extended-B"](t)||Kr["Hangul Jamo"](t)||Kr["Hangul Syllables"](t)||Kr.Hiragana(t)||Kr["Ideographic Description Characters"](t)||Kr.Kanbun(t)||Kr["Kangxi Radicals"](t)||Kr["Katakana Phonetic Extensions"](t)||Kr.Katakana(t)&&12540!==t||!(!Kr["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)||!(!Kr["Small Form Variants"](t)||65112<=t&&t<=65118||65123<=t&&t<=65126)||Kr["Unified Canadian Aboriginal Syllabics"](t)||Kr["Unified Canadian Aboriginal Syllabics Extended"](t)||Kr["Vertical Forms"](t)||Kr["Yijing Hexagram Symbols"](t)||Kr["Yi Syllables"](t)||Kr["Yi Radicals"](t))}function Qr(t){return!(Jr(t)||(e=t,Kr["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||Kr["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||Kr["Letterlike Symbols"](e)||Kr["Number Forms"](e)||Kr["Miscellaneous Technical"](e)&&(8960<=e&&e<=8967||8972<=e&&e<=8991||8996<=e&&e<=9e3||9003===e||9085<=e&&e<=9114||9150<=e&&e<=9165||9167===e||9169<=e&&e<=9179||9186<=e&&e<=9215)||Kr["Control Pictures"](e)&&9251!==e||Kr["Optical Character Recognition"](e)||Kr["Enclosed Alphanumerics"](e)||Kr["Geometric Shapes"](e)||Kr["Miscellaneous Symbols"](e)&&!(9754<=e&&e<=9759)||Kr["Miscellaneous Symbols and Arrows"](e)&&(11026<=e&&e<=11055||11088<=e&&e<=11097||11192<=e&&e<=11243)||Kr["CJK Symbols and Punctuation"](e)||Kr.Katakana(e)||Kr["Private Use Area"](e)||Kr["CJK Compatibility Forms"](e)||Kr["Small Form Variants"](e)||Kr["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||9984<=e&&e<=10087||10102<=e&&e<=10131||65532===e||65533===e));var e}function $r(t){return 1424<=t&&t<=2303||Kr["Arabic Presentation Forms-A"](t)||Kr["Arabic Presentation Forms-B"](t)}function tn(t){for(var e=0,i=t;e<i.length;e+=1)if($r(i[e].charCodeAt(0)))return 1}function en(t){t&&"string"==typeof t&&-1<t.indexOf("NetworkError")&&(nn="error"),rn&&rn(t)}var rn=null,nn="unavailable",on=null;function an(){cn.fire(new Lt("pluginStateChange",{pluginStatus:nn,pluginURL:on}))}function sn(){return nn}function ln(){if("deferred"!==nn||!on)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");nn="loading",an(),on&&St({url:on},(function(t){t?en(t):(nn="loaded",an())}))}function un(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 Yr,this.transition={})}var cn=new kt,pn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===nn||null!=pn.applyArabicShaping},isLoading:function(){return"loading"===nn},setState:function(t){nn=t.pluginStatus,on=t.pluginURL},isParsed:function(){return null!=pn.applyArabicShaping&&null!=pn.processBidirectionalText&&null!=pn.processStyledBidirectionalText},getPluginURL:function(){return on}};function hn(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Vi(t))return new er(t,e);if(Xi(t)){var i=tr(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=le.parse(t)),{kind:"constant",evaluate:function(){return r}}}(void 0===e?t.specification.default:e,t.specification)}function dn(t){this.property=t,this.value=new hn(t,void 0)}function fn(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}un.prototype.isSupportedScript=function(t){return function(t,e){for(var i=0,r=t;i<r.length;
2i+=1)if(n=r[i].charCodeAt(0),!e&&$r(n)||2304<=n&&n<=3583||3840<=n&&n<=4255||Kr.Khmer(n))return!1;var n;return!0}(t,pn.isLoaded())},un.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},un.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}},hn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},hn.prototype.possiblyEvaluate=function(t,e,i){return this.property.possiblyEvaluate(this,t,e,i)},dn.prototype.transitioned=function(t,e){return new mn(this.property,this.value,e,p({},t.transition,this.transition),t.now)},dn.prototype.untransitioned=function(){return new mn(this.property,this.value,null,{},0)},fn.prototype.getValue=function(t){return x(this._values[t].value.value)},fn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new dn(this._values[t].property)),this._values[t].value=new hn(this._values[t].property,null===e?void 0:x(e))},fn.prototype.getTransition=function(t){return x(this._values[t].transition)},fn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new dn(this._values[t].property)),this._values[t].transition=x(e)||void 0},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);var o=this.getTransition(r);void 0!==o&&(t[r+"-transition"]=o)}return t},fn.prototype.transitioned=function(t,e){for(var i=new gn(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},fn.prototype.untransitioned=function(){for(var t=new gn(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 mn=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)};mn.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 gn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};function yn(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}function vn(t,e,i){this.property=t,this.value=e,this.parameters=i}gn.prototype.possiblyEvaluate=function(t,e,i){for(var r=new _n(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},gn.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},yn.prototype.getValue=function(t){return x(this._values[t].value)},yn.prototype.setValue=function(t,e){this._values[t]=new hn(this._values[t].property,null===e?void 0:x(e))},yn.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},yn.prototype.possiblyEvaluate=function(t,e,i){for(var r=new _n(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},vn.prototype.isConstant=function(){return"constant"===this.value.kind},vn.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},vn.prototype.evaluate=function(t,e,i,r){return this.property.evaluate(this.value,this.parameters,t,e,i,r)};var _n=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};function xn(t){this.specification=t}function bn(t,e){this.specification=t,this.overrides=e}function wn(t){this.specification=t}_n.prototype.get=function(t){return this._values[t]},xn.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)}
2,xn.prototype.interpolate=function(t,e,i){var r=Je[this.specification.type];return r?r(t,e,i):t},bn.prototype.possiblyEvaluate=function(t,e,i,r){return new vn(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},i,r)}:t.expression,e)},bn.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 vn(this,{kind:"constant",value:void 0},t.parameters);var r=Je[this.specification.type];return r?new vn(this,{kind:"constant",value:r(t.value.value,e.value.value,i)},t.parameters):t},bn.prototype.evaluate=function(t,e,i,r,n,o){return"constant"===t.kind?t.value:t.evaluate(e,i,r,n,o)};var Sn,Tn=(Cn.__proto__=Sn=bn,((Cn.prototype=Object.create(Sn&&Sn.prototype)).constructor=Cn).prototype.possiblyEvaluate=function(t,e,i,r){if(void 0===t.value)return new vn(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},i,r),o="resolvedImage"===t.property.specification.type&&"string"!=typeof n?n.name:n;return new vn(this,{kind:"constant",value:this._calculate(o,o,o,e)},e)}return"camera"!==t.expression.kind?new vn(this,t.expression,e):new vn(this,{kind:"constant",value:this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e)},e)},Cn.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;var a=t.evaluate(e,i,r,n,o);return this._calculate(a,a,a,e)},Cn.prototype._calculate=function(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},Cn.prototype.interpolate=function(t){return t},Cn);function Cn(){Sn.apply(this,arguments)}function In(t){this.specification=t}function En(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 hn(i,void 0),n=this.defaultTransitionablePropertyValues[e]=new dn(i);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}}function Mn(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}function An(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}wn.prototype.possiblyEvaluate=function(t,e,i,r){if(void 0!==t.value){if("constant"!==t.expression.kind)return this._calculate(t.expression.evaluate(new un(Math.floor(e.zoom-1),e)),t.expression.evaluate(new un(Math.floor(e.zoom),e)),t.expression.evaluate(new un(Math.floor(e.zoom+1),e)),e);var n=t.expression.evaluate(e,null,{},i,r);return this._calculate(n,n,n,e)}},wn.prototype._calculate=function(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},wn.prototype.interpolate=function(t){return t},In.prototype.possiblyEvaluate=function(t,e,i,r){return!!t.expression.evaluate(e,null,{},i,r)},In.prototype.interpolate=function(){return!1},Vr("DataDrivenProperty",bn),Vr("DataConstantProperty",xn),Vr("CrossFadedDataDrivenProperty",Tn),Vr("CrossFadedProperty",wn),Vr("ColorRampProperty",In);var Ln,kn=(Dn.__proto__=Ln=kt,((Dn.prototype=Object.create(Ln&&Ln.prototype)).constructor=Dn).prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},Dn.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},Dn.prototype.setLayoutProperty=function(t,e,i){void 0===i&&(i={}),null!=e&&this._validate(Or,"layers."+this.id+".layout."+t,t,e,i)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},Dn.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)}
vendor: 1,458 bytes, line 2
2,Dn.prototype.setPaintProperty=function(t,e,i){if(void 0===i&&(i={}),null!=e&&this._validate(zr,"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"],o=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||n||this._handleOverridablePaintPropertyUpdate(t,a,s)},Dn.prototype._handleSpecialPaintPropertyUpdate=function(t){},Dn.prototype._handleOverridablePaintPropertyUpdate=function(t,e,i){return!1},Dn.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},Dn.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},Dn.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},Dn.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)},Dn.prototype.serialize=function(){var t={id:this.id,type:this.t
2ype,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),_(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},Dn.prototype._validate=function(t,e,i,r,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&Nr(this,t.call(Pr,{key:e,layerType:this.type,objectKey:i,value:r,styleSpec:Ot,style:{glyphs:!0,sprite:!0}}))},Dn.prototype.is3D=function(){return!1},Dn.prototype.isTileClipped=function(){return!1},Dn.prototype.hasOffscreenPass=function(){return!1},Dn.prototype.resize=function(){},Dn.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof vn&&Bi(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},Dn),Pn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function Dn(t,e){if(Ln.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 yn(e.layout)),e.paint)){for(var i in this._transitionablePaint=new fn(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 _n(e.paint)}}function zn(t,e){void 0===e&&(e=1);var i=0,r=0;return{members:t.map((function(t){var n=Pn[t.type].BYTES_PER_ELEMENT,o=i=On(i,Math.max(e,n)),a=t.components||1;return r=Math.max(r,n),i+=n*a,{name:t.name,type:t.type,components:a,offset:o}})),size:On(i,Math.max(r,e)),alignment:e}}function On(t,e){return Math.ceil(t/e)*e}An.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},An.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},An.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},An.prototype.clear=function(){this.length=0},An.prototype.resize=function(t){this.reserve(t),this.length=t},An.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},An.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Nn,Rn=(Bn.__proto__=Nn=An,((Bn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Bn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Bn.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Bn.prototype.emplace=function(t,e,i){var r=2*t;return this.int16[0+r]=e,this.int16[1+r]=i,t},Bn);function Bn(){Nn.apply(this,arguments)}Rn.prototype.bytesPerElement=4,Vr("StructArrayLayout2i4",Rn);var jn,Fn=(Un.__proto__=jn=An,((Un.prototype=Object.create(jn&&jn.prototype)).constructor=Un).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Un.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},Un.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},Un);function Un(){jn.apply(this,arguments)}Fn.prototype.bytesPerElement=8,Vr("StructArrayLayout4i8",Fn);var Vn,qn=(Gn.__proto__=Vn=An,((Gn.prototype=Object.create(Vn&&Vn.prototype)).constructor=Gn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
2,Gn.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)},Gn.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},Gn);function Gn(){Vn.apply(this,arguments)}qn.prototype.bytesPerElement=12,Vr("StructArrayLayout2i4i12",qn);var Zn,Hn=(Wn.__proto__=Zn=An,((Wn.prototype=Object.create(Zn&&Zn.prototype)).constructor=Wn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Wn.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)},Wn.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},Wn);function Wn(){Zn.apply(this,arguments)}Hn.prototype.bytesPerElement=8,Vr("StructArrayLayout2i4ub8",Hn);var Yn,Kn=(Xn.__proto__=Yn=An,((Xn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Xn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Xn.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)},Xn.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},Xn);function Xn(){Yn.apply(this,arguments)}Kn.prototype.bytesPerElement=20,Vr("StructArrayLayout10ui20",Kn);var Jn,Qn=($n.__proto__=Jn=An,(($n.prototype=Object.create(Jn&&Jn.prototype)).constructor=$n).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},$n.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)},$n.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h){var d=12*t;return this.int16[0+d]=e,this.int16[1+d]=i,this.int16[2+d]=r,this.int16[3+d]=n,this.uint16[4+d]=o,this.uint16[5+d]=a,this.uint16[6+d]=s,this.uint16[7+d]=l,this.int16[8+d]=u,this.int16[9+d]=c,this.int16[10+d]=p,this.int16[11+d]=h,t},$n);function $n(){Jn.apply(this,arguments)}Qn.prototype.bytesPerElement=24,Vr("StructArrayLayout4i4ui4i24",Qn);var to,eo=(io.__proto__=to=An,((io.prototype=Object.create(to&&to.prototype)).constructor=io).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},io.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},io.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},io);function io(){to.apply(this,arguments)}eo.prototype.bytesPerElement=12,Vr("StructArrayLayout3f12",eo);var ro,no=(oo.__proto__=ro=An,((oo.prototype=Object.create(ro&&ro.prototype)).constructor=oo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},oo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},oo.prototype.emplace=function(t,e){return this.uint32[+t+0]=e,t},oo);function oo(){ro.apply(this,arguments)}no.prototype.bytesPerElement=4,Vr("StructArrayLayout1ul4",no);var ao,so=(lo.__proto__=ao=An,((lo.prototype=Object.create(ao&&ao.prototype)).constructor=lo).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)},lo.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)},lo.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},lo);function lo(){ao.apply(this,arguments)}so.prototype.bytesPerElement=20,Vr("StructArrayLayout6i1ul2ui20",so);var uo,co=(po.__proto__=uo=An,((po.prototype=Object.create(uo&&uo.prototype)).constructor=po).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
2,po.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)},po.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},po);function po(){uo.apply(this,arguments)}co.prototype.bytesPerElement=12,Vr("StructArrayLayout2i2i2i12",co);var ho,fo=(mo.__proto__=ho=An,((mo.prototype=Object.create(ho&&ho.prototype)).constructor=mo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},mo.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)},mo.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},mo);function mo(){ho.apply(this,arguments)}fo.prototype.bytesPerElement=16,Vr("StructArrayLayout2f1f2i16",fo);var go,yo=(vo.__proto__=go=An,((vo.prototype=Object.create(go&&go.prototype)).constructor=vo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},vo.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},vo.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},vo);function vo(){go.apply(this,arguments)}yo.prototype.bytesPerElement=12,Vr("StructArrayLayout2ub2f12",yo);var _o,xo=(bo.__proto__=_o=An,((bo.prototype=Object.create(_o&&_o.prototype)).constructor=bo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},bo.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},bo.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},bo);function bo(){_o.apply(this,arguments)}xo.prototype.bytesPerElement=6,Vr("StructArrayLayout3ui6",xo);var wo,So=(To.__proto__=wo=An,((To.prototype=Object.create(wo&&wo.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)},To.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g)},To.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y){var v=24*t,_=12*t,x=48*t;return this.int16[0+v]=e,this.int16[1+v]=i,this.uint16[2+v]=r,this.uint16[3+v]=n,this.uint32[2+_]=o,this.uint32[3+_]=a,this.uint32[4+_]=s,this.uint16[10+v]=l,this.uint16[11+v]=u,this.uint16[12+v]=c,this.float32[7+_]=p,this.float32[8+_]=h,this.uint8[36+x]=d,this.uint8[37+x]=f,this.uint8[38+x]=m,this.uint32[10+_]=g,this.int16[22+v]=y,t},To);function To(){wo.apply(this,arguments)}So.prototype.bytesPerElement=48,Vr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",So);var Co,Io=(Eo.__proto__=Co=An,((Eo.prototype=Object.create(Co&&Co.prototype)).constructor=Eo).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)},Eo.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S,T,C,I,E){var M=this.length;return this.resize(M+1),this.emplace(M,t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S,T,C,I,E)},Eo.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S,T,C,I,E,M){var A=34*t,L=17*t;return this.int16[0+A]=e,this.int16[1+A]=i,this.int16[2+A]=r,this.int16[3+A]=n,this.int16[4+A]=o,this.int16[5+A]=a,this.int16[6+A]=s,this.int16[7+A]=l,this.uint16[8+A]=u,this.uint16[9+A]=c,this.uint16[10+A]=p,this.uint16[11+A]=h,this.uint16[12+A]=d,this.uint16[13+A]=f,this.uint16[14+A]=m,this.uint16[15+A]=g,this.uint16[16+A]=y,this.uint16[17+A]=v,this.uint16[18+A]=_,this.uint16[19+A]=x,this.uint16[20+A]=b,this.uint16[21+A]=w,this.uint16[22+A]=S,this.uint32[12+L]=T,this.float32[13+L]=C,this.float32[14+L]=I,this.float32[15+L]=E,this.float32[16+L]=M,t},Eo);function Eo(){Co.apply(this,arguments)}Io.prototype.bytesPerElement=68,Vr("StructArrayLayout8i15ui1ul4f68",Io);var Mo,Ao=(Lo.__proto__=Mo=An,((Lo.prototype=Object.create(Mo&&Mo.prototype)).constructor=Lo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Lo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Lo.prototype.emplace=function(t,e){return this.float32[+t+0]=e,t},Lo);function Lo(){Mo.apply(this,arguments)}Ao.prototype.bytesPerElement=4,Vr("StructArrayLayout1f4",Ao);var ko,Po=(Do.__proto__=ko=An,((Do.prototype=Object.create(ko&&ko.prototype)).constructor=Do).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
2,Do.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},Do.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},Do);function Do(){ko.apply(this,arguments)}Po.prototype.bytesPerElement=6,Vr("StructArrayLayout3i6",Po);var zo,Oo=(No.__proto__=zo=An,((No.prototype=Object.create(zo&&zo.prototype)).constructor=No).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},No.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},No.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},No);function No(){zo.apply(this,arguments)}Oo.prototype.bytesPerElement=8,Vr("StructArrayLayout1ul2ui8",Oo);var Ro,Bo=(jo.__proto__=Ro=An,((jo.prototype=Object.create(Ro&&Ro.prototype)).constructor=jo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},jo.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},jo.prototype.emplace=function(t,e,i){var r=2*t;return this.uint16[0+r]=e,this.uint16[1+r]=i,t},jo);function jo(){Ro.apply(this,arguments)}Bo.prototype.bytesPerElement=4,Vr("StructArrayLayout2ui4",Bo);var Fo,Uo=(Vo.__proto__=Fo=An,((Vo.prototype=Object.create(Fo&&Fo.prototype)).constructor=Vo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Vo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Vo.prototype.emplace=function(t,e){return this.uint16[+t+0]=e,t},Vo);function Vo(){Fo.apply(this,arguments)}Uo.prototype.bytesPerElement=2,Vr("StructArrayLayout1ui2",Uo);var qo,Go=(Zo.__proto__=qo=An,((Zo.prototype=Object.create(qo&&qo.prototype)).constructor=Zo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Zo.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Zo.prototype.emplace=function(t,e,i){var r=2*t;return this.float32[0+r]=e,this.float32[1+r]=i,t},Zo);function Zo(){qo.apply(this,arguments)}Go.prototype.bytesPerElement=8,Vr("StructArrayLayout2f8",Go);var Ho,Wo=(Yo.__proto__=Ho=An,((Yo.prototype=Object.create(Ho&&Ho.prototype)).constructor=Yo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Yo.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},Yo.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},Yo);function Yo(){Ho.apply(this,arguments)}Wo.prototype.bytesPerElement=16,Vr("StructArrayLayout4f16",Wo);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={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]}
2,i.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,i),e}(Mn);Ko.prototype.size=20;var Xo,Jo=((Xo=so)&&(Qo.__proto__=Xo),((Qo.prototype=Object.create(Xo&&Xo.prototype)).constructor=Qo).prototype.get=function(t){return new Ko(this,t)},Qo);function Qo(){Xo.apply(this,arguments)}Vr("CollisionBoxArray",Jo);var $o=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}(Mn);$o.prototype.size=48;var ta,ea=((ta=So)&&(ia.__proto__=ta),((ia.prototype=Object.create(ta&&ta.prototype)).constructor=ia).prototype.get=function(t){return new $o(this,t)},ia);function ia(){ta.apply(this,arguments)}Vr("PlacedSymbolArray",ea);var ra=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]}
2,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}(Mn);ra.prototype.size=68;var na,oa=((na=Io)&&(aa.__proto__=na),((aa.prototype=Object.create(na&&na.prototype)).constructor=aa).prototype.get=function(t){return new ra(this,t)},aa);function aa(){na.apply(this,arguments)}Vr("SymbolInstanceArray",oa);var sa,la=((sa=Ao)&&(ua.__proto__=sa),((ua.prototype=Object.create(sa&&sa.prototype)).constructor=ua).prototype.getoffsetX=function(t){return this.float32[+t+0]},ua);function ua(){sa.apply(this,arguments)}Vr("GlyphOffsetArray",la);var ca,pa=((ca=Po)&&(ha.__proto__=ca),((ha.prototype=Object.create(ca&&ca.prototype)).constructor=ha).prototype.getx=function(t){return this.int16[3*t+0]},ha.prototype.gety=function(t){return this.int16[3*t+1]},ha.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},ha);function ha(){ca.apply(this,arguments)}Vr("SymbolLineVertexArray",pa);var da=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}(Mn);da.prototype.size=8;var fa,ma=((fa=Oo)&&(ga.__proto__=fa),((ga.prototype=Object.create(fa&&fa.prototype)).constructor=ga).prototype.get=function(t){return new da(this,t)},ga);function ga(){fa.apply(this,arguments)}function ya(t){void 0===t&&(t=[]),this.segments=t}Vr("FeatureIndexArray",ma);var va=zn([{name:"a_pos",components:2,type:"Int16"}],4).members;function _a(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}ya.prototype.prepareSegment=function(t,e,i,r){var n=this.segments[this.segments.length-1];return ya.MAX_VERTEX_ARRAY_LENGTH<t&&w("Max vertices per segment is "+ya.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>ya.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},ya.prototype.get=function(){return this.segments},ya.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var i=e[t];for(var r in i.vaos)i.vaos[r].destroy()}},ya.simpleSegment=function(t,e,i,r){return new ya([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])},ya.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Vr("SegmentVector",ya);var xa=zn([{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"}]),ba=e((function(t){t.exports=function(t,e){var i,r,n,o,a,s,l,u;for(r=t.length-(i=3&t.length),n=e,a=3432918353,s=461845907,u=0;u<r;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,n=27492+(65535&(o=5*(65535&(n=(n^=l=(6
25535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:n^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}})),wa=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)^(i=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}})),Sa=ba,Ta=wa;function Ca(){this.ids=[],this.positions=[],this.indexed=!1}Sa.murmur3=ba,Sa.murmur2=Ta,Ca.prototype.add=function(t,e,i,r){this.ids.push(Ea(t)),this.positions.push(e,i,r)},Ca.prototype.getPositions=function(t){for(var e=Ea(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},Ca.serialize=function(t,e){var i=new Float64Array(t.ids),r=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(;e[++a]<o;);for(;e[--s]>o;);if(s<=a)break;Ma(e,a,s),Ma(i,3*a,3*s),Ma(i,3*a+1,3*s+1),Ma(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,r,0,i.length-1),e&&e.push(i.buffer,r.buffer),{ids:i,positions:r}},Ca.deserialize=function(t){var e=new Ca;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var Ia=Math.pow(2,53)-1;function Ea(t){var e=+t;return!isNaN(e)&&e<=Ia?e:Sa(String(t))}function Ma(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function Aa(t,e){this.gl=t.gl,this.location=e}Vr("FeaturePositionMap",Ca);var La,ka,Pa,Da,za,Oa,Na,Ra=(Ja.__proto__=Na=Aa,((Ja.prototype=Object.create(Na&&Na.prototype)).constructor=Ja).prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},Ja),Ba=(Xa.__proto__=Oa=Aa,((Xa.prototype=Object.create(Oa&&Oa.prototype)).constructor=Xa).prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},Xa),ja=(Ka.__proto__=za=Aa,((Ka.prototype=Object.create(za&&za.prototype)).constructor=Ka).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]))},Ka),Fa=(Ya.__proto__=Da=Aa,((Ya.prototype=Object.create(Da&&Da.prototype)).constructor=Ya).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]))},Ya),Ua=(Wa.__proto__=Pa=Aa,((Wa.prototype=Object.create(Pa&&Pa.prototype)).constructor=Wa).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]))},Wa),Va=(Ha.__proto__=ka=Aa,((Ha.prototype=Object.create(ka&&ka.prototype)).constructor=Ha
2).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))},Ha),qa=new Float32Array(16),Ga=(Za.__proto__=La=Aa,((Za.prototype=Object.create(La&&La.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){La.call(this,t,e),this.current=qa}function Ha(t,e){ka.call(this,t,e),this.current=le.transparent}function Wa(t,e){Pa.call(this,t,e),this.current=[0,0,0,0]}function Ya(t,e){Da.call(this,t,e),this.current=[0,0,0]}function Ka(t,e){za.call(this,t,e),this.current=[0,0]}function Xa(t,e){Oa.call(this,t,e),this.current=0}function Ja(t,e){Na.call(this,t,e),this.current=0}function Qa(t){return[_a(255*t.r,255*t.g),_a(255*t.b,255*t.a)]}function $a(t,e,i){this.value=t,this.uniformNames=e.map((function(t){return"u_"+t})),this.type=i}function ts(t,e){this.uniformNames=e.map((function(t){return"u_"+t})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}function es(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}function is(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}function rs(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}function ns(t,e,i){this.binders={},this._buffers=[];var r,n,o=[];for(var a in t.paint._values)if(i(a)){var s=t.paint.get(a);if(s instanceof vn&&Bi(s.property.specification)){var l=(r=a,n=t.type,{"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"]}[r]||[r.replace(n+"-","").replace(/-/g,"_")]),u=s.value,c=s.property.specification.type,p=s.property.useIntegerZoom,h=s.property.specification["property-type"],d="cross-faded"===h||"cross-faded-data-driven"===h;if("constant"===u.kind)this.binders[a]=d?new ts(u.value,l):new $a(u.value,l,c),o.push("/u_"+a);else if("source"===u.kind||d){var f=as(a,c,"source");this.binders[a]=d?new rs(u,c,p,e,f,t.id):new es(u,l,c,f),o.push("/a_"+a)}else{var m=as(a,c,"composite");this.binders[a]=new is(u,l,c,p,e,m),o.push("/z_"+a)}}}this.cacheKey=o.sort().join("")}function os(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 ns(o,e,i)}this.needsUpload=!1,this._featureMap=new Ca,this._bufferOffset=0}function as(t,e,i){var r={color:{source:Go,composite:Wo},number:{source:Ao,composite:Go}},n={"line-pattern":{source:Kn,composite:Kn},"fill-pattern":{source:Kn,composite:Kn},"fill-extrusion-pattern":{source:Kn,composite:Kn}}[t];return n&&n[i]||r[e][i]}$a.prototype.setUniform=function(t,e,i){t.set(i.constantOr(this.value))},$a.prototype.getBinding=function(t,e,i){return new("color"===this.type?Va:Ba)(t,e)},ts.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}
vendor: 8,671 bytes, line 2
2,ts.prototype.setUniform=function(t,e,i,r){var n="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;n&&t.set(n)},ts.prototype.getBinding=function(t,e,i){return new("u_pattern"===i.substr(0,9)?Ua:Ba)(t,e)},es.prototype.populatePaintArray=function(t,e,i,r,n){var o=this.paintVertexArray.length,a=this.expression.evaluate(new un(0),e,{},r,[],n);this.paintVertexArray.resize(t),this._setPaintValue(o,t,a)},es.prototype.updatePaintArray=function(t,e,i,r){var n=this.expression.evaluate({zoom:0},i,r);this._setPaintValue(t,e,n)},es.prototype._setPaintValue=function(t,e,i){if("color"===this.type)for(var r=Qa(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))}},es.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))},es.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},is.prototype.populatePaintArray=function(t,e,i,r,n){var o=this.expression.evaluate(new un(this.zoom),e,{},r,[],n),a=this.expression.evaluate(new un(this.zoom+1),e,{},r,[],n),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,o,a)},is.prototype.updatePaintArray=function(t,e,i,r){var n=this.expression.evaluate({zoom:this.zoom},i,r),o=this.expression.evaluate({zoom:this.zoom+1},i,r);this._setPaintValue(t,e,n,o)},is.prototype._setPaintValue=function(t,e,i,r){if("color"===this.type)for(var n=Qa(i),o=Qa(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))}},is.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))},is.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},is.prototype.setUniform=function(t,e){var i=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,r=u(this.expression.interpolationFactor(i,this.zoom,this.zoom+1),0,1);t.set(r)},is.prototype.getBinding=function(t,e,i){return new Ba(t,e)},rs.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)},rs.prototype.updatePaintArray=function(t,e,i,r,n){this._setPaintValues(t,e,i.patterns&&i.patterns[this.layerId],n)},rs.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)}},rs.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,xa.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,xa.members,this.expression.isStateDependent))},rs.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},ns.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof es||e instanceof is?e.maxValue:0},ns.prototype.populatePaintArrays=function(t,e,i,r,n){for(var o in this.binders){var a=this.binders[o];(a instanceof es||a instanceof is||a instanceof rs)&&a.populatePaintArray(t,e,i,r,n)}},ns.prototype.setConstantPatternPositions=function(t,e){for(var i in this.binders){var r=this.binders[i];r instanceof ts&&r.setConstantPatternPositions(t,e)}},ns.prototype.updatePaintArrays=function(t,e,i,r,n){var o=!1;for(var a in t)for(var s=0,l=e.getPositions(a);s<l.length;s+=1){var u=l[s],c=i.feature(u.index);for(var p in this.binders){var h=this.binders[p];if((h instanceof es||h instanceof is||h instanceof rs)&&!0===h.expression.isStateDependent){var d=r.paint.get(p);h.expression=d.value,h.updatePaintArray(u.start,u.end,c,t[a],n),o=!0}}}return o},ns.prototype.defines=function(){var t=[];for(var e in this.binders){var i=this.binders[e];(i instanceof $a||i instanceof ts)&&t.push.apply(t,i.uniformNames.map((function(t){return"#define HAS_UNIFORM_"+t})))}return t},ns.prototype.getBinderAttributes=function(){var t=[];for(var e in this.binders){var i=this.binders[e];if(i instanceof es||i instanceof is)for(var r=0;r<i.paintVertexAttributes.length;r++)t.push(i.paintVertexAttributes[r].name);else if(i instanceof rs)for(var n=0;n<xa.members.length;n++)t.push(xa.members[n].name)}return t},ns.prototype.getBinderUniforms=function(){var t=[];for(var e in this.binders){var i=this.binders[e];if(i instanceof $a||i instanceof ts||i instanceof is)for(var r=0,n=i.uniformNames;r<n.length;r+=1)t.push(n[r])}return t},ns.prototype.getPaintVertexBuffers=function(){return this._buffers},ns.prototype.getUniforms=function(t,e){var i=[];for(var r in this.binders){var n=this.binders[r];if(n instanceof $a||n instanceof ts||n instanceof is)for(var o=0,a=n.uniformNames;o<a.length;o+=1){var s=a[o];if(e[s]){var l=n.getBinding(t,e[s],s);i.push({name:s,property:r,binding:l})}}}return i},ns.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)}},ns.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var i=this.binders[e];if(t&&i instanceof rs){var r=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;r&&this._buffers.push(r)}else(i instanceof es||i instanceof is)&&i.paintVertexBuffer&&this._buffers.push(i.paintVertexBuffer)}},ns.prototype.upload=function(t){for(var e in this.binders){var i=this.binders[e];(i instanceof es||i instanceof is||i instanceof rs)&&i.upload(t)}this.updatePaintBuffers()},ns.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof es||e instanceof is||e instanceof rs)&&e.destroy()}},os.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},os.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}},os.prototype.get=function(t){return this.programConfigurations[t]},os.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},os.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Vr("ConstantBinder",$a),Vr("CrossFadedConstantBinder",ts),Vr("SourceExpressionBinder",es),Vr("CrossFadedCompositeBinder",rs),Vr("CompositeExpressionBinder",is),Vr("ProgramConfiguration",ns,{omit:["_buffers"]}),Vr("ProgramConfigurationSet",os);var ss=Math.pow(2,14)-1,ls=-ss-1;function us(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,ls,ss),a.y=u(l,ls,ss),(s<a.x||s>a.x+1||l<a.y||l>a.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return i}function cs(t,e,i,r,n){t.emplaceBack(2*e+(r+1)/2,2*i+(n+1)/2)}function ps(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 Rn,this.indexArray=new xo,this.segments=new ya,this.programConfigurations=new os(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id}))}function hs(t,e){for(var i=0;i<t.length;i++)if(_s(e,t[i]))return!0;for(var r=0;r<e.length;r++)if(_s(t,e[r]))return!0;return!!ms(t,e)}function ds(t,e){if(1===t.length)return vs(e,t[0]);for(var i=0;i<e.length;i++)for(var r=e[i],n=0;n<r.length;n++)if(_s(t,r[n]))return!0;for(var o=0;o<t.length;o++)if(vs(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(ms(t,e[a]))return!0;return!1}function fs(t,e,i){if(1<t.length){if(ms(t,e))return 1;for(var r=0;r<e.length;r++)if(gs(e[r],t,i))return 1}for(var n=0;n<t.length;n++)if(gs(t[n],e,i))return 1}function ms(t,e){var i,r,n,o;if(0!==t.length&&0!==e.length)for(var a=0;a<t.length-1;a++)for(var s=t[a],l=t[a+1],u=0;u<e.length-1;u++)if(r=l,S(i=s,n=e[u],o=e[u+1])!==S(r,n,o)&&S(i,r,n)!==S(i,r,o))return 1}function gs(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(ys(t,e[n-1],e[n])<r)return 1}function ys(t,e,i){var r=e.distSqr(i);if(0===r)return t.distSqr(e);var n=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/r;return t.distSqr(n<0?e:1<n?i:i.sub(e)._mult(n)._add(e))}function vs(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 _s(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 xs(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)){var o=S(t,e,i[0]);return o!==S(t,e,i[1])||o!==S(t,e,i[2])||o!==S(t,e,i[3])}}function bs(t,e,i){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:i.programConfigurations.get(e.id).getMaxValue(t)}function ws(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ss(t,e,i,r,o){if(!e[0]&&!e[1])return t;var a=n.convert(e)._mult(o);"viewport"===i&&a._rotate(-r);for(var s=[],l=0;l<t.length;l++)s.push(t[l].sub(a));return s}ps.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,d=this.layers[0]._featureFilter.needGeometry,f={type:u.type,id:c,properties:u.properties,geometry:d?us(u):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),f,i)){d||(f.geometry=us(u));var m=o?o.evaluate(f,{},i):void 0;n.push({id:c,properties:u.properties,type:u.type,sourceLayerIndex:h,index:p,geometry:f.geometry,patterns:{},sortKey:m})}}o&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var g=0,y=n;g<y.length;g+=1){var v=y[g],_=v.geometry,x=v.index,b=v.sourceLayerIndex,w=t[x].feature;this.addFeature(v,_,x,i),e.featureIndex.insert(w,_,x,b,this.index)}},ps.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},ps.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ps.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ps.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,va),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ps.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=s[a],u=l.x,c=l.y;if(!(u<0||8192<=u||c<0||8192<=c)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;cs(this.layoutVertexArray,u,c,-1,-1),cs(this.layoutVertexArray,u,c,1,-1),cs(this.layoutVertexArray,u,c,1,1),cs(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{},r)},Vr("CircleBucket",ps,{omit:["layers"]});var Ts=new En({"circle-sort-key":new bn(Ot.layout_circle["circle-sort-key"])}),Cs={paint:new En({"circle-radius":new bn(Ot.paint_circle["circle-radius"]),"circle-color":new bn(Ot.paint_circle["circle-color"]),"circle-blur":new bn(Ot.paint_circle["circle-blur"]),"circle-opacity":new bn(Ot.paint_circle["circle-opacity"]),"circle-translate":new xn(Ot.paint_circle["circle-translate"]),"circle-translate-anchor":new xn(Ot.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new xn(Ot.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new xn(Ot.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new bn(Ot.paint_circle["circle-stroke-width"]),"circle-stroke-color":new bn(Ot.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new bn(Ot.paint_circle["circle-stroke-opacity"])}),layout:Ts},Is="undefined"!=typeof Float32Array?Float32Array:Array;function Es(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 Ms(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],d=e[10],f=e[11],m=e[12],g=e[13],y=e[14],v=e[15],_=i[0],x=i[1],b=i[2],w=i[3];return t[0]=_*r+x*s+b*p+w*m,t[1]=_*n+x*l+b*h+w*g,t[2]=_*o+x*u+b*d+w*y,t[3]=_*a+x*c+b*f+w*v,t[4]=(_=i[4])*r+(x=i[5])*s+(b=i[6])*p+(w=i[7])*m,t[5]=_*n+x*l+b*h+w*g,t[6]=_*o+x*u+b*d+w*y,t[7]=_*a+x*c+b*f+w*v,t[8]=(_=i[8])*r+(x=i[9])*s+(b=i[10])*p+(w=i[11])*m,t[9]=_*n+x*l+b*h+w*g,t[10]=_*o+x*u+b*d+w*y,t[11]=_*a+x*c+b*f+w*v,t[12]=(_=i[12])*r+(x=i[13])*s+(b=i[14])*p+(w=i[15])*m,t[13]=_*n+x*l+b*h+w*g,t[14]=_*o+x*u+b*d+w*y,t[15]=_*a+x*c+b*f+w*v,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)});var As,Ls,ks=Ms;function Ps(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3];return t[0]=i[0]*r+i[4]*n+i[8]*o+i[12]*a,t[1]=i[1]*r+i[5]*n+i[9]*o+i[13]*a,t[2]=i[2]*r+i[6]*n+i[10]*o+i[14]*a,t[3]=i[3]*r+i[7]*n+i[11]*o+i[15]*a,t}As=new Is(3),Is!=Float32Array&&(As[0]=0,As[1]=0,As[2]=0),Ls=new Is(4),Is!=Float32Array&&(Ls[0]=0,Ls[1]=0,Ls[2]=0,Ls[3]=0);var Ds,zs,Os=(zs=new Is(2),Is!=Float32Array&&(zs[0]=0,zs[1]=0),Ns.__proto__=Ds=kn,((Ns.prototype=Object.create(Ds&&Ds.prototype)).constructor=Ns).prototype.createBucket=function(t){return new ps(t)},Ns.prototype.queryRadius=function(t){var e=t;return bs("circle-radius",this,e)+bs("circle-stroke-width",this,e)+ws(this.paint.get("circle-translate"))}
2,Ns.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a,s){for(var l=Ss(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,i)+this.paint.get("circle-stroke-width").evaluate(e,i),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t){return l.map((function(e){return Rs(e,t)}))}(s),h=c?u*a:u,d=0,f=r;d<f.length;d+=1)for(var m=0,g=f[d];m<g.length;m+=1){var y=g[m],v=c?y:Rs(y,s),_=h,x=Ps([],[y.x,y.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?_*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(_*=o.cameraToCenterDistance/x[3]),S=_,_s(b=p,w=v)||gs(w,b,S))return!0}var b,w,S;return!1},Ns);function Ns(t){Ds.call(this,t,Cs)}function Rs(t,e){var i=Ps([],[t.x,t.y,0,1],e);return new n(i[0]/i[3],i[1]/i[3])}var Bs,js=(Fs.__proto__=Bs=ps,(Fs.prototype=Object.create(Bs&&Bs.prototype)).constructor=Fs);function Fs(){Bs.apply(this,arguments)}function Us(t,e,i,r){var n=e.width,o=e.height;if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==n*o*i)throw new RangeError("mismatched image size")}else r=new Uint8Array(n*o*i);return t.width=n,t.height=o,t.data=r,t}function Vs(t,e,i){var r=e.width,n=e.height;if(r!==t.width||n!==t.height){var o=Us({},{width:r,height:n},i);qs(t,o,{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=o.data}}function qs(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",js,{omit:["layers"]});var Gs=function(t,e){Us(this,t,1,e)};function Zs(t,e){Us(this,t,4,e)}Gs.prototype.resize=function(t){Vs(this,t,1)},Gs.prototype.clone=function(){return new Gs({width:this.width,height:this.height},new Uint8Array(this.data))},Gs.copy=function(t,e,i,r,n){qs(t,e,i,r,n,1)},Zs.prototype.resize=function(t){Vs(this,t,4)},Zs.prototype.replace=function(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t},Zs.prototype.clone=function(){return new Zs({width:this.width,height:this.height},new Uint8Array(this.data))},Zs.copy=function(t,e,i,r,n){qs(t,e,i,r,n,4)},Vr("AlphaImage",Gs),Vr("RGBAImage",Zs);var Hs={paint:new En({"heatmap-radius":new bn(Ot.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bn(Ot.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xn(Ot.paint_heatmap["heatmap-intensity"]),"heatmap-color":new In(Ot.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xn(Ot.paint_heatmap["heatmap-opacity"])})};function Ws(t,e){for(var i=new Uint8Array(1024),r={},n=0,o=0;n<256;n++,o+=4){r[e]=n/255;var a=t.evaluate(r);i[o+0]=Math.floor(255*a.r/a.a),i[o+1]=Math.floor(255*a.g/a.a),i[o+2]=Math.floor(255*a.b/a.a),i[o+3]=Math.floor(255*a.a)}return new Zs({width:256,height:1},i)}var Ys,Ks,Xs=(rl.__proto__=Ks=kn,((rl.prototype=Object.create(Ks&&Ks.prototype)).constructor=rl).prototype.createBucket=function(t){return new js(t)},rl.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},rl.prototype._updateColorRamp=function(){this.colorRamp=Ws(this._transitionablePaint._values["heatmap-color"].value.expression,"heatmapDensity"),this.colorRampTexture=null},rl.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},rl.prototype.queryRadius=function(){return 0},rl.prototype.queryIntersectsFeature=function(){return!1},rl.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},rl),Js={paint:new En({"hillshade-illumination-direction":new xn(Ot.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new xn(Ot.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new xn(Ot.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new xn(Ot.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new xn(Ot.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new xn(Ot.paint_hillshade["hillshade-accent-color"])})},Qs=(il.__proto__=Ys=kn,((il.prototype=Object.create(Ys&&Ys.prototype)).constructor=il).prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},il),$s=zn([{name:"a_pos",components:2,type:"Int16"}],4).members,tl=nl,el=nl;function il(t){Ys.call(this,t,Js)}function rl(t){Ks.call(this,t,Hs),this._updateColorRamp()}function nl(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=ol(t,0,p,i,!0),d=[];if(!h||h.next===h.prev)return d;
2if(c&&(h=function(t,e,i,r){var n,o,a,s=[];for(n=0,o=e.length;n<o;n++)(a=ol(t,e[n]*r,n<o-1?e[n+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),s.push(ml(a));for(s.sort(hl),n=0;n<s.length;n++)dl(s[n],i),i=al(i,i.next);return i}(t,e,h,i)),t.length>80*i){r=o=t[0],n=a=t[1];for(var f=i;f<p;f+=i)(s=t[f])<r&&(r=s),(l=t[f+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 sl(h,d,i,r,n,u),d}function ol(t,e,i,r,n){var o,a;if(n===0<El(t,e,i,r))for(o=e;o<i;o+=r)a=Tl(o,t[o],t[o+1],a);else for(o=i-r;e<=o;o-=r)a=Tl(o,t[o],t[o+1],a);return a&&vl(a,a.next)&&(Cl(a),a=a.next),a}function al(t,e){if(!t)return t;e=e||t;var i,r=t;do{if(i=!1,r.steiner||!vl(r,r.next)&&0!==yl(r.prev,r,r.next))r=r.next;else{if(Cl(r),(r=e=r.prev)===r.next)break;i=!0}}while(i||r!==e);return e}function sl(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=fl(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,(n=n.next)!==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}o.nextZ=null,u*=2}while(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?ul(t,r,n,o):ll(t))e.push(s.i/i),e.push(t.i/i),e.push(l.i/i),Cl(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?sl(t=cl(al(t),e,i),e,i,r,n,o,2):2===a&&pl(t,e,i,r,n,o):sl(al(t),e,i,r,n,o,1);break}}}function ll(t){var e=t.prev,i=t,r=t.next;if(!(0<=yl(e,i,r))){for(var n=t.next.next;n!==t.prev;){if(gl(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&0<=yl(n.prev,n,n.next))return;n=n.next}return 1}}function ul(t,e,i,r){var n=t.prev,o=t,a=t.next;if(!(0<=yl(n,o,a))){for(var s=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,l=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,u=fl(n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,e,i,r),c=fl(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&&gl(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=yl(p.prev,p,p.next))return;if(p=p.prevZ,h!==t.prev&&h!==t.next&&gl(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&0<=yl(h.prev,h,h.next))return;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&gl(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=yl(p.prev,p,p.next))return;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&gl(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&0<=yl(h.prev,h,h.next))return;h=h.nextZ}return 1}}function cl(t,e,i){var r=t;do{var n=r.prev,o=r.next.next;!vl(n,o)&&_l(n,r,r.next,o)&&wl(n,o)&&wl(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),Cl(r),Cl(r.next),r=t=o),r=r.next}while(r!==t);return al(r)}function pl(t,e,i,r,n,o){var a,s,l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&(s=u,(a=l).next.i!==s.i&&a.prev.i!==s.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&&_l(i,i.next,t,e))return 1;i=i.next}while(i!==t)}(a,s)&&(wl(a,s)&&wl(s,a)&&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)!==t;);return r}(a,s)&&(yl(a.prev,a,s.prev)||yl(a,s.prev,s))||vl(a,s)&&0<yl(a.prev,a,a.next)&&0<yl(s.prev,s,s.next)))){var c=Sl(l,u);return l=al(l,l.next),c=al(c,c.next),sl(l,e,i,r,n,o),void sl(c,e,i,r,n,o)}u=u.next}l=l.next}while(l!==t)}function hl(t,e){return t.x-e.x}function dl(t,e){if(e=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
2);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}}r=r.next}while(r!==e);if(!i)return null;if(n===a)return i;var l,u,c,p=i,h=i.x,d=i.y,f=1/0;for(r=i;n>=r.x&&r.x>=h&&n!==r.x&&gl(o<d?n:a,o,h,d,o<d?a:n,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(n-r.x),wl(r,t)&&(l<f||l===f&&(r.x>i.x||r.x===i.x&&(c=r,yl((u=i).prev,u,c.prev)<0&&yl(c.next,u,u.next)<0)))&&(i=r,f=l)),(r=r.next)!==p;);return i}(t,e)){var i=Sl(e,t);al(e,e.next),al(i,i.next)}}function fl(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 ml(t){for(var e=t,i=t;(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),(e=e.next)!==t;);return i}function gl(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 yl(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function vl(t,e){return t.x===e.x&&t.y===e.y}function _l(t,e,i,r){var n=bl(yl(t,e,i)),o=bl(yl(t,e,r)),a=bl(yl(i,r,t)),s=bl(yl(i,r,e));return n!==o&&a!==s||0===n&&xl(t,i,e)||0===o&&xl(t,r,e)||0===a&&xl(i,t,r)||0===s&&xl(i,e,r)}function xl(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 bl(t){return 0<t?1:t<0?-1:0}function wl(t,e){return yl(t.prev,t,t.next)<0?0<=yl(t,e,t.next)&&0<=yl(t,t.prev,e):yl(t,e,t.prev)<0||yl(t,t.next,e)<0}function Sl(t,e){var i=new Il(t.i,t.x,t.y),r=new Il(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 Tl(t,e,i,r){var n=new Il(t,e,i);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function Cl(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 Il(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 El(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 Ml(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function Al(t,e){return t<e?-1:e<t?1:0}function Ll(t,e){var i,r,n=t.length;if(n<=1)return[t];for(var o,a,s=[],l=0;l<n;l++){var u=T(t[l]);0!==u&&(t[l].area=Math.abs(u),void 0===a&&(a=u<0),a===u<0?(o&&s.push(o),o=[t[l]]):o.push(t[l]))}if(o&&s.push(o),1<e)for(var c=0;c<s.length;c++)s[c].length<=e||(r=kl,function t(e,i,r,n,o){for(;r<n;){if(600<n-r){var a=n-r+1,s=i-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,i,Math.max(r,Math.floor(i-s*u/a+c)),Math.min(n,Math.floor(i+(a-s)*u/a+c)),o)}var p=e[i],h=r,d=n;for(Ml(e,r,i),0<o(e[n],p)&&Ml(e,r,n);h<d;){for(Ml(e,h,d),h++,d--;o(e[h],p)<0;)h++;for(;0<o(e[d],p);)d--}0===o(e[r],p)?Ml(e,r,d):Ml(e,++d,n),d<=i&&(r=d+1),i<=d&&(n=d-1)}}(i=s[c],e,1,s[c].length-1||i.length-1,r||Al),s[c]=s[c].slice(0,e));return s}function kl(t,e){return e.area-t.area}function Pl(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);var l=s.constantOr(null);l&&(n=!0,r[l.to]=!0,r[l.from]=!0)}return n}function Dl(t,e,i,r,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.paint.get(t+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:r-1},i,{},n.availableImages),p=u.evaluate({zoom:r},i,{},n.availableImages),h=u.evaluate({zoom:r+1},i,{},n.availableImages);p=p&&p.name?p.name:p,h=h&&h.name?h.name:h,o[c=c&&c.name?c.name:c]=!0,o[p]=!0,o[h]=!0,i.patterns[l.id]={min:c,mid:p,max:h}}}return i}function zl(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 Rn,this.indexArray=new xo,this.indexArray2=new Bo,this.programConfigurations=new os(t.layers,t.zoom),this.segments=new ya,this.segments2=new ya,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id}))}nl.deviation=function(t,e,i,r){var n=e&&e.length,o=Math.abs(El(t,0,n?e[0]*i:t.length,i));if(n)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(El(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i));var l=0;for(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)},nl.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},tl.default=el,zl.prototype.populate=function(t,e,i){this.hasPattern=Pl("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,d={type:l.type,id:u,properties:l.properties,geometry:h?us(l):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),d,i)){h||(d.geometry=us(l));var f=r?r.evaluate(d,{},i,e.availableImages):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:d.geometry,patterns:{},sortKey:f})}}r&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,g=n;m<g.length;m+=1){var y=g[m],v=y.geometry,_=y.index,x=y.sourceLayerIndex;if(this.hasPattern){var b=Dl("fill",this.layers,y,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(y,v,_,i,{});e.featureIndex.insert(t[_].feature,v,_,x,this.index)}},zl.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},zl.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)}},zl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},zl.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},zl.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,$s),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},zl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},zl.prototype.addFeature=function(t,e,i,r,n){for(var o=0,a=Ll(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,d=[],f=[],m=0,g=s;m<g.length;m+=1){var y=g[m];if(0!==y.length){y!==s[0]&&f.push(d.length/2);var v=this.segments2.prepareSegment(y.length,this.layoutVertexArray,this.indexArray2),_=v.vertexLength;this.layoutVertexArray.emplaceBack(y[0].x,y[0].y),this.indexArray2.emplaceBack(_+y.length-1,_),d.push(y[0].x),d.push(y[0].y);for(var x=1;x<y.length;x++)this.layoutVertexArray.emplaceBack(y[x].x,y[x].y),this.indexArray2.emplaceBack(_+x-1,_+x),d.push(y[x].x),d.push(y[x].y);v.vertexLength+=y.length,v.primitiveLength+=y.length}}for(var b=tl(d,f),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",zl,{omit:["layers","patternFeatures"]});var Ol,Nl=new En({"fill-sort-key":new bn(Ot.layout_fill["fill-sort-key"])}),Rl={paint:new En({"fill-antialias":new xn(Ot.paint_fill["fill-antialias"]),"fill-opacity":new bn(Ot.paint_fill["fill-opacity"]),"fill-color":new bn(Ot.paint_fill["fill-color"]),"fill-outline-color":new bn(Ot.paint_fill["fill-outline-color"]),"fill-translate":new xn(Ot.paint_fill["fill-translate"]),"fill-translate-anchor":new xn(Ot.paint_fill["fill-translate-anchor"]),"fill-pattern":new Tn(Ot.paint_fill["fill-pattern"])}),layout:Nl},Bl=(Ul.__proto__=Ol=kn,((Ul.prototype=Object.create(Ol&&Ol.prototype)).constructor=Ul).prototype.recalculate=function(t,e){Ol.prototype.recalculate.call(this,t,e);var i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},Ul.prototype.createBucket=function(t){return new zl(t)},Ul.prototype.queryRadius=function(){return ws(this.paint.get("fill-translate"))}
vendor: 4,136 bytes, line 2
2,Ul.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a){return ds(Ss(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)},Ul.prototype.isTileClipped=function(){return!0},Ul),jl=zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Fl=Vl;function Ul(t){Ol.call(this,t,Rl)}function Vl(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(ql,this,e)}function ql(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)}function Gl(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}Vl.types=["Unknown","Point","LineString","Polygon"],Vl.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,i=t.readVarint()+t.pos,r=1,o=0,a=0,s=0,l=[];t.pos<i;){if(o<=0){var u=t.readVarint();r=7&u,o=u>>3}if(o--,1===r||2===r)a+=t.readSVarint(),s+=t.readSVarint(),1===r&&(e&&l.push(e),e=[]),e.push(new n(a,s));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Vl.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,i=1,r=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();i=7&c,r=c>>3}if(r--,1===i||2===i)(n+=t.readSVarint())<a&&(a=n),s<n&&(s=n),(o+=t.readSVarint())<l&&(l=o),u<o&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},Vl.prototype.toGeoJSON=function(t,e,i){var r,n,o=this.extent*Math.pow(2,i),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Vl.types[this.type];function c(t){for(var e=0;e<t.length;e++){var i=t[e];t[e]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(i.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(r=0;r<l.length;r++)p[r]=l[r][0];c(l=p);break;case 2:for(r=0;r<l.length;r++)c(l[r]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var i,r,n=[],o=0;o<e;o++){var a=Gl(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}(l),r=0;r<l.length;r++)for(n=0;n<l[r].length;n++)c(l[r][n])}1===l.length?l=l[0]:u="Multi"+u;var h={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Zl=Hl;function Hl(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(Wl,this,e),this.length=this._features.length}function Wl(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 Yl(t,e,i){if(3===t){var r=new Zl(i,i.readVarint()+i.pos);r.length&&(e[r.name]=r)}}Hl.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];var e=this._pbf.readVarint()+this._pbf.pos;return new Fl(this._pbf,e,this.extent,this._keys,this._values)};var Kl={VectorTile:function(t,e){this.layers=t.readFields(Yl,{},e)},VectorTileFeature:Fl,VectorTileLayer:Zl},Xl=Kl.VectorTileFeature.types,Jl=Math.pow(2,13);function Ql(t,e,i,r,n,o,a,s){t.emplaceBack(e,i,2*Math.floor(r*Jl)+a,n*Jl*2,o*Jl*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 qn,this.indexArray=new xo,this.programConfigurations=new os(t.layers,t.zoom),this.segments=new ya,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id}))}$l.prototype.populate=function(t,e,i){this.features=[],this.hasPattern=Pl("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,p={type:a.type,id:s,properties:a.properties,geometry:c?us(a):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),p,i)){var h={id:s,sourceLayerIndex:u,index:l,geometry:c?p.geometry:us(a),properties:a.properties,type:a.type,patterns:{}};void 0!==a.id&&(h.id=a.id),this.hasPattern?this.features.push(Dl("fill-extrusion",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,l,i,{}),e.featureIndex.insert(a,h.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,jl),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=0,a=Ll(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(4,this.layoutVertexArray,this.indexArray),h=0,d=s;h<d.length;h+=1){var f=d[h];if(0!==f.length&&!((z=f).every((function(t){return t.x<0}))||z.every((function(t){return 8192<t.x}))||z.every((function(t){return t.y<0}))||z.every((function(t){return 8192<t.y}))))for(var m=0,g=0;g<f.length;g++){var y=f[g];if(1<=g){var v=f[g-1];if(D=v,!((P=y).x===D.x&&(P.x<0||8192<P.x)||P.y===D.y&&(P.y<0||8192<P.y))){p.vertexLength+4>ya.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=y.sub(v)._perp()._unit(),x=v.dist(y);32768<m+x&&(m=0),Ql(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,0,m),Ql(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,1,m),Ql(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,m+=x),Ql(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,m);var b=p.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+l>ya.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Xl[t.type]){for(var w=[],S=[],T=p.vertexLength,C=0,I=s;C<I.length;C+=1){var E=I[C];if(0!==E.length){E!==s[0]&&S.push(w.length/2);for(var M=0;M<E.length;M++){var A=E[M];Ql(this.layoutVertexArray,A.x,A.y,0,0,1,1,0),w.push(A.x),w.push(A.y)}}}for(var L=tl(w,S),k=0;k<L.length;k+=3)this.indexArray.emplaceBack(T+L[k],T+L[k+2],T+L[k+1]);p.primitiveLength+=L.length/3,p.vertexLength+=l}}var P,D,z;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n,r)},Vr("FillExtrusionBucket",$l,{omit:["layers","features"]});var tu,eu={paint:new En({"fill-extrusion-opacity":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bn(Ot["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Tn(Ot["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bn(Ot["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bn(Ot["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},iu=(ru.__proto__=tu=kn,((ru.prototype=Object.create(tu&&tu.prototype)).constructor=ru).prototype.createBucket=function(t){return new $l(t)},ru.prototype.queryRadius=function(){return ws(this.paint.get("fill-extrusion-translate"))},ru.prototype.is3D=function(){return!0}
2,ru.prototype.queryIntersectsFeature=function(t,e,i,r,o,a,s,l){var u=Ss(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,i),p=this.paint.get("fill-extrusion-base").evaluate(e,i),h=function(t){for(var e=[],i=0,r=u;i<r.length;i+=1){var o=r[i],a=[o.x,o.y,0,1];Ps(a,a,t),e.push(new n(a[0]/a[3],a[1]/a[3]))}return e}(l),d=function(t,e){for(var i=[],r=[],o=e[8]*p,a=e[9]*p,s=e[10]*p,l=e[11]*p,u=e[8]*c,h=e[9]*c,d=e[10]*c,f=e[11]*c,m=0,g=t;m<g.length;m+=1){for(var y=[],v=[],_=0,x=g[m];_<x.length;_+=1){var b=x[_],w=b.x,S=b.y,T=e[0]*w+e[4]*S+e[12],C=e[1]*w+e[5]*S+e[13],I=e[2]*w+e[6]*S+e[14],E=e[3]*w+e[7]*S+e[15],M=I+s,A=E+l,L=T+u,k=C+h,P=I+d,D=E+f,z=new n((T+o)/A,(C+a)/A);z.z=M/A,y.push(z);var O=new n(L/D,k/D);O.z=P/D,v.push(O)}i.push(y),r.push(v)}return[i,r]}(r,l);return function(t,e,i){var r=1/0;ds(i,e)&&(r=ou(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],u=[l,o[s+1],a[s+1],a[s],l];hs(i,u)&&(r=Math.min(r,ou(i,u)))}return r!==1/0&&r}(d[0],d[1],h)},ru);function ru(t){tu.call(this,t,eu)}function nu(t,e){return t.x*e.x+t.y*e.y}function ou(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=nu(s,s),p=nu(s,l),h=nu(l,l),d=nu(u,s),f=nu(u,l),m=c*h-p*p,g=(h*d-p*f)/m,y=(c*f-p*d)/m,v=n.z*(1-g-y)+i.z*g+o.z*y;if(isFinite(v))return v}return 1/0}for(var _=1/0,x=0,b=e;x<b.length;x+=1)_=Math.min(_,b[x].z);return _}function au(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 Hn,this.indexArray=new xo,this.programConfigurations=new os(t.layers,t.zoom),this.segments=new ya,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))}var su=zn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,lu=Kl.VectorTileFeature.types,uu=Math.cos(Math.PI/180*37.5),cu=Math.pow(2,14)/.5;au.prototype.populate=function(t,e,i){this.hasPattern=Pl("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,d={type:l.type,id:u,properties:l.properties,geometry:h?us(l):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),d,i)){h||(d.geometry=us(l));var f=r?r.evaluate(d,{},i):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:d.geometry,patterns:{},sortKey:f})}}r&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,g=n;m<g.length;m+=1){var y=g[m],v=y.geometry,_=y.index,x=y.sourceLayerIndex;if(this.hasPattern){var b=Dl("line",this.layers,y,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(y,v,_,i,{});e.featureIndex.insert(t[_].feature,v,_,x,this.index)}},au.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},au.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)}},au.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},au.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},au.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,su),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},au.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},au.prototype.addFeature=function(t,e,i,r,n){for(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"),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)}
2,au.prototype.addLine=function(t,e,i,r,n,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+e.properties.mapbox_clip_start,this.clipEnd=+e.properties.mapbox_clip_end;for(var a=0;a<t.length-1;a++)this.totalDistance+=t[a].dist(t[a+1]);this.updateScaledDistance()}for(var s="Polygon"===lu[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),d=void 0,f=void 0,m=void 0,g=void 0;this.e1=this.e2=-1,s&&(g=t[u].sub(c=t[l-2])._unit()._perp());for(var y=u;y<l;y++)if(!(f=y===l-1?s?t[u+1]:void 0:t[y+1])||!t[y].equals(f)){g&&(m=g),c&&(d=c),c=t[y],g=f?f.sub(c)._unit()._perp():m;var v=(m=m||g).add(g);0===v.x&&0===v.y||v._unit();var _=m.x*g.x+m.y*g.y,x=v.x*g.x+v.y*g.y,b=0!=x?1/x:1/0,w=2*Math.sqrt(2-2*x),S=x<uu&&d&&f,T=0<m.x*g.y-m.y*g.x;if(S&&u<y){var C=c.dist(d);if(2*p<C){var I=c.sub(c.sub(d)._mult(p/C)._round());this.updateDistance(d,I),this.addCurrentVertex(I,m,0,0,h),d=I}}var E=d&&f,M=E?i:s?"butt":r;if(E&&"round"===M&&(b<o?M="miter":b<=2&&(M="fakeround")),"miter"===M&&n<b&&(M="bevel"),"bevel"===M&&(2<b&&(M="flipbevel"),b<n&&(M="miter")),d&&this.updateDistance(d,c),"miter"
2===M)v._mult(b),this.addCurrentVertex(c,v,0,0,h);else if("flipbevel"===M){if(100<b)v=g.mult(-1);else{var A=b*m.add(g).mag()/m.sub(g).mag();v._perp()._mult(A*(T?-1:1))}this.addCurrentVertex(c,v,0,0,h),this.addCurrentVertex(c,v.mult(-1),0,0,h)}else if("bevel"===M||"fakeround"===M){var L=-Math.sqrt(b*b-1),k=T?L:0,P=T?0:L;if(d&&this.addCurrentVertex(c,m,k,P,h),"fakeround"===M)for(var D=Math.round(180*w/Math.PI/20),z=1;z<D;z++){var O=z/D;if(.5!==O){var N=O-.5;O+=O*N*(O-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*N*N+(.848013+_*(.215638*_-1.06021)))}var R=g.sub(m)._mult(O)._add(m)._unit()._mult(T?-1:1);this.addHalfVertex(c,R.x,R.y,!1,T,0,h)}f&&this.addCurrentVertex(c,g,-k,-P,h)}else if("butt"===M)this.addCurrentVertex(c,v,0,0,h);else if("square"===M){var B=d?1:-1;this.addCurrentVertex(c,v,B,B,h)}else"round"===M&&(d&&(this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m,1,1,h,!0)),f&&(this.addCurrentVertex(c,g,-1,-1,h,!0),this.addCurrentVertex(c,g,0,0,h)));if(S&&y<l-1){var j=c.dist(f);if(2*p<j){var F=c.add(f.sub(c)._mult(p/j)._round());this.updateDistance(c,F),this.addCurrentVertex(F,g,0,0,h),c=F}}}}},au.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>cu/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,i,r,n,o))},au.prototype.addHalfVertex=function(t,e,i,r,n,o,a){var s=.5*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);var l=a.vertexLength++;0<=this.e1&&0<=this.e2&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),n?this.e2=l:this.e1=l},au.prototype.updateScaledDistance=function(){this.scaledDistance=0<this.totalDistance?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(cu-1):this.distance},au.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Vr("LineBucket",au,{omit:["layers","patternFeatures"]});var pu,hu=new En({"line-cap":new xn(Ot.layout_line["line-cap"]),"line-join":new bn(Ot.layout_line["line-join"]),"line-miter-limit":new xn(Ot.layout_line["line-miter-limit"]),"line-round-limit":new xn(Ot.layout_line["line-round-limit"]),"line-sort-key":new bn(Ot.layout_line["line-sort-key"])}),du={paint:new En({"line-opacity":new bn(Ot.paint_line["line-opacity"]),"line-color":new bn(Ot.paint_line["line-color"]),"line-translate":new xn(Ot.paint_line["line-translate"]),"line-translate-anchor":new xn(Ot.paint_line["line-translate-anchor"]),"line-width":new bn(Ot.paint_line["line-width"]),"line-gap-width":new bn(Ot.paint_line["line-gap-width"]),"line-offset":new bn(Ot.paint_line["line-offset"]),"line-blur":new bn(Ot.paint_line["line-blur"]),"line-dasharray":new wn(Ot.paint_line["line-dasharray"]),"line-pattern":new Tn(Ot.paint_line["line-pattern"]),"line-gradient":new In(Ot.paint_line["line-gradient"])}),layout:hu},fu=(mu.__proto__=pu=bn,((mu.prototype=Object.create(pu&&pu.prototype)).constructor=mu).prototype.possiblyEvaluate=function(t,e){return e=new un(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),pu.prototype.possiblyEvaluate.call(this,t,e)},mu.prototype.evaluate=function(t,e,i,r){return e=p({},e,{zoom:Math.floor(e.zoom)}),pu.prototype.evaluate.call(this,t,e,i,r)},new mu(du.paint.properties["line-width"].specification));function mu(){pu.apply(this,arguments)}fu.useIntegerZoom=!0;var gu,yu=(vu.__proto__=gu=kn,((vu.prototype=Object.create(gu&&gu.prototype)).constructor=vu).prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},vu.prototype._updateGradient=function(){this.gradient=Ws(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},vu.prototype.recalculate=function(t,e){gu.prototype.recalculate.call(this,t,e),this.paint._values["line-floorwidth"]=fu.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},vu.prototype.createBucket=function(t){return new au(t)},vu.prototype.queryRadius=function(t){var e=t,i=_u(bs("line-width",this,e),bs("line-gap-width",this,e)),r=bs("line-offset",this,e);return i/2+Math.abs(r)+ws(this.paint.get("line-translate"))}
2,vu.prototype.queryIntersectsFeature=function(t,e,i,r,o,a,s){var l=Ss(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*_u(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),c=this.paint.get("line-offset").evaluate(e,i);return c&&(r=function(t,e){for(var i=[],r=new n(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],l=0;l<a.length;l++){var u=a[l],c=a[l+1],p=0===l?r:u.sub(a[l-1])._unit()._perp(),h=l===a.length-1?r:c.sub(u)._unit()._perp(),d=p._add(h)._unit();d._mult(1/(d.x*h.x+d.y*h.y)),s.push(d._mult(e)._add(u))}i.push(s)}return i}(r,c*s)),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(_s(t,n[o]))return!0;if(fs(t,n,i))return!0}return!1}(l,r,u)},vu.prototype.isTileClipped=function(){return!0},vu);function vu(t){gu.call(this,t,du)}function _u(t,e){return 0<e?e+2*t:t}var xu=zn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bu=zn([{name:"a_projected_pos",components:3,type:"Float32"}],4),wu=(zn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),zn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Su=(zn([{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"}]),zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Tu=zn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Cu(t,e,i){return t.sections.forEach((function(t){var r,n,o;t.text=(r=t.text,n=i,"uppercase"===(o=e.layout.get("text-transform").evaluate(n,{}))?r=r.toLocaleUpperCase():"lowercase"===o&&(r=r.toLocaleLowerCase()),pn.applyArabicShaping&&(r=pn.applyArabicShaping(r)),r)})),t}function Iu(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,d=t[e+p];for(p+=h,o=d&(1<<-c)-1,d>>=-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*(d?-1:1);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)}function Eu(t,e,i,r,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,p=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,f=r?1:-1,m=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=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(e+=1<=a+p?h/l:h*Math.pow(2,1-p))*l&&(a++,l/=2),c<=a+p?(s=0,a=c):1<=a+p?(s=(e*l-1)*Math.pow(2,n),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,n),a=0));8<=n;t[i+d]=255&s,d+=f,s/=256,n-=8);for(a=a<<n|s,u+=n;0<u;t[i+d]=255&a,d+=f,a/=256,u-=8);t[i+d-f]|=128*m}zn([{name:"triangle",components:3,type:"Uint16"}]),zn([{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"}]),zn([{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"}]),zn([{type:"Float32",name:"offsetX"}]),zn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Mu={"!":"ï¸","#":"ï¼",$:"ï¼","%":"ï¼
","&":"ï¼","(":"︵",")":"︶","*":"ï¼","+":"ï¼",",":"ï¸","-":"︲",".":"ã»","/":"ï¼",":":"ï¸",";":"ï¸","<":"︿","=":"ï¼",">":"ï¹","?":"ï¸","@":"ï¼ ","[":"ï¹","\\":"ï¼¼","]":"ï¹","^":"ï¼¾",_:"︳","`":"ï½","{":"︷","|":"â","}":"︸","~":"ï½","¢":"ï¿ ","£":"ï¿¡","Â¥":"ï¿¥","¦":"¦","¬":"ï¿¢","¯":"ï¿£","â":"︲","â":"︱","â":"ï¹","â":"ï¹","â":"ï¹","â":"ï¹","â¦":"ï¸","â§":"ã»","â©":"₩","ã":"ï¸","ã":"ï¸","ã":"︿","ã":"ï¹","ã":"︽","ã":"︾","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"︻","ã":"︼","ã":"︹","ã":"︺","ã":"ï¸","ã":"ï¸","ï¼":"ï¸","ï¼":"︵","ï¼":"︶","ï¼":"ï¸","ï¼":"︲","ï¼":"ã»","ï¼":"ï¸","ï¼":"ï¸","ï¼":"︿","ï¼":"ï¹","ï¼":"ï¸","ï¼»":"ï¹","ï¼½":"ï¹","_":"︳","ï½":"︷","ï½":"â","ï½":"︸","ï½":"︵","ï½ ":"︶","。":"ï¸","ï½¢":"ï¹","ï½£":"ï¹"},Au=Lu;function Lu(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Lu.Varint=0,Lu.Fixed64=1,Lu.Bytes=2,Lu.Fixed32=5;var ku="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Pu(t){return t.type===Lu.Bytes?t.readVarint()+t.pos:t.pos+1}function Du(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function zu(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 Ou(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function Nu(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function Ru(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function Bu(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function ju(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function Fu(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function Uu(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function Vu(t,e){for(var i=0;i<t.length;
2i++)e.writeFixed64(t[i])}function qu(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function Gu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Zu(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function Hu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Wu(t,e,i){1===t&&i.readMessage(Yu,e)}function Yu(t,e,i){if(3===t){var r=i.readMessage(Ku,{}),n=r.width,o=r.height,a=r.left,s=r.top,l=r.advance;e.push({id:r.id,bitmap:new Gs({width:n+6,height:o+6},r.bitmap),metrics:{width:n,height:o,left:a,top:s,advance:l}})}}function Ku(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 Xu(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 d=a[h];if(!(p.w>d.w||p.h>d.h)){if(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){var f=a.pop();h<a.length&&(a[h]=f)}else 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}}function Ju(t,e){var i=e.pixelRatio,r=e.version,n=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=i,this.stretchX=n,this.stretchY=o,this.content=a,this.version=r}Lu.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=Gu(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Hu(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Gu(this.buf,this.pos)+4294967296*Gu(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=Gu(this.buf,this.pos)+4294967296*Hu(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Iu(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Iu(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,r=this.buf;return e=127&(i=r[this.pos++]),i<128?e:(e|=(127&(i=r[this.pos++]))<<7,i<128?e:(e|=(127&(i=r[this.pos++]))<<14,i<128?e:(e|=(127&(i=r[this.pos++]))<<21,i<128?e:function(t,e,i){var r,n,o=i.buf;if(r=(112&(n=o[i.pos++]))>>4,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<3,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<10,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<17,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<24,n<128)return Du(t,r,e);if(r|=(1&(n=o[i.pos++]))<<31,n<128)return Du(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=r[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,i,r=this.readVarint()+this.pos,n=this.pos;return 12<=(this.pos=r)-n&&ku?(t=this.buf,e=n,i=r,ku.decode(t.subarray(e,i))):function(t,e){for(var i="",r=n;r<e;){var o,a,s,l=t[r],u=null,c=239<l?4:223<l?3:191<l?2:1;if(e<r+c)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=t[r+2],128==(192&(o=t[r+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||55296<=u&&u<=57343)&&(u=null)):4===c&&(a=t[r+2],s=t[r+3],128==(192&(o=t[r+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||1114112<=u)&&(u=null)),null===u?(u=65533,c=1):65535<u&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),r+=c}return i}(this.buf,r)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}
2,readPackedVarint:function(t,e){if(this.type!==Lu.Bytes)return t.push(this.readVarint(e));var i=Pu(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Lu.Bytes)return t.push(this.readSVarint());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Lu.Bytes)return t.push(this.readBoolean());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Lu.Bytes)return t.push(this.readFloat());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Lu.Bytes)return t.push(this.readDouble());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Lu.Bytes)return t.push(this.readFixed32());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Lu.Bytes)return t.push(this.readSFixed32());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Lu.Bytes)return t.push(this.readFixed64());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Lu.Bytes)return t.push(this.readSFixed64());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Lu.Varint)for(;127<this.buf[this.pos++];);else if(e===Lu.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Lu.Fixed32)this.pos+=4;else{if(e!==Lu.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Zu(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Zu(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Zu(this.buf,-1&t,this.pos),Zu(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Zu(this.buf,-1&t,this.pos),Zu(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){268435455<(t=+t||0)||t<0?function(e){var i,r,n,o,a,s,l;if(0<=t?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:r=r+1|(i=0)),0x10000000000000000<=t||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),s=i,(l=e).buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,l.buf[l.pos]=127&(s>>>=7),a=(7&(n=r))<<4,(o=e).buf[o.pos++]|=a|((n>>>=3)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n)))))}(this):(this.realloc(4),this.buf[this.pos++]=127&t|(127<t?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(127<t?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(127<t?128:0),t<=127||(this.buf[this.pos++]=t>>>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);var i=this.pos-e;128<=i&&zu(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),Eu(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Eu(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);var r=this.pos-i;128<=r&&zu(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r}
vendor: 9,220 bytes, line 2
2,writeMessage:function(t,e,i){this.writeTag(t,Lu.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Ou,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Nu,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ju,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Ru,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Bu,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Fu,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Uu,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Vu,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,qu,e)},writeBytesField:function(t,e){this.writeTag(t,Lu.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Lu.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Lu.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Lu.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Lu.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Lu.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Lu.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Lu.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Lu.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Lu.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Qu={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};function $u(t,e){var i={},r={};this.haveRenderCallbacks=[];var n=[];this.addImages(t,i,n),this.addImages(e,r,n);var o=Xu(n),a=new Zs({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=i[s].paddedRect;Zs.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var p=e[c],h=r[c].paddedRect,d=h.x+1,f=h.y+1,m=p.data.width,g=p.data.height;Zs.copy(p.data,a,{x:0,y:0},{x:d,y:f},p.data),Zs.copy(p.data,a,{x:0,y:g-1},{x:d,y:f-1},{width:m,height:1}),Zs.copy(p.data,a,{x:0,y:0},{x:d,y:f+g},{width:m,height:1}),Zs.copy(p.data,a,{x:m-1,y:0},{x:d-1,y:f},{width:1,height:g}),Zs.copy(p.data,a,{x:0,y:0},{x:d+m,y:f},{width:1,height:g})}this.image=a,this.iconPositions=i,this.patternPositions=r}function tc(){this.scale=1,this.fontStack="",this.imageName=null}Qu.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Qu.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Qu.tlbr.get=function(){return this.tl.concat(this.br)},Qu.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ju.prototype,Qu),$u.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 Ju(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},$u.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)},$u.prototype.patchUpdatedImage=function(t,e,i){if(t&&e&&t.version!==e.version){t.version=e.version;var r=t.tl;i.update(e.data,void 0,{x:r[0],y:r[1]})}},Vr("ImagePosition",Ju),Vr("ImageAtlas",$u);var ec={horizontal:1,vertical:2,horizontalOnly:3};function ic(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}function rc(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m){var g,y=ic.fromFeature(t,n);p===ec.vertical&&y.verticalizePunctuation();var v=pn.processBidirectionalText,_=pn.processStyledBidirectionalText;if(v&&1===y.sections.length){g=[];for(var x=0,b=v(y.toString(),uc(y,u,o,e,r,d,f));x<b.length;x+=1){var w=b[x],S=new ic;S.text=w,S.sections=y.sections;for(var T=0;T<w.length;T++)S.sectionIndex.push(0);g.push(S)}}else if(_){g=[];for(var C=0,I=_(y.text,y.sectionIndex,uc(y,u,o,e,r,d,f));C<I.length;C+=1){var E=I[C],M=new ic;M.text=E[0],M.sectionIndex=E[1],M.sections=y.sections,g.push(M)}}else g=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,uc(y,u,o,e,r,d,f));var A=[],L={positionedLines:A,text:y.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:p,iconsInText:!1,verticalizable:!1};return function(t,e,i,r,n,o,a,s,u,c,p){for(var h=0,d=-17,f=0,m=0,g="right"===l?1:"left"===l?0:.5,y=0,v=0,_=n;v<_.length;v+=1){var x=_[v];x.trim();var b=x.getMaxScale(),w=24*(b-1),S={positionedGlyphs:[],lineOffset:0},T=(t.positionedLines[y]=S).positionedGlyphs,C=0;if(x.length()){for(var I=0;I<x.length();I++){var E=x.getSection(I),M=x.getSectionIndex(I),A=x.getCharCode(I),L=0,k=null,P=null,D=null,z=24,O=!(s===ec.horizontal||!c&&!Jr(A)||c&&(nc[A]||(G=A,Kr.Arabic(G)||Kr["Arabic Supplement"](G)||Kr["Arabic Extended-A"](G)||Kr["Arabic Presentation Forms-A"](G)||Kr["Arabic Presentation Forms-B"](G))));if(E.imageName){var N=r[E.imageName];if(!N)continue;D=E.imageName,t.iconsInText=t.iconsInText||!0,P=N.paddedRect;var R=N.displaySize;E.scale=24*E.scale/p,L=w+(24-R[1]*E.scale),z=(k={width:R[0],height:R[1],left:1,top:-3,advance:O?R[1]:R[0]}).advance;var B=O?R[0]*E.scale-24*b:R[1]*E.scale-24*b;0<B&&C<B&&(C=B)}else{var j=i[E.fontStack],F=j&&j[A];if(F&&F.rect)P=F.rect,k=F.metrics;else{var U=e[E.fontStack],V=U&&U[A];if(!V)continue;k=V.metrics}L=24*(b-E.scale)}O?(t.verticalizable=!0,T.push({glyph:A,imageName:D,x:h,y:d+L,vertical:O,scale:E.scale,fontStack:E.fontStack,sectionIndex:M,metrics:k,rect:P}),h+=z*E.scale+u):(T.push({glyph:A,imageName:D,x:h,y:d+L,vertical:O,scale:E.scale,fontStack:E.fontStack,sectionIndex:M,metrics:k,rect:P}),h+=k.advance*E.scale+u)}0!==T.length&&(f=Math.max(h-u,f),pc(T,0,T.length-1,g,C)),h=0;var q=o*b+C;S.lineOffset=Math.max(C,w),d+=q,m=Math.max(q,m),++y}else d+=o,++y}var G,Z=d- -17,H=cc(a),W=H.horizontalAlign,Y=H.verticalAlign;(function(t,e,i,r,n,a,s){var l,u=(e-i)*r;l=n!==o?-a*Y+17:(-Y*s+.5)*o;for(var c=0,p=t;c<p.length;c+=1)for(var h=0,d=p[c].positionedGlyphs;h<d.length;h+=1){var f=d[h];f.x+=u,f.y+=l}})(t.positionedLines,g,W,f,m,Z,n.length),t.top+=-Y*Z,t.bottom=t.top+Z,t.left+=-W*f,t.right=t.left+f}(L,e,i,r,g,a,s,p,u,h,m),!function(){for(var t=0,e=A;t<e.length;t+=1)if(0!==e[t].positionedGlyphs.length)return;return 1}()&&L}tc.forText=function(t,e){var i=new tc;return i.scale=t||1,i.fontStack=e,i},tc.forImage=function(t){var e=new tc;return e.imageName=t,e},ic.fromFeature=function(t,e){for(var i=new ic,r=0;r<t.sections.length;r++){var n=t.sections[r];n.image?i.addImageSection(n):i.addTextSection(n,e)}return i},ic.prototype.length=function(){return this.text.length},ic.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},ic.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},ic.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},ic.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&&Qr(r)&&!Mu[t[i+1]]||n&&Qr(n)&&!Mu[t[i-1]]||!Mu[t[i]]?t[i]:Mu[t[i]]}return e}(this.text)},ic.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&nc[this.text.charCodeAt(e)];e++)t++;for(var i=this.text.length,r=this.text.length-1;0<=r&&t<=r&&nc[this.text.charCodeAt(r)];r--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)},ic.prototype.substring=function(t,e){var i=new ic;return i.text=this.text.substring(t,e),i.sectionIndex=this.sectionIndex.slice(t,e),i.sections=this.sections,i},ic.prototype.toString=function(){return this.text},ic.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,i){return Math.max(e,t.sections[i].scale)}),0)},ic.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(tc.forText(t.scale,t.fontStack||e));for(var i=this.sections.length-1,r=0;r<t.text.length;++r)this.sectionIndex.push(i)},ic.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";if(0!==e.length){var i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push(tc.forImage(e)),this.sectionIndex.push(this.sections.length-1)):w("Reached maximum number of images 6401")}else w("Can't add FormattedSection with an empty image.")},ic.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?63743<=this.imageSectionID?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var nc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},oc={};function ac(t,e,i,r,n,o){if(e.imageName){var a=r[e.imageName];return a?a.displaySize[0]*e.scale*24/o+n:0}var s=i[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+n:0}function sc(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 lc(t,e,i,r,n,o){for(var a=null,s=sc(e,i,n,o),l=0,u=r;l<u.length;l+=1){var c=u[l],p=sc(e-c.x,i,n,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function uc(t,e,i,r,n,o,a){if("point"!==o)return[];if(!t)return[];
2for(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+=ac(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 d=t.getSection(h),f=t.getCharCode(h);if(nc[f]||(p+=ac(f,d,r,n,e,a)),h<t.length()-1){var m=!((s=f)<11904||!(Kr["Bopomofo Extended"](s)||Kr.Bopomofo(s)||Kr["CJK Compatibility Forms"](s)||Kr["CJK Compatibility Ideographs"](s)||Kr["CJK Compatibility"](s)||Kr["CJK Radicals Supplement"](s)||Kr["CJK Strokes"](s)||Kr["CJK Symbols and Punctuation"](s)||Kr["CJK Unified Ideographs Extension A"](s)||Kr["CJK Unified Ideographs"](s)||Kr["Enclosed CJK Letters and Months"](s)||Kr["Halfwidth and Fullwidth Forms"](s)||Kr.Hiragana(s)||Kr["Ideographic Description Characters"](s)||Kr["Kangxi Radicals"](s)||Kr["Katakana Phonetic Extensions"](s)||Kr.Katakana(s)||Kr["Vertical Forms"](s)||Kr["Yi Radicals"](s)||Kr["Yi Syllables"](s)));(oc[f]||m||d.imageName)&&l.push(lc(h+1,p,u,l,(v=void 0,v=0,10===(g=f)&&(v-=1e4),m&&c&&(v+=150),40!==g&&65288!==g||(v+=50),41!==(y=t.getCharCode(h+1))&&65289!==y||(v+=50),v),!1))}}var g,y,v;return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(lc(t.length(),p,u,l,0,!0))}function cc(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 pc(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}function hc(t,e,i,r,n,o){var a,s=t.image;if(s.content){var l=s.content,u=s.pixelRatio||1;a=[l[0]/u,l[1]/u,s.displaySize[0]-l[2]/u,s.displaySize[1]-l[3]/u]}var c,p,h,d,f=e.left*o,m=e.right*o;p="width"===i||"both"===i?(d=n[0]+f-r[3],n[0]+m+r[1]):(d=n[0]+(f+m-s.displaySize[0])/2)+s.displaySize[0];var g=e.top*o,y=e.bottom*o;return h="height"===i||"both"===i?(c=n[1]+g-r[0],n[1]+y+r[2]):(c=n[1]+(g+y-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:p,bottom:h,left:d,collisionPadding:a}}oc[10]=!0,oc[32]=!0,oc[38]=!0,oc[40]=!0,oc[41]=!0,oc[43]=!0,oc[45]=!0,oc[47]=!0,oc[173]=!0,oc[183]=!0,oc[8203]=!0,oc[8208]=!0,oc[8211]=!0,oc[8231]=!0;var dc,fc=((dc=n)&&(mc.__proto__=dc),((mc.prototype=Object.create(dc&&dc.prototype)).constructor=mc).prototype.clone=function(){return new mc(this.x,this.y,this.angle,this.segment)},mc);function mc(t,e,i,r){dc.call(this,t,e),this.angle=i,void 0!==r&&(this.segment=r)}function gc(t,e){var i=e.expression;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new un(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],l=r[a];return"composite"===i.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:n}:{kind:"camera",minZoom:s,maxZoom:l,minSize:i.evaluate(new un(s)),maxSize:i.evaluate(new un(l)),interpolationType:n}}function yc(t,e,i){var r=e.uSize,n=i.lowerSize;return"source"===t.kind?n/128:"composite"===t.kind?Xe(n/128,i.upperSize/128,e.uSizeT):r}function vc(t,e){var i=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){var n=t.interpolationType,o=n?u(ci.interpolationFactor(n,e,t.minZoom,t.maxZoom),0,1):0;"camera"===t.kind?r=Xe(t.minSize,t.maxSize,o):i=o}return{uSizeT:i,uSize:r}}Vr("Anchor",fc);var _c=Object.freeze({__proto__:null,getSizeData:gc,evaluateSizeForFeature:yc,evaluateSizeForZoom:vc,SIZE_PACK_FACTOR:128});function xc(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);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),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 bc(t){for(var e=0,i=0;i<t.length-1;i++)e+=t[i].dist(t[i+1]);return e}function wc(t,e,i){return t?.6*e*i:0}function Sc(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Tc(t,e,i,r,n,o){for(var a=wc(i,n,o),s=Sc(i,r)*o,l=0,u=bc(t)/2,c=0;c<t.length-1;c++){var p=t[c],h=t[c+1],d=p.dist(h);if(u<l+d){var f=(u-l)/d,m=Xe(p.x,h.x,f),g=Xe(p.y,h.y,f),y=new fc(m,g,h.angleTo(p),c);return y._round(),!a||xc(t,y,s,a,e)?y:void 0}l+=d}}function Cc(t,e,i,r,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x<e&&(h=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y<i&&h.y<i||(p.y<i?p=new n(p.x+(i-p.y)/(h.y-p.y)*(h.x-p.x),i)._round():h.y<i&&(h=new n(p.x+(i-p.y)/(h.y-p.y)*(h.x-p.x),i)._round()),p.x>=r&&h.x>=r||(p.x>=r?p=new n(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=r&&(h=new n(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round():h.y>=o&&(h=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round()),u&&p.equals(u[u.length-1])||a.push(u=[p
2]),u.push(h)))))}return a}function Ic(t,e,i,r){function o(t,e){return t+e[1]-e[0]}var a=[],s=t.image,l=s.pixelRatio,u=s.paddedRect.w-2,c=s.paddedRect.h-2,p=t.right-t.left,h=t.bottom-t.top,d=s.stretchX||[[0,u]],f=s.stretchY||[[0,c]],m=d.reduce(o,0),g=f.reduce(o,0),y=u-m,v=c-g,_=0,x=m,b=0,w=g,S=0,T=y,C=0,I=v;if(s.content&&r){var E=s.content;_=Ec(d,0,E[0]),b=Ec(f,0,E[1]),x=Ec(d,E[0],E[2]),w=Ec(f,E[1],E[3]),S=E[0]-_,C=E[1]-b,T=E[2]-E[0]-x,I=E[3]-E[1]-w}function M(r,o,a,u){var c=Ac(r.stretch-_,x,p,t.left),d=Lc(r.fixed-S,T,r.stretch,m),f=Ac(o.stretch-b,w,h,t.top),y=Lc(o.fixed-C,I,o.stretch,g),v=Ac(a.stretch-_,x,p,t.left),E=Lc(a.fixed-S,T,a.stretch,m),M=Ac(u.stretch-b,w,h,t.top),A=Lc(u.fixed-C,I,u.stretch,g),L=new n(c,f),k=new n(v,f),P=new n(v,M),D=new n(c,M),z=new n(d/l,y/l),O=new n(E/l,A/l),N=e*Math.PI/180;if(N){var R=Math.sin(N),B=Math.cos(N),j=[B,-R,R,B];L._matMult(j),k._matMult(j),D._matMult(j),P._matMult(j)}var F=r.stretch+r.fixed,U=o.stretch+o.fixed;return{tl:L,tr:k,bl:D,br:P,tex:{x:s.paddedRect.x+1+F,y:s.paddedRect.y+1+U,w:a.stretch+a.fixed-F,h:u.stretch+u.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:O,minFontScaleX:T/l/p,minFontScaleY:I/l/h,isSDF:i}}if(r&&(s.stretchX||s.stretchY))for(var A=Mc(d,y,m),L=Mc(f,v,g),k=0;k<A.length-1;k++)for(var P=A[k],D=A[k+1],z=0;z<L.length-1;z++)a.push(M(P,L[z],D,L[z+1]));else a.push(M({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:1+u},{fixed:0,stretch:1+c}));return a}function Ec(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 Mc(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],u=r[r.length-1];r.push({fixed:s-u.stretch,stretch:u.stretch}),r.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return r.push({fixed:e+1,stretch:i}),r}function Ac(t,e,i,r){return t/e*i+r}function Lc(t,e,i,r){return t-e*i/r}function kc(t,e,i,r,o,a,s,l,u,c){if(this.boxStartIndex=t.length,u){var p=a.top,h=a.bottom,d=a.collisionPadding;d&&(p-=d[1],h+=d[3]);var f=h-p;0<f&&(f=Math.max(10,f),this.circleDiameter=f)}else{var m=a.top*s-l,g=a.bottom*s+l,y=a.left*s-l,v=a.right*s+l,_=a.collisionPadding;if(_&&(y-=_[0]*s,m-=_[1]*s,v+=_[2]*s,g+=_[3]*s),c){var x=new n(y,m),b=new n(v,m),w=new n(y,g),S=new n(v,g),T=c*Math.PI/180;x._rotate(T),b._rotate(T),w._rotate(T),S._rotate(T),y=Math.min(x.x,b.x,w.x,S.x),v=Math.max(x.x,b.x,w.x,S.x),m=Math.min(x.y,b.y,w.y,S.y),g=Math.max(x.y,b.y,w.y,S.y)}t.emplaceBack(e.x,e.y,y,m,v,g,i,r,o)}this.boxEndIndex=t.length}var Pc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Dc),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 Dc(t,e){return t<e?-1:e<t?1:0}function zc(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);for(var r=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<r)&&(r=c.x),(!u||c.y<o)&&(o=c.y),(!u||c.x>a)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-r,s-o),h=p/2,d=new Pc([],Oc);if(0===p)return new n(r,o);for(var f=r;f<a;f+=p)for(var m=o;m<s;m+=p)d.push(new Nc(f+h,m+h,h,t));for(var g=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 Nc(i/e,r/e,0,t)}(t),y=d.length;d.length;){var v=d.pop();(v.d>g.d||!g.d)&&(g=v,i&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,y)),v.max-g.d<=e||(d.push(new Nc(v.p.x-(h=v.h/2),v.p.y-h,h,t)),d.push(new Nc(v.p.x+h,v.p.y-h,h,t)),d.push(new Nc(v.p.x-h,v.p.y+h,h,t)),d.push(new Nc(v.p.x+h,v.p.y+h,h,t)),y+=4)}return i&&(console.log("num probes: "+y),console.log("best distance: "+g.d)),g.p}function Oc(t,e){return e.max-t.max}function Nc(t,e,i,r){this.p=new n(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,ys(t,u,c))}return(i?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}Pc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Pc.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}},Pc.prototype.peek=function(){return this.data[0]},Pc.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},Pc.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 Rc=Number.POSITIVE_INFINITY;
2function Bc(t,e){return e[1]!==Rc?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 jc(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 Fc(t,e,i,r,o,a,s,l,u,c,p,h,d,f,m){var g=function(t,e,i,r,o,a,s){for(var l=i.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],c=0,p=t.positionedLines;c<p.length;c+=1)for(var h=p[c],d=0,f=h.positionedGlyphs;d<f.length;d+=1){var m=f[d];if(m.rect){var g=m.rect||{},y=4,v=!0,_=1,x=0,b=(r||s)&&m.vertical,w=m.metrics.advance*m.scale/2;if(s&&t.verticalizable&&(x=h.lineOffset/2-(m.imageName?-(24-m.metrics.width*m.scale)/2:24*(m.scale-1))),m.imageName){var S=a[m.imageName];v=S.sdf,y=1/(_=S.pixelRatio)}var T=r?[m.x+w,m.y]:[0,0],C=r?[0,0]:[m.x+w+e[0],m.y+e[1]-x],I=[0,0];b&&(I=C,C=[0,0]);var E=(m.metrics.left-y)*m.scale-w+C[0],M=(-m.metrics.top-y)*m.scale+C[1],A=E+g.w*m.scale/_,L=M+g.h*m.scale/_,k=new n(E,M),P=new n(A,M),D=new n(E,L),z=new n(A,L);if(b){var O=new n(-w,17+w),N=-Math.PI/2,R=12-w,B=new n(22-R,-(m.imageName?R:0)),j=new(Function.prototype.bind.apply(n,[null].concat(I)));k._rotateAround(N,O)._add(B)._add(j),P._rotateAround(N,O)._add(B)._add(j),D._rotateAround(N,O)._add(B)._add(j),z._rotateAround(N,O)._add(B)._add(j)}if(l){var F=Math.sin(l),U=Math.cos(l),V=[U,-F,F,U];k._matMult(V),P._matMult(V),D._matMult(V),z._matMult(V)}var q=new n(0,0),G=new n(0,0);u.push({tl:k,tr:P,bl:D,br:z,tex:g,writingMode:t.writingMode,glyphOffset:T,sectionIndex:m.sectionIndex,isSDF:v,pixelOffsetTL:q,pixelOffsetBR:G,minFontScaleX:0,minFontScaleY:0})}}return u}(i,l,o,a,s,r,t.allowVerticalPlacement),y=t.textSizeData,v=null;"source"===y.kind?32640<(v=[128*o.layout.get("text-size").evaluate(s,{})])[0]&&w(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===y.kind&&(32640<(v=[128*f.compositeTextSizes[0].evaluate(s,{},m),128*f.compositeTextSizes[1].evaluate(s,{},m)])[0]||32640<v[1])&&w(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,g,v,l,a,s,c,e,u.lineStartIndex,u.lineLength,d,m);for(var _=0,x=p;_<x.length;_+=1)h[x[_]]=t.text.placedSymbolArray.length-1;return 4*g.length}function Uc(t){for(var e in t)return t[e];return null}function Vc(t,e,i,r){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;0<=a;a--)if(r.dist(o[a])<i)return 1}else n[e]=[];return n[e].push(r),0}var qc=Kl.VectorTileFeature.types,Gc=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Zc(t,e,i,r,n,o,a,s,l,u,c,p,h){var d=s?Math.min(32640,Math.round(s[0])):0,f=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,i,Math.round(32*r),Math.round(32*n),o,a,(d<<1)+(l?1:0),f,16*u,16*c,256*p,256*h)}function Hc(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 Wc(t){for(var e=0,i=t.sections;e<i.length;e+=1)if(tn(i[e].text))return 1}function Yc(t){this.layoutVertexArray=new Qn,this.indexArray=new xo,this.programConfigurations=t,this.segments=new ya,this.dynamicLayoutVertexArray=new eo,this.opacityVertexArray=new no,this.placedSymbolArray=new ea}function Kc(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new ya,this.collisionVertexArray=new yo}function Xc(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=Es([]),this.placementViewportMatrix=Es([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=gc(this.zoom,e["text-size"]),this.iconSizeData=gc(this.zoom,e["icon-size"]);var i=this.layers[0].layout,r=i.get("symbol-sort-key"),n=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==n&&void 0!==r.constantOr(1),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(t){return ec[t]}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id})),this.sourceID=t.sourceID}function Jc(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Zt,this.defaultValue=t}Yc.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},Yc.prototype.upload=function(t,e,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,xu.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,bu.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Gc,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))},Yc.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",Yc),Kc.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,wu.members,!0)},Kc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Vr("CollisionBuffers",Kc),Xc.prototype.createArrays=function(){this.text=new Yc(new os(this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new Yc(new os(this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.glyphOffsetArray=new la,this.lineVertexArray=new pa,this.symbolInstances=new oa},Xc.prototype.calculateGlyphDependencies=function(t,e,i,r,n){for(var o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(i||r)&&n){var a=Mu[t.charAt(o)];a&&(e[a.charCodeAt(0)]=!0)}},Xc.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 pe&&!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,d=e.availableImages,f=new un(this.zoom),m=0,g=t;m<g.length;m+=1){var y=g[m],v=y.feature,_=y.id,x=y.index,b=y.sourceLayerIndex,w=r._featureFilter.needGeometry,S={type:v.type,id:_,properties:v.properties,geometry:w?us(v):[]};if(r._featureFilter.filter(f,S,i)){w||(S.geometry=us(v));var T=void 0;if(l){var C=r.getValueAndResolveTokens("text-field",S,i,d),I=pe.factory(C);Wc(I)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===sn()||this.hasRTLText&&pn.isParsed())&&(T=Cu(I,r,S))}var E=void 0;if(u){var M=r.getValueAndResolveTokens("icon-image",S,i,d);E=M instanceof he?M:he.fromString(M)}if(T||E){var A=this.sortFeaturesByKey?c.evaluate(S,{},i):void 0,L={id:_,text:T,icon:E,index:x,sourceLayerIndex:b,geometry:us(v),properties:v.properties,type:qc[v.type],sortKey:A};if(this.features.push(L),E&&(p[E.name]=!0),T){var k=o.evaluate(S,{},i).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&0<=this.writingModes.indexOf(ec.vertical);for(var D=0,z=T.sections;D<z.length;D+=1){var O=z[D];if(O.image)p[O.image.name]=!0;else{var N=Xr(T.toString()),R=O.fontStack||k,B=h[R]=h[R]||{};this.calculateGlyphDependencies(O.text,B,P,this.allowVerticalPlacement,N)}}}}}}"line"===n.get("symbol-placement")&&(this.features=function(t){var e={},i={},r=[],n=0;function o(e){r.push(t[e]),n++}function a(t,e,n){var o=i[t];return delete i[t],i[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(n[0]),o}function s(t,i,n){var o=e[i];return delete e[i],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=n[0].concat(r[o].geometry[0]),o}function l(t,e,i){var r=i?e[0][e[0].length-1]:e[0][0];return t+":"+r.x+":"+r.y}for(var u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text?c.text.toString():null;if(h){var d=l(h,p),f=l(h,p,!0);if(d in i&&f in e&&i[d]!==e[f]){var m=s(d,f,p),g=a(d,f,r[m].geometry);delete e[d],delete i[f],i[l(h,r[g].geometry,!0)]=g,r[m].geometry=null}else d in i?a(d,f,p):f in e?s(d,f,p):(o(u),e[d]=n-1,i[f]=n-1)}else o(u)}return r.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}
vendor: 4,271 bytes, line 2
2))}},Xc.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))},Xc.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},Xc.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Xc.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},Xc.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Xc.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Xc.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}},Xc.prototype.addSymbols=function(t,e,i,r,n,o,a,s,l,u,c,p){for(var h=t.indexArray,d=t.layoutVertexArray,f=t.segments.prepareSegment(4*e.length,d,h,o.sortKey),m=this.glyphOffsetArray.length,g=f.vertexLength,y=this.allowVerticalPlacement&&a===ec.vertical?Math.PI/2:0,v=o.text&&o.text.sections,_=0;_<e.length;_++){var x=e[_],b=x.tl,w=x.tr,S=x.bl,T=x.br,C=x.tex,I=x.pixelOffsetTL,E=x.pixelOffsetBR,M=x.minFontScaleX,A=x.minFontScaleY,L=x.glyphOffset,k=x.isSDF,P=x.sectionIndex,D=f.vertexLength,z=L[1];Zc(d,s.x,s.y,b.x,z+b.y,C.x,C.y,i,k,I.x,I.y,M,A),Zc(d,s.x,s.y,w.x,z+w.y,C.x+C.w,C.y,i,k,E.x,I.y,M,A),Zc(d,s.x,s.y,S.x,z+S.y,C.x,C.y+C.h,i,k,I.x,E.y,M,A),Zc(d,s.x,s.y,T.x,z+T.y,C.x+C.w,C.y+C.h,i,k,E.x,E.y,M,A),Hc(t.dynamicLayoutVertexArray,s,y),h.emplaceBack(D,D+1,D+2),h.emplaceBack(D+1,D+2,D+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(L[0]),_!==e.length-1&&P===e[_+1].sectionIndex||t.programConfigurations.populatePaintArrays(d.length,o,o.index,{},p,v&&v[P])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,r[0],r[1],a,0,!1,0,c)},Xc.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))},Xc.prototype.addCollisionDebugVertices=function(t,e,i,r,o,a,s){var l=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),u=l.vertexLength,c=o.layoutVertexArray,p=o.collisionVertexArray,h=s.anchorX,d=s.anchorY;this._addCollisionDebugVertex(c,p,a,h,d,new n(t,e)),this._addCollisionDebugVertex(c,p,a,h,d,new n(i,e)),this._addCollisionDebugVertex(c,p,a,h,d,new n(i,r)),this._addCollisionDebugVertex(c,p,a,h,d,new n(t,r)),l.vertexLength+=4;var f=o.indexArray;f.emplaceBack(u,u+1),f.emplaceBack(u+1,u+2),f.emplaceBack(u+2,u+3),f.emplaceBack(u+3,u),l.primitiveLength+=4},Xc.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)}},Xc.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Kc(co,Su.members,Bo),this.iconCollisionBox=new Kc(co,Su.members,Bo);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)}}
2,Xc.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 d=t.get(h);u.verticalTextBox={x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,anchorPointX:d.anchorPointX,anchorPointY:d.anchorPointY},u.verticalTextFeatureIndex=d.featureIndex;break}for(var f=o;f<a;f++){var m=t.get(f);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 g=s;g<l;g++){var y=t.get(g);u.verticalIconBox={x1:y.x1,y1:y.y1,x2:y.x2,y2:y.y2,anchorPointX:y.anchorPointX,anchorPointY:y.anchorPointY},u.verticalIconFeatureIndex=y.featureIndex;break}return u},Xc.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))}},Xc.prototype.hasTextData=function(){return 0<this.text.segments.get().length},Xc.prototype.hasIconData=function(){return 0<this.icon.segments.get().length},Xc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Xc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&0<this.textCollisionBox.segments.get().length},Xc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&0<this.iconCollisionBox.segments.get().length},Xc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var i=t.placedSymbolArray.get(e),r=i.vertexStartIndex+4*i.numGlyphs,n=i.vertexStartIndex;n<r;n+=4)t.indexArray.emplaceBack(n,n+1,n+2),t.indexArray.emplaceBack(n+1,n+2,n+3)},Xc.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},Xc.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})},Xc.prototype.sortFeatures=function(t){var e=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 i=0,r=this.symbolInstanceIndexes;i<r.length;i+=1){var n=this.symbolInstances.get(r[i]);this.featureSortOrder.push(n.featureIndex),[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex].forEach((function(t,i,r){0<=t&&r.indexOf(t)===i&&e.addIndicesForPlacedSymbol(e.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",Xc,{omit:["layers","collisionBoxArray","features","compareText"]}),Xc.MAX_GLYPHS=65535,Xc.addDynamicAttributes=Hc;var Qc=new En({"symbol-placement":new xn(Ot.layout_symbol["symbol-placement"]),"symbol-spacing":new xn(Ot.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xn(Ot.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bn(Ot.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xn(Ot.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xn(Ot.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new xn(Ot.layout_symbol["icon-ignore-placement"]),"icon-optional":new xn(Ot.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xn(Ot.layout_symbol["icon-rotation-alignment"]),"icon-size":new bn(Ot.layout_symbol["icon-size"]),"icon-text-fit":new xn(Ot.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xn(Ot.layout_symbol["icon-text-fit-padding"]),"icon-image":new bn(Ot.layout_symbol["icon-image"]),"icon-rotate":new bn(Ot.layout_symbol["icon-rotate"]),"icon-padding":new xn(Ot.layout_symbol["icon-padding"]),"icon-keep-upright":new xn(Ot.layout_symbol["icon-keep-upright"]),"icon-offset":new bn(Ot.layout_symbol["icon-offset"]),"icon-anchor":new bn(Ot.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xn(Ot.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xn(Ot.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xn(Ot.layout_symbol["text-rotation-alignment"]),"text-field":new bn(Ot.layout_symbol["text-field"]),"text-font":new bn(Ot.layout_symbol["text-font"]),"text-size":new bn(Ot.layout_symbol["text-size"]),"text-max-width":new bn(Ot.layout_symbol["text-max-width"]),"text-line-height":new xn(Ot.layout_symbol["text-line-height"]),"text-letter-spacing":new bn(Ot.layout_symbol["text-letter-spacing"]),"text-justify":new bn(Ot.layout_symbol["text-justify"]),"text-radial-offset":new bn(Ot.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xn(Ot.layout_symbol["text-variable-anchor"]),"text-anchor":new bn(Ot.layout_symbol["text-anchor"]),"text-max-angle":new xn(Ot.layout_symbol["text-max-angle"]),"text-writing-mode":new xn(Ot.layout_symbol["text-writing-mode"]),"text-rotate":new bn(Ot.layout_symbol["text-rotate"]),"text-padding":new xn(Ot.layout_symbol["text-padding"]),"text-keep-upright":new xn(Ot.layout_symbol["text-keep-upright"]),"text-transform":new bn(Ot.layout_symbol["text-transform"]),"text-offset":new bn(Ot.layout_symbol["text-offset"]),"text-allow-overlap":new xn(Ot.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new xn(Ot.layout_symbol["text-ignore-placement"]),"text-optional":new xn(Ot.layout_symbol["text-optional"])}),$c={paint:new En({"icon-opacity":new bn(Ot.paint_symbol["icon-opacity"]),"icon-color":new bn(Ot.paint_symbol["icon-color"]),"icon-halo-color":new bn(Ot.paint_symbol["icon-halo-color"]),"icon-halo-width":new bn(Ot.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bn(Ot.paint_symbol["icon-halo-blur"]),"icon-translate":new xn(Ot.paint_symbol["icon-translate"]),"icon-translate-anchor":new xn(Ot.paint_symbol["icon-translate-anchor"]),"text-opacity":new bn(Ot.paint_symbol["text-opacity"]),"text-color":new bn(Ot.paint_symbol["text-color"],{runtimeType:Kt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new bn(Ot.paint_symbol["text-halo-color"]),"text-halo-width":new bn(Ot.paint_symbol["text-halo-width"]),"text-halo-blur":new bn(Ot.paint_symbol["text-halo-blur"]),"text-translate":new xn(Ot.paint_symbol["text-translate"]),"text-translate-anchor":new xn(Ot.paint_symbol["text-translate-anchor"])}),layout:Qc};
2function tp(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,r)}Jc.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},Jc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Jc.prototype.outputDefined=function(){return!1},Jc.prototype.serialize=function(){return null},Vr("FormatSectionOverride",Jc,{omit:["defaultValue"]});var ep,ip,rp,np,op=(xp.__proto__=np=kn,((xp.prototype=Object.create(np&&np.prototype)).constructor=xp).prototype.recalculate=function(t,e){if(np.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")){var i=this.layout.get("text-writing-mode");if(i){for(var r=[],n=0,o=i;n<o.length;n+=1){var a=o[n];r.indexOf(a)<0&&r.push(a)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},xp.prototype.getValueAndResolveTokens=function(t,e,i,r){var n,o=this.layout.get(t).evaluate(e,{},i,r),a=this._unevaluatedLayout._values[t];return a.isDataDriven()||Xi(a.value)||!o?o:(n=e.properties,o.replace(/{([^{}]+)}/g,(function(t,e){return e in n?String(n[e]):""})))},xp.prototype.createBucket=function(t){return new Xc(t)},xp.prototype.queryRadius=function(){return 0},xp.prototype.queryIntersectsFeature=function(){return!1},xp.prototype._setPaintOverrides=function(){for(var t=0,e=$c.paint.overridableProperties;t<e.length;t+=1){var i=e[t];if(xp.hasPaintOverride(this.layout,i)){var r,n=this.paint.get(i),o=new Jc(n),a=new Ki(o,n.property.specification);r="constant"===n.value.kind||"source"===n.value.kind?new Qi("source",a):new $i("composite",a,n.value.zoomStops,n.value._interpolationType),this.paint._values[i]=new vn(n.property,r,n.parameters)}}},xp.prototype._handleOverridablePaintPropertyUpdate=function(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&xp.hasPaintOverride(this.layout,t)},xp.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.get("text-field"),n=$c.paint.properties[e],o=!1;if("constant"===r.value.kind&&r.value.value instanceof pe)i(r.value.value.sections);else if("source"===r.value.kind){var a=function(t){o||(t instanceof ye&&me(t.value)===$t?i(t.value.sections):t instanceof be?i(t.sections):t.eachChild(a))},s=r.value;s._styleExpression&&a(s._styleExpression.expression)}return o},xp),ap={paint:new En({"background-color":new xn(Ot.paint_background["background-color"]),"background-pattern":new wn(Ot.paint_background["background-pattern"]),"background-opacity":new xn(Ot.paint_background["background-opacity"])})},sp=(_p.__proto__=rp=kn,(_p.prototype=Object.create(rp&&rp.prototype)).constructor=_p),lp={paint:new En({"raster-opacity":new xn(Ot.paint_raster["raster-opacity"]),"raster-hue-rotate":new xn(Ot.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xn(Ot.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xn(Ot.paint_raster["raster-brightness-max"]),"raster-saturation":new xn(Ot.paint_raster["raster-saturation"]),"raster-contrast":new xn(Ot.paint_raster["raster-contrast"]),"raster-resampling":new xn(Ot.paint_raster["raster-resampling"]),"raster-fade-duration":new xn(Ot.paint_raster["raster-fade-duration"])})},up=(vp.__proto__=ip=kn,(vp.prototype=Object.create(ip&&ip.prototype)).constructor=vp),cp=(yp.__proto__=ep=kn,
2((yp.prototype=Object.create(ep&&ep.prototype)).constructor=yp).prototype.is3D=function(){return"3d"===this.implementation.renderingMode},yp.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},yp.prototype.recalculate=function(){},yp.prototype.updateTransitions=function(){},yp.prototype.hasTransition=function(){},yp.prototype.serialize=function(){},yp.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},yp.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},yp),pp={circle:Os,heatmap:Xs,hillshade:Qs,fill:Bl,"fill-extrusion":iu,line:yu,symbol:op,background:sp,raster:up},hp=a.HTMLImageElement,dp=a.HTMLCanvasElement,fp=a.HTMLVideoElement,mp=a.ImageData,gp=a.ImageBitmap;function yp(t){ep.call(this,t,{}),this.implementation=t}function vp(t){ip.call(this,t,lp)}function _p(t){rp.call(this,t,ap)}function xp(t){np.call(this,t,$c)}function bp(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()})}function wp(t,e,i){this.target=t,this.parent=e,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},g(["receive","process"],this),this.invoker=new bp(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=C()?t:a}function Sp(t,e,i){var r=2*Math.PI*6378137/256/Math.pow(2,i);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}function Tp(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]))}tp.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;if(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 hp||t instanceof dp||t instanceof fp||t instanceof mp||gp&&t instanceof gp?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);else{var l=i||{x:0,y:0},u=l.x,c=l.y;t instanceof hp||t instanceof dp||t instanceof fp||t instanceof mp||gp&&t instanceof gp?s.texSubImage2D(s.TEXTURE_2D,0,u,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,u,c,r,n,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},tp.prototype.bind=function(t,e,i){var r=this.context.gl;
vendor: 14,246 bytes, line 2
2r.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)},tp.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},tp.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null},bp.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))},bp.prototype.remove=function(){delete this._channel,this._callback=function(){}},wp.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=M(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!i,targetMapId:r,mustQueue:n,sourceMapId:this.mapId,data:Hr(e,s)},s),{cancel:function(){i&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:r,sourceMapId:o.mapId})}}},wp.prototype.receive=function(t){var e=t.data,i=e.id;if(i&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[i];var r=this.cancelCallbacks[i];delete this.cancelCallbacks[i],r&&r()}else C()||e.mustQueue?(this.tasks[i]=e,this.taskQueue.push(i),this.invoker.trigger()):this.processTask(i,e)},wp.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},wp.prototype.processTask=function(t,e){var i=this;if("<response>"===e.type){var r=this.callbacks[t];delete this.callbacks[t],r&&(e.error?r(Wr(e.error)):r(null,Wr(e.data)))}else{var n=!1,o=M(this.globalScope)?void 0:[],a=e.hasCallback?function(e,r){n=!0,delete i.cancelCallbacks[t],i.target.postMessage({id:t,type:"<response>",sourceMapId:i.mapId,error:e?Hr(e):null,data:Hr(r,o)},o)}:function(t){n=!0},s=null,l=Wr(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!n&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},wp.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)},Tp.prototype.setNorthEast=function(t){return this._ne=t instanceof Cp?new Cp(t.lng,t.lat):Cp.convert(t),this},Tp.prototype.setSouthWest=function(t){return this._sw=t instanceof Cp?new Cp(t.lng,t.lat):Cp.convert(t),this},Tp.prototype.extend=function(t){var e,i,r=this._sw,n=this._ne;if(t instanceof Cp)i=e=t;else{if(!(t instanceof Tp))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Tp.convert(t)):this.extend(Cp.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 Cp(e.lng,e.lat),this._ne=new Cp(i.lng,i.lat)),this},Tp.prototype.getCenter=function(){return new Cp((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tp.prototype.getSouthWest=function(){return this._sw},Tp.prototype.getNorthEast=function(){return this._ne},Tp.prototype.getNorthWest=function(){return new Cp(this.getWest(),this.getNorth())},Tp.prototype.getSouthEast=function(){return new Cp(this.getEast(),this.getSouth())},Tp.prototype.getWest=function(){return this._sw.lng},Tp.prototype.getSouth=function(){return this._sw.lat},Tp.prototype.getEast=function(){return this._ne.lng},Tp.prototype.getNorth=function(){return this._ne.lat},Tp.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tp.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tp.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tp.prototype.contains=function(t){var e=Cp.convert(t),i=e.lng,r=e.lat,n=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&n},Tp.convert=function(t){return!t||t instanceof Tp?t:new Tp(t)};var Cp=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")};Cp.prototype.wrap=function(){return new Cp(c(this.lng,-180,180),this.lat)},Cp.prototype.toArray=function(){return[this.lng,this.lat]},Cp.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Cp.prototype.distanceTo=function(t){var e=Math.PI/180,i=this.lat*e,r=t.lat*e,n=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(n,1))},Cp.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new Tp(new Cp(this.lng-i,this.lat-e),new Cp(this.lng+i,this.lat+e))},Cp.convert=function(t){if(t instanceof Cp)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Cp(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Cp(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 Ip=2*Math.PI*6371008.8;function Ep(t){return Ip*Math.cos(t*Math.PI/180)}function Mp(t){return(180+t)/360}function Ap(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Lp(t,e){return t/Ep(e)}function kp(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}function Pp(t,e,i){void 0===i&&(i=0),this.x=+t,this.y=+e,this.z=+i}function Dp(t,e,i){this.z=t,this.x=e,this.y=i,this.key=Np(0,t,t,e,i)}function zp(t,e){this.wrap=t,this.canonical=e,this.key=Np(t,e.z,e.z,e.x,e.y)}function Op(t,e,i,r,n){this.overscaledZ=t,this.wrap=e,this.canonical=new Dp(i,+r,+n),this.key=Np(e,t,i,r,n)}function Np(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)}function Rp(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 w('"'+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)]}function Bp(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}}function jp(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}Pp.fromLngLat=function(t,e){void 0===e&&(e=0);var i=Cp.convert(t);return new Pp(Mp(i.lng),Ap(i.lat),Lp(e,i.lat))},Pp.prototype.toLngLat=function(){return new Cp(360*this.x-180,kp(this.y))},Pp.prototype.toAltitude=function(){return this.z*Ep(kp(this.y))},Pp.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ip*(t=kp(this.y),1/Math.cos(t*Math.PI/180));var t},Dp.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Dp.prototype.url=function(t,e){var i,r,n,o,a,s=(r=this.y,n=this.z,o=Sp(256*(i=this.x),256*(r=Math.pow(2,n)-r-1),n),a=Sp(256*(i+1),256*(r+1),n),o[0]+","+o[1]+","+a[0]+","+a[1]),l=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}",l).replace("{bbox-epsg-3857}",s)},Dp.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new n(8192*(t.x*e-this.x),8192*(t.y*e-this.y))},Dp.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},Op.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Op.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Op(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Op(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Op.prototype.calculateScaledKey=function(t,e){var i=this.canonical.z-t;return t>this.canonical.z?Np(this.wrap*e,t,this.canonical.z,this.canonical.x,this.canonical.y):Np(this.wrap*e,t,t,this.canonical.x>>i,this.canonical.y>>i)},Op.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},Op.prototype.children=function(t){if(this.overscaledZ>=t)return[new Op(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,r=2*this.canonical.y;return[new Op(e,this.wrap,e,i,r),new Op(e,this.wrap,e,1+i,r),new Op(e,this.wrap,e,i,1+r),new Op(e,this.wrap,e,1+i,1+r)]},Op.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))},Op.prototype.wrapped=function(){return new Op(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Op.prototype.unwrapTo=function(t){return new Op(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Op.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Op.prototype.toUnwrapped=function(){return new zp(this.wrap,this.canonical)},Op.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Op.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Pp(t.x-this.wrap,t.y))},Vr("CanonicalTileID",Dp),Vr("OverscaledTileID",Op,{omit:["posMatrix"]}),Rp.prototype.get=function(t,e){var i=new Uint8Array(this.data.buffer),r=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(i[r],i[1+r],i[2+r])},Rp.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Rp.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)},Rp.prototype._unpackMapbox=function(t,e,i){return(256*t*256+256*e+i)/10-1e4},Rp.prototype._unpackTerrarium=function(t,e,i){return 256*t+e+i/256-32768},Rp.prototype.getPixels=function(){return new Zs({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Rp.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",Rp),Bp.prototype.encode=function(t){return this._stringToNumber[t]},Bp.prototype.decode=function(t){return this._numberToString[t]};var Fp={geometry:{configurable:!0}};function Up(){this.state={},this.stateChanges={},this.deletedStates={}}function Vp(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Rr(8192,16,0),this.grid3D=new Rr(8192,16,0),this.featureIndexArray=new ma,this.promoteId=e}function qp(t,e,i,r,n){return v(t,(function(t,o){var a=e instanceof _n?e.get(o):null;return a&&a.evaluate?a.evaluate(i,r,n):a}))}function Gp(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 Zp(t,e){return e-t}function Hp(t,e){this.tileID=t,this.uid=d(),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"}function Wp(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},Yp.mark(this._marks.start)}Fp.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},Fp.geometry.set=function(t){this._geometry=t},jp.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(jp.prototype,Fp),Up.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]||{},p(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]}
2,Up.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}},Up.prototype.getState=function(t,e){var i=String(e),r=p({},(this.state[t]||{})[i],(this.stateChanges[t]||{})[i]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var n=this.deletedStates[t][e];if(null===n)return{};for(var o in n)delete r[o]}return r},Up.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Up.prototype.coalesceChanges=function(t,e){var i={};for(var r in this.stateChanges){this.state[r]=this.state[r]||{};var n={};for(var o in this.stateChanges[r])this.state[r][o]||(this.state[r][o]={}),p(this.state[r][o],this.stateChanges[r][o]),n[o]=this.state[r][o];i[r]=n}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var l in this.state[a])s[l]={},this.state[a][l]={};else for(var u in this.deletedStates[a]){if(null===this.deletedStates[a][u])this.state[a][u]={};else for(var c=0,h=Object.keys(this.deletedStates[a][u]);c<h.length;c+=1)delete this.state[a][u][h[c]];s[u]=this.state[a][u]}i[a]=i[a]||{},p(i[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(i).length)for(var d in t)t[d].setFeatureState(i,e)},Vp.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])}},Vp.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Kl.VectorTile(new Au(this.rawTileData)).layers,this.sourceLayerCoder=new Bp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Vp.prototype.query=function(t,e,i,r){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=cr(a.filter),u=t.queryGeometry,c=t.queryPadding*s,p=Gp(u),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),d=Gp(t.cameraQueryGeometry),f=0,m=this.grid3D.query(d.minX-c,d.minY-c,d.maxX+c,d.maxY+c,(function(e,i,r,o){return function(t,e,i,r,o){for(var a=0,s=t;a<s.length;a+=1){var l=s[a];if(e<=l.x&&i<=l.y&&r>=l.x&&o>=l.y)return!0}var u=[new n(e,i),new n(e,o),new n(r,o),new n(r,i)];if(2<t.length)for(var c=0,p=u;c<p.length;c+=1)if(_s(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(xs(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-c,i-c,r+c,o+c)}));f<m.length;f+=1)h.push(m[f]);h.sort(Zp);for(var g,y={},v=function(n){var c=h[n];if(c!==g){g=c;var p=o.featureIndexArray.get(c),d=null;o.loadMatchingFeature(y,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,l,a.layers,a.availableImages,e,i,r,(function(e,i,r){return d=d||us(e),i.queryIntersectsFeature(u,e,r,d,o.z,t.transform,s,t.pixelPosMatrix)}))}},_=0;_<h.length;_++)v(_);return y},Vp.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 h=this.sourceLayerCoder.decode(i),d=this.vtLayers[h].feature(r);if(n.filter(new un(this.tileID.overscaledZ),d))for(var f=this.getId(d,h),m=0;m<p.length;m++){var g=p[m];if(!(o&&o.indexOf(g)<0)){var y=s[g];if(y){var v={};void 0!==f&&u&&(v=u.getState(y.sourceLayer||"_geojsonTileLayer",f));var _=l[g];_.paint=qp(_.paint,y.paint,d,v,a),_.layout=qp(_.layout,y.layout,d,v,a);var x=!c||c(d,y,v);if(x){var b=new jp(d,this.z,this.x,this.y,f);b.layer=_;var w=t[g];void 0===w&&(w=t[g]=[]),w.push({featureIndex:r,feature:b,intersectionZ:x})}}}}}}
vendor: 11,609 bytes, line 2
2,Vp.prototype.lookupSymbolFeatures=function(t,e,i,r,n,o,a,s){var l={};this.loadVTLayers();for(var u=cr(n),c=0,p=t;c<p.length;c+=1)this.loadMatchingFeature(l,i,r,p[c],u,o,a,s,e);return l},Vp.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},Vp.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",Vp,{omit:["rawTileData","sourceLayerCoder"]}),Hp.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<R.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Hp.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Hp.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,e){var i={};if(!e)return i;for(var r=function(){var t=o[n],r=t.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==r.length){t.layers=r,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map((function(t){return r.filter((function(e){return e.id===t}))[0]})));for(var a=0,s=r;a<s.length;a+=1)i[s[a].id]=t}},n=0,o=t;n<o.length;n+=1)r();return i}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[r];if(n instanceof Xc){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 Xc&&a.hasRTLText){this.hasRTLText=!0,pn.isLoading()||pn.isLoaded()||"deferred"!==sn()||ln();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},Hp.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"},Hp.prototype.getBucket=function(t){return this.buckets[t.id]},Hp.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 tp(t,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new tp(t,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)},Hp.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},Hp.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):{}},Hp.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=cr(e&&e.filter),s=this.tileID.canonical,l=s.z,u=s.x,c=s.y,p={z:l,x:u,y:c},h=0;h<o.length;h++){var d=o.feature(h);if(a.filter(new un(this.tileID.overscaledZ),d)){var f=new jp(d,l,u,c,i.getId(d,n));f.tile=p,t.push(f)}}}},Hp.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Hp.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Hp.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var i=I(t.cacheControl);i["max-age"]&&(this.expirationTime=Date.now()+1e3*i["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var r=Date.now(),n=!1;if(this.expirationTime>r)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=r+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Hp.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)},Hp.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var i=this.latestFeatureIndex.loadVTLayers();for(var r in this.buckets)if(e.style.hasLayer(r)){var n=this.buckets[r],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=i[o],s=t[o];if(a&&s&&0!==Object.keys(s).length){n.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=e&&e.style&&e.style.getLayer(r);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(n)))}}}},Hp.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},Hp.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<R.now()},Hp.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Hp.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=R.now()+t},Hp.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},Hp.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 Yp=a.performance;Wp.prototype.finish=function(){Yp.mark(this._marks.end);var t=Yp.getEntriesByName(this._marks.measure);return 0===t.length&&(Yp.measure(this._marks.measure,this._marks.start,this._marks.end),t=Yp.getEntriesByName(this._marks.measure),Yp.clearMarks(this._marks.start),Yp.clearMarks(this._marks.end),Yp.clearMeasures(this._marks.measure)),t},t.Actor=wp,t.AlphaImage=Gs,t.CanonicalTileID=Dp,t.CollisionBoxArray=Jo,t.Color=le,t.DEMData=Rp,t.DataConstantProperty=xn,t.DictionaryCoder=Bp,t.EXTENT=8192,t.ErrorEvent=Dt,t.EvaluationParameters=un,t.Event=Lt,t.Evented=kt,t.FeatureIndex=Vp,t.FillBucket=zl,t.FillExtrusionBucket=$l,t.ImageAtlas=$u,t.ImagePosition=Ju,t.LineBucket=au,t.LngLat=Cp,t.LngLatBounds=Tp,t.MercatorCoordinate=Pp,t.ONE_EM=24,t.OverscaledTileID=Op,t.Point=n,t.Point$1=n,t.Properties=En,t.Protobuf=Au,t.RGBAImage=Zs,t.RequestManager=q,t.RequestPerformance=Wp,t.ResourceType=yt,t.SegmentVector=ya,t.SourceFeatureState=Up,t.StructArrayLayout1ui2=Uo,t.StructArrayLayout2f1f2i16=fo,t.StructArrayLayout2i4=Rn,t.StructArrayLayout3ui6=xo,t.StructArrayLayout4i8=Fn,t.SymbolBucket=Xc,t.Texture=tp,t.Tile=Hp,t.Transitionable=fn,t.Uniform1f=Ba,t.Uniform1i=Ra,t.Uniform2f=ja,t.Uniform3f=Fa,t.Uniform4f=Ua,t.UniformColor=Va,t.UniformMatrix4f=Ga,t.UnwrappedTileID=zp,t.ValidationError=Nt,t.WritingMode=ec,t.ZoomHistory=Yr,t.add=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.addDynamicAttributes=Hc,t.asyncAll=function(t,e,i){if(!t.length)return i(null,[]);var r=t.length,n=new Array(t.length),o=null;t.forEach((function(t,a){e(t,(function(t,e){t&&(o=t),n[a]=e,0==--r&&i(o,n)}))}))},t.bezier=s,t.bindAll=g,t.browser=R,t.cacheEntryPossiblyAdded=function(t){++mt>ut&&(t.getActor().send("enforceCacheSizeLimit",lt),mt=0)},t.clamp=u,t.clearTileCache=function(t){var e=a.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=Cc,t.clone=function(t){var e=new Is(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 Is(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Tu,t.config=B,t.create=function(){var t=new Is(16);return Is!=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 Is(9);return Is!=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 Is(4);return Is!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Ji,t.createLayout=zn,t.createStyleLayer=function(t){return"custom"===t.type?new cp(t):new pp[t.type](t)},t.cross=function(t,e,i){var r=e[0],n=e[1],o=e[2],a=i[0],s=i[1],l=i[2];return t[0]=n*l-o*s,t[1]=o*a-r*l,t[2]=r*s-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=l,t.emitValidationErrors=Nr,t.endsWith=y,t.enforceCacheSizeLimit=function(t){ht(),$&&$.then((function(e){e.keys().then((function(i){for(var r=0;r<i.length-t;r++)e.delete(i[r])}))}))},t.evaluateSizeForFeature=yc,t.evaluateSizeForZoom=vc,t.evaluateVariableOffset=Bc,t.evented=cn,t.extend=p,t.featureFilter=cr,t.filterObject=_,t.fromRotation=function(t,e){var i=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=i,t[2]=0,t[3]=-i,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=cc,t.getAnchorJustification=jc,t.getArrayBuffer=St,t.getImage=Et,t.getJSON=function(t,e){return wt(p(t,{type:"json"}),e)},t.getRTLTextPluginStatus=sn,t.getReferrer=xt,t.getVideo=function(t,e){var i,r,n=a.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var s=a.document.createElement("source");i=t[o],r=void 0,(r=a.document.createElement("a")).href=i,r.protocol===a.document.location.protocol&&r.host===a.document.location.host||(n.crossOrigin="Anonymous"),s.src=t[o],n.appendChild(s)}return{cancel:function(){}}},t.identity=Es,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],d=e[11],f=e[12],m=e[13],g=e[14],y=e[15],v=i*s-r*a,_=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*f,C=c*g-h*f,I=c*y-d*f,E=p*g-h*m,M=p*y-d*m,A=h*y-d*g,L=v*A-_*M+x*E+b*I-w*C+S*T;return L?(t[0]=(s*A-l*M+u*E)*(L=1/L),t[1]=(n*M-r*A-o*E)*L,t[2]=(m*S-g*w+y*b)*L,t[3]=(h*w-p*S-d*b)*L,t[4]=(l*I-a*A-u*C)*L,t[5]=(i*A-n*I+o*C)*L,t[6]=(g*x-f*S-y*_)*L,t[7]=(c*S-h*x+d*_)*L,t[8]=(a*M-s*I+u*T)*L,t[9]=(r*I-i*M-o*T)*L,t[10]=(f*w-m*x+y*v)*L,t[11]=(p*x-c*w-d*v)*L,t[12]=(s*C-a*E-l*T)*L,t[13]=(i*E-r*C+n*T)*L,t[14]=(m*_-f*b-g*v)*L,t[15]=(c*b-p*_+h*v)*L,t):null},t.isChar=Kr,t.isMapboxURL=Z,t.keysDifference=function(t,e){var i=[];for(var r in t)r in e||i.push(r);return i},t.makeRequest=wt,t.mapObject=v,t.mercatorXfromLng=Mp,t.mercatorYfromLat=Ap,t.mercatorZfromAltitude=Lp,t.mul=ks,t.multiply=Ms,t.mvt=Kl,t.normalize=function(t,e){var i=e[0],r=e[1],n=e[2],o=i*i+r*r+n*n;return 0<o&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=Xe,t.offscreenCanvasSupported=gt,t.ortho=function(t,e,
2i,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 Au(t).readFields(Wu,[])},t.pbf=Au,t.performSymbolLayout=function(t,e,i,r,n,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new un(c.minZoom),a),l["text-size"].possiblyEvaluate(new un(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,d=h.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new un(h.minZoom),a),l["icon-size"].possiblyEvaluate(new un(d),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new un(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new un(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new un(18));for(var f=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),g=s.get("text-keep-upright"),y=s.get("text-size"),v=function(){var o=x[_],l=s.get("text-font").evaluate(o,{},a).join(","),c=y.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),h=u.layoutIconSize.evaluate(o,{},a),d={horizontal:{},vertical:void 0},v=o.text,b=[0,0];if(v){var S=v.toString(),T=24*s.get("text-letter-spacing").evaluate(o,{},a),C=function(){for(var t=0,e=S;t<e.length;t+=1)if(i=e[t].charCodeAt(0),Kr.Arabic(i)||Kr["Arabic Supplement"](i)||Kr["Arabic Extended-A"](i)||Kr["Arabic Presentation Forms-A"](i)||Kr["Arabic Presentation Forms-B"](i))return;var i;return 1}()?T:0,I=s.get("text-anchor").evaluate(o,{},a),E=s.get("text-variable-anchor");if(!E){var M=s.get("text-radial-offset").evaluate(o,{},a);b=M?Bc(I,[24*M,Rc]):s.get("text-offset").evaluate(o,{},a).map((function(t){return 24*t}))}var A=m?"center":s.get("text-justify").evaluate(o,{},a),L=s.get("symbol-placement"),k="point"===L?24*s.get("text-max-width").evaluate(o,{},a):0,P=function(){t.allowVerticalPlacement&&Xr(S)&&(d.vertical=rc(v,e,i,n,l,k,f,I,"left",C,b,ec.vertical,!0,L,p,c))};if(!m&&E){for(var D="auto"===A?E.map((function(t){return jc(t)})):[A],z=!1,O=0;O<D.length;O++){var N=D[O];if(!d.horizontal[N])if(z)d.horizontal[N]=d.horizontal[0];else{var R=rc(v,e,i,n,l,k,f,"center",N,C,b,ec.horizontal,!1,L,p,c);R&&(z=1===(d.horizontal[N]=R).positionedLines.length)}}P()}else{"auto"===A&&(A=jc(I));var B=rc(v,e,i,n,l,k,f,I,A,C,b,ec.horizontal,!1,L,p,c);B&&(d.horizontal[A]=B),P(),Xr(S)&&m&&g&&(d.vertical=rc(v,e,i,n,l,k,f,I,A,C,b,ec.vertical,!1,L,p,c))}}var j,F,U,V,q,G=void 0,Z=!1;if(o.icon&&o.icon.name){var H=r[o.icon.name];H&&(j=n[o.icon.name],F=s.get("icon-offset").evaluate(o,{},a),U=cc(s.get("icon-anchor").evaluate(o,{},a)),V=F[0]-j.displaySize[0]*U.horizontalAlign,G={image:j,top:q=F[1]-j.displaySize[1]*U.verticalAlign,bottom:q+j.displaySize[1],left:V,right:V+j.displaySize[0]},Z=H.sdf,void 0===t.sdfIcons?t.sdfIcons=H.sdf:t.sdfIcons!==H.sdf&&w("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),H.pixelRatio===t.pixelRatio&&0===s.get("icon-rotate").constantOr(1)||(t.iconsNeedLinear=!0))}var W=Uc(d.horizontal)||d.vertical;t.iconsInText=!!W&&W.iconsInText,(W||G)&&function(t,e,i,r,n,o,a,s,l,u,c){var p=o.textMaxSize.evaluate(e,{});void 0===p&&(p=a);var h,d,f,m,g,y,v,_,x,b,S,T,C,I,E=t.layers[0].layout,M=E.get("icon-offset").evaluate(e,{},c),A=Uc(i.horizontal),L=a/24,k=t.tilePixelRatio*L,P=t.tilePixelRatio*p/24,D=t.tilePixelRatio*s,z=t.tilePixelRatio*E.get("symbol-spacing"),O=E.get("text-padding")*t.tilePixelRatio,N=E.get("icon-padding")*t.tilePixelRatio,R=E.get("text-max-angle")/180*Math.PI,B="map"===E.get("text-rotation-alignment")&&"point"!==E.get("symbol-placement"),j="map"===E.get("icon-rotation-alignment")&&"point"!==E.get("symbol-placement"),F=E.get("symbol-placement"),U=z/2,V=E.get("icon-text-fit");function q(s,p){p.x<0||8192<=p.x||p.y<0||8192<=p.y||function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,S,T,C){var I,E,M,A,L,k=t.addToLineVertexArray(e,i),P=0,D=0,z=0,O=0,N=-1,R=-1,B={},j=Sa(""),F=0,U=0;if(U=void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(F=(I=s.layout.get("text-offset").evaluate(x,{},T).map((function(t){return 24*t})))[0],I[1]):(F=24*s.layout.get("text-radial-offset").evaluate(x,{},T),Rc),t.allowVerticalPlacement&&r.vertical){var V=s.layout.get("text-rotate").evaluate(x,{},T)+90;A=new kc(l,e,u,c,p,r.vertical,h,d,f,V),a&&(L=new kc(l,e,u,c,p,a,g,y,f,V))}if(n){var q=s.layout.get("icon-rotate").evaluate(x,{}),G="none"!==s.layout.get("icon-text-fit"),Z=Ic(n,q,S,G),H=a?Ic(a,q,S,G):void 0;M=new kc(l,e,u,c,p,n,g,y,!1,q),P=4*Z.length;var W=t.iconSizeData,Y=null;"source"===W.kind?32640<(Y=[128*s.layout.get("icon-size").evaluate(x,{})])[0]&&w(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===W.kind&&(32640<(Y=[128*b.compositeIconSizes[0].evaluate(x,{},T),128*b.compositeIconSizes[1].evaluate(x,{},T)])[0]||32640<Y[1])&&w(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,Z,Y,_,v,x,!1,e,k.lineStartIndex,k.lineLength,-1,T),N=t.icon.placedSymbolArray.length-1,H&&(D=4*H.length,t.addSymbols(t.icon,H,Y,_,v,x,ec.vertical,e,k.lineStartIndex,k.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1)}for(var K in r.horizontal){var X=r.horizontal[K];E||(j=Sa(X.text),E=new kc(l,e,u,c,p,X,h,d,f,s.layout.get("text-rotate").evaluate(x,{},T)));var J=1===X.positionedLines.length;if(z+=Fc(t,e,X,o,s,f,x,m,k,r.vertical?ec.horizontal:ec.horizontalOnly,J?Ob
2ject.keys(r.horizontal):[K],B,N,b,T),J)break}function Q(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e}r.vertical&&(O+=Fc(t,e,r.vertical,o,s,f,x,m,k,ec.vertical,["vertical"],B,R,b,T));var $=E?E.boxStartIndex:t.collisionBoxArray.length,tt=E?E.boxEndIndex:t.collisionBoxArray.length,et=A?A.boxStartIndex:t.collisionBoxArray.length,it=A?A.boxEndIndex:t.collisionBoxArray.length,rt=M?M.boxStartIndex:t.collisionBoxArray.length,nt=M?M.boxEndIndex:t.collisionBoxArray.length,ot=L?L.boxStartIndex:t.collisionBoxArray.length,at=L?L.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=-1<(st=Q(L,st=Q(M,st=Q(A,st=Q(E,st)))))?1:0;lt&&(st*=C/24),t.glyphOffsetArray.length>=Xc.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,0<=B.right?B.right:-1,0<=B.center?B.center:-1,0<=B.left?B.left:-1,B.vertical||-1,N,R,j,$,tt,et,it,rt,nt,ot,at,u,z,O,P,D,lt,0,h,F,U,st)}(t,p,s,i,r,n,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,k,O,B,l,D,N,j,M,e,o,u,c,a)}if(r&&"none"!==V&&(t.allowVerticalPlacement&&i.vertical&&(h=hc(r,i.vertical,V,E.get("icon-text-fit-padding"),M,L)),A&&(r=hc(r,A,V,E.get("icon-text-fit-padding"),M,L))),"line"===F)for(var G=0,Z=Cc(e.geometry,0,0,8192,8192);G<Z.length;G+=1)for(var H=Z[G],W=0,Y=(d=H,f=z,m=R,g=i.vertical||A,y=r,v=24,_=P,x=t.overscaling,b=8192,S=wc(g,v,_),f-(C=(T=Sc(g,y))*_)<f/4&&(f=C+f/4),function t(e,i,r,n,o,a,s,l,u){for(var c=a/2,p=bc(e),h=0,d=i-r,f=[],m=0;m<e.length-1;m++){for(var g=e[m],y=e[m+1],v=g.dist(y),_=y.angleTo(g);d+r<h+v;){var x=((d+=r)-h)/v,b=Xe(g.x,y.x,x),w=Xe(g.y,y.y,x);if(0<=b&&b<u&&0<=w&&w<u&&0<=d-c&&d+c<=p){var S=new fc(b,w,_,m);S._round(),n&&!xc(e,S,a,n,o)||f.push(S)}}h+=v}return l||f.length||s||(f=t(e,h/2,r,n,o,a,s,!0,u)),f}(d,(I=0===d[0].x||d[0].x===b||0===d[0].y||d[0].y===b)?f/2*x%f:(T/2+2*v)*_*x%f,f,S,m,C,I,!1,b));W<Y.length;W+=1){var K=Y[W];A&&Vc(t,A.text,U,K)||q(H,K)}else if("line-center"===F)for(var X=0,J=e.geometry;X<J.length;X+=1){var Q=J[X];if(1<Q.length){var $=Tc(Q,R,i.vertical||A,r,24,P);$&&q(Q,$)}}else if("Polygon"===e.type)for(var tt=0,et=Ll(e.geometry,0);tt<et.length;tt+=1){var it=et[tt],rt=zc(it,16);q(it[0],new fc(rt.x,rt.y,0))}else if("LineString"===e.type)for(var nt=0,ot=e.geometry;nt<ot.length;nt+=1){var at=ot[nt];q(at,new fc(at[0].x,at[0].y,0))}else if("Point"===e.type)for(var st=0,lt=e.geometry;st<lt.length;st+=1)for(var ut=0,ct=lt[st];ut<ct.length;ut+=1){var pt=ct[ut];q([pt],new fc(pt.x,pt.y,0))}}(t,o,d,G,r,u,p,h,b,Z,a)},_=0,x=t.features;_<x.length;_+=1)v();o&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,i,r,n){var o,a=1/Math.tan(e/2);return t[0]=a/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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)*(o=1/(r-n)),t[14]=2*n*r*o):(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=pn,t.polygonIntersectsPolygon=hs,t.postMapLoadEvent=st,t.postTurnstileEvent=ot,t.potpack=Xu,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Vr,t.registerForPluginStateChange=function(t){return t({pluginStatus:nn,pluginURL:on}),cn.on("pluginStateChange",t),t},t.rotate=function(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=r*l+o*s,t[1]=n*l+a*s,t[2]=r*-s+o*l,t[3]=n*-s+a*l,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],h=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+h*r,t[8]=u*n-o*r,t[9]=c*n-a*r,t[10]=p*n-s*r,t[11]=h*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],h=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+h*r,t[4]=u*n-o*r,t[5]=c*n-a*r,t[6]=p*n-s*r,t[7]=h*n-l*r,t}
vendor: 13,939 bytes, line 2
2,t.scale=function(t,e,i){var r=i[0],n=i[1],o=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]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,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){lt=t,ut=e},t.setRTLTextPlugin=function(t,e,i){if(void 0===i&&(i=!1),"deferred"===nn||"loading"===nn||"loaded"===nn)throw new Error("setRTLTextPlugin cannot be called multiple times.");on=R.resolveURL(t),nn="deferred",rn=e,an(),i||ln()},t.sphericalToCartesian=function(t){var e=t[0],i=t[1],r=t[2];return i+=90,i*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(i)*Math.sin(r),y:e*Math.sin(i)*Math.sin(r),z:e*Math.cos(r)}},t.sqrLen=function(t){var e=t[0],i=t[1];return e*e+i*i},t.styleSpec=Ot,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=_c,t.transformMat3=function(t,e,i){var r=e[0],n=e[1],o=e[2];return t[0]=r*i[0]+n*i[3]+o*i[6],t[1]=r*i[1]+n*i[4]+o*i[7],t[2]=r*i[2]+n*i[5]+o*i[8],t},t.transformMat4=Ps,t.translate=function(t,e,i){var r,n,o,a,s,l,u,c,p,h,d,f,m=i[0],g=i[1],y=i[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(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],d=e[10],f=e[11],t[0]=r=e[0],t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=d,t[11]=f,t[12]=r*m+s*g+p*y+e[12],t[13]=n*m+l*g+h*y+e[13],t[14]=o*m+u*g+d*y+e[14],t[15]=a*m+c*g+f*y+e[15]),t},t.triggerPluginCompletionEvent=en,t.uniqueId=d,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=Dr,t.validateStyle=Pr,t.values=function(t){var e=[];for(var i in t)e.push(t[i]);return e},t.vectorTile=Kl,t.version="1.11.1",t.warnOnce=w,t.webpSupported=j,t.window=a,t.wrap=c})),i(0,(function(t){function e(t){var i=typeof t;if("number"==i||"boolean"==i||"string"==i||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",n=0,o=t;n<o.length;n+=1)r+=e(o[n])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+e(t[a[l]])+",";return s+"}"}function i(i){for(var r="",n=0,o=t.refProperties;n<o.length;n+=1)r+="/"+e(i[o[n]]);return r}function r(t){this.keyCache={},t&&this.replace(t)}function n(e){var i={},r=[];for(var n in e){var o=e[n],a=i[n]={};for(var s in o){var l=o[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};r.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(r),p=new t.AlphaImage({width:c.w||1,height:c.h||1});for(var h in e){var d=e[h];for(var f in d){var m=d[+f];if(m&&0!==m.bitmap.width&&0!==m.bitmap.height){var g=i[h][f].rect;t.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:g.x+1,y:g.y+1},m.bitmap)}}}this.image=p,this.positions=i}function o(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId}function a(e,i,r){for(var n=new t.EvaluationParameters(i),o=0,a=e;o<a.length;o+=1)a[o].recalculate(n,r)}function s(e,i){var r=t.getArrayBuffer(e.request,(function(e,r,n,o){e?i(e):r&&i(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(r)),rawData:r,cacheControl:n,expires:o})}));return function(){r.cancel(),i()}}function l(t,e,i,r){this.actor=t,this.layerIndex=e,this.availableImages=i,this.loadVectorData=r||s,this.loading={},this.loaded={}}function u(){this.loaded={}}r.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},r.prototype.update=function(e,r){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var u=0,c=r;u<c.length;u+=1){var p=c[u];delete this.keyCache[p],delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,d=function(t,e){for(var r={},n=0;n<t.length;n++){var o=e&&e[t[n].id]||i(t[n]);e&&(e[t[n].id]=o);var a=r[o];(a=a||(r[o]=[])).push(t[n])}var s=[];for(var l in r)s.push(r[l]);return s}(t.values(this._layerConfigs),this.keyCache);h<d.length;h+=1){var f=d[h].map((function(t){return n._layers[t.id]})),m=f[0];if("none"!==m.visibility){var g=m.source||"",y=this.familiesBySource[g];y=y||(this.familiesBySource[g]={});var v=m.sourceLayer||"_geojsonTileLayer",_=y[v];(_=_||(y[v]=[])).push(f)}}},t.register("GlyphAtlas",n),o.prototype.parse=function(e,i,r,o,s){var l=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var p,h,d,f,m={},g={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},y=i.familiesBySource[this.source];for(var v in y){var _=e.layers[v];if(_){1===_.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+v+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var x=u.encode(v),b=[],w=0;w<_.length;w++){var S=_.feature(w),T=c.getId(S,v);b.push({feature:S,id:T,index:w,sourceLayerIndex:x})}for(var C=0,I=y[v];C<I.length;C+=1){var E=I[C],M=E[0];M.minzoom&&this.zoom<Math.floor(M.minzoom)||M.maxzoom&&this.zoom>=M.maxzoom||"none"!==M.visibility&&(a(E,this.zoom,r),(m[M.id]=M.createBucket({index:c.bucketLayerIDs.length,layers:E,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g,this.tileID.canonical),c.bucketLayerIDs.push(E.map((function(t){return t.id}))))}}}var A=t.mapObject(g.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(A).length?o.send("getGlyphs",{uid:this.uid,stacks:A},(function(t,e){p||(p=t,h=e,P.call(l))})):h={};var L=Object.keys(g.iconDependencies);L.length?o.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){p||(p=t,d=e,P.call(l))})):d={};var k=Object.keys(g.patternDependencies);function P(){if(p)return s(p);if(h&&d&&f){var e=new n(h),i=new t.ImageAtlas(d,f);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,r),t.performSymbolLayout(l,h,e.positions,d,i.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,r),l.addFeatures(g,this.tileID.canonical,i.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:i,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?d:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?o.send("getImages",{icons:k,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){p||(p=t,f=e,P.call(l))})):f={},P.call(this)},l.prototype.loadTile=function(e,i){var r=this,n=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[n]=new o(e);s.abort=this.loadVectorData(e,(function(e,o){if(delete r.loading[n],e||!o)return s.status="done",r.loaded[n]=s,i(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(e,r){if(e||!r)return i(e);i(null,t.extend({rawTileData:l.slice(0)},r,u,c))})),r.loaded=r.loaded||{},r.loaded[n]=s}))},l.prototype.reloadTile=function(t,e){var i=this,r=this.loaded,n=t.uid,o=this;if(r&&r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,r){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,i.availableImages,o.actor,n)),e(t,r)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var i=this.loading,r=t.uid;i&&i[r]&&i[r].abort&&(i[r].abort(),delete i[r]),e()},l.prototype.removeTile=function(t,e){var i=this.loaded,r=t.uid;i&&i[r]&&delete i[r],e()};var c=t.window.ImageBitmap;function p(t,e){if(0!==t.length){h(t[0],e);for(var i=1;i<t.length;i++)h(t[i],!e)}}function h(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()}function d(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}u.prototype.loadTile=function(e,i){var r=e.uid,n=e.encoding,o=e.rawImageData,a=c&&o instanceof c?this.getImageData(o):o,s=new t.DEMData(r,a,n);this.loaded=this.loaded||{},i(null,this.loaded[r]=s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var i=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:i.width,height:i.height},i.data)},u.prototype.removeTile=function(t){var e=this.loaded,i=t.uid;e&&e[i]&&delete e[i]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON;d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],i=0,r=this._feature.geometry;i<r.length;i+=1){var n=r[i];e.push([new t.Point$1(n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,c=s[a];u<c.length;u+=1){var p=c[u];l.push(new t.Point$1(p[0],p[1]))}o.push(l)}return o},d.prototype.toGeoJSON=function(t,e,i){return f.call(this,t,e,i)};var m=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};m.prototype.feature=function(t){return new d(this._features[t])};var g=t.vectorTile.VectorTileFeature,y=v;function v(t,e){this.options=e||{},this.features=t,this.length=t.length}function _(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}v.prototype.feature=function(t){return new _(this.features[t],this.options.extent)},_.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var i=0;i<e.length;i++){for(var r=e[i],n=[],o=0;o<r.length;o++)n.push(new t.Point$1(r[o][0],r[o][1]));this.geometry.push(n)}return this.geometry},_.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]},_.prototype.toGeoJSON=g.prototype.toGeoJSON;var x=w,b=y;function w(e){var i=new t.pbf;return function(t,e){for(var i in t.layers)e.writeMessage(3,S,t.layers[i])}(e,i),i.finish()}function S(t,e){var i;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(i=0;i<t.length;i++)r.feature=t.feature(i),e.writeMessage(2,T,r);var n=r.keys;for(i=0;i<n.length;i++)e.writeStringField(3,n[i]);var o=r.values;for(i=0;i<o.length;i++)e.writeMessage(4,A,o[i])}function T(t,e){var i=t.feature;void 0!==i.id&&e.writeVarintField(1,i.id),e.writeMessage(2,C,t),e.writeVarintField(3,i.type),e.writeMessage(4,M,i)}function C(t,e){var i=t.feature,r=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in i.properties){var l=o[s];void 0===l&&(r.push(s),o[s]=l=r.length-1),e.writeVarint(l);var u=i.properties[s],c=typeof u;"string"!=c&&"boolean"!=c&&"number"!=c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(n.push(u),a[p]=h=n.length-1),e.writeVarint(h)}}function I(t,e){return(e<<3)+(7&t)}function E(t){return t<<1^t>>31}function M(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(I(1,u));for(var c=3===r?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==r&&e.writeVarint(I(2,c-1));var h=l[p].x-n,d=l[p].y-o;e.writeVarint(E(h)),e.writeVarint(E(d)),n+=h,o+=d}3===r&&e.writeVarint(15)}}function A(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 L(t,e,i,r){k(t,i,r),k(e,2*i,2*r),k(e,2*i+1,2*r+1)}function k(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function P(t,e,i,r){var n=t-i,o=e-r;return n*n+o*o}function D(t){return t[0]}function z(t){return t[1]}function O(t,e,i,r,n){void 0===e&&(e=D),void 0===i&&(i=z),void 0===r&&(r=64),void 0===n&&(n=Float64Array),this.nodeSize=r;
2for(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){if(!(o-n<=r)){var s=n+o>>1;!function t(e,i,r,n,o,a){for(;n<o;){if(600<o-n){var s=o-n+1,l=r-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,i,r,Math.max(n,Math.floor(r-l*c/s+p)),Math.min(o,Math.floor(r+(s-l)*c/s+p)),a)}var h=i[2*r+a],d=n,f=o;for(L(e,i,n,r),i[2*o+a]>h&&L(e,i,n,o);d<f;){for(L(e,i,d,f),d++,f--;i[2*d+a]<h;)d++;for(;i[2*f+a]>h;)f--}i[2*n+a]===h?L(e,i,n,f):L(e,i,++f,o),f<=r&&(n=f+1),r<=f&&(o=f-1)}}(e,i,s,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)}function N(t){this.options=V(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)}x.fromVectorTileJs=w,x.fromGeojsonVt=function(t,e){e=e||{};var i={};for(var r in t)i[r]=new y(t[r].features,e),i[r].name=r,i[r].version=e.version,i[r].extent=e.extent;return w({layers:i})},x.GeoJSONWrapper=b,O.prototype.range=function(t,e,i,r){return function(t,e,i,r,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),d=u.pop();if(h-d<=a)for(var f=d;f<=h;f++)l=e[2*f+1],(s=e[2*f])>=i&&s<=n&&r<=l&&l<=o&&c.push(t[f]);else{var m=Math.floor((d+h)/2);l=e[2*m+1],(s=e[2*m])>=i&&s<=n&&r<=l&&l<=o&&c.push(t[m]);var g=(p+1)%2;(0===p?i<=s:r<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===p?s<=n:l<=o)&&(u.push(m+1),u.push(h),u.push(g))}}return c}(this.ids,this.coords,t,e,i,r,this.nodeSize)};var R={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!(O.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++)P(e[2*h],e[2*h+1],i,r)<=l&&s.push(t[h]);else{var d=Math.floor((p+c)/2),f=e[2*d],m=e[2*d+1];P(f,m,i,r)<=l&&s.push(t[d]);var g=(u+1)%2;(0===u?i-n<=f:r-n<=m)&&(a.push(p),a.push(d-1),a.push(g)),(0===u?f<=i+n:m<=r+n)&&(a.push(d+1),a.push(c),a.push(g))}}return s}(this.ids,this.coords,t,e,i,this.nodeSize)}),generateId:!1,reduce:null,map:function(t){return t}};function B(t){return{type:"Feature",id:t.id,properties:j(t),geometry:{type:"Point",coordinates:[360*(t.x-.5),(e=(180-360*t.y)*Math.PI/180,360*Math.atan(Math.exp(e))/Math.PI-90)]}};var e}function j(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 F(t){return t/360+.5}function U(t){var e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:1<i?1:i}function V(t,e){for(var i in e)t[i]=e[i];return t}function q(t){return t.x}function G(t){return t.y}function Z(t,e,i,r,n,o){var a=n-i,s=o-r;if(0!==a||0!==s){var l=((t-i)*a+(e-r)*s)/(a*a+s*s);1<l?(i=n,r=o):0<l&&(i+=a*l,r+=s*l)}return(a=t-i)*a+(s=e-r)*s}function H(t,e,i,r){var n={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)W(t,e);else if("Polygon"===i||"MultiLineString"===i)for(var r=0;r<e.length;r++)W(t,e[r]);else if("MultiPolygon"===i)for(r=0;r<e.length;r++)for(var n=0;n<e[r].length;n++)W(t,e[r][n])}(n),n}function W(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 Y(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)K(n,s);else if("MultiPoint"===o)for(var u=0;u<n.length;u++)K(n[u],s);else if("LineString"===o)X(n,s,a,!1);else if("MultiLineString"===o){if(i.lineMetrics){for(u=0;u<n.length;u++)X(n[u],s=[],a,!1),t.push(H(l,"LineString",s,e.properties));return}J(n,s,a,!1)}else if("Polygon"===o)J(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;
2u<e.geometry.geometries.length;u++)Y(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},i,r);return}for(u=0;u<n.length;u++){var c=[];J(n[u],c,a,!0),s.push(c)}}t.push(H(l,o,s,e.properties))}}function K(t,e){e.push(Q(t[0])),e.push($(t[1])),e.push(0)}function X(t,e,i,r){for(var n,o,a=0,s=0;s<t.length;s++){var l=Q(t[s][0]),u=$(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=n,s=r-i>>1,l=r-i,u=e[i],c=e[i+1],p=e[r],h=e[r+1],d=i+3;d<r;d+=3){var f=Z(e[d],e[d+1],u,c,p,h);if(a<f)o=d,a=f;else if(f===a){var m=Math.abs(d-s);m<l&&(o=d,l=m)}}n<a&&(3<o-i&&t(e,i,o,n),e[o+2]=a,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 J(t,e,i,r){for(var n=0;n<t.length;n++){var o=[];X(t[n],o,i,r),e.push(o)}}function Q(t){return t/360+.5}function $(t){var e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:1<i?1:i}function tt(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,d=0===n?c.minX:c.minY,f=0===n?c.maxX:c.maxY;if(i<=d&&f<r)l.push(c);else if(!(f<i||r<=d)){var m=[];if("Point"===h||"MultiPoint"===h)et(p,m,i,r,n);else if("LineString"===h)it(p,m,i,r,n,!1,s.lineMetrics);else if("MultiLineString"===h)nt(p,m,i,r,n,!1);else if("Polygon"===h)nt(p,m,i,r,n,!0);else if("MultiPolygon"===h)for(var g=0;g<p.length;g++){var y=[];nt(p[g],y,i,r,n,!0),y.length&&m.push(y)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(g=0;g<m.length;g++)l.push(H(c.id,h,m[g],c.tags));continue}"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(H(c.id,h,m,c.tags))}}}return l.length?l:null}function et(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]))}}function it(t,e,i,r,n,o,a){for(var s,l,u=rt(t),c=0===n?at:st,p=t.start,h=0;h<t.length-3;h+=3){var d=t[h],f=t[h+1],m=t[h+2],g=t[h+3],y=t[h+4],v=0===n?d:f,_=0===n?g:y,x=!1;a&&(s=Math.sqrt(Math.pow(d-g,2)+Math.pow(f-y,2))),v<i?i<_&&(l=c(u,d,f,g,y,i),a&&(u.start=p+s*l)):r<v?_<r&&(l=c(u,d,f,g,y,r),a&&(u.start=p+s*l)):ot(u,d,f,m),_<i&&i<=v&&(l=c(u,d,f,g,y,i),x=!0),r<_&&v<=r&&(l=c(u,d,f,g,y,r),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=rt(t)),a&&(p+=s)}var b=t.length-3;d=t[b],f=t[b+1],m=t[b+2],(v=0===n?d:f)>=i&&v<=r&&ot(u,d,f,m),b=u.length-3,o&&3<=b&&(u[b]!==u[0]||u[b+1]!==u[1])&&ot(u,u[0],u[1],u[2]),u.length&&e.push(u)}function rt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function nt(t,e,i,r,n,o){for(var a=0;a<t.length;a++)it(t[a],e,i,r,n,o,!1)}function ot(t,e,i,r){t.push(e),t.push(i),t.push(r)}function at(t,e,i,r,n,o){var a=(o-e)/(r-e);return t.push(o),t.push(i+(n-i)*a),t.push(1),a}function st(t,e,i,r,n,o){var a=(o-i)/(n-i);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function lt(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=ut(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(ut(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(ut(o.geometry[s][u],e));n.push(l)}i.push(H(o.id,a,n,o.tags))}return i}function ut(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 ct(t,e){if(t.transformed)return t;var i,r,n,o=1<<t.z,a=t.x,s=t.y;for(i=0;i<t.features.length;i++){var l=t.features[i],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(r=0;r<u.length;r+=2)l.geometry.push(pt(u[r],u[r+1],e,o,a,s));else for(r=0;r<u.length;r++){var p=[];for(n=0;n<u[r].length;n+=2)p.push(pt(u[r][n],u[r][n+1],e,o,a,s));l.geometry.push(p)}}return t.transformed=!0,t}function pt(t,e,i,r,n,o){return[Math.round(i*(t*r-n)),Math.round(i*(e*r-o))]}function ht(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++,dt(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 dt(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)ft(a,n,t,i,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)ft(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++)ft(a,u[s],t,i,!0,0===s)}
2if(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}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function ft(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 mt(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,l,u=function(t,e){var i=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)Y(i,t.features[r],e,r);else Y(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),s=tt(a=r=u,1,-1-(o=(n=e).buffer/n.extent),o,0,-1,2,n),l=tt(r,1,1-o,2+o,0,-1,2,n),(s||l)&&(a=tt(r,1,-o,1+o,0,-1,2,n)||[],s&&(a=lt(s,1).concat(a)),l&&(a=a.concat(lt(l,-1)))),(u=a).length&&this.splitTile(u,0,0,0),i&&(u.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 gt(t,e,i){return 32*((1<<t)*i+e)+t}function yt(t,e){var i=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var r=this._geoJSONIndex.getTile(i.z,i.x,i.y);if(!r)return e(null,null);var n=new m(r.features),o=x(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}function vt(e){var i=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:xt},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(e){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}}N.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");var a,s,l,u="prepare "+t.length+" points";i&&console.time(u),this.points=t;for(var c=[],p=0;p<t.length;p++)t[p].geometry&&c.push((a=p,l=(s=t[p].geometry.coordinates)[1],{x:F(s[0]),y:U(l),zoom:1/0,index:a,parentId:-1}));this.trees[n+1]=new O(c,q,G,o,Float32Array),i&&console.timeEnd(u);for(var h=n;r<=h;h--){var d=+Date.now();c=this._cluster(c,h),this.trees[h]=new O(c,q,G,o,Float32Array),i&&console.log("z%d: %d clusters in %dms",h,c.length,Date.now()-d)}return i&&console.timeEnd("total time"),this},N.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),s=this.getClusters([-180,r,n,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(F(i),U(o),F(n),U(r));c<p.length;c+=1){var h=l.points[p[c]];u.push(h.numPoints?B(h):this.points[h.index])}return u},N.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);var o=n.points[e];if(!o)throw new Error(r);for(var a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),s=[],l=0,u=n.within(o.x,o.y,a);l<u.length;l+=1){var c=n.points[u[l]];c.parentId===t&&s.push(c.numPoints?B(c):this.points[c.index])}if(0===s.length)throw new Error(r);return s}
2,N.prototype.getLeaves=function(t,e,i){var r=[];return this._appendLeaves(r,t,e=e||10,i=i||0,0),r},N.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,l=(i+1+a)/n,u={features:[]};return this._addTileFeatures(r.range((e-a)/n,s,(e+1+a)/n,l),r.points,e,i,n,u),0===e&&this._addTileFeatures(r.range(1-a/n,s,1,l),r.points,n,i,n,u),e===n-1&&this._addTileFeatures(r.range(0,s,a/n,l),r.points,-1,i,n,u),u.features.length?u:null},N.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},N.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},N.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?j(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)}},N.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))},N.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,d=0,f=c;d<f.length;d+=1){var m=u.points[f[d]];m.zoom>e&&(h+=m.numPoints||1)}if(o<=h){for(var g=l.x*p,y=l.y*p,v=n&&1<p?this._map(l,!0):null,_=(s<<5)+(e+1)+this.points.length,x=0,b=c;x<b.length;x+=1){var w=u.points[b[x]];if(!(w.zoom<=e)){w.zoom=e;var S=w.numPoints||1;g+=w.x*S,y+=w.y*S,w.parentId=_,n&&n(v=v||this._map(l,!0),this._map(w))}}l.parentId=_,i.push({x:g/h,y:y/h,zoom:1/0,id:_,parentId:-1,numPoints:h,properties:v})}else if(i.push(l),1<h)for(var T=0,C=c;T<C.length;T+=1){var I=u.points[C[T]];I.zoom<=e||(I.zoom=e,i.push(I))}}}return i},N.prototype._getOriginId=function(t){return t-this.points.length>>5},N.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},mt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!(N.prototype._map=function(t,e){if(t.numPoints)return e?V({},t.properties):t.properties;var i=this.points[t.index].properties,r=this.options.map(i);return e&&r===i?V({},r):r}),promoteId:null,generateId:!1,debug:0},mt.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=1<<e,p=gt(e,i,r),h=this.tiles[p];if(!h&&(1<u&&console.time("creation"),h=this.tiles[p]=ht(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,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var d="z"+e;this.stats[d]=(this.stats[d]||0)+1,this.total++}if(h.source=t,n){if(e===l.maxZoom||e===n)continue;var f=1<<n-e;if(i!==Math.floor(o/f)||r!==Math.floor(a/f))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){1<u&&console.time("clipping");var m,g,y,v,_,x,b=.5*l.buffer/l.extent,w=.5-b,S=.5+b,T=1+b;m=g=y=v=null,_=tt(t,c,i-b,i+S,0,h.minX,h.maxX,l),x=tt(t,c,i+w,i+T,0,h.minX,h.maxX,l),t=null,_&&(m=tt(_,c,r-b,r+S,1,h.minY,h.maxY,l),g=tt(_,c,r+w,r+T,1,h.minY,h.maxY,l),_=null),x&&(y=tt(x,c,r-b,r+S,1,h.minY,h.maxY,l),v=tt(x,c,r+w,r+T,1,h.minY,h.maxY,l),x=null),1<u&&console.timeEnd("clipping"),s.push(m||[],e+1,2*i,2*r),s.push(g||[],e+1,2*i,2*r+1),s.push(y||[],e+1,2*i+1,2*r),s.push(v||[],e+1,2*i+1,2*r+1)}}},mt.prototype.getTile=function(t,e,i){var r=this.options,n=r.extent,o=r.debug;if(t<0||24<t)return null;var a=1<<t,s=gt(t,e=(e%a+a)%a,i);if(this.tiles[s])return ct(this.tiles[s],n);1<o&&console.log("drilling down to z%d-%d-%d",t,e,i);for(var l,u=t,c=e,p=i;!l&&0<u;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[gt(u,c,p)];return l&&l.source?(1<o&&console.log("found parent tile z%d-%d-%d",u,c,p),1<o&&console.time("drilling down"),this.splitTile(l.source,u,c,p,t,e,i),1<o&&console.timeEnd("drilling down"),this.tiles[s]?ct(this.tiles[s],n):null):null};var _t,xt=(bt.__proto__=_t=l,((bt.prototype=Object.create(_t&&_t.prototype)).constructor=bt).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())},bt.prototype._loadData=function(){var e=this;
vendor: 4,108 bytes, line 2
2if(this._pendingCallback&&this._pendingLoadDataParams){var i=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(r&&r.request&&r.request.collectResourceTiming)&&new t.RequestPerformance(r.request);this.loadGeoJSON(r,(function(o,a){if(o||!a)return i(o);if("object"!=typeof a)return i(new Error("Input data given to '"+r.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)p(e.coordinates,i);else if("MultiPolygon"===n)for(r=0;r<e.coordinates.length;r++)p(e.coordinates[r],i);return e}(a,!0);try{e._geoJSONIndex=r.cluster?new N(function(){var e=r.superclusterOptions,i=r.clusterProperties;if(!i||!e)return e;for(var n={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(i),u=0,c=l;u<c.length;u+=1){var p=c[u],h=i[p],d=h[0],f=t.createExpression(h[1]),m=t.createExpression("string"==typeof d?[d,["accumulated"],["get",p]]:d);n[p]=f.value,o[p]=m.value}return e.map=function(t){s.properties=t;for(var e={},i=0,r=l;i<r.length;i+=1){var o=r[i];e[o]=n[o].evaluate(a,s)}return e},e.reduce=function(t,e){s.properties=e;for(var i=0,r=l;i<r.length;i+=1){var n=r[i];a.accumulated=t[n],t[n]=o[n].evaluate(a,s)}},e}()).load(a.features):new mt(a,r.geojsonVtOptions)}catch(o){return i(o)}e.loaded={};var s={};if(n){var l=n.finish();l&&(s.resourceTiming={},s.resourceTiming[r.source]=JSON.parse(JSON.stringify(l)))}i(null,s)}))}},bt.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},bt.prototype.reloadTile=function(t,e){var i=this.loaded;return i&&i[t.uid]?_t.prototype.reloadTile.call(this,t,e):this.loadTile(t,e)},bt.prototype.loadGeoJSON=function(e,i){if(e.request)t.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."))}}},bt.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},bt.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},bt.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},bt.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},bt);function bt(t,e,i,r){_t.call(this,t,e,i,yt),r&&(this.loadGeoJSON=r)}return vt.prototype.setReferrer=function(t,e){this.referrer=e},vt.prototype.setImages=function(t,e,i){for(var r in this.availableImages[t]=e,this.workerSources[t]){var n=this.workerSources[t][r];for(var o in n)n[o].availableImages=e}i()},vt.prototype.setLayers=function(t,e,i){this.getLayerIndex(t).replace(e),i()},vt.prototype.updateLayers=function(t,e,i){this.getLayerIndex(t).update(e.layers,e.removedIds),i()},vt.prototype.loadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).loadTile(e,i)},vt.prototype.loadDEMTile=function(t,e,i){this.getDEMWorkerSource(t,e.source).loadTile(e,i)},vt.prototype.reloadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).reloadTile(e,i)},vt.prototype.abortTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).abortTile(e,i)},vt.prototype.removeTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).removeTile(e,i)},vt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},vt.prototype.removeSource=function(t,e,i){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var 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()}}
2,vt.prototype.loadWorkerSource=function(t,e,i){try{this.self.importScripts(e.url),i()}catch(t){i(t.toString())}},vt.prototype.syncRTLPluginState=function(e,i,r){try{t.plugin.setState(i);var n=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=n){this.self.importScripts(n);var o=t.plugin.isParsed();r(o?void 0:new Error("RTL Text Plugin failed to import scripts from "+n),o)}}catch(e){r(e.toString())}},vt.prototype.getAvailableImages=function(t){var e=this.availableImages[t];return e||[]},vt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(this.layerIndexes[t]=new r)},vt.prototype.getWorkerSource=function(t,e,i){var r=this;return this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),this.workerSources[t][e][i]||(this.workerSources[t][e][i]=new this.workerSourceTypes[e]({send:function(e,i,n){r.actor.send(e,i,n,t)}},this.getLayerIndex(t),this.getAvailableImages(t))),this.workerSources[t][e][i]},vt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new u),this.demWorkerSources[t][e]},vt.prototype.enforceCacheSizeLimit=function(e,i){t.enforceCacheSizeLimit(i)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new vt(self)),vt})),i(0,(function(t){var e=t.createCommonjsModule((function(t){function e(t){return!i(t)}function i(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){var i=e.getImageData(0,0,1,1);return i&&i.width===t.width}}()?(void 0===r[i=t&&t.failIfMajorPerformanceCaveat]&&(r[i]=function(){var t,r,n,o=(t=i,r=document.createElement("canvas"),(n=Object.create(e.webGLContextAttributes)).failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",n)||r.probablySupportsContext("experimental-webgl",n):r.supportsContext?r.supportsContext("webgl",n)||r.supportsContext("experimental-webgl",n):r.getContext("webgl",n)||r.getContext("experimental-webgl",n));if(!o)return!1;var a=o.createShader(o.VERTEX_SHADER);return!(!a||o.isContextLost())&&(o.shaderSource(a,"void main() {}"),o.compileShader(a),!0===o.getShaderParameter(a,o.COMPILE_STATUS))}()),r[i]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var i}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=i);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),i={create:function(e,i,r){var n=t.window.document.createElement(e);return void 0!==i&&(n.className=i),r&&r.appendChild(n),n},createNS:function(e,i){return t.window.document.createElementNS(e,i)}},r=t.window.document&&t.window.document.documentElement.style;function n(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 o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);i.disableDrag=function(){r&&a&&(o=r[a],r[a]="none")},i.enableDrag=function(){r&&a&&(r[a]=o)};var s=n(["transform","WebkitTransform"]),l=!(i.setTransform=function(t,e){t.style[s]=e});try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}
2i.addEventListener=function(t,e,i,r){void 0===r&&(r={}),t.addEventListener(e,i,"passive"in r&&l?r:r.capture)},i.removeEventListener=function(t,e,i,r){void 0===r&&(r={}),t.removeEventListener(e,i,"passive"in r&&l?r:r.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};i.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout((function(){t.window.removeEventListener("click",c,!0)}),0)},i.mousePos=function(e,i){var r=e.getBoundingClientRect();return new t.Point(i.clientX-r.left-e.clientLeft,i.clientY-r.top-e.clientTop)},i.touchPos=function(e,i){for(var r=e.getBoundingClientRect(),n=[],o=0;o<i.length;o++)n.push(new t.Point(i[o].clientX-r.left-e.clientLeft,i[o].clientY-r.top-e.clientTop));return n},i.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&0<=t.window.navigator.platform.toUpperCase().indexOf("MAC")?0:e.button},i.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p,h=((p=t.Evented)&&(g.__proto__=p),((g.prototype=Object.create(p&&p.prototype)).constructor=g).prototype.isLoaded=function(){return this.loaded},g.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=[]}},g.prototype.getImage=function(t){return this.images[t]},g.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},g.prototype._validate=function(e,i){var r=!0;return this._validateStretch(i.stretchX,i.data&&i.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchX" value'))),r=!1),this._validateStretch(i.stretchY,i.data&&i.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchY" value'))),r=!1),this._validateContent(i.content,i)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "content" value'))),r=!1),r},g.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},g.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]))},g.prototype.updateImage=function(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0},g.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()},g.prototype.listImages=function(){return Object.keys(this.images)},g.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})},g.prototype._notify=function(e,i){for(var r={},n=0,o=e;n<o.length;n+=1){var a=o[n];this.images[a]||this.fire(new t.Event("styleimagemissing",{id:a}));var s=this.images[a];s?r[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+a+'" 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.')}i(null,r)},g.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},g.prototype.getPattern=function(e){var i=this.patterns[e],r=this.getImage(e);if(!r)return null;if(i&&i.position.version===r.version)return i.position;if(i)i.position.version=r.version;else{var n={w:r.data.width+2,h:r.data.height+2,x:0,y:0},o=new t.ImagePosition(n,r);this.patterns[e]={bin:n,position:o}}return this._updatePatternAtlas(),this.patterns[e].position},g.prototype.bind=function(e){var i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)},g.prototype._updatePatternAtlas=function(){var e=[];for(var i in this.patterns)e.push(this.patterns[i].bin);var r=t.potpack(e),n=r.w,o=r.h,a=this.atlasImage;for(var s in a.resize({width:n||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,p=this.images[s].data,h=p.width,d=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c},{width:h,height:d}),t.RGBAImage.copy(p,a,{x:0,y:d-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c+d},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:d}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u+h,y:c},{width:1,height:d})}this.dirty=!0},g.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},g.prototype.dispatchRenderCallbacks=function(t){for(var e=0,i=t;e<i.length;e+=1){var r=i[e];if(!this.callbackDispatchedThisFrame[r]){this.callbackDispatchedThisFrame[r]=!0;var n=this.images[r];a=void 0,(a=(o=n).userImage)&&a.render&&a.render()&&(o.data.replace(new Uint8Array(a.data.buffer)),1)&&this.updateImage(r,n)}}var o,a},g),d=y,f=y,m=1e20;function g(){p.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}function y(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;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(0<=navigator.userAgent.indexOf("Gecko/")?1.2:1))}function v(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(_(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(_(r,n,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(n[s])}}function _(t,e,i,r,n){r[i[0]=0]=-m,r[1]=+m;for(var o=1,a=0;o<n;
2o++){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]=+m}for(a=o=0;o<n;o++){for(;r[a+1]<o;)a++;e[o]=(o-i[a])*(o-i[a])+t[i[a]]}}function x(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}}function b(){this.specification=t.styleSpec.light.position}function w(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}y.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?m:Math.pow(Math.max(0,.5-n),2),this.gridInner[r]=1==n?m:0==n?0:Math.pow(Math.max(0,n-.5),2)}for(v(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),v(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},d.default=f,x.prototype.setURL=function(t){this.url=t},x.prototype.getGlyphs=function(e,i){var r=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1)n.push({stack:o,id:s[a]});t.asyncAll(n,(function(t,e){var i=t.stack,n=t.id,o=r.entries[i],a=(o=o||(r.entries[i]={glyphs:{},requests:{},ranges:{}})).glyphs[n];if(void 0===a){if(a=r._tinySDF(o,i,n))return o.glyphs[n]=a,void e(null,{stack:i,id:n,glyph:a});var s=Math.floor(n/256);if(65535<256*s)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:i,id:n,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],x.loadGlyphRange(i,s,r.url,r.requestManager,(function(t,e){if(e){for(var i in e)r._doesCharSupportLocalGlyph(+i)||(o.glyphs[+i]=e[+i]);o.ranges[s]=!0}for(var n=0,a=l;n<a.length;n+=1)(0,a[n])(t,e);delete o.requests[s]}))),l.push((function(t,r){t?e(t):r&&e(null,{stack:i,id:n,glyph:r[n]||null})}))}}else e(null,{stack:i,id:n,glyph:a})}),(function(t,e){if(t)i(t);else if(e){for(var r={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(r[s]||(r[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}i(null,r)}}))},x.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](e)||t.isChar["Hangul Syllables"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},x.prototype._tinySDF=function(e,i,r){var n=this.localIdeographFontFamily;if(n&&this._doesCharSupportLocalGlyph(r)){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(i)?a="900":/medium/i.test(i)?a="500":/light/i.test(i)&&(a="200"),o=e.tinySDF=new x.TinySDF(24,3,8,.25,n,a)}return{id:r,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},x.loadGlyphRange=function(e,i,r,n,o){var a=256*i,s=255+a,l=n.transformRequest(n.normalizeGlyphsURL(r).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,(function(e,i){if(e)o(e);else if(i){for(var r={},n=0,a=t.parseGlyphPBF(i);n<a.length;n+=1){var s=a[n];r[s.id]=s}o(null,r)}}))},x.TinySDF=d,b.prototype.possiblyEvaluate=function(e,i){return t.sphericalToCartesian(e.expression.evaluate(i))},b.prototype.interpolate=function(e,i,r){return{x:t.number(e.x,i.x,r),y:t.number(e.y,i.y,r),z:t.number(e.z,i.z,r)}};var S,T=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new b,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),C=((S=t.Evented)&&(I.__proto__=S),((I.prototype=Object.create(S&&S.prototype)).constructor=I).prototype.getLight=function(){return this._transitionable.serialize()},I.prototype.setLight=function(e,i){if(void 0===i&&(i={}),!this._validate(t.validateLight,e,i))for(var r in e){var n=e[r];t.endsWith(r,"-transition")?this._transitionable.setTransition(r.slice(0,-"-transition".length),n):this._transitionable.setValue(r,n)}},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(e,i,r){return(!r||!1!==r.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:i,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},I);function I(e){S.call(this),this._transitionable=new t.Transitionable(T),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}function E(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t.uniqueId();
vendor: 6,473 bytes, line 2
2for(var r=this.workerPool.acquire(this.id),n=0;n<r.length;n++){var o=new E.Actor(r[n],i,this.id);o.name="Worker "+n,this.actors.push(o)}}function M(e,i,r){function n(n,o){if(n)return r(n);if(o){var a=t.pick(t.extend(o,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(a.vectorLayers=o.vector_layers,a.vectorLayerIds=a.vectorLayers.map((function(t){return t.id}))),a.tiles=i.canonicalizeTileset(a,e.url),r(null,a)}}return e.url?t.getJSON(i.transformRequest(i.normalizeSourceURL(e.url),t.ResourceType.Source),n):t.browser.frame((function(){return n(null,e)}))}function A(e,i,r){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=i||0,this.maxzoom=r||24}w.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]},w.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:n=s*i,right:o=(s+=u)*i,isDash:a=!a,zeroLength:0===u})}return r},w.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,d=n/i*(1+r);if(s.isDash){var f=r-Math.abs(d);h=Math.sqrt(p*p+f*f)}else h=r-Math.sqrt(p*p+d*d);this.data[o+l]=Math.max(0,Math.min(255,h+128))}},w.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),h=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},w.prototype.addDash=function(e,i){var r=i?7:0,n=2*r+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];if(0!==o){var s=this.width/o,l=this.getDashRanges(e,this.width,s);i?this.addRoundDash(l,s,r):this.addRegularDash(l)}var u={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=n,this.dirty=!0,u},w.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))},E.prototype.broadcast=function(e,i,r){t.asyncAll(this.actors,(function(t,r){t.send(e,i,r)}),r=r||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=t.Actor,A.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]},A.prototype.contains=function(e){var i=Math.pow(2,e.z),r=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*i),n=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*i),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*i),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*i);return e.x>=r&&e.x<o&&e.y>=n&&e.y<a};var L,k,P,D,z,O,N,R=((N=t.Evented)&&(Q.__proto__=N),((Q.prototype=Object.create(N&&N.prototype)).constructor=Q).prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=M(this._options,this.map._requestManager,(function(i,r){e._tileJSONRequest=null,e._loaded=!0,i?e.fire(new t.ErrorEvent(i)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new A(r.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(r.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(r.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},Q.prototype.loaded=function(){return this._loaded},Q.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},Q.prototype.onAdd=function(t){this.map=t,this.load()},Q.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Q.prototype.serialize=function(){return t.extend({},this._options)},Q.prototype.loadTile=function(e,i){var r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),n={request:this.map._requestManager.transformRequest(r,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(r,n){return delete e.request,e.aborted?i(null):r&&404!==r.status?i(r):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),i(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=i:e.request=e.actor.send("reloadTile",n,o.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",n,o.bind(this)))},Q.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)},Q.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.t
2ype,source:this.id},void 0)},Q.prototype.hasTransition=function(){return!1},Q),B=((O=t.Evented)&&(J.__proto__=O),((J.prototype=Object.create(O&&O.prototype)).constructor=J).prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=M(this._options,this.map._requestManager,(function(i,r){e._tileJSONRequest=null,e._loaded=!0,i?e.fire(new t.ErrorEvent(i)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new A(r.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(r.tiles),t.postMapLoadEvent(r.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.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 t.extend({},this._options)},J.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},J.prototype.loadTile=function(e,i){var r=this,n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(n,t.ResourceType.Tile),(function(n,o){if(delete e.request,e.aborted)e.state="unloaded",i(null);else if(n)e.state="errored",i(n);else if(o){r.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=r.map.painter.context,s=a.gl;e.texture=r.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(r.dispatcher),i(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),j=(X.__proto__=z=B,((X.prototype=Object.create(z&&z.prototype)).constructor=X).prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},X.prototype.loadTile=function(e,i){var r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(r,t.ResourceType.Tile),function(r,n){if(delete e.request,e.aborted)e.state="unloaded",i(null);else if(r)e.state="errored",i(r);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.window.ImageBitmap&&n instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?n:t.browser.getImageData(n,1),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",a,function(t,r){t&&(e.state="errored",i(t)),r&&(e.dem=r,e.needsHillshadePrepare=!0,e.state="loaded",i(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},X.prototype._getNeighboringTiles=function(e){var i=e.canonical,r=Math.pow(2,i.z),n=(i.x-1+r)%r,o=0===i.x?e.wrap-1:e.wrap,a=(i.x+1+r)%r,s=i.x+1===r?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,i.z,n,i.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y).key]={backfilled:!1},0<i.y&&(l[new t.OverscaledTileID(e.overscaledZ,o,i.z,n,i.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y-1).key]={backfilled:!1}),i.y+1<r&&(l[new t.OverscaledTileID(e.overscaledZ,o,i.z,n,i.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y+1).key]={backfilled:!1}),l},X.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})}
2,X),F=((D=t.Evented)&&(K.__proto__=D),((K.prototype=Object.create(D&&D.prototype)).constructor=K).prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(i){if(i)e.fire(new t.ErrorEvent(i));else{var r={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&0<e._resourceTiming.length&&(r.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",r))}}))},K.prototype.onAdd=function(t){this.map=t,this.load()},K.prototype.setData=function(e){var i=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)i.fire(new t.ErrorEvent(e));else{var r={dataType:"source",sourceDataType:"content"};i._collectResourceTiming&&i._resourceTiming&&0<i._resourceTiming.length&&(r.resourceTiming=i._resourceTiming,i._resourceTiming=[]),i.fire(new t.Event("data",r))}})),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(e){var i=this;this._loaded=!1;var r=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(r.request=this.map._requestManager.transformRequest(t.browser.resolveURL(n),t.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(n),this.actor.send(this.type+".loadData",r,(function(t,n){i._removed||n&&n.abandoned||(i._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[i.id]&&(i._resourceTiming=n.resourceTiming[i.id].slice(0)),i.actor.send(i.type+".coalesce",{source:r.source},null),e(t))}))},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(e,i){var r=this,n=e.actor?"reloadTile":"loadTile";
2e.actor=this.actor,e.request=this.actor.send(n,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?i(null):t?i(t):(e.loadVectorData(o,r.map.painter,"reloadTile"==n),i(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 t.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K),U=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),V=((P=t.Evented)&&(Y.__proto__=P),((Y.prototype=Object.create(P&&P.prototype)).constructor=Y).prototype.load=function(e,i){var r=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(n,o){r._loaded=!0,n?r.fire(new t.ErrorEvent(n)):o&&(r.image=o,e&&(r.coordinates=e),i&&i(),r._finishLoading())}))},Y.prototype.loaded=function(){return this._loaded},Y.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},Y.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},Y.prototype.onAdd=function(t){this.map=t,this.load()},Y.prototype.setCoordinates=function(e){var i=this,r=(this.coordinates=e).map(t.MercatorCoordinate.fromLngLat);this.tileID=function(){for(var e=1/0,i=1/0,n=-1/0,o=-1/0,a=0,s=r;a<s.length;a+=1){var l=s[a];e=Math.min(e,l.x),i=Math.min(i,l.y),n=Math.max(n,l.x),o=Math.max(o,l.y)}var u=Math.max(n-e,o-i),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2)),p=Math.pow(2,c);return new t.CanonicalTileID(c,Math.floor((e+n)/2*p),Math.floor((i+o)/2*p))}(),this.minzoom=this.maxzoom=this.tileID.z;var n=r.map((function(t){return i.tileID.getTilePoint(t)._round()}));return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},Y.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,i=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,U.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},Y.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)},Y.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return!1},Y),q=(W.__proto__=k=V,((W.prototype=Object.create(k&&k.prototype)).constructor=W).prototype.load=function(){var e=this;this._loaded=!1;var i=this.options;this.urls=[];for(var r=0,n=i.urls;r<n.length;r+=1)this.urls.push(this.map._requestManager.transformRequest(n[r],t.ResourceType.Source).url);t.getVideo(this.urls,(function(i,r){e._loaded=!0,i?e.fire(new t.ErrorEvent(i)):r&&(e.video=r,e.video.loop=!0,e.video.addEventListener("playing",(function(){e.map.triggerRepaint()})),e.map&&e.video.play(),e._finishLoading())}))},W.prototype.pause=function(){this.video&&this.video.pause()},W.prototype.play=function(){this.video&&this.video.play()},W.prototype.seek=function(e){if(this.video){var i=this.video.seekable;e<i.start(0)||e>i.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+i.start(0)+" and "+i.end(0)+"-second mark."))):this.video.currentTime=e}},W.prototype.getVideo=function(){return this.video}
vendor: 10,902 bytes, line 2
2,W.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},W.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,i=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,U.members)),this.boundsSegments||(this.boundsSegments=t.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 t.Texture(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this.video&&!this.video.paused},W),G=(H.__proto__=L=V,((H.prototype=Object.create(L&&L.prototype)).constructor=H).prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.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())},H.prototype.getCanvas=function(){return this.canvas},H.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},H.prototype.onRemove=function(){this.pause()},H.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var i=this.map.painter.context,r=i.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,U.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(i,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},H.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},H.prototype.hasTransition=function(){return this._playing},H.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},H),Z={vector:R,raster:B,"raster-dem":j,geojson:F,video:q,image:V,canvas:G};function H(e,i,r,n){L.call(this,e,i,r,n),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}function W(t,e,i,r){k.call(this,t,e,i,r),this.roundZoom=!0,this.type="video",this.options=e}function Y(t,e,i,r){P.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(e,i,r,n){D.call(this),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=r.getActor(),this.setEventedParent(n),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId;var o=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*o,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*o,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,i.clusterMinPoints||2),extent:t.EXTENT,radius:(i.clusterRadius||50)*o,log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties},i.workerOptions)}function X(e,i,r,n){z.call(this,e,i,r,n),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox"}function J(e,i,r,n){O.call(this),this.id=e,this.dispatcher=r,this.setEventedParent(n),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}function Q(e,i,r,n){if(N.call(this),this.id=e,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(i,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(n)}function $(e,i,r,n,o,a){var s,l,u,c=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}(o&&o.layers,i,e.id),p=a.maxPitchScaleFactor(),h=e.tilesIn(n,p,c);h.sort(tt);for(var d=[],f=0,m=h;f<m.length;f+=1){var g=m[f];d.push({wrappedTileID:g.tileID.wrapped().key,queryResults:g.tile.queryRenderedFeatures(i,r,e._state,g.queryGeometry,g.cameraQueryGeometry,g.scale,o,a,p,(s=e.transform,l=g.tileID,u=t.identity([]),t.translate(u,u,[1,1,0]),t.scale(u,u,[.5*s.width,.5*s.height,1]),t.multiply(u,u,s.calculatePosMatrix(l.toUnwrapped()))))})}var y=function(){for(var t={},e={},i=0,r=d;i<r.length;i+=1){var n=r[i],o=n.queryResults,a=n.wrappedTileID,s=e[a]=e[a]||{};for(var l in o)for(var u=o[l],c=s[l]=s[l]||{},p=t[l]=t[l]||[],h=0,f=u;h<f.length;h+=1){var m=f[h];c[m.featureIndex]||(c[m.featureIndex]=!0,p.push(m))}}return t}();for(var v in y)y[v].forEach((function(t){var i=t.feature,r=e.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=r}));return y}function tt(t,e){var i=t.tileID,r=e.tileID;return i.overscaledZ-r.overscaledZ||i.canonical.y-r.canonical.y||i.wrap-r.wrap||i.canonical.x-r.canonical.x}function et(t,e){this.max=t,this.onRemove=e,this.reset()}function it(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}function rt(t,e,i,r){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=r;var n=(this.context=t).gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer}et.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},et.prototype.add=function(t,e,i){var r=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==i&&(o.timeout=setTimeout((function(){r.remove(t,o)}),i)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},et.prototype.has=function(t){return t.wrapped().key in this.data},et.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},et.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},et.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},et.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},et.prototype.remove=function(t,e){if(!this.has(t))return this;var i=t.wrapped().key,r=void 0===e?0:this.data[i].indexOf(e),n=this.data[i][r];return this.data[i].splice(r,1),n.timeout&&clearTimeout(n.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(n.value),this.order.splice(this.order.indexOf(i),1),this},et.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},et.prototype.filter=function(t){var e=[];for(var i in this.data)for(var r=0,n=this.data[i];r<n.length;r+=1){var o=n[r];t(o.value)||e.push(o)}for(var a=0,s=e;a<s.length;a+=1){var l=s[a];this.remove(l.value.tileID,l)}},it.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},it.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},it.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var nt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};function ot(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}function at(t,e,i,r){this.context=t,this.width=e,this.height=i;var n=this.framebuffer=t.gl.createFramebuffer();
2this.colorAttachment=new _e(t,n),r&&(this.depthAttachment=new xe(t,n))}rt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},rt.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},rt.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)}},rt.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[nt[n.type]],!1,this.itemSize,n.offset+this.itemSize*(i||0))}},rt.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)},ot.prototype.get=function(){return this.current},ot.prototype.set=function(t){},ot.prototype.getDefault=function(){return this.default},ot.prototype.setDefault=function(){this.set(this.default)};var st,lt,ut,ct,pt,ht,dt,ft,mt,gt,yt,vt,_t,xt,bt,wt,St,Tt,Ct,It,Et,Mt,At,Lt,kt,Pt,Dt,zt,Ot,Nt,Rt,Bt,jt,Ft,Ut=(ti.__proto__=Ft=ot,((ti.prototype=Object.create(Ft&&Ft.prototype)).constructor=ti).prototype.getDefault=function(){return t.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),Vt=($e.__proto__=jt=ot,(($e.prototype=Object.create(jt&&jt.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=(Qe.__proto__=Bt=ot,((Qe.prototype=Object.create(Bt&&Bt.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),Gt=(Je.__proto__=Rt=ot,((Je.prototype=Object.create(Rt&&Rt.prototype)).constructor=Je).prototype.getDefault=function(){return[!0,!0,!0,!0]},Je.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)},Je),Zt=(Xe.__proto__=Nt=ot,((Xe.prototype=Object.create(Nt&&Nt.prototype)).constructor=Xe).prototype.getDefault=function(){return!0},Xe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.depthMask(t),this.current=t,this.dirty=!1)},Xe),Ht=(Ke.__proto__=Ot=ot,((Ke.prototype=Object.create(Ot&&Ot.prototype)).constructor=Ke).prototype.getDefault=function(){return 255},Ke.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},Ke),Wt=(Ye.__proto__=zt=ot,((Ye.prototype=Object.create(zt&&zt.prototype)).constructor=Ye).prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},Ye.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)},Ye),Yt=(We.__proto__=Dt=ot,((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),Kt=(He.__proto__=Pt=ot,((He.prototype=Object.create(Pt&&Pt.prototype)).constructor=He).prototype.getDefault=function(){return!1},He.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},He),Xt=(Ze.__proto__=kt=ot,((Ze.prototype=Object.create(kt&&kt.prototype)).constructor=Ze).prototype.getDefault=function(){return[0,1]},Ze.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)},Ze),Jt=(Ge.__proto__=Lt=ot,((Ge.prototype=Object.create(Lt&&Lt.prototype)).constructor=Ge).prototype.getDefault=function(){return!1},Ge.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},Ge),Qt=(qe.__proto__=At=ot,((qe.prototype=Object.create(At&&At.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=(Ve.__proto__=Mt=ot,((Ve.prototype=Object.create(Mt&&Mt.prototype)).constructor=Ve).prototype.getDefault=function(){return!1},Ve.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},Ve),te=(Ue.__proto__=Et=ot,((Ue.prototype=Object.create(Et&&Et.prototype)).constructor=Ue).prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},Ue.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)},Ue),ee=(Fe.__proto__=It=ot,((Fe.prototype=Object.create(It&&It.prototype)).constructor=Fe).prototype.getDefault=function(){return t.Color.transparent},Fe.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
2(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},Fe),ie=(je.__proto__=Ct=ot,((je.prototype=Object.create(Ct&&Ct.prototype)).constructor=je).prototype.getDefault=function(){return this.gl.FUNC_ADD},je.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},je),re=(Be.__proto__=Tt=ot,((Be.prototype=Object.create(Tt&&Tt.prototype)).constructor=Be).prototype.getDefault=function(){return!1},Be.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},Be),ne=(Re.__proto__=St=ot,((Re.prototype=Object.create(St&&St.prototype)).constructor=Re).prototype.getDefault=function(){return this.gl.BACK},Re.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.cullFace(t),this.current=t,this.dirty=!1)},Re),oe=(Ne.__proto__=wt=ot,((Ne.prototype=Object.create(wt&&wt.prototype)).constructor=Ne).prototype.getDefault=function(){return this.gl.CCW},Ne.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.frontFace(t),this.current=t,this.dirty=!1)},Ne),ae=(Oe.__proto__=bt=ot,((Oe.prototype=Object.create(bt&&bt.prototype)).constructor=Oe).prototype.getDefault=function(){return null},Oe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.useProgram(t),this.current=t,this.dirty=!1)},Oe),se=(ze.__proto__=xt=ot,((ze.prototype=Object.create(xt&&xt.prototype)).constructor=ze).prototype.getDefault=function(){return this.gl.TEXTURE0},ze.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},ze),le=(De.__proto__=_t=ot,((De.prototype=Object.create(_t&&_t.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=(Pe.__proto__=vt=ot,((Pe.prototype=Object.create(vt&&vt.prototype)).constructor=Pe).prototype.getDefault=function(){return null},Pe.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},Pe),ce=(ke.__proto__=yt=ot,((ke.prototype=Object.create(yt&&yt.prototype)).constructor=ke).prototype.getDefault=function(){return null},ke.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},ke),pe=(Le.__proto__=gt=ot,((Le.prototype=Object.create(gt&>.prototype)).constructor=Le).prototype.getDefault=function(){return null},Le.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},Le),he=(Ae.__proto__=mt=ot,((Ae.prototype=Object.create(mt&&mt.prototype)).constructor=Ae).prototype.getDefault=function(){return null},Ae.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},Ae),de=(Me.__proto__=ft=ot,((Me.prototype=Object.create(ft&&ft.prototype)).constructor=Me).prototype.getDefault=function(){return null},Me.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},Me),fe=(Ee.__proto__=dt=ot,((Ee.prototype=Object.create(dt&&dt.prototype)).constructor=Ee).prototype.getDefault=function(){return null},Ee.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},Ee),me=(Ie.__proto__=ht=ot,((Ie.prototype=Object.create(ht&&ht.prototype)).constructor=Ie).prototype.getDefault=function(){return 4},Ie.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},Ie),ge=(Ce.__proto__=pt=ot,((Ce.prototype=Object.create(pt&&pt.prototype)).constructor=Ce).prototype.getDefault=function(){return!1},Ce.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},Ce),ye=(Te.__proto__=ct=ot,((Te.prototype=Object.create(ct&&ct.prototype)).constructor=Te).prototype.getDefault=function(){return!1},Te.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},Te),ve=(Se.__proto__=ut=ot,((Se.prototype=Object.create(ut&&ut.prototype)).constructor=Se).prototype.getDefault=function(){return null},Se),_e=(we.__proto__=lt=ve,((we.prototype=Object.create(lt&<.prototype)).constructor=we).prototype.setDirty=function(){this.dirty=!0},we.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},we),xe=(be.__proto__=st=ve,((be.prototype=Object.create(st&&st.prototype)).constructor=be).prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.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 Ce(){pt.apply(this,arguments)}function Ie(){ht.apply(this,arguments)}function Ee(t){dt.call(this,t),this.vao=t.extVertexArrayObject}function Me(){ft.apply(this,arguments)}function Ae(){mt.apply(this,arguments)}function Le(){gt.apply(this,arguments)}function ke(){yt.apply(this,arguments)}function Pe(){vt.apply(this,arguments)}function De(){_t.apply(this,arguments)}function ze(){xt.apply(this,arguments)}function Oe(){bt.apply(this,arguments)}function Ne(){wt.apply(this,arguments)}function Re(){St.apply(this,arguments)}function Be(){Tt.apply(this,arguments)}function je(){Ct.apply(this,arguments)}function Fe(){It.apply(this,arguments)}function Ue(){Et.apply(this,arguments)}function Ve(){Mt.apply(this,arguments)}function qe(){At.apply(this,arguments)}function Ge(){Lt.apply(this,arguments)}function Ze(){kt.apply(this,arguments)}function He(){Pt.apply(this,arguments)}function We(){Dt.apply(this,arguments)}function Ye(){zt.apply(this,arguments)}function Ke(){Ot.apply(this,arguments)}function Xe(){Nt.apply(this,arguments)}function Je(){Rt.apply(this,arguments)}function Qe(){Bt.apply(this,arguments)}function $e(){jt.apply(this,arguments)}function ti(){Ft.apply(this,arguments)}at.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var i=this.depthAttachment.get();i&&t.deleteRenderbuffer(i)}t.deleteFramebuffer(this.framebuffer)};
vendor: 21,365 bytes, line 2
2var 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],t.Color.transparent,[!1,!1,!1,!1]),ri.unblended=new ri(ri.Replace,t.Color.transparent,[!0,!0,!0,!0]),ri.alphaBlended=new ri([1,771],t.Color.transparent,[!0,!0,!0,!0]);var ni=function(t,e,i){this.enable=t,this.mode=e,this.frontFace=i};function oi(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ut(this),this.clearDepth=new Vt(this),this.clearStencil=new qt(this),this.colorMask=new Gt(this),this.depthMask=new Zt(this),this.stencilMask=new Ht(this),this.stencilFunc=new Wt(this),this.stencilOp=new Yt(this),this.stencilTest=new Kt(this),this.depthRange=new Xt(this),this.depthTest=new Jt(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 de(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new fe(this),this.pixelStoreUnpack=new me(this),this.pixelStoreUnpackPremultiplyAlpha=new ge(this),this.pixelStoreUnpackFlipY=new ye(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")}ni.disabled=new ni(!1,1029,2305),ni.backCCW=new ni(!0,1029,2305),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 it(this,t,e)},oi.prototype.createVertexBuffer=function(t,e,i){return new rt(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,n=0;e&&(n|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(n|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),r.clear(n)},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(e){t.deepEqual(e.blendFunction,ri.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},oi.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ai,si=((ai=t.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(){if(this._paused){var 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 t.values(this._tiles).map((function(t){return t.tileID})).sort(ui).map((function(t){return t.key}))},li.prototype.getRenderableIds=function(e){var i=this,r=[];for(var n in this._tiles)this._isIdRenderable(n,e)&&r.push(this._tiles[n]);return e?r.sort((function(e,r){var n=e.tileID,o=r.tileID,a=new t.Point(n.canonical.x,n.canonical.y)._rotate(i.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(i.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x})).map((function(t){return t.tileID.key})):r.map((function(t){return t.tileID})).sort(ui).map((function(t){return t.key}))},li.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.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(e,i,r,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},li.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),i=0;i<e.length;i++){var r=e[i];if(t.neighboringTiles&&t.neighboringTiles[r]){var n=this.getTileByID(r);o(t,n),o(n,t)}}function o(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),o=this._getLoadedTile(n);if(o)return o}},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,i=Math.ceil(t.height/this._source.tileSize)+1,r=Math.floor(e*i*5),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},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={};for(var r in this._tiles){var n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+e),i[n.tileID.key]=n}for(var o in this._tiles=i,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},li.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var r;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?r=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(r=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(r=r.filter((function(t){return i._source.hasTile(t)})))):r=[];var n=e.coveringZoomLevel(this._source),o=Math.max(n-li.maxOverzooming,this._source.minzoom),a=Math.max(n+li.maxUnderzooming,this._source.minzoom),s=this._updateRetainedTiles(r,n);if(ci(this._source.type)){for(var l={},u={},c=0,p=Object.keys(s);c<p.length;c+=1){var h=p[c],d=s[h],f=this._tiles[h];if(f&&!(f.fadeEndTime&&f.fadeEndTime<=t.browser.now())){var m=this.findLoadedParent(d,o);m&&(this._addTile(m.tileID),l[m.tileID.key]=m.tileID),u[h]=d}}for(var g in this._retainLoadedChildren(u,n,a,s),l)s[g]||(this._coveredTiles[g]=!0,s[g]=l[g])}for(var y in s)this._tiles[y].clearFadeHold();for(var v=0,_=t.keysDifference(this._tiles,s);v<_.length;v+=1){var x=_[v],b=this._tiles[x];b.hasSymbolBuckets&&!b.holdingForFade()?b.setHoldDuration(this.map._fadeDuration):b.hasSymbolBuckets&&!b.symbolFadeFinished()||this._removeTile(x)}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 d=h[p],f=this._tiles[d.key];if(!f.hasData()){if(e+1>this._source.maxzoom){var m=d.children(this._source.maxzoom)[0],g=this.getTile(m);if(g&&g.hasData()){i[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(i[y[0].key]&&i[y[1].key]&&i[y[2].key]&&i[y[3].key])continue}for(var v=f.wasRequested(),_=d.overscaledZ-1;n<=_;--_){var x=d.scaledTo(_);if(r[x.key])break;if(r[x.key]=!0,!(f=this.getTile(x))&&v&&(f=this._addTile(x)),f&&(i[x.key]=x,v=f.wasRequested(),f.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(e){var i=this._tiles[e.key];if(i)return i;(i=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,i)));var r=Boolean(i);return r||(i=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,this._tileLoaded.bind(this,i,e.key,i.state))),i?(i.uses++,this._tiles[e.key]=i,r||this._source.fire(new t.Event("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i):null},li.prototype._setTileReloadTimer=function(t,e){var i=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var r=e.getExpiryTimeout();r&&(this._timers[t]=setTimeout((function(){i._reloadTile(t,"expired"),delete i._timers[t]}),r))},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(e,i,r){var n=this,o=[],a=this.transform;if(!a)return o;for(var s=r?a.getCameraQueryGeometry(e):e,l=e.map((function(t){return a.pointCoordinate(t)})),u=s.map((function(t){return a.pointCoordinate(t)})),c=this.getIds(),p=1/0,h=1/0,d=-1/0,f=-1/0,m=0,g=u;m<g.length;m+=1){var y=g[m];p=Math.min(p,y.x),h=Math.min(h,y.y),d=Math.max(d,y.x),f=Math.max(f,y.y)}for(var v=function(e){var r=n._tiles[c[e]];if(!r.holdingForFade()){var s=r.tileID,m=Math.pow(2,a.zoom-r.tileID.overscaledZ),g=i*r.queryPadding*t.EXTENT/r.tileSize/m,y=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(d,f))];if(y[0].x-g<t.EXTENT&&y[0].y-g<t.EXTENT&&0<=y[1].x+g&&0<=y[1].y+g){var v=l.map((function(t){return s.getTilePoint(t)})),_=u.map((function(t){return s.getTilePoint(t)}));o.push({tile:r,tileID:s,queryGeometry:v,cameraQueryGeometry:_,scale:m})}}},_=0;_<c.length;_++)v(_);return o},li.prototype.getVisibleCoordinates=function(t){for(var e=this,i=this.getRenderableIds(t).map((function(t){return e._tiles[t].tileID})),r=0,n=i;r<n.length;r+=1){var o=n[r];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return i},li.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ci(this._source.type))for(var e in this._tiles){var i=this._tiles[e];if(void 0!==i.fadeEndTime&&i.fadeEndTime>=t.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){var r=this._tiles[t];r&&r.setDependencies(e,i)},li.prototype.reloadTilesForDependencies=function(t,e){for(var i in this._tiles)this._tiles[i].hasDependency(t,e)&&this._reloadTile(i,"reloading");this._cache.filter((function(i){return!i.hasDependency(t,e)}))},li);function li(e,i,r){var n=this;ai.call(this),this.id=e,this.dispatcher=r,this.on("data",(function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(n._sourceLoaded=!0),n._sourceLoaded&&!n._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(n.reload(),n.transform&&n.update(n.transform))})),this.on("error",(function(){n._sourceErrored=!0})),this._source=function(e,r,n){var o=new Z[i.type](e,i,r,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o}(e,r,this),this._tiles={},this._cache=new et(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.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 t.window.Worker(Da.workerUrl)}si.maxOverzooming=10,si.maxUnderzooming=3;var hi="mapboxgl_preloaded_worker_pool",di=function(){this.active={}};di.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<di.workerCount;)this.workers.push(new pi);return this.active[t]=!0,this.workers.slice()},di.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)},di.prototype.isPreloaded=function(){return!!this.active[hi]},di.prototype.numActive=function(){return Object.keys(this.active).length};var fi,mi=Math.floor(t.browser.hardwareConcurrency/2);function gi(){return fi=fi||new di}function yi(e,i){var r={};for(var n in e)"ref"!==n&&(r[n]=e[n]);return t.refProperties.forEach((function(t){t in i&&(r[t]=i[t])})),r}function vi(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]=yi(t[r],e[t[r].ref]));return t}di.workerCount=Math.max(Math.min(mi,6),1);var _i={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 xi(t,e,i){i.push({command:_i.addSource,args:[t,e[t]]})}function bi(t,e,i){e.push({command:_i.removeSource,args:[t]}),i[t]=!0}function wi(e,i,r){var n;for(n in e[r])if(e[r].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[r][n],i[r][n]))return;for(n in i[r])if(i[r].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[r][n],i[r][n]))return;return 1}function Si(e,i,r,n,o,a){var s;for(s in i=i||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],i[s])||r.push({command:a,args:[n,s,i[s],o]}));for(s in i)i.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],i[s])||r.push({command:a,args:[n,s,i[s],o]}))}function Ti(t){return t.id}function Ci(t,e){return t[e.id]=e,t}function Ii(t,e){this.reset(t,e)}function Ei(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 Mi(e,i,r,n,o){var a=t.create();return i?(t.scale(a,a,[1/o,1/o,1]),r||t.rotateZ(a,a,n.angle)):t.multiply(a,n.labelPlaneMatr
2ix,e),a}function Ai(e,i,r,n,o){if(i){var a=t.clone(e);return t.scale(a,a,[o,o,1]),r||t.rotateZ(a,a,-n.angle),a}return n.glCoordMatrix}function Li(e,i){var r=[e.x,e.y,0,1];Fi(r,r,i);var n=r[3];return{point:new t.Point(r[0]/n,r[1]/n),signedDistanceFromCamera:n}}function ki(t,e){return.5+t/e*.5}function Pi(e,i,r,n,o,a,s,l){var u,c,p,h,d=n?e.textSizeData:e.iconSizeData,f=t.evaluateSizeForZoom(d,r.transform.zoom),m=[256/r.width*2+1,256/r.height*2+1],g=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;g.clear();for(var y=e.lineVertexArray,v=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,_=r.transform.width/r.transform.height,x=!1,b=0;b<v.length;b++){var w=v.get(b);if(w.hidden||w.writingMode===t.WritingMode.vertical&&!x)ji(w.numGlyphs,g);else{x=!1;var S=[w.anchorX,w.anchorY,0,1];if(t.transformMat4(S,S,i),c=m,p=(u=S)[0]/u[3],h=u[1]/u[3],p>=-c[0]&&p<=c[0]&&h>=-c[1]&&h<=c[1]){var T=ki(r.transform.cameraToCenterDistance,S[3]),C=t.evaluateSizeForFeature(d,f,w),I=s?C/T:C*T,E=new t.Point(w.anchorX,w.anchorY),M=Li(E,o).point,A={},L=Oi(w,I,!1,l,i,o,a,e.glyphOffsetArray,y,g,M,E,A,_);x=L.useVertical,(L.notEnoughRoom||x||L.needsFlipping&&Oi(w,I,!0,l,i,o,a,e.glyphOffsetArray,y,g,M,E,A,_).notEnoughRoom)&&ji(w.numGlyphs,g)}else ji(w.numGlyphs,g)}}n?e.text.dynamicLayoutVertexBuffer.updateData(g):e.icon.dynamicLayoutVertexBuffer.updateData(g)}function Di(t,e,i,r,n,o,a,s,l,u,c){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,f=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(p-1),g=Ri(t*f,i,r,n,o,a,s.segment,h,d,l,u,c);if(!g)return null;var y=Ri(t*m,i,r,n,o,a,s.segment,h,d,l,u,c);return y?{first:g,last:y}:null}function zi(e,i,r,n){return e===t.WritingMode.horizontal&&Math.abs(r.y-i.y)>Math.abs(r.x-i.x)*n?{useVertical:!0}:(e===t.WritingMode.vertical?i.y<r.y:i.x>r.x)?{needsFlipping:!0}:null}function Oi(e,i,r,n,o,a,s,l,u,c,p,h,d,f){var m,g=i/24,y=e.lineOffsetX*g,v=e.lineOffsetY*g;if(1<e.numGlyphs){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Di(g,l,y,v,r,p,h,e,u,a,d);if(!w)return{notEnoughRoom:!0};var S=Li(w.first.point,s).point,T=Li(w.last.point,s).point;if(n&&!r){var C=zi(e.writingMode,S,T,f);if(C)return C}m=[w.first];for(var I=e.glyphStartIndex+1;I<_-1;I++)m.push(Ri(g*l.getoffsetX(I),y,v,r,p,h,e.segment,x,b,u,a,d));m.push(w.last)}else{if(n&&!r){var E=Li(h,o).point,M=e.lineStartIndex+e.segment+1,A=new t.Point(u.getx(M),u.gety(M)),L=Li(A,o),k=0<L.signedDistanceFromCamera?L.point:Ni(h,A,E,1,o),P=zi(e.writingMode,E,k,f);if(P)return P}var D=Ri(g*l.getoffsetX(e.glyphStartIndex),y,v,r,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,d);if(!D)return{notEnoughRoom:!0};m=[D]}for(var z=0,O=m;z<O.length;z+=1){var N=O[z];t.addDynamicAttributes(c,N.point,N.angle)}return{}}function Ni(t,e,i,r,n){var o=Li(t.add(t.sub(e)._unit()),n).point,a=i.sub(o);return i.add(a._mult(r/a.mag()))}function Ri(e,i,r,n,o,a,s,l,u,c,p,h){var d=n?e-i:e+i,f=0<d?1:-1,m=0;n&&(f*=-1,m=Math.PI),f<0&&(m+=Math.PI);for(var g=0<f?l+s:l+s+1,y=o,v=o,_=0,x=0,b=Math.abs(d),w=[];_+x<=b;){if((g+=f)<l||u<=g)return null;if(v=y,w.push(y),void 0===(y=h[g])){var S=new t.Point(c.getx(g),c.gety(g)),T=Li(S,p);if(0<T.signedDistanceFromCamera)y=h[g]=T.point;else{var C=g-f;y=Ni(0===_?a:new t.Point(c.getx(C),c.gety(C)),S,v,b-_+1,p)}}_+=x,x=v.dist(y)}var I=(b-_)/x,E=y.sub(v),M=E.mult(I)._add(v);M._add(E._unit()._perp()._mult(r*f));var A=m+Math.atan2(y.y-v.y,y.x-v.x);return w.push(M),{point:M,angle:A,path:w}}Ii.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},Ii.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var i=1,r=this._distances[i],n=e*this.paddedLength+this.padding;r<n&&i<this._distances.length;)r=this._distances[++i];var o=i-1,a=this._distances[o],s=r-a,l=0<s?(n-a)/s:0;return this.points[o].mult(1-l).add(this.points[i].mult(l))},Ei.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length}
vendor: 1,418 bytes, line 2
2,Ei.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)},Ei.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)},Ei.prototype._insertBoxCell=function(t,e,i,r,n,o){this.boxCells[n].push(o)},Ei.prototype._insertCircleCell=function(t,e,i,r,n,o){this.circleCells[n].push(o)},Ei.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},Ei.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
2s:i},seenUids:{box:{},circle:{}}},n),r?0<u.length:u},Ei.prototype.query=function(t,e,i,r,n){return this._query(t,e,i,r,!1,n)},Ei.prototype.hitTest=function(t,e,i,r,n){return this._query(t,e,i,r,!0,n)},Ei.prototype.hitTestCircle=function(t,e,i,r){return this._queryCircle(t,e,i,!0,r)},Ei.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 d=h[p];if(!l.box[d]){l.box[d]=!0;var f=4*d;if(t<=c[2+f]&&e<=c[3+f]&&i>=c[0+f]&&r>=c[1+f]&&(!s||s(this.boxKeys[d]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[d],x1:c[f],y1:c[1+f],x2:c[2+f],y2:c[3+f]})}}}var m=this.circleCells[n];if(null!==m)for(var g=this.circles,y=0,v=m;y<v.length;y+=1){var _=v[y];if(!l.circle[_]){l.circle[_]=!0;var x=3*_;if(this._circleAndRectCollide(g[x],g[1+x],g[2+x],t,e,i,r)&&(!s||s(this.circleKeys[_]))){if(a.hitTest)return o.push(!0),!0;var b=g[x],w=g[1+x],S=g[2+x];o.push({key:this.circleKeys[_],x1:b-S,y1:w-S,x2:b+S,y2:w+S})}}}},Ei.prototype._queryCellCircle=function(t,e,i,r,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c)for(var p=this.bboxes,h=0,d=c;h<d.length;h+=1){var f=d[h];if(!u.box[f]){u.box[f]=!0;var m=4*f;if(this._circleAndRectCollide(l.x,l.y,l.radius,p[0+m],p[1+m],p[2+m],p[3+m])&&(!s||s(this.boxKeys[f])))return o.push(!0),!0}}var g=this.circleCells[n];if(null!==g)for(var y=this.circles,v=0,_=g;v<_.length;v+=1){var x=_[v];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(y[b],y[1+b],y[2+b],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Ei.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 d=u;d<=p;d++)if(n.call(this,t,e,i,r,this.xCellCount*d+h,o,a,s))return},Ei.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Ei.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Ei.prototype._circlesCollide=function(t,e,i,r,n,o){var a=r-t,s=n-e,l=i+o;return a*a+s*s<l*l},Ei.prototype._circleAndRectCollide=function(t,e,i,r,n,o,a){var s=(o-r)/2,l=Math.abs(t-(r+s));if(s+i<l)return!1;var u=(a-n)/2,c=Math.abs(e-(n+u));if(u+i<c)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=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 ji(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],n=e[1];return t[0]=i[0]*r+i[4]*n+i[12],t[1]=i[1]*r+i[5]*n+i[13],t[3]=i[3]*r+i[7]*n+i[15],t}
vendor: 11,240 bytes, line 2
2function Ui(t,e,i){void 0===e&&(e=new Ei(t.width+200,t.height+200,25)),void 0===i&&(i=new Ei(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}function Vi(e,i,r){return i*(t.EXTENT/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function qi(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}function Gi(t,e,i,r,n){this.text=new qi(t?t.text:null,e,i,n),this.icon=new qi(t?t.icon:null,e,r,n)}function Zi(t,e,i){this.text=t,this.icon=e,this.skipFade=i}function Hi(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]}function Wi(t,e,i,r,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=i,this.bucketIndex=r,this.tileID=n}function Yi(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}function Ki(e,i,r,n,o){var a=t.getAnchorAlignment(e),s=-(a.horizontalAlign-.5)*i,l=-(a.verticalAlign-.5)*r,u=t.evaluateVariableOffset(e,n);return new t.Point(s+u[0]*o,l+u[1]*o)}function Xi(e,i,r,n,o,a){var s=e.x1,l=e.x2,u=e.y1,c=e.y2,p=e.anchorPointX,h=e.anchorPointY,d=new t.Point(i,r);return n&&d._rotate(o?a:-a),{x1:s+d.x,y1:u+d.y,x2:l+d.x,y2:c+d.y,anchorPointX:p,anchorPointY:h}}function Ji(t,e,i,r){this.transform=t.clone(),this.collisionIndex=new Ui(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new Yi(i),this.collisionCircleArrays={},(this.prevPlacement=r)&&(r.prevPlacement=void 0),this.placedOrientations={}}function Qi(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)}Ui.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,l=t.y1*a+o.point.y,u=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,n)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},Ui.prototype.placeCollisionCircles=function(e,i,r,n,o,a,s,l,u,c,p,h,d){var f=[],m=new t.Point(i.anchorX,i.anchorY),g=Li(m,a),y=ki(this.transform.cameraToCenterDistance,g.signedDistanceFromCamera),v=(c?o/y:o*y)/t.ONE_EM,_=Li(m,s).point,x=Di(v,n,i.lineOffsetX*v,i.lineOffsetY*v,!1,_,m,i,r,s,{}),b=!1,w=!1,S=!0;if(x){for(var T=.5*h*y+d,C=new t.Point(-100,-100),I=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),E=new Ii,M=x.first,A=x.last,L=[],k=M.path.length-1;1<=k;k--)L.push(M.path[k]);for(var P=1;P<A.path.length;P++)L.push(A.path[P]);var D=2.5*T;if(l){var z=L.map((function(t){return Li(t,l)}));L=z.some((function(t){return t.signedDistanceFromCamera<=0}))?[]:z.map((function(t){return t.point}))}var O=[];if(0<L.length){for(var N=L[0].clone(),R=L[0].clone(),B=1;B<L.length;B++)N.x=Math.min(N.x,L[B].x),N.y=Math.min(N.y,L[B].y),R.x=Math.max(R.x,L[B].x),R.y=Math.max(R.y,L[B].y);O=N.x>=C.x&&R.x<=I.x&&N.y>=C.y&&R.y<=I.y?[L]:R.x<C.x||N.x>I.x||R.y<C.y||N.y>I.y?[]:t.clipLine([L],C.x,C.y,I.x,I.y)}for(var j=0,F=O;j<F.length;j+=1){var U;E.reset(F[j],.25*T),U=E.length<=.5*T?1:Math.ceil(E.paddedLength/D)+1;for(var V=0;V<U;V++){var q=V/Math.max(U-1,1),G=E.lerp(q),Z=G.x+100,H=G.y+100;f.push(Z,H,T,0);var W=Z-T,Y=H-T,K=Z+T,X=H+T;if(S=S&&this.isOffscreen(W,Y,K,X),w=w||this.isInsideGrid(W,Y,K,X),!e&&this.grid.hitTestCircle(Z,H,T,p)&&(b=!0,!u))return{circles:[],offscreen:!1,collisionDetected:b}}}}return{circles:!u&&b||!w?[]:f,offscreen:S,collisionDetected:b}},Ui.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var i=[],r=1/0,n=1/0,o=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+100,u.y+100);r=Math.min(r,c.x),n=Math.min(n,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),i.push(c)}for(var p={},h={},d=0,f=this.grid.query(r,n,o,a).concat(this.ignoredGrid.query(r,n,o,a));d<f.length;d+=1){var m=f[d],g=m.key;if(void 0===p[g.bucketInstanceId]&&(p[g.bucketInstanceId]={}),!p[g.bucketInstanceId][g.featureIndex]){var y=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(i,y)&&(p[g.bucketInstanceId][g.featureIndex]=!0,void 0===h[g.bucketInstanceId]&&(h[g.bucketInstanceId]=[]),h[g.bucketInstanceId].push(g.featureIndex))}}return h},Ui.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])},Ui.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])},Ui.prototype.projectAndGetPerspectiveRatio=function(e,i,r){var n=[i,r,0,1];return Fi(n,n,e),{point:new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},Ui.prototype.isOffscreen=function(t,e,i,r){return i<100||t>=this.screenRightBoundary||r<100||e>this.screenBottomBoundary},Ui.prototype.isInsideGrid=function(t,e,i,r){return 0<=i&&t<this.gridRightBoundary&&0<=r&&e<this.gridBottomBoundary},Ui.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e},qi.prototype.isHidden=function(){return 0===this.opacity&&!this.placed},Gi.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()},Yi.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]},Ji.prototype.getBucketParts=function(e,i,r,n){var o=r.getBucket(i),a=r.latestFeatureIndex;if(o&&a&&i.id===o.layerIds[0]){var s=r.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h="map"===l.get("text-pitch-alignment"),d="map"===l.get("text-rotation-alignment"),f=Vi(r,1,this.transform.zoom),m=Mi(p,h,d,this.transform,f),g=null;if(h){var y=Ai(p,h,d,this.transform,f);g=t.multiply([],this.transform.labelPlaneMatrix,y)}this.retainedQueryData[o.bucketInstanceId]=new Wi(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);var v={bucket:o,layout:l,posMatrix:p,textLabelPlaneMatrix:m,labelToScreenMatrix:g,scale:u,textPixelRatio:c,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(n)for(var _=0,x=o.sortKeyRanges;_<x.length;_+=1){var b=x[_];e.push({sortKey:b.sortKey,symbolInstanceStart:b.symbolInstanceStart,symbolInstanceEnd:b.symbolInstanceEnd,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:v})}},Ji.prototype.attemptAnchorPlacement=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f){var m,g=[p.textOffset0,p.textOffset1],y=Ki(t,i,r,g,n),v=this.collisionIndex.placeCollisionBox(Xi(e,y.x,y.y,o,a,this.transform.angle),c,s,l,u.predicate);if(!f||0!==this.collisionIndex.placeCollisionBox(Xi(f,y.x,y.y,o,a,this.transform.angle),c,s,l,u.predicate).box.length)return 0<v.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:g,width:i,height:r,anchor:t,textBoxScale:n,prevAnchor:m},this.markUsedJustification(h,t,p,d),h.allowVerticalPlacement&&(this.markUsedOrientation(h,d,p),this.placedOrientations[p.crossTileID]=d),{shift:y,placedGlyphBoxes:v}):void 0},Ji.prototype.placeLayerBucketPart=function(e,i,r){var n=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,d=o.collisionBoxArray,f=o.partiallyEvaluatedTextSize,m=o.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),v=s.get("text-allow-overlap"),_=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),S="viewport-y"===s.get("symbol-z-order"),T=v&&(_||!a.hasIconData()||y),C=_&&(v||!a.hasTextData()||g);function I(e,o){if(!i[e.crossTileID])if(h)n.placements[e.crossTileID]=new Zi(!1,!1,!1);else{var d,S=!1,I=!1,E=!0,M=null,A={box:null,offscreen:null},L={box:null,offscreen:null},k=null,P=null,D=0,z=0,O=0;o.textFeatureIndex?D=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(D=e.featureIndex),o.verticalTextFeatureIndex&&(z=o.verticalTextFeatureIndex);var N=o.textBox;if(N){var R=function(i){var r=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!i&&n.prevPlacement){var o=n.prevPlacement.placedOrientations[e.crossTileID];o&&(n.placedOrientations[e.crossTileID]=o,n.markUsedOrientation(a,r=o,e))}return r},B=function(i,r){if(a.allowVerticalPlacement&&0<e.numVerticalGlyphVertices&&o.verticalTextBox)for(var n=0,s=a.writingModes;n<s.length&&(s[n]===t.WritingMode.vertical?(A=r(),L=A):A=i(),!(A&&A.box&&A.box.length));n+=1);else A=i()};if(s.get("text-variable-anchor")){var j=s.get("text-variable-anchor");if(n.prevPlacement&&n.prevPlacement.variableOffsets[e.crossTileID]){var F=n.prevPlacement.variableOffsets[e.crossTileID];0<j.indexOf(F.anchor)&&(j=j.filter((function(t){return t!==F.anchor}))).unshift(F.anchor)}var U=function(t,i,r){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!_?i:null,h={box:[],offscreen:!1},d=v?2*j.length:j.length,f=0;f<d;++f){var g=n.attemptAnchorPlacement(j[f%j.length],t,o,s,u,x,b,p,l,m,f>=j.length,e,a,r,c);if(g&&(h=g.placedGlyphBoxes)&&h.box&&h.box.length){S=!0,M=g.shift;break}}return h};B((function(){return U(N,o.iconBox,t.WritingMode.horizontal)}),(function(){var i=o.verticalTextBox;return a.allowVerticalPlacement&&!(A&&A.box&&A.box.length)&&0<e.numVerticalGlyphVertices&&i?U(i,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),A&&(S=A.box,E=A.offscreen);var V=R(A&&A.box);if(!S&&n.prevPlacement){var q=n.prevPlacement.variableOffsets[e.crossTileID];q&&(n.variableOffsets[e.crossTileID]=q,n.markUsedJustification(a,q.anchor,e,V))}}else{var G=function(t,i){var r=n.collisionIndex.placeCollisionBox(t,v,p,l,m.predicate);return r&&r.box&&r.box.length&&(n.markUsedOrientation(a,i,e),n.placedOrientations[e.crossTileID]=i),r};B((function(){return G(N,t.WritingMode.horizontal)}),(function(){var i=o.verticalTextBox;return a.allowVerticalPlacement&&0<e.numVerticalGlyphVertices&&i?G(i,t.WritingMode.vertical):{box:null,offscreen:null}})),R(A&&A.box&&A.box.length)}}if(S=(d=A)&&d.box&&0<d.box.length,E=d&&d.offscreen,e.useRuntimeCollisionCircles){var Z=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),H=t.evaluateSizeForFeature
2(a.textSizeData,f,Z),W=s.get("text-padding");k=n.collisionIndex.placeCollisionCircles(v,Z,a.lineVertexArray,a.glyphOffsetArray,H,l,u,c,r,b,m.predicate,e.collisionCircleDiameter,W),S=v||0<k.circles.length&&!k.collisionDetected,E=E&&k.offscreen}if(o.iconFeatureIndex&&(O=o.iconFeatureIndex),o.iconBox){var Y=function(t){var e=w&&M?Xi(t,M.x,M.y,x,b,n.transform.angle):t;return n.collisionIndex.placeCollisionBox(e,_,p,l,m.predicate)};I=L&&L.box&&L.box.length&&o.verticalIconBox?0<(P=Y(o.verticalIconBox)).box.length:0<(P=Y(o.iconBox)).box.length,E=E&&P.offscreen}var K=g||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,X=y||0===e.numIconVertices;if(K||X?X?K||(I=I&&S):S=I&&S:I=S=I&&S,S&&d&&d.box&&n.collisionIndex.insertCollisionBox(d.box,s.get("text-ignore-placement"),a.bucketInstanceId,L&&L.box&&z?z:D,m.ID),I&&P&&n.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),a.bucketInstanceId,O,m.ID),k&&(S&&n.collisionIndex.insertCollisionCircles(k.circles,s.get("text-ignore-placement"),a.bucketInstanceId,D,m.ID),r)){var J=a.bucketInstanceId,Q=n.collisionCircleArrays[J];void 0===Q&&(Q=n.collisionCircleArrays[J]=new Hi);for(var $=0;$<k.circles.length;$+=4)Q.circles.push(k.circles[$+0]),Q.circles.push(k.circles[$+1]),Q.circles.push(k.circles[$+2]),Q.circles.push(k.collisionDetected?1:0)}n.placements[e.crossTileID]=new Zi(S||T,I||C,E||a.justReloaded),i[e.crossTileID]=!0}}if(!a.collisionArrays&&d&&a.deserializeCollisionBoxes(d),S)for(var E=a.getSortedSymbolIndexes(this.transform.angle),M=E.length-1;0<=M;--M){var A=E[M];I(a.symbolInstances.get(A),a.collisionArrays[A])}else for(var L=e.symbolInstanceStart;L<e.symbolInstanceEnd;L++)I(a.symbolInstances.get(L),a.collisionArrays[L]);if(r&&a.bucketInstanceId in this.collisionCircleArrays){var k=this.collisionCircleArrays[a.bucketInstanceId];t.invert(k.invProjMatrix,l),k.viewportMatrix=this.collisionIndex.getViewportMatrix()}a.justReloaded=!1},Ji.prototype.markUsedJustification=function(e,i,r,n){var o;o=n===t.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:{left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(i)];for(var a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];a<s.length;a+=1){var l=s[a];0<=l&&(e.text.placedSymbolArray.get(l).crossTileID=0<=o&&l!==o?0:r.crossTileID)}},Ji.prototype.markUsedOrientation=function(e,i,r){for(var n=i===t.WritingMode.horizontal||i===t.WritingMode.horizontalOnly?i:0,o=i===t.WritingMode.vertical?i:0,a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];a<s.length;a+=1)e.text.placedSymbolArray.get(s[a]).placedOrientation=n;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)},Ji.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=e?e.symbolFadeChange(t):1,n=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],u=n[s];i=u?(this.opacities[s]=new Gi(u,r,l.text,l.icon),i||l.text!==u.text.placed||l.icon!==u.icon.placed):(this.opacities[s]=new Gi(null,r,l.text,l.icon,l.skipFade),i||l.text||l.icon)}for(var c in n){var p=n[c];if(!this.opacities[c]){var h=new Gi(p,r,!1,!1);h.isHidden()||(this.opacities[c]=h,i=i||p.text.placed||p.icon.placed)}}for(var d in o)this.variableOffsets[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.variableOffsets[d]=o[d]);for(var f in a)this.placedOrientations[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.placedOrientations[f]=a[f]);i?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},Ji.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)}},Ji.prototype.updateBucketOpacities=function(e,i,r){var n=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();
vendor: 21,706 bytes, line 2
2var o=e.layers[0].layout,a=new Gi(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),u=o.get("text-variable-anchor"),c="map"===o.get("text-rotation-alignment"),p="map"===o.get("text-pitch-alignment"),h="none"!==o.get("icon-text-fit"),d=new Gi(null,0,s&&(l||!e.hasIconData()||o.get("icon-optional")),l&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);for(var f=function(t,e,i){for(var r=0;r<e/4;r++)t.opacityVertexArray.emplaceBack(i)},m=function(r){var o=e.symbolInstances.get(r),s=o.numHorizontalGlyphVertices,l=o.numVerticalGlyphVertices,m=o.crossTileID,g=n.opacities[m];i[m]?g=a:g||(n.opacities[m]=g=d),i[m]=!0;var y=0<o.numIconVertices,v=n.placedOrientations[o.crossTileID],_=v===t.WritingMode.vertical,x=v===t.WritingMode.horizontal||v===t.WritingMode.horizontalOnly;if(0<s||0<l){var b=ar(g.text);f(e.text,s,_?lr:b),f(e.text,l,x?lr:b);var w=g.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(t){0<=t&&(e.text.placedSymbolArray.get(t).hidden=w||_?1:0)})),0<=o.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||x?1:0);var S=n.variableOffsets[o.crossTileID];S&&n.markUsedJustification(e,S.anchor,o,v);var T=n.placedOrientations[o.crossTileID];T&&(n.markUsedJustification(e,"left",o,T),n.markUsedOrientation(e,T,o))}if(y){var C=ar(g.icon),I=!(h&&o.verticalPlacedIconSymbolIndex&&_);0<=o.placedIconSymbolIndex&&(f(e.icon,o.numIconVertices,I?C:lr),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=g.icon.isHidden()),0<=o.verticalPlacedIconSymbolIndex&&(f(e.icon,o.numVerticalIconVertices,I?lr:C),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var E=e.collisionArrays[r];if(E){var M=new t.Point(0,0);if(E.textBox||E.verticalTextBox){var A=!0;if(u){var L=n.variableOffsets[m];L?(M=Ki(L.anchor,L.width,L.height,L.textOffset,L.textBoxScale),c&&M._rotate(p?n.transform.angle:-n.transform.angle)):A=!1}E.textBox&&Qi(e.textCollisionBox.collisionVertexArray,g.text.placed,!A||_,M.x,M.y),E.verticalTextBox&&Qi(e.textCollisionBox.collisionVertexArray,g.text.placed,!A||x,M.x,M.y)}var k=Boolean(!x&&E.verticalIconBox);E.iconBox&&Qi(e.iconCollisionBox.collisionVertexArray,g.icon.placed,k,h?M.x:0,h?M.y:0),E.verticalIconBox&&Qi(e.iconCollisionBox.collisionVertexArray,g.icon.placed,!k,h?M.x:0,h?M.y:0)}}},g=0;g<e.symbolInstances.length;g++)m(g);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var y=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=y.invProjMatrix,e.placementViewportMatrix=y.viewportMatrix,e.collisionCircleArray=y.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},Ji.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Ji.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},Ji.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},Ji.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},Ji.prototype.setStale=function(){this.stale=!0};var $i=Math.pow(2,25),tr=Math.pow(2,24),er=Math.pow(2,17),ir=Math.pow(2,16),rr=Math.pow(2,9),nr=Math.pow(2,8),or=Math.pow(2,1);function ar(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,i=Math.floor(127*t.opacity);return i*$i+e*tr+i*er+e*ir+i*rr+e*nr+i*or+e}function sr(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 lr=0;function ur(t,e,i,r,n,o,a){this.placement=new Ji(t,n,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=r,this._done=!1}function cr(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;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}}sr.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},ur.prototype.isDone=function(){return this._done},ur.prototype.continuePlacement=function(e,i,r){for(var n=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!n._forceFullPlacement&&2<e};0<=this._currentPlacementIndex;){var s=i[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new sr(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ur.prototype.commit=function(t){return this.placement.commit(t),this.placement};var pr=512/t.EXTENT/2;function hr(){this.maxCrossTileID=0}function dr(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}function fr(){this.layerIndexes={},this.crossTileIDs=new hr,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}function mr(e,i){return t.emitValidationErrors(e,i&&i.filter((function(t){return"source.canvas"!==t.identifier})))}cr.prototype.getScaledCoordinates=function(e,i){var r=pr/Math.pow(2,i.canonical.z-this.tileID.canonical.z);return{x:Math.floor((i.canonical.x*t.EXTENT+e.anchorX)*r),y:Math.floor((i.canonical.y*t.EXTENT+e.anchorY)*r)}},cr.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}}}}},hr.prototype.generate=function(){return++this.maxCrossTileID},dr.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var i in this.indexes){var r=this.indexes[i],n={};for(var o in r){var a=r[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[i]=n}this.lng=t},dr.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=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,n)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,n)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=i.generate(),n[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new cr(t,e.symbolInstances,e.bucketInstanceId),!0},dr.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]},dr.prototype.removeStaleBuckets=function(t){var e=!1;for(var i in this.indexes){var r=this.indexes[i];for(var n in r)t[r[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,r[n]),delete r[n],e=!0)}return e},fr.prototype.addLayer=function(t,e,i){var r=this.layerIndexes[t.id];void 0===r&&(r=this.layerIndexes[t.id]=new dr);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},fr.prototype.pruneUnusedLayers=function(t){var e={};for(var i in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[i]||delete this.layerIndexes[i]};var gr,yr=t.pick(_i,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),vr=t.pick(_i,["setCenter","setZoom","setBearing","setPitch"]),_r=function(){var e={},i=t.styleSpec.$version;for(var r in t.styleSpec.$root){var n,o=t.styleSpec.$root[r];o.required&&null!=(n="version"===r?i:"array"===o.type?[]:{})&&(e[r]=n)}return e}(),xr=((gr=t.Evented)&&(br.__proto__=gr),((br.prototype=Object.create(gr&&gr.prototype)).constructor=br).prototype.loadURL=function(e,i){var r=this;void 0===i&&(i={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof i.validate?i.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,i.accessToken);var o=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,(function(e,i){r._request=null,e?r.fire(new t.ErrorEvent(e)):i&&r._load(i,n)}))},br.prototype.loadJSON=function(e,i){var r=this;void 0===i&&(i={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame((function(){r._request=null,r._load(e,!1!==i.validate)}))},br.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(_r,!1)},br.prototype._load=function(e,i){if(!i||!mr(this,t.validateStyle(e))){for(var r in this._loaded=!0,(this.stylesheet=e).sources)this.addSource(r,e.sources[r],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var n=vi(this.stylesheet.layers);this._order=n.map((function(t){return t.id})),this._layers={},this._serializedLayers={};for(var o=0,a=n;o<a.length;o+=1){var s=a[o];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new C(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},br.prototype._loadSprite=function(e){var i,r,n,o,a,s,l,u,c,p=this;function h(){if(s)n(s);else if(o&&a){var e=t.browser.getImageData(a),i={};for(var r in o){var l=o[r],u=l.width,c=l.height,p=l.x,h=l.y,d=l.sdf,f=l.pixelRatio,m=l.stretchX,g=l.stretchY,y=l.content,v=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,v,{x:p,y:h},{x:0,y:0},{width:u,height:c}),i[r]={data:v,pixelRatio:f,sdf:d,stretchX:m,stretchY:g,content:y}}n(null,i)}}this._spriteRequest=(i=e,r=this.map._requestManager,n=function(e,i){if(p._spriteRequest=null,e)p.fire(new t.ErrorEvent(e));else if(i)for(var r in i)p.imageManager.addImage(r,i[r]);p.imageManager.setLoaded(!0),p._availableImages=p.imageManager.listImages(),p.dispatcher.broadcast("setImages",p._availableImages),p.fire(new t.Event("data",{dataType:"style"}))},l=1<t.browser.devicePixelRatio?"@2x":"",u=t.getJSON(r.transformRequest(r.normalizeSpriteURL(i,l,".json"),t.ResourceType.SpriteJSON),(function(t,e){u=null,s||(s=t,o=e,h())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(i,l,".png"),t.ResourceType.SpriteImage),(function(t,e){c=null,s||(s=t,a=e,h())})),{cancel:function(){u&&(u.cancel(),u=null),c&&(c.cancel(),c=null)}})},br.prototype._validateLayer=function(e){var i=this.sourceCaches[e.source];if(i){var r=e.sourceLayer;if(r){var n=i.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},br.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()},br.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},br.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},br.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},br.prototype.update=function(e){if(this._loaded){var i=this._changed;if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(r.length||n.length)&&this._updateWorkerLayers(r,n),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];p.recalculate(e,this._availableImages),!p.isHidden(e.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,i&&this.fire(new t.Event("data",{dataType:"style"}))}},br.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={}}},br.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},br.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},br.prototype.setState=function(e){var i=this;if(this._checkLoaded(),mr(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=vi(e.layers);var r=function(e,i){if(!e)return[{command:_i.setStyle,args:[i]}];var r=[];try{if(!t.deepEqual(e.version,i.version))return[{command:_i.setStyle,args:[i]}];t.deepEqual(e.center,i.center)||r.push({command:_i.setCenter,args:[i.center]}),t.deepEqual(e.zoom,i.zoom)||r.push({command:_i.setZoom,args:[i.zoom]}),t.deepEqual(e.bearing,i.bearing)||r.push({command:_i.setBearing,args:[i.bearing]}),t.deepEqual(e.pitch,i.pitch)||r.push({command:_i.setPitch,args:[i.pitch]}),t.deepEqual(e.sprite,i.sprite)||r.push({command:_i.setSprite,args:[i.sprite]}),t.deepEqual(e.glyphs,i.glyphs)||r.push({command:_i.setGlyphs,args:[i.glyphs]}),t.deepEqual(e.transition,i.transition)||r.push({command:_i.setTransition,args:[i.transition]}),t.deepEqual(e.light,i.light)||r.push({command:_i.setLight,args:[i.light]});var n={},o=[];!function(e,i,r,n){var o,a,s,l;for(o in i=i||{},e=e||{})e.hasOwnProperty(o)&&(i.hasOwnProperty(o)||bi(o,r,n));for(o in i)i.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.deepEqual(e[o],i[o])||("geojson"===e[o].type&&"geojson"===i[o].type&&wi(e,i,o)?r.push({command:_i.setGeoJSONSourceData,args:[o,i[o].data]}):(s=i,bi(a=o,l=r,n),xi(a,s,l))):xi(o,i,r))}(e.sources,i.sources,o,n);var a=[];e.layers&&e.layers.forEach((function(t){n[t.source]?r.push({command:_i.removeLayer,args:[t.id]}):a.push(t)})),r=r.concat(o),function(e,i,r){i=i||[];var n,o,a,s,l,u,c,p=(e=e||[]).map(Ti),h=i.map(Ti),d=e.reduce(Ci,{}),f=i.reduce(Ci,{}),m=p.slice(),g=Object.create(null);for(o=n=0;n<p.length;n++)f.hasOwnProperty(a=p[n])?o++:(r.push({command:_i.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(o=n=0;n<h.length;n++)m[m.length-1-n]!==(a=h[h.length-1-n])&&(d.hasOwnProperty(a)?(r.push({command:_i.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,r.push({command:_i.addLayer,args:[f[a],u=m[m.length-n]]}),m.splice(m.length-n,0,a),g[a]=!0);for(n=0;n<h.length;n++)if(s=d[a=h[n]],l=f[a],!g[a]&&!t.deepEqual(s,l))if(t.deepEqual(s.source,l.source)&&t.deepEqual(s["source-layer"],l["source-layer"])&&t.deepEqual(s.type,l.type)){for(c in Si(s.layout,l.layout,r,a,null,_i.setLayoutProperty),Si(s.paint,l.paint,r,a,null,_i.setPaintProperty),t.deepEqual(s.filter,l.filter)||r.push({command:_i.setFilter,args:[a,l.filter]}),t.deepEqual(s.minzoom,l.minzoom)&&t.deepEqual(s.maxzoom,l.maxzoom)||r.push({command:_i.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Si(s[c],l[c],r,a,c.slice(6),_i.setPaintProperty):t.deepEqual(s[c],l[c])||r.push({command:_i.setLayerProperty,args:[a,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Si(s[c],l[c],r,a,c.slice(6),_i.setPaintProperty):t.deepEqual(s[c],l[c])||r.push({command:_i.setLayerProperty,args:[a,c,l[c]]}))}else r.push({command:_i.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],r.push({command:_i.addLayer,args:[l,u]})}(a,i.layers,r)}catch(e){console.warn("Unable to compute style diff:",e),r=[{command:_i.setStyle,args:[i]}]}return r}(this.serialize(),e).filter((function(t){return!(t.command in vr)}));if(0===r.length)return!1;var n=r.filter((function(t){return!(t.command in yr)}));if(0<n.length)throw new Error("Unimplemented: "+n.map((function(t){return t.command})).join(", ")+".");return r.forEach((function(t){"setTransition"!==t.command&&i[t.command].apply(i,t.args)})),this.stylesheet=e,!0},br.prototype.addImage=function(e,i){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,i),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},br.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},br.prototype.getImage=function(t){return this.imageManager.getImage(t)},br.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},br.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},br.prototype.addSource=function(e,i,r){var n=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!i.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(i).join(", ")+".");if(!(0<=["vector","raster","geojson","video","image"].indexOf(i.type)&&this._validate(t.validateStyle.source,"sources."+e,i,null,r))){this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);var o=this.sourceCaches[e]=new si(e,i,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}})),o.onAdd(this.map),this._changed=!0}},br.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var i in this._layers)if(this._layers[i].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+i+'" is using it.')));var r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},br.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},br.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},br.prototype.addLayer=function(e,i,r){void 0===r&&(r={}),this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with i
2d "'+n+'" already exists on this map')));else{var o;if("custom"===e.type){if(mr(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone$1(e),e=t.extend(e,{source:n})),this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}}),this._serializedLayers[o.id]=o.serialize()}var a=i?this._order.indexOf(i):this._order.length;if(i&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source&&"custom"!==o.type){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},br.prototype.moveLayer=function(e,i){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==i){var r=this._order.indexOf(e);this._order.splice(r,1);var n=i?this._order.indexOf(i):this._order.length;
vendor: 17,019 bytes, line 2
2i&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},br.prototype.removeLayer=function(e){this._checkLoaded();var i=this._layers[e];if(i){i.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},br.prototype.getLayer=function(t){return this._layers[t]},br.prototype.hasLayer=function(t){return t in this._layers},br.prototype.setLayerZoomRange=function(e,i,r){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===i&&n.maxzoom===r||(null!=i&&(n.minzoom=i),null!=r&&(n.maxzoom=r),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},br.prototype.setFilter=function(e,i,r){void 0===r&&(r={}),this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.deepEqual(n.filter,i))return null==i?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",i,null,r)||(n.filter=t.clone$1(i),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},br.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},br.prototype.setLayoutProperty=function(e,i,r,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(i),r)||(o.setLayoutProperty(i,r,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},br.prototype.getLayoutProperty=function(e,i){var r=this.getLayer(e);if(r)return r.getLayoutProperty(i);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},br.prototype.setPaintProperty=function(e,i,r,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(i),r)||(o.setPaintProperty(i,r,n)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},br.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},br.prototype.setFeatureState=function(e,i){this._checkLoaded();var r=e.source,n=e.sourceLayer,o=this.sourceCaches[r];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&n?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||n?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(n,e.id,i)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},br.prototype.removeFeatureState=function(e,i){this._checkLoaded();var r=e.source,n=this.sourceCaches[r];if(void 0!==n){var o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?i&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):n.removeFeatureState(a,e.id,i):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},br.prototype.getFeatureState=function(e){this._checkLoaded();var i=e.source,r=e.sourceLayer,n=this.sourceCaches[i];if(void 0!==n){if("vector"!==n.getSource().type||r)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),n.getFeatureState(r,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},br.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},br.prototype.serialize=function(){return t.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:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},br.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},br.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=[],d=this._order.length-1;0<=d;d--){var f=this._order[d];if(i(f))for(var m=n.length-1;0<=m;m--){var g=n[m].feature;if(r[g.layer.id]<d)break;h.push(g),n.pop()}else for(var y=0,v=t;y<v.length;y+=1){var _=v[y][f];if(_)for(var x=0,b=_;x<b.length;x+=1)h.push(b[x].feature)}}return h},br.prototype.queryRenderedFeatures=function(e,i,r){i&&i.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",i.filter,null,i);var n={};if(i&&i.layers){if(!Array.isArray(i.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=i.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[l.source]=!0}}var u=[];for(var c in i.availableImages=this._availableImages,this.sourceCaches)i.layers&&!n[c]||u.push($(this.sourceCaches[c],this._layers,this._serializedLayers,e,i,r));return this.placement&&u.push(function(t,e,i,r,n,o,a){for(var s={},l=o.queryRenderedSymbols(r),u=[],c=0,p=Object.keys(l).map(Number);c<p.length;c+=1)u.push(a[p[c]]);u.sort(tt);for(var h=function(){var i=f[d],r=i.featureIndex.lookupSymbolFeatures(l[i.bucketInstanceId],e,i.bucketIndex,i.sourceLayerIndex,n.filter,n.layers,n.availableImages,t);for(var o in r){var a=s[o]=s[o]||[],u=r[o];u.sort((function(t,e){var r=i.featureSortOrder;if(r){var n=r.indexOf(t.featureIndex);return r.indexOf(e.featureIndex)-n}return e.featureIndex-t.featureIndex}));for(var c=0,p=u;c<p.length;c+=1)a.push(p[c])}},d=0,f=u;d<f.length;d+=1)h();function m(e){s[e].forEach((function(r){var n=r.feature,o=i[t[e].source].getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=o}))}for(var g in s)m(g);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,i,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},br.prototype.querySourceFeatures=function(e,i){i&&i.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",i.filter,null,i);var r=this.sourceCaches[e];return r?function(t,e){for(var i=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),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,e))}return r}(r,i):[]},br.prototype.addSourceType=function(t,e,i){return br.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(br.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},br.prototype.getLight=function(){return this.light.getLight()},br.prototype.setLight=function(e,i){void 0===i&&(i={}),this._checkLoaded();var r=this.light.getLight(),n=!1;for(var o in e)if(!t.deepEqual(e[o],r[o])){n=!0;break}if(n){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,i),this.light.updateTransitions(a)}},br.prototype._validate=function(e,i,r,n,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&mr(this,e.call(t.validateStyle,t.extend({key:i,style:this.serialize(),value:r,styleSpec:t.styleSpec},n)))},br.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var i in this.sourceCaches)this.sourceCaches[i].clearTiles(),this.sourceCaches[i].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},br.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},br.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},br.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},br.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},br.prototype._updatePlacement=function(e,i,r,n,o){void 0===o&&(o=!1);for(var a=!1,s=!1,l={},u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];if("symbol"===p.type){if(!l[p.source]){var h=this.sourceCaches[p.source];l[p.source]=h.getRenderableIds(!0).map((function(t){return h.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var d=this.crossTileSymbolIndex.addLayer(p,l[p.source],e.center.lng);a=a||d}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new ur(e,this._order,o,i,r,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(var f=0,m=this._order;f<m.length;f+=1){var g=this._layers[m[f]];"symbol"===g.type&&this.placement.updateLayerOpacities(g,l[g.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},br.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},br.prototype.getImages=function(t,e,i){this.imageManager.getImages(e.icons,i),this._updateTilesForChangedImages();var r=this.sourceCaches[e.source];r&&r.setDependencies(e.tileID.key,e.type,e.icons)},br.prototype.getGlyphs=function(t,e,i){this.glyphManager.getGlyphs(e.stacks,i)},br.prototype.getResource=function(e,i,r){return t.makeRequest(i,r)},br);function br(e,i){var r=this;void 0===i&&(i={}),gr.call(this),this.map=e,this.dispatcher=new E(gi(),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new x(e._requestManager,i.localIdeographFontFamily),this.lineAtlas=new w(256,512),this.crossTileSymbolIndex=new fr,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var n=this;this._rtlTextPluginCallback=br.registerForPluginStateChange((function(e){n.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},(function(e,i){if(t.triggerPluginCompletionEvent(e),i&&i.every((function(t){return t})))for(var r in n.sourceCaches)n.sourceCaches[r].reload()}))})),this.on("data",(function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=r.sourceCaches[t.sourceId];if(e){var i=e.getSource();if(i&&i.vectorLayerIds)for(var n in r._layers){var o=r._layers[n];o.source===i.id&&r._validateLayer(o)}}}}))}xr.getSourceType=function(t){return Z[t]},xr.setSourceType=function(t,e){Z[t]=e},xr.registerForPluginStateChange=t.registerForPluginStateChange;var wr=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Sr=Kr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Tr=Kr("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);}"),Cr=Kr("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);}"),Ir=Kr("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
2/(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);}"),Er=Kr("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);}"),Mr=Kr("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;}"),Ar=Kr("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;}"),Lr=Kr("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;}"),kr=Kr("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=Kr("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);}"),Dr=Kr("#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);}"),zr=Kr("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;}"),Or=Kr("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;}"),Nr=Kr("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);}"),Rr=Kr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),Br=Kr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixe
2l_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;}"),jr=Kr("#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 float u_maxzoom;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 exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*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;}"),Fr=Kr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Ur=Kr("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);}"),Vr=Kr("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 float v_lineprogress;\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,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\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_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\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;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;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);}"),qr=Kr("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;}"),Gr=Kr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
2uniform 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);}"),Zr=Kr("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;}"),Hr=Kr("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));}"),Wr=Kr("#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);}"),Yr=Kr("#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;
2gl_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 Kr(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),a=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+"\
2nvarying "+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:a}}function Xr(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}var Jr=Object.freeze({__proto__:null,prelude:Sr,background:Tr,backgroundPattern:Cr,circle:Ir,clippingMask:Er,heatmap:Mr,heatmapTexture:Ar,collisionBox:Lr,collisionCircle:kr,debug:Pr,fill:Dr,fillOutline:zr,fillOutlinePattern:Or,fillPattern:Nr,fillExtrusion:Rr,fillExtrusionPattern:Br,hillshadePrepare:jr,hillshade:Fr,line:Ur,lineGradient:Vr,linePattern:qr,lineSDF:Gr,raster:Zr,symbolIcon:Hr,symbolSDF:Wr,symbolTextAndIcon:Yr});function Qr(t){for(var e=[],i=0;i<t.length;i++)if(null!==t[i]){var r=t[i].split(" ");e.push(r.pop())}return e}function $r(t,e,i,r,n,o){var a=t.gl;this.program=a.createProgram();for(var s=Qr(i.staticAttributes),l=r?r.getBinderAttributes():[],u=s.concat(l),c=i.staticUniforms?Qr(i.staticUniforms):[],p=r?r.getBinderUniforms():[],h=[],d=0,f=c.concat(p);d<f.length;d+=1){var m=f[d];h.indexOf(m)<0&&h.push(m)}var g=r?r.defines():[];o&&g.push("#define OVERDRAW_INSPECTOR;");var y=g.concat(Sr.fragmentSource,i.fragmentSource).join("\n"),v=g.concat(Sr.vertexSource,i.vertexSource).join("\n"),_=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(_,y),a.compileShader(_),a.attachShader(this.program,_);var x=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(x,v),a.compileShader(x),a.attachShader(this.program,x),this.attributes={};var b={};this.numAttributes=u.length;for(var w=0;w<this.numAttributes;w++)u[w]&&(a.bindAttribLocation(this.program,w,u[w]),this.attributes[u[w]]=w);a.linkProgram(this.program),a.deleteShader(x),a.deleteShader(_);for(var S=0;S<h.length;S++){var T=h[S];if(T&&!b[T]){var C=a.getUniformLocation(this.program,T);C&&(b[T]=C)}}this.fixedUniforms=n(t,b),this.binderUniforms=r?r.getUniforms(t,b):[]}}}function tn(t,e,i){var r=1/Vi(i,1,e.transform.tileZoom),n=Math.pow(2,i.tileID.overscaledZ),o=i.tileSize*Math.pow(2,e.transform.tileZoom)/n,a=o*(i.tileID.canonical.x+i.tileID.wrap*n),s=o*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:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}function en(e,i,r,n){var o=i.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(l,-i.transform.angle),t.transformMat3(s,s,l);var u=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+r,u_opacity:n}}function rn(t){return{u_matrix:t}}function nn(e,i,r,n){return t.extend(rn(e),tn(r,i,n))}function on(e,i,r,n){var o,a,s=e.transform;if("map"===n.paint.get("circle-pitch-alignment")){var l=Vi(r,1,s.zoom);o=!0,a=[l,l]}else o=!1,a=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(i.posMatrix,r,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:a}}function an(t){return{u_matrix:t}}function sn(e,i,r){var n=e.transform;return{u_matrix:cn(e,i,r),u_ratio:1/Vi(i,1,n.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}}
2Xr.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)},Xr.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,d=i;h<d.length;h+=1)d[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,n);for(var f=0,m=i;f<m.length;f+=1){var g=m[f];g.bind(),g.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},Xr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)},$r.prototype.draw=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m){var g,y=t.gl;if(!this.failedToCreate){for(var v in t.program.set(this.program),t.setDepthMode(i),t.setStencilMode(r),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[v].set(a[v]);d&&d.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var _=((g={})[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g[e]),x=0,b=c.get();x<b.length;x+=1){var w=b[x],S=w.vaos||(w.vaos={});(S[s]||(S[s]=new Xr)).bind(t,this,l,d?d.getPaintVertexBuffers():[],u,w.vertexOffset,f,m),y.drawElements(e,w.primitiveLength*_,y.UNSIGNED_SHORT,w.primitiveOffset*_*2)}}};var ln=function(t,e,i){return void 0===i&&(i=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:i}};function un(t,e){return 1/Vi(t,1,e.tileZoom)}function cn(t,e,i){return t.translatePosMatrix(e.tileID.posMatrix,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}function pn(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<(a=n.paint.get("raster-saturation"))?1-1/(1.001-a):-a,u_contrast_factor:0<(o=n.paint.get("raster-contrast"))?1/(1-o):1+o,u_spin_weights:function(t){t*=Math.PI/180;var e=Math.sin(t),i=Math.cos(t);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}(n.paint.get("raster-hue-rotate"))};var o,a}function hn(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 dn(e,i,r,n,o,a,s,l,u,c,p){var h=o.transform;return t.extend(hn(e,i,r,n,o,a,s,l,u,c),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})}var fn,mn={fillExtrusion:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_lightpos:new t.Uniform3f(e,i.u_lightpos),u_lightintensity:new t.Uniform1f(e,i.u_lightintensity),u_lightcolor:new t.Uniform3f(e,i.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,i.u_vertical_gradient),u_opacity:new t.Uniform1f(e,i.u_opacity)}},fillExtrusionPattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_lightpos:new t.Uniform3f(e,i.u_lightpos),u_lightintensity:new t.Uniform1f(e,i.u_lightintensity),u_lightcolor:new t.Uniform3f(e,i.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,i.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,i.u_height_factor),u_image:new t.Uniform1i(e,i.u_image),u_texsize:new t.Uniform2f(e,i.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade),u_opacity:new t.Uniform1f(e,i.u_opacity)}},fill:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},fillPattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_image:new t.Uniform1i(e,i.u_image),u_texsize:new t.Uniform2f(e,i.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},fillOutline:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_world:new t.Uniform2f(e,i.u_world)}},fillOutlinePattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_world:new t.Uniform2f(e,i.u_world),u_image:new t.Uniform1i(e,i.u_image),u_texsize:new t.Uniform2f(e,i.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},circle:function(e,i){return{u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,i.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,i.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},collisionBox:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,i.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,i.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,i.u_overscale_factor)}},collisionCircle:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,i.u_inv_matrix
2),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,i.u_viewport_size)}},debug:function(e,i){return{u_color:new t.UniformColor(e,i.u_color),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_overlay:new t.Uniform1i(e,i.u_overlay),u_overlay_scale:new t.Uniform1f(e,i.u_overlay_scale)}},clippingMask:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},heatmap:function(e,i){return{u_extrude_scale:new t.Uniform1f(e,i.u_extrude_scale),u_intensity:new t.Uniform1f(e,i.u_intensity),u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},heatmapTexture:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_world:new t.Uniform2f(e,i.u_world),u_image:new t.Uniform1i(e,i.u_image),u_color_ramp:new t.Uniform1i(e,i.u_color_ramp),u_opacity:new t.Uniform1f(e,i.u_opacity)}},hillshade:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_image:new t.Uniform1i(e,i.u_image),u_latrange:new t.Uniform2f(e,i.u_latrange),u_light:new t.Uniform2f(e,i.u_light),u_shadow:new t.UniformColor(e,i.u_shadow),u_highlight:new t.UniformColor(e,i.u_highlight),u_accent:new t.UniformColor(e,i.u_accent)}},hillshadePrepare:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_image:new t.Uniform1i(e,i.u_image),u_dimension:new t.Uniform2f(e,i.u_dimension),u_zoom:new t.Uniform1f(e,i.u_zoom),u_maxzoom:new t.Uniform1f(e,i.u_maxzoom),u_unpack:new t.Uniform4f(e,i.u_unpack)}},line:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels)}},lineGradient:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels),u_image:new t.Uniform1i(e,i.u_image)}},linePattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_texsize:new t.Uniform2f(e,i.u_texsize),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_image:new t.Uniform1i(e,i.u_image),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},lineSDF:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,i.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,i.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,i.u_sdfgamma),u_image:new t.Uniform1i(e,i.u_image),u_tex_y_a:new t.Uniform1f(e,i.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,i.u_tex_y_b),u_mix:new t.Uniform1f(e,i.u_mix)}},raster:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_tl_parent:new t.Uniform2f(e,i.u_tl_parent),u_scale_parent:new t.Uniform1f(e,i.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,i.u_buffer_scale),u_fade_t:new t.Uniform1f(e,i.u_fade_t),u_opacity:new t.Uniform1f(e,i.u_opacity),u_image0:new t.Uniform1i(e,i.u_image0),u_image1:new t.Uniform1i(e,i.u_image1),u_brightness_low:new t.Uniform1f(e,i.u_brightness_low),u_brightness_high:new t.Uniform1f(e,i.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,i.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,i.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,i.u_spin_weights)}},symbolIcon:function(e,i){return{u_is_size_zoom_constant:new t.Uniform1i(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,i.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,i.u_size_t),u_size:new t.Uniform1f(e,i.u_size),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,i.u_pitch),u_rotate_symbol:new t.Uniform1i(e,i.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,i.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,i.u_fade_change),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,i.u_label_plane_matrix
2),u_coord_matrix:new t.UniformMatrix4f(e,i.u_coord_matrix),u_is_text:new t.Uniform1i(e,i.u_is_text),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_texsize:new t.Uniform2f(e,i.u_texsize),u_texture:new t.Uniform1i(e,i.u_texture)}},symbolSDF:function(e,i){return{u_is_size_zoom_constant:new t.Uniform1i(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,i.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,i.u_size_t),u_size:new t.Uniform1f(e,i.u_size),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,i.u_pitch),u_rotate_symbol:new t.Uniform1i(e,i.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,i.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,i.u_fade_change),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,i.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,i.u_coord_matrix),u_is_text:new t.Uniform1i(e,i.u_is_text),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_texsize:new t.Uniform2f(e,i.u_texsize),u_texture:new t.Uniform1i(e,i.u_texture),u_gamma_scale:new t.Uniform1f(e,i.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,i.u_is_halo)}},symbolTextAndIcon:function(e,i){return{u_is_size_zoom_constant:new t.Uniform1i(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,i.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,i.u_size_t),u_size:new t.Uniform1f(e,i.u_size),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,i.u_pitch),u_rotate_symbol:new t.Uniform1i(e,i.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,i.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,i.u_fade_change),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,i.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,i.u_coord_matrix),u_is_text:new t.Uniform1i(e,i.u_is_text),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_texsize:new t.Uniform2f(e,i.u_texsize),u_texsize_icon:new t.Uniform2f(e,i.u_texsize_icon),u_texture:new t.Uniform1i(e,i.u_texture),u_texture_icon:new t.Uniform1i(e,i.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,i.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,i.u_is_halo)}},background:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_opacity:new t.Uniform1f(e,i.u_opacity),u_color:new t.UniformColor(e,i.u_color)}},backgroundPattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_opacity:new t.Uniform1f(e,i.u_opacity),u_image:new t.Uniform1i(e,i.u_image),u_pattern_tl_a:new t.Uniform2f(e,i.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,i.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,i.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,i.u_pattern_br_b),u_texsize:new t.Uniform2f(e,i.u_texsize),u_mix:new t.Uniform1f(e,i.u_mix),u_pattern_size_a:new t.Uniform2f(e,i.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,i.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,i.u_scale_a),u_scale_b:new t.Uniform1f(e,i.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,i.u_tile_units_to_pixels)}}};function gn(e,i,r,n,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),p=[],h=0,d=0,f=0;f<n.length;f++){var m=n[f],g=i.getTile(m),y=g.getBucket(r);if(y){var v=m.posMatrix;0===o[0]&&0===o[1]||(v=e.translatePosMatrix(m.posMatrix,g,o,a));var _=s?y.textCollisionBox:y.iconCollisionBox,x=y.collisionCircleArray;if(0<x.length){var b=t.create(),w=v;t.mul(b,y.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,y.placementViewportMatrix),p.push({circleArray:x,circleOffset:d,transform:w,invTransform:b}),d=h+=x.length/4}_&&c.draw(l,u.LINES,ei.disabled,ii.disabled,e.colorModeForRenderPass(),ni.disabled,(S=v,I=Vi(C=g,1,(T=e.transform).zoom),E=Math.pow(2,T.zoom-C.tileID.overscaledZ),M=C.tileID.overscaleFactor(),{u_matrix:S,u_camera_to_center_distance:T.cameraToCenterDistance,u_pixels_to_tile_units:I,u_extrude_scale:[T.pixelsToGLUnits[0]/(I*E),T.pixelsToGLUnits[1]/(I*E)],u_overscale_factor:M}),r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}var S,T,C,I,E,M,A;if(s&&p.length){var L=e.useProgram("collisionCircle"),k=new t.StructArrayLayout2f1f2i16;
2k.resize(4*h),k._trim();for(var P=0,D=0,z=p;D<z.length;D+=1)for(var O=z[D],N=0;N<O.circleArray.length/4;N++){var R=4*N,B=O.circleArray[0+R],j=O.circleArray[1+R],F=O.circleArray[2+R],U=O.circleArray[3+R];k.emplace(P++,B,j,F,U,0),k.emplace(P++,B,j,F,U,1),k.emplace(P++,B,j,F,U,2),k.emplace(P++,B,j,F,U,3)}(!fn||fn.length<2*h)&&(fn=function(){var e=2*h,i=new t.StructArrayLayout3ui6;i.resize(e),i._trim();for(var r=0;r<e;r++){var n=6*r;i.uint16[0+n]=4*r+0,i.uint16[1+n]=4*r+1,i.uint16[2+n]=4*r+2,i.uint16[3+n]=4*r+2,i.uint16[4+n]=4*r+3,i.uint16[5+n]=4*r+0}return i}());for(var V=l.createIndexBuffer(fn,!0),q=l.createVertexBuffer(k,t.collisionCircleLayout.members,!0),G=0,Z=p;G<Z.length;G+=1){var H=Z[G],W={u_matrix:H.transform,u_inv_matrix:H.invTransform,u_camera_to_center_distance:(A=e.transform).cameraToCenterDistance,u_viewport_size:[A.width,A.height]};L.draw(l,u.TRIANGLES,ei.disabled,ii.disabled,e.colorModeForRenderPass(),ni.disabled,W,r.id,q,V,t.SegmentVector.simpleSegment(0,2*H.circleOffset,H.circleArray.length,H.circleArray.length/2),null,e.transform.zoom,null,null,null)}q.destroy(),V.destroy()}}var yn=t.identity(new Float32Array(16));function vn(e,i,r,n,o,a,s,l,u,c,p){var h,d,f,m,g,y,v,_,x,b,w=e.text.placedSymbolArray,S=e.text.dynamicLayoutVertexArray,T=e.icon.dynamicLayoutVertexArray,C={};S.clear();for(var I=0;I<w.length;I++){var E=w.get(I),M=E.hidden||!E.crossTileID||e.allowVerticalPlacement&&!E.placedOrientation?null:n[E.crossTileID];if(M){var A=new t.Point(E.anchorX,E.anchorY),L=Li(A,r?l:s),k=ki(a.cameraToCenterDistance,L.signedDistanceFromCamera),P=o.evaluateSizeForFeature(e.textSizeData,c,E)*k/t.ONE_EM;r&&(P*=e.tilePixelRatio/u);for(var D=(h=M.anchor,d=M.width,f=M.height,m=M.textOffset,g=M.textBoxScale,y=P,_=-((v=t.getAnchorAlignment(h)).horizontalAlign-.5)*d,x=-(v.verticalAlign-.5)*f,b=t.evaluateVariableOffset(h,m),new t.Point((_/g+b[0])*y,(x/g+b[1])*y)),z=r?Li(A.add(D),s).point:L.point.add(i?D.rotate(-a.angle):D),O=e.allowVerticalPlacement&&E.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,N=0;N<E.numGlyphs;N++)t.addDynamicAttributes(S,z,O);p&&0<=E.associatedIconIndex&&(C[E.associatedIconIndex]={shiftedAnchor:z,angle:O})}else ji(E.numGlyphs,S)}if(p){T.clear();for(var R=e.icon.placedSymbolArray,B=0;B<R.length;B++){var j=R.get(B);if(j.hidden)ji(j.numGlyphs,T);else{var F=C[B];if(F)for(var U=0;U<j.numGlyphs;U++)t.addDynamicAttributes(T,F.shiftedAnchor,F.angle);else ji(j.numGlyphs,T)}}e.icon.dynamicLayoutVertexBuffer.updateData(T)}e.text.dynamicLayoutVertexBuffer.updateData(S)}function _n(e,i,r,n,o,a,s,l,u,c,p,h){for(var d=e.context,f=d.gl,m=e.transform,g="map"===l,y="map"===u,v=g&&"point"!==r.layout.get("symbol-placement"),_=g&&!y&&!v,x=void 0!==r.layout.get("symbol-sort-key").constantOr(1),b=e.depthModeForSublayer(0,ei.ReadOnly),w=r.layout.get("text-variable-anchor"),S=[],T=0,C=n;T<C.length;T+=1){var I=C[T],E=i.getTile(I),M=E.getBucket(r);if(M){var A=o?M.text:M.icon;if(A&&A.segments.get().length){var L=A.programConfigurations.get(r.id),k=o||M.sdfIcons,P=o?M.textSizeData:M.iconSizeData,D=y||0!==m.pitch,z=e.useProgram((ht=k,dt=o,M.iconsInText&&dt?"symbolTextAndIcon":ht?"symbolSDF":"symbolIcon"),L),O=t.evaluateSizeForZoom(P,m.zoom),N=void 0,R=[0,0],B=void 0,j=void 0,F=null,U=void 0;if(o)B=E.glyphAtlasTexture,j=f.LINEAR,N=E.glyphAtlasTexture.size,M.iconsInText&&(R=E.imageAtlasTexture.size,F=E.imageAtlasTexture,U=D||e.options.rotating||e.options.zooming||"composite"===P.kind||"camera"===P.kind?f.LINEAR:f.NEAREST);else{var V=1!==r.layout.get("icon-size").constantOr(0)||M.iconsNeedLinear;B=E.imageAtlasTexture,j=k||e.options.rotating||e.options.zooming||V||D?f.LINEAR:f.NEAREST,N=E.imageAtlasTexture.size}var q=Vi(E,1,e.transform.zoom),G=Mi(I.posMatrix,y,g,e.transform,q),Z=Ai(I.posMatrix,y,g,e.transform,q),H=w&&M.hasTextData(),W="none"!==r.layout.get("icon-text-fit")&&H&&M.hasIconData();v&&Pi(M,I.posMatrix,e,o,G,Z,y,c);var Y=e.translatePosMatrix(I.posMatrix,E,a,s),K=v||o&&w||W?yn:G,X=e.translatePosMatrix(Z,E,a,s,!0),J=k&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),Q={program:z,buffers:A,uniformValues:k?M.iconsInText?(it=P.kind,rt=O,nt=_,ot=y,at=e,st=Y,lt=K,ut=X,ct=N,pt=R,t.extend(dn(it,rt,nt,ot,at,st,lt,ut,!0,ct,!0),{u_texsize_icon:pt,u_texture_icon:1})):dn(P.kind,O,_,y,e,Y,K,X,o,N,!0):hn(P.kind,O,_,y,e,Y,K,X,o,N),atlasTexture:B,atlasTextureIcon:F,atlasInterpolation:j,atlasInterpolationIcon:U,isSDF:k,hasHalo:J};if(x)for(var $=0,tt=A.segments.get();$<tt.length;$+=1){var et=tt[$];S.push({segments:new t.SegmentVector([et]),sortKey:et.sortKey,state:Q})}else S.push({segments:A.segments,sortKey:0,state:Q})}}}var it,rt,nt,ot,at,st,lt,ut,ct,pt,ht,dt;x&&S.sort((function(t,e){return t.sortKey-e.sortKey}
2));for(var ft=0,mt=S;ft<mt.length;ft+=1){var gt=mt[ft],yt=gt.state;if(d.activeTexture.set(f.TEXTURE0),yt.atlasTexture.bind(yt.atlasInterpolation,f.CLAMP_TO_EDGE),yt.atlasTextureIcon&&(d.activeTexture.set(f.TEXTURE1),yt.atlasTextureIcon&&yt.atlasTextureIcon.bind(yt.atlasInterpolationIcon,f.CLAMP_TO_EDGE)),yt.isSDF){var vt=yt.uniformValues;yt.hasHalo&&(vt.u_is_halo=1,xn(yt.buffers,gt.segments,r,e,yt.program,b,p,h,vt)),vt.u_is_halo=0}xn(yt.buffers,gt.segments,r,e,yt.program,b,p,h,yt.uniformValues)}}function xn(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 bn(e,i,r,n,o,a,s){var l,u,c,p,h,d,f,m,g,y,v=e.context.gl,_=r.paint.get("fill-pattern"),x=_&&_.constantOr(1),b=r.getCrossfadeParameters();l=s?(u=x&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",v.LINES):(u=x?"fillPattern":"fill",v.TRIANGLES);for(var w=0,S=n;w<S.length;w+=1){var T=S[w],C=i.getTile(T);if(!x||C.patternsLoaded()){var I=C.getBucket(r);if(I){var E=I.programConfigurations.get(r.id),M=e.useProgram(u,E);x&&(e.context.activeTexture.set(v.TEXTURE0),C.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),E.updatePaintBuffers(b));var A=_.constantOr(null);if(A&&C.imageAtlas){var L=C.imageAtlas,k=L.patternPositions[A.to.toString()],P=L.patternPositions[A.from.toString()];k&&P&&E.setConstantPatternPositions(k,P)}var D=e.translatePosMatrix(T.posMatrix,C,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(s){p=I.indexBuffer2,h=I.segments2;var z=[v.drawingBufferWidth,v.drawingBufferHeight];c="fillOutlinePattern"===u&&x?(d=D,f=e,m=b,g=C,y=z,t.extend(nn(d,f,m,g),{u_world:y})):{u_matrix:D,u_world:z}}else p=I.indexBuffer,h=I.segments,c=x?nn(D,e,b,C):rn(D);M.draw(e.context,l,o,e.stencilModeForClipping(T),a,ni.disabled,c,r.id,I.layoutVertexBuffer,p,h,r.paint,e.transform.zoom,E)}}}}function wn(e,i,r,n,o,a,s){for(var l=e.context,u=l.gl,c=r.paint.get("fill-extrusion-pattern"),p=c.constantOr(1),h=r.getCrossfadeParameters(),d=r.paint.get("fill-extrusion-opacity"),f=0,m=n;f<m.length;f+=1){var g=m[f],y=i.getTile(g),v=y.getBucket(r);if(v){var _=v.programConfigurations.get(r.id),x=e.useProgram(p?"fillExtrusionPattern":"fillExtrusion",_);p&&(e.context.activeTexture.set(u.TEXTURE0),y.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),_.updatePaintBuffers(h));var b=c.constantOr(null);if(b&&y.imageAtlas){var w=y.imageAtlas,S=w.patternPositions[b.to.toString()],T=w.patternPositions[b.from.toString()];S&&T&&_.setConstantPatternPositions(S,T)}var C=e.translatePosMatrix(g.posMatrix,y,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),I=r.paint.get("fill-extrusion-vertical-gradient"),E=p?(M=C,A=e,L=I,k=d,P=g,D=h,z=y,t.extend(en(M,A,L,k),tn(D,A,z),{u_height_factor:-Math.pow(2,P.overscaledZ)/z.tileSize/8})):en(C,e,I,d);x.draw(l,l.gl.TRIANGLES,o,a,s,ni.backCCW,E,r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,r.paint,e.transform.zoom,_)}}var M,A,L,k,P,D,z}function Sn(e,i,r,n,o,a){var s=e.context,l=s.gl,u=i.fbo;if(u){var c=e.useProgram("hillshade");s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u.colorAttachment.get());var p=function(e,i,r){var n=r.paint.get("hillshade-shadow-color"),o=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);var l,u,c,p=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(i.tileID.toUnwrapped(),p),u_image:0,u_latrange:(l=i.tileID,u=Math.pow(2,l.canonical.z),c=l.canonical.y,[new t.MercatorCoordinate(0,c/u).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/u).toLngLat().lat]),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:n,u_highlight:o,u_accent:a}}(e,i,r);c.draw(s,l.TRIANGLES,n,o,a,ni.disabled,p,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}
vendor: 5,061 bytes, line 2
2function Tn(e,i,r,n,o,a,s){var l,u,c,p,h,d=e.context,f=d.gl,m=i.dem;if(m&&m.data){var g=m.dim,y=m.stride,v=m.getPixels();if(d.activeTexture.set(f.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||e.getTileTexture(y),i.demTexture){var _=i.demTexture;_.update(v,{premultiply:!1}),_.bind(f.NEAREST,f.CLAMP_TO_EDGE)}else i.demTexture=new t.Texture(d,v,f.RGBA,{premultiply:!1}),i.demTexture.bind(f.NEAREST,f.CLAMP_TO_EDGE);d.activeTexture.set(f.TEXTURE0);var x=i.fbo;if(!x){var b=new t.Texture(d,{width:g,height:g,data:null},f.RGBA);b.bind(f.LINEAR,f.CLAMP_TO_EDGE),(x=i.fbo=d.createFramebuffer(g,g,!0)).colorAttachment.set(b.texture)}d.bindFramebuffer.set(x.framebuffer),d.viewport.set([0,0,g,g]),e.useProgram("hillshadePrepare").draw(d,f.TRIANGLES,o,a,s,ni.disabled,(l=i.tileID,c=n,p=(u=m).stride,h=t.create(),t.ortho(h,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(h,h,[0,-t.EXTENT,0]),{u_matrix:h,u_image:1,u_dimension:[p,p],u_zoom:l.overscaledZ,u_maxzoom:c,u_unpack:u.getUnpackVector()}),r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function Cn(e,i,r,n,o){var a=n.paint.get("raster-fade-duration");if(0<a){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=i?(s-i.timeAdded)/a:-1,c=r.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!i||Math.abs(i.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),d=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&1<=l&&(e.refreshedUponExpiration=!1),i?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var In=new t.Color(1,0,0,1),En=new t.Color(0,1,0,1),Mn=new t.Color(0,0,1,1),An=new t.Color(1,0,1,1),Ln=new t.Color(0,1,1,1);function kn(t,e,i,r){Dn(t,0,e+i/2,t.transform.width,i,r)}function Pn(t,e,i,r){Dn(t,e-i/2,0,i,t.transform.height,r)}function Dn(e,i,r,n,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(i*t.browser.devicePixelRatio,r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function zn(e,i,r){var n=e.context,o=n.gl,a=r.posMatrix,s=e.useProgram("debug"),l=ei.disabled,u=ii.disabled,c=e.colorModeForRenderPass();n.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(n,o.LINE_STRIP,l,u,c,ni.disabled,ln(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=i.getTileByID(r.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),d=i.getTile(r).tileSize,f=512/Math.min(d,512)*(r.overscaledZ/e.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=" => "+r.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)}(e,m+" "+h+"kb"),s.draw(n,o.TRIANGLES,l,u,ri.alphaBlended,ni.disabled,ln(a,t.Color.transparent,f),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}function On(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 fr,this.gpuTimers={}}var Nn={symbol:function(e,i,r,n,o){if("translucent"===e.renderPass){var a=ii.disabled,s=e.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(e,i,r,n,o,a,s){for(var l=i.transform,u="map"===o,c="map"===a,p=0,h=e;p<h.length;p+=1){var d=h[p],f=n.getTile(d),m=f.getBucket(r);if(m&&m.text&&m.text.segments.get().length){var g=t.evaluateSizeForZoom(m.textSizeData,l.zoom),y=Vi(f,1,i.transform.zoom),v=Mi(d.posMatrix,c,u,i.transform,y),_="none"!==r.layout.get("icon-text-fit")&&m.hasIconData();if(g){var x=Math.pow(2,l.zoom-f.tileID.overscaledZ);vn(m,u,c,s,t.symbolSize,l,v,d.posMatrix,x,g,_)}}}}(n,e,r,i,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&_n(e,i,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&_n(e,i,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),i.map.showCollisionBoxes&&(gn(e,i,r,n,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),gn(e,i,r,n,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))}},circle:function(e,i,r,n){if("translucent"===e.renderPass){var o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=void 0!==r.layout.get("
2circle-sort-key").constantOr(1);if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){for(var u=e.context,c=u.gl,p=e.depthModeForSublayer(0,ei.ReadOnly),h=ii.disabled,d=e.colorModeForRenderPass(),f=[],m=0;m<n.length;m++){var g=n[m],y=i.getTile(g),v=y.getBucket(r);if(v){var _=v.programConfigurations.get(r.id),x={programConfiguration:_,program:e.useProgram("circle",_),layoutVertexBuffer:v.layoutVertexBuffer,indexBuffer:v.indexBuffer,uniformValues:on(e,g,y,r)};if(l)for(var b=0,w=v.segments.get();b<w.length;b+=1){var S=w[b];f.push({segments:new t.SegmentVector([S]),sortKey:S.sortKey,state:x})}else f.push({segments:v.segments,sortKey:0,state:x})}}l&&f.sort((function(t,e){return t.sortKey-e.sortKey}));for(var T=0,C=f;T<C.length;T+=1){var I=C[T],E=I.state;E.program.draw(u,c.TRIANGLES,p,h,d,ni.disabled,E.uniformValues,r.id,E.layoutVertexBuffer,E.indexBuffer,I.segments,r.paint,e.transform.zoom,E.programConfiguration)}}}},heatmap:function(e,i,r,n){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=ii.disabled,l=new ri([a.ONE,a.ONE],t.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,a,s=i.heatmapFbo;if(s)r.bindTexture(r.TEXTURE_2D,s.colorAttachment.get()),t.bindFramebuffer.set(s.framebuffer);else{var l=r.createTexture();r.bindTexture(r.TEXTURE_2D,l),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),n=l,o=s=i.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),(a=t.gl).texImage2D(a.TEXTURE_2D,0,a.RGBA,e.width/4,e.height/4,0,a.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),o.colorAttachment.set(n)}}(o,e,r),o.clear({color:t.Color.transparent});for(var u=0;u<n.length;u++){var c=n[u];if(!i.hasRenderableParent(c)){var p=i.getTile(c),h=p.getBucket(r);if(h){var d=h.programConfigurations.get(r.id);e.useProgram("heatmap",d).draw(o,a.TRIANGLES,ei.disabled,s,l,ni.disabled,(f=c.posMatrix,m=p,g=e.transform.zoom,y=r.paint.get("heatmap-intensity"),{u_matrix:f,u_extrude_scale:Vi(m,1,g),u_intensity:y}),r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,r.paint,e.transform.zoom,d)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,i){var r=e.context,n=r.gl,o=i.heatmapFbo;if(o){r.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(n.TEXTURE1);var a=i.colorRampTexture;(a=a||(i.colorRampTexture=new t.Texture(r,i.colorRamp,n.RGBA))).bind(n.LINEAR,n.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,n.TRIANGLES,ei.disabled,ii.disabled,e.colorModeForRenderPass(),ni.disabled,function(e,i){var r=t.create();t.ortho(r,0,e.width,e.height,0,0,1);var n=e.context.gl;return{u_matrix:r,u_world:[n.drawingBufferWidth,n.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:i.paint.get("heatmap-opacity")}}(e,i),i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom)}}(e,r));var f,m,g,y},line:function(e,i,r,n){if("translucent"===e.renderPass){var o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,ei.ReadOnly),l=e.colorModeForRenderPass(),u=r.paint.get("line-dasharray"),c=r.paint.get("line-pattern"),p=c.constantOr(1),h=r.paint.get("line-gradient"),d=r.getCrossfadeParameters(),f=p?"linePattern":u?"lineSDF":h?"lineGradient":"line",m=e.context,g=m.gl,y=!0;if(h){m.activeTexture.set(g.TEXTURE0);var v=r.gradientTexture;if(!r.gradient)return;(v=v||(r.gradientTexture=new t.Texture(m,r.gradient,g.RGBA))).bind(g.LINEAR,g.CLAMP_TO_EDGE)}for(var _=0,x=n;_<x.length;_+=1){var b=x[_],w=i.getTile(b);if(!p||w.patternsLoaded()){var S=w.getBucket(r);if(S){var T=S.programConfigurations.get(r.id),C=e.context.program.get(),I=e.useProgram(f,T),E=y||I.program!==C,M=c.constantOr(null);if(M&&w.imageAtlas){var A=w.imageAtlas,L=A.patternPositions[M.to.toString()],k=A.patternPositions[M.from.toString()];L&&k&&T.setConstantPatternPositions(L,k)}var P=p?(X=r,J=d,$=un(K=w,Q=(Y=e).transform),{u_matrix:cn(Y,K,X),u_texsize:K.imageAtlasTexture.size,u_ratio:1/Vi(K,1,Q.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[$,J.fromScale,J.toScale],u_fade:J.t,u_units_to_pixels:[1/Q.pixelsToGLUnits[0],1/Q.pixelsToGLUnits[1]]}):u?(R=w,B=r,j=u,F=d,U=void 0,U=(N=e).lineAtlas,V=un(R,N.transform),q="round"===B.layout.get("line-cap"),G=U.getDash(j.from,q),Z=U.getDash(j.to,q),H=G.width*F.fromScale,W=Z.width*F.toScale,t.extend(sn(N,R,B),{u_patternscale_a:[V/H,-G.height/2],u_patternscale_b:[V/W,-Z.height/2],u_sdfgamma:U.width/(256*Math.min(H,W)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:G.y,u_tex_y_b:Z.y,u_mix:F.t})):h?(D=e,z=w,O=r,t.extend(sn(D,z,O),{u_image:0})):sn(e,w,r);p?(m.activeTexture.set(g.TEXTURE0),w.imageAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),T.updatePaintBuffers(d)):u&&(E||e.lineAtlas.dirty)&&(m.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(m)),I.draw(m,g.TRIANGLES,s,e.stencilModeForClipping(b),l,ni.disabled,P,r.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,r.paint,e.transform.zoom,T),y=!1}}}}}var D,z,O,N,R,B,j,F,U,V,q,G,Z,H,W,Y,K,X,J,Q,$},fill:function(e,i,r,n){var o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),l=r.paint.get("fill-pattern"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===u){var c=e.depthModeForSublayer(1,"opaque"===e.renderPass?ei.ReadWrite:ei.ReadOnly);bn(e,i,r,n,c,s,!1)}if("translucent"===e.renderPass&&r.paint.get("fill-antialias")){var p=e.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,ei.ReadOnly);bn(e,i,r,n,p,s,!0)}}}
2,"fill-extrusion":function(t,e,i,r){var n=i.paint.get("fill-extrusion-opacity");if(0!==n&&"translucent"===t.renderPass){var o=new ei(t.context.gl.LEQUAL,ei.ReadWrite,t.depthRangeFor3D);if(1!==n||i.paint.get("fill-extrusion-pattern").constantOr(1))wn(t,e,i,r,o,ii.disabled,ri.disabled),wn(t,e,i,r,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var a=t.colorModeForRenderPass();wn(t,e,i,r,o,ii.disabled,a)}}},hillshade:function(t,e,i,r){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,ei.ReadOnly),s=t.colorModeForRenderPass(),l="translucent"===t.renderPass?t.stencilConfigForOverlap(r):[{},r],u=l[0],c=0,p=l[1];c<p.length;c+=1){var h=p[c],d=e.getTile(h);d.needsHillshadePrepare&&"offscreen"===t.renderPass?Tn(t,d,i,o,a,ii.disabled,s):"translucent"===t.renderPass&&Sn(t,d,i,a,u[h.overscaledZ],s)}n.viewport.set([0,0,t.width,t.height])}},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(),u=a instanceof V?[{},r]:t.stencilConfigForOverlap(r),c=u[0],p=u[1],h=p[p.length-1].overscaledZ,d=!t.options.moving,f=0,m=p;f<m.length;f+=1){var g=m[f],y=t.depthModeForSublayer(g.overscaledZ-h,1===i.paint.get("raster-opacity")?ei.ReadWrite:ei.ReadOnly,o.LESS),v=e.getTile(g),_=t.transform.calculatePosMatrix(g.toUnwrapped(),d);v.registerFadeDuration(i.paint.get("raster-fade-duration"));var x=e.findLoadedParent(g,0),b=Cn(v,x,e,i,t.transform),w=void 0,S=void 0,T="nearest"===i.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),v.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),x?(x.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,x.tileID.overscaledZ-v.tileID.overscaledZ),S=[v.tileID.canonical.x*w%1,v.tileID.canonical.y*w%1]):v.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var C=pn(_,S||[0,0],w||1,b,i);a instanceof V?s.draw(n,o.TRIANGLES,y,ii.disabled,l,ni.disabled,C,i.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(n,o.TRIANGLES,y,c[g.overscaledZ],l,ni.disabled,C,i.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(e,i,r){var n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S=r.paint.get("background-color"),T=r.paint.get("background-opacity");if(0!==T){var C=e.context,I=C.gl,E=e.transform,M=E.tileSize,A=r.paint.get("background-pattern");if(!e.isPatternMissing(A)){var L=!A&&1===S.a&&1===T&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===L){var k=ii.disabled,P=e.depthModeForSublayer(0,"opaque"==L?ei.ReadWrite:ei.ReadOnly),D=e.colorModeForRenderPass(),z=e.useProgram(A?"backgroundPattern":"background"),O=E.coveringTiles({tileSize:M});A&&(C.activeTexture.set(I.TEXTURE0),e.imageManager.bind(e.context));for(var N=r.getCrossfadeParameters(),R=0,B=O;R<B.length;R+=1){var j=B[R],F=e.transform.calculatePosMatrix(j.toUnwrapped()),U=A?(n=F,o=T,a=e,s=A,l={tileID:j,tileSize:M},u=N,w=b=x=_=v=y=g=m=f=d=h=p=c=void 0,t.extend((c=s,p=u,d=l,f=(h=a).imageManager.getPattern(c.from.toString()),m=h.imageManager.getPattern(c.to.toString()),y=(g=h.imageManager.getPixelSize()).width,v=g.height,_=Math.pow(2,d.tileID.overscaledZ),b=(x=d.tileSize*Math.pow(2,h.transform.tileZoom)/_)*(d.tileID.canonical.x+d.tileID.wrap*_),w=x*d.tileID.canonical.y,{u_image:0,u_pattern_tl_a:f.tl,u_pattern_br_a:f.br,u_pattern_tl_b:m.tl,u_pattern_br_b:m.br,u_texsize:[y,v],u_mix:p.t,u_pattern_size_a:f.displaySize,u_pattern_size_b:m.displaySize,u_scale_a:p.fromScale,u_scale_b:p.toScale,u_tile_units_to_pixels:1/Vi(d,1,h.transform.tileZoom),u_pixel_coord_upper:[b>>16,w>>16],u_pixel_coord_lower:[65535&b,65535&w]}),{u_matrix:n,u_opacity:o})):{u_matrix:F,u_opacity:T,u_color:S};z.draw(C,I.TRIANGLES,P,k,D,ni.disabled,U,r.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}}}},debug:function(t,e,i){for(var r=0;r<i.length;r++)zn(t,e,i[r])},custom:function(t,e,i){var r=t.context,n=i.implementation;if("offscreen"===t.renderPass){var o=n.prerender;o&&(t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),o.call(n,r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),r.setStencilMode(ii.disabled);var a="3d"===n.renderingMode?new ei(t.context.gl.LEQUAL,ei.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,ei.ReadOnly);r.setDepthMode(a),n.render(r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState(),r.bindFramebuffer.set(null)}}};function Rn(t,e){this.points=t,this.planes=e}function Bn(e,i){this.min=e,this.max=i,this.center=t.scale$2([],t.add([],this.min,this.max),.5)}
2function jn(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}function Fn(e,i,r,n,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=i||22,this._minPitch=null==r?0:r,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new jn,this._posMatrixCache={},this._alignedPosMatrixCache={}}On.prototype.resize=function(e,i){if(this.width=e*t.browser.devicePixelRatio,this.height=i*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,n=this.style._order;r<n.length;r+=1)this.style._layers[n[r]].resize()},On.prototype.setup=function(){var e=this.context,i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(i,wr.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(r,wr.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var n=new t.StructArrayLayout4i8;n.emplaceBack(0,0,0,0),n.emplaceBack(t.EXTENT,0,t.EXTENT,0),n.emplaceBack(0,t.EXTENT,0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(n,U.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,wr.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new ii({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},On.prototype.clearStencil=function(){var e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var r=t.create();t.ortho(r,0,this.width,this.height,0,0,1),t.scale(r,r,[i.drawingBufferWidth,i.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,i.TRIANGLES,ei.disabled,this.stencilClearMode,ri.disabled,ni.disabled,an(r),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},On.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,an(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},On.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)},On.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)},On.prototype.stencilConfigForOverlap=function(t){var e,i=this.context.gl,r=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),n=r[r.length-1].overscaledZ,o=r[0].overscaledZ-n+1;if(1<o){this.currentStencilSource=void 0,256<this.nextStencilID+o&&this.clearStencil();for(var a={},s=0;s<o;s++)a[s+n]=new ii({func:i.GEQUAL,mask:255},s+this.nextStencilID,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID+=o,[a,r]}return[((e={})[n]=ii.disabled,e),r]}
2,On.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new ri([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?ri.unblended:ri.alphaBlended},On.prototype.depthModeForSublayer=function(t,e,i){if(!this.opaquePassEnabledForLayer())return ei.disabled;var r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new ei(i||this.context.gl.LEQUAL,e,[r,r])},On.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},On.prototype.render=function(e,i){var r=this;this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var n=this.style._order,o=this.style.sourceCaches;for(var a in o){var s=o[a];s.used&&s.prepare(this.context)}var l,u,c={},p={},h={};for(var d in o){var f=o[d];c[d]=f.getVisibleCoordinates(),p[d]=c[d].slice().reverse(),h[d]=f.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var m=0;m<n.length;m++)if(this.style._layers[n[m]].is3D()){this.opaquePassCutoff=m;break}this.renderPass="offscreen";for(var g=0,y=n;g<y.length;g+=1){var v=this.style._layers[y[g]];if(v.hasOffscreenPass()&&!v.isHidden(this.transform.zoom)){var _=p[v.source];"custom"!==v.type&&!_.length||this.renderLayer(this,o[v.source],v,_)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=n.length-1;0<=this.currentLayer;this.currentLayer--){var x=this.style._layers[n[this.currentLayer]],b=o[x.source],w=c[x.source];this._renderTileClippingMasks(x,w),this.renderLayer(this,b,x,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var S=this.style._layers[n[this.currentLayer]],T=o[S.source],C=("symbol"===S.type?h:p)[S.source];this._renderTileClippingMasks(S,c[S.source]),this.renderLayer(this,T,S,C)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach((function(t){t.source&&!t.isHidden(r.transform.zoom)&&(t.source!==(u&&u.id)&&(u=r.style.sourceCaches[t.source]),(!l||l.getSource().maxzoom<u.getSource().maxzoom)&&(l=u))})),l&&Nn.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&function(t){var e=t.transform.padding;kn(t,t.transform.height-(e.top||0),3,In),kn(t,e.bottom||0,3,En),Pn(t,e.left||0,3,Mn),Pn(t,t.transform.width-(e.right||0),3,An);var i,r,n,o,a=t.transform.centerPoint;Dn(i=t,(r=a.x)-1,(n=t.transform.height-a.y)-10,2,20,o=Ln),Dn(i,r-10,n-1,20,2,o)}(this),this.context.setDefault()},On.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),Nn[i.type](t,e,i,r,this.style.placement.variableOffsets),this.gpuTimingEnd())},On.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,i=this.gpuTimers[t.id];(i=i||(this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}
vendor: 18,047 bytes, line 2
2)).calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,i.query)}},On.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},On.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},On.prototype.queryGpuTimers=function(t){var e={};for(var i in t){var r=t[i],n=this.context.extTimerQuery,o=n.getQueryObjectEXT(r.query,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(r.query),e[i]=o}return e},On.prototype.translatePosMatrix=function(e,i,r,n,o){if(!r[0]&&!r[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);r=[r[0]*l-r[1]*s,r[0]*s+r[1]*l]}var u=[o?r[0]:Vi(i,r[0],this.transform.zoom),o?r[1]:Vi(i,r[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},On.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},On.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&0<e.length?e.pop():null},On.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),i=this.imageManager.getPattern(t.to.toString());return!e||!i},On.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 $r(this.context,0,Jr[t],e,mn[t],this._showOverdrawInspector)),this.cache[i]},On.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()},On.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)},On.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},On.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()},Rn.fromInvProjectionMatrix=function(e,i,r){var n=Math.pow(2,r),o=[[-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(i){return t.transformMat4([],i,e)})).map((function(e){return t.scale$1([],e,1/e[3]/i*n)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var i=t.sub([],o[e[0]],o[e[1]]),r=t.sub([],o[e[2]],o[e[1]]),n=t.normalize([],t.cross([],i,r)),a=-t.dot(n,o[e[1]]);return n.concat(a)}));return new Rn(o,a)},Bn.prototype.quadrant=function(e){for(var i=[e%2==0,e<2],r=t.clone$2(this.min),n=t.clone$2(this.max),o=0;o<i.length;o++)r[o]=i[o]?this.min[o]:this.center[o],n[o]=i[o]?this.center[o]:this.max[o];return n[2]=this.max[2],new Bn(r,n)},Bn.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},Bn.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},Bn.prototype.intersects=function(e){for(var i=[[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]],r=!0,n=0;n<e.planes.length;n++){for(var o=e.planes[n],a=0,s=0;s<i.length;s++)a+=0<=t.dot$1(o,i[s]);if(0===a)return 0;a!==i.length&&(r=!1)}if(r)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<e.points.length;p++){var h=e.points[p][l]-this.min[l];u=Math.min(u,h),c=Math.max(c,h)}if(c<0||u>this.max[l]-this.min[l])return 0}return 1},jn.prototype.interpolate=function(e,i,r){return null!=i.top&&null!=e.top&&(this.top=t.number(e.top,i.top,r)),null!=i.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,i.bottom,r)),null!=i.left&&null!=e.left&&(this.left=t.number(e.left,i.left,r)),null!=i.right&&null!=e.right&&(this.right=t.number(e.right,i.right,r)),this},jn.prototype.getCenter=function(e,i){var r=t.clamp((this.left+e-this.right)/2,0,e),n=t.clamp((this.top+i-this.bottom)/2,0,i);return new t.Point(r,n)},jn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},jn.prototype.clone=function(){return new jn(this.top,this.bottom,this.left,this.right)},jn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Un={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}};function Vn(e){var i,r,n,o;this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(i=this._updateHashUnthrottled.bind(this),r=!1,n=null,o=function(){n=null,r&&(i(),n=setTimeout(o,300),r=!1)},function(){return r=!0,n||o(),n})}function qn(t){this._map=t,this.clear()}Fn.prototype.clone=function(){var t=new Fn(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},Un.minZoom.get=function(){return this._minZoom},Un.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Un.maxZoom.get=function(){return this._maxZoom},Un.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Un.minPitch.get=function(){return this._minPitch},Un.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Un.maxPitch.get=function(){return this._maxPitch},Un.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Un.renderWorldCopies.get=function(){return this._renderWorldCopies},Un.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Un.worldSize.get=function(){return this.tileSize*this.scale},Un.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Un.size.get=function(){return new t.Point(this.width,this.height)},Un.bearing.get=function(){return-this.angle/Math.PI*180},Un.bearing.set=function(e){var i=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Un.pitch.get=function(){return this._pitch/Math.PI*180},Un.pitch.set=function(e){var i=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())},Un.fov.get=function(){return this._fov/Math.PI*180},Un.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())},Un.zoom.get=function(){return this._zoom},Un.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Un.center.get=function(){return this._center},Un.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Un.padding.get=function(){return this._edgeInsets.toJSON()},Un.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Un.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Fn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Fn.prototype.interpolatePadding=function(t,e,i){this._unmodified=!1,this._edgeInsets.interpolate(t,e,i),this._constrain(),this._calcMatrices()},Fn.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Fn.prototype.getVisibleUnwrappedCoordinates=function(e){var i=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new t.Point(0,0)),n=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(r.x,n.x,o.x,a.x)),l=Math.floor(Math.max(r.x,n.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&i.push(new t.UnwrappedTileID(u,e));return i},Fn.prototype.coveringTiles=function(e){var i=this.coveringZoomLevel(e),r=i;if(void 0!==e.minzoom&&i<e.minzoom)return[];void 0!==e.maxzoom&&i>e.maxzoom&&(i=e.maxzoom);var n=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,i),a=[o*n.x,o*n.y,0],s=Rn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,i),l=e.minzoom||0;function u(t){return{aabb:new Bn([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}}this.pitch<=60&&this._edgeInsets.top<.1&&(l=i);var c=[],p=[],h=i,d=e.reparseOverscaled?r:i;if(this._renderWorldCopies)for(var f=1;f<=3;f++)c.push(u(-f)),c.push(u(f));for(c.push(u(0));0<c.length;){var m=c.pop(),g=m.x,y=m.y,v=m.fullyVisible;if(!v){var _=m.aabb.intersects(s);if(0===_)continue;v=2===_}var x=m.aabb.distanceX(a),b=m.aabb.distanceY(a),w=Math.max(Math.abs(x),Math.abs(b));if(m.zoom===h||w>3+(1<<h-m.zoom)-2&&m.zoom>=l)p.push({tileID:new t.OverscaledTileID(m.zoom===h?d:m.zoom,m.wrap,m.zoom,g,y),distanceSq:t.sqrLen([a[0]-.5-g,a[1]-.5-y])});else for(var S=0;S<4;S++){var T=(g<<1)+S%2,C=(y<<1)+(S>>1);c.push({aabb:m.aabb.quadrant(S),zoom:m.zoom+1,x:T,y:C,wrap:m.wrap,fullyVisible:v})}}return p.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Fn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Un.unmodified.get=function(){return this._unmodified},Fn.prototype.zoomScale=function(t){return Math.pow(2,t)},Fn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Fn.prototype.project=function(e){var i=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(i)*this.worldSize)},Fn.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Un.point.get=function(){return this.project(this.center)},Fn.prototype.setLocationAtPoint=function(e,i){var r=this.pointCoordinate(i),n=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(r.x-n.x),o.y-(r.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},Fn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Fn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Fn.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Fn.prototype.coordinateLocation=function(t){return t.toLngLat()},Fn.prototype.pointCoordinate=function(e){var i=[e.x,e.y,0,1],r=[e.x,e.y,1,1];t.transformMat4(i,i,this.pixelMatrixInverse),t.transformMat4(r,r,this.pixelMatrixInverse);var n=i[3],o=r[3],a=i[1]/n,s=r[1]/o,l=i[2]/n,u=r[2]/o,c=l==u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(i[0]/n,r[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},Fn.prototype.coordinatePoint=function(e){var i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(i,i,this.pixelMatrix),new t.Point(i[0]/i[3],i[1]/i[3])},Fn.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Fn.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Fn.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])},Fn.prototype.calculatePosMatrix=function(e,i){void 0===i&&(i=!1);var r=e.key,n=i?this._alignedPosMatrixCache:this._posMatrixCache;if(n[r])return n[r];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,i?this.alignedProjMatrix:this.projMatrix,l),n[r]=new Float32Array(l),n[r]},Fn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Fn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,i,r,n,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,i=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var d=this.point,f=Math.max(i||0,e||0);if(f)return this.center=this.unproject(new t.Point(i?(l+s)/2:d.x,e?(a+o)/2:d.y)),this.zoom+=this.scaleZoom(f),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=d.y,g=u.y/2;m-g<o&&(n=o+g),a<m+g&&(n=a-g)}if(this.lngRange){var y=d.x,v=u.x/2;y-v<s&&(r=s+v),l<y+v&&(r=l-v)}void 0===r&&void 0===n||(this.center=this.unproject(new t.Point(void 0!==r?r:d.x,void 0!==n?n:d.y))),this._unmodified=c,this._constraining=!1}},Fn.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var i=Math.PI/2+this._pitch,r=this._fov*(.5+e.y/this.height),n=Math.sin(r)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-i-r,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,h=this.height%2/2,d=Math.cos(this.angle),f=Math.sin(this.angle),m=a-Math.round(a)+d*p+f*h,g=s-Math.round(s)+d*h+f*p,y=new Float64Array(c);if(t.translate(y,y,[.5<m?m-1:m,.5<g?g-1:g,0]),this.alignedProjMatrix=y,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Fn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(i,i,this.pixelMatrix)[3]/this.cameraToCenterDistance},Fn.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},Fn.prototype.getCameraQueryGeometry=function(e){var i=this.getCameraPoint();if(1===e.length)return[e[0],i];for(var r=i.x,n=i.y,o=i.x,a=i.y,s=0,l=e;s<l.length;s+=1){var u=l[s];r=Math.min(r,u.x),n=Math.min(n,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}return[new t.Point(r,n),new t.Point(o,n),new t.Point(o,a),new t.Point(r,a),new t.Point(r,n)]},Object.defineProperties(Fn.prototype,Un),Vn.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Vn.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Vn.prototype.getHashString=function(e){var i=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,n),a=Math.round(i.lng*o)/o,s=Math.round(i.lat*o)/o,l=this._map.getBearing(),u=this._map.getPitch(),c="";if(c+=e?"/"+a+"/"+s+"/"+r:r+"/"+s+"/"+a,(l||u)&&(c+="/"+Math.round(10*l)/10),u&&(c+="/"+Math.round(u)),this._hashName){var p=this._hashName,h=!1,d=t.window.location.hash.slice(1).split("&").map((function(t){var e=t.split("=")[0];return e===p?(h=!0,e+"="+c):t})).filter((function(t){return t}));return h||d.push(p+"="+c),"#"+d.join("&")}return"#"+c},Vn.prototype._getCurrentHash=function(){var e,i=this,r=t.window.location.hash.replace("#","");return this._hashName?(r.split("&").map((function(t){return t.split("=")}
2)).forEach((function(t){t[0]===i._hashName&&(e=t)})),(e&&e[1]||"").split("/")):r.split("/")},Vn.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},Vn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(e){}};var Gn={linearity:.3,easing:t.bezier(0,0,.3,1)},Zn=t.extend({deceleration:2500,maxSpeed:1400},Gn),Hn=t.extend({deceleration:20,maxSpeed:1400},Gn),Wn=t.extend({deceleration:1e3,maxSpeed:360},Gn),Yn=t.extend({deceleration:1e3,maxSpeed:90},Gn);function Kn(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function Xn(e,i,r){var n=r.maxSpeed,o=r.linearity,a=r.deceleration,s=t.clamp(e*o/(i/1e3),-n,n),l=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*l,amount:s*(l/2)}}function Jn(t,e){this._map=t,this._clickTolerance=e.clickTolerance}qn.prototype.clear=function(){this._inertiaBuffer=[]},qn.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},qn.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,i=t.browser.now();0<e.length&&160<i-e[0].time;)e.shift()},qn.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var i={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},r=0,n=this._inertiaBuffer;r<n.length;r+=1){var o=n[r].settings;i.zoom+=o.zoomDelta||0,i.bearing+=o.bearingDelta||0,i.pitch+=o.pitchDelta||0,o.panDelta&&i.pan._add(o.panDelta),o.around&&(i.around=o.around),o.pinchAround&&(i.pinchAround=o.pinchAround)}var a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(i.pan.mag()){var l=Xn(i.pan.mag(),a,t.extend({},Zn,e||{}));s.offset=i.pan.mult(l.amount/i.pan.mag()),s.center=this._map.transform.center,Kn(s,l)}if(i.zoom){var u=Xn(i.zoom,a,Hn);s.zoom=this._map.transform.zoom+u.amount,Kn(s,u)}if(i.bearing){var c=Xn(i.bearing,a,Wn);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Kn(s,c)}if(i.pitch){var p=Xn(i.pitch,a,Yn);s.pitch=this._map.transform.pitch+p.amount,Kn(s,p)}if(s.zoom||s.bearing){var h=void 0===i.pinchAround?i.around:i.pinchAround;s.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Qn=function(e){function r(r,n,o,a){void 0===a&&(a={});var s=i.mousePos(n.getCanvasContainer(),o),l=n.unproject(s);e.call(this,r,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(r.__proto__=e);var n={defaultPrevented:{configurable:!0}};return((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),$n=function(e){function r(r,n,o){var a="touchend"===r?o.changedTouches:o.touches,s=i.touchPos(n.getCanvasContainer(),a),l=s.map((function(t){return n.unproject(t)})),u=s.reduce((function(t,e,i,r){return t.add(e.div(r.length))}),new t.Point(0,0)),c=n.unproject(u);e.call(this,r,{points:s,point:u,lngLats:l,lngLat:c,originalEvent:o}),this._defaultPrevented=!1}e&&(r.__proto__=e);var n={defaultPrevented:{configurable:!0}};return((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),to=function(t){function e(e,i,r){t.call(this,e,{originalEvent:r}),this._defaultPrevented=!1}t&&(e.__proto__=t);var i={defaultPrevented:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented}
vendor: 4,867 bytes, line 2
2,Object.defineProperties(e.prototype,i),e}(t.Event);function eo(t){this._map=t}function io(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1}function ro(t,e){for(var i={},r=0;r<t.length;r++)i[t[r].identifier]=e[r];return i}function no(t){this.reset(),this.numTouches=t.numTouches}function oo(t){this.singleTap=new no(t),this.numTaps=t.numTaps,this.reset()}function ao(){this._zoomIn=new oo({numTouches:1,numTaps:2}),this._zoomOut=new oo({numTouches:2,numTaps:1}),this.reset()}function so(t){this.reset(),this._clickTolerance=t.clickTolerance||1}Jn.prototype.reset=function(){delete this._mousedownPos},Jn.prototype.wheel=function(t){return this._firePreventable(new to(t.type,this._map,t))},Jn.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Qn(t.type,this._map,t))},Jn.prototype.mouseup=function(t){this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.dblclick=function(t){return this._firePreventable(new Qn(t.type,this._map,t))},Jn.prototype.mouseover=function(t){this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.mouseout=function(t){this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.touchstart=function(t){return this._firePreventable(new $n(t.type,this._map,t))},Jn.prototype.touchmove=function(t){this._map.fire(new $n(t.type,this._map,t))},Jn.prototype.touchend=function(t){this._map.fire(new $n(t.type,this._map,t))},Jn.prototype.touchcancel=function(t){this._map.fire(new $n(t.type,this._map,t))},Jn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Jn.prototype.isEnabled=function(){return!0},Jn.prototype.isActive=function(){return!1},Jn.prototype.enable=function(){},Jn.prototype.disable=function(){},eo.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},eo.prototype.mousemove=function(t){this._map.fire(new Qn(t.type,this._map,t))},eo.prototype.mousedown=function(){this._delayContextMenu=!0},eo.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},eo.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Qn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},eo.prototype.isEnabled=function(){return!0},eo.prototype.isActive=function(){return!1},eo.prototype.enable=function(){},eo.prototype.disable=function(){},io.prototype.isEnabled=function(){return!!this._enabled},io.prototype.isActive=function(){return!!this._active},io.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},io.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},io.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(i.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},io.prototype.mousemoveWindow=function(t,e){if(this._active){var r=e;if(!(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)<this._clickTolerance)){var n=this._startPos;this._lastPos=r,this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var o=Math.min(n.x,r.x),a=Math.max(n.x,r.x),s=Math.min(n.y,r.y),l=Math.max(n.y,r.y);i.setTransform(this._box,"translate("+o+"px,"+s+"px)"),this._box.style.width=a-o+"px",this._box.style.height=l-s+"px"}}},io.prototype.mouseupWindow=function(e,r){var n=this;if(this._active&&0===e.button){var o=this._startPos,a=r;if(this.reset(),i.suppressClick(),o.x!==a.x||o.y!==a.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(o,a,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",e)}},io.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},io.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos},io.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,{originalEvent:i}))},no.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},no.prototype.touchstart=function(e,i,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){for(var i=new t.Point(0,0),r=0,n=e;r<n.length;r+=1)i._add(n[r]);return i.div(e.length)}(i),this.touches=ro(r,i)))}
2,no.prototype.touchmove=function(t,e,i){if(!this.aborted&&this.centroid){var r=ro(i,e);for(var n in this.touches){var o=r[n];(!o||30<o.dist(this.touches[n]))&&(this.aborted=!0)}}},no.prototype.touchend=function(t,e,i){if((!this.centroid||500<t.timeStamp-this.startTime)&&(this.aborted=!0),0===i.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}},oo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},oo.prototype.touchstart=function(t,e,i){this.singleTap.touchstart(t,e,i)},oo.prototype.touchmove=function(t,e,i){this.singleTap.touchmove(t,e,i)},oo.prototype.touchend=function(t,e,i){var r=this.singleTap.touchend(t,e,i);if(r){var n=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(n&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}},ao.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ao.prototype.touchstart=function(t,e,i){this._zoomIn.touchstart(t,e,i),this._zoomOut.touchstart(t,e,i)},ao.prototype.touchmove=function(t,e,i){this._zoomIn.touchmove(t,e,i),this._zoomOut.touchmove(t,e,i)},ao.prototype.touchend=function(t,e,i){var r=this,n=this._zoomIn.touchend(t,e,i),o=this._zoomOut.touchend(t,e,i);return n?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(n)},{originalEvent:t})}}):o?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},ao.prototype.touchcancel=function(){this.reset()},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};var lo={0:1,2:2};function uo(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()}so.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},so.prototype._correctButton=function(t,e){return!1},so.prototype._move=function(t,e){return{}},so.prototype.mousedown=function(t,e){if(!this._lastPoint){var r=i.mouseButton(t);this._correctButton(t,r)&&(this._lastPoint=e,this._eventButton=r)}},so.prototype.mousemoveWindow=function(t,e){var i,r,n=this._lastPoint;if(n)if(t.preventDefault(),i=this._eventButton,r=lo[i],void 0===t.buttons||(t.buttons&r)!==r)this.reset();else if(this._moved||!(e.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(n,e)},so.prototype.mouseupWindow=function(t){this._lastPoint&&i.mouseButton(t)===this._eventButton&&(this._moved&&i.suppressClick(),this.reset())},so.prototype.enable=function(){this._enabled=!0},so.prototype.disable=function(){this._enabled=!1,this.reset()},so.prototype.isEnabled=function(){return this._enabled},so.prototype.isActive=function(){return this._active};var co,po,ho,fo=(_o.__proto__=ho=so,((_o.prototype=Object.create(ho&&ho.prototype)).constructor=_o).prototype.mousedown=function(t,e){ho.prototype.mousedown.call(this,t,e),this._lastPoint&&(this._active=!0)},_o.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},_o.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},_o),mo=(vo.__proto__=po=so,((vo.prototype=Object.create(po&&po.prototype)).constructor=vo).prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},vo.prototype._move=function(t,e){var i=.8*(e.x-t.x);if(i)return this._active=!0,{bearingDelta:i}},vo.prototype.contextmenu=function(t){t.preventDefault()},vo),go=(yo.__proto__=co=so,((yo.prototype=Object.create(co&&co.prototype)).constructor=yo).prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},yo.prototype._move=function(t,e){var i=-.5*(e.y-t.y);if(i)return this._active=!0,{pitchDelta:i}},yo.prototype.contextmenu=function(t){t.preventDefault()},yo);function yo(){co.apply(this,arguments)}function vo(){po.apply(this,arguments)}function _o(){ho.apply(this,arguments)}function xo(){this.reset()}function bo(t,e,i){for(var r=0;r<t.length;r++)if(t[r].identifier===i)return e[r]}function wo(t,e){return Math.log(t/e)/Math.LN2}uo.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)}
2,uo.prototype.touchstart=function(t,e,i){return this._calculateTransform(t,e,i)},uo.prototype.touchmove=function(t,e,i){if(this._active)return t.preventDefault(),this._calculateTransform(t,e,i)},uo.prototype.touchend=function(t,e,i){this._calculateTransform(t,e,i),this._active&&i.length<this._minTouches&&this.reset()},uo.prototype.touchcancel=function(){this.reset()},uo.prototype._calculateTransform=function(e,i,r){0<r.length&&(this._active=!0);var n=ro(r,i),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var l in n){var u=n[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,n[l]=u)}if(this._touches=n,!(s<this._minTouches)&&a.mag()){var p=a.div(s);if(this._sum._add(p),!(this._sum.mag()<this._clickTolerance))return{around:o.div(s),panDelta:p}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active},xo.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},xo.prototype._start=function(t){},xo.prototype._move=function(t,e,i){return{}},xo.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]]))},xo.prototype.touchmove=function(t,e,i){if(this._firstTwoTouches){t.preventDefault();var r=this._firstTwoTouches,n=r[1],o=bo(i,e,r[0]),a=bo(i,e,n);if(o&&a){var s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,t)}}},xo.prototype.touchend=function(t,e,r){if(this._firstTwoTouches){var n=this._firstTwoTouches,o=n[1],a=bo(r,e,n[0]),s=bo(r,e,o);a&&s||(this._active&&i.suppressClick(),this.reset())}},xo.prototype.touchcancel=function(){this.reset()},xo.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},xo.prototype.disable=function(){this._enabled=!1,this.reset()},xo.prototype.isEnabled=function(){return this._enabled},xo.prototype.isActive=function(){return this._active};var So,To=(Co.__proto__=So=xo,((Co.prototype=Object.create(So&&So.prototype)).constructor=Co).prototype.reset=function(){So.prototype.reset.call(this),delete this._distance,delete this._startDistance},Co.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},Co.prototype._move=function(t,e){var i=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(wo(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:wo(this._distance,i),pinchAround:e}},Co);function Co(){So.apply(this,arguments)}function Io(t,e){return 180*t.angleWith(e)/Math.PI}var Eo,Mo=(Ao.__proto__=Eo=xo,((Ao.prototype=Object.create(Eo&&Eo.prototype)).constructor=Ao).prototype.reset=function(){Eo.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},Ao.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},Ao.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:Io(this._vector,i),pinchAround:e}},Ao.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,i=Io(t,this._startVector);return Math.abs(i)<e},Ao);function Ao(){Eo.apply(this,arguments)}function Lo(t){return Math.abs(t.y)>Math.abs(t.x)}function ko(){var t=zo;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep}var Po,Do=(Oo.__proto__=Po=xo,((Oo.prototype=Object.create(Po&&Po.prototype)).constructor=Oo).prototype.reset=function(){Po.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},Oo.prototype._start=function(t){Lo((this._lastPoints=t)[0].sub(t[1]))&&(this._valid=!1)},Oo.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}}
2,Oo.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;var o=0<t.y==0<e.y;return Lo(t)&&Lo(e)&&o}},Oo),zo={panStep:100,bearingStep:15,pitchStep:10};function Oo(){Po.apply(this,arguments)}function No(t){return t*(2-t)}function Ro(e,i){this._map=e,this._el=e.getCanvasContainer(),this._handler=i,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)}function Bo(t,e){this._clickZoom=t,this._tapZoom=e}function jo(){this.reset()}function Fo(){this._tap=new oo({numTouches:1,numTaps:1}),this.reset()}function Uo(t,e,i){this._el=t,this._mousePan=e,this._touchPan=i}function Vo(t,e,i){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=i}function qo(t,e,i,r){this._el=t,this._touchZoom=e,this._touchRotate=i,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}function Go(t){return t.zoom||t.drag||t.pitch||t.rotate}ko.prototype.reset=function(){this._active=!1},ko.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var i=0,r=0,n=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(t.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:No,zoom:i?Math.round(l)+i*(t.shiftKey?2:1):l,bearing:s.getBearing()+r*e._bearingStep,pitch:s.getPitch()+n*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},ko.prototype.enable=function(){this._enabled=!0},ko.prototype.disable=function(){this._enabled=!1,this.reset()},ko.prototype.isEnabled=function(){return this._enabled},ko.prototype.isActive=function(){return this._active},Ro.prototype.setZoomRate=function(t){this._defaultZoomRate=t},Ro.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},Ro.prototype.isEnabled=function(){return!!this._enabled},Ro.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},Ro.prototype.isZooming=function(){return!!this._zooming},Ro.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},Ro.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ro.prototype.wheel=function(e){if(this.isEnabled()){var i=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=t.browser.now(),n=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==i&&i%4.000244140625==0?this._type="wheel":0!==i&&Math.abs(i)<4?this._type="trackpad":400<n?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this._active||this._start(e)),e.preventDefault()}}
vendor: 28,790 bytes, line 2
2,Ro.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},Ro.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=i.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Ro.prototype.renderFrame=function(){return this._onScrollFrame()},Ro.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var i=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&4.000244140625<Math.abs(this._delta)?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:i.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(p);a=t.number(l,s,h),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-i.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Ro.prototype._smoothOutEasing=function(e){var i=t.ease;if(this._prevEase){var r=this._prevEase,n=(t.browser.now()-r.start)/r.duration,o=r.easing(.01+n)-r.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);i=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:i},i},Ro.prototype.reset=function(){this._active=!1},Bo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Bo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Bo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Bo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()},jo.prototype.reset=function(){this._active=!1},jo.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(i){i.easeTo({duration:300,zoom:i.getZoom()+(t.shiftKey?-1:1),around:i.unproject(e)},{originalEvent:t})}}},jo.prototype.enable=function(){this._enabled=!0},jo.prototype.disable=function(){this._enabled=!1,this.reset()},jo.prototype.isEnabled=function(){return this._enabled},jo.prototype.isActive=function(){return this._active},Fo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Fo.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))},Fo.prototype.touchmove=function(t,e,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;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)},Fo.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)},Fo.prototype.touchcancel=function(){this.reset()},Fo.prototype.enable=function(){this._enabled=!0},Fo.prototype.disable=function(){this._enabled=!1,this.reset()},Fo.prototype.isEnabled=function(){return this._enabled},Fo.prototype.isActive=function(){return this._active},Uo.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Uo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Uo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Uo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()},Vo.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Vo.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Vo.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Vo.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()},qo.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")},qo.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},qo.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},qo.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},qo.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},qo.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Zo,Ho=((Zo=t.Event)&&(Wo.__proto__=Zo),(Wo.prototype=Object.create(Zo&&Zo.prototype)).constructor=Wo);function Wo(){Zo.apply(this,arguments)}function Yo(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}function Ko(e,r){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new qn(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),t.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;o<a.length;o+=1){var s=a[o],l=s[0];i.addEventListener(l,s[1],l===t.window.document?this.handleWindowEvent:this.handleEvent,s[2])}}function Xo(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)}Ko.prototype.destroy=function(){for(var e=0,r=this._listeners;e<r.length;e+=1){var n=r[e],o=n[0];i.removeEventListener(o,n[1],o===t.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},Ko.prototype._addDefaultHandlers=function(t){var e=this._map,i=e.getCanvasContainer();this._add("mapEvent",new Jn(e,t));var r=e.boxZoom=new io(e,t);this._add("boxZoom",r);var n=new ao,o=new jo;e.doubleClickZoom=new Bo(o,n),this._add("tapZoom",n),this._add("clickZoom",o);var a=new Fo;this._add("tapDragZoom",a);var s=e.touchPitch=new Do;this._add("touchPitch",s);var l=new mo(t),u=new go(t);e.dragRotate=new Vo(t,l,u),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",u,["mouseRotate"]);var c=new fo(t),p=new uo(t);e.dragPan=new Uo(i,c,p),this._add("mousePan",c),this._add("touchPan",p,["touchZoom","touchRotate"]);var h=new Mo,d=new To;e.touchZoomRotate=new qo(i,d,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",d,["touchPan","touchRotate"]);var f=e.scrollZoom=new Ro(e,this);this._add("scrollZoom",f,["mousePan"]);var m=e.keyboard=new ko;this._add("keyboard",m),this._add("blockableMapEvent",new eo(e));for(var g=0,y=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];g<y.length;g+=1){var v=y[g];t.interactive&&t[v]&&e[v].enable(t[v])}},Ko.prototype._add=function(t,e,i){this._handlers.push({handlerName:t,handler:e,allowed:i}),this._handlersById[t]=e},Ko.prototype.stop=function(){if(!this._updatingCamera){for(var t=0,e=this._handlers;t<e.length;t+=1)e[t].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},Ko.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},Ko.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ko.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ko.prototype.isMoving=function(){return Boolean(Go(this._eventsInProgress))||this.isZooming()},Ko.prototype._blockedByActive=function(t,e,i){for(var r in t)if(r!==i&&(!e||e.indexOf(r)<0))return!0;return!1},Ko.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},Ko.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},Ko.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var r="renderFrame"===t.type?void 0:t,n={needsRenderFrame:!1},o={},a={},s=t.touches?this._getMapTouches(t.touches):void 0,l=s?i.touchPos(this._el,s):i.mousePos(this._el,t),u=0,c=this._handlers;u<c.length;u+=1){var p=c[u],h=p.handlerName,d=p.handler,f=p.allowed;if(d.isEnabled()){var m=void 0;this._blockedByActive(a,f,h)?d.reset():d[e||t.type]&&(m=d[e||t.type](t,l,s),this.mergeHandlerResult(n,o,m,h,r),m&&m.needsRenderFrame&&this._triggerRenderFrame()),(m||d.isActive())&&(a[h]=d)}}var g={};for(var y in this._previousActiveHandlers)a[y]||(g[y]=r);this._previousActiveHandlers=a,(Object.keys(g).length||Yo(n))&&(this._changes.push([n,o,g]),this._triggerRenderFrame()),(Object.keys(a).length||Yo(n))&&this._map._stop(!0),this._updatingCamera=!1;var v=n.cameraAnimation;v&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],v(this._map))}else this.stop()},Ko.prototype.mergeHandlerResult=function(e,i,r,n,o){if(r){t.extend(e,r);var a={handlerName:n,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(i.zoom=a),void 0!==r.panDelta&&(i.drag=a),void 0!==r.pitchDelta&&(i.pitch=a),void 0!==r.bearingDelta&&(i.rotate=a)}},Ko.prototype._applyChanges=function(){for(var e={},i={},r={},n=0,o=this._changes;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],u=a[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(i,l),t.extend(r,u)}this._updateMapTransform(e,i,r),this._changes=[]},Ko.prototype._updateMapTransform=function(t,e,i){var r=this._map,n=r.transform;if(!Yo(t))return this._fireEvents(e,i);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;var p=n.pointLocation(o?u.sub(o):u);s&&(n.bearing+=s),l&&(n.pitch+=l),a&&(n.zoom+=a),n.setLocationAtPoint(p,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,i)},Ko.prototype._fireEvents=function(e,i){var r=this,n=Go(this._eventsInProgress),o=Go(e),a={};for(var s in e)this._eventsInProgress[s]||(a[s+"start"]=e[s].originalEvent),this._eventsInProgress[s]=e[s];for(var l in!n&&o&&this._fireEvent("movestart",o.originalEvent),a)this._fireEvent(l,a[l]);for(var u in e.rotate&&(this._bearingChanged=!0),o&&this._fireEvent("move",o.originalEvent),e)this._fireEvent(u,e[u].originalEvent);var c,p={};for(var h in this._eventsInProgress){var d=this._eventsInProgress[h],f=d.handlerName,m=d.originalEvent;this._handlersById[f].isActive()||(delete this._eventsInProgress[h],p[h+"end"]=c=i[f]||m)}for(var g in p)this._fireEvent(g,p[g]);var y=Go(this._eventsInProgress);if((n||o)&&!y){this._updatingCamera=!0;var v=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),_=function(t){return 0!==t&&-r._bearingSnap<t&&t<r._bearingSnap};v?(_(v.bearing||this._map.getBearing())&&(v.bearing=0),this._map.easeTo(v,{originalEvent:c})):(this._map.fire(new t.Event("moveend",{originalEvent:c})),_(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},Ko.prototype._fireEvent=function(e,i){this._map.fire(new t.Event(e,i?{originalEvent:i}:{}))},Ko.prototype._requestFrame=function(){var t=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(e){delete t._frameId,t.handleEvent(new Ho("renderFrame",{timeStamp:e})),t._applyChanges()}))},Ko.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};var Jo,Qo=((Jo=t.Evented)&&($o.__proto__=Jo),(($o.prototype=Object.create(Jo&&Jo.prototype)).constructor=$o).prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},$o.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},$o.prototype.panBy=function(e,i,r){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},i),r)},$o.prototype.panTo=function(e,i,r){return this.easeTo(t.extend({center:e},i),r)},$o.prototype.getZoom=function(){return this.transform.zoom},$o.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},$o.prototype.zoomTo=function(e,i,r){return this.easeTo(t.extend({zoom:e},i),r)},$o.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},$o.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},$o.prototype.getBearing=function(){return this.transform.bearing},$o.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},$o.prototype.getPadding=function(){return this.transform.padding},$o.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},$o.prototype.rotateTo=function(e,i,r){return this.easeTo(t.extend({bearing:e},i),r)},$o.prototype.resetNorth=function(e,i){return this.rotateTo(0,t.extend({duration:1e3},e),i),this},$o.prototype.resetNorthPitch=function(e,i){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),i),this},$o.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},$o.prototype.getPitch=function(){return this.transform.pitch},$o.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},$o.prototype.cameraForBounds=function(e,i){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,i)},$o.prototype._cameraForBoxAndBearing=function(e,i,r,n){var o={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=t.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var a=n.padding;n.padding={top:a,bottom:a,right:a,left:a}}n.padding=t.extend(o,n.padding);var s=this.transform,l=s.padding,u=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(i)),p=u.rotate(-r*Math.PI/180),h=c.rotate(-r*Math.PI/180),d=new t.Point(Math.max(p.x,h.x),Math.max(p.y,h.y)),f=new t.Point(Math.min(p.x,h.x),Math.min(p.y,h.y)),m=d.sub(f),g=(s.width-(l.left+l.right+n.padding.left+n.padding.right))/m.x,y=(s.height-(l.top+l.bottom+n.padding.top+n.padding.bottom))/m.y;if(!(y<0||g<0)){var v=Math.min(s.scaleZoom(s.scale*Math.min(g,y)),n.maxZoom),_=t.Point.convert(n.offset),x=new t.Point(_.x+(n.padding.left-n.padding.right)/2,_.y+(n.padding.top-n.padding.bottom)/2).mult(s.scale/s.zoomScale(v));return{center:s.unproject(u.add(c).div(2).sub(x)),zoom:v,bearing:r}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},$o.prototype.fitBounds=function(t,e,i){return this._fitInternal(this.cameraForBounds(t,e),e,i)},$o.prototype.fitScreenCoordinates=function(e,i,r,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(i)),r,n),n,o)},$o.prototype._fitInternal=function(e,i,r){return e?(delete(i=t.extend(e,i)).padding,i.linear?this.easeTo(i,r):this.flyTo(i,r)):this},$o.prototype.jumpTo=function(e,i){this.stop();var r=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&r.zoom!==+e.zoom&&(n=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=t.LngLat.convert(e.center)),"bearing"in e&&r.bearing!==+e.bearing&&(o=!0,r.bearing=+e.bearing),"pitch"in e&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),null==e.padding||r.isPaddingEqual(e.padding)||(r.padding=e.padding),this.fire(new t.Event("movestart",i)).fire(new t.Event("move",i)),n&&this.fire(new t.Event("zoomstart",i)).fire(new t.Event("zoom",i)).fire(new t.Event("zoomend",i)),o&&this.fire(new t.Event("rotatestart",i)).fire(new t.Event("rotate",i)).fire(new t.Event("rotateend",i)),a&&this.fire(new t.Event("pitchstart",i)).fire(new t.Event("pitch",i)).fire(new t.Event("pitchend",i)),this.fire(new t.Event("moveend",i))},$o.prototype.easeTo=function(e,i){var r=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=this.getPadding(),u="zoom"in e?+e.zoom:o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,h="padding"in e?e.padding:n.padding,d=t.Point.convert(e.offset),f=n.centerPoint.add(d),m=n.pointLocation(f),g=t.LngLat.convert(e.center||m);this._normalizeCenter(g);var y,v,_=n.project(m),x=n.project(g).sub(_),b=n.zoomScale(u-o);e.around&&(y=t.LngLat.convert(e.around),v=n.locationPoint(y));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==o,this._rotating=this._rotating||a!==c,this._pitching=this._pitching||p!==s,this._padding=!n.isPaddingEqual(h),this._easeId=e.easeId,this._prepareEase(i,e.noMoveStart,w),clearTimeout(this._easeEndTimeoutID),this._ease((function(e){if(r._zooming&&(n.zoom=t.number(o,u,e)),r._rotating&&(n.bearing=t.number(a,c,e)),r._pitching&&(n.pitch=t.number(s,p,e)),r._padding&&(n.interpolatePadding(l,h,e),f=n.centerPoint.add(d)),y)n.setLocationAtPoint(y,v);else{var m=n.zoomScale(n.zoom-o),g=o<u?Math.min(2,b):Math.max(.5,b),w=Math.pow(g,1-e),S=n.unproject(_.add(x.mult(e*w)).mult(m));n.setLocationAtPoint(n.renderWorldCopies?S.wrap():S,f)}r._fireMoveEvents(i)}),(function(t){r._afterEase(i,t)}),e),this},$o.prototype._prepareEase=function(e,i,r){void 0===r&&(r={}),this._moving=!0,i||r.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.Event("pitchstart",e))},$o.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},$o.prototype._afterEase=function(e,i){if(!this._easeId||!i||this._easeId!==i){delete this._easeId;var r=this._zooming,n=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},$o.prototype.flyTo=function(e,i){var r=this;if(!e.essential&&t.browser.prefersReducedMotion){var n=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,i)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,p="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,d="padding"in e?e.padding:o.padding,f=o.zoomScale(c-a),m=t.Point.convert(e.offset),g=o.centerPoint.add(m),y=o.pointLocation(g),v=t.LngLat.convert(e.center||y);this._normalizeCenter(v);var _=o.project(y),x=o.project(v).sub(_),b=e.curve,w=Math.max(o.width,o.height),S=w/f,T=x.mag();if("minZoom"in e){var C=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),I=w/o.zoomScale(C-a);b=Math.sqrt(I/T*2)}var E=b*b;function M(t){var e=(S*S-w*w+(t?-1:1)*E*E*T*T)/(2*(t?S:w)*E*T);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function L(t){return(Math.exp(t)+Math.exp(-t))/2}var k=M(0),P=function(t){return L(k)/L(k+b*t)},D=function(t){return w*((L(k)*(A(e=k+b*t)/L(e))-A(k))/E)/T;var e},z=(M(1)-k)/b;if(Math.abs(T)<1e-6||!isFinite(z)){if(Math.abs(w-S)<1e-6)return this.easeTo(e,i);var O=S<w?-1:1;z=Math.abs(Math.log(S/w))/b,D=function(){return 0},P=function(t){return Math.exp(O*b*t)}}return e.duration="duration"in e?+e.duration:1e3*z/("screenSpeed"in e?e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(d),this._prepareEase(i,!1),this._ease((function(e){var n=e*z,f=1/P(n);o.zoom=1===e?c:a+o.scaleZoom(f),r._rotating&&(o.bearing=t.number(s,p,e)),r._pitching&&(o.pitch=t.number(l,h,e)),r._padding&&(o.interpolatePadding(u,d,e),g=o.centerPoint.add(m));var y=1===e?v:o.unproject(_.add(x.mult(D(n))).mult(f));o.setLocationAtPoint(o.renderWorldCopies?y.wrap():y,g),r._fireMoveEvents(i)}),(function(){return r._afterEase(i)}),e),this},$o.prototype.isEasing=function(){return!!this._easeFrameId},$o.prototype.stop=function(){return this._stop()},$o.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var i=this._onEaseEnd;delete this._onEaseEnd,i.call(this,e)}if(!t){var r=this.handlers;r&&r.stop()}return this},$o.prototype._ease=function(e,i,r){!1===r.animate||0===r.duration?(e(1),i()):(this._easeStart=t.browser.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$o.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$o.prototype._normalizeBearing=function(e,i){e=t.wrap(e,-180,180);var r=Math.abs(e-i);return Math.abs(e-360-i)<r&&(e-=360),Math.abs(e+360-i)<r&&(e+=360),e},$o.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var i=t.lng-e.center.lng;t.lng+=180<i?-360:i<-180?360:0}},$o);function $o(e,i){Jo.call(this),this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}function ta(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)}function ea(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}Xo.prototype.getDefaultPosition=function(){return"bottom-right"},Xo.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=i.create("div","mapboxgl-ctrl-attrib-inner",this._container),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},Xo.prototype.onRemove=function(){i.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},Xo.prototype._updateEditLink=function(){var e=this._editLink;e=e||(this._editLink=this._container.querySelector(".mapbox-improve-map"));var i=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var r=i.reduce((function(t,e,r){return e.value&&(t+=e.key+"="+e.value+(r<i.length-1?"&":"")),t}),"?");e.href=t.config.FEEDBACK_URL+"/"+r+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow"}},Xo.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Xo.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return"string"!=typeof t?"":t}))):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var i=this._map.style.sourceCaches;for(var r in i){var n=i[r];if(n.used){var o=n.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort((function(t,e){return t.length-e.length}));var a=(t=t.filter((function(e,i){for(var r=i+1;r<t.length;r++)if(0<=t[r].indexOf(e))return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Xo.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")},ta.prototype.onAdd=function(t){this._map=t,this._container=i.create("div","mapboxgl-ctrl");var e=i.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ta.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ta.prototype.getDefaultPosition=function(){return"bottom-left"},ta.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},ta.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},ta.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}},ea.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},ea.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)}},ea.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},ea.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ia={"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"}
2,ra=t.window.HTMLImageElement,na=t.window.HTMLElement,oa=t.window.ImageBitmap,aa={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,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},sa=function(r){function n(e){var i=this;if(null!=(e=t.extend({},aa,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&60<e.maxPitch)throw new Error("maxPitch must be less than or equal to 60");var n=new Fn(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(r.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new ea,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ia,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof na))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return i._update(!1)})),this.on("moveend",(function(){return i._update(!1)})),this.on("zoom",(function(){return i._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Ko(this,e),this._hash=e.hash&&new Vn("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Xo({customAttribution:e.customAttribution})),this.addControl(new ta,e.logoPosition),this.on("style.load",(function(){i.transform.unmodified&&i.jumpTo(i.style.stylesheet)})),this.on("data",(function(e){i._update("style"===e.dataType),i.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){i.fire(new t.Event(e.dataType+"dataloading",e))}))}r&&(n.__proto__=r);var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return((n.prototype=Object.create(r&&r.prototype)).constructor=n).prototype._getMapId=function(){return this._mapId},n.prototype.addControl=function(e,i){if(void 0===i&&e.getDefaultPosition&&(i=e.getDefaultPosition()),void 0===i&&(i="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=e.onAdd(this);this._controls.push(e);var n=this._controlPositions[i];
2return-1!==i.indexOf("bottom")?n.insertBefore(r,n.firstChild):n.appendChild(r),this},n.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var i=this._controls.indexOf(e);return-1<i&&this._controls.splice(i,1),e.onRemove(this),this},n.prototype.resize=function(e){var i=this._containerDimensions(),r=i[0],n=i[1];this._resizeCanvas(r,n),this.transform.resize(r,n),this.painter.resize(r,n);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return this.transform.getBounds()},n.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},n.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},n.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")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.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")},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.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")},n.prototype.getMinPitch=function(){return this.transform.minPitch},n.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")},n.prototype.getMaxPitch=function(){return this.transform.maxPitch},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},n.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},n.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},n.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},n.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},n.prototype._createDelegatedListener=function(t,e,i){var r,n=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:i,delegates:{mousemove:function(r){var a=n.getLayer(e)?n.queryRenderedFeatures(r.point,{layers:[e]}):[];a.length?o||(o=!0,i.call(n,new Qn(t,n,r.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"!==t&&"mouseout"!==t)return{layer:e,listener:i,delegates:((r={})[t]=function(t){var r=n.getLayer(e)?n.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,i.call(n,t),delete t.features)},r)};var a=!1;return{layer:e,listener:i,delegates:{mousemove:function(r){(n.getLayer(e)?n.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,i.call(n,new Qn(t,n,r.originalEvent)))},mouseout:function(e){a&&(a=!1,i.call(n,new Qn(t,n,e.originalEvent)))}}}},n.prototype.on=function(t,e,i){if(void 0===i)return r.prototype.on.call(this,t,e);var n=this._createDelegatedListener(t,e,i);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(n),n.delegates)this.on(o,n.delegates[o]);return this}
vendor: 20,778 bytes, line 2
2,n.prototype.once=function(t,e,i){if(void 0===i)return r.prototype.once.call(this,t,e);var n=this._createDelegatedListener(t,e,i);for(var o in n.delegates)this.once(o,n.delegates[o]);return this},n.prototype.off=function(t,e,i){var n=this;return void 0===i?r.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(r){for(var o=r[t],a=0;a<o.length;a++){var s=o[a];if(s.layer===e&&s.listener===i){for(var l in s.delegates)n.off(l,s.delegates[l]);return o.splice(a,1)}}}(this._delegatedListeners),this)},n.prototype.queryRenderedFeatures=function(e,i){if(!this.style)return[];var r;if(void 0!==i||void 0===e||e instanceof t.Point||Array.isArray(e)||(i=e,e=void 0),i=i||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])r=[t.Point.convert(e)];else{var n=t.Point.convert(e[0]),o=t.Point.convert(e[1]);r=[n,new t.Point(o.x,n.y),o,new t.Point(n.x,o.y),n]}return this.style.queryRenderedFeatures(r,i,this.transform)},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,i){return!1!==(i=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},i)).diff&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(e,i))},n.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},n.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new xr(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t)):delete this.style,this},n.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new xr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},n.prototype._diffStyle=function(e,i){var r=this;if("string"==typeof e){var n=this._requestManager.normalizeStyleURL(e),o=this._requestManager.transformRequest(n,t.ResourceType.Style);t.getJSON(o,(function(e,n){e?r.fire(new t.ErrorEvent(e)):n&&r._updateDiff(n,i)}))}else"object"==typeof e&&this._updateDiff(e,i)},n.prototype._updateDiff=function(e,i){try{this.style.setState(e)&&this._update(!0)}catch(r){t.warnOnce("Unable to perform style diff: "+(r.message||r.error||r)+". Rebuilding the style from scratch."),this._updateStyle(e,i)}},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},n.prototype.isSourceLoaded=function(e){var i=this.style&&this.style.sourceCaches[e];if(void 0!==i)return i.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var i=t[e]._tiles;for(var r in i){var n=i[r];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,i){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,i)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,i,r){void 0===r&&(r={});var n=r.pixelRatio;void 0===n&&(n=1);var o=r.sdf;void 0===o&&(o=!1);var a=r.stretchX,s=r.stretchY,l=r.content;if(this._lazyInitEmptyStyle(),i instanceof ra||oa&&i instanceof oa){var u=t.browser.getImageData(i);this.style.addImage(e,{data:new t.RGBAImage({width:u.width,height:u.height},u.data),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0})}else{if(void 0===i.width||void 0===i.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=i;this.style.addImage(e,{data:new t.RGBAImage({width:i.width,height:i.height},new Uint8Array(i.data)),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0,userImage:c}),c.onAdd&&c.onAdd(this,e)}},n.prototype.updateImage=function(e,i){var r=this.style.getImage(e);if(!r)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var n=i instanceof ra||oa&&i instanceof oa?t.browser.getImageData(i):i,o=n.width,a=n.height,s=n.data;return void 0===o||void 0===a?this.fire(new t.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`"))):o!==r.data.width||a!==r.data.height?this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(r.data.replace(s,!(i instanceof ra||oa&&i instanceof oa)),void this.style.updateImage(e,r))},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,i){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),i)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setLayerZoomRange=function(t,e,i){return this.style.setLayerZoomRange(t,e,i),this._update(!0)},n.prototype.setFilter=function(t,e,i){return void 0===i&&(i={}),this.style.setFilter(t,e,i),this._update(!0)},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,i,r){return void 0===r&&(r={}),this.style.setPaintProperty(t,e,i,r),this._update(!0)},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,i,r){return void 0===r&&(r={}),this.style.setLayoutProperty(t,e,i,r),this._update(!0)},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},n.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.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/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=i.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=i.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=i.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");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=i.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(t){o[t]=i.create("div","mapboxgl-ctrl-"+t,n)}))},n.prototype._resizeCanvas=function(e,i){var r=t.browser.devicePixelRatio||1;this._canvas.width=r*e,this._canvas.height=r*i,this._canvas.style.width=e+"px",this._canvas.style.height=i+"px"},n.prototype._setupPainter=function(){var i=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",i)||this._canvas.getContext("experimental-webgl",i);r?(this.painter=new On(r,this.transform),t.webpSupported.testSupport(r)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},n.prototype._update=function(t){return this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint()),this},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(e){var i,r=this,n=0,o=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(i=o.createQueryEXT(),o.beginQueryEXT(o.TIME_ELAPSED_EXT,i),n=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=t.browser.now();this.style.zoomHistory.update(s,l);var u=new t.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=u.crossFadingFactor();1===c&&c===this._crossFadingFactor||(a=!0,this._crossFadingFactor=c),this.style.update(u)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var p=t.browser.now()-n;o.endQueryEXT(o.TIME_ELAPSED_EXT,i),setTimeout((function(){var e=o.getQueryObjectEXT(i,o.QUERY_RESULT_EXT)/1e6;o.deleteQueryEXT(i),r.fire(new t.Event("gpu-timing-frame",{cpuTime:p,gpuTime:e}))}),50)}if(this.listens("gpu-timing-layer")){var h=this.painter.collectGpuTimers();setTimeout((function(){var e=r.painter.queryGpuTimers(h);r.fire(new t.Event("gpu-timing-layer",{layerTimes:e}))}),50)}var d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}},n.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,i=this._controls;e<i.length;e+=1)i[e].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!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var r=this.painter.context.gl.getExtension("WEBGL_lose_context");r&&r.loseContext(),la(this._canvasContainer),la(this._controlContainer),la(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},n.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(t){e._frame=null,e._render(t)})))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showPadding.get=function(){return!!this._showPadding},o.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&((this._showCollisionBoxes=t)?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._setCacheLimits=function(e,i){t.setCacheLimits(e,i)},o.version.get=function(){return t.version},Object.defineProperties(n.prototype,o),n}(Qo);function la(t){t.parentNode&&t.parentNode.removeChild(t)}function ua(e){var r=this;this.options=t.extend({},ca,e),this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(t){return r._map.zoomIn({},{originalEvent:t})})),i.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(t){return r._map.zoomOut({},{originalEvent:t})})),i.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(t){r.options.visualizePitch?r._map.resetNorthPitch({},{originalEvent:t}):r._map.resetNorth({},{originalEvent:t})})),this._compassIcon=i.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))}var ca={showCompass:!0,showZoom:!0,visualizePitch:!1};ua.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom()},ua.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},ua.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 pa(this._map,this._compass,this.options.visualizePitch)),this._container},ua.prototype.onRemove=function(){i.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},ua.prototype._createButton=function(t,e){var r=i.create("button",t,this._container);return r.type="button",r.addEventListener("click",e),r},ua.prototype._setButtonTitle=function(t,e){var i=this._map._getUIString("NavigationControl."+e);t.title=i,t.setAttribute("aria-label",i)};var pa=function(e,r,n){void 0===n&&(n=!1),this._clickTolerance=10,this.element=r,this.mouseRotate=new mo({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,n&&(this.mousePitch=new go({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),i.addEventListener(r,"mousedown",this.mousedown),i.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(r,"touchmove",this.touchmove),i.addEventListener(r,"touchend",this.touchend),i.addEventListener(r,"touchcancel",this.reset)};function ha(e,i,r){if(e=new t.LngLat(e.lng,e.lat),i){var n=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=r.locationPoint(e).distSqr(i);r.locationPoint(n).distSqr(i)<a?e=n:r.locationPoint(o).distSqr(i)<a&&(e=o)}for(;180<Math.abs(e.lng-r.center.lng);){var s=r.locationPoint(e);if(0<=s.x&&0<=s.y&&s.x<=r.width&&s.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e}pa.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),i.disableDrag()},pa.prototype.move=function(t,e){var i=this.map,r=this.mouseRotate.mousemoveWindow(t,e);if(r&&r.bearingDelta&&i.setBearing(i.getBearing()+r.bearingDelta),this.mousePitch){var n=this.mousePitch.mousemoveWindow(t,e);n&&n.pitchDelta&&i.setPitch(i.getPitch()+n.pitchDelta)}},pa.prototype.off=function(){var t=this.element;i.removeEventListener(t,"mousedown",this.mousedown),i.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(t,"touchmove",this.touchmove),i.removeEventListener(t,"touchend",this.touchend),i.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},pa.prototype.offTemp=function(){i.enableDrag(),i.removeEventListener(t.window,"mousemove",this.mousemove),i.removeEventListener(t.window,"mouseup",this.mouseup)},pa.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),i.mousePos(this.element,e)),i.addEventListener(t.window,"mousemove",this.mousemove),i.addEventListener(t.window,"mouseup",this.mouseup)},pa.prototype.mousemove=function(t){this.move(t,i.mousePos(this.element,t))},pa.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},pa.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},pa.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=i.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},pa.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},pa.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};
2var da={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 fa(t,e,i){var r=t.classList;for(var n in da)r.remove("mapboxgl-"+i+"-anchor-"+n);r.add("mapboxgl-"+i+"-anchor-"+e)}function ma(e){this.options=t.extend({},Ta,e),t.bindAll(["_onMove","setUnit"],this)}var ga,ya,va,_a=((va=t.Evented)&&(Ia.__proto__=va),((Ia.prototype=Object.create(va&&va.prototype)).constructor=Ia).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},Ia.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),i.remove(this._element),this._popup&&this._popup.remove(),this},Ia.prototype.getLngLat=function(){return this._lngLat},Ia.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Ia.prototype.getElement=function(){return this._element},Ia.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){var 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:[0,-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)}return this},Ia.prototype._onKeyPress=function(t){var e=t.code,i=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==i&&13!==i||this.togglePopup()},Ia.prototype._onMapClick=function(t){var e=t.originalEvent.target,i=this._element;this._popup&&(e===i||i.contains(e))&&this.togglePopup()},Ia.prototype.getPopup=function(){return this._popup},Ia.prototype.togglePopup=function(){var t=this._popup;return t&&(t.isOpen()?t.remove():t.addTo(this._map)),this},Ia.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&
vendor: 8,955 bytes, line 2
2(this._lngLat=ha(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),i.setTransform(this._element,da[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+r+" "+e)}},Ia.prototype.getOffset=function(){return this._offset},Ia.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},Ia.prototype._onMove=function(e){this._pos=e.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 t.Event("dragstart"))),this.fire(new t.Event("drag"))},Ia.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},Ia.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),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))},Ia.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},Ia.prototype.isDraggable=function(){return this._draggable},Ia.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},Ia.prototype.getRotation=function(){return this._rotation},Ia.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},Ia.prototype.getRotationAlignment=function(){return this._rotationAlignment},Ia.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},Ia.prototype.getPitchAlignment=function(){return this._pitchAlignment},Ia),xa={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ba=0,wa=!1,Sa=((ya=t.Evented)&&(Ca.__proto__=ya),((Ca.prototype=Object.create(ya&&ya.prototype)).constructor=Ca).prototype.onAdd=function(e){var r;return this._map=e,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),r=this._setupUI,void 0!==ga?r(ga):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){r(ga="denied"!==t.state)})):r(ga=!!t.window.navigator.geolocation),this._container},Ca.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.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(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,wa=!1},Ca.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),i=t.coords;return e&&(i.longitude<e.getWest()||i.longitude>e.getEast()||i.latitude<e.getSouth()||i.latitude>e.getNorth())},Ca.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",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")}},Ca.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_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(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},Ca.prototype._updateCamera=function(e){var i=new t.LngLat(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,n=this._map.getBearing(),o=t.extend({bearing:n},this.options.fitBoundsOptions);this._map.fitBounds(i.toBounds(r),o,{geolocateSource:!0})},Ca.prototype._updateMarker=function(e){if(e){var i=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},Ca.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),i=this._map.unproject([1,t]),r=e.distanceTo(i),n=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=n+"px",this._circleElement.style.height=n+"px"},Ca.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},Ca.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.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 i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&wa)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},Ca.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},Ca.prototype._setupUI=function(e){var r=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=i.create("button","mapboxgl-ctrl-geolocate",this._container),i.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),!(this._geolocateButton.type="button")===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
2se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _a(this._dotElement),this._circleElement=i.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _a({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(e){e.geolocateSource||"ACTIVE_LOCK"!==r._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new t.Event("trackuserlocationend")))}))},Ca.prototype.trigger=function(){if(!this._setup)return t.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 t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,wa=!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 t.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 t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),wa=1<++ba?(e={maximumAge:6e5,timeout:0},!0):(e=this.options.positionOptions,!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},Ca.prototype._clearWatch=function(){t.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)},Ca),Ta={maxWidth:100,unit:"metric"};function Ca(e){ya.call(this),this.options=t.extend({},xa,e),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}function Ia(e,r){var n=this;if(va.call(this),(e instanceof t.window.HTMLElement||r)&&(e=t.extend({element:e},r)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,e&&e.element)this._element=e.element,this._offset=t.Point.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div"),this._element.setAttribute("aria-label","Map marker");var o=i.createNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"display","block"),o.setAttributeNS(null,"height","41px"),o.setAttributeNS(null,"width","27px"),o.setAttributeNS(null,"viewBox","0 0 27 41");var a=i.createNS("http://www.w3.org/2000/svg","g");
2a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");var s=i.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=i.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{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"}];u<c.length;u+=1){var p=c[u],h=i.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",p.rx),h.setAttributeNS(null,"ry",p.ry),l.appendChild(h)}var d=i.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill",this._color);var f=i.createNS("http://www.w3.org/2000/svg","path");f.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"),d.appendChild(f);var m=i.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var g=i.createNS("http://www.w3.org/2000/svg","path");g.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"),m.appendChild(g);var y=i.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(6.0, 7.0)"),y.setAttributeNS(null,"fill","#FFFFFF");var v=i.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _=i.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#000000"),_.setAttributeNS(null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962");var x=i.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),v.appendChild(_),v.appendChild(x),s.appendChild(l),s.appendChild(d),s.appendChild(m),s.appendChild(y),s.appendChild(v),o.appendChild(s),o.setAttributeNS(null,"height",41*this._scale+"px"),o.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(o),this._offset=t.Point.convert(e&&e.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()})),this._element.addEventListener("focus",(function(){var t=n._map.getContainer();t.scrollTop=0,t.scrollLeft=0})),fa(this._element,this._anchor,"marker"),this._popup=null}function Ea(t,e,i){var r=i&&i.maxWidth||100,n=t._container.clientHeight/2,o=t.unproject([0,n]),a=t.unproject([r,n]),s=o.distanceTo(a);if(i&&"imperial"===i.unit){var l=3.2808*s;5280<l?Ma(e,r,l/5280,t._getUIString("ScaleControl.Miles")):Ma(e,r,l,t._getUIString("ScaleControl.Feet"))}else i&&"nautical"===i.unit?Ma(e,r,s/1852,t._getUIString("ScaleControl.NauticalMiles")):1e3<=s?Ma(e,r,s/1e3,t._getUIString("ScaleControl.Kilometers")):Ma(e,r,s,t._getUIString("ScaleControl.Meters"))}function Ma(t,e,i,r){var n,o,a,s,l,u=(n=i,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=10<=(a=n/o
2)?10:5<=a?5:3<=a?3:2<=a?2:1<=a?1:(s=a,l=Math.pow(10,Math.ceil(-Math.log(s)/Math.LN10)),Math.round(s*l)/l)));t.style.width=e*(u/i)+"px",t.innerHTML=u+" "+r}function Aa(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")}ma.prototype.getDefaultPosition=function(){return"bottom-left"},ma.prototype._onMove=function(){Ea(this._map,this._container,this.options)},ma.prototype.onAdd=function(t){return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ma.prototype.onRemove=function(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ma.prototype.setUnit=function(t){this.options.unit=t,Ea(this._map,this._container,this.options)},Aa.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Aa.prototype.onRemove=function(){i.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Aa.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Aa.prototype._setupUI=function(){var e=this._fullscreenButton=i.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);i.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Aa.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Aa.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Aa.prototype._isFullscreen=function(){return this._fullscreen},Aa.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.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())},Aa.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.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 La,ka={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Pa=((La=t.Evented)&&(za.__proto__=La),((za.prototype=Object.create(La&&La.prototype)).constructor=za).prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,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._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 t.Event("open")),this},za.prototype.isOpen=function(){return!!this._map},za.prototype.remove=function(){return this._content&&i.remove(this._content),this._container&&(i.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 t.Event("close")),this},za.prototype.getLngLat=function(){return this._lngLat}
vendor: 4,980 bytes, line 2
2,za.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),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},za.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},za.prototype.getElement=function(){return this._container},za.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},za.prototype.setHTML=function(e){var i,r=t.window.document.createDocumentFragment(),n=t.window.document.createElement("body");for(n.innerHTML=e;i=n.firstChild;)r.appendChild(i);return this.setDOMContent(r)},za.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},za.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},za.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},za.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},za.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},za.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},za.prototype._createContent=function(){this._content&&i.remove(this._content),this._content=i.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=i.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},za.prototype._onMouseUp=function(t){this._update(t.point)},za.prototype._onMouseMove=function(t){this._update(t.point)},za.prototype._onDrag=function(t){this._update(t.point)},za.prototype._update=function(e){var r=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=i.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=i.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return r._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=ha(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var n=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=function e(i){if(i){if("number"==typeof i){var r=Math.round(Math.sqrt(.5*Math.pow(i,2)));return{center:new t.Point(0,0),top:new t.Point(0,i),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-i),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(i,0),right:new t.Point(-i,0)}}if(i instanceof t.Point||Array.isArray(i)){var n=t.Point.convert(i);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(i.center||[0,0]),top:t.Point.convert(i.top||[0,0]),"top-left":t.Point.convert(i["top-left"]||[0,0]),"top-right":t.Point.convert(i["top-right"]||[0,0]),bottom:t.Point.convert(i.bottom||[0,0]),"bottom-left":t.Point.convert(i["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(i["bottom-right"]||[0,0]),left:t.Point.convert(i.left||[0,0]),right:t.Point.convert(i.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=n.y+a.bottom.y<u?["top"]:n.y>this._map.transform.height-u?["bottom"]:[],n.x<l/2?s.push("left"):n.x>this._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=n.add(a[o]).round();i.setTransform(this._container,da[o]+" translate("+c.x+"px,"+c.y+"px)"),fa(this._container,o,"popup")}},za.prototype._onClose=function(){this.remove()},za),Da={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:sa,NavigationControl:ua,GeolocateControl:Sa,AttributionControl:Xo,ScaleControl:ma,FullscreenControl:Aa,Popup:Pa,Marker:_a,Style:xr,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.
2Evented,config:t.config,prewarm:function(){gi().acquire(hi)},clearPrewarmedResources:function(){var t=fi;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(hi),fi=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 t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return di.workerCount},set workerCount(t){di.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};function za(e){La.call(this),this.options=t.extend(Object.create(ka),e),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Da})),o)})),o=(n.Map,n.setRTLTextPlugin),a=(n.supported,n.Marker),s="atlas.microsoft.com",l="atlas.microsoft.com",u="styles/definitions/2019-10-16.json",c="e96cb745-c6f5-409c-a775-c4313e468c1d",p="https://login.microsoftonline.com/",h="Authorization",d="Bearer ",f="{azMapsDomain}",m="Map-Agent",g="x-ms-client-id",y="Ms-Am-Request-Origin",v="MapControl",_="https://atlas.microsoft.com/",x="Session-Id",b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function w(t,e){function i(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var S=function(){return(S=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function T(t,e,i,r){return new(i=i||Promise)((function(n,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?n(t.value):new i((function(e){e(t.value)})).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function C(t,e){var i,r,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(n=2&o[0]?r.return:o[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;switch(r=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=0<(n=a.trys).length&&n[n.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(6===o[0]&&a.label<n[1]){a.label=n[1],n=o;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(o);break}n[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{i=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var I=(E.prototype.merge=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var r=0,n=e;r<n.length;r++){var o=n[r];if(o)for(var a in o)o.hasOwnProperty(a)&&this.hasOwnProperty(a)&&(void 0!==o[a]&&null!=o[a]?this[a]instanceof E?this[a].merge(o[a]):this[a]=o[a]:(t=t||new(Object.getPrototypeOf(this).constructor),this[a]=t[a]))}return this},E);function E(){}var M,A=(w(L,M=I),L);function L(){var t=null!==M&&M.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var k=(P.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then((function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)}))},P.prototype.toString=function(){var t=Object.entries(this.options.queryParams).map((function(t){return t[0]+"="+t[1]})).join("&"),e=[],i=this.options.path||"";return P.protoRegEx.test(i)?e.push(i):(this.options.domain&&(P.protoRegEx.test(this.options.domain)||(e.push(this.options.protocol+"://"),e.push(this.options.subdomain?this.options.subdomain+".":"")),e.push(this.options.domain)),e.push(this.options.path?"/"+i:"")),e.push(t?"?"+t:""),e.join("")},P.protoRegEx=new RegExp(/^(file|http|https|blob:http|blob:https):\/\//i),P);function P(t){this.options=(new A).merge(t)}var D,z="2.0.32",O=(N.getFullVersion=function(){return z},N.getEndpointVersion=function(){var t=z.indexOf(".");return-1===(t=z.indexOf(".",t+1))?z:z.substring(0,t)},N);function N(){}(D=t.ControlPosition||(t.ControlPosition={})).TopLeft="top-left",D.TopRight="top-right",D.BottomLeft="bottom-left",D.BottomRight="bottom-right",D.NonFixed="non-fixed";var R,B=(w(j,R=I),j);function j(){var e=null!==R&&R.apply(this,arguments)||this;return e.position=t.ControlPosition.NonFixed,e}var F,U=(V.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],i=0;i<t.length;i++){var r=t[i]/255;e[i]=r<=.03928?r/12.92:Math.pow((.055+r)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},V.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d");e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1);var i=e.getImageData(0,0,1,1).data;return[i[0],i[1],i[2],i[3]]},V);function V(t){if(t){var e=void 0;3<=(e="string"==typeof t?this.getRBGA(t):t).length&&(this.r=e[0],this.g=e[1],this.b=e[2],3<e.length&&(this.a=e[3]))}}(F=t.ControlStyle||(t.ControlStyle={})).light="light",F.dark="dark",F.auto="auto";var q=(G.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("styledata",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},G.prototype.buildContainer=function(e,i,r,n){var o=this;return this._map=e,this._container=document.createElement(n||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof r&&this._container.setAttribute("aria-label",r),i.toLowerCase()===t.ControlStyle.auto?this._map.styles.initialize().then((function(){o._onStyleChange(),o._map.events.add("styledata",o._onStyleChange)})):this._container.classList.add(i),this._container},G.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},G.activateClickDelay=100,G);function G(){var e=this;this._onStyleChange=function(){if(e._map.getStyle().style.toLowerCase().startsWith("blank"))e._observer||(e._onBackgroun
2dChange(),e._observer=new MutationObserver(e._onBackgroundChange),e._observer.observe(e._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]}));else{e._observer&&(e._observer.disconnect(),delete e._observer);var t=e._map.styles.getTheme(e._map.getStyle());e._setTheme(t)}},this._onBackgroundChange=function(){var i=new U(e._map.getMapContainer().style.backgroundColor).getLuminosity(),r=isNaN(i)||.5<i?t.ControlStyle.light:t.ControlStyle.dark;e._setTheme(r)}}var Z,H=(w(W,Z=I),W);function W(){var e=null!==Z&&Z.apply(this,arguments)||this;return e.rotationDegreesDelta=15,e.style=t.ControlStyle.light,e}var Y,K=(w(X,Y=q),X.prototype.onAdd=function(t,e){var i=this,r=this.buildContainer(t,this.options.style,"Rotation Control"),n=this.constructRotationButton(t),o=this.constructRotationGrid(t,e);return r.addEventListener("mouseover",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasMouse=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("focusin",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasFocus=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("mouseleave",(function(){i.hasMouse=!1,i.hasFocus||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element"))})),r.addEventListener("focusout",(function(t){t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(i.hasFocus=!1,i.hasMouse||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element")))})),e&&X.InvertOrderPositions.includes(e.position)?(r.appendChild(o),r.appendChild(n)):(r.appendChild(n),r.appendChild(o)),r},X.prototype.constructRotationGrid=function(t,e){var i=document.createElement("div");i.classList.add("sub-container"),i.classList.add("hidden-accessible-element");var r=this.constructRightRotationButton(t),n=this.constructLeftRotationButton(t);return e&&X.InvertOrderPositions.includes(e.position)?(i.appendChild(r),i.appendChild(n)):(i.appendChild(n),i.appendChild(r)),i},X.prototype.constructRotationButton=function(t){var e=this,i=document.createElement("button");i.classList.add("azure-maps-control-button"),i.classList.add("rotation"),i.setAttribute("title","Reset to Default Rotation"),i.setAttribute("alt","Reset to Default Rotation"),i.setAttribute("type","button");var r=document.createElement("div");return i.appendChild(r),i.addEventListener("click",(function(i){i.timeStamp-e.lastActiveTime>q.activateClickDelay&&t.setCamera({bearing:X.DefaultRotation},!0)})),t.events.add("rotate",(function(t){r.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"})),i},X.prototype.constructRightRotationButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("rotation-right"),i.setAttribute("title","Rotate Right"),i.setAttribute("alt","Rotate Right"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({bearing:t.getCamera().bearing+e.options.rotationDegreesDelta,duration:X.RotationDuration,type:"ease"},!0)})),i},X.prototype.constructLeftRotationButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("rotation-left"),i.setAttribute("title","Rotate Left"),i.setAttribute("alt","Rotate Left"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({bearing:t.getCamera().bearing-e.options.rotationDegreesDelta,duration:X.RotationDuration,type:"ease"},!0)})),i},X.DefaultRotation=0,X.RotationDuration=100,X.InvertOrderPositions=[t.ControlPosition.BottomRight,t.ControlPosition.TopRight],X);function X(t){var e=Y.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new H).merge(t),e}var J,Q=(w($,J=I),$);function $(){var e=null!==J&&J.apply(this,arguments)||this;return e.pitchDegreesDelta=10,e.style=t.ControlStyle.light,e}var tt,et=(w(it,tt=q),it.prototype.onAdd=function(t,e){var i=this,r=this.buildContainer(t,this.options.style,"Pitch Control"),n=this.constructPitchButton(t),o=this.constructPitchGrid(t,e);return r.addEventListener("mouseover",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasMouse=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("focusin",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasFocus=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("mouseleave",(function(){i.hasMouse=!1,i.hasFocus||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element"))})),r.addEventListener("focusout",(function(t){t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(i.hasFocus=!1,i.hasMouse||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element")))})),e&&it.INVERT_ORDER_POSITIONS.includes(e.position)?(r.appendChild(o),r.appendChild(n)):(r.appendChild(n),r.appendChild(o)),r},it.prototype.constructPitchGrid=function(t,e){var i=document.createElement("div");i.classList.add("sub-container"),i.classList.add("hidden-accessible-element");var r=this.constructPitchIncrementButton(t),n=this.constructPitchDecrementButton(t);return e&&it.INVERT_ORDER_POSITIONS.includes(e.position)?(i.appendChild(n),i.appendChild(r)):(i.appendChild(r),i.appendChild(n)),i},it.prototype.constructPitchButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("pitch"),i.setAttribute("title","Reset to Default Pitch"),i.setAttribute("alt","Reset to Default Pitch"),i.setAttribute("type","button"),i.addEventListener("click",(function(){event.timeStamp-e.lastActiveTime>q.activateClickDelay&&t.setCamera({pitch:it.DEFAULT_PITCH},!0)})),i},it.prototype.constructPitchDecrementButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("pitch-down"),i.setAttribute("title","Decrease Pitch"),i.setAttribute("alt","Decrease Pitch"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({pitch:t.getCamera().pitch-e.options.pitchDegreesDelta,duration:it.PITCH_DURATION_MS,type:"ease"},!0)})),i},it.prototype.constructPitchIncrementButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("pitch-up"),i.setAttribute("title","Increase Pitch"),i.setAttribute("alt","Increase Pitch"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({pitch:t.getCamera().pitch+e.options.pitchDegreesDelta,duration:it.PITCH_DURATION_MS,type:"ease"},!0)})),i},it.PITCH_DURATION_MS=100,it.DEFAULT_PITCH=0,it.INVERT_ORDER_POSITIONS=[t.ControlPosition.BottomRight,t.ControlPosition.TopRight],it);function it(t){var e=tt.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new Q).merge(t),e}function rt(){this.__data__=[],this.size=0}var nt=function(t,e){return t===e||t!=t&&e!=e},ot=function(t,e){for(var i=t.length;i--;)if(nt(t[i][0],e))return i;return-1},at=Array.prototype.splice;function st(t){var e=this.__data__,i=ot(e,t);return!(i<0||(i==e.length-1?e.pop():at.call(e,i,1),--this.size,0))}function lt(t){var e=this.__data__,i=ot(e,t);return i<0?void 0:e[i][1]}function ut(t){return-1<ot(this.__data__,t)}function ct(t,e){var i=this.__data__,r=ot(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this}function pt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}pt.prototype.clear=rt,pt.prototype.delete=st,pt.prototype.get=lt,pt.prototype.has=ut,pt.prototype.set=ct;var ht=pt;function dt(){this.__data__=new ht,this.size=0}function ft(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function mt(t){return this.__data__.get(t)}function gt(t){return this.__data__.has(t)}var yt,vt="object"==typeof e&&e&&e.Object===Object&&e,_t="object"==typeof self&&self&&self.Object===Object&&self,xt=vt||_t||Function("return this")(),bt=xt.Symbol,wt=Object.prototype,St=wt.hasOwnProperty,Tt=wt.toString,Ct=bt?bt.toStringTag:void 0,It=function(t){var e=St.call(t,Ct),i=t[Ct];try{var r=!(t[Ct]=void 0)}catch(t){}var n=Tt.call(t);return r&&(e?t[Ct]=i:delete t[Ct]),n},Et=Object.prototype.toString,Mt=function(t){return Et.call(t)},At=bt?bt.toStringTag:void 0,Lt=function(t){return null==t?void 0===t?"[object Undef
2ined]":"[object Null]":(At&&At in Object(t)?It:Mt)(t)},kt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Pt=function(t){if(!kt(t))return!1;var e=Lt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=xt["__core-js_shared__"],zt=(yt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+yt:"",Ot=function(t){return!!zt&&zt in t},Nt=Function.prototype.toString,Rt=function(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Bt=/^\[object .+?Constructor\]$/,jt=Function.prototype,Ft=Object.prototype,Ut=jt.toString,Vt=Ft.hasOwnProperty,qt=RegExp("^"+Ut.call(Vt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=function(t){return!(!kt(t)||Ot(t))&&(Pt(t)?qt:Bt).test(Rt(t))},Zt=function(t,e){return null==t?void 0:t[e]},Ht=function(t,e){var i=Zt(t,e);return Gt(i)?i:void 0},Wt=Ht(xt,"Map"),Yt=Ht(Object,"create");function Kt(){this.__data__=Yt?Yt(null):{},this.size=0}function Xt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Jt=Object.prototype.hasOwnProperty;function Qt(t){var e=this.__data__;if(Yt){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return Jt.call(e,t)?e[t]:void 0}var $t=Object.prototype.hasOwnProperty;function te(t){var e=this.__data__;return Yt?void 0!==e[t]:$t.call(e,t)}function ee(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Yt&&void 0===e?"__lodash_hash_undefined__":e,this}function ie(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}ie.prototype.clear=Kt,ie.prototype.delete=Xt,ie.prototype.get=Qt,ie.prototype.has=te,ie.prototype.set=ee;var re=ie,ne=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},oe=function(t,e){var i=t.__data__;return ne(e)?i["string"==typeof e?"string":"hash"]:i.map};function ae(t){var e=oe(this,t).delete(t);return this.size-=e?1:0,e}function se(t){return oe(this,t).get(t)}function le(t){return oe(this,t).has(t)}function ue(t,e){var i=oe(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this}function ce(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}ce.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(Wt||ht),string:new re}},ce.prototype.delete=ae,ce.prototype.get=se,ce.prototype.has=le,ce.prototype.set=ue;var pe=ce;function he(t,e){var i=this.__data__;if(i instanceof ht){var r=i.__data__;if(!Wt||r.length<199)return r.push([t,e]),this.size=++i.size,this;i=this.__data__=new pe(r)}return i.set(t,e),this.size=i.size,this}function de(t){var e=this.__data__=new ht(t);this.size=e.size}de.prototype.clear=dt,de.prototype.delete=ft,de.prototype.get=mt,de.prototype.has=gt,de.prototype.set=he;var fe=de,me=function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r&&!1!==e(t[i],i,t););return t},ge=function(){try{var t=Ht(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ye=function(t,e,i){"__proto__"==e&&ge?ge(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i},ve=Object.prototype.hasOwnProperty,_e=function(t,e,i){var r=t[e];ve.call(t,e)&&nt(r,i)&&(void 0!==i||e in t)||ye(t,e,i)},xe=function(t,e,i,r){var n=!i;i=i||{};for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(i[s],t[s],s,i,t):void 0;void 0===l&&(l=t[s]),(n?ye:_e)(i,s,l)}return i},be=function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r},we=function(t){return null!=t&&"object"==typeof t},Se=function(t){return we(t)&&"[object Arguments]"==Lt(t)},Te=Object.prototype,Ce=Te.hasOwnProperty,Ie=Te.propertyIsEnumerable,Ee=Se(function(){return arguments}())?Se:function(t){return we(t)&&Ce.call(t,"callee")&&!Ie.call(t,"callee")},Me=Array.isArray;function Ae(){return!1}var Le=r((function(t,e){var i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,n=r&&r.exports===i?xt.Buffer:void 0,o=(n?n.isBuffer:void 0)||Ae;t.exports=o})),ke=/^(?:0|[1-9]\d*)$/,Pe=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&ke.test(t))&&-1<t&&t%1==0&&t<e},De=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},ze={};function Oe(t){return we(t)&&De(t.length)&&!!ze[Lt(t)]}
2ze["[object Float32Array]"]=ze["[object Float64Array]"]=ze["[object Int8Array]"]=ze["[object Int16Array]"]=ze["[object Int32Array]"]=ze["[object Uint8Array]"]=ze["[object Uint8ClampedArray]"]=ze["[object Uint16Array]"]=ze["[object Uint32Array]"]=!0,ze["[object Arguments]"]=ze["[object Array]"]=ze["[object ArrayBuffer]"]=ze["[object Boolean]"]=ze["[object DataView]"]=ze["[object Date]"]=ze["[object Error]"]=ze["[object Function]"]=ze["[object Map]"]=ze["[object Number]"]=ze["[object Object]"]=ze["[object RegExp]"]=ze["[object Set]"]=ze["[object String]"]=ze["[object WeakMap]"]=!1;var Ne=function(t){return function(e){return t(e)}},Re=r((function(t,e){var i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,n=r&&r.exports===i&&vt.process,o=function(){try{var t=r&&r.require&&r.require("util").types;return t||n&&n.binding&&n.binding("util")}catch(t){}}();t.exports=o})),Be=Re&&Re.isTypedArray,je=Be?Ne(Be):Oe,Fe=Object.prototype.hasOwnProperty,Ue=function(t,e){var i=Me(t),r=!i&&Ee(t),n=!i&&!r&&Le(t),o=!i&&!r&&!n&&je(t),a=i||r||n||o,s=a?be(t.length,String):[],l=s.length;for(var u in t)!e&&!Fe.call(t,u)||a&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Pe(u,l))||s.push(u);return s},Ve=Object.prototype,qe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ve)},Ge=function(t,e){return function(i){return t(e(i))}},Ze=Ge(Object.keys,Object),He=Object.prototype.hasOwnProperty,We=function(t){if(!qe(t))return Ze(t);var e=[];for(var i in Object(t))He.call(t,i)&&"constructor"!=i&&e.push(i);return e},Ye=function(t){return null!=t&&De(t.length)&&!Pt(t)},Ke=function(t){return(Ye(t)?Ue:We)(t)},Xe=function(t,e){return t&&xe(e,Ke(e),t)},Je=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e},Qe=Object.prototype.hasOwnProperty,$e=function(t){if(!kt(t))return Je(t);var e=qe(t),i=[];for(var r in t)("constructor"!=r||!e&&Qe.call(t,r))&&i.push(r);return i},ti=function(t){return Ye(t)?Ue(t,!0):$e(t)},ei=function(t,e){return t&&xe(e,ti(e),t)},ii=r((function(t,e){var i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,n=r&&r.exports===i?xt.Buffer:void 0,o=n?n.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var i=t.length,r=o?o(i):new t.constructor(i);return t.copy(r),r}})),ri=function(t,e){var i=-1,r=t.length;for(e=e||Array(r);++i<r;)e[i]=t[i];return e},ni=function(t,e){for(var i=-1,r=null==t?0:t.length,n=0,o=[];++i<r;){var a=t[i];e(a,i,t)&&(o[n++]=a)}return o};function oi(){return[]}var ai=Object.prototype.propertyIsEnumerable,si=Object.getOwnPropertySymbols,li=si?function(t){return null==t?[]:(t=Object(t),ni(si(t),(function(e){return ai.call(t,e)})))}:oi,ui=function(t,e){return xe(t,li(t),e)},ci=function(t,e){for(var i=-1,r=e.length,n=t.length;++i<r;)t[n+i]=e[i];return t},pi=Ge(Object.getPrototypeOf,Object),hi=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ci(e,li(t)),t=pi(t);return e}:oi,di=function(t,e){return xe(t,hi(t),e)},fi=function(t,e,i){var r=e(t);return Me(t)?r:ci(r,i(t))},mi=function(t){return fi(t,Ke,li)},gi=function(t){return fi(t,ti,hi)},yi=Ht(xt,"DataView"),vi=Ht(xt,"Promise"),_i=Ht(xt,"Set"),xi=Ht(xt,"WeakMap"),bi="[object Map]",wi="[object Promise]",Si="[object Set]",Ti="[object WeakMap]",Ci="[object DataView]",Ii=Rt(yi),Ei=Rt(Wt),Mi=Rt(vi),Ai=Rt(_i),Li=Rt(xi),ki=Lt;(yi&&ki(new yi(new ArrayBuffer(1)))!=Ci||Wt&&ki(new Wt)!=bi||vi&&ki(vi.resolve())!=wi||_i&&ki(new _i)!=Si||xi&&ki(new xi)!=Ti)&&(ki=function(t){var e=Lt(t),i="[object Object]"==e?t.constructor:void 0,r=i?Rt(i):"";if(r)switch(r){case Ii:return Ci;case Ei:return bi;case Mi:return wi;case Ai:return Si;case Li:return Ti}return e});var Pi=ki,Di=Object.prototype.hasOwnProperty,zi=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&Di.call(t,"index")&&(i.index=t.index,i.input=t.input),i},Oi=xt.Uint8Array,Ni=function(t){var e=new t.constructor(t.byteLength);return new Oi(e).set(new Oi(t)),e},Ri=function(t,e){var i=e?Ni(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)},Bi=/\w*$/,ji=function(t){var e=new t.constructor(t.source,Bi.exec(t));return e.lastIndex=t.lastIndex,e}
2,Fi=bt?bt.prototype:void 0,Ui=Fi?Fi.valueOf:void 0,Vi=function(t){return Ui?Object(Ui.call(t)):{}},qi=function(t,e){var i=e?Ni(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)},Gi=function(t,e,i){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Ni(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return Ri(t,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return qi(t,i);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return ji(t);case"[object Symbol]":return Vi(t)}},Zi=Object.create;function Hi(){}var Wi=function(t){if(!kt(t))return{};if(Zi)return Zi(t);Hi.prototype=t;var e=new Hi;return Hi.prototype=void 0,e},Yi=function(t){return"function"!=typeof t.constructor||qe(t)?{}:Wi(pi(t))};function Ki(t){return we(t)&&"[object Map]"==Pi(t)}var Xi=Re&&Re.isMap,Ji=Xi?Ne(Xi):Ki;function Qi(t){return we(t)&&"[object Set]"==Pi(t)}var $i=Re&&Re.isSet,tr=$i?Ne($i):Qi,er=1,ir=2,rr=4,nr="[object Arguments]",or="[object Function]",ar="[object GeneratorFunction]",sr="[object Object]",lr={};lr[nr]=lr["[object Array]"]=lr["[object ArrayBuffer]"]=lr["[object DataView]"]=lr["[object Boolean]"]=lr["[object Date]"]=lr["[object Float32Array]"]=lr["[object Float64Array]"]=lr["[object Int8Array]"]=lr["[object Int16Array]"]=lr["[object Int32Array]"]=lr["[object Map]"]=lr["[object Number]"]=lr[sr]=lr["[object RegExp]"]=lr["[object Set]"]=lr["[object String]"]=lr["[object Symbol]"]=lr["[object Uint8Array]"]=lr["[object Uint8ClampedArray]"]=lr["[object Uint16Array]"]=lr["[object Uint32Array]"]=!0,lr["[object Error]"]=lr[or]=lr["[object WeakMap]"]=!1;var ur,cr=function t(e,i,r,n,o,a){var s,l=i&er,u=i&ir,c=i&rr;if(r&&(s=o?r(e,n,o,a):r(e)),void 0!==s)return s;if(!kt(e))return e;var p=Me(e);if(p){if(s=zi(e),!l)return ri(e,s)}else{var h=Pi(e),d=h==or||h==ar;if(Le(e))return ii(e,l);if(h==sr||h==nr||d&&!o){if(s=u||d?{}:Yi(e),!l)return u?di(e,ei(s,e)):ui(e,Xe(s,e))}else{if(!lr[h])return o?e:{};s=Gi(e,h,l)}}var f=(a=a||new fe).get(e);if(f)return f;a.set(e,s),tr(e)?e.forEach((function(n){s.add(t(n,i,r,n,e,a))})):Ji(e)&&e.forEach((function(n,o){s.set(o,t(n,i,r,o,e,a))}));var m=c?u?gi:mi:u?keysIn:Ke,g=p?void 0:m(e);return me(g||e,(function(n,o){g&&(n=e[o=n]),_e(s,o,t(n,i,r,o,e,a))})),s},pr=function(t){return cr(t,5)},hr=Map,dr=(w(fr,ur=I),fr);function fr(){var e=null!==ur&&ur.apply(this,arguments)||this;return e.layout="icons",e.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief"],e.style=t.ControlStyle.light,e}var mr,gr=(w(yr,mr=q),yr.prototype.onAdd=function(t,e){var i=this;this.map=t;var r=this.buildContainer(t,this.options.style,"Map Style Control"),n=this.buildStyleOpsGrid(r),o=this.buildCurrStyleBtn(r,n);return r.addEventListener("mouseover",(function(){i.hasMouse=!0,r.classList.add(yr.Css.inUse),n.classList.remove("hidden-accessible-element")})),r.addEventListener("focusin",(function(){i.hasFocus=!0,r.classList.add(yr.Css.inUse),n.classList.remove("hidden-accessible-element")})),r.addEventListener("mouseleave",(function(){i.hasMouse=!1,i.hasFocus||(r.classList.remove(yr.Css.inUse),n.classList.add("hidden-accessible-element"))})),r.addEventListener("focusout",(function(t){t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(i.hasFocus=!1,i.hasMouse||(r.classList.remove(yr.Css.inUse),n.classList.add("hidden-accessible-element")))})),e&&yr.InvertOrderPositions.includes(e.position)?(r.appendChild(n),r.appendChild(o)):(r.appendChild(o),r.appendChild(n)),r},yr.prototype.onRemove=function(){mr.prototype.onRemove.call(this),this.map.events.remove("styledata",this.onStyleChange)},yr.prototype.buildSelectStyleBtn=function(t,e){var i=this,r=document.createElement("button"),n=this.mapToFriendlyStyleName(t);r.setAttribute("title",n),r.setAttribute("alt",n),r.setAttribute("type","button");var o=new Image;return o.src=e,o.alt=n,r.appendChild(o),"icons"===this.options.layout?r.classList.add(yr.Css.button):r.appendChild(document.createTextNode(n)),r.addEventListener("click",(function(){i.map.setStyle({style:t})})),r}
2,yr.prototype.buildCurrStyleBtn=function(t,e){var i=document.createElement("button");i.classList.add(yr.Css.button),i.classList.add(yr.Css.currentStyle),i.setAttribute("title","Select Style"),i.setAttribute("alt","Select Style"),i.setAttribute("type","button"),this.currStyleImage=new Image,i.appendChild(this.currStyleImage);var r=document.createElement("div");return r.classList.add("icon"),i.appendChild(r),i},yr.prototype.buildStyleOpsGrid=function(t){var e=this,i=document.createElement("div");return i.classList.add(yr.Css.styleOptions),i.classList.add(this.options.layout),i.setAttribute("aria-label","Style Options"),i.classList.add("hidden-accessible-element"),this.map.styles.initialize().then((function(){for(var t=e.map.styles.getDef(),r=e.map.getStyle().style,n=0,o=t.styles;n<o.length;n++){var a=o[n],s=new k({domain:t.domain,path:a.iconPath}).toString();e.styleIcons.set(a.name,s),a.name===r&&(e.currStyleImage.src=s,e.currStyleImage.alt=e.mapToFriendlyStyleName(a.name))}"all"===e.options.mapStyles?e.styleIcons.forEach((function(t,r){var n=e.buildSelectStyleBtn(r,t);i.appendChild(n)})):e.options.mapStyles.filter((function(t){return e.styleIcons.has(t)})).forEach((function(t){var r=e.styleIcons.get(t),n=e.buildSelectStyleBtn(t,r);i.appendChild(n)})),e.map.events.add("styledata",e.onStyleChange)})),i},yr.prototype.mapToFriendlyStyleName=function(t){return yr.StyleNamesMap[t]?yr.StyleNamesMap[t]:t},yr.InvertOrderPositions=[t.ControlPosition.TopRight,t.ControlPosition.BottomRight],yr.Css={button:"azure-maps-control-button",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options"},yr.StyleNamesMap={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast"},yr);function yr(t){var e=mr.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.styleIcons=new hr,e.onStyleChange=function(){var t=e.map.getStyle().style;e.styleIcons.has(t)&&(e.currStyleImage.src=e.styleIcons.get(t),e.currStyleImage.alt=e.mapToFriendlyStyleName(t))},e.options=(new dr).merge(pr(t)),e}var vr,_r=(w(xr,vr=I),xr);function xr(){var e=null!==vr&&vr.apply(this,arguments)||this;return e.flow="relative",e.incidents=!0,e.isActive=!1,e.style=t.ControlStyle.light,e}var br,wr=(w(Sr,br=q),Sr.prototype.onAdd=function(t){this.container=this.buildContainer(t,this.options.style,"Traffic Control"),this.container.style.flexDirection="column";var e=this.constructTrafficButton(t);return this.container.appendChild(e),this.container},Sr.prototype.getOptions=function(){return pr(this.options)},Sr.prototype.constructTrafficButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("traffic"),i.setAttribute("title","toggle traffic display"),i.setAttribute("alt","toggle traffic display"),i.setAttribute("type","button"),i.addEventListener("click",(function(){var i=t.getTraffic();e.options.isActive=!("none"!==i.flow||i.incidents),e.options.isActive?(t.setTraffic({flow:e.options.flow,incidents:e.options.incidents}),e.container.classList.add("in-use")):(t.setTraffic({flow:"none",incidents:!1}),e.container.classList.remove("in-use"))})),t.events.add("ready",(function(){e.options.isActive&&i.dispatchEvent(new Event("click"))})),i},Sr);function Sr(t){var e=br.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new _r).merge(t),e}var Tr,Cr=(w(Ir,Tr=q),Ir.prototype.onAdd=function(e){var i=this.buildContainer(e,t.ControlStyle.auto,"Traffic Legend"),r=this.buildTrafficLegendDiv(e);return i.appendChild(r),i},Ir.prototype.buildTrafficLegendDiv=function(t){var e=document.createElement("div");e.classList.add("traffic-legend","hidden"),e.setAttribute("title","Traffic Legend"),e.setAttribute("alt","Traffic Legend");var i=document.createElement("table"),r=document.createElement("tr"),n=document.createElement("td");n.setAttribute("title","Traffic"),n.setAttribute("alt","Traffic"),n.appendChild(document.createTextNode("Traffic")),n.classList.add("traffic-legend-title"),n.colSpan=6,r.appendChild(n),i.appendChild(r);for(var o=document.createElement("tr"),a=0,s=this.table;a<s.length;
2a++){var l=s[a],u=document.createElement("td");if("Fast"===l||"Slow"===l)u.setAttribute("title",l),u.setAttribute("alt",l),u.appendChild(document.createTextNode(l)),u.classList.add("traffic-legend-text");else{u.classList.add("traffic-legend-colors");for(var c=0,p=l;c<p.length;c++){var h=p[c],d=document.createElement("div");d.classList.add(h),u.appendChild(d)}}o.appendChild(u)}return i.appendChild(o),e.appendChild(i),t.events.add("sourceadded",(function(t){"vectorTilesTraffic"===t.getId()&&e.classList.remove("hidden")})),t.events.add("sourceremoved",(function(t){"vectorTilesTraffic"===t.getId()&&e.classList.add("hidden")})),e},Ir);function Ir(){var t=Tr.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t}var Er,Mr=(w(Ar,Er=I),Ar);function Ar(){var e=null!==Er&&Er.apply(this,arguments)||this;return e.zoomDelta=1,e.style=t.ControlStyle.light,e}var Lr,kr=(w(Pr,Lr=q),Pr.prototype.onAdd=function(t){var e=this.buildContainer(t,this.options.style,"Zoom Control");e.style.flexDirection="column";var i=this.constructZoomInButton(t),r=this.constructZoomOutButton(t);return e.appendChild(i),e.appendChild(r),e},Pr.prototype.constructZoomInButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("zoom-in"),i.setAttribute("title","Zoom In"),i.setAttribute("alt","Zoom In"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:Pr.ZOOM_DURATION_MS,type:"ease"},!0)})),i},Pr.prototype.constructZoomOutButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("zoom-out"),i.setAttribute("title","Zoom Out"),i.setAttribute("alt","Zoom Out"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:Pr.ZOOM_DURATION_MS,type:"ease"},!0)})),i},Pr.ZOOM_DURATION_MS=200,Pr);function Pr(t){var e=Lr.call(this)||this;return e.options=(new Mr).merge(t),e}var Dr=Object.freeze({__proto__:null,PitchControl:et,CompassControl:K,ZoomControl:kr,StyleControl:gr,TrafficControl:wr,TrafficLegendControl:Cr});function zr(t){return this.__data__.has(t)}function Or(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new pe;++e<i;)this.add(t[e])}Or.prototype.add=Or.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Or.prototype.has=zr;var Nr=Or,Rr=function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(t[i],i,t))return!0;return!1},Br=function(t,e){return t.has(e)},jr=function(t,e,i,r,n,o){var a=1&i,s=t.length,l=e.length;if(s!=l&&!(a&&s<l))return!1;var u=o.get(t);if(u&&o.get(e))return u==e;var c=-1,p=!0,h=2&i?new Nr:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],f=e[c];if(r)var m=a?r(f,d,c,e,t,o):r(d,f,c,t,e,o);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Rr(e,(function(t,e){if(!Br(h,e)&&(d===t||n(d,t,i,r,o)))return h.push(e)}))){p=!1;break}}else if(d!==f&&!n(d,f,i,r,o)){p=!1;break}}return o.delete(t),o.delete(e),p};function Fr(t){var e=-1,i=Array(t.size);return t.forEach((function(t,r){i[++e]=[r,t]})),i}function Ur(t){var e=-1,i=Array(t.size);return t.forEach((function(t){i[++e]=t})),i}var Vr,qr=bt?bt.prototype:void 0,Gr=qr?qr.valueOf:void 0,Zr=function(t,e,i,r,n,o,a){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Oi(t),new Oi(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Fr;case"[object Set]":var l=1&r;if(s=s||Ur,t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=jr(s(t),s(e),r,n,o,a);return a.delete(t),c;case"[object Symbol]":if(Gr)return Gr.call(t)==Gr.call(e)}return!1},Hr=Object.prototype.hasOwnProperty,Wr=function(t,e,i,r,n,o){var a=1&i,s=mi(t),l=s.length;if(l!=mi(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Hr.call(e,c)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var h=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<l;){var f=t[c=s[u]],m=e[c];if(r)var g=a?r(m,f,c,e,t,o):r(f,m,c,t,e,o);if(!(void 0===g?f===m||n(f,m,i,r,o):g)){h=!1;break}d=d||"constructor"==c}if(h&&!d){var y=t.constructor,v=e.constructor;y!=v&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v)&&(h=!1)}return o.delete(t),o.delete(e),h},Yr="[object Arguments]",Kr="[object Array]",Xr="[object Object]",Jr=Object.prototype.hasOwnProperty,Qr=function(t,e,
2i,r,n,o){var a=Me(t),s=Me(e),l=a?Kr:Pi(t),u=s?Kr:Pi(e),c=(l=l==Yr?Xr:l)==Xr,p=(u=u==Yr?Xr:u)==Xr,h=l==u;if(h&&Le(t)){if(!Le(e))return!1;c=!(a=!0)}if(h&&!c)return o=o||new fe,a||je(t)?jr(t,e,i,r,n,o):Zr(t,e,l,i,r,n,o);if(!(1&i)){var d=c&&Jr.call(t,"__wrapped__"),f=p&&Jr.call(e,"__wrapped__");if(d||f)return n(d?t.value():t,f?e.value():e,i,r,o=o||new fe)}return h&&(o=o||new fe,Wr(t,e,i,r,n,o))},$r=function t(e,i,r,n,o){return e===i||(null==e||null==i||!we(e)&&!we(i)?e!=e&&i!=i:Qr(e,i,r,n,t,o))},tn=function(t,e){return $r(t,e)},en=(Vr=Object.freeze({__proto__:null,default:{}}))&&Vr.default||Vr,rn=r((function(t){!function(){var e,i,r,n=0,o=[];for(s.BUFFER_SIZE=512,s.bin=a,s.test=function(t){if("string"==typeof t)return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(t)},i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);function a(){var t=function(t){var o,a,l;if(void 0!==r){if(void 0===e||s.BUFFER_SIZE<n+t)if(n=0,r.getRandomValues)e=new Uint8Array(s.BUFFER_SIZE),r.getRandomValues(e);else{if(!r.randomBytes)throw new Error("Non-standard crypto library");e=r.randomBytes(s.BUFFER_SIZE)}return e.slice(n,n+=t)}for(o=[],i=0;i<t;i++)o.push((a=0,l=255,Math.floor(Math.random()*(l-a))+a));return o}(16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function s(){var t=a();return o[t[0]]+o[t[1]]+o[t[2]]+o[t[3]]+"-"+o[t[4]]+o[t[5]]+"-"+o[t[6]]+o[t[7]]+"-"+o[t[8]]+o[t[9]]+"-"+o[t[10]]+o[t[11]]+o[t[12]]+o[t[13]]+o[t[14]]+o[t[15]]}"undefined"!=typeof crypto?r=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(r=window.msCrypto),r=r||en,t.exports=s}()})),nn=(on.TYPE="Feature",on);function on(t,e,i,r){this.type="Feature",this.type=on.TYPE,this.properties=e||{},this.id=i,this.geometry=t,this.bbox=r}var an,sn=(w(ln,an=Array),ln.fromData=function(t){var e=NaN,i=NaN,r=new Set(["y"]),n=new Set(["x"]);return Object.keys(t).forEach((function(o){var a=o.toLowerCase();isNaN(e)&&r.has(a)&&"number"==typeof t[o]?e=t[o]:isNaN(i)&&n.has(a)&&"number"==typeof t[o]&&(i=t[o])})),isNaN(e)||isNaN(i)?null:new ln(e,i)},ln.getX=function(t){return 0<t.length?t[0]:NaN},ln.getY=function(t){return 1<t.length?t[1]:NaN},ln.getDestination=function(t,e,i){return new ln(ln.getX(t)+i*Math.cos((e+270)*Math.PI/180),ln.getY(t)+i*Math.sin((e+270)*Math.PI/180))},ln.getDistance=function(t,e){var i=ln.getX(t)-ln.getX(e),r=ln.getY(t)-ln.getY(e);return Math.sqrt(i*i+r*r)},ln.getHeading=function(t,e){var i=ln.getX(e)-ln.getX(t),r=ln.getY(t)-ln.getY(e);return 180*(2.5*Math.PI-Math.atan2(r,i))/Math.PI%360},ln);function ln(t,e){return an.call(this,t,e)||this}var un=(cn.TYPE="Point",cn);function cn(t){this.type="Point",this.type=cn.TYPE,this.coordinates=t}var pn,hn,dn,fn,mn,gn,yn,vn,_n,xn,bn=6378137,wn=Math.PI/180,Sn=180/Math.PI,Tn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function Cn(t){return t*wn}function In(t){return t*Sn}function En(t,e,i){return Math.min(Math.max(t,e),i)}function Mn(t,e){var i=Cn(e[1]-t[1]),r=Cn(e[0]-t[0]),n=Math.pow(Math.sin(i/2),2)+Math.cos(Cn(t[1]))*Math.cos(Cn(e[1]))*Math.pow(Math.sin(r/2),2),o=2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n));return Math.round(bn*o*100)/100}function An(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return dn.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return dn.kilometers;case"miles":case"mile":case"mi":return dn.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return dn.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return dn.yards;default:return dn.meters}return dn.meters}function Ln(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return _n.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return _n.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return _n.knotsPerSecond;case"standardgravity":case"g":return _n.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return _n.feetPerSecondSquared;
2case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return _n.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return _n.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return _n.kilometersPerHourSecond;default:return _n.metersPerSecondSquared}return _n.metersPerSecondSquared}function kn(t){if(t)switch(t){case"acres":case"ac":return pn.acres;case"hectares":case"ha":return pn.hectares;case"squareFeet":case"ft^2":case"ft2":return pn.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return pn.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return pn.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return pn.squareMiles;default:return pn.squareMeters}return pn.squareMeters}function Pn(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return yn.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return yn.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return yn.knots;case"mach":case"m":return yn.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return yn.kilometersPerHour;default:return yn.metersPerSecond}return yn.metersPerSecond}function Dn(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return mn.ms;case"minutes":case"minute":case"mins":case"min":return mn.minutes;case"hours":case"hour":case"hr":case"h":return mn.hours;case"days":case"day":case"d":return mn.days;default:return mn.seconds}return mn.seconds}function zn(t){var e=0;if(t&&0<t.length){e=Math.abs(On(t[0]));for(var i=1,r=t.length;i<r;i++)e-=Math.abs(On(t[i]))}return e}function On(t){var e=0;if(3<=t.length){for(var i=void 0,r=void 0,n=0,o=t.length;n<o;n++)e+=(Cn(t[n===o-2?(i=o-2,r=o-1,0):n===o-1?(i=o-1,r=0,1):(r=(i=n)+1,n+2)][0])-Cn(t[i][0]))*Math.sin(Cn(t[r][1]));e=e*bn*bn/2}return e}function Nn(t,e,i){return(t[0]-i[0])*(e[1]-i[1])-(t[1]-i[1])*(e[0]-i[0])}function Rn(t,e,i){if(2<=i.length){for(var r=1/0,n=void 0,o=null,a=Qn(i,22),s=void 0,l=0,u=a.length-1;l<u;l++)s=Bn(e,a[l],a[l+1]),(n=sn.getDistance(e,s))<r&&(r=n,o=s);if(o){var c=Jn([o],22)[0];return new nn(new un(c),{distance:Vn(t,c)})}}else if(1===i.length)return new nn(new un(i[0]),{distance:Vn(t,i[0])});return null}function Bn(t,e,i){if(e[0]===i[0]&&e[1]===i[1])return e;var r=t[0]-e[0],n=t[1]-e[1],o=i[0]-e[0],a=i[1]-e[1],s=(o*r+a*n)/(o*o+a*a);return s<0?e:1<s?i:[e[0]+o*s,e[1]+a*s]}function jn(t,e){if(!isNaN(t)&&"number"==typeof e&&0<=e){var i=void 0;i=e<Tn.length?Tn[e]:Math.pow(10,e),t=Math.round(t*i)/i}return t}function Fn(t,e,i,r){switch(An(e)){case dn.meters:t/=1e3;break;case dn.feet:t/=3280.8399;break;case dn.miles:t/=.62137119;break;case dn.yards:t/=1093.6133;break;case dn.nauticalMiles:t/=.5399568;case dn.kilometers:}switch(An(i)){case dn.meters:t*=1e3;break;case dn.feet:t*=3280.8399;break;case dn.miles:t*=.62137119;break;case dn.yards:t*=1093.6133;break;case dn.nauticalMiles:t*=.5399568;case dn.kilometers:}if("number"==typeof r&&0<=r){var n=Math.pow(10,r);t=Math.round(t*n)/n}return t}function Un(t,e,i,r){r=r||"meters",t=lo(t);var n=qn(r),o=Cn(t[1]),a=Cn(t[0]),s=Cn(e),l=i/n,u=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(s)),c=a+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(u)),p=En(Yn(In(u)),-85,85);return[Kn(In(c)),p]}function Vn(t,e,i){var r=Mn(t=lo(t),e=lo(e));return"meters"===i?r:Fn(r,"meters",i||"meters")}function qn(t){var e=An(t);return Fn(bn,dn.meters,e)}function Gn(t,e){if(t=lo(t),e=lo(e),t&&2<=t.length&&e&&2<=e.length){var i=Cn(t[1]),r=Cn(e[1]),n=Cn(e[0]-t[0]),o=Math.sin(n)*Math.cos(r),a=Math.cos(i)*Math.sin(r)-Math.sin(i)*Math.cos(r)*Math.cos(n);return(In(Math.atan2(o,a))+360)%360}return NaN}function Zn(t,e){var i,r=0;Array.isArray(t)?i=t:t.type&&"LineString"===t.type&&(i=t.coordinates);for(var n=0,o=i.length-1;n<o;
vendor: 5,310 bytes, line 2
2n++)r+=Mn(i[n],i[n+1]);return Fn(r,"meters",e||"meters")}function Hn(t,e,i){i=i||"meters";var r,n,o=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var a=n.length,s=1;s<a;s++){if(e<=o+(r=Vn(n[s-1],n[s],i))){var l=Gn(n[s-1],n[s]);return Un(n[s-1],l,e-o,i)}o+=r}return o<=e?n[a-1]:n[0]}return null}function Wn(t,e,i,r,n){r=r||"meters",n=n||0,t=lo(t);for(var o=[],a=360/i,s=0;s<=i;s++)o.push(Un(t,(s*a+n)%360,e,r));return o}function Yn(t){return 90<t?180<(t=(t+90)%360)?90-(t-180):t-90:t<-90?(t=(t-90)%360)<-180?-90-(t+180):t+90:t}function Kn(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function Xn(t,e,i){if(0===i)return Object.assign({},t);e=lo(e);for(var r,n,o=[],a=0,s=t.length;a<s;a++)r=Vn(e,t[a]),n=Gn(e,t[a]),o.push(Un(e,n+i,r));return o}function Jn(t,e){for(var i,r,n=512*Math.pow(2,e),o=[],a=0,s=t.length;a<s;a++)i=t[a][0]/n-.5,r=.5-t[a][1]/n,o.push([360*i,90-360*Math.atan(Math.exp(2*-r*Math.PI))/Math.PI]);return o}function Qn(t,e){for(var i,r,n,o=512*Math.pow(2,e),a=[],s=0,l=t.length;s<l;s++)n=Math.sin(t[s][1]*Math.PI/180),i=(t[s][0]+180)/360,r=.5-Math.log((1+n)/(1-n))/(4*Math.PI),a.push([Math.round(i*o),Math.round(r*o)]);return a}function $n(t,e,i,r){switch(Ln(e)){case _n.kilometersPerHourSecond:t/=3.6;break;case _n.milesPerHourSecond:t/=2.236936292054;break;case _n.knotsPerSecond:t/=1.943844492441;break;case _n.standardGravity:t/=.1019716212978;break;case _n.kilometersPerSecondSquared:t/=.001;break;case _n.milesPerSecondSquared:t/=.000621371192;break;case _n.feetPerSecondSquared:t/=3.280839895012;break;case _n.yardsPerSecondSquared:t/=1.093613298338;case _n.metersPerSecondSquared:}switch(Ln(i)){case _n.kilometersPerHourSecond:t*=3.6;break;case _n.milesPerHourSecond:t*=2.236936292054;break;case _n.knotsPerSecond:t*=1.943844492441;break;case _n.standardGravity:t*=.1019716212978;break;case _n.kilometersPerSecondSquared:t*=.001;break;case _n.milesPerSecondSquared:t*=.000621371192;break;case _n.feetPerSecondSquared:t*=3.280839895012;break;case _n.yardsPerSecondSquared:t*=1.093613298338;case _n.metersPerSecondSquared:}return jn(t,r)}function to(t,e,i,r){switch(kn(e)){case pn.acres:t*=4046.8564224;break;case pn.hectares:t*=1e4;break;case pn.squareFeet:t*=.09290304;break;case pn.squareKilometers:t*=1e6;break;case pn.squareMiles:t*=259e4;break;case pn.squareYards:t*=.83612736;case pn.squareMeters:}switch(kn(i)){case pn.acres:t/=4046.8564224;break;case pn.hectares:t/=1e4;break;case pn.squareFeet:t/=.09290304;break;case pn.squareKilometers:t/=1e6;break;case pn.squareMiles:t/=259e4;break;case pn.squareYards:t/=.83612736;case pn.squareMeters:}return jn(t,r)}function eo(t,e,i,r){switch(Pn(e)){case yn.feetPerSecond:t*=1.09728;break;case yn.milesPerHour:t*=1.6093;break;case yn.knots:t*=1.852;break;case yn.metersPerSecond:t*=3.6;break;case yn.mach:t*=1234.8;case yn.kilometersPerHour:}switch(Pn(i)){case yn.feetPerSecond:t/=1.09728;break;case yn.milesPerHour:t/=1.6093;break;case yn.knots:t/=1.852;break;case yn.metersPerSecond:t/=3.6;break;case yn.mach:t/=1234.8;case yn.kilometersPerHour:}return jn(t,r)}function io(t,e,i,r){switch(Dn(e)){case mn.ms:t/=1e3;break;case mn.hours:t*=3600;break;case mn.minutes:t*=60;break;case mn.days:t*=86400;case mn.seconds:}switch(Dn(i)){case mn.ms:t*=1e3;break;case mn.hours:t/=3600;break;case mn.minutes:t/=60;break;case mn.days:t/=86400;case mn.seconds:}return jn(t,r)}function ro(t,e,i,r,n,o,a,s){var l=Fn(e,n,dn.meters),u=io(i,o,mn.seconds);return $n(2*(l-eo(t,r,yn.metersPerSecond)*u)/(u*u),_n.metersPerSecondSquared,a,s)}function no(t,e,i,r,n,o,a){var s=eo(t,r,yn.metersPerSecond);return $n((eo(e,r,yn.metersPerSecond)-s)/io(i,n,mn.seconds),_n.metersPerSecondSquared,o,a)}function oo(t,e,i,r){var n=ao(t),o=ao(e);return null!=n&&null!=o?io(o.getTime()-n.getTime(),mn.ms,i,r):NaN}function ao(t){if("[object Date]"===Object.prototype.toString.call(t))return t;if("string"==typeof t){var e=Date.parse(t);if(!isNaN(e))return new Date(e);if(0<=t.indexOf("Date(")){var i=0;return i=0<(t=t.replace("/Date(","").replace(")/","")).indexOf("+")?parseInt(t.substr(0,t.indexOf("+")),10):0<t.indexOf("-")?parseInt(t.substr(0,t.indexOf("-")),10):parseInt(t,10),new Date(i)}}else if("number"==typeof t)return new Date(t);return null}function so(t){var e=[],i=null,r=null;if(Array.isArray(t)&&0<t.length)if(Array.isArray(t[0])&&"number"==typeof t[0][0])e=t;else for(var n=t.length,o=0;o<n;o++)e=e.concat(so(t[o]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":case"MultiPoint":e=t.coordinates;break;case"Polygon":case"MultiLineString":i=t.coordinates;break;case"MultiPolygon":r=t.coordinates;break;case"Feature":var a=t;e=To._isCircle(a)?To._getCirclePositions(a):so(a.geometry);break;case"FeatureCollection":e=so(t.features);break;case"GeometryCollection":e=so(t.geometries)}else if(t instanceof To)return so(t.toJson());if(i)for(n=i.length,o=0;o<n;o++)e=e.concat(i[o]);else if(r){var s=r.length;for(o=0;o<s;o++)for(var l=r[o].length,u=0;u<l;u++)e=e.concat(r[o][u])}return e}function lo(t){if(Array.isArray(t)&&"number"==typeof t[0])return t;if(t.type){if("Point"===t.type)return t.coordinates;if("Feature"===t.type&&"Point"===t.geometry.type)return t.geometry.coordinates}else if(t instanceof To&&"Point"===t.getType())return t.getCoordinates();return null}
2function uo(t,e,i){i=i||"meters";var r,n,o=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var a=n.length,s=1;s<a;s++){if(e<=o+(r=Vn(n[s-1],n[s],i))){var l=Gn(n[s-1],n[s]),u=Un(n[s-1],l,e-o,i);return new nn(new un(u),{heading:l})}o+=r}return o<=e?new nn(new un(n[a-1]),{heading:Gn(n[a-2],n[a-1])}):new nn(new un(n[0]),{heading:Gn(n[0],n[1])})}return null}function co(t,e,i,r){var n,o=lo(t),a=Qn([o],22)[0],s=null,l=1/0;switch((e=e instanceof To?e.toJson():e).type){case"Feature":return co(t,e.geometry,i);case"Point":n=[[e.coordinates]];break;case"MultiPoint":for(var u=void 0,c=e.coordinates,p=0,h=c.length;p<h;p++)(u=Vn(o,c[p]))<l&&(l=u,s=new nn(new un(c[p]),{distance:u}));break;case"LineString":n=[e.coordinates];break;case"Polygon":case"MultiLineString":n=e.coordinates;break;case"MultiPolygon":var d=e.coordinates;if(0<d.length)for(n=d[0],p=1,h=d.length;p<h;p++)n=n.concat(d[p])}if(n){var f=void 0;for(p=0,h=n.length;p<h;p++)(f=Rn(o,a,n[p]))&&f.properties.distance<l&&(l=f.properties.distance,s=f)}return s&&(s.properties.distance=Fn(s.properties.distance,"meters",i,r)),s}(hn=pn=pn||{}).squareMeters="squareMeters",hn.acres="acres",hn.hectares="hectares",hn.squareFeet="squareFeet",hn.squareKilometers="squareKilometers",hn.squareMiles="squareMiles",hn.squareYards="squareYards",(fn=dn=dn||{}).meters="meters",fn.kilometers="kilometers",fn.feet="feet",fn.miles="miles",fn.nauticalMiles="nauticalMiles",fn.yards="yards",(gn=mn=mn||{}).seconds="seconds",gn.hours="hours",gn.ms="ms",gn.minutes="minutes",gn.days="days",(vn=yn=yn||{}).metersPerSecond="metersPerSecond",vn.kilometersPerHour="kilometersPerHour",vn.feetPerSecond="feetPerSecond",vn.milesPerHour="milesPerHour",vn.knots="knots",vn.mach="mach",(xn=_n=_n||{}).milesPerSecondSquared="milesPerSecondSquared",xn.kilometersPerSecondSquared="kilometersPerSecondSquared",xn.knotsPerSecond="knotsPerSecond",xn.standardGravity="standardGravity",xn.feetPerSecondSquared="feetPerSecondSquared",xn.yardsPerSecondSquared="yardsPerSecondSquared",xn.milesPerHourSecond="milesPerHourSecond",xn.kilometersPerHourSecond="kilometersPerHourSecond",xn.metersPerSecondSquared="metersPerSecondSquared";var po,ho=(w(fo,po=Array),fo.fromPosition=function(t){return 2===t.length?new fo(t[0],t[1]):2<t.length?new fo(t[0],t[1],t[2]):null},fo.areEqual=function(t,e,i){if(void 0===i&&(i=6),t&&2<=t.length&&e&&2<=e.length){var r=Math.pow(10,i),n=Yn(t[1]),o=Yn(e[1]),a=Kn(t[0]),s=Kn(e[0]);if(0!=Math.round((n-o)*r)/r)return!1;var l=Math.round((a-s)*r)/r;return 0==l||360==l}return!1},fo.fromLatLng=function(t,e,i){var r=[];if("number"==typeof t)r.push(t),"number"==typeof e&&r.push(e),"number"==typeof i&&r.push(i);else if(Array.isArray(t))2<=t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&(3<=t.length&&"number"==typeof t[2]?r.push(t[0],t[1],t[2]):r.push(t[0],t[1]));else if("object"==typeof t){var n=["lat","latitude","y"],o=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],s=NaN,l=NaN,u=NaN;Object.keys(t).forEach((function(e,i,r){var c=e.toLowerCase();isNaN(s)&&0<=n.indexOf(c)&&"number"==typeof t[e]?s=t[e]:isNaN(l)&&0<=o.indexOf(c)&&"number"==typeof t[e]?l=t[e]:isNaN(u)&&0<=a.indexOf(c)&&"number"==typeof t[e]&&(u=t[e])})),isNaN(s)||isNaN(l)||(r.push(l,s),isNaN(u)||r.push(u))}return 2<=r.length?r:null},fo.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var i=0,r=t.length;i<r;i++){var n=fo.fromLatLng(t[i]);n&&e.push(n)}return e},fo._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},fo);
2function fo(t,e,i){return i?po.call(this,t,e,i)||this:po.call(this,t,e)||this}var mo=(go.TYPE="Polygon",go);function go(t,e){this.type="Polygon",this.type=go.TYPE,1===ho._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var yo=(vo.prototype._addEventListener=function(t,e,i){this.listeners.has(t)||this.listeners.set(t,new hr),this.listeners.get(t).set(e,i)},vo.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},vo.prototype._invokeEvent=function(t,e){var i=this;this.listeners.has(t)&&this.listeners.get(t).forEach((function(r,n){r&&i._removeEventListener(t,n);try{n(e)}catch(r){console.error(r)}}))},vo);function vo(){this.listeners=new hr}var _o=Object.freeze({__proto__:null,EventEmitter:yo}),xo=(bo.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},bo.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},bo.prototype.transformArray=function(t,e,i){if(t&&Array.isArray(t)&&Array.isArray(t[0])){for(var r=[],n=0,o=t;n<o.length;n++){var a=o[n];r.push(this.transform(a,e,i))}return r}return null},bo.prototype.transform=function(t,e,i){var r=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],n=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof i&&0<=i?[jn(r,i),jn(n,i)]:[jn(r,6),jn(n,6)]},bo._calculateAffineTransform=function(t,e){if(t.length!==e.length||t.length<1)throw new Error("Error: source and target arrays must have the same length.");var i=Math.min(t[0].length,e[0].length),r=i+1;if(t.length<i)throw new Error("Erorr: At least "+i+" reference points required.");for(var n=[],o=[],a=0;a<r;a++){o[a]=[];for(var s=0;s<r;s++){s<i&&(n[s]=0);for(var l=o[a][s]=0;l<t.length;l++)s<i&&(n[s]+=a<i?t[l][a]*e[l][s]:e[l][s]),o[a][s]+=i<=a&&i<=s?1:i<=a?t[l][s]:i<=s?t[l][a]:t[l][a]*t[l][s]}o[a]=o[a].concat(n)}if(!this._gaussJordanElimination(o))throw new Error("Error: Singular matrix. Points are likely coplanar.");return o},bo._gaussJordanElimination=function(t){for(var e,i,r=t.length,n=2*r-1,o=0;o<r;o++){for(var a=o,s=o+1;s<r;s++)Math.abs(t[s][o])>Math.abs(t[a][o])&&(a=s);if(i=t[a],t[a]=t[o],t[o]=i,Math.abs(t[o][o])<=1e-10)return!1;for(var l=o+1;l<r;l++){e=t[l][o]/t[o][o];for(var u=o;u<n;u++)t[l][u]-=t[o][u]*e}}for(o=r-1;-1<o;o--){for(e=t[o][o],s=0;s<o;s++)for(var c=n-1;o-1<c;c--)t[s][c]-=t[o][c]*t[s][o]/e;t[o][o]/=e;for(var p=r;p<n;p++)t[o][p]/=e}return!0},bo);function bo(t,e){this.M=bo._calculateAffineTransform(t,e),this.inverseM=bo._calculateAffineTransform(e,t)}var wo,So=Object.freeze({__proto__:null,AffineTransform:xo,_precision:jn,get AreaUnits(){return pn},get DistanceUnits(){return dn},get TimeUnits(){return mn},get SpeedUnits(){return yn},get AccelerationUnits(){return _n},boundingBoxToPolygon:function(t){var e=Kn(Eo.getWest(t)),i=Kn(Eo.getEast(t)),r=Yn(Eo.getNorth(t)),n=Yn(Eo.getSouth(t)),o=Eo.getCenter(t),a=[[e,r],[e,n],[o[0],n],[i,n],[i,r],[o[0],r],[e,r]];return new mo([a])},convertDistance:Fn,getCardinalSpline:function(t,e,i,r){var n;if(!t||t.length<=2)return n;"number"!=typeof e&&(e=.5),("number"!=typeof i||i<=0)&&(i=15);var o=t.length;n=t.slice(0),r?(ho.areEqual(n[0],n[o-1])&&(n.pop(),o--),n.unshift(t[o-1]),n.push(t[0]),n.push(t[1]),o++):(n.unshift(t[0]),n.push(t[o-1]));var a,s,l,u=[];u.push([1,0,0,0]);for(var c=1;c<i-1;c++)l=(a=c/i)*(s=a*a),u.push([2*l-3*s+1,-2*l+3*s,l-2*s+a,l-s]);u.push([0,1,0,0]);var p,h,d,f,m,g,y,v=[];for(c=1;c<o;c++)for(h=e*(n[c+1][0]-n[c-1][0]),d=e*(n[c+1][1]-n[c-1][1]),f=e*(n[c+2][0]-n[c][0]),m=e*(n[c+2][1]-n[c][1]),a=0;a<i;a++)y=(p=u[a])[0]*n[c][0]+p[1]*n[c+1][0]+p[2]*h+p[3]*f,g=En(g=p[0]*n[c][1]+p[1]*n[c+1][1]+p[2]*d+p[3]*m,-85,85),v.push([y,g]);return v},getDestination:Un,getDistanceTo:Vn,getEarthRadius:qn,getGeodesicPath:function(t,e){var i;(!e||e<=0)&&(e=15),Array.isArray(t)?i=t:t.type&&"LineString"===t.type&&(i=t.coordinates);for(var r=i.length-1,n=[],o=0;o<r;o++)for(var a=Cn(i[o][1]),s=Cn(i[o][0]),l=Cn(i[o+1][1]),u=Cn(i[o+1][0]),c=2*Math.asin(Math.sqrt(Math.pow(Math.sin((a-l)/2),2)+Math.cos(a)*Math.cos(l)*Math.pow(Math.sin((s-u)/2),2))),p=0;p<=e;p++){var h=p/e,d=Math.sin((1-h)*c)/Math.sin(c),f=Math.sin(h*c)/Math.sin(c),m=d*Math.cos(a)*Math.cos(s)+f*Math.cos(l)*Math.cos(u),g=d*Math.cos(a)*Math.sin(s)+f*Math.cos(l)*Math.sin(u),y=d*Math.sin(a)+f*Math.sin(l),v=Math.atan2(y,Math.sqrt(Math.pow(m,2)+Math.pow(g,2))),_=Math.atan2(g,m);v=En(In(v),-85,85),_=In(_),n.push([_,v])}return n},getHeading:Gn,getLengthOfPath:Zn,getPositionAlongPath:Hn,getRegularPolygonPath:Wn,interpolate:function(t,e,
2i){i=void 0===i?.5:i;var r=Vn(t=lo(t),e=lo(e),"kilometers");return Un(t,Gn(t,e),r*i,"kilometers")},normalizeLatitude:Yn,normalizeLongitude:Kn,rotatePositions:Xn,getPixelHeading:function(t,e){var i=Qn([t=lo(t),e=lo(e)],21),r=i[0],n=i[1],o=n[0]-r[0],a=r[1]-n[1];return(2.5*Math.PI-Math.atan2(a,o))*Sn%360},mercatorPixelsToPositions:Jn,mercatorPositionsToPixels:Qn,convertAcceleration:$n,convertArea:to,convertSpeed:eo,convertTimespan:io,getAcceleration:ro,getAccelerationFromSpeeds:no,getAccelerationFromFeatures:function(t,e,i,r,n,o,a){if("string"==typeof i&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var s=oo(t.properties[i],e.properties[i],mn.seconds);if(!isNaN(s)){var l=0;if(r&&"string"==typeof r){var u=t.properties[r],c=e.properties[r];if("number"==typeof u&&(l=u,"number"==typeof c))return no(u,c,s,n,mn.seconds,o,a)}return ro(l,Vn(t.geometry.coordinates,e.geometry.coordinates,dn.meters),s,n,dn.meters,mn.seconds,o,a)}}return NaN},getArea:function t(e,i,r){if(e){var n=0;switch((e=e instanceof To?e.toJson():e).type){case"Feature":if(e.geometry)return t(e.geometry,i,r);break;case"Polygon":e.coordinates&&(n=zn(e.coordinates));break;case"MultiPolygon":var o=e;if(o.coordinates)for(var a=0,s=o.coordinates.length;a<s;a++)n+=zn(o.coordinates[a])}return to(n,pn.squareMeters,i,r)}return 0},getSpeed:function(t,e,i,r,n,o){var a=lo(t),s=lo(e);if(a&&s){var l=io(i,r,mn.seconds);return eo(Vn(a,s,dn.meters)/l,yn.metersPerSecond,n,o)}return 0},getSpeedFromFeatures:function(t,e,i,r,n){if("string"==typeof i&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var o=this.getTimespan(t.properties[i],e.properties[i],mn.seconds);if(!isNaN(o)){var a=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,dn.meters);return this.convertSpeed(a/o,yn.metersPerSecond,r,n)}}return NaN},getTimespan:oo,getTravelDistance:function(t,e,i,r,n,o,a,s){e=this.convertTimespan(e,n,mn.seconds);var l=(i=this.convertSpeed(i,o,yn.metersPerSecond))*e;return"number"==typeof r&&(l+=.5*this.convertAcceleration(r,a,_n.metersPerSecondSquared)*e*e),this.convertDistance(l,dn.meters,t,s)},parseTimestamp:ao,getConvexHull:function(t){var e=so(t).map((function(t){return[Kn(t[0]),Yn(t[1])]}));e.sort((function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}));for(var i=[],r=0,n=e;r<n.length;r++){for(var o=n[r];2<=i.length&&Nn(i[i.length-2],i[i.length-1],o)<=0;)i.pop();i.push(o)}for(var a=[],s=e.length-1;0<=s;s--){for(;2<=a.length&&Nn(a[a.length-2],a[a.length-1],e[s])<=0;)a.pop();a.push(e[s])}return new mo([i.concat(a)])},getPositions:so,getPosition:lo,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var i=[],r=Zn(t,dn.meters)/(e-1),n=0;n<e;n++){var o=Hn(t,r*n,dn.meters);null!=o&&i.push(o)}return i},getPointWithHeadingAlongPath:uo,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var i=[],r=Zn(t,dn.meters)/(e-1),n=0;n<e;n++){var o=uo(t,r*n,dn.meters);null!=o&&i.push(o)}return i},getClosestPointOnGeometry:co}),To=(w(Co,wo=yo),Co.prototype.addProperty=function(t,e){tn(this.data.properties[t],e)||(this.data.properties[t]=pr(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Co.prototype.getBounds=function(){var t,e=this.getCoordinates(),i=this.getType();if("Point"===i)if(this.circlePolygon){var r=this.circlePolygon.geometry.coordinates;t=Eo.fromPositions(r[0])}else t=new Eo(r=e,r);else if("MultiPoint"===i||"LineString"===i)r=e,t=Eo.fromPositions(r);else if("Polygon"===i)r=e,t=Eo.fromPositions(r[0]);else if("MultiLineString"===i)for(var n=0,o=r=e;n<o.length;n++){var a=o[n];t=Eo.merge(t,Eo.fromPositions(a))}else if("MultiPolygon"===i)for(var s=0,l=r=e;s<l.length;s++){var u=l[s];t=Eo.merge(t,Eo.fromPositions(u[0]))}return t},Co.prototype.getCoordinates=function(){return pr(this.data.geometry.coordinates)},Co.prototype.getCircleCoordinates=function(){return this.circlePolygon?pr(this.circlePolygon.geometry.coordinates[0]):null},Co.prototype.getId=function(){return this.data.id},Co.prototype.getProperties=function(){return pr(this.data.properties)},Co.prototype.getType=function(){return this.data.geometry.type},Co.prototype.isCircle=function(){return Co._isCircle(this.data)},Co.prototype.isRectangle=function(){return Co._isRectangle(this.data)},Co.prototype.setCoordinates=function(t){var e;e="Polygon"===this.getType()&&1===ho._getDimensions(t)?[t]:t,tn(this.data.geometry.coordinates,e)||(this.data.geometry.coordinates=pr(e),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Co.prototype.setProperties=function(t){t[Co._shapeIdPropName]=this.data.id,tn(this.data.properties,t)||(this.data.properties=pr(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Co.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},Co.prototype._toJson=function(){return this.circlePolygon||this.data},Co.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},Co.prototype._handleCircle=function(){if(this.isCircle()){var t=Co._getCirclePositions(this.data);this.circlePolygon=new nn(new mo([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"}else delete this.circlePolygon},Co._isCircle=function(t){return t&&t.geometry&&"Point"===t.geometry.type&&t.geometry.coordinates&&t.properties&&"string"==typeof t.properties.subType&&"circle"===t.properties.subType.toLowerCase()&&"number"==typeof t.properties.radius},Co._isRectangle=function(t){if("Polygon"===t.geometry.type&&t.geometry.coordinates&&"string"==typeof t.properties.subType&&"rectangle"===t.properties.subType.toLowerCase()){var e=t.geometry.coordinates;if(1===e.length){var i=e[0];if(5===i.length)return i[0][0]===i[4][0]&&i[0][1]===i[4][1];if(4===i.length)return!0}}return!1},Co._getCirclePositions=function(t){return Wn(t.geometry.coordinates,t.properties.radius,72,"meters")},Co._shapeIdPropName="_azureMapsShapeId",Co);function Co(t,e,i){var r,n=wo.call(this)||this;if("Feature"===t.type){var o=t;r=pr(o.geometry),i=o.properties?pr(o.properties):{},e=null==o.id||""===o.id?rn():o.id}else r=pr(t),e=null==e||""===e?rn():e,i=i?pr(i):{};return i[Co._shapeIdPropName]=e,n.data=new nn(r,i,e),n._handleCircle(),n}var Io,Eo=(w(Mo,Io=Array),Mo.fromBoundingBox=function(t){var e=Mo.getWest(t),i=Mo.getSouth(t),r=Mo.getEast(t),n=Mo.getNorth(t);return new Mo([e,i,r,n])}
2,Mo.fromDimensions=function(t,e,i){var r=t[0],n=t[1],o=Math.min(Math.max(n+i/2,-85.5),85.5),a=Math.min(Math.max(n-i/2,-85.5),85.5),s=Kn(r+e/2);return new Mo([Kn(r-e/2),a,s,o])},Mo.fromEdges=function(t,e,i,r){return new Mo([t,e,i,r])},Mo.containsPosition=function(t,e){var i=Mo.getCenter(t),r=Math.abs(i[1]-e[1]),n=Math.abs(i[0]-e[0]);180<n&&(n=360-n);var o=Mo.getHeight(t),a=Mo.getWidth(t);return r<=o/2+1e-8&&n<=a/2+1e-8},Mo.crossesAntimeridian=function(t){return Kn(Mo.getEast(t))-Kn(Mo.getWest(t))<0},Mo.getCenter=function(t){var e=Kn(Mo.getEast(t)),i=Kn(Mo.getWest(t));e<i&&(e+=360);var r=Kn((i+e)/2),n=Yn(Mo.getSouth(t)),o=Yn(Mo.getNorth(t));return[r,Yn((n+o)/2)]},Mo.getHeight=function(t){var e=Yn(Mo.getNorth(t))-Yn(Mo.getSouth(t));return isNaN(e)?0:e},Mo.getWidth=function(t){var e=Kn(Mo.getEast(t))-Kn(Mo.getWest(t));return isNaN(e)?0:e<0?e+=360:e},Mo.getSouthWest=function(t){var e=this.getSouth(t),i=this.getWest(t);return isNaN(e)||isNaN(i)?null:[i,e]},Mo.getNorthEast=function(t){var e=this.getNorth(t),i=this.getEast(t);return isNaN(e)||isNaN(i)?null:[i,e]},Mo.getNorthWest=function(t){var e=this.getNorth(t),i=this.getWest(t);return isNaN(e)||isNaN(i)?null:[i,e]},Mo.getSouthEast=function(t){var e=this.getSouth(t),i=this.getEast(t);return isNaN(e)||isNaN(i)?null:[i,e]},Mo.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},Mo.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},Mo.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},Mo.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},Mo.intersect=function(t,e){var i=Mo.getCenter(t),r=Mo.getCenter(e),n=Math.abs(i[1]-r[1]),o=Math.abs(i[0]-r[0]);180<o&&(o=360-o);var a=Mo.getHeight(t),s=Mo.getWidth(t),l=Mo.getHeight(e),u=Mo.getWidth(e);return n<=a/2+l/2&&o<=s/2+u/2},Mo.merge=function(t,e){var i=t&&4===t.length,r=e&&4===e.length;if(i&&!r)return t;if(r&&!i)return e;if(!i&&!r)return null;var n=Math.max(Yn(Mo.getNorth(t)),Yn(Mo.getNorth(e))),o=Math.min(Yn(Mo.getSouth(t)),Yn(Mo.getSouth(e))),a=[t,e],s=[],l=0;for(l=0;l<a.length;l++){var u=a[l],c=Kn(Mo.getWest(u)),p=Kn(Mo.getEast(u));Mo.crossesAntimeridian(u)?(s.push([c,180]),s.push([-180,p])):s.push([c,p])}s.sort((function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}));var h=[],d=s[0];for(l=1;l<s.length;){var f=s[l];d[1]>=f[0]?d[1]=Math.max(d[1],f[1]):(h.push(d),d=f),l++}h.push(d);var m=h.length,g=h[0][0]+360-h[m-1][1],y=[h[m-1][1],h[0][0]];for(l=1;l<m;l++){var v=h[l][0]-h[l-1][1];g<v&&(g=v,y=[h[l-1][1],h[l][0]])}return new Mo([y[1],o],[y[0],n])},Mo.fromPositions=function(t){for(var e,i=NaN,r=NaN,n=NaN,o=NaN,a=t.length,s=new Array(a),l=0;a--;)if((e=t[a])&&2<=e.length){var u=Yn(e[1]);i=isNaN(i)?u:Math.max(i,u),r=isNaN(r)?u:Math.min(r,u),s[l++]=Kn(e[0])}if(l){s.length=l,s.sort((function(t,e){return t-e}));var c=s[0]+360-s[l-1],p=0;for(a=1;a<l;a++){var h=s[a]-s[a-1];c<h&&(c=h,p=a)}n=s[p],o=s[(p||l)-1]}return isNaN(n)||isNaN(r)||isNaN(o)||isNaN(i)?null:new Mo([n,r,o,i])},Mo.fromLatLngs=function(t){return Mo.fromPositions(ho.fromLatLngs(t))},Mo.fromData=function(t){var e,i=null;if(Array.isArray(t)&&0<t.length){for(var r=0,n=t;r<n.length;r++){var o=n[r];null!=(e=Mo.fromData(o))&&(i=null===i?e:Mo.merge(i,e))}return i}if(t instanceof To)return t.getBounds();if(t&&t.type){var a=t;if(a.bbox&&4===a.bbox.length)return a.bbox;switch(a.type){case"FeatureCollection":return Mo.fromData(a.features);case"Feature":return To._isCircle(a)?Mo.fromPositions(To._getCirclePositions(a)):Mo.fromData(a.geometry);case"GeometryCollection":return Mo.fromData(a.geometries);case"Point":var s=a.coordinates;if(s&&2<=s.length)return[s[0],s[1],s[0],s[1]];break;case"LineString":case"MultiPoint":return Mo.fromPositions(a.coordinates);case"Polygon":case"MultiLineString":var l=a.coordinates;if(l&&0<l.length){for(var u=0,c=l.length;u<c;u++)null!=(e=Mo.fromPositions(l[u]))&&(i=null===i?e:Mo.merge(i,e));if(null!=i)return i}break;case"MultiPolygon":var p=a.coordinates;if(p&&0<p.length){for(u=0,c=p.length;u<c;u++)for(var h=0,d=p[u].length;h<d;h++)null!=(e=Mo.fromPositions(p[u][h]))&&(i=null===i?e:Mo.merge(i,e));return i}}}return null},Mo.splitOnAntimeridian=function(t){var e=[];
2if(Mo.crossesAntimeridian(t)){var i=void 0,r=void 0,n=Kn(Mo.getWest(t)),o=Kn(Mo.getEast(t)),a=Yn(Mo.getNorth(t)),s=Yn(Mo.getSouth(t));r=6<=t.length?(i=new Mo([n,s,t[2],180,a,t[5]]),new Mo([-180,s,t[2],o,a,t[5]])):(i=new Mo([n,s,180,a]),new Mo([-180,s,o,a])),e.push(i,r)}else e.push(new Mo(t));return e},Mo);function Mo(t,e){var i=this;if(t&&e){var r=t;i=r[2]&&e[2]?Io.call(this,r[0],r[1],r[2]||0,e[0],e[1],e[2]||0)||this:Io.call(this,r[0],r[1],e[0],e[1])||this}else if(t){var n=t;n&&(4===n.length?i=Io.call(this,n[0],n[1],n[2],n[3])||this:6<=n.length&&(i=Io.call(this,n[0],n[1],n[2],n[3],n[4],n[5])||this))}return i}var Ao=(Lo.TYPE="FeatureCollection",Lo);function Lo(t,e){this.type="FeatureCollection",this.type=Lo.TYPE,this.features=t,this.bbox=e}var ko=(Po.TYPE="GeometryCollection",Po);function Po(t){this.type="GeometryCollection",this.type=Po.TYPE,this.geometries=t}var Do=(zo.TYPE="LineString",zo);function zo(t,e){this.type="LineString",this.type=zo.TYPE,this.coordinates=t,this.bbox=e}var Oo=(No.TYPE="MultiLineString",No);function No(t,e){this.type="MultiLineString",this.type=No.TYPE,this.coordinates=t,this.bbox=e}var Ro=(Bo.TYPE="MultiPoint",Bo);function Bo(t,e){this.type="MultiPoint",this.type=Bo.TYPE,this.coordinates=t,this.bbox=e}var jo=(Fo.TYPE="MultiPolygon",Fo);function Fo(t,e){this.type="MultiPolygon",this.type=Fo.TYPE,this.coordinates=t,this.bbox=e}var Uo,Vo=Object.freeze({__proto__:null,Feature:nn,FeatureCollection:Ao,LineString:Do,Point:un,Polygon:mo,Position:ho,BoundingBox:Eo,MultiLineString:Oo,MultiPoint:Ro,MultiPolygon:jo,GeometryCollection:ko}),qo=function(t,e){return cr(t,5,e="function"==typeof e?e:void 0)},Go=(w(Zo,Uo=I),Zo);function Zo(){var t=null!==Uo&&Uo.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMa
2xZoom=void 0,t.clusterProperties=void 0,t.lineMetrics=!1,t.tolerance=.375,t}var Ho,Wo=(w(Yo,Ho=yo),Yo.prototype.getId=function(){return this.id},Yo.prototype._setMap=function(t){if(null==t||void 0===t){var e=this.map;delete this.map,this._invokeEvent("sourceremoved",this),e&&e.events.invoke("sourceremoved",this)}else this.map=t,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this)},Yo);function Yo(t){var e=Ho.call(this)||this;return e.id=t||rn(),e}var Ko,Xo=(w(Jo,Ko=Wo),Jo.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},Jo.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},Jo.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},Jo.prototype.getClusterExpansionZoom=function(t){var e=this;return new Promise((function(i,r){if(e.map){var n=e.map._getMap().getSource(e.getId());n&&"geojson"===n.type&&n.getClusterExpansionZoom(t,(function(t,e){t?r(t):"number"!=typeof e||i(e)}))}else r("The DataSource hasn't been added to a map.")}))},Jo.prototype.getClusterChildren=function(t){var e=this;return new Promise((function(i,r){if(e.map){var n=e.map._getMap().getSource(e.getId());n&&"geojson"===n.type&&n.getClusterChildren(t,(function(t,n){t?r(t):n&&i(e.map.sources._mapFeaturesToShapes(n,!1,e))}))}else r("The DataSource hasn't been added to a map.")}))},Jo.prototype.getClusterLeaves=function(t,e,i){var r=this;return new Promise((function(n,o){if(r.map){var a=r.map._getMap().getSource(r.getId());a&&"geojson"===a.type&&a.getClusterLeaves(t,e,i,(function(t,e){t?o(t):e&&n(r.map.sources._mapFeaturesToShapes(e,!1,r))}))}else o("The DataSource hasn't been added to a map.")}))},Jo.prototype.getOptions=function(){return pr(this.options)},Jo.prototype.getShapes=function(){return Array.from(this.shapes)},Jo.prototype.importDataFromUrl=function(t){var e=this;return fetch(t,{method:"GET",mode:"cors"}).then((function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)})).then((function(t){e.add(t)}))},Jo.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},Jo.prototype.remove=function(t){for(var e=0,i=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];"number"==typeof r?this._removeByIndex(r):this._removeById(r)}this._updateSource()},Jo.prototype.removeById=function(t){for(var e=0,i=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];this._removeById(r)}this._updateSource()},Jo.prototype.setOptions=function(t){var e=(new Go).merge(this.options,pr(t));tn(this.options,e)||(this._invokeEvent("datasourceupdated",this),this.options=e,this.map&&this.map._rebuildStyle())},Jo.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},Jo.prototype.toJson=function(){return new Ao(this.shapes.map((function(t){return t.toJson()})))},Jo.prototype._toJson=function(){return new Ao(this.shapes.map((function(t){return t._toJson()})))},Jo.prototype._buildSource=function(){var t={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},Jo.prototype._addNoUpdate=function(t,e){var i;if(t instanceof To)this._addToSources(t,e),i=[t];else if(Array.isArray(t))i=t.map((function(t){return t instanceof To?t:new To(t)})),this._addToSources(i,e);else if("FeatureCollection"===t.type)i=t.features.map((function(t){return new To(t)})),this._addToSources(i,e);else if("GeometryCollection"===t.type)i=t.geometries.map((function(t){return new To(t)})),this._addToSources(i,e);else{var r=new To(t);this._addToSources(r,e),i=[r]}this._invokeEvent("dataadded",i)},Jo.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new hr,t&&0<t.length&&this._invokeEvent("dataremoved",t)},Jo.prototype._updateSource=function(){var t=this;void 0===this.requestId&&(this.requestId=requestAnimationFrame((function(){t._updateMboxSource(),t.requestId=void 0})))},Jo.prototype._addToSources=function(t,e){if(t=Array.isArray(t)?t:[t],"number"!=typeof e)for(var i=0,r=t;i<r.length;i++){var n=r[i];this.shapes.push(n),this.shapesMap.set(n.getId(),this.shapes.length-1)}else for(var o=t.length-1;0<=o;o--)this.shapes.splice(e,0,t[o]),this._updateShapesMap(e);for(var a=0,s=t;a<s.length;a++)(n=s[a])._setDataSource(this)},Jo.prototype._removeById=function(t){var e,i=t instanceof To?t.getId():"string"==typeof t||"number"==typeof t?t:t.id;(e=this.shapes[this.shapesMap.get(i)])&&(e._setDataSource(null),this.shapes.splice(this.shapesMap.get(i),1),this._updateShapesMap(this.shapesMap.get(i)),this.shapesMap.delete(i),this._invokeEvent("dataremoved",[e]))},Jo.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '"+t+"' is greater than the maximum possible index '"+(this.shapes.length-1)+"'");e=this.shapes[t],this.shapesMap.delete(e.getId()),e._setDataSource(null),this.shapes.splice(t,1),this._updateShapesMap(t),this._invokeEvent("dataremoved",[e])},Jo.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},Jo.prototype._updateMboxSource=function(){if(this.map&&this.map._getMap()){var t=this.map._getMap().getSource(this.getId());t&&"geojson"===t.type&&t.setData(this._toJson())}},Jo);function Jo(t,e){var i=Ko.call(this,t)||this;return i.requestId=void 0,i.options=(new Go).merge(pr(e)),i.shapes=[],i.shapesMap=new hr,i}var Qo,$o=(w(ta,Qo=I),ta);function ta(){var t=null!==Qo&&Qo.apply(this,arguments)||this;return t.bounds=void 0,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=void 0,t.tileSize=512,t.url=void 0,t}var ea,ia=(w(ra,ea=Wo),ra.prototype.getOptions=function(){return pr(this.options)},ra.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},ra.prototype._buildSource=function(){var t={type:"vector"};
vendor: 4,804 bytes, line 2
2return this.options.bounds&&(t.bounds=this.options.bounds),this.options.tiles?(t.tiles=this.options.tiles,t.minzoom=this.options.minZoom,t.maxzoom=this.options.maxZoom):this.options.url&&(t.url=this.options.url),this.options.isTMS&&(t.scheme="tms"),this.options.tileSize&&(t.tileSize=this.options.tileSize),t},ra);function ra(t,e){var i=ea.call(this,t)||this;return i.options=(new $o).merge(pr(e)),i}var na,oa=Object.freeze({__proto__:null,Source:Wo,DataSource:Xo,VectorTileSource:ia}),aa=(w(sa,na=yo),sa.prototype.getId=function(){return this.id},sa.prototype.getMap=function(){return this.map||null},sa.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},sa.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},sa._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},sa.prototype._updateBaseProperties=function(t,e){this._updateFilter(t.filter,e.filter),this._updateZoomRange(t.minZoom,e.minZoom,t.maxZoom,e.maxZoom),this._updateLayoutProperty("visibility",t.visible,e.visible,t.visible?"visible":"none")},sa.prototype._updateFilter=function(t,e){tn(t,e)||this.map._getMap().setFilter(this.id,t)},sa.prototype._updatePaintProperty=function(t,e,i,r){tn(e,i)||this.map._getMap().setPaintProperty(this.id,t,r||e)},sa.prototype._updateLayoutProperty=function(t,e,i,r){tn(e,i)||this.map._getMap().setLayoutProperty(this.id,t,r||e)},sa.prototype._updateZoomRange=function(t,e,i,r){t===e&&r===i||this.map._getMap().setLayerZoomRange(this.id,t,i)},sa.LayerEvents={layeradded:void 0,layerremoved:void 0},sa);function sa(t){var e=na.call(this)||this;return e.id=t||rn(),e}var la,ua=(w(ca,la=I),ca._cloneCustomizer=function(t){if(t instanceof Wo)return t},ca);function ca(){var t=null!==la&&la.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var pa,ha=(w(da,pa=ua),da);function da(){var t=null!==pa&&pa.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t}var fa,ma=(w(ga,fa=aa),ga.prototype.getOptions=function(){return qo(this.options,ha._cloneCustomizer)},ga.prototype.getSource=function(){return this.options.source},ga.prototype.setOptions=function(t){var e=(new ha).merge(this.options,qo(t,ha._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("circle-blur",e.blur,this.options.blur),this._updatePaintProperty("circle-color",e.color,this.options.color),this._updatePaintProperty("circle-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("circle-radius",e.radius,this.options.radius),this._updatePaintProperty("circle-stroke-color",e.strokeColor,this.options.strokeColor),this._updatePaintProperty("circle-stroke-opacity",e.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("circle-stroke-width",e.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("circle-pitch-alignment",e.pitchAlignment,this.options.pitchAlignment)}this.options=e},ga.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof Wo?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},ga.prototype._getLayerIds=function(){return[this.id]},ga.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Wo?t.add(this.options.source.getId()):t.add(this.options.source),t},ga);function ga(t,e,i){var r=fa.call(this,e)||this;return r.options=(new ha).merge(qo(i,ha._cloneCustomizer)),r.options.source=t||r.options.source,r}var ya,va=(w(_a,ya=ua),_a._cloneCustomizer=function(t){if(t instanceof Wo)return t},_a);function _a(){var t=null!==ya&&ya.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radiu
2s=30,t.weight=1,t}var xa,ba=(w(wa,xa=aa),wa.prototype.getOptions=function(){return qo(this.options,va._cloneCustomizer)},wa.prototype.getSource=function(){return this.options.source},wa.prototype.setOptions=function(t){var e=(new va).merge(this.options,qo(t,va._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("heatmap-color",e.color,this.options.color),this._updatePaintProperty("heatmap-intensity",e.intensity,this.options.intensity),this._updatePaintProperty("heatmap-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("heatmap-radius",e.radius,this.options.radius),this._updatePaintProperty("heatmap-weight",e.weight,this.options.weight)}this.options=e},wa.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof Wo?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},wa.prototype._getLayerIds=function(){return[this.id]},wa.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Wo?t.add(this.options.source.getId()):t.add(this.options.source),t},wa);function wa(t,e,i){var r=xa.call(this,e)||this;return r.options=(new va).merge(qo(i,va._cloneCustomizer)),r.options.source=t||r.options.source,r}var Sa,Ta=(w(Ca,Sa=ua),Ca);function Ca(){var t=null!==Sa&&Sa.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}var Ia,Ea=(w(Ma,Ia=Ta),Ma._cloneCustomizer=function(t){if(t instanceof Wo)return t},Ma);function Ma(){var t=null!==Ia&&Ia.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var Aa,La=(w(ka,Aa=aa),ka.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},ka);function ka(){return null!==Aa&&Aa.apply(this,arguments)||this}var Pa,Da=(w(za,Pa=La),za.prototype.getOptions=function(){return qo(this.options,Ea._cloneCustomizer)},za.prototype.setOptions=function(t){var e=(new Ea).merge(this.options,qo(t,Ea._cloneCustomizer)),i="string"==typeof t.url&&t.url!==this.getOptions().url,r=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;if(this.map){this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation);var n=this.map._getMap().getSource(this._getSourceId());n&&n.updateImage(e)}this.options=e,i?this.reloadImage():r&&this.updateTransform()},za.prototype.getPositions=function(t){return this.transform.then((function(e){return e.toTarget(t)}))},za.prototype.getPixels=function(t){return this.transform.then((function(e){return e.toSource(t)}))},za.getCoordinatesFromRefPoints=function(t,e,i,r){return new xo(i,r).toTarget([[0,0],[t,0],[t,e],[0,e]])},za.getCoordinatesFromEdges=function(t,e,i,r,n){"number"!=typeof n&&(n=0);var o=[Math.min(r,i),e,Math.max(r,i),t],a=Eo.getCenter(o);return Xn([Eo.getNorthWest(o),Eo.getNorthEast(o),Eo.getSouthEast(o),Eo.getSouthWest
2(o)],a,n)},za.prototype._buildLayers=function(){var t={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),[t]},za.prototype._getLayerIds=function(){return[this.id]},za.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},za.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},za.prototype.reloadImage=function(){var t=this;this.options.url&&(this.transform=new Promise((function(e,i){t.img.onload=function(){var i=[[0,0],[t.img.width,0],[t.img.width,t.img.height],[0,t.img.height]];e(new xo(i,t.options.coordinates)),t.isLoading=!1},t.img.onerror=t.img.onabort=function(){i("Failed to load image")},t.isLoading=!0,t.img.src=t.options.url})))},za.prototype.updateTransform=function(){if(!this.isLoading){var t=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]];this.transform=Promise.resolve(new xo(t,this.options.coordinates))}},za);function za(t,e){var i=Pa.call(this,e)||this;return i.isLoading=!1,i.options=(new Ea).merge(qo(t,Ea._cloneCustomizer)),i.img=new Image,i.reloadImage(),i}var Oa,Na=(w(Ra,Oa=ua),Ra);function Ra(){var t=null!==Oa&&Oa.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=void 0,t.strokeGradient=void 0,t.offset=0,t.strokeOpacity=1,t.translate=new sn(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var Ba,ja=(w(Fa,Ba=aa),Fa.prototype.getOptions=function(){return qo(this.options,Na._cloneCustomizer)},Fa.prototype.getSource=function(){return this.options.source},Fa.prototype.setOptions=function(t){var e=(new Na).merge(this.options,qo(t,Na._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("line-blur",e.blur,this.options.blur),this._updateLayoutProperty("line-cap",e.lineCap,this.options.lineCap),this._updateLayoutProperty("line-join",e.lineJoin,this.options.lineJoin),this._updatePaintProperty("line-offset",e.offset,this.options.offset),this._updatePaintProperty("line-color",e.strokeColor,this.options.strokeColor),this._updatePaintProperty("line-dasharray",e.strokeDashArray,this.options.strokeDashArray),this._updatePaintProperty("line-gradient",e.strokeGradient,this.options.strokeGradient),this._updatePaintProperty("line-opacity",e.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("line-width",e.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("line-translate",e.translate,this.options.translate),this._updatePaintProperty("line-translate-anchor",e.translateAnchor,this.options.translateAnchor)}this.options=e},Fa.prototype._buildLayers=function(){return[S(S(S(S({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Wo?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:S(S(S({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray&&{"line-dasharray":this.options.strokeDashArray}),this.options.strokeGradient&&{"line-gradient":this.options.strokeGradient}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Fa.prototype._getLayerIds=function(){return[this.id]},Fa.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Wo?t.add(this.options.source.getId()):t.add(this.options.source),t},Fa);function Fa(t,e,i){var r=Ba.call(this,e)||this;return r.options=(new Na).merge(qo(i,Na._cloneCustomizer)),r.options.source=t||r.options.source,r}var Ua,Va=(w(qa,Ua=ua),qa);function qa(){var t=null!==Ua&&Ua.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.base=0,t.fillColor="#1E90FF",t.he
vendor: 9,618 bytes, line 2
2ight=0,t.fillOpacity=1,t.fillPattern=void 0,t.translate=new sn(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var Ga,Za=(w(Ha,Ga=aa),Ha.prototype.getOptions=function(){return qo(this.options,Va._cloneCustomizer)},Ha.prototype.getSource=function(){return this.options.source},Ha.prototype.setOptions=function(t){var e=(new Va).merge(this.options,qo(t,Va._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("fill-extrusion-base",e.base,this.options.base),this._updatePaintProperty("fill-extrusion-color",e.fillColor,this.options.fillColor),this._updatePaintProperty("fill-extrusion-height",e.height,this.options.height),this._updatePaintProperty("fill-extrusion-opacity",e.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-extrusion-pattern",e.fillPattern,this.options.fillPattern),this._updatePaintProperty("fill-extrusion-translate",e.translate,this.options.translate),this._updatePaintProperty("fill-extrusion-translate-anchor",e.translateAnchor,this.options.translateAnchor),this._updatePaintProperty("fill-extrusion-vertical-gradient",e.verticalGradient,this.options.verticalGradient)}this.options=e},Ha.prototype._buildLayers=function(){return[S(S(S(S({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Wo?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:S(S({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Ha.prototype._getLayerIds=function(){return[this.id]},Ha.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Wo?t.add(this.options.source.getId()):t.add(this.options.source),t},Ha);function Ha(t,e,i){var r=Ga.call(this,e)||this;return r.options=(new Va).merge(qo(i,Va._cloneCustomizer)),r.options.source=t||r.options.source,r}var Wa,Ya=(w(Ka,Wa=ua),Ka.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=!1,r=!1,n=0,o=t;n<o.length;n++){var a=o[n];a&&(a.hasOwnProperty("fillColor")?r=!(i=!0):a.hasOwnProperty("fillPattern")&&(i=!(r=!0)))}var s=Wa.prototype.merge.apply(this,t);return i?s.fillPattern=void 0:r&&(s.fillColor=void 0),s},Ka);function Ka(){var t=null!==Wa&&Wa.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}var Xa,Ja=(w(Qa,Xa=aa),Qa.prototype.getOptions=function(){return qo(this.options,Ya._cloneCustomizer)},Qa.prototype.getSource=function(){return this.options.source},Qa.prototype.setOptions=function(t){var e=(new Ya).merge(this.options,qo(t,Ya._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("fill-color",e.fillColor,this.options.fillColor),this._updatePaintProperty("fill-opacity",e.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-pattern",e.fillPattern,this.options.fillPattern)}this.options=e},Qa.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof Wo?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),this.options.fillPattern?t.paint["fill-pattern"]=this.options.fillPattern:t.paint["fill-color"]=this.options.fillColor,[t]},Qa.prototype._getLayerIds=function(){return[this.id]},Qa.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Wo?t.add(this.options.source.getId()):t.add(this.options.source),t},Qa);function Qa(t,e,i){var r=Xa.call(this,e)||this;return r.options=(new Ya).merge(qo(i,Ya._cloneCustomizer)),r.options.source=t||r.options.source,r}var $a,ts=(w(es,$a=I),es);function es(){var t=null!==$a&&$a.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new sn(0,0),t.optional=!1,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}var is,rs=(w(ns,is=I),ns);function ns(){var t=null!==is&&is.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=void 0,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.offset=new sn(0,0),t.optional=!1,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}var os,as=(w(ss,os=ua),ss);function ss(){var t=null!==os&&os.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new ts,t.textOptions=new rs,t.placement="point",t.lineSpacing=250,t}var ls,us=(w(cs,ls=aa),cs.prototype.getOptions=function(){return qo(this.options,as._cloneCustomizer)},cs.prototype.getSource=function(){return this.options.source},cs.prototype.setOptions=function(t){var e=(new as).merge(this.options,qo(t,as._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,this.options.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,this.options.placement),this._updateLayoutProperty("icon-allow-overlap",e.iconOptions.allowOverlap,this.options.iconOptions.allowOverlap),this._updateLayoutProperty("icon-anchor",e.iconOptions.anchor,this.options.iconOptions.anchor),this._updateLayoutProperty("icon-ignore-placement",e.iconOptions.ignorePlacement,this.options.iconOptions.ignorePlacement),this._updateLayoutProperty("icon-image",e.iconOptions.image,this.options.iconOptions.image),this._updateLayoutProperty("icon-offset",e.iconOptions.offset,this.options.iconOptions.offset),this._updatePaintProperty("icon-opacity",e.iconOptions.opacity,this.options.iconOptions.opacity),this._updateLayoutProperty("icon-optional",e.iconOptions.optional,this.options.iconOptions.optional),this._updateLayoutProperty("icon-pitch-alignment",e.iconOptions.pitchAlignment,this.options.iconOptions.pitchAlignment),this._updateLayoutProperty("icon-rotate",e.iconOptions.rotation,this.options.iconOptions.rotation),this._updateLayoutProperty("icon-rotation-alignment",e.iconOptions.rotationAlignment,this.options.iconOptions.rotationAlignment),this._updateLayoutProperty("icon-size",e.iconOptions.size,this.options.iconOptions.size),this._updateLayoutProperty("text-allow-overlap",e.textOptions.allowOverlap,this.options.textOptions.allowOverlap),this._updateLayoutProperty("text-anchor",e.textOptions.anchor,this.options.textOptions.anchor),this._updatePaintProperty("text-color",e.textOptions.color,this.options.textOptions.color),this._updateLayoutProperty("text-font",e.textOptions.font,this.options.textOptions.font),this._updateLayoutProperty("text-ignore-placement",e.textOptions.ignorePlacement,this.options.textOptions.ignorePlacement),this._updatePaintProperty("text-halo-blur",e.textOptions.haloBlur,this.options.textOptions.haloBlur),this._updatePaintProperty("text-halo-color",e.textOptions.haloColor,this.options.textOptions.haloColor),this._updatePaintProperty("text-halo-width",e.textOptions.haloWidth,this.options.textOptions.haloWidth),this._updateLayoutProperty("text-offset",e.textOptions.offset,this.options.textOptions.offset),this._updatePaintProperty("text-opacity",e.textOptions.opacity,this.options.textOptions.opacity),this._updateLayoutProperty("text-optional",e.textOptions.optional,this.options.textOptions.optional),this._updateLayoutProperty("text-pitch-alignment",e.textOptions.pitchAlignment,this.options.textOptions.pitchAlignment),this._updateLayoutProperty("text-rotate",e.textOptions.rotation,this.options.textOptions.rotation),this._updateLayoutProperty("text-rotation-alignment",e.textOptions.rotationAlignment,this.options.textOptions.rotationAlignment),this._updateLayoutProperty("text-size",e.textOptions.size,this.options.textOptions.size),this._updateLayoutProperty("text-field",e.textOptions.textField,this.options.textOptions.textField)}this.options=e},cs.prototype._buildLayers=function(){return[S(S(S(S({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Wo?this.options.source.getId():this.options.source,layout:S(S({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}
2),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},cs.prototype._getLayerIds=function(){return[this.id]},cs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Wo?t.add(this.options.source.getId()):t.add(this.options.source),t},cs);function cs(t,e,i){var r=ls.call(this,e)||this;return r.options=(new as).merge(qo(i,as._cloneCustomizer)),r.options.source=t||r.options.source,r}var ps,hs=(w(ds,ps=Ta),ds);function ds(){var t=null!==ps&&ps.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=void 0,t.tileUrl=void 0,t}var fs,ms=(w(gs,fs=La),gs.prototype.getOptions=function(){return qo(this.options,hs._cloneCustomizer)},gs.prototype.setOptions=function(t){var e=(new hs).merge(this.options,qo(t,hs._cloneCustomizer));if(this.map){if(!tn(e.bounds,this.options.bounds)||e.isTMS!==this.options.isTMS||e.maxSourceZoom!==this.options.maxSourceZoom||e.minSourceZoom!==this.options.minSourceZoom||!tn(e.subdomains,this.options.subdomains)||e.tileSize!==this.options.tileSize||e.tileUrl!==this.options.tileUrl)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation)}this.options=e},gs.prototype._setOptionsNoUpdate=function(t){this.options=(new hs).merge(this.options,qo(t,hs._cloneCustomizer))},gs.prototype._buildLayers=function(){return[S(S({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},gs.prototype._getLayerIds=function(){return[this.id]},gs.prototype._buildSource=function(){var t;if(this.options.tileUrl){if(-1===this.options.tileUrl.indexOf("{"))return{type:"raster",url:this.options.tileUrl};if(-1!==this.options.tileUrl.indexOf("{subdomain}")){if(!(this.options.subdomains&&0<this.options.subdomains.length))throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");for(var e=[],i=0,r=this.options.subdomains;i<r.length;i++){var n=r[i];e.push(this.options.tileUrl.replace(/{subdomain}/g,n))}t=e}else t=[this.options.tileUrl]}return S({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},t&&{tiles:t})},gs.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},gs);function gs(t,e){var i=fs.call(this,e)||this;return t&&i.setOptions(t),i}var ys=Object.freeze({__proto__:null,BubbleLayer:ma,Layer:aa,LineLayer:ja,PolygonExtrusionLayer:Za,PolygonLayer:Ja,SymbolLayer:us,TileLayer:ms,HeatMapLayer:ba,ImageLayer:Da}),vs=(_s.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},_s);function _s(){}var xs,bs=Function.prototype,ws=Object.prototype,Ss=bs.toString,Ts=ws.hasOwnProperty,Cs=Ss.call(Object),Is=function(t){if(!we(t)||"[object Object]"!=Lt(t))return!1;var e=pi(t);if(null===e)return!0;var i=Ts.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&Ss.call(i)==Cs},Es=function(t){return we(t)&&1===t.nodeType&&!Is(t)},Ms=(w(As,xs=I),As._cloneCustomizer=function(t){if(Es(t))return t},As);function As(){var t=null!==xs&&xs.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new sn(0,0),t.position=new ho(0,0),t.showPointer=!0,t}var Ls,ks=(w(Ps,Ls=yo),Ps.prototype.setPopupOptions=function(t){this.setOptions(t)},Ps.prototype.setOptions=function(t){var e=(new Ms).merge(this.options,qo(t,Ms._cloneCustomizer));e.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(e),this.contentDiv.prepend(this.htmlContent)):e.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,e.draggable),e.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn)):!e.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),e.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!e.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),e.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=e.fillColor,this.contentDiv.style.backgroundColor=e.fillColor),this.marker&&(e.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==e.anchor&&this._replaceMarker(this.map,e),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,e),"none"===e.anchor&&this.map.events.add("move",this._onMove)):(tn(e.position,this.options.position)||this.marker.setLngLat(e.position),tn(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},Ps.prototype.getPopupOptions=function(){return this.getOptions()},Ps.prototype.getOptions=function(){return qo(this.options,Ms._cloneCustomizer)},Ps.prototype._dragToPixel=function(t){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));var e=[t[0]+this.dragOffset[0],t[1]+this.dragOffset[1]],i=this.map.pixelsToPositions([e])[0];this.options.position=i,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},Ps.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),"none"===this.options.anchor&&this._onMove()),delete this.dragOffset,delete this.dragging},Ps.prototype._createContainerDiv=function(t){var e=this,i=document.createElement("div");
2i.classList.add(Ps.Css.container),i.classList.add(Ps.Css.hidden),i.style.borderColor=t.fillColor,i.setAttribute("role","dialog"),i.setAttribute("aria-label","Map Information Window");var r=!1;return i.addEventListener("keydown",(function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(r=!0)})),i.addEventListener("keyup",(function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(r=!1)})),i.addEventListener("focusin",(function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focus())})),i.addEventListener("focusout",(function(t){r&&t.relatedTarget instanceof Node&&!i.contains(t.relatedTarget)&&(r=!1,e.isOpen()&&e.close())})),i},Ps.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(Ps.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},Ps.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(Ps.Css.arrow),t},Ps.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(Ps.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("title","close"),t.setAttribute("tabindex","0"),t.innerHTML="×",t},Ps.prototype._createHtmlContent=function(t){var e=vs.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},Ps.prototype._createMarker=function(t,e){var i=this.marker?this.marker.getLngLat():t.position;return"none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new a({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(i)):(this.containerDiv.classList.add(t.anchor),new a({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(i))},Ps.prototype._getAutoAnchor=function(t,e){var i,r,n=this.containerDiv.offsetWidth,o=this.containerDiv.offsetHeight;if(this.marker){var a=t._getMap().project(this.marker.getLngLat());i=a.x,r=a.y}else{var s=t.positionsToPixels([e.position])[0];i=s[0],r=s[1]}var l=[];return r<o?l.push("top"):r>t.getCanvas().offsetHeight-o&&l.push("bottom"),i<n/2?l.push("left"):i>t.getCanvas().offsetWidth-n/2&&l.push("right"),0<l.length?l.join("-"):"bottom"},Ps.prototype._replaceMarker=function(t,e,i){var r=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,i),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,r||null)},Ps.prototype._setDraggable=function(t,e){e?(t.addEventListener("mousedown",this._onDown),t.addEventListener("touchstart",this._onDown),t.addEventListener("dragstart",this._onDragStart)):(t.removeEventListener("mousedown",this._onDown),t.removeEventListener("touchstart",this._onDown),t.removeEventListener("dragstart",this._onDragStart))},Ps.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},Ps);function Ps(t){var e=Ls.call(this)||this;return e.attach=function(t){e.map!==t&&(e.map&&e.remove(),e.map=t,e.marker=e._createMarker(e.options),e.marker.addTo(e.map._getMap()),e.map.popups._getCollectionDiv().appendChild(e.containerDiv),e.map.popups.add(e))}
vendor: 4,320 bytes, line 2
2,e.open=function(t){if(!t&&!e.map)throw new Error("Must specify a map to open on or attach to a map in advance");e.attach(t||e.map),e.containerDiv.classList.remove(Ps.Css.hidden),e.map.events.add("move",e._onMove),e._onMove(),e._invokeEvent("open",{target:e,type:"open"})},e.close=function(){e.map&&e.map.events.remove("move",e._onMove),e.containerDiv.classList.add(Ps.Css.hidden),e._invokeEvent("close",{target:e,type:"close"})},e.remove=function(){e.map&&(e.marker.remove(),e.containerDiv.classList.remove(e.autoAnchor||e.options.anchor),e.map.events.remove("move",e._onMove),e.map.popups.remove(e),delete e.map,delete e.marker,delete e.autoAnchor)},e.isOpen=function(){return e.map&&!e.containerDiv.classList.contains(Ps.Css.hidden)},e._onMove=function(){var t=e._getAutoAnchor(e.map,e.options);t!==e.autoAnchor&&(e._replaceMarker(e.map,e.options,t),e.map.events.add("move",e._onMove))},e._onDown=function(t){e.map.popups._addDraggedPopup(e);var i=e.map.positionsToPixels([e.options.position])[0];"mousedown"===t.type?e.dragOffset=[i[0]-t.clientX,i[1]-t.clientY]:"touchstart"===t.type&&(e.dragOffset=[i[0]-t.touches[0].clientX,i[1]-t.touches[0].clientY])},e._onDragStart=function(t){t.preventDefault()},e.options=(new Ms).merge(qo(t,Ms._cloneCustomizer)),e.containerDiv=e._createContainerDiv(e.options),e.contentDiv=e._createContentDiv(e.options),e.containerDiv.appendChild(e.contentDiv),e.options.showPointer&&(e.arrowDiv=e._createArrowDiv(),e.containerDiv.appendChild(e.arrowDiv)),e.options.closeButton&&(e.closeBtn=e._createCloseButton(),e.contentDiv.appendChild(e.closeBtn)),e}var Ds,zs=(w(Os,Ds=I),Os._cloneCustomizer=function(t){if(t instanceof ks||Es(t))return t},Os);function Os(){var t=null!==Ds&&Ds.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'+rn()+'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z" fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}</text></svg>',t.pixelOffset=new sn(0,0),t.position=new ho(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var Ns,Rs=(w(Bs,Ns=yo),Bs.prototype.getOptions=function(){return qo(this.options,zs._cloneCustomizer)},Bs.prototype.setOptions=function(t){var e=(new zs).merge(this.options,qo(t,zs._cloneCustomizer));tn(e.htmlContent,this.options.htmlContent)&&e.anchor===this.options.anchor?("string"!=typeof e.htmlContent||e.color===this.options.color&&e.text===this.options.text&&e.secondaryColor===this.options.secondaryColor||(this.element.innerHTML=this._getSubbedHtmlString(e)),e.draggable!==this.options.draggable&&(this._setDraggable(e.draggable),this.marker.setDraggable(e.draggable)),tn(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset),tn(e.position,this.options.position)||this.marker.setLngLat(e.position),e.visible!==this.options.visible&&(e.visible?this.element.classList.remove(Bs.hiddenClass):this.element.classList.add(Bs.hiddenClass))):(this.marker.remove(),this._buildMarker(e),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=e},Bs.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else{if(!this.map)throw new Error("The marker must be added to a map before calling togglePopup().");this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map)}},Bs.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=pr(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},Bs.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},Bs.prototype._getId=function(){if(this.element)return"string"==typeof this.options.htmlContent?this.element.firstChild.id:this.element.i
2d},Bs.prototype._buildMarker=function(t){if("string"==typeof t.htmlContent){var e=this._getSubbedHtmlString(t);this.element=vs.convertHtmlString(e)}else this.element=t.htmlContent;this.element.classList.add(Bs.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(Bs.hiddenClass),this.marker=new a({element:this.element,offset:t.pixelOffset,draggable:t.draggable,anchor:t.anchor}).setLngLat(t.position),this.marker.on("drag",this._onDrag),this.marker.on("dragstart",this._onDragStart),this.marker.on("dragend",this._onDragEnd),this.element.addEventListener("click",this._bubbleElementEvent),this.element.addEventListener("dblclick",this._bubbleElementEvent),this.element.addEventListener("contextmenu",this._bubbleElementEvent),this.element.addEventListener("keydown",this._bubbleElementEvent),this.element.addEventListener("keypress",this._bubbleElementEvent),this.element.addEventListener("keyup",this._bubbleElementEvent),this.element.addEventListener("mousedown",this._bubbleElementEvent),this.element.addEventListener("mouseenter",this._bubbleElementEvent),this.element.addEventListener("mouseleave",this._bubbleElementEvent),this.element.addEventListener("mousemove",this._bubbleElementEvent),this.element.addEventListener("mouseout",this._bubbleElementEvent),this.element.addEventListener("mouseover",this._bubbleElementEvent),this.element.addEventListener("mouseup",this._bubbleElementEvent)},Bs.prototype._getSubbedHtmlString=function(t){if("string"==typeof t.htmlContent)return t.htmlContent.replace(/{color}/gi,t.color||"").replace(/{secondaryColor}/gi,t.secondaryColor||"").replace(/{text}/gi,t.text||"")},Bs.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+Bs.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(Bs.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},Bs.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},Bs.collectionContainerClass="marker-collection-container",Bs.hiddenClass="hidden-accessible-element",Bs.containerClass="marker-container",Bs);function Bs(t){var e=Ns.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new ho(t.lng,t.lat),e._invokeEvent("drag",{type:"drag",target:e})},e._onDragStart=function(){e._invokeEvent("dragstart",{type:"dragstart",target:e})},e._onDragEnd=function(){e._invokeEvent("dragend",{type:"dragend",target:e})},e._bubbleElementEvent=function(t){e._invokeEvent(t.type,{type:t.type,target:e})},e._onEleDragStart=function(t){t.preventDefault()},e.options=(new zs).merge(qo(t,zs._cloneCustomizer)),e._buildMarker(e.options),e}var js=function(t,e,i){(void 0===i||nt(t[e],i))&&(void 0!==i||e in t)||ye(t,e,i)},Fs=function(t){return function(e,i,r){for(var n=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++n];if(!1===i(o[l],l,o))break}return e}}(),Us=function(t){return we(t)&&Ye(t)},Vs=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},qs=function(t){return xe(t,ti(t))},Gs=function(t,e,i,r,n,o,a){var s=Vs(t,i),l=Vs(e,i),u=a.get(l);if(u)js(t,i,u);else{var c=o?o(s,l,i+"",t,e,a):void 0,p=void 0===c;if(p){var h=Me(l),d=!h&&Le(l),f=!h&&!d&&je(l);c=l,h||d||f?c=Me(s)?s:Us(s)?ri(s):d?ii(l,!(p=!1)):f?qi(l,!(p=!1)):[]:Is(l)||Ee(l)?Ee(c=s)?c=qs(s):kt(s)&&!Pt(s)||(c=Yi(l)):p=!1}p&&(a.set(l,c),n(c,l,r,o,a),a.delete(l)),js(t,i,c)}},Zs=function t(e,i,r,n,o){e!==i&&Fs(i,(function(a,s){if(o=o||new fe,kt(a))Gs(e,i,s,r,t,n,o);else{var l=n?n(Vs(e,s),a,s+"",e,i,o):void 0;void 0===l&&(l=a),js(e,s,l)}}),ti)};function Hs(t){return t}var Ws=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)},Ys=Math.max,Ks=function(t,e,i){return e=Ys(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,o=Ys(r.length-e,0),a=Array(o);++n<o;)a[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=i(a),Ws(t,this,s)}},Xs=function(t){return function(){return t}},Js=ge?function(t,e){return ge(t,"toString",{configurable:!0,enumerable:!1,value:Xs(e),writable:!0})}:Hs,Qs=Date.now,$s=function(t){var e=0,i=0;return function(){var r=Qs(),n=16-(r-i);if(i=r,0<n){if(800<=++e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Js),tl=function(t,e){return $s(Ks(t,e,Hs),t+"")}
2,el=function(t,e,i){if(!kt(i))return!1;var r=typeof e;return!!("number"==r?Ye(i)&&Pe(e,i.length):"string"==r&&e in i)&&nt(i[e],t)},il=function(t){return tl((function(e,i){var r=-1,n=i.length,o=1<n?i[n-1]:void 0,a=2<n?i[2]:void 0;for(o=3<t.length&&"function"==typeof o?(n--,o):void 0,a&&el(i[0],i[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var s=i[r];s&&t(e,s,r,o)}return e}))}((function(t,e,i){Zs(t,e,i)})),rl=(nl.parse=function(t){var e=(t=t.toLowerCase()).lastIndexOf("-");return-1!==e?{code:t,language:t.substring(0,e),region:t.substring(e+1)}:{code:t,language:t}},nl);function nl(){}var ol={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}}}},al=function(){this.Unknown="Unknown",this.Accident="Accident",this.Fog="Fog",this.Danger="Danger",this.Rain="Rain",this.Ice="Ice",this.Jam="Jam",this.LaneClosed="Lane Closed",this.RoadClosed="Road Closed",this.RoadWorks="Road Works",this.Wind="Wind",this.Flood="Flood",this.Detour="Detour"},sl=(ll.getCode=function(t){var e=rl.parse(t);return-1===ol.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},ll.getStrings=function(t){var e=this.getLocaleData(t);return new k({domain:l,path:ol.localizationsPath+"/"+e.strings}).get().then((function(t){return t}),(function(){return new al}))},ll.getLocaleData=function(t){if("string"==typeof t&&(t=rl.parse(t)),ol.locales[t.code])return ol.locales[t.code].defaultRegion;var e;if(ol.locales[t.language])e=ol.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=ol.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},ll);function ll(){}var ul,cl=(pl.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var r=t.indexOf("Edge/");return 0<r?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1},pl.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},pl.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},pl);function pl(){}(ul=t.AuthenticationType||(t.AuthenticationType={})).subscriptionKey="subscriptionKey",ul.aad="aad",ul.anonymous="anonymous";var hl,dl,fl=(w(ml,hl=I),ml.prototype.setSubscriptionKey=function(e){this.authType=t.AuthenticationType.subscriptionKey,this.subscriptionKey=e},ml.prototype.setAadProperties=function(e,i,r,n,o){this.authType=t.AuthenticationType.aad,this.authContext=o||this.authContext,this.aadInstance=n||this.aadInstance,this.clientId=e,this.aadAppId=i,this.aadTenant=r},ml.prototype.setTokenCallbackFunction=function(e){this.authType=t.AuthenticationType.anonymous,this.getToken=e},ml.prototype.merge=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=hl.prototype.merge.apply(this,e);return r.authType===t.AuthenticationType.subscriptionKey?r.authContext=r.aadAppId=r.getToken=void 0:r.authType===t.AuthenticationType.aad?r.subscriptionKey=r.getToken=void 0:r.authType===t.AuthenticationType.anonymous&&(r.subscriptionKey=r.authContext=r.aadAppId=void 0),r},ml);function ml(){var t=null!==hl&&hl.apply(this,arguments)||this;return t.authType=void 0,t.subscriptionKey=void 0,t.clientId=void 0,t.aadAppId=void 0,t.aadTenant=void 0,t.aadInstance=void 0,t.getToken=void 0,t.authContext=void 0,t}var gl="NGT",yl=rn(),vl=s,_l=u,xl=new fl,bl=!1,wl=!1,Sl=!1,Tl=!1,Cl=!1,Il=!1;function El(){return Object.assign({},xl)}function Ml(){return vl}function Al(){return _l}function Ll(){return gl}function kl(){return yl}function Pl(){return xl.authType===t.AuthenticationType.subscriptionKey?xl.subscriptionKey:void 0}function Dl(){return dl}function zl(t){return!cl.isIE()&&n.supported({failIfMajorPerformanceCaveat:t})}function Ol(t){xl=(new fl).merge(xl,t),Il=!0}function Nl(t){vl=t,wl=!0}function Rl(t){_l=t,Sl=!0}function Bl(t){gl=sl.getCode(t),Tl=!0}function jl(t){yl=t,Cl=!0}function Fl(t){xl.setSubscriptionKey(t),Il=!0}function Ul(t){dl=t,bl=!0}function Vl(t,e){if(e=Math.abs(e||1),"string"==typeof t&&eu[t.toLowerCase()]){for(var i=eu[t.toLowerCase()],r=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,n=i,o=r.exec(i);o;)n=n.replace(o[0],parseFloat(o[1])*e+""),o=r.exec(i);return n.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function ql(){return Il}function Gl(){return wl}function Zl(){return Sl}function Hl(){return Tl}function Wl(){return Cl}function Yl(){return bl}var Kl,Xl,Jl,Ql,$l,tu,eu
vendor: 23,994 bytes, line 2
2={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/></g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})" viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/></g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/></g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/></g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/></g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/></g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/></g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}</text></svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/></g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/></g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}</text></svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/></g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}</text></svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/></g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}</text></svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/></pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/></svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/></svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/></svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/></svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>'},
2iu=(ru.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},ru);function ru(){}(Xl=Kl=Kl||{})[Xl.LocalStorage=0]="LocalStorage",Xl[Xl.SessionStorage=1]="SessionStorage",(Ql=Jl=Jl||{})[Ql.Default=0]="Default",Ql[Ql.Required=1]="Required",Ql[Ql.Array=2]="Array",Ql[Ql.Hidden=4]="Hidden",(tu=$l=$l||{})[tu.AI=0]="AI",tu[tu.AI_AND_W3C=1]="AI_AND_W3C",tu[tu.W3C=2]="W3C";var nu=2,ou=(au.isNullOrUndefined=function(t){return null==t},au.disableCookies=function(){au._canUseCookies=!1},au.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uu,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},au);function au(){}var su,lu,uu=/[xy]/g,cu=(pu.prototype.addNotificationListener=function(t){this.listeners.push(t)},pu.prototype.removeNotificationListener=function(t){for(var e=this.listeners.indexOf(t);-1<e;)this.listeners.splice(e,1),e=this.listeners.indexOf(t)},pu.prototype.eventsSent=function(t){for(var e=this,i=function(i){r.listeners[i].eventsSent&&setTimeout((function(){return e.listeners[i].eventsSent(t)}),0)},r=this,n=0;n<this.listeners.length;++n)i(n)},pu.prototype.eventsDiscarded=function(t,e){for(var i=this,r=function(r){n.listeners[r].eventsDiscarded&&setTimeout((function(){return i.listeners[r].eventsDiscarded(t,e)}),0)},n=this,o=0;o<this.listeners.length;++o)r(o)},pu);function pu(){this.listeners=[]}(lu=su=su||{})[lu.CRITICAL=1]="CRITICAL",lu[lu.WARNING=2]="WARNING";var hu=0,du=1,fu=2,mu=3,gu=4,yu=5,vu=6,_u=7,xu=8,bu=9,wu=10,Su=11,Tu=12,Cu=13,Iu=14,Eu=15,Mu=16,Au=17,Lu=18,ku=19,Pu=20,Du=22,zu=23,Ou=24,Nu=25,Ru=26,Bu=27,ju=28,Fu=29,Uu=30,Vu=31,qu=32,Gu=33,Zu=35,Hu=36,Wu=37,Yu=38,Ku=39,Xu=40,Ju=41,Qu=42,$u=43,tc=45,ec=46,ic=47,rc=48,nc=49,oc=50,ac=52,sc=54,lc=55,uc=56,cc=57,pc=58,hc=60,dc=61,fc=62,mc=63,gc=64,yc=66,vc=67,_c=68,xc=69,bc=70,wc=71,Sc=(Tc.sanitizeDiagnosticText=function(t){return'"'+t.replace(/\"/g,"")+'"'},Tc.dataType="MessageData",Tc.AiNonUserActionablePrefix="AI (Internal): ",Tc.AiUserActionablePrefix="AI: ",Tc);function Tc(t,e,i,r){void 0===i&&(i=!1),this.messageId=t,this.message=(i?Tc.AiUserActionablePrefix:Tc.AiNonUserActionablePrefix)+t;var n=(e?" message:"+Tc.sanitizeDiagnosticText(e):"")+(r?" props:"+Tc.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=n}var Cc=(Ic.prototype.throwInternal=function(t,e,i,r,n){void 0===n&&(n=!1);var o=new Sc(e,i,n,r);if(this.enableDebugExceptions())throw o;if(void 0!==o&&o&&void 0!==o.message){if(n){var a=+o.messageId;(!this._messageLogged[a]||this.consoleLoggingLevel()>=su.WARNING)&&(this.warnToConsole(o.message),this._messageLogged[a]=!0)}else this.consoleLoggingLevel()>=su.WARNING&&this.warnToConsole(o.message);this.logInternalMessage(t,o)}},Ic.prototype.warnToConsole=function(t){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(t):"function"==typeof console.log&&console.log(t))},Ic.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Ic.prototype.logInternalMessage=function(t,e){if(!this._areInternalMessagesThrottled()){var i=!0,r=this.AIInternalMessagePrefix+e.messageId;if(this._messageLogged[r]?i=!1:this._messageLogged[r]=!0,i&&(t<=this.telemetryLoggingLevel()&&(this.queue.push(e),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var n="Internal events throttle limit per PageView reached for this app.",o=new Sc(zu,n,!1);this.queue.push(o),this.warnToConsole(n)}}},Ic.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Ic);function Ic(t){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},ou.isNullOrUndefined(t)||(ou.isNullOrUndefined(t.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return t.loggingLevelConsole}),ou.isNullOrUndefined(t.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return t.loggingLevelTelemetry}),ou.isNullOrUndefined(t.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return t.maxMessageLimit}),ou.isNullOrUndefined(t.enableDebugExceptions)||(this.enableDebugExceptions=function(){return t.enableDebugExceptions}))}var Ec=(Mc.prototype.processTelemetry=function(t){this.channelQueue.forEach((function(e){0<e.length&&e[0].processTelemetry(t)}))},Object.defineProperty(Mc.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}
2),Mc.prototype.initialize=function(t,e,i){var r=this;if(t.isCookieUseDisabled&&ou.disableCookies(),this.channelQueue=new Array,t.channels){var n=void 0;t.channels.forEach((function(o){if(o&&0<o.length){o=o.sort((function(t,e){return t.priority-e.priority}));for(var a=1;a<o.length;a++)o[a-1].setNextPlugin(o[a]);if(o.forEach((function(r){r.priority<500&&(n=r.identifier),r.initialize(t,e,i)})),n)throw Error("Channel has invalid priority"+n);r.channelQueue.push(o)}}))}for(var o=new Array,a=0;a<i.length;a++){var s=i[a];500<s.priority&&o.push(s)}if(0<o.length){for(o=o.sort((function(t,e){return t.priority-e.priority})),a=1;a<o.length;a++)o[a-1].setNextPlugin(o[a]);o.forEach((function(r){return r.initialize(t,e,i)})),this.channelQueue.push(o)}},Mc);function Mc(){this.identifier="ChannelControllerPlugin",this.priority=500}var Ac=(Lc.prototype.initialize=function(t,e){var i=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!t||ou.isNullOrUndefined(t.instrumentationKey))throw Error("Please provide instrumentation key");this.config=t,this._notificationManager=new cu,this.config.extensions=ou.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=ou.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new Cc(t),(n=this._extensions).push.apply(n,e.concat(this.config.extensions)),this._extensions.forEach((function(t){var e=!0;if((ou.isNullOrUndefined(t)||ou.isNullOrUndefined(t.initialize))&&(e=!1),!e)throw Error("Extensions must provide callback to initialize")})),this._extensions.push(this._channelController),this._extensions=this._extensions.sort((function(t,e){var i=typeof t.processTelemetry,r=typeof e.processTelemetry;return"function"==i&&"function"==r?t.priority-e.priority:"function"==i&&"function"!=r?1:"function"!=i&&"function"==r?-1:void 0}));var r={};this._extensions.forEach((function(t){var e=t;e&&e.priority&&(ou.isNullOrUndefined(r[e.priority])?r[e.priority]=e.identifier:i.logger.warnToConsole("Two extensions have same priority"+r[e.priority]+", "+e.identifier))}));for(var n,o=-1,a=0;a<this._extensions.length-1;a++){var s=this._extensions[a];if(!s||"function"==typeof s.processTelemetry){if(s.priority===this._channelController.priority){o=a+1;break}this._extensions[a].setNextPlugin(this._extensions[a+1])}}if(this._channelController.initialize(this.config,this,this._extensions),this._extensions.forEach((function(t){t&&t.priority<i._channelController.priority&&t.initialize(i.config,i,i._extensions)})),o<this._extensions.length&&this._extensions.splice(o),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},Lc.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},Lc.prototype.track=function(t){if(null===t)throw this._notifyInvalidEvent(t),Error("Invalid telemetry item");t.iKey||(t.iKey=this.config.instrumentationKey),t.time||(t.time=(new Date).toISOString()),ou.isNullOrUndefined(t.ver)&&(t.ver="4.0"),this._validateTelmetryItem(t),0==this._extensions.length&&this._channelController.processTelemetry(t);for(var e=0;e<this._extensions.length;){if(this._extensions[e].processTelemetry){this._extensions[e].processTelemetry(t);break}e++}},Lc.prototype.addNotificationListener=function(t){this._notificationManager.addNotificationListener(t)},Lc.prototype.removeNotificationListener=function(t){this._notificationManager.removeNotificationListener(t)},Lc.prototype.pollInternalLogs=function(t){var e=this,i=this.config.diagnosticLogInterval;return 0<i||(i=1e4),setInterval((function(){var i=e.logger.queue;i.forEach((function(i){var r={name:t||"InternalMessageId: "+i.messageId,iKey:e.config.instrumentationKey,time:(new Date).toISOString(),baseType:Sc.dataType,baseData:{message:i.message}};e.track(r)})),i.length=0}),i)},Lc.prototype._validateTelmetryItem=function(t){if(ou.isNullOrUndefined(t.name))throw this._notifyInvalidEvent(t),Error("telemetry name required");
2if(ou.isNullOrUndefined(t.time))throw this._notifyInvalidEvent(t),Error("telemetry timestamp required");if(ou.isNullOrUndefined(t.iKey))throw this._notifyInvalidEvent(t),Error("telemetry instrumentationKey required")},Lc.prototype._notifyInvalidEvent=function(t){this._notificationManager.eventsDiscarded([t],nu)},Lc);function Lc(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new Ec}var kc=(Pc.requestContextHeader="Request-Context",Pc.requestContextTargetKey="appId",Pc.requestContextAppIdFormat="appId=cid-v1:",Pc.requestIdHeader="Request-Id",Pc.traceParentHeader="traceparent",Pc.sdkContextHeader="Sdk-Context",Pc.sdkContextHeaderAppIdRequest="appId",Pc.requestContextHeaderLowerCase="request-context",Pc);function Pc(){}var Dc=(zc.sanitizeKeyAndAddUniqueness=function(t,e,i){var r=e.length,n=zc.sanitizeKey(t,e);if(n.length!==r){for(var o=0,a=n;void 0!==i[a];)o++,a=n.substring(0,zc.MAX_NAME_LENGTH-3)+zc.padNumber(o);n=a}return n},zc.sanitizeKey=function(t,e){var i;return e&&(e=zc.trim(e.toString())).length>zc.MAX_NAME_LENGTH&&(i=e.substring(0,zc.MAX_NAME_LENGTH),t.throwInternal(su.WARNING,cc,"name is too long. It has been truncated to "+zc.MAX_NAME_LENGTH+" characters.",{name:e},!0)),i||e},zc.sanitizeString=function(t,e,i){var r;return void 0===i&&(i=zc.MAX_STRING_LENGTH),e&&(i=i||zc.MAX_STRING_LENGTH,(e=zc.trim(e)).toString().length>i&&(r=e.toString().substring(0,i),t.throwInternal(su.WARNING,dc,"string value is too long. It has been truncated to "+i+" characters.",{value:e},!0))),r||e},zc.sanitizeUrl=function(t,e){return zc.sanitizeInput(t,e,zc.MAX_URL_LENGTH,yc)},zc.sanitizeMessage=function(t,e){var i;return e&&e.length>zc.MAX_MESSAGE_LENGTH&&(i=e.substring(0,zc.MAX_MESSAGE_LENGTH),t.throwInternal(su.WARNING,uc,"message is too long, it has been truncated to "+zc.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),i||e},zc.sanitizeException=function(t,e){var i;return e&&e.length>zc.MAX_EXCEPTION_LENGTH&&(i=e.substring(0,zc.MAX_EXCEPTION_LENGTH),t.throwInternal(su.WARNING,ac,"exception is too long, it has been truncated to "+zc.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),i||e},zc.sanitizeProperties=function(t,e){if(e){var i={};for(var r in e){var n=e[r];if("object"==typeof n&&"undefined"!=typeof JSON)try{n=JSON.stringify(n)}catch(e){t.throwInternal(su.WARNING,nc,"custom property is not valid",{exception:e},!0)}n=zc.sanitizeString(t,n,zc.MAX_PROPERTY_LENGTH),i[r=zc.sanitizeKeyAndAddUniqueness(t,r,i)]=n}e=i}return e},zc.sanitizeMeasurements=function(t,e){if(e){var i={};for(var r in e){var n=e[r];i[r=zc.sanitizeKeyAndAddUniqueness(t,r,i)]=n}e=i}return e},zc.sanitizeId=function(t,e){return e?zc.sanitizeInput(t,e,zc.MAX_ID_LENGTH,xc).toString():e},zc.sanitizeInput=function(t,e,i,r){var n;return e&&(e=zc.trim(e)).length>i&&(n=e.substring(0,i),t.throwInternal(su.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:e},!0)),n||e},zc.padNumber=function(t){var e="00"+t;return e.substr(e.length-3)},zc.trim=function(t){return"string"!=typeof t?t:t.replace(/^\s+|\s+$/g,"")},zc.MAX_NAME_LENGTH=150,zc.MAX_ID_LENGTH=128,zc.MAX_PROPERTY_LENGTH=8192,zc.MAX_STRING_LENGTH=1024,zc.MAX_URL_LENGTH=2048,zc.MAX_MESSAGE_LENGTH=32768,zc.MAX_EXCEPTION_LENGTH=32768,zc);function zc(){}var Oc=(Nc.createDomEvent=function(t){var e=null;return"function"==typeof Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},Nc.disableStorage=function(){Nc._canUseLocalStorage=!1,Nc._canUseSessionStorage=!1},Nc._getLocalStorageObject=function(){return Nc.canUseLocalStorage()?Nc._getVerifiedStorageObject(Kl.LocalStorage):null},Nc._getVerifiedStorageObject=function(t){var e,i,r=null;try{if("undefined"==typeof window)return null;i=new Date,(r=t===Kl.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),e=r.getItem(i)!=i,r.removeItem(i),e&&(r=null)}catch(t){r=null}return r},Nc.isInternalApplicationInsightsEndpoint=function(t){return-1!==Nc._internalEndpoints.indexOf(t.toLowerCase())},Nc.canUseLocalStorage=function(){return void 0===Nc._canUseLocalStorage&&(Nc._canUseLocalStorage=!!Nc._getVerifiedStorageObject(Kl.LocalStorage)),Nc._canUseLocalStorage},Nc.getStorage=function(t,e){var i=Nc._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){Nc._canUseLocalStorage=!1,t.throwInternal(su.WARNING,du,"Browser failed read of local storage. "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}return null}
2,Nc.setStorage=function(t,e,i){var r=Nc._getLocalStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){Nc._canUseLocalStorage=!1,t.throwInternal(su.WARNING,mu,"Browser failed write to local storage. "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}return!1},Nc.removeStorage=function(t,e){var i=Nc._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){Nc._canUseLocalStorage=!1,t.throwInternal(su.WARNING,yu,"Browser failed removal of local storage item. "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}return!1},Nc._getSessionStorageObject=function(){return Nc.canUseSessionStorage()?Nc._getVerifiedStorageObject(Kl.SessionStorage):null},Nc.canUseSessionStorage=function(){return void 0===Nc._canUseSessionStorage&&(Nc._canUseSessionStorage=!!Nc._getVerifiedStorageObject(Kl.SessionStorage)),Nc._canUseSessionStorage},Nc.getSessionStorageKeys=function(){var t=[];if(Nc.canUseSessionStorage())for(var e in window.sessionStorage)t.push(e);return t},Nc.getSessionStorage=function(t,e){var i=Nc._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){Nc._canUseSessionStorage=!1,t.throwInternal(su.WARNING,fu,"Browser failed read of session storage. "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}return null},Nc.setSessionStorage=function(t,e,i){var r=Nc._getSessionStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){Nc._canUseSessionStorage=!1,t.throwInternal(su.WARNING,gu,"Browser failed write to session storage. "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}return!1},Nc.removeSessionStorage=function(t,e){var i=Nc._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){Nc._canUseSessionStorage=!1,t.throwInternal(su.WARNING,vu,"Browser failed removal of session storage item. "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}return!1},Nc.disableCookies=function(){ou.disableCookies()},Nc.canUseCookies=function(t){if(void 0===ou._canUseCookies){ou._canUseCookies=!1;try{ou._canUseCookies=void 0!==Nc.document.cookie}catch(e){t.throwInternal(su.WARNING,_c,"Cannot access document.cookie - "+Nc.getExceptionName(e),{exception:Nc.dump(e)})}}return ou._canUseCookies},Nc.setCookie=function(t,e,i,r){var n="",o="";r&&(n=";domain="+r),Nc.document.location&&"https:"===Nc.document.location.protocol&&(o=";secure"),Nc.canUseCookies(t)&&(Nc.document.cookie=e+"="+i+n+";path=/"+o)},Nc.stringToBoolOrDefault=function(t,e){return void 0===e&&(e=!1),null==t?e:"true"===t.toString().toLowerCase()},Nc.getCookie=function(t,e){if(Nc.canUseCookies(t)){var i="";if(e&&e.length)for(var r=e+"=",n=Nc.document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if((a=Nc.trim(a))&&0===a.indexOf(r)){i=a.substring(r.length,n[o].length);break}}return i}},Nc.deleteCookie=function(t,e){Nc.canUseCookies(t)&&(Nc.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Nc.trim=function(t){return"string"!=typeof t?t:t.replace(/^\s+|\s+$/g,"")},Nc.newId=function(){for(var t="",e=1073741824*Math.random();0<e;)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e%64),e=Math.floor(e/64);return t},Nc.random32=function(){return 4294967296*Math.random()|0},Nc.generateW3CId=function(){for(var t,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=e[15&(t=Nc.random32())]+e[t>>4&15]+e[t>>8&15]+e[t>>12&15]+e[t>>16&15]+e[t>>20&15]+e[t>>24&15]+e[t>>28&15];var n=e[8+4*Math.random()|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+n+i.substr(16,3)+i.substr(19,12)},Nc.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},Nc.isError=function(t){return"[object Error]"===Object.prototype.toString.call(t)},Nc.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},Nc.toISOStringForIE8=function(t){if(Nc.isDate(t)){if(Date.prototype.toISOString)return t.toISOString();var e=function(t){var e=String(t);return 1===e.length&&(e="0"+e),e};return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+String((t.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},Nc.getIEVersion=function(t){void 0===t&&(t=null);var e=t?t.toLowerCase():navigator.userAgent.toLowerCase();return-1!=e.indexOf("msie")?parseInt(e.split("msie")[1]):null},Nc.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var e=""+(t=Math.round(t))%1e3,i=""+Math.floor(t/1e3)%60,r=""+Math.floor(t/6e4)%60,n=""+Math.floor(t/36e5)%24,o=Math.floor(t/864e5);return e=1===e.length?"00"+e:2===e.length?"0"+e:e,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,(0<o?o+".":"")+(n=n.length<2?"0"+n:n)+":"+r+":"+i+"."+e}
2,Nc.isCrossOriginError=function(t,e,i,r,n){return("Script error."===t||"Script error"===t)&&!n},Nc.dump=function(t){var e=Object.prototype.toString.call(t),i=JSON.stringify(t);return"[object Error]"===e&&(i="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'"),e+i},Nc.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},Nc.addEventHandler=function(t,e){if("undefined"==typeof window||!window||"string"!=typeof t||"function"!=typeof e)return!1;var i="on"+t;if(window.addEventListener)window.addEventListener(t,e,!1);else{if(!window.attachEvent)return!1;window.attachEvent(i,e)}return!0},Nc.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},Nc.getExtension=function(t,e){for(var i=null,r=0;!i&&r<t.length;)t[r]&&t[r].identifier===e&&(i=t[r]),r++;return i},Nc.document="undefined"!=typeof document?document:{},Nc._canUseLocalStorage=void 0,Nc._canUseSessionStorage=void 0,Nc._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Nc.NotSpecified="not_specified",Nc);function Nc(){}var Rc=(Bc.parseUrl=function(t){return Bc.htmlAnchorElement||(Bc.htmlAnchorElement=Bc.document.createElement?Bc.document.createElement("a"):{host:Bc.parseHost(t)}),Bc.htmlAnchorElement.href=t,Bc.htmlAnchorElement},Bc.getAbsoluteUrl=function(t){var e,i=Bc.parseUrl(t);return i&&(e=i.href),e},Bc.getPathName=function(t){var e,i=Bc.parseUrl(t);return i&&(e=i.pathname),e},Bc.getCompleteUrl=function(t,e){return t?t.toUpperCase()+" "+e:e},Bc.parseHost=function(t){var e=t.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=e&&2<e.length&&"string"==typeof e[2]&&0<e[2].length?e[2]:null},Bc.document="undefined"!=typeof document?document:{},Bc);function Bc(){}var jc=(Fc.canIncludeCorrelationHeader=function(t,e,i){if(t&&t.disableCorrelationHeaders)return!1;if(!e)return!1;var r=Rc.parseUrl(e).host.toLowerCase();if(!(t&&t.enableCorsCorrelation||r===i))return!1;var n,o=t&&t.correlationHeaderDomains;if(o&&(o.forEach((function(t){var e=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));n=n||e.test(r)})),!n))return!1;var a=t&&t.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var s=0;s<a.length;s++)if(new RegExp(a[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return!0},Fc.getCorrelationContext=function(t){if(t){var e=Fc.getCorrelationContextValue(t,kc.requestContextTargetKey);if(e&&e!==Fc.correlationIdPrefix)return e}},Fc.getCorrelationContextValue=function(t,e){if(t)for(var i=t.split(","),r=0;r<i.length;++r){var n=i[r].split("=");if(2==n.length&&n[0]==e)return n[1]}},Fc.correlationIdPrefix="cid-v1:",Fc);function Fc(){}var Uc=(Vc.ParseDependencyPath=function(t,e,i,r){var n,o=r,a=r;if(e&&0<e.length){var s=Rc.parseUrl(e);if(n=s.host,!o)if(null!=s.pathname){var l=0===s.pathname.length?"/":s.pathname;"/"!==l.charAt(0)&&(l="/"+l),a=s.pathname,o=Dc.sanitizeString(t,i?i+" "+l:l)}else o=Dc.sanitizeString(t,e)}else o=n=r;return{target:n,name:o,data:a}},Vc);function Vc(){}var qc=(Gc.Now="undefined"!=typeof window&&window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},Gc.GetDuration=function(t,e){var i=null;return 0===t||0===e||ou.isNullOrUndefined(t)||ou.isNullOrUndefined(e)||(i=e-t),i},Gc);function Gc(){}var Zc,Hc="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Wc="ProcessLegacy",Yc="http.method",Kc=(w(Xc,Zc=function(){}),Xc);function Xc(){return Zc.call(this)||this}var Jc,Qc=(w($c,Jc=function(){this.ver=1,this.sampleRate=100,this.tags={}}),$c);function $c(t,e,i){var r=Jc.call(this)||this;return r.name=Dc.sanitizeString(t,i)||Oc.NotSpecified,r.data=e,r.time=Oc.toISOStringForIE8(new Date),r.aiDataContract={time:Jl.Required,iKey:Jl.Required,name:Jl.Required,sampleRate:function(){return 100==r.sampleRate?Jl.Hidden:Jl.Required},tags:Jl.Required,data:Jl.Required},r}function tp(){}var ep,ip=(w(rp,ep=tp),rp);function rp(){var t=ep.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}var np,op=(w(ap,np=ip),ap.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ap.dataType="EventData",ap);function ap(t,e,i,r){var n=np.call(this)||this;return n.aiDataContract={ver:Jl.Required,name:Jl.Required,properties:Jl.Default,measurements:Jl.Default},n.name=Dc.sanitizeString(t,e)||Oc.NotSpecified,n.properties=Dc.sanitizeProperties(t,i),n.measurements=Dc.sanitizeMeasurements(t,r),n}function sp(){}var lp,up=(w(cp,lp=tp),cp);function cp(){var t=lp.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}function pp(){this.hasFullStack=!0,this.parsedStack=[]}var hp,dp=(w(fp,hp=up),fp.CreateFromInterface=function(t,e){var i=e.exceptions&&e.exceptions.map((function(e){return gp.CreateFromInterface(t,e)}));return new fp(t,S({},e,{exceptions:i}))},fp.prototype.toInterface=function(){var t=this.exceptions,e=this.properties,i=this.measurements,r=this.severityLevel,n=this.ver,o=this.problemGroup,a=this.id,s=this.isManual;return{ver:n,exceptions:t instanceof Array&&t.map((function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:e,measurements:i,problemGroup:o,id:a,isManual:s}}
2,fp.CreateSimpleException=function(t,e,i,r,n,o){return{exceptions:[{hasFullStack:!0,message:t,stack:n,typeName:e}]}},fp.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",fp.dataType="ExceptionData",fp);function fp(t,e,i,r,n,o){var a=hp.call(this)||this;return a.aiDataContract={ver:Jl.Required,exceptions:Jl.Required,severityLevel:Jl.Default,properties:Jl.Default,measurements:Jl.Default},e instanceof Error?(a.exceptions=[new gp(t,e)],a.properties=Dc.sanitizeProperties(t,i),a.measurements=Dc.sanitizeMeasurements(t,r),n&&(a.severityLevel=n),o&&(a.id=o)):(a.exceptions=e.exceptions,a.properties=e.properties,a.measurements=e.measurements,e.severityLevel&&(a.severityLevel=e.severityLevel),e.id&&(a.id=e.id),e.problemGroup&&(a.problemGroup=e.problemGroup),ou.isNullOrUndefined(e.ver)||(a.ver=e.ver),ou.isNullOrUndefined(e.isManual)||(a.isManual=e.isManual)),a}var mp,gp=(w(yp,mp=pp),yp.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&this.parsedStack.map((function(t){return t.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:t||void 0}},yp.CreateFromInterface=function(t,e){var i=e.parsedStack instanceof Array&&e.parsedStack.map((function(t){return _p.CreateFromInterface(t)}))||e.parsedStack;return new yp(t,S({},e,{parsedStack:i}))},yp.parseStack=function(t){var e=void 0;if("string"==typeof t){var i=t.split("\n");e=[];for(var r=0,n=0,o=0;o<=i.length;o++){var a=i[o];if(_p.regex.test(a)){var s=new _p(i[o],r++);n+=s.sizeInBytes,e.push(s)}}if(32768<n)for(var l=0,u=e.length-1,c=0,p=l,h=u;l<u;){if(32768<(c+=e[l].sizeInBytes+e[u].sizeInBytes)){var d=h-p+1;e.splice(p,d);break}p=l,h=u,l++,u--}}return e},yp);function yp(t,e){var i=mp.call(this)||this;if(i.aiDataContract={id:Jl.Default,outerId:Jl.Default,typeName:Jl.Required,message:Jl.Required,hasFullStack:Jl.Default,stack:Jl.Default,parsedStack:Jl.Array},e instanceof Error){i.typeName=Dc.sanitizeString(t,e.name)||Oc.NotSpecified,i.message=Dc.sanitizeMessage(t,e.message)||Oc.NotSpecified;var r=e.stack;i.parsedStack=yp.parseStack(r),i.stack=Dc.sanitizeException(t,r),i.hasFullStack=Oc.isArray(i.parsedStack)&&0<i.parsedStack.length}else i.typeName=e.typeName,i.message=e.message,i.stack=e.stack,i.parsedStack=e.parsedStack,i.hasFullStack=e.hasFullStack;return i}var vp,_p=(w(xp,vp=sp),xp.CreateFromInterface=function(t){return new xp(t,null)},xp.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},xp.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,xp.baseSize=58,xp);function xp(t,e){var i=vp.call(this)||this;if(i.sizeInBytes=0,i.aiDataContract={level:Jl.Required,method:Jl.Required,assembly:Jl.Default,fileName:Jl.Default,line:Jl.Default},"string"==typeof t){var r=t;i.level=e,i.method="<no_method>",i.assembly=Oc.trim(r),i.fileName="",i.line=0;var n=r.match(xp.regex);n&&5<=n.length&&(i.method=Oc.trim(n[2])||i.method,i.fileName=Oc.trim(n[4]),i.line=parseInt(n[5])||0)}else i.level=t.level,i.method=t.method,i.assembly=t.assembly,i.fileName=t.fileName,i.line=t.line,i.sizeInBytes=0;return i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=xp.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var bp,wp,Sp,Tp=(w(Cp,bp=tp),Cp);function Cp(){var t=bp.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}(Sp=wp=wp||{})[Sp.Measurement=0]="Measurement",Sp[Sp.Aggregation=1]="Aggregation";var Ip,Ep=(w(Mp,Ip=function(){this.kind=wp.Measurement}),Mp);function Mp(){var t=null!==Ip&&Ip.apply(this,arguments)||this;return t.aiDataContract={name:Jl.Required,kind:Jl.Default,value:Jl.Required,count:Jl.Default,min:Jl.Default,max:Jl.Default,stdDev:Jl.Default},t}var Ap,Lp=(w(kp,Ap=Tp),kp.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",kp.dataType="MetricData",kp);function kp(t,e,i,r,n,o,a){var s=Ap.call(this)||this;s.aiDataContract={ver:Jl.Required,metrics:Jl.Required,properties:Jl.Default};var l=new Ep;return l.count=0<r?r:void 0,l.max=isNaN(o)||null===o?void 0:o,l.min=isNaN(n)||null===n?void 0:n,l.name=Dc.sanitizeString(t,e)||Oc.NotSpecified,l.value=i,s.metrics=[l],s.properties=Dc.sanitizeProperties(t,a),s}var Pp,Dp=(w(zp,Pp=ip),zp);function zp(){var t=Pp.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}var Op,Np=(w(Rp,Op=Dp),Rp.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Rp.dataType="PageviewData",Rp);function Rp(t,e,i,r,n,o,a){var s=Op.call(this)||this;return s.aiDataContract={ver:Jl.Required,name:Jl.Default,url:Jl.Default,duration:Jl.Default,properties:Jl.Default,measurements:Jl.Default,id:Jl.Default},s.id=Dc.sanitizeId(t,a),s.url=Dc.sanitizeUrl(t,i),s.name=Dc.sanitizeString(t,e)||Oc.NotSpecified,isNaN(r)||(s.duration=Oc.msToTimeSpan(r)),s.properties=Dc.sanitizeProperties(t,n),s.measurements=Dc.sanitizeMeasurements(t,o),s}var Bp,jp=(w(Fp,Bp=tp),Fp);function Fp(){var t=Bp.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}var Up,Vp=(w(qp,Up=jp),qp.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",qp.dataType="RemoteDependencyData",qp);function qp(t,e,i,r,n,o,a,s,l,u,c,p){void 0===l&&(l="Ajax");var h=Up.call(this)||this;h.aiDataContract={id:Jl.Required,ver:Jl.Required,name:Jl.Default,resultCode:Jl.Default,duration:Jl.Default,success:Jl.Default,data:Jl.Default,target:Jl.Default,type:Jl.Default,properties:Jl.Default,measurements:Jl.Default,kind:Jl.Default,value:Jl.Default,count:Jl.Default,min:Jl.Default,max:Jl.Default,stdDev:Jl.Default,dependencyKind:Jl.Default,dependencySource:Jl.Default,commandName:Jl.Default,dependencyTypeName:Jl.Default},h.id=e,h.duration=Oc.msToTimeSpan(n),h.success=o,h.resultCode=a+"",h.type=Dc.sanitizeString(t,l);var d=Uc.ParseDependencyPath(t,i,s,r);return h.data=Dc.sanitizeUrl(t,r)||d.data,h.target=Dc.sanitizeString(t,d.target),u&&(h.target=h.target+" | "+u),h.name=Dc.sanitizeString(t,d.name),h.properties=Dc.sanitizeProperties(t,c),h.measurements=Dc.sanitizeMeasurements(t,p),h}var Gp,Zp=(w(Hp,Gp=tp),Hp);function Hp(){var t=Gp.call(this)||this;return t.ver=2,t.properties={},t}var Wp,Yp=(w(Kp,Wp=Zp),Kp.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Kp.dataType="MessageData",Kp);function Kp(t,e,i,r){var n=Wp.call(this)||this;return n.aiDataContract={ver:Jl.Required,message:Jl.Required,severityLevel:Jl.Default,properties:Jl.Default},e=e||Oc.NotSpecified,n.message=Dc.sanitizeMessage(t,e),n.properties=Dc.sanitizeProperties(t,r),i&&(n.severityLevel=i),n}var Xp,Jp=(w(Qp,Xp=Dp),Qp);function Qp(){var t=Xp.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}var $p,th=(w(eh,$p=Jp),eh.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",eh.dataType="PageviewPerformanceData",eh);function eh(t,e,i,r,n,o,a){var s=$p.call(this)||this;return s.aiDataContract={ver:Jl.Required,name:Jl.Default,url:Jl.Default,duration:Jl.Default,perfTotal:Jl.Default,networkConnect:Jl.Default,sentRequest:Jl.Default,receivedResponse:Jl.Default,domProcessing:Jl.Default,properties:Jl.Default,measurements:Jl.Default},s.url=Dc.sanitizeUrl(t,i),s.name=Dc.sanitizeString(t,e)||Oc.NotSpecified,s.properties=Dc.sanitizeProperties(t,n),s.measurements=Dc.sanitizeMeasurements(t,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var ih,rh,nh,oh=(w(ah,ih=Kc),ah);function ah(t,e){var i=ih.call(this)||this;return i.aiDataContract={baseType:Jl.Required,baseData:Jl.Required},i.baseType=t,i.baseData=e,i}(nh=rh=rh||{}
2)[nh.Verbose=0]="Verbose",nh[nh.Information=1]="Information",nh[nh.Warning=2]="Warning",nh[nh.Error=3]="Error",nh[nh.Critical=4]="Critical";var sh=(lh.getConfig=function(t,e,i,r){var n;return void 0===r&&(r=!1),n=i&&t.extensionConfig&&t.extensionConfig[i]&&!ou.isNullOrUndefined(t.extensionConfig[i][e])?t.extensionConfig[i][e]:t[e],ou.isNullOrUndefined(n)?r:n},lh);function lh(){}var uh=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},ch=(ph.create=function(t,e,i,r,n,o){if(i=Dc.sanitizeString(r,i)||Oc.NotSpecified,ou.isNullOrUndefined(t)||ou.isNullOrUndefined(e)||ou.isNullOrUndefined(i))throw Error("Input doesn't contain all required fields");var a={name:i,time:(new Date).toISOString(),iKey:"",ext:o||{},tags:[],data:{},baseType:e,baseData:t};if(!ou.isNullOrUndefined(n))for(var s in n)n.hasOwnProperty(s)&&(a.data[s]=n[s]);return a},ph);function ph(){}var hh=(dh.UserExt="user",dh.DeviceExt="device",dh.TraceExt="trace",dh.WebExt="web",dh.AppExt="app",dh.OSExt="os",dh.SessionExt="ses",dh.SDKExt="sdk",dh);function dh(){}var fh=new uh,mh="AppInsightsPropertiesPlugin",gh="AppInsightsChannelPlugin",yh=(vh.prototype.trackPageView=function(t,e){var i=this,r=t.name;!ou.isNullOrUndefined(r)&&"string"==typeof r||(t.name=window.document&&window.document.title||"");var n=t.uri;if(!ou.isNullOrUndefined(n)&&"string"==typeof n||(t.uri=window.location&&window.location.href||""),!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,e),this._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))})),void this._logger.throwInternal(su.WARNING,Nu,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,a=void 0,s=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;a=qc.GetDuration(s,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(a)||
2(a=void 0);var l=void 0;ou.isNullOrUndefined(e)||ou.isNullOrUndefined(e.duration)||(l=e.duration),!this.overridePageViewDuration&&isNaN(l)||(isNaN(l)&&((e=e||{}).duration=a),this.appInsights.sendPageViewInternal(t,e),this._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))})),o=!0),e=e||{};var u=setInterval((function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(u);var l={name:r,uri:n};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(l),l.isValid||o?(o||(e.duration=l.durationMs,i.appInsights.sendPageViewInternal(t,e)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(l,e),i.pageViewPerformanceSent=!0),i._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))}))):(e.duration=a,i.appInsights.sendPageViewInternal(t,e),i._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))})))}else 6e4<qc.GetDuration(s,+new Date)&&(clearInterval(u),o||(e.duration=6e4,i.appInsights.sendPageViewInternal(t,e),i._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))}))))}catch(l){i._logger.throwInternal(su.CRITICAL,Yu,"trackPageView failed on page load calculation: "+Oc.getExceptionName(l),{exception:Oc.dump(l)})}}),100)},vh);function vh(t,e,i,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=e,this.appInsights=t,this._pageViewPerformanceManager=r,i&&(this._channel=function(){return i.getTransmissionControls()},this._logger=i.logger)}var _h=(xh.prototype.trackPreviousPageVisit=function(t,e){try{var i=this.restartPageVisitTimer(t,e);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Oc.dump(t))}},xh.prototype.restartPageVisitTimer=function(t,e){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(t,e),i}catch(t){return this._logger.warnToConsole("Call to restart failed: "+Oc.dump(t)),null}},xh.prototype.startPageVisitTimer=function(t,e){try{if(Oc.canUseSessionStorage()){if(null!=Oc.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var i=new bh(t,e),r=JSON.stringify(i);Oc.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(t){this._logger.warnToConsole("Call to start failed: "+Oc.dump(t))}},xh.prototype.stopPageVisitTimer=function(){try{if(Oc.canUseSessionStorage()){var t=Date.now(),e=Oc.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(e){var i=JSON.parse(e);return i.pageVisitTime=t-i.pageVisitStartTime,Oc.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),i}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+Oc.dump(t)),null}},xh);function xh(t,e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e,this._logger=t}var bh=function(t,e){this.pageVisitStartTime=Date.now(),this.pageName=t,this.pageUrl=e},wh=(Sh.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var e=this.getPerformanceTiming();if(e){var i=qc.GetDuration(e.navigationStart,e.loadEventEnd),r=qc.GetDuration(e.navigationStart,e.connectEnd),n=qc.GetDuration(e.requestStart,e.responseStart),o=qc.GetDuration(e.responseStart,e.responseEnd),a=qc.GetDuration(e.responseEnd,e.loadEventEnd);0==i?this._logger.throwInternal(su.WARNING,wu,"error calculating page view performance.",{total:i,network:r,request:n,response:o,dom:a}):this.shouldCollectDuration(i,r,n,o,a)?i<Math.floor(r)+Math.floor(n)+Math.floor(o)+Math.floor(a)?this._logger.throwInternal(su.WARNING,xu,"client performance math error.",{total:i,network:r,request:n,response:o,dom:a}):(t.durationMs=i,t.perfTotal=t.duration=Oc.msToTimeSpan(i),t.networkConnect=Oc.msToTimeSpan(r),t.sentRequest=Oc.msToTimeSpan(n),t.receivedResponse=Oc.msToTimeSpan(o),t.domProcessing=Oc.msToTimeSpan(a),t.isValid=!0):this._logger.throwInternal(su.WARNING,tc,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:n,response:o,dom:a})}},Sh.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},Sh.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},Sh.prototype.isPerformanceTimingDataReady=function(){var t=window.performance.timing;return 0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Sh.prototype.shouldCollectDuration=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,n=!1;if(r)for(var o=0;o<i.length;o++)n=n||-1!==r.toLowerCase().indexOf(i[o]);if(n)return!1;for(var a=0;a<t.length;a++)if(t[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Sh);function Sh(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}var Th="duration",Ch=(Ih.getDefaultConfig=function(t){return(t=t||{}).sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=Oc.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=Oc.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=Oc.stringToBoolOrDefault(t.overridePageViewDuration),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||100<=t.samplingPercentage)&&(t.samplingPercentage=100),t.isCookieUseDisabled=Oc.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=Oc.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=Oc.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=Oc.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},Ih.prototype.processTelemetry=function(t){for(var e=!1,i=this._telemetryInitializer
2s.length,r=0;r<i;++r){var n=this._telemetryInitializers[r];if(n)try{if(!1===n.apply(null,[t])){e=!0;break}}catch(t){this._logger.throwInternal(su.CRITICAL,gc,"One of telemetry initializers failed, telemetry item will not be sent: "+Oc.getExceptionName(t),{exception:Oc.dump(t)},!0)}}e||ou.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t)},Ih.prototype.setNextPlugin=function(t){this._nextPlugin=t},Ih.prototype.trackEvent=function(t,e){try{var i=ch.create(t,op.dataType,op.envelopeType,this._logger,e);this.core.track(i)}catch(t){this._logger.throwInternal(su.WARNING,Ku,"trackTrace failed, trace will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this._logger.throwInternal(su.CRITICAL,Fu,"startTrackEvent failed, event will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.stopTrackEvent=function(t,e,i){try{this._eventTracking.stop(t,void 0,e)}catch(t){this._logger.throwInternal(su.CRITICAL,Uu,"stopTrackEvent failed, event will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.trackTrace=function(t,e){try{var i=ch.create(t,Yp.dataType,Yp.envelopeType,this._logger,e);this.core.track(i)}catch(t){this._logger.throwInternal(su.WARNING,Ku,"trackTrace failed, trace will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.trackMetric=function(t,e){try{var i=ch.create(t,Lp.dataType,Lp.envelopeType,this._logger,e);this.core.track(i)}catch(t){this._logger.throwInternal(su.CRITICAL,Hu,"trackMetric failed, metric will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.trackPageView=function(t,e){try{var i=t||{};this._pageViewManager.trackPageView(i,S({},i.properties,i.measurements,e)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(i.name,i.uri)}catch(t){this._logger.throwInternal(su.CRITICAL,Wu,"trackPageView failed, page view will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.sendPageViewInternal=function(t,e,i){"undefined"!=typeof document&&(t.refUri=void 0===t.refUri?document.referrer:t.refUri);var r=ch.create(t,Np.dataType,Np.envelopeType,this._logger,e,i);this.core.track(r),this._trackAjaxAttempts=0},Ih.prototype.sendPageViewPerformanceInternal=function(t,e,i){var r=ch.create(t,th.dataType,th.envelopeType,this._logger,e,i);this.core.track(r)},Ih.prototype.trackPageViewPerformance=function(t,e){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,e)}catch(t){this._logger.throwInternal(su.CRITICAL,Wu,"trackPageViewPerformance failed, page view will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.startTrackPage=function(t){try{"string"!=typeof t&&(t=window.document&&window.document.title||""),this._pageTracking.start(t)}catch(t){this._logger.throwInternal(su.CRITICAL,Vu,"startTrackPage failed, page view may not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.stopTrackPage=function(t,e,i,r){try{"string"!=typeof t&&(t=window.document&&window.document.title||""),"string"!=typeof e&&(e=window.location&&window.location.href||""),this._pageTracking.stop(t,e,i,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,e)}catch(t){this._logger.throwInternal(su.CRITICAL,qu,"stopTrackPage failed, page view will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype.sendExceptionInternal=function(t,e,i){var r=new dp(this._logger,t.exception||new Error(Oc.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),n=ch.create(r,dp.dataType,dp.envelopeType,this._logger,e,i);this.core.track(n)},Ih.prototype.trackException=function(t,e){try{this.sendExceptionInternal(t,e)}catch(t){this._logger.throwInternal(su.CRITICAL,Zu,"trackException failed, exception will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},Ih.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(Oc.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!Oc.isError(t.error)){var i="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=i}this.trackException({exception:t.error,severityLevel:rh.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(su.CRITICAL,Su,"_onError threw exception while logging error, error will not be collected: "+Oc.getExceptionName(e),{exception:Oc.dump(e),errorString:r})}},Ih.prototype.addTelemetryInitializer=function(t){this._telemetryInitializer
2s.push(t)},Ih.prototype._initialize=function(t,e,i){var r=this;if(!this._isInitialized){if(ou.isNullOrUndefined(e))throw Error("Error initializing");this.core=e,this._logger=e.logger,this._globalconfig={instrumentationKey:t.instrumentationKey,endpointUrl:t.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=t.extensionConfig&&t.extensionConfig[this.identifier]?t.extensionConfig[this.identifier]:{};var n=Ih.getDefaultConfig();if(void 0!==n){for(var o in n)this.config[o]=sh.getConfig(t,o,this.identifier,n[o]);if(this._globalconfig)for(var o in n)void 0===this._globalconfig[o]&&(this._globalconfig[o]=n[o])}this.config.isCookieUseDisabled&&Oc.disableCookies(),this.config.isStorageUseDisabled&&Oc.disableStorage();var a={instrumentationKey:function(){return t.instrumentationKey},accountId:function(){return r.config.accountId||t.accountId},sessionRenewalMs:function(){return r.config.sessionRenewalMs||t.sessionRenewalMs},sessionExpirationMs:function(){return r.config.sessionExpirationMs||t.sessionExpirationMs},sampleRate:function(){return r.config.samplingPercentage||t.samplingPercentage},cookieDomain:function(){return r.config.cookieDomain||t.cookieDomain},sdkExtension:function(){return r.config.sdkExtension||t.sdkExtension},isBrowserLinkTrackingEnabled:function(){return r.config.isBrowserLinkTrackingEnabled||t.isBrowserLinkTrackingEnabled},appId:function(){return r.config.appId||t.appId}};this._pageViewPerformanceManager=new wh(this.core),this._pageViewManager=new yh(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new _h(this._logger,(function(t,e,i){return r.trackPageVisitTime(t,e,i)})),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new Eh(this._logger,"trackEvent"),this._eventTracking.action=function(t,e,i,n){(n=n||{})[Th]=i.toString(),r.trackEvent({name:t,properties:n})},this._pageTracking=new Eh(this._logger,"trackPageView"),this._pageTracking.action=function(t,e,i,n,o){ou.isNullOrUndefined(n)&&(n={}),n[Th]=i.toString();var a={name:t,uri:e,properties:n,measurements:o};r.sendPageViewInternal(a)};var s,l,u=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var c=window.onerror;window.onerror=function(t,e,i,r,n){var o=c&&c(t,e,i,r,n);return!0!==o&&u._onerror({message:t,url:e,lineNumber:i,columnNumber:r,error:n}),o},this.config.autoExceptionInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&"object"==typeof history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState&&"object"==typeof window&&"undefined"!=typeof Event){var p=this;i.forEach((function(t){t.identifier===mh&&(r._properties=t)})),history.pushState=(l=history.pushState,function(){var t=l.apply(this,arguments);return window.dispatchEvent(Oc.createDomEvent(p.config.namePrefix+"pushState")),window.dispatchEvent(Oc.createDomEvent(p.config.namePrefix+"locationchange")),t}
2),history.replaceState=(s=history.replaceState,function(){var t=s.apply(this,arguments);return window.dispatchEvent(Oc.createDomEvent(p.config.namePrefix+"replaceState")),window.dispatchEvent(Oc.createDomEvent(p.config.namePrefix+"locationchange")),t}),window.addEventListener(p.config.namePrefix+"popstate",(function(){window.dispatchEvent(Oc.createDomEvent(p.config.namePrefix+"locationchange"))})),window.addEventListener(p.config.namePrefix+"locationchange",(function(){p._properties&&p._properties.context&&p._properties.context.telemetryTrace&&(p._properties.context.telemetryTrace.traceID=Oc.generateW3CId(),p._properties.context.telemetryTrace.name=window.location&&window.location.pathname||"_unknown_"),r._currUri&&(r._prevUri=r._currUri),r._currUri=window.location&&window.location.href||"",setTimeout(function(t){p.trackPageView({refUri:t,properties:{duration:0}})}.bind(r,r._prevUri),p.autoRoutePVDelay)}))}this._isInitialized=!0}},Ih.prototype.trackPageVisitTime=function(t,e,i){var r={PageName:t,PageUrl:e};this.trackMetric({name:"PageVisitTime",average:i,max:i,min:i,sampleCount:1},r)},Ih.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var e=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===Vp.dataType){var i=t.baseData;if(i)for(var r=0;r<e.length;r++)if(i.target&&0<=i.target.indexOf(e[r]))return!1}return!0}))}},Ih.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},Ih.prototype._sendCORSException=function(t){var e={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:t,lineNumber:0,columnNumber:0,error:void 0},i=ch.create(e,dp.dataType,dp.envelopeType,this._logger,{url:t});this.core.track(i)},Ih.Version="2.2.2",Ih);function Ih(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this._prevUri="object"==typeof window&&window.location&&window.location.href||"",this.initialize=this._initialize.bind(this)}var Eh=(Mh.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(su.WARNING,fc,"start was called more than once for this event without calling stop.",{name:this._name,key:t},!0),this._events[t]=+new Date},Mh.prototype.stop=function(t,e,i,r){var n=this._events[t];if(isNaN(n))this._logger.throwInternal(su.WARNING,mc,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var o=+new Date,a=qc.GetDuration(n,o);this.action(t,e,a,i,r)}delete this._events[t],this._events[t]=void 0},Mh);function Mh(t,e){this._name=e,this._events={},this._logger=t}var Ah=(Lh.prototype.enqueue=function(t){this._buffer.push(t)},Lh.prototype.count=function(){return this._buffer.length},Lh.prototype.clear=function(){this._buffer.length=0},Lh.prototype.getItems=function(){return this._buffer.slice(0)},Lh.prototype.batchPayloads=function(t){return t&&0<t.length?this._config.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},Lh.prototype.markAsSent=function(t){this.clear()},Lh.prototype.clearSent=function(t){},Lh);function Lh(t){this._config=t,this._buffer=[]}var kh=(Ph.prototype.enqueue=function(t){this._buffer.length>=Ph.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(su.WARNING,vc,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(t),this.setBuffer(Ph.BUFFER_KEY,this._buffer))},Ph.prototype.count=function(){return this._buffer.length},Ph.prototype.clear=function(){this._buffer.length=0,this.setBuffer(Ph.BUFFER_KEY,[]),this.setBuffer(Ph.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},Ph.prototype.getItems=function(){return this._buffer.slice(0)},Ph.prototype.batchPayloads=function(t){return t&&0<t.length?this._config.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},Ph.prototype.markAsSent=function(t){this._buffer=this.removePayloadsFromBuffer(t,this._buffer),this.setBuffer(Ph.BUFFER_KEY,this._buffer);var e=this.getBuffer(Ph.SENT_BUFFER_KEY);e instanceof Array&&t instanceof Array&&((e=e.concat(t)).length>Ph.MAX_BUFFER_SIZE&&(this._logger.throwInternal(su.CRITICAL,vc,"Sent buffer reached its maximum size: "+e.length,!0),e.length=Ph.MAX_BUFFER_SIZE),this.setBuffer(Ph.SENT_BUFFER_KEY,e))},Ph.prototype.clearSent=function(t){var e=this.getBuffer(Ph.SENT_BUFFER_KEY);e=this.removePayloadsFromBuffer(t,e),this.setBuffer(Ph.SENT_BUFFER_KEY,e)},Ph.prototype.removePayloadsFromBuffer=function(t,e){var i=[];for(var r in e){var n=!1;for(var o in t)if(t[o]===e[r]){n=!0;break}n||i.push(e[r])}return i},Ph.prototype.getBuffer=function(t){var e=t;try{e=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+e:e;var i=Oc.getSessionStorage(this._logger,e);if(i){var r=JSON.parse(i);if(r)return r}}catch(t){this._logger.throwInternal(su.CRITICAL,Qu," storage key: "+e+", "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}return[]},Ph.prototype.setBuffer=function(t,e){var i=t;
2try{i=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+i:i;var r=JSON.stringify(e);Oc.setSessionStorage(this._logger,i,r)}catch(t){Oc.setSessionStorage(this._logger,i,JSON.stringify([])),this._logger.throwInternal(su.WARNING,Ju," storage key: "+i+", "+Oc.getExceptionName(t)+". Buffer cleared",{exception:Oc.dump(t)})}},Ph.BUFFER_KEY="AI_buffer",Ph.SENT_BUFFER_KEY="AI_sentBuffer",Ph.MAX_BUFFER_SIZE=2e3,Ph);function Ph(t,e){this._bufferFullMessageSent=!1,this._logger=t,this._config=e;var i=this.getBuffer(Ph.BUFFER_KEY),r=this.getBuffer(Ph.SENT_BUFFER_KEY);this._buffer=i.concat(r),this._buffer.length>Ph.MAX_BUFFER_SIZE&&(this._buffer.length=Ph.MAX_BUFFER_SIZE),this.setBuffer(Ph.SENT_BUFFER_KEY,[]),this.setBuffer(Ph.BUFFER_KEY,this._buffer)}var Dh=(zh.extractProperties=function(t){var e=null;for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];"number"!=typeof r&&((e=e||{})[i]=r)}return e},zh.extractPropsAndMeasurements=function(t,e,i){if(!ou.isNullOrUndefined(t))for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];"number"==typeof n?i[r]=n:e[r]="string"==typeof n?n:JSON.stringify(n)}},zh.createEnvelope=function(t,e,i,r){var n=new Qc(t,r,e);n.iKey=i.iKey;var o=i.iKey.replace(/-/g,"");return n.name=n.name.replace("{0}",o),zh.extractPartAExtensions(i,n),i.tags||(i.tags=[]),n},zh.extractPartAExtensions=function(t,e){if(e.tags||(e.tags={}),t.ext||(t.ext={}),t.tags||(t.tags=[]),t.ext.user){t.ext.user.authId&&(e.tags[fh.userAuthUserId]=t.ext.user.authId);var i=t.ext.user.id||t.ext.user.localId;i&&(e.tags[fh.userId]=i)}if(t.ext.app&&t.ext.app.sesId&&(e.tags[fh.sessionId]=t.ext.app.sesId),t.ext.device&&((t.ext.device.id||t.ext.device.localId)&&(e.tags[fh.deviceId]=t.ext.device.id||t.ext.device.localId),t.ext.device.deviceClass&&(e.tags[fh.deviceType]=t.ext.device.deviceClass),t.ext.device.ip&&(e.tags[fh.deviceIp]=t.ext.device.ip)),t.ext.web){var r=t.ext.web;r.browserLang&&(e.tags[fh.deviceLanguage]=r.browserLang),r.browserVer&&(e.tags[fh.deviceBrowserVersion]=r.browserVer),r.browser&&(e.tags[fh.deviceBrowser]=r.browser),e.data=e.data||{},e.data.baseData=e.data.baseData||{},e.data.baseData.properties=e.data.baseData.properties||{},r.domain&&(e.data.baseData.properties.domain=r.domain),r.isManual&&(e.data.baseData.properties.isManual=r.isManual.toString()),r.screenRes&&(e.data.baseData.properties.screenRes=r.screenRes),r.userConsent&&(e.data.baseData.properties.userConsent=r.userConsent.toString())}t.ext.device&&t.ext.device.model&&(e.tags[fh.deviceModel]=t.ext.device.model),t.ext.os&&t.ext.os.name&&(e.tags[fh.deviceOS]=t.ext.os.name),t.ext.device&&t.ext.device.deviceType&&(e.tags[fh.deviceType]=t.ext.device.deviceType),t.ext.trace&&(t.ext.trace.parentID&&(e.tags[fh.operationParentId]=t.ext.trace.parentID),t.ext.trace.name&&(e.tags[fh.operationName]=t.ext.trace.name),t.ext.trace.traceID&&(e.tags[fh.operationId]=t.ext.trace.traceID));for(var n={},o=function(e){var i=t.tags[e];
2Object.keys(i).forEach((function(t){n[t]=i[t]})),t.tags.splice(e,1)},a=t.tags.length-1;0<=a;a--)o(a);for(var s in t.tags)n[s]=t.tags[s];e.tags=S({},e.tags,n),e.tags[fh.internalSdkVersion]||(e.tags[fh.internalSdkVersion]="javascript:"+zh.Version)},zh.Version="2.2.2",zh);function zh(){}var Oh,Nh=(w(Rh,Oh=Dh),Rh.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i=e.baseData.measurements||{},r=e.baseData.properties||{};Dh.extractPropsAndMeasurements(e.data,r,i);var n=e.baseData;if(ou.isNullOrUndefined(n))return t.warnToConsole("Invalid input for dependency data"),null;var o=n.id,a=n.target,s=n.name,l=n.duration,u=n.success,c=n.responseCode,p=n.type,h=n.correlationContext,d=n.properties&&n.properties[Yc]?n.properties[Yc]:"GET",f=new Vp(t,o,a,s,l,u,c,d,p,h,r,i),m=new oh(Vp.dataType,f);return Dh.createEnvelope(t,Vp.envelopeType,e,m)},Rh.DependencyEnvelopeCreator=new Rh,Rh);function Rh(){return null!==Oh&&Oh.apply(this,arguments)||this}var Bh,jh=(w(Fh,Bh=Dh),Fh.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i={},r={};e.baseType!==op.dataType&&(i.baseTypeSource=e.baseType),e.baseType===op.dataType?(i=e.baseData.properties||{},r=e.baseData.measurements||{}):e.baseData&&Dh.extractPropsAndMeasurements(e.baseData,i,r),Dh.extractPropsAndMeasurements(e.data,i,r);var n=e.baseData.name,o=new op(t,n,i,r),a=new oh(op.dataType,o);return Dh.createEnvelope(t,op.envelopeType,e,a)},Fh.EventEnvelopeCreator=new Fh,Fh);function Fh(){return null!==Bh&&Bh.apply(this,arguments)||this}var Uh,Vh=(w(qh,Uh=Dh),qh.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i=e.baseData,r=dp.CreateFromInterface(t,i),n=new oh(dp.dataType,r);return Dh.createEnvelope(t,dp.envelopeType,e,n)},qh.ExceptionEnvelopeCreator=new qh,qh);function qh(){return null!==Uh&&Uh.apply(this,arguments)||this}var Gh,Zh=(w(Hh,Gh=Dh),Hh.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i=e.baseData.properties||{},r=Dh.extractProperties(e.data);r=S({},i,r);var n=e.baseData.name,o=e.baseData.average,a=e.baseData.sampleCount,s=e.baseData.min,l=e.baseData.max,u=new Lp(t,n,o,a,s,l,r),c=new oh(Lp.dataType,u);return Dh.createEnvelope(t,Lp.envelopeType,e,c)},Hh.MetricEnvelopeCreator=new Hh,Hh);function Hh(){return null!==Gh&&Gh.apply(this,arguments)||this}var Wh,Yh=(w(Kh,Wh=Dh),Kh.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i=void 0;ou.isNullOrUndefined(e.baseData)||ou.isNullOrUndefined(e.baseData.properties)||ou.isNullOrUndefined(e.baseData.properties.duration)?ou.isNullOrUndefined(e.data)||ou.isNullOrUndefined(e.data.duration)||(i=e.data.duration,delete e.data.duration):(i=e.baseData.properties.duration,delete e.baseData.properties.duration);var r,n=e.baseData;e.ext&&e.ext.trace&&e.ext.trace.traceID&&(r=e.ext.trace.traceID);var o=n.id||r,a=n.name,s=n.uri,l=n.properties||{},u=n.measurements||{};if(ou.isNullOrUndefined(n.refUri)||(l.refUri=n.refUri),ou.isNullOrUndefined(n.pageType)||(l.pageType=n.pageType),ou.isNullOrUndefined(n.isLoggedIn)||(l.isLoggedIn=n.isLoggedIn.toString()),!ou.isNullOrUndefined(n.properties)){var c=n.properties;for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])}Dh.extractPropsAndMeasurements(e.data,l,u);var h=new Np(t,a,s,i,l,u,o),d=new oh(Np.dataType,h);return Dh.createEnvelope(t,Np.envelopeType,e,d)},Kh.PageViewEnvelopeCreator=new Kh,Kh);function Kh(){return null!==Wh&&Wh.apply(this,arguments)||this}var Xh,Jh=(w(Qh,Xh=Dh),Qh.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i=e.baseData,r=i.name,n=i.uri||i.url,o=i.properties||{},a=i.measurements||{};Dh.extractPropsAndMeasurements(e.data,o,a);var s=new th(t,r,n,void 0,o,a,i),l=new oh(th.dataType,s);return Dh.createEnvelope(t,th.envelopeType,e,l)},Qh.PageViewPerformanceEnvelopeCreator=new Qh,Qh);function Qh(){return null!==Xh&&Xh.apply(this,arguments)||this}var $h,td=(w(ed,$h=Dh),ed.prototype.Create=function(t,e){this._logger=t,ou.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(su.CRITICAL,ec,"telemetryItem.baseData cannot be null.");var i=e.baseData.message,r=e.baseData.severityLevel,n=Dh.extractProperties(e.data),o=S({},n,e.baseData.properties),a=new Yp(t,i,r,o),s=new oh(Yp.dataType,a);return Dh.createEnvelope(t,Yp.envelopeType,e,s)},ed.TraceEnvelopeCreator=new ed,ed);function ed(){return null!==$h&&$h.apply(this,arguments)||this}var id=(rd.prototype.serialize=function(t){var e=this._serializeObject(t,"root");return JSON.stringify(e)},rd.prototype._serializeObject=function(t,e){var i="__aiCircularRefCheck",r={};if(!t)return this._logger.throwInternal(su.CRITICAL,rc,"cannot serialize object because it is null or undefined",{name:e},!0),r;if(t[i])return this._logger.throwInternal(su.WARNING,oc,"Circular reference detected while serializing object",{name:e},!0),r;if(!t.aiDataContract){if("measurements"===e)r=this._serializeStringMap(t,"number",e);else if("properties"===e)r=this._serializeStringMap(t,"string",e);else if("tags"===e)r=this._serializeStringMap(t,"string",e);else if(Oc.isArray(t))r=this._serializeArray(t,e);else{this._logger.throwInternal(su.WARNING,nc,"Attempting to serialize an object which does not implement ISerializable",{name:e},!0);try{JSON.stringify(t),r=t}catch(t){this._logger.throwInternal(su.CRITICAL,rc,t&&"function"==typeof t.toString?t.toString():"Error serializing object",null,!0)}}return r}for(var n in t[i]=!0,t.aiDataContract){var o,a=t.aiDataContract[n],s="function"==typeof a?a()&Jl.Required:a&Jl.Required,l="function"==typeof a?a()&Jl.Hidden:a&Jl.Hidden,u=a&Jl.Array,c=void 0!==t[n],p="object"==typeof t[n]&&null!==t[n];!s||c||u?l||void 0!==(o=p?u?this._serializeArray(t[n],n):this._serializeObject(t[n],n):t[n])&&(r[n]=o):this._logger.throwInternal(su.CRITICAL,Ou,"Missing required field specification. The field is required but not present on source",{field:n,name:e})}return delete t[i],r},rd.prototype._serializeArray=function(t,e){var i=void 0;if(t)if(Oc.isArray(t)){i=[];for(var r=0;r<t.length;r++){var n=t[r],o=this._serializeObject(n,e+"["+r+"]");i.push(o)}}else this._logger.throwInternal(su.CRITICAL,sc,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:e},!0);return i}
2,rd.prototype._serializeStringMap=function(t,e,i){var r=void 0;if(t)for(var n in r={},t){var o=t[n];if("string"===e)void 0===o?r[n]="undefined":null===o?r[n]="null":o.toString?r[n]=o.toString():r[n]="invalid field: toString() is not defined.";else if("number"===e)if(void 0===o)r[n]="undefined";else if(null===o)r[n]="null";else{var a=parseFloat(o);isNaN(a)?r[n]="NaN":r[n]=a}else r[n]="invalid field: "+i+" is of unknown type.",this._logger.throwInternal(su.CRITICAL,r[n],null,!0)}return r},rd);function rd(t){this._logger=t}function nd(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(t){this.isListening=!1}}var od=(nd.prototype._setOnline=function(){this._onlineStatus=!0},nd.prototype._setOffline=function(){this._onlineStatus=!1},nd.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!(navigator&&!ou.isNullOrUndefined(navigator.onLine))||navigator.onLine},nd.prototype.isOffline=function(){return!this.isOnline()},nd.Offline=new nd,nd).Offline,ad=(sd.prototype.getHashCodeScore=function(t){return this.getHashCode(t)/sd.INT_MAX_VALUE*100},sd.prototype.getHashCode=function(t){if(""==t)return 0;for(;t.length<sd.MIN_INPUT_LENGTH;)t=t.concat(t);for(var e=5381,i=0;i<t.length;++i)e=(e<<5)+e+t.charCodeAt(i),e&=e;return Math.abs(e)},sd.INT_MAX_VALUE=2147483647,sd.MIN_INPUT_LENGTH=8,sd);function sd(){}var ld=(ud.prototype.getSamplingScore=function(t){return t.tags&&t.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.userId]):t.ext&&t.ext.user&&t.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(t.ext.user.id):t.tags&&t.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.operationId]):t.ext&&t.ext.telemetryTrace&&t.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(t.ext.telemetryTrace.traceID):100*Math.random()},ud);function ud(){this.hashCodeGeneragor=new ad,this.keys=new uh}var cd=(pd.prototype.isSampledIn=function(t){var e=this.sampleRate;return null==e||100<=e||t.baseType===Lp.dataType||this.samplingScoreGenerator.getSamplingScore(t)<e},pd);function pd(t,e){this.INT_MAX_VALUE=2147483647,ou.isNullOrUndefined(e)?this._logger=new Cc:this._logger=e,(100<t||t<0)&&(this._logger.throwInternal(su.WARNING,pc,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new ld}var hd=(dd.prototype.pause=function(){throw new Error("Method not implemented.")},dd.prototype.resume=function(){throw new Error("Method not implemented.")},dd.prototype.flush=function(){try{this.triggerSend()}catch(t){this._logger.throwInternal(su.CRITICAL,Du,"flush failed, telemetry will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},dd.prototype.onunloadFlush=function(){if(!1!==this._config.onunloadDisableBeacon()&&!1!==this._config.isBeaconApiDisabled()||!Oc.IsBeaconApiSupported())this.flush();else try{this.triggerSend(!0,this._beaconSender)}catch(t){this._logger.throwInternal(su.CRITICAL,Pu,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},dd.prototype.teardown=function(){throw new Error("Method not implemented.")},dd.prototype.initialize=function(t,e,i){var r=this;this._logger=e.logger,this._serializer=new id(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var n=dd._getDefaultAppInsightsChannelConfig();function o(e){a._config[e]=function(){return sh.getConfig(t,e,r.identifier,n[e]())}}this._config=dd._getEmptyAppInsightsChannelConfig();var a=this;for(var s in n)o(s);this._buffer=this._config.enableSessionStorageBuffer&&Oc.canUseSessionStorage()?new kh(this._logger,this._config):new Ah(this._config),this._sample=ne
2w cd(this._config.samplingPercentage(),this._logger),!this._config.isBeaconApiDisabled()&&Oc.IsBeaconApiSupported()?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},dd.prototype.processTelemetry=function(t){var e=this;try{if(this._config.disableTelemetry())return;if(!t)return void this._logger.throwInternal(su.CRITICAL,_u,"Cannot send empty telemetry");if(t.baseData&&!t.baseType)return void this._logger.throwInternal(su.CRITICAL,bc,"Cannot send telemetry without baseData and baseType");if(t.baseType||(t.baseType="EventData"),!this._sender)return void this._logger.throwInternal(su.CRITICAL,ju,"Sender was not initialized");if(!this._isSampledIn(t))return void this._logger.throwInternal(su.WARNING,Gu,"Telemetry item was sampled out and not sent",{SampleRate:this._sample.sampleRate});t.tags=t.tags||{},t.tags.sampleRate=this._sample.sampleRate;var i=dd.constructEnvelope(t,this._config.instrumentationKey(),this._logger);if(!i)return void this._logger.throwInternal(su.CRITICAL,ic,"Unable to create an AppInsights envelope");var r=!1;if(t.tags&&t.tags[Wc]&&(t.tags[Wc].forEach((function(t){try{t&&!1===t(i)&&(r=!0,e._logger.warnToConsole("Telemetry processor check returns false"))}catch(t){e._logger.throwInternal(su.CRITICAL,gc,"One of telemetry initializers failed, telemetry item will not be sent: "+Oc.getExceptionName(t),{exception:Oc.dump(t)},!0)}})),delete t.tags[Wc]),r)return;var n=this._serializer.serialize(i),o=this._buffer.getItems(),a=this._buffer.batchPayloads(o);a&&a.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(t){this._logger.throwInternal(su.WARNING,Tu,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}ou.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t)},dd.prototype.setNextPlugin=function(t){this._nextPlugin=t},dd.prototype._xhrReadyStateChange=function(t,e,i){if(4===t.readyState){var r=null;this._appId||(r=this._parseResponse(t.responseText||t.response))&&r.appId&&(this._appId=r.appId),(t.status<200||300<=t.status)&&0!==t.status?!this._config.isRetryDisabled()&&this._isRetriable(t.status)?(this._resendPayload(e),this._logger.throwInternal(su.WARNING,Xu,". Response code "+t.status+". Will retry to send "+e.length+" items.")):this._onError(e,this._formatErrorMessageXhr(t)):od.isOffline()?this._config.isRetryDisabled()||(this._resendPayload(e,10),this._logger.throwInternal(su.WARNING,Xu,". Offline - Response Code: "+t.status+". Offline status: "+od.isOffline()+". Will retry to send "+e.length+" items.")):206===t.status?(r=r||this._parseResponse(t.responseText||t.response))&&!this._config.isRetryDisabled()?this._onPartialSuccess(e,r):this._onError(e,this._formatErrorMessageXhr(t)):(this._consecutiveErrors=0,this._onSuccess(e,i))}},dd.prototype.triggerSend=function(t,e){void 0===t&&(t=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var i=this._buffer.getItems();e?e.call(this,i,t):this._sender(i,t)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(t){(!Oc.getIEVersion()||9<Oc.getIEVersion())&&this._logger.throwInternal(su.CRITICAL,Xu,"Telemetry transmission failed, some telemetry will be lost: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}},dd.prototype._onError=function(t,e,i){this._logger.throwInternal(su.WARNING,Ru,"Failed to send telemetry.",{message:e}),this._buffer.clearSent(t)},dd.prototype._onPartialSuccess=function(t,e){for(var i=[],r=[],n=0,o=e.errors.reverse();n<o.length;n++){var a=o[n],s=t.splice(a.index,1)[0];this._isRetriable(a.statusCode)?r.push(s):i.push(s)}0<t.length&&this._onSuccess(t,e.itemsAccepted),0<i.length&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",e.itemsAccepted,"of",e.itemsReceived].join(" "))),0<r.length&&(this._resendPayload(r),this._logger.throwInternal(su.WARNING,Xu,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+e.itemsReceived+" items"))},dd.prototype._onSuccess=function(t,e){this._buffer.clearSent(t)},dd.prototype._xdrOnLoad=function(t,e){if(!t||t.responseText+""!="200"&&""!==t.responseText){var i=this._parseResponse(t.responseText);i&&i.itemsReceived&&i.itemsReceived>i.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(e,i):this._onError(e,this._formatErrorMessageXdr(t))}else this._consecutiveErrors=0,this._onSuccess(e,0)}
2,dd.constructEnvelope=function(t,e,i){var r;switch((r=e===t.iKey||ou.isNullOrUndefined(e)?t:S({},t,{iKey:e})).baseType){case op.dataType:return jh.EventEnvelopeCreator.Create(i,r);case Yp.dataType:return td.TraceEnvelopeCreator.Create(i,r);case Np.dataType:return Yh.PageViewEnvelopeCreator.Create(i,r);case th.dataType:return Jh.PageViewPerformanceEnvelopeCreator.Create(i,r);case dp.dataType:return Vh.ExceptionEnvelopeCreator.Create(i,r);case Lp.dataType:return Zh.MetricEnvelopeCreator.Create(i,r);case Vp.dataType:return Nh.DependencyEnvelopeCreator.Create(i,r);default:return jh.EventEnvelopeCreator.Create(i,r)}},dd._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},dd._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},dd.prototype._isSampledIn=function(t){return this._sample.isSampledIn(t)},dd.prototype._beaconSender=function(t,e){var i=this._config.endpointUrl(),r=this._buffer.batchPayloads(t),n=new Blob([r],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(i,n)?(this._buffer.markAsSent(t),this._onSuccess(t,t.length)):(this._xhrSender(t,!0),this._logger.throwInternal(su.WARNING,Xu,". Failed to send telemetry with Beacon API, retried with xhrSender."))},dd.prototype._xhrSender=function(t,e){var i=this,r=new XMLHttpRequest;r[Hc]=!0,r.open("POST",this._config.endpointUrl(),e),r.setRequestHeader("Content-type","application/json"),Oc.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&r.setRequestHeader(kc.sdkContextHeader,kc.sdkContextHeaderAppIdRequest),r.onreadystatechange=function(){return i._xhrReadyStateChange(r,t,t.length)},r.onerror=function(e){return i._onError(t,i._formatErrorMessageXhr(r),e)};var n=this._buffer.batchPayloads(t);r.send(n),this._buffer.markAsSent(t)},dd.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(su.CRITICAL,$u,"Cannot parse the response. "+Oc.getExceptionName(e),{response:t})}return null},dd.prototype._resendPayload=function(t,e){if(void 0===e&&(e=1),t&&0!==t.length){this._buffer.clearSent(t),this._consecutiveErrors++;for(var i=0,r=t;i<r.length;i++){var n=r[i];this._buffer.enqueue(n)}this._setRetryTime(e),this._setupTimer()}},dd.prototype._setRetryTime=function(t){var e;if(this._consecutiveErrors<=1)e=10;else{var i=(Math.pow(2,this._consecutiveErrors)-1)/2,r=Math.floor(Math.random()*i*10)+1;
2r*=t,e=Math.max(Math.min(r,3600),10)}var n=Date.now()+1e3*e;this._retryAt=n},dd.prototype._setupTimer=function(){var t=this;if(!this._timeoutHandle){var e=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,i=Math.max(this._config.maxBatchInterval(),e);this._timeoutHandle=setTimeout((function(){t.triggerSend()}),i)}},dd.prototype._isRetriable=function(t){return 408==t||429==t||500==t||503==t},dd.prototype._formatErrorMessageXhr=function(t,e){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+t.responseText||0:e},dd.prototype._xdrSender=function(t,e){var i=this,r=new XDomainRequest;r.onload=function(){return i._xdrOnLoad(r,t)},r.onerror=function(e){return i._onError(t,i._formatErrorMessageXdr(r),e)};var n=window.location&&window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(n,0))return this._logger.throwInternal(su.WARNING,Xu,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");r.open("POST",o);var a=this._buffer.batchPayloads(t);r.send(a),this._buffer.markAsSent(t)},dd.prototype._formatErrorMessageXdr=function(t,e){return t?"XDomainRequest,Response:"+t.responseText||0:e},dd);function dd(){this.priority=1001,this.identifier=gh,this._XMLHttpRequestSupported=!1}var fd=function(){},md=(gd.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var t=qc.Now(),e=t-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=t-this.automaticSession.renewalDate>this.config.sessionRenewalMs();e||i?this.renew():(!this.cookieUpdatedTimestamp||t-this.cookieUpdatedTimestamp>gd.cookieUpdateInterval)&&(this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},gd.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},gd.prototype.initializeAutomaticSession=function(){var t=Oc.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var e=Oc.getStorage(this._logger,this._storageNamePrefix());e&&this.initializeAutomaticSessionWithData(e)}this.automaticSession.id||this.renew()},gd.prototype.initializeAutomaticSessionWithData=function(t){var e=t.split("|");0<e.length&&(this.automaticSession.id=e[0]);try{if(1<e.length){var i=+e[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<e.length){var r=+e[2];this.automaticSession.renewalDate=+new Date(r),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(t){this._logger.throwInternal(su.CRITICAL,bu,"Error parsing ai_session cookie, session will be reset: "+Oc.getExceptionName(t),{exception:Oc.dump(t)})}0==this.automaticSession.renewalDate&&this._logger.throwInternal(su.WARNING,Bu,"AI session renewal date is 0, session will be reset.")},gd.prototype.renew=function(){var t=qc.Now();this.automaticSession.id=Oc.newId(),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),Oc.canUseLocalStorage()||this._logger.throwInternal(su.WARNING,hu,"Browser does not support local storage. Session durations will be inaccurate.")},gd.prototype.setCookie=function(t,e,i){var r=e+this.config.sessionExpirationMs(),n=i+this.config.sessionRenewalMs(),o=new Date,a=[t,e,i];r<n?o.setTime(r):o.setTime(n);var s=this.config.cookieDomain?this.config.cookieDomain():null;Oc.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+o.toUTCString(),s),this.cookieUpdatedTimestamp=qc.Now()},gd.prototype.setStorage=function(t,e,i){Oc.setStorage(this._logger,this._storageNamePrefix(),[t,e,i].join("|"))},gd.acquisitionSpan=864e5,gd.renewalSpan=18e5,gd.cookieUpdateInterval=6e4,gd.cookieNameConst="ai_session",gd);function gd(t,e){var i=this;ou.isNullOrUndefined(e)?this._logger=new Cc:this._logger=e,"function"!=typeof(t=t||{}).sessionExpirationMs&&(t.sessionExpirationMs=function(){return gd.acquisitionSpan}),"function"!=typeof t.sessionRenewalMs&&(t.sessionRenewalMs=function(){return gd.renewalSpan}),this.config=t,this._storageNamePrefix=function(){return i.config.namePrefix&&i.c
2onfig.namePrefix()?gd.cookieNameConst+i.config.namePrefix():gd.cookieNameConst},this.automaticSession=new fd}var yd=function(){},vd=function(){this.id="browser",this.deviceClass="Browser"},_d=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.2.2"},xd=(bd.prototype.setAuthenticatedUserContext=function(t,e,i){if(void 0===i&&(i=!1),!this.validateUserInput(t)||e&&!this.validateUserInput(e))this._logger.throwInternal(su.WARNING,hc,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=t;var r=this.authenticatedId;e&&(this.accountId=e,r=[this.authenticatedId,this.accountId].join(bd.cookieSeparator)),i&&Oc.setCookie(this._logger,bd.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},bd.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,Oc.deleteCookie(this._logger,bd.authUserCookieName)},bd.prototype.validateUserInput=function(t){return!("string"!=typeof t||!t||t.match(/,|;|=| |\|/))},bd.cookieSeparator="|",bd.userCookieName="ai_user",bd.authUserCookieName="ai_authUser",bd);function bd(t,e){this._logger=e;var i=Oc.getCookie(this._logger,bd.userCookieName);if(i){var r=i.split(bd.cookieSeparator);0<r.length&&(this.id=r[0])}if(this.config=t,!this.id){this.id=Oc.newId();var n=new Date,o=Oc.toISOStringForIE8(n);this.accountAcquisitionDate=o,n.setTime(n.getTime()+31536e6);var a=[this.id,o],s=this.config.cookieDomain?this.config.cookieDomain():void 0;Oc.setCookie(this._logger,bd.userCookieName,a.join(bd.cookieSeparator)+";expires="+n.toUTCString(),s);var l=t.namePrefix&&t.namePrefix()?t.namePrefix()+"ai_session":"ai_session";Oc.removeStorage(this._logger,l)}this.accountId=t.accountId?t.accountId():void 0;var u=Oc.getCookie(this._logger,bd.authUserCookieName);if(u){var c=(u=decodeURI(u)).split(bd.cookieSeparator);c[0]&&(this.authenticatedId=c[0]),1<c.length&&c[1]&&(this.accountId=c[1])}}var wd=function(){},Sd=function(t,e,i){this.traceID=t||Oc.generateW3CId(),this.parentID=e,this.name=i,window&&window.location&&window.location.pathname&&(this.name=window.location.pathname)},Td=(Cd.prototype.applySessionContext=function(t){var e=this.session||this.sessionManager.automaticSession;e&&"string"==typeof e.id&&(t.ext.app.sesId=e.id),this.session&&("string"==typeof this.session.id?t.ext.app.sesId=this.session.id:t.ext.app.sesId=this.sessionManager.automaticSession.id)},Cd.prototype.applyOperatingSystemContxt=function(t){this.os&&this.os.name&&(t.ext.os=this.os)},Cd.prototype.applyApplicationContext=function(t){this.application&&("string"==typeof this.application.ver&&(t.tags[fh.applicationVersion]=this.application.ver),"string"==typeof this.application.build&&(t.tags[fh.applicationBuild]=this.application.build))},Cd.prototype.applyDeviceContext=function(t){this.device&&("string"==typeof this.device.id&&(t.ext.device.localId=this.device.id),"string"==typeof this.device.ip&&(t.ext.device.ip=this.device.ip),"string"==typeof this.device.model&&(t.ext.device.model=this.device.model),"string"==typeof this.device.deviceClass&&(t.ext.device.deviceClass=this.device.deviceClass))},Cd.prototype.applyInternalContext=function(t){this.internal&&("string"==typeof this.internal.agentVersion&&(t.tags[fh.internalAgentVersion]=this.internal.agentVersion),"string"==typeof this.internal.sdkVersion&&(t.tags[fh.internalSdkVersion]=this.internal.sdkVersion))},Cd.prototype.applyLocationContext=function(t){this.location&&"string"==typeof this.location.ip&&(t.tags[fh.locationIp]=this.location.ip)},Cd.prototype.applyOperationContext=function(t){if(this.telemetryTrace){var e=t.ext.trace||{traceID:void 0,parentID:void 0};"string"==typeof this.telemetryTrace.traceID&&(e.traceID=this.telemetryTrace.traceID),"string"==typeof this.telemetryTrace.name&&(e.name=this.telemetryTrace.name),"string"==typeof this.telemetryTrace.parentID&&(e.parentID=this.telemetryTrace.parentID),t.ext.trace=e}},Cd.prototype.applyWebContext=function(t){this.web&&(t.ext.web=t.ext.web||{}
2,t.ext.web=this.web)},Cd.prototype.applyUserContext=function(t){this.user&&(t.tags||(t.tags=[]),"string"==typeof this.user.accountId&&(t.tags[fh.userAccountId]=this.user.accountId),"string"==typeof this.user.id&&(t.ext.user.id=this.user.id),"string"==typeof this.user.authenticatedId&&(t.ext.user.authId=this.user.authenticatedId))},Cd.prototype.cleanUp=function(t){t.ext[hh.DeviceExt]&&0===Object.keys(t.ext[hh.DeviceExt]).length&&delete t.ext[hh.DeviceExt],t.ext[hh.UserExt]&&0===Object.keys(t.ext[hh.UserExt]).length&&delete t.ext[hh.UserExt],t.ext[hh.WebExt]&&0===Object.keys(t.ext[hh.WebExt]).length&&delete t.ext[hh.WebExt],t.ext[hh.OSExt]&&0===Object.keys(t.ext[hh.OSExt]).length&&delete t.ext[hh.OSExt],t.ext[hh.AppExt]&&0===Object.keys(t.ext[hh.AppExt]).length&&delete t.ext[hh.AppExt],t.ext[hh.TraceExt]&&0===Object.keys(t.ext[hh.TraceExt]).length&&delete t.ext[hh.TraceExt]},Cd);function Cd(t,e){"undefined"!=typeof window&&(this.sessionManager=new md(e,t),this.application=new yd,this.device=new vd,this.internal=new _d(e),this.location=new wd,this.user=new xd(e,t),this.telemetryTrace=new Sd,this.session=new fd),this.appId=function(){return null}}var Id=(Ed.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){}}},Ed.prototype.initialize=function(t,e,i){var r=this,n=Ed.getDefaultConfig();function o(e){a._extensionConfig[e]=function(){return sh.getConfig(t,e,r.identifier,n[e]())}}this._extensionConfig=this._extensionConfig||Ed.getDefaultConfig();var a=this;for(var s in n)o(s);this._logger=e.logger,this.context=new Td(e.logger,this._extensionConfig),this._breezeChannel=Oc.getExtension(i,gh),this.context.appId=function(){return r._breezeChannel?r._breezeChannel._appId:null}},Ed.prototype.processTelemetry=function(t){ou.isNullOrUndefined(t)||(t.name===Np.envelopeType&&this._logger.resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t),ou.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t))},Ed.prototype.setNextPlugin=function(t){this._nextPlugin=t},Ed.prototype._processTelemetryInternal=function(t){t.tags||(t.tags=[]),t.ext||(t.ext={}),t.ext[hh.DeviceExt]=t.ext[hh.DeviceExt]||{},t.ext[hh.WebExt]=t.ext[hh.WebExt]||{},t.ext[hh.UserExt]=t.ext[hh.UserExt]||{},t.ext[hh.OSExt]=t.ext[hh.OSExt]||{},t.ext[hh.AppExt]=t.ext[hh.AppExt]||{},t.ext[hh.TraceExt]=t.ext[hh.TraceExt]||{},this.context.applySessionContext(t),this.context.applyApplicationContext(t),this.context.applyDeviceContext(t),this.context.applyOperationContext(t),this.context.applyUserContext(t),this.context.applyOperatingSystemContxt(t),this.context.applyWebContext(t),this.context.applyLocationContext(t),this.context.applyInternalContext(t),this.context.cleanUp(t)},Ed);function Ed(){this.priority=110,this.identifier=mh}var Md=function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1},Ad=(Ld.prototype.getAbsoluteUrl=function(){return this.requestUrl?Rc.getAbsoluteUrl(this.requestUrl):null},Ld.prototype.getPathName=function(){return this.requestUrl?Dc.sanitizeUrl(this._logger,Rc.getCompleteUrl(this.method,this.requestUrl)):null},Ld);function Ld(t,e,i){this.completed=!1,this.requestHeadersSize=null,this.requestHeaders=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new Md,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*qc.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.traceID=t,this.spanID=e,this._logger=i}
2var kd=(Pd.AttachEvent=function(t,e,i){var r=!1;return ou.isNullOrUndefined(t)||(ou.isNullOrUndefined(t.attachEvent)?ou.isNullOrUndefined(t.addEventListener)||(t.addEventListener(e,i,!1),r=!0):(t.attachEvent("on"+e,i),r=!0)),r},Pd.DetachEvent=function(t,e,i){ou.isNullOrUndefined(t)||(ou.isNullOrUndefined(t.detachEvent)?ou.isNullOrUndefined(t.removeEventListener)||t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i))},Pd);function Pd(){}var Dd=(zd.isValidTraceId=function(t){return t.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==t},zd.isValidSpanId=function(t){return t.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==t},zd.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},zd.DEFAULT_TRACE_FLAG="00",zd.DEFAULT_VERSION="00",zd);function zd(t,e){this.traceFlag=zd.DEFAULT_TRACE_FLAG,this.version=zd.DEFAULT_VERSION,t&&zd.isValidTraceId(t)?this.traceId=t:this.traceId=Oc.generateW3CId(),e&&zd.isValidSpanId(e)?this.spanId=e:this.spanId=Oc.generateW3CId().substr(0,16)}var Od=(Nd.prototype.isMonitoredInstance=function(t,e,i,r){var n=!1,o=!0,a=!1;return void 0!==i?(a=this._fetchInitialized,n="object"==typeof i&&!0===i[Hc]||!!r&&!0===r[Hc]):void 0!==t&&(a=this.initialized,n=!0===t[Hc],o=!0===e||!ou.isNullOrUndefined(t.ajaxData)),a&&o&&!n},Nd.prototype.supportsAjaxMonitoring=function(){var t=!0;(ou.isNullOrUndefined(XMLHttpRequest)||ou.isNullOrUndefined(XMLHttpRequest.prototype)||ou.isNullOrUndefined(XMLHttpRequest.prototype.open)||ou.isNullOrUndefined(XMLHttpRequest.prototype.send)||ou.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(t=!1);try{" a ".trim()}catch(e){t=!1}return t},Nd.prototype.instrumentOpen=function(){var t=XMLHttpRequest.prototype.open,e=this;XMLHttpRequest.prototype.open=function(i,r,n){try{!e.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||e.openHandler(this,i,r,n)}catch(i){e._core.logger.throwInternal(su.CRITICAL,Eu,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(this),exception:Oc.dump(i)})}return t.apply(this,arguments)}},Nd.prototype.openHandler=function(t,e,i,r){var n=this._context&&this._context.telemetryTrace&&this._context.telemetryTrace.traceID||Oc.generateW3CId(),o=Oc.generateW3CId().substr(0,16),a=new Ad(n,o,this._core.logger);a.method=e,a.requestUrl=i,a.xhrMonitoringState.openDone=!0,a.requestHeaders={},t.ajaxData=a,this.attachToOnReadyStateChange(t)},Nd.getFailedAjaxDiagnosticsMessage=function(t){var e="";try{ou.isNullOrUndefined(t)||ou.isNullOrUndefined(t.ajaxData)||ou.isNullOrUndefined(t.ajaxData.requestUrl)||(e+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return e},Nd.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,e=this;XMLHttpRequest.prototype.send=function(i){try{e.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&e.sendHandler(this,i)}catch(i){e._core.logger.throwInternal(su.CRITICAL,Au,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(this),exception:Oc.dump(i)})}return t.apply(this,arguments)}},Nd.prototype.sendHandler=function(t,e){t.ajaxData.requestSentTime=qc.Now(),(t=this.includeCorrelationHeaders(t.ajaxData,void 0,void 0,t)).ajaxData.xhrMonitoringState.sendDone=!0},Nd.prototype.instrumentAbort=function(){var t=XMLHttpRequest.prototype.abort,e=this;XMLHttpRequest.prototype.abort=function(){try{e.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(t){e._core.logger.throwInternal(su.CRITICAL,Cu,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(this),exception:Oc.dump(t)})}return t.apply(this,arguments)}},Nd.prototype.instrumentSetRequestHeader=function(){if(this._config.enableRequestHeaderTracking){var t=XMLHttpRequest.prototype.setRequestHeader,e=this;XMLHttpRequest.prototype.setRequestHeader=function(i,r){try{e.isMonitoredInstance(this)&&(this.ajaxData.requestHeaders[i]=r)}catch(i){e._core.logger.throwInternal(su.CRITICAL,wc,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(this),exception:Oc.dump(i)})}return t.apply(this,arguments)}}},Nd.prototype.attachToOnReadyStateChange=function(t){var e=this;t.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=kd.AttachEvent(t,"readystatechange",(function(){try{e.isMonitoredInstance(t)&&4===t.readyState&&e.onAjaxComplete(t)}catch(r){var i=Oc.dump(r);i&&-1!=i.toLowerCase().indexOf("c00c023f")||e._core.logger.throwInternal(su.CRITICAL,Mu,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(t),exception:Oc.dump(r)})}}))},Nd.prototype.onAjaxComplete=function(t){if(t.ajaxData.responseFinishedTime=qc.Now(),t.ajaxData.status=t.status,t.ajaxData.CalculateMetrics(),t.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(su.WARNING,Iu,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(t),requestSentTime:t.ajaxData.requestSentTime,responseFinishedTime:t.ajaxData.responseFinishedTime});else{var e={id:"|"+t.ajaxData.traceID+"."+t.ajaxData.spanID,target:t.ajaxData.getAbsoluteUrl(),name:t.ajaxData.getPathName(),type:"Ajax",duration:t.ajaxData.ajaxTotalDuration,success:200<=+t.ajaxData.status&&+t.ajaxData.status<400,responseCode:+t.ajaxData.status,method:t.ajaxData.method},i=this.getAjaxCorrelationContext(t);if(i&&(e.correlationContext=i),this._config.enableRequestHeaderTracking&&0<Object.keys(t.ajaxData.requestHeaders).length&&(e.properties=e.properties||{},e.properties.requestHeaders={},e.properties.requestHeaders=t.ajaxData.requestHeaders),this._config.enableResponseHeaderTracking){var r=t.getAllResponseHeaders();if(r){var n=r.trim().split(/[\r\n]+/),o={};
2n.forEach((function(t){var e=t.split(": "),i=e.shift(),r=e.join(": ");o[i]=r})),0<Object.keys(o).length&&(e.properties=e.properties||{},e.properties.responseHeaders={},e.properties.responseHeaders=o)}}this.trackDependencyDataInternal(e),t.ajaxData=null}},Nd.prototype.getAjaxCorrelationContext=function(t){try{var e=t.getAllResponseHeaders();if(null!==e&&-1!==e.toLowerCase().indexOf(kc.requestContextHeaderLowerCase)){var i=t.getResponseHeader(kc.requestContextHeader);return jc.getCorrelationContext(i)}}catch(e){this._core.logger.throwInternal(su.WARNING,Lu,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Nd.getFailedAjaxDiagnosticsMessage(t),exception:Oc.dump(e)})}},Nd.prototype.trackDependencyDataInternal=function(t,e,i){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var r=ch.create(t,Vp.dataType,Vp.envelopeType,this._core.logger,e,i);this._core.track(r)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(su.CRITICAL,lc,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++this._trackAjaxAttempts},Nd.prototype.trackDependencyData=function(t,e){this.trackDependencyDataInternal(t,e)},Nd.prototype.processTelemetry=function(t){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(t)},Nd.prototype.setNextPlugin=function(t){t&&(this._nextPlugin=t)},Nd.prototype.instrumentFetch=function(){if(this.supportsFetch()&&!this._fetchInitialized){var t=window.fetch,e=this;window.fetch=function(i,r){var n;if(e.isFetchInstrumented(i)&&e.isMonitoredInstance(void 0,void 0,i,r))try{n=e.createFetchRecord(i,r),r=e.includeCorrelationHeaders(n,i,r)}catch(r){e._core.logger.throwInternal(su.CRITICAL,Eu,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(i),exception:Oc.dump(r)})}return t(i,r).then((function(t){return e.onFetchComplete(t,n),t})).catch((function(t){throw e.onFetchFailed(i,n,t),t}))},this._fetchInitialized=!0}},Nd.prototype.isFetchInstrumented=function(t){return this._fetchInitialized&&!0!==t[Hc]},Nd.prototype.supportsFetch=function(){var t=!0;return(!window||ou.isNullOrUndefined(window.Request)||ou.isNullOrUndefined(window.Request.prototype)||ou.isNullOrUndefined(window.fetch))&&(t=!1),t},Nd.prototype.createFetchRecord=function(t,e){var i=this._context&&this._context.telemetryTrace&&this._context.telemetryTrace.traceID||Oc.generateW3CId(),r=Oc.generateW3CId().substr(0,16),n=new Ad(i,r,this._core.logger);return n.requestSentTime=qc.Now(),t instanceof Request?n.requestUrl=t?t.url:"":n.requestUrl=t,e&&e.method?n.method=e.method:t&&t instanceof Request?n.method=t.method:n.method="GET",e&&e.headers&&this._config.enableRequestHeaderTracking?n.requestHeaders=e.headers:n.requestHeaders={},n},Nd.prototype.includeCorrelationHeaders=function(t,e,i,r){if(e){if(jc.canIncludeCorrelationHeader(this._config,t.getAbsoluteUrl(),this.currentWindowHost)){if((i=i||{}).headers=new Headers(i.headers||e instanceof Request&&e.headers||{}),this._isUsingAIHeaders){var n="|"+t.traceID+"."+t.spanID;i.headers.set(kc.requestIdHeader,n),this._config.enableRequestHeaderTracking&&(t.requestHeaders[kc.requestIdHeader]=n)}var o=this._config.appId||this._context.appId();if(o&&(i.headers.set(kc.requestContextHeader,kc.requestContextAppIdFormat+o),this._config.enableRequestHeaderTracking&&(t.requestHeaders[kc.requestContextHeader]=kc.requestContextAppIdFormat+o)),this._isUsingW3CHeaders){var a=new Dd(t.traceID,t.spanID);i.headers.set(kc.traceParentHeader,a.toString()),this._config.enableRequestHeaderTracking&&(t.requestHeaders[kc.traceParentHeader]=a.toString())}return i}return i}if(r){if(this.currentWindowHost&&jc.canIncludeCorrelationHeader(this._config,r.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){this._isUsingAIHeaders&&(n="|"+r.ajaxData.traceID+"."+r.ajaxData.spanID,r.setRequestHeader(kc.requestIdHeader,n),this._config.enableRequestHeaderTracking&&(r.ajaxData.requestHeaders[kc.requestIdHeader]=n));var s=this._config.appId||this._context.appId();s&&(r.setRequestHeader(kc.requestContextHeader,kc.requestContextAppIdFormat+s),this._config.enableRequestHeaderTracking&&(r.ajaxData.requestHeaders[kc.requestContextHeader]=kc.requestContextAppIdFormat+s)),this._isUsingW3CHeaders&&(a=new Dd(r.ajaxData.traceID,r.ajaxData.spanID),r.setRequestHeader(kc.traceParentHeader,a.toString()),this._config.enableRequestHeaderTracking&&(r.ajaxData.requestHeaders[kc.traceParentHeader]=a.toString()))}return r}},Nd.prototype.getFailedFetchDiagnosticsMessage=function(t){var e="";try{ou.isNullOrUndefined(t)||(e+="string"==typeof t?"(url: '"+t+"')":"(url: '"+t.url+"')")}catch(t){this._core.logger.throwInternal(su.CRITICAL,Eu,"Failed to grab failed fetch diagnostics message",{exception:Oc.dump(t)})}return e},Nd.prototype.onFetchComplete=function(t,e){if(e)try{if(e.responseFinishedTime=qc.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(su.WARNING,Iu,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var i={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:"Fetch",duration:e.ajaxTotalDuration,success:200<=t.status&&t.status<400,responseCode:t.status,properties:{HttpMethod:e.method}},r=this.getFetchCorrelationContext(t);if(r&&(i.correlationContext=r),this._config.enableRequestHeaderTracking&&0<Object.keys(e.requestHeaders).length&&(i.properties=i.properties||{},i.properties.requestHeaders=e.requestHeaders),this._config.enableResponseHeaderTracking){var n={};
2t.headers.forEach((function(t,e){n[e]=t})),0<Object.keys(n).length&&(i.properties=i.properties||{},i.properties.responseHeaders=n)}this.trackDependencyDataInternal(i)}}catch(e){this._core.logger.throwInternal(su.WARNING,Lu,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:Oc.dump(e)})}},Nd.prototype.onFetchFailed=function(t,e,i){if(e)try{if(e.responseFinishedTime=qc.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(su.WARNING,Iu,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var r={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:"Fetch",duration:e.ajaxTotalDuration,success:!1,responseCode:0,properties:{HttpMethod:e.method}};this.trackDependencyDataInternal(r,{error:i.message})}}catch(e){this._core.logger.throwInternal(su.WARNING,Lu,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:Oc.dump(e)})}},Nd.prototype.getFetchCorrelationContext=function(t){try{var e=t.headers.get(kc.requestContextHeader);return jc.getCorrelationContext(e)}catch(e){this._core.logger.throwInternal(su.WARNING,Lu,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:Oc.dump(e)})}},Nd.prototype.instrumentXhr=function(){this.supportsAjaxMonitoring()&&!this.initialized&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.instrumentSetRequestHeader(),this.initialized=!0)},Nd.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:$l.AI,
2correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1}},Nd.getEmptyConfig=function(){return{maxAjaxCallsPerView:void 0,disableAjaxTracking:void 0,disableFetchTracking:void 0,disableCorrelationHeaders:void 0,distributedTracingMode:void 0,correlationHeaderExcludedDomains:void 0,appId:void 0,enableCorsCorrelation:void 0,correlationHeaderDomains:void 0,enableRequestHeaderTracking:void 0,enableResponseHeaderTracking:void 0}},Nd.prototype.initialize=function(t,e,i){if(!this.initialized&&!this._fetchInitialized){this._core=e;var r=Nd.getDefaultConfig();for(var n in this._config=Nd.getEmptyConfig(),r)this._config[n]=sh.getConfig(t,n,Nd.identifier,r[n]);if(this._isUsingAIHeaders=this._config.distributedTracingMode===$l.AI||this._config.distributedTracingMode===$l.AI_AND_W3C,this._isUsingW3CHeaders=this._config.distributedTracingMode===$l.AI_AND_W3C||this._config.distributedTracingMode===$l.W3C,!1===this._config.disableAjaxTracking&&this.instrumentXhr(),!1===this._config.disableFetchTracking&&this.instrumentFetch(),0<i.length&&i){for(var o=void 0,a=0;!o&&a<i.length;)i[a]&&i[a].identifier===mh&&(o=i[a]),a++;o&&(this._context=o.context)}}},Nd.identifier="AjaxDependencyPlugin",Nd);function Nd(){this._trackAjaxAttempts=0,this.identifier=Nd.identifier,this.priority=120,this.currentWindowHost=window&&window.location&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1,this._fetchInitialized=!1}var Rd=(Bd.prototype.trackEvent=function(t,e){this.appInsights.trackEvent(t,e)},Bd.prototype.trackPageView=function(t){var e=t||{};this.appInsights.trackPageView(e)},Bd.prototype.trackPageViewPerformance=function(t){var e=t||{};this.appInsights.trackPageViewPerformance(e)},Bd.prototype.trackException=function(t){!t.exception&&t.error&&(t.exception=t.error),this.appInsights.trackException(t)},Bd.prototype._onerror=function(t){this.appInsights._onerror(t)},Bd.prototype.trackTrace=function(t,e){this.appInsights.trackTrace(t,e)},Bd.prototype.trackMetric=function(t,e){this.appInsights.trackMetric(t,e)},Bd.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},Bd.prototype.stopTrackPage=function(t,e,i,r){this.appInsights.stopTrackPage(t,e,i,r)},Bd.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},Bd.prototype.stopTrackEvent=function(t,e,i){this.appInsights.stopTrackEvent(t,e,i)},Bd.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},Bd.prototype.setAuthenticatedUserContext=function(t,e,i){void 0===i&&(i=!1),this.properties.context.user.setAuthenticatedUserContext(t,e,i)},Bd.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},Bd.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},Bd.prototype.flush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach((function(e){e.forEach((function(e){e.flush(t)}))}))},Bd.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach((function(e){e.forEach((function(e){e.onunloadFlush?e.onunloadFlush():e.flush(t)}))}))},Bd.prototype.loadAppInsights=function(t){if(void 0===t&&(t=!1),t&&this.config.extensions&&0<this.config.extensions.length)throw new Error("Extensions not allowed in legacy mode");var e=[],i=new hd;return e.push(i),e.push(this.properties),e.push(this.dependencies),e.push(this.appInsights),this.core.initialize(this.config,e),this.emptyQueue(),this.pollInternalLogs(),this.addHousekeepingBeforeUnload(this),this.context=this.properties.context,this},Bd.prototype.updateSnippetDefinitions=function(t){for(var e in this)"string"==typeof e&&(t[e]=this[e])},Bd.prototype.emptyQueue=function(){try{if(Oc.isArray(this.snippet.queue)){for(var t=this.snippet.queue.length,e=0;e<t;e++)(0,this.snippet.queue[e])();this.snippet.queue=void 0,delete this.snippet.queue}}catch(t){var i={};t&&"function"==typeof t.toString&&(i.exception=t.toString())}},Bd.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},Bd.prototype.addHousekeepingBeforeUnload=function(t){!t.appInsights.config.disableFlushOnBeforeUnload&&"onbeforeunload"in window&&(Oc.addEventHandler("beforeunload",(function(){t.onunloadFlush(!1);var e=t.appInsights.core._extensions[mh];e&&e.context&&e.context._sessionManager&&e.context._sessionManager.backup()}))||t.appInsights.core.logger.throwInternal(su.CRITICAL,ku,"Could not add handler for beforeunload"))},Bd.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4},Bd);function Bd(t){t.queue=t.queue||[],t.version=t.version||2;var e=t.config||{};e&&!e.instrumentationKey&&(e=t,Ch.Version="2.2.2"),this.appInsights=new Ch,this.properties=new Id,this.dependencies=new Od,this.core=new Ac,this.snippet=t,this.config=e,this.get
2SKUDefaults()}var jd=(Fd.prototype.trackEvent=function(t,e){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.trackEvent(t,e)},Fd.prototype.setAuthenticatedUserContext=function(t,e){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.setAuthenticatedUserContext(t,e)},Fd.prototype.trackException=function(t){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.trackException(t)},Fd.prototype.flush=function(t){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.flush(t)},Fd);function Fd(t){this.options=t,!this.options.disableTelemetry&&c&&(this.appInsights=new Rd({config:{instrumentationKey:c,disableExceptionTracking:!0,disableAjaxTracking:!0,isCookieUseDisabled:!0,maxBatchInterval:5e3}}),this.appInsights.loadAppInsights(),this.appInsights.addTelemetryInitializer((function(t){t.tags[fh.applicationVersion]=O.getFullVersion()})))}var Ud=(Vd.prototype.onAdd=function(t){return this.container=document.createElement("div"),this.container.className="azure-map-logo",this.container},Vd.prototype.onRemove=function(){this.container.remove()},Vd);function Vd(){}var qd,Gd=(w(Zd,qd=I),Zd);function Zd(){var t=null!==qd&&qd.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.showFeedbackLink=!0,t}var Hd,Wd=(w(Yd,Hd=q),Yd.prototype.onAdd=function(e){return this.container=this.buildContainer(e,t.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.container.appendChild(this.copyrightDiv),this.options.showFeedbackLink&&(this.feedbackLink=this.buildFeedbackLink(),this.container.appendChild(this.feedbackLink)),this.container},Yd.prototype.onRemove=function(){Hd.prototype.onRemove.call(this),delete this.container},Yd.prototype.setOptions=function(t){var e=(new Gd).merge(this.options,t);e.copyrightMessage!==this.options.copyrightMessage&&(this.copyrightDiv.innerText=e.copyrightMessage),!e.showFeedbackLink&&this.feedbackLink?(this.feedbackLink.remove(),delete this.feedbackLink):e.showFeedbackLink&&!this.feedbackLink&&(this.feedbackLink=this.buildFeedbackLink(),this.container.appendChild(this.feedbackLink)),this.options=e},Yd.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.options.copyrightMessage||"",t},Yd.prototype.buildFeedbackLink=function(){var t=document.createElement("a");return t.textContent="Improve this map",t.href="https://feedback.azuremaps.com",t.target="_blank",t.rel="noopener",t},Yd);function Yd(t){var e=Hd.call(this)||this;return e.options=(new Gd).merge(t),e}var Kd=(Xd.throwOnError=function(t,e){var i=t instanceof $m?t._getMap():t,r=function(t){throw i.off("error",r),t.error};i.on("error",r);var n=e();return i.off("error",r),n},Xd.tryCatch=function(t,e,i,r){try{return this.throwOnError(t,e)}catch(t){return i(t)}finally{"function"==typeof r&&r()}},Xd.tryFinally=function(t,e,i){try{return this.throwOnError(t,e)}finally{i()}},Xd);function Xd(){}var Jd=(Qd.prototype.request=function(t){var e={domain:this.map.getServiceOptions().domain,path:"search/address/reverse/json",queryParams:S({"api-version":"1.0",language:t.style.language,limit:1,query:Yn(t.position[1])+","+Kn(t.position[0])},t.style.view&&{view:t.style.view})};return new k(this.map.authentication.signRequest(e)).get()},Qd);function Qd(t){this.map=t}var $d=(tf.prototype.cache=function(t,e,i,r){var n=t+"_"+i[0]+"_"+i[1]+"_"+r;this._labelIdx[e.labelType]||(this._labelIdx[e.labelType]=[],this._labelCache[e.labelType]=[]),-1===this._labelIdx[e.labelType].indexOf(n)&&(this._labelCache[e.labelType].push({name:t,radius:e.radius,minZoom:e.minZoom,maxZoom:e.maxZoom||24,position:i}),this._labelIdx[e.labelType].push(n))},tf.prototype.getNearestLabel=function(t,e,i){var r=null,n=this._labelCache[t];if(n)for(var o=1/0,a=0,s=n.length;a<s;a++)if(i>=n[a].minZoom&&i<=n[a].maxZoom){var l=Vn(n[a].position,e);l<=n[a].radius&&l<=o&&(o=l,r=n[a])}return r},tf.prototype._preloadCache=function(t){if(!this._preloadedCache.has(t)){this._preloadedCache.add(t);var e={source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},i=t,r=i.indexOf("-");switch(-1!==r&&(i=i.substr(0,r)),i){case"fr":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océan Atlantique",e,[-40,32],t),this.cache("Océan Atlantique",e,[-17,-29],t);break;case"es":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océano Atlántico",e,[-40,32],t),this.cache("Océano Atlántico",e,[-17,-29],t);break;case"pt":this.cache("Oceano PacÃfico",e,[-170,32],t),this.cache("Oceano PacÃfico",e,[-138,-27],t),this.cache("Oceano Atlântico",e,[-40,32],t),this.cache("Oceano Atlântico",e,[-17,-29],t);break;case"ja":this.cache("太平æ´",e,[-170,32],t),this.cache("太平æ´",e,[-138,-27],t);break;case"en":this.cache("Pacific Ocean",e,[-170,32],t),this.cache("Pacific Ocean",e,[-138,-27],t),this.cache("Atlantic Ocean",e,[-40,32],t),this.cache("Atlantic Ocean",e,[-17,-29],t),this.cache("Indian Ocean",e,[77,-26],t)}}},tf);function tf(){this._labelCache={},this._labelIdx={},this._preloadedCache=new Set}var ef=(rf.prototype.dispose=function(){this._disposed=!0,this._map._getMap().off("move",this._onMove),this._map._getMap().off("moveend",this._onMoveEnd),this._map._getMap().off("styledata",this._onStyleData),this._map._getMap().off("rotate",this._onRotate),this._map.getCanvas().removeEventListener("mousedown",this._onPointerDown),this._map.getCanvas().removeEventListener("touchstart",this._onPointerDown),this._map.getMapContainer().removeEventListener("keydown",this._shortcutListener)},rf.prototype._getEventPos=function(t){if("touches"in t){var e=t.touches[0],i=t.target.getBoundingClientRect();return[e.pageX-i.left,e.pageY-i.top]}return[t.offsetX,t.offsetY]},rf.prototype._checkThresholds=function(t,e){return this._checkZoomThreshold(t.zoom,e.zoom)||this._checkPitchThreshold(t.pitch,e.pitch)||this._checkLocThreshold(t.center,e.center)||this._checkHeadingThreshold(t.bearing,e.bearing)},rf.prototype._checkZoomThreshold=function(t,e){return this._round(t)!==this._round(e)},rf.prototype._checkPitchThreshold=function(t,e){return Math.abs(t-e)>=this._pitchThreshold},rf.prototype._checkLocThreshold=function(t,e){var i=this._map.positionsToPixels([e,t]),r=i[0],n=i[1];return sn.getDistance(r,n)>=this._moveThreshold},rf.prototype._checkHeadingThreshold=function(t,e){t<0&&(t+=360),e<0&&(e+=360);var i=Math.abs(t-e);return 180<i&&(i=360-i),i>=this._headingThreshold}
2,rf.prototype._getLocDesc=function(t,e,i){return T(this,void 0,void 0,(function(){var r,n,o,a,s,l,u,c,p,h=this;return C(this,(function(d){switch(d.label){case 0:return"blank"===i?[3,3]:this._map._getMap().loaded()?[3,2]:[4,new Promise((function(t){return h._map._getMap().once("idle",t)}))];case 1:d.sent(),d.label=2;case 2:for(r={},n=this._map.positionsToPixels([t.center])[0],Kd.tryCatch(this._map,(function(){o=h._map._getMap().queryRenderedFeatures(n,{layers:h._polygonStyleLayer,filter:["==",["geometry-type"],"Polygon"]})}),(function(){})),a=null,o&&0<o.length&&(a=o[0]),s=null,l=0,u=this._lableConfig.length;l<u;l++)c=this._lableConfig[l],t.zoom>=c.minZoom?c.polygonSources?a&&-1!==c.polygonSources.indexOf(a.layer["source-layer"])?(s=c.labelType,this._getClosestLabel(c,t,e,r,!1)):this._getClosestLabel(c,t,e,r,!0):this._getClosestLabel(c,t,e,r,!1):this._getClosestLabel(c,t,e,r,!0);return 8<=t.zoom&&this._processRoads(r,t,e),this._labelCache.forEach((function(e){r[e]||(p=null,("water"!==e&&"majorPoi"!==e||e===s)&&(p=rf._labelCache.getNearestLabel(e,t.center,t.zoom)),p&&(r[e]=p.name))})),[2,this._processLocInfo(t,s,r,!0,this._restFallback)];case 3:return[2,this._processLocInfo(t,null,null,!1,!1)]}}))}))},rf.prototype._getHeadingDesc=function(t){var e=t.bearing;switch(e<0&&(e+=360),e=this._round(e,this._headingThreshold)){case 0:case 360:return"north";case 45:return"north east";case 90:return"east";case 135:return"south east";case 180:return"south";case 225:return"south west";case 270:return"west";case 315:return"north west";default:return e+" degrees"}},rf.prototype._getClosestLabel=function(t,e,i,r,n){for(var o=t.radius,a=0,s=t.source.length;a<s;a++){var l={sourceLayer:t.source[a]},u=this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId,l),c=null,p=1/0,h=this._labelCache.has(t.labelType);if(!n||n&&h)for(var d=0,f=u.length;d<f;d++){var m="Point"===u[d].geometry.type?u[d]:co(e.center,u[d].geometry);if(!n){var g="Point"===u[d].geometry.type?Vn(e.center,m.geometry.coordinates):m.properties.distance;g<p&&(p=g,c=u[d])}h&&rf._labelCache.cache(u[d].properties.name,t,m.geometry.coordinates,i)}if(!n){var y=t.labelType+"Dis";c&&p<=o&&("number"!=typeof r[y]||p<=r[y])&&(r[t.labelType]=c.properties.name,r[y]=p)}}},rf.prototype._processRoads=function(t,e,i,r){var n=this._map._getMap().queryRenderedFeatures(r,{filter:["==",["geometry-type"],"LineString"]});if(n){for(var o=void 0,a=void 0,s=void 0,l=void 0,u=0,c=n.length;u<c;u++)if(this._roadLayers.has(n[u].layer["source-layer"])&&n[u].properties.name&&""!==n[u].properties.name){var p=co(e.center,n[u]);(!s||p.properties.distance<s.properties.distance)&&(o&&n[u].properties.name===o.properties.name?s=p:o&&n[u].properties.name===o.properties.name?(!l||p.properties.distance<l.properties.distance)&&(l=p,a=n[u]):(l=s,a=o,s=p,o=n[u]))}if(o&&(t.country||(t.country=o.properties.country_code,t.countryDis=0,rf._labelCache.cache(t.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},s.geometry.coordinates,i)),t.state||(t.state=o.properties.country_subdivision,t.stateDis=0,rf._labelCache.cache(t.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},s.geometry.coordinates,i)),15<=e.zoom)){var h=this._map.positionsToPixels([e.center,s.geometry.coordinates]),d=sn.getDistance(h[0],h[1]);if((d<this._roadPixelRadius||s.properties.distance<this._minRoadDistance)&&(t.road=o.properties.name),a){var f=this._map.positionsToPixels([l.geometry.coordinates]);((d=sn.getDistance(h[0],f[0]))<this._minIntersectionPixelDistance||l.properties.distance<this._minRoadDistance)&&(t.secondRoad=a.properties.name,t.secondRoadDis=l.properties.distance)}}}},rf.prototype._getActionDesc=function(t){if(this._lastCam){var e=[];if(this._checkLocThreshold(t.center,this._lastCam.center)){var i=["panned"],r=Math.round(Gn(this._lastCam.center,t.center));0===r||360===r?i.push("north"):r<90?i.push("north east"):90===r?i.push("east"):r<180?i.push("south east"):180===r?i.push("south"):r<270?i.push("south west"):270===r?i.push("west"):r<360&&i.push("north west");var n=Vn(this._lastCam.center,t.center,dn.meters);i.push(1e3<n?jn(n/1e3,2)+" kilometers":jn(n,2)+" meters"),e.push(i.join(" "))}if(this._checkZoomThreshold(t.zoom,this._lastCam.zoom)){(i=["zoomed"]).push(this._lastCam.zoom<t.zoom?"in":"out");var o=Math.abs(this._lastCam.zoom-t.zoom);1<=o&&(o=Math.ceil(o),i.push(1<o?o+" levels":o+" level")),this._getCanonicalZoom(this._lastCam.zoom)!==this._getCanonicalZoom(t.zoom)&&i.push("to "+this._getCanonicalZoom(t.zoom)+" level"),e.push(i.join(" "))}if(this._checkPitchThreshold(t.pitch,this._lastCam.pitch)){var a=this._round(t.pitch,this._pitchThreshold);if(e.push("pitched to "+a+" degrees"),60===t.pitch||0===t.pitch){var s=60===t.pitch?"maximum":"minimum";e.push("reached "+s+" of "+t.pitch+" degrees")}}return this._checkHeadingThreshold(this._lastCam.bearing,t.bearing)&&e.push("rotated to "+this._getHeadingDesc(t)),e.join(" and ")||null}return null},rf.prototype._getCanonicalZoom=function(t){return(t=this._round(t))<2?"world":t<5?"country":t<11?"state province":t<15?"city":"street"}
2,rf.prototype._processLocInfo=function(t,e,i,r,n){var o=this;return new Promise((function(a,s){var l=[];if(r){var u=[];if(i&&(e&&("water"===e&&i.water?u.push(i.water):"majorPoi"===e&&i.majorPoi&&u.push(i.majorPoi)),0===u.length&&(i.majorPoi&&8<=t.zoom?u.push(i.majorPoi):(i.poi&&14<=t.zoom?u.push(i.poi):i.road&&15<=t.zoom&&(i.secondRoad?u.push(i.road+" & "+i.secondRoad):u.push(i.road)),i.neighbourhood&&12<=t.zoom&&u.push(i.neighbourhood),i.city&&6<=t.zoom&&u.push(i.city)),i.state&&4<=t.zoom&&u.push(i.state),0===u.length?i.water?u.push(i.water):i.country&&u.push(i.country):1===u.length&&i.state&&4<=t.zoom&&i.country&&u.push(i.country))),0<u.length)l.push("<p>Location: ",u.join(", "),".</p>");else if(n&&"water"!==e)return void o._reverseGeocodeDescription(t).then((function(t){a(t)}),(function(){s("<p>Location: unknown</p>")}))}o._returnDetailedDescriptions&&(l.push("<p>Zoom: ",jn(t.zoom,2),".</p>"),l.push("<p>Latitude: ",jn(t.center[1],5),".</p>"),l.push("<p>Longitude: ",jn(t.center[0],5),".</p>")),a(l.join(""))}))},rf.prototype._reverseGeocodeDescription=function(t){var e=this;return new Promise((function(i){var r=e._map.getStyle();e._reverseSearch.request({position:t.center,style:r}).then((function(n){var o={};if(n&&n.addresses&&0<n.addresses.length&&n.addresses[0].address){var a=n.addresses[0].address;a.country&&(o.country=a.country,rf._labelCache.cache(o.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},t.center,r.language)),a.countrySubdivision&&(o.state=a.countrySubdivision,rf._labelCache.cache(o.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},t.center,r.language)),a.municipality&&(o.city=a.municipality,rf._labelCache.cache(o.state,{source:["Small city"],labelType:"city",radius:1e3,minZoom:10},t.center,r.language)),a.streetNameAndNumber?o.road=a.streetNameAndNumber:a.street&&(o.road=a.street)}e._processLocInfo(t,null,o,!0,!1).then((function(t){i(t)}))}),(function(r){e._processLocInfo(t,null,null,!0,!1).then((function(t){i(t)}))})).catch((function(r){e._processLocInfo(t,null,null,!0,!1).then((function(t){i(t)}))}))}))},rf.prototype._round=function(t,e){return void 0===e&&(e=1),Math.round(t/e)*e},rf);function rf(t,e){var i=this;this._restFallback=!0,this._disposed=!1,this._lastHeadingTime=0,this._actionQueue=[],this._pointerUpdateDelay=3e3,this._camUpdateDelay=1e3,this._headUpdateLimit=1e3,this._controlEventDelay=500,this._moveThreshold=25,this._headingThreshold=5,this._pitchThreshold=5,this._roadPixelRadius=120,this._minRoadDistance=25,this._minIntersectionPixelDistance=50,this._baseVectorTileSourceId="vectorTiles",this._lableConfig=[{source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},{source:["Sea label"],labelType:"water",minZoom:3,radius:1e6,polygonSources:["Sea","Ocean or sea"]},{source:["Country name"],labelType:"country",minZoom:0,maxZoom:5,radius:3e5},{source:["State name","State name short"],labelType:"state",minZoom:4,maxZoom:7,radius:3e5},{source:["Capital city","Large city"],labelType:"city",minZoom:8,radius:4e4},{source:["Medium city"],labelType:"city",minZoom:8,radius:3e4},{source:["Small city"],labelType:"city",minZoom:8,radius:2e4},{source:["Island label"],labelType:"city",minZoom:8,radius:1e4},{source:["Town"],labelType:"city",minZoom:10,radius:1e4},{source:["Village"],labelType:"neighbourhood",minZoom:12,radius:6e3},{source:["Amusement area label"],labelType:"poi",minZoom:14,radius:2e3,polygonSources:["Amusement park"]},{source:["Hospital label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Hospital"]},{source:["Shopping centre label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Shopping"]},{source:["Stadium label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Stadium"]},{source:["University/School label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["University"]},{source:["Zoo label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Zoo"]},{source:["Airport Label","Airport name","Airport POI"],labelType:"majorPoi",minZoom:11,radius:3e3,polygonSources:["Airport","Runway"]},{source:["National park label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["National or state park","National park","Forest"]},{source:["Reservation label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["Reservation"]}],this._polygonStyleLayer=["National or state park","National park","Reservation","Airport","Runway","Stadium","University","Zoo","Shopping","Hospital","Amusement park","Ocean","Sea","Ocean or sea"],this._labelCache=new Set(["city","state","country","water","majorPoi"]),this._roadLayers=new Set(["Connecting road","Connecting road tunnel","International road","International road tunnel","Local road","Local road tunnel","Major local road","Major local road tunnel","Major road","Major road tunnel","Minor local road","Minor local road tunnel","Motorway","Motorway tunnel","Secondary road","Secondary road tunnel","Toll connecting road","Toll connecting road tunnel","Toll international road","Toll international road tunnel","Toll local road","Toll local road tunnel","Toll major local road","Toll major local road tunnel","Toll major road","Toll major road tunnel","Toll minor local road","Toll minor local road tunnel","Toll motorway","Toll motorway tunnel","Toll secondary road","Toll secondary road tunnel"]),this._returnDetailedDescriptions=!1,this._shortcutListener=function(t){return T(i,void 0,void 0,(function(){var e,i,r,n,o;return C(this,(function(a){switch(a.label){case 0:return t.altKey&&t.ctrlKey&&68===t.keyCode?(this._returnDetailedDescriptions=!this._returnDetailedDescriptions,e=this._map.getCamera(),i=this._map.getStyle(),r=i.language.toLowerCase(),n=i.style.toLowerCase(),[4,this._getLocDesc(e,r,n)]):[3,2];case 1:o=a.sent(),this._descCallback(o),a.label=2;case 2:return[2]}}
2))}))},this._onRotate=function(){i._rotateTimeout||(Date.now()-i._lastHeadingTime>=i._headUpdateLimit?i._rotateTimeout=setTimeout(i._updateHeading,K.RotationDuration+25):i._rotateTimeout=setTimeout(i._updateHeading,i._headUpdateLimit-(Date.now()-i._lastHeadingTime)))},this._onMove=function(){i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._controlTimeout&&(clearTimeout(i._controlTimeout),delete i._controlTimeout)},this._onMoveEnd=function(t){t.fromControl?i._controlTimeout=setTimeout(i._updateCam,i._controlEventDelay):i._updateCam()},this._onStyleData=function(){setTimeout(i._updateStyle)},this._onPointerDown=function(t){i._lastPointerPos=i._getEventPos(t),i._pointerTimeout=setTimeout((function(){return T(i,void 0,void 0,(function(){var t,e,i,r,n;return C(this,(function(o){switch(o.label){case 0:return t=this._map.getStyle(),e=t.language.toLowerCase(),i=t.style.toLowerCase(),(r=this._map.getCamera()).center=this._map.pixelsToPositions([this._lastPointerPos])[0],[4,this._getLocDesc(r,e,i)];case 1:return n=o.sent(),this._descCallback(n),this._onPointerUp(),[2]}}))}))}),i._pointerUpdateDelay),i._map.getCanvas().addEventListener("mousemove",i._onPointerMove),i._map.getCanvas().addEventListener("touchmove",i._onPointerMove),i._map.getCanvas().addEventListener("mouseup",i._onPointerUp),i._map.getCanvas().addEventListener("touchend",i._onPointerUp)},this._onPointerMove=function(t){var e=i._getEventPos(t),r=i._lastPointerPos[0]-e[0],n=i._lastPointerPos[1]-e[1];Math.sqrt(r*r+n*n)>i._moveThreshold&&i._onPointerUp()},this._onPointerUp=function(){clearTimeout(i._pointerTimeout),delete i._pointerTimeout,i._map.getCanvas().removeEventListener("mousemove",i._onPointerMove),i._map.getCanvas().removeEventListener("touchmove",i._onPointerMove),i._map.getCanvas().removeEventListener("mouseup",i._onPointerUp),i._map.getCanvas().removeEventListener("touchend",i._onPointerUp)},this._updateHeading=function(){var t=i._map.getCamera();if(!i._lastHead||i._checkHeadingThreshold(t.bearing,i._lastHead)){var e=i._getHeadingDesc(t);i._lastHead=t.bearing,i._descCallback("<p>Map heading "+e+".</p>"),i._lastHeadingTime=Date.now()}delete i._rotateTimeout},this._updateStyle=function(){return T(i,void 0,void 0,(function(){var t,e,i,r,n;return C(this,(function(o){switch(o.label){case 0:return t=this._map.getCamera(),e=this._map.getStyle(),i=e.language.toLowerCase(),r=e.style.toLowerCase(),this._lastLang===i?[3,2]:(rf._labelCache._preloadCache(i),[4,this._getLocDesc(t,i,r)]);case 1:return n=o.sent(),[3,4];case 2:return this._lastStyle===r||"blank"!==this._lastStyle?[3,4]:[4,this._getLocDesc(t,i,r)];case 3:n=o.sent(),o.label=4;case 4:return this._lastLang=i,this._lastStyle=r,n&&this._descCallback(n),[2]}}))}))},this._updateCam=function(t){void 0===t&&(t=!1);var e=i._map.getCamera();if(!i._lastCam||0<i._actionQueue.length||i._checkThresholds(e,i._lastCam)){var r=i._map.getStyle(),n=r.language.toLowerCase(),o=r.style.toLowerCase(),a=i._getActionDesc(e);a&&i._actionQueue.push(a),i._lastCam=e,i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._moveTimeout=setTimeout((function(){return T(i,void 0,void 0,(function(){var t;return C(this,(function(i){switch(i.label){case 0:return clearTimeout(this._rotateTimeout),delete this._rotateTimeout,[4,this._getLocDesc(e,n,o)];case 1:return t=i.sent(),0<this._actionQueue.length?(this._descCallback("<p>Map "+this._actionQueue.join(", then ")+".</p>"+t),this._actionQueue=[]):this._descCallback(t),[2]}}))}))}),t?0:i._camUpdateDelay)}},this._map=t,this._descCallback=e,this._reverseSearch=new Jd(t),rf._labelCache||(rf._labelCache=new $d),this._lastLang=this._map.getStyle().language.toLowerCase(),rf._labelCache._preloadCache(this._lastLang),this._map.events.addOnce("load",(function(){i._disposed||(i._updateCam(!0),i._map._getMap().on("move",i._onMove),i._map._getMap().on("moveend",i._onMoveEnd),i._map._getMap().on("styledata",i._onStyleData),i._map._getMap().on("rotate",i._onRotate),i._map.getCanvas().addEventListener("mousedown",i._onPointerDown),i._map.getCanvas().addEventListener("touchstart",i._onPointerDown))})),this._map.getMapContainer().addEventListener("keydown",this._shortcutListener)}var nf,of=function(t){var e=this;this.addToMap=function(){e.initializeMapLiveStateInfo(),e.initializeMapStyleInfo(),e.createMapKeyBindingInfo(),e.map.getMapContainer().setAttribute("role","application"),e.map.getMapContainer().setAttribute("aria-label","Map Application"),e.map.getCanvas().setAttribute("aria-label","Interactive Map"),e.map.getCanvas().setAttribute("aria-describedby","atlas-map-state atlas-map-style atlas-map-shortcuts"),e.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=e.mapViewDesc&&e.mapViewDesc.dispose(),delete e.mapViewDesc,null!=e.atlasMapKeyBindings&&e.map.getCanvasContainer().removeChild(e.atlasMapKeyBindings),delete e.atlasMapKeyBindings,null!=e.atlasMapLiveStateInfo&&e.map.getCanvasContainer().removeChild(e.atlasMapLiveStateInfo),delete e.atlasMapLiveStateInfo,null!=e.atlasMapStyleInfo&&e.map.getCanvasContainer().removeChild(e.atlasMapStyleInfo),delete e.atlasMapStyleInfo,e.map.getMapContainer().removeAttribute("role"),e.map.getMapContainer().removeAttribute("aria-label"),e.map.getCanvas().removeAttribute("aria-label"),e.map.getCanvas().removeAttribute("aria-describedby"),e.map.getCanvas().removeAttribute("alt"),e.map.events.remove("styledata",e.updateMapStyle)},this.createMapKeyBindingInfo=function(){e.atlasMapKeyBindings=document.createElement("div"),e.atlasMapKeyBindings.setAttribute("tabindex","-1"),e.atlasMapKeyBindings.setAttribute("aria-hidden","true"),e.atlasMapKeyBindings.id="atlas-map-shortcuts",e.atlasMapKeyBindings.classList.add("hidden-accessible-element"),e.atlasMapKeyBindings.innerHTML=["Map shortcuts:","Zoom out: hyphen.","Zoom in: plus.","Pan right 100 pixels: right arrow.","Pan left 100 pixels: left arrow.","Pan up 100 pixels: up arrow.","Pan down 100 pixels: down arrow.","Rotate 15 degrees clockwise: shift + right arrow.","Rotate 15 degrees counter clockwise: shift + left arrow.","Increase pitch 10 degrees: shift + up arrow.","Decrease pitch 10 degrees: shift + down arrow.","Toggle verbose map state: control + alt + D.","Jump focus to the map: Escape."].join("\n"),e.map.getCanvasContainer().appendChild(e.atlasMapKeyBindings),e.atlasMapKeyBindings.setAttribute("aria-live","polite")},this.initializeMapLiveStateInfo=function(){e.mapViewDesc=new ef(e.map,e.updateMapState),e.atlasMapLiveStateInfo=document.createElement("div"),e.atlasMapLiveStateInfo.setAttribute("tabindex","-1"),e.atlasMapLiveStateInfo.setAttribute("aria-hidden","true"),e.atlasMapLiveStateInfo.id="atlas-map-state",e.atlasMapLiveStateInfo.classList.add("hidden-accessible-element"),e.map.getCanvasContainer().appendChild(e.atlasMapLiveStateInfo),e.atlasMapLiveStateInfo.setAttribute("aria-live","polite")},this.initializeMapStyleInfo=function(){e.atlasMapStyleInfo=document.createElement("div"),e.atlasMapStyleInfo.setAttribute("tabindex","-1"),e.atlasMapStyleInfo.setAttribute("aria-hidden","true"),e.atlasMapStyleInfo.id="atlas-map-style",e.atlasMapStyleInfo.classList.add("hidden-accessible-element"),e.updateMapStyle(),e.map.events.add("styledata",e.updateMapStyle),e.map.getCanvasContainer().appendChild(e.atlasMapStyleInfo),e.atlasMapStyleInfo.setAttribute("aria-live","polite")},this.updateMapStyle=function(){e.atlasMapStyleInfo.innerHTML="<p>Map style: "+e.map.getStyle().style+".</p>"},this.updateMapState=function(t){e.atlasMapLiveStateInfo.innerHTML=t},this.map=t},af=function(t){var e=this;this.callCounter=0,this.listenerEnabled=!1,this.flowComponent=void 0,this.flowPath=void 0,this.addToMap=function(){if(!e.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");e.listenerEnabled||(e.map.events.add("styledata",e.addToMap),e.listenerEnabled=!0);var t=e.map.getStyle(),i=e.map.getTraffic(),r=e.map.styles.getFlowPath(t,i);if(r&&e.flowPath!==r){e.callCounter++;var n=e.callCounter;e.map.styles.getFlowComponent(t,i).then((function(t){if(e.callCounter===n){e.flowComponent&&(e.map.layers.remove(e.flowComponent.layer),e.map.sources.remove(e.flowComponent.sources),delete e.flowComponent);var i=e.map.layers.getLayers(),o=i.findIndex((function(t){return"transit"===t.getId()})),a=-1!==o?i[o+1]:void 0;e.map.sources.add(t.sources),e.map.layers.add(t.layer,a),e.flowComponent=t,e.flowPath=r}}))}},this.removeFromMap=function(){e.callCounter++,e.listenerEnabled&&(e.map.events.remove("styledata",e.addToMap),e.listenerEnabled=!1),e.flowPath&&delete e.flowPath,e.flowComponent&&(e.map.layers.remove(e.flowComponent.layer),e.map.sources.remove(e.flowComponent.sources),delete e.flowComponent)},this.map=t},sf=(w(lf,nf=I),lf);function lf(){var t=null!==nf&&nf.apply(this,arguments)||this;return t.version="1.0",t.bbox=void 0,t.zoom=void 0,t.params={},t}var uf=(cf.prototype.request=function(t){var e,i=(new sf).merge(t),r=this.map.getServiceOptions().domain;e=Eo.getWest(i.bbox)<-180&&180<Eo.getEast(i.bbox)?Eo.getSouth(i.bbox)+",-180,"+Eo.getNorth(i.bbox)+",180":Eo.getSouth(i.bbox)+","+Kn(Eo.getWest(i.bbox))+","+Eo.getNorth(i.bbox)+","+Kn(Eo.getEast(i.bbox));var n={domain:r,path:"traffic/incident/detail/json",queryParams:S({"api-version":i.version,projection:"EPSG4326",style:"s3",boundingbox:e,boundingzoom:i.zoom,trafficmodelid:-1},i.params)};return new k(this.map.authentication.signRequest(n)).get()},cf);function cf(t){this.map=t}var pf,hf,df,ff=(w(mf,pf=nn),mf.getIncidentTypeName=function(t,e){switch(t){case 0:default:return e.Unknown;case 1:return e.Accident;case 2:return e.Fog;case 3:return e.Danger;case 4:return e.Rain;case 5:return e.Ice;case 6:return e.Jam;case 7:return e.LaneClosed;case 8:return e.RoadClosed;case 9:return e.RoadWorks;case 10:return e.Wind;case 11:return e.Flood;case 12:return e.Detour}},mf.getIncidentTypeIconName=function(t){switch(t){case 0:default:return"unknown";case 1:return"accident";case 2:return"fog";case 3:return"danger";case 4:return"rain";case 5:return"ice";case 6:return"jam";case 7:return"lane-closed";case 8:return"road-closed";case 9:return"road-work";case 10:return"wind";case 11:return"flood";case 12:return"detour"}},mf.getSeverityColorName=function(t){switch(t){case 0:case 4:default:return"grey";case 1:return"yellow";case 2:return"orange";case 3:return"red"}},mf.getSeverityColorHexCode=function(t){switch(t){case 0:case 4:default:return"#B5B6B7";case 1:return"#F4C951";case 2:return"#F4873F";case 3:return"#F04F4E"}},mf);function mf(t,e){var i=new un(new ho(t.op.x,t.op.y)),r={icon:mf.getSeverityColorName(t.ty)+"-"+mf.getIncidentTypeIconName(t.ic),incidentType:mf.getIncidentTypeName(t.ic,e),description:t.d,length:t.l,delay:t.dl,from:t.f,color:mf.getSeverityColorHexCode(t.ty),to:t.t,id:t.id};return pf.call(this,i,r)||this}(df=hf=hf||{}).DELAY="delay",df.LENGTH="length",df.FROM="from",df.TO="to";var gf=(yf.build=function(t,e){void 0===e&&(e="en-US");var i=document.createElement("div");i.classList.add("incident-popup-title"),i.classList.add("font-segoeui-b"),i.setAttribute("tabindex","0"),i.innerText=t.properties.incidentType,i.setAttribute("aria-label","Incident Type "+t.properties.incidentType);var r=document.createElement("div");r.classList.add("incident-popup-subtitle"),r.classList.add("font-segoeui-b"),r.setAttribute("aria-label","Incident Description "+t.properties.description),r.setAttribute("tabindex","0"),r.innerText=t.properties.description;var n=document.createElement("div");n.classList.add("incident-popup-header"),n.style.backgroundColor=t.properties.color,n.appendChild(i),n.appendChild(r);var o=document.createElement("div");if(o.classList.add("incident-popup-body"),t.properties.delay){var a=Math.floor(t.properties.delay/60)+" min",s=this.createInfoSection(a,hf.DELAY);o.appendChild(s)}if(t.properties.length){var l=new Intl.NumberFormat([e,"en-US"],{maximumFractionDigits:2}),u=void 0;if("en-US"===e){var c=Fn(t.properties.length,"meters","miles");u=l.format(c)+" miles"}else{var p=Fn(t.properties.length,"meters","kilometers");u=l.format(p)+" km"}var h=this.createInfoSection(u,hf.LENGTH);o.appendChild(h)}if(t.properties.from){var d=this.createInfoSection(t.properties.from,hf.FROM);o.appendChild(d)}if(t.properties.to){var f=this.createInfoSection(t.properties.to,hf.TO);o.appendChild(f)}var m=document.createElement("div");return m.classList.add("incident-popup-content"),m.appendChild(n),m.a
2ppendChild(o),new ks({content:m,position:t.geometry.coordinates})},yf.createInfoSection=function(t,e){var i=document.createElement("div");i.classList.add("incident-popup-info");var r=document.createElement("div");r.classList.add("icon"),r.classList.add(e);var n=document.createElement("span");return n.classList.add("message"),n.classList.add("font-segoeui"),n.setAttribute("aria-label","Incident "+e+" "+t),n.setAttribute("tabindex","0"),n.innerText=t,i.appendChild(r),i.appendChild(n),i},yf);function yf(){}var vf,_f=function(t){var e=this;this.incidentLayerName="incidents",this.popups=new hr,this.addToMap=function(){e.map.addPins([],{name:e.incidentLayerName,cluster:!1}),e.map.addEventListener("mouseenter",e.incidentLayerName,e.cursorToPointer),e.map.addEventListener("mouseleave",e.incidentLayerName,e.cursorToDefault),e.map.addEventListener("click",e.incidentLayerName,e.openIncidentPopup),e.map.events.add("moveend",e.updateIncidents),e.map.events.add("styledata",e.updateLanguage),e.updateIncidents()},this.removeFromMap=function(){e.map.removeLayers([e.incidentLayerName]),e.map.removeEventListener("click",e.incidentLayerName,e.openIncidentPopup),e.map.removeEventListener("mouseenter",e.incidentLayerName,e.cursorToPointer),e.map.removeEventListener("mouseleave",e.incidentLayerName,e.cursorToDefault),e.map.events.remove("moveend",e.updateIncidents),e.map.events.remove("styledata",e.updateLanguage),e.cleanUpPopups()},this.updateIncidents=function(){var t=Math.ceil(e.map.getCamera().zoom),i=e.map.getCamera().bounds;e.incidentLanguage=e.map.getStyle().language;var r=e.map._getLocalizedStrings(),n=e.incidentService.request({bbox:i,zoom:t,params:{expandCluster:!0,originalPosition:!0,language:e.incidentLanguage}});Promise.all([n,r]).then((function(t){var r=t[0],n=t[1];if(e.map.getTraffic().incidents){var o=[];e.cleanUpPopups();for(var a=0,s=r.tm.poi||[];a<s.length;a++)for(var l=s[a],u=function(t){if(Eo.containsPosition(i,[t.op.x,t.op.y])){var r=new ff(t,n);o.push(r);var a=gf.build(r,e.incidentLanguage);e.popups.set(r.properties.id,a),e.map.events.add("open",a,(function(){e.openPopupId=r.properties.id,e.popups.forEach((function(t,i){e.openPopupId!==i&&t.close()}))})),e.map.events.add("close",a,(function(){e.openPopupId===r.properties.id&&delete e.openPopupId})),e.openPopupId===r.properties.id?e.popups.get(r.properties.id).open(e.map):e.popups.get(r.properties.id).attach(e.map)}},c=0,p=l.cpoi||[l];c<p.length;c++)u(p[c]);e.map.addPins(o,{overwrite:!0,name:e.incidentLayerName})}}))},this.cursorToPointer=function(t){e.map.getCanvas().style.cursor="pointer"},this.cursorToDefault=function(t){e.map.getCanvas().style.cursor=""},this.openIncidentPopup=function(t){var i=t.features[0].properties.id;e.popups.has(i)&&e.popups.get(i).open(e.map)},this.cleanUpPopups=function(){e.popups.forEach((function(t){t.remove()})),e.popups.clear()},this.updateLanguage=function(){e.map.getStyle().language!==e.incidentLanguage&&e.updateIncidents()},this.map=t,this.incidentService=new uf(this.map)},xf=(w(bf,vf=I),bf);function bf(){var t=null!==vf&&vf.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.wheelZoomRate=1/450,t}var wf=(Sf.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},Sf.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},Sf);function Sf(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var Tf=(Cf.prototype.enable=function(){this.map._getMap().on("touchstart",this._onTouchStart),this.map._getMap().on("touchmove",this._onTouchMove),this.map._getMap().on("touchend",this._onTouchEnd),this.map._getMap().on("touchcancel",this._onTouchCancel)},Cf.prototype.disable=function(){this.map._getMap().off("touchstart",this._onTouchStart),this.map._getMap().off("touchmove",this._onTouchMove),this.map._getMap().off("touchend",this._onTouchEnd),this.map._getMap().off("touchcancel",this._onTouchCancel)},Cf);function Cf(t){var e=this;this.minDiffX=70,this.maxDiffY=100,this.minDiff=30,this.delay=160,this._onTouchStart=function(t){if(2===t.points.length){var i=t.points[0].y-t.points[1].y,r=t.points[0].x-t.points[1].x;Math.abs(r)>=e.minDiffX&&Math.abs(i)<=e.maxDiffY&&(t.originalEvent.preventDefault(),e.map._getMap().touchZoomRotate.disable(),e.map._getMap().dragPan.disable(),e.dpPoint=t.point,e.dpPitch=e.map._getMap().getPitch(),e.startTiming=Date.now(),e.startDistance=Math.hypot(r,i),e.startEventData=t)}},this._onTouchMove=function(t){if(void 0!==e.dpPoint&&void 0!==e.dpPitch){t.preventDefault(),t.originalEvent.preventDefault();var i=t.points[0].y-t.points[1].y,r=t.points[0].x-t.points[1].x,n=Math.hypot(r,i);if(Math.abs(n-e.startDistance)>=e.minDiff)return e.dpPoint&&(e.map._getMap().touchZoomRotate.enable(),e.map._getMap().dragPan.enable(),e.map._getMap().touchZoomRotate.onStart(Date.now()-e.startTiming>=e.delay?t.originalEvent:e.startEventData.originalEvent)),void(e.dpPoint=void 0);if(Date.now()-e.startTiming>=e.delay){var o=.5*(e.dpPoint.y-t.point.y);e.map._getMap().setPitch(e.dpPitch+o)}}},this._onTouchEnd=function(){e.dpPoint&&(e.map._getMap().touchZoomRotate.enable(),e.map._getMap().dragPan.enable()),e.dpPoint=void 0},this._onTouchCancel=function(){e.dpPoint&&(e.map._getMap().touchZoomRotate.enable(),e.map._getMap().dragPan.enable()),e.dpPoint=void 0},this.map=t}var If=(Ef.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},Ef.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)},Ef);function Ef(t){var e=this;this._onGestureStart=function(t){e.hasTouch||(t.preventDefault(),e.initZoom=e.map.getCamera().zoom)},this._onGestureChange=function(t){e.hasTouch||(t.preventDefault(),e.map.setCamera({zoom:e.initZoom+t.scale-1}))},this._onTouchStart=function(t){e.hasTouch=!0},this._onTouchEnd=function(t){0===t.touches.length&&(e.hasTouch=!1)},this.map=t}var Mf=(Af.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},Af.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},Af.prototype.setOptions=function(t){this.options=(new xf).merge(this.options,t),this.added&&this._setInteractions(this.options)},Af.prototype.getOptions=function(){return Object.assign({},this.options)},Af.prototype._setInteractions=function(t){t.interactive?(t.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),t.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),t.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),t.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),t.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),t.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(t.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),t.touchInteraction?(this.map._getMap().touchZoomRotate.enable(),this.mobilePitch.enable()):(this.map._getMap().touchZoomRotate.disable(),this.mobilePitch.disable()),this.pinchZoom.enable()):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.mobilePitch.disable(),this.pinchZoom.disable())},Af);function Af(t,e){this.added=!1,this.map=t,this.mobilePitch=new Tf(t),this.focusShortcut=new wf(t),this.pinchZoom=new If(t),this.options=(new xf).merge(e)}var Lf=r((function(t){var e=(e=function(t){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},e.prototype._singletonInstance)return e.prototype._singletonInstance;if((e.prototype._singletonInstance=this).instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,t.displayCall&&"function"!=typeof t.displayCall)throw new Error("displayCall is not a function");if(!t.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(t),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(t){}}
2),e.prototype.login=function(){if(this._loginInProgress)this.info("Login in progress");else{this._loginInProgress=!0;var t=this._guid();this.config.state=t,this._idTokenNonce=this._guid();var e=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);e&&""!==e?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):e=window.location.href,this.verbose("Expected state: "+t+" startPage:"+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,t,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var i=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(i):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(t),this.registerCallback(t,this.config.clientId,this.callback),this._loginPopup(i)):this.promptUser(i)}},e.prototype._openPopup=function(t,e,i,r){try{var n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=a/2-i/2+n,u=s/2-r/2+o,c=window.open(t,e,"width="+i+", height="+r+", top="+u+", left="+l);return c.focus&&c.focus(),c}catch(t){return this.warn("Error opening popup, "+t.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},e.prototype._handlePopupError=function(t,e,i,r,n){this.warn(r),this._saveItem(this.CONSTANTS.STORAGE.ERROR,i),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,r),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,n),e&&this._activeRenewals[e]&&(this._activeRenewals[e]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,t&&t(r,null,i)},e.prototype._loginPopup=function(t,e,i){var r=this._openPopup(t,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),n=i||this.callback;if(null!=r){if(this._openedWindows.push(r),-1!=this.config.redirectUri.indexOf("#"))var o=this.config.redirectUri.split("#")[0];else o=this.config.redirectUri;var a=this,s=window.setInterval((function(){if(!r||r.closed||void 0===r.closed){var t="Popup Window closed",i="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return a.isAngular&&a._broadcast("adal:popUpClosed",i+a.CONSTANTS.RESOURCE_DELIMETER+t),a._handlePopupError(n,e,t,i,i),void window.clearInterval(s)}try{var l=r.location;if(-1!=encodeURI(l.href).indexOf(encodeURI(o)))return a.isAngular?a._broadcast("adal:popUpHashChanged",l.hash):a.handleWindowCallback(l.hash),window.clearInterval(s),a._loginInProgress=!1,a._acquireTokenInProgress=!1,a.info("Closing popup window"),a._openedWindows=[],void r.close()}catch(t){}}),1)}else{var l="Popup Window is null. This can happen if you are using IE";this._handlePopupError(n,e,"Error opening popup",l,l)}},e.prototype._broadcast=function(t,e){function i(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}"function"!=typeof window.CustomEvent&&(i.prototype=window.Event.prototype,window.CustomEvent=i);var r=new CustomEvent(t,{detail:e});window.dispatchEvent(r)},e.prototype.loginInProgress=function(){return this._loginInProgress},e.prototype._hasResource=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return e&&!this._isEmpty(e)&&-1<e.indexOf(t+this.CONSTANTS.RESOURCE_DELIMETER)},e.prototype.getCachedToken=function(t){if(!this._hasResource(t))return null;var e=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t),i=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t),r=this.config.expireOffsetSeconds||300;return i&&i>this._now()+r?e:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0),null)},e.prototype.getCachedUser=function(){if(this._user)return this._user;var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(t),this._user}
2,e.prototype.registerCallback=function(t,e,i){this._activeRenewals[e]=t,this._callBacksMappedToRenewStates[t]||(this._callBacksMappedToRenewStates[t]=[]);var r=this;this._callBacksMappedToRenewStates[t].push(i),this._callBackMappedToRenewStates[t]||(this._callBackMappedToRenewStates[t]=function(i,n,o,a){r._activeRenewals[e]=null;for(var s=0;s<r._callBacksMappedToRenewStates[t].length;++s)try{r._callBacksMappedToRenewStates[t][s](i,n,o,a)}catch(o){r.warn(o)}r._callBacksMappedToRenewStates[t]=null,r._callBackMappedToRenewStates[t]=null})},e.prototype._renewToken=function(t,e,i){this.info("renewToken is called for resource:"+t);var r=this._addAdalFrame("adalRenewFrame"+t),n=this._guid()+"|"+t;this.config.state=n,this._renewStates.push(n),this.verbose("Renew token Expected state: "+n),i=i||"token";var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl(i,t),"prompt");i===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),o+="&nonce="+encodeURIComponent(this._idTokenNonce)),o+="&prompt=none",o=this._addHintParameters(o),this.registerCallback(n,t,e),this.verbosePii("Navigate to:"+o),r.src="about:blank",this._loadFrameTimeout(o,"adalRenewFrame"+t,t)},e.prototype._renewIdToken=function(t,e){this.info("renewIdToken is called");var i=this._addAdalFrame("adalIdTokenFrame"),r=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=r,this._renewStates.push(r),this.verbose("Renew Idtoken Expected state: "+r);var n=null==e?null:this.config.clientId,o=(e=e||"id_token",this._urlRemoveQueryStringParameter(this._getNavigateUrl(e,n),"prompt"));o+="&prompt=none",o=this._addHintParameters(o),o+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(r,this.config.clientId,t),this.verbosePii("Navigate to:"+o),i.src="about:blank",this._loadFrameTimeout(o,"adalIdTokenFrame",this.config.clientId)},e.prototype._urlContainsQueryStringParameter=function(t,e){return new RegExp("[\\?&]"+t+"=").test(e)},e.prototype._urlRemoveQueryStringParameter=function(t,e){var i=new RegExp("(\\&"+e+"=)[^&]+");return t=t.replace(i,""),i=new RegExp("("+e+"=)[^&]+&"),t=t.replace(i,""),i=new RegExp("("+e+"=)[^&]+"),t.replace(i,"")},e.prototype._loadFrameTimeout=function(t,e,i){this.verbose("Set loading state to pending for: "+i),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(t,e);var r=this;setTimeout((function(){if(r._getItem(r.CONSTANTS.STORAGE.RENEW_STATUS+i)===r.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS){r.verbose("Loading frame has timed out after: "+r.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+i);var t=r._activeRenewals[i];t&&r._callBackMappedToRenewStates[t]&&r._callBackMappedToRenewStates[t]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),r._saveItem(r.CONSTANTS.STORAGE.RENEW_STATUS+i,r.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)}}),r.CONSTANTS.LOADFRAME_TIMEOUT)},e.prototype._loadFrame=function(t,e){var i=this;i.info("LoadFrame: "+e);var r=e;setTimeout((function(){var e=i._addAdalFrame(r);""!==e.src&&"about:blank"!==e.src||(e.src=t,i._loadFrame(t,r))}),500)},e.prototype.acquireToken=function(t,e){if(this._isEmpty(t))return this.warn("resource is required"),void e("resource is required",null,"resource is required");var i=this.getCachedToken(t);return i?(this.info("Token is already in cache for resource:"+t),void e(null,i,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[t]?this.registerCallback(this._activeRenewals[t],t,e):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,t===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(e)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(t,e)):(this.verbose("renewing idtoken and access_token"),this._renewToken(t,e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void e("User login is required",null,"login required"))}
2,e.prototype.acquireTokenPopup=function(t,e,i,r){if(this._isEmpty(t))return this.warn("resource is required"),void r("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void r("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var n=this._guid()+"|"+t;this.config.state=n,this._renewStates.push(n),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+n);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this.registerCallback(n,t,r),this._loginPopup(o,t,r)},e.prototype.acquireTokenRedirect=function(t,e,i){if(this._isEmpty(t))return this.warn("resource is required"),void r("resource is required",null,"resource is required");var r=this.callback;if(!this._user)return this.warn("User login is required"),void r("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var n=this._guid()+"|"+t;this.config.state=n,this.verbose("Renew token Expected state: "+n);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,n,!0),this.promptUser(o)},e.prototype.promptUser=function(t){t?(this.infoPii("Navigate to:"+t),window.location.replace(t)):this.info("Navigate url is empty")},e.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(t)){t=t.split(this.CONSTANTS.RESOURCE_DELIMETER);for(var e=0;e<t.length&&""!==t[e];e++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t[e],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t[e],0)}this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},e.prototype.clearCacheForResource=function(t){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(t)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0))},e.prototype.logOut=function(){var t;if(this.clearCache(),this._user=null,this.config.logOutUri)t=this.config.logOutUri;else{var e="common",i="";this.config.tenant&&(e=this.config.tenant),this.config.postLogoutRedirectUri&&(i="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),t=this.instance+e+"/oauth2/logout?"+i}this.infoPii("Logout navigate to: "+t),this.promptUser(t)},e.prototype._isEmpty=function(t){return void 0===t||!t||0===t.length},e.prototype.getUser=function(t){if("function"!=typeof t)throw new Error("callback is not a function");if(this._user)t(null,this._user);else{var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);this._isEmpty(e)?(this.warn("User information is not available"),t("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(e),t(null,this._user))}},e.prototype._addHintParameters=function(t){if(this._user&&this._user.profile)if(this._user.profile.sid&&-1!==t.indexOf("&prompt=none"))this._urlContainsQueryStringParameter("sid",t)||(t+="&sid="+encodeURIComponent(this._user.profile.sid));else if(this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",t)||(t+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",t)&&-1<this._user.profile.upn.indexOf("@"))){var e=this._user.profile.upn.split("@");t+="&domain_hint="+encodeURIComponent(e[e.length-1])}return t},e.prototype._createUser=function(t){var e=null,i=this._extractIdToken(t);return i&&i.hasOwnProperty("aud")&&(i.aud.toLowerCase()===this.config.clientId.toLowerCase()?(e={userName:"",profile:i},i.hasOwnProperty("upn")?e.userName=i.upn:i.hasOwnProperty("email")&&(e.userName=i.email)):this.warn("IdToken has
2invalid aud field")),e},e.prototype._getHash=function(t){return-1<t.indexOf("#/")?t=t.substring(t.indexOf("#/")+2):-1<t.indexOf("#")&&(t=t.substring(1)),t},e.prototype.isCallback=function(t){t=this._getHash(t);var e=this._deserialize(t);return e.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},e.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},e.prototype.getRequestInfo=function(t){t=this._getHash(t);var e=this._deserialize(t),i={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(e&&((i.parameters=e).hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){i.valid=!0;var r="";if(!e.hasOwnProperty("state"))return this.warn("No state returned"),i;if(this.verbose("State: "+e.state),r=e.state,i.stateResponse=r,this._matchState(i))return i;if(!i.stateMatch&&window.parent){i.requestType=this._requestType;for(var n=this._renewStates,o=0;o<n.length;o++)if(n[o]===i.stateResponse){i.stateMatch=!0;break}}}return i},e.prototype._matchNonce=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);if(e){e=e.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<e.length;i++)if(e[i]===t.profile.nonce)return!0}return!1},e.prototype._matchState=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);if(e){e=e.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<e.length;i++)if(e[i]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.LOGIN,t.stateMatch=!0}var r=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);if(r)for(r=r.split(this.CONSTANTS.CACHE_DELIMETER),i=0;i<r.length;i++)if(r[i]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.RENEW_TOKEN,t.stateMatch=!0;return!1},e.prototype._getResourceFromState=function(t){if(t){var e=t.indexOf("|");if(-1<e&&e+1<t.length)return t.substring(e+1)}return""},e.prototype.saveTokenFromHash=function(t){this.info("State status:"+t.stateMatch+"; Request type:"+t.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var e,i=this._getResourceFromState(t.stateResponse);t.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)?(this.infoPii("Error :"+t.parameters.error+"; Error description:"+t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,t.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),t.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,t.parameters.error_description))):t.stateMatch?(this.info("State is right"),t.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,t.parameters[this.CONSTANTS.SESSION_STATE]),t.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(i)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+i+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+i,t.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+i,this._expiresIn(t.parameters[this.CONSTANTS.EXPIRES_IN]))),t.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(t.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,t.parameters[this.CONSTANTS.ID_TOKEN]),i=this.config.loginResource?this.config.loginResource:this.config.clientId,this._hasResource(i)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+i+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+i,t.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+i,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(t.parameters.error="invalid id_token",t.parameters.error_description="Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN])))):(t.parameters.error="Invalid_state",t.parameters.error_description="Invalid_state. state: "+t.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+t.stateResponse)),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},e.prototype.getResourceForEndpoint=function(t){if(this.config&&this.config.anonymousEndpoints)for(var e=0;e<this.config.anonymousEndpoints.length;e++)if(-1<t.indexOf(this.config.anonymousEndpoints[e]))return null;if(this.config&&this.config.endpoints)for(var i in this.config.endpoints)if(-1<t.indexOf(i))return this.config.endpoints[i];return(-1<t.indexOf("http://")||-1<t.indexOf("https://"))&&this._getHostFromUri(t)!==this._getHostFromUri(this.config.redirectUri)?null:this.config.loginResource},e.prototype._getHostFromUri=function(t){var e=String(t).replace(/^(https?:)\/\//,"");return e.split("/")[0]},e.prototype.handleWindowCallback=function(t){if(null==t&&(t=window.location.hash),this.isCallback(t)){var e=null,i=!1;0<this._openedWindows.length&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(e=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,i=!0):window.parent&&window.parent._adalInstance&&(e=window.parent._adalInstance);var r,n,o=e.getRequestInfo(t),a=null;n=i||window.parent!==window?e._callBackMappedToRenewStates[o.stateResponse]:e.callback,e.info("Returned from redirect url"),e.saveTokenFromHash(o),o.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?e.verbose("Window is in iframe, acquiring token silently"):e.verbose("acquiring token interactive in progress"),r=o.parameters[e.CONSTANTS.ACCESS_TOKEN]||o.parameters[e.CONSTANTS.ID_TOKEN],a=e.CONSTANTS.ACCESS_TOKEN):o.requestType===this.REQUEST_TYPE.LOGIN&&(r=o.parameters[e.CONSTANTS.ID_TOKEN],a=e.CONSTANTS.ID_TOKEN);var s=o.parameters[e.CONSTANTS.ERROR_DESCRIPTION],l=o.parameters[e.CONSTANTS.ERROR];try{n&&n(s,r,l,a)}catch(t){e.error("Error occurred in user defined callback function: "+t)}window.parent!==window||i||(e.config.navigateToLoginRequestUrl?window.location.href=e._getItem(e.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},e.prototype._getNavigateUrl=function(t,e){var i="common";this.config.tenant&&(i=this.config.tenant);var r=this.instance+i+"/oauth2/authorize"+this._serialize(t,this.config,e)+this._addLibMetadata();return this.info("Navigate url:"+r),r},e.prototype._extractIdToken=function(t){var e=this._decodeJwt(t);if(!e)return null;try{var i=e.JWSPayload,r=this._base64DecodeStringUrlSafe(i);return r?JSON.parse(r):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(t){this.error("The returned id_token could not be decoded",t)}return null},e.prototype._base64DecodeStringUrlSafe=function(t){return t=t.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(t))):decodeURIComponent(escape(this._decode(t)))},e.prototype._decode=function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/=",i=(t=String(t).replace(/=+$/,"")).length;if(i%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var r,n,o,a,s,l,u,c,p="",h=0;h<i;h+=4){if(r=e.indexOf(t.charAt(h)),n=e.indexOf(t.charAt(h+1)),o=e.indexOf(t.charAt(h+2)),a=e.indexOf(t.charAt(h+3)),h+2===i-1){l=(s=r<<18|n<<12|o<<6)>>16&255,u=s>>8&255,p+=String.fromCharCode(l,u);break}if(h+1===i-1){l=(s=r<<18|n<<12)>>16&255,p+=String.fromCharCode(l);break}l=(s=r<<18|n<<12|o<<6|a)>>16&255,u=s>>8&255,c=255&s,p+=String.fromCharCode(l,u,c)}return p},e.prototype._decodeJwt=function(t){if(this._isEmpty(t))return null;var e=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);return!e||e.length<4?(this.warn("The returned id_token is not parseable."),null):{header:e[1],JWSPayload:e[2],JWSSig:e[3]}},e.prototype._convertUrlSafeToRegularBase64EncodedString=function(t){return t.replace("-","+").replace("_","/")},e.prototype._serialize=function(t,e,i){var r=[];if(null!==e){r.push("?response_type="+t),r.push("client_id="+encodeURIComponent(e.clientId)),i&&r.push("resource="+encodeURIComponent(i)),r.push("redirect_uri="+encodeURIComponent(e.redirectUri)),r.push("state="+encodeURIComponent(e.state)),e.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(e.slice)),e.hasOwnProperty("extraQueryParameter")&&r.push(e.extraQueryParameter);var n=e.correlationId?e.correlationId:this._guid();r.push("client-request-id="+encodeURIComponent(n))}return r.join("&")},e.prototype._deserialize=function(t){function e(t){return decodeURIComponent(t.replace(r," "))}var i,r=/\+/g,n=/([^&=]+)=([^&]*)/g,o={};for(i=n.exec(t);i;)o[e(i[1])]=e(i[2]),i=n.exec(t);return o},e.prototype._decimalToHex=function(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e},e.prototype._guid=function(){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues){var e=new Uint8Array(16);return t.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,this._decimalToHex(e[0])+this._decimalToHex(e[1])+this._decimalToHex(e[2])+this._decimalToHex(e[3])+"-"+this._decimalToHex(e[4])+this._decimalToHex(e[5])+"-"+this._decimalToHex(e[6])+this._decimalToHex(e[7])+"-"+this._decimalToHex(e[8])+this._decimalToHex(e[9])+"-"+this._decimalToHex(e[10])+this._decimalToHex(e[11])+this._decimalToHex(e[12])+this._decimalToHex(e[13])+this._decimalToHex(e[14])+this._decimalToHex(e[15])}for(var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",n=0,o="",a=0;a<36;a++)"-"!==i[a]&&"4"!==i[a]&&(n=16*Math.random()|0),"x"===i[a]?o+=r[n]:"y"===i[a]?(n&=3,o+=r[n|=8]):o+=i[a];return o},e.prototype._expiresIn=function(t){return t=t||3599,this._now()+parseInt(t,10)},e.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},e.prototype._addAdalFrame=function(t){if(void 0!==t){this.info("Add adal frame to document:"+t);var e=document.getElementById(t);if(!e){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var i=document.createElement("iframe");i.setAttribute("id",t),i.setAttribute("aria-hidden","true"),i.style.visibility="hidden",i.style.position="absolute",i.style.width=i.style.height=i.borderWidth="0px",e=document.getElementsByTagName("body")[0].appendChild(i)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+t+'" id="'+t+'" style="display:none"></iframe>');window.frames&&window.frames[t]&&(e=window.frames[t])}return e}},e.prototype._saveItem=function(t,e,i){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(i){var r=this._getItem(t)||"";localStorage.setItem(t,r+e+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(t,e);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(t,e),!0):(this.info("Session storage is not supported"),!1)},e.prototype._getItem=function(t){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(t):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(t):(this.info("Session storage is not supported"),null)},e.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(t){return!1}},e.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(t){return!1}},e.prototype._cloneConfig=function(t){if(null===t||"object"!=typeof t)return t;var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},e.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()}
2,e.prototype.log=function(t,e,i,r){if(t<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var n=(new Date).toUTCString(),o="";o=this.config.correlationId?n+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e:n+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e,i&&(o+="\nstack:\n"+i.stack),Logging.log(o)}},e.prototype.error=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e)},e.prototype.warn=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null)},e.prototype.info=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null)},e.prototype.verbose=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null)},e.prototype.errorPii=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e,!0)},e.prototype.warnPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null,!0)},e.prototype.infoPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null,!0)},e.prototype.verbosePii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null,!0)},e.prototype._libVersion=function(){return"1.0.17"},t.exports&&(t.exports=e,t.exports.inject=function(t){return new e(t)}),e)}));function kf(t){this.message=t}Lf.inject,(kf.prototype=new Error).name="InvalidCharacterError";var Pf="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new kf("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,n=0,o=0,a="";r=e.charAt(o++);~r&&(i=n%4?64*i+r:r,n++%4)&&(a+=String.fromCharCode(255&i>>(-2*n&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function Df(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(Pf(e).replace(/(.)/g,(function(t,e){var i=e.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i})))}catch(t){return Pf(e)}}function zf(t){this.message=t}function Of(t,e){if("string"!=typeof t)throw new zf("Invalid token specified");var i=!0===(e=e||{}).header?0:1;try{return JSON.parse(Df(t.split(".")[i]))}catch(t){throw new zf("Invalid token specified: "+t.message)}}(zf.prototype=new Error).name="InvalidTokenError",Of.InvalidTokenError=zf;var Nf=(Rf.prototype.initialize=function(){var e=this;return this.initPromise||(this.initPromise=new Promise((function(i,r){if(e.options.authType===t.AuthenticationType.subscriptionKey)i();else if(e.options.authType===t.AuthenticationType.aad){if(e.options.authContext=e.options.authContext||Rf.getDefaultAuthContext(e.options),e.options.authContext.handleWindowCallback(),e.options.authContext.getLoginError())return void r(new Error("Error logging in the AAD users: "+e.options.authContext.getLoginError()));if(e.options.authContext.isCallback(window.location.hash))return void e.map.dispose();setTimeout((function(){return e._loginAndAcquire(i,r)}))}else e.options.authType===t.AuthenticationType.anonymous?i(e._triggerTokenFetch()):r(new Error("An invalid authentication type was specified."))}))),this.initPromise},Rf.getDefaultAuthContext=function(t){if(!t.aadAppId)throw new Error("No AAD app ID was specified.");if(!t.aadTenant)throw new Error("No AAD tenant was specified.");return this.defaultAuthContext||(this.defaultAuthContext=new Lf({instance:t.aadInstance||p,tenant:t.aadTenant,clientId:t.aadAppId,cacheLocation:this.constants.preferredCacheLocation})),this.defaultAuthContext},Rf.prototype._loginAndAcquire=function(t,e){function i(){r.options.authContext.acquireToken(_,(function(i){if(i)e(new Error(i));else{var n={map:r.map,type:Rf.constants.events.tokenAcquired};r.map.events.invoke(Rf.constants.events.tokenAcquired,n),t()}}))}var r=this,n=this.options.authContext.getCachedToken(this.options.aadAppId),o=this.options.authContext.getCachedUser();if(n&&o)i();else{this.options.authContext.loginInProgress()||this.options.authContext.login();var a=setInterval((function(){r.options.authContext.loginInProgress()||(clearInterval(a),r.options.authContext.getCachedToken(r.options.aadAppId)?i():e(new Error(r.options.authContext.getLoginError()||"The AAD authentication context is not logged-in for the specified app ID: "+r.o
2ptions.aadAppId)))}),25)}},Rf.prototype.getAuthType=function(){return this.options.authType},Rf.prototype.getClientId=function(){return this.options.clientId},Rf.prototype.getToken=function(){var e=this;if(this.options.authType===t.AuthenticationType.aad){var i=this.options.authContext.getCachedToken(_);return i||(this.options.authContext.getCachedUser()||this.options.authContext.login(),this.options.authContext.acquireToken(_,(function(t,r){if(!t){i=r;var n={map:e.map,type:Rf.constants.events.tokenAcquired};e.map.events.invoke(Rf.constants.events.tokenAcquired,n)}}))),i}if(this.options.authType===t.AuthenticationType.anonymous){var r=this._getItem(Rf.constants.storage.accessTokenKey);if(r){var n=this._getTokenExpiry(r);if(n<300&&0<n)this._triggerTokenFetch();else if(n<=0)throw this._saveItem(Rf.constants.storage.accessTokenKey,""),new Error(Rf.constants.errors.tokenExpired)}else this._triggerTokenFetch();return r}if(this.options.authType===t.AuthenticationType.subscriptionKey)return this.options.subscriptionKey},Rf.prototype._getTokenExpiry=function(t){var e=Of(t).exp,i=this._getCurrentTime();return 0<e-i?e-i:-1},Rf.prototype._storeAccessToken=function(t){this._saveItem(Rf.constants.storage.accessTokenKey,t);var e={map:this.map,type:Rf.constants.events.tokenAcquired};this.map.events.invoke(Rf.constants.events.tokenAcquired,e)},Rf.prototype._saveItem=function(t,e){return this._supportsLocalStorage()?(localStorage.setItem(t,e),!0):!!this._supportsSessionStorage()&&(sessionStorage.setItem(t,e),!0)},Rf.prototype._getItem=function(t){return this._supportsLocalStorage()?localStorage.getItem(t):this._supportsSessionStorage()?sessionStorage.getItem(t):null},Rf.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem(Rf.constants.storage.testStorageKey,"A"),"A"===window.localStorage.getItem(Rf.constants.storage.testStorageKey)&&(window.localStorage.removeItem(Rf.constants.storage.testStorageKey),!window.localStorage.getItem(Rf.constants.storage.testStorageKey)))}catch(t){return!1}},Rf.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem(Rf.constants.storage.testStorageKey,"A"),"A"===window.sessionStorage.getItem(Rf.constants.storage.testStorageKey)&&(window.sessionStorage.removeItem(Rf.constants.storage.testStorageKey),!window.sessionStorage.getItem(Rf.constants.storage.testStorageKey)))}catch(t){return!1}},Rf.prototype._getCurrentTime=function(){return Math.round((new Date).getTime()/1e3)},Rf.prototype.signRequest=function(e){e.headers=e.headers||{},e.headers[x]=this.sessionId,e.headers[y]=v,e.headers[m]="MapControl/"+z+" (Web)";var i=this.getToken();switch(this.options.authType){case t.AuthenticationType.aad:case t.AuthenticationType.anonymous:e.headers[g]=this.options.clientId,e.headers[h]=d+i;break;case t.AuthenticationType.subscriptionKey:if("url"in e)-1!==e.url.indexOf("?")?e.url+="&subscription-key="+i:e.url+="?&subscription-key="+i;else{if(!("domain"in e))throw new Error("Could not determine if the provided object was UrlOptions or RequestParameters");e.queryParams=e.queryParams||{},e.queryParams["subscription-key"]=i}break;default:throw new Error("An invalid authentication type was specified")}return e},Rf.constants={preferredCacheLocation:"localStorage",storage:{accessTokenKey:"access.token.key",testStorageKey:"testStorage"},events:{tokenAcquired:"tokenacquired"},tokenExpiresIn:3599,tokenRefreshClockSkew:300,errors:{tokenExpired:"Token Expired, Try again"}},Rf);function Rf(t){var e=this;this._triggerTokenFetch=function(){return new Promise((function(t,i){e.options.getToken((function(r){try{var n=e._getTokenExpiry(r)-Rf.constants.tokenRefreshClockSkew;e._storeAccessToken(r),clearTimeout(e.tokenTimeOutHandle),e.tokenTimeOutHandle=setTimeout(e._triggerTokenFetch,1e3*n),t()}catch(r){i(new Error("Invalid token returned by getToken function"))}}),(function(t){i(t)}),e.map)}))};var i=t.getServiceOptions();this.options=i.authOptions,this.sessionId=i.sessionId,this.map=t}var Bf=(jf.prototype.add=function(t,e){if(Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._add(n,e)}else this._add(t,e)},jf.prototype.getControls=function(){return Array.from(this.controls)},jf.prototype.remove=function(t){if(Array.isArray(t))for(var e=0,i=t;e<i.length;e++){var r=i[e];this._remove(r)}else this._remove(t)},jf.prototype._add=function(t,e){this.controls.add(t);var i=(new B).merge(e),r=t.onAdd(this.map,e),n=this.controlContainer.getElementsByClassName(i.position);if(!(0<n.length))throw new Error("Control position "+i.position+" does not exist.");n.item(0).appendChild(r)},jf.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},jf);function jf(e){for(var i in this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),t.ControlPosition)if(t.ControlPosition.hasOwnProperty(i)){var r=document.createElement("div");r.classList.add(t.ControlPosition[i]),r.classList.add("subcontrol-container"),this.controlContainer.appendChild(r)}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}
2var Ff=(Uf.prototype.addCallback=function(t,e,i,r,n){var o,a,s=this;if(r)o=function(t){var e=t.lngLat?new ho(t.lngLat.lng,t.lngLat.lat):void 0,r=t.point?[t.point.x,t.point.y]:void 0,n=t.features?t.features.map((function(t){return new nn(t.geometry,t.properties,t.id)})):[],o={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:r,features:n};i(o)};else switch(t){case"data":case"sourcedata":case"styledata":o=function(r){var o=S(S({dataType:r.dataType},"source"===r.dataType&&S(S(S({isSourceLoaded:r.isSourceLoaded},r.sourceDataType&&{sourceDataType:r.sourceDataType}),{source:s.map.sources.getById(r.sourceId)}),r.tile&&{tile:{id:{x:r.tile.tileID.canonical.x,y:r.tile.tileID.canonical.y,z:r.tile.tileID.canonical.z},size:r.tile.tileSize,state:r.tile.state}})),{map:s.map,type:r.type});n&&s.map.events._removeListener(t,e,i),i(o)};break;case"error":o=function(r){var o={error:r.error,map:s.map,type:r.type};n&&s.map.events._removeListener(t,e,i),i(o)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":o=function(r){if(r.originalEvent){if(r.originalEvent===a)return;a=r.originalEvent}var o=r.point?new sn(r.point.x,r.point.y):void 0,l=r.points?r.points.map((function(t){return new sn(t.x,t.y)})):[],u=r.lngLat?new ho(r.lngLat.lng,r.lngLat.lat):void 0,c=r.lngLats?r.lngLats.map((function(t){return new ho(t.lng,t.lat)})):[],p=u?s.map.layers.getRenderedShapes(new un(u),e?[e]:void 0):[],h={map:s.map,originalEvent:r.originalEvent,pixel:o,pixels:l,position:u,positions:c,shapes:p,layerId:e||void 0,preventDefault:function(){return r.preventDefault()},type:r.type};n&&s.map.events._removeListener(t,e,i),i(h)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":o=function(r){if(r.originalEvent){if(r.originalEvent===a)return;a=r.originalEvent}var o=r.lngLat?new ho(r.lngLat.lng,r.lngLat.lat):void 0,l=r.point?new sn(r.point.x,r.point.y):void 0,u=o?s.map.layers.getRenderedShapes(new un(o),e?[e]:void 0):[],c={map:s.map,originalEvent:r.originalEvent,position:o,pixel:l,preventDefault:function(){return r.preventDefault()},shapes:u,layerId:e||void 0,type:r.type};n&&s.map.events._removeListener(t,e,i),i(c)};break;case"styleimagemissing":o=function(r){n&&s.map.events._removeListener(t,e,i),i(r.id)};break;case"wheel":o=function(r){if(r.originalEvent){if(r.originalEvent===a)return;a=r.originalEvent}var o={map:s.map,originalEvent:r.originalEvent,preventDefault:function(){return r.preventDefault()},type:r.type};n&&s.map.events._removeListener(t,e,i),i(o)};break;case"resize":o=function(r){var o={map:s.map,type:r.type};for(var a in r)"type"!==a&&"target"!==a&&(o[a]=r[a]);n&&s.map.events._removeListener(t,e,i),i(o)};break;default:o=function(r){var o={map:s.map,type:r.type};r.originalEvent&&(o.originalEvent=r.originalEvent),n&&s.map.events._removeListener(t,e,i),i(o)}}this.callbacks.has(e)||this.callbacks.set(e,new hr),this.callbacks.get(e).has(t)||this.callbacks.get(e).set(t,new hr),this.callbacks.get(e).get(t).set(i,[o,n])},Uf.prototype.removeCallback=function(t,e,i){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(i)&&this.callbacks.get(e).get(t).delete(i)},Uf.prototype.getModifiedCallback=function(t,e,i){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(i))return this.callbacks.get(e).get(t).get(i)[0]},Uf.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},Uf.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){var i=this.callbacks.get(e);if(i.has(t))return i.get(t)}},Uf);function Uf(t){this.callbacks=new hr,this.map=t}var Vf=(qf.prototype.add=function(t,e,i){if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else for(var r=0,n=e=Array.isArray(e)?e:[e];r<n.length;r++){var o=n[r];o instanceof aa&&aa._isMBoxEvent(t)?this._addLayerListener(t,o,i,!1,!1):o._addEventListener(t,i,!1)}},qf.prototype.addOnce=function(t,e,i){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof aa&&aa._isMBoxEvent(t)?this._addLayerListener(t,e,i,!1,!0):e._addEventListener(t,i,!0)}
2,qf.prototype._addLegacy=function(t,e,i){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,i,!0,!1)},qf.prototype._addLayerListener=function(t,e,i,r,n){var o=e instanceof aa?e.getId():e,a=this.map.layers.getLayerById(o),s=this.mapCallbackHandler.getModifiedCallback(t,o,i);if(s&&a)for(var l=0,u=a._getLayerIds();l<u.length;l++){var c=u[l];this.map._getMap().off(t,c,s)}if(this.mapCallbackHandler.addCallback(t,o,i,r,n),a){s=this.mapCallbackHandler.getModifiedCallback(t,o,i);for(var p=0,h=a._getLayerIds();p<h.length;p++)c=h[p],this.map._getMap().on(t,c,s)}},qf.prototype._addGlobalListener=function(t,e,i,r){var n=this.mapCallbackHandler.getModifiedCallback(t,"",e);if(n&&this.map._getMap().off(t,n),this.mapCallbackHandler.addCallback(t,"",e,i,r),n=this.mapCallbackHandler.getModifiedCallback(t,"",e),"load"===t&&this.map._isLoaded()){var o={type:"load",map:this.map};setTimeout((function(){return n(o)}))}else if("ready"===t){if(this.map._isReady()){var a={type:"ready",map:this.map};setTimeout((function(){return n(a)}))}}else this.map._getMap().on(t,n)},qf.prototype.invoke=function(t,e,i){if(void 0===i)this._invokeListeners(t,"",e);else if(e instanceof aa&&aa._isMBoxEvent(t))this._invokeListeners(t,e.getId(),i);else{if(!(e instanceof yo))throw new Error("The invoke target is invalid.");e._invokeEvent(t,i)}},qf.prototype._invokeListeners=function(t,e,i){var r=this,n=this.mapCallbackHandler.getEventCallbacks(t,e);n?n.forEach((function(n,o){n[0],n[1]&&r._removeListener(t,e,o),o(i)})):"error"===t&&console.error("error"in i?i.error:i)},qf.prototype.remove=function(t,e,i){if("function"==typeof e)this._removeListener(t,"",e);else for(var r=0,n=e=Array.isArray(e)?e:[e];r<n.length;r++){var o=n[r];o instanceof aa&&aa._isMBoxEvent(t)?this._removeListener(t,o,i):o._removeEventListener(t,i)}},qf.prototype._removeLegacy=function(t,e,i){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,i)},qf.prototype._removeListener=function(t,e,i){var r=e instanceof aa?e.getId():e,n=this.mapCallbackHandler.getModifiedCallback(t,r,i);if(n)if(r){var o=this.map.layers.getLayerById(r);if(o)for(var a=0,s=o._getLayerIds();a<s.length;a++){var l=s[a];this.map._getMap().off(t,l,n)}}else this.map._getMap().off(t,n);this.mapCallbackHandler.removeCallback(t,r,i)},qf.prototype._enableLayerEvents=function(t){var e=this,i=this.mapCallbackHandler.getLayerCallbacks(t.getId());i&&i.forEach((function(i,r){i.forEach((function(i){for(var n=i[0],o=0,a=t._getLayerIds();o<a.length;o++){var s=a[o];e.map._getMap().on(r,s,n)}}))}))},qf.prototype._disableLayerEvents=function(t){var e=this,i=this.mapCallbackHandler.getLayerCallbacks(t.getId());i&&i.forEach((function(i,r){i.forEach((function(i){for(var n=i[0],o=0,a=t._getLayerIds();o<a.length;o++){var s=a[o];e.map._getMap().off(r,s,n)}}))}))},qf);function qf(t){this.map=t,this.mapCallbackHandler=new Ff(this.map)}var Gf=(Zf.prototype.add=function(t,e){if(Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._addMarker(n,e)}else this._addMarker(t,e)},Zf.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},Zf.prototype.getMarkers=function(){return Array.from(this.markers)},Zf.prototype.remove=function(t){if(Array.isArray(t))for(var e=0,i=t;e<i.length;e++){var r=i[e];this._removeMarker(r)}else this._removeMarker(t)},Zf.prototype._removeMarker=function(t){var e=this;t instanceof Rs?(t._removeFromMap(),this.markers.delete(t)):this.markers.forEach((function(i){i._getId()===t&&(i._removeFromMap(),e.markers.delete(i))}))},Zf.prototype.clear=function(){var t=this;this.markers.forEach((function(e){e._removeFromMap(),t.markers.delete(e)}))},Zf);function Zf(t){this.markers=new Set,this.map=t}var Hf=(Wf.prototype.add=function(t,e){var i=this;return new Promise((function(r,n){if(i.userImages.has(t))r();else if(e instanceof HTMLImageElement||e instanceof ImageData)i.map._getMap().addImage(t,e),i.userImages.set(t,e),r();else if("string"==typeof e){var o,a=void 0;a=/<svg/i.test(e)&&!/^data:/i.test(e)?"data:image/svg+xml;base64,"+window.btoa(e):e;var s=!1;i.map._sendRequest(a,"Image").then((function(t){if(!s)return t.blob()})).then((function(e){if(!s){clearTimeout(o);var a=new Image;a.onload=function(){i.map._getMap().addImage(t,a),i.userImages.set(t,a),r()},a.onerror=a.onabort=function(){n("Failed to load image into HTML element.")},a.src=URL.createObjectURL(e)}})).catch((function(){s||(clearTimeout(o),n("Failed to load image into HTML element."))})),o=setTimeout((function(){s=!0,n("Failed to load image within specified timeout: "+i.imageLoadTimeout+" ms.")}),i.imageLoadTimeout)}}))},Wf.prototype.clear=function(){var t=this;
2this.userImages.forEach((function(e,i){t.map._getMap().removeImage(i)})),this.userImages.clear()},Wf.prototype.getImageIds=function(){var t=[];return this.userImages.forEach((function(e,i){t.push(i)})),t},Wf.prototype.createFromTemplate=function(t,e,i,r,n){i=i||"#1A73AA",r=r||"#fff";var o=Vl(e,n);return o=o.replace(/{color}/g,i).replace(/{secondaryColor}/g,r).replace(/{text}/g,""),this.add(t,o)},Wf.prototype.hasImage=function(t){return this.userImages.has(t)},Wf.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},Wf.prototype._restoreImages=function(){var t=this;this.userImages.forEach((function(e,i){t.map._getMap().hasImage(i)||t.map._getMap().addImage(i,e)}))},Wf);function Wf(t){this.userImages=new hr,this.imageLoadTimeout=5e3,this.map=t}var Yf=(Kf.prototype.add=function(t,e,i){void 0===i&&(i=!0);var r=e instanceof aa?e.getId():e;if(Array.isArray(t))for(var n=0,o=t;n<o.length;n++){var a=o[n];this._addLayer(a,r,i)}else this._addLayer(t,r,i)},Kf.prototype._addLayer=function(t,e,i){if(e!==t.getId()&&this.layersById.has(e))if(this.layersById.has(t.getId())){var r=this.layers.findIndex((function(e){return e.getId()===t.getId()})),n=this.layers[r];i&&(this._removeMapboxLayers(n),this._addMapboxLayers(t,e)),this.map.events._disableLayerEvents(n),this.map.events._enableLayerEvents(t),this.layersById.set(t.getId(),t),this.layers.splice(r,1);var o=this.layers.findIndex((function(t){return t.getId()===e}));this.layers.splice(o,0,t),n.onRemove(),t.onAdd(this.map)}else i&&this._addMapboxLayers(t,e),o=this.layers.findIndex((function(t){return t.getId()===e})),this.layers.splice(o,0,t),this.layersById.set(t.getId(),t),this.map.events._enableLayerEvents(t),t.onAdd(this.map);else this.layersById.has(t.getId())?(r=this.layers.findIndex((function(e){return e.getId()===t.getId()})),n=this.layers[r],i&&(this._removeMapboxLayers(n),this._addMapboxLayers(t,r+1)),this.map.events._disableLayerEvents(n),this.map.events._enableLayerEvents(t),this.layersById.set(t.getId(),t),this.layers[r]=t,n.onRemove()):(i&&this._addMapboxLayers(t),this.layersById.set(t.getId(),t),this.layers.push(t),this.map.events._enableLayerEvents(t)),t.onAdd(this.map)},Kf.prototype._addMapboxLayers=function(t,e){if(!this.map._isReady())throw new Error("The layer '"+t.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");if(!(t instanceof ms)||t.getOptions().tileUrl){t instanceof La&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());for(var i=this._getMapboxBefore(e),r=0,n=t._buildLayers();r<n.length;r++){var o=n[r];this.map._getMap().addLayer(o,i)}}},Kf.prototype._removeMapboxLayers=function(t){for(var e=0,i=t._getLayerIds();e<i.length;e++){var r=i[e];this.map._getMap().getLayer(r)&&this.map._getMap().removeLayer(r)}t instanceof La&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())},Kf.prototype._getMapboxBefore=function(t){if("string"==typeof t){var e=this.layersById.get(t);if(!e)return;for(var i=0,r=e._getLayerIds();i<r.length;i++){var n=r[i];if(this.map._getMap().getLayer(n))return n}t=this.layers.findIndex((function(e){return e.getId()===t}))+1}for(var o=t;o<this.layers.length;o++)for(var a=0,s=this.layers[o]._getLayerIds();a<s.length;a++)if(n=s[a],this.map._getMap().getLayer(n))return n},Kf.prototype.clear=function(){for(var t=this.layers.length-1;0<=t;t--){var e=this.layers[t];this._removeMapboxLayers(e),this.map.events._disableLayerEvents(e),this.layersById.delete(e.getId()),this.layers.splice(t,1),e.onRemove()}},Kf.prototype.getLayerById=function(t){return this.layersById.get(t)},Kf.prototype.getLayers=function(){return this.layers.slice(0)},Kf.prototype._getSourceIds=function(){for(var t=new Set,e=0,i=this.layers;e<i.length;e++)i[e]._getSourceIds().forEach((function(e){return t.add(e)}));return t},Kf.prototype.move=function(t,e){var i=t instanceof aa?t.getId():t,r=e instanceof aa?e.getId():e;if(!this.layersById.has(i))throw new Error("The layer '"+i+"' has not been added to the map and cannot be moved.");var n=this.layers.findIndex((function(t){return t.getId()===i}));if(this._moveMapboxLayers(this.layers[n],r),t=this.layers[n],this.layers.splice(n,1),this.layersById.has(r)){var o=this.layers.findIndex((function(t){return t.getId()===r}));this.layers.splice(o,0,t)}else this.layers.push(t)},Kf.prototype._moveMapboxLayers=function(t,e){for(var i=this._getMapboxBefore(e),r=0,n=t._getLayerIds();r<n.length;r++){var o=n[r];this.map._getMap().moveLayer(o,i)}}
2,Kf.prototype.getRenderedShapes=function(t,e,i){var r,n,o=this;if(t=t||[-180,-85.0511,180,85.0511],Array.isArray(t)?4===t.length||6===t.length?r=this.map.positionsToPixels([Eo.getSouthWest(t),Eo.getNorthEast(t)]):2!==t.length&&3!==t.length||(r=this.map.positionsToPixels([t])[0]):r=this.map.positionsToPixels([t.coordinates])[0],e){n=[];for(var a=0,s=e=Array.isArray(e)?e:[e];a<s.length;a++){var l=s[a],u=l instanceof aa?l.getId():l;if(!this.layersById.has(u))throw new Error("The layer '"+u+"' has not been added to the map and its rendered features cannot be retrieved.");n.push.apply(n,this.layersById.get(u)._getLayerIds().filter((function(t){return!!o.map._getMap().getLayer(t)})))}}var c=this.map._getMap().queryRenderedFeatures(r,{layers:n,filter:i});return this.map.sources._mapFeaturesToShapes(c)},Kf.prototype.remove=function(t,e){if(void 0===e&&(e=!0),Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._removeLayer(n,e)}else this._removeLayer(t,e)},Kf.prototype._removeLayer=function(t,e){var i=t instanceof aa?t.getId():t;if(!this.layersById.has(i))throw new Error("The layer '"+i+"' has not been added to the map and cannot be removed.");var r=this.layers.findIndex((function(t){return t.getId()===i})),n=this.layers[r];e&&this._removeMapboxLayers(n),this.layersById.delete(i),this.layers.splice(r,1),this.map.events._disableLayerEvents(n),n.onRemove()},Kf);function Kf(t){this.layersById=new hr,this.layers=[],this.map=t}var Xf=(Jf.prototype.add=function(t){for(var e=0,i=t=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];this.popups.has(r)||(this.popups.add(r),r.attach(this.map))}},Jf.prototype.clear=function(){var t=this;this.popups.forEach((function(e){t.popups.delete(e),e.remove()}))},Jf.prototype.remove=function(t){for(var e=0,i=t=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];this.popups.has(r)&&(this.popups.delete(r),r.remove())}},Jf.prototype.getPopups=function(){return Array.from(this.popups)},Jf.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+Jf.Css.collection);return t||((t=document.createElement("div")).classList.add(Jf.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Jf.prototype._addDraggedPopup=function(t){0===this.draggedPopups.size&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp)),this.draggedPopups.add(t)},Jf.Css={collection:"popup-collection-container"},Jf);function Jf(t){var e=this;this._onDrag=function(t){var i,r;"mousemove"===t.type?(i=t.clientX,r=t.clientY):"touchmove"===t.type&&(i=t.touches[0].clientX,r=t.touches[0].clientY),e.draggedPopups.forEach((function(t){t._dragToPixel([i,r])}))},this._onUp=function(){e.map.getMapContainer().removeEventListener("mousemove",e._onDrag),e.map.getMapContainer().removeEventListener("touchmove",e._onDrag),e.map.getMapContainer().removeEventListener("mouseup",e._onUp),e.map.getMapContainer().removeEventListener("touchend",e._onUp),e.draggedPopups.forEach((function(t){e.draggedPopups.delete(t),t._onUp()}))},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var Qf=($f.prototype.add=function(t,e){if(void 0===e&&(e=!0),Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._addSource(n,e)}else this._addSource(t,e)},$f.prototype.getRenderedShapes=function(t,e,i){var r="string"==typeof t?t:t.getId(),n=this.map._getMap().querySourceFeatures(r,{sourceLayer:i,filter:e});return this.map.sources._mapFeaturesToShapes(n,!0,this.sources.get(r))},$f.prototype._buildSources=function(){var t={};return this.sources.forEach((function(e){t[e.getId()]=e._buildSource()})),t},$f.prototype.clear=function(){var t=this;this.sources.forEach((function(e){t.remove(e)}))},$f.prototype.getById=function(t){return this.sources.get(t)},$f.prototype.getSources=function(){return Array.from(this.sources.values())},$f.prototype.isSourceLoaded=function(t){var e=t instanceof Wo?t.getId():t;return this.map._getMap().isSourceLoaded(e)},$f.prototype.remove=function(t,e){if(void 0===e&&(e=!0),Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._removeSource(n,e)}else this._removeSource(t,e)},$f.prototype._removeSource=function(t,e){var i=t instanceof Wo?t.getId():t;if(this.sources.has(i)){if(this.map._getMap().getSource(i)&&e&&this.map._getMap().removeSource(i),this.map._getMap().getSource(i)&&e)throw new Error("One or more layers have a dependency on the source '"+i+"'");return this.sources.get(i)._setMap(null),void this.sources.delete(i)}throw new Error("'"+i+"' is not added to the map")},$f.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'"+t.getId()+"' is already added to the map");this.sources.get(t.getId())._setMap(null),this.sources.delete(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '"+t.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(t.getId(),t._buildSource())}this.sources.set(t.getId(),t),t._setMap(this.map)}
2,$f.prototype._mapFeaturesToShapes=function(t,e,i){for(var r=[],n=0,o=t;n<o.length;n++){var a=o[n];if((i||"string"==typeof a.source)&&"string"==typeof a.properties[To._shapeIdPropName]){var s=i||this.sources.get(a.source);if(s instanceof Xo){var l=s.getShapeById(a.properties[To._shapeIdPropName]);if(l instanceof To){r.push(l);continue}}}e||r.push(a)}return r},$f);function $f(t){this.map=t,this.sources=new hr}var tm,em=(w(im,tm=I),im);function im(){var t=null!==tm&&tm.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var rm,nm=(w(om,rm=I),om);function om(){var t=null!==rm&&rm.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var am,sm=(w(lm,am=I),lm.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var n=r[i];n&&"number"==typeof n.padding&&(n.padding={top:n.padding,bottom:n.padding,left:n.padding,right:n.padding})}return am.prototype.merge.apply(this,t)},lm);function lm(){var t=null!==am&&am.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new sn(0,0),t.padding=new nm,t}var um,cm=(w(pm,um=I),pm);function pm(){var t=null!==um&&um.apply(this,arguments)||this;return t.zoom=1,t.center=new ho(0,0),t.centerOffset=new sn(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var hm,dm=(w(fm,hm=I),fm);function fm(){var t=null!==hm&&hm.apply(this,arguments)||this;return t.name=void 0,t.before=void 0,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.defer=!1,t.opacity=1,t}var mm,gm=(w(ym,mm=dm),ym);function ym(){var t=null!==mm&&mm.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}var vm,_m=(w(xm,vm=dm),xm);function xm(){var t=null!==vm&&vm.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var bm,wm=(w(Sm,bm=dm),Sm);function Sm(){var t=null!==bm&&bm.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=void 0,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}var Tm,Cm=(w(Im,Tm=dm),Im);function Im(){var t=null!==Tm&&Tm.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var Em,Mm=(w(Am,Em=dm),Am);function Am(){var t=null!==Em&&Em.apply(this,arguments)||this;return t.name="default-raster",t}var Lm,km=(w(Pm,Lm=I),Pm);function Pm(){var t=null!==Lm&&Lm.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var Dm,zm=(w(Om,Dm=I),Om.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var n=r[i];n&&(n.hasOwnProperty("view")?n.userRegion=n.view:n.hasOwnProperty("userRegion")&&(n.view=n.userRegion),"string"==typeof n.language&&(n.language=sl.getCode(n.language)))}return Dm.prototype.merge.apply(this,t)},Om);function Om(){var t=null!==Dm&&Dm.apply(this,arguments)||this;return t.autoResize=!0,t.language=Ll(),t.light=new km,t.preserveDrawingBuffer=!1,t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.showTileBoundaries=!1,t.style="road",t.view=Dl(),t.userRegion=t.view,t}var Nm,Rm=(w(Bm,Nm=I),Bm);function Bm(){var t=null!==Nm&&Nm.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var jm,Fm=(w(Um,jm=I),Um.prototype.merge=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var r=0,n=e;r<n.length;r++){var o=n[r];o&&(o.authOptions?"string"==typeof o.authOptions.subscriptionKey&&(o.subscriptionKey=o["subscription-key"]=o.authOptions.subscriptionKey):"string"==typeof o.subscriptionKey?(o["subscription-key"]=o.subscriptionKey,o.authOptions={authType:t.AuthenticationType.subscriptionKey,subscriptionKey:o.subscriptionKey}):"string"==typeof o["subscription-key"]&&(o.subscriptionKey=o["subscription-key"],o.authOptions={authType:t.AuthenticationType.subscriptionKey,subscriptionKey:o["subscription-key"]}),"string"==typeof o.sessionId?o["session-id"]=o.sessionId:"string"==typeof o["session-id"]&&(o.sessionId=o["session-id"]),"boolean"==typeof o.disableTelemetry?o["disable-telemetry"]=o.disableTelemetry:"boolean"==typeof o["disable-telemetry"]&&(o.disableTelemetry=o["disable-telemetry"]),"boolean"==typeof o.enableAccessibility?o["enable-accessibility"]=o.enableAccessibility:"boolean"==typeof o["enable-accessibility"]&&(o.enableAccessibility=o["enable-accessibility"]))}var a=jm.prototype.merge.apply(this,e);return a.authOptions.authType!==t.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),a},Um._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Um);function Um(){var t=null!==jm&&jm.apply(this,arguments)||this;return t.authOptions=El(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=Ml(),t.styleDefinitionsPath=Al(),t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.refreshExpiredTiles=!0,t.subscriptionKey=Pl(),t["subscription-key"]=t.subscriptionKey,t.sessionId=kl(),t["session-id"]=t.sessionId,t.transformRequest=void 0,t}var Vm=function(){this.version=8,this.sprite="",this.glyphs="",this.light={},this.sources={},this.layers=[]},qm=(Gm.prototype.build=function(t){var e=new Vm;if(null!=this.glyphs&&(e.glyphs=this.glyphs),null!=this.sprite&&(e.sprite=this.sprite),null!=t.light&&Object.assign(e.light,t.light),null!=this.map.sources&&(e.sources=this.map.sources._buildSources()),null!=this.map.layers)for(var i=0,r=this.map.layers.getLayers();i<r.length;i++){var n=r[i];e.layers=e.layers.concat(n._buildLayers()),n instanceof La&&(e.sources[n._getSourceId()]=n._buildSource())}return e},Gm.prototype.setGlyphs=function(t){this.glyphs=t},Gm.prototype.setSprite=function(t){this.sprite=t},Gm);function Gm(t){this.sprite="",this.glyphs="{fontstack}/{range}",this.map=t}var Zm,Hm=(w(Wm,Zm=aa),Wm.prototype._buildLayers=function(){return this.layers},Wm.prototype._getLayerIds=function(){return this.layers.map((function(t){return t.id}))},Wm.prototype._getSourceIds=function(){for(var t=new Set,e=0,i=this.layers;e<i.length;e++){var r=i[e];"string"==typeof r.source?t.add(r.source):r.source&&t.add(r.id)}return t},Wm);function Wm(t,e){var i=Zm.call(this,e)||this;return i.layers=t,i}var Ym,Km=(w(Xm,Ym=Wo),Xm.prototype._buildSource=function(){return this.source},Xm.prototype._modifySource=function(t,e){var i=t.tiles.map((function(t){return"string"==typeof t?t:new k({domain:f,path:t.path,queryParams:S(S({},e),t.queryParams)}).toString()}));return t.tiles=i,t},Xm);function Xm(t,e,i){var r=Ym.call(this,t)||this;return r.source=r._modifySource(e,i),r}var Jm=(Qm.prototype.initialize=function(){var t=this;return this.initPromise||(this.initPromise=this.request(l,this._serviceOptions.styleDefinitionsPath).then((function(e){t.definitions=e})).catch((function(t){throw new Error("Failed to retrieve the style definitions: "+t)}))),this.initPromise},Qm.prototype.getStyleComponents=function(t){return T(this,void 0,void 0,(function(){var e,i,r,n=this;return C(this,(function(o){return e=new Set,i=this.lookUp(t),r=i.layerGroups.map((function(i){return T(n,void 0,void 0,(function(){var r,n,o,a,s,l,u;return C(this,(function(c){switch(c.label){case 0:return r=i.layerPath,n=i.name,o={language:t.language},t.view&&(o.view=encodeURIComponent(t.view)),[4,this.buildComponent(n,r,o,e)];case 1:for(a=c.sent(),s=0,l=a.layer.layers;s<l.length;
2s++)"fill-extrusion"===(u=l[s]).type&&(u.layout=u.layout||{},u.layout.visibility=t.showBuildingModels?"visible":"none");return[2,a]}}))}))})),[2,Promise.all(r)]}))}))},Qm.prototype.getFlowComponent=function(t,e){return T(this,void 0,void 0,(function(){var i;return C(this,(function(r){return i=this.getFlowPath(t,e),[2,this.buildComponent("flow",i)]}))}))},Qm.prototype.getCopyrightCaption=function(t){var e=this.lookUp(t).copyright.join(" ");return t.showLogo||(e+=" ©2019 Microsoft"),e},Qm.prototype.getSprite=function(t){var e=this.lookUp(t);return new k({domain:this.definitions.domain,path:e.spritePath}).toString()},Qm.prototype.getGlyphs=function(t){var e=this.lookUp(t);return new k({domain:this.definitions.domain,path:e.glyphsPath}).toString()},Qm.prototype.getFlowPath=function(t,e){return this.lookUp(t).flowPaths[e.flow]},Qm.prototype.getTheme=function(t){return this.lookUp(t).theme.toLowerCase()||"light"},Qm.prototype.getDef=function(){return this.definitions},Qm.prototype.lookUp=function(t){for(var e,i=t.style||this.definitions.defaultStyle,r=0,n=this.definitions.styles;r<n.length;r++){var o=n[r];if(o.name===i)return o;o.name===this.definitions.defaultStyle&&(e=o)}return e},Qm.prototype.request=function(t,e){return T(this,void 0,void 0,(function(){return C(this,(function(i){return[2,new k({domain:t,path:e}).get()]}))}))},Qm.prototype.buildComponent=function(t,e,i,r){return T(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.request(this.definitions.domain,e).then((function(e){var n=new Hm(e.layers,t),o=[],a=e.sources;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=l.name||s;if(r){if(r.has(u))continue;r.add(u)}o.push(new Km(u,l,i))}return{layer:n,sources:o}}))]}))}))},Qm);function Qm(t){this._serviceOptions=t}var $m=(tg.prototype.getCanvas=function(){return this.map.getCanvas()},tg.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},tg.prototype.getMapContainer=function(){return this.map.getContainer()},tg.prototype.getServiceOptions=function(){return qo(this.serviceOptions,Fm._cloneCustomizer)},tg.prototype.setServiceOptions=function(t){this.serviceOptions=(new Fm).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},tg.prototype.setCamera=function(t,e){var i,r;if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var n=(new sm).merge({maxZoom:this.getCamera().maxZoom},t),o=this._generateSafeBounds(n.bounds);if(!(i=this.map.cameraForBounds(o,{padding:n.padding,offset:n.offset,maxZoom:n.maxZoom})))throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");this.map.setMaxZoom(n.maxZoom),r=this._generateSafeBounds(n.maxBounds)}else{var a=(new cm).merge(this.getCamera(),t);if(a.centerOffset&&2<=a.centerOffset.length){var s=a.centerOffset,l=Qn([a.center],a.zoom);l[0][0]+=s[0],l[0][1]+=s[1],a.center=Jn(l,a.zoom)[0]}i={center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,around:void 0},this.map.setMinZoom(a.minZoom),this.map.setMaxZoom(a.maxZoom),r=this._generateSafeBounds(a.maxBounds)}r?this.map.setMaxBounds(r):this.map.setMaxBounds(null);var u=(new em).merge(t),c={duration:u.duration,easing:function(t){return t},offset:[0,0],animate:!0},p={fromControl:e};"jump"===u.type?this.map.jumpTo(i,p):"ease"===u.type?this.map.easeTo(S(S({},i),c),p):"fly"===u.type&&this.map.flyTo(S(S({},i),c),p)},tg.prototype.setCameraBounds=function(t){this.setCamera(t)},tg.prototype.getCamera=function(){var t=this.map.getBounds().getSouthWest
2().toArray(),e=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new Eo(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},tg.prototype.setStyle=function(e){delete e.preserveDrawingBuffer;var i=(new zm).merge(this.styleOptions,e);i.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(i.autoResize),i.language!==this.styleOptions.language&&(this.localizedStringsPromise=sl.getStrings(i.language)),i.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(i.renderWorldCopies),i.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:i.showFeedbackLink}),i.showLogo&&!this.logoControl?(this.logoControl=new Ud,this.controls.add(this.logoControl,{position:t.ControlPosition.NonFixed})):!i.showLogo&&this.logoControl&&(this.controls.remove(this.logoControl),delete this.logoControl),i.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=i.showTileBoundaries),this._setStyleComponents(i),this.styleOptions=i},tg.prototype.getStyle=function(){return pr(this.styleOptions)},tg.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},tg.prototype.addPins=function(t,e){var i,r=(new wm).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new us(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,iconOptions:{anchor:"center",size:r.iconSize,image:["case",["has","icon"],["get","icon"],r.icon],ignorePlacement:!r.cluster,opacity:r.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],r.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[r.textFont]]],size:["case",["has","point_count"],20,r.fontSize],ignorePlacement:!r.cluster,opacity:r.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[r.textOffset[0]/16,r.textOffset[1]/16]]],color:r.fontColor}})),!(n instanceof us))throw new Error("A layer with name '"+r.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Xo(i,{cluster:r.cluster})),!(a instanceof Xo))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Ao(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},tg.prototype.addCircles=function(t,e){var i,r=(new gm).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new ma(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,opacity:r.opacity,radius:["case",["has","radius"],["get","radius"],r.radius],color:["case",["has","color"],["get","color"],r.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],r.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],r.outlineWidth]})),!(n instanceof ma))throw new Error("A layer with name '"+r.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Xo(i)),!(a instanceof Xo))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Ao(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},tg.prototype.addLinestrings=function(t,e){var i,r=(new _m).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new ja(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,lineCap:r.cap,lineJoin:r.join,strokeOpacity:r.opacity,strokeColor:["case",["has","color"],["get","color"],r.color],strokeWidth:["case",["has","width"],["get","width"],r.width]})),!(n instanceof ja))throw new Error("A layer with name '"+r.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");
2var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Xo(i)),!(a instanceof Xo))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Ao(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},tg.prototype.addPolygons=function(t,e){var i,r=(new Cm).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new Ja(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,fillOpacity:r.opacity,fillColor:["case",["has","color"],["get","color"],r.color]})),!(n instanceof Ja))throw new Error("A layer with name '"+r.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Xo(i)),!(a instanceof Xo))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Ao(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},tg.prototype.addRaster=function(t,e){var i,r=(new Mm).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new ms({maxZoom:r.maxZoom,minZoom:r.minZoom,opacity:r.opacity,tileSize:256,tileUrl:"{subdomain}"},r.name)),!(n instanceof ms))throw new Error("A layer with name '"+r.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==n.getOptions().tileUrl)throw new Error("A TileLayer with name '"+r.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(i=!r.overwrite&&n.getOptions().subdomains||[]).push.apply(i,t),n._setOptionsNoUpdate({subdomains:i}),r.defer?o&&this.layers.add(n,r.before,!1):this.layers.add(n,r.before)},tg.prototype.getLayers=function(){return this.layers.getLayers().map((function(t){return t.getId()}))},tg.prototype.removeLayers=function(t){for(var e=0,i=t;e<i.length;e++){var r=i[e];if(this.layers.getLayerById(r)){this.layers.remove(r);var n=r+"-source";this.sources.getById(n)&&this.sources.remove(n)}}},tg.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+rn());var i=new Rs({htmlContent:t});return this.markers.add(i,e),t.id},tg.prototype.removeHtml=function(t){this.markers.remove(t)},tg.prototype.addEventListener=function(t,e,i){this.events._addLegacy(t,e,i)},tg.prototype.removeEventListener=function(t,e,i){this.events._removeLegacy(t,e,i)},tg.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},tg.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},tg.prototype.addControl=function(t,e){this.controls.add(t,e)},tg.prototype.removeControl=function(t){this.controls.remove(t)},tg.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,i=this.trafficOptions.flow;if(this.trafficOptions=(new Rm).merge(this.trafficOptions,t),this.trafficOptions.incidents?e||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap(),this.trafficOptions.flow&&"none"!==this.trafficOptions.flow)try{this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=i,t}else this.flowDelegate.removeFromMap()},tg.prototype.getTraffic=function(){return pr(this.trafficOptions)},tg.prototype.remove=function(){this.dispose()},tg.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},tg.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},tg.prototype.resize=function(t,e,i){if("number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e)i=t;else{var r=t;this.getMapContainer().style.height="number"==typeof r?r+"px":r,this.getMapContainer().style.width="number"==typeof e?e+"px":e}var n=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(i),this.getMapContainer().style.overflow=n},tg.prototype.pixelsToPositions=function(t){for(var e=[],i=0,r=t;i<r.length;i++){var n=r[i],o=this.map.unproject(n);e.push(new ho(o.lng,o.lat))}return e},tg.prototype.positionsToPixels=function(t){for(var e=[],i=0,r=t;i<r.length;i++){var n=r[i],o=this.map.project(n);e.push(new sn(o.x,o.y))}return e},tg.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},tg.prototype.stop=function(){this.map.stop()},tg.prototype._getMap=function(){return this.map},tg.prototype._rebuildStyle=function(){this.map.setStyle(this.styleBuilder.build(this.styleOptions)),this.imageSprite._restoreImages()},tg.prototype._isLoaded=function(){return this.loaded},tg.prototype._isReady=function(){return this.ready},tg.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise}
2,tg.prototype._sendRequest=function(t,e,i){var r;return"function"==typeof this.serviceOptions.transformRequest&&(r=this.serviceOptions.transformRequest(t,e)),r?fetch(r.url||t,{credentials:r.credentials,headers:S(S({},i),r.headers),method:"GET",mode:"cors"}):fetch(t,{headers:i,method:"GET",mode:"cors"})},tg.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},tg.prototype._setStyleComponents=function(t){var e=this;this.styles.getStyleComponents(t).then((function(i){if(!e.removed){e.copyrightControl.setOptions({copyrightMessage:e.styles.getCopyrightCaption(t)}),e.styleBuilder.setGlyphs(e.styles.getGlyphs(t)),e.styleBuilder.setSprite(e.styles.getSprite(t));for(var r=new Set,n=new Set,o=0,a=i;o<a.length;o++){var s=a[o];r.add(s.layer.getId());for(var l=0,u=s.sources;l<u.length;l++){var c=u[l];n.add(c.getId())}}e.styleLayerIds.forEach((function(t){r.has(t)||(e.layers.getLayerById(t)&&e.layers.remove(t,!1),e.styleLayerIds.delete(t))}));for(var p=function(t){var r=i[t].layer;if(e.styleLayerIds.add(r.getId()),e.layers.getLayerById(r.getId()))e.layers.add(r,void 0,!1);else if(0===t)e.layers.add(r,e.layers.getLayers()[0],!1);else{var n=i[t-1].layer,o=e.layers.getLayers(),a=o.findIndex((function(t){return t.getId()===n.getId()}));e.layers.add(r,o[a+1],!1)}},h=0;h<i.length;h++)p(h);var d=e.layers._getSourceIds();e.styleSourceIds.forEach((function(t){d.has(t)||n.has(t)||(e.sources.getById(t)&&e.sources.remove(t,!1),e.styleSourceIds.delete(t))}));for(var f=0,m=i;f<m.length;f++){s=m[f],e.sources.add(s.sources,!1);for(var g=0,y=s.sources;g<y.length;g++)c=y[g],e.styleSourceIds.add(c.getId())}e._rebuildStyle()}}))},tg.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!ql()&&Ol(t.authOptions),t.domain&&!Gl()&&Nl(t.domain),t.styleDefinitionsPath&&!Zl()&&Rl(t.styleDefinitionsPath),!t.subscriptionKey&&!t["subscription-key"]||ql()||Fl(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||Wl()||jl(t.sessionId||t["session-id"]),t.language&&!Hl()&&Bl(t.language),!t.userRegion&&!t.view||Yl()||Ul(t.userRegion||t.view))},tg.prototype._generateSafeBounds=function(t){if(t){var e=Eo.getSouth(t),i=Eo.getWest(t),r=Eo.getNorth(t),n=Eo.getEast(t);if(isNaN(e)||isNaN(i)||isNaN(r)||isNaN(n))throw new Error("The bounds specified are invalid: ["+t+"]");for(;n<i;)n+=360;return new Eo([i,e,n,r])}return t},tg.prototype._detectHighContrast=function(){var t,e;switch(iu.getHighContrastMode()){case"invert":t=tg.Css.hcLight,e="high_contrast_dark";break;case"light":t=tg.Css.hcLight,e="grayscale_light";break;case"dark":t=tg.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},tg.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},tg);function tg(e,i){var r=this;this.styleLayerIds=new Set,this.styleSourceIds=new Set,this.removed=!1,this.loaded=!1,this.ready=!1,this._windowResizeCallback=function(){return r.resize()};var o=!0;this._updateGlobalDefaults(i),this.serviceOptions=(new Fm).merge(i),this.styleOptions=(new zm).merge(i),this.trafficOptions=new Rm,this.styles=new Jm(this.serviceOptions),this.insights=new jd(this.serviceOptions),this.serviceOptions.authOptions.subscriptionKey&&(this.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(this.serviceOptions.authOptions.subscriptionKey));var a,s={attributionControl:!1,container:e,preserveDrawingBuffer:this.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:this.serviceOptions.refreshExpiredTiles,renderWorldCopies:this.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var i={url:t};if("Tile"===e&&t.includes(f)){if(r.insights&&r.insights.trackEvent({name:"TileLoad"}),k.protoRegEx.test(r.serviceOptions.domain)){var n=t.indexOf(f);i.url=r.serviceOptions.domain+t.substring(n+f.length)}else i.url=t.replace(f,r.serviceOptions.domain);r.authentication.signRequest(i)}return r.serviceOptions.transformRequest&&il(i,r.serviceOptions.transformRequest(i.url,e)),i}};a=this.serviceOptions.authOptions.clientId?this.serviceOptions.authOptions.clientId:this.serviceOptions.authOptions.subscriptionKey?this.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting",this.insights&&this.insights.setAuthenticatedUserContext(this.serviceOptions.sessionId,a);try{var l=new n.Map(s);this.map=l,this.authentication=new Nf(this),this.controls=new Bf(this),this.events=new Vf(this),this.imageSprite=new Hf(this),this.layers=new Yf(this),this.markers=new Gf(this),this.sources=new Qf(this),this.popups=new Xf(this),this.styleBuilder=new qm(this),this.map.getContainer().classList.add(tg.Css.container),this.map.getCanvasContainer().classList.add(tg.Css.canvasContainer),this.map.getCanvas().classList.add(tg.Css.canvas),this._detectHighContrast(),this.copyrightControl=new Wd({showFeedbackLink:this.styleOptions.showFeedbackLink}),this.controls.add(this.copyrightControl,{position:t.ControlPosition.NonFixed}
2),this.styleOptions.showLogo&&(this.logoControl=new Ud,this.controls.add(this.logoControl,{position:t.ControlPosition.NonFixed}));var u=this.authentication.initialize();if(this.removed)return;var c=function(){r.loaded=!0,r.map.off("load",c)};this.map.on("load",c);var p=function(){r.ready=!0,r.map.off("styledata",p);var t={map:r,type:"ready"};r.events.invoke("ready",t)};this.map.on("styledata",p),this._setAutoResize(this.styleOptions.autoResize),this.map.showTileBoundaries=this.styleOptions.showTileBoundaries,this.localizedStringsPromise=sl.getStrings(this.styleOptions.language);var h=this.styles.initialize();Promise.all([u,h]).then((function(){if(!r.removed){if(!r.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");r.serviceOptions["enable-accessibility"]&&r.accessibleMapDelegate.addToMap(),r._setStyleComponents(r.styleOptions)}})).catch((function(t){var e=t instanceof Error?t:new Error(t);r.insights&&r.insights.trackException({error:e});var i={map:r,type:"error",error:e};r.events.invoke("error",i)})),this.setCamera(S(S({},i),{type:"jump",duration:0})),this.incidentDelegate=new _f(this),this.flowDelegate=new af(this),this.accessibleMapDelegate=new of(this),this.userInteractionDelegate=new Mf(this,i),this.userInteractionDelegate.addToMap()}catch(e){throw o=!1,this.insights&&this.insights.trackException({error:e instanceof Error?e:new Error(e)}),e}finally{this.insights&&(this.insights.trackEvent({name:"MapLoad"},{success:o,supported:zl(!1),supportedWithPerformance:zl(!0)}),this.insights.flush())}}var eg=(ig.applyTemplate=function(t,e){var i=this,r=document.createElement("div");if(r.classList.add(ig.Css.template),t){"boolean"!=typeof(e=e||{}).singleDescription&&(e.singleDescription=!0),e.sandboxContent="boolean"!=typeof e.sandboxContent||e.sandboxContent,e.title&&"string"==typeof e.content&&(e.content.includes("{title}")||e.content.includes("{name}"))||(t.title?e.title="{title}":t.name&&(e.title="{name}")),"boolean"!=typeof e.detectHyperlinks&&(e.detectHyperlinks=!0),"boolean"!=typeof e.parsePropertyPaths&&(e.parsePropertyPaths=!0),e.textColor&&(r.style.color=e.textColor),e.fillColor&&(r.style.backgroundColor=e.fillColor),e.title&&((a=this._applyStringTemplate(t,e.title,e)).innerText=a.textContent||a.innerText||"",this._appendChild(r,a,ig.Css.title));var n=document.createElement("div");if(n.classList.add(ig.Css.content),Array.isArray(e.content))0<e.content.length&&e.content[0].propertyPath?this._appendChild(n,this._generateContent(t,e.content,e),ig.Css.item):e.content.forEach((function(r){i._appendChild(n,i._generateContent(t,r,e),ig.Css.item)}));else{var o=0;t.description&&Object.keys(t).forEach((function(e){i._ignoreProperty(e,t[e])||o++}));var a=void 0;1===o||e.singleDescription&&t.description||2===o&&t.Snippet?(a=document.createElement("div")).innerHTML=t.description:a=this._generateContent(t,e.content,e),this._appendChild(n,a,ig.Css.item)}""!==n.innerHTML&&(e.sandboxContent?r.appendChild(ig._createSandboxedIframe(n,e)):r.appendChild(n))}return r},ig._createSandboxedIframe=function(t,e){var i=document.createElement("iframe");i.sandbox.add("allow-popups");var r,n=t.innerHTML,o=!1,a=100,s=550,l=10;document.body.scrollWidth<=340&&(s=300,a=50);var u=n.split(/<(tr|div|br|li|h[0-9]|p>)/);r=Math.max.apply(Math,u.map((function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})))-1;var c=Math.ceil(3.5*r);if(c<s&&(s=c,a=r),n.includes("<img")||n.includes("<video"))o=!0,i.width="550px";else{var p=-1<n.indexOf(ig.Css.table)?25:20;l+=Math.max(.5*u.length*p,Math.ceil(n.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/a)*p)}i.width=s+"px",i.height=o||280<l?"280px":l+"px";var h=e.textColor?"color:"+e.textColor+";":"",d=e.fillColor?"background-color:"+e.fillColor+";":"",f='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+ig._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+h+d+'}</style></head><body><div class="'+ig.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+n+"</div></body></html>";return void 0===i.srcdoc?i.src="data:text/html;charset=utf-8,"+encodeURI(f):i.srcdoc=f,i}
2,ig._appendChild=function(t,e,i){e&&(i&&(e.className=(e.className?e.className+" ":"")+i),t.appendChild(e))},ig._generateContent=function(t,e,i){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,i):this._applyStringTemplate(t,e,i);var r=this._generateDynamicTableHtml(t,null,i);if(r){var n=document.createElement("div");return n.innerHTML=r,n}return null},ig._applyStringTemplate=function(t,e,i){if(e){for(var r=e,n=this._placeholderRx.exec(e);n;){if(2<=n.length){var o=this._getPropertyValue(t,n[1],i);r=r.replace(n[0],o)}n=this._placeholderRx.exec(e)}if(r){(r=r.trim()).includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>"));var a=document.createElement("div");return a.innerHTML=r,a}}return null},ig._getPropertyValue=function(t,e,i,r){var n=i.parsePropertyPaths?e.split("/"):[e],o=n.length;if(0<o&&t){var a=n[0],s=t[a];if(i.detectHyperlinks&&"link"===e&&(!r||r.hyperlinkFormat)){var l=[];if(Array.isArray(s)?s.forEach((function(t){t.href?l.push(t):"string"==typeof t&&l.push({href:t})})):s.href&&l.push(s),0<l.length){var u,c;r&&r.hyperlinkFormat?u=r.hyperlinkFormat:i&&i.hyperlinkFormat&&(u=i.hyperlinkFormat),c=u&&u.target?u.target:"_blank";var p=[];return l.forEach((function(t){t.title||u&&u.label||!t.rel||p.push(t.rel," - "),p.push('<a href="',t.href,'" target="',c,'">'),t.title?p.push(t.title):u&&u.label?p.push(u.label):p.push(t.href),p.push("</a>","<br/>")})),p.pop(),p.join("")}}if(null!=s){var h=void 0;for(h=1;h<o&&(s=s[n[h]],a=n[h],null!=s);h++);if(h===o&&null!=s){var d=void 0;if((d=void 0!==s.value?s.value:s)instanceof Date)return r&&r.dateFormat?d.toLocaleString(void 0,r.dateFormat):i.dateFormat?d.toLocaleString(void 0,i.dateFormat):d.toISOString();if("object"==typeof d)return(v=this._generateDynamicTableHtml(d,n.slice(1),i))||"";if("number"==typeof d){if(r){if(r.dateFormat)return new Date(d).toLocaleString(void 0,r.dateFormat);if(r.numberFormat)return d.toLocaleString(void 0,r.numberFormat)}else if(/(timestamp|date)/gi.test(a))return new Date(d).toISOString();return d.toLocaleString(void 0,i.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(i.detectHyperlinks||r&&r.hyperlinkFormat)){d=d.trim();var f=this._isUrlRx.test(d)||r&&r.hyperlinkFormat,m=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),g=this._emailRx.test(d);if(f||m||g){var y=void 0;r&&r.hyperlinkFormat?y=r.hyperlinkFormat:i&&i.hyperlinkFormat&&(y=i.hyperlinkFormat);var v=void 0;v=y&&y.target?' target="'+y.target+'"':' target="_blank"';var _=""+(y&&y.label?y.label:d);y&&y.scheme?d=y.scheme+d:g&&(d="mailto:"+d);var x=y&&y.label?' alt="'+y.label+'"':"";return(y&&y.isImage||m)&&(_='<img src="'+d+'" style="max-width:100%"'+x+'"/>'),'<a href="'+d+'"'+v+">"+_+"</a>"}}return d.toString()}}}return""},ig._generatePropertyInfoTable=function(t,e,i){if(t&&e&&0<e.length){var r=[],n=this;r.push('<table class="'+n.Css.table+'">'),e.forEach((function(e){var o=n._getPropertyValue(t,e.propertyPath,i,e);if(e.hideLabel)r.push('<tr><td colspan="2">',o,"</td></tr>");else{var a=e.label||e.propertyPath.split("/")[0];
2r.push("<tr><th>",a,"</th><td>",o,"</td></tr>")}})),r.push("</table>");var o=document.createElement("div");return o.innerHTML=r.join(""),o}return null},ig._generateDynamicTableHtml=function(t,e,i){var r=this;if(t){var n=[],o=this;n.push('<table class="'+o.Css.table+'">');var a=e&&0<e.length?e.join("/")+"/":"",s=0;return Object.keys(t).forEach((function(e){r._ignoreProperty(e,t[e])||(n.push("<tr><th>",e,"</th><td>",o._getPropertyValue(t,a+e,i),"</td></tr>"),s++)})),0===s?null:(n.push("</table>"),n.join(""))}return null},ig._ignoreProperty=function(t,e){switch(t){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(0===t.indexOf("_")||null==e||""===e)return!0}return!1},ig._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,ig._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,ig._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,ig._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,ig._cssUrl=new k({domain:l,path:"sdk/javascript/mapcontrol/"+O.getEndpointVersion()+"/atlas.min.css"}).toString(),ig.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},ig);function ig(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}o(new k({domain:l,path:"sdk/javascript/mapcontrol/"+O.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"}).toString(),(function(t){t&&console.warn(t)}),!0),t.HtmlMarker=Rs,t.Map=$m,t.Pixel=sn,t.Popup=ks,t.PopupTemplate=eg,t.Shape=To,t._getAssetDomain=function(){return s},t._getDomain=function(){return Ml()},t._hasSetAuthenticationOptions=ql,t._hasSetDomain=Gl,t._hasSetLanguage=Hl,t._hasSetSessionId=Wl,t._hasSetStyleDefinitionsPath=Zl,t._hasSetView=Yl,t.addImageTemplate=function(t,e,i){!i&&eu[t.toLowerCase()]||(eu[t.toLowerCase()]=e)},t.control=Dr,t.data=Vo,t.getAllImageTemplateNames=function(){return Object.keys(eu)},t.getAuthenticationOptions=El,t.getDomain=Ml,t.getImageTemplate=Vl,t.getLanguage=Ll,t.getSessionId=kl,t.getStyleDefinitionsPath=Al,t.getSubscriptionKey=Pl,t.getUserRegion=function(){return dl},t.getVersion=function(){return O.getFullVersion()},t.getView=Dl,t.internal=_o,t.isSupported=zl,t.layer=ys,t.math=So,t.setAuthenticationOptions=Ol,t.setDomain=Nl,t.setLanguage=Bl,t.setSessionId=jl,t.setStyleDefinitionsPath=Rl,t.setSubscriptionKey=Fl,t.setUserRegion=Ul,t.setView=function(t){dl=t,bl=!0},t.source=oa,Object.defineProperty(t,"__esModule",{value:!0})}(e)},6010:function(t,e,i){"use strict";function r(t){var e,i,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(i=r(t[e]))&&(n&&(n+=" "),n+=i);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}e.Z=function(){for(var t,e,i=0,n="";i<arguments.length;)(t=arguments[i++])&&(e=r(t))&&(n&&(n+=" "),n+=e);return n}},3442:function(t,e){"use strict";var i=function(){function t(e){if(!e)throw new TypeError("Invalid argument; `value` has no value.");this.value=t.EMPTY,e&&t.isGuid(e)&&(this.value=e)}return t.isGuid=function(e){var i=e.toString();return e&&(e instanceof t||t.validator.test(i))},t.create=function(){return new t([t.gen(2),t.gen(1),t.gen(1),t.gen(1),t.gen(3)].join("-"))},t.createEmpty=function(){return new t("emptyguid")},t.parse=function(e){return new t(e)},t.raw=function(){return[t.gen(2),t.gen(1),t.gen(1),t.gen(1),t.gen(3)].join("-")},t.gen=function(t){for(var e="",i=0;i<t;i++)e+=(65536*(1+Math.random())|0).toString(16).substring(1);return e},t.prototype.equals=function(e){return t.isGuid(e)&&this.value===e.toString()},t.prototype.isEmpty=function(){return this.value===t.EMPTY},t.prototype.toString=function(){return this.value},t.prototype.toJSON=function(){return{value:this.value}},t.validator=new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$","i"),t.EMPTY="00000000-0000-0000-0000-000000000000",t}();e.i=i}
vendor: 7,909 bytes, line 2
2,5613:function(t,e,i){"use strict";i.d(e,{Pc:function(){return f},QI:function(){return y},am:function(){return C},cV:function(){return T},sN:function(){return d}});var r=i(7294),n=i(3442),o=i(7762),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{};var s,l=(s={path:void 0,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&s.path)}},function(t){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==a?a:"undefined"!=typeof self?self:{};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var r=i((function(t,e){function i(t,e){if(r)if(n){var i="var sharedChunk = {}; ("+r+")(sharedChunk); ("+n+")(sharedChunk);",a={};r(a),o=e(a),"undefined"!=typeof window&&(o.workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"})))}else n=e;else r=e}var r,n,o;t.exports=(i(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var i=r;function r(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}r.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},r.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},r.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},r.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},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}o.prototype={clone:function(){return new o(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,i=t.y-this.y;return e*e+i*i},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),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),n=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=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o||!Array.isArray(t)?t:new o(t[0],t[1])};var a="undefined"!=typeof self?self:{};function s(t,e,r,n){var o=new i(t,e,r,n);return function(t){return o.solve(t)}}var l=s(.25,.1,.25,1);function u(t,e,i){return Math.min(i,Math.max(e,t))}function c(t,e,i){var r=i-e,n=((t-e)%r+r)%r+e;return n===e?i:n}function p(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=n[r];for(var a in o)t[a]=o[a]}return t}var h=1;function d(){return h++}function f(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(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 g(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 v(t,e,i){var r={};for(var n in t)r[n]=e.call(i||this,t[n],n,t);return r}function _(t,e,i){var r={};for(var n in t)e.call(i||this,t[n],n,t)&&(r[n]=t[n]);return r}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?v(t,x):t}var b={};function w(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function S(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function T(t){for(var e=0,i=0,r=t.length,n=r-1,o=void 0,a=void 0;i<r;n=i++)e+=((a=t[n]).x-(o=t[i]).x)*(o.y+a.y);return e}function C(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function I(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,i,r,n){var o=r||n;return e[i]=!o||o.toLowerCase(),""})),e["max-age"]){var i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}var E=null;function M(t){if(null==E){var e=t.navigator?t.navigator.userAgent:null;E=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return E}function A(t){try{var e=a[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var L,k,P,D,z=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),O=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,N=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,R={now:z,frame:function(t){var e=O(t);return{cancel:function(){return N(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var i=a.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(L=L||a.document.createElement("a")).href=t,L.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return!!a.matchMedia&&(null==k&&(k=a.matchMedia("(prefers-reduced-motion: reduce)")),k.matches)}},B={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},j={supported:!1,testSupport:function(t){!F&&D&&(U?V(t):P=t)}},F=!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,D),t.isContextLost())return;j.supported=!0}
2catch(t){}t.deleteTexture(e),F=!0}function q(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()}a.document&&((D=a.document.createElement("img")).onload=function(){P&&V(P),U=!(P=null)},D.onerror=function(){F=!0,P=null},D.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var G="01";function Z(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",G,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!Z(t))return t;var i=K(t);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!Z(t))return t;var i=K(t);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!Z(t))return t;var i=K(t);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,i,r){var n=K(t);return Z(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+i,this._makeAPIURL(n,this._customAccessToken||r)):(n.path+=""+e+i,X(n))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!Z(t))return t;var i=K(t);i.path=i.path.replace(/(\.(png|jpg)\d*)(?=$)/,(2<=R.devicePixelRatio||512===e?"@2x":"")+(j.supported?".webp":"$1")),i.path=i.path.replace(/^.+\/v4\//,"/"),i.path="/v4"+i.path;var r=this._customAccessToken||function(){for(var t=0,e=i.params;t<e.length;t+=1){var r=e[t].match(/^access_token=(.*)$/);if(r)return r[1]}return null}()||B.ACCESS_TOKEN;return B.REQUIRE_ACCESS_TOKEN&&r&&this._skuToken&&i.params.push("sku="+this._skuToken),this._makeAPIURL(i,r)},q.prototype.canonicalizeTileURL=function(t,e){var i=K(t);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(/\.[\w]+$/))return t;var r="mapbox://tiles/";r+=i.path.replace("/v4/","");var n=i.params;return e&&(n=n.filter((function(t){return!t.match(/^access_token=/)}))),n.length&&(r+="?"+n.join("&")),r},q.prototype.canonicalizeTileset=function(t,e){for(var i=!!e&&Z(e),r=[],n=0,o=t.tiles||[];n<o.length;n+=1){var a=o[n];W(a)?r.push(this.canonicalizeTileURL(a,i)):r.push(a)}return r},q.prototype._makeAPIURL=function(t,e){var i="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",r=K(B.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!B.REQUIRE_ACCESS_TOKEN)return X(t);if(!(e=e||B.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+i);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+i);return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token="+e),X(t)};var H=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function W(t){return H.test(t)}var Y=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(Y);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function X(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function J(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(a.atob(e[1]).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch(t){return null}}function Q(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}Q.prototype.getStorageKey=function(t){var e,i=J(B.ACCESS_TOKEN);return e=i&&i.u?a.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))}
2))):B.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Q.prototype.fetchEventData=function(){var t=A("localStorage"),e=this.getStorageKey(),i=this.getStorageKey("uuid");if(t)try{var r=a.localStorage.getItem(e);r&&(this.eventData=JSON.parse(r));var n=a.localStorage.getItem(i);n&&(this.anonId=n)}catch(t){w("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var t=A("localStorage"),e=this.getStorageKey(),i=this.getStorageKey("uuid");if(t)try{a.localStorage.setItem(i,this.anonId),1<=Object.keys(this.eventData).length&&a.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,i,r){var n=this;if(B.EVENTS_URL){var o=K(B.EVENTS_URL);o.params.push("access_token="+(r||B.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.11.1",skuId:G,userId:this.anonId},s=e?p(a,e):a,l={url:X(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=It(l,(function(t){n.pendingRequest=null,i(t),n.saveEventData(),n.processRequests(r)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var $,tt,et,it,rt=(pt.__proto__=it=Q,((pt.prototype=Object.create(it&&it.prototype)).constructor=pt).prototype.postMapLoadEvent=function(t,e,i,r){this.skuToken=i,(B.EVENTS_URL&&r||B.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return Z(t)||W(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},r)},pt.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var i=this.queue.shift(),r=i.id,n=i.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=f()),this.postEvent(n,{skuToken:this.skuToken},(function(t){t||r&&(e.success[r]=!0)}),t))}},pt),nt=(ct.__proto__=et=Q,((ct.prototype=Object.create(et&&et.prototype)).constructor=ct).prototype.postTurnstileEvent=function(t,e){B.EVENTS_URL&&B.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return Z(t)||W(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=J(B.ACCESS_TOKEN),r=i?i.u:B.ACCESS_TOKEN,n=r!==this.eventData.tokenU;m(this.anonId)||(this.anonId=f(),n=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;n=n||1<=l||l<-1||a.getDate()!==s.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=r)}),t)}},new ct),ot=nt.postTurnstileEvent.bind(nt),at=new rt,st=at.postMapLoadEvent.bind(at),lt=500,ut=50;function ct(t){et.call(this,"appUserTurnstile"),this._customAccessToken=t}function pt(){it.call(this,"map.load"),this.success={},this.skuToken=""}function ht(){a.caches&&!$&&($=a.caches.open("mapbox-tiles"))}function dt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var ft,mt=1/0;function gt(){return null==ft&&(ft=a.OffscreenCanvas&&new a.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof a.createImageBitmap),ft}var yt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(yt);var vt,_t=((vt=Error)&&(bt.__proto__=vt),((bt.prototype=Object.create(vt&&vt.prototype)).constructor=bt).prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},bt),xt=C()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===a.location.protocol?a.parent:a).location.href};function bt(t,e,i){401===e&&W(i)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),vt.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(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return function(t,e){var i,r=new a.AbortController,n=new a.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:xt(),signal:r.signal}),o=!1,s=!1,l=0<(i=n.url).indexOf("sku=")&&W(i);function u(i,r,o){if(!s){if(i&&"SecurityError"!==i.message&&w(i),r&&o)return c(r);var u=Date.now();a.fetch(n).then((function(i){if(i.ok){var r=l?i.clone():null;return c(i,r,u)}return e(new _t(i.statusText,i.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}}"json"===t.type&&n.headers.set("Accept","application/json");var c=function(i,r,l){("arrayBuffer"===t.type?i.arrayBuffer():"json"===t.type?i.json():i.text()).then((function(t){s||(r&&l&&function(t,e,
2i){if(ht(),$){var r={status:e.status,statusText:e.statusText,headers:new a.Headers};e.headers.forEach((function(t,e){return r.headers.set(e,t)}));var n=I(e.headers.get("Cache-Control")||"");n["no-store"]||(n["max-age"]&&r.headers.set("Expires",new Date(i+1e3*n["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-i<42e4||function(t,e){if(void 0===tt)try{new Response(new ReadableStream),tt=!0}catch(t){tt=!1}tt?e(t.body):t.blob().then(e)}(e,(function(e){var i=new a.Response(e,r);ht(),$&&$.then((function(e){return e.put(dt(t.url),i)})).catch((function(t){return w(t.message)}))})))}}(n,r,l),o=!0,e(null,t,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((function(t){s||e(new Error(t.message))}))};return l?function(t,e){if(ht(),!$)return e(null);var i=dt(t.url);$.then((function(t){t.match(i).then((function(r){var n=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),i=I(t.headers.get("Cache-Control")||"");return e>Date.now()&&!i["no-cache"]}(r);t.delete(i),n&&t.put(i,r.clone()),e(null,r,n)})).catch(e)})).catch(e)}(n,u):u(null,null),{cancel:function(){s=!0,o||r.abort()}}}(t,e);if(C()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(t,e){var i=new a.XMLHttpRequest;for(var r in i.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(i.responseType="arraybuffer"),t.headers)i.setRequestHeader(r,t.headers[r]);return"json"===t.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===t.credentials,i.onerror=function(){e(new Error(i.statusText))},i.onload=function(){if((200<=i.status&&i.status<300||0===i.status)&&null!==i.response){var r=i.response;if("json"===t.type)try{r=JSON.parse(i.response)}catch(r){return e(r)}e(null,r,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else e(new _t(i.statusText,i.status,t.url))},i.send(t.body),{cancel:function(){return i.abort()}}}(t,e)}function St(t,e){return wt(p(t,{type:"arrayBuffer"}),e)}var Tt,Ct,It=function(t,e){return wt(p(t,{method:"POST"}),e)};Tt=[],Ct=0;var Et=function(t,e){if(j.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ct>=B.MAX_PARALLEL_IMAGE_REQUESTS){var i={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return Tt.push(i),i}function r(){if(!n)for(n=!0,Ct--;Tt.length&&Ct<B.MAX_PARALLEL_IMAGE_REQUESTS;){var t=Tt.shift();t.cancelled||(t.cancel=Et(t.requestParameters,t.callback).cancel)}}Ct++;var n=!1,o=St(t,(function(t,i,n,o){var s,l,u;r(),t?e(t):i&&(gt()?(s=i,l=e,u=new a.Blob([new Uint8Array(s)],{type:"image/png"}),a.createImageBitmap(u).then((function(t){l(null,t)})).catch((function(t){l(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 a.Image,o=a.URL;n.onload=function(){e(null,n),o.revokeObjectURL(n.src)},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 s=new a.Blob([new Uint8Array(t)],{type:"image/png"});n.cacheControl=i,n.expires=r,n.src=t.byteLength?o.createObjectURL(s):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(i,e,n,o))}));return{cancel:function(){o.cancel(),r()}}};function Mt(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function At(t,e,i){if(i&&i[t]){var r=i[t].indexOf(e);-1!==r&&i[t].splice(r,1)}}function Lt(t,e){void 0===e&&(e={}),p(this,e),this.type=t}function kt(){}var Pt,Dt=(zt.__proto__=Pt=Lt,(zt.prototype=Object.create(Pt&&Pt.prototype)).constructor=zt);function zt(t,e){void 0===e&&(e={}),Pt.call(this,"error",p({error:t},e))}kt.prototype.on=function(t,e){return this._listeners=this._listeners||{},Mt(t,e,this._listeners),this},kt.prototype.off=function(t,e){return At(t,e,this._listeners),At(t,e,this._oneTimeListeners),this},kt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},Mt(t,e,this._oneTimeListeners),this},kt.prototype.fire=function(t,e){"string"==typeof t&&(t=new Lt(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];At(i,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(p(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof Dt&&console.error(t.error);return this},kt.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 Ot={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"}
2,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:!(kt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this})},"*":{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
vendor: 11,915 bytes, line 2
2},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},
vendor: 2,738 bytes, line 2
2expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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
vendor: 14,078 bytes, line 2
2}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}}
2,Nt=function(t,e,i,r){this.message=(t?t+": ":"")+i,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)};function Rt(t){var e=t.value;return e?[new Nt(t.key,e,"constants have been deprecated as of v8")]:[]}function Bt(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=n[r];for(var a in o)t[a]=o[a]}return t}function jt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Ft(t){if(Array.isArray(t))return t.map(Ft);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var i in t)e[i]=Ft(t[i]);return e}return jt(t)}function Ut(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 Vt,qt=((Vt=Error)&&(Gt.__proto__=Vt),(Gt.prototype=Object.create(Vt&&Vt.prototype)).constructor=Gt);function Gt(t,e){Vt.call(this,e),this.message=e,this.key=t}Ut.prototype.concat=function(t){return new Ut(this,t)},Ut.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.")},Ut.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Zt={kind:"null"},Ht={kind:"number"},Wt={kind:"string"},Yt={kind:"boolean"},Kt={kind:"color"},Xt={kind:"object"},Jt={kind:"value"},Qt={kind:"collator"},$t={kind:"formatted"},te={kind:"resolvedImage"};function ee(t,e){return{kind:"array",itemType:t,N:e}}function ie(t){if("array"!==t.kind)return t.kind;var e=ie(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}var re=[Zt,Ht,Wt,Yt,Kt,$t,Xt,ee(Jt),te];function ne(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ne(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=re;i<r.length;i+=1)if(!ne(r[i],e))return null}return"Expected "+ie(t)+" but found "+ie(e)+" instead."}function oe(t,e){return e.some((function(e){return e.kind===t.kind}))}function ae(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var se=e((function(t,e){var i={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 r(t){return(t=Math.round(t))<0?0:255<t?255:t}function n(t){return r("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:1<e?1:e;var e}function a(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,s=t.replace(/ /g,"").toLowerCase();if(s in i)return i[s].slice();if("#"===s[0])return 4===s.length?0<=(e=parseInt(s.substr(1),16))&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&0<=(e=parseInt(s.substr(1),16))&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=o(p.pop());case"rgb":return 3!==p.length?null:[n(p[0]),n(p[1]),n(p[2]),h];case"hsla":if(4!==p.length)return null;h=o(p.pop());case"hsl":if(3!==p.length)return null;var d=(parseFloat(p[0])%360+360)%360/360,f=o(p[1]),m=o(p[2]),g=m<=.5?m*(f+1):m+f-m*f,y=2*m-g;return[r(255*a(y,g,d+1/3)),r(255*a(y,g,d)),r(255*a(y,g,d-1/3)),h];default:return null}}return null}}catch(t){}}
2)).parseCSSColor,le=function(t,e,i,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=i,this.a=r};le.parse=function(t){if(t){if(t instanceof le)return t;if("string"==typeof t){var e=se(t);if(e)return new le(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},le.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+")"},le.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]},le.black=new le(0,0,0,1),le.white=new le(1,1,1,1),le.transparent=new le(0,0,0,0),le.red=new le(1,0,0,1);var ue=function(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};function ce(t,e,i,r,n){this.text=t,this.image=e,this.scale=i,this.fontStack=r,this.textColor=n}ue.prototype.compare=function(t,e){return this.collator.compare(t,e)},ue.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var pe=function(t){this.sections=t};pe.fromString=function(t){return new pe([new ce(t,null,null,null,null)])},pe.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}))},pe.factory=function(t){return t instanceof pe?t:pe.fromString(t)},pe.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},pe.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var r=i[e];if(r.image)t.push(["image",r.image.name]);else{t.push(r.text);var n={};r.fontStack&&(n["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(n["font-scale"]=r.scale),r.textColor&&(n["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(n)}}return t};var he=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 fe(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 le)return 1;if(t instanceof ue)return 1;if(t instanceof pe)return 1;if(t instanceof he)return 1;if(Array.isArray(t)){for(var e=0,i=t;e<i.length;e+=1)if(!fe(i[e]))return;return 1}if("object"==typeof t){for(var r in t)if(!fe(t[r]))return;return 1}}function me(t){if(null===t)return Zt;if("string"==typeof t)return Wt;if("boolean"==typeof t)return Yt;if("number"==typeof t)return Ht;if(t instanceof le)return Kt;if(t instanceof ue)return Qt;if(t instanceof pe)return $t;if(t instanceof he)return te;if(Array.isArray(t)){for(var e,i=t.length,r=0,n=t;r<n.length;r+=1){var o=me(n[r]);if(e){if(e===o)continue;e=Jt;break}e=o}return ee(e||Jt,i)}return Xt}function ge(t){var e=typeof t;return null===t?"":"string"==e||"number"==e||"boolean"==e?String(t):t instanceof le||t instanceof pe||t instanceof he?t.toString():JSON.stringify(t)}function ye(t,e){this.type=t,this.value=e}he.prototype.toString=function(){return this.name},he.fromString=function(t){return t?new he({name:t,available:!1}):null},he.prototype.serialize=function(){return["image",this.name]},ye.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!fe(t[1]))return e.error("invalid value");var i=t[1],r=me(i),n=e.expectedType;return"array"!==r.kind||0!==r.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(r=n),new ye(r,i)},ye.prototype.evaluate=function(){return this.value},ye.prototype.eachChild=function(){},ye.prototype.outputDefined=function(){return!0},ye.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof le?["rgba"].concat(this.value.toArray()):this.value instanceof pe?this.value.serialize():this.value};var ve=function(t){this.name="ExpressionEvaluationError",this.message=t};function _e(t,e){this.type=t,this.args=e}ve.prototype.toJSON=function(){return this.message};var xe={string:Wt,number:Ht,boolean:Yt,object:Xt};function be(t){this.type=$t,this.sections=t}function we(t){this.type=te,this.input=t}function Se(t,e){this.type=t,this.args=e}_e.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){var o,a;if(2<t.length){var s=t[1];if("string"!=typeof s||!(s in xe)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=xe[s],r++}else o=Jt;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);a=t[2],r++}i=ee(o,a)}else i=xe[n];for(var l=[];r<t.length;r++){var u=e.parse(t[r],r,Jt);if(!u)return null;l.push(u)}return new _e(i,l)},_e.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var i=this.args[e].evaluate(t);if(!ne(this.type,me(i)))return i;if(e===this.args.length-1)throw new ve("Expected value to be of type "+ie(this.type)+", but found "+ie(me(i))+" instead.")}return null}
vendor: 4,256 bytes, line 2
2,_e.prototype.eachChild=function(t){this.args.forEach(t)},_e.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},_e.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);var r=t.N;("number"==typeof r||1<this.args.length)&&e.push(r)}}return e.concat(this.args.map((function(t){return t.serialize()})))},be.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,Ht)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,ee(Wt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Kt)))return null;var c=r[r.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=e.parse(t[o],1,Jt);if(!p)return null;var h=p.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,r.push({content:p,scale:null,font:null,textColor:null})}}return new be(r)},be.prototype.evaluate=function(t){return new pe(this.sections.map((function(e){var i=e.content.evaluate(t);return me(i)===te?new ce("",i,null,null,null):new ce(ge(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},be.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)}},be.prototype.outputDefined=function(){return!1},be.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},we.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,Wt);return i?new we(i):e.error("No image name provided.")},we.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=he.fromString(e);return i&&t.availableImages&&(i.available=-1<t.availableImages.indexOf(e)),i},we.prototype.eachChild=function(t){t(this.input)},we.prototype.outputDefined=function(){return!1},we.prototype.serialize=function(){return["image",this.input.serialize()]};var Te={"to-boolean":Yt,"to-color":Kt,"to-number":Ht,"to-string":Wt};function Ce(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}Se.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 r=Te[i],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Jt);if(!a)return null;n.push(a)}return new Se(r,n)},Se.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 le)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 le(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?pe.fromString(ge(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?he.fromString(ge(this.args[0].evaluate(t))):ge(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.")}
2,Se.prototype.eachChild=function(t){this.args.forEach(t)},Se.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},Se.prototype.serialize=function(){if("formatted"===this.type.kind)return new be([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new we(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ie=["Unknown","Point","LineString","Polygon"];Ce.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ce.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Ie[this.feature.type]:this.feature.type:null},Ce.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ce.prototype.canonicalID=function(){return this.canonical},Ce.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ce.prototype.parseColor=function(t){return this._parseColorCache[t]||(this._parseColorCache[t]=le.parse(t))};var Ee=function(t,e,i,r){this.name=t,this.type=e,this._evaluate=i,this.args=r};function Me(t,e,i){this.type=Qt,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}function Ae(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 Le(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function ke(t,e){for(var i,r,n,o,a,s,l=!1,u=0,c=e.length;u<c;u++)for(var p=e[u],h=0,d=p.length;h<d-1;h++){if((n=t[0]-(i=p[h])[0])*(s=t[1]-(r=p[h+1])[1])-(a=t[0]-r[0])*(o=t[1]-i[1])==0&&n*a<=0&&o*s<=0)return;f=t,m=p[h],g=p[h+1],m[1]>f[1]!=g[1]>f[1]&&f[0]<(g[0]-m[0])*(f[1]-m[1])/(g[1]-m[1])+m[0]&&(l=!l)}var f,m,g;return l}function Pe(t,e){for(var i=0;i<e.length;i++)if(ke(t,e[i]))return 1}function De(t,e,i,r){var n=r[0]-i[0],o=r[1]-i[1],a=(t[0]-i[0])*o-n*(t[1]-i[1]),s=(e[0]-i[0])*o-n*(e[1]-i[1]);return 0<a&&s<0||a<0&&0<s}function ze(t,e,i){for(var r=0,n=i;r<n.length;r+=1)for(var o=n[r],a=0;a<o.length-1;++a)if(0!=(u=[(l=o[a+1])[0]-(s=o[a])[0],l[1]-s[1]])[0]*(c=[e[0]-t[0],e[1]-t[1]])[1]-u[1]*c[0]&&De(t,e,s,l)&&De(s,l,t,e))return 1;var s,l,u,c}function Oe(t,e){for(var i=0;i<t.length;++i)if(!ke(t[i],e))return;for(var r=0;r<t.length-1;++r)if(ze(t[r],t[r+1],e))return;return 1}function Ne(t,e){for(var i=0;i<e.length;i++)if(Oe(t,e[i]))return 1}function Re(t,e,i){for(var r=[],n=0;n<t.length;n++){for(var o=[],a=0;a<t[n].length;a++){var s=(u=i,c=(180+(l=t[n][a])[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l[1]*Math.PI/360)))/360,h=Math.pow(2,u.z),[Math.round(c*h*8192),Math.round(p*h*8192)]);Ae(e,s),o.push(s)}r.push(o)}var l,u,c,p,h;return r}function Be(t,e,i){for(var r=[],n=0;n<t.length;n++){var o=Re(t[n],e,i);r.push(o)}return r}function je(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){var n=.5*r,o=t[0]-i[0]>n?-r:i[0]-t[0]>n?r:0;0===o&&(o=t[0]-i[2]>n?-r:i[2]-t[0]>n?r:0),t[0]+=o}Ae(e,t)}function Fe(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],h=[p.x+o[0],p.y+o[1]];je(h,e,i,n),a.push(h)}return a}function Ue(t,e,i,r){for(var n,o=8192*Math.pow(2,r.z),a=[8192*r.x,8192*r.y],s=[],l=0,u=t;l<u.length;l+=1){for(var c=[],p=0,h=u[l];p<h.length;p+=1){var d=h[p],f=[d.x+a[0],d.y+a[1]];Ae(e,f),c.push(f)}s.push(c)}if(e[2]-e[0]<=o/2){(n=e)[0]=n[1]=1/0,n[2]=n[3]=-1/0;for(var m=0,g=s;m<g.length;m+=1)for(var y=0,v=g[m];y<v.length;y+=1)je(v[y],e,i,o)}return s}Ee.prototype.evaluate=function(t){return this._evaluate(t,this.args)},Ee.prototype.eachChild=function(t){this.args.forEach(t)},Ee.prototype.outputDefined=function(){return!1},Ee.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},Ee.parse=function(t,e){var i,r=t[0],n=Ee.definitions[r];if(!n)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=a.filter((function(e){var i=e[0];return!Array.isArray(i)||i.length===t.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var p=c[u],h=p[0],d=p[1];l=new We(e.registry,e.path,null,e.scope);for(var f=[],m=!1,g=1;g<t.length;g++){var y=t[g],v=Array.isArray(h)?h[g-1]:h.type,_=l.parse(y,1+f.length,v);if(!_){m=!0;break}f.push(_)}if(!m)if(Array.isArray(h)&&h.length!==f.length)l.error("Expected "+h.length+" arguments, but found "+f.length+" instead.");else{for(var x=0;x<f.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=f[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new Ee(r,o,d,f)}}if(1===s.length)(i=e.errors).push.apply(i,l.errors);else{for(var S=(s.length?s:a).map((function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(ie).join(", ")+")":"("+ie(e.type)+"...)"})).join(" | "),T=[],C=1;C<t.length;C++){var I=e.parse(t[C],1+T.length);if(!I)return null;T.push(ie(I.type))}e.error("Expected arguments of type "+S+", but found ("+T.join(", ")+") instead.")}return null},Ee.register=function(t,e){for(var i in Ee.definitions=e)t[i]=Ee},Me.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,Yt);if(!r)return null;var n=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,Yt);if(!n)return null;var o=null;return i.locale&&!(o=e.parse(i.locale,1,Wt))?null:new Me(r,n,o)},Me.prototype.evaluate=function(t){return new ue(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Me.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Me.prototype.outputDefined=function(){return!1},Me.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=Yt,this.geojson=t,this.geometries=e};function qe(t){if(t instanceof Ee){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&&!qe(t)&&(e=!1)})),e}function Ge(t){if(!(t instanceof Ee&&"feature-state"===t.name)){var e=!0;return t.eachChild((function(t){e&&!Ge(t)&&(e=!1)})),e}}function Ze(t,e){if(t instanceof Ee&&0<=e.indexOf(t.name))return!1;var i=!0;return t.eachChild((function(t){i&&!Ze(t,e)&&(i=!1)})),i}function He(t,e){this.type=e.type,this.name=t,this.boundExpression=e}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(fe(t[1])){var i=t[1];
vendor: 26,743 bytes, line 2
2if("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){var o=i.geometry.type;if("Polygon"===o||"MultiPolygon"===o)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=Re(e.coordinates,r,n),a=Fe(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!ke(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Be(e.coordinates,r,n),c=Fe(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Pe(h[p],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=Re(e.coordinates,r,n),a=Ue(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Oe(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Be(e.coordinates,r,n),c=Ue(t.geometry(),i,r,n);if(!Le(i,r))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Ne(h[p],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]},He.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var i=t[1];return e.scope.has(i)?new He(i,e.scope.get(i)):e.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},He.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},He.prototype.eachChild=function(){},He.prototype.outputDefined=function(){return!1},He.prototype.serialize=function(){return["var",this.name]};var We=function(t,e,i,r,n){void 0===e&&(e=[]),void 0===r&&(r=new Ut),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 Ye(t,e){for(var i,r=t.length-1,n=0,o=r,a=0;n<=o;)if((i=t[a=Math.floor((n+o)/2)])<=e){if(a===r||e<t[a+1])return a;n=a+1}else{if(!(e<i))throw new ve("Input is not a number.");o=a-1}return 0}We.prototype.parse=function(t,e,i,r,n){return void 0===n&&(n={}),e?this.concat(e,i,r)._parse(t,n):this._parse(t,n)},We.prototype._parse=function(t,e){function i(t,e,i){return"assert"===i?new _e(e,[t]):"coerce"===i?new Se(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,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,e.typeAnnotation||"coerce");else o=i(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ye)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof He)return t(e.boundExpression);if(e instanceof Ee&&"error"===e.name)return!1;if(e instanceof Me)return!1;if(e instanceof Ve)return!1;var i=e instanceof Se||e instanceof _e,r=!0;return e.eachChild((function(e){r=i?r&&t(e):r&&e instanceof ye})),!!r&&qe(e)&&Ze(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new Ce;try{o=new ye(o.type,o.evaluate(l))}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.")},We.prototype.concat=function(t,e,i){var r="number"==typeof t?this.path.concat(t):this.path,n=i?this.scope.concat(i):this.scope;return new We(this.registry,r,e||null,n,this.errors)},We.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 qt(r,t))},We.prototype.checkSubtype=function(t,e){var i=ne(t,e);return i&&this.error(i),i};var Ke=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 Xe(t,e,i){return t*(1-i)+e*i}Ke.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,Ht);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);var c=e.parse(s,u,n);if(!c)return null;n=n||c.type,r.push([a,c])}return new Ke(n,i,r)},Ke.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].evaluate(t):i[Ye(e,r)].evaluate(t)},Ke.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},Ke.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Ke.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 Je=Object.freeze({__proto__:null,number:Xe,color:function(t,e,i){return new le(Xe(t.r,e.r,i),Xe(t.g,e.g,i),Xe(t.b,e.b,i),Xe(t.a,e.a,i))},array:function(t,e,i){return t.map((function(t,r){return Xe(t,e[r],i)}))}}),Qe=6/29*3*(6/29),$e=Math.PI/180,ti=180/Math.PI;function ei(t){return.008856451679035631<t?Math.pow(t,1/3):t/Qe+4/29}function ii(t){return 6/29<t?t*t*t:Qe*(t-4/29)}function ri(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ni(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oi(t){var e=ni(t.r),i=ni(t.g),r=ni(t.b),n=ei((.4124564*e+.3575761*i+.1804375*r)/.95047),o=ei(.2126729*e+.7151522*i+.072175*r);return{l:116*o-16,a:500*(n-o),b:200*(o-ei((.0193339*e+.119192*i+.9503041*r)/1.08883)),alpha:t.a}}function ai(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;return e=+ii(e),i=.95047*ii(i),r=1.08883*ii(r),new le(ri(3.2404542*i-1.5371385*e-.4985314*r),ri(-.969266*i+1.8760108*e+.041556*r),ri(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}var si={forward:oi,reverse:ai,interpolate:function(t,e,i){return{l:Xe(t.l,e.l,i),a:Xe(t.a,e.a,i),b:Xe(t.b,e.b,i),alpha:Xe(t.alpha,e.alpha,i)}}},li={forward:function(t){var e=oi(t),i=e.l,r=e.a,n=e.b,o=Math.atan2(n,r)*ti;return{h:o<0?360+o:o,c:Math.sqrt(r*r+n*n),l:i,alpha:t.a}},reverse:function(t){var e=t.h*$e,i=t.c;return ai({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<(o=n-r)||o<-180?o-360*Math.round(o/360):o)),c:Xe(t.c,e.c,i),l:Xe(t.l,e.l,i),alpha:Xe(t.alpha,e.alpha,i)};var r,n,o}},ui=Object.freeze({__proto__:null,lab:si,hcl:li}),ci=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 pi(t,e,i,r){var n=r-i,o=t-i;return 0==n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}ci.interpolationFactor=function(t,e,r,n){var o=0;if("exponential"===t.name)o=pi(e,t.base,r,n);else if("linear"===t.name)o=pi(e,1,r,n);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new i(a[0],a[1],a[2],a[3]).solve(pi(e,1,r,n))}return o},ci.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);var s=r.slice(1);if(4!==s.length||s.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:s}}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,Ht)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Kt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],d=c+3,f=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',d);if(l.length&&l[l.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var m=e.parse(h,f,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new ci(u,i,r,n,l):e.error("Type "+ie(u)+" is not interpolatable.")},ci.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);var o=Ye(e,r),a=ci.interpolationFactor(this.interpolation,r,e[o],e[o+1]),s=i[o].evaluate(t),l=i[o+1].evaluate(t);return"interpolate"===this.operator?Je[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?li.reverse(li.interpolate(li.forward(s),li.forward(l),a)):si.reverse(si.interpolate(si.forward(s),si.forward(l),a))},ci.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},ci.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},ci.prototype.serialize=function(){var t;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);for(var 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 hi=function(t,e){this.type=t,this.args=e};hi.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)}var l=r&&n.some((function(t){return ne(r,t.type)}));return new hi(l?Jt:i,n)},hi.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 he&&!i.available&&(e=e||i.name,i=null,r===this.args.length&&(i=e)),null===i);n+=1);return i},hi.prototype.eachChild=function(t){this.args.forEach(t)},hi.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},hi.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var di=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};function fi(t,e,i){this.type=t,this.index=e,this.input=i}function mi(t,e){this.type=Yt,this.needle=t,this.haystack=e}function gi(t,e,i){this.type=Ht,this.needle=t,this.haystack=e,this.fromIndex=i}function yi(t,e,i,r,n,o){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=n,this.otherwise=o}function vi(t,e,i){this.type=t,this.branches=e,this.otherwise=i}function _i(t,e,i,r){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=r}function xi(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 bi(t,e,i,r){return 0===r.compare(e,i)}function wi(t,e,i){var r="=="!==t&&"!="!==t;return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var i=t[0],o=e.parse(t[1],1,Jt);if(!o)return null;if(!xi(i,o.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+ie(o.type)+"'.");var a=e.parse(t[2],2,Jt);if(!a)return null;if(!xi(i,a.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+ie(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+ie(o.type)+"' and '"+ie(a.type)+"'.");r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new _e(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new _e(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Qt)))return null}return new n(o,a,s)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){var s=me(o),l=me(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new ve('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var u=me(o),c=me(a);if("string"!==u.kind||"string"!==c.kind)return e(n,o,a)}return this.collator?i(n,o,a,this.collator.evaluate(n)):e(n,o,a)},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.outputDefined=function(){return!0},n.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},n;function n(t,e,i){this.type=Yt,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}}function Si(t,e,i,r,n){this.type=Wt,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=n}di.prototype.evaluate=function(t){return this.result.evaluate(t)},di.prototype.eachChild=function(t){for(var e=0,i=this.bindings;e<i.length;e+=1)t(i[e][1]);t(this.result)},di.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 di(i,a):null},di.prototype.outputDefined=function(){return this.result.outputDefined()},di.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},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,Ht),r=e.parse(t[2],2,ee(e.expectedType||Jt));return i&&r?new fi(r.type.itemType,i,r):null},fi.prototype.evaluate=function(t){var e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new ve("Array index out of bounds: "+e+" < 0.");if(e>=i.length)throw new ve("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new ve("Array index must be an integer, but found "+e+" instead.");return i[e]},fi.prototype.eachChild=function(t){t(this.index),t(this.input)},fi.prototype.outputDefined=function(){return!1},fi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]},mi.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,Jt),r=e.parse(t[2],2,Jt);return i&&r?oe(i.type,[Yt,Wt,Ht,Zt,Jt])?new mi(i,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+ie(i.type)+" instead"):null},mi.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!ae(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+ie(me(e))+" instead.");if(!ae(i,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+ie(me(i))+" instead.");return 0<=i.indexOf(e)},mi.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},mi.prototype.outputDefined=function(){return!0},mi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]},gi.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,Jt),r=e.parse(t[2],2,Jt);if(!i||!r)return null;if(!oe(i.type,[Yt,Wt,Ht,Zt,Jt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+ie(i.type)+" instead");if(4!==t.length)return new gi(i,r);var n=e.parse(t[3],3,Ht);return n?new gi(i,r,n):null},gi.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!ae(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+ie(me(e))+" instead.");if(!ae(i,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+ie(me(i))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(e,r)}return i.indexOf(e)},gi.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},gi.prototype.outputDefined=function(){return!1},gi.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]},yi.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,me(h)))return null}else i=me(h);if(void 0!==n[String(h)])return u.error("Branch labels must be unique.");n[String(h)]=o.length}var d=e.parse(l,a,r);if(!d)return null;r=r||d.type,o.push(d)}var f=e.parse(t[1],1,Jt);if(!f)return null;var m=e.parse(t[t.length-1],t.length-1,r);return!m||"value"!==f.type.kind&&e.concat(1).checkSubtype(i,f.type)?null:new yi(i,r,f,n,o,m)},yi.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(me(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},yi.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},yi.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},yi.prototype.serialize=function(){for(var t=this,e=["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(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=i;l<u.length;l+=1){var c=u[l],p=c[0],h=c[1];e.push(1===h.length?s(h[0]):h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e},vi.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,Yt);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 vi(i,r,s):null},vi.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)},vi.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)},vi.prototype.outputDefined=function(){return this.branches.every((function(t){return t[1].outputDefined()}))&&this.otherwise.outputDefined()},vi.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t},_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,Jt),r=e.parse(t[2],2,Ht);if(!i||!r)return null;if(!oe(i.type,[ee(Jt),Wt,Jt]))return e.error("Expected first argument to be of type array or string, but found "+ie(i.type)+" instead");if(4!==t.length)return new _i(i.type,i,r);var n=e.parse(t[3],3,Ht);return n?new _i(i.type,i,r,n):null},_i.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!ae(e,["string","array"]))throw new ve("Expected first argument to be of type array or string, but found "+ie(me(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(i,r)}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]};var Ti=wi("==",(function(t,e,i){return e===i}),bi),Ci=wi("!=",(function(t,e,i){return e!==i}),(function(t,e,i,r){return!bi(0,e,i,r)})),Ii=wi("<",(function(t,e,i){return e<i}),(function(t,e,i,r){return r.compare(e,i)<0})),Ei=wi(">",(function(t,e,i){return i<e}),(function(t,e,i,r){return 0<r.compare(e,i)})),Mi=wi("<=",(function(t,e,i){return e<=i}),(function(t,e,i,r){return r.compare(e,i)<=0})),Ai=wi(">=",(function(t,e,i){return i<=e}),(function(t,e,i,r){return 0<=r.compare(e,i)}));function Li(t){this.type=Ht,this.input=t}Si.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,Ht);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,Wt)))return null;var o=null;if(r.currency&&!(o=e.parse(r.currency,1,Wt)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=e.parse(r["min-fraction-digits"],1,Ht)))return null;var s=null;return r["max-fraction-digits"]&&!(s=e.parse(r["max-fraction-digits"],1,Ht))?null:new Si(i,n,o,a,s)},Si.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))},Si.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)},Si.prototype.outputDefined=function(){return!1},Si.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]},Li.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error("Expected argument of type string or array, but found "+ie(i.type)+" instead."):new Li(i):null},Li.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ve("Expected value to be of type string or array, but found "+ie(me(e))+" instead.")},Li.prototype.eachChild=function(t){t(this.input)},Li.prototype.outputDefined=function(){return!1},Li.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var ki={"==":Ti,"!=":Ci,">":Ei,"<":Ii,">
2=":Ai,"<=":Mi,array:_e,at:fi,boolean:_e,case:vi,coalesce:hi,collator:Me,format:be,image:we,in:mi,"index-of":gi,interpolate:ci,"interpolate-hcl":ci,"interpolate-lab":ci,length:Li,let:di,literal:ye,match:yi,number:_e,"number-format":Si,object:_e,slice:_i,step:Ke,string:_e,"to-boolean":Se,"to-color":Se,"to-number":Se,"to-string":Se,var:He,within:Ve};function Pi(t,e){var i=e[0],r=e[1],n=e[2],o=e[3];i=i.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=de(i,r,n,a);if(s)throw new ve(s);return new le(i/255*a,r/255*a,n/255*a,a)}function Di(t,e){return t in e}function zi(t,e){var i=e[t];return void 0===i?null:i}function Oi(t){return{type:t}}function Ni(t){return{result:"success",value:t}}function Ri(t){return{result:"error",value:t}}function Bi(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ji(t){return t.expression&&-1<t.expression.parameters.indexOf("zoom")}function Fi(t){return t.expression&&t.expression.interpolated}function Ui(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Vi(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function qi(t){return t}function Gi(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function Zi(t,e,i,r,n){return Gi(typeof i===n?r[i]:void 0,t.default,e.default)}function Hi(t,e,i){if("number"!==Ui(i))return Gi(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];var n=Ye(t.stops.map((function(t){return t[0]})),i);return t.stops[n][1]}function Wi(t,e,i){var r=void 0!==t.base?t.base:1;if("number"!==Ui(i))return Gi(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,l,u=Ye(t.stops.map((function(t){return t[0]})),i),c=(o=r,l=i-(a=t.stops[u][0]),0==(s=t.stops[u+1][0]-a)?0:1===o?l/s:(Math.pow(o,l)-1)/(Math.pow(o,s)-1)),p=t.stops[u][1],h=t.stops[u+1][1],d=Je[e.type]||qi;if(t.colorSpace&&"rgb"!==t.colorSpace){var f=ui[t.colorSpace];d=function(t,e){return f.reverse(f.interpolate(f.forward(t),f.forward(e),c))}}return"function"==typeof p.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=p.evaluate.apply(void 0,t),r=h.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==r)return d(i,r,c)}}:d(p,h,c)}function Yi(t,e,i){return"color"===e.type?i=le.parse(i):"formatted"===e.type?i=pe.fromString(i.toString()):"resolvedImage"===e.type?i=he.fromString(i.toString()):Ui(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),Gi(i,t.default,e.default)}Ee.register(ki,{error:[{kind:"error"},[Wt],function(t,e){throw new ve(e[0].evaluate(t))}],typeof:[Wt,[Jt],function(t,e){return ie(me(e[0].evaluate(t)))}],"to-rgba":[ee(Ht,4),[Kt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Kt,[Ht,Ht,Ht],Pi],rgba:[Kt,[Ht,Ht,Ht,Ht],Pi],has:{type:Yt,overloads:[[[Wt],function(t,e){return Di(e[0].evaluate(t),t.properties())}],[[Wt,Xt],function(t,e){var i=e[1];return Di(e[0].evaluate(t),i.evaluate(t))}]]},get:{type:Jt,overloads:[[[Wt],function(t,e){return zi(e[0].evaluate(t),t.properties())}],[[Wt,Xt],function(t,e){var i=e[1];return zi(e[0].evaluate(t),i.evaluate(t))}]]},"feature-state":[Jt,[Wt],function(t,e){return zi(e[0].evaluate(t),t.featureState||{})}],properties:[Xt,[],function(t){return t.properties()}],"geometry-type":[Wt,[],function(t){return t.geometryType()}],id:[Jt,[],function(t){return t.id()}],zoom:[Ht,[],function(t){return t.globals.zoom}],"heatmap-density":[Ht,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Ht,[],function(t){return t.globals.lineProgress||0}],accumulated:[Jt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Ht,Oi(Ht),function(t,e){for(var i=0,r=0,n=e;r<n.length;r+=1)i+=n[r].evaluate(t);return i}],"*":[Ht,Oi(Ht),function(t,e){for(var i=1,r=0,n=e;r<n.length;r+=1)i*=n[r].evaluate(t);return i}],"-":{type:Ht,overloads:[[[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)-i.evaluate(t)}],[[Ht],function(t,e){return-e[0].evaluate(t)}]]},"/":[Ht,[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)/i.evaluate(t)}],"%":[Ht,[Ht,Ht],function(t,e){var i=e[1];return e[0].evaluate(t)%i.evaluate(t)}],ln2:[Ht,[],function(){return Math.LN2}],pi:[Ht,[],function(){return Math.PI}],e:[Ht,[],function(){return Math.E}],"^":[Ht,[Ht,Ht],function(t,e){var i=e[1];return Math.pow(e[0].evaluate(t),i.evaluate(t))}],sqrt:[Ht,[Ht],function(t,e){return Math.sqrt(e[0].evaluate(t))}],log10:[Ht,[Ht],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN10}],ln:[Ht,[Ht],function(t,e){return Math.log(e[0].evaluate(t))}],log2:[Ht,[Ht],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN2}],sin:[Ht,[Ht],function(t,e){return Math.sin(e[0].evaluate(t))}],cos:[Ht,[Ht],function(t,e){return Math.cos(e[0].evaluate(t))}],tan:[Ht,[Ht],function(t,e){return Math.tan(e[0].evaluate(t))}],asin:[Ht,[Ht],function(t,e){return Math.asin(e[0].evaluate(t))}],acos:[Ht,[Ht],function(t,e){return Math.acos(e[0].evaluate(t))}],atan:[Ht,[Ht],function(t,e){return Math.atan(e[0].evaluate(t))}],min:[Ht,Oi(Ht),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Ht,Oi(Ht),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Ht,[Ht],function(t,e){return Math.abs(e[0].evaluate(t))}],round:[Ht,[Ht],function(t,e){var i=e[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Ht,[Ht],function(t,e){return Math.floor(e[0].evaluate(t))}],ceil:[Ht,[Ht],function(t,e){return Math.ceil(e[0].evaluate(t))}],"filter-==":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1];return t.properties()[i.value]===r.value}],"filter-id-==":[Yt,[Jt],function(t,e){var i=e[0];return t.id()===i.value}],"filter-type-==":[Yt,[Wt],function(t,e){var i=e[0];return t.geometryType()===i.value}],"filter-<":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&n<o}],"filter-id-<":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&r<n}],"filter->":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&o<n}],"filter-id->":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&n<r}],"filter-<=":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&r<=n}],"filter->=":[Yt,[Wt,Jt],function(t,e){var i=e[0],r=e[1],n=t.properties()[i.value],o=r.value;return typeof n==typeof o&&o<=n}],"filter-id->=":[Yt,[Jt],function(t,e){var i=e[0],r=t.id(),n=i.value;return typeof r==typeof n&&n<=r}],"filter-has":[Yt,[Jt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Yt,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Yt,[ee(Wt)],function(t,e){return 0<=e[0].value.indexOf(t.geometryType())}],"filter-id-in":[Yt,[ee(Jt)],function(t,e){return 0<=e[0].value.indexOf(t.id())}],"filter-in-small":[Yt,[Wt,ee(Jt)],function(t,e){var i=e[0];return 0<=e[1].value.indexOf(t.properties()[i.value])}],"filter-in-large":[Yt,[Wt,ee(Jt)],function(t,e){var i=e[0],r=e[1];
vendor: 11,210 bytes, line 2
2return 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],r.value,0,r.value.length-1)}],all:{type:Yt,overloads:[[[Yt,Yt],function(t,e){var i=e[1];return e[0].evaluate(t)&&i.evaluate(t)}],[Oi(Yt),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:Yt,overloads:[[[Yt,Yt],function(t,e){var i=e[1];return e[0].evaluate(t)||i.evaluate(t)}],[Oi(Yt),function(t,e){for(var i=0,r=e;i<r.length;i+=1)if(r[i].evaluate(t))return!0;return!1}]]},"!":[Yt,[Yt],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Yt,[Wt],function(t,e){var i=t.globals&&t.globals.isSupportedScript;return!i||i(e[0].evaluate(t))}],upcase:[Wt,[Wt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Wt,[Wt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Wt,Oi(Jt),function(t,e){return e.map((function(e){return ge(e.evaluate(t))})).join("")}],"resolved-locale":[Wt,[Qt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Ki=function(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new Ce,this._defaultValue=e?"color"===(i=e).type&&Vi(i.default)?new le(0,0,0,0):"color"===i.type?le.parse(i.default)||null:void 0===i.default?null:i.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Xi(t){return Array.isArray(t)&&0<t.length&&"string"==typeof t[0]&&t[0]in ki}function Ji(t,e){var i,r=new We(ki,[],e?(i={color:Kt,string:Wt,number:Ht,enum:Wt,boolean:Yt,formatted:$t,resolvedImage:te},"array"===e.type?ee(i[e.value]||Jt,e.length):i[e.type]):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Ni(new Ki(n,e)):Ri(r.errors)}Ki.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)},Ki.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 Qi=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Ge(e.expression)};Qi.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)},Qi.prototype.evaluate=function(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)};var $i=function(t,e,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Ge(e.expression),this.interpolationType=r};function tr(t,e){if("error"===(t=Ji(t,e)).result)return t;var i=t.value.expression,r=qe(i);if(!r&&!Bi(e))return Ri([new qt("","data expressions not supported")]);var n=Ze(i,["zoom"]);if(!n&&!ji(e))return Ri([new qt("","zoom expressions not supported")]);var o=function t(e){var i=null;if(e instanceof di)i=t(e.result);else if(e instanceof hi)for(var r=0,n=e.args;r<n.length&&!(i=t(n[r]));r+=1);else(e instanceof Ke||e instanceof ci)&&e.input instanceof Ee&&"zoom"===e.input.name&&(i=e);return i instanceof qt||e.eachChild((function(e){var r=t(e);r instanceof qt?i=r:!i&&r?i=new qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):i&&r&&i!==r&&(i=new qt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),i}(i);return o||n?o instanceof qt?Ri([o]):o instanceof ci&&!Fi(e)?Ri([new qt("",'"interpolate" expressions cannot be used with this property')]):Ni(o?new $i(r?"camera":"composite",t.value,o.labels,o instanceof ci?o.interpolation:void 0):new Qi(r?"constant":"source",t.value)):Ri([new qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}function er(t,e){this._parameters=t,this._specification=e,Bt(this,function t(e,i){var r,n,o,a="color"===i.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||!(s||void 0!==e.property),u=e.type||(Fi(i)?"exponential":"interval");if(a&&((e=Bt({},e)).stops&&(e.stops=e.stops.map((function(t){return[t[0],le.parse(t[1])]}))),e.default=le.parse(e.default?e.default:i.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!ui[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)r=Wi;else if("interval"===u)r=Hi;else if("categorical"===u){r=Zi,n=Object.create(null);for(var c=0,p=e.stops;c<p.length;c+=1){var h=p[c];n[h[0]]=h[1]}o=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');r=Yi}if(s){for(var d={},f=[],m=0;m<e.stops.length;m++){var g=e.stops[m],y=g[0].zoom;void 0===d[y]&&(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},f.push(y)),d[y].stops.push([g[0].value,g[1]])}for(var v=[],_=0,x=f;_<x.length;_+=1){var b=x[_];v.push([d[b].zoom,t(d[b],i)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:ci.interpolationFactor.bind(void 0,w),zoomStops:v.map((function(t){return t[0]})),evaluate:function(t,r){var n=t.zoom;return Wi({stops:v,base:e.base},i,n).evaluate(n,r)}}}if(l){var S="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:ci.interpolationFactor.bind(void 0,S),zoomStops:e.stops.map((function(t){return t[0]})),evaluate:function(t){return r(e,i,t.zoom,n,o)}}}return{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Gi(e.default,i.default):r(e,i,s,n,o)}}}(this._parameters,this._specification))}function ir(t){var e=t.key,i=t.value,r=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=Ui(i);if("object"!==l)return[new Nt(e,i,"object expected, "+l+" found")];for(var u in i){var c=u.split(".")[0],p=r[c]||r["*"],h=void 0;if(n[c])h=n[c];else if(r[c])h=Er;else if(n["*"])h=n["*"];else{if(!r["*"]){s.push(new Nt(e,i[u],'unknown property "'+u+'"'));continue}h=Er}s=s.concat(h({key:(e?e+".":e)+u,value:i[u],valueSpec:p,style:o,styleSpec:a,object:i,objectKey:u},i))}for(var d in r)n[d]||r[d].required&&void 0===r[d].default&&void 0===i[d]&&s.push(new Nt(e,i,'missing required property "'+d+'"'));return s}function rr(t){var e=t.value,i=t.valueSpec,r=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||Er;if("array"!==Ui(e))return[new Nt(o,e,"array expected, "+Ui(e)+" found")];if(i.length&&e.length!==i.length)return[new Nt(o,e,"array length "+i.length+" expected, length "+e.length+" found")];if(i["min-length"]&&e.length<i["min-length"])return[new Nt(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"===Ui(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 nr(t){var e=t.key,i=t.value,r=t.valueSpec,n=Ui(i);return"number"===n&&i!=i&&(n="NaN"),"number"!==n?[new Nt(e,i,"number expected, "+n+" found")]:"minimum"in r&&i<r.minimum?[new Nt(e,i,i+" is less than the minimum value "+r.minimum)]:"maximum"in r&&i>r.maximum?[new Nt(e,i,i+" is greater than the maximum value "+r.maximum)]:[]}function or(t){var e,i,r,n=t.valueSpec,o=jt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Ui(t.value.stops)&&"array"===Ui(t.value.stops[0])&&"object"===Ui(t.value.stops[0][0]),c=ir({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Nt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],i=t.value;return e=e.concat(rr({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Ui(i)&&0===i.length&&e.push(new Nt(t.key,i,"array must have at least one stop")),e},default:function(t){return Er({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Nt(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Nt(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Fi(t.valueSpec)&&c.push(new Nt(t.key,t.value,"exponential functions not supported")),8<=t.styleSpec.$version&&(l&&!Bi(t.valueSpec)?c.push(new Nt(t.key,t.value,"property functions not supported")):s&&!ji(t.valueSpec)&&c.push(new Nt(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new Nt(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Ui(o))return[new Nt(s,o,"array expected, "+Ui(o)+" found")];if(2!==o.length)return[new Nt(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Ui(o[0]))return[new Nt(s,o,"object expected, "+Ui(o[0])+" found")];if(void 0===o[0].zoom)return[new Nt(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Nt(s,o,"object stop key must have value")];if(r&&r>jt(o[0].zoom))return[new Nt(s,o[0].zoom,"stop zoom values must appear in ascending order")];jt(o[0].zoom)!==r&&(r=jt(o[0].zoom),i=void 0,a={}),e=e.concat(ir({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:nr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Xi(Ft(o[1]))?e.concat([new Nt(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Er({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function h(t,r){var s=Ui(t.value),l=jt(t.value),u=null!==t.value?t.value:r;if(e){if(s!==e)return[new Nt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Nt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"===s||"categorical"===o)return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==i&&l<i?[new Nt(t.key,u,"stop domain values must appear in ascending order")]:(i=l,"categorical"===o&&l in a?[new Nt(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new Nt(t.key,u,"integer expected, found "+l)];var c="number expected, "+s+" found";return Bi(n)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new
2Nt(t.key,u,c)]}}function ar(t){var e=("property"===t.expressionContext?tr:Ji)(Ft(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new Nt(""+t.key+e.key,t.value,e.message)}));var i=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!i.outputDefined())return[new Nt(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Ge(i))return[new Nt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Ge(i))return[new Nt(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Ze(i,["zoom","feature-state"]))return[new Nt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!qe(i))return[new Nt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function sr(t){var e=t.key,i=t.value,r=t.valueSpec,n=[];return Array.isArray(r.values)?-1===r.values.indexOf(jt(i))&&n.push(new Nt(e,i,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(i)+" found")):-1===Object.keys(r.values).indexOf(jt(i))&&n.push(new Nt(e,i,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(i)+" found")),n}function lr(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(!lr(r)&&"boolean"!=typeof r)return}return 1;default:return 1}}$i.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)},$i.prototype.evaluate=function(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)},$i.prototype.interpolationFactor=function(t,e,i){return this.interpolationType?ci.interpolationFactor(this.interpolationType,t,e,i):0},er.deserialize=function(t){return new er(t._parameters,t._specification)};var ur={type:"boolean",default:!(er.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}}),transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cr(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};lr(t)||(t=hr(t));var e=Ji(t,ur);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,i,r){return e.value.evaluate(t,i,{},r)},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 pr(t,e){return t<e?-1:e<t?1:0}function hr(t){if(!t)return!0;var e,i=t[0];return t.length<=1?"any"!==i:"=="===i?dr(t[1],t[2],"=="):"!="===i?gr(dr(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?dr(t[1],t[2],i):"any"===i?(e=t.slice(1),["any"].concat(e.map(hr))):"all"===i?["all"].concat(t.slice(1).map(hr)):"none"===i?["all"].concat(t.slice(1).map(hr).map(gr)):"in"===i?fr(t[1],t.slice(2)):"!in"===i?gr(fr(t[1],t.slice(2))):"has"===i?mr(t[1]):"!has"===i?gr(mr(t[1])):"within"!==i||t}function dr(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 fr(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(pr)]]:["filter-in-small",t,["literal",e]]}}function mr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function gr(t){return["!",t]}function yr(t){return lr(Ft(t.value))?ar(Bt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var i=e.value,r=e.key;if("array"!==Ui(i))return[new Nt(r,i,"array expected, "+Ui(i)+" found")];var n,o=e.styleSpec,a=[];if(i.length<1)return[new Nt(r,i,"filter array must have at least 1 element")];switch(a=a.concat(sr({key:r+"[0]",value:i[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),jt(i[0])){case"<":case"<=":case">":case">=":2<=i.length&&"$type"===jt(i[1])&&a.push(new Nt(r,i,'"$type" cannot be use with operator "'+i[0]+'"'));case"==":case"!=":3!==i.length&&a.push(new Nt(r,i,'filter array for operator "'+i[0]+'" must have 3 elements'));case"in":case"!in":2<=i.length&&"string"!==(n=Ui(i[1]))&&a.push(new Nt(r+"[1]",i[1],"string expected, "+n+" found"));for(var s=2;s<i.length;s++)n=Ui(i[s]),"$type"===jt(i[1])?a=a.concat(sr({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 Nt(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;
vendor: 8,349 bytes, line 2
2l++)a=a.concat(t({key:r+"["+l+"]",value:i[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Ui(i[1]),2!==i.length?a.push(new Nt(r,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new Nt(r+"[1]",i[1],"string expected, "+n+" found"));break;case"within":n=Ui(i[1]),2!==i.length?a.push(new Nt(r,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"object"!==n&&a.push(new Nt(r+"[1]",i[1],"object expected, "+n+" found"))}return a}(t)}function vr(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 Er({key:i,value:o,valueSpec:n.transition,style:r,styleSpec:n});var u,c=t.valueSpec||s[a];if(!c)return[new Nt(i,o,'unknown property "'+a+'"')];if("string"===Ui(o)&&Bi(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new Nt(i,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&p.push(new Nt(i,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Vi(Ft(o))&&"identity"===jt(o.type)&&p.push(new Nt(i,o,'"text-font" does not support identity functions'))),p.concat(Er({key:t.key,value:o,valueSpec:c,style:r,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function _r(t){return vr(t,"paint")}function xr(t){return vr(t,"layout")}function br(t){var e=[],i=t.value,r=t.key,n=t.style,o=t.styleSpec;i.type||i.ref||e.push(new Nt(r,i,'either "type" or "ref" is required'));var a,s=jt(i.type),l=jt(i.ref);if(i.id)for(var u=jt(i.id),c=0;c<t.arrayIndex;c++){var p=n.layers[c];jt(p.id)===u&&e.push(new Nt(r,i.id,'duplicate layer id "'+i.id+'", previously used at line '+p.id.__line__))}if("ref"in i)["type","source","source-layer","filter","layout"].forEach((function(t){t in i&&e.push(new Nt(r,i[t],'"'+t+'" is prohibited for ref layers'))})),n.layers.forEach((function(t){jt(t.id)===l&&(a=t)})),a?a.ref?e.push(new Nt(r,i.ref,"ref cannot reference another ref layer")):s=jt(a.type):e.push(new Nt(r,i.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(i.source){var h=n.sources&&n.sources[i.source],d=h&&jt(h.type);h?"vector"===d&&"raster"===s?e.push(new Nt(r,i.source,'layer "'+i.id+'" requires a raster source')):"raster"===d&&"raster"!==s?e.push(new Nt(r,i.source,'layer "'+i.id+'" requires a vector source')):"vector"!==d||i["source-layer"]?"raster-dem"===d&&"hillshade"!==s?e.push(new Nt(r,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!i.paint||!i.paint["line-gradient"]||"geojson"===d&&h.lineMetrics||e.push(new Nt(r,i,'layer "'+i.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Nt(r,i,'layer "'+i.id+'" must specify a "source-layer"')):e.push(new Nt(r,i.source,'source "'+i.source+'" not found'))}else e.push(new Nt(r,i,'missing required property "source"'));return e=e.concat(ir({key:r,value:i,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Er({key:r+".type",value:i.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:i,objectKey:"type"})},filter:yr,layout:function(t){return ir({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return xr(Bt({layerType:s},t))}}})},paint:function(t){return ir({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return _r(Bt({layerType:s},t))}}})}}}))}function wr(t){var e=t.value,i=t.key,r=Ui(e);return"string"!==r?[new Nt(i,e,"string expected, "+r+" found")]:[]}var Sr={promoteId:function(t){var e=t.key,i=t.value;if("string"===Ui(i))return wr({key:e,value:i});var r=[];for(var n in i)r.push.apply(r,wr({key:e+"."+n,value:i[n]}));return r}};function Tr(t){var e=t.value,i=t.key,r=t.styleSpec,n=t.style;if(!e.type)return[new Nt(i,e,'"type" is required')];var o,a=jt(e.type);switch(a){case"vector":case"raster":case"raster-dem":return ir({key:i,value:e,valueSpec:r["source_"+a.replace("-","_")],style:t.style,styleSpec:r,objectElementValidators:Sr});case"geojson":if(o=ir({key:i,value:e,valueSpec:r.source_geojson,style:n,styleSpec:r,objectElementValidators:Sr}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],c="string"==typeof u?[u,["accumulated"],["get",s]]:u;o.push.apply(o,ar({key:i+"."+s+".map",value:l[1],expressionContext:"cluster-map"})),o.push.apply(o,ar({key:i+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return ir({key:i,value:e,valueSpec:r.source_video,style:n,styleSpec:r});case"image":return ir({key:i,value:e,valueSpec:r.source_image,style:n,styleSpec:r});case"canvas":return[new Nt(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sr({key:i+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:r})}}function Cr(t){var e=t.value,i=t.styleSpec,r=i.light,n=t.style,o=[],a=Ui(e);if(void 0===e)return o;if("object"!==a)return o.concat([new Nt("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=o.concat(l&&r[l[1]]&&r[l[1]].transition?Er({key:s,value:e[s],valueSpec:i.transition,style:n,styleSpec:i}):r[s]?Er({key:s,value:e[s],valueSpec:r[s],style:n,styleSpec:i}):[new Nt(s,e[s],'unknown property "'+s+'"')])}return o}var Ir={"*":function(){return[]},array:rr,boolean:function(t){var e=t.value,i=t.key,r=Ui(e);return"boolean"!==r?[new Nt(i,e,"boolean expected, "+r+" found")]:[]},number:nr,color:function(t){var e=t.key,i=t.value,r=Ui(i);return"string"!==r?[new Nt(e,i,"color expected, "+r+" found")]:null===se(i)?[new Nt(e,i,'color expected, "'+i+'" found')]:[]},constants:Rt,enum:sr,filter:yr,function:or,layer:br,object:ir,source:Tr,light:Cr,string:wr,formatted:function(t){return 0===wr(t).length?[]:ar(t)},resolvedImage:function(t){return 0===wr(t).length?[]:ar(t)}};function Er(t){var e=t.value,i=t.valueSpec,r=t.styleSpec;return i.expression&&Vi(jt(e))?or(t):i.expression&&Xi(Ft(e))?ar(t):i.type&&Ir[i.type]?Ir[i.type](t):ir(Bt({},t,{valueSpec:i.type?r[i.type]:i}))}function Mr(t){var e=t.value,i=t.key,r=wr(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new Nt(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Nt(i,e,'"glyphs" url must include a "{range}" token'))),r}function Ar(t,e){void 0===e&&(e=Ot);var i=[];return i=i.concat(Er({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Mr,"*":function(){return[]}}})),t.constants&&(i=i.concat(Rt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Lr(i)}function Lr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function kr(t){return function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];return Lr(t.apply(this,e))}}Ar.source=kr(Tr),Ar.light=kr(Cr),Ar.layer=kr(br),Ar.filter=kr(yr),Ar.paintProperty=kr(_r),Ar.layoutProperty=kr(xr);var Pr=Ar,Dr=Pr.light,zr=Pr.paintProperty,Or=Pr.layoutProperty;function Nr(t,e){var i=!1;if(e&&e.length)for(var r=0,n=e;r<n.length;r+=1)t.fire(new Dt(new Error(n[r].message))),i=!0;return i}var Rr=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;var c=i/e*t;this.min=-c,this.max=t+c}Br.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."}
2,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);var s=[];return this._forEachCell(t,e,i,r,this._queryCell,s,{},n),s},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=l[p];if(void 0===a[h]){var d=4*h;(s?s(c[0+d],c[1+d],c[2+d],c[3+d]):t<=c[2+d]&&e<=c[3+d]&&i>=c[0+d]&&r>=c[1+d])?(a[h]=!0,o.push(u[h])):a[h]=!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 d=u;d<=p;d++){var f=this.d*d+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(d),this._convertFromCellCoord(h+1),this._convertFromCellCoord(d+1)))&&n.call(this,t,e,i,r,f,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 jr=a.ImageData,Fr=a.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(var qr in Vr("Object",Object),Rr.serialize=function(t,e){var i=t.toArrayBuffer();return e&&e.push(i),{buffer:i}},Rr.deserialize=function(t){return new Rr(t.buffer)},Vr("Grid",Rr),Vr("Color",le),Vr("Error",Error),Vr("ResolvedImage",he),Vr("StylePropertyFunction",er),Vr("StyleExpression",Ki,{omit:["_evaluator"]}),Vr("ZoomDependentExpression",$i),Vr("ZoomConstantExpression",Qi),Vr("CompoundExpression",Ee,{omit:["_evaluate"]}),ki)ki[qr]._classRegistryKey||Vr("Expression_"+qr,ki[qr]);function Gr(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Zr(t){return Fr&&t instanceof Fr}function Hr(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(Gr(t)||Zr(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var i=t;return e&&e.push(i.buffer),i}if(t instanceof jr)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(Hr(o[n],e));return r}if("object"!=typeof t)throw new Error("can't serialize object of type "+typeof t);var a=t.constructor,s=a._classRegistryKey;if(!s)throw new Error("can't serialize object of unregistered class");var l=a.serialize?a.serialize(t,e):{};if(!a.serialize){for(var u in t)if(t.hasOwnProperty(u)&&!(0<=Ur[s].omit.indexOf(u))){var c=t[u];l[u]=0<=Ur[s].shallow.indexOf(u)?c:Hr(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}function Wr(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||Gr(t)||Zr(t)||ArrayBuffer.isView(t)||t instanceof jr)return t;if(Array.isArray(t))return t.map(Wr);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=o[n];if("$name"!==a){var s=t[a];r[a]=0<=Ur[e].shallow.indexOf(a)?s:Wr(s)}}return r}function Yr(){this.first=!0}Yr.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 Kr={"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}
2,"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 Xr(t){for(var e=0,i=t;e<i.length;e+=1)if(Jr(i[e].charCodeAt(0)))return!0;return!1}function Jr(t){return 746===t||747===t||!(t<4352)&&(Kr["Bopomofo Extended"](t)||Kr.Bopomofo(t)||Kr["CJK Compatibility Forms"](t)&&!(65097<=t&&t<=65103)||Kr["CJK Compatibility Ideographs"](t)||Kr["CJK Compatibility"](t)||Kr["CJK Radicals Supplement"](t)||Kr["CJK Strokes"](t)||!(!Kr["CJK Symbols and Punctuation"](t)||12296<=t&&t<=12305||12308<=t&&t<=12319||12336===t)||Kr["CJK Unified Ideographs Extension A"](t)||Kr["CJK Unified Ideographs"](t)||Kr["Enclosed CJK Letters and Months"](t)||Kr["Hangul Compatibility Jamo"](t)||Kr["Hangul Jamo Extended-A"](t)||Kr["Hangul Jamo Extended-B"](t)||Kr["Hangul Jamo"](t)||Kr["Hangul Syllables"](t)||Kr.Hiragana(t)||Kr["Ideographic Description Characters"](t)||Kr.Kanbun(t)||Kr["Kangxi Radicals"](t)||Kr["Katakana Phonetic Extensions"](t)||Kr.Katakana(t)&&12540!==t||!(!Kr["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)||!(!Kr["Small Form Variants"](t)||65112<=t&&t<=65118||65123<=t&&t<=65126)||Kr["Unified Canadian Aboriginal Syllabics"](t)||Kr["Unified Canadian Aboriginal Syllabics Extended"](t)||Kr["Vertical Forms"](t)||Kr["Yijing Hexagram Symbols"](t)||Kr["Yi Syllables"](t)||Kr["Yi Radicals"](t))}function Qr(t){return!(Jr(t)||(e=t,Kr["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||Kr["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||Kr["Letterlike Symbols"](e)||Kr["Number Forms"](e)||Kr["Miscellaneous Technical"](e)&&(8960<=e&&e<=8967||8972<=e&&e<=8991||8996<=e&&e<=9e3||9003===e||9085<=e&&e<=9114||9150<=e&&e<=9165||9167===e||9169<=e&&e<=9179||9186<=e&&e<=9215)||Kr["Control Pictures"](e)&&9251!==e||Kr["Optical Character Recognition"](e)||Kr["Enclosed Alphanumerics"](e)||Kr["Geometric Shapes"](e)||Kr["Miscellaneous Symbols"](e)&&!(9754<=e&&e<=9759)||Kr["Miscellaneous Symbols and Arrows"](e)&&(11026<=e&&e<=11055||11088<=e&&e<=11097||11192<=e&&e<=11243)||Kr["CJK Symbols and Punctuation"](e)||Kr.Katakana(e)||Kr["Private Use Area"](e)||Kr["CJK Compatibility Forms"](e)||Kr["Small Form Variants"](e)||Kr["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||9984<=e&&e<=10087||10102<=e&&e<=10131||65532===e||65533===e));var e}function $r(t){return 1424<=t&&t<=2303||Kr["Arabic Presentation Forms-A"](t)||Kr["Arabic Presentation Forms-B"](t)}function tn(t){for(var e=0,i=t;e<i.length;e+=1)if($r(i[e].charCodeAt(0)))return 1}function en(t){t&&"string"==typeof t&&-1<t.indexOf("NetworkError")&&(nn="error"),rn&&rn(t)}var rn=null,nn="unavailable",on=null;function an(){cn.fire(new Lt("pluginStateChange",{pluginStatus:nn,pluginURL:on}))}function sn(){return nn}function ln(){if("deferred"!==nn||!on)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");nn="loading",an(),on&&St({url:on},(function(t){t?en(t):(nn="loaded",an())}))}function un(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 Yr,this.transition={})}var cn=new kt,pn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===nn||null!=pn.applyArabicShaping},isLoading:function(){return"loading"===nn},setState:function(t){nn=t.pluginStatus,on=t.pluginURL},isParsed:function(){return null!=pn.applyArabicShaping&&null!=pn.processBidirectionalText&&null!=pn.processStyledBidirectionalText},getPluginURL:function(){return on}};function hn(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Vi(t))return new er(t,e);if(Xi(t)){var i=tr(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=le.parse(t)),{kind:"constant",evaluate:function(){return r}}}(void 0===e?t.specification.default:e,t.specification)}function dn(t){this.property=t,this.value=new hn(t,void 0)}function fn(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}un.prototype.isSupportedScript=function(t){return function(t,e){for(var i=0,r=t;i<r.length;
2i+=1)if(n=r[i].charCodeAt(0),!e&&$r(n)||2304<=n&&n<=3583||3840<=n&&n<=4255||Kr.Khmer(n))return!1;var n;return!0}(t,pn.isLoaded())},un.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},un.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}},hn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},hn.prototype.possiblyEvaluate=function(t,e,i){return this.property.possiblyEvaluate(this,t,e,i)},dn.prototype.transitioned=function(t,e){return new mn(this.property,this.value,e,p({},t.transition,this.transition),t.now)},dn.prototype.untransitioned=function(){return new mn(this.property,this.value,null,{},0)},fn.prototype.getValue=function(t){return x(this._values[t].value.value)},fn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new dn(this._values[t].property)),this._values[t].value=new hn(this._values[t].property,null===e?void 0:x(e))},fn.prototype.getTransition=function(t){return x(this._values[t].transition)},fn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new dn(this._values[t].property)),this._values[t].transition=x(e)||void 0},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);var o=this.getTransition(r);void 0!==o&&(t[r+"-transition"]=o)}return t},fn.prototype.transitioned=function(t,e){for(var i=new gn(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},fn.prototype.untransitioned=function(){for(var t=new gn(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 mn=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)};mn.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 gn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};function yn(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}function vn(t,e,i){this.property=t,this.value=e,this.parameters=i}gn.prototype.possiblyEvaluate=function(t,e,i){for(var r=new _n(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},gn.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},yn.prototype.getValue=function(t){return x(this._values[t].value)},yn.prototype.setValue=function(t,e){this._values[t]=new hn(this._values[t].property,null===e?void 0:x(e))},yn.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},yn.prototype.possiblyEvaluate=function(t,e,i){for(var r=new _n(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},vn.prototype.isConstant=function(){return"constant"===this.value.kind},vn.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},vn.prototype.evaluate=function(t,e,i,r){return this.property.evaluate(this.value,this.parameters,t,e,i,r)};var _n=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};function xn(t){this.specification=t}function bn(t,e){this.specification=t,this.overrides=e}function wn(t){this.specification=t}_n.prototype.get=function(t){return this._values[t]},xn.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)}
2,xn.prototype.interpolate=function(t,e,i){var r=Je[this.specification.type];return r?r(t,e,i):t},bn.prototype.possiblyEvaluate=function(t,e,i,r){return new vn(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},i,r)}:t.expression,e)},bn.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 vn(this,{kind:"constant",value:void 0},t.parameters);var r=Je[this.specification.type];return r?new vn(this,{kind:"constant",value:r(t.value.value,e.value.value,i)},t.parameters):t},bn.prototype.evaluate=function(t,e,i,r,n,o){return"constant"===t.kind?t.value:t.evaluate(e,i,r,n,o)};var Sn,Tn=(Cn.__proto__=Sn=bn,((Cn.prototype=Object.create(Sn&&Sn.prototype)).constructor=Cn).prototype.possiblyEvaluate=function(t,e,i,r){if(void 0===t.value)return new vn(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},i,r),o="resolvedImage"===t.property.specification.type&&"string"!=typeof n?n.name:n;return new vn(this,{kind:"constant",value:this._calculate(o,o,o,e)},e)}return"camera"!==t.expression.kind?new vn(this,t.expression,e):new vn(this,{kind:"constant",value:this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e)},e)},Cn.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;var a=t.evaluate(e,i,r,n,o);return this._calculate(a,a,a,e)},Cn.prototype._calculate=function(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},Cn.prototype.interpolate=function(t){return t},Cn);function Cn(){Sn.apply(this,arguments)}function In(t){this.specification=t}function En(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 hn(i,void 0),n=this.defaultTransitionablePropertyValues[e]=new dn(i);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}}function Mn(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}function An(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}wn.prototype.possiblyEvaluate=function(t,e,i,r){if(void 0!==t.value){if("constant"!==t.expression.kind)return this._calculate(t.expression.evaluate(new un(Math.floor(e.zoom-1),e)),t.expression.evaluate(new un(Math.floor(e.zoom),e)),t.expression.evaluate(new un(Math.floor(e.zoom+1),e)),e);var n=t.expression.evaluate(e,null,{},i,r);return this._calculate(n,n,n,e)}},wn.prototype._calculate=function(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},wn.prototype.interpolate=function(t){return t},In.prototype.possiblyEvaluate=function(t,e,i,r){return!!t.expression.evaluate(e,null,{},i,r)},In.prototype.interpolate=function(){return!1},Vr("DataDrivenProperty",bn),Vr("DataConstantProperty",xn),Vr("CrossFadedDataDrivenProperty",Tn),Vr("CrossFadedProperty",wn),Vr("ColorRampProperty",In);var Ln,kn=(Dn.__proto__=Ln=kt,((Dn.prototype=Object.create(Ln&&Ln.prototype)).constructor=Dn).prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},Dn.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},Dn.prototype.setLayoutProperty=function(t,e,i){void 0===i&&(i={}),null!=e&&this._validate(Or,"layers."+this.id+".layout."+t,t,e,i)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},Dn.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)}
vendor: 1,458 bytes, line 2
2,Dn.prototype.setPaintProperty=function(t,e,i){if(void 0===i&&(i={}),null!=e&&this._validate(zr,"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"],o=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||n||this._handleOverridablePaintPropertyUpdate(t,a,s)},Dn.prototype._handleSpecialPaintPropertyUpdate=function(t){},Dn.prototype._handleOverridablePaintPropertyUpdate=function(t,e,i){return!1},Dn.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},Dn.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},Dn.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},Dn.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)},Dn.prototype.serialize=function(){var t={id:this.id,type:this.t
2ype,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),_(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},Dn.prototype._validate=function(t,e,i,r,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&Nr(this,t.call(Pr,{key:e,layerType:this.type,objectKey:i,value:r,styleSpec:Ot,style:{glyphs:!0,sprite:!0}}))},Dn.prototype.is3D=function(){return!1},Dn.prototype.isTileClipped=function(){return!1},Dn.prototype.hasOffscreenPass=function(){return!1},Dn.prototype.resize=function(){},Dn.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof vn&&Bi(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},Dn),Pn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function Dn(t,e){if(Ln.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 yn(e.layout)),e.paint)){for(var i in this._transitionablePaint=new fn(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 _n(e.paint)}}function zn(t,e){void 0===e&&(e=1);var i=0,r=0;return{members:t.map((function(t){var n=Pn[t.type].BYTES_PER_ELEMENT,o=i=On(i,Math.max(e,n)),a=t.components||1;return r=Math.max(r,n),i+=n*a,{name:t.name,type:t.type,components:a,offset:o}})),size:On(i,Math.max(r,e)),alignment:e}}function On(t,e){return Math.ceil(t/e)*e}An.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},An.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},An.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},An.prototype.clear=function(){this.length=0},An.prototype.resize=function(t){this.reserve(t),this.length=t},An.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},An.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Nn,Rn=(Bn.__proto__=Nn=An,((Bn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Bn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Bn.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Bn.prototype.emplace=function(t,e,i){var r=2*t;return this.int16[0+r]=e,this.int16[1+r]=i,t},Bn);function Bn(){Nn.apply(this,arguments)}Rn.prototype.bytesPerElement=4,Vr("StructArrayLayout2i4",Rn);var jn,Fn=(Un.__proto__=jn=An,((Un.prototype=Object.create(jn&&jn.prototype)).constructor=Un).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Un.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},Un.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},Un);function Un(){jn.apply(this,arguments)}Fn.prototype.bytesPerElement=8,Vr("StructArrayLayout4i8",Fn);var Vn,qn=(Gn.__proto__=Vn=An,((Gn.prototype=Object.create(Vn&&Vn.prototype)).constructor=Gn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
2,Gn.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)},Gn.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},Gn);function Gn(){Vn.apply(this,arguments)}qn.prototype.bytesPerElement=12,Vr("StructArrayLayout2i4i12",qn);var Zn,Hn=(Wn.__proto__=Zn=An,((Wn.prototype=Object.create(Zn&&Zn.prototype)).constructor=Wn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Wn.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)},Wn.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},Wn);function Wn(){Zn.apply(this,arguments)}Hn.prototype.bytesPerElement=8,Vr("StructArrayLayout2i4ub8",Hn);var Yn,Kn=(Xn.__proto__=Yn=An,((Xn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Xn).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Xn.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)},Xn.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},Xn);function Xn(){Yn.apply(this,arguments)}Kn.prototype.bytesPerElement=20,Vr("StructArrayLayout10ui20",Kn);var Jn,Qn=($n.__proto__=Jn=An,(($n.prototype=Object.create(Jn&&Jn.prototype)).constructor=$n).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},$n.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)},$n.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h){var d=12*t;return this.int16[0+d]=e,this.int16[1+d]=i,this.int16[2+d]=r,this.int16[3+d]=n,this.uint16[4+d]=o,this.uint16[5+d]=a,this.uint16[6+d]=s,this.uint16[7+d]=l,this.int16[8+d]=u,this.int16[9+d]=c,this.int16[10+d]=p,this.int16[11+d]=h,t},$n);function $n(){Jn.apply(this,arguments)}Qn.prototype.bytesPerElement=24,Vr("StructArrayLayout4i4ui4i24",Qn);var to,eo=(io.__proto__=to=An,((io.prototype=Object.create(to&&to.prototype)).constructor=io).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},io.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},io.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},io);function io(){to.apply(this,arguments)}eo.prototype.bytesPerElement=12,Vr("StructArrayLayout3f12",eo);var ro,no=(oo.__proto__=ro=An,((oo.prototype=Object.create(ro&&ro.prototype)).constructor=oo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},oo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},oo.prototype.emplace=function(t,e){return this.uint32[+t+0]=e,t},oo);function oo(){ro.apply(this,arguments)}no.prototype.bytesPerElement=4,Vr("StructArrayLayout1ul4",no);var ao,so=(lo.__proto__=ao=An,((lo.prototype=Object.create(ao&&ao.prototype)).constructor=lo).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)},lo.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)},lo.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},lo);function lo(){ao.apply(this,arguments)}so.prototype.bytesPerElement=20,Vr("StructArrayLayout6i1ul2ui20",so);var uo,co=(po.__proto__=uo=An,((po.prototype=Object.create(uo&&uo.prototype)).constructor=po).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
2,po.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)},po.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},po);function po(){uo.apply(this,arguments)}co.prototype.bytesPerElement=12,Vr("StructArrayLayout2i2i2i12",co);var ho,fo=(mo.__proto__=ho=An,((mo.prototype=Object.create(ho&&ho.prototype)).constructor=mo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},mo.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)},mo.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},mo);function mo(){ho.apply(this,arguments)}fo.prototype.bytesPerElement=16,Vr("StructArrayLayout2f1f2i16",fo);var go,yo=(vo.__proto__=go=An,((vo.prototype=Object.create(go&&go.prototype)).constructor=vo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},vo.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},vo.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},vo);function vo(){go.apply(this,arguments)}yo.prototype.bytesPerElement=12,Vr("StructArrayLayout2ub2f12",yo);var _o,xo=(bo.__proto__=_o=An,((bo.prototype=Object.create(_o&&_o.prototype)).constructor=bo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},bo.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},bo.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},bo);function bo(){_o.apply(this,arguments)}xo.prototype.bytesPerElement=6,Vr("StructArrayLayout3ui6",xo);var wo,So=(To.__proto__=wo=An,((To.prototype=Object.create(wo&&wo.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)},To.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g)},To.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y){var v=24*t,_=12*t,x=48*t;return this.int16[0+v]=e,this.int16[1+v]=i,this.uint16[2+v]=r,this.uint16[3+v]=n,this.uint32[2+_]=o,this.uint32[3+_]=a,this.uint32[4+_]=s,this.uint16[10+v]=l,this.uint16[11+v]=u,this.uint16[12+v]=c,this.float32[7+_]=p,this.float32[8+_]=h,this.uint8[36+x]=d,this.uint8[37+x]=f,this.uint8[38+x]=m,this.uint32[10+_]=g,this.int16[22+v]=y,t},To);function To(){wo.apply(this,arguments)}So.prototype.bytesPerElement=48,Vr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",So);var Co,Io=(Eo.__proto__=Co=An,((Eo.prototype=Object.create(Co&&Co.prototype)).constructor=Eo).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)},Eo.prototype.emplaceBack=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S,T,C,I,E){var M=this.length;return this.resize(M+1),this.emplace(M,t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S,T,C,I,E)},Eo.prototype.emplace=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S,T,C,I,E,M){var A=34*t,L=17*t;return this.int16[0+A]=e,this.int16[1+A]=i,this.int16[2+A]=r,this.int16[3+A]=n,this.int16[4+A]=o,this.int16[5+A]=a,this.int16[6+A]=s,this.int16[7+A]=l,this.uint16[8+A]=u,this.uint16[9+A]=c,this.uint16[10+A]=p,this.uint16[11+A]=h,this.uint16[12+A]=d,this.uint16[13+A]=f,this.uint16[14+A]=m,this.uint16[15+A]=g,this.uint16[16+A]=y,this.uint16[17+A]=v,this.uint16[18+A]=_,this.uint16[19+A]=x,this.uint16[20+A]=b,this.uint16[21+A]=w,this.uint16[22+A]=S,this.uint32[12+L]=T,this.float32[13+L]=C,this.float32[14+L]=I,this.float32[15+L]=E,this.float32[16+L]=M,t},Eo);function Eo(){Co.apply(this,arguments)}Io.prototype.bytesPerElement=68,Vr("StructArrayLayout8i15ui1ul4f68",Io);var Mo,Ao=(Lo.__proto__=Mo=An,((Lo.prototype=Object.create(Mo&&Mo.prototype)).constructor=Lo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Lo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Lo.prototype.emplace=function(t,e){return this.float32[+t+0]=e,t},Lo);function Lo(){Mo.apply(this,arguments)}Ao.prototype.bytesPerElement=4,Vr("StructArrayLayout1f4",Ao);var ko,Po=(Do.__proto__=ko=An,((Do.prototype=Object.create(ko&&ko.prototype)).constructor=Do).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}
2,Do.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},Do.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},Do);function Do(){ko.apply(this,arguments)}Po.prototype.bytesPerElement=6,Vr("StructArrayLayout3i6",Po);var zo,Oo=(No.__proto__=zo=An,((No.prototype=Object.create(zo&&zo.prototype)).constructor=No).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},No.prototype.emplaceBack=function(t,e,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)},No.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},No);function No(){zo.apply(this,arguments)}Oo.prototype.bytesPerElement=8,Vr("StructArrayLayout1ul2ui8",Oo);var Ro,Bo=(jo.__proto__=Ro=An,((jo.prototype=Object.create(Ro&&Ro.prototype)).constructor=jo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},jo.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},jo.prototype.emplace=function(t,e,i){var r=2*t;return this.uint16[0+r]=e,this.uint16[1+r]=i,t},jo);function jo(){Ro.apply(this,arguments)}Bo.prototype.bytesPerElement=4,Vr("StructArrayLayout2ui4",Bo);var Fo,Uo=(Vo.__proto__=Fo=An,((Vo.prototype=Object.create(Fo&&Fo.prototype)).constructor=Vo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Vo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Vo.prototype.emplace=function(t,e){return this.uint16[+t+0]=e,t},Vo);function Vo(){Fo.apply(this,arguments)}Uo.prototype.bytesPerElement=2,Vr("StructArrayLayout1ui2",Uo);var qo,Go=(Zo.__proto__=qo=An,((Zo.prototype=Object.create(qo&&qo.prototype)).constructor=Zo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Zo.prototype.emplaceBack=function(t,e){var i=this.length;return this.resize(i+1),this.emplace(i,t,e)},Zo.prototype.emplace=function(t,e,i){var r=2*t;return this.float32[0+r]=e,this.float32[1+r]=i,t},Zo);function Zo(){qo.apply(this,arguments)}Go.prototype.bytesPerElement=8,Vr("StructArrayLayout2f8",Go);var Ho,Wo=(Yo.__proto__=Ho=An,((Yo.prototype=Object.create(Ho&&Ho.prototype)).constructor=Yo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Yo.prototype.emplaceBack=function(t,e,i,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)},Yo.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},Yo);function Yo(){Ho.apply(this,arguments)}Wo.prototype.bytesPerElement=16,Vr("StructArrayLayout4f16",Wo);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={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]}
2,i.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,i),e}(Mn);Ko.prototype.size=20;var Xo,Jo=((Xo=so)&&(Qo.__proto__=Xo),((Qo.prototype=Object.create(Xo&&Xo.prototype)).constructor=Qo).prototype.get=function(t){return new Ko(this,t)},Qo);function Qo(){Xo.apply(this,arguments)}Vr("CollisionBoxArray",Jo);var $o=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}(Mn);$o.prototype.size=48;var ta,ea=((ta=So)&&(ia.__proto__=ta),((ia.prototype=Object.create(ta&&ta.prototype)).constructor=ia).prototype.get=function(t){return new $o(this,t)},ia);function ia(){ta.apply(this,arguments)}Vr("PlacedSymbolArray",ea);var ra=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]}
2,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}(Mn);ra.prototype.size=68;var na,oa=((na=Io)&&(aa.__proto__=na),((aa.prototype=Object.create(na&&na.prototype)).constructor=aa).prototype.get=function(t){return new ra(this,t)},aa);function aa(){na.apply(this,arguments)}Vr("SymbolInstanceArray",oa);var sa,la=((sa=Ao)&&(ua.__proto__=sa),((ua.prototype=Object.create(sa&&sa.prototype)).constructor=ua).prototype.getoffsetX=function(t){return this.float32[+t+0]},ua);function ua(){sa.apply(this,arguments)}Vr("GlyphOffsetArray",la);var ca,pa=((ca=Po)&&(ha.__proto__=ca),((ha.prototype=Object.create(ca&&ca.prototype)).constructor=ha).prototype.getx=function(t){return this.int16[3*t+0]},ha.prototype.gety=function(t){return this.int16[3*t+1]},ha.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},ha);function ha(){ca.apply(this,arguments)}Vr("SymbolLineVertexArray",pa);var da=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}(Mn);da.prototype.size=8;var fa,ma=((fa=Oo)&&(ga.__proto__=fa),((ga.prototype=Object.create(fa&&fa.prototype)).constructor=ga).prototype.get=function(t){return new da(this,t)},ga);function ga(){fa.apply(this,arguments)}function ya(t){void 0===t&&(t=[]),this.segments=t}Vr("FeatureIndexArray",ma);var va=zn([{name:"a_pos",components:2,type:"Int16"}],4).members;function _a(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}ya.prototype.prepareSegment=function(t,e,i,r){var n=this.segments[this.segments.length-1];return ya.MAX_VERTEX_ARRAY_LENGTH<t&&w("Max vertices per segment is "+ya.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>ya.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},ya.prototype.get=function(){return this.segments},ya.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var i=e[t];for(var r in i.vaos)i.vaos[r].destroy()}},ya.simpleSegment=function(t,e,i,r){return new ya([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])},ya.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Vr("SegmentVector",ya);var xa=zn([{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"}]),ba=e((function(t){t.exports=function(t,e){var i,r,n,o,a,s,l,u;for(r=t.length-(i=3&t.length),n=e,a=3432918353,s=461845907,u=0;u<r;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,n=27492+(65535&(o=5*(65535&(n=(n^=l=(6
25535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:n^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}})),wa=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)^(i=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}})),Sa=ba,Ta=wa;function Ca(){this.ids=[],this.positions=[],this.indexed=!1}Sa.murmur3=ba,Sa.murmur2=Ta,Ca.prototype.add=function(t,e,i,r){this.ids.push(Ea(t)),this.positions.push(e,i,r)},Ca.prototype.getPositions=function(t){for(var e=Ea(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},Ca.serialize=function(t,e){var i=new Float64Array(t.ids),r=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(;e[++a]<o;);for(;e[--s]>o;);if(s<=a)break;Ma(e,a,s),Ma(i,3*a,3*s),Ma(i,3*a+1,3*s+1),Ma(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,r,0,i.length-1),e&&e.push(i.buffer,r.buffer),{ids:i,positions:r}},Ca.deserialize=function(t){var e=new Ca;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var Ia=Math.pow(2,53)-1;function Ea(t){var e=+t;return!isNaN(e)&&e<=Ia?e:Sa(String(t))}function Ma(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function Aa(t,e){this.gl=t.gl,this.location=e}Vr("FeaturePositionMap",Ca);var La,ka,Pa,Da,za,Oa,Na,Ra=(Ja.__proto__=Na=Aa,((Ja.prototype=Object.create(Na&&Na.prototype)).constructor=Ja).prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},Ja),Ba=(Xa.__proto__=Oa=Aa,((Xa.prototype=Object.create(Oa&&Oa.prototype)).constructor=Xa).prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},Xa),ja=(Ka.__proto__=za=Aa,((Ka.prototype=Object.create(za&&za.prototype)).constructor=Ka).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]))},Ka),Fa=(Ya.__proto__=Da=Aa,((Ya.prototype=Object.create(Da&&Da.prototype)).constructor=Ya).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]))},Ya),Ua=(Wa.__proto__=Pa=Aa,((Wa.prototype=Object.create(Pa&&Pa.prototype)).constructor=Wa).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]))},Wa),Va=(Ha.__proto__=ka=Aa,((Ha.prototype=Object.create(ka&&ka.prototype)).constructor=Ha
2).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))},Ha),qa=new Float32Array(16),Ga=(Za.__proto__=La=Aa,((Za.prototype=Object.create(La&&La.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){La.call(this,t,e),this.current=qa}function Ha(t,e){ka.call(this,t,e),this.current=le.transparent}function Wa(t,e){Pa.call(this,t,e),this.current=[0,0,0,0]}function Ya(t,e){Da.call(this,t,e),this.current=[0,0,0]}function Ka(t,e){za.call(this,t,e),this.current=[0,0]}function Xa(t,e){Oa.call(this,t,e),this.current=0}function Ja(t,e){Na.call(this,t,e),this.current=0}function Qa(t){return[_a(255*t.r,255*t.g),_a(255*t.b,255*t.a)]}function $a(t,e,i){this.value=t,this.uniformNames=e.map((function(t){return"u_"+t})),this.type=i}function ts(t,e){this.uniformNames=e.map((function(t){return"u_"+t})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}function es(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}function is(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}function rs(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}function ns(t,e,i){this.binders={},this._buffers=[];var r,n,o=[];for(var a in t.paint._values)if(i(a)){var s=t.paint.get(a);if(s instanceof vn&&Bi(s.property.specification)){var l=(r=a,n=t.type,{"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"]}[r]||[r.replace(n+"-","").replace(/-/g,"_")]),u=s.value,c=s.property.specification.type,p=s.property.useIntegerZoom,h=s.property.specification["property-type"],d="cross-faded"===h||"cross-faded-data-driven"===h;if("constant"===u.kind)this.binders[a]=d?new ts(u.value,l):new $a(u.value,l,c),o.push("/u_"+a);else if("source"===u.kind||d){var f=as(a,c,"source");this.binders[a]=d?new rs(u,c,p,e,f,t.id):new es(u,l,c,f),o.push("/a_"+a)}else{var m=as(a,c,"composite");this.binders[a]=new is(u,l,c,p,e,m),o.push("/z_"+a)}}}this.cacheKey=o.sort().join("")}function os(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 ns(o,e,i)}this.needsUpload=!1,this._featureMap=new Ca,this._bufferOffset=0}function as(t,e,i){var r={color:{source:Go,composite:Wo},number:{source:Ao,composite:Go}},n={"line-pattern":{source:Kn,composite:Kn},"fill-pattern":{source:Kn,composite:Kn},"fill-extrusion-pattern":{source:Kn,composite:Kn}}[t];return n&&n[i]||r[e][i]}$a.prototype.setUniform=function(t,e,i){t.set(i.constantOr(this.value))},$a.prototype.getBinding=function(t,e,i){return new("color"===this.type?Va:Ba)(t,e)},ts.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}
vendor: 8,671 bytes, line 2
2,ts.prototype.setUniform=function(t,e,i,r){var n="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;n&&t.set(n)},ts.prototype.getBinding=function(t,e,i){return new("u_pattern"===i.substr(0,9)?Ua:Ba)(t,e)},es.prototype.populatePaintArray=function(t,e,i,r,n){var o=this.paintVertexArray.length,a=this.expression.evaluate(new un(0),e,{},r,[],n);this.paintVertexArray.resize(t),this._setPaintValue(o,t,a)},es.prototype.updatePaintArray=function(t,e,i,r){var n=this.expression.evaluate({zoom:0},i,r);this._setPaintValue(t,e,n)},es.prototype._setPaintValue=function(t,e,i){if("color"===this.type)for(var r=Qa(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))}},es.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))},es.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},is.prototype.populatePaintArray=function(t,e,i,r,n){var o=this.expression.evaluate(new un(this.zoom),e,{},r,[],n),a=this.expression.evaluate(new un(this.zoom+1),e,{},r,[],n),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,o,a)},is.prototype.updatePaintArray=function(t,e,i,r){var n=this.expression.evaluate({zoom:this.zoom},i,r),o=this.expression.evaluate({zoom:this.zoom+1},i,r);this._setPaintValue(t,e,n,o)},is.prototype._setPaintValue=function(t,e,i,r){if("color"===this.type)for(var n=Qa(i),o=Qa(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))}},is.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))},is.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},is.prototype.setUniform=function(t,e){var i=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,r=u(this.expression.interpolationFactor(i,this.zoom,this.zoom+1),0,1);t.set(r)},is.prototype.getBinding=function(t,e,i){return new Ba(t,e)},rs.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)},rs.prototype.updatePaintArray=function(t,e,i,r,n){this._setPaintValues(t,e,i.patterns&&i.patterns[this.layerId],n)},rs.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)}},rs.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,xa.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,xa.members,this.expression.isStateDependent))},rs.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},ns.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof es||e instanceof is?e.maxValue:0},ns.prototype.populatePaintArrays=function(t,e,i,r,n){for(var o in this.binders){var a=this.binders[o];(a instanceof es||a instanceof is||a instanceof rs)&&a.populatePaintArray(t,e,i,r,n)}},ns.prototype.setConstantPatternPositions=function(t,e){for(var i in this.binders){var r=this.binders[i];r instanceof ts&&r.setConstantPatternPositions(t,e)}},ns.prototype.updatePaintArrays=function(t,e,i,r,n){var o=!1;for(var a in t)for(var s=0,l=e.getPositions(a);s<l.length;s+=1){var u=l[s],c=i.feature(u.index);for(var p in this.binders){var h=this.binders[p];if((h instanceof es||h instanceof is||h instanceof rs)&&!0===h.expression.isStateDependent){var d=r.paint.get(p);h.expression=d.value,h.updatePaintArray(u.start,u.end,c,t[a],n),o=!0}}}return o},ns.prototype.defines=function(){var t=[];for(var e in this.binders){var i=this.binders[e];(i instanceof $a||i instanceof ts)&&t.push.apply(t,i.uniformNames.map((function(t){return"#define HAS_UNIFORM_"+t})))}return t},ns.prototype.getBinderAttributes=function(){var t=[];for(var e in this.binders){var i=this.binders[e];if(i instanceof es||i instanceof is)for(var r=0;r<i.paintVertexAttributes.length;r++)t.push(i.paintVertexAttributes[r].name);else if(i instanceof rs)for(var n=0;n<xa.members.length;n++)t.push(xa.members[n].name)}return t},ns.prototype.getBinderUniforms=function(){var t=[];for(var e in this.binders){var i=this.binders[e];if(i instanceof $a||i instanceof ts||i instanceof is)for(var r=0,n=i.uniformNames;r<n.length;r+=1)t.push(n[r])}return t},ns.prototype.getPaintVertexBuffers=function(){return this._buffers},ns.prototype.getUniforms=function(t,e){var i=[];for(var r in this.binders){var n=this.binders[r];if(n instanceof $a||n instanceof ts||n instanceof is)for(var o=0,a=n.uniformNames;o<a.length;o+=1){var s=a[o];if(e[s]){var l=n.getBinding(t,e[s],s);i.push({name:s,property:r,binding:l})}}}return i},ns.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)}},ns.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var i=this.binders[e];if(t&&i instanceof rs){var r=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;r&&this._buffers.push(r)}else(i instanceof es||i instanceof is)&&i.paintVertexBuffer&&this._buffers.push(i.paintVertexBuffer)}},ns.prototype.upload=function(t){for(var e in this.binders){var i=this.binders[e];(i instanceof es||i instanceof is||i instanceof rs)&&i.upload(t)}this.updatePaintBuffers()},ns.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof es||e instanceof is||e instanceof rs)&&e.destroy()}},os.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},os.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}},os.prototype.get=function(t){return this.programConfigurations[t]},os.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},os.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Vr("ConstantBinder",$a),Vr("CrossFadedConstantBinder",ts),Vr("SourceExpressionBinder",es),Vr("CrossFadedCompositeBinder",rs),Vr("CompositeExpressionBinder",is),Vr("ProgramConfiguration",ns,{omit:["_buffers"]}),Vr("ProgramConfigurationSet",os);var ss=Math.pow(2,14)-1,ls=-ss-1;function us(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,ls,ss),a.y=u(l,ls,ss),(s<a.x||s>a.x+1||l<a.y||l>a.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return i}function cs(t,e,i,r,n){t.emplaceBack(2*e+(r+1)/2,2*i+(n+1)/2)}function ps(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 Rn,this.indexArray=new xo,this.segments=new ya,this.programConfigurations=new os(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id}))}function hs(t,e){for(var i=0;i<t.length;i++)if(_s(e,t[i]))return!0;for(var r=0;r<e.length;r++)if(_s(t,e[r]))return!0;return!!ms(t,e)}function ds(t,e){if(1===t.length)return vs(e,t[0]);for(var i=0;i<e.length;i++)for(var r=e[i],n=0;n<r.length;n++)if(_s(t,r[n]))return!0;for(var o=0;o<t.length;o++)if(vs(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(ms(t,e[a]))return!0;return!1}function fs(t,e,i){if(1<t.length){if(ms(t,e))return 1;for(var r=0;r<e.length;r++)if(gs(e[r],t,i))return 1}for(var n=0;n<t.length;n++)if(gs(t[n],e,i))return 1}function ms(t,e){var i,r,n,o;if(0!==t.length&&0!==e.length)for(var a=0;a<t.length-1;a++)for(var s=t[a],l=t[a+1],u=0;u<e.length-1;u++)if(r=l,S(i=s,n=e[u],o=e[u+1])!==S(r,n,o)&&S(i,r,n)!==S(i,r,o))return 1}function gs(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(ys(t,e[n-1],e[n])<r)return 1}function ys(t,e,i){var r=e.distSqr(i);if(0===r)return t.distSqr(e);var n=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/r;return t.distSqr(n<0?e:1<n?i:i.sub(e)._mult(n)._add(e))}function vs(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 _s(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 xs(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)){var o=S(t,e,i[0]);return o!==S(t,e,i[1])||o!==S(t,e,i[2])||o!==S(t,e,i[3])}}function bs(t,e,i){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:i.programConfigurations.get(e.id).getMaxValue(t)}function ws(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ss(t,e,i,r,o){if(!e[0]&&!e[1])return t;var a=n.convert(e)._mult(o);"viewport"===i&&a._rotate(-r);for(var s=[],l=0;l<t.length;l++)s.push(t[l].sub(a));return s}ps.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,d=this.layers[0]._featureFilter.needGeometry,f={type:u.type,id:c,properties:u.properties,geometry:d?us(u):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),f,i)){d||(f.geometry=us(u));var m=o?o.evaluate(f,{},i):void 0;n.push({id:c,properties:u.properties,type:u.type,sourceLayerIndex:h,index:p,geometry:f.geometry,patterns:{},sortKey:m})}}o&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var g=0,y=n;g<y.length;g+=1){var v=y[g],_=v.geometry,x=v.index,b=v.sourceLayerIndex,w=t[x].feature;this.addFeature(v,_,x,i),e.featureIndex.insert(w,_,x,b,this.index)}},ps.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},ps.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ps.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ps.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,va),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ps.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=s[a],u=l.x,c=l.y;if(!(u<0||8192<=u||c<0||8192<=c)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;cs(this.layoutVertexArray,u,c,-1,-1),cs(this.layoutVertexArray,u,c,1,-1),cs(this.layoutVertexArray,u,c,1,1),cs(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{},r)},Vr("CircleBucket",ps,{omit:["layers"]});var Ts=new En({"circle-sort-key":new bn(Ot.layout_circle["circle-sort-key"])}),Cs={paint:new En({"circle-radius":new bn(Ot.paint_circle["circle-radius"]),"circle-color":new bn(Ot.paint_circle["circle-color"]),"circle-blur":new bn(Ot.paint_circle["circle-blur"]),"circle-opacity":new bn(Ot.paint_circle["circle-opacity"]),"circle-translate":new xn(Ot.paint_circle["circle-translate"]),"circle-translate-anchor":new xn(Ot.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new xn(Ot.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new xn(Ot.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new bn(Ot.paint_circle["circle-stroke-width"]),"circle-stroke-color":new bn(Ot.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new bn(Ot.paint_circle["circle-stroke-opacity"])}),layout:Ts},Is="undefined"!=typeof Float32Array?Float32Array:Array;function Es(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 Ms(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],d=e[10],f=e[11],m=e[12],g=e[13],y=e[14],v=e[15],_=i[0],x=i[1],b=i[2],w=i[3];return t[0]=_*r+x*s+b*p+w*m,t[1]=_*n+x*l+b*h+w*g,t[2]=_*o+x*u+b*d+w*y,t[3]=_*a+x*c+b*f+w*v,t[4]=(_=i[4])*r+(x=i[5])*s+(b=i[6])*p+(w=i[7])*m,t[5]=_*n+x*l+b*h+w*g,t[6]=_*o+x*u+b*d+w*y,t[7]=_*a+x*c+b*f+w*v,t[8]=(_=i[8])*r+(x=i[9])*s+(b=i[10])*p+(w=i[11])*m,t[9]=_*n+x*l+b*h+w*g,t[10]=_*o+x*u+b*d+w*y,t[11]=_*a+x*c+b*f+w*v,t[12]=(_=i[12])*r+(x=i[13])*s+(b=i[14])*p+(w=i[15])*m,t[13]=_*n+x*l+b*h+w*g,t[14]=_*o+x*u+b*d+w*y,t[15]=_*a+x*c+b*f+w*v,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)});var As,Ls,ks=Ms;function Ps(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3];return t[0]=i[0]*r+i[4]*n+i[8]*o+i[12]*a,t[1]=i[1]*r+i[5]*n+i[9]*o+i[13]*a,t[2]=i[2]*r+i[6]*n+i[10]*o+i[14]*a,t[3]=i[3]*r+i[7]*n+i[11]*o+i[15]*a,t}As=new Is(3),Is!=Float32Array&&(As[0]=0,As[1]=0,As[2]=0),Ls=new Is(4),Is!=Float32Array&&(Ls[0]=0,Ls[1]=0,Ls[2]=0,Ls[3]=0);var Ds,zs,Os=(zs=new Is(2),Is!=Float32Array&&(zs[0]=0,zs[1]=0),Ns.__proto__=Ds=kn,((Ns.prototype=Object.create(Ds&&Ds.prototype)).constructor=Ns).prototype.createBucket=function(t){return new ps(t)},Ns.prototype.queryRadius=function(t){var e=t;return bs("circle-radius",this,e)+bs("circle-stroke-width",this,e)+ws(this.paint.get("circle-translate"))}
2,Ns.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a,s){for(var l=Ss(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,i)+this.paint.get("circle-stroke-width").evaluate(e,i),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t){return l.map((function(e){return Rs(e,t)}))}(s),h=c?u*a:u,d=0,f=r;d<f.length;d+=1)for(var m=0,g=f[d];m<g.length;m+=1){var y=g[m],v=c?y:Rs(y,s),_=h,x=Ps([],[y.x,y.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?_*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(_*=o.cameraToCenterDistance/x[3]),S=_,_s(b=p,w=v)||gs(w,b,S))return!0}var b,w,S;return!1},Ns);function Ns(t){Ds.call(this,t,Cs)}function Rs(t,e){var i=Ps([],[t.x,t.y,0,1],e);return new n(i[0]/i[3],i[1]/i[3])}var Bs,js=(Fs.__proto__=Bs=ps,(Fs.prototype=Object.create(Bs&&Bs.prototype)).constructor=Fs);function Fs(){Bs.apply(this,arguments)}function Us(t,e,i,r){var n=e.width,o=e.height;if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==n*o*i)throw new RangeError("mismatched image size")}else r=new Uint8Array(n*o*i);return t.width=n,t.height=o,t.data=r,t}function Vs(t,e,i){var r=e.width,n=e.height;if(r!==t.width||n!==t.height){var o=Us({},{width:r,height:n},i);qs(t,o,{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=o.data}}function qs(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",js,{omit:["layers"]});var Gs=function(t,e){Us(this,t,1,e)};function Zs(t,e){Us(this,t,4,e)}Gs.prototype.resize=function(t){Vs(this,t,1)},Gs.prototype.clone=function(){return new Gs({width:this.width,height:this.height},new Uint8Array(this.data))},Gs.copy=function(t,e,i,r,n){qs(t,e,i,r,n,1)},Zs.prototype.resize=function(t){Vs(this,t,4)},Zs.prototype.replace=function(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t},Zs.prototype.clone=function(){return new Zs({width:this.width,height:this.height},new Uint8Array(this.data))},Zs.copy=function(t,e,i,r,n){qs(t,e,i,r,n,4)},Vr("AlphaImage",Gs),Vr("RGBAImage",Zs);var Hs={paint:new En({"heatmap-radius":new bn(Ot.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bn(Ot.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xn(Ot.paint_heatmap["heatmap-intensity"]),"heatmap-color":new In(Ot.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xn(Ot.paint_heatmap["heatmap-opacity"])})};function Ws(t,e){for(var i=new Uint8Array(1024),r={},n=0,o=0;n<256;n++,o+=4){r[e]=n/255;var a=t.evaluate(r);i[o+0]=Math.floor(255*a.r/a.a),i[o+1]=Math.floor(255*a.g/a.a),i[o+2]=Math.floor(255*a.b/a.a),i[o+3]=Math.floor(255*a.a)}return new Zs({width:256,height:1},i)}var Ys,Ks,Xs=(rl.__proto__=Ks=kn,((rl.prototype=Object.create(Ks&&Ks.prototype)).constructor=rl).prototype.createBucket=function(t){return new js(t)},rl.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},rl.prototype._updateColorRamp=function(){this.colorRamp=Ws(this._transitionablePaint._values["heatmap-color"].value.expression,"heatmapDensity"),this.colorRampTexture=null},rl.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},rl.prototype.queryRadius=function(){return 0},rl.prototype.queryIntersectsFeature=function(){return!1},rl.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},rl),Js={paint:new En({"hillshade-illumination-direction":new xn(Ot.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new xn(Ot.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new xn(Ot.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new xn(Ot.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new xn(Ot.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new xn(Ot.paint_hillshade["hillshade-accent-color"])})},Qs=(il.__proto__=Ys=kn,((il.prototype=Object.create(Ys&&Ys.prototype)).constructor=il).prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},il),$s=zn([{name:"a_pos",components:2,type:"Int16"}],4).members,tl=nl,el=nl;function il(t){Ys.call(this,t,Js)}function rl(t){Ks.call(this,t,Hs),this._updateColorRamp()}function nl(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=ol(t,0,p,i,!0),d=[];if(!h||h.next===h.prev)return d;
2if(c&&(h=function(t,e,i,r){var n,o,a,s=[];for(n=0,o=e.length;n<o;n++)(a=ol(t,e[n]*r,n<o-1?e[n+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),s.push(ml(a));for(s.sort(hl),n=0;n<s.length;n++)dl(s[n],i),i=al(i,i.next);return i}(t,e,h,i)),t.length>80*i){r=o=t[0],n=a=t[1];for(var f=i;f<p;f+=i)(s=t[f])<r&&(r=s),(l=t[f+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 sl(h,d,i,r,n,u),d}function ol(t,e,i,r,n){var o,a;if(n===0<El(t,e,i,r))for(o=e;o<i;o+=r)a=Tl(o,t[o],t[o+1],a);else for(o=i-r;e<=o;o-=r)a=Tl(o,t[o],t[o+1],a);return a&&vl(a,a.next)&&(Cl(a),a=a.next),a}function al(t,e){if(!t)return t;e=e||t;var i,r=t;do{if(i=!1,r.steiner||!vl(r,r.next)&&0!==yl(r.prev,r,r.next))r=r.next;else{if(Cl(r),(r=e=r.prev)===r.next)break;i=!0}}while(i||r!==e);return e}function sl(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=fl(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,(n=n.next)!==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}o.nextZ=null,u*=2}while(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?ul(t,r,n,o):ll(t))e.push(s.i/i),e.push(t.i/i),e.push(l.i/i),Cl(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?sl(t=cl(al(t),e,i),e,i,r,n,o,2):2===a&&pl(t,e,i,r,n,o):sl(al(t),e,i,r,n,o,1);break}}}function ll(t){var e=t.prev,i=t,r=t.next;if(!(0<=yl(e,i,r))){for(var n=t.next.next;n!==t.prev;){if(gl(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&0<=yl(n.prev,n,n.next))return;n=n.next}return 1}}function ul(t,e,i,r){var n=t.prev,o=t,a=t.next;if(!(0<=yl(n,o,a))){for(var s=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,l=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,u=fl(n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,e,i,r),c=fl(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&&gl(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=yl(p.prev,p,p.next))return;if(p=p.prevZ,h!==t.prev&&h!==t.next&&gl(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&0<=yl(h.prev,h,h.next))return;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&gl(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=yl(p.prev,p,p.next))return;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&gl(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&0<=yl(h.prev,h,h.next))return;h=h.nextZ}return 1}}function cl(t,e,i){var r=t;do{var n=r.prev,o=r.next.next;!vl(n,o)&&_l(n,r,r.next,o)&&wl(n,o)&&wl(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),Cl(r),Cl(r.next),r=t=o),r=r.next}while(r!==t);return al(r)}function pl(t,e,i,r,n,o){var a,s,l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&(s=u,(a=l).next.i!==s.i&&a.prev.i!==s.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&&_l(i,i.next,t,e))return 1;i=i.next}while(i!==t)}(a,s)&&(wl(a,s)&&wl(s,a)&&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)!==t;);return r}(a,s)&&(yl(a.prev,a,s.prev)||yl(a,s.prev,s))||vl(a,s)&&0<yl(a.prev,a,a.next)&&0<yl(s.prev,s,s.next)))){var c=Sl(l,u);return l=al(l,l.next),c=al(c,c.next),sl(l,e,i,r,n,o),void sl(c,e,i,r,n,o)}u=u.next}l=l.next}while(l!==t)}function hl(t,e){return t.x-e.x}function dl(t,e){if(e=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
2);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}}r=r.next}while(r!==e);if(!i)return null;if(n===a)return i;var l,u,c,p=i,h=i.x,d=i.y,f=1/0;for(r=i;n>=r.x&&r.x>=h&&n!==r.x&&gl(o<d?n:a,o,h,d,o<d?a:n,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(n-r.x),wl(r,t)&&(l<f||l===f&&(r.x>i.x||r.x===i.x&&(c=r,yl((u=i).prev,u,c.prev)<0&&yl(c.next,u,u.next)<0)))&&(i=r,f=l)),(r=r.next)!==p;);return i}(t,e)){var i=Sl(e,t);al(e,e.next),al(i,i.next)}}function fl(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 ml(t){for(var e=t,i=t;(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),(e=e.next)!==t;);return i}function gl(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 yl(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function vl(t,e){return t.x===e.x&&t.y===e.y}function _l(t,e,i,r){var n=bl(yl(t,e,i)),o=bl(yl(t,e,r)),a=bl(yl(i,r,t)),s=bl(yl(i,r,e));return n!==o&&a!==s||0===n&&xl(t,i,e)||0===o&&xl(t,r,e)||0===a&&xl(i,t,r)||0===s&&xl(i,e,r)}function xl(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 bl(t){return 0<t?1:t<0?-1:0}function wl(t,e){return yl(t.prev,t,t.next)<0?0<=yl(t,e,t.next)&&0<=yl(t,t.prev,e):yl(t,e,t.prev)<0||yl(t,t.next,e)<0}function Sl(t,e){var i=new Il(t.i,t.x,t.y),r=new Il(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 Tl(t,e,i,r){var n=new Il(t,e,i);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function Cl(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 Il(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 El(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 Ml(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function Al(t,e){return t<e?-1:e<t?1:0}function Ll(t,e){var i,r,n=t.length;if(n<=1)return[t];for(var o,a,s=[],l=0;l<n;l++){var u=T(t[l]);0!==u&&(t[l].area=Math.abs(u),void 0===a&&(a=u<0),a===u<0?(o&&s.push(o),o=[t[l]]):o.push(t[l]))}if(o&&s.push(o),1<e)for(var c=0;c<s.length;c++)s[c].length<=e||(r=kl,function t(e,i,r,n,o){for(;r<n;){if(600<n-r){var a=n-r+1,s=i-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,i,Math.max(r,Math.floor(i-s*u/a+c)),Math.min(n,Math.floor(i+(a-s)*u/a+c)),o)}var p=e[i],h=r,d=n;for(Ml(e,r,i),0<o(e[n],p)&&Ml(e,r,n);h<d;){for(Ml(e,h,d),h++,d--;o(e[h],p)<0;)h++;for(;0<o(e[d],p);)d--}0===o(e[r],p)?Ml(e,r,d):Ml(e,++d,n),d<=i&&(r=d+1),i<=d&&(n=d-1)}}(i=s[c],e,1,s[c].length-1||i.length-1,r||Al),s[c]=s[c].slice(0,e));return s}function kl(t,e){return e.area-t.area}function Pl(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);var l=s.constantOr(null);l&&(n=!0,r[l.to]=!0,r[l.from]=!0)}return n}function Dl(t,e,i,r,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.paint.get(t+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:r-1},i,{},n.availableImages),p=u.evaluate({zoom:r},i,{},n.availableImages),h=u.evaluate({zoom:r+1},i,{},n.availableImages);p=p&&p.name?p.name:p,h=h&&h.name?h.name:h,o[c=c&&c.name?c.name:c]=!0,o[p]=!0,o[h]=!0,i.patterns[l.id]={min:c,mid:p,max:h}}}return i}function zl(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 Rn,this.indexArray=new xo,this.indexArray2=new Bo,this.programConfigurations=new os(t.layers,t.zoom),this.segments=new ya,this.segments2=new ya,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id}))}nl.deviation=function(t,e,i,r){var n=e&&e.length,o=Math.abs(El(t,0,n?e[0]*i:t.length,i));if(n)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(El(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i));var l=0;for(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)},nl.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},tl.default=el,zl.prototype.populate=function(t,e,i){this.hasPattern=Pl("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,d={type:l.type,id:u,properties:l.properties,geometry:h?us(l):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),d,i)){h||(d.geometry=us(l));var f=r?r.evaluate(d,{},i,e.availableImages):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:d.geometry,patterns:{},sortKey:f})}}r&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,g=n;m<g.length;m+=1){var y=g[m],v=y.geometry,_=y.index,x=y.sourceLayerIndex;if(this.hasPattern){var b=Dl("fill",this.layers,y,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(y,v,_,i,{});e.featureIndex.insert(t[_].feature,v,_,x,this.index)}},zl.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},zl.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)}},zl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},zl.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},zl.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,$s),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},zl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},zl.prototype.addFeature=function(t,e,i,r,n){for(var o=0,a=Ll(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,d=[],f=[],m=0,g=s;m<g.length;m+=1){var y=g[m];if(0!==y.length){y!==s[0]&&f.push(d.length/2);var v=this.segments2.prepareSegment(y.length,this.layoutVertexArray,this.indexArray2),_=v.vertexLength;this.layoutVertexArray.emplaceBack(y[0].x,y[0].y),this.indexArray2.emplaceBack(_+y.length-1,_),d.push(y[0].x),d.push(y[0].y);for(var x=1;x<y.length;x++)this.layoutVertexArray.emplaceBack(y[x].x,y[x].y),this.indexArray2.emplaceBack(_+x-1,_+x),d.push(y[x].x),d.push(y[x].y);v.vertexLength+=y.length,v.primitiveLength+=y.length}}for(var b=tl(d,f),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",zl,{omit:["layers","patternFeatures"]});var Ol,Nl=new En({"fill-sort-key":new bn(Ot.layout_fill["fill-sort-key"])}),Rl={paint:new En({"fill-antialias":new xn(Ot.paint_fill["fill-antialias"]),"fill-opacity":new bn(Ot.paint_fill["fill-opacity"]),"fill-color":new bn(Ot.paint_fill["fill-color"]),"fill-outline-color":new bn(Ot.paint_fill["fill-outline-color"]),"fill-translate":new xn(Ot.paint_fill["fill-translate"]),"fill-translate-anchor":new xn(Ot.paint_fill["fill-translate-anchor"]),"fill-pattern":new Tn(Ot.paint_fill["fill-pattern"])}),layout:Nl},Bl=(Ul.__proto__=Ol=kn,((Ul.prototype=Object.create(Ol&&Ol.prototype)).constructor=Ul).prototype.recalculate=function(t,e){Ol.prototype.recalculate.call(this,t,e);var i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},Ul.prototype.createBucket=function(t){return new zl(t)},Ul.prototype.queryRadius=function(){return ws(this.paint.get("fill-translate"))}
vendor: 4,136 bytes, line 2
2,Ul.prototype.queryIntersectsFeature=function(t,e,i,r,n,o,a){return ds(Ss(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)},Ul.prototype.isTileClipped=function(){return!0},Ul),jl=zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Fl=Vl;function Ul(t){Ol.call(this,t,Rl)}function Vl(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(ql,this,e)}function ql(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)}function Gl(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}Vl.types=["Unknown","Point","LineString","Polygon"],Vl.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,i=t.readVarint()+t.pos,r=1,o=0,a=0,s=0,l=[];t.pos<i;){if(o<=0){var u=t.readVarint();r=7&u,o=u>>3}if(o--,1===r||2===r)a+=t.readSVarint(),s+=t.readSVarint(),1===r&&(e&&l.push(e),e=[]),e.push(new n(a,s));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Vl.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,i=1,r=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();i=7&c,r=c>>3}if(r--,1===i||2===i)(n+=t.readSVarint())<a&&(a=n),s<n&&(s=n),(o+=t.readSVarint())<l&&(l=o),u<o&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},Vl.prototype.toGeoJSON=function(t,e,i){var r,n,o=this.extent*Math.pow(2,i),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Vl.types[this.type];function c(t){for(var e=0;e<t.length;e++){var i=t[e];t[e]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(i.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(r=0;r<l.length;r++)p[r]=l[r][0];c(l=p);break;case 2:for(r=0;r<l.length;r++)c(l[r]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var i,r,n=[],o=0;o<e;o++){var a=Gl(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}(l),r=0;r<l.length;r++)for(n=0;n<l[r].length;n++)c(l[r][n])}1===l.length?l=l[0]:u="Multi"+u;var h={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Zl=Hl;function Hl(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(Wl,this,e),this.length=this._features.length}function Wl(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 Yl(t,e,i){if(3===t){var r=new Zl(i,i.readVarint()+i.pos);r.length&&(e[r.name]=r)}}Hl.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];var e=this._pbf.readVarint()+this._pbf.pos;return new Fl(this._pbf,e,this.extent,this._keys,this._values)};var Kl={VectorTile:function(t,e){this.layers=t.readFields(Yl,{},e)},VectorTileFeature:Fl,VectorTileLayer:Zl},Xl=Kl.VectorTileFeature.types,Jl=Math.pow(2,13);function Ql(t,e,i,r,n,o,a,s){t.emplaceBack(e,i,2*Math.floor(r*Jl)+a,n*Jl*2,o*Jl*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 qn,this.indexArray=new xo,this.programConfigurations=new os(t.layers,t.zoom),this.segments=new ya,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id}))}$l.prototype.populate=function(t,e,i){this.features=[],this.hasPattern=Pl("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,p={type:a.type,id:s,properties:a.properties,geometry:c?us(a):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),p,i)){var h={id:s,sourceLayerIndex:u,index:l,geometry:c?p.geometry:us(a),properties:a.properties,type:a.type,patterns:{}};void 0!==a.id&&(h.id=a.id),this.hasPattern?this.features.push(Dl("fill-extrusion",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,l,i,{}),e.featureIndex.insert(a,h.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,jl),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=0,a=Ll(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(4,this.layoutVertexArray,this.indexArray),h=0,d=s;h<d.length;h+=1){var f=d[h];if(0!==f.length&&!((z=f).every((function(t){return t.x<0}))||z.every((function(t){return 8192<t.x}))||z.every((function(t){return t.y<0}))||z.every((function(t){return 8192<t.y}))))for(var m=0,g=0;g<f.length;g++){var y=f[g];if(1<=g){var v=f[g-1];if(D=v,!((P=y).x===D.x&&(P.x<0||8192<P.x)||P.y===D.y&&(P.y<0||8192<P.y))){p.vertexLength+4>ya.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=y.sub(v)._perp()._unit(),x=v.dist(y);32768<m+x&&(m=0),Ql(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,0,m),Ql(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,1,m),Ql(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,m+=x),Ql(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,m);var b=p.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+l>ya.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Xl[t.type]){for(var w=[],S=[],T=p.vertexLength,C=0,I=s;C<I.length;C+=1){var E=I[C];if(0!==E.length){E!==s[0]&&S.push(w.length/2);for(var M=0;M<E.length;M++){var A=E[M];Ql(this.layoutVertexArray,A.x,A.y,0,0,1,1,0),w.push(A.x),w.push(A.y)}}}for(var L=tl(w,S),k=0;k<L.length;k+=3)this.indexArray.emplaceBack(T+L[k],T+L[k+2],T+L[k+1]);p.primitiveLength+=L.length/3,p.vertexLength+=l}}var P,D,z;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n,r)},Vr("FillExtrusionBucket",$l,{omit:["layers","features"]});var tu,eu={paint:new En({"fill-extrusion-opacity":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bn(Ot["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Tn(Ot["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bn(Ot["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bn(Ot["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xn(Ot["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},iu=(ru.__proto__=tu=kn,((ru.prototype=Object.create(tu&&tu.prototype)).constructor=ru).prototype.createBucket=function(t){return new $l(t)},ru.prototype.queryRadius=function(){return ws(this.paint.get("fill-extrusion-translate"))},ru.prototype.is3D=function(){return!0}
2,ru.prototype.queryIntersectsFeature=function(t,e,i,r,o,a,s,l){var u=Ss(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,i),p=this.paint.get("fill-extrusion-base").evaluate(e,i),h=function(t){for(var e=[],i=0,r=u;i<r.length;i+=1){var o=r[i],a=[o.x,o.y,0,1];Ps(a,a,t),e.push(new n(a[0]/a[3],a[1]/a[3]))}return e}(l),d=function(t,e){for(var i=[],r=[],o=e[8]*p,a=e[9]*p,s=e[10]*p,l=e[11]*p,u=e[8]*c,h=e[9]*c,d=e[10]*c,f=e[11]*c,m=0,g=t;m<g.length;m+=1){for(var y=[],v=[],_=0,x=g[m];_<x.length;_+=1){var b=x[_],w=b.x,S=b.y,T=e[0]*w+e[4]*S+e[12],C=e[1]*w+e[5]*S+e[13],I=e[2]*w+e[6]*S+e[14],E=e[3]*w+e[7]*S+e[15],M=I+s,A=E+l,L=T+u,k=C+h,P=I+d,D=E+f,z=new n((T+o)/A,(C+a)/A);z.z=M/A,y.push(z);var O=new n(L/D,k/D);O.z=P/D,v.push(O)}i.push(y),r.push(v)}return[i,r]}(r,l);return function(t,e,i){var r=1/0;ds(i,e)&&(r=ou(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],u=[l,o[s+1],a[s+1],a[s],l];hs(i,u)&&(r=Math.min(r,ou(i,u)))}return r!==1/0&&r}(d[0],d[1],h)},ru);function ru(t){tu.call(this,t,eu)}function nu(t,e){return t.x*e.x+t.y*e.y}function ou(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=nu(s,s),p=nu(s,l),h=nu(l,l),d=nu(u,s),f=nu(u,l),m=c*h-p*p,g=(h*d-p*f)/m,y=(c*f-p*d)/m,v=n.z*(1-g-y)+i.z*g+o.z*y;if(isFinite(v))return v}return 1/0}for(var _=1/0,x=0,b=e;x<b.length;x+=1)_=Math.min(_,b[x].z);return _}function au(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 Hn,this.indexArray=new xo,this.programConfigurations=new os(t.layers,t.zoom),this.segments=new ya,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))}var su=zn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,lu=Kl.VectorTileFeature.types,uu=Math.cos(Math.PI/180*37.5),cu=Math.pow(2,14)/.5;au.prototype.populate=function(t,e,i){this.hasPattern=Pl("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,d={type:l.type,id:u,properties:l.properties,geometry:h?us(l):[]};if(this.layers[0]._featureFilter.filter(new un(this.zoom),d,i)){h||(d.geometry=us(l));var f=r?r.evaluate(d,{},i):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:d.geometry,patterns:{},sortKey:f})}}r&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,g=n;m<g.length;m+=1){var y=g[m],v=y.geometry,_=y.index,x=y.sourceLayerIndex;if(this.hasPattern){var b=Dl("line",this.layers,y,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(y,v,_,i,{});e.featureIndex.insert(t[_].feature,v,_,x,this.index)}},au.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},au.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)}},au.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},au.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},au.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,su),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},au.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},au.prototype.addFeature=function(t,e,i,r,n){for(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"),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)}
2,au.prototype.addLine=function(t,e,i,r,n,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+e.properties.mapbox_clip_start,this.clipEnd=+e.properties.mapbox_clip_end;for(var a=0;a<t.length-1;a++)this.totalDistance+=t[a].dist(t[a+1]);this.updateScaledDistance()}for(var s="Polygon"===lu[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),d=void 0,f=void 0,m=void 0,g=void 0;this.e1=this.e2=-1,s&&(g=t[u].sub(c=t[l-2])._unit()._perp());for(var y=u;y<l;y++)if(!(f=y===l-1?s?t[u+1]:void 0:t[y+1])||!t[y].equals(f)){g&&(m=g),c&&(d=c),c=t[y],g=f?f.sub(c)._unit()._perp():m;var v=(m=m||g).add(g);0===v.x&&0===v.y||v._unit();var _=m.x*g.x+m.y*g.y,x=v.x*g.x+v.y*g.y,b=0!=x?1/x:1/0,w=2*Math.sqrt(2-2*x),S=x<uu&&d&&f,T=0<m.x*g.y-m.y*g.x;if(S&&u<y){var C=c.dist(d);if(2*p<C){var I=c.sub(c.sub(d)._mult(p/C)._round());this.updateDistance(d,I),this.addCurrentVertex(I,m,0,0,h),d=I}}var E=d&&f,M=E?i:s?"butt":r;if(E&&"round"===M&&(b<o?M="miter":b<=2&&(M="fakeround")),"miter"===M&&n<b&&(M="bevel"),"bevel"===M&&(2<b&&(M="flipbevel"),b<n&&(M="miter")),d&&this.updateDistance(d,c),"miter"
2===M)v._mult(b),this.addCurrentVertex(c,v,0,0,h);else if("flipbevel"===M){if(100<b)v=g.mult(-1);else{var A=b*m.add(g).mag()/m.sub(g).mag();v._perp()._mult(A*(T?-1:1))}this.addCurrentVertex(c,v,0,0,h),this.addCurrentVertex(c,v.mult(-1),0,0,h)}else if("bevel"===M||"fakeround"===M){var L=-Math.sqrt(b*b-1),k=T?L:0,P=T?0:L;if(d&&this.addCurrentVertex(c,m,k,P,h),"fakeround"===M)for(var D=Math.round(180*w/Math.PI/20),z=1;z<D;z++){var O=z/D;if(.5!==O){var N=O-.5;O+=O*N*(O-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*N*N+(.848013+_*(.215638*_-1.06021)))}var R=g.sub(m)._mult(O)._add(m)._unit()._mult(T?-1:1);this.addHalfVertex(c,R.x,R.y,!1,T,0,h)}f&&this.addCurrentVertex(c,g,-k,-P,h)}else if("butt"===M)this.addCurrentVertex(c,v,0,0,h);else if("square"===M){var B=d?1:-1;this.addCurrentVertex(c,v,B,B,h)}else"round"===M&&(d&&(this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m,1,1,h,!0)),f&&(this.addCurrentVertex(c,g,-1,-1,h,!0),this.addCurrentVertex(c,g,0,0,h)));if(S&&y<l-1){var j=c.dist(f);if(2*p<j){var F=c.add(f.sub(c)._mult(p/j)._round());this.updateDistance(c,F),this.addCurrentVertex(F,g,0,0,h),c=F}}}}},au.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>cu/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,i,r,n,o))},au.prototype.addHalfVertex=function(t,e,i,r,n,o,a){var s=.5*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);var l=a.vertexLength++;0<=this.e1&&0<=this.e2&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),n?this.e2=l:this.e1=l},au.prototype.updateScaledDistance=function(){this.scaledDistance=0<this.totalDistance?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(cu-1):this.distance},au.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Vr("LineBucket",au,{omit:["layers","patternFeatures"]});var pu,hu=new En({"line-cap":new xn(Ot.layout_line["line-cap"]),"line-join":new bn(Ot.layout_line["line-join"]),"line-miter-limit":new xn(Ot.layout_line["line-miter-limit"]),"line-round-limit":new xn(Ot.layout_line["line-round-limit"]),"line-sort-key":new bn(Ot.layout_line["line-sort-key"])}),du={paint:new En({"line-opacity":new bn(Ot.paint_line["line-opacity"]),"line-color":new bn(Ot.paint_line["line-color"]),"line-translate":new xn(Ot.paint_line["line-translate"]),"line-translate-anchor":new xn(Ot.paint_line["line-translate-anchor"]),"line-width":new bn(Ot.paint_line["line-width"]),"line-gap-width":new bn(Ot.paint_line["line-gap-width"]),"line-offset":new bn(Ot.paint_line["line-offset"]),"line-blur":new bn(Ot.paint_line["line-blur"]),"line-dasharray":new wn(Ot.paint_line["line-dasharray"]),"line-pattern":new Tn(Ot.paint_line["line-pattern"]),"line-gradient":new In(Ot.paint_line["line-gradient"])}),layout:hu},fu=(mu.__proto__=pu=bn,((mu.prototype=Object.create(pu&&pu.prototype)).constructor=mu).prototype.possiblyEvaluate=function(t,e){return e=new un(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),pu.prototype.possiblyEvaluate.call(this,t,e)},mu.prototype.evaluate=function(t,e,i,r){return e=p({},e,{zoom:Math.floor(e.zoom)}),pu.prototype.evaluate.call(this,t,e,i,r)},new mu(du.paint.properties["line-width"].specification));function mu(){pu.apply(this,arguments)}fu.useIntegerZoom=!0;var gu,yu=(vu.__proto__=gu=kn,((vu.prototype=Object.create(gu&&gu.prototype)).constructor=vu).prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},vu.prototype._updateGradient=function(){this.gradient=Ws(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},vu.prototype.recalculate=function(t,e){gu.prototype.recalculate.call(this,t,e),this.paint._values["line-floorwidth"]=fu.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},vu.prototype.createBucket=function(t){return new au(t)},vu.prototype.queryRadius=function(t){var e=t,i=_u(bs("line-width",this,e),bs("line-gap-width",this,e)),r=bs("line-offset",this,e);return i/2+Math.abs(r)+ws(this.paint.get("line-translate"))}
2,vu.prototype.queryIntersectsFeature=function(t,e,i,r,o,a,s){var l=Ss(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*_u(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),c=this.paint.get("line-offset").evaluate(e,i);return c&&(r=function(t,e){for(var i=[],r=new n(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],l=0;l<a.length;l++){var u=a[l],c=a[l+1],p=0===l?r:u.sub(a[l-1])._unit()._perp(),h=l===a.length-1?r:c.sub(u)._unit()._perp(),d=p._add(h)._unit();d._mult(1/(d.x*h.x+d.y*h.y)),s.push(d._mult(e)._add(u))}i.push(s)}return i}(r,c*s)),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(_s(t,n[o]))return!0;if(fs(t,n,i))return!0}return!1}(l,r,u)},vu.prototype.isTileClipped=function(){return!0},vu);function vu(t){gu.call(this,t,du)}function _u(t,e){return 0<e?e+2*t:t}var xu=zn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bu=zn([{name:"a_projected_pos",components:3,type:"Float32"}],4),wu=(zn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),zn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Su=(zn([{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"}]),zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Tu=zn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Cu(t,e,i){return t.sections.forEach((function(t){var r,n,o;t.text=(r=t.text,n=i,"uppercase"===(o=e.layout.get("text-transform").evaluate(n,{}))?r=r.toLocaleUpperCase():"lowercase"===o&&(r=r.toLocaleLowerCase()),pn.applyArabicShaping&&(r=pn.applyArabicShaping(r)),r)})),t}function Iu(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,d=t[e+p];for(p+=h,o=d&(1<<-c)-1,d>>=-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*(d?-1:1);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)}function Eu(t,e,i,r,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,p=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,f=r?1:-1,m=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=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(e+=1<=a+p?h/l:h*Math.pow(2,1-p))*l&&(a++,l/=2),c<=a+p?(s=0,a=c):1<=a+p?(s=(e*l-1)*Math.pow(2,n),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,n),a=0));8<=n;t[i+d]=255&s,d+=f,s/=256,n-=8);for(a=a<<n|s,u+=n;0<u;t[i+d]=255&a,d+=f,a/=256,u-=8);t[i+d-f]|=128*m}zn([{name:"triangle",components:3,type:"Uint16"}]),zn([{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"}]),zn([{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"}]),zn([{type:"Float32",name:"offsetX"}]),zn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Mu={"!":"ï¸","#":"ï¼",$:"ï¼","%":"ï¼
","&":"ï¼","(":"︵",")":"︶","*":"ï¼","+":"ï¼",",":"ï¸","-":"︲",".":"ã»","/":"ï¼",":":"ï¸",";":"ï¸","<":"︿","=":"ï¼",">":"ï¹","?":"ï¸","@":"ï¼ ","[":"ï¹","\\":"ï¼¼","]":"ï¹","^":"ï¼¾",_:"︳","`":"ï½","{":"︷","|":"â","}":"︸","~":"ï½","¢":"ï¿ ","£":"ï¿¡","Â¥":"ï¿¥","¦":"¦","¬":"ï¿¢","¯":"ï¿£","â":"︲","â":"︱","â":"ï¹","â":"ï¹","â":"ï¹","â":"ï¹","â¦":"ï¸","â§":"ã»","â©":"₩","ã":"ï¸","ã":"ï¸","ã":"︿","ã":"ï¹","ã":"︽","ã":"︾","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"︻","ã":"︼","ã":"︹","ã":"︺","ã":"ï¸","ã":"ï¸","ï¼":"ï¸","ï¼":"︵","ï¼":"︶","ï¼":"ï¸","ï¼":"︲","ï¼":"ã»","ï¼":"ï¸","ï¼":"ï¸","ï¼":"︿","ï¼":"ï¹","ï¼":"ï¸","ï¼»":"ï¹","ï¼½":"ï¹","_":"︳","ï½":"︷","ï½":"â","ï½":"︸","ï½":"︵","ï½ ":"︶","。":"ï¸","ï½¢":"ï¹","ï½£":"ï¹"},Au=Lu;function Lu(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Lu.Varint=0,Lu.Fixed64=1,Lu.Bytes=2,Lu.Fixed32=5;var ku="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Pu(t){return t.type===Lu.Bytes?t.readVarint()+t.pos:t.pos+1}function Du(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function zu(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 Ou(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function Nu(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function Ru(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function Bu(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function ju(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function Fu(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function Uu(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function Vu(t,e){for(var i=0;i<t.length;
2i++)e.writeFixed64(t[i])}function qu(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function Gu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Zu(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function Hu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Wu(t,e,i){1===t&&i.readMessage(Yu,e)}function Yu(t,e,i){if(3===t){var r=i.readMessage(Ku,{}),n=r.width,o=r.height,a=r.left,s=r.top,l=r.advance;e.push({id:r.id,bitmap:new Gs({width:n+6,height:o+6},r.bitmap),metrics:{width:n,height:o,left:a,top:s,advance:l}})}}function Ku(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 Xu(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 d=a[h];if(!(p.w>d.w||p.h>d.h)){if(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){var f=a.pop();h<a.length&&(a[h]=f)}else 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}}function Ju(t,e){var i=e.pixelRatio,r=e.version,n=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=i,this.stretchX=n,this.stretchY=o,this.content=a,this.version=r}Lu.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=Gu(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Hu(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Gu(this.buf,this.pos)+4294967296*Gu(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=Gu(this.buf,this.pos)+4294967296*Hu(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Iu(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Iu(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,r=this.buf;return e=127&(i=r[this.pos++]),i<128?e:(e|=(127&(i=r[this.pos++]))<<7,i<128?e:(e|=(127&(i=r[this.pos++]))<<14,i<128?e:(e|=(127&(i=r[this.pos++]))<<21,i<128?e:function(t,e,i){var r,n,o=i.buf;if(r=(112&(n=o[i.pos++]))>>4,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<3,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<10,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<17,n<128)return Du(t,r,e);if(r|=(127&(n=o[i.pos++]))<<24,n<128)return Du(t,r,e);if(r|=(1&(n=o[i.pos++]))<<31,n<128)return Du(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=r[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,i,r=this.readVarint()+this.pos,n=this.pos;return 12<=(this.pos=r)-n&&ku?(t=this.buf,e=n,i=r,ku.decode(t.subarray(e,i))):function(t,e){for(var i="",r=n;r<e;){var o,a,s,l=t[r],u=null,c=239<l?4:223<l?3:191<l?2:1;if(e<r+c)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=t[r+2],128==(192&(o=t[r+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||55296<=u&&u<=57343)&&(u=null)):4===c&&(a=t[r+2],s=t[r+3],128==(192&(o=t[r+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||1114112<=u)&&(u=null)),null===u?(u=65533,c=1):65535<u&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),r+=c}return i}(this.buf,r)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}
2,readPackedVarint:function(t,e){if(this.type!==Lu.Bytes)return t.push(this.readVarint(e));var i=Pu(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Lu.Bytes)return t.push(this.readSVarint());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Lu.Bytes)return t.push(this.readBoolean());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Lu.Bytes)return t.push(this.readFloat());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Lu.Bytes)return t.push(this.readDouble());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Lu.Bytes)return t.push(this.readFixed32());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Lu.Bytes)return t.push(this.readSFixed32());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Lu.Bytes)return t.push(this.readFixed64());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Lu.Bytes)return t.push(this.readSFixed64());var e=Pu(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Lu.Varint)for(;127<this.buf[this.pos++];);else if(e===Lu.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Lu.Fixed32)this.pos+=4;else{if(e!==Lu.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Zu(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Zu(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Zu(this.buf,-1&t,this.pos),Zu(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Zu(this.buf,-1&t,this.pos),Zu(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){268435455<(t=+t||0)||t<0?function(e){var i,r,n,o,a,s,l;if(0<=t?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:r=r+1|(i=0)),0x10000000000000000<=t||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),s=i,(l=e).buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,l.buf[l.pos]=127&(s>>>=7),a=(7&(n=r))<<4,(o=e).buf[o.pos++]|=a|((n>>>=3)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=127&n)))))}(this):(this.realloc(4),this.buf[this.pos++]=127&t|(127<t?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(127<t?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(127<t?128:0),t<=127||(this.buf[this.pos++]=t>>>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);var i=this.pos-e;128<=i&&zu(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),Eu(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Eu(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);var r=this.pos-i;128<=r&&zu(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r}
vendor: 9,220 bytes, line 2
2,writeMessage:function(t,e,i){this.writeTag(t,Lu.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Ou,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Nu,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ju,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Ru,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Bu,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Fu,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Uu,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Vu,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,qu,e)},writeBytesField:function(t,e){this.writeTag(t,Lu.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Lu.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Lu.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Lu.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Lu.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Lu.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Lu.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Lu.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Lu.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Lu.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Qu={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};function $u(t,e){var i={},r={};this.haveRenderCallbacks=[];var n=[];this.addImages(t,i,n),this.addImages(e,r,n);var o=Xu(n),a=new Zs({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=i[s].paddedRect;Zs.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var p=e[c],h=r[c].paddedRect,d=h.x+1,f=h.y+1,m=p.data.width,g=p.data.height;Zs.copy(p.data,a,{x:0,y:0},{x:d,y:f},p.data),Zs.copy(p.data,a,{x:0,y:g-1},{x:d,y:f-1},{width:m,height:1}),Zs.copy(p.data,a,{x:0,y:0},{x:d,y:f+g},{width:m,height:1}),Zs.copy(p.data,a,{x:m-1,y:0},{x:d-1,y:f},{width:1,height:g}),Zs.copy(p.data,a,{x:0,y:0},{x:d+m,y:f},{width:1,height:g})}this.image=a,this.iconPositions=i,this.patternPositions=r}function tc(){this.scale=1,this.fontStack="",this.imageName=null}Qu.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Qu.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Qu.tlbr.get=function(){return this.tl.concat(this.br)},Qu.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ju.prototype,Qu),$u.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 Ju(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},$u.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)},$u.prototype.patchUpdatedImage=function(t,e,i){if(t&&e&&t.version!==e.version){t.version=e.version;var r=t.tl;i.update(e.data,void 0,{x:r[0],y:r[1]})}},Vr("ImagePosition",Ju),Vr("ImageAtlas",$u);var ec={horizontal:1,vertical:2,horizontalOnly:3};function ic(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}function rc(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m){var g,y=ic.fromFeature(t,n);p===ec.vertical&&y.verticalizePunctuation();var v=pn.processBidirectionalText,_=pn.processStyledBidirectionalText;if(v&&1===y.sections.length){g=[];for(var x=0,b=v(y.toString(),uc(y,u,o,e,r,d,f));x<b.length;x+=1){var w=b[x],S=new ic;S.text=w,S.sections=y.sections;for(var T=0;T<w.length;T++)S.sectionIndex.push(0);g.push(S)}}else if(_){g=[];for(var C=0,I=_(y.text,y.sectionIndex,uc(y,u,o,e,r,d,f));C<I.length;C+=1){var E=I[C],M=new ic;M.text=E[0],M.sectionIndex=E[1],M.sections=y.sections,g.push(M)}}else g=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,uc(y,u,o,e,r,d,f));var A=[],L={positionedLines:A,text:y.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:p,iconsInText:!1,verticalizable:!1};return function(t,e,i,r,n,o,a,s,u,c,p){for(var h=0,d=-17,f=0,m=0,g="right"===l?1:"left"===l?0:.5,y=0,v=0,_=n;v<_.length;v+=1){var x=_[v];x.trim();var b=x.getMaxScale(),w=24*(b-1),S={positionedGlyphs:[],lineOffset:0},T=(t.positionedLines[y]=S).positionedGlyphs,C=0;if(x.length()){for(var I=0;I<x.length();I++){var E=x.getSection(I),M=x.getSectionIndex(I),A=x.getCharCode(I),L=0,k=null,P=null,D=null,z=24,O=!(s===ec.horizontal||!c&&!Jr(A)||c&&(nc[A]||(G=A,Kr.Arabic(G)||Kr["Arabic Supplement"](G)||Kr["Arabic Extended-A"](G)||Kr["Arabic Presentation Forms-A"](G)||Kr["Arabic Presentation Forms-B"](G))));if(E.imageName){var N=r[E.imageName];if(!N)continue;D=E.imageName,t.iconsInText=t.iconsInText||!0,P=N.paddedRect;var R=N.displaySize;E.scale=24*E.scale/p,L=w+(24-R[1]*E.scale),z=(k={width:R[0],height:R[1],left:1,top:-3,advance:O?R[1]:R[0]}).advance;var B=O?R[0]*E.scale-24*b:R[1]*E.scale-24*b;0<B&&C<B&&(C=B)}else{var j=i[E.fontStack],F=j&&j[A];if(F&&F.rect)P=F.rect,k=F.metrics;else{var U=e[E.fontStack],V=U&&U[A];if(!V)continue;k=V.metrics}L=24*(b-E.scale)}O?(t.verticalizable=!0,T.push({glyph:A,imageName:D,x:h,y:d+L,vertical:O,scale:E.scale,fontStack:E.fontStack,sectionIndex:M,metrics:k,rect:P}),h+=z*E.scale+u):(T.push({glyph:A,imageName:D,x:h,y:d+L,vertical:O,scale:E.scale,fontStack:E.fontStack,sectionIndex:M,metrics:k,rect:P}),h+=k.advance*E.scale+u)}0!==T.length&&(f=Math.max(h-u,f),pc(T,0,T.length-1,g,C)),h=0;var q=o*b+C;S.lineOffset=Math.max(C,w),d+=q,m=Math.max(q,m),++y}else d+=o,++y}var G,Z=d- -17,H=cc(a),W=H.horizontalAlign,Y=H.verticalAlign;(function(t,e,i,r,n,a,s){var l,u=(e-i)*r;l=n!==o?-a*Y+17:(-Y*s+.5)*o;for(var c=0,p=t;c<p.length;c+=1)for(var h=0,d=p[c].positionedGlyphs;h<d.length;h+=1){var f=d[h];f.x+=u,f.y+=l}})(t.positionedLines,g,W,f,m,Z,n.length),t.top+=-Y*Z,t.bottom=t.top+Z,t.left+=-W*f,t.right=t.left+f}(L,e,i,r,g,a,s,p,u,h,m),!function(){for(var t=0,e=A;t<e.length;t+=1)if(0!==e[t].positionedGlyphs.length)return;return 1}()&&L}tc.forText=function(t,e){var i=new tc;return i.scale=t||1,i.fontStack=e,i},tc.forImage=function(t){var e=new tc;return e.imageName=t,e},ic.fromFeature=function(t,e){for(var i=new ic,r=0;r<t.sections.length;r++){var n=t.sections[r];n.image?i.addImageSection(n):i.addTextSection(n,e)}return i},ic.prototype.length=function(){return this.text.length},ic.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},ic.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},ic.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},ic.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&&Qr(r)&&!Mu[t[i+1]]||n&&Qr(n)&&!Mu[t[i-1]]||!Mu[t[i]]?t[i]:Mu[t[i]]}return e}(this.text)},ic.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&nc[this.text.charCodeAt(e)];e++)t++;for(var i=this.text.length,r=this.text.length-1;0<=r&&t<=r&&nc[this.text.charCodeAt(r)];r--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)},ic.prototype.substring=function(t,e){var i=new ic;return i.text=this.text.substring(t,e),i.sectionIndex=this.sectionIndex.slice(t,e),i.sections=this.sections,i},ic.prototype.toString=function(){return this.text},ic.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,i){return Math.max(e,t.sections[i].scale)}),0)},ic.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(tc.forText(t.scale,t.fontStack||e));for(var i=this.sections.length-1,r=0;r<t.text.length;++r)this.sectionIndex.push(i)},ic.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";if(0!==e.length){var i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push(tc.forImage(e)),this.sectionIndex.push(this.sections.length-1)):w("Reached maximum number of images 6401")}else w("Can't add FormattedSection with an empty image.")},ic.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?63743<=this.imageSectionID?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var nc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},oc={};function ac(t,e,i,r,n,o){if(e.imageName){var a=r[e.imageName];return a?a.displaySize[0]*e.scale*24/o+n:0}var s=i[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+n:0}function sc(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 lc(t,e,i,r,n,o){for(var a=null,s=sc(e,i,n,o),l=0,u=r;l<u.length;l+=1){var c=u[l],p=sc(e-c.x,i,n,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function uc(t,e,i,r,n,o,a){if("point"!==o)return[];if(!t)return[];
2for(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+=ac(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 d=t.getSection(h),f=t.getCharCode(h);if(nc[f]||(p+=ac(f,d,r,n,e,a)),h<t.length()-1){var m=!((s=f)<11904||!(Kr["Bopomofo Extended"](s)||Kr.Bopomofo(s)||Kr["CJK Compatibility Forms"](s)||Kr["CJK Compatibility Ideographs"](s)||Kr["CJK Compatibility"](s)||Kr["CJK Radicals Supplement"](s)||Kr["CJK Strokes"](s)||Kr["CJK Symbols and Punctuation"](s)||Kr["CJK Unified Ideographs Extension A"](s)||Kr["CJK Unified Ideographs"](s)||Kr["Enclosed CJK Letters and Months"](s)||Kr["Halfwidth and Fullwidth Forms"](s)||Kr.Hiragana(s)||Kr["Ideographic Description Characters"](s)||Kr["Kangxi Radicals"](s)||Kr["Katakana Phonetic Extensions"](s)||Kr.Katakana(s)||Kr["Vertical Forms"](s)||Kr["Yi Radicals"](s)||Kr["Yi Syllables"](s)));(oc[f]||m||d.imageName)&&l.push(lc(h+1,p,u,l,(v=void 0,v=0,10===(g=f)&&(v-=1e4),m&&c&&(v+=150),40!==g&&65288!==g||(v+=50),41!==(y=t.getCharCode(h+1))&&65289!==y||(v+=50),v),!1))}}var g,y,v;return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(lc(t.length(),p,u,l,0,!0))}function cc(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 pc(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}function hc(t,e,i,r,n,o){var a,s=t.image;if(s.content){var l=s.content,u=s.pixelRatio||1;a=[l[0]/u,l[1]/u,s.displaySize[0]-l[2]/u,s.displaySize[1]-l[3]/u]}var c,p,h,d,f=e.left*o,m=e.right*o;p="width"===i||"both"===i?(d=n[0]+f-r[3],n[0]+m+r[1]):(d=n[0]+(f+m-s.displaySize[0])/2)+s.displaySize[0];var g=e.top*o,y=e.bottom*o;return h="height"===i||"both"===i?(c=n[1]+g-r[0],n[1]+y+r[2]):(c=n[1]+(g+y-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:p,bottom:h,left:d,collisionPadding:a}}oc[10]=!0,oc[32]=!0,oc[38]=!0,oc[40]=!0,oc[41]=!0,oc[43]=!0,oc[45]=!0,oc[47]=!0,oc[173]=!0,oc[183]=!0,oc[8203]=!0,oc[8208]=!0,oc[8211]=!0,oc[8231]=!0;var dc,fc=((dc=n)&&(mc.__proto__=dc),((mc.prototype=Object.create(dc&&dc.prototype)).constructor=mc).prototype.clone=function(){return new mc(this.x,this.y,this.angle,this.segment)},mc);function mc(t,e,i,r){dc.call(this,t,e),this.angle=i,void 0!==r&&(this.segment=r)}function gc(t,e){var i=e.expression;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new un(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],l=r[a];return"composite"===i.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:n}:{kind:"camera",minZoom:s,maxZoom:l,minSize:i.evaluate(new un(s)),maxSize:i.evaluate(new un(l)),interpolationType:n}}function yc(t,e,i){var r=e.uSize,n=i.lowerSize;return"source"===t.kind?n/128:"composite"===t.kind?Xe(n/128,i.upperSize/128,e.uSizeT):r}function vc(t,e){var i=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){var n=t.interpolationType,o=n?u(ci.interpolationFactor(n,e,t.minZoom,t.maxZoom),0,1):0;"camera"===t.kind?r=Xe(t.minSize,t.maxSize,o):i=o}return{uSizeT:i,uSize:r}}Vr("Anchor",fc);var _c=Object.freeze({__proto__:null,getSizeData:gc,evaluateSizeForFeature:yc,evaluateSizeForZoom:vc,SIZE_PACK_FACTOR:128});function xc(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);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),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 bc(t){for(var e=0,i=0;i<t.length-1;i++)e+=t[i].dist(t[i+1]);return e}function wc(t,e,i){return t?.6*e*i:0}function Sc(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Tc(t,e,i,r,n,o){for(var a=wc(i,n,o),s=Sc(i,r)*o,l=0,u=bc(t)/2,c=0;c<t.length-1;c++){var p=t[c],h=t[c+1],d=p.dist(h);if(u<l+d){var f=(u-l)/d,m=Xe(p.x,h.x,f),g=Xe(p.y,h.y,f),y=new fc(m,g,h.angleTo(p),c);return y._round(),!a||xc(t,y,s,a,e)?y:void 0}l+=d}}function Cc(t,e,i,r,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x<e&&(h=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y<i&&h.y<i||(p.y<i?p=new n(p.x+(i-p.y)/(h.y-p.y)*(h.x-p.x),i)._round():h.y<i&&(h=new n(p.x+(i-p.y)/(h.y-p.y)*(h.x-p.x),i)._round()),p.x>=r&&h.x>=r||(p.x>=r?p=new n(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=r&&(h=new n(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round():h.y>=o&&(h=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round()),u&&p.equals(u[u.length-1])||a.push(u=[p
2]),u.push(h)))))}return a}function Ic(t,e,i,r){function o(t,e){return t+e[1]-e[0]}var a=[],s=t.image,l=s.pixelRatio,u=s.paddedRect.w-2,c=s.paddedRect.h-2,p=t.right-t.left,h=t.bottom-t.top,d=s.stretchX||[[0,u]],f=s.stretchY||[[0,c]],m=d.reduce(o,0),g=f.reduce(o,0),y=u-m,v=c-g,_=0,x=m,b=0,w=g,S=0,T=y,C=0,I=v;if(s.content&&r){var E=s.content;_=Ec(d,0,E[0]),b=Ec(f,0,E[1]),x=Ec(d,E[0],E[2]),w=Ec(f,E[1],E[3]),S=E[0]-_,C=E[1]-b,T=E[2]-E[0]-x,I=E[3]-E[1]-w}function M(r,o,a,u){var c=Ac(r.stretch-_,x,p,t.left),d=Lc(r.fixed-S,T,r.stretch,m),f=Ac(o.stretch-b,w,h,t.top),y=Lc(o.fixed-C,I,o.stretch,g),v=Ac(a.stretch-_,x,p,t.left),E=Lc(a.fixed-S,T,a.stretch,m),M=Ac(u.stretch-b,w,h,t.top),A=Lc(u.fixed-C,I,u.stretch,g),L=new n(c,f),k=new n(v,f),P=new n(v,M),D=new n(c,M),z=new n(d/l,y/l),O=new n(E/l,A/l),N=e*Math.PI/180;if(N){var R=Math.sin(N),B=Math.cos(N),j=[B,-R,R,B];L._matMult(j),k._matMult(j),D._matMult(j),P._matMult(j)}var F=r.stretch+r.fixed,U=o.stretch+o.fixed;return{tl:L,tr:k,bl:D,br:P,tex:{x:s.paddedRect.x+1+F,y:s.paddedRect.y+1+U,w:a.stretch+a.fixed-F,h:u.stretch+u.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:O,minFontScaleX:T/l/p,minFontScaleY:I/l/h,isSDF:i}}if(r&&(s.stretchX||s.stretchY))for(var A=Mc(d,y,m),L=Mc(f,v,g),k=0;k<A.length-1;k++)for(var P=A[k],D=A[k+1],z=0;z<L.length-1;z++)a.push(M(P,L[z],D,L[z+1]));else a.push(M({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:1+u},{fixed:0,stretch:1+c}));return a}function Ec(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 Mc(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],u=r[r.length-1];r.push({fixed:s-u.stretch,stretch:u.stretch}),r.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return r.push({fixed:e+1,stretch:i}),r}function Ac(t,e,i,r){return t/e*i+r}function Lc(t,e,i,r){return t-e*i/r}function kc(t,e,i,r,o,a,s,l,u,c){if(this.boxStartIndex=t.length,u){var p=a.top,h=a.bottom,d=a.collisionPadding;d&&(p-=d[1],h+=d[3]);var f=h-p;0<f&&(f=Math.max(10,f),this.circleDiameter=f)}else{var m=a.top*s-l,g=a.bottom*s+l,y=a.left*s-l,v=a.right*s+l,_=a.collisionPadding;if(_&&(y-=_[0]*s,m-=_[1]*s,v+=_[2]*s,g+=_[3]*s),c){var x=new n(y,m),b=new n(v,m),w=new n(y,g),S=new n(v,g),T=c*Math.PI/180;x._rotate(T),b._rotate(T),w._rotate(T),S._rotate(T),y=Math.min(x.x,b.x,w.x,S.x),v=Math.max(x.x,b.x,w.x,S.x),m=Math.min(x.y,b.y,w.y,S.y),g=Math.max(x.y,b.y,w.y,S.y)}t.emplaceBack(e.x,e.y,y,m,v,g,i,r,o)}this.boxEndIndex=t.length}var Pc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Dc),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 Dc(t,e){return t<e?-1:e<t?1:0}function zc(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);for(var r=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<r)&&(r=c.x),(!u||c.y<o)&&(o=c.y),(!u||c.x>a)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-r,s-o),h=p/2,d=new Pc([],Oc);if(0===p)return new n(r,o);for(var f=r;f<a;f+=p)for(var m=o;m<s;m+=p)d.push(new Nc(f+h,m+h,h,t));for(var g=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 Nc(i/e,r/e,0,t)}(t),y=d.length;d.length;){var v=d.pop();(v.d>g.d||!g.d)&&(g=v,i&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,y)),v.max-g.d<=e||(d.push(new Nc(v.p.x-(h=v.h/2),v.p.y-h,h,t)),d.push(new Nc(v.p.x+h,v.p.y-h,h,t)),d.push(new Nc(v.p.x-h,v.p.y+h,h,t)),d.push(new Nc(v.p.x+h,v.p.y+h,h,t)),y+=4)}return i&&(console.log("num probes: "+y),console.log("best distance: "+g.d)),g.p}function Oc(t,e){return e.max-t.max}function Nc(t,e,i,r){this.p=new n(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,ys(t,u,c))}return(i?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}Pc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Pc.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}},Pc.prototype.peek=function(){return this.data[0]},Pc.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},Pc.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 Rc=Number.POSITIVE_INFINITY;
2function Bc(t,e){return e[1]!==Rc?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 jc(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 Fc(t,e,i,r,o,a,s,l,u,c,p,h,d,f,m){var g=function(t,e,i,r,o,a,s){for(var l=i.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],c=0,p=t.positionedLines;c<p.length;c+=1)for(var h=p[c],d=0,f=h.positionedGlyphs;d<f.length;d+=1){var m=f[d];if(m.rect){var g=m.rect||{},y=4,v=!0,_=1,x=0,b=(r||s)&&m.vertical,w=m.metrics.advance*m.scale/2;if(s&&t.verticalizable&&(x=h.lineOffset/2-(m.imageName?-(24-m.metrics.width*m.scale)/2:24*(m.scale-1))),m.imageName){var S=a[m.imageName];v=S.sdf,y=1/(_=S.pixelRatio)}var T=r?[m.x+w,m.y]:[0,0],C=r?[0,0]:[m.x+w+e[0],m.y+e[1]-x],I=[0,0];b&&(I=C,C=[0,0]);var E=(m.metrics.left-y)*m.scale-w+C[0],M=(-m.metrics.top-y)*m.scale+C[1],A=E+g.w*m.scale/_,L=M+g.h*m.scale/_,k=new n(E,M),P=new n(A,M),D=new n(E,L),z=new n(A,L);if(b){var O=new n(-w,17+w),N=-Math.PI/2,R=12-w,B=new n(22-R,-(m.imageName?R:0)),j=new(Function.prototype.bind.apply(n,[null].concat(I)));k._rotateAround(N,O)._add(B)._add(j),P._rotateAround(N,O)._add(B)._add(j),D._rotateAround(N,O)._add(B)._add(j),z._rotateAround(N,O)._add(B)._add(j)}if(l){var F=Math.sin(l),U=Math.cos(l),V=[U,-F,F,U];k._matMult(V),P._matMult(V),D._matMult(V),z._matMult(V)}var q=new n(0,0),G=new n(0,0);u.push({tl:k,tr:P,bl:D,br:z,tex:g,writingMode:t.writingMode,glyphOffset:T,sectionIndex:m.sectionIndex,isSDF:v,pixelOffsetTL:q,pixelOffsetBR:G,minFontScaleX:0,minFontScaleY:0})}}return u}(i,l,o,a,s,r,t.allowVerticalPlacement),y=t.textSizeData,v=null;"source"===y.kind?32640<(v=[128*o.layout.get("text-size").evaluate(s,{})])[0]&&w(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===y.kind&&(32640<(v=[128*f.compositeTextSizes[0].evaluate(s,{},m),128*f.compositeTextSizes[1].evaluate(s,{},m)])[0]||32640<v[1])&&w(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,g,v,l,a,s,c,e,u.lineStartIndex,u.lineLength,d,m);for(var _=0,x=p;_<x.length;_+=1)h[x[_]]=t.text.placedSymbolArray.length-1;return 4*g.length}function Uc(t){for(var e in t)return t[e];return null}function Vc(t,e,i,r){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;0<=a;a--)if(r.dist(o[a])<i)return 1}else n[e]=[];return n[e].push(r),0}var qc=Kl.VectorTileFeature.types,Gc=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Zc(t,e,i,r,n,o,a,s,l,u,c,p,h){var d=s?Math.min(32640,Math.round(s[0])):0,f=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,i,Math.round(32*r),Math.round(32*n),o,a,(d<<1)+(l?1:0),f,16*u,16*c,256*p,256*h)}function Hc(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 Wc(t){for(var e=0,i=t.sections;e<i.length;e+=1)if(tn(i[e].text))return 1}function Yc(t){this.layoutVertexArray=new Qn,this.indexArray=new xo,this.programConfigurations=t,this.segments=new ya,this.dynamicLayoutVertexArray=new eo,this.opacityVertexArray=new no,this.placedSymbolArray=new ea}function Kc(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new ya,this.collisionVertexArray=new yo}function Xc(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=Es([]),this.placementViewportMatrix=Es([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=gc(this.zoom,e["text-size"]),this.iconSizeData=gc(this.zoom,e["icon-size"]);var i=this.layers[0].layout,r=i.get("symbol-sort-key"),n=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==n&&void 0!==r.constantOr(1),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(t){return ec[t]}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()}
2)).map((function(t){return t.id})),this.sourceID=t.sourceID}function Jc(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Zt,this.defaultValue=t}Yc.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},Yc.prototype.upload=function(t,e,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,xu.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,bu.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Gc,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))},Yc.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",Yc),Kc.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,wu.members,!0)},Kc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Vr("CollisionBuffers",Kc),Xc.prototype.createArrays=function(){this.text=new Yc(new os(this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new Yc(new os(this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.glyphOffsetArray=new la,this.lineVertexArray=new pa,this.symbolInstances=new oa},Xc.prototype.calculateGlyphDependencies=function(t,e,i,r,n){for(var o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(i||r)&&n){var a=Mu[t.charAt(o)];a&&(e[a.charCodeAt(0)]=!0)}},Xc.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 pe&&!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,d=e.availableImages,f=new un(this.zoom),m=0,g=t;m<g.length;m+=1){var y=g[m],v=y.feature,_=y.id,x=y.index,b=y.sourceLayerIndex,w=r._featureFilter.needGeometry,S={type:v.type,id:_,properties:v.properties,geometry:w?us(v):[]};if(r._featureFilter.filter(f,S,i)){w||(S.geometry=us(v));var T=void 0;if(l){var C=r.getValueAndResolveTokens("text-field",S,i,d),I=pe.factory(C);Wc(I)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===sn()||this.hasRTLText&&pn.isParsed())&&(T=Cu(I,r,S))}var E=void 0;if(u){var M=r.getValueAndResolveTokens("icon-image",S,i,d);E=M instanceof he?M:he.fromString(M)}if(T||E){var A=this.sortFeaturesByKey?c.evaluate(S,{},i):void 0,L={id:_,text:T,icon:E,index:x,sourceLayerIndex:b,geometry:us(v),properties:v.properties,type:qc[v.type],sortKey:A};if(this.features.push(L),E&&(p[E.name]=!0),T){var k=o.evaluate(S,{},i).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&0<=this.writingModes.indexOf(ec.vertical);for(var D=0,z=T.sections;D<z.length;D+=1){var O=z[D];if(O.image)p[O.image.name]=!0;else{var N=Xr(T.toString()),R=O.fontStack||k,B=h[R]=h[R]||{};this.calculateGlyphDependencies(O.text,B,P,this.allowVerticalPlacement,N)}}}}}}"line"===n.get("symbol-placement")&&(this.features=function(t){var e={},i={},r=[],n=0;function o(e){r.push(t[e]),n++}function a(t,e,n){var o=i[t];return delete i[t],i[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(n[0]),o}function s(t,i,n){var o=e[i];return delete e[i],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=n[0].concat(r[o].geometry[0]),o}function l(t,e,i){var r=i?e[0][e[0].length-1]:e[0][0];return t+":"+r.x+":"+r.y}for(var u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text?c.text.toString():null;if(h){var d=l(h,p),f=l(h,p,!0);if(d in i&&f in e&&i[d]!==e[f]){var m=s(d,f,p),g=a(d,f,r[m].geometry);delete e[d],delete i[f],i[l(h,r[g].geometry,!0)]=g,r[m].geometry=null}else d in i?a(d,f,p):f in e?s(d,f,p):(o(u),e[d]=n-1,i[f]=n-1)}else o(u)}return r.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}
vendor: 4,271 bytes, line 2
2))}},Xc.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))},Xc.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},Xc.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Xc.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},Xc.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Xc.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Xc.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}},Xc.prototype.addSymbols=function(t,e,i,r,n,o,a,s,l,u,c,p){for(var h=t.indexArray,d=t.layoutVertexArray,f=t.segments.prepareSegment(4*e.length,d,h,o.sortKey),m=this.glyphOffsetArray.length,g=f.vertexLength,y=this.allowVerticalPlacement&&a===ec.vertical?Math.PI/2:0,v=o.text&&o.text.sections,_=0;_<e.length;_++){var x=e[_],b=x.tl,w=x.tr,S=x.bl,T=x.br,C=x.tex,I=x.pixelOffsetTL,E=x.pixelOffsetBR,M=x.minFontScaleX,A=x.minFontScaleY,L=x.glyphOffset,k=x.isSDF,P=x.sectionIndex,D=f.vertexLength,z=L[1];Zc(d,s.x,s.y,b.x,z+b.y,C.x,C.y,i,k,I.x,I.y,M,A),Zc(d,s.x,s.y,w.x,z+w.y,C.x+C.w,C.y,i,k,E.x,I.y,M,A),Zc(d,s.x,s.y,S.x,z+S.y,C.x,C.y+C.h,i,k,I.x,E.y,M,A),Zc(d,s.x,s.y,T.x,z+T.y,C.x+C.w,C.y+C.h,i,k,E.x,E.y,M,A),Hc(t.dynamicLayoutVertexArray,s,y),h.emplaceBack(D,D+1,D+2),h.emplaceBack(D+1,D+2,D+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(L[0]),_!==e.length-1&&P===e[_+1].sectionIndex||t.programConfigurations.populatePaintArrays(d.length,o,o.index,{},p,v&&v[P])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,r[0],r[1],a,0,!1,0,c)},Xc.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))},Xc.prototype.addCollisionDebugVertices=function(t,e,i,r,o,a,s){var l=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),u=l.vertexLength,c=o.layoutVertexArray,p=o.collisionVertexArray,h=s.anchorX,d=s.anchorY;this._addCollisionDebugVertex(c,p,a,h,d,new n(t,e)),this._addCollisionDebugVertex(c,p,a,h,d,new n(i,e)),this._addCollisionDebugVertex(c,p,a,h,d,new n(i,r)),this._addCollisionDebugVertex(c,p,a,h,d,new n(t,r)),l.vertexLength+=4;var f=o.indexArray;f.emplaceBack(u,u+1),f.emplaceBack(u+1,u+2),f.emplaceBack(u+2,u+3),f.emplaceBack(u+3,u),l.primitiveLength+=4},Xc.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)}},Xc.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Kc(co,Su.members,Bo),this.iconCollisionBox=new Kc(co,Su.members,Bo);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)}}
2,Xc.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 d=t.get(h);u.verticalTextBox={x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,anchorPointX:d.anchorPointX,anchorPointY:d.anchorPointY},u.verticalTextFeatureIndex=d.featureIndex;break}for(var f=o;f<a;f++){var m=t.get(f);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 g=s;g<l;g++){var y=t.get(g);u.verticalIconBox={x1:y.x1,y1:y.y1,x2:y.x2,y2:y.y2,anchorPointX:y.anchorPointX,anchorPointY:y.anchorPointY},u.verticalIconFeatureIndex=y.featureIndex;break}return u},Xc.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))}},Xc.prototype.hasTextData=function(){return 0<this.text.segments.get().length},Xc.prototype.hasIconData=function(){return 0<this.icon.segments.get().length},Xc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Xc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&0<this.textCollisionBox.segments.get().length},Xc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&0<this.iconCollisionBox.segments.get().length},Xc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var i=t.placedSymbolArray.get(e),r=i.vertexStartIndex+4*i.numGlyphs,n=i.vertexStartIndex;n<r;n+=4)t.indexArray.emplaceBack(n,n+1,n+2),t.indexArray.emplaceBack(n+1,n+2,n+3)},Xc.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},Xc.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})},Xc.prototype.sortFeatures=function(t){var e=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 i=0,r=this.symbolInstanceIndexes;i<r.length;i+=1){var n=this.symbolInstances.get(r[i]);this.featureSortOrder.push(n.featureIndex),[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex].forEach((function(t,i,r){0<=t&&r.indexOf(t)===i&&e.addIndicesForPlacedSymbol(e.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",Xc,{omit:["layers","collisionBoxArray","features","compareText"]}),Xc.MAX_GLYPHS=65535,Xc.addDynamicAttributes=Hc;var Qc=new En({"symbol-placement":new xn(Ot.layout_symbol["symbol-placement"]),"symbol-spacing":new xn(Ot.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xn(Ot.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bn(Ot.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xn(Ot.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xn(Ot.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new xn(Ot.layout_symbol["icon-ignore-placement"]),"icon-optional":new xn(Ot.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xn(Ot.layout_symbol["icon-rotation-alignment"]),"icon-size":new bn(Ot.layout_symbol["icon-size"]),"icon-text-fit":new xn(Ot.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xn(Ot.layout_symbol["icon-text-fit-padding"]),"icon-image":new bn(Ot.layout_symbol["icon-image"]),"icon-rotate":new bn(Ot.layout_symbol["icon-rotate"]),"icon-padding":new xn(Ot.layout_symbol["icon-padding"]),"icon-keep-upright":new xn(Ot.layout_symbol["icon-keep-upright"]),"icon-offset":new bn(Ot.layout_symbol["icon-offset"]),"icon-anchor":new bn(Ot.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xn(Ot.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xn(Ot.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xn(Ot.layout_symbol["text-rotation-alignment"]),"text-field":new bn(Ot.layout_symbol["text-field"]),"text-font":new bn(Ot.layout_symbol["text-font"]),"text-size":new bn(Ot.layout_symbol["text-size"]),"text-max-width":new bn(Ot.layout_symbol["text-max-width"]),"text-line-height":new xn(Ot.layout_symbol["text-line-height"]),"text-letter-spacing":new bn(Ot.layout_symbol["text-letter-spacing"]),"text-justify":new bn(Ot.layout_symbol["text-justify"]),"text-radial-offset":new bn(Ot.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xn(Ot.layout_symbol["text-variable-anchor"]),"text-anchor":new bn(Ot.layout_symbol["text-anchor"]),"text-max-angle":new xn(Ot.layout_symbol["text-max-angle"]),"text-writing-mode":new xn(Ot.layout_symbol["text-writing-mode"]),"text-rotate":new bn(Ot.layout_symbol["text-rotate"]),"text-padding":new xn(Ot.layout_symbol["text-padding"]),"text-keep-upright":new xn(Ot.layout_symbol["text-keep-upright"]),"text-transform":new bn(Ot.layout_symbol["text-transform"]),"text-offset":new bn(Ot.layout_symbol["text-offset"]),"text-allow-overlap":new xn(Ot.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new xn(Ot.layout_symbol["text-ignore-placement"]),"text-optional":new xn(Ot.layout_symbol["text-optional"])}),$c={paint:new En({"icon-opacity":new bn(Ot.paint_symbol["icon-opacity"]),"icon-color":new bn(Ot.paint_symbol["icon-color"]),"icon-halo-color":new bn(Ot.paint_symbol["icon-halo-color"]),"icon-halo-width":new bn(Ot.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bn(Ot.paint_symbol["icon-halo-blur"]),"icon-translate":new xn(Ot.paint_symbol["icon-translate"]),"icon-translate-anchor":new xn(Ot.paint_symbol["icon-translate-anchor"]),"text-opacity":new bn(Ot.paint_symbol["text-opacity"]),"text-color":new bn(Ot.paint_symbol["text-color"],{runtimeType:Kt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new bn(Ot.paint_symbol["text-halo-color"]),"text-halo-width":new bn(Ot.paint_symbol["text-halo-width"]),"text-halo-blur":new bn(Ot.paint_symbol["text-halo-blur"]),"text-translate":new xn(Ot.paint_symbol["text-translate"]),"text-translate-anchor":new xn(Ot.paint_symbol["text-translate-anchor"])}),layout:Qc};
2function tp(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,r)}Jc.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},Jc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Jc.prototype.outputDefined=function(){return!1},Jc.prototype.serialize=function(){return null},Vr("FormatSectionOverride",Jc,{omit:["defaultValue"]});var ep,ip,rp,np,op=(xp.__proto__=np=kn,((xp.prototype=Object.create(np&&np.prototype)).constructor=xp).prototype.recalculate=function(t,e){if(np.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")){var i=this.layout.get("text-writing-mode");if(i){for(var r=[],n=0,o=i;n<o.length;n+=1){var a=o[n];r.indexOf(a)<0&&r.push(a)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},xp.prototype.getValueAndResolveTokens=function(t,e,i,r){var n,o=this.layout.get(t).evaluate(e,{},i,r),a=this._unevaluatedLayout._values[t];return a.isDataDriven()||Xi(a.value)||!o?o:(n=e.properties,o.replace(/{([^{}]+)}/g,(function(t,e){return e in n?String(n[e]):""})))},xp.prototype.createBucket=function(t){return new Xc(t)},xp.prototype.queryRadius=function(){return 0},xp.prototype.queryIntersectsFeature=function(){return!1},xp.prototype._setPaintOverrides=function(){for(var t=0,e=$c.paint.overridableProperties;t<e.length;t+=1){var i=e[t];if(xp.hasPaintOverride(this.layout,i)){var r,n=this.paint.get(i),o=new Jc(n),a=new Ki(o,n.property.specification);r="constant"===n.value.kind||"source"===n.value.kind?new Qi("source",a):new $i("composite",a,n.value.zoomStops,n.value._interpolationType),this.paint._values[i]=new vn(n.property,r,n.parameters)}}},xp.prototype._handleOverridablePaintPropertyUpdate=function(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&xp.hasPaintOverride(this.layout,t)},xp.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.get("text-field"),n=$c.paint.properties[e],o=!1;if("constant"===r.value.kind&&r.value.value instanceof pe)i(r.value.value.sections);else if("source"===r.value.kind){var a=function(t){o||(t instanceof ye&&me(t.value)===$t?i(t.value.sections):t instanceof be?i(t.sections):t.eachChild(a))},s=r.value;s._styleExpression&&a(s._styleExpression.expression)}return o},xp),ap={paint:new En({"background-color":new xn(Ot.paint_background["background-color"]),"background-pattern":new wn(Ot.paint_background["background-pattern"]),"background-opacity":new xn(Ot.paint_background["background-opacity"])})},sp=(_p.__proto__=rp=kn,(_p.prototype=Object.create(rp&&rp.prototype)).constructor=_p),lp={paint:new En({"raster-opacity":new xn(Ot.paint_raster["raster-opacity"]),"raster-hue-rotate":new xn(Ot.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xn(Ot.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xn(Ot.paint_raster["raster-brightness-max"]),"raster-saturation":new xn(Ot.paint_raster["raster-saturation"]),"raster-contrast":new xn(Ot.paint_raster["raster-contrast"]),"raster-resampling":new xn(Ot.paint_raster["raster-resampling"]),"raster-fade-duration":new xn(Ot.paint_raster["raster-fade-duration"])})},up=(vp.__proto__=ip=kn,(vp.prototype=Object.create(ip&&ip.prototype)).constructor=vp),cp=(yp.__proto__=ep=kn,
2((yp.prototype=Object.create(ep&&ep.prototype)).constructor=yp).prototype.is3D=function(){return"3d"===this.implementation.renderingMode},yp.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},yp.prototype.recalculate=function(){},yp.prototype.updateTransitions=function(){},yp.prototype.hasTransition=function(){},yp.prototype.serialize=function(){},yp.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},yp.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},yp),pp={circle:Os,heatmap:Xs,hillshade:Qs,fill:Bl,"fill-extrusion":iu,line:yu,symbol:op,background:sp,raster:up},hp=a.HTMLImageElement,dp=a.HTMLCanvasElement,fp=a.HTMLVideoElement,mp=a.ImageData,gp=a.ImageBitmap;function yp(t){ep.call(this,t,{}),this.implementation=t}function vp(t){ip.call(this,t,lp)}function _p(t){rp.call(this,t,ap)}function xp(t){np.call(this,t,$c)}function bp(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()})}function wp(t,e,i){this.target=t,this.parent=e,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},g(["receive","process"],this),this.invoker=new bp(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=C()?t:a}function Sp(t,e,i){var r=2*Math.PI*6378137/256/Math.pow(2,i);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}function Tp(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]))}tp.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;if(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 hp||t instanceof dp||t instanceof fp||t instanceof mp||gp&&t instanceof gp?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);else{var l=i||{x:0,y:0},u=l.x,c=l.y;t instanceof hp||t instanceof dp||t instanceof fp||t instanceof mp||gp&&t instanceof gp?s.texSubImage2D(s.TEXTURE_2D,0,u,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,u,c,r,n,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},tp.prototype.bind=function(t,e,i){var r=this.context.gl;
vendor: 14,246 bytes, line 2
2r.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)},tp.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},tp.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null},bp.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))},bp.prototype.remove=function(){delete this._channel,this._callback=function(){}},wp.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=M(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!i,targetMapId:r,mustQueue:n,sourceMapId:this.mapId,data:Hr(e,s)},s),{cancel:function(){i&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:r,sourceMapId:o.mapId})}}},wp.prototype.receive=function(t){var e=t.data,i=e.id;if(i&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[i];var r=this.cancelCallbacks[i];delete this.cancelCallbacks[i],r&&r()}else C()||e.mustQueue?(this.tasks[i]=e,this.taskQueue.push(i),this.invoker.trigger()):this.processTask(i,e)},wp.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},wp.prototype.processTask=function(t,e){var i=this;if("<response>"===e.type){var r=this.callbacks[t];delete this.callbacks[t],r&&(e.error?r(Wr(e.error)):r(null,Wr(e.data)))}else{var n=!1,o=M(this.globalScope)?void 0:[],a=e.hasCallback?function(e,r){n=!0,delete i.cancelCallbacks[t],i.target.postMessage({id:t,type:"<response>",sourceMapId:i.mapId,error:e?Hr(e):null,data:Hr(r,o)},o)}:function(t){n=!0},s=null,l=Wr(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!n&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},wp.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)},Tp.prototype.setNorthEast=function(t){return this._ne=t instanceof Cp?new Cp(t.lng,t.lat):Cp.convert(t),this},Tp.prototype.setSouthWest=function(t){return this._sw=t instanceof Cp?new Cp(t.lng,t.lat):Cp.convert(t),this},Tp.prototype.extend=function(t){var e,i,r=this._sw,n=this._ne;if(t instanceof Cp)i=e=t;else{if(!(t instanceof Tp))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Tp.convert(t)):this.extend(Cp.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 Cp(e.lng,e.lat),this._ne=new Cp(i.lng,i.lat)),this},Tp.prototype.getCenter=function(){return new Cp((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tp.prototype.getSouthWest=function(){return this._sw},Tp.prototype.getNorthEast=function(){return this._ne},Tp.prototype.getNorthWest=function(){return new Cp(this.getWest(),this.getNorth())},Tp.prototype.getSouthEast=function(){return new Cp(this.getEast(),this.getSouth())},Tp.prototype.getWest=function(){return this._sw.lng},Tp.prototype.getSouth=function(){return this._sw.lat},Tp.prototype.getEast=function(){return this._ne.lng},Tp.prototype.getNorth=function(){return this._ne.lat},Tp.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tp.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tp.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tp.prototype.contains=function(t){var e=Cp.convert(t),i=e.lng,r=e.lat,n=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&n},Tp.convert=function(t){return!t||t instanceof Tp?t:new Tp(t)};var Cp=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")};Cp.prototype.wrap=function(){return new Cp(c(this.lng,-180,180),this.lat)},Cp.prototype.toArray=function(){return[this.lng,this.lat]},Cp.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Cp.prototype.distanceTo=function(t){var e=Math.PI/180,i=this.lat*e,r=t.lat*e,n=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(n,1))},Cp.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new Tp(new Cp(this.lng-i,this.lat-e),new Cp(this.lng+i,this.lat+e))},Cp.convert=function(t){if(t instanceof Cp)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Cp(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Cp(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 Ip=2*Math.PI*6371008.8;function Ep(t){return Ip*Math.cos(t*Math.PI/180)}function Mp(t){return(180+t)/360}function Ap(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Lp(t,e){return t/Ep(e)}function kp(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}function Pp(t,e,i){void 0===i&&(i=0),this.x=+t,this.y=+e,this.z=+i}function Dp(t,e,i){this.z=t,this.x=e,this.y=i,this.key=Np(0,t,t,e,i)}function zp(t,e){this.wrap=t,this.canonical=e,this.key=Np(t,e.z,e.z,e.x,e.y)}function Op(t,e,i,r,n){this.overscaledZ=t,this.wrap=e,this.canonical=new Dp(i,+r,+n),this.key=Np(e,t,i,r,n)}function Np(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)}function Rp(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 w('"'+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)]}function Bp(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}}function jp(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}Pp.fromLngLat=function(t,e){void 0===e&&(e=0);var i=Cp.convert(t);return new Pp(Mp(i.lng),Ap(i.lat),Lp(e,i.lat))},Pp.prototype.toLngLat=function(){return new Cp(360*this.x-180,kp(this.y))},Pp.prototype.toAltitude=function(){return this.z*Ep(kp(this.y))},Pp.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ip*(t=kp(this.y),1/Math.cos(t*Math.PI/180));var t},Dp.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Dp.prototype.url=function(t,e){var i,r,n,o,a,s=(r=this.y,n=this.z,o=Sp(256*(i=this.x),256*(r=Math.pow(2,n)-r-1),n),a=Sp(256*(i+1),256*(r+1),n),o[0]+","+o[1]+","+a[0]+","+a[1]),l=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}",l).replace("{bbox-epsg-3857}",s)},Dp.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new n(8192*(t.x*e-this.x),8192*(t.y*e-this.y))},Dp.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},Op.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Op.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Op(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Op(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Op.prototype.calculateScaledKey=function(t,e){var i=this.canonical.z-t;return t>this.canonical.z?Np(this.wrap*e,t,this.canonical.z,this.canonical.x,this.canonical.y):Np(this.wrap*e,t,t,this.canonical.x>>i,this.canonical.y>>i)},Op.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},Op.prototype.children=function(t){if(this.overscaledZ>=t)return[new Op(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,r=2*this.canonical.y;return[new Op(e,this.wrap,e,i,r),new Op(e,this.wrap,e,1+i,r),new Op(e,this.wrap,e,i,1+r),new Op(e,this.wrap,e,1+i,1+r)]},Op.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))},Op.prototype.wrapped=function(){return new Op(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Op.prototype.unwrapTo=function(t){return new Op(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Op.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Op.prototype.toUnwrapped=function(){return new zp(this.wrap,this.canonical)},Op.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Op.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Pp(t.x-this.wrap,t.y))},Vr("CanonicalTileID",Dp),Vr("OverscaledTileID",Op,{omit:["posMatrix"]}),Rp.prototype.get=function(t,e){var i=new Uint8Array(this.data.buffer),r=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(i[r],i[1+r],i[2+r])},Rp.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Rp.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)},Rp.prototype._unpackMapbox=function(t,e,i){return(256*t*256+256*e+i)/10-1e4},Rp.prototype._unpackTerrarium=function(t,e,i){return 256*t+e+i/256-32768},Rp.prototype.getPixels=function(){return new Zs({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Rp.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",Rp),Bp.prototype.encode=function(t){return this._stringToNumber[t]},Bp.prototype.decode=function(t){return this._numberToString[t]};var Fp={geometry:{configurable:!0}};function Up(){this.state={},this.stateChanges={},this.deletedStates={}}function Vp(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Rr(8192,16,0),this.grid3D=new Rr(8192,16,0),this.featureIndexArray=new ma,this.promoteId=e}function qp(t,e,i,r,n){return v(t,(function(t,o){var a=e instanceof _n?e.get(o):null;return a&&a.evaluate?a.evaluate(i,r,n):a}))}function Gp(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 Zp(t,e){return e-t}function Hp(t,e){this.tileID=t,this.uid=d(),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"}function Wp(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},Yp.mark(this._marks.start)}Fp.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},Fp.geometry.set=function(t){this._geometry=t},jp.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(jp.prototype,Fp),Up.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]||{},p(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]}
2,Up.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}},Up.prototype.getState=function(t,e){var i=String(e),r=p({},(this.state[t]||{})[i],(this.stateChanges[t]||{})[i]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var n=this.deletedStates[t][e];if(null===n)return{};for(var o in n)delete r[o]}return r},Up.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Up.prototype.coalesceChanges=function(t,e){var i={};for(var r in this.stateChanges){this.state[r]=this.state[r]||{};var n={};for(var o in this.stateChanges[r])this.state[r][o]||(this.state[r][o]={}),p(this.state[r][o],this.stateChanges[r][o]),n[o]=this.state[r][o];i[r]=n}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var l in this.state[a])s[l]={},this.state[a][l]={};else for(var u in this.deletedStates[a]){if(null===this.deletedStates[a][u])this.state[a][u]={};else for(var c=0,h=Object.keys(this.deletedStates[a][u]);c<h.length;c+=1)delete this.state[a][u][h[c]];s[u]=this.state[a][u]}i[a]=i[a]||{},p(i[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(i).length)for(var d in t)t[d].setFeatureState(i,e)},Vp.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])}},Vp.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Kl.VectorTile(new Au(this.rawTileData)).layers,this.sourceLayerCoder=new Bp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Vp.prototype.query=function(t,e,i,r){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=cr(a.filter),u=t.queryGeometry,c=t.queryPadding*s,p=Gp(u),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),d=Gp(t.cameraQueryGeometry),f=0,m=this.grid3D.query(d.minX-c,d.minY-c,d.maxX+c,d.maxY+c,(function(e,i,r,o){return function(t,e,i,r,o){for(var a=0,s=t;a<s.length;a+=1){var l=s[a];if(e<=l.x&&i<=l.y&&r>=l.x&&o>=l.y)return!0}var u=[new n(e,i),new n(e,o),new n(r,o),new n(r,i)];if(2<t.length)for(var c=0,p=u;c<p.length;c+=1)if(_s(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(xs(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-c,i-c,r+c,o+c)}));f<m.length;f+=1)h.push(m[f]);h.sort(Zp);for(var g,y={},v=function(n){var c=h[n];if(c!==g){g=c;var p=o.featureIndexArray.get(c),d=null;o.loadMatchingFeature(y,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,l,a.layers,a.availableImages,e,i,r,(function(e,i,r){return d=d||us(e),i.queryIntersectsFeature(u,e,r,d,o.z,t.transform,s,t.pixelPosMatrix)}))}},_=0;_<h.length;_++)v(_);return y},Vp.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 h=this.sourceLayerCoder.decode(i),d=this.vtLayers[h].feature(r);if(n.filter(new un(this.tileID.overscaledZ),d))for(var f=this.getId(d,h),m=0;m<p.length;m++){var g=p[m];if(!(o&&o.indexOf(g)<0)){var y=s[g];if(y){var v={};void 0!==f&&u&&(v=u.getState(y.sourceLayer||"_geojsonTileLayer",f));var _=l[g];_.paint=qp(_.paint,y.paint,d,v,a),_.layout=qp(_.layout,y.layout,d,v,a);var x=!c||c(d,y,v);if(x){var b=new jp(d,this.z,this.x,this.y,f);b.layer=_;var w=t[g];void 0===w&&(w=t[g]=[]),w.push({featureIndex:r,feature:b,intersectionZ:x})}}}}}}
vendor: 11,609 bytes, line 2
2,Vp.prototype.lookupSymbolFeatures=function(t,e,i,r,n,o,a,s){var l={};this.loadVTLayers();for(var u=cr(n),c=0,p=t;c<p.length;c+=1)this.loadMatchingFeature(l,i,r,p[c],u,o,a,s,e);return l},Vp.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},Vp.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",Vp,{omit:["rawTileData","sourceLayerCoder"]}),Hp.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<R.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Hp.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Hp.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,e){var i={};if(!e)return i;for(var r=function(){var t=o[n],r=t.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==r.length){t.layers=r,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map((function(t){return r.filter((function(e){return e.id===t}))[0]})));for(var a=0,s=r;a<s.length;a+=1)i[s[a].id]=t}},n=0,o=t;n<o.length;n+=1)r();return i}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[r];if(n instanceof Xc){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 Xc&&a.hasRTLText){this.hasRTLText=!0,pn.isLoading()||pn.isLoaded()||"deferred"!==sn()||ln();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},Hp.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"},Hp.prototype.getBucket=function(t){return this.buckets[t.id]},Hp.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 tp(t,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new tp(t,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)},Hp.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},Hp.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):{}},Hp.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=cr(e&&e.filter),s=this.tileID.canonical,l=s.z,u=s.x,c=s.y,p={z:l,x:u,y:c},h=0;h<o.length;h++){var d=o.feature(h);if(a.filter(new un(this.tileID.overscaledZ),d)){var f=new jp(d,l,u,c,i.getId(d,n));f.tile=p,t.push(f)}}}},Hp.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Hp.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Hp.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var i=I(t.cacheControl);i["max-age"]&&(this.expirationTime=Date.now()+1e3*i["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var r=Date.now(),n=!1;if(this.expirationTime>r)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=r+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Hp.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)},Hp.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var i=this.latestFeatureIndex.loadVTLayers();for(var r in this.buckets)if(e.style.hasLayer(r)){var n=this.buckets[r],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=i[o],s=t[o];if(a&&s&&0!==Object.keys(s).length){n.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=e&&e.style&&e.style.getLayer(r);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(n)))}}}},Hp.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},Hp.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<R.now()},Hp.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Hp.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=R.now()+t},Hp.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},Hp.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 Yp=a.performance;Wp.prototype.finish=function(){Yp.mark(this._marks.end);var t=Yp.getEntriesByName(this._marks.measure);return 0===t.length&&(Yp.measure(this._marks.measure,this._marks.start,this._marks.end),t=Yp.getEntriesByName(this._marks.measure),Yp.clearMarks(this._marks.start),Yp.clearMarks(this._marks.end),Yp.clearMeasures(this._marks.measure)),t},t.Actor=wp,t.AlphaImage=Gs,t.CanonicalTileID=Dp,t.CollisionBoxArray=Jo,t.Color=le,t.DEMData=Rp,t.DataConstantProperty=xn,t.DictionaryCoder=Bp,t.EXTENT=8192,t.ErrorEvent=Dt,t.EvaluationParameters=un,t.Event=Lt,t.Evented=kt,t.FeatureIndex=Vp,t.FillBucket=zl,t.FillExtrusionBucket=$l,t.ImageAtlas=$u,t.ImagePosition=Ju,t.LineBucket=au,t.LngLat=Cp,t.LngLatBounds=Tp,t.MercatorCoordinate=Pp,t.ONE_EM=24,t.OverscaledTileID=Op,t.Point=n,t.Point$1=n,t.Properties=En,t.Protobuf=Au,t.RGBAImage=Zs,t.RequestManager=q,t.RequestPerformance=Wp,t.ResourceType=yt,t.SegmentVector=ya,t.SourceFeatureState=Up,t.StructArrayLayout1ui2=Uo,t.StructArrayLayout2f1f2i16=fo,t.StructArrayLayout2i4=Rn,t.StructArrayLayout3ui6=xo,t.StructArrayLayout4i8=Fn,t.SymbolBucket=Xc,t.Texture=tp,t.Tile=Hp,t.Transitionable=fn,t.Uniform1f=Ba,t.Uniform1i=Ra,t.Uniform2f=ja,t.Uniform3f=Fa,t.Uniform4f=Ua,t.UniformColor=Va,t.UniformMatrix4f=Ga,t.UnwrappedTileID=zp,t.ValidationError=Nt,t.WritingMode=ec,t.ZoomHistory=Yr,t.add=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.addDynamicAttributes=Hc,t.asyncAll=function(t,e,i){if(!t.length)return i(null,[]);var r=t.length,n=new Array(t.length),o=null;t.forEach((function(t,a){e(t,(function(t,e){t&&(o=t),n[a]=e,0==--r&&i(o,n)}))}))},t.bezier=s,t.bindAll=g,t.browser=R,t.cacheEntryPossiblyAdded=function(t){++mt>ut&&(t.getActor().send("enforceCacheSizeLimit",lt),mt=0)},t.clamp=u,t.clearTileCache=function(t){var e=a.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=Cc,t.clone=function(t){var e=new Is(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 Is(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Tu,t.config=B,t.create=function(){var t=new Is(16);return Is!=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 Is(9);return Is!=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 Is(4);return Is!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Ji,t.createLayout=zn,t.createStyleLayer=function(t){return"custom"===t.type?new cp(t):new pp[t.type](t)},t.cross=function(t,e,i){var r=e[0],n=e[1],o=e[2],a=i[0],s=i[1],l=i[2];return t[0]=n*l-o*s,t[1]=o*a-r*l,t[2]=r*s-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=l,t.emitValidationErrors=Nr,t.endsWith=y,t.enforceCacheSizeLimit=function(t){ht(),$&&$.then((function(e){e.keys().then((function(i){for(var r=0;r<i.length-t;r++)e.delete(i[r])}))}))},t.evaluateSizeForFeature=yc,t.evaluateSizeForZoom=vc,t.evaluateVariableOffset=Bc,t.evented=cn,t.extend=p,t.featureFilter=cr,t.filterObject=_,t.fromRotation=function(t,e){var i=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=i,t[2]=0,t[3]=-i,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=cc,t.getAnchorJustification=jc,t.getArrayBuffer=St,t.getImage=Et,t.getJSON=function(t,e){return wt(p(t,{type:"json"}),e)},t.getRTLTextPluginStatus=sn,t.getReferrer=xt,t.getVideo=function(t,e){var i,r,n=a.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var s=a.document.createElement("source");i=t[o],r=void 0,(r=a.document.createElement("a")).href=i,r.protocol===a.document.location.protocol&&r.host===a.document.location.host||(n.crossOrigin="Anonymous"),s.src=t[o],n.appendChild(s)}return{cancel:function(){}}},t.identity=Es,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],d=e[11],f=e[12],m=e[13],g=e[14],y=e[15],v=i*s-r*a,_=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*f,C=c*g-h*f,I=c*y-d*f,E=p*g-h*m,M=p*y-d*m,A=h*y-d*g,L=v*A-_*M+x*E+b*I-w*C+S*T;return L?(t[0]=(s*A-l*M+u*E)*(L=1/L),t[1]=(n*M-r*A-o*E)*L,t[2]=(m*S-g*w+y*b)*L,t[3]=(h*w-p*S-d*b)*L,t[4]=(l*I-a*A-u*C)*L,t[5]=(i*A-n*I+o*C)*L,t[6]=(g*x-f*S-y*_)*L,t[7]=(c*S-h*x+d*_)*L,t[8]=(a*M-s*I+u*T)*L,t[9]=(r*I-i*M-o*T)*L,t[10]=(f*w-m*x+y*v)*L,t[11]=(p*x-c*w-d*v)*L,t[12]=(s*C-a*E-l*T)*L,t[13]=(i*E-r*C+n*T)*L,t[14]=(m*_-f*b-g*v)*L,t[15]=(c*b-p*_+h*v)*L,t):null},t.isChar=Kr,t.isMapboxURL=Z,t.keysDifference=function(t,e){var i=[];for(var r in t)r in e||i.push(r);return i},t.makeRequest=wt,t.mapObject=v,t.mercatorXfromLng=Mp,t.mercatorYfromLat=Ap,t.mercatorZfromAltitude=Lp,t.mul=ks,t.multiply=Ms,t.mvt=Kl,t.normalize=function(t,e){var i=e[0],r=e[1],n=e[2],o=i*i+r*r+n*n;return 0<o&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=Xe,t.offscreenCanvasSupported=gt,t.ortho=function(t,e,
2i,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 Au(t).readFields(Wu,[])},t.pbf=Au,t.performSymbolLayout=function(t,e,i,r,n,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new un(c.minZoom),a),l["text-size"].possiblyEvaluate(new un(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,d=h.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new un(h.minZoom),a),l["icon-size"].possiblyEvaluate(new un(d),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new un(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new un(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new un(18));for(var f=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),g=s.get("text-keep-upright"),y=s.get("text-size"),v=function(){var o=x[_],l=s.get("text-font").evaluate(o,{},a).join(","),c=y.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),h=u.layoutIconSize.evaluate(o,{},a),d={horizontal:{},vertical:void 0},v=o.text,b=[0,0];if(v){var S=v.toString(),T=24*s.get("text-letter-spacing").evaluate(o,{},a),C=function(){for(var t=0,e=S;t<e.length;t+=1)if(i=e[t].charCodeAt(0),Kr.Arabic(i)||Kr["Arabic Supplement"](i)||Kr["Arabic Extended-A"](i)||Kr["Arabic Presentation Forms-A"](i)||Kr["Arabic Presentation Forms-B"](i))return;var i;return 1}()?T:0,I=s.get("text-anchor").evaluate(o,{},a),E=s.get("text-variable-anchor");if(!E){var M=s.get("text-radial-offset").evaluate(o,{},a);b=M?Bc(I,[24*M,Rc]):s.get("text-offset").evaluate(o,{},a).map((function(t){return 24*t}))}var A=m?"center":s.get("text-justify").evaluate(o,{},a),L=s.get("symbol-placement"),k="point"===L?24*s.get("text-max-width").evaluate(o,{},a):0,P=function(){t.allowVerticalPlacement&&Xr(S)&&(d.vertical=rc(v,e,i,n,l,k,f,I,"left",C,b,ec.vertical,!0,L,p,c))};if(!m&&E){for(var D="auto"===A?E.map((function(t){return jc(t)})):[A],z=!1,O=0;O<D.length;O++){var N=D[O];if(!d.horizontal[N])if(z)d.horizontal[N]=d.horizontal[0];else{var R=rc(v,e,i,n,l,k,f,"center",N,C,b,ec.horizontal,!1,L,p,c);R&&(z=1===(d.horizontal[N]=R).positionedLines.length)}}P()}else{"auto"===A&&(A=jc(I));var B=rc(v,e,i,n,l,k,f,I,A,C,b,ec.horizontal,!1,L,p,c);B&&(d.horizontal[A]=B),P(),Xr(S)&&m&&g&&(d.vertical=rc(v,e,i,n,l,k,f,I,A,C,b,ec.vertical,!1,L,p,c))}}var j,F,U,V,q,G=void 0,Z=!1;if(o.icon&&o.icon.name){var H=r[o.icon.name];H&&(j=n[o.icon.name],F=s.get("icon-offset").evaluate(o,{},a),U=cc(s.get("icon-anchor").evaluate(o,{},a)),V=F[0]-j.displaySize[0]*U.horizontalAlign,G={image:j,top:q=F[1]-j.displaySize[1]*U.verticalAlign,bottom:q+j.displaySize[1],left:V,right:V+j.displaySize[0]},Z=H.sdf,void 0===t.sdfIcons?t.sdfIcons=H.sdf:t.sdfIcons!==H.sdf&&w("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),H.pixelRatio===t.pixelRatio&&0===s.get("icon-rotate").constantOr(1)||(t.iconsNeedLinear=!0))}var W=Uc(d.horizontal)||d.vertical;t.iconsInText=!!W&&W.iconsInText,(W||G)&&function(t,e,i,r,n,o,a,s,l,u,c){var p=o.textMaxSize.evaluate(e,{});void 0===p&&(p=a);var h,d,f,m,g,y,v,_,x,b,S,T,C,I=t.layers[0].layout,E=I.get("icon-offset").evaluate(e,{},c),M=Uc(i.horizontal),A=a/24,L=t.tilePixelRatio*A,k=t.tilePixelRatio*p/24,P=t.tilePixelRatio*s,D=t.tilePixelRatio*I.get("symbol-spacing"),z=I.get("text-padding")*t.tilePixelRatio,O=I.get("icon-padding")*t.tilePixelRatio,N=I.get("text-max-angle")/180*Math.PI,R="map"===I.get("text-rotation-alignment")&&"point"!==I.get("symbol-placement"),B="map"===I.get("icon-rotation-alignment")&&"point"!==I.get("symbol-placement"),j=I.get("symbol-placement"),F=D/2,U=I.get("icon-text-fit");function V(s,p){p.x<0||8192<=p.x||p.y<0||8192<=p.y||function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,S,T,C){var I,E,M,A,L,k,P=t.addToLineVertexArray(e,i),D=0,z=0,O=0,N=0,R=-1,B=-1,j={},F=Sa(""),U=0;if(k=void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(U=(I=s.layout.get("text-offset").evaluate(x,{},T).map((function(t){return 24*t})))[0],I[1]):(U=24*s.layout.get("text-radial-offset").evaluate(x,{},T),Rc),t.allowVerticalPlacement&&r.vertical){var V=s.layout.get("text-rotate").evaluate(x,{},T)+90;A=new kc(l,e,u,c,p,r.vertical,h,d,f,V),a&&(L=new kc(l,e,u,c,p,a,g,y,f,V))}if(n){var q=s.layout.get("icon-rotate").evaluate(x,{}),G="none"!==s.layout.get("icon-text-fit"),Z=Ic(n,q,S,G),H=a?Ic(a,q,S,G):void 0;M=new kc(l,e,u,c,p,n,g,y,!1,q),D=4*Z.length;var W=t.iconSizeData,Y=null;"source"===W.kind?32640<(Y=[128*s.layout.get("icon-size").evaluate(x,{})])[0]&&w(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===W.kind&&(32640<(Y=[128*b.compositeIconSizes[0].evaluate(x,{},T),128*b.compositeIconSizes[1].evaluate(x,{},T)])[0]||32640<Y[1])&&w(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,Z,Y,_,v,x,!1,e,P.lineStartIndex,P.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1,H&&(z=4*H.length,t.addSymbols(t.icon,H,Y,_,v,x,ec.vertical,e,P.lineStartIndex,P.lineLength,-1,T),B=t.icon.placedSymbolArray.length-1)}for(var K in r.horizontal){var X=r.horizontal[K];E||(F=Sa(X.text),E=new kc(l,e,u,c,p,X,h,d,f,s.layout.get("text-rotate").evaluate(x,{},T)));var J=1===X.positionedLines.length;
2if(O+=Fc(t,e,X,o,s,f,x,m,P,r.vertical?ec.horizontal:ec.horizontalOnly,J?Object.keys(r.horizontal):[K],j,R,b,T),J)break}function Q(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e}r.vertical&&(N+=Fc(t,e,r.vertical,o,s,f,x,m,P,ec.vertical,["vertical"],j,B,b,T));var $=E?E.boxStartIndex:t.collisionBoxArray.length,tt=E?E.boxEndIndex:t.collisionBoxArray.length,et=A?A.boxStartIndex:t.collisionBoxArray.length,it=A?A.boxEndIndex:t.collisionBoxArray.length,rt=M?M.boxStartIndex:t.collisionBoxArray.length,nt=M?M.boxEndIndex:t.collisionBoxArray.length,ot=L?L.boxStartIndex:t.collisionBoxArray.length,at=L?L.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=-1<(st=Q(L,st=Q(M,st=Q(A,st=Q(E,st)))))?1:0;lt&&(st*=C/24),t.glyphOffsetArray.length>=Xc.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,0<=j.right?j.right:-1,0<=j.center?j.center:-1,0<=j.left?j.left:-1,j.vertical||-1,R,B,F,$,tt,et,it,rt,nt,ot,at,u,O,N,D,z,lt,0,h,U,k,st)}(t,p,s,i,r,n,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,L,z,R,l,P,O,B,E,e,o,u,c,a)}if(r&&"none"!==U&&(t.allowVerticalPlacement&&i.vertical&&(h=hc(r,i.vertical,U,I.get("icon-text-fit-padding"),E,A)),M&&(r=hc(r,M,U,I.get("icon-text-fit-padding"),E,A))),"line"===j)for(var q=0,G=Cc(e.geometry,0,0,8192,8192);q<G.length;q+=1)for(var Z=G[q],H=0,W=(d=Z,f=D,m=N,g=i.vertical||M,y=r,v=k,_=t.overscaling,x=8192,b=wc(g,24,v),f-(T=(S=Sc(g,y))*v)<f/4&&(f=T+f/4),function t(e,i,r,n,o,a,s,l,u){for(var c=a/2,p=bc(e),h=0,d=i-r,f=[],m=0;m<e.length-1;m++){for(var g=e[m],y=e[m+1],v=g.dist(y),_=y.angleTo(g);d+r<h+v;){var x=((d+=r)-h)/v,b=Xe(g.x,y.x,x),w=Xe(g.y,y.y,x);if(0<=b&&b<u&&0<=w&&w<u&&0<=d-c&&d+c<=p){var S=new fc(b,w,_,m);S._round(),n&&!xc(e,S,a,n,o)||f.push(S)}}h+=v}return l||f.length||s||(f=t(e,h/2,r,n,o,a,s,!0,u)),f}(d,(C=0===d[0].x||d[0].x===x||0===d[0].y||d[0].y===x)?f/2*_%f:(S/2+48)*v*_%f,f,b,m,T,C,!1,x));H<W.length;H+=1){var Y=W[H];M&&Vc(t,M.text,F,Y)||V(Z,Y)}else if("line-center"===j)for(var K=0,X=e.geometry;K<X.length;K+=1){var J=X[K];if(1<J.length){var Q=Tc(J,N,i.vertical||M,r,24,k);Q&&V(J,Q)}}else if("Polygon"===e.type)for(var $=0,tt=Ll(e.geometry,0);$<tt.length;$+=1){var et=tt[$],it=zc(et,16);V(et[0],new fc(it.x,it.y,0))}else if("LineString"===e.type)for(var rt=0,nt=e.geometry;rt<nt.length;rt+=1){var ot=nt[rt];V(ot,new fc(ot[0].x,ot[0].y,0))}else if("Point"===e.type)for(var at=0,st=e.geometry;at<st.length;at+=1)for(var lt=0,ut=st[at];lt<ut.length;lt+=1){var ct=ut[lt];V([ct],new fc(ct.x,ct.y,0))}}(t,o,d,G,r,u,p,h,b,Z,a)},_=0,x=t.features;_<x.length;_+=1)v();o&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,i,r,n){var o,a=1/Math.tan(e/2);return t[0]=a/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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)*(o=1/(r-n)),t[14]=2*n*r*o):(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=pn,t.polygonIntersectsPolygon=hs,t.postMapLoadEvent=st,t.postTurnstileEvent=ot,t.potpack=Xu,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Vr,t.registerForPluginStateChange=function(t){return t({pluginStatus:nn,pluginURL:on}),cn.on("pluginStateChange",t),t},t.rotate=function(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=r*l+o*s,t[1]=n*l+a*s,t[2]=r*-s+o*l,t[3]=n*-s+a*l,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],h=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+h*r,t[8]=u*n-o*r,t[9]=c*n-a*r,t[10]=p*n-s*r,t[11]=h*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],h=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+h*r,t[4]=u*n-o*r,t[5]=c*n-a*r,t[6]=p*n-s*r,t[7]=h*n-l*r,t}
vendor: 13,939 bytes, line 2
2,t.scale=function(t,e,i){var r=i[0],n=i[1],o=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]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,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){lt=t,ut=e},t.setRTLTextPlugin=function(t,e,i){if(void 0===i&&(i=!1),"deferred"===nn||"loading"===nn||"loaded"===nn)throw new Error("setRTLTextPlugin cannot be called multiple times.");on=R.resolveURL(t),nn="deferred",rn=e,an(),i||ln()},t.sphericalToCartesian=function(t){var e=t[0],i=t[1],r=t[2];return i+=90,i*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(i)*Math.sin(r),y:e*Math.sin(i)*Math.sin(r),z:e*Math.cos(r)}},t.sqrLen=function(t){var e=t[0],i=t[1];return e*e+i*i},t.styleSpec=Ot,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=_c,t.transformMat3=function(t,e,i){var r=e[0],n=e[1],o=e[2];return t[0]=r*i[0]+n*i[3]+o*i[6],t[1]=r*i[1]+n*i[4]+o*i[7],t[2]=r*i[2]+n*i[5]+o*i[8],t},t.transformMat4=Ps,t.translate=function(t,e,i){var r,n,o,a,s,l,u,c,p,h,d,f,m=i[0],g=i[1],y=i[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(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],d=e[10],f=e[11],t[0]=r=e[0],t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=d,t[11]=f,t[12]=r*m+s*g+p*y+e[12],t[13]=n*m+l*g+h*y+e[13],t[14]=o*m+u*g+d*y+e[14],t[15]=a*m+c*g+f*y+e[15]),t},t.triggerPluginCompletionEvent=en,t.uniqueId=d,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=Dr,t.validateStyle=Pr,t.values=function(t){var e=[];for(var i in t)e.push(t[i]);return e},t.vectorTile=Kl,t.version="1.11.1",t.warnOnce=w,t.webpSupported=j,t.window=a,t.wrap=c})),i(0,(function(t){function e(t){var i=typeof t;if("number"==i||"boolean"==i||"string"==i||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",n=0,o=t;n<o.length;n+=1)r+=e(o[n])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+e(t[a[l]])+",";return s+"}"}function i(i){for(var r="",n=0,o=t.refProperties;n<o.length;n+=1)r+="/"+e(i[o[n]]);return r}function r(t){this.keyCache={},t&&this.replace(t)}function n(e){var i={},r=[];for(var n in e){var o=e[n],a=i[n]={};for(var s in o){var l=o[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};r.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(r),p=new t.AlphaImage({width:c.w||1,height:c.h||1});for(var h in e){var d=e[h];for(var f in d){var m=d[+f];if(m&&0!==m.bitmap.width&&0!==m.bitmap.height){var g=i[h][f].rect;t.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:g.x+1,y:g.y+1},m.bitmap)}}}this.image=p,this.positions=i}function o(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId}function a(e,i,r){for(var n=new t.EvaluationParameters(i),o=0,a=e;o<a.length;o+=1)a[o].recalculate(n,r)}function s(e,i){var r=t.getArrayBuffer(e.request,(function(e,r,n,o){e?i(e):r&&i(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(r)),rawData:r,cacheControl:n,expires:o})}));return function(){r.cancel(),i()}}function l(t,e,i,r){this.actor=t,this.layerIndex=e,this.availableImages=i,this.loadVectorData=r||s,this.loading={},this.loaded={}}function u(){this.loaded={}}r.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},r.prototype.update=function(e,r){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var u=0,c=r;u<c.length;u+=1){var p=c[u];delete this.keyCache[p],delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,d=function(t,e){for(var r={},n=0;n<t.length;n++){var o=e&&e[t[n].id]||i(t[n]);e&&(e[t[n].id]=o);var a=r[o];(a=a||(r[o]=[])).push(t[n])}var s=[];for(var l in r)s.push(r[l]);return s}(t.values(this._layerConfigs),this.keyCache);h<d.length;h+=1){var f=d[h].map((function(t){return n._layers[t.id]})),m=f[0];if("none"!==m.visibility){var g=m.source||"",y=this.familiesBySource[g];y=y||(this.familiesBySource[g]={});var v=m.sourceLayer||"_geojsonTileLayer",_=y[v];(_=_||(y[v]=[])).push(f)}}},t.register("GlyphAtlas",n),o.prototype.parse=function(e,i,r,o,s){var l=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var p,h,d,f,m={},g={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},y=i.familiesBySource[this.source];for(var v in y){var _=e.layers[v];if(_){1===_.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+v+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var x=u.encode(v),b=[],w=0;w<_.length;w++){var S=_.feature(w),T=c.getId(S,v);b.push({feature:S,id:T,index:w,sourceLayerIndex:x})}for(var C=0,I=y[v];C<I.length;C+=1){var E=I[C],M=E[0];M.minzoom&&this.zoom<Math.floor(M.minzoom)||M.maxzoom&&this.zoom>=M.maxzoom||"none"!==M.visibility&&(a(E,this.zoom,r),(m[M.id]=M.createBucket({index:c.bucketLayerIDs.length,layers:E,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g,this.tileID.canonical),c.bucketLayerIDs.push(E.map((function(t){return t.id}))))}}}var A=t.mapObject(g.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(A).length?o.send("getGlyphs",{uid:this.uid,stacks:A},(function(t,e){p||(p=t,h=e,P.call(l))})):h={};var L=Object.keys(g.iconDependencies);L.length?o.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){p||(p=t,d=e,P.call(l))})):d={};var k=Object.keys(g.patternDependencies);function P(){if(p)return s(p);if(h&&d&&f){var e=new n(h),i=new t.ImageAtlas(d,f);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,r),t.performSymbolLayout(l,h,e.positions,d,i.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,r),l.addFeatures(g,this.tileID.canonical,i.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:i,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?d:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?o.send("getImages",{icons:k,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){p||(p=t,f=e,P.call(l))})):f={},P.call(this)},l.prototype.loadTile=function(e,i){var r=this,n=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[n]=new o(e);s.abort=this.loadVectorData(e,(function(e,o){if(delete r.loading[n],e||!o)return s.status="done",r.loaded[n]=s,i(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(e,r){if(e||!r)return i(e);i(null,t.extend({rawTileData:l.slice(0)},r,u,c))})),r.loaded=r.loaded||{},r.loaded[n]=s}))},l.prototype.reloadTile=function(t,e){var i=this,r=this.loaded,n=t.uid,o=this;if(r&&r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,r){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,i.availableImages,o.actor,n)),e(t,r)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var i=this.loading,r=t.uid;i&&i[r]&&i[r].abort&&(i[r].abort(),delete i[r]),e()},l.prototype.removeTile=function(t,e){var i=this.loaded,r=t.uid;i&&i[r]&&delete i[r],e()};var c=t.window.ImageBitmap;function p(t,e){if(0!==t.length){h(t[0],e);for(var i=1;i<t.length;i++)h(t[i],!e)}}function h(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()}function d(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}u.prototype.loadTile=function(e,i){var r=e.uid,n=e.encoding,o=e.rawImageData,a=c&&o instanceof c?this.getImageData(o):o,s=new t.DEMData(r,a,n);this.loaded=this.loaded||{},i(null,this.loaded[r]=s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var i=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:i.width,height:i.height},i.data)},u.prototype.removeTile=function(t){var e=this.loaded,i=t.uid;e&&e[i]&&delete e[i]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON;d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],i=0,r=this._feature.geometry;i<r.length;i+=1){var n=r[i];e.push([new t.Point$1(n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,c=s[a];u<c.length;u+=1){var p=c[u];l.push(new t.Point$1(p[0],p[1]))}o.push(l)}return o},d.prototype.toGeoJSON=function(t,e,i){return f.call(this,t,e,i)};var m=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};m.prototype.feature=function(t){return new d(this._features[t])};var g=t.vectorTile.VectorTileFeature,y=v;function v(t,e){this.options=e||{},this.features=t,this.length=t.length}function _(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}v.prototype.feature=function(t){return new _(this.features[t],this.options.extent)},_.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var i=0;i<e.length;i++){for(var r=e[i],n=[],o=0;o<r.length;o++)n.push(new t.Point$1(r[o][0],r[o][1]));this.geometry.push(n)}return this.geometry},_.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]},_.prototype.toGeoJSON=g.prototype.toGeoJSON;var x=w,b=y;function w(e){var i=new t.pbf;return function(t,e){for(var i in t.layers)e.writeMessage(3,S,t.layers[i])}(e,i),i.finish()}function S(t,e){var i;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(i=0;i<t.length;i++)r.feature=t.feature(i),e.writeMessage(2,T,r);var n=r.keys;for(i=0;i<n.length;i++)e.writeStringField(3,n[i]);var o=r.values;for(i=0;i<o.length;i++)e.writeMessage(4,A,o[i])}function T(t,e){var i=t.feature;void 0!==i.id&&e.writeVarintField(1,i.id),e.writeMessage(2,C,t),e.writeVarintField(3,i.type),e.writeMessage(4,M,i)}function C(t,e){var i=t.feature,r=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in i.properties){var l=o[s];void 0===l&&(r.push(s),o[s]=l=r.length-1),e.writeVarint(l);var u=i.properties[s],c=typeof u;"string"!=c&&"boolean"!=c&&"number"!=c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(n.push(u),a[p]=h=n.length-1),e.writeVarint(h)}}function I(t,e){return(e<<3)+(7&t)}function E(t){return t<<1^t>>31}function M(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(I(1,u));for(var c=3===r?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==r&&e.writeVarint(I(2,c-1));var h=l[p].x-n,d=l[p].y-o;e.writeVarint(E(h)),e.writeVarint(E(d)),n+=h,o+=d}3===r&&e.writeVarint(15)}}function A(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 L(t,e,i,r){k(t,i,r),k(e,2*i,2*r),k(e,2*i+1,2*r+1)}function k(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function P(t,e,i,r){var n=t-i,o=e-r;return n*n+o*o}function D(t){return t[0]}function z(t){return t[1]}function O(t,e,i,r,n){void 0===e&&(e=D),void 0===i&&(i=z),void 0===r&&(r=64),void 0===n&&(n=Float64Array),this.nodeSize=r;
2for(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){if(!(o-n<=r)){var s=n+o>>1;!function t(e,i,r,n,o,a){for(;n<o;){if(600<o-n){var s=o-n+1,l=r-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,i,r,Math.max(n,Math.floor(r-l*c/s+p)),Math.min(o,Math.floor(r+(s-l)*c/s+p)),a)}var h=i[2*r+a],d=n,f=o;for(L(e,i,n,r),i[2*o+a]>h&&L(e,i,n,o);d<f;){for(L(e,i,d,f),d++,f--;i[2*d+a]<h;)d++;for(;i[2*f+a]>h;)f--}i[2*n+a]===h?L(e,i,n,f):L(e,i,++f,o),f<=r&&(n=f+1),r<=f&&(o=f-1)}}(e,i,s,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)}function N(t){this.options=V(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)}x.fromVectorTileJs=w,x.fromGeojsonVt=function(t,e){e=e||{};var i={};for(var r in t)i[r]=new y(t[r].features,e),i[r].name=r,i[r].version=e.version,i[r].extent=e.extent;return w({layers:i})},x.GeoJSONWrapper=b,O.prototype.range=function(t,e,i,r){return function(t,e,i,r,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),d=u.pop();if(h-d<=a)for(var f=d;f<=h;f++)l=e[2*f+1],(s=e[2*f])>=i&&s<=n&&r<=l&&l<=o&&c.push(t[f]);else{var m=Math.floor((d+h)/2);l=e[2*m+1],(s=e[2*m])>=i&&s<=n&&r<=l&&l<=o&&c.push(t[m]);var g=(p+1)%2;(0===p?i<=s:r<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===p?s<=n:l<=o)&&(u.push(m+1),u.push(h),u.push(g))}}return c}(this.ids,this.coords,t,e,i,r,this.nodeSize)};var R={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!(O.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++)P(e[2*h],e[2*h+1],i,r)<=l&&s.push(t[h]);else{var d=Math.floor((p+c)/2),f=e[2*d],m=e[2*d+1];P(f,m,i,r)<=l&&s.push(t[d]);var g=(u+1)%2;(0===u?i-n<=f:r-n<=m)&&(a.push(p),a.push(d-1),a.push(g)),(0===u?f<=i+n:m<=r+n)&&(a.push(d+1),a.push(c),a.push(g))}}return s}(this.ids,this.coords,t,e,i,this.nodeSize)}),generateId:!1,reduce:null,map:function(t){return t}};function B(t){return{type:"Feature",id:t.id,properties:j(t),geometry:{type:"Point",coordinates:[360*(t.x-.5),(e=(180-360*t.y)*Math.PI/180,360*Math.atan(Math.exp(e))/Math.PI-90)]}};var e}function j(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 F(t){return t/360+.5}function U(t){var e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:1<i?1:i}function V(t,e){for(var i in e)t[i]=e[i];return t}function q(t){return t.x}function G(t){return t.y}function Z(t,e,i,r,n,o){var a=n-i,s=o-r;if(0!==a||0!==s){var l=((t-i)*a+(e-r)*s)/(a*a+s*s);1<l?(i=n,r=o):0<l&&(i+=a*l,r+=s*l)}return(a=t-i)*a+(s=e-r)*s}function H(t,e,i,r){var n={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)W(t,e);else if("Polygon"===i||"MultiLineString"===i)for(var r=0;r<e.length;r++)W(t,e[r]);else if("MultiPolygon"===i)for(r=0;r<e.length;r++)for(var n=0;n<e[r].length;n++)W(t,e[r][n])}(n),n}function W(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 Y(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)K(n,s);else if("MultiPoint"===o)for(var u=0;u<n.length;u++)K(n[u],s);else if("LineString"===o)X(n,s,a,!1);else if("MultiLineString"===o){if(i.lineMetrics){for(u=0;u<n.length;u++)X(n[u],s=[],a,!1),t.push(H(l,"LineString",s,e.properties));return}J(n,s,a,!1)}else if("Polygon"===o)J(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;
2u<e.geometry.geometries.length;u++)Y(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},i,r);return}for(u=0;u<n.length;u++){var c=[];J(n[u],c,a,!0),s.push(c)}}t.push(H(l,o,s,e.properties))}}function K(t,e){e.push(Q(t[0])),e.push($(t[1])),e.push(0)}function X(t,e,i,r){for(var n,o,a=0,s=0;s<t.length;s++){var l=Q(t[s][0]),u=$(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=n,s=r-i>>1,l=r-i,u=e[i],c=e[i+1],p=e[r],h=e[r+1],d=i+3;d<r;d+=3){var f=Z(e[d],e[d+1],u,c,p,h);if(a<f)o=d,a=f;else if(f===a){var m=Math.abs(d-s);m<l&&(o=d,l=m)}}n<a&&(3<o-i&&t(e,i,o,n),e[o+2]=a,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 J(t,e,i,r){for(var n=0;n<t.length;n++){var o=[];X(t[n],o,i,r),e.push(o)}}function Q(t){return t/360+.5}function $(t){var e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:1<i?1:i}function tt(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,d=0===n?c.minX:c.minY,f=0===n?c.maxX:c.maxY;if(i<=d&&f<r)l.push(c);else if(!(f<i||r<=d)){var m=[];if("Point"===h||"MultiPoint"===h)et(p,m,i,r,n);else if("LineString"===h)it(p,m,i,r,n,!1,s.lineMetrics);else if("MultiLineString"===h)nt(p,m,i,r,n,!1);else if("Polygon"===h)nt(p,m,i,r,n,!0);else if("MultiPolygon"===h)for(var g=0;g<p.length;g++){var y=[];nt(p[g],y,i,r,n,!0),y.length&&m.push(y)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(g=0;g<m.length;g++)l.push(H(c.id,h,m[g],c.tags));continue}"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(H(c.id,h,m,c.tags))}}}return l.length?l:null}function et(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]))}}function it(t,e,i,r,n,o,a){for(var s,l,u=rt(t),c=0===n?at:st,p=t.start,h=0;h<t.length-3;h+=3){var d=t[h],f=t[h+1],m=t[h+2],g=t[h+3],y=t[h+4],v=0===n?d:f,_=0===n?g:y,x=!1;a&&(s=Math.sqrt(Math.pow(d-g,2)+Math.pow(f-y,2))),v<i?i<_&&(l=c(u,d,f,g,y,i),a&&(u.start=p+s*l)):r<v?_<r&&(l=c(u,d,f,g,y,r),a&&(u.start=p+s*l)):ot(u,d,f,m),_<i&&i<=v&&(l=c(u,d,f,g,y,i),x=!0),r<_&&v<=r&&(l=c(u,d,f,g,y,r),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=rt(t)),a&&(p+=s)}var b=t.length-3;d=t[b],f=t[b+1],m=t[b+2],(v=0===n?d:f)>=i&&v<=r&&ot(u,d,f,m),b=u.length-3,o&&3<=b&&(u[b]!==u[0]||u[b+1]!==u[1])&&ot(u,u[0],u[1],u[2]),u.length&&e.push(u)}function rt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function nt(t,e,i,r,n,o){for(var a=0;a<t.length;a++)it(t[a],e,i,r,n,o,!1)}function ot(t,e,i,r){t.push(e),t.push(i),t.push(r)}function at(t,e,i,r,n,o){var a=(o-e)/(r-e);return t.push(o),t.push(i+(n-i)*a),t.push(1),a}function st(t,e,i,r,n,o){var a=(o-i)/(n-i);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function lt(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=ut(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(ut(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(ut(o.geometry[s][u],e));n.push(l)}i.push(H(o.id,a,n,o.tags))}return i}function ut(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 ct(t,e){if(t.transformed)return t;var i,r,n,o=1<<t.z,a=t.x,s=t.y;for(i=0;i<t.features.length;i++){var l=t.features[i],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(r=0;r<u.length;r+=2)l.geometry.push(pt(u[r],u[r+1],e,o,a,s));else for(r=0;r<u.length;r++){var p=[];for(n=0;n<u[r].length;n+=2)p.push(pt(u[r][n],u[r][n+1],e,o,a,s));l.geometry.push(p)}}return t.transformed=!0,t}function pt(t,e,i,r,n,o){return[Math.round(i*(t*r-n)),Math.round(i*(e*r-o))]}function ht(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++,dt(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 dt(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)ft(a,n,t,i,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)ft(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++)ft(a,u[s],t,i,!0,0===s)}
2if(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}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function ft(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 mt(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,l,u=function(t,e){var i=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)Y(i,t.features[r],e,r);else Y(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),s=tt(a=r=u,1,-1-(o=(n=e).buffer/n.extent),o,0,-1,2,n),l=tt(r,1,1-o,2+o,0,-1,2,n),(s||l)&&(a=tt(r,1,-o,1+o,0,-1,2,n)||[],s&&(a=lt(s,1).concat(a)),l&&(a=a.concat(lt(l,-1)))),(u=a).length&&this.splitTile(u,0,0,0),i&&(u.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 gt(t,e,i){return 32*((1<<t)*i+e)+t}function yt(t,e){var i=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var r=this._geoJSONIndex.getTile(i.z,i.x,i.y);if(!r)return e(null,null);var n=new m(r.features),o=x(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}function vt(e){var i=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:xt},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(e){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}}N.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");var a,s,l,u="prepare "+t.length+" points";i&&console.time(u),this.points=t;for(var c=[],p=0;p<t.length;p++)t[p].geometry&&c.push((a=p,l=(s=t[p].geometry.coordinates)[1],{x:F(s[0]),y:U(l),zoom:1/0,index:a,parentId:-1}));this.trees[n+1]=new O(c,q,G,o,Float32Array),i&&console.timeEnd(u);for(var h=n;r<=h;h--){var d=+Date.now();c=this._cluster(c,h),this.trees[h]=new O(c,q,G,o,Float32Array),i&&console.log("z%d: %d clusters in %dms",h,c.length,Date.now()-d)}return i&&console.timeEnd("total time"),this},N.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),s=this.getClusters([-180,r,n,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(F(i),U(o),F(n),U(r));c<p.length;c+=1){var h=l.points[p[c]];u.push(h.numPoints?B(h):this.points[h.index])}return u},N.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);var o=n.points[e];if(!o)throw new Error(r);for(var a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),s=[],l=0,u=n.within(o.x,o.y,a);l<u.length;l+=1){var c=n.points[u[l]];c.parentId===t&&s.push(c.numPoints?B(c):this.points[c.index])}if(0===s.length)throw new Error(r);return s}
2,N.prototype.getLeaves=function(t,e,i){var r=[];return this._appendLeaves(r,t,e=e||10,i=i||0,0),r},N.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,l=(i+1+a)/n,u={features:[]};return this._addTileFeatures(r.range((e-a)/n,s,(e+1+a)/n,l),r.points,e,i,n,u),0===e&&this._addTileFeatures(r.range(1-a/n,s,1,l),r.points,n,i,n,u),e===n-1&&this._addTileFeatures(r.range(0,s,a/n,l),r.points,-1,i,n,u),u.features.length?u:null},N.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},N.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},N.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?j(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)}},N.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))},N.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,d=0,f=c;d<f.length;d+=1){var m=u.points[f[d]];m.zoom>e&&(h+=m.numPoints||1)}if(o<=h){for(var g=l.x*p,y=l.y*p,v=n&&1<p?this._map(l,!0):null,_=(s<<5)+(e+1)+this.points.length,x=0,b=c;x<b.length;x+=1){var w=u.points[b[x]];if(!(w.zoom<=e)){w.zoom=e;var S=w.numPoints||1;g+=w.x*S,y+=w.y*S,w.parentId=_,n&&n(v=v||this._map(l,!0),this._map(w))}}l.parentId=_,i.push({x:g/h,y:y/h,zoom:1/0,id:_,parentId:-1,numPoints:h,properties:v})}else if(i.push(l),1<h)for(var T=0,C=c;T<C.length;T+=1){var I=u.points[C[T]];I.zoom<=e||(I.zoom=e,i.push(I))}}}return i},N.prototype._getOriginId=function(t){return t-this.points.length>>5},N.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},mt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!(N.prototype._map=function(t,e){if(t.numPoints)return e?V({},t.properties):t.properties;var i=this.points[t.index].properties,r=this.options.map(i);return e&&r===i?V({},r):r}),promoteId:null,generateId:!1,debug:0},mt.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=1<<e,p=gt(e,i,r),h=this.tiles[p];if(!h&&(1<u&&console.time("creation"),h=this.tiles[p]=ht(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,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var d="z"+e;this.stats[d]=(this.stats[d]||0)+1,this.total++}if(h.source=t,n){if(e===l.maxZoom||e===n)continue;var f=1<<n-e;if(i!==Math.floor(o/f)||r!==Math.floor(a/f))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){1<u&&console.time("clipping");var m,g,y,v,_,x,b=.5*l.buffer/l.extent,w=.5-b,S=.5+b,T=1+b;m=g=y=v=null,_=tt(t,c,i-b,i+S,0,h.minX,h.maxX,l),x=tt(t,c,i+w,i+T,0,h.minX,h.maxX,l),t=null,_&&(m=tt(_,c,r-b,r+S,1,h.minY,h.maxY,l),g=tt(_,c,r+w,r+T,1,h.minY,h.maxY,l),_=null),x&&(y=tt(x,c,r-b,r+S,1,h.minY,h.maxY,l),v=tt(x,c,r+w,r+T,1,h.minY,h.maxY,l),x=null),1<u&&console.timeEnd("clipping"),s.push(m||[],e+1,2*i,2*r),s.push(g||[],e+1,2*i,2*r+1),s.push(y||[],e+1,2*i+1,2*r),s.push(v||[],e+1,2*i+1,2*r+1)}}},mt.prototype.getTile=function(t,e,i){var r=this.options,n=r.extent,o=r.debug;if(t<0||24<t)return null;var a=1<<t,s=gt(t,e=(e%a+a)%a,i);if(this.tiles[s])return ct(this.tiles[s],n);1<o&&console.log("drilling down to z%d-%d-%d",t,e,i);for(var l,u=t,c=e,p=i;!l&&0<u;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[gt(u,c,p)];return l&&l.source?(1<o&&console.log("found parent tile z%d-%d-%d",u,c,p),1<o&&console.time("drilling down"),this.splitTile(l.source,u,c,p,t,e,i),1<o&&console.timeEnd("drilling down"),this.tiles[s]?ct(this.tiles[s],n):null):null};var _t,xt=(bt.__proto__=_t=l,((bt.prototype=Object.create(_t&&_t.prototype)).constructor=bt).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())},bt.prototype._loadData=function(){var e=this;
vendor: 4,108 bytes, line 2
2if(this._pendingCallback&&this._pendingLoadDataParams){var i=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(r&&r.request&&r.request.collectResourceTiming)&&new t.RequestPerformance(r.request);this.loadGeoJSON(r,(function(o,a){if(o||!a)return i(o);if("object"!=typeof a)return i(new Error("Input data given to '"+r.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)p(e.coordinates,i);else if("MultiPolygon"===n)for(r=0;r<e.coordinates.length;r++)p(e.coordinates[r],i);return e}(a,!0);try{e._geoJSONIndex=r.cluster?new N(function(){var e=r.superclusterOptions,i=r.clusterProperties;if(!i||!e)return e;for(var n={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(i),u=0,c=l;u<c.length;u+=1){var p=c[u],h=i[p],d=h[0],f=t.createExpression(h[1]),m=t.createExpression("string"==typeof d?[d,["accumulated"],["get",p]]:d);n[p]=f.value,o[p]=m.value}return e.map=function(t){s.properties=t;for(var e={},i=0,r=l;i<r.length;i+=1){var o=r[i];e[o]=n[o].evaluate(a,s)}return e},e.reduce=function(t,e){s.properties=e;for(var i=0,r=l;i<r.length;i+=1){var n=r[i];a.accumulated=t[n],t[n]=o[n].evaluate(a,s)}},e}()).load(a.features):new mt(a,r.geojsonVtOptions)}catch(o){return i(o)}e.loaded={};var s={};if(n){var l=n.finish();l&&(s.resourceTiming={},s.resourceTiming[r.source]=JSON.parse(JSON.stringify(l)))}i(null,s)}))}},bt.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},bt.prototype.reloadTile=function(t,e){var i=this.loaded;return i&&i[t.uid]?_t.prototype.reloadTile.call(this,t,e):this.loadTile(t,e)},bt.prototype.loadGeoJSON=function(e,i){if(e.request)t.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."))}}},bt.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},bt.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},bt.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},bt.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},bt);function bt(t,e,i,r){_t.call(this,t,e,i,yt),r&&(this.loadGeoJSON=r)}return vt.prototype.setReferrer=function(t,e){this.referrer=e},vt.prototype.setImages=function(t,e,i){for(var r in this.availableImages[t]=e,this.workerSources[t]){var n=this.workerSources[t][r];for(var o in n)n[o].availableImages=e}i()},vt.prototype.setLayers=function(t,e,i){this.getLayerIndex(t).replace(e),i()},vt.prototype.updateLayers=function(t,e,i){this.getLayerIndex(t).update(e.layers,e.removedIds),i()},vt.prototype.loadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).loadTile(e,i)},vt.prototype.loadDEMTile=function(t,e,i){this.getDEMWorkerSource(t,e.source).loadTile(e,i)},vt.prototype.reloadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).reloadTile(e,i)},vt.prototype.abortTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).abortTile(e,i)},vt.prototype.removeTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).removeTile(e,i)},vt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},vt.prototype.removeSource=function(t,e,i){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var 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()}}
2,vt.prototype.loadWorkerSource=function(t,e,i){try{this.self.importScripts(e.url),i()}catch(t){i(t.toString())}},vt.prototype.syncRTLPluginState=function(e,i,r){try{t.plugin.setState(i);var n=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=n){this.self.importScripts(n);var o=t.plugin.isParsed();r(o?void 0:new Error("RTL Text Plugin failed to import scripts from "+n),o)}}catch(e){r(e.toString())}},vt.prototype.getAvailableImages=function(t){return this.availableImages[t]||[]},vt.prototype.getLayerIndex=function(t){return this.layerIndexes[t]||(this.layerIndexes[t]=new r)},vt.prototype.getWorkerSource=function(t,e,i){var r=this;return this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),this.workerSources[t][e][i]||(this.workerSources[t][e][i]=new this.workerSourceTypes[e]({send:function(e,i,n){r.actor.send(e,i,n,t)}},this.getLayerIndex(t),this.getAvailableImages(t))),this.workerSources[t][e][i]},vt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new u),this.demWorkerSources[t][e]},vt.prototype.enforceCacheSizeLimit=function(e,i){t.enforceCacheSizeLimit(i)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new vt(self)),vt})),i(0,(function(t){var e=t.createCommonjsModule((function(t){function e(t){return!i(t)}function i(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){var i=e.getImageData(0,0,1,1);return i&&i.width===t.width}}()?(void 0===r[i=t&&t.failIfMajorPerformanceCaveat]&&(r[i]=function(){var t,r,n,o=(t=i,r=document.createElement("canvas"),(n=Object.create(e.webGLContextAttributes)).failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",n)||r.probablySupportsContext("experimental-webgl",n):r.supportsContext?r.supportsContext("webgl",n)||r.supportsContext("experimental-webgl",n):r.getContext("webgl",n)||r.getContext("experimental-webgl",n));if(!o)return!1;var a=o.createShader(o.VERTEX_SHADER);return!(!a||o.isContextLost())&&(o.shaderSource(a,"void main() {}"),o.compileShader(a),!0===o.getShaderParameter(a,o.COMPILE_STATUS))}()),r[i]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var i}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=i);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),i={create:function(e,i,r){var n=t.window.document.createElement(e);return void 0!==i&&(n.className=i),r&&r.appendChild(n),n},createNS:function(e,i){return t.window.document.createElementNS(e,i)}},r=t.window.document&&t.window.document.documentElement.style;function n(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 o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);i.disableDrag=function(){r&&a&&(o=r[a],r[a]="none")},i.enableDrag=function(){r&&a&&(r[a]=o)};var s=n(["transform","WebkitTransform"]),l=!(i.setTransform=function(t,e){t.style[s]=e});try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}
2i.addEventListener=function(t,e,i,r){void 0===r&&(r={}),t.addEventListener(e,i,"passive"in r&&l?r:r.capture)},i.removeEventListener=function(t,e,i,r){void 0===r&&(r={}),t.removeEventListener(e,i,"passive"in r&&l?r:r.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};i.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout((function(){t.window.removeEventListener("click",c,!0)}),0)},i.mousePos=function(e,i){var r=e.getBoundingClientRect();return new t.Point(i.clientX-r.left-e.clientLeft,i.clientY-r.top-e.clientTop)},i.touchPos=function(e,i){for(var r=e.getBoundingClientRect(),n=[],o=0;o<i.length;o++)n.push(new t.Point(i[o].clientX-r.left-e.clientLeft,i[o].clientY-r.top-e.clientTop));return n},i.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&0<=t.window.navigator.platform.toUpperCase().indexOf("MAC")?0:e.button},i.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p,h=((p=t.Evented)&&(g.__proto__=p),((g.prototype=Object.create(p&&p.prototype)).constructor=g).prototype.isLoaded=function(){return this.loaded},g.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=[]}},g.prototype.getImage=function(t){return this.images[t]},g.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},g.prototype._validate=function(e,i){var r=!0;return this._validateStretch(i.stretchX,i.data&&i.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchX" value'))),r=!1),this._validateStretch(i.stretchY,i.data&&i.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchY" value'))),r=!1),this._validateContent(i.content,i)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "content" value'))),r=!1),r},g.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},g.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]))},g.prototype.updateImage=function(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0},g.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()},g.prototype.listImages=function(){return Object.keys(this.images)},g.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})},g.prototype._notify=function(e,i){for(var r={},n=0,o=e;n<o.length;n+=1){var a=o[n];this.images[a]||this.fire(new t.Event("styleimagemissing",{id:a}));var s=this.images[a];s?r[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+a+'" 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.')}i(null,r)},g.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},g.prototype.getPattern=function(e){var i=this.patterns[e],r=this.getImage(e);if(!r)return null;if(i&&i.position.version===r.version)return i.position;if(i)i.position.version=r.version;else{var n={w:r.data.width+2,h:r.data.height+2,x:0,y:0},o=new t.ImagePosition(n,r);this.patterns[e]={bin:n,position:o}}return this._updatePatternAtlas(),this.patterns[e].position},g.prototype.bind=function(e){var i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)},g.prototype._updatePatternAtlas=function(){var e=[];for(var i in this.patterns)e.push(this.patterns[i].bin);var r=t.potpack(e),n=r.w,o=r.h,a=this.atlasImage;for(var s in a.resize({width:n||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,p=this.images[s].data,h=p.width,d=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c},{width:h,height:d}),t.RGBAImage.copy(p,a,{x:0,y:d-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c+d},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:d}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u+h,y:c},{width:1,height:d})}this.dirty=!0},g.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},g.prototype.dispatchRenderCallbacks=function(t){for(var e=0,i=t;e<i.length;e+=1){var r=i[e];if(!this.callbackDispatchedThisFrame[r]){this.callbackDispatchedThisFrame[r]=!0;var n=this.images[r];a=void 0,(a=(o=n).userImage)&&a.render&&a.render()&&(o.data.replace(new Uint8Array(a.data.buffer)),1)&&this.updateImage(r,n)}}var o,a},g),d=y,f=y,m=1e20;function g(){p.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}function y(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;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(0<=navigator.userAgent.indexOf("Gecko/")?1.2:1))}function v(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(_(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(_(r,n,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(n[s])}}function _(t,e,i,r,n){r[i[0]=0]=-m,r[1]=+m;for(var o=1,a=0;o<n;
2o++){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]=+m}for(a=o=0;o<n;o++){for(;r[a+1]<o;)a++;e[o]=(o-i[a])*(o-i[a])+t[i[a]]}}function x(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}}function b(){this.specification=t.styleSpec.light.position}function w(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}y.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?m:Math.pow(Math.max(0,.5-n),2),this.gridInner[r]=1==n?m:0==n?0:Math.pow(Math.max(0,n-.5),2)}for(v(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),v(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},d.default=f,x.prototype.setURL=function(t){this.url=t},x.prototype.getGlyphs=function(e,i){var r=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1)n.push({stack:o,id:s[a]});t.asyncAll(n,(function(t,e){var i=t.stack,n=t.id,o=r.entries[i],a=(o=o||(r.entries[i]={glyphs:{},requests:{},ranges:{}})).glyphs[n];if(void 0===a){if(a=r._tinySDF(o,i,n))return o.glyphs[n]=a,void e(null,{stack:i,id:n,glyph:a});var s=Math.floor(n/256);if(65535<256*s)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:i,id:n,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],x.loadGlyphRange(i,s,r.url,r.requestManager,(function(t,e){if(e){for(var i in e)r._doesCharSupportLocalGlyph(+i)||(o.glyphs[+i]=e[+i]);o.ranges[s]=!0}for(var n=0,a=l;n<a.length;n+=1)(0,a[n])(t,e);delete o.requests[s]}))),l.push((function(t,r){t?e(t):r&&e(null,{stack:i,id:n,glyph:r[n]||null})}))}}else e(null,{stack:i,id:n,glyph:a})}),(function(t,e){if(t)i(t);else if(e){for(var r={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(r[s]||(r[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}i(null,r)}}))},x.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](e)||t.isChar["Hangul Syllables"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},x.prototype._tinySDF=function(e,i,r){var n=this.localIdeographFontFamily;if(n&&this._doesCharSupportLocalGlyph(r)){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(i)?a="900":/medium/i.test(i)?a="500":/light/i.test(i)&&(a="200"),o=e.tinySDF=new x.TinySDF(24,3,8,.25,n,a)}return{id:r,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},x.loadGlyphRange=function(e,i,r,n,o){var a=256*i,s=255+a,l=n.transformRequest(n.normalizeGlyphsURL(r).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,(function(e,i){if(e)o(e);else if(i){for(var r={},n=0,a=t.parseGlyphPBF(i);n<a.length;n+=1){var s=a[n];r[s.id]=s}o(null,r)}}))},x.TinySDF=d,b.prototype.possiblyEvaluate=function(e,i){return t.sphericalToCartesian(e.expression.evaluate(i))},b.prototype.interpolate=function(e,i,r){return{x:t.number(e.x,i.x,r),y:t.number(e.y,i.y,r),z:t.number(e.z,i.z,r)}};var S,T=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new b,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),C=((S=t.Evented)&&(I.__proto__=S),((I.prototype=Object.create(S&&S.prototype)).constructor=I).prototype.getLight=function(){return this._transitionable.serialize()},I.prototype.setLight=function(e,i){if(void 0===i&&(i={}),!this._validate(t.validateLight,e,i))for(var r in e){var n=e[r];t.endsWith(r,"-transition")?this._transitionable.setTransition(r.slice(0,-"-transition".length),n):this._transitionable.setValue(r,n)}},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(e,i,r){return(!r||!1!==r.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:i,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},I);function I(e){S.call(this),this._transitionable=new t.Transitionable(T),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}function E(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t.uniqueId();
vendor: 6,473 bytes, line 2
2for(var r=this.workerPool.acquire(this.id),n=0;n<r.length;n++){var o=new E.Actor(r[n],i,this.id);o.name="Worker "+n,this.actors.push(o)}}function M(e,i,r){function n(n,o){if(n)return r(n);if(o){var a=t.pick(t.extend(o,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(a.vectorLayers=o.vector_layers,a.vectorLayerIds=a.vectorLayers.map((function(t){return t.id}))),a.tiles=i.canonicalizeTileset(a,e.url),r(null,a)}}return e.url?t.getJSON(i.transformRequest(i.normalizeSourceURL(e.url),t.ResourceType.Source),n):t.browser.frame((function(){return n(null,e)}))}function A(e,i,r){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=i||0,this.maxzoom=r||24}w.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]},w.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:n=s*i,right:o=(s+=u)*i,isDash:a=!a,zeroLength:0===u})}return r},w.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,d=n/i*(1+r);if(s.isDash){var f=r-Math.abs(d);h=Math.sqrt(p*p+f*f)}else h=r-Math.sqrt(p*p+d*d);this.data[o+l]=Math.max(0,Math.min(255,h+128))}},w.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),h=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},w.prototype.addDash=function(e,i){var r=i?7:0,n=2*r+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];if(0!==o){var s=this.width/o,l=this.getDashRanges(e,this.width,s);i?this.addRoundDash(l,s,r):this.addRegularDash(l)}var u={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=n,this.dirty=!0,u},w.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))},E.prototype.broadcast=function(e,i,r){t.asyncAll(this.actors,(function(t,r){t.send(e,i,r)}),r=r||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=t.Actor,A.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]},A.prototype.contains=function(e){var i=Math.pow(2,e.z),r=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*i),n=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*i),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*i),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*i);return e.x>=r&&e.x<o&&e.y>=n&&e.y<a};var L,k,P,D,z,O,N,R=((N=t.Evented)&&(Q.__proto__=N),((Q.prototype=Object.create(N&&N.prototype)).constructor=Q).prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=M(this._options,this.map._requestManager,(function(i,r){e._tileJSONRequest=null,e._loaded=!0,i?e.fire(new t.ErrorEvent(i)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new A(r.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(r.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(r.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},Q.prototype.loaded=function(){return this._loaded},Q.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},Q.prototype.onAdd=function(t){this.map=t,this.load()},Q.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Q.prototype.serialize=function(){return t.extend({},this._options)},Q.prototype.loadTile=function(e,i){var r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),n={request:this.map._requestManager.transformRequest(r,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(r,n){return delete e.request,e.aborted?i(null):r&&404!==r.status?i(r):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),i(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=i:e.request=e.actor.send("reloadTile",n,o.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",n,o.bind(this)))},Q.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)},Q.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.t
2ype,source:this.id},void 0)},Q.prototype.hasTransition=function(){return!1},Q),B=((O=t.Evented)&&(J.__proto__=O),((J.prototype=Object.create(O&&O.prototype)).constructor=J).prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=M(this._options,this.map._requestManager,(function(i,r){e._tileJSONRequest=null,e._loaded=!0,i?e.fire(new t.ErrorEvent(i)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new A(r.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(r.tiles),t.postMapLoadEvent(r.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.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 t.extend({},this._options)},J.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},J.prototype.loadTile=function(e,i){var r=this,n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(n,t.ResourceType.Tile),(function(n,o){if(delete e.request,e.aborted)e.state="unloaded",i(null);else if(n)e.state="errored",i(n);else if(o){r.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=r.map.painter.context,s=a.gl;e.texture=r.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(r.dispatcher),i(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),j=(X.__proto__=z=B,((X.prototype=Object.create(z&&z.prototype)).constructor=X).prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},X.prototype.loadTile=function(e,i){var r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(r,t.ResourceType.Tile),function(r,n){if(delete e.request,e.aborted)e.state="unloaded",i(null);else if(r)e.state="errored",i(r);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.window.ImageBitmap&&n instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?n:t.browser.getImageData(n,1),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",a,function(t,r){t&&(e.state="errored",i(t)),r&&(e.dem=r,e.needsHillshadePrepare=!0,e.state="loaded",i(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},X.prototype._getNeighboringTiles=function(e){var i=e.canonical,r=Math.pow(2,i.z),n=(i.x-1+r)%r,o=0===i.x?e.wrap-1:e.wrap,a=(i.x+1+r)%r,s=i.x+1===r?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,i.z,n,i.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y).key]={backfilled:!1},0<i.y&&(l[new t.OverscaledTileID(e.overscaledZ,o,i.z,n,i.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y-1).key]={backfilled:!1}),i.y+1<r&&(l[new t.OverscaledTileID(e.overscaledZ,o,i.z,n,i.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y+1).key]={backfilled:!1}),l},X.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})}
2,X),F=((D=t.Evented)&&(K.__proto__=D),((K.prototype=Object.create(D&&D.prototype)).constructor=K).prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(i){if(i)e.fire(new t.ErrorEvent(i));else{var r={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&0<e._resourceTiming.length&&(r.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",r))}}))},K.prototype.onAdd=function(t){this.map=t,this.load()},K.prototype.setData=function(e){var i=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)i.fire(new t.ErrorEvent(e));else{var r={dataType:"source",sourceDataType:"content"};i._collectResourceTiming&&i._resourceTiming&&0<i._resourceTiming.length&&(r.resourceTiming=i._resourceTiming,i._resourceTiming=[]),i.fire(new t.Event("data",r))}})),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(e){var i=this;this._loaded=!1;var r=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(r.request=this.map._requestManager.transformRequest(t.browser.resolveURL(n),t.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(n),this.actor.send(this.type+".loadData",r,(function(t,n){i._removed||n&&n.abandoned||(i._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[i.id]&&(i._resourceTiming=n.resourceTiming[i.id].slice(0)),i.actor.send(i.type+".coalesce",{source:r.source},null),e(t))}))},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(e,i){var r=this,n=e.actor?"reloadTile":"loadTile";
2e.actor=this.actor,e.request=this.actor.send(n,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?i(null):t?i(t):(e.loadVectorData(o,r.map.painter,"reloadTile"==n),i(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 t.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K),U=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),V=((P=t.Evented)&&(Y.__proto__=P),((Y.prototype=Object.create(P&&P.prototype)).constructor=Y).prototype.load=function(e,i){var r=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(n,o){r._loaded=!0,n?r.fire(new t.ErrorEvent(n)):o&&(r.image=o,e&&(r.coordinates=e),i&&i(),r._finishLoading())}))},Y.prototype.loaded=function(){return this._loaded},Y.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},Y.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},Y.prototype.onAdd=function(t){this.map=t,this.load()},Y.prototype.setCoordinates=function(e){var i=this,r=(this.coordinates=e).map(t.MercatorCoordinate.fromLngLat);this.tileID=function(){for(var e=1/0,i=1/0,n=-1/0,o=-1/0,a=0,s=r;a<s.length;a+=1){var l=s[a];e=Math.min(e,l.x),i=Math.min(i,l.y),n=Math.max(n,l.x),o=Math.max(o,l.y)}var u=Math.max(n-e,o-i),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2)),p=Math.pow(2,c);return new t.CanonicalTileID(c,Math.floor((e+n)/2*p),Math.floor((i+o)/2*p))}(),this.minzoom=this.maxzoom=this.tileID.z;var n=r.map((function(t){return i.tileID.getTilePoint(t)._round()}));return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},Y.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,i=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,U.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},Y.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)},Y.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return!1},Y),q=(W.__proto__=k=V,((W.prototype=Object.create(k&&k.prototype)).constructor=W).prototype.load=function(){var e=this;this._loaded=!1;var i=this.options;this.urls=[];for(var r=0,n=i.urls;r<n.length;r+=1)this.urls.push(this.map._requestManager.transformRequest(n[r],t.ResourceType.Source).url);t.getVideo(this.urls,(function(i,r){e._loaded=!0,i?e.fire(new t.ErrorEvent(i)):r&&(e.video=r,e.video.loop=!0,e.video.addEventListener("playing",(function(){e.map.triggerRepaint()})),e.map&&e.video.play(),e._finishLoading())}))},W.prototype.pause=function(){this.video&&this.video.pause()},W.prototype.play=function(){this.video&&this.video.play()},W.prototype.seek=function(e){if(this.video){var i=this.video.seekable;e<i.start(0)||e>i.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+i.start(0)+" and "+i.end(0)+"-second mark."))):this.video.currentTime=e}},W.prototype.getVideo=function(){return this.video}
vendor: 10,902 bytes, line 2
2,W.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},W.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,i=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,U.members)),this.boundsSegments||(this.boundsSegments=t.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 t.Texture(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this.video&&!this.video.paused},W),G=(H.__proto__=L=V,((H.prototype=Object.create(L&&L.prototype)).constructor=H).prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.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())},H.prototype.getCanvas=function(){return this.canvas},H.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},H.prototype.onRemove=function(){this.pause()},H.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var i=this.map.painter.context,r=i.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,U.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(i,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},H.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},H.prototype.hasTransition=function(){return this._playing},H.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},H),Z={vector:R,raster:B,"raster-dem":j,geojson:F,video:q,image:V,canvas:G};function H(e,i,r,n){L.call(this,e,i,r,n),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+e,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}function W(t,e,i,r){k.call(this,t,e,i,r),this.roundZoom=!0,this.type="video",this.options=e}function Y(t,e,i,r){P.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(e,i,r,n){D.call(this),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=r.getActor(),this.setEventedParent(n),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId;var o=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*o,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*o,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,i.clusterMinPoints||2),extent:t.EXTENT,radius:(i.clusterRadius||50)*o,log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties},i.workerOptions)}function X(e,i,r,n){z.call(this,e,i,r,n),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox"}function J(e,i,r,n){O.call(this),this.id=e,this.dispatcher=r,this.setEventedParent(n),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}function Q(e,i,r,n){if(N.call(this),this.id=e,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(i,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(n)}function $(e,i,r,n,o,a){var s,l,u,c=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}(o&&o.layers,i,e.id),p=a.maxPitchScaleFactor(),h=e.tilesIn(n,p,c);h.sort(tt);for(var d=[],f=0,m=h;f<m.length;f+=1){var g=m[f];d.push({wrappedTileID:g.tileID.wrapped().key,queryResults:g.tile.queryRenderedFeatures(i,r,e._state,g.queryGeometry,g.cameraQueryGeometry,g.scale,o,a,p,(s=e.transform,l=g.tileID,u=t.identity([]),t.translate(u,u,[1,1,0]),t.scale(u,u,[.5*s.width,.5*s.height,1]),t.multiply(u,u,s.calculatePosMatrix(l.toUnwrapped()))))})}var y=function(){for(var t={},e={},i=0,r=d;i<r.length;i+=1){var n=r[i],o=n.queryResults,a=n.wrappedTileID,s=e[a]=e[a]||{};for(var l in o)for(var u=o[l],c=s[l]=s[l]||{},p=t[l]=t[l]||[],h=0,f=u;h<f.length;h+=1){var m=f[h];c[m.featureIndex]||(c[m.featureIndex]=!0,p.push(m))}}return t}();for(var v in y)y[v].forEach((function(t){var i=t.feature,r=e.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=r}));return y}function tt(t,e){var i=t.tileID,r=e.tileID;return i.overscaledZ-r.overscaledZ||i.canonical.y-r.canonical.y||i.wrap-r.wrap||i.canonical.x-r.canonical.x}function et(t,e){this.max=t,this.onRemove=e,this.reset()}function it(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}function rt(t,e,i,r){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=r;var n=(this.context=t).gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer}et.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},et.prototype.add=function(t,e,i){var r=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==i&&(o.timeout=setTimeout((function(){r.remove(t,o)}),i)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},et.prototype.has=function(t){return t.wrapped().key in this.data},et.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},et.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},et.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},et.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},et.prototype.remove=function(t,e){if(!this.has(t))return this;var i=t.wrapped().key,r=void 0===e?0:this.data[i].indexOf(e),n=this.data[i][r];return this.data[i].splice(r,1),n.timeout&&clearTimeout(n.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(n.value),this.order.splice(this.order.indexOf(i),1),this},et.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},et.prototype.filter=function(t){var e=[];for(var i in this.data)for(var r=0,n=this.data[i];r<n.length;r+=1){var o=n[r];t(o.value)||e.push(o)}for(var a=0,s=e;a<s.length;a+=1){var l=s[a];this.remove(l.value.tileID,l)}},it.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},it.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},it.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var nt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};function ot(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}function at(t,e,i,r){this.context=t,this.width=e,this.height=i;var n=this.framebuffer=t.gl.createFramebuffer();
2this.colorAttachment=new _e(t,n),r&&(this.depthAttachment=new xe(t,n))}rt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},rt.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},rt.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)}},rt.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[nt[n.type]],!1,this.itemSize,n.offset+this.itemSize*(i||0))}},rt.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)},ot.prototype.get=function(){return this.current},ot.prototype.set=function(t){},ot.prototype.getDefault=function(){return this.default},ot.prototype.setDefault=function(){this.set(this.default)};var st,lt,ut,ct,pt,ht,dt,ft,mt,gt,yt,vt,_t,xt,bt,wt,St,Tt,Ct,It,Et,Mt,At,Lt,kt,Pt,Dt,zt,Ot,Nt,Rt,Bt,jt,Ft,Ut=(ti.__proto__=Ft=ot,((ti.prototype=Object.create(Ft&&Ft.prototype)).constructor=ti).prototype.getDefault=function(){return t.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),Vt=($e.__proto__=jt=ot,(($e.prototype=Object.create(jt&&jt.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=(Qe.__proto__=Bt=ot,((Qe.prototype=Object.create(Bt&&Bt.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),Gt=(Je.__proto__=Rt=ot,((Je.prototype=Object.create(Rt&&Rt.prototype)).constructor=Je).prototype.getDefault=function(){return[!0,!0,!0,!0]},Je.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)},Je),Zt=(Xe.__proto__=Nt=ot,((Xe.prototype=Object.create(Nt&&Nt.prototype)).constructor=Xe).prototype.getDefault=function(){return!0},Xe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.depthMask(t),this.current=t,this.dirty=!1)},Xe),Ht=(Ke.__proto__=Ot=ot,((Ke.prototype=Object.create(Ot&&Ot.prototype)).constructor=Ke).prototype.getDefault=function(){return 255},Ke.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},Ke),Wt=(Ye.__proto__=zt=ot,((Ye.prototype=Object.create(zt&&zt.prototype)).constructor=Ye).prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},Ye.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)},Ye),Yt=(We.__proto__=Dt=ot,((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),Kt=(He.__proto__=Pt=ot,((He.prototype=Object.create(Pt&&Pt.prototype)).constructor=He).prototype.getDefault=function(){return!1},He.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},He),Xt=(Ze.__proto__=kt=ot,((Ze.prototype=Object.create(kt&&kt.prototype)).constructor=Ze).prototype.getDefault=function(){return[0,1]},Ze.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)},Ze),Jt=(Ge.__proto__=Lt=ot,((Ge.prototype=Object.create(Lt&&Lt.prototype)).constructor=Ge).prototype.getDefault=function(){return!1},Ge.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},Ge),Qt=(qe.__proto__=At=ot,((qe.prototype=Object.create(At&&At.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=(Ve.__proto__=Mt=ot,((Ve.prototype=Object.create(Mt&&Mt.prototype)).constructor=Ve).prototype.getDefault=function(){return!1},Ve.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},Ve),te=(Ue.__proto__=Et=ot,((Ue.prototype=Object.create(Et&&Et.prototype)).constructor=Ue).prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},Ue.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)},Ue),ee=(Fe.__proto__=It=ot,((Fe.prototype=Object.create(It&&It.prototype)).constructor=Fe).prototype.getDefault=function(){return t.Color.transparent},Fe.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
2(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},Fe),ie=(je.__proto__=Ct=ot,((je.prototype=Object.create(Ct&&Ct.prototype)).constructor=je).prototype.getDefault=function(){return this.gl.FUNC_ADD},je.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},je),re=(Be.__proto__=Tt=ot,((Be.prototype=Object.create(Tt&&Tt.prototype)).constructor=Be).prototype.getDefault=function(){return!1},Be.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},Be),ne=(Re.__proto__=St=ot,((Re.prototype=Object.create(St&&St.prototype)).constructor=Re).prototype.getDefault=function(){return this.gl.BACK},Re.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.cullFace(t),this.current=t,this.dirty=!1)},Re),oe=(Ne.__proto__=wt=ot,((Ne.prototype=Object.create(wt&&wt.prototype)).constructor=Ne).prototype.getDefault=function(){return this.gl.CCW},Ne.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.frontFace(t),this.current=t,this.dirty=!1)},Ne),ae=(Oe.__proto__=bt=ot,((Oe.prototype=Object.create(bt&&bt.prototype)).constructor=Oe).prototype.getDefault=function(){return null},Oe.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.useProgram(t),this.current=t,this.dirty=!1)},Oe),se=(ze.__proto__=xt=ot,((ze.prototype=Object.create(xt&&xt.prototype)).constructor=ze).prototype.getDefault=function(){return this.gl.TEXTURE0},ze.prototype.set=function(t){t===this.current&&!this.dirty||(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},ze),le=(De.__proto__=_t=ot,((De.prototype=Object.create(_t&&_t.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=(Pe.__proto__=vt=ot,((Pe.prototype=Object.create(vt&&vt.prototype)).constructor=Pe).prototype.getDefault=function(){return null},Pe.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},Pe),ce=(ke.__proto__=yt=ot,((ke.prototype=Object.create(yt&&yt.prototype)).constructor=ke).prototype.getDefault=function(){return null},ke.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},ke),pe=(Le.__proto__=gt=ot,((Le.prototype=Object.create(gt&>.prototype)).constructor=Le).prototype.getDefault=function(){return null},Le.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},Le),he=(Ae.__proto__=mt=ot,((Ae.prototype=Object.create(mt&&mt.prototype)).constructor=Ae).prototype.getDefault=function(){return null},Ae.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},Ae),de=(Me.__proto__=ft=ot,((Me.prototype=Object.create(ft&&ft.prototype)).constructor=Me).prototype.getDefault=function(){return null},Me.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},Me),fe=(Ee.__proto__=dt=ot,((Ee.prototype=Object.create(dt&&dt.prototype)).constructor=Ee).prototype.getDefault=function(){return null},Ee.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},Ee),me=(Ie.__proto__=ht=ot,((Ie.prototype=Object.create(ht&&ht.prototype)).constructor=Ie).prototype.getDefault=function(){return 4},Ie.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},Ie),ge=(Ce.__proto__=pt=ot,((Ce.prototype=Object.create(pt&&pt.prototype)).constructor=Ce).prototype.getDefault=function(){return!1},Ce.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},Ce),ye=(Te.__proto__=ct=ot,((Te.prototype=Object.create(ct&&ct.prototype)).constructor=Te).prototype.getDefault=function(){return!1},Te.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},Te),ve=(Se.__proto__=ut=ot,((Se.prototype=Object.create(ut&&ut.prototype)).constructor=Se).prototype.getDefault=function(){return null},Se),_e=(we.__proto__=lt=ve,((we.prototype=Object.create(lt&<.prototype)).constructor=we).prototype.setDirty=function(){this.dirty=!0},we.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},we),xe=(be.__proto__=st=ve,((be.prototype=Object.create(st&&st.prototype)).constructor=be).prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.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 Ce(){pt.apply(this,arguments)}function Ie(){ht.apply(this,arguments)}function Ee(t){dt.call(this,t),this.vao=t.extVertexArrayObject}function Me(){ft.apply(this,arguments)}function Ae(){mt.apply(this,arguments)}function Le(){gt.apply(this,arguments)}function ke(){yt.apply(this,arguments)}function Pe(){vt.apply(this,arguments)}function De(){_t.apply(this,arguments)}function ze(){xt.apply(this,arguments)}function Oe(){bt.apply(this,arguments)}function Ne(){wt.apply(this,arguments)}function Re(){St.apply(this,arguments)}function Be(){Tt.apply(this,arguments)}function je(){Ct.apply(this,arguments)}function Fe(){It.apply(this,arguments)}function Ue(){Et.apply(this,arguments)}function Ve(){Mt.apply(this,arguments)}function qe(){At.apply(this,arguments)}function Ge(){Lt.apply(this,arguments)}function Ze(){kt.apply(this,arguments)}function He(){Pt.apply(this,arguments)}function We(){Dt.apply(this,arguments)}function Ye(){zt.apply(this,arguments)}function Ke(){Ot.apply(this,arguments)}function Xe(){Nt.apply(this,arguments)}function Je(){Rt.apply(this,arguments)}function Qe(){Bt.apply(this,arguments)}function $e(){jt.apply(this,arguments)}function ti(){Ft.apply(this,arguments)}at.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var i=this.depthAttachment.get();i&&t.deleteRenderbuffer(i)}t.deleteFramebuffer(this.framebuffer)};
vendor: 21,365 bytes, line 2
2var 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],t.Color.transparent,[!1,!1,!1,!1]),ri.unblended=new ri(ri.Replace,t.Color.transparent,[!0,!0,!0,!0]),ri.alphaBlended=new ri([1,771],t.Color.transparent,[!0,!0,!0,!0]);var ni=function(t,e,i){this.enable=t,this.mode=e,this.frontFace=i};function oi(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ut(this),this.clearDepth=new Vt(this),this.clearStencil=new qt(this),this.colorMask=new Gt(this),this.depthMask=new Zt(this),this.stencilMask=new Ht(this),this.stencilFunc=new Wt(this),this.stencilOp=new Yt(this),this.stencilTest=new Kt(this),this.depthRange=new Xt(this),this.depthTest=new Jt(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 de(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new fe(this),this.pixelStoreUnpack=new me(this),this.pixelStoreUnpackPremultiplyAlpha=new ge(this),this.pixelStoreUnpackFlipY=new ye(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")}ni.disabled=new ni(!1,1029,2305),ni.backCCW=new ni(!0,1029,2305),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 it(this,t,e)},oi.prototype.createVertexBuffer=function(t,e,i){return new rt(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,n=0;e&&(n|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(n|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),r.clear(n)},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(e){t.deepEqual(e.blendFunction,ri.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},oi.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ai,si=((ai=t.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(){if(this._paused){var 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 t.values(this._tiles).map((function(t){return t.tileID})).sort(ui).map((function(t){return t.key}))},li.prototype.getRenderableIds=function(e){var i=this,r=[];for(var n in this._tiles)this._isIdRenderable(n,e)&&r.push(this._tiles[n]);return e?r.sort((function(e,r){var n=e.tileID,o=r.tileID,a=new t.Point(n.canonical.x,n.canonical.y)._rotate(i.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(i.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x})).map((function(t){return t.tileID.key})):r.map((function(t){return t.tileID})).sort(ui).map((function(t){return t.key}))},li.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.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(e,i,r,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},li.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),i=0;i<e.length;i++){var r=e[i];if(t.neighboringTiles&&t.neighboringTiles[r]){var n=this.getTileByID(r);o(t,n),o(n,t)}}function o(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),o=this._getLoadedTile(n);if(o)return o}},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,i=Math.ceil(t.height/this._source.tileSize)+1,r=Math.floor(e*i*5),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},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={};for(var r in this._tiles){var n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+e),i[n.tileID.key]=n}for(var o in this._tiles=i,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},li.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var r;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?r=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(r=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(r=r.filter((function(t){return i._source.hasTile(t)})))):r=[];var n=e.coveringZoomLevel(this._source),o=Math.max(n-li.maxOverzooming,this._source.minzoom),a=Math.max(n+li.maxUnderzooming,this._source.minzoom),s=this._updateRetainedTiles(r,n);if(ci(this._source.type)){for(var l={},u={},c=0,p=Object.keys(s);c<p.length;c+=1){var h=p[c],d=s[h],f=this._tiles[h];if(f&&!(f.fadeEndTime&&f.fadeEndTime<=t.browser.now())){var m=this.findLoadedParent(d,o);m&&(this._addTile(m.tileID),l[m.tileID.key]=m.tileID),u[h]=d}}for(var g in this._retainLoadedChildren(u,n,a,s),l)s[g]||(this._coveredTiles[g]=!0,s[g]=l[g])}for(var y in s)this._tiles[y].clearFadeHold();for(var v=0,_=t.keysDifference(this._tiles,s);v<_.length;v+=1){var x=_[v],b=this._tiles[x];b.hasSymbolBuckets&&!b.holdingForFade()?b.setHoldDuration(this.map._fadeDuration):b.hasSymbolBuckets&&!b.symbolFadeFinished()||this._removeTile(x)}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 d=h[p],f=this._tiles[d.key];if(!f.hasData()){if(e+1>this._source.maxzoom){var m=d.children(this._source.maxzoom)[0],g=this.getTile(m);if(g&&g.hasData()){i[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(i[y[0].key]&&i[y[1].key]&&i[y[2].key]&&i[y[3].key])continue}for(var v=f.wasRequested(),_=d.overscaledZ-1;n<=_;--_){var x=d.scaledTo(_);if(r[x.key])break;if(r[x.key]=!0,!(f=this.getTile(x))&&v&&(f=this._addTile(x)),f&&(i[x.key]=x,v=f.wasRequested(),f.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(e){var i=this._tiles[e.key];if(i)return i;(i=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,i)));var r=Boolean(i);return r||(i=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,this._tileLoaded.bind(this,i,e.key,i.state))),i?(i.uses++,this._tiles[e.key]=i,r||this._source.fire(new t.Event("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i):null},li.prototype._setTileReloadTimer=function(t,e){var i=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var r=e.getExpiryTimeout();r&&(this._timers[t]=setTimeout((function(){i._reloadTile(t,"expired"),delete i._timers[t]}),r))},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(e,i,r){var n=this,o=[],a=this.transform;if(!a)return o;for(var s=r?a.getCameraQueryGeometry(e):e,l=e.map((function(t){return a.pointCoordinate(t)})),u=s.map((function(t){return a.pointCoordinate(t)})),c=this.getIds(),p=1/0,h=1/0,d=-1/0,f=-1/0,m=0,g=u;m<g.length;m+=1){var y=g[m];p=Math.min(p,y.x),h=Math.min(h,y.y),d=Math.max(d,y.x),f=Math.max(f,y.y)}for(var v=function(e){var r=n._tiles[c[e]];if(!r.holdingForFade()){var s=r.tileID,m=Math.pow(2,a.zoom-r.tileID.overscaledZ),g=i*r.queryPadding*t.EXTENT/r.tileSize/m,y=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(d,f))];if(y[0].x-g<t.EXTENT&&y[0].y-g<t.EXTENT&&0<=y[1].x+g&&0<=y[1].y+g){var v=l.map((function(t){return s.getTilePoint(t)})),_=u.map((function(t){return s.getTilePoint(t)}));o.push({tile:r,tileID:s,queryGeometry:v,cameraQueryGeometry:_,scale:m})}}},_=0;_<c.length;_++)v(_);return o},li.prototype.getVisibleCoordinates=function(t){for(var e=this,i=this.getRenderableIds(t).map((function(t){return e._tiles[t].tileID})),r=0,n=i;r<n.length;r+=1){var o=n[r];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return i},li.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ci(this._source.type))for(var e in this._tiles){var i=this._tiles[e];if(void 0!==i.fadeEndTime&&i.fadeEndTime>=t.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){var r=this._tiles[t];r&&r.setDependencies(e,i)},li.prototype.reloadTilesForDependencies=function(t,e){for(var i in this._tiles)this._tiles[i].hasDependency(t,e)&&this._reloadTile(i,"reloading");this._cache.filter((function(i){return!i.hasDependency(t,e)}))},li);function li(e,i,r){var n=this;ai.call(this),this.id=e,this.dispatcher=r,this.on("data",(function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(n._sourceLoaded=!0),n._sourceLoaded&&!n._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(n.reload(),n.transform&&n.update(n.transform))})),this.on("error",(function(){n._sourceErrored=!0})),this._source=function(e,r,n){var o=new Z[i.type](e,i,r,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o}(e,r,this),this._tiles={},this._cache=new et(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.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 t.window.Worker(Da.workerUrl)}si.maxOverzooming=10,si.maxUnderzooming=3;var hi="mapboxgl_preloaded_worker_pool",di=function(){this.active={}};di.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<di.workerCount;)this.workers.push(new pi);return this.active[t]=!0,this.workers.slice()},di.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)},di.prototype.isPreloaded=function(){return!!this.active[hi]},di.prototype.numActive=function(){return Object.keys(this.active).length};var fi,mi=Math.floor(t.browser.hardwareConcurrency/2);function gi(){return fi=fi||new di}function yi(e,i){var r={};for(var n in e)"ref"!==n&&(r[n]=e[n]);return t.refProperties.forEach((function(t){t in i&&(r[t]=i[t])})),r}function vi(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]=yi(t[r],e[t[r].ref]));return t}di.workerCount=Math.max(Math.min(mi,6),1);var _i={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 xi(t,e,i){i.push({command:_i.addSource,args:[t,e[t]]})}function bi(t,e,i){e.push({command:_i.removeSource,args:[t]}),i[t]=!0}function wi(e,i,r){var n;for(n in e[r])if(e[r].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[r][n],i[r][n]))return;for(n in i[r])if(i[r].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[r][n],i[r][n]))return;return 1}function Si(e,i,r,n,o,a){var s;for(s in i=i||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],i[s])||r.push({command:a,args:[n,s,i[s],o]}));for(s in i)i.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],i[s])||r.push({command:a,args:[n,s,i[s],o]}))}function Ti(t){return t.id}function Ci(t,e){return t[e.id]=e,t}function Ii(t,e){this.reset(t,e)}function Ei(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 Mi(e,i,r,n,o){var a=t.create();return i?(t.scale(a,a,[1/o,1/o,1]),r||t.rotateZ(a,a,n.angle)):t.multiply(a,n.labelPlaneMatr
2ix,e),a}function Ai(e,i,r,n,o){if(i){var a=t.clone(e);return t.scale(a,a,[o,o,1]),r||t.rotateZ(a,a,-n.angle),a}return n.glCoordMatrix}function Li(e,i){var r=[e.x,e.y,0,1];Fi(r,r,i);var n=r[3];return{point:new t.Point(r[0]/n,r[1]/n),signedDistanceFromCamera:n}}function ki(t,e){return.5+t/e*.5}function Pi(e,i,r,n,o,a,s,l){var u,c,p,h,d=n?e.textSizeData:e.iconSizeData,f=t.evaluateSizeForZoom(d,r.transform.zoom),m=[256/r.width*2+1,256/r.height*2+1],g=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;g.clear();for(var y=e.lineVertexArray,v=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,_=r.transform.width/r.transform.height,x=!1,b=0;b<v.length;b++){var w=v.get(b);if(w.hidden||w.writingMode===t.WritingMode.vertical&&!x)ji(w.numGlyphs,g);else{x=!1;var S=[w.anchorX,w.anchorY,0,1];if(t.transformMat4(S,S,i),p=(u=S)[0]/u[3],h=u[1]/u[3],p>=-(c=m)[0]&&p<=c[0]&&h>=-c[1]&&h<=c[1]){var T=ki(r.transform.cameraToCenterDistance,S[3]),C=t.evaluateSizeForFeature(d,f,w),I=s?C/T:C*T,E=new t.Point(w.anchorX,w.anchorY),M=Li(E,o).point,A={},L=Oi(w,I,!1,l,i,o,a,e.glyphOffsetArray,y,g,M,E,A,_);x=L.useVertical,(L.notEnoughRoom||x||L.needsFlipping&&Oi(w,I,!0,l,i,o,a,e.glyphOffsetArray,y,g,M,E,A,_).notEnoughRoom)&&ji(w.numGlyphs,g)}else ji(w.numGlyphs,g)}}n?e.text.dynamicLayoutVertexBuffer.updateData(g):e.icon.dynamicLayoutVertexBuffer.updateData(g)}function Di(t,e,i,r,n,o,a,s,l,u,c){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,f=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(p-1),g=Ri(t*f,i,r,n,o,a,s.segment,h,d,l,u,c);if(!g)return null;var y=Ri(t*m,i,r,n,o,a,s.segment,h,d,l,u,c);return y?{first:g,last:y}:null}function zi(e,i,r,n){return e===t.WritingMode.horizontal&&Math.abs(r.y-i.y)>Math.abs(r.x-i.x)*n?{useVertical:!0}:(e===t.WritingMode.vertical?i.y<r.y:i.x>r.x)?{needsFlipping:!0}:null}function Oi(e,i,r,n,o,a,s,l,u,c,p,h,d,f){var m,g=i/24,y=e.lineOffsetX*g,v=e.lineOffsetY*g;if(1<e.numGlyphs){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Di(g,l,y,v,r,p,h,e,u,a,d);if(!w)return{notEnoughRoom:!0};var S=Li(w.first.point,s).point,T=Li(w.last.point,s).point;if(n&&!r){var C=zi(e.writingMode,S,T,f);if(C)return C}m=[w.first];for(var I=e.glyphStartIndex+1;I<_-1;I++)m.push(Ri(g*l.getoffsetX(I),y,v,r,p,h,e.segment,x,b,u,a,d));m.push(w.last)}else{if(n&&!r){var E=Li(h,o).point,M=e.lineStartIndex+e.segment+1,A=new t.Point(u.getx(M),u.gety(M)),L=Li(A,o),k=0<L.signedDistanceFromCamera?L.point:Ni(h,A,E,1,o),P=zi(e.writingMode,E,k,f);if(P)return P}var D=Ri(g*l.getoffsetX(e.glyphStartIndex),y,v,r,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,d);if(!D)return{notEnoughRoom:!0};m=[D]}for(var z=0,O=m;z<O.length;z+=1){var N=O[z];t.addDynamicAttributes(c,N.point,N.angle)}return{}}function Ni(t,e,i,r,n){var o=Li(t.add(t.sub(e)._unit()),n).point,a=i.sub(o);return i.add(a._mult(r/a.mag()))}function Ri(e,i,r,n,o,a,s,l,u,c,p,h){var d=n?e-i:e+i,f=0<d?1:-1,m=0;n&&(f*=-1,m=Math.PI),f<0&&(m+=Math.PI);for(var g=0<f?l+s:l+s+1,y=o,v=o,_=0,x=0,b=Math.abs(d),w=[];_+x<=b;){if((g+=f)<l||u<=g)return null;if(v=y,w.push(y),void 0===(y=h[g])){var S=new t.Point(c.getx(g),c.gety(g)),T=Li(S,p);if(0<T.signedDistanceFromCamera)y=h[g]=T.point;else{var C=g-f;y=Ni(0===_?a:new t.Point(c.getx(C),c.gety(C)),S,v,b-_+1,p)}}_+=x,x=v.dist(y)}var I=(b-_)/x,E=y.sub(v),M=E.mult(I)._add(v);M._add(E._unit()._perp()._mult(r*f));var A=m+Math.atan2(y.y-v.y,y.x-v.x);return w.push(M),{point:M,angle:A,path:w}}Ii.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},Ii.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var i=1,r=this._distances[i],n=e*this.paddedLength+this.padding;r<n&&i<this._distances.length;)r=this._distances[++i];var o=i-1,a=this._distances[o],s=r-a,l=0<s?(n-a)/s:0;return this.points[o].mult(1-l).add(this.points[i].mult(l))},Ei.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length}
vendor: 1,418 bytes, line 2
2,Ei.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)},Ei.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)},Ei.prototype._insertBoxCell=function(t,e,i,r,n,o){this.boxCells[n].push(o)},Ei.prototype._insertCircleCell=function(t,e,i,r,n,o){this.circleCells[n].push(o)},Ei.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},Ei.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
2s:i},seenUids:{box:{},circle:{}}},n),r?0<u.length:u},Ei.prototype.query=function(t,e,i,r,n){return this._query(t,e,i,r,!1,n)},Ei.prototype.hitTest=function(t,e,i,r,n){return this._query(t,e,i,r,!0,n)},Ei.prototype.hitTestCircle=function(t,e,i,r){return this._queryCircle(t,e,i,!0,r)},Ei.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 d=h[p];if(!l.box[d]){l.box[d]=!0;var f=4*d;if(t<=c[2+f]&&e<=c[3+f]&&i>=c[0+f]&&r>=c[1+f]&&(!s||s(this.boxKeys[d]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[d],x1:c[f],y1:c[1+f],x2:c[2+f],y2:c[3+f]})}}}var m=this.circleCells[n];if(null!==m)for(var g=this.circles,y=0,v=m;y<v.length;y+=1){var _=v[y];if(!l.circle[_]){l.circle[_]=!0;var x=3*_;if(this._circleAndRectCollide(g[x],g[1+x],g[2+x],t,e,i,r)&&(!s||s(this.circleKeys[_]))){if(a.hitTest)return o.push(!0),!0;var b=g[x],w=g[1+x],S=g[2+x];o.push({key:this.circleKeys[_],x1:b-S,y1:w-S,x2:b+S,y2:w+S})}}}},Ei.prototype._queryCellCircle=function(t,e,i,r,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c)for(var p=this.bboxes,h=0,d=c;h<d.length;h+=1){var f=d[h];if(!u.box[f]){u.box[f]=!0;var m=4*f;if(this._circleAndRectCollide(l.x,l.y,l.radius,p[0+m],p[1+m],p[2+m],p[3+m])&&(!s||s(this.boxKeys[f])))return o.push(!0),!0}}var g=this.circleCells[n];if(null!==g)for(var y=this.circles,v=0,_=g;v<_.length;v+=1){var x=_[v];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(y[b],y[1+b],y[2+b],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Ei.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 d=u;d<=p;d++)if(n.call(this,t,e,i,r,this.xCellCount*d+h,o,a,s))return},Ei.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Ei.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Ei.prototype._circlesCollide=function(t,e,i,r,n,o){var a=r-t,s=n-e,l=i+o;return a*a+s*s<l*l},Ei.prototype._circleAndRectCollide=function(t,e,i,r,n,o,a){var s=(o-r)/2,l=Math.abs(t-(r+s));if(s+i<l)return!1;var u=(a-n)/2,c=Math.abs(e-(n+u));if(u+i<c)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=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 ji(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],n=e[1];return t[0]=i[0]*r+i[4]*n+i[12],t[1]=i[1]*r+i[5]*n+i[13],t[3]=i[3]*r+i[7]*n+i[15],t}
vendor: 11,240 bytes, line 2
2function Ui(t,e,i){void 0===e&&(e=new Ei(t.width+200,t.height+200,25)),void 0===i&&(i=new Ei(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}function Vi(e,i,r){return i*(t.EXTENT/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function qi(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}function Gi(t,e,i,r,n){this.text=new qi(t?t.text:null,e,i,n),this.icon=new qi(t?t.icon:null,e,r,n)}function Zi(t,e,i){this.text=t,this.icon=e,this.skipFade=i}function Hi(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]}function Wi(t,e,i,r,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=i,this.bucketIndex=r,this.tileID=n}function Yi(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}function Ki(e,i,r,n,o){var a=t.getAnchorAlignment(e),s=-(a.horizontalAlign-.5)*i,l=-(a.verticalAlign-.5)*r,u=t.evaluateVariableOffset(e,n);return new t.Point(s+u[0]*o,l+u[1]*o)}function Xi(e,i,r,n,o,a){var s=e.x1,l=e.x2,u=e.y1,c=e.y2,p=e.anchorPointX,h=e.anchorPointY,d=new t.Point(i,r);return n&&d._rotate(o?a:-a),{x1:s+d.x,y1:u+d.y,x2:l+d.x,y2:c+d.y,anchorPointX:p,anchorPointY:h}}function Ji(t,e,i,r){this.transform=t.clone(),this.collisionIndex=new Ui(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new Yi(i),this.collisionCircleArrays={},(this.prevPlacement=r)&&(r.prevPlacement=void 0),this.placedOrientations={}}function Qi(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)}Ui.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,l=t.y1*a+o.point.y,u=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,n)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},Ui.prototype.placeCollisionCircles=function(e,i,r,n,o,a,s,l,u,c,p,h,d){var f=[],m=new t.Point(i.anchorX,i.anchorY),g=Li(m,a),y=ki(this.transform.cameraToCenterDistance,g.signedDistanceFromCamera),v=(c?o/y:o*y)/t.ONE_EM,_=Li(m,s).point,x=Di(v,n,i.lineOffsetX*v,i.lineOffsetY*v,!1,_,m,i,r,s,{}),b=!1,w=!1,S=!0;if(x){for(var T=.5*h*y+d,C=new t.Point(-100,-100),I=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),E=new Ii,M=x.first,A=x.last,L=[],k=M.path.length-1;1<=k;k--)L.push(M.path[k]);for(var P=1;P<A.path.length;P++)L.push(A.path[P]);var D=2.5*T;if(l){var z=L.map((function(t){return Li(t,l)}));L=z.some((function(t){return t.signedDistanceFromCamera<=0}))?[]:z.map((function(t){return t.point}))}var O=[];if(0<L.length){for(var N=L[0].clone(),R=L[0].clone(),B=1;B<L.length;B++)N.x=Math.min(N.x,L[B].x),N.y=Math.min(N.y,L[B].y),R.x=Math.max(R.x,L[B].x),R.y=Math.max(R.y,L[B].y);O=N.x>=C.x&&R.x<=I.x&&N.y>=C.y&&R.y<=I.y?[L]:R.x<C.x||N.x>I.x||R.y<C.y||N.y>I.y?[]:t.clipLine([L],C.x,C.y,I.x,I.y)}for(var j=0,F=O;j<F.length;j+=1){var U;E.reset(F[j],.25*T),U=E.length<=.5*T?1:Math.ceil(E.paddedLength/D)+1;for(var V=0;V<U;V++){var q=V/Math.max(U-1,1),G=E.lerp(q),Z=G.x+100,H=G.y+100;f.push(Z,H,T,0);var W=Z-T,Y=H-T,K=Z+T,X=H+T;if(S=S&&this.isOffscreen(W,Y,K,X),w=w||this.isInsideGrid(W,Y,K,X),!e&&this.grid.hitTestCircle(Z,H,T,p)&&(b=!0,!u))return{circles:[],offscreen:!1,collisionDetected:b}}}}return{circles:!u&&b||!w?[]:f,offscreen:S,collisionDetected:b}},Ui.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var i=[],r=1/0,n=1/0,o=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+100,u.y+100);r=Math.min(r,c.x),n=Math.min(n,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),i.push(c)}for(var p={},h={},d=0,f=this.grid.query(r,n,o,a).concat(this.ignoredGrid.query(r,n,o,a));d<f.length;d+=1){var m=f[d],g=m.key;if(void 0===p[g.bucketInstanceId]&&(p[g.bucketInstanceId]={}),!p[g.bucketInstanceId][g.featureIndex]){var y=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(i,y)&&(p[g.bucketInstanceId][g.featureIndex]=!0,void 0===h[g.bucketInstanceId]&&(h[g.bucketInstanceId]=[]),h[g.bucketInstanceId].push(g.featureIndex))}}return h},Ui.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])},Ui.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])},Ui.prototype.projectAndGetPerspectiveRatio=function(e,i,r){var n=[i,r,0,1];return Fi(n,n,e),{point:new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},Ui.prototype.isOffscreen=function(t,e,i,r){return i<100||t>=this.screenRightBoundary||r<100||e>this.screenBottomBoundary},Ui.prototype.isInsideGrid=function(t,e,i,r){return 0<=i&&t<this.gridRightBoundary&&0<=r&&e<this.gridBottomBoundary},Ui.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e},qi.prototype.isHidden=function(){return 0===this.opacity&&!this.placed},Gi.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()},Yi.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]},Ji.prototype.getBucketParts=function(e,i,r,n){var o=r.getBucket(i),a=r.latestFeatureIndex;if(o&&a&&i.id===o.layerIds[0]){var s=r.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h="map"===l.get("text-pitch-alignment"),d="map"===l.get("text-rotation-alignment"),f=Vi(r,1,this.transform.zoom),m=Mi(p,h,d,this.transform,f),g=null;if(h){var y=Ai(p,h,d,this.transform,f);g=t.multiply([],this.transform.labelPlaneMatrix,y)}this.retainedQueryData[o.bucketInstanceId]=new Wi(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);var v={bucket:o,layout:l,posMatrix:p,textLabelPlaneMatrix:m,labelToScreenMatrix:g,scale:u,textPixelRatio:c,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(n)for(var _=0,x=o.sortKeyRanges;_<x.length;_+=1){var b=x[_];e.push({sortKey:b.sortKey,symbolInstanceStart:b.symbolInstanceStart,symbolInstanceEnd:b.symbolInstanceEnd,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:v})}},Ji.prototype.attemptAnchorPlacement=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f){var m,g=[p.textOffset0,p.textOffset1],y=Ki(t,i,r,g,n),v=this.collisionIndex.placeCollisionBox(Xi(e,y.x,y.y,o,a,this.transform.angle),c,s,l,u.predicate);if(!f||0!==this.collisionIndex.placeCollisionBox(Xi(f,y.x,y.y,o,a,this.transform.angle),c,s,l,u.predicate).box.length)return 0<v.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:g,width:i,height:r,anchor:t,textBoxScale:n,prevAnchor:m},this.markUsedJustification(h,t,p,d),h.allowVerticalPlacement&&(this.markUsedOrientation(h,d,p),this.placedOrientations[p.crossTileID]=d),{shift:y,placedGlyphBoxes:v}):void 0},Ji.prototype.placeLayerBucketPart=function(e,i,r){var n=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,d=o.collisionBoxArray,f=o.partiallyEvaluatedTextSize,m=o.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),v=s.get("text-allow-overlap"),_=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),S="viewport-y"===s.get("symbol-z-order"),T=v&&(_||!a.hasIconData()||y),C=_&&(v||!a.hasTextData()||g);function I(e,o){if(!i[e.crossTileID])if(h)n.placements[e.crossTileID]=new Zi(!1,!1,!1);else{var d,S=!1,I=!1,E=!0,M=null,A={box:null,offscreen:null},L={box:null,offscreen:null},k=null,P=null,D=0,z=0,O=0;o.textFeatureIndex?D=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(D=e.featureIndex),o.verticalTextFeatureIndex&&(z=o.verticalTextFeatureIndex);var N=o.textBox;if(N){var R=function(i){var r=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!i&&n.prevPlacement){var o=n.prevPlacement.placedOrientations[e.crossTileID];o&&(n.placedOrientations[e.crossTileID]=o,n.markUsedOrientation(a,r=o,e))}return r},B=function(i,r){if(a.allowVerticalPlacement&&0<e.numVerticalGlyphVertices&&o.verticalTextBox)for(var n=0,s=a.writingModes;n<s.length&&(s[n]===t.WritingMode.vertical?(A=r(),L=A):A=i(),!(A&&A.box&&A.box.length));n+=1);else A=i()};if(s.get("text-variable-anchor")){var j=s.get("text-variable-anchor");if(n.prevPlacement&&n.prevPlacement.variableOffsets[e.crossTileID]){var F=n.prevPlacement.variableOffsets[e.crossTileID];0<j.indexOf(F.anchor)&&(j=j.filter((function(t){return t!==F.anchor}))).unshift(F.anchor)}var U=function(t,i,r){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!_?i:null,h={box:[],offscreen:!1},d=v?2*j.length:j.length,f=0;f<d;++f){var g=n.attemptAnchorPlacement(j[f%j.length],t,o,s,u,x,b,p,l,m,f>=j.length,e,a,r,c);if(g&&(h=g.placedGlyphBoxes)&&h.box&&h.box.length){S=!0,M=g.shift;break}}return h};B((function(){return U(N,o.iconBox,t.WritingMode.horizontal)}),(function(){var i=o.verticalTextBox;return a.allowVerticalPlacement&&!(A&&A.box&&A.box.length)&&0<e.numVerticalGlyphVertices&&i?U(i,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),A&&(S=A.box,E=A.offscreen);var V=R(A&&A.box);if(!S&&n.prevPlacement){var q=n.prevPlacement.variableOffsets[e.crossTileID];q&&(n.variableOffsets[e.crossTileID]=q,n.markUsedJustification(a,q.anchor,e,V))}}else{var G=function(t,i){var r=n.collisionIndex.placeCollisionBox(t,v,p,l,m.predicate);return r&&r.box&&r.box.length&&(n.markUsedOrientation(a,i,e),n.placedOrientations[e.crossTileID]=i),r};B((function(){return G(N,t.WritingMode.horizontal)}),(function(){var i=o.verticalTextBox;return a.allowVerticalPlacement&&0<e.numVerticalGlyphVertices&&i?G(i,t.WritingMode.vertical):{box:null,offscreen:null}})),R(A&&A.box&&A.box.length)}}if(S=(d=A)&&d.box&&0<d.box.length,E=d&&d.offscreen,e.useRuntimeCollisionCircles){var Z=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),H=t.evaluateSizeForFeature
2(a.textSizeData,f,Z),W=s.get("text-padding");k=n.collisionIndex.placeCollisionCircles(v,Z,a.lineVertexArray,a.glyphOffsetArray,H,l,u,c,r,b,m.predicate,e.collisionCircleDiameter,W),S=v||0<k.circles.length&&!k.collisionDetected,E=E&&k.offscreen}if(o.iconFeatureIndex&&(O=o.iconFeatureIndex),o.iconBox){var Y=function(t){var e=w&&M?Xi(t,M.x,M.y,x,b,n.transform.angle):t;return n.collisionIndex.placeCollisionBox(e,_,p,l,m.predicate)};I=L&&L.box&&L.box.length&&o.verticalIconBox?0<(P=Y(o.verticalIconBox)).box.length:0<(P=Y(o.iconBox)).box.length,E=E&&P.offscreen}var K=g||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,X=y||0===e.numIconVertices;if(K||X?X?K||(I=I&&S):S=I&&S:I=S=I&&S,S&&d&&d.box&&n.collisionIndex.insertCollisionBox(d.box,s.get("text-ignore-placement"),a.bucketInstanceId,L&&L.box&&z?z:D,m.ID),I&&P&&n.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),a.bucketInstanceId,O,m.ID),k&&(S&&n.collisionIndex.insertCollisionCircles(k.circles,s.get("text-ignore-placement"),a.bucketInstanceId,D,m.ID),r)){var J=a.bucketInstanceId,Q=n.collisionCircleArrays[J];void 0===Q&&(Q=n.collisionCircleArrays[J]=new Hi);for(var $=0;$<k.circles.length;$+=4)Q.circles.push(k.circles[$+0]),Q.circles.push(k.circles[$+1]),Q.circles.push(k.circles[$+2]),Q.circles.push(k.collisionDetected?1:0)}n.placements[e.crossTileID]=new Zi(S||T,I||C,E||a.justReloaded),i[e.crossTileID]=!0}}if(!a.collisionArrays&&d&&a.deserializeCollisionBoxes(d),S)for(var E=a.getSortedSymbolIndexes(this.transform.angle),M=E.length-1;0<=M;--M){var A=E[M];I(a.symbolInstances.get(A),a.collisionArrays[A])}else for(var L=e.symbolInstanceStart;L<e.symbolInstanceEnd;L++)I(a.symbolInstances.get(L),a.collisionArrays[L]);if(r&&a.bucketInstanceId in this.collisionCircleArrays){var k=this.collisionCircleArrays[a.bucketInstanceId];t.invert(k.invProjMatrix,l),k.viewportMatrix=this.collisionIndex.getViewportMatrix()}a.justReloaded=!1},Ji.prototype.markUsedJustification=function(e,i,r,n){var o;o=n===t.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:{left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(i)];for(var a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];a<s.length;a+=1){var l=s[a];0<=l&&(e.text.placedSymbolArray.get(l).crossTileID=0<=o&&l!==o?0:r.crossTileID)}},Ji.prototype.markUsedOrientation=function(e,i,r){for(var n=i===t.WritingMode.horizontal||i===t.WritingMode.horizontalOnly?i:0,o=i===t.WritingMode.vertical?i:0,a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];a<s.length;a+=1)e.text.placedSymbolArray.get(s[a]).placedOrientation=n;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)},Ji.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=e?e.symbolFadeChange(t):1,n=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],u=n[s];i=u?(this.opacities[s]=new Gi(u,r,l.text,l.icon),i||l.text!==u.text.placed||l.icon!==u.icon.placed):(this.opacities[s]=new Gi(null,r,l.text,l.icon,l.skipFade),i||l.text||l.icon)}for(var c in n){var p=n[c];if(!this.opacities[c]){var h=new Gi(p,r,!1,!1);h.isHidden()||(this.opacities[c]=h,i=i||p.text.placed||p.icon.placed)}}for(var d in o)this.variableOffsets[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.variableOffsets[d]=o[d]);for(var f in a)this.placedOrientations[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.placedOrientations[f]=a[f]);i?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},Ji.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)}},Ji.prototype.updateBucketOpacities=function(e,i,r){var n=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();
vendor: 21,706 bytes, line 2
2var o=e.layers[0].layout,a=new Gi(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),u=o.get("text-variable-anchor"),c="map"===o.get("text-rotation-alignment"),p="map"===o.get("text-pitch-alignment"),h="none"!==o.get("icon-text-fit"),d=new Gi(null,0,s&&(l||!e.hasIconData()||o.get("icon-optional")),l&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);for(var f=function(t,e,i){for(var r=0;r<e/4;r++)t.opacityVertexArray.emplaceBack(i)},m=function(r){var o=e.symbolInstances.get(r),s=o.numHorizontalGlyphVertices,l=o.numVerticalGlyphVertices,m=o.crossTileID,g=n.opacities[m];i[m]?g=a:g||(n.opacities[m]=g=d),i[m]=!0;var y=0<o.numIconVertices,v=n.placedOrientations[o.crossTileID],_=v===t.WritingMode.vertical,x=v===t.WritingMode.horizontal||v===t.WritingMode.horizontalOnly;if(0<s||0<l){var b=ar(g.text);f(e.text,s,_?lr:b),f(e.text,l,x?lr:b);var w=g.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(t){0<=t&&(e.text.placedSymbolArray.get(t).hidden=w||_?1:0)})),0<=o.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||x?1:0);var S=n.variableOffsets[o.crossTileID];S&&n.markUsedJustification(e,S.anchor,o,v);var T=n.placedOrientations[o.crossTileID];T&&(n.markUsedJustification(e,"left",o,T),n.markUsedOrientation(e,T,o))}if(y){var C=ar(g.icon),I=!(h&&o.verticalPlacedIconSymbolIndex&&_);0<=o.placedIconSymbolIndex&&(f(e.icon,o.numIconVertices,I?C:lr),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=g.icon.isHidden()),0<=o.verticalPlacedIconSymbolIndex&&(f(e.icon,o.numVerticalIconVertices,I?lr:C),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var E=e.collisionArrays[r];if(E){var M=new t.Point(0,0);if(E.textBox||E.verticalTextBox){var A=!0;if(u){var L=n.variableOffsets[m];L?(M=Ki(L.anchor,L.width,L.height,L.textOffset,L.textBoxScale),c&&M._rotate(p?n.transform.angle:-n.transform.angle)):A=!1}E.textBox&&Qi(e.textCollisionBox.collisionVertexArray,g.text.placed,!A||_,M.x,M.y),E.verticalTextBox&&Qi(e.textCollisionBox.collisionVertexArray,g.text.placed,!A||x,M.x,M.y)}var k=Boolean(!x&&E.verticalIconBox);E.iconBox&&Qi(e.iconCollisionBox.collisionVertexArray,g.icon.placed,k,h?M.x:0,h?M.y:0),E.verticalIconBox&&Qi(e.iconCollisionBox.collisionVertexArray,g.icon.placed,!k,h?M.x:0,h?M.y:0)}}},g=0;g<e.symbolInstances.length;g++)m(g);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var y=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=y.invProjMatrix,e.placementViewportMatrix=y.viewportMatrix,e.collisionCircleArray=y.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},Ji.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Ji.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},Ji.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},Ji.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},Ji.prototype.setStale=function(){this.stale=!0};var $i=Math.pow(2,25),tr=Math.pow(2,24),er=Math.pow(2,17),ir=Math.pow(2,16),rr=Math.pow(2,9),nr=Math.pow(2,8),or=Math.pow(2,1);function ar(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,i=Math.floor(127*t.opacity);return i*$i+e*tr+i*er+e*ir+i*rr+e*nr+i*or+e}function sr(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 lr=0;function ur(t,e,i,r,n,o,a){this.placement=new Ji(t,n,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=r,this._done=!1}function cr(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;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}}sr.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},ur.prototype.isDone=function(){return this._done},ur.prototype.continuePlacement=function(e,i,r){for(var n=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!n._forceFullPlacement&&2<e};0<=this._currentPlacementIndex;){var s=i[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new sr(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ur.prototype.commit=function(t){return this.placement.commit(t),this.placement};var pr=512/t.EXTENT/2;function hr(){this.maxCrossTileID=0}function dr(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}function fr(){this.layerIndexes={},this.crossTileIDs=new hr,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}function mr(e,i){return t.emitValidationErrors(e,i&&i.filter((function(t){return"source.canvas"!==t.identifier})))}cr.prototype.getScaledCoordinates=function(e,i){var r=pr/Math.pow(2,i.canonical.z-this.tileID.canonical.z);return{x:Math.floor((i.canonical.x*t.EXTENT+e.anchorX)*r),y:Math.floor((i.canonical.y*t.EXTENT+e.anchorY)*r)}},cr.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}}}}},hr.prototype.generate=function(){return++this.maxCrossTileID},dr.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var i in this.indexes){var r=this.indexes[i],n={};for(var o in r){var a=r[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[i]=n}this.lng=t},dr.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=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,n)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,n)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=i.generate(),n[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new cr(t,e.symbolInstances,e.bucketInstanceId),!0},dr.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]},dr.prototype.removeStaleBuckets=function(t){var e=!1;for(var i in this.indexes){var r=this.indexes[i];for(var n in r)t[r[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,r[n]),delete r[n],e=!0)}return e},fr.prototype.addLayer=function(t,e,i){var r=this.layerIndexes[t.id];void 0===r&&(r=this.layerIndexes[t.id]=new dr);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},fr.prototype.pruneUnusedLayers=function(t){var e={};for(var i in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[i]||delete this.layerIndexes[i]};var gr,yr=t.pick(_i,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),vr=t.pick(_i,["setCenter","setZoom","setBearing","setPitch"]),_r=function(){var e={},i=t.styleSpec.$version;for(var r in t.styleSpec.$root){var n,o=t.styleSpec.$root[r];o.required&&null!=(n="version"===r?i:"array"===o.type?[]:{})&&(e[r]=n)}return e}(),xr=((gr=t.Evented)&&(br.__proto__=gr),((br.prototype=Object.create(gr&&gr.prototype)).constructor=br).prototype.loadURL=function(e,i){var r=this;void 0===i&&(i={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof i.validate?i.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,i.accessToken);var o=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,(function(e,i){r._request=null,e?r.fire(new t.ErrorEvent(e)):i&&r._load(i,n)}))},br.prototype.loadJSON=function(e,i){var r=this;void 0===i&&(i={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame((function(){r._request=null,r._load(e,!1!==i.validate)}))},br.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(_r,!1)},br.prototype._load=function(e,i){if(!i||!mr(this,t.validateStyle(e))){for(var r in this._loaded=!0,(this.stylesheet=e).sources)this.addSource(r,e.sources[r],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var n=vi(this.stylesheet.layers);this._order=n.map((function(t){return t.id})),this._layers={},this._serializedLayers={};for(var o=0,a=n;o<a.length;o+=1){var s=a[o];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new C(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},br.prototype._loadSprite=function(e){var i,r,n,o,a,s,l,u,c,p=this;function h(){if(s)n(s);else if(o&&a){var e=t.browser.getImageData(a),i={};for(var r in o){var l=o[r],u=l.width,c=l.height,p=l.x,h=l.y,d=l.sdf,f=l.pixelRatio,m=l.stretchX,g=l.stretchY,y=l.content,v=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,v,{x:p,y:h},{x:0,y:0},{width:u,height:c}),i[r]={data:v,pixelRatio:f,sdf:d,stretchX:m,stretchY:g,content:y}}n(null,i)}}this._spriteRequest=(i=e,r=this.map._requestManager,n=function(e,i){if(p._spriteRequest=null,e)p.fire(new t.ErrorEvent(e));else if(i)for(var r in i)p.imageManager.addImage(r,i[r]);p.imageManager.setLoaded(!0),p._availableImages=p.imageManager.listImages(),p.dispatcher.broadcast("setImages",p._availableImages),p.fire(new t.Event("data",{dataType:"style"}))},l=1<t.browser.devicePixelRatio?"@2x":"",u=t.getJSON(r.transformRequest(r.normalizeSpriteURL(i,l,".json"),t.ResourceType.SpriteJSON),(function(t,e){u=null,s||(s=t,o=e,h())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(i,l,".png"),t.ResourceType.SpriteImage),(function(t,e){c=null,s||(s=t,a=e,h())})),{cancel:function(){u&&(u.cancel(),u=null),c&&(c.cancel(),c=null)}})},br.prototype._validateLayer=function(e){var i=this.sourceCaches[e.source];if(i){var r=e.sourceLayer;if(r){var n=i.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},br.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()},br.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},br.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},br.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},br.prototype.update=function(e){if(this._loaded){var i=this._changed;if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(r.length||n.length)&&this._updateWorkerLayers(r,n),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];p.recalculate(e,this._availableImages),!p.isHidden(e.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,i&&this.fire(new t.Event("data",{dataType:"style"}))}},br.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={}}},br.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},br.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},br.prototype.setState=function(e){var i=this;if(this._checkLoaded(),mr(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=vi(e.layers);var r=function(e,i){if(!e)return[{command:_i.setStyle,args:[i]}];var r=[];try{if(!t.deepEqual(e.version,i.version))return[{command:_i.setStyle,args:[i]}];t.deepEqual(e.center,i.center)||r.push({command:_i.setCenter,args:[i.center]}),t.deepEqual(e.zoom,i.zoom)||r.push({command:_i.setZoom,args:[i.zoom]}),t.deepEqual(e.bearing,i.bearing)||r.push({command:_i.setBearing,args:[i.bearing]}),t.deepEqual(e.pitch,i.pitch)||r.push({command:_i.setPitch,args:[i.pitch]}),t.deepEqual(e.sprite,i.sprite)||r.push({command:_i.setSprite,args:[i.sprite]}),t.deepEqual(e.glyphs,i.glyphs)||r.push({command:_i.setGlyphs,args:[i.glyphs]}),t.deepEqual(e.transition,i.transition)||r.push({command:_i.setTransition,args:[i.transition]}),t.deepEqual(e.light,i.light)||r.push({command:_i.setLight,args:[i.light]});var n={},o=[];!function(e,i,r,n){var o,a,s,l;for(o in i=i||{},e=e||{})e.hasOwnProperty(o)&&(i.hasOwnProperty(o)||bi(o,r,n));for(o in i)i.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.deepEqual(e[o],i[o])||("geojson"===e[o].type&&"geojson"===i[o].type&&wi(e,i,o)?r.push({command:_i.setGeoJSONSourceData,args:[o,i[o].data]}):(s=i,bi(a=o,l=r,n),xi(a,s,l))):xi(o,i,r))}(e.sources,i.sources,o,n);var a=[];e.layers&&e.layers.forEach((function(t){n[t.source]?r.push({command:_i.removeLayer,args:[t.id]}):a.push(t)})),r=r.concat(o),function(e,i,r){i=i||[];var n,o,a,s,l,u,c,p=(e=e||[]).map(Ti),h=i.map(Ti),d=e.reduce(Ci,{}),f=i.reduce(Ci,{}),m=p.slice(),g=Object.create(null);for(o=n=0;n<p.length;n++)f.hasOwnProperty(a=p[n])?o++:(r.push({command:_i.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(o=n=0;n<h.length;n++)m[m.length-1-n]!==(a=h[h.length-1-n])&&(d.hasOwnProperty(a)?(r.push({command:_i.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,r.push({command:_i.addLayer,args:[f[a],u=m[m.length-n]]}),m.splice(m.length-n,0,a),g[a]=!0);for(n=0;n<h.length;n++)if(s=d[a=h[n]],l=f[a],!g[a]&&!t.deepEqual(s,l))if(t.deepEqual(s.source,l.source)&&t.deepEqual(s["source-layer"],l["source-layer"])&&t.deepEqual(s.type,l.type)){for(c in Si(s.layout,l.layout,r,a,null,_i.setLayoutProperty),Si(s.paint,l.paint,r,a,null,_i.setPaintProperty),t.deepEqual(s.filter,l.filter)||r.push({command:_i.setFilter,args:[a,l.filter]}),t.deepEqual(s.minzoom,l.minzoom)&&t.deepEqual(s.maxzoom,l.maxzoom)||r.push({command:_i.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Si(s[c],l[c],r,a,c.slice(6),_i.setPaintProperty):t.deepEqual(s[c],l[c])||r.push({command:_i.setLayerProperty,args:[a,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Si(s[c],l[c],r,a,c.slice(6),_i.setPaintProperty):t.deepEqual(s[c],l[c])||r.push({command:_i.setLayerProperty,args:[a,c,l[c]]}))}else r.push({command:_i.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],r.push({command:_i.addLayer,args:[l,u]})}(a,i.layers,r)}catch(e){console.warn("Unable to compute style diff:",e),r=[{command:_i.setStyle,args:[i]}]}return r}(this.serialize(),e).filter((function(t){return!(t.command in vr)}));if(0===r.length)return!1;var n=r.filter((function(t){return!(t.command in yr)}));if(0<n.length)throw new Error("Unimplemented: "+n.map((function(t){return t.command})).join(", ")+".");return r.forEach((function(t){"setTransition"!==t.command&&i[t.command].apply(i,t.args)})),this.stylesheet=e,!0},br.prototype.addImage=function(e,i){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,i),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},br.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},br.prototype.getImage=function(t){return this.imageManager.getImage(t)},br.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},br.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},br.prototype.addSource=function(e,i,r){var n=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!i.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(i).join(", ")+".");if(!(0<=["vector","raster","geojson","video","image"].indexOf(i.type)&&this._validate(t.validateStyle.source,"sources."+e,i,null,r))){this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);var o=this.sourceCaches[e]=new si(e,i,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}})),o.onAdd(this.map),this._changed=!0}},br.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var i in this._layers)if(this._layers[i].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+i+'" is using it.')));var r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},br.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},br.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},br.prototype.addLayer=function(e,i,r){void 0===r&&(r={}),this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with i
2d "'+n+'" already exists on this map')));else{var o;if("custom"===e.type){if(mr(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone$1(e),e=t.extend(e,{source:n})),this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}}),this._serializedLayers[o.id]=o.serialize()}var a=i?this._order.indexOf(i):this._order.length;if(i&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source&&"custom"!==o.type){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},br.prototype.moveLayer=function(e,i){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==i){var r=this._order.indexOf(e);this._order.splice(r,1);var n=i?this._order.indexOf(i):this._order.length;
vendor: 17,019 bytes, line 2
2i&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},br.prototype.removeLayer=function(e){this._checkLoaded();var i=this._layers[e];if(i){i.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},br.prototype.getLayer=function(t){return this._layers[t]},br.prototype.hasLayer=function(t){return t in this._layers},br.prototype.setLayerZoomRange=function(e,i,r){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===i&&n.maxzoom===r||(null!=i&&(n.minzoom=i),null!=r&&(n.maxzoom=r),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},br.prototype.setFilter=function(e,i,r){void 0===r&&(r={}),this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.deepEqual(n.filter,i))return null==i?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",i,null,r)||(n.filter=t.clone$1(i),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},br.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},br.prototype.setLayoutProperty=function(e,i,r,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(i),r)||(o.setLayoutProperty(i,r,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},br.prototype.getLayoutProperty=function(e,i){var r=this.getLayer(e);if(r)return r.getLayoutProperty(i);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},br.prototype.setPaintProperty=function(e,i,r,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(i),r)||(o.setPaintProperty(i,r,n)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},br.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},br.prototype.setFeatureState=function(e,i){this._checkLoaded();var r=e.source,n=e.sourceLayer,o=this.sourceCaches[r];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&n?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||n?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(n,e.id,i)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},br.prototype.removeFeatureState=function(e,i){this._checkLoaded();var r=e.source,n=this.sourceCaches[r];if(void 0!==n){var o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?i&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):n.removeFeatureState(a,e.id,i):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},br.prototype.getFeatureState=function(e){this._checkLoaded();var i=e.source,r=e.sourceLayer,n=this.sourceCaches[i];if(void 0!==n){if("vector"!==n.getSource().type||r)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),n.getFeatureState(r,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},br.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},br.prototype.serialize=function(){return t.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:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},br.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},br.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=[],d=this._order.length-1;0<=d;d--){var f=this._order[d];if(i(f))for(var m=n.length-1;0<=m;m--){var g=n[m].feature;if(r[g.layer.id]<d)break;h.push(g),n.pop()}else for(var y=0,v=t;y<v.length;y+=1){var _=v[y][f];if(_)for(var x=0,b=_;x<b.length;x+=1)h.push(b[x].feature)}}return h},br.prototype.queryRenderedFeatures=function(e,i,r){i&&i.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",i.filter,null,i);var n={};if(i&&i.layers){if(!Array.isArray(i.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=i.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[l.source]=!0}}var u=[];for(var c in i.availableImages=this._availableImages,this.sourceCaches)i.layers&&!n[c]||u.push($(this.sourceCaches[c],this._layers,this._serializedLayers,e,i,r));return this.placement&&u.push(function(t,e,i,r,n,o,a){for(var s={},l=o.queryRenderedSymbols(r),u=[],c=0,p=Object.keys(l).map(Number);c<p.length;c+=1)u.push(a[p[c]]);u.sort(tt);for(var h=function(){var i=f[d],r=i.featureIndex.lookupSymbolFeatures(l[i.bucketInstanceId],e,i.bucketIndex,i.sourceLayerIndex,n.filter,n.layers,n.availableImages,t);for(var o in r){var a=s[o]=s[o]||[],u=r[o];u.sort((function(t,e){var r=i.featureSortOrder;if(r){var n=r.indexOf(t.featureIndex);return r.indexOf(e.featureIndex)-n}return e.featureIndex-t.featureIndex}));for(var c=0,p=u;c<p.length;c+=1)a.push(p[c])}},d=0,f=u;d<f.length;d+=1)h();function m(e){s[e].forEach((function(r){var n=r.feature,o=i[t[e].source].getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=o}))}for(var g in s)m(g);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,i,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},br.prototype.querySourceFeatures=function(e,i){i&&i.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",i.filter,null,i);var r=this.sourceCaches[e];return r?function(t,e){for(var i=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),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,e))}return r}(r,i):[]},br.prototype.addSourceType=function(t,e,i){return br.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(br.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},br.prototype.getLight=function(){return this.light.getLight()},br.prototype.setLight=function(e,i){void 0===i&&(i={}),this._checkLoaded();var r=this.light.getLight(),n=!1;for(var o in e)if(!t.deepEqual(e[o],r[o])){n=!0;break}if(n){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,i),this.light.updateTransitions(a)}},br.prototype._validate=function(e,i,r,n,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&mr(this,e.call(t.validateStyle,t.extend({key:i,style:this.serialize(),value:r,styleSpec:t.styleSpec},n)))},br.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var i in this.sourceCaches)this.sourceCaches[i].clearTiles(),this.sourceCaches[i].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},br.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},br.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},br.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},br.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},br.prototype._updatePlacement=function(e,i,r,n,o){void 0===o&&(o=!1);for(var a=!1,s=!1,l={},u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];if("symbol"===p.type){if(!l[p.source]){var h=this.sourceCaches[p.source];l[p.source]=h.getRenderableIds(!0).map((function(t){return h.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var d=this.crossTileSymbolIndex.addLayer(p,l[p.source],e.center.lng);a=a||d}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new ur(e,this._order,o,i,r,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(var f=0,m=this._order;f<m.length;f+=1){var g=this._layers[m[f]];"symbol"===g.type&&this.placement.updateLayerOpacities(g,l[g.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},br.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},br.prototype.getImages=function(t,e,i){this.imageManager.getImages(e.icons,i),this._updateTilesForChangedImages();var r=this.sourceCaches[e.source];r&&r.setDependencies(e.tileID.key,e.type,e.icons)},br.prototype.getGlyphs=function(t,e,i){this.glyphManager.getGlyphs(e.stacks,i)},br.prototype.getResource=function(e,i,r){return t.makeRequest(i,r)},br);function br(e,i){var r=this;void 0===i&&(i={}),gr.call(this),this.map=e,this.dispatcher=new E(gi(),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new x(e._requestManager,i.localIdeographFontFamily),this.lineAtlas=new w(256,512),this.crossTileSymbolIndex=new fr,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var n=this;this._rtlTextPluginCallback=br.registerForPluginStateChange((function(e){n.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},(function(e,i){if(t.triggerPluginCompletionEvent(e),i&&i.every((function(t){return t})))for(var r in n.sourceCaches)n.sourceCaches[r].reload()}))})),this.on("data",(function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=r.sourceCaches[t.sourceId];if(e){var i=e.getSource();if(i&&i.vectorLayerIds)for(var n in r._layers){var o=r._layers[n];o.source===i.id&&r._validateLayer(o)}}}}))}xr.getSourceType=function(t){return Z[t]},xr.setSourceType=function(t,e){Z[t]=e},xr.registerForPluginStateChange=t.registerForPluginStateChange;var wr=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Sr=Kr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Tr=Kr("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);}"),Cr=Kr("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);}"),Ir=Kr("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
2/(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);}"),Er=Kr("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);}"),Mr=Kr("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;}"),Ar=Kr("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;}"),Lr=Kr("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;}"),kr=Kr("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=Kr("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);}"),Dr=Kr("#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);}"),zr=Kr("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;}"),Or=Kr("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;}"),Nr=Kr("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);}"),Rr=Kr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),Br=Kr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixe
2l_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;}"),jr=Kr("#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 float u_maxzoom;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 exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*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;}"),Fr=Kr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Ur=Kr("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);}"),Vr=Kr("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 float v_lineprogress;\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,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\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_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\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;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;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);}"),qr=Kr("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;}"),Gr=Kr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
2uniform 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);}"),Zr=Kr("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;}"),Hr=Kr("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));}"),Wr=Kr("#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);}"),Yr=Kr("#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;
2gl_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 Kr(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),a=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+"\
2nvarying "+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:a}}function Xr(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}var Jr=Object.freeze({__proto__:null,prelude:Sr,background:Tr,backgroundPattern:Cr,circle:Ir,clippingMask:Er,heatmap:Mr,heatmapTexture:Ar,collisionBox:Lr,collisionCircle:kr,debug:Pr,fill:Dr,fillOutline:zr,fillOutlinePattern:Or,fillPattern:Nr,fillExtrusion:Rr,fillExtrusionPattern:Br,hillshadePrepare:jr,hillshade:Fr,line:Ur,lineGradient:Vr,linePattern:qr,lineSDF:Gr,raster:Zr,symbolIcon:Hr,symbolSDF:Wr,symbolTextAndIcon:Yr});function Qr(t){for(var e=[],i=0;i<t.length;i++)if(null!==t[i]){var r=t[i].split(" ");e.push(r.pop())}return e}function $r(t,e,i,r,n,o){var a=t.gl;this.program=a.createProgram();for(var s=Qr(i.staticAttributes),l=r?r.getBinderAttributes():[],u=s.concat(l),c=i.staticUniforms?Qr(i.staticUniforms):[],p=r?r.getBinderUniforms():[],h=[],d=0,f=c.concat(p);d<f.length;d+=1){var m=f[d];h.indexOf(m)<0&&h.push(m)}var g=r?r.defines():[];o&&g.push("#define OVERDRAW_INSPECTOR;");var y=g.concat(Sr.fragmentSource,i.fragmentSource).join("\n"),v=g.concat(Sr.vertexSource,i.vertexSource).join("\n"),_=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(_,y),a.compileShader(_),a.attachShader(this.program,_);var x=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(x,v),a.compileShader(x),a.attachShader(this.program,x),this.attributes={};var b={};this.numAttributes=u.length;for(var w=0;w<this.numAttributes;w++)u[w]&&(a.bindAttribLocation(this.program,w,u[w]),this.attributes[u[w]]=w);a.linkProgram(this.program),a.deleteShader(x),a.deleteShader(_);for(var S=0;S<h.length;S++){var T=h[S];if(T&&!b[T]){var C=a.getUniformLocation(this.program,T);C&&(b[T]=C)}}this.fixedUniforms=n(t,b),this.binderUniforms=r?r.getUniforms(t,b):[]}}}function tn(t,e,i){var r=1/Vi(i,1,e.transform.tileZoom),n=Math.pow(2,i.tileID.overscaledZ),o=i.tileSize*Math.pow(2,e.transform.tileZoom)/n,a=o*(i.tileID.canonical.x+i.tileID.wrap*n),s=o*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:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}function en(e,i,r,n){var o=i.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(l,-i.transform.angle),t.transformMat3(s,s,l);var u=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+r,u_opacity:n}}function rn(t){return{u_matrix:t}}function nn(e,i,r,n){return t.extend(rn(e),tn(r,i,n))}function on(e,i,r,n){var o,a,s=e.transform;if("map"===n.paint.get("circle-pitch-alignment")){var l=Vi(r,1,s.zoom);o=!0,a=[l,l]}else o=!1,a=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(i.posMatrix,r,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:a}}function an(t){return{u_matrix:t}}function sn(e,i,r){var n=e.transform;return{u_matrix:cn(e,i,r),u_ratio:1/Vi(i,1,n.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}}
2Xr.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)},Xr.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,d=i;h<d.length;h+=1)d[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,n);for(var f=0,m=i;f<m.length;f+=1){var g=m[f];g.bind(),g.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},Xr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)},$r.prototype.draw=function(t,e,i,r,n,o,a,s,l,u,c,p,h,d,f,m){var g,y=t.gl;if(!this.failedToCreate){for(var v in t.program.set(this.program),t.setDepthMode(i),t.setStencilMode(r),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[v].set(a[v]);d&&d.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var _=((g={})[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g[e]),x=0,b=c.get();x<b.length;x+=1){var w=b[x],S=w.vaos||(w.vaos={});(S[s]||(S[s]=new Xr)).bind(t,this,l,d?d.getPaintVertexBuffers():[],u,w.vertexOffset,f,m),y.drawElements(e,w.primitiveLength*_,y.UNSIGNED_SHORT,w.primitiveOffset*_*2)}}};var ln=function(t,e,i){return void 0===i&&(i=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:i}};function un(t,e){return 1/Vi(t,1,e.tileZoom)}function cn(t,e,i){return t.translatePosMatrix(e.tileID.posMatrix,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}function pn(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<(a=n.paint.get("raster-saturation"))?1-1/(1.001-a):-a,u_contrast_factor:0<(o=n.paint.get("raster-contrast"))?1/(1-o):1+o,u_spin_weights:function(t){t*=Math.PI/180;var e=Math.sin(t),i=Math.cos(t);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}(n.paint.get("raster-hue-rotate"))};var o,a}function hn(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 dn(e,i,r,n,o,a,s,l,u,c,p){var h=o.transform;return t.extend(hn(e,i,r,n,o,a,s,l,u,c),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})}var fn,mn={fillExtrusion:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_lightpos:new t.Uniform3f(e,i.u_lightpos),u_lightintensity:new t.Uniform1f(e,i.u_lightintensity),u_lightcolor:new t.Uniform3f(e,i.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,i.u_vertical_gradient),u_opacity:new t.Uniform1f(e,i.u_opacity)}},fillExtrusionPattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_lightpos:new t.Uniform3f(e,i.u_lightpos),u_lightintensity:new t.Uniform1f(e,i.u_lightintensity),u_lightcolor:new t.Uniform3f(e,i.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,i.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,i.u_height_factor),u_image:new t.Uniform1i(e,i.u_image),u_texsize:new t.Uniform2f(e,i.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade),u_opacity:new t.Uniform1f(e,i.u_opacity)}},fill:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},fillPattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_image:new t.Uniform1i(e,i.u_image),u_texsize:new t.Uniform2f(e,i.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},fillOutline:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_world:new t.Uniform2f(e,i.u_world)}},fillOutlinePattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_world:new t.Uniform2f(e,i.u_world),u_image:new t.Uniform1i(e,i.u_image),u_texsize:new t.Uniform2f(e,i.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},circle:function(e,i){return{u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,i.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,i.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},collisionBox:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,i.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,i.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,i.u_overscale_factor)}},collisionCircle:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,i.u_inv_matrix
2),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,i.u_viewport_size)}},debug:function(e,i){return{u_color:new t.UniformColor(e,i.u_color),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_overlay:new t.Uniform1i(e,i.u_overlay),u_overlay_scale:new t.Uniform1f(e,i.u_overlay_scale)}},clippingMask:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},heatmap:function(e,i){return{u_extrude_scale:new t.Uniform1f(e,i.u_extrude_scale),u_intensity:new t.Uniform1f(e,i.u_intensity),u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},heatmapTexture:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_world:new t.Uniform2f(e,i.u_world),u_image:new t.Uniform1i(e,i.u_image),u_color_ramp:new t.Uniform1i(e,i.u_color_ramp),u_opacity:new t.Uniform1f(e,i.u_opacity)}},hillshade:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_image:new t.Uniform1i(e,i.u_image),u_latrange:new t.Uniform2f(e,i.u_latrange),u_light:new t.Uniform2f(e,i.u_light),u_shadow:new t.UniformColor(e,i.u_shadow),u_highlight:new t.UniformColor(e,i.u_highlight),u_accent:new t.UniformColor(e,i.u_accent)}},hillshadePrepare:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_image:new t.Uniform1i(e,i.u_image),u_dimension:new t.Uniform2f(e,i.u_dimension),u_zoom:new t.Uniform1f(e,i.u_zoom),u_maxzoom:new t.Uniform1f(e,i.u_maxzoom),u_unpack:new t.Uniform4f(e,i.u_unpack)}},line:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels)}},lineGradient:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels),u_image:new t.Uniform1i(e,i.u_image)}},linePattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_texsize:new t.Uniform2f(e,i.u_texsize),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_image:new t.Uniform1i(e,i.u_image),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels),u_scale:new t.Uniform3f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},lineSDF:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,i.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,i.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,i.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,i.u_sdfgamma),u_image:new t.Uniform1i(e,i.u_image),u_tex_y_a:new t.Uniform1f(e,i.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,i.u_tex_y_b),u_mix:new t.Uniform1f(e,i.u_mix)}},raster:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_tl_parent:new t.Uniform2f(e,i.u_tl_parent),u_scale_parent:new t.Uniform1f(e,i.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,i.u_buffer_scale),u_fade_t:new t.Uniform1f(e,i.u_fade_t),u_opacity:new t.Uniform1f(e,i.u_opacity),u_image0:new t.Uniform1i(e,i.u_image0),u_image1:new t.Uniform1i(e,i.u_image1),u_brightness_low:new t.Uniform1f(e,i.u_brightness_low),u_brightness_high:new t.Uniform1f(e,i.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,i.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,i.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,i.u_spin_weights)}},symbolIcon:function(e,i){return{u_is_size_zoom_constant:new t.Uniform1i(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,i.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,i.u_size_t),u_size:new t.Uniform1f(e,i.u_size),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,i.u_pitch),u_rotate_symbol:new t.Uniform1i(e,i.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,i.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,i.u_fade_change),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,i.u_label_plane_matrix
2),u_coord_matrix:new t.UniformMatrix4f(e,i.u_coord_matrix),u_is_text:new t.Uniform1i(e,i.u_is_text),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_texsize:new t.Uniform2f(e,i.u_texsize),u_texture:new t.Uniform1i(e,i.u_texture)}},symbolSDF:function(e,i){return{u_is_size_zoom_constant:new t.Uniform1i(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,i.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,i.u_size_t),u_size:new t.Uniform1f(e,i.u_size),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,i.u_pitch),u_rotate_symbol:new t.Uniform1i(e,i.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,i.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,i.u_fade_change),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,i.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,i.u_coord_matrix),u_is_text:new t.Uniform1i(e,i.u_is_text),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_texsize:new t.Uniform2f(e,i.u_texsize),u_texture:new t.Uniform1i(e,i.u_texture),u_gamma_scale:new t.Uniform1f(e,i.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,i.u_is_halo)}},symbolTextAndIcon:function(e,i){return{u_is_size_zoom_constant:new t.Uniform1i(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,i.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,i.u_size_t),u_size:new t.Uniform1f(e,i.u_size),u_camera_to_center_distance:new t.Uniform1f(e,i.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,i.u_pitch),u_rotate_symbol:new t.Uniform1i(e,i.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,i.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,i.u_fade_change),u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,i.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,i.u_coord_matrix),u_is_text:new t.Uniform1i(e,i.u_is_text),u_pitch_with_map:new t.Uniform1i(e,i.u_pitch_with_map),u_texsize:new t.Uniform2f(e,i.u_texsize),u_texsize_icon:new t.Uniform2f(e,i.u_texsize_icon),u_texture:new t.Uniform1i(e,i.u_texture),u_texture_icon:new t.Uniform1i(e,i.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,i.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,i.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,i.u_is_halo)}},background:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_opacity:new t.Uniform1f(e,i.u_opacity),u_color:new t.UniformColor(e,i.u_color)}},backgroundPattern:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_opacity:new t.Uniform1f(e,i.u_opacity),u_image:new t.Uniform1i(e,i.u_image),u_pattern_tl_a:new t.Uniform2f(e,i.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,i.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,i.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,i.u_pattern_br_b),u_texsize:new t.Uniform2f(e,i.u_texsize),u_mix:new t.Uniform1f(e,i.u_mix),u_pattern_size_a:new t.Uniform2f(e,i.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,i.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,i.u_scale_a),u_scale_b:new t.Uniform1f(e,i.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,i.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,i.u_tile_units_to_pixels)}}};function gn(e,i,r,n,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),p=[],h=0,d=0,f=0;f<n.length;f++){var m=n[f],g=i.getTile(m),y=g.getBucket(r);if(y){var v=m.posMatrix;0===o[0]&&0===o[1]||(v=e.translatePosMatrix(m.posMatrix,g,o,a));var _=s?y.textCollisionBox:y.iconCollisionBox,x=y.collisionCircleArray;if(0<x.length){var b=t.create(),w=v;t.mul(b,y.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,y.placementViewportMatrix),p.push({circleArray:x,circleOffset:d,transform:w,invTransform:b}),d=h+=x.length/4}_&&c.draw(l,u.LINES,ei.disabled,ii.disabled,e.colorModeForRenderPass(),ni.disabled,(S=v,I=Vi(C=g,1,(T=e.transform).zoom),E=Math.pow(2,T.zoom-C.tileID.overscaledZ),M=C.tileID.overscaleFactor(),{u_matrix:S,u_camera_to_center_distance:T.cameraToCenterDistance,u_pixels_to_tile_units:I,u_extrude_scale:[T.pixelsToGLUnits[0]/(I*E),T.pixelsToGLUnits[1]/(I*E)],u_overscale_factor:M}),r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}var S,T,C,I,E,M,A;if(s&&p.length){var L=e.useProgram("collisionCircle"),k=new t.StructArrayLayout2f1f2i16;
2k.resize(4*h),k._trim();for(var P=0,D=0,z=p;D<z.length;D+=1)for(var O=z[D],N=0;N<O.circleArray.length/4;N++){var R=4*N,B=O.circleArray[0+R],j=O.circleArray[1+R],F=O.circleArray[2+R],U=O.circleArray[3+R];k.emplace(P++,B,j,F,U,0),k.emplace(P++,B,j,F,U,1),k.emplace(P++,B,j,F,U,2),k.emplace(P++,B,j,F,U,3)}(!fn||fn.length<2*h)&&(fn=function(){var e=2*h,i=new t.StructArrayLayout3ui6;i.resize(e),i._trim();for(var r=0;r<e;r++){var n=6*r;i.uint16[0+n]=4*r+0,i.uint16[1+n]=4*r+1,i.uint16[2+n]=4*r+2,i.uint16[3+n]=4*r+2,i.uint16[4+n]=4*r+3,i.uint16[5+n]=4*r+0}return i}());for(var V=l.createIndexBuffer(fn,!0),q=l.createVertexBuffer(k,t.collisionCircleLayout.members,!0),G=0,Z=p;G<Z.length;G+=1){var H=Z[G],W={u_matrix:H.transform,u_inv_matrix:H.invTransform,u_camera_to_center_distance:(A=e.transform).cameraToCenterDistance,u_viewport_size:[A.width,A.height]};L.draw(l,u.TRIANGLES,ei.disabled,ii.disabled,e.colorModeForRenderPass(),ni.disabled,W,r.id,q,V,t.SegmentVector.simpleSegment(0,2*H.circleOffset,H.circleArray.length,H.circleArray.length/2),null,e.transform.zoom,null,null,null)}q.destroy(),V.destroy()}}var yn=t.identity(new Float32Array(16));function vn(e,i,r,n,o,a,s,l,u,c,p){var h,d,f,m,g,y,v,_,x,b,w=e.text.placedSymbolArray,S=e.text.dynamicLayoutVertexArray,T=e.icon.dynamicLayoutVertexArray,C={};S.clear();for(var I=0;I<w.length;I++){var E=w.get(I),M=E.hidden||!E.crossTileID||e.allowVerticalPlacement&&!E.placedOrientation?null:n[E.crossTileID];if(M){var A=new t.Point(E.anchorX,E.anchorY),L=Li(A,r?l:s),k=ki(a.cameraToCenterDistance,L.signedDistanceFromCamera),P=o.evaluateSizeForFeature(e.textSizeData,c,E)*k/t.ONE_EM;r&&(P*=e.tilePixelRatio/u);for(var D=(h=M.anchor,d=M.width,f=M.height,m=M.textOffset,g=M.textBoxScale,y=P,_=-((v=t.getAnchorAlignment(h)).horizontalAlign-.5)*d,x=-(v.verticalAlign-.5)*f,b=t.evaluateVariableOffset(h,m),new t.Point((_/g+b[0])*y,(x/g+b[1])*y)),z=r?Li(A.add(D),s).point:L.point.add(i?D.rotate(-a.angle):D),O=e.allowVerticalPlacement&&E.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,N=0;N<E.numGlyphs;N++)t.addDynamicAttributes(S,z,O);p&&0<=E.associatedIconIndex&&(C[E.associatedIconIndex]={shiftedAnchor:z,angle:O})}else ji(E.numGlyphs,S)}if(p){T.clear();for(var R=e.icon.placedSymbolArray,B=0;B<R.length;B++){var j=R.get(B);if(j.hidden)ji(j.numGlyphs,T);else{var F=C[B];if(F)for(var U=0;U<j.numGlyphs;U++)t.addDynamicAttributes(T,F.shiftedAnchor,F.angle);else ji(j.numGlyphs,T)}}e.icon.dynamicLayoutVertexBuffer.updateData(T)}e.text.dynamicLayoutVertexBuffer.updateData(S)}function _n(e,i,r,n,o,a,s,l,u,c,p,h){for(var d=e.context,f=d.gl,m=e.transform,g="map"===l,y="map"===u,v=g&&"point"!==r.layout.get("symbol-placement"),_=g&&!y&&!v,x=void 0!==r.layout.get("symbol-sort-key").constantOr(1),b=e.depthModeForSublayer(0,ei.ReadOnly),w=r.layout.get("text-variable-anchor"),S=[],T=0,C=n;T<C.length;T+=1){var I=C[T],E=i.getTile(I),M=E.getBucket(r);if(M){var A=o?M.text:M.icon;if(A&&A.segments.get().length){var L=A.programConfigurations.get(r.id),k=o||M.sdfIcons,P=o?M.textSizeData:M.iconSizeData,D=y||0!==m.pitch,z=e.useProgram((ht=k,dt=o,M.iconsInText&&dt?"symbolTextAndIcon":ht?"symbolSDF":"symbolIcon"),L),O=t.evaluateSizeForZoom(P,m.zoom),N=void 0,R=[0,0],B=void 0,j=void 0,F=null,U=void 0;if(o)B=E.glyphAtlasTexture,j=f.LINEAR,N=E.glyphAtlasTexture.size,M.iconsInText&&(R=E.imageAtlasTexture.size,F=E.imageAtlasTexture,U=D||e.options.rotating||e.options.zooming||"composite"===P.kind||"camera"===P.kind?f.LINEAR:f.NEAREST);else{var V=1!==r.layout.get("icon-size").constantOr(0)||M.iconsNeedLinear;B=E.imageAtlasTexture,j=k||e.options.rotating||e.options.zooming||V||D?f.LINEAR:f.NEAREST,N=E.imageAtlasTexture.size}var q=Vi(E,1,e.transform.zoom),G=Mi(I.posMatrix,y,g,e.transform,q),Z=Ai(I.posMatrix,y,g,e.transform,q),H=w&&M.hasTextData(),W="none"!==r.layout.get("icon-text-fit")&&H&&M.hasIconData();v&&Pi(M,I.posMatrix,e,o,G,Z,y,c);var Y=e.translatePosMatrix(I.posMatrix,E,a,s),K=v||o&&w||W?yn:G,X=e.translatePosMatrix(Z,E,a,s,!0),J=k&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),Q={program:z,buffers:A,uniformValues:k?M.iconsInText?(it=P.kind,rt=O,nt=_,ot=y,at=e,st=Y,lt=K,ut=X,ct=N,pt=R,t.extend(dn(it,rt,nt,ot,at,st,lt,ut,!0,ct,!0),{u_texsize_icon:pt,u_texture_icon:1})):dn(P.kind,O,_,y,e,Y,K,X,o,N,!0):hn(P.kind,O,_,y,e,Y,K,X,o,N),atlasTexture:B,atlasTextureIcon:F,atlasInterpolation:j,atlasInterpolationIcon:U,isSDF:k,hasHalo:J};if(x)for(var $=0,tt=A.segments.get();$<tt.length;$+=1){var et=tt[$];S.push({segments:new t.SegmentVector([et]),sortKey:et.sortKey,state:Q})}else S.push({segments:A.segments,sortKey:0,state:Q})}}}var it,rt,nt,ot,at,st,lt,ut,ct,pt,ht,dt;x&&S.sort((function(t,e){return t.sortKey-e.sortKey}
2));for(var ft=0,mt=S;ft<mt.length;ft+=1){var gt=mt[ft],yt=gt.state;if(d.activeTexture.set(f.TEXTURE0),yt.atlasTexture.bind(yt.atlasInterpolation,f.CLAMP_TO_EDGE),yt.atlasTextureIcon&&(d.activeTexture.set(f.TEXTURE1),yt.atlasTextureIcon&&yt.atlasTextureIcon.bind(yt.atlasInterpolationIcon,f.CLAMP_TO_EDGE)),yt.isSDF){var vt=yt.uniformValues;yt.hasHalo&&(vt.u_is_halo=1,xn(yt.buffers,gt.segments,r,e,yt.program,b,p,h,vt)),vt.u_is_halo=0}xn(yt.buffers,gt.segments,r,e,yt.program,b,p,h,yt.uniformValues)}}function xn(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 bn(e,i,r,n,o,a,s){var l,u,c,p,h,d,f,m,g,y,v=e.context.gl,_=r.paint.get("fill-pattern"),x=_&&_.constantOr(1),b=r.getCrossfadeParameters();l=s?(u=x&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",v.LINES):(u=x?"fillPattern":"fill",v.TRIANGLES);for(var w=0,S=n;w<S.length;w+=1){var T=S[w],C=i.getTile(T);if(!x||C.patternsLoaded()){var I=C.getBucket(r);if(I){var E=I.programConfigurations.get(r.id),M=e.useProgram(u,E);x&&(e.context.activeTexture.set(v.TEXTURE0),C.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),E.updatePaintBuffers(b));var A=_.constantOr(null);if(A&&C.imageAtlas){var L=C.imageAtlas,k=L.patternPositions[A.to.toString()],P=L.patternPositions[A.from.toString()];k&&P&&E.setConstantPatternPositions(k,P)}var D=e.translatePosMatrix(T.posMatrix,C,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(s){p=I.indexBuffer2,h=I.segments2;var z=[v.drawingBufferWidth,v.drawingBufferHeight];c="fillOutlinePattern"===u&&x?(d=D,f=e,m=b,g=C,y=z,t.extend(nn(d,f,m,g),{u_world:y})):{u_matrix:D,u_world:z}}else p=I.indexBuffer,h=I.segments,c=x?nn(D,e,b,C):rn(D);M.draw(e.context,l,o,e.stencilModeForClipping(T),a,ni.disabled,c,r.id,I.layoutVertexBuffer,p,h,r.paint,e.transform.zoom,E)}}}}function wn(e,i,r,n,o,a,s){for(var l=e.context,u=l.gl,c=r.paint.get("fill-extrusion-pattern"),p=c.constantOr(1),h=r.getCrossfadeParameters(),d=r.paint.get("fill-extrusion-opacity"),f=0,m=n;f<m.length;f+=1){var g=m[f],y=i.getTile(g),v=y.getBucket(r);if(v){var _=v.programConfigurations.get(r.id),x=e.useProgram(p?"fillExtrusionPattern":"fillExtrusion",_);p&&(e.context.activeTexture.set(u.TEXTURE0),y.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),_.updatePaintBuffers(h));var b=c.constantOr(null);if(b&&y.imageAtlas){var w=y.imageAtlas,S=w.patternPositions[b.to.toString()],T=w.patternPositions[b.from.toString()];S&&T&&_.setConstantPatternPositions(S,T)}var C=e.translatePosMatrix(g.posMatrix,y,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),I=r.paint.get("fill-extrusion-vertical-gradient"),E=p?(M=C,A=e,L=I,k=d,P=g,D=h,z=y,t.extend(en(M,A,L,k),tn(D,A,z),{u_height_factor:-Math.pow(2,P.overscaledZ)/z.tileSize/8})):en(C,e,I,d);x.draw(l,l.gl.TRIANGLES,o,a,s,ni.backCCW,E,r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,r.paint,e.transform.zoom,_)}}var M,A,L,k,P,D,z}function Sn(e,i,r,n,o,a){var s=e.context,l=s.gl,u=i.fbo;if(u){var c=e.useProgram("hillshade");s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u.colorAttachment.get());var p=function(e,i,r){var n=r.paint.get("hillshade-shadow-color"),o=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);var l,u,c,p=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(i.tileID.toUnwrapped(),p),u_image:0,u_latrange:(l=i.tileID,u=Math.pow(2,l.canonical.z),c=l.canonical.y,[new t.MercatorCoordinate(0,c/u).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/u).toLngLat().lat]),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:n,u_highlight:o,u_accent:a}}(e,i,r);c.draw(s,l.TRIANGLES,n,o,a,ni.disabled,p,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}
vendor: 5,061 bytes, line 2
2function Tn(e,i,r,n,o,a,s){var l,u,c,p,h,d=e.context,f=d.gl,m=i.dem;if(m&&m.data){var g=m.dim,y=m.stride,v=m.getPixels();if(d.activeTexture.set(f.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||e.getTileTexture(y),i.demTexture){var _=i.demTexture;_.update(v,{premultiply:!1}),_.bind(f.NEAREST,f.CLAMP_TO_EDGE)}else i.demTexture=new t.Texture(d,v,f.RGBA,{premultiply:!1}),i.demTexture.bind(f.NEAREST,f.CLAMP_TO_EDGE);d.activeTexture.set(f.TEXTURE0);var x=i.fbo;if(!x){var b=new t.Texture(d,{width:g,height:g,data:null},f.RGBA);b.bind(f.LINEAR,f.CLAMP_TO_EDGE),(x=i.fbo=d.createFramebuffer(g,g,!0)).colorAttachment.set(b.texture)}d.bindFramebuffer.set(x.framebuffer),d.viewport.set([0,0,g,g]),e.useProgram("hillshadePrepare").draw(d,f.TRIANGLES,o,a,s,ni.disabled,(l=i.tileID,c=n,p=(u=m).stride,h=t.create(),t.ortho(h,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(h,h,[0,-t.EXTENT,0]),{u_matrix:h,u_image:1,u_dimension:[p,p],u_zoom:l.overscaledZ,u_maxzoom:c,u_unpack:u.getUnpackVector()}),r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function Cn(e,i,r,n,o){var a=n.paint.get("raster-fade-duration");if(0<a){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=i?(s-i.timeAdded)/a:-1,c=r.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!i||Math.abs(i.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),d=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&1<=l&&(e.refreshedUponExpiration=!1),i?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var In=new t.Color(1,0,0,1),En=new t.Color(0,1,0,1),Mn=new t.Color(0,0,1,1),An=new t.Color(1,0,1,1),Ln=new t.Color(0,1,1,1);function kn(t,e,i,r){Dn(t,0,e+i/2,t.transform.width,i,r)}function Pn(t,e,i,r){Dn(t,e-i/2,0,i,t.transform.height,r)}function Dn(e,i,r,n,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(i*t.browser.devicePixelRatio,r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function zn(e,i,r){var n=e.context,o=n.gl,a=r.posMatrix,s=e.useProgram("debug"),l=ei.disabled,u=ii.disabled,c=e.colorModeForRenderPass();n.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(n,o.LINE_STRIP,l,u,c,ni.disabled,ln(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=i.getTileByID(r.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),d=i.getTile(r).tileSize,f=512/Math.min(d,512)*(r.overscaledZ/e.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=" => "+r.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)}(e,m+" "+h+"kb"),s.draw(n,o.TRIANGLES,l,u,ri.alphaBlended,ni.disabled,ln(a,t.Color.transparent,f),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}function On(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 fr,this.gpuTimers={}}var Nn={symbol:function(e,i,r,n,o){if("translucent"===e.renderPass){var a=ii.disabled,s=e.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(e,i,r,n,o,a,s){for(var l=i.transform,u="map"===o,c="map"===a,p=0,h=e;p<h.length;p+=1){var d=h[p],f=n.getTile(d),m=f.getBucket(r);if(m&&m.text&&m.text.segments.get().length){var g=t.evaluateSizeForZoom(m.textSizeData,l.zoom),y=Vi(f,1,i.transform.zoom),v=Mi(d.posMatrix,c,u,i.transform,y),_="none"!==r.layout.get("icon-text-fit")&&m.hasIconData();if(g){var x=Math.pow(2,l.zoom-f.tileID.overscaledZ);vn(m,u,c,s,t.symbolSize,l,v,d.posMatrix,x,g,_)}}}}(n,e,r,i,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&_n(e,i,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&_n(e,i,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),i.map.showCollisionBoxes&&(gn(e,i,r,n,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),gn(e,i,r,n,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))}},circle:function(e,i,r,n){if("translucent"===e.renderPass){var o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=void 0!==r.layout.get("
2circle-sort-key").constantOr(1);if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){for(var u=e.context,c=u.gl,p=e.depthModeForSublayer(0,ei.ReadOnly),h=ii.disabled,d=e.colorModeForRenderPass(),f=[],m=0;m<n.length;m++){var g=n[m],y=i.getTile(g),v=y.getBucket(r);if(v){var _=v.programConfigurations.get(r.id),x={programConfiguration:_,program:e.useProgram("circle",_),layoutVertexBuffer:v.layoutVertexBuffer,indexBuffer:v.indexBuffer,uniformValues:on(e,g,y,r)};if(l)for(var b=0,w=v.segments.get();b<w.length;b+=1){var S=w[b];f.push({segments:new t.SegmentVector([S]),sortKey:S.sortKey,state:x})}else f.push({segments:v.segments,sortKey:0,state:x})}}l&&f.sort((function(t,e){return t.sortKey-e.sortKey}));for(var T=0,C=f;T<C.length;T+=1){var I=C[T],E=I.state;E.program.draw(u,c.TRIANGLES,p,h,d,ni.disabled,E.uniformValues,r.id,E.layoutVertexBuffer,E.indexBuffer,I.segments,r.paint,e.transform.zoom,E.programConfiguration)}}}},heatmap:function(e,i,r,n){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=ii.disabled,l=new ri([a.ONE,a.ONE],t.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,a,s=i.heatmapFbo;if(s)r.bindTexture(r.TEXTURE_2D,s.colorAttachment.get()),t.bindFramebuffer.set(s.framebuffer);else{var l=r.createTexture();r.bindTexture(r.TEXTURE_2D,l),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),n=l,o=s=i.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),(a=t.gl).texImage2D(a.TEXTURE_2D,0,a.RGBA,e.width/4,e.height/4,0,a.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),o.colorAttachment.set(n)}}(o,e,r),o.clear({color:t.Color.transparent});for(var u=0;u<n.length;u++){var c=n[u];if(!i.hasRenderableParent(c)){var p=i.getTile(c),h=p.getBucket(r);if(h){var d=h.programConfigurations.get(r.id);e.useProgram("heatmap",d).draw(o,a.TRIANGLES,ei.disabled,s,l,ni.disabled,(f=c.posMatrix,m=p,g=e.transform.zoom,y=r.paint.get("heatmap-intensity"),{u_matrix:f,u_extrude_scale:Vi(m,1,g),u_intensity:y}),r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,r.paint,e.transform.zoom,d)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,i){var r=e.context,n=r.gl,o=i.heatmapFbo;if(o){r.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(n.TEXTURE1);var a=i.colorRampTexture;(a=a||(i.colorRampTexture=new t.Texture(r,i.colorRamp,n.RGBA))).bind(n.LINEAR,n.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,n.TRIANGLES,ei.disabled,ii.disabled,e.colorModeForRenderPass(),ni.disabled,function(e,i){var r=t.create();t.ortho(r,0,e.width,e.height,0,0,1);var n=e.context.gl;return{u_matrix:r,u_world:[n.drawingBufferWidth,n.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:i.paint.get("heatmap-opacity")}}(e,i),i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom)}}(e,r));var f,m,g,y},line:function(e,i,r,n){if("translucent"===e.renderPass){var o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,ei.ReadOnly),l=e.colorModeForRenderPass(),u=r.paint.get("line-dasharray"),c=r.paint.get("line-pattern"),p=c.constantOr(1),h=r.paint.get("line-gradient"),d=r.getCrossfadeParameters(),f=p?"linePattern":u?"lineSDF":h?"lineGradient":"line",m=e.context,g=m.gl,y=!0;if(h){m.activeTexture.set(g.TEXTURE0);var v=r.gradientTexture;if(!r.gradient)return;(v=v||(r.gradientTexture=new t.Texture(m,r.gradient,g.RGBA))).bind(g.LINEAR,g.CLAMP_TO_EDGE)}for(var _=0,x=n;_<x.length;_+=1){var b=x[_],w=i.getTile(b);if(!p||w.patternsLoaded()){var S=w.getBucket(r);if(S){var T=S.programConfigurations.get(r.id),C=e.context.program.get(),I=e.useProgram(f,T),E=y||I.program!==C,M=c.constantOr(null);if(M&&w.imageAtlas){var A=w.imageAtlas,L=A.patternPositions[M.to.toString()],k=A.patternPositions[M.from.toString()];L&&k&&T.setConstantPatternPositions(L,k)}var P=p?(X=r,J=d,$=un(K=w,Q=(Y=e).transform),{u_matrix:cn(Y,K,X),u_texsize:K.imageAtlasTexture.size,u_ratio:1/Vi(K,1,Q.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[$,J.fromScale,J.toScale],u_fade:J.t,u_units_to_pixels:[1/Q.pixelsToGLUnits[0],1/Q.pixelsToGLUnits[1]]}):u?(R=w,B=r,j=u,F=d,U=void 0,U=(N=e).lineAtlas,V=un(R,N.transform),q="round"===B.layout.get("line-cap"),G=U.getDash(j.from,q),Z=U.getDash(j.to,q),H=G.width*F.fromScale,W=Z.width*F.toScale,t.extend(sn(N,R,B),{u_patternscale_a:[V/H,-G.height/2],u_patternscale_b:[V/W,-Z.height/2],u_sdfgamma:U.width/(256*Math.min(H,W)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:G.y,u_tex_y_b:Z.y,u_mix:F.t})):h?(D=e,z=w,O=r,t.extend(sn(D,z,O),{u_image:0})):sn(e,w,r);p?(m.activeTexture.set(g.TEXTURE0),w.imageAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),T.updatePaintBuffers(d)):u&&(E||e.lineAtlas.dirty)&&(m.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(m)),I.draw(m,g.TRIANGLES,s,e.stencilModeForClipping(b),l,ni.disabled,P,r.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,r.paint,e.transform.zoom,T),y=!1}}}}}var D,z,O,N,R,B,j,F,U,V,q,G,Z,H,W,Y,K,X,J,Q,$},fill:function(e,i,r,n){var o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),l=r.paint.get("fill-pattern"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===u){var c=e.depthModeForSublayer(1,"opaque"===e.renderPass?ei.ReadWrite:ei.ReadOnly);bn(e,i,r,n,c,s,!1)}if("translucent"===e.renderPass&&r.paint.get("fill-antialias")){var p=e.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,ei.ReadOnly);bn(e,i,r,n,p,s,!0)}}}
2,"fill-extrusion":function(t,e,i,r){var n=i.paint.get("fill-extrusion-opacity");if(0!==n&&"translucent"===t.renderPass){var o=new ei(t.context.gl.LEQUAL,ei.ReadWrite,t.depthRangeFor3D);if(1!==n||i.paint.get("fill-extrusion-pattern").constantOr(1))wn(t,e,i,r,o,ii.disabled,ri.disabled),wn(t,e,i,r,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var a=t.colorModeForRenderPass();wn(t,e,i,r,o,ii.disabled,a)}}},hillshade:function(t,e,i,r){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,ei.ReadOnly),s=t.colorModeForRenderPass(),l="translucent"===t.renderPass?t.stencilConfigForOverlap(r):[{},r],u=l[0],c=0,p=l[1];c<p.length;c+=1){var h=p[c],d=e.getTile(h);d.needsHillshadePrepare&&"offscreen"===t.renderPass?Tn(t,d,i,o,a,ii.disabled,s):"translucent"===t.renderPass&&Sn(t,d,i,a,u[h.overscaledZ],s)}n.viewport.set([0,0,t.width,t.height])}},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(),u=a instanceof V?[{},r]:t.stencilConfigForOverlap(r),c=u[0],p=u[1],h=p[p.length-1].overscaledZ,d=!t.options.moving,f=0,m=p;f<m.length;f+=1){var g=m[f],y=t.depthModeForSublayer(g.overscaledZ-h,1===i.paint.get("raster-opacity")?ei.ReadWrite:ei.ReadOnly,o.LESS),v=e.getTile(g),_=t.transform.calculatePosMatrix(g.toUnwrapped(),d);v.registerFadeDuration(i.paint.get("raster-fade-duration"));var x=e.findLoadedParent(g,0),b=Cn(v,x,e,i,t.transform),w=void 0,S=void 0,T="nearest"===i.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),v.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),x?(x.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,x.tileID.overscaledZ-v.tileID.overscaledZ),S=[v.tileID.canonical.x*w%1,v.tileID.canonical.y*w%1]):v.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var C=pn(_,S||[0,0],w||1,b,i);a instanceof V?s.draw(n,o.TRIANGLES,y,ii.disabled,l,ni.disabled,C,i.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(n,o.TRIANGLES,y,c[g.overscaledZ],l,ni.disabled,C,i.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(e,i,r){var n,o,a,s,l,u,c,p,h,d,f,m,g,y,v,_,x,b,w,S=r.paint.get("background-color"),T=r.paint.get("background-opacity");if(0!==T){var C=e.context,I=C.gl,E=e.transform,M=E.tileSize,A=r.paint.get("background-pattern");if(!e.isPatternMissing(A)){var L=!A&&1===S.a&&1===T&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===L){var k=ii.disabled,P=e.depthModeForSublayer(0,"opaque"==L?ei.ReadWrite:ei.ReadOnly),D=e.colorModeForRenderPass(),z=e.useProgram(A?"backgroundPattern":"background"),O=E.coveringTiles({tileSize:M});A&&(C.activeTexture.set(I.TEXTURE0),e.imageManager.bind(e.context));for(var N=r.getCrossfadeParameters(),R=0,B=O;R<B.length;R+=1){var j=B[R],F=e.transform.calculatePosMatrix(j.toUnwrapped()),U=A?(n=F,o=T,a=e,s=A,l={tileID:j,tileSize:M},u=N,h=c=void 0,t.extend((c=s,p=u,d=l,f=(h=a).imageManager.getPattern(c.from.toString()),m=h.imageManager.getPattern(c.to.toString()),y=(g=h.imageManager.getPixelSize()).width,v=g.height,_=Math.pow(2,d.tileID.overscaledZ),b=(x=d.tileSize*Math.pow(2,h.transform.tileZoom)/_)*(d.tileID.canonical.x+d.tileID.wrap*_),w=x*d.tileID.canonical.y,{u_image:0,u_pattern_tl_a:f.tl,u_pattern_br_a:f.br,u_pattern_tl_b:m.tl,u_pattern_br_b:m.br,u_texsize:[y,v],u_mix:p.t,u_pattern_size_a:f.displaySize,u_pattern_size_b:m.displaySize,u_scale_a:p.fromScale,u_scale_b:p.toScale,u_tile_units_to_pixels:1/Vi(d,1,h.transform.tileZoom),u_pixel_coord_upper:[b>>16,w>>16],u_pixel_coord_lower:[65535&b,65535&w]}),{u_matrix:n,u_opacity:o})):{u_matrix:F,u_opacity:T,u_color:S};z.draw(C,I.TRIANGLES,P,k,D,ni.disabled,U,r.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}}}},debug:function(t,e,i){for(var r=0;r<i.length;r++)zn(t,e,i[r])},custom:function(t,e,i){var r=t.context,n=i.implementation;if("offscreen"===t.renderPass){var o=n.prerender;o&&(t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),o.call(n,r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),r.setStencilMode(ii.disabled);var a="3d"===n.renderingMode?new ei(t.context.gl.LEQUAL,ei.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,ei.ReadOnly);r.setDepthMode(a),n.render(r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState(),r.bindFramebuffer.set(null)}}};function Rn(t,e){this.points=t,this.planes=e}function Bn(e,i){this.min=e,this.max=i,this.center=t.scale$2([],t.add([],this.min,this.max),.5)}
2function jn(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}function Fn(e,i,r,n,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=i||22,this._minPitch=null==r?0:r,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new jn,this._posMatrixCache={},this._alignedPosMatrixCache={}}On.prototype.resize=function(e,i){if(this.width=e*t.browser.devicePixelRatio,this.height=i*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,n=this.style._order;r<n.length;r+=1)this.style._layers[n[r]].resize()},On.prototype.setup=function(){var e=this.context,i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(i,wr.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(r,wr.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var n=new t.StructArrayLayout4i8;n.emplaceBack(0,0,0,0),n.emplaceBack(t.EXTENT,0,t.EXTENT,0),n.emplaceBack(0,t.EXTENT,0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(n,U.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,wr.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new ii({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},On.prototype.clearStencil=function(){var e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var r=t.create();t.ortho(r,0,this.width,this.height,0,0,1),t.scale(r,r,[i.drawingBufferWidth,i.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,i.TRIANGLES,ei.disabled,this.stencilClearMode,ri.disabled,ni.disabled,an(r),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},On.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,an(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},On.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)},On.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)},On.prototype.stencilConfigForOverlap=function(t){var e,i=this.context.gl,r=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),n=r[r.length-1].overscaledZ,o=r[0].overscaledZ-n+1;if(1<o){this.currentStencilSource=void 0,256<this.nextStencilID+o&&this.clearStencil();for(var a={},s=0;s<o;s++)a[s+n]=new ii({func:i.GEQUAL,mask:255},s+this.nextStencilID,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID+=o,[a,r]}return[((e={})[n]=ii.disabled,e),r]}
2,On.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new ri([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?ri.unblended:ri.alphaBlended},On.prototype.depthModeForSublayer=function(t,e,i){if(!this.opaquePassEnabledForLayer())return ei.disabled;var r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new ei(i||this.context.gl.LEQUAL,e,[r,r])},On.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},On.prototype.render=function(e,i){var r=this;this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var n=this.style._order,o=this.style.sourceCaches;for(var a in o){var s=o[a];s.used&&s.prepare(this.context)}var l,u,c={},p={},h={};for(var d in o){var f=o[d];c[d]=f.getVisibleCoordinates(),p[d]=c[d].slice().reverse(),h[d]=f.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var m=0;m<n.length;m++)if(this.style._layers[n[m]].is3D()){this.opaquePassCutoff=m;break}this.renderPass="offscreen";for(var g=0,y=n;g<y.length;g+=1){var v=this.style._layers[y[g]];if(v.hasOffscreenPass()&&!v.isHidden(this.transform.zoom)){var _=p[v.source];"custom"!==v.type&&!_.length||this.renderLayer(this,o[v.source],v,_)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=n.length-1;0<=this.currentLayer;this.currentLayer--){var x=this.style._layers[n[this.currentLayer]],b=o[x.source],w=c[x.source];this._renderTileClippingMasks(x,w),this.renderLayer(this,b,x,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var S=this.style._layers[n[this.currentLayer]],T=o[S.source],C=("symbol"===S.type?h:p)[S.source];this._renderTileClippingMasks(S,c[S.source]),this.renderLayer(this,T,S,C)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach((function(t){t.source&&!t.isHidden(r.transform.zoom)&&(t.source!==(u&&u.id)&&(u=r.style.sourceCaches[t.source]),(!l||l.getSource().maxzoom<u.getSource().maxzoom)&&(l=u))})),l&&Nn.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&function(t){var e=t.transform.padding;kn(t,t.transform.height-(e.top||0),3,In),kn(t,e.bottom||0,3,En),Pn(t,e.left||0,3,Mn),Pn(t,t.transform.width-(e.right||0),3,An);var i,r,n,o,a=t.transform.centerPoint;Dn(i=t,(r=a.x)-1,(n=t.transform.height-a.y)-10,2,20,o=Ln),Dn(i,r-10,n-1,20,2,o)}(this),this.context.setDefault()},On.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),Nn[i.type](t,e,i,r,this.style.placement.variableOffsets),this.gpuTimingEnd())},On.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,i=this.gpuTimers[t.id];(i=i||(this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}
vendor: 18,047 bytes, line 2
2)).calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,i.query)}},On.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},On.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},On.prototype.queryGpuTimers=function(t){var e={};for(var i in t){var r=t[i],n=this.context.extTimerQuery,o=n.getQueryObjectEXT(r.query,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(r.query),e[i]=o}return e},On.prototype.translatePosMatrix=function(e,i,r,n,o){if(!r[0]&&!r[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);r=[r[0]*l-r[1]*s,r[0]*s+r[1]*l]}var u=[o?r[0]:Vi(i,r[0],this.transform.zoom),o?r[1]:Vi(i,r[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},On.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},On.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&0<e.length?e.pop():null},On.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),i=this.imageManager.getPattern(t.to.toString());return!e||!i},On.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 $r(this.context,0,Jr[t],e,mn[t],this._showOverdrawInspector)),this.cache[i]},On.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()},On.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)},On.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},On.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()},Rn.fromInvProjectionMatrix=function(e,i,r){var n=Math.pow(2,r),o=[[-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(i){return t.transformMat4([],i,e)})).map((function(e){return t.scale$1([],e,1/e[3]/i*n)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var i=t.sub([],o[e[0]],o[e[1]]),r=t.sub([],o[e[2]],o[e[1]]),n=t.normalize([],t.cross([],i,r)),a=-t.dot(n,o[e[1]]);return n.concat(a)}));return new Rn(o,a)},Bn.prototype.quadrant=function(e){for(var i=[e%2==0,e<2],r=t.clone$2(this.min),n=t.clone$2(this.max),o=0;o<i.length;o++)r[o]=i[o]?this.min[o]:this.center[o],n[o]=i[o]?this.center[o]:this.max[o];return n[2]=this.max[2],new Bn(r,n)},Bn.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},Bn.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},Bn.prototype.intersects=function(e){for(var i=[[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]],r=!0,n=0;n<e.planes.length;n++){for(var o=e.planes[n],a=0,s=0;s<i.length;s++)a+=0<=t.dot$1(o,i[s]);if(0===a)return 0;a!==i.length&&(r=!1)}if(r)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<e.points.length;p++){var h=e.points[p][l]-this.min[l];u=Math.min(u,h),c=Math.max(c,h)}if(c<0||u>this.max[l]-this.min[l])return 0}return 1},jn.prototype.interpolate=function(e,i,r){return null!=i.top&&null!=e.top&&(this.top=t.number(e.top,i.top,r)),null!=i.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,i.bottom,r)),null!=i.left&&null!=e.left&&(this.left=t.number(e.left,i.left,r)),null!=i.right&&null!=e.right&&(this.right=t.number(e.right,i.right,r)),this},jn.prototype.getCenter=function(e,i){var r=t.clamp((this.left+e-this.right)/2,0,e),n=t.clamp((this.top+i-this.bottom)/2,0,i);return new t.Point(r,n)},jn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},jn.prototype.clone=function(){return new jn(this.top,this.bottom,this.left,this.right)},jn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Un={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}};function Vn(e){var i,r,n,o;this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(i=this._updateHashUnthrottled.bind(this),r=!1,n=null,o=function(){n=null,r&&(i(),n=setTimeout(o,300),r=!1)},function(){return r=!0,n||o(),n})}function qn(t){this._map=t,this.clear()}Fn.prototype.clone=function(){var t=new Fn(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},Un.minZoom.get=function(){return this._minZoom},Un.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Un.maxZoom.get=function(){return this._maxZoom},Un.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Un.minPitch.get=function(){return this._minPitch},Un.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Un.maxPitch.get=function(){return this._maxPitch},Un.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Un.renderWorldCopies.get=function(){return this._renderWorldCopies},Un.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Un.worldSize.get=function(){return this.tileSize*this.scale},Un.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Un.size.get=function(){return new t.Point(this.width,this.height)},Un.bearing.get=function(){return-this.angle/Math.PI*180},Un.bearing.set=function(e){var i=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Un.pitch.get=function(){return this._pitch/Math.PI*180},Un.pitch.set=function(e){var i=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())},Un.fov.get=function(){return this._fov/Math.PI*180},Un.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())},Un.zoom.get=function(){return this._zoom},Un.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Un.center.get=function(){return this._center},Un.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Un.padding.get=function(){return this._edgeInsets.toJSON()},Un.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Un.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Fn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Fn.prototype.interpolatePadding=function(t,e,i){this._unmodified=!1,this._edgeInsets.interpolate(t,e,i),this._constrain(),this._calcMatrices()},Fn.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Fn.prototype.getVisibleUnwrappedCoordinates=function(e){var i=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new t.Point(0,0)),n=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(r.x,n.x,o.x,a.x)),l=Math.floor(Math.max(r.x,n.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&i.push(new t.UnwrappedTileID(u,e));return i},Fn.prototype.coveringTiles=function(e){var i=this.coveringZoomLevel(e),r=i;if(void 0!==e.minzoom&&i<e.minzoom)return[];void 0!==e.maxzoom&&i>e.maxzoom&&(i=e.maxzoom);var n=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,i),a=[o*n.x,o*n.y,0],s=Rn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,i),l=e.minzoom||0;function u(t){return{aabb:new Bn([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}}this.pitch<=60&&this._edgeInsets.top<.1&&(l=i);var c=[],p=[],h=i,d=e.reparseOverscaled?r:i;if(this._renderWorldCopies)for(var f=1;f<=3;f++)c.push(u(-f)),c.push(u(f));for(c.push(u(0));0<c.length;){var m=c.pop(),g=m.x,y=m.y,v=m.fullyVisible;if(!v){var _=m.aabb.intersects(s);if(0===_)continue;v=2===_}var x=m.aabb.distanceX(a),b=m.aabb.distanceY(a),w=Math.max(Math.abs(x),Math.abs(b));if(m.zoom===h||w>3+(1<<h-m.zoom)-2&&m.zoom>=l)p.push({tileID:new t.OverscaledTileID(m.zoom===h?d:m.zoom,m.wrap,m.zoom,g,y),distanceSq:t.sqrLen([a[0]-.5-g,a[1]-.5-y])});else for(var S=0;S<4;S++){var T=(g<<1)+S%2,C=(y<<1)+(S>>1);c.push({aabb:m.aabb.quadrant(S),zoom:m.zoom+1,x:T,y:C,wrap:m.wrap,fullyVisible:v})}}return p.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Fn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Un.unmodified.get=function(){return this._unmodified},Fn.prototype.zoomScale=function(t){return Math.pow(2,t)},Fn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Fn.prototype.project=function(e){var i=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(i)*this.worldSize)},Fn.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Un.point.get=function(){return this.project(this.center)},Fn.prototype.setLocationAtPoint=function(e,i){var r=this.pointCoordinate(i),n=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(r.x-n.x),o.y-(r.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},Fn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Fn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Fn.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Fn.prototype.coordinateLocation=function(t){return t.toLngLat()},Fn.prototype.pointCoordinate=function(e){var i=[e.x,e.y,0,1],r=[e.x,e.y,1,1];t.transformMat4(i,i,this.pixelMatrixInverse),t.transformMat4(r,r,this.pixelMatrixInverse);var n=i[3],o=r[3],a=i[1]/n,s=r[1]/o,l=i[2]/n,u=r[2]/o,c=l==u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(i[0]/n,r[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},Fn.prototype.coordinatePoint=function(e){var i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(i,i,this.pixelMatrix),new t.Point(i[0]/i[3],i[1]/i[3])},Fn.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Fn.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Fn.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])},Fn.prototype.calculatePosMatrix=function(e,i){void 0===i&&(i=!1);var r=e.key,n=i?this._alignedPosMatrixCache:this._posMatrixCache;if(n[r])return n[r];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,i?this.alignedProjMatrix:this.projMatrix,l),n[r]=new Float32Array(l),n[r]},Fn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Fn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,i,r,n,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,i=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var d=this.point,f=Math.max(i||0,e||0);if(f)return this.center=this.unproject(new t.Point(i?(l+s)/2:d.x,e?(a+o)/2:d.y)),this.zoom+=this.scaleZoom(f),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=d.y,g=u.y/2;m-g<o&&(n=o+g),a<m+g&&(n=a-g)}if(this.lngRange){var y=d.x,v=u.x/2;y-v<s&&(r=s+v),l<y+v&&(r=l-v)}void 0===r&&void 0===n||(this.center=this.unproject(new t.Point(void 0!==r?r:d.x,void 0!==n?n:d.y))),this._unmodified=c,this._constraining=!1}},Fn.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var i=Math.PI/2+this._pitch,r=this._fov*(.5+e.y/this.height),n=Math.sin(r)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-i-r,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,h=this.height%2/2,d=Math.cos(this.angle),f=Math.sin(this.angle),m=a-Math.round(a)+d*p+f*h,g=s-Math.round(s)+d*h+f*p,y=new Float64Array(c);if(t.translate(y,y,[.5<m?m-1:m,.5<g?g-1:g,0]),this.alignedProjMatrix=y,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Fn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(i,i,this.pixelMatrix)[3]/this.cameraToCenterDistance},Fn.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},Fn.prototype.getCameraQueryGeometry=function(e){var i=this.getCameraPoint();if(1===e.length)return[e[0],i];for(var r=i.x,n=i.y,o=i.x,a=i.y,s=0,l=e;s<l.length;s+=1){var u=l[s];r=Math.min(r,u.x),n=Math.min(n,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}return[new t.Point(r,n),new t.Point(o,n),new t.Point(o,a),new t.Point(r,a),new t.Point(r,n)]},Object.defineProperties(Fn.prototype,Un),Vn.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Vn.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Vn.prototype.getHashString=function(e){var i=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,n),a=Math.round(i.lng*o)/o,s=Math.round(i.lat*o)/o,l=this._map.getBearing(),u=this._map.getPitch(),c="";if(c+=e?"/"+a+"/"+s+"/"+r:r+"/"+s+"/"+a,(l||u)&&(c+="/"+Math.round(10*l)/10),u&&(c+="/"+Math.round(u)),this._hashName){var p=this._hashName,h=!1,d=t.window.location.hash.slice(1).split("&").map((function(t){var e=t.split("=")[0];return e===p?(h=!0,e+"="+c):t})).filter((function(t){return t}));return h||d.push(p+"="+c),"#"+d.join("&")}return"#"+c},Vn.prototype._getCurrentHash=function(){var e,i=this,r=t.window.location.hash.replace("#","");return this._hashName?(r.split("&").map((function(t){return t.split("=")}
2)).forEach((function(t){t[0]===i._hashName&&(e=t)})),(e&&e[1]||"").split("/")):r.split("/")},Vn.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},Vn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(e){}};var Gn={linearity:.3,easing:t.bezier(0,0,.3,1)},Zn=t.extend({deceleration:2500,maxSpeed:1400},Gn),Hn=t.extend({deceleration:20,maxSpeed:1400},Gn),Wn=t.extend({deceleration:1e3,maxSpeed:360},Gn),Yn=t.extend({deceleration:1e3,maxSpeed:90},Gn);function Kn(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function Xn(e,i,r){var n=r.maxSpeed,o=r.linearity,a=r.deceleration,s=t.clamp(e*o/(i/1e3),-n,n),l=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*l,amount:s*(l/2)}}function Jn(t,e){this._map=t,this._clickTolerance=e.clickTolerance}qn.prototype.clear=function(){this._inertiaBuffer=[]},qn.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},qn.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,i=t.browser.now();0<e.length&&160<i-e[0].time;)e.shift()},qn.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var i={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},r=0,n=this._inertiaBuffer;r<n.length;r+=1){var o=n[r].settings;i.zoom+=o.zoomDelta||0,i.bearing+=o.bearingDelta||0,i.pitch+=o.pitchDelta||0,o.panDelta&&i.pan._add(o.panDelta),o.around&&(i.around=o.around),o.pinchAround&&(i.pinchAround=o.pinchAround)}var a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(i.pan.mag()){var l=Xn(i.pan.mag(),a,t.extend({},Zn,e||{}));s.offset=i.pan.mult(l.amount/i.pan.mag()),s.center=this._map.transform.center,Kn(s,l)}if(i.zoom){var u=Xn(i.zoom,a,Hn);s.zoom=this._map.transform.zoom+u.amount,Kn(s,u)}if(i.bearing){var c=Xn(i.bearing,a,Wn);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Kn(s,c)}if(i.pitch){var p=Xn(i.pitch,a,Yn);s.pitch=this._map.transform.pitch+p.amount,Kn(s,p)}if(s.zoom||s.bearing){var h=void 0===i.pinchAround?i.around:i.pinchAround;s.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Qn=function(e){function r(r,n,o,a){void 0===a&&(a={});var s=i.mousePos(n.getCanvasContainer(),o),l=n.unproject(s);e.call(this,r,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(r.__proto__=e);var n={defaultPrevented:{configurable:!0}};return((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),$n=function(e){function r(r,n,o){var a="touchend"===r?o.changedTouches:o.touches,s=i.touchPos(n.getCanvasContainer(),a),l=s.map((function(t){return n.unproject(t)})),u=s.reduce((function(t,e,i,r){return t.add(e.div(r.length))}),new t.Point(0,0)),c=n.unproject(u);e.call(this,r,{points:s,point:u,lngLats:l,lngLat:c,originalEvent:o}),this._defaultPrevented=!1}e&&(r.__proto__=e);var n={defaultPrevented:{configurable:!0}};return((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),to=function(t){function e(e,i,r){t.call(this,e,{originalEvent:r}),this._defaultPrevented=!1}t&&(e.__proto__=t);var i={defaultPrevented:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented}
vendor: 4,867 bytes, line 2
2,Object.defineProperties(e.prototype,i),e}(t.Event);function eo(t){this._map=t}function io(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1}function ro(t,e){for(var i={},r=0;r<t.length;r++)i[t[r].identifier]=e[r];return i}function no(t){this.reset(),this.numTouches=t.numTouches}function oo(t){this.singleTap=new no(t),this.numTaps=t.numTaps,this.reset()}function ao(){this._zoomIn=new oo({numTouches:1,numTaps:2}),this._zoomOut=new oo({numTouches:2,numTaps:1}),this.reset()}function so(t){this.reset(),this._clickTolerance=t.clickTolerance||1}Jn.prototype.reset=function(){delete this._mousedownPos},Jn.prototype.wheel=function(t){return this._firePreventable(new to(t.type,this._map,t))},Jn.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Qn(t.type,this._map,t))},Jn.prototype.mouseup=function(t){this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.dblclick=function(t){return this._firePreventable(new Qn(t.type,this._map,t))},Jn.prototype.mouseover=function(t){this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.mouseout=function(t){this._map.fire(new Qn(t.type,this._map,t))},Jn.prototype.touchstart=function(t){return this._firePreventable(new $n(t.type,this._map,t))},Jn.prototype.touchmove=function(t){this._map.fire(new $n(t.type,this._map,t))},Jn.prototype.touchend=function(t){this._map.fire(new $n(t.type,this._map,t))},Jn.prototype.touchcancel=function(t){this._map.fire(new $n(t.type,this._map,t))},Jn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Jn.prototype.isEnabled=function(){return!0},Jn.prototype.isActive=function(){return!1},Jn.prototype.enable=function(){},Jn.prototype.disable=function(){},eo.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},eo.prototype.mousemove=function(t){this._map.fire(new Qn(t.type,this._map,t))},eo.prototype.mousedown=function(){this._delayContextMenu=!0},eo.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},eo.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Qn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},eo.prototype.isEnabled=function(){return!0},eo.prototype.isActive=function(){return!1},eo.prototype.enable=function(){},eo.prototype.disable=function(){},io.prototype.isEnabled=function(){return!!this._enabled},io.prototype.isActive=function(){return!!this._active},io.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},io.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},io.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(i.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},io.prototype.mousemoveWindow=function(t,e){if(this._active){var r=e;if(!(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)<this._clickTolerance)){var n=this._startPos;this._lastPos=r,this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var o=Math.min(n.x,r.x),a=Math.max(n.x,r.x),s=Math.min(n.y,r.y),l=Math.max(n.y,r.y);i.setTransform(this._box,"translate("+o+"px,"+s+"px)"),this._box.style.width=a-o+"px",this._box.style.height=l-s+"px"}}},io.prototype.mouseupWindow=function(e,r){var n=this;if(this._active&&0===e.button){var o=this._startPos,a=r;if(this.reset(),i.suppressClick(),o.x!==a.x||o.y!==a.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(o,a,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",e)}},io.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},io.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos},io.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,{originalEvent:i}))},no.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},no.prototype.touchstart=function(e,i,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){for(var i=new t.Point(0,0),r=0,n=e;r<n.length;r+=1)i._add(n[r]);return i.div(e.length)}(i),this.touches=ro(r,i)))}
2,no.prototype.touchmove=function(t,e,i){if(!this.aborted&&this.centroid){var r=ro(i,e);for(var n in this.touches){var o=r[n];(!o||30<o.dist(this.touches[n]))&&(this.aborted=!0)}}},no.prototype.touchend=function(t,e,i){if((!this.centroid||500<t.timeStamp-this.startTime)&&(this.aborted=!0),0===i.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}},oo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},oo.prototype.touchstart=function(t,e,i){this.singleTap.touchstart(t,e,i)},oo.prototype.touchmove=function(t,e,i){this.singleTap.touchmove(t,e,i)},oo.prototype.touchend=function(t,e,i){var r=this.singleTap.touchend(t,e,i);if(r){var n=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(n&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}},ao.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ao.prototype.touchstart=function(t,e,i){this._zoomIn.touchstart(t,e,i),this._zoomOut.touchstart(t,e,i)},ao.prototype.touchmove=function(t,e,i){this._zoomIn.touchmove(t,e,i),this._zoomOut.touchmove(t,e,i)},ao.prototype.touchend=function(t,e,i){var r=this,n=this._zoomIn.touchend(t,e,i),o=this._zoomOut.touchend(t,e,i);return n?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(n)},{originalEvent:t})}}):o?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},ao.prototype.touchcancel=function(){this.reset()},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};var lo={0:1,2:2};function uo(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()}so.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},so.prototype._correctButton=function(t,e){return!1},so.prototype._move=function(t,e){return{}},so.prototype.mousedown=function(t,e){if(!this._lastPoint){var r=i.mouseButton(t);this._correctButton(t,r)&&(this._lastPoint=e,this._eventButton=r)}},so.prototype.mousemoveWindow=function(t,e){var i,r,n=this._lastPoint;if(n)if(t.preventDefault(),i=this._eventButton,r=lo[i],void 0===t.buttons||(t.buttons&r)!==r)this.reset();else if(this._moved||!(e.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(n,e)},so.prototype.mouseupWindow=function(t){this._lastPoint&&i.mouseButton(t)===this._eventButton&&(this._moved&&i.suppressClick(),this.reset())},so.prototype.enable=function(){this._enabled=!0},so.prototype.disable=function(){this._enabled=!1,this.reset()},so.prototype.isEnabled=function(){return this._enabled},so.prototype.isActive=function(){return this._active};var co,po,ho,fo=(_o.__proto__=ho=so,((_o.prototype=Object.create(ho&&ho.prototype)).constructor=_o).prototype.mousedown=function(t,e){ho.prototype.mousedown.call(this,t,e),this._lastPoint&&(this._active=!0)},_o.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},_o.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},_o),mo=(vo.__proto__=po=so,((vo.prototype=Object.create(po&&po.prototype)).constructor=vo).prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},vo.prototype._move=function(t,e){var i=.8*(e.x-t.x);if(i)return this._active=!0,{bearingDelta:i}},vo.prototype.contextmenu=function(t){t.preventDefault()},vo),go=(yo.__proto__=co=so,((yo.prototype=Object.create(co&&co.prototype)).constructor=yo).prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},yo.prototype._move=function(t,e){var i=-.5*(e.y-t.y);if(i)return this._active=!0,{pitchDelta:i}},yo.prototype.contextmenu=function(t){t.preventDefault()},yo);function yo(){co.apply(this,arguments)}function vo(){po.apply(this,arguments)}function _o(){ho.apply(this,arguments)}function xo(){this.reset()}function bo(t,e,i){for(var r=0;r<t.length;r++)if(t[r].identifier===i)return e[r]}function wo(t,e){return Math.log(t/e)/Math.LN2}uo.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)}
2,uo.prototype.touchstart=function(t,e,i){return this._calculateTransform(t,e,i)},uo.prototype.touchmove=function(t,e,i){if(this._active)return t.preventDefault(),this._calculateTransform(t,e,i)},uo.prototype.touchend=function(t,e,i){this._calculateTransform(t,e,i),this._active&&i.length<this._minTouches&&this.reset()},uo.prototype.touchcancel=function(){this.reset()},uo.prototype._calculateTransform=function(e,i,r){0<r.length&&(this._active=!0);var n=ro(r,i),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var l in n){var u=n[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,n[l]=u)}if(this._touches=n,!(s<this._minTouches)&&a.mag()){var p=a.div(s);if(this._sum._add(p),!(this._sum.mag()<this._clickTolerance))return{around:o.div(s),panDelta:p}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active},xo.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},xo.prototype._start=function(t){},xo.prototype._move=function(t,e,i){return{}},xo.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]]))},xo.prototype.touchmove=function(t,e,i){if(this._firstTwoTouches){t.preventDefault();var r=this._firstTwoTouches,n=r[1],o=bo(i,e,r[0]),a=bo(i,e,n);if(o&&a){var s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,t)}}},xo.prototype.touchend=function(t,e,r){if(this._firstTwoTouches){var n=this._firstTwoTouches,o=n[1],a=bo(r,e,n[0]),s=bo(r,e,o);a&&s||(this._active&&i.suppressClick(),this.reset())}},xo.prototype.touchcancel=function(){this.reset()},xo.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},xo.prototype.disable=function(){this._enabled=!1,this.reset()},xo.prototype.isEnabled=function(){return this._enabled},xo.prototype.isActive=function(){return this._active};var So,To=(Co.__proto__=So=xo,((Co.prototype=Object.create(So&&So.prototype)).constructor=Co).prototype.reset=function(){So.prototype.reset.call(this),delete this._distance,delete this._startDistance},Co.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},Co.prototype._move=function(t,e){var i=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(wo(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:wo(this._distance,i),pinchAround:e}},Co);function Co(){So.apply(this,arguments)}function Io(t,e){return 180*t.angleWith(e)/Math.PI}var Eo,Mo=(Ao.__proto__=Eo=xo,((Ao.prototype=Object.create(Eo&&Eo.prototype)).constructor=Ao).prototype.reset=function(){Eo.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},Ao.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},Ao.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:Io(this._vector,i),pinchAround:e}},Ao.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,i=Io(t,this._startVector);return Math.abs(i)<e},Ao);function Ao(){Eo.apply(this,arguments)}function Lo(t){return Math.abs(t.y)>Math.abs(t.x)}function ko(){var t=zo;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep}var Po,Do=(Oo.__proto__=Po=xo,((Oo.prototype=Object.create(Po&&Po.prototype)).constructor=Oo).prototype.reset=function(){Po.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},Oo.prototype._start=function(t){Lo((this._lastPoints=t)[0].sub(t[1]))&&(this._valid=!1)},Oo.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}}
2,Oo.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;var o=0<t.y==0<e.y;return Lo(t)&&Lo(e)&&o}},Oo),zo={panStep:100,bearingStep:15,pitchStep:10};function Oo(){Po.apply(this,arguments)}function No(t){return t*(2-t)}function Ro(e,i){this._map=e,this._el=e.getCanvasContainer(),this._handler=i,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)}function Bo(t,e){this._clickZoom=t,this._tapZoom=e}function jo(){this.reset()}function Fo(){this._tap=new oo({numTouches:1,numTaps:1}),this.reset()}function Uo(t,e,i){this._el=t,this._mousePan=e,this._touchPan=i}function Vo(t,e,i){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=i}function qo(t,e,i,r){this._el=t,this._touchZoom=e,this._touchRotate=i,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}function Go(t){return t.zoom||t.drag||t.pitch||t.rotate}ko.prototype.reset=function(){this._active=!1},ko.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var i=0,r=0,n=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(t.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:No,zoom:i?Math.round(l)+i*(t.shiftKey?2:1):l,bearing:s.getBearing()+r*e._bearingStep,pitch:s.getPitch()+n*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},ko.prototype.enable=function(){this._enabled=!0},ko.prototype.disable=function(){this._enabled=!1,this.reset()},ko.prototype.isEnabled=function(){return this._enabled},ko.prototype.isActive=function(){return this._active},Ro.prototype.setZoomRate=function(t){this._defaultZoomRate=t},Ro.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},Ro.prototype.isEnabled=function(){return!!this._enabled},Ro.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},Ro.prototype.isZooming=function(){return!!this._zooming},Ro.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},Ro.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ro.prototype.wheel=function(e){if(this.isEnabled()){var i=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=t.browser.now(),n=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==i&&i%4.000244140625==0?this._type="wheel":0!==i&&Math.abs(i)<4?this._type="trackpad":400<n?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this._active||this._start(e)),e.preventDefault()}}
vendor: 28,790 bytes, line 2
2,Ro.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},Ro.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=i.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Ro.prototype.renderFrame=function(){return this._onScrollFrame()},Ro.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var i=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&4.000244140625<Math.abs(this._delta)?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:i.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(p);a=t.number(l,s,h),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-i.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Ro.prototype._smoothOutEasing=function(e){var i=t.ease;if(this._prevEase){var r=this._prevEase,n=(t.browser.now()-r.start)/r.duration,o=r.easing(.01+n)-r.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);i=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:i},i},Ro.prototype.reset=function(){this._active=!1},Bo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Bo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Bo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Bo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()},jo.prototype.reset=function(){this._active=!1},jo.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(i){i.easeTo({duration:300,zoom:i.getZoom()+(t.shiftKey?-1:1),around:i.unproject(e)},{originalEvent:t})}}},jo.prototype.enable=function(){this._enabled=!0},jo.prototype.disable=function(){this._enabled=!1,this.reset()},jo.prototype.isEnabled=function(){return this._enabled},jo.prototype.isActive=function(){return this._active},Fo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Fo.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))},Fo.prototype.touchmove=function(t,e,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;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)},Fo.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)},Fo.prototype.touchcancel=function(){this.reset()},Fo.prototype.enable=function(){this._enabled=!0},Fo.prototype.disable=function(){this._enabled=!1,this.reset()},Fo.prototype.isEnabled=function(){return this._enabled},Fo.prototype.isActive=function(){return this._active},Uo.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Uo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Uo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Uo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()},Vo.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Vo.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Vo.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Vo.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()},qo.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")},qo.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},qo.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},qo.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},qo.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},qo.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Zo,Ho=((Zo=t.Event)&&(Wo.__proto__=Zo),(Wo.prototype=Object.create(Zo&&Zo.prototype)).constructor=Wo);function Wo(){Zo.apply(this,arguments)}function Yo(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}function Ko(e,r){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new qn(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),t.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;o<a.length;o+=1){var s=a[o],l=s[0];i.addEventListener(l,s[1],l===t.window.document?this.handleWindowEvent:this.handleEvent,s[2])}}function Xo(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)}Ko.prototype.destroy=function(){for(var e=0,r=this._listeners;e<r.length;e+=1){var n=r[e],o=n[0];i.removeEventListener(o,n[1],o===t.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},Ko.prototype._addDefaultHandlers=function(t){var e=this._map,i=e.getCanvasContainer();this._add("mapEvent",new Jn(e,t));var r=e.boxZoom=new io(e,t);this._add("boxZoom",r);var n=new ao,o=new jo;e.doubleClickZoom=new Bo(o,n),this._add("tapZoom",n),this._add("clickZoom",o);var a=new Fo;this._add("tapDragZoom",a);var s=e.touchPitch=new Do;this._add("touchPitch",s);var l=new mo(t),u=new go(t);e.dragRotate=new Vo(t,l,u),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",u,["mouseRotate"]);var c=new fo(t),p=new uo(t);e.dragPan=new Uo(i,c,p),this._add("mousePan",c),this._add("touchPan",p,["touchZoom","touchRotate"]);var h=new Mo,d=new To;e.touchZoomRotate=new qo(i,d,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",d,["touchPan","touchRotate"]);var f=e.scrollZoom=new Ro(e,this);this._add("scrollZoom",f,["mousePan"]);var m=e.keyboard=new ko;this._add("keyboard",m),this._add("blockableMapEvent",new eo(e));for(var g=0,y=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];g<y.length;g+=1){var v=y[g];t.interactive&&t[v]&&e[v].enable(t[v])}},Ko.prototype._add=function(t,e,i){this._handlers.push({handlerName:t,handler:e,allowed:i}),this._handlersById[t]=e},Ko.prototype.stop=function(){if(!this._updatingCamera){for(var t=0,e=this._handlers;t<e.length;t+=1)e[t].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},Ko.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},Ko.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ko.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ko.prototype.isMoving=function(){return Boolean(Go(this._eventsInProgress))||this.isZooming()},Ko.prototype._blockedByActive=function(t,e,i){for(var r in t)if(r!==i&&(!e||e.indexOf(r)<0))return!0;return!1},Ko.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},Ko.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},Ko.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var r="renderFrame"===t.type?void 0:t,n={needsRenderFrame:!1},o={},a={},s=t.touches?this._getMapTouches(t.touches):void 0,l=s?i.touchPos(this._el,s):i.mousePos(this._el,t),u=0,c=this._handlers;u<c.length;u+=1){var p=c[u],h=p.handlerName,d=p.handler,f=p.allowed;if(d.isEnabled()){var m=void 0;this._blockedByActive(a,f,h)?d.reset():d[e||t.type]&&(m=d[e||t.type](t,l,s),this.mergeHandlerResult(n,o,m,h,r),m&&m.needsRenderFrame&&this._triggerRenderFrame()),(m||d.isActive())&&(a[h]=d)}}var g={};for(var y in this._previousActiveHandlers)a[y]||(g[y]=r);this._previousActiveHandlers=a,(Object.keys(g).length||Yo(n))&&(this._changes.push([n,o,g]),this._triggerRenderFrame()),(Object.keys(a).length||Yo(n))&&this._map._stop(!0),this._updatingCamera=!1;var v=n.cameraAnimation;v&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],v(this._map))}else this.stop()},Ko.prototype.mergeHandlerResult=function(e,i,r,n,o){if(r){t.extend(e,r);var a={handlerName:n,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(i.zoom=a),void 0!==r.panDelta&&(i.drag=a),void 0!==r.pitchDelta&&(i.pitch=a),void 0!==r.bearingDelta&&(i.rotate=a)}},Ko.prototype._applyChanges=function(){for(var e={},i={},r={},n=0,o=this._changes;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],u=a[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(i,l),t.extend(r,u)}this._updateMapTransform(e,i,r),this._changes=[]},Ko.prototype._updateMapTransform=function(t,e,i){var r=this._map,n=r.transform;if(!Yo(t))return this._fireEvents(e,i);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;var p=n.pointLocation(o?u.sub(o):u);s&&(n.bearing+=s),l&&(n.pitch+=l),a&&(n.zoom+=a),n.setLocationAtPoint(p,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,i)},Ko.prototype._fireEvents=function(e,i){var r=this,n=Go(this._eventsInProgress),o=Go(e),a={};for(var s in e)this._eventsInProgress[s]||(a[s+"start"]=e[s].originalEvent),this._eventsInProgress[s]=e[s];for(var l in!n&&o&&this._fireEvent("movestart",o.originalEvent),a)this._fireEvent(l,a[l]);for(var u in e.rotate&&(this._bearingChanged=!0),o&&this._fireEvent("move",o.originalEvent),e)this._fireEvent(u,e[u].originalEvent);var c,p={};for(var h in this._eventsInProgress){var d=this._eventsInProgress[h],f=d.handlerName,m=d.originalEvent;this._handlersById[f].isActive()||(delete this._eventsInProgress[h],p[h+"end"]=c=i[f]||m)}for(var g in p)this._fireEvent(g,p[g]);var y=Go(this._eventsInProgress);if((n||o)&&!y){this._updatingCamera=!0;var v=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),_=function(t){return 0!==t&&-r._bearingSnap<t&&t<r._bearingSnap};v?(_(v.bearing||this._map.getBearing())&&(v.bearing=0),this._map.easeTo(v,{originalEvent:c})):(this._map.fire(new t.Event("moveend",{originalEvent:c})),_(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},Ko.prototype._fireEvent=function(e,i){this._map.fire(new t.Event(e,i?{originalEvent:i}:{}))},Ko.prototype._requestFrame=function(){var t=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(e){delete t._frameId,t.handleEvent(new Ho("renderFrame",{timeStamp:e})),t._applyChanges()}))},Ko.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};var Jo,Qo=((Jo=t.Evented)&&($o.__proto__=Jo),(($o.prototype=Object.create(Jo&&Jo.prototype)).constructor=$o).prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},$o.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},$o.prototype.panBy=function(e,i,r){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},i),r)},$o.prototype.panTo=function(e,i,r){return this.easeTo(t.extend({center:e},i),r)},$o.prototype.getZoom=function(){return this.transform.zoom},$o.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},$o.prototype.zoomTo=function(e,i,r){return this.easeTo(t.extend({zoom:e},i),r)},$o.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},$o.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},$o.prototype.getBearing=function(){return this.transform.bearing},$o.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},$o.prototype.getPadding=function(){return this.transform.padding},$o.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},$o.prototype.rotateTo=function(e,i,r){return this.easeTo(t.extend({bearing:e},i),r)},$o.prototype.resetNorth=function(e,i){return this.rotateTo(0,t.extend({duration:1e3},e),i),this},$o.prototype.resetNorthPitch=function(e,i){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),i),this},$o.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},$o.prototype.getPitch=function(){return this.transform.pitch},$o.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},$o.prototype.cameraForBounds=function(e,i){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,i)},$o.prototype._cameraForBoxAndBearing=function(e,i,r,n){var o={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=t.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var a=n.padding;n.padding={top:a,bottom:a,right:a,left:a}}n.padding=t.extend(o,n.padding);var s=this.transform,l=s.padding,u=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(i)),p=u.rotate(-r*Math.PI/180),h=c.rotate(-r*Math.PI/180),d=new t.Point(Math.max(p.x,h.x),Math.max(p.y,h.y)),f=new t.Point(Math.min(p.x,h.x),Math.min(p.y,h.y)),m=d.sub(f),g=(s.width-(l.left+l.right+n.padding.left+n.padding.right))/m.x,y=(s.height-(l.top+l.bottom+n.padding.top+n.padding.bottom))/m.y;if(!(y<0||g<0)){var v=Math.min(s.scaleZoom(s.scale*Math.min(g,y)),n.maxZoom),_=t.Point.convert(n.offset),x=new t.Point(_.x+(n.padding.left-n.padding.right)/2,_.y+(n.padding.top-n.padding.bottom)/2).mult(s.scale/s.zoomScale(v));return{center:s.unproject(u.add(c).div(2).sub(x)),zoom:v,bearing:r}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},$o.prototype.fitBounds=function(t,e,i){return this._fitInternal(this.cameraForBounds(t,e),e,i)},$o.prototype.fitScreenCoordinates=function(e,i,r,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(i)),r,n),n,o)},$o.prototype._fitInternal=function(e,i,r){return e?(delete(i=t.extend(e,i)).padding,i.linear?this.easeTo(i,r):this.flyTo(i,r)):this},$o.prototype.jumpTo=function(e,i){this.stop();var r=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&r.zoom!==+e.zoom&&(n=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=t.LngLat.convert(e.center)),"bearing"in e&&r.bearing!==+e.bearing&&(o=!0,r.bearing=+e.bearing),"pitch"in e&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),null==e.padding||r.isPaddingEqual(e.padding)||(r.padding=e.padding),this.fire(new t.Event("movestart",i)).fire(new t.Event("move",i)),n&&this.fire(new t.Event("zoomstart",i)).fire(new t.Event("zoom",i)).fire(new t.Event("zoomend",i)),o&&this.fire(new t.Event("rotatestart",i)).fire(new t.Event("rotate",i)).fire(new t.Event("rotateend",i)),a&&this.fire(new t.Event("pitchstart",i)).fire(new t.Event("pitch",i)).fire(new t.Event("pitchend",i)),this.fire(new t.Event("moveend",i))},$o.prototype.easeTo=function(e,i){var r=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=this.getPadding(),u="zoom"in e?+e.zoom:o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,h="padding"in e?e.padding:n.padding,d=t.Point.convert(e.offset),f=n.centerPoint.add(d),m=n.pointLocation(f),g=t.LngLat.convert(e.center||m);this._normalizeCenter(g);var y,v,_=n.project(m),x=n.project(g).sub(_),b=n.zoomScale(u-o);e.around&&(y=t.LngLat.convert(e.around),v=n.locationPoint(y));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==o,this._rotating=this._rotating||a!==c,this._pitching=this._pitching||p!==s,this._padding=!n.isPaddingEqual(h),this._easeId=e.easeId,this._prepareEase(i,e.noMoveStart,w),clearTimeout(this._easeEndTimeoutID),this._ease((function(e){if(r._zooming&&(n.zoom=t.number(o,u,e)),r._rotating&&(n.bearing=t.number(a,c,e)),r._pitching&&(n.pitch=t.number(s,p,e)),r._padding&&(n.interpolatePadding(l,h,e),f=n.centerPoint.add(d)),y)n.setLocationAtPoint(y,v);else{var m=n.zoomScale(n.zoom-o),g=o<u?Math.min(2,b):Math.max(.5,b),w=Math.pow(g,1-e),S=n.unproject(_.add(x.mult(e*w)).mult(m));n.setLocationAtPoint(n.renderWorldCopies?S.wrap():S,f)}r._fireMoveEvents(i)}),(function(t){r._afterEase(i,t)}),e),this},$o.prototype._prepareEase=function(e,i,r){void 0===r&&(r={}),this._moving=!0,i||r.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.Event("pitchstart",e))},$o.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},$o.prototype._afterEase=function(e,i){if(!this._easeId||!i||this._easeId!==i){delete this._easeId;var r=this._zooming,n=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},$o.prototype.flyTo=function(e,i){var r=this;if(!e.essential&&t.browser.prefersReducedMotion){var n=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,i)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,p="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,d="padding"in e?e.padding:o.padding,f=o.zoomScale(c-a),m=t.Point.convert(e.offset),g=o.centerPoint.add(m),y=o.pointLocation(g),v=t.LngLat.convert(e.center||y);this._normalizeCenter(v);var _=o.project(y),x=o.project(v).sub(_),b=e.curve,w=Math.max(o.width,o.height),S=w/f,T=x.mag();if("minZoom"in e){var C=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),I=w/o.zoomScale(C-a);b=Math.sqrt(I/T*2)}var E=b*b;function M(t){var e=(S*S-w*w+(t?-1:1)*E*E*T*T)/(2*(t?S:w)*E*T);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function L(t){return(Math.exp(t)+Math.exp(-t))/2}var k=M(0),P=function(t){return L(k)/L(k+b*t)},D=function(t){return w*((L(k)*(A(e=k+b*t)/L(e))-A(k))/E)/T;var e},z=(M(1)-k)/b;if(Math.abs(T)<1e-6||!isFinite(z)){if(Math.abs(w-S)<1e-6)return this.easeTo(e,i);var O=S<w?-1:1;z=Math.abs(Math.log(S/w))/b,D=function(){return 0},P=function(t){return Math.exp(O*b*t)}}return e.duration="duration"in e?+e.duration:1e3*z/("screenSpeed"in e?e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(d),this._prepareEase(i,!1),this._ease((function(e){var n=e*z,f=1/P(n);o.zoom=1===e?c:a+o.scaleZoom(f),r._rotating&&(o.bearing=t.number(s,p,e)),r._pitching&&(o.pitch=t.number(l,h,e)),r._padding&&(o.interpolatePadding(u,d,e),g=o.centerPoint.add(m));var y=1===e?v:o.unproject(_.add(x.mult(D(n))).mult(f));o.setLocationAtPoint(o.renderWorldCopies?y.wrap():y,g),r._fireMoveEvents(i)}),(function(){return r._afterEase(i)}),e),this},$o.prototype.isEasing=function(){return!!this._easeFrameId},$o.prototype.stop=function(){return this._stop()},$o.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var i=this._onEaseEnd;delete this._onEaseEnd,i.call(this,e)}if(!t){var r=this.handlers;r&&r.stop()}return this},$o.prototype._ease=function(e,i,r){!1===r.animate||0===r.duration?(e(1),i()):(this._easeStart=t.browser.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$o.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$o.prototype._normalizeBearing=function(e,i){e=t.wrap(e,-180,180);var r=Math.abs(e-i);return Math.abs(e-360-i)<r&&(e-=360),Math.abs(e+360-i)<r&&(e+=360),e},$o.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var i=t.lng-e.center.lng;t.lng+=180<i?-360:i<-180?360:0}},$o);function $o(e,i){Jo.call(this),this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}function ta(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)}function ea(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}Xo.prototype.getDefaultPosition=function(){return"bottom-right"},Xo.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=i.create("div","mapboxgl-ctrl-attrib-inner",this._container),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},Xo.prototype.onRemove=function(){i.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},Xo.prototype._updateEditLink=function(){var e=this._editLink;e=e||(this._editLink=this._container.querySelector(".mapbox-improve-map"));var i=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var r=i.reduce((function(t,e,r){return e.value&&(t+=e.key+"="+e.value+(r<i.length-1?"&":"")),t}),"?");e.href=t.config.FEEDBACK_URL+"/"+r+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow"}},Xo.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Xo.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return"string"!=typeof t?"":t}))):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var i=this._map.style.sourceCaches;for(var r in i){var n=i[r];if(n.used){var o=n.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort((function(t,e){return t.length-e.length}));var a=(t=t.filter((function(e,i){for(var r=i+1;r<t.length;r++)if(0<=t[r].indexOf(e))return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Xo.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")},ta.prototype.onAdd=function(t){this._map=t,this._container=i.create("div","mapboxgl-ctrl");var e=i.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ta.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ta.prototype.getDefaultPosition=function(){return"bottom-left"},ta.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},ta.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},ta.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}},ea.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},ea.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)}},ea.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},ea.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ia={"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"}
2,ra=t.window.HTMLImageElement,na=t.window.HTMLElement,oa=t.window.ImageBitmap,aa={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,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},sa=function(r){function n(e){var i=this;if(null!=(e=t.extend({},aa,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&60<e.maxPitch)throw new Error("maxPitch must be less than or equal to 60");var n=new Fn(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(r.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new ea,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ia,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof na))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return i._update(!1)})),this.on("moveend",(function(){return i._update(!1)})),this.on("zoom",(function(){return i._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Ko(this,e),this._hash=e.hash&&new Vn("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Xo({customAttribution:e.customAttribution})),this.addControl(new ta,e.logoPosition),this.on("style.load",(function(){i.transform.unmodified&&i.jumpTo(i.style.stylesheet)})),this.on("data",(function(e){i._update("style"===e.dataType),i.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){i.fire(new t.Event(e.dataType+"dataloading",e))}))}r&&(n.__proto__=r);var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return((n.prototype=Object.create(r&&r.prototype)).constructor=n).prototype._getMapId=function(){return this._mapId},n.prototype.addControl=function(e,i){if(void 0===i&&e.getDefaultPosition&&(i=e.getDefaultPosition()),void 0===i&&(i="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=e.onAdd(this);this._controls.push(e);var n=this._controlPositions[i];
2return-1!==i.indexOf("bottom")?n.insertBefore(r,n.firstChild):n.appendChild(r),this},n.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var i=this._controls.indexOf(e);return-1<i&&this._controls.splice(i,1),e.onRemove(this),this},n.prototype.resize=function(e){var i=this._containerDimensions(),r=i[0],n=i[1];this._resizeCanvas(r,n),this.transform.resize(r,n),this.painter.resize(r,n);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return this.transform.getBounds()},n.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},n.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},n.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")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.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")},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.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")},n.prototype.getMinPitch=function(){return this.transform.minPitch},n.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")},n.prototype.getMaxPitch=function(){return this.transform.maxPitch},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},n.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},n.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},n.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},n.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},n.prototype._createDelegatedListener=function(t,e,i){var r,n=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:i,delegates:{mousemove:function(r){var a=n.getLayer(e)?n.queryRenderedFeatures(r.point,{layers:[e]}):[];a.length?o||(o=!0,i.call(n,new Qn(t,n,r.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"!==t&&"mouseout"!==t)return{layer:e,listener:i,delegates:((r={})[t]=function(t){var r=n.getLayer(e)?n.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,i.call(n,t),delete t.features)},r)};var a=!1;return{layer:e,listener:i,delegates:{mousemove:function(r){(n.getLayer(e)?n.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,i.call(n,new Qn(t,n,r.originalEvent)))},mouseout:function(e){a&&(a=!1,i.call(n,new Qn(t,n,e.originalEvent)))}}}},n.prototype.on=function(t,e,i){if(void 0===i)return r.prototype.on.call(this,t,e);var n=this._createDelegatedListener(t,e,i);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(n),n.delegates)this.on(o,n.delegates[o]);return this}
vendor: 20,778 bytes, line 2
2,n.prototype.once=function(t,e,i){if(void 0===i)return r.prototype.once.call(this,t,e);var n=this._createDelegatedListener(t,e,i);for(var o in n.delegates)this.once(o,n.delegates[o]);return this},n.prototype.off=function(t,e,i){var n=this;return void 0===i?r.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(r){for(var o=r[t],a=0;a<o.length;a++){var s=o[a];if(s.layer===e&&s.listener===i){for(var l in s.delegates)n.off(l,s.delegates[l]);return o.splice(a,1)}}}(this._delegatedListeners),this)},n.prototype.queryRenderedFeatures=function(e,i){if(!this.style)return[];var r;if(void 0!==i||void 0===e||e instanceof t.Point||Array.isArray(e)||(i=e,e=void 0),i=i||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])r=[t.Point.convert(e)];else{var n=t.Point.convert(e[0]),o=t.Point.convert(e[1]);r=[n,new t.Point(o.x,n.y),o,new t.Point(n.x,o.y),n]}return this.style.queryRenderedFeatures(r,i,this.transform)},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,i){return!1!==(i=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},i)).diff&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(e,i))},n.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},n.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new xr(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t)):delete this.style,this},n.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new xr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},n.prototype._diffStyle=function(e,i){var r=this;if("string"==typeof e){var n=this._requestManager.normalizeStyleURL(e),o=this._requestManager.transformRequest(n,t.ResourceType.Style);t.getJSON(o,(function(e,n){e?r.fire(new t.ErrorEvent(e)):n&&r._updateDiff(n,i)}))}else"object"==typeof e&&this._updateDiff(e,i)},n.prototype._updateDiff=function(e,i){try{this.style.setState(e)&&this._update(!0)}catch(r){t.warnOnce("Unable to perform style diff: "+(r.message||r.error||r)+". Rebuilding the style from scratch."),this._updateStyle(e,i)}},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},n.prototype.isSourceLoaded=function(e){var i=this.style&&this.style.sourceCaches[e];if(void 0!==i)return i.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var i=t[e]._tiles;for(var r in i){var n=i[r];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,i){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,i)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,i,r){void 0===r&&(r={});var n=r.pixelRatio;void 0===n&&(n=1);var o=r.sdf;void 0===o&&(o=!1);var a=r.stretchX,s=r.stretchY,l=r.content;if(this._lazyInitEmptyStyle(),i instanceof ra||oa&&i instanceof oa){var u=t.browser.getImageData(i);this.style.addImage(e,{data:new t.RGBAImage({width:u.width,height:u.height},u.data),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0})}else{if(void 0===i.width||void 0===i.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=i;this.style.addImage(e,{data:new t.RGBAImage({width:i.width,height:i.height},new Uint8Array(i.data)),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0,userImage:c}),c.onAdd&&c.onAdd(this,e)}},n.prototype.updateImage=function(e,i){var r=this.style.getImage(e);if(!r)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var n=i instanceof ra||oa&&i instanceof oa?t.browser.getImageData(i):i,o=n.width,a=n.height,s=n.data;return void 0===o||void 0===a?this.fire(new t.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`"))):o!==r.data.width||a!==r.data.height?this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(r.data.replace(s,!(i instanceof ra||oa&&i instanceof oa)),void this.style.updateImage(e,r))},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,i){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),i)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setLayerZoomRange=function(t,e,i){return this.style.setLayerZoomRange(t,e,i),this._update(!0)},n.prototype.setFilter=function(t,e,i){return void 0===i&&(i={}),this.style.setFilter(t,e,i),this._update(!0)},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,i,r){return void 0===r&&(r={}),this.style.setPaintProperty(t,e,i,r),this._update(!0)},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,i,r){return void 0===r&&(r={}),this.style.setLayoutProperty(t,e,i,r),this._update(!0)},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},n.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.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/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=i.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=i.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=i.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");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=i.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(t){o[t]=i.create("div","mapboxgl-ctrl-"+t,n)}))},n.prototype._resizeCanvas=function(e,i){var r=t.browser.devicePixelRatio||1;this._canvas.width=r*e,this._canvas.height=r*i,this._canvas.style.width=e+"px",this._canvas.style.height=i+"px"},n.prototype._setupPainter=function(){var i=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",i)||this._canvas.getContext("experimental-webgl",i);r?(this.painter=new On(r,this.transform),t.webpSupported.testSupport(r)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},n.prototype._update=function(t){return this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint()),this},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(e){var i,r=this,n=0,o=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(i=o.createQueryEXT(),o.beginQueryEXT(o.TIME_ELAPSED_EXT,i),n=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=t.browser.now();this.style.zoomHistory.update(s,l);var u=new t.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=u.crossFadingFactor();1===c&&c===this._crossFadingFactor||(a=!0,this._crossFadingFactor=c),this.style.update(u)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var p=t.browser.now()-n;o.endQueryEXT(o.TIME_ELAPSED_EXT,i),setTimeout((function(){var e=o.getQueryObjectEXT(i,o.QUERY_RESULT_EXT)/1e6;o.deleteQueryEXT(i),r.fire(new t.Event("gpu-timing-frame",{cpuTime:p,gpuTime:e}))}),50)}if(this.listens("gpu-timing-layer")){var h=this.painter.collectGpuTimers();setTimeout((function(){var e=r.painter.queryGpuTimers(h);r.fire(new t.Event("gpu-timing-layer",{layerTimes:e}))}),50)}var d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}},n.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,i=this._controls;e<i.length;e+=1)i[e].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!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var r=this.painter.context.gl.getExtension("WEBGL_lose_context");r&&r.loseContext(),la(this._canvasContainer),la(this._controlContainer),la(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},n.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(t){e._frame=null,e._render(t)})))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showPadding.get=function(){return!!this._showPadding},o.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&((this._showCollisionBoxes=t)?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._setCacheLimits=function(e,i){t.setCacheLimits(e,i)},o.version.get=function(){return t.version},Object.defineProperties(n.prototype,o),n}(Qo);function la(t){t.parentNode&&t.parentNode.removeChild(t)}function ua(e){var r=this;this.options=t.extend({},ca,e),this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(t){return r._map.zoomIn({},{originalEvent:t})})),i.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(t){return r._map.zoomOut({},{originalEvent:t})})),i.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(t){r.options.visualizePitch?r._map.resetNorthPitch({},{originalEvent:t}):r._map.resetNorth({},{originalEvent:t})})),this._compassIcon=i.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))}var ca={showCompass:!0,showZoom:!0,visualizePitch:!1};ua.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom()},ua.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},ua.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 pa(this._map,this._compass,this.options.visualizePitch)),this._container},ua.prototype.onRemove=function(){i.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},ua.prototype._createButton=function(t,e){var r=i.create("button",t,this._container);return r.type="button",r.addEventListener("click",e),r},ua.prototype._setButtonTitle=function(t,e){var i=this._map._getUIString("NavigationControl."+e);t.title=i,t.setAttribute("aria-label",i)};var pa=function(e,r,n){void 0===n&&(n=!1),this._clickTolerance=10,this.element=r,this.mouseRotate=new mo({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,n&&(this.mousePitch=new go({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),i.addEventListener(r,"mousedown",this.mousedown),i.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(r,"touchmove",this.touchmove),i.addEventListener(r,"touchend",this.touchend),i.addEventListener(r,"touchcancel",this.reset)};function ha(e,i,r){if(e=new t.LngLat(e.lng,e.lat),i){var n=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=r.locationPoint(e).distSqr(i);r.locationPoint(n).distSqr(i)<a?e=n:r.locationPoint(o).distSqr(i)<a&&(e=o)}for(;180<Math.abs(e.lng-r.center.lng);){var s=r.locationPoint(e);if(0<=s.x&&0<=s.y&&s.x<=r.width&&s.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e}pa.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),i.disableDrag()},pa.prototype.move=function(t,e){var i=this.map,r=this.mouseRotate.mousemoveWindow(t,e);if(r&&r.bearingDelta&&i.setBearing(i.getBearing()+r.bearingDelta),this.mousePitch){var n=this.mousePitch.mousemoveWindow(t,e);n&&n.pitchDelta&&i.setPitch(i.getPitch()+n.pitchDelta)}},pa.prototype.off=function(){var t=this.element;i.removeEventListener(t,"mousedown",this.mousedown),i.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(t,"touchmove",this.touchmove),i.removeEventListener(t,"touchend",this.touchend),i.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},pa.prototype.offTemp=function(){i.enableDrag(),i.removeEventListener(t.window,"mousemove",this.mousemove),i.removeEventListener(t.window,"mouseup",this.mouseup)},pa.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),i.mousePos(this.element,e)),i.addEventListener(t.window,"mousemove",this.mousemove),i.addEventListener(t.window,"mouseup",this.mouseup)},pa.prototype.mousemove=function(t){this.move(t,i.mousePos(this.element,t))},pa.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},pa.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},pa.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=i.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},pa.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},pa.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};
2var da={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 fa(t,e,i){var r=t.classList;for(var n in da)r.remove("mapboxgl-"+i+"-anchor-"+n);r.add("mapboxgl-"+i+"-anchor-"+e)}function ma(e){this.options=t.extend({},Ta,e),t.bindAll(["_onMove","setUnit"],this)}var ga,ya,va,_a=((va=t.Evented)&&(Ia.__proto__=va),((Ia.prototype=Object.create(va&&va.prototype)).constructor=Ia).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},Ia.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),i.remove(this._element),this._popup&&this._popup.remove(),this},Ia.prototype.getLngLat=function(){return this._lngLat},Ia.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Ia.prototype.getElement=function(){return this._element},Ia.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){var 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:[0,-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)}return this},Ia.prototype._onKeyPress=function(t){var e=t.code,i=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==i&&13!==i||this.togglePopup()},Ia.prototype._onMapClick=function(t){var e=t.originalEvent.target,i=this._element;this._popup&&(e===i||i.contains(e))&&this.togglePopup()},Ia.prototype.getPopup=function(){return this._popup},Ia.prototype.togglePopup=function(){var t=this._popup;return t&&(t.isOpen()?t.remove():t.addTo(this._map)),this},Ia.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&
vendor: 8,955 bytes, line 2
2(this._lngLat=ha(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),i.setTransform(this._element,da[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+r+" "+e)}},Ia.prototype.getOffset=function(){return this._offset},Ia.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},Ia.prototype._onMove=function(e){this._pos=e.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 t.Event("dragstart"))),this.fire(new t.Event("drag"))},Ia.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},Ia.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),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))},Ia.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},Ia.prototype.isDraggable=function(){return this._draggable},Ia.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},Ia.prototype.getRotation=function(){return this._rotation},Ia.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},Ia.prototype.getRotationAlignment=function(){return this._rotationAlignment},Ia.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},Ia.prototype.getPitchAlignment=function(){return this._pitchAlignment},Ia),xa={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ba=0,wa=!1,Sa=((ya=t.Evented)&&(Ca.__proto__=ya),((Ca.prototype=Object.create(ya&&ya.prototype)).constructor=Ca).prototype.onAdd=function(e){var r;return this._map=e,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),r=this._setupUI,void 0!==ga?r(ga):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){r(ga="denied"!==t.state)})):r(ga=!!t.window.navigator.geolocation),this._container},Ca.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.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(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,wa=!1},Ca.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),i=t.coords;return e&&(i.longitude<e.getWest()||i.longitude>e.getEast()||i.latitude<e.getSouth()||i.latitude>e.getNorth())},Ca.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",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")}},Ca.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_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(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},Ca.prototype._updateCamera=function(e){var i=new t.LngLat(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,n=this._map.getBearing(),o=t.extend({bearing:n},this.options.fitBoundsOptions);this._map.fitBounds(i.toBounds(r),o,{geolocateSource:!0})},Ca.prototype._updateMarker=function(e){if(e){var i=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},Ca.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),i=this._map.unproject([1,t]),r=e.distanceTo(i),n=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=n+"px",this._circleElement.style.height=n+"px"},Ca.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},Ca.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.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 i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&wa)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},Ca.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},Ca.prototype._setupUI=function(e){var r=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=i.create("button","mapboxgl-ctrl-geolocate",this._container),i.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),!(this._geolocateButton.type="button")===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
2se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _a(this._dotElement),this._circleElement=i.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _a({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(e){e.geolocateSource||"ACTIVE_LOCK"!==r._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new t.Event("trackuserlocationend")))}))},Ca.prototype.trigger=function(){if(!this._setup)return t.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 t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,wa=!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 t.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 t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),wa=1<++ba?(e={maximumAge:6e5,timeout:0},!0):(e=this.options.positionOptions,!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},Ca.prototype._clearWatch=function(){t.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)},Ca),Ta={maxWidth:100,unit:"metric"};function Ca(e){ya.call(this),this.options=t.extend({},xa,e),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}function Ia(e,r){var n=this;if(va.call(this),(e instanceof t.window.HTMLElement||r)&&(e=t.extend({element:e},r)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,e&&e.element)this._element=e.element,this._offset=t.Point.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div"),this._element.setAttribute("aria-label","Map marker");var o=i.createNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"display","block"),o.setAttributeNS(null,"height","41px"),o.setAttributeNS(null,"width","27px"),o.setAttributeNS(null,"viewBox","0 0 27 41");var a=i.createNS("http://www.w3.org/2000/svg","g");
2a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");var s=i.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=i.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{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"}];u<c.length;u+=1){var p=c[u],h=i.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",p.rx),h.setAttributeNS(null,"ry",p.ry),l.appendChild(h)}var d=i.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill",this._color);var f=i.createNS("http://www.w3.org/2000/svg","path");f.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"),d.appendChild(f);var m=i.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var g=i.createNS("http://www.w3.org/2000/svg","path");g.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"),m.appendChild(g);var y=i.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(6.0, 7.0)"),y.setAttributeNS(null,"fill","#FFFFFF");var v=i.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _=i.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#000000"),_.setAttributeNS(null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962");var x=i.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),v.appendChild(_),v.appendChild(x),s.appendChild(l),s.appendChild(d),s.appendChild(m),s.appendChild(y),s.appendChild(v),o.appendChild(s),o.setAttributeNS(null,"height",41*this._scale+"px"),o.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(o),this._offset=t.Point.convert(e&&e.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()})),this._element.addEventListener("focus",(function(){var t=n._map.getContainer();t.scrollTop=0,t.scrollLeft=0})),fa(this._element,this._anchor,"marker"),this._popup=null}function Ea(t,e,i){var r=i&&i.maxWidth||100,n=t._container.clientHeight/2,o=t.unproject([0,n]),a=t.unproject([r,n]),s=o.distanceTo(a);if(i&&"imperial"===i.unit){var l=3.2808*s;5280<l?Ma(e,r,l/5280,t._getUIString("ScaleControl.Miles")):Ma(e,r,l,t._getUIString("ScaleControl.Feet"))}else i&&"nautical"===i.unit?Ma(e,r,s/1852,t._getUIString("ScaleControl.NauticalMiles")):1e3<=s?Ma(e,r,s/1e3,t._getUIString("ScaleControl.Kilometers")):Ma(e,r,s,t._getUIString("ScaleControl.Meters"))}function Ma(t,e,i,r){var n,o,a,s,l,u=(n=i,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=10<=(a=n/o
2)?10:5<=a?5:3<=a?3:2<=a?2:1<=a?1:(s=a,l=Math.pow(10,Math.ceil(-Math.log(s)/Math.LN10)),Math.round(s*l)/l)));t.style.width=e*(u/i)+"px",t.innerHTML=u+" "+r}function Aa(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")}ma.prototype.getDefaultPosition=function(){return"bottom-left"},ma.prototype._onMove=function(){Ea(this._map,this._container,this.options)},ma.prototype.onAdd=function(t){return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ma.prototype.onRemove=function(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ma.prototype.setUnit=function(t){this.options.unit=t,Ea(this._map,this._container,this.options)},Aa.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Aa.prototype.onRemove=function(){i.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Aa.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Aa.prototype._setupUI=function(){var e=this._fullscreenButton=i.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);i.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Aa.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Aa.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Aa.prototype._isFullscreen=function(){return this._fullscreen},Aa.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.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())},Aa.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.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 La,ka={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Pa=((La=t.Evented)&&(za.__proto__=La),((za.prototype=Object.create(La&&La.prototype)).constructor=za).prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,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._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 t.Event("open")),this},za.prototype.isOpen=function(){return!!this._map},za.prototype.remove=function(){return this._content&&i.remove(this._content),this._container&&(i.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 t.Event("close")),this},za.prototype.getLngLat=function(){return this._lngLat}
vendor: 4,980 bytes, line 2
2,za.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),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},za.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},za.prototype.getElement=function(){return this._container},za.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},za.prototype.setHTML=function(e){var i,r=t.window.document.createDocumentFragment(),n=t.window.document.createElement("body");for(n.innerHTML=e;i=n.firstChild;)r.appendChild(i);return this.setDOMContent(r)},za.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},za.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},za.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},za.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},za.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},za.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},za.prototype._createContent=function(){this._content&&i.remove(this._content),this._content=i.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=i.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},za.prototype._onMouseUp=function(t){this._update(t.point)},za.prototype._onMouseMove=function(t){this._update(t.point)},za.prototype._onDrag=function(t){this._update(t.point)},za.prototype._update=function(e){var r=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=i.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=i.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return r._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=ha(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var n=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=function e(i){if(i){if("number"==typeof i){var r=Math.round(Math.sqrt(.5*Math.pow(i,2)));return{center:new t.Point(0,0),top:new t.Point(0,i),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-i),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(i,0),right:new t.Point(-i,0)}}if(i instanceof t.Point||Array.isArray(i)){var n=t.Point.convert(i);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(i.center||[0,0]),top:t.Point.convert(i.top||[0,0]),"top-left":t.Point.convert(i["top-left"]||[0,0]),"top-right":t.Point.convert(i["top-right"]||[0,0]),bottom:t.Point.convert(i.bottom||[0,0]),"bottom-left":t.Point.convert(i["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(i["bottom-right"]||[0,0]),left:t.Point.convert(i.left||[0,0]),right:t.Point.convert(i.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=n.y+a.bottom.y<u?["top"]:n.y>this._map.transform.height-u?["bottom"]:[],n.x<l/2?s.push("left"):n.x>this._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=n.add(a[o]).round();i.setTransform(this._container,da[o]+" translate("+c.x+"px,"+c.y+"px)"),fa(this._container,o,"popup")}},za.prototype._onClose=function(){this.remove()},za),Da={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:sa,NavigationControl:ua,GeolocateControl:Sa,AttributionControl:Xo,ScaleControl:ma,FullscreenControl:Aa,Popup:Pa,Marker:_a,Style:xr,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.
2Evented,config:t.config,prewarm:function(){gi().acquire(hi)},clearPrewarmedResources:function(){var t=fi;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(hi),fi=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 t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return di.workerCount},set workerCount(t){di.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};function za(e){La.call(this),this.options=t.extend(Object.create(ka),e),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Da})),o)})),n=(r.Map,r.setRTLTextPlugin),o=(r.supported,r.Marker),s="atlas.microsoft.com",l="atlas.microsoft.com",u="e96cb745-c6f5-409c-a775-c4313e468c1d",c="{azMapsDomain}
2",p="https://atlas.microsoft.com/",h=function(t,e){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function d(t,e){function i(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var f=function(){return(f=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function m(t,e,i,r){return new(i=i||Promise)((function(n,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?n(t.value):new i((function(e){e(t.value)})).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function g(t,e){var i,r,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(n=2&o[0]?r.return:o[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;switch(r=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=0<(n=a.trys).length&&n[n.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(6===o[0]&&a.label<n[1]){a.label=n[1],n=o;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(o);break}n[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{i=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var y=(v.prototype.merge=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var r=0,n=e;r<n.length;r++){var o=n[r];if(o)for(var a in o)o.hasOwnProperty(a)&&this.hasOwnProperty(a)&&(void 0!==o[a]&&null!=o[a]?this[a]instanceof v?this[a].merge(o[a]):this[a]=o[a]:(t=t||new(Object.getPrototypeOf(this).constructor),this[a]=t[a]))}return this},v);function v(){}var _,x=(d(b,_=y),b);function b(){var t=null!==_&&_.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var w=(S.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then((function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)}))},S.prototype.toString=function(){var t=Object.entries(this.options.queryParams).map((function(t){return t[0]+"="+t[1]})).join("&"),e=[],i=this.options.path||"";return S.protoRegEx.test(i)?e.push(i):(this.options.domain&&(S.protoRegEx.test(this.options.domain)||(e.push(this.options.protocol+"://"),e.push(this.options.subdomain?this.options.subdomain+".":"")),e.push(this.options.domain)),e.push(this.options.path?"/"+i:"")),e.push(t?"?"+t:""),e.join("")},S.protoRegEx=new RegExp(/^(file|http|https|blob:http|blob:https):\/\//i),S);function S(t){this.options=(new x).merge(t)}var T,C="2.0.32",I=(E.getFullVersion=function(){return C},E.getEndpointVersion=function(){var t=C.indexOf(".");return-1===(t=C.indexOf(".",t+1))?C:C.substring(0,t)},E);function E(){}(T=t.ControlPosition||(t.ControlPosition={})).TopLeft="top-left",T.TopRight="top-right",T.BottomLeft="bottom-left",T.BottomRight="bottom-right",T.NonFixed="non-fixed";var M,A=(d(L,M=y),L);function L(){var e=null!==M&&M.apply(this,arguments)||this;return e.position=t.ControlPosition.NonFixed,e}var k,P=(D.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],i=0;i<t.length;i++){var r=t[i]/255;e[i]=r<=.03928?r/12.92:Math.pow((.055+r)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},D.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d");e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1);var i=e.getImageData(0,0,1,1).data;return[i[0],i[1],i[2],i[3]]},D);function D(t){var e;t&&(3<=(e="string"==typeof t?this.getRBGA(t):t).length&&(this.r=e[0],this.g=e[1],this.b=e[2],3<e.length&&(this.a=e[3])))}(k=t.ControlStyle||(t.ControlStyle={})).light="light",k.dark="dark",k.auto="auto";var z=(O.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("styledata",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},O.prototype.buildContainer=function(e,i,r,n){var o=this;return this._map=e,this._container=document.createElement(n||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof r&&this._container.setAttribute("aria-label",r),i.toLowerCase()===t.ControlStyle.auto?this._map.styles.initialize().then((function(){o._onStyleChange(),o._map.events.add("styledata",o._onStyleChange)})):this._container.classList.add(i),this._container},O.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},O.activateClickDelay=100,O);function O(){var e=this;this._onStyleChange=function(){if(e._map.getStyle().style.toLowerCase().startsWith("blank"))e._observer||(e._onBackgroun
2dChange(),e._observer=new MutationObserver(e._onBackgroundChange),e._observer.observe(e._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]}));else{e._observer&&(e._observer.disconnect(),delete e._observer);var t=e._map.styles.getTheme(e._map.getStyle());e._setTheme(t)}},this._onBackgroundChange=function(){var i=new P(e._map.getMapContainer().style.backgroundColor).getLuminosity(),r=isNaN(i)||.5<i?t.ControlStyle.light:t.ControlStyle.dark;e._setTheme(r)}}var N,R=(d(B,N=y),B);function B(){var e=null!==N&&N.apply(this,arguments)||this;return e.rotationDegreesDelta=15,e.style=t.ControlStyle.light,e}var j,F=(d(U,j=z),U.prototype.onAdd=function(t,e){var i=this,r=this.buildContainer(t,this.options.style,"Rotation Control"),n=this.constructRotationButton(t),o=this.constructRotationGrid(t,e);return r.addEventListener("mouseover",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasMouse=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("focusin",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasFocus=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("mouseleave",(function(){i.hasMouse=!1,i.hasFocus||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element"))})),r.addEventListener("focusout",(function(t){t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(i.hasFocus=!1,i.hasMouse||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element")))})),e&&U.InvertOrderPositions.includes(e.position)?(r.appendChild(o),r.appendChild(n)):(r.appendChild(n),r.appendChild(o)),r},U.prototype.constructRotationGrid=function(t,e){var i=document.createElement("div");i.classList.add("sub-container"),i.classList.add("hidden-accessible-element");var r=this.constructRightRotationButton(t),n=this.constructLeftRotationButton(t);return e&&U.InvertOrderPositions.includes(e.position)?(i.appendChild(r),i.appendChild(n)):(i.appendChild(n),i.appendChild(r)),i},U.prototype.constructRotationButton=function(t){var e=this,i=document.createElement("button");i.classList.add("azure-maps-control-button"),i.classList.add("rotation"),i.setAttribute("title","Reset to Default Rotation"),i.setAttribute("alt","Reset to Default Rotation"),i.setAttribute("type","button");var r=document.createElement("div");return i.appendChild(r),i.addEventListener("click",(function(i){i.timeStamp-e.lastActiveTime>z.activateClickDelay&&t.setCamera({bearing:U.DefaultRotation},!0)})),t.events.add("rotate",(function(t){r.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"})),i},U.prototype.constructRightRotationButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("rotation-right"),i.setAttribute("title","Rotate Right"),i.setAttribute("alt","Rotate Right"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({bearing:t.getCamera().bearing+e.options.rotationDegreesDelta,duration:U.RotationDuration,type:"ease"},!0)})),i},U.prototype.constructLeftRotationButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("rotation-left"),i.setAttribute("title","Rotate Left"),i.setAttribute("alt","Rotate Left"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({bearing:t.getCamera().bearing-e.options.rotationDegreesDelta,duration:U.RotationDuration,type:"ease"},!0)})),i},U.DefaultRotation=0,U.RotationDuration=100,U.InvertOrderPositions=[t.ControlPosition.BottomRight,t.ControlPosition.TopRight],U);function U(t){var e=j.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new R).merge(t),e}var V,q=(d(G,V=y),G);function G(){var e=null!==V&&V.apply(this,arguments)||this;return e.pitchDegreesDelta=10,e.style=t.ControlStyle.light,e}var Z,H=(d(W,Z=z),W.prototype.onAdd=function(t,e){var i=this,r=this.buildContainer(t,this.options.style,"Pitch Control"),n=this.constructPitchButton(t),o=this.constructPitchGrid(t,e);return r.addEventListener("mouseover",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasMouse=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("focusin",(function(t){i.lastActiveTime=i.lastActiveTime||t.timeStamp,i.hasFocus=!0,r.classList.add("in-use"),o.classList.remove("hidden-accessible-element")})),r.addEventListener("mouseleave",(function(){i.hasMouse=!1,i.hasFocus||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element"))})),r.addEventListener("focusout",(function(t){t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(i.hasFocus=!1,i.hasMouse||(delete i.lastActiveTime,r.classList.remove("in-use"),o.classList.add("hidden-accessible-element")))})),e&&W.INVERT_ORDER_POSITIONS.includes(e.position)?(r.appendChild(o),r.appendChild(n)):(r.appendChild(n),r.appendChild(o)),r},W.prototype.constructPitchGrid=function(t,e){var i=document.createElement("div");i.classList.add("sub-container"),i.classList.add("hidden-accessible-element");var r=this.constructPitchIncrementButton(t),n=this.constructPitchDecrementButton(t);return e&&W.INVERT_ORDER_POSITIONS.includes(e.position)?(i.appendChild(n),i.appendChild(r)):(i.appendChild(r),i.appendChild(n)),i},W.prototype.constructPitchButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("pitch"),i.setAttribute("title","Reset to Default Pitch"),i.setAttribute("alt","Reset to Default Pitch"),i.setAttribute("type","button"),i.addEventListener("click",(function(){event.timeStamp-e.lastActiveTime>z.activateClickDelay&&t.setCamera({pitch:W.DEFAULT_PITCH},!0)})),i},W.prototype.constructPitchDecrementButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("pitch-down"),i.setAttribute("title","Decrease Pitch"),i.setAttribute("alt","Decrease Pitch"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({pitch:t.getCamera().pitch-e.options.pitchDegreesDelta,duration:W.PITCH_DURATION_MS,type:"ease"},!0)})),i},W.prototype.constructPitchIncrementButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("pitch-up"),i.setAttribute("title","Increase Pitch"),i.setAttribute("alt","Increase Pitch"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({pitch:t.getCamera().pitch+e.options.pitchDegreesDelta,duration:W.PITCH_DURATION_MS,type:"ease"},!0)})),i},W.PITCH_DURATION_MS=100,W.DEFAULT_PITCH=0,W.INVERT_ORDER_POSITIONS=[t.ControlPosition.BottomRight,t.ControlPosition.TopRight],W);function W(t){var e=Z.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new q).merge(t),e}var Y=function(t,e){return t===e||t!=t&&e!=e},K=function(t,e){for(var i=t.length;i--;)if(Y(t[i][0],e))return i;return-1},X=Array.prototype.splice;function J(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(t){var e=this.__data__,i=K(e,t);return!(i<0||(i==e.length-1?e.pop():X.call(e,i,1),--this.size,0))},J.prototype.get=function(t){var e=this.__data__,i=K(e,t);return i<0?void 0:e[i][1]},J.prototype.has=function(t){return-1<K(this.__data__,t)},J.prototype.set=function(t,e){var i=this.__data__,r=K(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};var Q,$=J,tt="object"==typeof e&&e&&e.Object===Object&&e,et="object"==typeof self&&self&&self.Object===Object&&self,it=tt||et||Function("return this")(),rt=it.Symbol,nt=Object.prototype,ot=nt.hasOwnProperty,at=nt.toString,st=rt?rt.toStringTag:void 0,lt=function(t){var e=ot.call(t,st),i=t[st];try{var r=!(t[st]=void 0)}catch(t){}var n=at.call(t);return r&&(e?t[st]=i:delete t[st]),n},ut=Object.prototype.toString,ct=function(t){return ut.call(t)},pt=rt?rt.toStringTag:void 0,ht=function(t){return null==t?void 0===t?"[object Undef
2ined]":"[object Null]":(pt&&pt in Object(t)?lt:ct)(t)},dt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},ft=function(t){if(!dt(t))return!1;var e=ht(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},mt=it["__core-js_shared__"],gt=(Q=/[^.]+$/.exec(mt&&mt.keys&&mt.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"",yt=Function.prototype.toString,vt=function(t){if(null!=t){try{return yt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},_t=/^\[object .+?Constructor\]$/,xt=Function.prototype,bt=Object.prototype,wt=xt.toString,St=bt.hasOwnProperty,Tt=RegExp("^"+wt.call(St).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ct=function(t){return!(!dt(t)||function(t){return!!gt&> in t}(t))&&(ft(t)?Tt:_t).test(vt(t))},It=function(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return Ct(i)?i:void 0},Et=It(it,"Map"),Mt=It(Object,"create"),At=Object.prototype.hasOwnProperty,Lt=Object.prototype.hasOwnProperty;function kt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}kt.prototype.clear=function(){this.__data__=Mt?Mt(null):{},this.size=0},kt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},kt.prototype.get=function(t){var e=this.__data__;if(Mt){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return At.call(e,t)?e[t]:void 0},kt.prototype.has=function(t){var e=this.__data__;return Mt?void 0!==e[t]:Lt.call(e,t)},kt.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Mt&&void 0===e?"__lodash_hash_undefined__":e,this};var Pt=kt,Dt=function(t,e){var i=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?i["string"==typeof e?"string":"hash"]:i.map};function zt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}zt.prototype.clear=function(){this.size=0,this.__data__={hash:new Pt,map:new(Et||$),string:new Pt}},zt.prototype.delete=function(t){var e=Dt(this,t).delete(t);return this.size-=e?1:0,e},zt.prototype.get=function(t){return Dt(this,t).get(t)},zt.prototype.has=function(t){return Dt(this,t).has(t)},zt.prototype.set=function(t,e){var i=Dt(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this};var Ot=zt;function Nt(t){var e=this.__data__=new $(t);this.size=e.size}Nt.prototype.clear=function(){this.__data__=new $,this.size=0},Nt.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},Nt.prototype.get=function(t){return this.__data__.get(t)},Nt.prototype.has=function(t){return this.__data__.has(t)},Nt.prototype.set=function(t,e){var i=this.__data__;if(i instanceof $){var r=i.__data__;if(!Et||r.length<199)return r.push([t,e]),this.size=++i.size,this;i=this.__data__=new Ot(r)}return i.set(t,e),this.size=i.size,this};var Rt=Nt,Bt=function(){try{var t=It(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),jt=function(t,e,i){"__proto__"==e&&Bt?Bt(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i},Ft=Object.prototype.hasOwnProperty,Ut=function(t,e,i){var r=t[e];Ft.call(t,e)&&Y(r,i)&&(void 0!==i||e in t)||jt(t,e,i)},Vt=function(t,e,i,r){var n=!i;i=i||{};for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(i[s],t[s],s,i,t):void 0;void 0===l&&(l=t[s]),(n?jt:Ut)(i,s,l)}return i},qt=function(t){return null!=t&&"object"==typeof t},Gt=function(t){return qt(t)&&"[object Arguments]"==ht(t)},Zt=Object.prototype,Ht=Zt.hasOwnProperty,Wt=Zt.propertyIsEnumerable,Yt=Gt(function(){return arguments}())?Gt:function(t){return qt(t)&&Ht.call(t,"callee")&&!Wt.call(t,"callee")},Kt=Array.isArray;function Xt(){return!1}var Jt=i((function(t,e){var i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,n=r&&r.exports===i?it.Buffer:void 0,o=(n?n.isBuffer:void 0)||Xt;t.exports=o})),Qt=/^(?:0|[1-9]\d*)$/,$t=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&Qt.test(t))&&-1<t&&t%1==0&&t<e},te=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},ee={};
2ee["[object Float32Array]"]=ee["[object Float64Array]"]=ee["[object Int8Array]"]=ee["[object Int16Array]"]=ee["[object Int32Array]"]=ee["[object Uint8Array]"]=ee["[object Uint8ClampedArray]"]=ee["[object Uint16Array]"]=ee["[object Uint32Array]"]=!0,ee["[object Arguments]"]=ee["[object Array]"]=ee["[object ArrayBuffer]"]=ee["[object Boolean]"]=ee["[object DataView]"]=ee["[object Date]"]=ee["[object Error]"]=ee["[object Function]"]=ee["[object Map]"]=ee["[object Number]"]=ee["[object Object]"]=ee["[object RegExp]"]=ee["[object Set]"]=ee["[object String]"]=ee["[object WeakMap]"]=!1;var ie=function(t){return function(e){return t(e)}},re=i((function(t,e){var i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,n=r&&r.exports===i&&tt.process,o=function(){try{return r&&r.require&&r.require("util").types||n&&n.binding&&n.binding("util")}catch(t){}}();t.exports=o})),ne=re&&re.isTypedArray,oe=ne?ie(ne):function(t){return qt(t)&&te(t.length)&&!!ee[ht(t)]},ae=Object.prototype.hasOwnProperty,se=function(t,e){var i=Kt(t),r=!i&&Yt(t),n=!i&&!r&&Jt(t),o=!i&&!r&&!n&&oe(t),a=i||r||n||o,s=a?function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r}(t.length,String):[],l=s.length;for(var u in t)!e&&!ae.call(t,u)||a&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||$t(u,l))||s.push(u);return s},le=Object.prototype,ue=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||le)},ce=function(t,e){return function(i){return t(e(i))}},pe=ce(Object.keys,Object),he=Object.prototype.hasOwnProperty,de=function(t){if(!ue(t))return pe(t);var e=[];for(var i in Object(t))he.call(t,i)&&"constructor"!=i&&e.push(i);return e},fe=function(t){return null!=t&&te(t.length)&&!ft(t)},me=function(t){return(fe(t)?se:de)(t)},ge=Object.prototype.hasOwnProperty,ye=function(t){if(!dt(t))return function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}(t);var e=ue(t),i=[];for(var r in t)("constructor"!=r||!e&&ge.call(t,r))&&i.push(r);return i},ve=function(t){return fe(t)?se(t,!0):ye(t)},_e=i((function(t,e){var i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,n=r&&r.exports===i?it.Buffer:void 0,o=n?n.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var i=t.length,r=o?o(i):new t.constructor(i);return t.copy(r),r}})),xe=function(t,e){var i=-1,r=t.length;for(e=e||Array(r);++i<r;)e[i]=t[i];return e};function be(){return[]}var we=Object.prototype.propertyIsEnumerable,Se=Object.getOwnPropertySymbols,Te=Se?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var i=-1,r=null==t?0:t.length,n=0,o=[];++i<r;){var a=t[i];e(a,i,t)&&(o[n++]=a)}return o}(Se(t),(function(e){return we.call(t,e)})))}:be,Ce=function(t,e){for(var i=-1,r=e.length,n=t.length;++i<r;)t[n+i]=e[i];return t},Ie=ce(Object.getPrototypeOf,Object),Ee=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ce(e,Te(t)),t=Ie(t);return e}:be,Me=function(t,e,i){var r=e(t);return Kt(t)?r:Ce(r,i(t))},Ae=function(t){return Me(t,me,Te)},Le=function(t){return Me(t,ve,Ee)},ke=It(it,"DataView"),Pe=It(it,"Promise"),De=It(it,"Set"),ze=It(it,"WeakMap"),Oe="[object Map]",Ne="[object Promise]",Re="[object Set]",Be="[object WeakMap]",je="[object DataView]",Fe=vt(ke),Ue=vt(Et),Ve=vt(Pe),qe=vt(De),Ge=vt(ze),Ze=ht;(ke&&Ze(new ke(new ArrayBuffer(1)))!=je||Et&&Ze(new Et)!=Oe||Pe&&Ze(Pe.resolve())!=Ne||De&&Ze(new De)!=Re||ze&&Ze(new ze)!=Be)&&(Ze=function(t){var e=ht(t),i="[object Object]"==e?t.constructor:void 0,r=i?vt(i):"";if(r)switch(r){case Fe:return je;case Ue:return Oe;case Ve:return Ne;case qe:return Re;case Ge:return Be}return e});var He=Ze,We=Object.prototype.hasOwnProperty,Ye=it.Uint8Array,Ke=function(t){var e=new t.constructor(t.byteLength);return new Ye(e).set(new Ye(t)),e},Xe=/\w*$/,Je=rt?rt.prototype:void 0,Qe=Je?Je.valueOf:void 0,$e=function(t,e){var i=e?Ke(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)},ti=function(t,e,i){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Ke(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return function(t,e){var i=e?Ke(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}(t,i);
2case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return $e(t,i);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,Xe.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return function(t){return Qe?Object(Qe.call(t)):{}}(t)}},ei=Object.create;function ii(){}var ri=function(t){return"function"!=typeof t.constructor||ue(t)?{}:function(t){if(!dt(t))return{};if(ei)return ei(t);ii.prototype=t;var e=new ii;return ii.prototype=void 0,e}(Ie(t))},ni=re&&re.isMap,oi=ni?ie(ni):function(t){return qt(t)&&"[object Map]"==He(t)},ai=re&&re.isSet,si=ai?ie(ai):function(t){return qt(t)&&"[object Set]"==He(t)},li="[object Arguments]",ui="[object Function]",ci="[object Object]",pi={};pi[li]=pi["[object Array]"]=pi["[object ArrayBuffer]"]=pi["[object DataView]"]=pi["[object Boolean]"]=pi["[object Date]"]=pi["[object Float32Array]"]=pi["[object Float64Array]"]=pi["[object Int8Array]"]=pi["[object Int16Array]"]=pi["[object Int32Array]"]=pi["[object Map]"]=pi["[object Number]"]=pi[ci]=pi["[object RegExp]"]=pi["[object Set]"]=pi["[object String]"]=pi["[object Symbol]"]=pi["[object Uint8Array]"]=pi["[object Uint8ClampedArray]"]=pi["[object Uint16Array]"]=pi["[object Uint32Array]"]=!0,pi["[object Error]"]=pi[ui]=pi["[object WeakMap]"]=!1;var hi,di=function t(e,i,r,n,o,a){var s,l=1&i,u=2&i,c=4&i;if(r&&(s=o?r(e,n,o,a):r(e)),void 0!==s)return s;if(!dt(e))return e;var p=Kt(e);if(p){if(s=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&We.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(e),!l)return xe(e,s)}else{var h=He(e),d=h==ui||"[object GeneratorFunction]"==h;if(Jt(e))return _e(e,l);if(h==ci||h==li||d&&!o){if(s=u||d?{}:ri(e),!l)return u?function(t,e){return Vt(t,Ee(t),e)}(e,function(t,e){return t&&Vt(e,ve(e),t)}(s,e)):function(t,e){return Vt(t,Te(t),e)}(e,function(t,e){return t&&Vt(e,me(e),t)}(s,e))}else{if(!pi[h])return o?e:{};s=ti(e,h,l)}}var f=(a=a||new Rt).get(e);if(f)return f;a.set(e,s),si(e)?e.forEach((function(n){s.add(t(n,i,r,n,e,a))})):oi(e)&&e.forEach((function(n,o){s.set(o,t(n,i,r,o,e,a))}));var m=c?u?Le:Ae:u?keysIn:me,g=p?void 0:m(e);return function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r&&!1!==e(t[i],i,t););}(g||e,(function(n,o){g&&(n=e[o=n]),Ut(s,o,t(n,i,r,o,e,a))})),s},fi=function(t){return di(t,5)},mi=Map,gi=(d(yi,hi=y),yi);function yi(){var e=null!==hi&&hi.apply(this,arguments)||this;return e.layout="icons",e.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief"],e.style=t.ControlStyle.light,e}var vi,_i=(d(xi,vi=z),xi.prototype.onAdd=function(t,e){var i=this;this.map=t;var r=this.buildContainer(t,this.options.style,"Map Style Control"),n=this.buildStyleOpsGrid(r),o=this.buildCurrStyleBtn(r,n);return r.addEventListener("mouseover",(function(){i.hasMouse=!0,r.classList.add(xi.Css.inUse),n.classList.remove("hidden-accessible-element")})),r.addEventListener("focusin",(function(){i.hasFocus=!0,r.classList.add(xi.Css.inUse),n.classList.remove("hidden-accessible-element")})),r.addEventListener("mouseleave",(function(){i.hasMouse=!1,i.hasFocus||(r.classList.remove(xi.Css.inUse),n.classList.add("hidden-accessible-element"))})),r.addEventListener("focusout",(function(t){t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(i.hasFocus=!1,i.hasMouse||(r.classList.remove(xi.Css.inUse),n.classList.add("hidden-accessible-element")))})),e&&xi.InvertOrderPositions.includes(e.position)?(r.appendChild(n),r.appendChild(o)):(r.appendChild(o),r.appendChild(n)),r},xi.prototype.onRemove=function(){vi.prototype.onRemove.call(this),this.map.events.remove("styledata",this.onStyleChange)},xi.prototype.buildSelectStyleBtn=function(t,e){var i=this,r=document.createElement("button"),n=this.mapToFriendlyStyleName(t);
2r.setAttribute("title",n),r.setAttribute("alt",n),r.setAttribute("type","button");var o=new Image;return o.src=e,o.alt=n,r.appendChild(o),"icons"===this.options.layout?r.classList.add(xi.Css.button):r.appendChild(document.createTextNode(n)),r.addEventListener("click",(function(){i.map.setStyle({style:t})})),r},xi.prototype.buildCurrStyleBtn=function(t,e){var i=document.createElement("button");i.classList.add(xi.Css.button),i.classList.add(xi.Css.currentStyle),i.setAttribute("title","Select Style"),i.setAttribute("alt","Select Style"),i.setAttribute("type","button"),this.currStyleImage=new Image,i.appendChild(this.currStyleImage);var r=document.createElement("div");return r.classList.add("icon"),i.appendChild(r),i},xi.prototype.buildStyleOpsGrid=function(t){var e=this,i=document.createElement("div");return i.classList.add(xi.Css.styleOptions),i.classList.add(this.options.layout),i.setAttribute("aria-label","Style Options"),i.classList.add("hidden-accessible-element"),this.map.styles.initialize().then((function(){for(var t=e.map.styles.getDef(),r=e.map.getStyle().style,n=0,o=t.styles;n<o.length;n++){var a=o[n],s=new w({domain:t.domain,path:a.iconPath}).toString();e.styleIcons.set(a.name,s),a.name===r&&(e.currStyleImage.src=s,e.currStyleImage.alt=e.mapToFriendlyStyleName(a.name))}"all"===e.options.mapStyles?e.styleIcons.forEach((function(t,r){var n=e.buildSelectStyleBtn(r,t);i.appendChild(n)})):e.options.mapStyles.filter((function(t){return e.styleIcons.has(t)})).forEach((function(t){var r=e.styleIcons.get(t),n=e.buildSelectStyleBtn(t,r);i.appendChild(n)})),e.map.events.add("styledata",e.onStyleChange)})),i},xi.prototype.mapToFriendlyStyleName=function(t){return xi.StyleNamesMap[t]?xi.StyleNamesMap[t]:t},xi.InvertOrderPositions=[t.ControlPosition.TopRight,t.ControlPosition.BottomRight],xi.Css={button:"azure-maps-control-button",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options"},xi.StyleNamesMap={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast"},xi);function xi(t){var e=vi.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.styleIcons=new mi,e.onStyleChange=function(){var t=e.map.getStyle().style;e.styleIcons.has(t)&&(e.currStyleImage.src=e.styleIcons.get(t),e.currStyleImage.alt=e.mapToFriendlyStyleName(t))},e.options=(new gi).merge(fi(t)),e}var bi,wi=(d(Si,bi=y),Si);function Si(){var e=null!==bi&&bi.apply(this,arguments)||this;return e.flow="relative",e.incidents=!0,e.isActive=!1,e.style=t.ControlStyle.light,e}var Ti,Ci=(d(Ii,Ti=z),Ii.prototype.onAdd=function(t){this.container=this.buildContainer(t,this.options.style,"Traffic Control"),this.container.style.flexDirection="column";var e=this.constructTrafficButton(t);return this.container.appendChild(e),this.container},Ii.prototype.getOptions=function(){return fi(this.options)},Ii.prototype.constructTrafficButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("traffic"),i.setAttribute("title","toggle traffic display"),i.setAttribute("alt","toggle traffic display"),i.setAttribute("type","button"),i.addEventListener("click",(function(){var i=t.getTraffic();e.options.isActive=!("none"!==i.flow||i.incidents),e.options.isActive?(t.setTraffic({flow:e.options.flow,incidents:e.options.incidents}),e.container.classList.add("in-use")):(t.setTraffic({flow:"none",incidents:!1}),e.container.classList.remove("in-use"))})),t.events.add("ready",(function(){e.options.isActive&&i.dispatchEvent(new Event("click"))})),i},Ii);function Ii(t){var e=Ti.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new wi).merge(t),e}var Ei,Mi=(d(Ai,Ei=z),Ai.prototype.onAdd=function(e){var i=this.buildContainer(e,t.ControlStyle.auto,"Traffic Legend"),r=this.buildTrafficLegendDiv(e);return i.appendChild(r),i},Ai.prototype.buildTrafficLegendDiv=function(t){var e=document.createElement("div");e.classList.add("traffic-legend","hidden"),e.setAttribute("title","Traffic Legend"),e.setAttribute("alt","Traffic Legend");var i=document.createElement("table"),r=document.createElement("tr"),n=document.createElement("td");n.setAttribute("title","Traffic"),n.setAttribute("alt","Traffic"),n.appendChild(document.createTextNode("Traffic")),n.classList.add("traffic-legend-title"),n.colSpan=6,r.appendChild(n),i.appendChild(r);for(var o=document.createElement("tr"),a=0,s=this.table;a<s.length;
2a++){var l=s[a],u=document.createElement("td");if("Fast"===l||"Slow"===l)u.setAttribute("title",l),u.setAttribute("alt",l),u.appendChild(document.createTextNode(l)),u.classList.add("traffic-legend-text");else{u.classList.add("traffic-legend-colors");for(var c=0,p=l;c<p.length;c++){var h=p[c],d=document.createElement("div");d.classList.add(h),u.appendChild(d)}}o.appendChild(u)}return i.appendChild(o),e.appendChild(i),t.events.add("sourceadded",(function(t){"vectorTilesTraffic"===t.getId()&&e.classList.remove("hidden")})),t.events.add("sourceremoved",(function(t){"vectorTilesTraffic"===t.getId()&&e.classList.add("hidden")})),e},Ai);function Ai(){var t=Ei.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t}var Li,ki=(d(Pi,Li=y),Pi);function Pi(){var e=null!==Li&&Li.apply(this,arguments)||this;return e.zoomDelta=1,e.style=t.ControlStyle.light,e}var Di,zi=(d(Oi,Di=z),Oi.prototype.onAdd=function(t){var e=this.buildContainer(t,this.options.style,"Zoom Control");e.style.flexDirection="column";var i=this.constructZoomInButton(t),r=this.constructZoomOutButton(t);return e.appendChild(i),e.appendChild(r),e},Oi.prototype.constructZoomInButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("zoom-in"),i.setAttribute("title","Zoom In"),i.setAttribute("alt","Zoom In"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:Oi.ZOOM_DURATION_MS,type:"ease"},!0)})),i},Oi.prototype.constructZoomOutButton=function(t){var e=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("zoom-out"),i.setAttribute("title","Zoom Out"),i.setAttribute("alt","Zoom Out"),i.setAttribute("type","button"),i.addEventListener("click",(function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:Oi.ZOOM_DURATION_MS,type:"ease"},!0)})),i},Oi.ZOOM_DURATION_MS=200,Oi);function Oi(t){var e=Di.call(this)||this;return e.options=(new ki).merge(t),e}var Ni=Object.freeze({__proto__:null,PitchControl:H,CompassControl:F,ZoomControl:zi,StyleControl:_i,TrafficControl:Ci,TrafficLegendControl:Mi});function Ri(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new Ot;++e<i;)this.add(t[e])}Ri.prototype.add=Ri.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ri.prototype.has=function(t){return this.__data__.has(t)};var Bi=Ri,ji=function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(t[i],i,t))return!0;return!1},Fi=function(t,e){return t.has(e)},Ui=function(t,e,i,r,n,o){var a=1&i,s=t.length,l=e.length;if(s!=l&&!(a&&s<l))return!1;var u=o.get(t);if(u&&o.get(e))return u==e;var c=-1,p=!0,h=2&i?new Bi:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],f=e[c];if(r)var m=a?r(f,d,c,e,t,o):r(d,f,c,t,e,o);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!ji(e,(function(t,e){if(!Fi(h,e)&&(d===t||n(d,t,i,r,o)))return h.push(e)}))){p=!1;break}}else if(d!==f&&!n(d,f,i,r,o)){p=!1;break}}return o.delete(t),o.delete(e),p};function Vi(t){var e=-1,i=Array(t.size);return t.forEach((function(t,r){i[++e]=[r,t]})),i}function qi(t){var e=-1,i=Array(t.size);return t.forEach((function(t){i[++e]=t})),i}var Gi,Zi=rt?rt.prototype:void 0,Hi=Zi?Zi.valueOf:void 0,Wi=Object.prototype.hasOwnProperty,Yi="[object Arguments]",Ki="[object Array]",Xi="[object Object]",Ji=Object.prototype.hasOwnProperty,Qi=function(t,e,i,r,n,o){var a=Kt(t),s=Kt(e),l=a?Ki:He(t),u=s?Ki:He(e),c=(l=l==Yi?Xi:l)==Xi,p=(u=u==Yi?Xi:u)==Xi,h=l==u;if(h&&Jt(t)){if(!Jt(e))return!1;c=!(a=!0)}if(h&&!c)return o=o||new Rt,a||oe(t)?Ui(t,e,i,r,n,o):function(t,e,i,r,n,o,a){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Ye(t),new Ye(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Y(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Vi;case"[object Set]":var l=1&r;if(s=s||qi,t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=Ui(s(t),s(e),r,n,o,a);return a.delete(t),c;
2case"[object Symbol]":if(Hi)return Hi.call(t)==Hi.call(e)}return!1}(t,e,l,i,r,n,o);if(!(1&i)){var d=c&&Ji.call(t,"__wrapped__"),f=p&&Ji.call(e,"__wrapped__");if(d||f)return n(d?t.value():t,f?e.value():e,i,r,o=o||new Rt)}return h&&function(t,e,i,r,n,o){var a=1&i,s=Ae(t),l=s.length;if(l!=Ae(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Wi.call(e,c)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var h=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<l;){var f=t[c=s[u]],m=e[c];if(r)var g=a?r(m,f,c,e,t,o):r(f,m,c,t,e,o);if(!(void 0===g?f===m||n(f,m,i,r,o):g)){h=!1;break}d=d||"constructor"==c}if(h&&!d){var y=t.constructor,v=e.constructor;y!=v&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v)&&(h=!1)}return o.delete(t),o.delete(e),h}(t,e,i,r,n,o=o||new Rt)},$i=function t(e,i,r,n,o){return e===i||(null==e||null==i||!qt(e)&&!qt(i)?e!=e&&i!=i:Qi(e,i,r,n,t,o))},tr=function(t,e){return $i(t,e)},er=(Gi=Object.freeze({__proto__:null,default:{}}))&&Gi.default||Gi,ir=i((function(t){!function(){var e,i,r,n=0,o=[];for(s.BUFFER_SIZE=512,s.bin=a,s.test=function(t){if("string"==typeof t)return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(t)},i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);function a(){var t=function(t){var o;if(void 0!==r){if(void 0===e||s.BUFFER_SIZE<n+16)if(n=0,r.getRandomValues)e=new Uint8Array(s.BUFFER_SIZE),r.getRandomValues(e);else{if(!r.randomBytes)throw new Error("Non-standard crypto library");e=r.randomBytes(s.BUFFER_SIZE)}return e.slice(n,n+=16)}for(o=[],i=0;i<16;i++)o.push(Math.floor(255*Math.random())+0);return o}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function s(){var t=a();return o[t[0]]+o[t[1]]+o[t[2]]+o[t[3]]+"-"+o[t[4]]+o[t[5]]+"-"+o[t[6]]+o[t[7]]+"-"+o[t[8]]+o[t[9]]+"-"+o[t[10]]+o[t[11]]+o[t[12]]+o[t[13]]+o[t[14]]+o[t[15]]}"undefined"!=typeof crypto?r=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(r=window.msCrypto),r=r||er,t.exports=s}()})),rr=(nr.TYPE="Feature",nr);function nr(t,e,i,r){this.type="Feature",this.type=nr.TYPE,this.properties=e||{},this.id=i,this.geometry=t,this.bbox=r}var or,ar=(d(sr,or=Array),sr.fromData=function(t){var e=NaN,i=NaN,r=new Set(["y"]),n=new Set(["x"]);return Object.keys(t).forEach((function(o){var a=o.toLowerCase();isNaN(e)&&r.has(a)&&"number"==typeof t[o]?e=t[o]:isNaN(i)&&n.has(a)&&"number"==typeof t[o]&&(i=t[o])})),isNaN(e)||isNaN(i)?null:new sr(e,i)},sr.getX=function(t){return 0<t.length?t[0]:NaN},sr.getY=function(t){return 1<t.length?t[1]:NaN},sr.getDestination=function(t,e,i){return new sr(sr.getX(t)+i*Math.cos((e+270)*Math.PI/180),sr.getY(t)+i*Math.sin((e+270)*Math.PI/180))},sr.getDistance=function(t,e){var i=sr.getX(t)-sr.getX(e),r=sr.getY(t)-sr.getY(e);return Math.sqrt(i*i+r*r)},sr.getHeading=function(t,e){var i=sr.getX(e)-sr.getX(t),r=sr.getY(t)-sr.getY(e);return 180*(2.5*Math.PI-Math.atan2(r,i))/Math.PI%360},sr);function sr(t,e){return or.call(this,t,e)||this}var lr=(ur.TYPE="Point",ur);function ur(t){this.type="Point",this.type=ur.TYPE,this.coordinates=t}var cr,pr,hr,dr,fr,mr,gr,yr,vr,_r,xr=6378137,br=Math.PI/180,wr=180/Math.PI,Sr=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function Tr(t){return t*br}function Cr(t){return t*wr}function Ir(t,e,i){return Math.min(Math.max(t,e),i)}function Er(t,e){var i=Tr(e[1]-t[1]),r=Tr(e[0]-t[0]),n=Math.pow(Math.sin(i/2),2)+Math.cos(Tr(t[1]))*Math.cos(Tr(e[1]))*Math.pow(Math.sin(r/2),2),o=2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n));return Math.round(xr*o*100)/100}function Mr(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return hr.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return hr.kilometers;case"miles":case"mile":case"mi":return hr.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return hr.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return hr.yards;default:return hr.meters}return hr.meters}function Ar(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return vr.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return vr.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return vr.knotsPerSecond;case"standardgravity":case"g":return vr.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return vr.feetPerSecondSquared;
2case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return vr.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return vr.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return vr.kilometersPerHourSecond;default:return vr.metersPerSecondSquared}return vr.metersPerSecondSquared}function Lr(t){if(t)switch(t){case"acres":case"ac":return cr.acres;case"hectares":case"ha":return cr.hectares;case"squareFeet":case"ft^2":case"ft2":return cr.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return cr.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return cr.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return cr.squareMiles;default:return cr.squareMeters}return cr.squareMeters}function kr(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return gr.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return gr.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return gr.knots;case"mach":case"m":return gr.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return gr.kilometersPerHour;default:return gr.metersPerSecond}return gr.metersPerSecond}function Pr(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return fr.ms;case"minutes":case"minute":case"mins":case"min":return fr.minutes;case"hours":case"hour":case"hr":case"h":return fr.hours;case"days":case"day":case"d":return fr.days;default:return fr.seconds}return fr.seconds}function Dr(t){var e=0;if(t&&0<t.length){e=Math.abs(zr(t[0]));for(var i=1,r=t.length;i<r;i++)e-=Math.abs(zr(t[i]))}return e}function zr(t){var e=0;if(3<=t.length){for(var i=void 0,r=void 0,n=0,o=t.length;n<o;n++)e+=(Tr(t[n===o-2?(i=o-2,r=o-1,0):n===o-1?(i=o-1,r=0,1):(r=(i=n)+1,n+2)][0])-Tr(t[i][0]))*Math.sin(Tr(t[r][1]));e=e*xr*xr/2}return e}function Or(t,e,i){return(t[0]-i[0])*(e[1]-i[1])-(t[1]-i[1])*(e[0]-i[0])}function Nr(t,e,i){if(2<=i.length){for(var r=1/0,n=void 0,o=null,a=Jr(i,22),s=void 0,l=0,u=a.length-1;l<u;l++)s=Rr(e,a[l],a[l+1]),(n=ar.getDistance(e,s))<r&&(r=n,o=s);if(o){var c=Xr([o],22)[0];return new rr(new lr(c),{distance:Ur(t,c)})}}else if(1===i.length)return new rr(new lr(i[0]),{distance:Ur(t,i[0])});return null}function Rr(t,e,i){if(e[0]===i[0]&&e[1]===i[1])return e;var r=t[0]-e[0],n=t[1]-e[1],o=i[0]-e[0],a=i[1]-e[1],s=(o*r+a*n)/(o*o+a*a);return s<0?e:1<s?i:[e[0]+o*s,e[1]+a*s]}function Br(t,e){var i;!isNaN(t)&&"number"==typeof e&&0<=e&&(i=e<Sr.length?Sr[e]:Math.pow(10,e),t=Math.round(t*i)/i);return t}function jr(t,e,i,r){switch(Mr(e)){case hr.meters:t/=1e3;break;case hr.feet:t/=3280.8399;break;case hr.miles:t/=.62137119;break;case hr.yards:t/=1093.6133;break;case hr.nauticalMiles:t/=.5399568;case hr.kilometers:}switch(Mr(i)){case hr.meters:t*=1e3;break;case hr.feet:t*=3280.8399;break;case hr.miles:t*=.62137119;break;case hr.yards:t*=1093.6133;break;case hr.nauticalMiles:t*=.5399568;case hr.kilometers:}if("number"==typeof r&&0<=r){var n=Math.pow(10,r);t=Math.round(t*n)/n}return t}function Fr(t,e,i,r){r=r||"meters",t=ln(t);var n=Vr(r),o=Tr(t[1]),a=Tr(t[0]),s=Tr(e),l=i/n,u=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(s)),c=a+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(u)),p=Ir(Wr(Cr(u)),-85,85);return[Yr(Cr(c)),p]}function Ur(t,e,i){var r=Er(t=ln(t),e=ln(e));return"meters"===i?r:jr(r,"meters",i||"meters")}function Vr(t){var e=Mr(t);return jr(xr,hr.meters,e)}function qr(t,e){if(t=ln(t),e=ln(e),t&&2<=t.length&&e&&2<=e.length){var i=Tr(t[1]),r=Tr(e[1]),n=Tr(e[0]-t[0]),o=Math.sin(n)*Math.cos(r),a=Math.cos(i)*Math.sin(r)-Math.sin(i)*Math.cos(r)*Math.cos(n);return(Cr(Math.atan2(o,a))+360)%360}return NaN}function Gr(t,e){var i,r=0;Array.isArray(t)?i=t:t.type&&"LineString"===t.type&&(i=t.coordinates);for(var n=0,o=i.length-1;n<o;
2n++)r+=Er(i[n],i[n+1]);return jr(r,"meters",e||"meters")}function Zr(t,e,i){i=i||"meters";var r,n,o=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var a=n.length,s=1;s<a;s++){if(e<=o+(r=Ur(n[s-1],n[s],i))){var l=qr(n[s-1],n[s]);return Fr(n[s-1],l,e-o,i)}o+=r}return o<=e?n[a-1]:n[0]}return null}function Hr(t,e,i,r,n){r=r||"meters",n=n||0,t=ln(t);for(var o=[],a=360/i,s=0;s<=i;s++)o.push(Fr(t,(s*a+n)%360,e,r));return o}function Wr(t){return 90<t?180<(t=(t+90)%360)?90-(t-180):t-90:t<-90?(t=(t-90)%360)<-180?-90-(t+180):t+90:t}function Yr(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function Kr(t,e,i){if(0===i)return Object.assign({},t);e=ln(e);for(var r,n,o=[],a=0,s=t.length;a<s;a++)r=Ur(e,t[a]),n=qr(e,t[a]),o.push(Fr(e,n+i,r));return o}function Xr(t,e){for(var i,r,n=512*Math.pow(2,e),o=[],a=0,s=t.length;a<s;a++)i=t[a][0]/n-.5,r=.5-t[a][1]/n,o.push([360*i,90-360*Math.atan(Math.exp(2*-r*Math.PI))/Math.PI]);return o}function Jr(t,e){for(var i,r,n,o=512*Math.pow(2,e),a=[],s=0,l=t.length;s<l;s++)n=Math.sin(t[s][1]*Math.PI/180),i=(t[s][0]+180)/360,r=.5-Math.log((1+n)/(1-n))/(4*Math.PI),a.push([Math.round(i*o),Math.round(r*o)]);return a}function Qr(t,e,i,r){switch(Ar(e)){case vr.kilometersPerHourSecond:t/=3.6;break;case vr.milesPerHourSecond:t/=2.236936292054;break;case vr.knotsPerSecond:t/=1.943844492441;break;case vr.standardGravity:t/=.1019716212978;break;case vr.kilometersPerSecondSquared:t/=.001;break;case vr.milesPerSecondSquared:t/=.000621371192;break;case vr.feetPerSecondSquared:t/=3.280839895012;break;case vr.yardsPerSecondSquared:t/=1.093613298338;case vr.metersPerSecondSquared:}switch(Ar(i)){case vr.kilometersPerHourSecond:t*=3.6;break;case vr.milesPerHourSecond:t*=2.236936292054;break;case vr.knotsPerSecond:t*=1.943844492441;break;case vr.standardGravity:t*=.1019716212978;break;case vr.kilometersPerSecondSquared:t*=.001;break;case vr.milesPerSecondSquared:t*=.000621371192;break;case vr.feetPerSecondSquared:t*=3.280839895012;break;case vr.yardsPerSecondSquared:t*=1.093613298338;case vr.metersPerSecondSquared:}return Br(t,r)}function $r(t,e,i,r){switch(Lr(e)){case cr.acres:t*=4046.8564224;break;case cr.hectares:t*=1e4;break;case cr.squareFeet:t*=.09290304;break;case cr.squareKilometers:t*=1e6;break;case cr.squareMiles:t*=259e4;break;case cr.squareYards:t*=.83612736;case cr.squareMeters:}switch(Lr(i)){case cr.acres:t/=4046.8564224;break;case cr.hectares:t/=1e4;break;case cr.squareFeet:t/=.09290304;break;case cr.squareKilometers:t/=1e6;break;case cr.squareMiles:t/=259e4;break;case cr.squareYards:t/=.83612736;case cr.squareMeters:}return Br(t,r)}function tn(t,e,i,r){switch(kr(e)){case gr.feetPerSecond:t*=1.09728;break;case gr.milesPerHour:t*=1.6093;break;case gr.knots:t*=1.852;break;case gr.metersPerSecond:t*=3.6;break;case gr.mach:t*=1234.8;case gr.kilometersPerHour:}switch(kr(i)){case gr.feetPerSecond:t/=1.09728;break;case gr.milesPerHour:t/=1.6093;break;case gr.knots:t/=1.852;break;case gr.metersPerSecond:t/=3.6;break;case gr.mach:t/=1234.8;case gr.kilometersPerHour:}return Br(t,r)}function en(t,e,i,r){switch(Pr(e)){case fr.ms:t/=1e3;break;case fr.hours:t*=3600;break;case fr.minutes:t*=60;break;case fr.days:t*=86400;case fr.seconds:}switch(Pr(i)){case fr.ms:t*=1e3;break;case fr.hours:t/=3600;break;case fr.minutes:t/=60;break;case fr.days:t/=86400;case fr.seconds:}return Br(t,r)}function rn(t,e,i,r,n,o,a,s){var l=jr(e,n,hr.meters),u=en(i,o,fr.seconds);return Qr(2*(l-tn(t,r,gr.metersPerSecond)*u)/(u*u),vr.metersPerSecondSquared,a,s)}function nn(t,e,i,r,n,o,a){var s=tn(t,r,gr.metersPerSecond);return Qr((tn(e,r,gr.metersPerSecond)-s)/en(i,n,fr.seconds),vr.metersPerSecondSquared,o,a)}function on(t,e,i,r){var n=an(t),o=an(e);return null!=n&&null!=o?en(o.getTime()-n.getTime(),fr.ms,i,r):NaN}function an(t){if("[object Date]"===Object.prototype.toString.call(t))return t;if("string"==typeof t){var e,i=Date.parse(t);if(!isNaN(i))return new Date(i);if(0<=t.indexOf("Date("))return e=0<(t=t.replace("/Date(","").replace(")/","")).indexOf("+")?parseInt(t.substr(0,t.indexOf("+")),10):0<t.indexOf("-")?parseInt(t.substr(0,t.indexOf("-")),10):parseInt(t,10),new Date(e)}else if("number"==typeof t)return new Date(t);return null}function sn(t){var e=[],i=null,r=null;if(Array.isArray(t)&&0<t.length)if(Array.isArray(t[0])&&"number"==typeof t[0][0])e=t;else for(var n=t.length,o=0;o<n;o++)e=e.concat(sn(t[o]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":case"MultiPoint":e=t.coordinates;break;case"Polygon":case"MultiLineString":i=t.coordinates;break;case"MultiPolygon":r=t.coordinates;break;case"Feature":var a=t;e=Sn._isCircle(a)?Sn._getCirclePositions(a):sn(a.geometry);break;case"FeatureCollection":e=sn(t.features);break;case"GeometryCollection":e=sn(t.geometries)}else if(t instanceof Sn)return sn(t.toJson());if(i)for(n=i.length,o=0;o<n;o++)e=e.concat(i[o]);else if(r){var s=r.length;for(o=0;o<s;o++)for(var l=r[o].length,u=0;u<l;u++)e=e.concat(r[o][u])}return e}function ln(t){if(Array.isArray(t)&&"number"==typeof t[0])return t;if(t.type){if("Point"===t.type)return t.coordinates;if("Feature"===t.type&&"Point"===t.geometry.type)return t.geometry.coordinates}else if(t instanceof Sn&&"Point"===t.getType())return t.getCoordinates();return null}function un(t,e,i){i=i||"meters";var r,n,o=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var a=n.length,s=1;s<a;s++){if(e<=o+(r=Ur(n[s-1],n[s],i))){var l=qr(n[s-1],n[s]),u=Fr(n[s-1],l,e-o,i);return new rr(new lr(u),{heading:l})}o+=r}return o<=e?new rr(new lr(n[a-1]),{heading:qr(n[a-2],n[a-1])}):new rr(new lr(n[0]),{heading:qr(n[0],n[1])})}return null}function cn(t,e,i,r){var n,o=ln(t),a=Jr([o],22)[0],s=null,l=1/0;switch((e=e instanceof Sn?e.toJson():e).type){case"Feature":return cn(t,e.geometry,i);case"Point":n=[[e.coordinates]];break;case"MultiPoint":for(var u=void 0,c=e.coordinates,p=0,h=c.length;p<h;p++)(u=Ur(o,c[p]))<l&&(l=u,s=new rr(new lr(c[p]),{distance:u}));break;case"LineString":n=[e.coordinates];break;case"Polygon":case"MultiLineString":n=e.coordinates;break;case"MultiPolygon":var d=e.coordinates;if(0<d.length)for(n=d[0],p=1,h=d.length;p<h;p++)n=n.concat(d[p])}if(n){var f=void 0;for(p=0,h=n.length;p<h;p++)(f=Nr(o,a,n[p]))&&f.properties.distance<l&&(l=f.properties.distance,s=f)}return s&&(s.properties.distance=jr(s.properties.distance,"meters",
2i,r)),s}(pr=cr=cr||{}).squareMeters="squareMeters",pr.acres="acres",pr.hectares="hectares",pr.squareFeet="squareFeet",pr.squareKilometers="squareKilometers",pr.squareMiles="squareMiles",pr.squareYards="squareYards",(dr=hr=hr||{}).meters="meters",dr.kilometers="kilometers",dr.feet="feet",dr.miles="miles",dr.nauticalMiles="nauticalMiles",dr.yards="yards",(mr=fr=fr||{}).seconds="seconds",mr.hours="hours",mr.ms="ms",mr.minutes="minutes",mr.days="days",(yr=gr=gr||{}).metersPerSecond="metersPerSecond",yr.kilometersPerHour="kilometersPerHour",yr.feetPerSecond="feetPerSecond",yr.milesPerHour="milesPerHour",yr.knots="knots",yr.mach="mach",(_r=vr=vr||{}).milesPerSecondSquared="milesPerSecondSquared",_r.kilometersPerSecondSquared="kilometersPerSecondSquared",_r.knotsPerSecond="knotsPerSecond",_r.standardGravity="standardGravity",_r.feetPerSecondSquared="feetPerSecondSquared",_r.yardsPerSecondSquared="yardsPerSecondSquared",_r.milesPerHourSecond="milesPerHourSecond",_r.kilometersPerHourSecond="kilometersPerHourSecond",_r.metersPerSecondSquared="metersPerSecondSquared";var pn,hn=(d(dn,pn=Array),dn.fromPosition=function(t){return 2===t.length?new dn(t[0],t[1]):2<t.length?new dn(t[0],t[1],t[2]):null},dn.areEqual=function(t,e,i){if(void 0===i&&(i=6),t&&2<=t.length&&e&&2<=e.length){var r=Math.pow(10,i),n=Wr(t[1]),o=Wr(e[1]),a=Yr(t[0]),s=Yr(e[0]);if(0!=Math.round((n-o)*r)/r)return!1;var l=Math.round((a-s)*r)/r;return 0==l||360==l}return!1},dn.fromLatLng=function(t,e,i){var r=[];if("number"==typeof t)r.push(t),"number"==typeof e&&r.push(e),"number"==typeof i&&r.push(i);else if(Array.isArray(t))2<=t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&(3<=t.length&&"number"==typeof t[2]?r.push(t[0],t[1],t[2]):r.push(t[0],t[1]));else if("object"==typeof t){var n=["lat","latitude","y"],o=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],s=NaN,l=NaN,u=NaN;Object.keys(t).forEach((function(e,i,r){var c=e.toLowerCase();isNaN(s)&&0<=n.indexOf(c)&&"number"==typeof t[e]?s=t[e]:isNaN(l)&&0<=o.indexOf(c)&&"number"==typeof t[e]?l=t[e]:isNaN(u)&&0<=a.indexOf(c)&&"number"==typeof t[e]&&(u=t[e])})),isNaN(s)||isNaN(l)||(r.push(l,s),isNaN(u)||r.push(u))}return 2<=r.length?r:null},dn.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var i=0,r=t.length;i<r;i++){var n=dn.fromLatLng(t[i]);n&&e.push(n)}return e},dn._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},dn);function dn(t,e,i){return i?pn.call(this,t,e,i)||this:pn.call(this,t,e)||this}var fn=(mn.TYPE="Polygon",mn);function mn(t,e){this.type="Polygon",this.type=mn.TYPE,1===hn._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var gn=(yn.prototype._addEventListener=function(t,e,i){this.listeners.has(t)||this.listeners.set(t,new mi),this.listeners.get(t).set(e,i)},yn.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},yn.prototype._invokeEvent=function(t,e){var i=this;this.listeners.has(t)&&this.listeners.get(t).forEach((function(r,n){r&&i._removeEventListener(t,n);try{n(e)}catch(r){console.error(r)}}))},yn);function yn(){this.listeners=new mi}var vn=Object.freeze({__proto__:null,EventEmitter:gn}),_n=(xn.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},xn.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},xn.prototype.transformArray=function(t,e,i){if(t&&Array.isArray(t)&&Array.isArray(t[0])){for(var r=[],n=0,o=t;n<o.length;n++){var a=o[n];r.push(this.transform(a,e,i))}return r}return null},xn.prototype.transform=function(t,e,i){var r=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],n=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof i&&0<=i?[Br(r,i),Br(n,i)]:[Br(r,6),Br(n,6)]},xn._calculateAffineTransform=function(t,e){if(t.length!==e.length||t.length<1)throw new Error("Error: source and target arrays must have the same length.");var i=Math.min(t[0].length,e[0].length),r=i+1;if(t.length<i)throw new Error("Erorr: At least "+i+" reference points required.");for(var n=[],o=[],a=0;a<r;a++){o[a]=[];for(var s=0;s<r;s++){s<i&&(n[s]=0);for(var l=o[a][s]=0;l<t.length;l++)s<i&&(n[s]+=a<i?t[l][a]*e[l][s]:e[l][s]),o[a][s]+=i<=a&&i<=s?1:i<=a?t[l][s]:i<=s?t[l][a]:t[l][a]*t[l][s]}o[a]=o[a].concat(n)}if(!this._gaussJordanElimination(o))throw new Error("Error: Singular matrix. Points are likely coplanar.");return o},xn._gaussJordanElimination=function(t){for(var e,i,r=t.length,n=2*r-1,o=0;o<r;o++){for(var a=o,s=o+1;s<r;s++)Math.abs(t[s][o])>Math.abs(t[a][o])&&(a=s);if(i=t[a],t[a]=t[o],t[o]=i,Math.abs(t[o][o])<=1e-10)return!1;for(var l=o+1;l<r;l++){e=t[l][o]/t[o][o];for(var u=o;u<n;u++)t[l][u]-=t[o][u]*e}}for(o=r-1;-1<o;o--){for(e=t[o][o],s=0;s<o;s++)for(var c=n-1;o-1<c;c--)t[s][c]-=t[o][c]*t[s][o]/e;t[o][o]/=e;for(var p=r;p<n;p++)t[o][p]/=e}return!0},xn);function xn(t,e){this.M=xn._calculateAffineTransform(t,e),this.inverseM=xn._calculateAffineTransform(e,t)}var bn,wn=Object.freeze({__proto__:null,AffineTransform:_n,_precision:Br,get AreaUnits(){return cr},get DistanceUnits(){return hr},get TimeUnits(){return fr},get SpeedUnits(){return gr},get AccelerationUnits(){return vr},boundingBoxToPolygon:function(t){var e=Yr(In.getWest(t)),i=Yr(In.getE
2ast(t)),r=Wr(In.getNorth(t)),n=Wr(In.getSouth(t)),o=In.getCenter(t),a=[[e,r],[e,n],[o[0],n],[i,n],[i,r],[o[0],r],[e,r]];return new fn([a])},convertDistance:jr,getCardinalSpline:function(t,e,i,r){var n;if(!t||t.length<=2)return n;"number"!=typeof e&&(e=.5),("number"!=typeof i||i<=0)&&(i=15);var o=t.length;n=t.slice(0),r?(hn.areEqual(n[0],n[o-1])&&(n.pop(),o--),n.unshift(t[o-1]),n.push(t[0]),n.push(t[1]),o++):(n.unshift(t[0]),n.push(t[o-1]));var a,s,l,u=[];u.push([1,0,0,0]);for(var c=1;c<i-1;c++)l=(a=c/i)*(s=a*a),u.push([2*l-3*s+1,-2*l+3*s,l-2*s+a,l-s]);u.push([0,1,0,0]);var p,h,d,f,m,g,y,v=[];for(c=1;c<o;c++)for(h=e*(n[c+1][0]-n[c-1][0]),d=e*(n[c+1][1]-n[c-1][1]),f=e*(n[c+2][0]-n[c][0]),m=e*(n[c+2][1]-n[c][1]),a=0;a<i;a++)y=(p=u[a])[0]*n[c][0]+p[1]*n[c+1][0]+p[2]*h+p[3]*f,g=Ir(g=p[0]*n[c][1]+p[1]*n[c+1][1]+p[2]*d+p[3]*m,-85,85),v.push([y,g]);return v},getDestination:Fr,getDistanceTo:Ur,getEarthRadius:Vr,getGeodesicPath:function(t,e){var i;(!e||e<=0)&&(e=15),Array.isArray(t)?i=t:t.type&&"LineString"===t.type&&(i=t.coordinates);for(var r=i.length-1,n=[],o=0;o<r;o++)for(var a=Tr(i[o][1]),s=Tr(i[o][0]),l=Tr(i[o+1][1]),u=Tr(i[o+1][0]),c=2*Math.asin(Math.sqrt(Math.pow(Math.sin((a-l)/2),2)+Math.cos(a)*Math.cos(l)*Math.pow(Math.sin((s-u)/2),2))),p=0;p<=e;p++){var h=p/e,d=Math.sin((1-h)*c)/Math.sin(c),f=Math.sin(h*c)/Math.sin(c),m=d*Math.cos(a)*Math.cos(s)+f*Math.cos(l)*Math.cos(u),g=d*Math.cos(a)*Math.sin(s)+f*Math.cos(l)*Math.sin(u),y=d*Math.sin(a)+f*Math.sin(l),v=Math.atan2(y,Math.sqrt(Math.pow(m,2)+Math.pow(g,2))),_=Math.atan2(g,m);v=Ir(Cr(v),-85,85),_=Cr(_),n.push([_,v])}return n},getHeading:qr,getLengthOfPath:Gr,getPositionAlongPath:Zr,getRegularPolygonPath:Hr,interpolate:function(t,e,i){i=void 0===i?.5:i;var r=Ur(t=ln(t),e=ln(e),"kilometers");return Fr(t,qr(t,e),r*i,"kilometers")},normalizeLatitude:Wr,normalizeLongitude:Yr,rotatePositions:Kr,getPixelHeading:function(t,e){var i=Jr([t=ln(t),e=ln(e)],21),r=i[0],n=i[1],o=n[0]-r[0],a=r[1]-n[1];return(2.5*Math.PI-Math.atan2(a,o))*wr%360},mercatorPixelsToPositions:Xr,mercatorPositionsToPixels:Jr,convertAcceleration:Qr,convertArea:$r,convertSpeed:tn,convertTimespan:en,getAcceleration:rn,getAccelerationFromSpeeds:nn,getAccelerationFromFeatures:function(t,e,i,r,n,o,a){if("string"==typeof i&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var s=on(t.properties[i],e.properties[i],fr.seconds);if(!isNaN(s)){var l=0;if(r&&"string"==typeof r){var u=t.properties[r],c=e.properties[r];if("number"==typeof u&&(l=u,"number"==typeof c))return nn(u,c,s,n,fr.seconds,o,a)}return rn(l,Ur(t.geometry.coordinates,e.geometry.coordinates,hr.meters),s,n,hr.meters,fr.seconds,o,a)}}return NaN},getArea:function t(e,i,r){if(e){var n=0;switch((e=e instanceof Sn?e.toJson():e).type){case"Feature":if(e.geometry)return t(e.geometry,i,r);break;case"Polygon":e.coordinates&&(n=Dr(e.coordinates));break;case"MultiPolygon":var o=e;if(o.coordinates)for(var a=0,s=o.coordinates.length;a<s;a++)n+=Dr(o.coordinates[a])}return $r(n,cr.squareMeters,i,r)}return 0},getSpeed:function(t,e,i,r,n,o){var a=ln(t),s=ln(e);if(a&&s){var l=en(i,r,fr.seconds);return tn(Ur(a,s,hr.meters)/l,gr.metersPerSecond,n,o)}return 0},getSpeedFromFeatures:function(t,e,i,r,n){if("string"==typeof i&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var o=this.getTimespan(t.properties[i],e.properties[i],fr.seconds);if(!isNaN(o)){var a=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,hr.meters);return this.convertSpeed(a/o,gr.metersPerSecond,r,n)}}return NaN},getTimespan:on,getTravelDistance:function(t,e,i,r,n,o,a,s){e=this.convertTimespan(e,n,fr.seconds);var l=(i=this.convertSpeed(i,o,gr.metersPerSecond))*e;return"number"==typeof r&&(l+=.5*this.convertAcceleration(r,a,vr.metersPerSecondSquared)*e*e),this.convertDistance(l,hr.meters,t,s)},parseTimestamp:an,getConvexHull:function(t){var e=sn(t).map((function(t){return[Yr(t[0]),Wr(t[1])]}));e.sort((function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}));for(var i=[],r=0,n=e;r<n.length;r++){for(var o=n[r];2<=i.length&&Or(i[i.length-2],i[i.length-1],o)<=0;)i.pop();i.push(o)}for(var a=[],s=e.length-1;0<=s;s--){for(;2<=a.length&&Or(a[a.length-2],a[a.length-1],e[s])<=0;)a.pop();a.push(e[s])}return new fn([i.concat(a)])},getPositions:sn,getPosition:ln,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var i=[],r=Gr(t,hr.meters)/(e-1),n=0;n<e;n++){var o=Zr(t,r*n,hr.meters);null!=o&&i.push(o)}return i},getPointWithHeadingAlongPath:un,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var i=[],r=Gr(t,hr.meters)/(e-1),n=0;n<e;n++){var o=un(t,r*n,hr.meters);null!=o&&i.push(o)}return i},getClosestPointOnGeometry:cn}),Sn=(d(Tn,bn=gn),Tn.prototype.addProperty=function(t,e){tr(this.data.properties[t],e)||(this.data.properties[t]=fi(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Tn.prototype.getBounds=function(){var t,e=this.getCoordinates(),i=this.getType();if("Point"===i)if(this.circlePolygon){var r=this.circlePolygon.geometry.coordinates;t=In.fromPositions(r[0])}else t=new In(r=e,r);else if("MultiPoint"===i||"LineString"===i)r=e,t=In.fromPositions(r);else if("Polygon"===i)r=e,t=In.fromPositions(r[0]);else if("MultiLineString"===i)for(var n=0,o=r=e;n<o.length;n++){var a=o[n];t=In.merge(t,In.fromPositions(a))}else if("MultiPolygon"===i)for(var s=0,l=r=e;s<l.length;s++){var u=l[s];t=In.merge(t,In.fromPositions(u[0]))}return t},Tn.prototype.getCoordinates=function(){return fi(this.data.geometry.coordinates)},Tn.prototype.getCircleCoordinates=function(){return this.circlePolygon?fi(this.circlePolygon.geometry.coordinates[0]):null},Tn.prototype.getId=function(){return this.data.id},Tn.prototype.getProperties=function(){return fi(this.data.properties)},Tn.prototype.getType=function(){return this.data.geometry.type},Tn.prototype.isCircle=function(){return Tn._isCircle(this.data)},Tn.prototype.isRectangle=function(){return Tn._isRectangle(this.data)},Tn.prototype.setCoordinates=function(t){var e;e="Polygon"===this.getType()&&1===hn._getDimensions(t)?[t]:t,tr(this.data.geometry.coordinates,e)||(this.data.geometry.coordinates=fi(e),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Tn.prototype.setProperties=function(t){t[Tn._shapeIdPropName]=this.data.id,tr(this.data.properties,t)||(this.data.properties=fi(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Tn.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},Tn.prototype._toJson=function(){return this.circlePolygon||this.data},Tn.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},Tn.prototype._handleCircle=function(){if(this.isCircle()){var t=Tn._getCirclePositions(this.data);this.circlePolygon=new rr(new fn([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"}else delete this.circlePolygon},Tn._isCircle=function(t){return t&&t.geometry&&"Point"===t.geometry.type&&t.geometry.coordinates&&t.properties&&"string"==typeof t.properties.subType&&"circle"===t.properties.subType.toLowerCase()&&"number"==typeof t.properties.radius},Tn._isRectangle=function(t){if("Polygon"===t.geometry.type&&t.geometry.coordinates&&"string"==typeof t.properties.subType&&"rectangle"===t.properties.subType.toLowerCase()){var e=t.geometry.coordinates;if(1===e.length){var i=e[0];if(5===i.length)return i[0][0]===i[4][0]&&i[0][1]===i[4][1];if(4===i.length)return!0}}return!1},Tn._getCirclePositions=function(t){return Hr(t.geometry.coordinates,t.properties.radius,72,"meters")},Tn._shapeIdPropName="_azureMapsShapeId",Tn);function Tn(t,e,i){var r,n=bn.call(this)||this;if("Feature"===t.type){var o=t;r=fi(o.geometry),i=o.properties?fi(o.properties):{},e=null==o.id||""===o.id?ir():o.id}else r=fi(t),e=null==e||""===e?ir():e,i=i?fi(i):{};return i[Tn._shapeIdPropName]=e,n.data=new rr(r,i,e),n._handleCircle(),n}var Cn,In=(d(En,Cn=Array),En.fromBoundingBox=function(t){var e=En.getWest(t),i=En.get
2South(t),r=En.getEast(t),n=En.getNorth(t);return new En([e,i,r,n])},En.fromDimensions=function(t,e,i){var r=t[0],n=t[1],o=Math.min(Math.max(n+i/2,-85.5),85.5),a=Math.min(Math.max(n-i/2,-85.5),85.5),s=Yr(r+e/2);return new En([Yr(r-e/2),a,s,o])},En.fromEdges=function(t,e,i,r){return new En([t,e,i,r])},En.containsPosition=function(t,e){var i=En.getCenter(t),r=Math.abs(i[1]-e[1]),n=Math.abs(i[0]-e[0]);180<n&&(n=360-n);var o=En.getHeight(t),a=En.getWidth(t);return r<=o/2+1e-8&&n<=a/2+1e-8},En.crossesAntimeridian=function(t){return Yr(En.getEast(t))-Yr(En.getWest(t))<0},En.getCenter=function(t){var e=Yr(En.getEast(t)),i=Yr(En.getWest(t));e<i&&(e+=360);var r=Yr((i+e)/2),n=Wr(En.getSouth(t)),o=Wr(En.getNorth(t));return[r,Wr((n+o)/2)]},En.getHeight=function(t){var e=Wr(En.getNorth(t))-Wr(En.getSouth(t));return isNaN(e)?0:e},En.getWidth=function(t){var e=Yr(En.getEast(t))-Yr(En.getWest(t));return isNaN(e)?0:e<0?e+=360:e},En.getSouthWest=function(t){var e=this.getSouth(t),i=this.getWest(t);return isNaN(e)||isNaN(i)?null:[i,e]},En.getNorthEast=function(t){var e=this.getNorth(t),i=this.getEast(t);return isNaN(e)||isNaN(i)?null:[i,e]},En.getNorthWest=function(t){var e=this.getNorth(t),i=this.getWest(t);return isNaN(e)||isNaN(i)?null:[i,e]},En.getSouthEast=function(t){var e=this.getSouth(t),i=this.getEast(t);return isNaN(e)||isNaN(i)?null:[i,e]},En.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},En.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},En.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},En.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},En.intersect=function(t,e){var i=En.getCenter(t),r=En.getCenter(e),n=Math.abs(i[1]-r[1]),o=Math.abs(i[0]-r[0]);180<o&&(o=360-o);var a=En.getHeight(t),s=En.getWidth(t),l=En.getHeight(e),u=En.getWidth(e);return n<=a/2+l/2&&o<=s/2+u/2},En.merge=function(t,e){var i=t&&4===t.length,r=e&&4===e.length;if(i&&!r)return t;if(r&&!i)return e;if(!i&&!r)return null;var n=Math.max(Wr(En.getNorth(t)),Wr(En.getNorth(e))),o=Math.min(Wr(En.getSouth(t)),Wr(En.getSouth(e))),a=[t,e],s=[],l=0;for(l=0;l<a.length;l++){var u=a[l],c=Yr(En.getWest(u)),p=Yr(En.getEast(u));En.crossesAntimeridian(u)?(s.push([c,180]),s.push([-180,p])):s.push([c,p])}s.sort((function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}));var h=[],d=s[0];for(l=1;l<s.length;){var f=s[l];d[1]>=f[0]?d[1]=Math.max(d[1],f[1]):(h.push(d),d=f),l++}h.push(d);var m=h.length,g=h[0][0]+360-h[m-1][1],y=[h[m-1][1],h[0][0]];for(l=1;l<m;l++){var v=h[l][0]-h[l-1][1];g<v&&(g=v,y=[h[l-1][1],h[l][0]])}return new En([y[1],o],[y[0],n])},En.fromPositions=function(t){for(var e,i=NaN,r=NaN,n=NaN,o=NaN,a=t.length,s=new Array(a),l=0;a--;)if((e=t[a])&&2<=e.length){var u=Wr(e[1]);i=isNaN(i)?u:Math.max(i,u),r=isNaN(r)?u:Math.min(r,u),s[l++]=Yr(e[0])}if(l){s.length=l,s.sort((function(t,e){return t-e}));var c=s[0]+360-s[l-1],p=0;for(a=1;a<l;a++){var h=s[a]-s[a-1];c<h&&(c=h,p=a)}n=s[p],o=s[(p||l)-1]}return isNaN(n)||isNaN(r)||isNaN(o)||isNaN(i)?null:new En([n,r,o,i])},En.fromLatLngs=function(t){return En.fromPositions(hn.fromLatLngs(t))},En.fromData=function(t){var e,i=null;if(Array.isArray(t)&&0<t.length){for(var r=0,n=t;r<n.length;r++){var o=n[r];null!=(e=En.fromData(o))&&(i=null===i?e:En.merge(i,e))}return i}if(t instanceof Sn)return t.getBounds();if(t&&t.type){var a=t;if(a.bbox&&4===a.bbox.length)return a.bbox;switch(a.type){case"FeatureCollection":return En.fromData(a.features);case"Feature":return Sn._isCircle(a)?En.fromPositions(Sn._getCirclePositions(a)):En.fromData(a.geometry);case"GeometryCollection":return En.fromData(a.geometries);case"Point":var s=a.coordinates;if(s&&2<=s.length)return[s[0],s[1],s[0],s[1]];break;case"LineString":case"MultiPoint":return En.fromPositions(a.coordinates);case"Polygon":case"MultiLineString":var l=a.coordinates;if(l&&0<l.length){for(var u=0,c=l.length;u<c;u++)null!=(e=En.fromPositions(l[u]))&&(i=null===i?e:En.merge(i,e));if(null!=i)return i}break;case"MultiPolygon":var p=a.coordinates;if(p&&0<p.length){for(u=0,c=p.length;u<c;u++)for(var h=0,d=p[u].length;h<d;
2h++)null!=(e=En.fromPositions(p[u][h]))&&(i=null===i?e:En.merge(i,e));return i}}}return null},En.splitOnAntimeridian=function(t){var e=[];if(En.crossesAntimeridian(t)){var i,r=void 0,n=Yr(En.getWest(t)),o=Yr(En.getEast(t)),a=Wr(En.getNorth(t)),s=Wr(En.getSouth(t));i=6<=t.length?(r=new En([n,s,t[2],180,a,t[5]]),new En([-180,s,t[2],o,a,t[5]])):(r=new En([n,s,180,a]),new En([-180,s,o,a])),e.push(r,i)}else e.push(new En(t));return e},En);function En(t,e){var i=this;if(t&&e){var r=t;i=r[2]&&e[2]?Cn.call(this,r[0],r[1],r[2]||0,e[0],e[1],e[2]||0)||this:Cn.call(this,r[0],r[1],e[0],e[1])||this}else if(t){var n=t;n&&(4===n.length?i=Cn.call(this,n[0],n[1],n[2],n[3])||this:6<=n.length&&(i=Cn.call(this,n[0],n[1],n[2],n[3],n[4],n[5])||this))}return i}var Mn=(An.TYPE="FeatureCollection",An);function An(t,e){this.type="FeatureCollection",this.type=An.TYPE,this.features=t,this.bbox=e}var Ln=(kn.TYPE="GeometryCollection",kn);function kn(t){this.type="GeometryCollection",this.type=kn.TYPE,this.geometries=t}var Pn=(Dn.TYPE="LineString",Dn);function Dn(t,e){this.type="LineString",this.type=Dn.TYPE,this.coordinates=t,this.bbox=e}var zn=(On.TYPE="MultiLineString",On);function On(t,e){this.type="MultiLineString",this.type=On.TYPE,this.coordinates=t,this.bbox=e}var Nn=(Rn.TYPE="MultiPoint",Rn);function Rn(t,e){this.type="MultiPoint",this.type=Rn.TYPE,this.coordinates=t,this.bbox=e}var Bn=(jn.TYPE="MultiPolygon",jn);function jn(t,e){this.type="MultiPolygon",this.type=jn.TYPE,this.coordinates=t,this.bbox=e}var Fn,Un=Object.freeze({__proto__:null,Feature:rr,FeatureCollection:Mn,LineString:Pn,Point:lr,Polygon:fn,Position:hn,BoundingBox:In,MultiLineString:zn,MultiPoint:Nn,MultiPolygon:Bn,GeometryCollection:Ln}),Vn=function(t,e){return di(t,5,e="function"==typeof e?e:void 0)},qn=(d(Gn,Fn=y),Gn);function Gn(){var t=null!==Fn&&Fn.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMa
2xZoom=void 0,t.clusterProperties=void 0,t.lineMetrics=!1,t.tolerance=.375,t}var Zn,Hn=(d(Wn,Zn=gn),Wn.prototype.getId=function(){return this.id},Wn.prototype._setMap=function(t){if(null==t||void 0===t){var e=this.map;delete this.map,this._invokeEvent("sourceremoved",this),e&&e.events.invoke("sourceremoved",this)}else this.map=t,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this)},Wn);function Wn(t){var e=Zn.call(this)||this;return e.id=t||ir(),e}var Yn,Kn=(d(Xn,Yn=Hn),Xn.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},Xn.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},Xn.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},Xn.prototype.getClusterExpansionZoom=function(t){var e=this;return new Promise((function(i,r){if(e.map){var n=e.map._getMap().getSource(e.getId());n&&"geojson"===n.type&&n.getClusterExpansionZoom(t,(function(t,e){t?r(t):"number"!=typeof e||i(e)}))}else r("The DataSource hasn't been added to a map.")}))},Xn.prototype.getClusterChildren=function(t){var e=this;return new Promise((function(i,r){if(e.map){var n=e.map._getMap().getSource(e.getId());n&&"geojson"===n.type&&n.getClusterChildren(t,(function(t,n){t?r(t):n&&i(e.map.sources._mapFeaturesToShapes(n,!1,e))}))}else r("The DataSource hasn't been added to a map.")}))},Xn.prototype.getClusterLeaves=function(t,e,i){var r=this;return new Promise((function(n,o){if(r.map){var a=r.map._getMap().getSource(r.getId());a&&"geojson"===a.type&&a.getClusterLeaves(t,e,i,(function(t,e){t?o(t):e&&n(r.map.sources._mapFeaturesToShapes(e,!1,r))}))}else o("The DataSource hasn't been added to a map.")}))},Xn.prototype.getOptions=function(){return fi(this.options)},Xn.prototype.getShapes=function(){return Array.from(this.shapes)},Xn.prototype.importDataFromUrl=function(t){var e=this;return fetch(t,{method:"GET",mode:"cors"}).then((function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)})).then((function(t){e.add(t)}))},Xn.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},Xn.prototype.remove=function(t){for(var e=0,i=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];"number"==typeof r?this._removeByIndex(r):this._removeById(r)}this._updateSource()},Xn.prototype.removeById=function(t){for(var e=0,i=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];this._removeById(r)}this._updateSource()},Xn.prototype.setOptions=function(t){var e=(new qn).merge(this.options,fi(t));tr(this.options,e)||(this._invokeEvent("datasourceupdated",this),this.options=e,this.map&&this.map._rebuildStyle())},Xn.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},Xn.prototype.toJson=function(){return new Mn(this.shapes.map((function(t){return t.toJson()})))},Xn.prototype._toJson=function(){return new Mn(this.shapes.map((function(t){return t._toJson()})))},Xn.prototype._buildSource=function(){var t={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},Xn.prototype._addNoUpdate=function(t,e){var i;if(t instanceof Sn)this._addToSources(t,e),i=[t];else if(Array.isArray(t))i=t.map((function(t){return t instanceof Sn?t:new Sn(t)})),this._addToSources(i,e);else if("FeatureCollection"===t.type)i=t.features.map((function(t){return new Sn(t)})),this._addToSources(i,e);else if("GeometryCollection"===t.type)i=t.geometries.map((function(t){return new Sn(t)})),this._addToSources(i,e);else{var r=new Sn(t);this._addToSources(r,e),i=[r]}this._invokeEvent("dataadded",i)},Xn.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new mi,t&&0<t.length&&this._invokeEvent("dataremoved",t)},Xn.prototype._updateSource=function(){var t=this;void 0===this.requestId&&(this.requestId=requestAnimationFrame((function(){t._updateMboxSource(),t.requestId=void 0})))},Xn.prototype._addToSources=function(t,e){if(t=Array.isArray(t)?t:[t],"number"!=typeof e)for(var i=0,r=t;i<r.length;i++){var n=r[i];this.shapes.push(n),this.shapesMap.set(n.getId(),this.shapes.length-1)}else for(var o=t.length-1;0<=o;o--)this.shapes.splice(e,0,t[o]),this._updateShapesMap(e);for(var a=0,s=t;a<s.length;a++)(n=s[a])._setDataSource(this)},Xn.prototype._removeById=function(t){var e,i=t instanceof Sn?t.getId():"string"==typeof t||"number"==typeof t?t:t.id;(e=this.shapes[this.shapesMap.get(i)])&&(e._setDataSource(null),this.shapes.splice(this.shapesMap.get(i),1),this._updateShapesMap(this.shapesMap.get(i)),this.shapesMap.delete(i),this._invokeEvent("dataremoved",[e]))},Xn.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '"+t+"' is greater than the maximum possible index '"+(this.shapes.length-1)+"'");e=this.shapes[t],this.shapesMap.delete(e.getId()),e._setDataSource(null),this.shapes.splice(t,1),this._updateShapesMap(t),this._invokeEvent("dataremoved",[e])},Xn.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},Xn.prototype._updateMboxSource=function(){if(this.map&&this.map._getMap()){var t=this.map._getMap().getSource(this.getId());t&&"geojson"===t.type&&t.setData(this._toJson())}},Xn);function Xn(t,e){var i=Yn.call(this,t)||this;return i.requestId=void 0,i.options=(new qn).merge(fi(e)),i.shapes=[],i.shapesMap=new mi,i}var Jn,Qn=(d($n,Jn=y),$n);function $n(){var t=null!==Jn&&Jn.apply(this,arguments)||this;return t.bounds=void 0,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=void 0,t.tileSize=512,t.url=void 0,t}var to,eo=(d(io,to=Hn),io.prototype.getOptions=function(){return fi(this.options)},io.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},io.prototype._buildSource=function(){var t={type:"vector"};
vendor: 4,804 bytes, line 2
2return this.options.bounds&&(t.bounds=this.options.bounds),this.options.tiles?(t.tiles=this.options.tiles,t.minzoom=this.options.minZoom,t.maxzoom=this.options.maxZoom):this.options.url&&(t.url=this.options.url),this.options.isTMS&&(t.scheme="tms"),this.options.tileSize&&(t.tileSize=this.options.tileSize),t},io);function io(t,e){var i=to.call(this,t)||this;return i.options=(new Qn).merge(fi(e)),i}var ro,no=Object.freeze({__proto__:null,Source:Hn,DataSource:Kn,VectorTileSource:eo}),oo=(d(ao,ro=gn),ao.prototype.getId=function(){return this.id},ao.prototype.getMap=function(){return this.map||null},ao.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},ao.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},ao._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},ao.prototype._updateBaseProperties=function(t,e){this._updateFilter(t.filter,e.filter),this._updateZoomRange(t.minZoom,e.minZoom,t.maxZoom,e.maxZoom),this._updateLayoutProperty("visibility",t.visible,e.visible,t.visible?"visible":"none")},ao.prototype._updateFilter=function(t,e){tr(t,e)||this.map._getMap().setFilter(this.id,t)},ao.prototype._updatePaintProperty=function(t,e,i,r){tr(e,i)||this.map._getMap().setPaintProperty(this.id,t,r||e)},ao.prototype._updateLayoutProperty=function(t,e,i,r){tr(e,i)||this.map._getMap().setLayoutProperty(this.id,t,r||e)},ao.prototype._updateZoomRange=function(t,e,i,r){t===e&&r===i||this.map._getMap().setLayerZoomRange(this.id,t,i)},ao.LayerEvents={layeradded:void 0,layerremoved:void 0},ao);function ao(t){var e=ro.call(this)||this;return e.id=t||ir(),e}var so,lo=(d(uo,so=y),uo._cloneCustomizer=function(t){if(t instanceof Hn)return t},uo);function uo(){var t=null!==so&&so.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var co,po=(d(ho,co=lo),ho);function ho(){var t=null!==co&&co.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t}var fo,mo=(d(go,fo=oo),go.prototype.getOptions=function(){return Vn(this.options,po._cloneCustomizer)},go.prototype.getSource=function(){return this.options.source},go.prototype.setOptions=function(t){var e=(new po).merge(this.options,Vn(t,po._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("circle-blur",e.blur,this.options.blur),this._updatePaintProperty("circle-color",e.color,this.options.color),this._updatePaintProperty("circle-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("circle-radius",e.radius,this.options.radius),this._updatePaintProperty("circle-stroke-color",e.strokeColor,this.options.strokeColor),this._updatePaintProperty("circle-stroke-opacity",e.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("circle-stroke-width",e.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("circle-pitch-alignment",e.pitchAlignment,this.options.pitchAlignment)}this.options=e},go.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof Hn?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},go.prototype._getLayerIds=function(){return[this.id]},go.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Hn?t.add(this.options.source.getId()):t.add(this.options.source),t},go);function go(t,e,i){var r=fo.call(this,e)||this;return r.options=(new po).merge(Vn(i,po._cloneCustomizer)),r.options.source=t||r.options.source,r}var yo,vo=(d(_o,yo=lo),_o._cloneCustomizer=function(t){if(t instanceof Hn)return t},_o);function _o(){var t=null!==yo&&yo.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radiu
2s=30,t.weight=1,t}var xo,bo=(d(wo,xo=oo),wo.prototype.getOptions=function(){return Vn(this.options,vo._cloneCustomizer)},wo.prototype.getSource=function(){return this.options.source},wo.prototype.setOptions=function(t){var e=(new vo).merge(this.options,Vn(t,vo._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("heatmap-color",e.color,this.options.color),this._updatePaintProperty("heatmap-intensity",e.intensity,this.options.intensity),this._updatePaintProperty("heatmap-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("heatmap-radius",e.radius,this.options.radius),this._updatePaintProperty("heatmap-weight",e.weight,this.options.weight)}this.options=e},wo.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof Hn?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},wo.prototype._getLayerIds=function(){return[this.id]},wo.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Hn?t.add(this.options.source.getId()):t.add(this.options.source),t},wo);function wo(t,e,i){var r=xo.call(this,e)||this;return r.options=(new vo).merge(Vn(i,vo._cloneCustomizer)),r.options.source=t||r.options.source,r}var So,To=(d(Co,So=lo),Co);function Co(){var t=null!==So&&So.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}var Io,Eo=(d(Mo,Io=To),Mo._cloneCustomizer=function(t){if(t instanceof Hn)return t},Mo);function Mo(){var t=null!==Io&&Io.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var Ao,Lo=(d(ko,Ao=oo),ko.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},ko);function ko(){return null!==Ao&&Ao.apply(this,arguments)||this}var Po,Do=(d(zo,Po=Lo),zo.prototype.getOptions=function(){return Vn(this.options,Eo._cloneCustomizer)},zo.prototype.setOptions=function(t){var e=(new Eo).merge(this.options,Vn(t,Eo._cloneCustomizer)),i="string"==typeof t.url&&t.url!==this.getOptions().url,r=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;if(this.map){this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation);var n=this.map._getMap().getSource(this._getSourceId());n&&n.updateImage(e)}this.options=e,i?this.reloadImage():r&&this.updateTransform()},zo.prototype.getPositions=function(t){return this.transform.then((function(e){return e.toTarget(t)}))},zo.prototype.getPixels=function(t){return this.transform.then((function(e){return e.toSource(t)}))},zo.getCoordinatesFromRefPoints=function(t,e,i,r){return new _n(i,r).toTarget([[0,0],[t,0],[t,e],[0,e]])},zo.getCoordinatesFromEdges=function(t,e,i,r,n){"number"!=typeof n&&(n=0);var o=[Math.min(r,i),e,Math.max(r,i),t],a=In.getCenter(o);return Kr([In.getNorthWest(o),In.getNorthEast(o),In.getSouthEast(o),In.getSouthWest
2(o)],a,n)},zo.prototype._buildLayers=function(){var t={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),[t]},zo.prototype._getLayerIds=function(){return[this.id]},zo.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},zo.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},zo.prototype.reloadImage=function(){var t=this;this.options.url&&(this.transform=new Promise((function(e,i){t.img.onload=function(){var i=[[0,0],[t.img.width,0],[t.img.width,t.img.height],[0,t.img.height]];e(new _n(i,t.options.coordinates)),t.isLoading=!1},t.img.onerror=t.img.onabort=function(){i("Failed to load image")},t.isLoading=!0,t.img.src=t.options.url})))},zo.prototype.updateTransform=function(){if(!this.isLoading){var t=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]];this.transform=Promise.resolve(new _n(t,this.options.coordinates))}},zo);function zo(t,e){var i=Po.call(this,e)||this;return i.isLoading=!1,i.options=(new Eo).merge(Vn(t,Eo._cloneCustomizer)),i.img=new Image,i.reloadImage(),i}var Oo,No=(d(Ro,Oo=lo),Ro);function Ro(){var t=null!==Oo&&Oo.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=void 0,t.strokeGradient=void 0,t.offset=0,t.strokeOpacity=1,t.translate=new ar(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var Bo,jo=(d(Fo,Bo=oo),Fo.prototype.getOptions=function(){return Vn(this.options,No._cloneCustomizer)},Fo.prototype.getSource=function(){return this.options.source},Fo.prototype.setOptions=function(t){var e=(new No).merge(this.options,Vn(t,No._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("line-blur",e.blur,this.options.blur),this._updateLayoutProperty("line-cap",e.lineCap,this.options.lineCap),this._updateLayoutProperty("line-join",e.lineJoin,this.options.lineJoin),this._updatePaintProperty("line-offset",e.offset,this.options.offset),this._updatePaintProperty("line-color",e.strokeColor,this.options.strokeColor),this._updatePaintProperty("line-dasharray",e.strokeDashArray,this.options.strokeDashArray),this._updatePaintProperty("line-gradient",e.strokeGradient,this.options.strokeGradient),this._updatePaintProperty("line-opacity",e.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("line-width",e.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("line-translate",e.translate,this.options.translate),this._updatePaintProperty("line-translate-anchor",e.translateAnchor,this.options.translateAnchor)}this.options=e},Fo.prototype._buildLayers=function(){return[f(f(f(f({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Hn?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:f(f(f({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray&&{"line-dasharray":this.options.strokeDashArray}),this.options.strokeGradient&&{"line-gradient":this.options.strokeGradient}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Fo.prototype._getLayerIds=function(){return[this.id]},Fo.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Hn?t.add(this.options.source.getId()):t.add(this.options.source),t},Fo);function Fo(t,e,i){var r=Bo.call(this,e)||this;return r.options=(new No).merge(Vn(i,No._cloneCustomizer)),r.options.source=t||r.options.source,r}var Uo,Vo=(d(qo,Uo=lo),qo);function qo(){var t=null!==Uo&&Uo.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.base=0,t.fillColor="#1E90FF",t.he
vendor: 9,618 bytes, line 2
2ight=0,t.fillOpacity=1,t.fillPattern=void 0,t.translate=new ar(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var Go,Zo=(d(Ho,Go=oo),Ho.prototype.getOptions=function(){return Vn(this.options,Vo._cloneCustomizer)},Ho.prototype.getSource=function(){return this.options.source},Ho.prototype.setOptions=function(t){var e=(new Vo).merge(this.options,Vn(t,Vo._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("fill-extrusion-base",e.base,this.options.base),this._updatePaintProperty("fill-extrusion-color",e.fillColor,this.options.fillColor),this._updatePaintProperty("fill-extrusion-height",e.height,this.options.height),this._updatePaintProperty("fill-extrusion-opacity",e.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-extrusion-pattern",e.fillPattern,this.options.fillPattern),this._updatePaintProperty("fill-extrusion-translate",e.translate,this.options.translate),this._updatePaintProperty("fill-extrusion-translate-anchor",e.translateAnchor,this.options.translateAnchor),this._updatePaintProperty("fill-extrusion-vertical-gradient",e.verticalGradient,this.options.verticalGradient)}this.options=e},Ho.prototype._buildLayers=function(){return[f(f(f(f({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Hn?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:f(f({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Ho.prototype._getLayerIds=function(){return[this.id]},Ho.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Hn?t.add(this.options.source.getId()):t.add(this.options.source),t},Ho);function Ho(t,e,i){var r=Go.call(this,e)||this;return r.options=(new Vo).merge(Vn(i,Vo._cloneCustomizer)),r.options.source=t||r.options.source,r}var Wo,Yo=(d(Ko,Wo=lo),Ko.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=!1,r=!1,n=0,o=t;n<o.length;n++){var a=o[n];a&&(a.hasOwnProperty("fillColor")?r=!(i=!0):a.hasOwnProperty("fillPattern")&&(i=!(r=!0)))}var s=Wo.prototype.merge.apply(this,t);return i?s.fillPattern=void 0:r&&(s.fillColor=void 0),s},Ko);function Ko(){var t=null!==Wo&&Wo.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}var Xo,Jo=(d(Qo,Xo=oo),Qo.prototype.getOptions=function(){return Vn(this.options,Yo._cloneCustomizer)},Qo.prototype.getSource=function(){return this.options.source},Qo.prototype.setOptions=function(t){var e=(new Yo).merge(this.options,Vn(t,Yo._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("fill-color",e.fillColor,this.options.fillColor),this._updatePaintProperty("fill-opacity",e.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-pattern",e.fillPattern,this.options.fillPattern)}this.options=e},Qo.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof Hn?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),this.options.fillPattern?t.paint["fill-pattern"]=this.options.fillPattern:t.paint["fill-color"]=this.options.fillColor,[t]},Qo.prototype._getLayerIds=function(){return[this.id]},Qo.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Hn?t.add(this.options.source.getId()):t.add(this.options.source),t},Qo);function Qo(t,e,i){var r=Xo.call(this,e)||this;return r.options=(new Yo).merge(Vn(i,Yo._cloneCustomizer)),r.options.source=t||r.options.source,r}var $o,ta=(d(ea,$o=y),ea);function ea(){var t=null!==$o&&$o.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new ar(0,0),t.optional=!1,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}var ia,ra=(d(na,ia=y),na);function na(){var t=null!==ia&&ia.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=void 0,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.offset=new ar(0,0),t.optional=!1,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}var oa,aa=(d(sa,oa=lo),sa);function sa(){var t=null!==oa&&oa.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new ta,t.textOptions=new ra,t.placement="point",t.lineSpacing=250,t}var la,ua=(d(ca,la=oo),ca.prototype.getOptions=function(){return Vn(this.options,aa._cloneCustomizer)},ca.prototype.getSource=function(){return this.options.source},ca.prototype.setOptions=function(t){var e=(new aa).merge(this.options,Vn(t,aa._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,this.options.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,this.options.placement),this._updateLayoutProperty("icon-allow-overlap",e.iconOptions.allowOverlap,this.options.iconOptions.allowOverlap),this._updateLayoutProperty("icon-anchor",e.iconOptions.anchor,this.options.iconOptions.anchor),this._updateLayoutProperty("icon-ignore-placement",e.iconOptions.ignorePlacement,this.options.iconOptions.ignorePlacement),this._updateLayoutProperty("icon-image",e.iconOptions.image,this.options.iconOptions.image),this._updateLayoutProperty("icon-offset",e.iconOptions.offset,this.options.iconOptions.offset),this._updatePaintProperty("icon-opacity",e.iconOptions.opacity,this.options.iconOptions.opacity),this._updateLayoutProperty("icon-optional",e.iconOptions.optional,this.options.iconOptions.optional),this._updateLayoutProperty("icon-pitch-alignment",e.iconOptions.pitchAlignment,this.options.iconOptions.pitchAlignment),this._updateLayoutProperty("icon-rotate",e.iconOptions.rotation,this.options.iconOptions.rotation),this._updateLayoutProperty("icon-rotation-alignment",e.iconOptions.rotationAlignment,this.options.iconOptions.rotationAlignment),this._updateLayoutProperty("icon-size",e.iconOptions.size,this.options.iconOptions.size),this._updateLayoutProperty("text-allow-overlap",e.textOptions.allowOverlap,this.options.textOptions.allowOverlap),this._updateLayoutProperty("text-anchor",e.textOptions.anchor,this.options.textOptions.anchor),this._updatePaintProperty("text-color",e.textOptions.color,this.options.textOptions.color),this._updateLayoutProperty("text-font",e.textOptions.font,this.options.textOptions.font),this._updateLayoutProperty("text-ignore-placement",e.textOptions.ignorePlacement,this.options.textOptions.ignorePlacement),this._updatePaintProperty("text-halo-blur",e.textOptions.haloBlur,this.options.textOptions.haloBlur),this._updatePaintProperty("text-halo-color",e.textOptions.haloColor,this.options.textOptions.haloColor),this._updatePaintProperty("text-halo-width",e.textOptions.haloWidth,this.options.textOptions.haloWidth),this._updateLayoutProperty("text-offset",e.textOptions.offset,this.options.textOptions.offset),this._updatePaintProperty("text-opacity",e.textOptions.opacity,this.options.textOptions.opacity),this._updateLayoutProperty("text-optional",e.textOptions.optional,this.options.textOptions.optional),this._updateLayoutProperty("text-pitch-alignment",e.textOptions.pitchAlignment,this.options.textOptions.pitchAlignment),this._updateLayoutProperty("text-rotate",e.textOptions.rotation,this.options.textOptions.rotation),this._updateLayoutProperty("text-rotation-alignment",e.textOptions.rotationAlignment,this.options.textOptions.rotationAlignment),this._updateLayoutProperty("text-size",e.textOptions.size,this.options.textOptions.size),this._updateLayoutProperty("text-field",e.textOptions.textField,this.options.textOptions.textField)}this.options=e},ca.prototype._buildLayers=function(){return[f(f(f(f({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Hn?this.options.source.getId():this.options.source,layout:f(f({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}
2),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},ca.prototype._getLayerIds=function(){return[this.id]},ca.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Hn?t.add(this.options.source.getId()):t.add(this.options.source),t},ca);function ca(t,e,i){var r=la.call(this,e)||this;return r.options=(new aa).merge(Vn(i,aa._cloneCustomizer)),r.options.source=t||r.options.source,r}var pa,ha=(d(da,pa=To),da);function da(){var t=null!==pa&&pa.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=void 0,t.tileUrl=void 0,t}var fa,ma=(d(ga,fa=Lo),ga.prototype.getOptions=function(){return Vn(this.options,ha._cloneCustomizer)},ga.prototype.setOptions=function(t){var e=(new ha).merge(this.options,Vn(t,ha._cloneCustomizer));if(this.map){if(!tr(e.bounds,this.options.bounds)||e.isTMS!==this.options.isTMS||e.maxSourceZoom!==this.options.maxSourceZoom||e.minSourceZoom!==this.options.minSourceZoom||!tr(e.subdomains,this.options.subdomains)||e.tileSize!==this.options.tileSize||e.tileUrl!==this.options.tileUrl)return this.options=e,void this.map.layers.add(this);this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation)}this.options=e},ga.prototype._setOptionsNoUpdate=function(t){this.options=(new ha).merge(this.options,Vn(t,ha._cloneCustomizer))},ga.prototype._buildLayers=function(){return[f(f({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},ga.prototype._getLayerIds=function(){return[this.id]},ga.prototype._buildSource=function(){var t;if(this.options.tileUrl){if(-1===this.options.tileUrl.indexOf("{"))return{type:"raster",url:this.options.tileUrl};if(-1!==this.options.tileUrl.indexOf("{subdomain}")){if(!(this.options.subdomains&&0<this.options.subdomains.length))throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");for(var e=[],i=0,r=this.options.subdomains;i<r.length;i++){var n=r[i];e.push(this.options.tileUrl.replace(/{subdomain}/g,n))}t=e}else t=[this.options.tileUrl]}return f({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},t&&{tiles:t})},ga.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},ga);function ga(t,e){var i=fa.call(this,e)||this;return t&&i.setOptions(t),i}var ya=Object.freeze({__proto__:null,BubbleLayer:mo,Layer:oo,LineLayer:jo,PolygonExtrusionLayer:Zo,PolygonLayer:Jo,SymbolLayer:ua,TileLayer:ma,HeatMapLayer:bo,ImageLayer:Do}),va=(_a.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},_a);function _a(){}var xa,ba=Function.prototype,wa=Object.prototype,Sa=ba.toString,Ta=wa.hasOwnProperty,Ca=Sa.call(Object),Ia=function(t){if(!qt(t)||"[object Object]"!=ht(t))return!1;var e=Ie(t);if(null===e)return!0;var i=Ta.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&Sa.call(i)==Ca},Ea=function(t){return qt(t)&&1===t.nodeType&&!Ia(t)},Ma=(d(Aa,xa=y),Aa._cloneCustomizer=function(t){if(Ea(t))return t},Aa);function Aa(){var t=null!==xa&&xa.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new ar(0,0),t.position=new hn(0,0),t.showPointer=!0,t}var La,ka=(d(Pa,La=gn),Pa.prototype.setPopupOptions=function(t){this.setOptions(t)},Pa.prototype.setOptions=function(t){var e=(new Ma).merge(this.options,Vn(t,Ma._cloneCustomizer));e.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(e),this.contentDiv.prepend(this.htmlContent)):e.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,e.draggable),e.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn)):!e.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),e.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!e.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),e.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=e.fillColor,this.contentDiv.style.backgroundColor=e.fillColor),this.marker&&(e.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==e.anchor&&this._replaceMarker(this.map,e),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,e),"none"===e.anchor&&this.map.events.add("move",this._onMove)):(tr(e.position,this.options.position)||this.marker.setLngLat(e.position),tr(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},Pa.prototype.getPopupOptions=function(){return this.getOptions()},Pa.prototype.getOptions=function(){return Vn(this.options,Ma._cloneCustomizer)},Pa.prototype._dragToPixel=function(t){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));var e=[t[0]+this.dragOffset[0],t[1]+this.dragOffset[1]],i=this.map.pixelsToPositions([e])[0];this.options.position=i,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},Pa.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),"none"===this.options.anchor&&this._onMove()),delete this.dragOffset,delete this.dragging},Pa.prototype._createContainerDiv=function(t){var e=this,i=document.createElement("div");i.classList.add(Pa.Css.container),i.classList.add(Pa.Css.hidden),i.style.borderColor=t.fillColor,i.setAttribute("role","dialog"),i.setAttribute("aria-label","Map Information Window");var r=!1;return i.addEventListener("keydown",(function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(r=!0)})),i.addEventListener("keyup",(function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(r=!1)})),i.addEventListener("focusin",(function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focu
2s())})),i.addEventListener("focusout",(function(t){r&&t.relatedTarget instanceof Node&&!i.contains(t.relatedTarget)&&(r=!1,e.isOpen()&&e.close())})),i},Pa.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(Pa.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},Pa.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(Pa.Css.arrow),t},Pa.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(Pa.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("title","close"),t.setAttribute("tabindex","0"),t.innerHTML="×",t},Pa.prototype._createHtmlContent=function(t){var e=va.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},Pa.prototype._createMarker=function(t,e){var i=this.marker?this.marker.getLngLat():t.position;return"none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new o({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(i)):(this.containerDiv.classList.add(t.anchor),new o({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(i))},Pa.prototype._getAutoAnchor=function(t,e){var i,r,n=this.containerDiv.offsetWidth,o=this.containerDiv.offsetHeight;if(this.marker){var a=t._getMap().project(this.marker.getLngLat());i=a.x,r=a.y}else{var s=t.positionsToPixels([e.position])[0];i=s[0],r=s[1]}var l=[];return r<o?l.push("top"):r>t.getCanvas().offsetHeight-o&&l.push("bottom"),i<n/2?l.push("left"):i>t.getCanvas().offsetWidth-n/2&&l.push("right"),0<l.length?l.join("-"):"bottom"},Pa.prototype._replaceMarker=function(t,e,i){var r=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,i),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,r||null)},Pa.prototype._setDraggable=function(t,e){e?(t.addEventListener("mousedown",this._onDown),t.addEventListener("touchstart",this._onDown),t.addEventListener("dragstart",this._onDragStart)):(t.removeEventListener("mousedown",this._onDown),t.removeEventListener("touchstart",this._onDown),t.removeEventListener("dragstart",this._onDragStart))},Pa.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},Pa);function Pa(t){var e=La.call(this)||this;return e.attach=function(t){e.map!==t&&(e.map&&e.remove(),e.map=t,e.marker=e._createMarker(e.options),e.marker.addTo(e.map._getMap()),e.map.popups._getCollectionDiv().appendChild(e.containerDiv),e.map.popups.add(e))}
vendor: 4,320 bytes, line 2
2,e.open=function(t){if(!t&&!e.map)throw new Error("Must specify a map to open on or attach to a map in advance");e.attach(t||e.map),e.containerDiv.classList.remove(Pa.Css.hidden),e.map.events.add("move",e._onMove),e._onMove(),e._invokeEvent("open",{target:e,type:"open"})},e.close=function(){e.map&&e.map.events.remove("move",e._onMove),e.containerDiv.classList.add(Pa.Css.hidden),e._invokeEvent("close",{target:e,type:"close"})},e.remove=function(){e.map&&(e.marker.remove(),e.containerDiv.classList.remove(e.autoAnchor||e.options.anchor),e.map.events.remove("move",e._onMove),e.map.popups.remove(e),delete e.map,delete e.marker,delete e.autoAnchor)},e.isOpen=function(){return e.map&&!e.containerDiv.classList.contains(Pa.Css.hidden)},e._onMove=function(){var t=e._getAutoAnchor(e.map,e.options);t!==e.autoAnchor&&(e._replaceMarker(e.map,e.options,t),e.map.events.add("move",e._onMove))},e._onDown=function(t){e.map.popups._addDraggedPopup(e);var i=e.map.positionsToPixels([e.options.position])[0];"mousedown"===t.type?e.dragOffset=[i[0]-t.clientX,i[1]-t.clientY]:"touchstart"===t.type&&(e.dragOffset=[i[0]-t.touches[0].clientX,i[1]-t.touches[0].clientY])},e._onDragStart=function(t){t.preventDefault()},e.options=(new Ma).merge(Vn(t,Ma._cloneCustomizer)),e.containerDiv=e._createContainerDiv(e.options),e.contentDiv=e._createContentDiv(e.options),e.containerDiv.appendChild(e.contentDiv),e.options.showPointer&&(e.arrowDiv=e._createArrowDiv(),e.containerDiv.appendChild(e.arrowDiv)),e.options.closeButton&&(e.closeBtn=e._createCloseButton(),e.contentDiv.appendChild(e.closeBtn)),e}var Da,za=(d(Oa,Da=y),Oa._cloneCustomizer=function(t){if(t instanceof ka||Ea(t))return t},Oa);function Oa(){var t=null!==Da&&Da.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'+ir()+'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z" fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}</text></svg>',t.pixelOffset=new ar(0,0),t.position=new hn(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var Na,Ra=(d(Ba,Na=gn),Ba.prototype.getOptions=function(){return Vn(this.options,za._cloneCustomizer)},Ba.prototype.setOptions=function(t){var e=(new za).merge(this.options,Vn(t,za._cloneCustomizer));tr(e.htmlContent,this.options.htmlContent)&&e.anchor===this.options.anchor?("string"!=typeof e.htmlContent||e.color===this.options.color&&e.text===this.options.text&&e.secondaryColor===this.options.secondaryColor||(this.element.innerHTML=this._getSubbedHtmlString(e)),e.draggable!==this.options.draggable&&(this._setDraggable(e.draggable),this.marker.setDraggable(e.draggable)),tr(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset),tr(e.position,this.options.position)||this.marker.setLngLat(e.position),e.visible!==this.options.visible&&(e.visible?this.element.classList.remove(Ba.hiddenClass):this.element.classList.add(Ba.hiddenClass))):(this.marker.remove(),this._buildMarker(e),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=e},Ba.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else{if(!this.map)throw new Error("The marker must be added to a map before calling togglePopup().");this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map)}},Ba.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=fi(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},Ba.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},Ba.prototype._getId=function(){if(this.element)return"string"==typeof this.options.htmlContent?this.element.firstChild.id:this.element.i
2d},Ba.prototype._buildMarker=function(t){if("string"==typeof t.htmlContent){var e=this._getSubbedHtmlString(t);this.element=va.convertHtmlString(e)}else this.element=t.htmlContent;this.element.classList.add(Ba.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(Ba.hiddenClass),this.marker=new o({element:this.element,offset:t.pixelOffset,draggable:t.draggable,anchor:t.anchor}).setLngLat(t.position),this.marker.on("drag",this._onDrag),this.marker.on("dragstart",this._onDragStart),this.marker.on("dragend",this._onDragEnd),this.element.addEventListener("click",this._bubbleElementEvent),this.element.addEventListener("dblclick",this._bubbleElementEvent),this.element.addEventListener("contextmenu",this._bubbleElementEvent),this.element.addEventListener("keydown",this._bubbleElementEvent),this.element.addEventListener("keypress",this._bubbleElementEvent),this.element.addEventListener("keyup",this._bubbleElementEvent),this.element.addEventListener("mousedown",this._bubbleElementEvent),this.element.addEventListener("mouseenter",this._bubbleElementEvent),this.element.addEventListener("mouseleave",this._bubbleElementEvent),this.element.addEventListener("mousemove",this._bubbleElementEvent),this.element.addEventListener("mouseout",this._bubbleElementEvent),this.element.addEventListener("mouseover",this._bubbleElementEvent),this.element.addEventListener("mouseup",this._bubbleElementEvent)},Ba.prototype._getSubbedHtmlString=function(t){if("string"==typeof t.htmlContent)return t.htmlContent.replace(/{color}/gi,t.color||"").replace(/{secondaryColor}/gi,t.secondaryColor||"").replace(/{text}/gi,t.text||"")},Ba.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+Ba.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(Ba.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},Ba.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},Ba.collectionContainerClass="marker-collection-container",Ba.hiddenClass="hidden-accessible-element",Ba.containerClass="marker-container",Ba);function Ba(t){var e=Na.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new hn(t.lng,t.lat),e._invokeEvent("drag",{type:"drag",target:e})},e._onDragStart=function(){e._invokeEvent("dragstart",{type:"dragstart",target:e})},e._onDragEnd=function(){e._invokeEvent("dragend",{type:"dragend",target:e})},e._bubbleElementEvent=function(t){e._invokeEvent(t.type,{type:t.type,target:e})},e._onEleDragStart=function(t){t.preventDefault()},e.options=(new za).merge(Vn(t,za._cloneCustomizer)),e._buildMarker(e.options),e}var ja=function(t,e,i){(void 0===i||Y(t[e],i))&&(void 0!==i||e in t)||jt(t,e,i)},Fa=function(t,e,i){for(var r=-1,n=Object(t),o=i(t),a=o.length;a--;){var s=o[++r];if(!1===e(n[s],s,n))break}return t},Ua=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},Va=function(t,e,i,r,n,o,a){var s=Ua(t,i),l=Ua(e,i),u=a.get(l);if(u)ja(t,i,u);else{var c=o?o(s,l,i+"",t,e,a):void 0,p=void 0===c;if(p){var h=Kt(l),d=!h&&Jt(l),f=!h&&!d&&oe(l);c=l,h||d||f?c=Kt(s)?s:function(t){return qt(t)&&fe(t)}(s)?xe(s):d?_e(l,!(p=!1)):f?$e(l,!(p=!1)):[]:Ia(l)||Yt(l)?Yt(c=s)?c=function(t){return Vt(t,ve(t))}(s):dt(s)&&!ft(s)||(c=ri(l)):p=!1}p&&(a.set(l,c),n(c,l,r,o,a),a.delete(l)),ja(t,i,c)}},qa=function t(e,i,r,n,o){e!==i&&Fa(i,(function(a,s){if(o=o||new Rt,dt(a))Va(e,i,s,r,t,n,o);else{var l=n?n(Ua(e,s),a,s+"",e,i,o):void 0;void 0===l&&(l=a),ja(e,s,l)}}),ve)};function Ga(t){return t}var Za=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)},Ha=Math.max,Wa=function(t){return function(){return t}},Ya=Bt?function(t,e){return Bt(t,"toString",{configurable:!0,enumerable:!1,value:Wa(e),writable:!0})}:Ga,Ka=Date.now,Xa=function(t){var e=0,i=0;return function(){var r=Ka(),n=16-(r-i);if(i=r,0<n){if(800<=++e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}
2(Ya),Ja=function(t,e){return Xa(function(t,e,i){return e=Ha(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,o=Ha(r.length-e,0),a=Array(o);++n<o;)a[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=i(a),Za(t,this,s)}}(t,e,Ga),t+"")},Qa=function(t){return Ja((function(e,i){var r=-1,n=i.length,o=1<n?i[n-1]:void 0,a=2<n?i[2]:void 0;for(o=3<t.length&&"function"==typeof o?(n--,o):void 0,a&&function(t,e,i){if(!dt(i))return!1;var r=typeof e;return!!("number"==r?fe(i)&&$t(e,i.length):"string"==r&&e in i)&&Y(i[e],t)}(i[0],i[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var s=i[r];s&&t(e,s,r)}return e}))}((function(t,e,i){qa(t,e,i)})),$a=(ts.parse=function(t){var e=(t=t.toLowerCase()).lastIndexOf("-");return-1!==e?{code:t,language:t.substring(0,e),region:t.substring(e+1)}:{code:t,language:t}},ts);function ts(){}var es={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}}}},is=function(){this.Unknown="Unknown",this.Accident="Accident",this.Fog="Fog",this.Danger="Danger",this.Rain="Rain",this.Ice="Ice",this.Jam="Jam",this.LaneClosed="Lane Closed",this.RoadClosed="Road Closed",this.RoadWorks="Road Works",this.Wind="Wind",this.Flood="Flood",this.Detour="Detour"},rs=(ns.getCode=function(t){var e=$a.parse(t);return-1===es.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},ns.getStrings=function(t){var e=this.getLocaleData(t);return new w({domain:l,path:es.localizationsPath+"/"+e.strings}).get().then((function(t){return t}),(function(){return new is}))},ns.getLocaleData=function(t){if("string"==typeof t&&(t=$a.parse(t)),es.locales[t.code])return es.locales[t.code].defaultRegion;var e;if(es.locales[t.language])e=es.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=es.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},ns);function ns(){}var os,as=(ss.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}
2var r=t.indexOf("Edge/");return 0<r?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1},ss.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},ss.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},ss);function ss(){}(os=t.AuthenticationType||(t.AuthenticationType={})).subscriptionKey="subscriptionKey",os.aad="aad",os.anonymous="anonymous";var ls,us,cs=(d(ps,ls=y),ps.prototype.setSubscriptionKey=function(e){this.authType=t.AuthenticationType.subscriptionKey,this.subscriptionKey=e},ps.prototype.setAadProperties=function(e,i,r,n,o){this.authType=t.AuthenticationType.aad,this.authContext=o||this.authContext,this.aadInstance=n||this.aadInstance,this.clientId=e,this.aadAppId=i,this.aadTenant=r},ps.prototype.setTokenCallbackFunction=function(e){this.authType=t.AuthenticationType.anonymous,this.getToken=e},ps.prototype.merge=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=ls.prototype.merge.apply(this,e);return r.authType===t.AuthenticationType.subscriptionKey?r.authContext=r.aadAppId=r.getToken=void 0:r.authType===t.AuthenticationType.aad?r.subscriptionKey=r.getToken=void 0:r.authType===t.AuthenticationType.anonymous&&(r.subscriptionKey=r.authContext=r.aadAppId=void 0),r},ps);function ps(){var t=null!==ls&&ls.apply(this,arguments)||this;return t.authType=void 0,t.subscriptionKey=void 0,t.clientId=void 0,t.aadAppId=void 0,t.aadTenant=void 0,t.aadInstance=void 0,t.getToken=void 0,t.authContext=void 0,t}var hs="NGT",ds=ir(),fs=s,ms="styles/definitions/2019-10-16.json",gs=new cs,ys=!1,vs=!1,_s=!1,xs=!1,bs=!1,ws=!1;function Ss(){return Object.assign({},gs)}function Ts(){return fs}function Cs(){return ms}function Is(){return hs}function Es(){return ds}function Ms(){return gs.authType===t.AuthenticationType.subscriptionKey?gs.subscriptionKey:void 0}function As(){return us}function Ls(t){return!as.isIE()&&r.supported({failIfMajorPerformanceCaveat:t})}function ks(t){gs=(new cs).merge(gs,t),ws=!0}function Ps(t){fs=t,vs=!0}function Ds(t){ms=t,_s=!0}function zs(t){hs=rs.getCode(t),xs=!0}function Os(t){ds=t,bs=!0}function Ns(t){gs.setSubscriptionKey(t),ws=!0}function Rs(t){us=t,ys=!0}function Bs(t,e){if(e=Math.abs(e||1),"string"==typeof t&&Js[t.toLowerCase()]){for(var i=Js[t.toLowerCase()],r=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,n=i,o=r.exec(i);o;)n=n.replace(o[0],parseFloat(o[1])*e+""),o=r.exec(i);return n.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function js(){return ws}function Fs(){return vs}function Us(){return _s}function Vs(){return xs}function qs(){return bs}function Gs(){return ys}var Zs,Hs,Ws,Ys,Ks,Xs,Js
vendor: 23,994 bytes, line 2
2={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/></g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})" viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/></g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/></g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/></g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/></g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/></g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/></g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}</text></svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/></g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/></g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}</text></svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/></g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}</text></svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/></g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}</text></svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/></pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/></svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/></svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/></svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/></svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>'},
2Qs=($s.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},$s);function $s(){}(Hs=Zs=Zs||{})[Hs.LocalStorage=0]="LocalStorage",Hs[Hs.SessionStorage=1]="SessionStorage",(Ys=Ws=Ws||{})[Ys.Default=0]="Default",Ys[Ys.Required=1]="Required",Ys[Ys.Array=2]="Array",Ys[Ys.Hidden=4]="Hidden",(Xs=Ks=Ks||{})[Xs.AI=0]="AI",Xs[Xs.AI_AND_W3C=1]="AI_AND_W3C",Xs[Xs.W3C=2]="W3C";var tl=(el.isNullOrUndefined=function(t){return null==t},el.disableCookies=function(){el._canUseCookies=!1},el.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(nl,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},el);function el(){}var il,rl,nl=/[xy]/g,ol=(al.prototype.addNotificationListener=function(t){this.listeners.push(t)},al.prototype.removeNotificationListener=function(t){for(var e=this.listeners.indexOf(t);-1<e;)this.listeners.splice(e,1),e=this.listeners.indexOf(t)},al.prototype.eventsSent=function(t){for(var e=this,i=function(i){r.listeners[i].eventsSent&&setTimeout((function(){return e.listeners[i].eventsSent(t)}),0)},r=this,n=0;n<this.listeners.length;++n)i(n)},al.prototype.eventsDiscarded=function(t,e){for(var i=this,r=function(r){n.listeners[r].eventsDiscarded&&setTimeout((function(){return i.listeners[r].eventsDiscarded(t,e)}),0)},n=this,o=0;o<this.listeners.length;++o)r(o)},al);function al(){this.listeners=[]}(rl=il=il||{})[rl.CRITICAL=1]="CRITICAL",rl[rl.WARNING=2]="WARNING";var sl=40,ll=46,ul=(cl.sanitizeDiagnosticText=function(t){return'"'+t.replace(/\"/g,"")+'"'},cl.dataType="MessageData",cl.AiNonUserActionablePrefix="AI (Internal): ",cl.AiUserActionablePrefix="AI: ",cl);function cl(t,e,i,r){void 0===i&&(i=!1),this.messageId=t,this.message=(i?cl.AiUserActionablePrefix:cl.AiNonUserActionablePrefix)+t;var n=(e?" message:"+cl.sanitizeDiagnosticText(e):"")+(r?" props:"+cl.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=n}var pl=(hl.prototype.throwInternal=function(t,e,i,r,n){void 0===n&&(n=!1);var o=new ul(e,i,n,r);if(this.enableDebugExceptions())throw o;if(void 0!==o&&o&&void 0!==o.message){if(n){var a=+o.messageId;(!this._messageLogged[a]||this.consoleLoggingLevel()>=il.WARNING)&&(this.warnToConsole(o.message),this._messageLogged[a]=!0)}else this.consoleLoggingLevel()>=il.WARNING&&this.warnToConsole(o.message);this.logInternalMessage(t,o)}},hl.prototype.warnToConsole=function(t){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(t):"function"==typeof console.log&&console.log(t))},hl.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},hl.prototype.logInternalMessage=function(t,e){if(!this._areInternalMessagesThrottled()){var i=!0,r=this.AIInternalMessagePrefix+e.messageId;if(this._messageLogged[r]?i=!1:this._messageLogged[r]=!0,i&&(t<=this.telemetryLoggingLevel()&&(this.queue.push(e),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var n="Internal events throttle limit per PageView reached for this app.",o=new ul(23,n,!1);this.queue.push(o),this.warnToConsole(n)}}},hl.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},hl);function hl(t){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},tl.isNullOrUndefined(t)||(tl.isNullOrUndefined(t.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return t.loggingLevelConsole}),tl.isNullOrUndefined(t.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return t.loggingLevelTelemetry}),tl.isNullOrUndefined(t.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return t.maxMessageLimit}),tl.isNullOrUndefined(t.enableDebugExceptions)||(this.enableDebugExceptions=function(){return t.enableDebugExceptions}))}var dl=(fl.prototype.processTelemetry=function(t){this.channelQueue.forEach((function(e){0<e.length&&e[0].processTelemetry(t)}))},Object.defineProperty(fl.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}
2),fl.prototype.initialize=function(t,e,i){var r=this;if(t.isCookieUseDisabled&&tl.disableCookies(),this.channelQueue=new Array,t.channels){var n=void 0;t.channels.forEach((function(o){if(o&&0<o.length){o=o.sort((function(t,e){return t.priority-e.priority}));for(var a=1;a<o.length;a++)o[a-1].setNextPlugin(o[a]);if(o.forEach((function(r){r.priority<500&&(n=r.identifier),r.initialize(t,e,i)})),n)throw Error("Channel has invalid priority"+n);r.channelQueue.push(o)}}))}for(var o=new Array,a=0;a<i.length;a++){var s=i[a];500<s.priority&&o.push(s)}if(0<o.length){for(o=o.sort((function(t,e){return t.priority-e.priority})),a=1;a<o.length;a++)o[a-1].setNextPlugin(o[a]);o.forEach((function(r){return r.initialize(t,e,i)})),this.channelQueue.push(o)}},fl);function fl(){this.identifier="ChannelControllerPlugin",this.priority=500}var ml=(gl.prototype.initialize=function(t,e){var i=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!t||tl.isNullOrUndefined(t.instrumentationKey))throw Error("Please provide instrumentation key");this.config=t,this._notificationManager=new ol,this.config.extensions=tl.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=tl.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new pl(t),(n=this._extensions).push.apply(n,e.concat(this.config.extensions)),this._extensions.forEach((function(t){var e=!0;if((tl.isNullOrUndefined(t)||tl.isNullOrUndefined(t.initialize))&&(e=!1),!e)throw Error("Extensions must provide callback to initialize")})),this._extensions.push(this._channelController),this._extensions=this._extensions.sort((function(t,e){var i=typeof t.processTelemetry,r=typeof e.processTelemetry;return"function"==i&&"function"==r?t.priority-e.priority:"function"==i&&"function"!=r?1:"function"!=i&&"function"==r?-1:void 0}));var r={};this._extensions.forEach((function(t){var e=t;e&&e.priority&&(tl.isNullOrUndefined(r[e.priority])?r[e.priority]=e.identifier:i.logger.warnToConsole("Two extensions have same priority"+r[e.priority]+", "+e.identifier))}));for(var n,o=-1,a=0;a<this._extensions.length-1;a++){var s=this._extensions[a];if(!s||"function"==typeof s.processTelemetry){if(s.priority===this._channelController.priority){o=a+1;break}this._extensions[a].setNextPlugin(this._extensions[a+1])}}if(this._channelController.initialize(this.config,this,this._extensions),this._extensions.forEach((function(t){t&&t.priority<i._channelController.priority&&t.initialize(i.config,i,i._extensions)})),o<this._extensions.length&&this._extensions.splice(o),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},gl.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},gl.prototype.track=function(t){if(null===t)throw this._notifyInvalidEvent(t),Error("Invalid telemetry item");t.iKey||(t.iKey=this.config.instrumentationKey),t.time||(t.time=(new Date).toISOString()),tl.isNullOrUndefined(t.ver)&&(t.ver="4.0"),this._validateTelmetryItem(t),0==this._extensions.length&&this._channelController.processTelemetry(t);for(var e=0;e<this._extensions.length;){if(this._extensions[e].processTelemetry){this._extensions[e].processTelemetry(t);break}e++}},gl.prototype.addNotificationListener=function(t){this._notificationManager.addNotificationListener(t)},gl.prototype.removeNotificationListener=function(t){this._notificationManager.removeNotificationListener(t)},gl.prototype.pollInternalLogs=function(t){var e=this,i=this.config.diagnosticLogInterval;return 0<i||(i=1e4),setInterval((function(){var i=e.logger.queue;i.forEach((function(i){var r={name:t||"InternalMessageId: "+i.messageId,iKey:e.config.instrumentationKey,time:(new Date).toISOString(),baseType:ul.dataType,baseData:{message:i.message}};e.track(r)})),i.length=0}),i)},gl.prototype._validateTelmetryItem=function(t){if(tl.isNullOrUndefined(t.name))throw this._notifyInvalidEvent(t),Error("telemetry name required");
2if(tl.isNullOrUndefined(t.time))throw this._notifyInvalidEvent(t),Error("telemetry timestamp required");if(tl.isNullOrUndefined(t.iKey))throw this._notifyInvalidEvent(t),Error("telemetry instrumentationKey required")},gl.prototype._notifyInvalidEvent=function(t){this._notificationManager.eventsDiscarded([t],2)},gl);function gl(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new dl}var yl=(vl.requestContextHeader="Request-Context",vl.requestContextTargetKey="appId",vl.requestContextAppIdFormat="appId=cid-v1:",vl.requestIdHeader="Request-Id",vl.traceParentHeader="traceparent",vl.sdkContextHeader="Sdk-Context",vl.sdkContextHeaderAppIdRequest="appId",vl.requestContextHeaderLowerCase="request-context",vl);function vl(){}var _l=(xl.sanitizeKeyAndAddUniqueness=function(t,e,i){var r=e.length,n=xl.sanitizeKey(t,e);if(n.length!==r){for(var o=0,a=n;void 0!==i[a];)o++,a=n.substring(0,xl.MAX_NAME_LENGTH-3)+xl.padNumber(o);n=a}return n},xl.sanitizeKey=function(t,e){var i;return e&&(e=xl.trim(e.toString())).length>xl.MAX_NAME_LENGTH&&(i=e.substring(0,xl.MAX_NAME_LENGTH),t.throwInternal(il.WARNING,57,"name is too long. It has been truncated to "+xl.MAX_NAME_LENGTH+" characters.",{name:e},!0)),i||e},xl.sanitizeString=function(t,e,i){var r;return void 0===i&&(i=xl.MAX_STRING_LENGTH),e&&(i=i||xl.MAX_STRING_LENGTH,(e=xl.trim(e)).toString().length>i&&(r=e.toString().substring(0,i),t.throwInternal(il.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:e},!0))),r||e},xl.sanitizeUrl=function(t,e){return xl.sanitizeInput(t,e,xl.MAX_URL_LENGTH,66)},xl.sanitizeMessage=function(t,e){var i;return e&&e.length>xl.MAX_MESSAGE_LENGTH&&(i=e.substring(0,xl.MAX_MESSAGE_LENGTH),t.throwInternal(il.WARNING,56,"message is too long, it has been truncated to "+xl.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),i||e},xl.sanitizeException=function(t,e){var i;return e&&e.length>xl.MAX_EXCEPTION_LENGTH&&(i=e.substring(0,xl.MAX_EXCEPTION_LENGTH),t.throwInternal(il.WARNING,52,"exception is too long, it has been truncated to "+xl.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),i||e},xl.sanitizeProperties=function(t,e){if(e){var i={};for(var r in e){var n=e[r];if("object"==typeof n&&"undefined"!=typeof JSON)try{n=JSON.stringify(n)}catch(e){t.throwInternal(il.WARNING,49,"custom property is not valid",{exception:e},!0)}n=xl.sanitizeString(t,n,xl.MAX_PROPERTY_LENGTH),i[r=xl.sanitizeKeyAndAddUniqueness(t,r,i)]=n}e=i}return e},xl.sanitizeMeasurements=function(t,e){if(e){var i={};for(var r in e){var n=e[r];i[r=xl.sanitizeKeyAndAddUniqueness(t,r,i)]=n}e=i}return e},xl.sanitizeId=function(t,e){return e?xl.sanitizeInput(t,e,xl.MAX_ID_LENGTH,69).toString():e},xl.sanitizeInput=function(t,e,i,r){var n;return e&&(e=xl.trim(e)).length>i&&(n=e.substring(0,i),t.throwInternal(il.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:e},!0)),n||e},xl.padNumber=function(t){var e="00"+t;return e.substr(e.length-3)},xl.trim=function(t){return"string"!=typeof t?t:t.replace(/^\s+|\s+$/g,"")},xl.MAX_NAME_LENGTH=150,xl.MAX_ID_LENGTH=128,xl.MAX_PROPERTY_LENGTH=8192,xl.MAX_STRING_LENGTH=1024,xl.MAX_URL_LENGTH=2048,xl.MAX_MESSAGE_LENGTH=32768,xl.MAX_EXCEPTION_LENGTH=32768,xl);function xl(){}var bl=(wl.createDomEvent=function(t){var e=null;return"function"==typeof Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},wl.disableStorage=function(){wl._canUseLocalStorage=!1,wl._canUseSessionStorage=!1},wl._getLocalStorageObject=function(){return wl.canUseLocalStorage()?wl._getVerifiedStorageObject(Zs.LocalStorage):null},wl._getVerifiedStorageObject=function(t){var e,i,r=null;try{if("undefined"==typeof window)return null;i=new Date,(r=t===Zs.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),e=r.getItem(i)!=i,r.removeItem(i),e&&(r=null)}catch(t){r=null}return r},wl.isInternalApplicationInsightsEndpoint=function(t){return-1!==wl._internalEndpoints.indexOf(t.toLowerCase())},wl.canUseLocalStorage=function(){return void 0===wl._canUseLocalStorage&&(wl._canUseLocalStorage=!!wl._getVerifiedStorageObject(Zs.LocalStorage)),wl._canUseLocalStorage},wl.getStorage=function(t,e){var i=wl._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){wl._canUseLocalStorage=!1,t.throwInternal(il.WARNING,1,"Browser failed read of local storage. "+wl.getExceptionName(e),{exception:wl.dump(e)})}return null}
2,wl.setStorage=function(t,e,i){var r=wl._getLocalStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){wl._canUseLocalStorage=!1,t.throwInternal(il.WARNING,3,"Browser failed write to local storage. "+wl.getExceptionName(e),{exception:wl.dump(e)})}return!1},wl.removeStorage=function(t,e){var i=wl._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){wl._canUseLocalStorage=!1,t.throwInternal(il.WARNING,5,"Browser failed removal of local storage item. "+wl.getExceptionName(e),{exception:wl.dump(e)})}return!1},wl._getSessionStorageObject=function(){return wl.canUseSessionStorage()?wl._getVerifiedStorageObject(Zs.SessionStorage):null},wl.canUseSessionStorage=function(){return void 0===wl._canUseSessionStorage&&(wl._canUseSessionStorage=!!wl._getVerifiedStorageObject(Zs.SessionStorage)),wl._canUseSessionStorage},wl.getSessionStorageKeys=function(){var t=[];if(wl.canUseSessionStorage())for(var e in window.sessionStorage)t.push(e);return t},wl.getSessionStorage=function(t,e){var i=wl._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){wl._canUseSessionStorage=!1,t.throwInternal(il.WARNING,2,"Browser failed read of session storage. "+wl.getExceptionName(e),{exception:wl.dump(e)})}return null},wl.setSessionStorage=function(t,e,i){var r=wl._getSessionStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){wl._canUseSessionStorage=!1,t.throwInternal(il.WARNING,4,"Browser failed write to session storage. "+wl.getExceptionName(e),{exception:wl.dump(e)})}return!1},wl.removeSessionStorage=function(t,e){var i=wl._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){wl._canUseSessionStorage=!1,t.throwInternal(il.WARNING,6,"Browser failed removal of session storage item. "+wl.getExceptionName(e),{exception:wl.dump(e)})}return!1},wl.disableCookies=function(){tl.disableCookies()},wl.canUseCookies=function(t){if(void 0===tl._canUseCookies){tl._canUseCookies=!1;try{tl._canUseCookies=void 0!==wl.document.cookie}catch(e){t.throwInternal(il.WARNING,68,"Cannot access document.cookie - "+wl.getExceptionName(e),{exception:wl.dump(e)})}}return tl._canUseCookies},wl.setCookie=function(t,e,i,r){var n="",o="";r&&(n=";domain="+r),wl.document.location&&"https:"===wl.document.location.protocol&&(o=";secure"),wl.canUseCookies(t)&&(wl.document.cookie=e+"="+i+n+";path=/"+o)},wl.stringToBoolOrDefault=function(t,e){return void 0===e&&(e=!1),null==t?e:"true"===t.toString().toLowerCase()}
2,wl.getCookie=function(t,e){if(wl.canUseCookies(t)){var i="";if(e&&e.length)for(var r=e+"=",n=wl.document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if((a=wl.trim(a))&&0===a.indexOf(r)){i=a.substring(r.length,n[o].length);break}}return i}},wl.deleteCookie=function(t,e){wl.canUseCookies(t)&&(wl.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},wl.trim=function(t){return"string"!=typeof t?t:t.replace(/^\s+|\s+$/g,"")},wl.newId=function(){for(var t="",e=1073741824*Math.random();0<e;)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e%64),e=Math.floor(e/64);return t},wl.random32=function(){return 4294967296*Math.random()|0},wl.generateW3CId=function(){for(var t,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=e[15&(t=wl.random32())]+e[t>>4&15]+e[t>>8&15]+e[t>>12&15]+e[t>>16&15]+e[t>>20&15]+e[t>>24&15]+e[t>>28&15];var n=e[8+4*Math.random()|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+n+i.substr(16,3)+i.substr(19,12)},wl.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},wl.isError=function(t){return"[object Error]"===Object.prototype.toString.call(t)},wl.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},wl.toISOStringForIE8=function(t){if(wl.isDate(t)){if(Date.prototype.toISOString)return t.toISOString();var e=function(t){var e=String(t);return 1===e.length&&(e="0"+e),e};return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+String((t.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},wl.getIEVersion=function(t){void 0===t&&(t=null);var e=t?t.toLowerCase():navigator.userAgent.toLowerCase();return-1!=e.indexOf("msie")?parseInt(e.split("msie")[1]):null},wl.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var e=""+(t=Math.round(t))%1e3,i=""+Math.floor(t/1e3)%60,r=""+Math.floor(t/6e4)%60,n=""+Math.floor(t/36e5)%24,o=Math.floor(t/864e5);return e=1===e.length?"00"+e:2===e.length?"0"+e:e,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,(0<o?o+".":"")+(n=n.length<2?"0"+n:n)+":"+r+":"+i+"."+e},wl.isCrossOriginError=function(t,e,i,r,n){return("Script error."===t||"Script error"===t)&&!n},wl.dump=function(t){var e=Object.prototype.toString.call(t),i=JSON.stringify(t);return"[object Error]"===e&&(i="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'"),e+i},wl.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},wl.addEventHandler=function(t,e){if("undefined"==typeof window||!window||"string"!=typeof t||"function"!=typeof e)return!1;var i="on"+t;if(window.addEventListener)window.addEventListener(t,e,!1);else{if(!window.attachEvent)return!1;window.attachEvent(i,e)}return!0},wl.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},wl.getExtension=function(t,e){for(var i=null,r=0;!i&&r<t.length;)t[r]&&t[r].identifier===e&&(i=t[r]),r++;return i},wl.document="undefined"!=typeof document?document:{},wl._canUseLocalStorage=void 0,wl._canUseSessionStorage=void 0,wl._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],wl.NotSpecified="not_specified",wl);function wl(){}var Sl=(Tl.parseUrl=function(t){return Tl.htmlAnchorElement||(Tl.htmlAnchorElement=Tl.document.createElement?Tl.document.createElement("a"):{host:Tl.parseHost(t)}),Tl.htmlAnchorElement.href=t,Tl.htmlAnchorElement},Tl.getAbsoluteUrl=function(t){var e,i=Tl.parseUrl(t);return i&&(e=i.href),e},Tl.getPathName=function(t){var e,i=Tl.parseUrl(t);return i&&(e=i.pathname),e},Tl.getCompleteUrl=function(t,e){return t?t.toUpperCase()+" "+e:e},Tl.parseHost=function(t){var e=t.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=e&&2<e.length&&"string"==typeof e[2]&&0<e[2].length?e[2]:null},Tl.document="undefined"!=typeof document?document:{},Tl);function Tl(){}var Cl=(Il.canIncludeCorrelationHeader=function(t,e,i){if(t&&t.disableCorrelationHeaders)return!1;if(!e)return!1;var r=Sl.parseUrl(e).host.toLowerCase();if(!(t&&t.enableCorsCorrelation||r===i))return!1;var n,o=t&&t.correlationHeaderDomains;
2if(o&&(o.forEach((function(t){var e=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));n=n||e.test(r)})),!n))return!1;var a=t&&t.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var s=0;s<a.length;s++)if(new RegExp(a[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return!0},Il.getCorrelationContext=function(t){if(t){var e=Il.getCorrelationContextValue(t,yl.requestContextTargetKey);if(e&&e!==Il.correlationIdPrefix)return e}},Il.getCorrelationContextValue=function(t,e){if(t)for(var i=t.split(","),r=0;r<i.length;++r){var n=i[r].split("=");if(2==n.length&&n[0]==e)return n[1]}},Il.correlationIdPrefix="cid-v1:",Il);function Il(){}var El=(Ml.ParseDependencyPath=function(t,e,i,r){var n,o=r,a=r;if(e&&0<e.length){var s=Sl.parseUrl(e);if(n=s.host,!o)if(null!=s.pathname){var l=0===s.pathname.length?"/":s.pathname;"/"!==l.charAt(0)&&(l="/"+l),a=s.pathname,o=_l.sanitizeString(t,i?i+" "+l:l)}else o=_l.sanitizeString(t,e)}else o=n=r;return{target:n,name:o,data:a}},Ml);function Ml(){}var Al=(Ll.Now="undefined"!=typeof window&&window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},Ll.GetDuration=function(t,e){var i=null;return 0===t||0===e||tl.isNullOrUndefined(t)||tl.isNullOrUndefined(e)||(i=e-t),i},Ll);function Ll(){}var kl,Pl="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Dl="ProcessLegacy",zl="http.method",Ol=(d(Nl,kl=function(){}),Nl);function Nl(){return kl.call(this)||this}var Rl,Bl=(d(jl,Rl=function(){this.ver=1,this.sampleRate=100,this.tags={}}),jl);function jl(t,e,i){var r=Rl.call(this)||this;return r.name=_l.sanitizeString(t,i)||bl.NotSpecified,r.data=e,r.time=bl.toISOStringForIE8(new Date),r.aiDataContract={time:Ws.Required,iKey:Ws.Required,name:Ws.Required,sampleRate:function(){return 100==r.sampleRate?Ws.Hidden:Ws.Required},tags:Ws.Required,data:Ws.Required},r}function Fl(){}var Ul,Vl=(d(ql,Ul=Fl),ql);function ql(){var t=Ul.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}var Gl,Zl=(d(Hl,Gl=Vl),Hl.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Hl.dataType="EventData",Hl);function Hl(t,e,i,r){var n=Gl.call(this)||this;return n.aiDataContract={ver:Ws.Required,name:Ws.Required,properties:Ws.Default,measurements:Ws.Default},n.name=_l.sanitizeString(t,e)||bl.NotSpecified,n.properties=_l.sanitizeProperties(t,i),n.measurements=_l.sanitizeMeasurements(t,r),n}var Wl,Yl=(d(Kl,Wl=Fl),Kl);function Kl(){var t=Wl.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}var Xl,Jl=(d(Ql,Xl=Yl),Ql.CreateFromInterface=function(t,e){var i=e.exceptions&&e.exceptions.map((function(e){return tu.CreateFromInterface(t,e)}));return new Ql(t,f({},e,{exceptions:i}))},Ql.prototype.toInterface=function(){var t=this.exceptions,e=this.properties,i=this.measurements,r=this.severityLevel,n=this.ver,o=this.problemGroup,a=this.id,s=this.isManual;return{ver:n,exceptions:t instanceof Array&&t.map((function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:e,measurements:i,problemGroup:o,id:a,isManual:s}},Ql.CreateSimpleException=function(t,e,i,r,n,o){return{exceptions:[{hasFullStack:!0,message:t,stack:n,typeName:e}]}},Ql.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ql.dataType="ExceptionData",Ql);function Ql(t,e,i,r,n,o){var a=Xl.call(this)||this;return a.aiDataContract={ver:Ws.Required,exceptions:Ws.Required,severityLevel:Ws.Default,properties:Ws.Default,measurements:Ws.Default},e instanceof Error?(a.exceptions=[new tu(t,e)],a.properties=_l.sanitizeProperties(t,i),a.measurements=_l.sanitizeMeasurements(t,r),n&&(a.severityLevel=n),o&&(a.id=o)):(a.exceptions=e.exceptions,a.properties=e.properties,a.measurements=e.measurements,e.severityLevel&&(a.severityLevel=e.severityLevel),e.id&&(a.id=e.id),e.problemGroup&&(a.problemGroup=e.problemGroup),tl.isNullOrUndefined(e.ver)||(a.ver=e.ver),tl.isNullOrUndefined(e.isManual)||(a.isManual=e.isManual)),a}var $l,tu=(d(eu,$l=function(){this.hasFullStack=!0,this.parsedStack=[]}),eu.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&this.parsedStack.map((function(t){return t.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:t||void 0}},eu.CreateFromInterface=function(t,e){var i=e.parsedStack instanceof Array&&e.parsedStack.map((function(t){return ru.CreateFromInterface(t)}))||e.parsedStack;return new eu(t,f({},e,{parsedStack:i}))},eu.parseStack=function(t){var e=void 0;if("string"==typeof t){var i=t.split("\n");e=[];for(var r=0,n=0,o=0;o<=i.length;o++){var a=i[o];if(ru.regex.test(a)){var s=new ru(i[o],r++);n+=s.sizeInBytes,e.push(s)}}if(32768<n)for(var l=0,u=e.length-1,c=0,p=l,h=u;l<u;){if(32768<(c+=e[l].sizeInBytes+e[u].sizeInBytes)){var d=h-p+1;
2e.splice(p,d);break}p=l,h=u,l++,u--}}return e},eu);function eu(t,e){var i=$l.call(this)||this;if(i.aiDataContract={id:Ws.Default,outerId:Ws.Default,typeName:Ws.Required,message:Ws.Required,hasFullStack:Ws.Default,stack:Ws.Default,parsedStack:Ws.Array},e instanceof Error){i.typeName=_l.sanitizeString(t,e.name)||bl.NotSpecified,i.message=_l.sanitizeMessage(t,e.message)||bl.NotSpecified;var r=e.stack;i.parsedStack=eu.parseStack(r),i.stack=_l.sanitizeException(t,r),i.hasFullStack=bl.isArray(i.parsedStack)&&0<i.parsedStack.length}else i.typeName=e.typeName,i.message=e.message,i.stack=e.stack,i.parsedStack=e.parsedStack,i.hasFullStack=e.hasFullStack;return i}var iu,ru=(d(nu,iu=function(){}),nu.CreateFromInterface=function(t){return new nu(t,null)},nu.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},nu.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,nu.baseSize=58,nu);function nu(t,e){var i=iu.call(this)||this;if(i.sizeInBytes=0,i.aiDataContract={level:Ws.Required,method:Ws.Required,assembly:Ws.Default,fileName:Ws.Default,line:Ws.Default},"string"==typeof t){var r=t;i.level=e,i.method="<no_method>",i.assembly=bl.trim(r),i.fileName="",i.line=0;var n=r.match(nu.regex);n&&5<=n.length&&(i.method=bl.trim(n[2])||i.method,i.fileName=bl.trim(n[4]),i.line=parseInt(n[5])||0)}else i.level=t.level,i.method=t.method,i.assembly=t.assembly,i.fileName=t.fileName,i.line=t.line,i.sizeInBytes=0;return i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=nu.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var ou,au,su,lu=(d(uu,ou=Fl),uu);function uu(){var t=ou.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}(su=au=au||{})[su.Measurement=0]="Measurement",su[su.Aggregation=1]="Aggregation";var cu,pu=(d(hu,cu=function(){this.kind=au.Measurement}),hu);function hu(){var t=null!==cu&&cu.apply(this,arguments)||this;return t.aiDataContract={name:Ws.Required,kind:Ws.Default,value:Ws.Required,count:Ws.Default,min:Ws.Default,max:Ws.Default,stdDev:Ws.Default},t}var du,fu=(d(mu,du=lu),mu.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",mu.dataType="MetricData",mu);function mu(t,e,i,r,n,o,a){var s=du.call(this)||this;s.aiDataContract={ver:Ws.Required,metrics:Ws.Required,properties:Ws.Default};var l=new pu;return l.count=0<r?r:void 0,l.max=isNaN(o)||null===o?void 0:o,l.min=isNaN(n)||null===n?void 0:n,l.name=_l.sanitizeString(t,e)||bl.NotSpecified,l.value=i,s.metrics=[l],s.properties=_l.sanitizeProperties(t,a),s}var gu,yu=(d(vu,gu=Vl),vu);function vu(){var t=gu.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}var _u,xu=(d(bu,_u=yu),bu.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",bu.dataType="PageviewData",bu);function bu(t,e,i,r,n,o,a){var s=_u.call(this)||this;return s.aiDataContract={ver:Ws.Required,name:Ws.Default,url:Ws.Default,duration:Ws.Default,properties:Ws.Default,measurements:Ws.Default,id:Ws.Default},s.id=_l.sanitizeId(t,a),s.url=_l.sanitizeUrl(t,i),s.name=_l.sanitizeString(t,e)||bl.NotSpecified,isNaN(r)||(s.duration=bl.msToTimeSpan(r)),s.properties=_l.sanitizeProperties(t,n),s.measurements=_l.sanitizeMeasurements(t,o),s}var wu,Su=(d(Tu,wu=Fl),Tu);function Tu(){var t=wu.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}var Cu,Iu=(d(Eu,Cu=Su),Eu.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Eu.dataType="RemoteDependencyData",Eu);function Eu(t,e,i,r,n,o,a,s,l,u,c,p){void 0===l&&(l="Ajax");var h=Cu.call(this)||this;h.aiDataContract={id:Ws.Required,ver:Ws.Required,name:Ws.Default,resultCode:Ws.Default,duration:Ws.Default,success:Ws.Default,data:Ws.Default,target:Ws.Default,type:Ws.Default,properties:Ws.Default,measurements:Ws.Default,kind:Ws.Default,value:Ws.Default,count:Ws.Default,min:Ws.Default,max:Ws.Default,stdDev:Ws.Default,dependencyKind:Ws.Default,dependencySource:Ws.Default,commandName:Ws.Default,dependencyTypeName:Ws.Default},h.id=e,h.duration=bl.msToTimeSpan(n),h.success=o,h.resultCode=a+"",h.type=_l.sanitizeString(t,l);var d=El.ParseDependencyPath(t,i,s,r);return h.data=_l.sanitizeUrl(t,r)||d.data,h.target=_l.sanitizeString(t,d.target),u&&(h.target=h.target+" | "+u),h.name=_l.sanitizeString(t,d.name),h.properties=_l.sanitizeProperties(t,c),h.measurements=_l.sanitizeMeasurements(t,p),h}var Mu,Au=(d(Lu,Mu=Fl),Lu);function Lu(){var t=Mu.call(this)||this;return t.ver=2,t.properties={},t}var ku,Pu=(d(Du,ku=Au),Du.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Du.dataType="MessageData",Du);function Du(t,e,i,r){var n=ku.call(this)||this;return n.aiDataContract={ver:Ws.Required,message:Ws.Required,severityLevel:Ws.Default,properties:Ws.Default},e=e||bl.NotSpecified,n.message=_l.sanitizeMessage(t,e),n.properties=_l.sanitizeProperties(t,r),i&&(n.severityLevel=i),n}var zu,Ou=(d(Nu,zu=yu),Nu);function Nu(){var t=zu.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}var Ru,Bu=(d(ju,Ru=Ou),ju.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",ju.dataType="PageviewPerformanceData",ju);function ju(t,e,i,r,n,o,a){var s=Ru.call(this)||this;return s.aiDataContract={ver:Ws.Required,name:Ws.Default,url:Ws.Default,duration:Ws.Default,perfTotal:Ws.Default,networkConnect:Ws.Default,sentRequest:Ws.Default,receivedResponse:Ws.Default,domProcessing:Ws.Default,properties:Ws.Default,measurements:Ws.Default}
2,s.url=_l.sanitizeUrl(t,i),s.name=_l.sanitizeString(t,e)||bl.NotSpecified,s.properties=_l.sanitizeProperties(t,n),s.measurements=_l.sanitizeMeasurements(t,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var Fu,Uu,Vu,qu=(d(Gu,Fu=Ol),Gu);function Gu(t,e){var i=Fu.call(this)||this;return i.aiDataContract={baseType:Ws.Required,baseData:Ws.Required},i.baseType=t,i.baseData=e,i}(Vu=Uu=Uu||{})[Vu.Verbose=0]="Verbose",Vu[Vu.Information=1]="Information",Vu[Vu.Warning=2]="Warning",Vu[Vu.Error=3]="Error",Vu[Vu.Critical=4]="Critical";var Zu=(Hu.getConfig=function(t,e,i,r){var n;return void 0===r&&(r=!1),n=i&&t.extensionConfig&&t.extensionConfig[i]&&!tl.isNullOrUndefined(t.extensionConfig[i][e])?t.extensionConfig[i][e]:t[e],tl.isNullOrUndefined(n)?r:n},Hu);function Hu(){}var Wu=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Yu=(Ku.create=function(t,e,i,r,n,o){if(i=_l.sanitizeString(r,i)||bl.NotSpecified,tl.isNullOrUndefined(t)||tl.isNullOrUndefined(e)||tl.isNullOrUndefined(i))throw Error("Input doesn't contain all required fields");var a={name:i,time:(new Date).toISOString(),iKey:"",ext:o||{},tags:[],data:{},baseType:e,baseData:t};if(!tl.isNullOrUndefined(n))for(var s in n)n.hasOwnProperty(s)&&(a.data[s]=n[s]);return a},Ku);function Ku(){}var Xu=(Ju.UserExt="user",Ju.DeviceExt="device",Ju.TraceExt="trace",Ju.WebExt="web",Ju.AppExt="app",Ju.OSExt="os",Ju.SessionExt="ses",Ju.SDKExt="sdk",Ju);function Ju(){}var Qu=new Wu,$u="AppInsightsPropertiesPlugin",tc="AppInsightsChannelPlugin",ec=(ic.prototype.trackPageView=function(t,e){var i=this,r=t.name;!tl.isNullOrUndefined(r)&&"string"==typeof r||(t.name=window.document&&window.document.title||"");var n=t.uri;if(!tl.isNullOrUndefined(n)&&"string"==typeof n||(t.uri=window.location&&window.location.href||""),!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,e),this._channel().forEac
2h((function(t){t.forEach((function(t){return t.flush(!0)}))})),void this._logger.throwInternal(il.WARNING,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,a=void 0,s=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;a=Al.GetDuration(s,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(a)||(a=void 0);var l=void 0;tl.isNullOrUndefined(e)||tl.isNullOrUndefined(e.duration)||(l=e.duration),!this.overridePageViewDuration&&isNaN(l)||(isNaN(l)&&((e=e||{}).duration=a),this.appInsights.sendPageViewInternal(t,e),this._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))})),o=!0),e=e||{};var u=setInterval((function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(u);var l={name:r,uri:n};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(l),l.isValid||o?(o||(e.duration=l.durationMs,i.appInsights.sendPageViewInternal(t,e)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(l,e),i.pageViewPerformanceSent=!0),i._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))}))):(e.duration=a,i.appInsights.sendPageViewInternal(t,e),i._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))})))}else 6e4<Al.GetDuration(s,+new Date)&&(clearInterval(u),o||(e.duration=6e4,i.appInsights.sendPageViewInternal(t,e),i._channel().forEach((function(t){t.forEach((function(t){return t.flush(!0)}))}))))}catch(l){i._logger.throwInternal(il.CRITICAL,38,"trackPageView failed on page load calculation: "+bl.getExceptionName(l),{exception:bl.dump(l)})}}),100)},ic);function ic(t,e,i,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=e,this.appInsights=t,this._pageViewPerformanceManager=r,i&&(this._channel=function(){return i.getTransmissionControls()},this._logger=i.logger)}var rc=(nc.prototype.trackPreviousPageVisit=function(t,e){try{var i=this.restartPageVisitTimer(t,e);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+bl.dump(t))}},nc.prototype.restartPageVisitTimer=function(t,e){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(t,e),i}catch(t){return this._logger.warnToConsole("Call to restart failed: "+bl.dump(t)),null}},nc.prototype.startPageVisitTimer=function(t,e){try{if(bl.canUseSessionStorage()){if(null!=bl.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var i=new oc(t,e),r=JSON.stringify(i);bl.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(t){this._logger.warnToConsole("Call to start failed: "+bl.dump(t))}},nc.prototype.stopPageVisitTimer=function(){try{if(bl.canUseSessionStorage()){var t=Date.now(),e=bl.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(e){var i=JSON.parse(e);return i.pageVisitTime=t-i.pageVisitStartTime,bl.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),i}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+bl.dump(t)),null}},nc);function nc(t,e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e,this._logger=t}var oc=function(t,e){this.pageVisitStartTime=Date.now(),this.pageName=t,this.pageUrl=e},ac=(sc.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var e=this.getPerformanceTiming();if(e){var i=Al.GetDuration(e.navigationStart,e.loadEventEnd),r=Al.GetDuration(e.navigationStart,e.connectEnd),n=Al.GetDuration(e.requestStart,e.responseStart),o=Al.GetDuration(e.responseStart,e.responseEnd),a=Al.GetDuration(e.responseEnd,e.loadEventEnd);0==i?this._logger.throwInternal(il.WARNING,10,"error calculating page view performance.",{total:i,network:r,request:n,response:o,dom:a}):this.shouldCollectDuration(i,r,n,o,a)?i<Math.floor(r)+Math.floor(n)+Math.floor(o)+Math.floor(a)?this._logger.throwInternal(il.WARNING,8,"client performance math error.",{total:i,network:r,request:n,response:o,dom:a}):(t.durationMs=i,t.perfTotal=t.duration=bl.msToTimeSpan(i),t.networkConnect=bl.msToTimeSpan(r),t.sentRequest=bl.msToTimeSpan(n),t.receivedResponse=bl.msToTimeSpan(o),t.domProcessing=bl.msToTimeSpan(a),t.isValid=!0):this._logger.throwInternal(il.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:n,response:o,dom:a})}},sc.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},sc.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},sc.prototype.isPerformanceTimingDataReady=function(){var t=window.performance.timing;return 0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},sc.prototype.shouldCollectDuration=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,n=!1;if(r)for(var o=0;o<i.length;o++)n=n||-1!==r.toLowerCase().indexOf(i[o]);if(n)return!1;for(var a=0;a<t.length;a++)if(t[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},sc);function sc(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}var lc="duration",uc=(cc.getDefaultConfig=function(t){return(t=t||{}).sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=bl.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=bl.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=bl.stringToBoolOrDefault(t.overridePageViewDuration),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||100<=t.samplingPercentage)&&(t.samplingPercentage=100),t.isCookieUseDisabled=bl.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=bl.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=bl.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=bl.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},cc.prototype.processTelemetry=function(t){for(var e=!1,i=this._telemetryInitializer
2s.length,r=0;r<i;++r){var n=this._telemetryInitializers[r];if(n)try{if(!1===n.apply(null,[t])){e=!0;break}}catch(t){this._logger.throwInternal(il.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+bl.getExceptionName(t),{exception:bl.dump(t)},!0)}}e||tl.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t)},cc.prototype.setNextPlugin=function(t){this._nextPlugin=t},cc.prototype.trackEvent=function(t,e){try{var i=Yu.create(t,Zl.dataType,Zl.envelopeType,this._logger,e);this.core.track(i)}catch(t){this._logger.throwInternal(il.WARNING,39,"trackTrace failed, trace will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this._logger.throwInternal(il.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.stopTrackEvent=function(t,e,i){try{this._eventTracking.stop(t,void 0,e)}catch(t){this._logger.throwInternal(il.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.trackTrace=function(t,e){try{var i=Yu.create(t,Pu.dataType,Pu.envelopeType,this._logger,e);this.core.track(i)}catch(t){this._logger.throwInternal(il.WARNING,39,"trackTrace failed, trace will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.trackMetric=function(t,e){try{var i=Yu.create(t,fu.dataType,fu.envelopeType,this._logger,e);this.core.track(i)}catch(t){this._logger.throwInternal(il.CRITICAL,36,"trackMetric failed, metric will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.trackPageView=function(t,e){try{var i=t||{};this._pageViewManager.trackPageView(i,f({},i.properties,i.measurements,e)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(i.name,i.uri)}catch(t){this._logger.throwInternal(il.CRITICAL,37,"trackPageView failed, page view will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.sendPageViewInternal=function(t,e,i){"undefined"!=typeof document&&(t.refUri=void 0===t.refUri?document.referrer:t.refUri);var r=Yu.create(t,xu.dataType,xu.envelopeType,this._logger,e,i);this.core.track(r),this._trackAjaxAttempts=0},cc.prototype.sendPageViewPerformanceInternal=function(t,e,i){var r=Yu.create(t,Bu.dataType,Bu.envelopeType,this._logger,e,i);this.core.track(r)},cc.prototype.trackPageViewPerformance=function(t,e){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,e)}catch(t){this._logger.throwInternal(il.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.startTrackPage=function(t){try{"string"!=typeof t&&(t=window.document&&window.document.title||""),this._pageTracking.start(t)}catch(t){this._logger.throwInternal(il.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.stopTrackPage=function(t,e,i,r){try{"string"!=typeof t&&(t=window.document&&window.document.title||""),"string"!=typeof e&&(e=window.location&&window.location.href||""),this._pageTracking.stop(t,e,i,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,e)}catch(t){this._logger.throwInternal(il.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype.sendExceptionInternal=function(t,e,i){var r=new Jl(this._logger,t.exception||new Error(bl.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),n=Yu.create(r,Jl.dataType,Jl.envelopeType,this._logger,e,i);this.core.track(n)},cc.prototype.trackException=function(t,e){try{this.sendExceptionInternal(t,e)}catch(t){this._logger.throwInternal(il.CRITICAL,35,"trackException failed, exception will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},cc.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(bl.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!bl.isError(t.error)){var i="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=i}this.trackException({exception:t.error,severityLevel:Uu.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(il.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+bl.getExceptionName(e),{exception:bl.dump(e),errorString:r})}},cc.prototype.addTelemetryInitializer=function(t){this._telemetryInitializer
2s.push(t)},cc.prototype._initialize=function(t,e,i){var r=this;if(!this._isInitialized){if(tl.isNullOrUndefined(e))throw Error("Error initializing");this.core=e,this._logger=e.logger,this._globalconfig={instrumentationKey:t.instrumentationKey,endpointUrl:t.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=t.extensionConfig&&t.extensionConfig[this.identifier]?t.extensionConfig[this.identifier]:{};var n=cc.getDefaultConfig();if(void 0!==n){for(var o in n)this.config[o]=Zu.getConfig(t,o,this.identifier,n[o]);if(this._globalconfig)for(var o in n)void 0===this._globalconfig[o]&&(this._globalconfig[o]=n[o])}this.config.isCookieUseDisabled&&bl.disableCookies(),this.config.isStorageUseDisabled&&bl.disableStorage();var a={instrumentationKey:function(){return t.instrumentationKey},accountId:function(){return r.config.accountId||t.accountId},sessionRenewalMs:function(){return r.config.sessionRenewalMs||t.sessionRenewalMs},sessionExpirationMs:function(){return r.config.sessionExpirationMs||t.sessionExpirationMs},sampleRate:function(){return r.config.samplingPercentage||t.samplingPercentage},cookieDomain:function(){return r.config.cookieDomain||t.cookieDomain},sdkExtension:function(){return r.config.sdkExtension||t.sdkExtension},isBrowserLinkTrackingEnabled:function(){return r.config.isBrowserLinkTrackingEnabled||t.isBrowserLinkTrackingEnabled},appId:function(){return r.config.appId||t.appId}};this._pageViewPerformanceManager=new ac(this.core),this._pageViewManager=new ec(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new rc(this._logger,(function(t,e,i){return r.trackPageVisitTime(t,e,i)})),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new pc(this._logger,"trackEvent"),this._eventTracking.action=function(t,e,i,n){(n=n||{})[lc]=i.toString(),r.trackEvent({name:t,properties:n})},this._pageTracking=new pc(this._logger,"trackPageView"),this._pageTracking.action=function(t,e,i,n,o){tl.isNullOrUndefined(n)&&(n={}),n[lc]=i.toString();var a={name:t,uri:e,properties:n,measurements:o};r.sendPageViewInternal(a)};var s,l,u=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var c=window.onerror;window.onerror=function(t,e,i,r,n){var o=c&&c(t,e,i,r,n);return!0!==o&&u._onerror({message:t,url:e,lineNumber:i,columnNumber:r,error:n}),o},this.config.autoExceptionInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&"object"==typeof history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState&&"object"==typeof window&&"undefined"!=typeof Event){var p=this;i.forEach((function(t){t.identifier===$u&&(r._properties=t)})),history.pushState=(l=history.pushState,function(){var t=l.apply(this,arguments);return window.dispatchEvent(bl.createDomEvent(p.config.namePrefix+"pushState")),window.dispatchEvent(bl.createDomEvent(p.config.namePrefix+"locationchange")),t}
2),history.replaceState=(s=history.replaceState,function(){var t=s.apply(this,arguments);return window.dispatchEvent(bl.createDomEvent(p.config.namePrefix+"replaceState")),window.dispatchEvent(bl.createDomEvent(p.config.namePrefix+"locationchange")),t}),window.addEventListener(p.config.namePrefix+"popstate",(function(){window.dispatchEvent(bl.createDomEvent(p.config.namePrefix+"locationchange"))})),window.addEventListener(p.config.namePrefix+"locationchange",(function(){p._properties&&p._properties.context&&p._properties.context.telemetryTrace&&(p._properties.context.telemetryTrace.traceID=bl.generateW3CId(),p._properties.context.telemetryTrace.name=window.location&&window.location.pathname||"_unknown_"),r._currUri&&(r._prevUri=r._currUri),r._currUri=window.location&&window.location.href||"",setTimeout(function(t){p.trackPageView({refUri:t,properties:{duration:0}})}.bind(r,r._prevUri),p.autoRoutePVDelay)}))}this._isInitialized=!0}},cc.prototype.trackPageVisitTime=function(t,e,i){var r={PageName:t,PageUrl:e};this.trackMetric({name:"PageVisitTime",average:i,max:i,min:i,sampleCount:1},r)},cc.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var e=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===Iu.dataType){var i=t.baseData;if(i)for(var r=0;r<e.length;r++)if(i.target&&0<=i.target.indexOf(e[r]))return!1}return!0}))}},cc.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},cc.prototype._sendCORSException=function(t){var e={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:t,lineNumber:0,columnNumber:0,error:void 0},i=Yu.create(e,Jl.dataType,Jl.envelopeType,this._logger,{url:t});this.core.track(i)},cc.Version="2.2.2",cc);function cc(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this._prevUri="object"==typeof window&&window.location&&window.location.href||"",this.initialize=this._initialize.bind(this)}var pc=(hc.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(il.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:t},!0),this._events[t]=+new Date},hc.prototype.stop=function(t,e,i,r){var n=this._events[t];if(isNaN(n))this._logger.throwInternal(il.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var o=+new Date,a=Al.GetDuration(n,o);this.action(t,e,a,i,r)}delete this._events[t],this._events[t]=void 0},hc);function hc(t,e){this._name=e,this._events={},this._logger=t}var dc=(fc.prototype.enqueue=function(t){this._buffer.push(t)},fc.prototype.count=function(){return this._buffer.length},fc.prototype.clear=function(){this._buffer.length=0},fc.prototype.getItems=function(){return this._buffer.slice(0)},fc.prototype.batchPayloads=function(t){return t&&0<t.length?this._config.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},fc.prototype.markAsSent=function(t){this.clear()},fc.prototype.clearSent=function(t){},fc);function fc(t){this._config=t,this._buffer=[]}var mc=(gc.prototype.enqueue=function(t){this._buffer.length>=gc.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(il.WARNING,67,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(t),this.setBuffer(gc.BUFFER_KEY,this._buffer))},gc.prototype.count=function(){return this._buffer.length},gc.prototype.clear=function(){this._buffer.length=0,this.setBuffer(gc.BUFFER_KEY,[]),this.setBuffer(gc.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},gc.prototype.getItems=function(){return this._buffer.slice(0)},gc.prototype.batchPayloads=function(t){return t&&0<t.length?this._config.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},gc.prototype.markAsSent=function(t){this._buffer=this.removePayloadsFromBuffer(t,this._buffer),this.setBuffer(gc.BUFFER_KEY,this._buffer);var e=this.getBuffer(gc.SENT_BUFFER_KEY);e instanceof Array&&t instanceof Array&&((e=e.concat(t)).length>gc.MAX_BUFFER_SIZE&&(this._logger.throwInternal(il.CRITICAL,67,"Sent buffer reached its maximum size: "+e.length,!0),e.length=gc.MAX_BUFFER_SIZE),this.setBuffer(gc.SENT_BUFFER_KEY,e))},gc.prototype.clearSent=function(t){var e=this.getBuffer(gc.SENT_BUFFER_KEY);e=this.removePayloadsFromBuffer(t,e),this.setBuffer(gc.SENT_BUFFER_KEY,e)},gc.prototype.removePayloadsFromBuffer=function(t,e){var i=[];for(var r in e){var n=!1;for(var o in t)if(t[o]===e[r]){n=!0;break}n||i.push(e[r])}return i},gc.prototype.getBuffer=function(t){var e=t;try{e=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+e:e;var i=bl.getSessionStorage(this._logger,e);if(i){var r=JSON.parse(i);if(r)return r}}catch(t){this._logger.throwInternal(il.CRITICAL,42," storage key: "+e+", "+bl.getExceptionName(t),{exception:bl.dump(t)})}return[]},gc.prototype.setBuffer=function(t,e){var i=t;
2try{i=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+i:i;var r=JSON.stringify(e);bl.setSessionStorage(this._logger,i,r)}catch(t){bl.setSessionStorage(this._logger,i,JSON.stringify([])),this._logger.throwInternal(il.WARNING,41," storage key: "+i+", "+bl.getExceptionName(t)+". Buffer cleared",{exception:bl.dump(t)})}},gc.BUFFER_KEY="AI_buffer",gc.SENT_BUFFER_KEY="AI_sentBuffer",gc.MAX_BUFFER_SIZE=2e3,gc);function gc(t,e){this._bufferFullMessageSent=!1,this._logger=t,this._config=e;var i=this.getBuffer(gc.BUFFER_KEY),r=this.getBuffer(gc.SENT_BUFFER_KEY);this._buffer=i.concat(r),this._buffer.length>gc.MAX_BUFFER_SIZE&&(this._buffer.length=gc.MAX_BUFFER_SIZE),this.setBuffer(gc.SENT_BUFFER_KEY,[]),this.setBuffer(gc.BUFFER_KEY,this._buffer)}var yc=(vc.extractProperties=function(t){var e=null;for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];"number"!=typeof r&&((e=e||{})[i]=r)}return e},vc.extractPropsAndMeasurements=function(t,e,i){if(!tl.isNullOrUndefined(t))for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];"number"==typeof n?i[r]=n:e[r]="string"==typeof n?n:JSON.stringify(n)}},vc.createEnvelope=function(t,e,i,r){var n=new Bl(t,r,e);n.iKey=i.iKey;var o=i.iKey.replace(/-/g,"");return n.name=n.name.replace("{0}",o),vc.extractPartAExtensions(i,n),i.tags||(i.tags=[]),n},vc.extractPartAExtensions=function(t,e){if(e.tags||(e.tags={}),t.ext||(t.ext={}),t.tags||(t.tags=[]),t.ext.user){t.ext.user.authId&&(e.tags[Qu.userAuthUserId]=t.ext.user.authId);var i=t.ext.user.id||t.ext.user.localId;i&&(e.tags[Qu.userId]=i)}if(t.ext.app&&t.ext.app.sesId&&(e.tags[Qu.sessionId]=t.ext.app.sesId),t.ext.device&&((t.ext.device.id||t.ext.device.localId)&&(e.tags[Qu.deviceId]=t.ext.device.id||t.ext.device.localId),t.ext.device.deviceClass&&(e.tags[Qu.deviceType]=t.ext.device.deviceClass),t.ext.device.ip&&(e.tags[Qu.deviceIp]=t.ext.device.ip)),t.ext.web){var r=t.ext.web;r.browserLang&&(e.tags[Qu.deviceLanguage]=r.browserLang),r.browserVer&&(e.tags[Qu.deviceBrowserVersion]=r.browserVer),r.browser&&(e.tags[Qu.deviceBrowser]=r.browser),e.data=e.data||{},e.data.baseData=e.data.baseData||{},e.data.baseData.properties=e.data.baseData.properties||{},r.domain&&(e.data.baseData.properties.domain=r.domain),r.isManual&&(e.data.baseData.properties.isManual=r.isManual.toString()),r.screenRes&&(e.data.baseData.properties.screenRes=r.screenRes),r.userConsent&&(e.data.baseData.properties.userConsent=r.userConsent.toString())}t.ext.device&&t.ext.device.model&&(e.tags[Qu.deviceModel]=t.ext.device.model),t.ext.os&&t.ext.os.name&&(e.tags[Qu.deviceOS]=t.ext.os.name),t.ext.device&&t.ext.device.deviceType&&(e.tags[Qu.deviceType]=t.ext.device.deviceType),t.ext.trace&&(t.ext.trace.parentID&&(e.tags[Qu.operationParentId]=t.ext.trace.parentID),t.ext.trace.name&&(e.tags[Qu.operationName]=t.ext.trace.name),t.ext.trace.traceID&&(e.tags[Qu.operationId]=t.ext.trace.traceID));for(var n={},o=function(e){var i=t.tags[e];
2Object.keys(i).forEach((function(t){n[t]=i[t]})),t.tags.splice(e,1)},a=t.tags.length-1;0<=a;a--)o(a);for(var s in t.tags)n[s]=t.tags[s];e.tags=f({},e.tags,n),e.tags[Qu.internalSdkVersion]||(e.tags[Qu.internalSdkVersion]="javascript:"+vc.Version)},vc.Version="2.2.2",vc);function vc(){}var _c,xc=(d(bc,_c=yc),bc.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i=e.baseData.measurements||{},r=e.baseData.properties||{};yc.extractPropsAndMeasurements(e.data,r,i);var n=e.baseData;if(tl.isNullOrUndefined(n))return t.warnToConsole("Invalid input for dependency data"),null;var o=n.id,a=n.target,s=n.name,l=n.duration,u=n.success,c=n.responseCode,p=n.type,h=n.correlationContext,d=n.properties&&n.properties[zl]?n.properties[zl]:"GET",f=new Iu(t,o,a,s,l,u,c,d,p,h,r,i),m=new qu(Iu.dataType,f);return yc.createEnvelope(t,Iu.envelopeType,e,m)},bc.DependencyEnvelopeCreator=new bc,bc);function bc(){return null!==_c&&_c.apply(this,arguments)||this}var wc,Sc=(d(Tc,wc=yc),Tc.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i={},r={};e.baseType!==Zl.dataType&&(i.baseTypeSource=e.baseType),e.baseType===Zl.dataType?(i=e.baseData.properties||{},r=e.baseData.measurements||{}):e.baseData&&yc.extractPropsAndMeasurements(e.baseData,i,r),yc.extractPropsAndMeasurements(e.data,i,r);var n=e.baseData.name,o=new Zl(t,n,i,r),a=new qu(Zl.dataType,o);return yc.createEnvelope(t,Zl.envelopeType,e,a)},Tc.EventEnvelopeCreator=new Tc,Tc);function Tc(){return null!==wc&&wc.apply(this,arguments)||this}var Cc,Ic=(d(Ec,Cc=yc),Ec.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i=e.baseData,r=Jl.CreateFromInterface(t,i),n=new qu(Jl.dataType,r);return yc.createEnvelope(t,Jl.envelopeType,e,n)},Ec.ExceptionEnvelopeCreator=new Ec,Ec);function Ec(){return null!==Cc&&Cc.apply(this,arguments)||this}var Mc,Ac=(d(Lc,Mc=yc),Lc.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i=e.baseData.properties||{},r=yc.extractProperties(e.data);r=f({},i,r);var n=e.baseData.name,o=e.baseData.average,a=e.baseData.sampleCount,s=e.baseData.min,l=e.baseData.max,u=new fu(t,n,o,a,s,l,r),c=new qu(fu.dataType,u);return yc.createEnvelope(t,fu.envelopeType,e,c)},Lc.MetricEnvelopeCreator=new Lc,Lc);function Lc(){return null!==Mc&&Mc.apply(this,arguments)||this}var kc,Pc=(d(Dc,kc=yc),Dc.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i=void 0;tl.isNullOrUndefined(e.baseData)||tl.isNullOrUndefined(e.baseData.properties)||tl.isNullOrUndefined(e.baseData.properties.duration)?tl.isNullOrUndefined(e.data)||tl.isNullOrUndefined(e.data.duration)||(i=e.data.duration,delete e.data.duration):(i=e.baseData.properties.duration,delete e.baseData.properties.duration);var r,n=e.baseData;e.ext&&e.ext.trace&&e.ext.trace.traceID&&(r=e.ext.trace.traceID);var o=n.id||r,a=n.name,s=n.uri,l=n.properties||{},u=n.measurements||{};if(tl.isNullOrUndefined(n.refUri)||(l.refUri=n.refUri),tl.isNullOrUndefined(n.pageType)||(l.pageType=n.pageType),tl.isNullOrUndefined(n.isLoggedIn)||(l.isLoggedIn=n.isLoggedIn.toString()),!tl.isNullOrUndefined(n.properties)){var c=n.properties;for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])}yc.extractPropsAndMeasurements(e.data,l,u);var h=new xu(t,a,s,i,l,u,o),d=new qu(xu.dataType,h);return yc.createEnvelope(t,xu.envelopeType,e,d)},Dc.PageViewEnvelopeCreator=new Dc,Dc);function Dc(){return null!==kc&&kc.apply(this,arguments)||this}var zc,Oc=(d(Nc,zc=yc),Nc.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i=e.baseData,r=i.name,n=i.uri||i.url,o=i.properties||{},a=i.measurements||{};yc.extractPropsAndMeasurements(e.data,o,a);var s=new Bu(t,r,n,void 0,o,a,i),l=new qu(Bu.dataType,s);return yc.createEnvelope(t,Bu.envelopeType,e,l)},Nc.PageViewPerformanceEnvelopeCreator=new Nc,Nc);function Nc(){return null!==zc&&zc.apply(this,arguments)||this}var Rc,Bc=(d(jc,Rc=yc),jc.prototype.Create=function(t,e){this._logger=t,tl.isNullOrUndefined(e.baseData)&&this._logger.throwInternal(il.CRITICAL,ll,"telemetryItem.baseData cannot be null.");var i=e.baseData.message,r=e.baseData.severityLevel,n=yc.extractProperties(e.data),o=f({},n,e.baseData.properties),a=new Pu(t,i,r,o),s=new qu(Pu.dataType,a);return yc.createEnvelope(t,Pu.envelopeType,e,s)},jc.TraceEnvelopeCreator=new jc,jc);function jc(){return null!==Rc&&Rc.apply(this,arguments)||this}var Fc=(Uc.prototype.serialize=function(t){var e=this._serializeObject(t,"root");return JSON.stringify(e)},Uc.prototype._serializeObject=function(t,e){var i="__aiCircularRefCheck",r={};if(!t)return this._logger.throwInternal(il.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:e},!0),r;if(t[i])return this._logger.throwInternal(il.WARNING,50,"Circular reference detected while serializing object",{name:e},!0),r;if(!t.aiDataContract){if("measurements"===e)r=this._serializeStringMap(t,"number",e);else if("properties"===e)r=this._serializeStringMap(t,"string",e);else if("tags"===e)r=this._serializeStringMap(t,"string",e);else if(bl.isArray(t))r=this._serializeArray(t,e);else{this._logger.throwInternal(il.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:e},!0);try{JSON.stringify(t),r=t}catch(t){this._logger.throwInternal(il.CRITICAL,48,t&&"function"==typeof t.toString?t.toString():"Error serializing object",null,!0)}}return r}for(var n in t[i]=!0,t.aiDataContract){var o,a=t.aiDataContract[n],s="function"==typeof a?a()&Ws.Required:a&Ws.Required,l="function"==typeof a?a()&Ws.Hidden:a&Ws.Hidden,u=a&Ws.Array,c=void 0!==t[n],p="object"==typeof t[n]&&null!==t[n];!s||c||u?l||void 0!==(o=p?u?this._serializeArray(t[n],n):this._serializeObject(t[n],n):t[n])&&(r[n]=o):this._logger.throwInternal(il.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:n,name:e})}return delete t[i],r},Uc.prototype._serializeArray=function(t,e){var i=void 0;if(t)if(bl.isArray(t)){i=[];for(var r=0;r<t.length;r++){var n=t[r],o=this._serializeObject(n,e+"["+r+"]");i.push(o)}}else this._logger.throwInternal(il.CRITICAL,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:e},!0);return i}
2,Uc.prototype._serializeStringMap=function(t,e,i){var r=void 0;if(t)for(var n in r={},t){var o=t[n];if("string"===e)void 0===o?r[n]="undefined":null===o?r[n]="null":o.toString?r[n]=o.toString():r[n]="invalid field: toString() is not defined.";else if("number"===e)if(void 0===o)r[n]="undefined";else if(null===o)r[n]="null";else{var a=parseFloat(o);isNaN(a)?r[n]="NaN":r[n]=a}else r[n]="invalid field: "+i+" is of unknown type.",this._logger.throwInternal(il.CRITICAL,r[n],null,!0)}return r},Uc);function Uc(t){this._logger=t}function Vc(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(t){this.isListening=!1}}var qc=(Vc.prototype._setOnline=function(){this._onlineStatus=!0},Vc.prototype._setOffline=function(){this._onlineStatus=!1},Vc.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!(navigator&&!tl.isNullOrUndefined(navigator.onLine))||navigator.onLine},Vc.prototype.isOffline=function(){return!this.isOnline()},Vc.Offline=new Vc,Vc).Offline,Gc=(Zc.prototype.getHashCodeScore=function(t){return this.getHashCode(t)/Zc.INT_MAX_VALUE*100},Zc.prototype.getHashCode=function(t){if(""==t)return 0;for(;t.length<Zc.MIN_INPUT_LENGTH;)t=t.concat(t);for(var e=5381,i=0;i<t.length;++i)e=(e<<5)+e+t.charCodeAt(i),e&=e;return Math.abs(e)},Zc.INT_MAX_VALUE=2147483647,Zc.MIN_INPUT_LENGTH=8,Zc);function Zc(){}var Hc=(Wc.prototype.getSamplingScore=function(t){return t.tags&&t.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.userId]):t.ext&&t.ext.user&&t.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(t.ext.user.id):t.tags&&t.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.operationId]):t.ext&&t.ext.telemetryTrace&&t.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(t.ext.telemetryTrace.traceID):100*Math.random()},Wc);function Wc(){this.hashCodeGeneragor=new Gc,this.keys=new Wu}var Yc=(Kc.prototype.isSampledIn=function(t){var e=this.sampleRate;return null==e||100<=e||t.baseType===fu.dataType||this.samplingScoreGenerator.getSamplingScore(t)<e},Kc);function Kc(t,e){this.INT_MAX_VALUE=2147483647,tl.isNullOrUndefined(e)?this._logger=new pl:this._logger=e,(100<t||t<0)&&(this._logger.throwInternal(il.WARNING,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new Hc}var Xc=(Jc.prototype.pause=function(){throw new Error("Method not implemented.")},Jc.prototype.resume=function(){throw new Error("Method not implemented.")},Jc.prototype.flush=function(){try{this.triggerSend()}catch(t){this._logger.throwInternal(il.CRITICAL,22,"flush failed, telemetry will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},Jc.prototype.onunloadFlush=function(){if(!1!==this._config.onunloadDisableBeacon()&&!1!==this._config.isBeaconApiDisabled()||!bl.IsBeaconApiSupported())this.flush();else try{this.triggerSend(!0,this._beaconSender)}catch(t){this._logger.throwInternal(il.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},Jc.prototype.teardown=function(){throw new Error("Method not implemented.")},Jc.prototype.initialize=function(t,e,i){var r=this;this._logger=e.logger,this._serializer=new Fc(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var n=Jc._getDefaultAppInsightsChannelConfig();function o(e){a._config[e]=function(){return Zu.getConfig(t,e,r.identifier,n[e]())}}this._config=Jc._getEmptyAppInsightsChannelConfig();var a=this;for(var s in n)o(s);this._buffer=this._config.enableSessionStorageBuffer&&bl.canUseSessionStorage()?new mc(this._logger,this._config):new dc(this._config),this._sample=ne
2w Yc(this._config.samplingPercentage(),this._logger),!this._config.isBeaconApiDisabled()&&bl.IsBeaconApiSupported()?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},Jc.prototype.processTelemetry=function(t){var e=this;try{if(this._config.disableTelemetry())return;if(!t)return void this._logger.throwInternal(il.CRITICAL,7,"Cannot send empty telemetry");if(t.baseData&&!t.baseType)return void this._logger.throwInternal(il.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(t.baseType||(t.baseType="EventData"),!this._sender)return void this._logger.throwInternal(il.CRITICAL,28,"Sender was not initialized");if(!this._isSampledIn(t))return void this._logger.throwInternal(il.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:this._sample.sampleRate});t.tags=t.tags||{},t.tags.sampleRate=this._sample.sampleRate;var i=Jc.constructEnvelope(t,this._config.instrumentationKey(),this._logger);if(!i)return void this._logger.throwInternal(il.CRITICAL,47,"Unable to create an AppInsights envelope");var r=!1;if(t.tags&&t.tags[Dl]&&(t.tags[Dl].forEach((function(t){try{t&&!1===t(i)&&(r=!0,e._logger.warnToConsole("Telemetry processor check returns false"))}catch(t){e._logger.throwInternal(il.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+bl.getExceptionName(t),{exception:bl.dump(t)},!0)}})),delete t.tags[Dl]),r)return;var n=this._serializer.serialize(i),o=this._buffer.getItems(),a=this._buffer.batchPayloads(o);a&&a.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(t){this._logger.throwInternal(il.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+bl.getExceptionName(t),{exception:bl.dump(t)})}tl.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t)},Jc.prototype.setNextPlugin=function(t){this._nextPlugin=t},Jc.prototype._xhrReadyStateChange=function(t,e,i){if(4===t.readyState){var r=null;this._appId||(r=this._parseResponse(t.responseText||t.response))&&r.appId&&(this._appId=r.appId),(t.status<200||300<=t.status)&&0!==t.status?!this._config.isRetryDisabled()&&this._isRetriable(t.status)?(this._resendPayload(e),this._logger.throwInternal(il.WARNING,sl,". Response code "+t.status+". Will retry to send "+e.length+" items.")):this._onError(e,this._formatErrorMessageXhr(t)):qc.isOffline()?this._config.isRetryDisabled()||(this._resendPayload(e,10),this._logger.throwInternal(il.WARNING,sl,". Offline - Response Code: "+t.status+". Offline status: "+qc.isOffline()+". Will retry to send "+e.length+" items.")):206===t.status?(r=r||this._parseResponse(t.responseText||t.response))&&!this._config.isRetryDisabled()?this._onPartialSuccess(e,r):this._onError(e,this._formatErrorMessageXhr(t)):(this._consecutiveErrors=0,this._onSuccess(e,i))}},Jc.prototype.triggerSend=function(t,e){void 0===t&&(t=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var i=this._buffer.getItems();e?e.call(this,i,t):this._sender(i,t)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(t){(!bl.getIEVersion()||9<bl.getIEVersion())&&this._logger.throwInternal(il.CRITICAL,sl,"Telemetry transmission failed, some telemetry will be lost: "+bl.getExceptionName(t),{exception:bl.dump(t)})}},Jc.prototype._onError=function(t,e,i){this._logger.throwInternal(il.WARNING,26,"Failed to send telemetry.",{message:e}),this._buffer.clearSent(t)},Jc.prototype._onPartialSuccess=function(t,e){for(var i=[],r=[],n=0,o=e.errors.reverse();n<o.length;n++){var a=o[n],s=t.splice(a.index,1)[0];this._isRetriable(a.statusCode)?r.push(s):i.push(s)}0<t.length&&this._onSuccess(t,e.itemsAccepted),0<i.length&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",e.itemsAccepted,"of",e.itemsReceived].join(" "))),0<r.length&&(this._resendPayload(r),this._logger.throwInternal(il.WARNING,sl,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+e.itemsReceived+" items"))},Jc.prototype._onSuccess=function(t,e){this._buffer.clearSent(t)},Jc.prototype._xdrOnLoad=function(t,e){if(!t||t.responseText+""!="200"&&""!==t.responseText){var i=this._parseResponse(t.responseText);i&&i.itemsReceived&&i.itemsReceived>i.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(e,i):this._onError(e,this._formatErrorMessageXdr(t))}else this._consecutiveErrors=0,this._onSuccess(e,0)}
2,Jc.constructEnvelope=function(t,e,i){var r;switch((r=e===t.iKey||tl.isNullOrUndefined(e)?t:f({},t,{iKey:e})).baseType){case Zl.dataType:return Sc.EventEnvelopeCreator.Create(i,r);case Pu.dataType:return Bc.TraceEnvelopeCreator.Create(i,r);case xu.dataType:return Pc.PageViewEnvelopeCreator.Create(i,r);case Bu.dataType:return Oc.PageViewPerformanceEnvelopeCreator.Create(i,r);case Jl.dataType:return Ic.ExceptionEnvelopeCreator.Create(i,r);case fu.dataType:return Ac.MetricEnvelopeCreator.Create(i,r);case Iu.dataType:return xc.DependencyEnvelopeCreator.Create(i,r);default:return Sc.EventEnvelopeCreator.Create(i,r)}},Jc._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},Jc._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},Jc.prototype._isSampledIn=function(t){return this._sample.isSampledIn(t)},Jc.prototype._beaconSender=function(t,e){var i=this._config.endpointUrl(),r=this._buffer.batchPayloads(t),n=new Blob([r],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(i,n)?(this._buffer.markAsSent(t),this._onSuccess(t,t.length)):(this._xhrSender(t,!0),this._logger.throwInternal(il.WARNING,sl,". Failed to send telemetry with Beacon API, retried with xhrSender."))},Jc.prototype._xhrSender=function(t,e){var i=this,r=new XMLHttpRequest;r[Pl]=!0,r.open("POST",this._config.endpointUrl(),e),r.setRequestHeader("Content-type","application/json"),bl.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&r.setRequestHeader(yl.sdkContextHeader,yl.sdkContextHeaderAppIdRequest),r.onreadystatechange=function(){return i._xhrReadyStateChange(r,t,t.length)},r.onerror=function(e){return i._onError(t,i._formatErrorMessageXhr(r),e)};var n=this._buffer.batchPayloads(t);r.send(n),this._buffer.markAsSent(t)},Jc.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(il.CRITICAL,43,"Cannot parse the response. "+bl.getExceptionName(e),{response:t})}return null},Jc.prototype._resendPayload=function(t,e){if(void 0===e&&(e=1),t&&0!==t.length){this._buffer.clearSent(t),this._consecutiveErrors++;for(var i=0,r=t;i<r.length;i++){var n=r[i];this._buffer.enqueue(n)}this._setRetryTime(e),this._setupTimer()}},Jc.prototype._setRetryTime=function(t){var e;if(this._consecutiveErrors<=1)e=10;else{var i=(Math.pow(2,this._consecutiveErrors)-1)/2,r=Math.floor(Math.random()*i*10)+1;
2r*=t,e=Math.max(Math.min(r,3600),10)}var n=Date.now()+1e3*e;this._retryAt=n},Jc.prototype._setupTimer=function(){var t=this;if(!this._timeoutHandle){var e=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,i=Math.max(this._config.maxBatchInterval(),e);this._timeoutHandle=setTimeout((function(){t.triggerSend()}),i)}},Jc.prototype._isRetriable=function(t){return 408==t||429==t||500==t||503==t},Jc.prototype._formatErrorMessageXhr=function(t,e){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+t.responseText||0:e},Jc.prototype._xdrSender=function(t,e){var i=this,r=new XDomainRequest;r.onload=function(){return i._xdrOnLoad(r,t)},r.onerror=function(e){return i._onError(t,i._formatErrorMessageXdr(r),e)};var n=window.location&&window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(n,0))return this._logger.throwInternal(il.WARNING,sl,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");r.open("POST",o);var a=this._buffer.batchPayloads(t);r.send(a),this._buffer.markAsSent(t)},Jc.prototype._formatErrorMessageXdr=function(t,e){return t?"XDomainRequest,Response:"+t.responseText||0:e},Jc);function Jc(){this.priority=1001,this.identifier=tc,this._XMLHttpRequestSupported=!1}var Qc=function(){},$c=(tp.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var t=Al.Now(),e=t-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=t-this.automaticSession.renewalDate>this.config.sessionRenewalMs();e||i?this.renew():(!this.cookieUpdatedTimestamp||t-this.cookieUpdatedTimestamp>tp.cookieUpdateInterval)&&(this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},tp.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},tp.prototype.initializeAutomaticSession=function(){var t=bl.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var e=bl.getStorage(this._logger,this._storageNamePrefix());e&&this.initializeAutomaticSessionWithData(e)}this.automaticSession.id||this.renew()},tp.prototype.initializeAutomaticSessionWithData=function(t){var e=t.split("|");0<e.length&&(this.automaticSession.id=e[0]);try{if(1<e.length){var i=+e[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<e.length){var r=+e[2];this.automaticSession.renewalDate=+new Date(r),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(t){this._logger.throwInternal(il.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+bl.getExceptionName(t),{exception:bl.dump(t)})}0==this.automaticSession.renewalDate&&this._logger.throwInternal(il.WARNING,27,"AI session renewal date is 0, session will be reset.")},tp.prototype.renew=function(){var t=Al.Now();this.automaticSession.id=bl.newId(),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),bl.canUseLocalStorage()||this._logger.throwInternal(il.WARNING,0,"Browser does not support local storage. Session durations will be inaccurate.")},tp.prototype.setCookie=function(t,e,i){var r=e+this.config.sessionExpirationMs(),n=i+this.config.sessionRenewalMs(),o=new Date,a=[t,e,i];r<n?o.setTime(r):o.setTime(n);var s=this.config.cookieDomain?this.config.cookieDomain():null;bl.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+o.toUTCString(),s),this.cookieUpdatedTimestamp=Al.Now()},tp.prototype.setStorage=function(t,e,i){bl.setStorage(this._logger,this._storageNamePrefix(),[t,e,i].join("|"))},tp.acquisitionSpan=864e5,tp.renewalSpan=18e5,tp.cookieUpdateInterval=6e4,tp.cookieNameConst="ai_session",tp);function tp(t,e){var i=this;tl.isNullOrUndefined(e)?this._logger=new pl:this._logger=e,"function"!=typeof(t=t||{}).sessionExpirationMs&&(t.sessionExpirationMs=function(){return tp.acquisitionSpan}),"function"!=typeof t.sessionRenewalMs&&(t.sessionRenewalMs=function(){return tp.renewalSpan}),this.config=t,this._storageNamePrefix=function(){return i.config.namePrefix&&i.c
2onfig.namePrefix()?tp.cookieNameConst+i.config.namePrefix():tp.cookieNameConst},this.automaticSession=new Qc}var ep=function(){},ip=function(){this.id="browser",this.deviceClass="Browser"},rp=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.2.2"},np=(op.prototype.setAuthenticatedUserContext=function(t,e,i){if(void 0===i&&(i=!1),!this.validateUserInput(t)||e&&!this.validateUserInput(e))this._logger.throwInternal(il.WARNING,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=t;var r=this.authenticatedId;e&&(this.accountId=e,r=[this.authenticatedId,this.accountId].join(op.cookieSeparator)),i&&bl.setCookie(this._logger,op.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},op.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,bl.deleteCookie(this._logger,op.authUserCookieName)},op.prototype.validateUserInput=function(t){return!("string"!=typeof t||!t||t.match(/,|;|=| |\|/))},op.cookieSeparator="|",op.userCookieName="ai_user",op.authUserCookieName="ai_authUser",op);function op(t,e){this._logger=e;var i=bl.getCookie(this._logger,op.userCookieName);if(i){var r=i.split(op.cookieSeparator);0<r.length&&(this.id=r[0])}if(this.config=t,!this.id){this.id=bl.newId();var n=new Date,o=bl.toISOStringForIE8(n);this.accountAcquisitionDate=o,n.setTime(n.getTime()+31536e6);var a=[this.id,o],s=this.config.cookieDomain?this.config.cookieDomain():void 0;bl.setCookie(this._logger,op.userCookieName,a.join(op.cookieSeparator)+";expires="+n.toUTCString(),s);var l=t.namePrefix&&t.namePrefix()?t.namePrefix()+"ai_session":"ai_session";bl.removeStorage(this._logger,l)}this.accountId=t.accountId?t.accountId():void 0;var u=bl.getCookie(this._logger,op.authUserCookieName);if(u){var c=(u=decodeURI(u)).split(op.cookieSeparator);c[0]&&(this.authenticatedId=c[0]),1<c.length&&c[1]&&(this.accountId=c[1])}}var ap=function(){},sp=function(t,e,i){this.traceID=t||bl.generateW3CId(),this.parentID=e,this.name=i,window&&window.location&&window.location.pathname&&(this.name=window.location.pathname)},lp=(up.prototype.applySessionContext=function(t){var e=this.session||this.sessionManager.automaticSession;e&&"string"==typeof e.id&&(t.ext.app.sesId=e.id),this.session&&("string"==typeof this.session.id?t.ext.app.sesId=this.session.id:t.ext.app.sesId=this.sessionManager.automaticSession.id)},up.prototype.applyOperatingSystemContxt=function(t){this.os&&this.os.name&&(t.ext.os=this.os)},up.prototype.applyApplicationContext=function(t){this.application&&("string"==typeof this.application.ver&&(t.tags[Qu.applicationVersion]=this.application.ver),"string"==typeof this.application.build&&(t.tags[Qu.applicationBuild]=this.application.build))},up.prototype.applyDeviceContext=function(t){this.device&&("string"==typeof this.device.id&&(t.ext.device.localId=this.device.id),"string"==typeof this.device.ip&&(t.ext.device.ip=this.device.ip),"string"==typeof this.device.model&&(t.ext.device.model=this.device.model),"string"==typeof this.device.deviceClass&&(t.ext.device.deviceClass=this.device.deviceClass))},up.prototype.applyInternalContext=function(t){this.internal&&("string"==typeof this.internal.agentVersion&&(t.tags[Qu.internalAgentVersion]=this.internal.agentVersion),"string"==typeof this.internal.sdkVersion&&(t.tags[Qu.internalSdkVersion]=this.internal.sdkVersion))},up.prototype.applyLocationContext=function(t){this.location&&"string"==typeof this.location.ip&&(t.tags[Qu.locationIp]=this.location.ip)},up.prototype.applyOperationContext=function(t){if(this.telemetryTrace){var e=t.ext.trace||{traceID:void 0,parentID:void 0};"string"==typeof this.telemetryTrace.traceID&&(e.traceID=this.telemetryTrace.traceID),"string"==typeof this.telemetryTrace.name&&(e.name=this.telemetryTrace.name),"string"==typeof this.telemetryTrace.parentID&&(e.parentID=this.telemetryTrace.parentID),t.ext.trace=e}},up.prototype.applyWebContext=function(t){this.web&&(t.ext.web=t.ext.web||{}
2,t.ext.web=this.web)},up.prototype.applyUserContext=function(t){this.user&&(t.tags||(t.tags=[]),"string"==typeof this.user.accountId&&(t.tags[Qu.userAccountId]=this.user.accountId),"string"==typeof this.user.id&&(t.ext.user.id=this.user.id),"string"==typeof this.user.authenticatedId&&(t.ext.user.authId=this.user.authenticatedId))},up.prototype.cleanUp=function(t){t.ext[Xu.DeviceExt]&&0===Object.keys(t.ext[Xu.DeviceExt]).length&&delete t.ext[Xu.DeviceExt],t.ext[Xu.UserExt]&&0===Object.keys(t.ext[Xu.UserExt]).length&&delete t.ext[Xu.UserExt],t.ext[Xu.WebExt]&&0===Object.keys(t.ext[Xu.WebExt]).length&&delete t.ext[Xu.WebExt],t.ext[Xu.OSExt]&&0===Object.keys(t.ext[Xu.OSExt]).length&&delete t.ext[Xu.OSExt],t.ext[Xu.AppExt]&&0===Object.keys(t.ext[Xu.AppExt]).length&&delete t.ext[Xu.AppExt],t.ext[Xu.TraceExt]&&0===Object.keys(t.ext[Xu.TraceExt]).length&&delete t.ext[Xu.TraceExt]},up);function up(t,e){"undefined"!=typeof window&&(this.sessionManager=new $c(e,t),this.application=new ep,this.device=new ip,this.internal=new rp(e),this.location=new ap,this.user=new np(e,t),this.telemetryTrace=new sp,this.session=new Qc),this.appId=function(){return null}}var cp=(pp.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){}}},pp.prototype.initialize=function(t,e,i){var r=this,n=pp.getDefaultConfig();function o(e){a._extensionConfig[e]=function(){return Zu.getConfig(t,e,r.identifier,n[e]())}}this._extensionConfig=this._extensionConfig||pp.getDefaultConfig();var a=this;for(var s in n)o(s);this._logger=e.logger,this.context=new lp(e.logger,this._extensionConfig),this._breezeChannel=bl.getExtension(i,tc),this.context.appId=function(){return r._breezeChannel?r._breezeChannel._appId:null}},pp.prototype.processTelemetry=function(t){tl.isNullOrUndefined(t)||(t.name===xu.envelopeType&&this._logger.resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t),tl.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t))},pp.prototype.setNextPlugin=function(t){this._nextPlugin=t},pp.prototype._processTelemetryInternal=function(t){t.tags||(t.tags=[]),t.ext||(t.ext={}),t.ext[Xu.DeviceExt]=t.ext[Xu.DeviceExt]||{},t.ext[Xu.WebExt]=t.ext[Xu.WebExt]||{},t.ext[Xu.UserExt]=t.ext[Xu.UserExt]||{},t.ext[Xu.OSExt]=t.ext[Xu.OSExt]||{},t.ext[Xu.AppExt]=t.ext[Xu.AppExt]||{},t.ext[Xu.TraceExt]=t.ext[Xu.TraceExt]||{},this.context.applySessionContext(t),this.context.applyApplicationContext(t),this.context.applyDeviceContext(t),this.context.applyOperationContext(t),this.context.applyUserContext(t),this.context.applyOperatingSystemContxt(t),this.context.applyWebContext(t),this.context.applyLocationContext(t),this.context.applyInternalContext(t),this.context.cleanUp(t)},pp);function pp(){this.priority=110,this.identifier=$u}var hp=function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1},dp=(fp.prototype.getAbsoluteUrl=function(){return this.requestUrl?Sl.getAbsoluteUrl(this.requestUrl):null},fp.prototype.getPathName=function(){return this.requestUrl?_l.sanitizeUrl(this._logger,Sl.getCompleteUrl(this.method,this.requestUrl)):null},fp);function fp(t,e,i){this.completed=!1,this.requestHeadersSize=null,this.requestHeaders=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new hp,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*Al.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.traceID=t,this.spanID=e,this._logger=i}
2var mp=(gp.AttachEvent=function(t,e,i){var r=!1;return tl.isNullOrUndefined(t)||(tl.isNullOrUndefined(t.attachEvent)?tl.isNullOrUndefined(t.addEventListener)||(t.addEventListener(e,i,!1),r=!0):(t.attachEvent("on"+e,i),r=!0)),r},gp.DetachEvent=function(t,e,i){tl.isNullOrUndefined(t)||(tl.isNullOrUndefined(t.detachEvent)?tl.isNullOrUndefined(t.removeEventListener)||t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i))},gp);function gp(){}var yp=(vp.isValidTraceId=function(t){return t.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==t},vp.isValidSpanId=function(t){return t.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==t},vp.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},vp.DEFAULT_TRACE_FLAG="00",vp.DEFAULT_VERSION="00",vp);function vp(t,e){this.traceFlag=vp.DEFAULT_TRACE_FLAG,this.version=vp.DEFAULT_VERSION,t&&vp.isValidTraceId(t)?this.traceId=t:this.traceId=bl.generateW3CId(),e&&vp.isValidSpanId(e)?this.spanId=e:this.spanId=bl.generateW3CId().substr(0,16)}var _p=(xp.prototype.isMonitoredInstance=function(t,e,i,r){var n=!1,o=!0,a=!1;return void 0!==i?(a=this._fetchInitialized,n="object"==typeof i&&!0===i[Pl]||!!r&&!0===r[Pl]):void 0!==t&&(a=this.initialized,n=!0===t[Pl],o=!0===e||!tl.isNullOrUndefined(t.ajaxData)),a&&o&&!n},xp.prototype.supportsAjaxMonitoring=function(){var t=!0;(tl.isNullOrUndefined(XMLHttpRequest)||tl.isNullOrUndefined(XMLHttpRequest.prototype)||tl.isNullOrUndefined(XMLHttpRequest.prototype.open)||tl.isNullOrUndefined(XMLHttpRequest.prototype.send)||tl.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(t=!1);try{" a ".trim()}catch(e){t=!1}return t},xp.prototype.instrumentOpen=function(){var t=XMLHttpRequest.prototype.open,e=this;XMLHttpRequest.prototype.open=function(i,r,n){try{!e.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||e.openHandler(this,i,r,n)}catch(i){e._core.logger.throwInternal(il.CRITICAL,15,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(this),exception:bl.dump(i)})}return t.apply(this,arguments)}},xp.prototype.openHandler=function(t,e,i,r){var n=this._context&&this._context.telemetryTrace&&this._context.telemetryTrace.traceID||bl.generateW3CId(),o=bl.generateW3CId().substr(0,16),a=new dp(n,o,this._core.logger);a.method=e,a.requestUrl=i,a.xhrMonitoringState.openDone=!0,a.requestHeaders={},t.ajaxData=a,this.attachToOnReadyStateChange(t)},xp.getFailedAjaxDiagnosticsMessage=function(t){var e="";try{tl.isNullOrUndefined(t)||tl.isNullOrUndefined(t.ajaxData)||tl.isNullOrUndefined(t.ajaxData.requestUrl)||(e+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return e},xp.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,e=this;XMLHttpRequest.prototype.send=function(i){try{e.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&e.sendHandler(this,i)}catch(i){e._core.logger.throwInternal(il.CRITICAL,17,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(this),exception:bl.dump(i)})}return t.apply(this,arguments)}},xp.prototype.sendHandler=function(t,e){t.ajaxData.requestSentTime=Al.Now(),(t=this.includeCorrelationHeaders(t.ajaxData,void 0,void 0,t)).ajaxData.xhrMonitoringState.sendDone=!0},xp.prototype.instrumentAbort=function(){var t=XMLHttpRequest.prototype.abort,e=this;XMLHttpRequest.prototype.abort=function(){try{e.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(t){e._core.logger.throwInternal(il.CRITICAL,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(this),exception:bl.dump(t)})}return t.apply(this,arguments)}},xp.prototype.instrumentSetRequestHeader=function(){if(this._config.enableRequestHeaderTracking){var t=XMLHttpRequest.prototype.setRequestHeader,e=this;XMLHttpRequest.prototype.setRequestHeader=function(i,r){try{e.isMonitoredInstance(this)&&(this.ajaxData.requestHeaders[i]=r)}catch(i){e._core.logger.throwInternal(il.CRITICAL,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(this),exception:bl.dump(i)})}return t.apply(this,arguments)}}},xp.prototype.attachToOnReadyStateChange=function(t){var e=this;t.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=mp.AttachEvent(t,"readystatechange",(function(){try{e.isMonitoredInstance(t)&&4===t.readyState&&e.onAjaxComplete(t)}catch(r){var i=bl.dump(r);i&&-1!=i.toLowerCase().indexOf("c00c023f")||e._core.logger.throwInternal(il.CRITICAL,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(t),exception:bl.dump(r)})}}))},xp.prototype.onAjaxComplete=function(t){if(t.ajaxData.responseFinishedTime=Al.Now(),t.ajaxData.status=t.status,t.ajaxData.CalculateMetrics(),t.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(il.WARNING,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(t),requestSentTime:t.ajaxData.requestSentTime,responseFinishedTime:t.ajaxData.responseFinishedTime});else{var e={id:"|"+t.ajaxData.traceID+"."+t.ajaxData.spanID,target:t.ajaxData.getAbsoluteUrl(),name:t.ajaxData.getPathName(),type:"Ajax",duration:t.ajaxData.ajaxTotalDuration,success:200<=+t.ajaxData.status&&+t.ajaxData.status<400,responseCode:+t.ajaxData.status,method:t.ajaxData.method},i=this.getAjaxCorrelationContext(t);if(i&&(e.correlationContext=i),this._config.enableRequestHeaderTracking&&0<Object.keys(t.ajaxData.requestHeaders).length&&(e.properties=e.properties||{},e.properties.requestHeaders={},e.properties.requestHeaders=t.ajaxData.requestHeaders),this._config.enableResponseHeaderTracking){var r=t.getAllResponseHeaders();if(r){var n=r.trim().split(/[\r\n]+/),o={};
2n.forEach((function(t){var e=t.split(": "),i=e.shift(),r=e.join(": ");o[i]=r})),0<Object.keys(o).length&&(e.properties=e.properties||{},e.properties.responseHeaders={},e.properties.responseHeaders=o)}}this.trackDependencyDataInternal(e),t.ajaxData=null}},xp.prototype.getAjaxCorrelationContext=function(t){try{var e=t.getAllResponseHeaders();if(null!==e&&-1!==e.toLowerCase().indexOf(yl.requestContextHeaderLowerCase)){var i=t.getResponseHeader(yl.requestContextHeader);return Cl.getCorrelationContext(i)}}catch(e){this._core.logger.throwInternal(il.WARNING,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:xp.getFailedAjaxDiagnosticsMessage(t),exception:bl.dump(e)})}},xp.prototype.trackDependencyDataInternal=function(t,e,i){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var r=Yu.create(t,Iu.dataType,Iu.envelopeType,this._core.logger,e,i);this._core.track(r)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(il.CRITICAL,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++this._trackAjaxAttempts},xp.prototype.trackDependencyData=function(t,e){this.trackDependencyDataInternal(t,e)},xp.prototype.processTelemetry=function(t){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(t)},xp.prototype.setNextPlugin=function(t){t&&(this._nextPlugin=t)},xp.prototype.instrumentFetch=function(){if(this.supportsFetch()&&!this._fetchInitialized){var t=window.fetch,e=this;window.fetch=function(i,r){var n;if(e.isFetchInstrumented(i)&&e.isMonitoredInstance(void 0,void 0,i,r))try{n=e.createFetchRecord(i,r),r=e.includeCorrelationHeaders(n,i,r)}catch(r){e._core.logger.throwInternal(il.CRITICAL,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(i),exception:bl.dump(r)})}return t(i,r).then((function(t){return e.onFetchComplete(t,n),t})).catch((function(t){throw e.onFetchFailed(i,n,t),t}))},this._fetchInitialized=!0}},xp.prototype.isFetchInstrumented=function(t){return this._fetchInitialized&&!0!==t[Pl]},xp.prototype.supportsFetch=function(){var t=!0;return(!window||tl.isNullOrUndefined(window.Request)||tl.isNullOrUndefined(window.Request.prototype)||tl.isNullOrUndefined(window.fetch))&&(t=!1),t},xp.prototype.createFetchRecord=function(t,e){var i=this._context&&this._context.telemetryTrace&&this._context.telemetryTrace.traceID||bl.generateW3CId(),r=bl.generateW3CId().substr(0,16),n=new dp(i,r,this._core.logger);return n.requestSentTime=Al.Now(),t instanceof Request?n.requestUrl=t?t.url:"":n.requestUrl=t,e&&e.method?n.method=e.method:t&&t instanceof Request?n.method=t.method:n.method="GET",e&&e.headers&&this._config.enableRequestHeaderTracking?n.requestHeaders=e.headers:n.requestHeaders={},n},xp.prototype.includeCorrelationHeaders=function(t,e,i,r){if(e){if(Cl.canIncludeCorrelationHeader(this._config,t.getAbsoluteUrl(),this.currentWindowHost)){if((i=i||{}).headers=new Headers(i.headers||e instanceof Request&&e.headers||{}),this._isUsingAIHeaders){var n="|"+t.traceID+"."+t.spanID;i.headers.set(yl.requestIdHeader,n),this._config.enableRequestHeaderTracking&&(t.requestHeaders[yl.requestIdHeader]=n)}var o=this._config.appId||this._context.appId();if(o&&(i.headers.set(yl.requestContextHeader,yl.requestContextAppIdFormat+o),this._config.enableRequestHeaderTracking&&(t.requestHeaders[yl.requestContextHeader]=yl.requestContextAppIdFormat+o)),this._isUsingW3CHeaders){var a=new yp(t.traceID,t.spanID);i.headers.set(yl.traceParentHeader,a.toString()),this._config.enableRequestHeaderTracking&&(t.requestHeaders[yl.traceParentHeader]=a.toString())}return i}return i}if(r){if(this.currentWindowHost&&Cl.canIncludeCorrelationHeader(this._config,r.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){this._isUsingAIHeaders&&(n="|"+r.ajaxData.traceID+"."+r.ajaxData.spanID,r.setRequestHeader(yl.requestIdHeader,n),this._config.enableRequestHeaderTracking&&(r.ajaxData.requestHeaders[yl.requestIdHeader]=n));var s=this._config.appId||this._context.appId();s&&(r.setRequestHeader(yl.requestContextHeader,yl.requestContextAppIdFormat+s),this._config.enableRequestHeaderTracking&&(r.ajaxData.requestHeaders[yl.requestContextHeader]=yl.requestContextAppIdFormat+s)),this._isUsingW3CHeaders&&(a=new yp(r.ajaxData.traceID,r.ajaxData.spanID),r.setRequestHeader(yl.traceParentHeader,a.toString()),this._config.enableRequestHeaderTracking&&(r.ajaxData.requestHeaders[yl.traceParentHeader]=a.toString()))}return r}},xp.prototype.getFailedFetchDiagnosticsMessage=function(t){var e="";try{tl.isNullOrUndefined(t)||(e+="string"==typeof t?"(url: '"+t+"')":"(url: '"+t.url+"')")}catch(t){this._core.logger.throwInternal(il.CRITICAL,15,"Failed to grab failed fetch diagnostics message",{exception:bl.dump(t)})}return e},xp.prototype.onFetchComplete=function(t,e){if(e)try{if(e.responseFinishedTime=Al.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(il.WARNING,14,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var i={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:"Fetch",duration:e.ajaxTotalDuration,success:200<=t.status&&t.status<400,responseCode:t.status,properties:{HttpMethod:e.method}},r=this.getFetchCorrelationContext(t);if(r&&(i.correlationContext=r),this._config.enableRequestHeaderTracking&&0<Object.keys(e.requestHeaders).length&&(i.properties=i.properties||{},i.properties.requestHeaders=e.requestHeaders),this._config.enableResponseHeaderTracking){var n={};
2t.headers.forEach((function(t,e){n[e]=t})),0<Object.keys(n).length&&(i.properties=i.properties||{},i.properties.responseHeaders=n)}this.trackDependencyDataInternal(i)}}catch(e){this._core.logger.throwInternal(il.WARNING,18,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:bl.dump(e)})}},xp.prototype.onFetchFailed=function(t,e,i){if(e)try{if(e.responseFinishedTime=Al.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(il.WARNING,14,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var r={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:"Fetch",duration:e.ajaxTotalDuration,success:!1,responseCode:0,properties:{HttpMethod:e.method}};this.trackDependencyDataInternal(r,{error:i.message})}}catch(e){this._core.logger.throwInternal(il.WARNING,18,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:bl.dump(e)})}},xp.prototype.getFetchCorrelationContext=function(t){try{var e=t.headers.get(yl.requestContextHeader);return Cl.getCorrelationContext(e)}catch(e){this._core.logger.throwInternal(il.WARNING,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:bl.dump(e)})}},xp.prototype.instrumentXhr=function(){this.supportsAjaxMonitoring()&&!this.initialized&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.instrumentSetRequestHeader(),this.initialized=!0)},xp.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:Ks.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1}},xp.getEmptyConfig=function(){return{maxAjaxCallsPerView:void 0,disableAjaxTracking:void 0,disableFetchTracking:void 0,disableCorrelationHeaders:void 0,distributedTracingMode:void 0,correlationHeaderExcludedDomains:void 0,appId:void 0,enableCorsCorrelation:void 0,correlationHeaderDomains:void 0,enableRequestHeaderTracking:void 0,enableResponseHeaderTracking:void 0}},xp.prototype.initialize=function(t,e,i){if(!this.initialized&&!this._fetchInitialized){this._core=e;var r=xp.getDefaultConfig();for(var n in this._config=xp.getEmptyConfig(),r)this._config[n]=Zu.getConfig(t,n,xp.identifier,r[n]);if(this._isUsingAIHeaders=this._config.distributedTracingMode===Ks.AI||this._config.distributedTracingMode===Ks.AI_AND_W3C,this._isUsingW3CHeaders=this._config.distributedTracingMode===Ks.AI_AND_W3C||this._config.distributedTracingMode===Ks.W3C,!1===this._config.disableAjaxTracking&&this.instrumentXhr(),!1===this._config.disableFetchTracking&&this.instrumentFetch(),0<i.length&&i){for(var o=void 0,a=0;!o&&a<i.length;)i[a]&&i[a].identifier===$u&&(o=i[a]),a++;o&&(this._context=o.context)}}},xp.identifier="AjaxDependencyPlugin",xp);function xp(){this._trackAjaxAttempts=0,this.identifier=xp.identifier,this.priority=120,this.currentWindowHost=window&&window.location&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1,this._fetchInitialized=!1}var bp=(wp.prototype.trackEvent=function(t,e){this.appInsights.trackEvent(t,e)},wp.prototype.trackPageView=function(t){var e=t||{};this.appInsights.trackPageView(e)},wp.prototype.trackPageViewPerformance=function(t){var e=t||{};this.appInsights.trackPageViewPerformance(e)},wp.prototype.trackException=function(t){!t.exception&&t.error&&(t.exception=t.error),this.appInsights.trackException(t)}
2,wp.prototype._onerror=function(t){this.appInsights._onerror(t)},wp.prototype.trackTrace=function(t,e){this.appInsights.trackTrace(t,e)},wp.prototype.trackMetric=function(t,e){this.appInsights.trackMetric(t,e)},wp.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},wp.prototype.stopTrackPage=function(t,e,i,r){this.appInsights.stopTrackPage(t,e,i,r)},wp.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},wp.prototype.stopTrackEvent=function(t,e,i){this.appInsights.stopTrackEvent(t,e,i)},wp.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},wp.prototype.setAuthenticatedUserContext=function(t,e,i){void 0===i&&(i=!1),this.properties.context.user.setAuthenticatedUserContext(t,e,i)},wp.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},wp.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},wp.prototype.flush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach((function(e){e.forEach((function(e){e.flush(t)}))}))},wp.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach((function(e){e.forEach((function(e){e.onunloadFlush?e.onunloadFlush():e.flush(t)}))}))},wp.prototype.loadAppInsights=function(t){if(void 0===t&&(t=!1),t&&this.config.extensions&&0<this.config.extensions.length)throw new Error("Extensions not allowed in legacy mode");var e=[],i=new Xc;return e.push(i),e.push(this.properties),e.push(this.dependencies),e.push(this.appInsights),this.core.initialize(this.config,e),this.emptyQueue(),this.pollInternalLogs(),this.addHousekeepingBeforeUnload(this),this.context=this.properties.context,this},wp.prototype.updateSnippetDefinitions=function(t){for(var e in this)"string"==typeof e&&(t[e]=this[e])},wp.prototype.emptyQueue=function(){try{if(bl.isArray(this.snippet.queue)){for(var t=this.snippet.queue.length,e=0;e<t;e++)(0,this.snippet.queue[e])();this.snippet.queue=void 0,delete this.snippet.queue}}catch(t){t&&"function"==typeof t.toString&&t.toString()}},wp.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},wp.prototype.addHousekeepingBeforeUnload=function(t){!t.appInsights.config.disableFlushOnBeforeUnload&&"onbeforeunload"in window&&(bl.addEventHandler("beforeunload",(function(){t.onunloadFlush(!1);var e=t.appInsights.core._extensions[$u];e&&e.context&&e.context._sessionManager&&e.context._sessionManager.backup()}))||t.appInsights.core.logger.throwInternal(il.CRITICAL,19,"Could not add handler for beforeunload"))},wp.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4},wp);function wp(t){t.queue=t.queue||[],t.version=t.version||2;var e=t.config||{};e&&!e.instrumentationKey&&(e=t,uc.Version="2.2.2"),this.appInsights=new uc,this.properties=new cp,this.dependencies=new _p,this.core=new ml,this.snippet=t,this.config=e,this.getSKUDefaults()}var Sp=(Tp.prototype.trackEvent=function(t,e){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.trackEvent(t,e)},Tp.prototype.setAuthenticatedUserContext=function(t,e){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.setAuthenticatedUserContext(t,e)},Tp.prototype.trackException=function(t){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.trackException(t)},Tp.prototype.flush=function(t){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.flush(t)},Tp);function Tp(t){this.options=t,!this.options.disableTelemetry&&u&&(this.appInsights=new bp({config:{instrumentationKey:u,disableExceptionTracking:!0,disableAjaxTracking:!0,isCookieUseDisabled:!0,maxBatchInterval:5e3}}),this.appInsights.loadAppInsights(),this.appInsights.addTelemetryInitializer((function(t){t.tags[Qu.applicationVersion]=I.getFullVersion()})))}var Cp=(Ip.prototype.onAdd=function(t){return this.container=document.createElement("div"),this.container.className="azure-map-logo",this.container},Ip.prototype.onRemove=function(){this.container.remove()},Ip);function Ip(){}var Ep,Mp=(d(Ap,Ep=y),Ap);function Ap(){var t=null!==Ep&&Ep.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.showFeedbackLink=!0,t}var Lp,kp=(d(Pp,Lp=z),Pp.prototype.onAdd=function(e){return this.container=this.buildContainer(e,t.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.container.appendChild(this.copyrightDiv),this.options.showFeedbackLink&&(this.feedbackLink=this.buildFeedbackLink(),this.container.appendChild(this.feedbackLink)),this.container},Pp.prototype.onRemove=function(){Lp.prototype.onRemove.call(this),delete this.container},Pp.prototype.setOptions=function(t){var e=(new Mp).merge(this.options,t);e.copyrightMessage!==this.options.copyrightMessage&&(this.copyrightDiv.innerText=e.copyrightMessage),!e.showFeedbackLink&&this.feedbackLink?(this.feedbackLink.remove(),delete this.feedbackLink):e.showFeedbackLink&&!this.feedbackLink&&(this.feedbackLink=this.buildFeedbackLink(),this.container.appendChild(this.feedbackLink)),this.options=e},Pp.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.options.copyrightMessage||"",t},Pp.prototype.buildFeedbackLink=function(){var t=document.createElement("a");return t.textContent="Improve this map",t.href="https://feedback.azuremaps.com",t.target="_blank",t.rel="noopener",t},Pp);function Pp(t){var e=Lp.call(this)||this;return e.options=(new Mp).merge(t),e}var Dp=(zp.throwOnError=function(t,e){var i=t instanceof Od?t._getMap():t,r=function(t){throw i.off("error",r),t.error};i.on("error",r);var n=e();return i.off("error",r),n}
2,zp.tryCatch=function(t,e,i,r){try{return this.throwOnError(t,e)}catch(t){return i(t)}finally{"function"==typeof r&&r()}},zp.tryFinally=function(t,e,i){try{return this.throwOnError(t,e)}finally{i()}},zp);function zp(){}var Op=(Np.prototype.request=function(t){var e={domain:this.map.getServiceOptions().domain,path:"search/address/reverse/json",queryParams:f({"api-version":"1.0",language:t.style.language,limit:1,query:Wr(t.position[1])+","+Yr(t.position[0])},t.style.view&&{view:t.style.view})};return new w(this.map.authentication.signRequest(e)).get()},Np);function Np(t){this.map=t}var Rp=(Bp.prototype.cache=function(t,e,i,r){var n=t+"_"+i[0]+"_"+i[1]+"_"+r;this._labelIdx[e.labelType]||(this._labelIdx[e.labelType]=[],this._labelCache[e.labelType]=[]),-1===this._labelIdx[e.labelType].indexOf(n)&&(this._labelCache[e.labelType].push({name:t,radius:e.radius,minZoom:e.minZoom,maxZoom:e.maxZoom||24,position:i}),this._labelIdx[e.labelType].push(n))},Bp.prototype.getNearestLabel=function(t,e,i){var r=null,n=this._labelCache[t];if(n)for(var o=1/0,a=0,s=n.length;a<s;a++)if(i>=n[a].minZoom&&i<=n[a].maxZoom){var l=Ur(n[a].position,e);l<=n[a].radius&&l<=o&&(o=l,r=n[a])}return r},Bp.prototype._preloadCache=function(t){if(!this._preloadedCache.has(t)){this._preloadedCache.add(t);var e={source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},i=t,r=i.indexOf("-");switch(-1!==r&&(i=i.substr(0,r)),i){case"fr":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océan Atlantique",e,[-40,32],t),this.cache("Océan Atlantique",e,[-17,-29],t);break;case"es":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océano Atlántico",e,[-40,32],t),this.cache("Océano Atlántico",e,[-17,-29],t);break;case"pt":this.cache("Oceano PacÃfico",e,[-170,32],t),this.cache("Oceano PacÃfico",e,[-138,-27],t),this.cache("Oceano Atlântico",e,[-40,32],t),this.cache("Oceano Atlântico",e,[-17,-29],t);break;case"ja":this.cache("太平æ´",e,[-170,32],t),this.cache("太平æ´",e,[-138,-27],t);break;case"en":this.cache("Pacific Ocean",e,[-170,32],t),this.cache("Pacific Ocean",e,[-138,-27],t),this.cache("Atlantic Ocean",e,[-40,32],t),this.cache("Atlantic Ocean",e,[-17,-29],t),this.cache("Indian Ocean",e,[77,-26],t)}}},Bp);function Bp(){this._labelCache={},this._labelIdx={},this._preloadedCache=new Set}var jp=(Fp.prototype.dispose=function(){this._disposed=!0,this._map._getMap().off("move",this._onMove),this._map._getMap().off("moveend",this._onMoveEnd),this._map._getMap().off("styledata",this._onStyleData),this._map._getMap().off("rotate",this._onRotate),this._map.getCanvas().removeEventListener("mousedown",this._onPointerDown),this._map.getCanvas().removeEventListener("touchstart",this._onPointerDown),this._map.getMapContainer().removeEventListener("keydown",this._shortcutListener)},Fp.prototype._getEventPos=function(t){if("touches"in t){var e=t.touches[0],i=t.target.getBoundingClientRect();return[e.pageX-i.left,e.pageY-i.top]}return[t.offsetX,t.offsetY]},Fp.prototype._checkThresholds=function(t,e){return this._checkZoomThreshold(t.zoom,e.zoom)||this._checkPitchThreshold(t.pitch,e.pitch)||this._checkLocThreshold(t.center,e.center)||this._checkHeadingThreshold(t.bearing,e.bearing)},Fp.prototype._checkZoomThreshold=function(t,e){return this._round(t)!==this._round(e)},Fp.prototype._checkPitchThreshold=function(t,e){return Math.abs(t-e)>=this._pitchThreshold},Fp.prototype._checkLocThreshold=function(t,e){var i=this._map.positionsToPixels([e,t]),r=i[0],n=i[1];return ar.getDistance(r,n)>=this._moveThreshold},Fp.prototype._checkHeadingThreshold=function(t,e){t<0&&(t+=360),e<0&&(e+=360);var i=Math.abs(t-e);return 180<i&&(i=360-i),i>=this._headingThreshold},Fp.prototype._getLocDesc=function(t,e,i){return m(this,void 0,void 0,(function(){var r,n,o,a,s,l,u,c,p,h=this;return g(this,(function(d){switch(d.label){case 0:return"blank"===i?[3,3]:this._map._getMap().loaded()?[3,2]:[4,new Promise((function(t){return h._map._getMap().once("idle",t)}))];case 1:d.sent(),d.label=2;case 2:for(r={},n=this._map.positionsToPixels([t.center])[0],Dp.tryCatch(this._map,(function(){o=h._map._getMap().queryRenderedFeatures(n,{layers:h._polygonStyleLayer,filter:["==",["geometry-type"],"Polygon"]})}),(function(){})),a=null,o&&0<o.length&&(a=o[0]),s=null,l=0,u=this._lableConfig.length;l<u;l++)c=this._lableConfig[l],t.zoom>=c.minZoom?c.polygonSources?a&&-1!==c.polygonSources.indexOf(a.layer["source-layer"])?(s=c.labelType,this._getClosestLabel(c,t,e,r,!1)):this._getClosestLabel(c,t,e,r,!0):this._getClosestLabel(c,t,e,r,!1):this._getClosestLabel(c,t,e,r,!0);return 8<=t.zoom&&this._processRoads(r,t,e),this._labelCache.forEach((function(e){r[e]||(p=null,("water"!==e&&"majorPoi"!==e||e===s)&&(p=Fp._labelCache.getNearestLabel(e,t.center,t.zoom)),p&&(r[e]=p.name))})),[2,this._processLocInfo(t,s,r,!0,this._restFallback)];case 3:return[2,this._processLocInfo(t,null,null,!1,!1)]}}))}))},Fp.prototype._getHeadingDesc=function(t){var e=t.bearing;switch(e<0&&(e+=360),e=this._round(e,this._headingThreshold)){case 0:case 360:return"north";case 45:return"north east";case 90:return"east";case 135:return"south east";case 180:return"south";case 225:return"south west";case 270:return"west";case 315:return"north west";default:return e+" degrees"}}
2,Fp.prototype._getClosestLabel=function(t,e,i,r,n){for(var o=t.radius,a=0,s=t.source.length;a<s;a++){var l={sourceLayer:t.source[a]},u=this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId,l),c=null,p=1/0,h=this._labelCache.has(t.labelType);if(!n||n&&h)for(var d=0,f=u.length;d<f;d++){var m="Point"===u[d].geometry.type?u[d]:cn(e.center,u[d].geometry);if(!n){var g="Point"===u[d].geometry.type?Ur(e.center,m.geometry.coordinates):m.properties.distance;g<p&&(p=g,c=u[d])}h&&Fp._labelCache.cache(u[d].properties.name,t,m.geometry.coordinates,i)}if(!n){var y=t.labelType+"Dis";c&&p<=o&&("number"!=typeof r[y]||p<=r[y])&&(r[t.labelType]=c.properties.name,r[y]=p)}}},Fp.prototype._processRoads=function(t,e,i,r){var n=this._map._getMap().queryRenderedFeatures(r,{filter:["==",["geometry-type"],"LineString"]});if(n){for(var o=void 0,a=void 0,s=void 0,l=void 0,u=0,c=n.length;u<c;u++)if(this._roadLayers.has(n[u].layer["source-layer"])&&n[u].properties.name&&""!==n[u].properties.name){var p=cn(e.center,n[u]);(!s||p.properties.distance<s.properties.distance)&&(o&&n[u].properties.name===o.properties.name?s=p:o&&n[u].properties.name===o.properties.name?(!l||p.properties.distance<l.properties.distance)&&(l=p,a=n[u]):(l=s,a=o,s=p,o=n[u]))}if(o&&(t.country||(t.country=o.properties.country_code,t.countryDis=0,Fp._labelCache.cache(t.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},s.geometry.coordinates,i)),t.state||(t.state=o.properties.country_subdivision,t.stateDis=0,Fp._labelCache.cache(t.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},s.geometry.coordinates,i)),15<=e.zoom)){var h=this._map.positionsToPixels([e.center,s.geometry.coordinates]),d=ar.getDistance(h[0],h[1]);if((d<this._roadPixelRadius||s.properties.distance<this._minRoadDistance)&&(t.road=o.properties.name),a){var f=this._map.positionsToPixels([l.geometry.coordinates]);((d=ar.getDistance(h[0],f[0]))<this._minIntersectionPixelDistance||l.properties.distance<this._minRoadDistance)&&(t.secondRoad=a.properties.name,t.secondRoadDis=l.properties.distance)}}}},Fp.prototype._getActionDesc=function(t){if(this._lastCam){var e=[];if(this._checkLocThreshold(t.center,this._lastCam.center)){var i=["panned"],r=Math.round(qr(this._lastCam.center,t.center));0===r||360===r?i.push("north"):r<90?i.push("north east"):90===r?i.push("east"):r<180?i.push("south east"):180===r?i.push("south"):r<270?i.push("south west"):270===r?i.push("west"):r<360&&i.push("north west");var n=Ur(this._lastCam.center,t.center,hr.meters);i.push(1e3<n?Br(n/1e3,2)+" kilometers":Br(n,2)+" meters"),e.push(i.join(" "))}if(this._checkZoomThreshold(t.zoom,this._lastCam.zoom)){(i=["zoomed"]).push(this._lastCam.zoom<t.zoom?"in":"out");var o=Math.abs(this._lastCam.zoom-t.zoom);1<=o&&(o=Math.ceil(o),i.push(1<o?o+" levels":o+" level")),this._getCanonicalZoom(this._lastCam.zoom)!==this._getCanonicalZoom(t.zoom)&&i.push("to "+this._getCanonicalZoom(t.zoom)+" level"),e.push(i.join(" "))}if(this._checkPitchThreshold(t.pitch,this._lastCam.pitch)){var a=this._round(t.pitch,this._pitchThreshold);if(e.push("pitched to "+a+" degrees"),60===t.pitch||0===t.pitch){var s=60===t.pitch?"maximum":"minimum";e.push("reached "+s+" of "+t.pitch+" degrees")}}return this._checkHeadingThreshold(this._lastCam.bearing,t.bearing)&&e.push("rotated to "+this._getHeadingDesc(t)),e.join(" and ")||null}return null},Fp.prototype._getCanonicalZoom=function(t){return(t=this._round(t))<2?"world":t<5?"country":t<11?"state province":t<15?"city":"street"},Fp.prototype._processLocInfo=function(t,e,i,r,n){var o=this;return new Promise((function(a,s){var l=[];if(r){var u=[];if(i&&(e&&("water"===e&&i.water?u.push(i.water):"majorPoi"===e&&i.majorPoi&&u.push(i.majorPoi)),0===u.length&&(i.majorPoi&&8<=t.zoom?u.push(i.majorPoi):(i.poi&&14<=t.zoom?u.push(i.poi):i.road&&15<=t.zoom&&(i.secondRoad?u.push(i.road+" & "+i.secondRoad):u.push(i.road)),i.neighbourhood&&12<=t.zoom&&u.push(i.neighbourhood),i.city&&6<=t.zoom&&u.push(i.city)),i.state&&4<=t.zoom&&u.push(i.state),0===u.length?i.water?u.push(i.water):i.country&&u.push(i.country):1===u.length&&i.state&&4<=t.zoom&&i.country&&u.push(i.country))),0<u.length)l.push("<p>Location: ",u.join(", "),".</p>");else if(n&&"water"!==e)return void o._reverseGeocodeDescription(t).then((function(t){a(t)}),(function(){s("<p>Location: unknown</p>")}
2))}o._returnDetailedDescriptions&&(l.push("<p>Zoom: ",Br(t.zoom,2),".</p>"),l.push("<p>Latitude: ",Br(t.center[1],5),".</p>"),l.push("<p>Longitude: ",Br(t.center[0],5),".</p>")),a(l.join(""))}))},Fp.prototype._reverseGeocodeDescription=function(t){var e=this;return new Promise((function(i){var r=e._map.getStyle();e._reverseSearch.request({position:t.center,style:r}).then((function(n){var o={};if(n&&n.addresses&&0<n.addresses.length&&n.addresses[0].address){var a=n.addresses[0].address;a.country&&(o.country=a.country,Fp._labelCache.cache(o.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},t.center,r.language)),a.countrySubdivision&&(o.state=a.countrySubdivision,Fp._labelCache.cache(o.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},t.center,r.language)),a.municipality&&(o.city=a.municipality,Fp._labelCache.cache(o.state,{source:["Small city"],labelType:"city",radius:1e3,minZoom:10},t.center,r.language)),a.streetNameAndNumber?o.road=a.streetNameAndNumber:a.street&&(o.road=a.street)}e._processLocInfo(t,null,o,!0,!1).then((function(t){i(t)}))}),(function(r){e._processLocInfo(t,null,null,!0,!1).then((function(t){i(t)}))})).catch((function(r){e._processLocInfo(t,null,null,!0,!1).then((function(t){i(t)}))}))}))},Fp.prototype._round=function(t,e){return void 0===e&&(e=1),Math.round(t/e)*e},Fp);function Fp(t,e){var i=this;this._restFallback=!0,this._disposed=!1,this._lastHeadingTime=0,this._actionQueue=[],this._pointerUpdateDelay=3e3,this._camUpdateDelay=1e3,this._headUpdateLimit=1e3,this._controlEventDelay=500,this._moveThreshold=25,this._headingThreshold=5,this._pitchThreshold=5,this._roadPixelRadius=120,this._minRoadDistance=25,this._minIntersectionPixelDistance=50,this._baseVectorTileSourceId="vectorTiles",this._lableConfig=[{source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},{source:["Sea label"],labelType:"water",minZoom:3,radius:1e6,polygonSources:["Sea","Ocean or sea"]},{source:["Country name"],labelType:"country",minZoom:0,maxZoom:5,radius:3e5},{source:["State name","State name short"],labelType:"state",minZoom:4,maxZoom:7,radius:3e5},{source:["Capital city","Large city"],labelType:"city",minZoom:8,radius:4e4},{source:["Medium city"],labelType:"city",minZoom:8,radius:3e4},{source:["Small city"],labelType:"city",minZoom:8,radius:2e4},{source:["Island label"],labelType:"city",minZoom:8,radius:1e4},{source:["Town"],labelType:"city",minZoom:10,radius:1e4},{source:["Village"],labelType:"neighbourhood",minZoom:12,radius:6e3},{source:["Amusement area label"],labelType:"poi",minZoom:14,radius:2e3,polygonSources:["Amusement park"]},{source:["Hospital label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Hospital"]},{source:["Shopping centre label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Shopping"]},{source:["Stadium label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Stadium"]},{source:["University/School label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["University"]},{source:["Zoo label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Zoo"]},{source:["Airport Label","Airport name","Airport POI"],labelType:"majorPoi",minZoom:11,radius:3e3,polygonSources:["Airport","Runway"]},{source:["National park label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["National or state park","National park","Forest"]},{source:["Reservation label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["Reservation"]}],this._polygonStyleLayer=["National or state park","National park","Reservation","Airport","Runway","Stadium","University","Zoo","Shopping","Hospital","Amusement park","Ocean","Sea","Ocean or sea"],this._labelCache=new Set(["city","state","country","water","majorPoi"]),this._roadLayers=new Set(["Connecting road","Connecting road tunnel","International road","International road tunnel","Local road","Local road tunnel","Major local road","Major local road tunnel","Major road","Major road tunnel","Minor local road","Minor local road tunnel","Motorway","Motorway tunnel","Secondary road","Secondary road tunnel","Toll connecting road","Toll connecting road tunnel","Toll international road","Toll international road tunnel","Toll local road","Toll local road tunnel","Toll major local road","Toll major local road tunnel","Toll major road","Toll major road tunnel","Toll minor local road","Toll minor local road tunnel","Toll motorway","Toll motorway tunnel","Toll secondary road","Toll secondary road tunnel"]),this._returnDetailedDescriptions=!1,this._shortcutListener=function(t){return m(i,void 0,void 0,(function(){var e,i,r,n,o;return g(this,(function(a){switch(a.label){case 0:return t.altKey&&t.ctrlKey&&68===t.keyCode?(this._returnDetailedDescriptions=!this._returnDetailedDescriptions,e=this._map.getCamera(),i=this._map.getStyle(),r=i.language.toLowerCase(),n=i.style.toLowerCase(),[4,this._getLocDesc(e,r,n)]):[3,2];case 1:o=a.sent(),this._descCallback(o),a.label=2;case 2:return[2]}}
2))}))},this._onRotate=function(){i._rotateTimeout||(Date.now()-i._lastHeadingTime>=i._headUpdateLimit?i._rotateTimeout=setTimeout(i._updateHeading,F.RotationDuration+25):i._rotateTimeout=setTimeout(i._updateHeading,i._headUpdateLimit-(Date.now()-i._lastHeadingTime)))},this._onMove=function(){i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._controlTimeout&&(clearTimeout(i._controlTimeout),delete i._controlTimeout)},this._onMoveEnd=function(t){t.fromControl?i._controlTimeout=setTimeout(i._updateCam,i._controlEventDelay):i._updateCam()},this._onStyleData=function(){setTimeout(i._updateStyle)},this._onPointerDown=function(t){i._lastPointerPos=i._getEventPos(t),i._pointerTimeout=setTimeout((function(){return m(i,void 0,void 0,(function(){var t,e,i,r,n;return g(this,(function(o){switch(o.label){case 0:return t=this._map.getStyle(),e=t.language.toLowerCase(),i=t.style.toLowerCase(),(r=this._map.getCamera()).center=this._map.pixelsToPositions([this._lastPointerPos])[0],[4,this._getLocDesc(r,e,i)];case 1:return n=o.sent(),this._descCallback(n),this._onPointerUp(),[2]}}))}))}),i._pointerUpdateDelay),i._map.getCanvas().addEventListener("mousemove",i._onPointerMove),i._map.getCanvas().addEventListener("touchmove",i._onPointerMove),i._map.getCanvas().addEventListener("mouseup",i._onPointerUp),i._map.getCanvas().addEventListener("touchend",i._onPointerUp)},this._onPointerMove=function(t){var e=i._getEventPos(t),r=i._lastPointerPos[0]-e[0],n=i._lastPointerPos[1]-e[1];Math.sqrt(r*r+n*n)>i._moveThreshold&&i._onPointerUp()},this._onPointerUp=function(){clearTimeout(i._pointerTimeout),delete i._pointerTimeout,i._map.getCanvas().removeEventListener("mousemove",i._onPointerMove),i._map.getCanvas().removeEventListener("touchmove",i._onPointerMove),i._map.getCanvas().removeEventListener("mouseup",i._onPointerUp),i._map.getCanvas().removeEventListener("touchend",i._onPointerUp)},this._updateHeading=function(){var t=i._map.getCamera();if(!i._lastHead||i._checkHeadingThreshold(t.bearing,i._lastHead)){var e=i._getHeadingDesc(t);i._lastHead=t.bearing,i._descCallback("<p>Map heading "+e+".</p>"),i._lastHeadingTime=Date.now()}delete i._rotateTimeout},this._updateStyle=function(){return m(i,void 0,void 0,(function(){var t,e,i,r,n;return g(this,(function(o){switch(o.label){case 0:return t=this._map.getCamera(),e=this._map.getStyle(),i=e.language.toLowerCase(),r=e.style.toLowerCase(),this._lastLang===i?[3,2]:(Fp._labelCache._preloadCache(i),[4,this._getLocDesc(t,i,r)]);case 1:return n=o.sent(),[3,4];case 2:return this._lastStyle===r||"blank"!==this._lastStyle?[3,4]:[4,this._getLocDesc(t,i,r)];case 3:n=o.sent(),o.label=4;case 4:return this._lastLang=i,this._lastStyle=r,n&&this._descCallback(n),[2]}}))}))},this._updateCam=function(t){void 0===t&&(t=!1);var e=i._map.getCamera();if(!i._lastCam||0<i._actionQueue.length||i._checkThresholds(e,i._lastCam)){var r=i._map.getStyle(),n=r.language.toLowerCase(),o=r.style.toLowerCase(),a=i._getActionDesc(e);a&&i._actionQueue.push(a),i._lastCam=e,i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._moveTimeout=setTimeout((function(){return m(i,void 0,void 0,(function(){var t;return g(this,(function(i){switch(i.label){case 0:return clearTimeout(this._rotateTimeout),delete this._rotateTimeout,[4,this._getLocDesc(e,n,o)];case 1:return t=i.sent(),0<this._actionQueue.length?(this._descCallback("<p>Map "+this._actionQueue.join(", then ")+".</p>"+t),this._actionQueue=[]):this._descCallback(t),[2]}}))}))}),t?0:i._camUpdateDelay)}},this._map=t,this._descCallback=e,this._reverseSearch=new Op(t),Fp._labelCache||(Fp._labelCache=new Rp),this._lastLang=this._map.getStyle().language.toLowerCase(),Fp._labelCache._preloadCache(this._lastLang),this._map.events.addOnce("load",(function(){i._disposed||(i._updateCam(!0),i._map._getMap().on("move",i._onMove),i._map._getMap().on("moveend",i._onMoveEnd),i._map._getMap().on("styledata",i._onStyleData),i._map._getMap().on("rotate",i._onRotate),i._map.getCanvas().addEventListener("mousedown",i._onPointerDown),i._map.getCanvas().addEventListener("touchstart",i._onPointerDown))})),this._map.getMapContainer().addEventListener("keydown",this._shortcutListener)}var Up,Vp=function(t){var e=this;this.addToMap=function(){e.initializeMapLiveStateInfo(),e.initializeMapStyleInfo(),e.createMapKeyBindingInfo(),e.map.getMapContainer().setAttribute("role","application"),e.map.getMapContainer().setAttribute("aria-label","Map Application"),e.map.getCanvas().setAttribute("aria-label","Interactive Map"),e.map.getCanvas().setAttribute("aria-describedby","atlas-map-state atlas-map-style atlas-map-shortcuts"),e.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=e.mapViewDesc&&e.mapViewDesc.dispose(),delete e.mapViewDesc,null!=e.atlasMapKeyBindings&&e.map.getCanvasContainer().removeChild(e.atlasMapKeyBindings),delete e.atlasMapKeyBindings,null!=e.atlasMapLiveStateInfo&&e.map.getCanvasContainer().removeChild(e.atlasMapLiveStateInfo),delete e.atlasMapLiveStateInfo,null!=e.atlasMapStyleInfo&&e.map.getCanvasContainer().removeChild(e.atlasMapStyleInfo),delete e.atlasMapStyleInfo,e.map.getMapContainer().removeAttribute("role"),e.map.getMapContainer().removeAttribute("aria-label"),e.map.getCanvas().removeAttribute("aria-label"),e.map.getCanvas().removeAttribute("aria-describedby"),e.map.getCanvas().removeAttribute("alt"),e.map.events.remove("styledata",e.updateMapStyle)},this.createMapKeyBindingInfo=function(){e.atlasMapKeyBindings=document.createElement("div"),e.atlasMapKeyBindings.setAttribute("tabindex","-1"),e.atlasMapKeyBindings.setAttribute("aria-hidden","true"),e.atlasMapKeyBindings.id="atlas-map-shortcuts",e.atlasMapKeyBindings.classList.add("hidden-accessible-element"),e.atlasMapKeyBindings.innerHTML=["Map shortcuts:","Zoom out: hyphen.","Zoom in: plus.","Pan right 100 pixels: right arrow.","Pan left 100 pixels: left arrow.","Pan up 100 pixels: up arrow.","Pan down 100 pixels: down arrow.","Rotate 15 degrees clockwise: shift + right arrow.","Rotate 15 degrees counter clockwise: shift + left arrow.","Increase pitch 10 degrees: shift + up arrow.","Decrease pitch 10 degrees: shift + down arrow.","Toggle verbose map state: control + alt + D.","Jump focus to the map: Escape."].join("\n"),e.map.getCanvasContainer().appendChild(e.atlasMapKeyBindings),e.atlasMapKeyBindings.setAttribute("aria-live","polite")},this.initializeMapLiveStateInfo=function(){e.mapViewDesc=new jp(e.map,e.updateMapState),e.atlasMapLiveStateInfo=document.createElement("div"),e.atlasMapLiveStateInfo.setAttribute("tabindex","-1"),e.atlasMapLiveStateInfo.setAttribute("aria-hidden","true"),e.atlasMapLiveStateInfo.id="atlas-map-state",e.atlasMapLiveStateInfo.classList.add("hidden-accessible-element"),e.map.getCanvasContainer().appendChild(e.atlasMapLiveStateInfo),e.atlasMapLiveStateInfo.setAttribute("aria-live","polite")},this.initializeMapStyleInfo=function(){e.atlasMapStyleInfo=document.createElement("div"),e.atlasMapStyleInfo.setAttribute("tabindex","-1"),e.atlasMapStyleInfo.setAttribute("aria-hidden","true"),e.atlasMapStyleInfo.id="atlas-map-style",e.atlasMapStyleInfo.classList.add("hidden-accessible-element"),e.updateMapStyle(),e.map.events.add("styledata",e.updateMapStyle),e.map.getCanvasContainer().appendChild(e.atlasMapStyleInfo),e.atlasMapStyleInfo.setAttribute("aria-live","polite")},this.updateMapStyle=function(){e.atlasMapStyleInfo.innerHTML="<p>Map style: "+e.map.getStyle().style+".</p>"},this.updateMapState=function(t){e.atlasMapLiveStateInfo.innerHTML=t},this.map=t},qp=function(t){var e=this;this.callCounter=0,this.listenerEnabled=!1,this.flowComponent=void 0,this.flowPath=void 0,this.addToMap=function(){if(!e.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");e.listenerEnabled||(e.map.events.add("styledata",e.addToMap),e.listenerEnabled=!0);var t=e.map.getStyle(),i=e.map.getTraffic(),r=e.map.styles.getFlowPath(t,i);if(r&&e.flowPath!==r){e.callCounter++;var n=e.callCounter;e.map.styles.getFlowComponent(t,i).then((function(t){if(e.callCounter===n){e.flowComponent&&(e.map.layers.remove(e.flowComponent.layer),e.map.sources.remove(e.flowComponent.sources),delete e.flowComponent);var i=e.map.layers.getLayers(),o=i.findIndex((function(t){return"transit"===t.getId()})),a=-1!==o?i[o+1]:void 0;e.map.sources.add(t.sources),e.map.layers.add(t.layer,a),e.flowComponent=t,e.flowPath=r}}))}},this.removeFromMap=function(){e.callCounter++,e.listenerEnabled&&(e.map.events.remove("styledata",e.addToMap),e.listenerEnabled=!1),e.flowPath&&delete e.flowPath,e.flowComponent&&(e.map.layers.remove(e.flowComponent.layer),e.map.sources.remove(e.flowComponent.sources),delete e.flowComponent)},this.map=t},Gp=(d(Zp,Up=y),Zp);function Zp(){var t=null!==Up&&Up.apply(this,arguments)||this;return t.version="1.0",t.bbox=void 0,t.zoom=void 0,t.params={},t}var Hp=(Wp.prototype.request=function(t){var e,i=(new Gp).merge(t),r=this.map.getServiceOptions().domain;e=In.getWest(i.bbox)<-180&&180<In.getEast(i.bbox)?In.getSouth(i.bbox)+",-180,"+In.getNorth(i.bbox)+",180":In.getSouth(i.bbox)+","+Yr(In.getWest(i.bbox))+","+In.getNorth(i.bbox)+","+Yr(In.getE
2ast(i.bbox));var n={domain:r,path:"traffic/incident/detail/json",queryParams:f({"api-version":i.version,projection:"EPSG4326",style:"s3",boundingbox:e,boundingzoom:i.zoom,trafficmodelid:-1},i.params)};return new w(this.map.authentication.signRequest(n)).get()},Wp);function Wp(t){this.map=t}var Yp,Kp,Xp,Jp=(d(Qp,Yp=rr),Qp.getIncidentTypeName=function(t,e){switch(t){case 0:default:return e.Unknown;case 1:return e.Accident;case 2:return e.Fog;case 3:return e.Danger;case 4:return e.Rain;case 5:return e.Ice;case 6:return e.Jam;case 7:return e.LaneClosed;case 8:return e.RoadClosed;case 9:return e.RoadWorks;case 10:return e.Wind;case 11:return e.Flood;case 12:return e.Detour}},Qp.getIncidentTypeIconName=function(t){switch(t){case 0:default:return"unknown";case 1:return"accident";case 2:return"fog";case 3:return"danger";case 4:return"rain";case 5:return"ice";case 6:return"jam";case 7:return"lane-closed";case 8:return"road-closed";case 9:return"road-work";case 10:return"wind";case 11:return"flood";case 12:return"detour"}},Qp.getSeverityColorName=function(t){switch(t){case 0:case 4:default:return"grey";case 1:return"yellow";case 2:return"orange";case 3:return"red"}},Qp.getSeverityColorHexCode=function(t){switch(t){case 0:case 4:default:return"#B5B6B7";case 1:return"#F4C951";case 2:return"#F4873F";case 3:return"#F04F4E"}},Qp);function Qp(t,e){var i=new lr(new hn(t.op.x,t.op.y)),r={icon:Qp.getSeverityColorName(t.ty)+"-"+Qp.getIncidentTypeIconName(t.ic),incidentType:Qp.getIncidentTypeName(t.ic,e),description:t.d,length:t.l,delay:t.dl,from:t.f,color:Qp.getSeverityColorHexCode(t.ty),to:t.t,id:t.id};return Yp.call(this,i,r)||this}(Xp=Kp=Kp||{}).DELAY="delay",Xp.LENGTH="length",Xp.FROM="from",Xp.TO="to";var $p=(th.build=function(t,e){void 0===e&&(e="en-US");var i=document.createElement("div");i.classList.add("incident-popup-title"),i.classList.add("font-segoeui-b"),i.setAttribute("tabindex","0"),i.innerText=t.properties.incidentType,i.setAttribute("aria-label","Incident Type "+t.properties.incidentType);var r=document.createElement("div");r.classList.add("incident-popup-subtitle"),r.classList.add("font-segoeui-b"),r.setAttribute("aria-label","Incident Description "+t.properties.description),r.setAttribute("tabindex","0"),r.innerText=t.properties.description;var n=document.createElement("div");n.classList.add("incident-popup-header"),n.style.backgroundColor=t.properties.color,n.appendChild(i),n.appendChild(r);var o=document.createElement("div");if(o.classList.add("incident-popup-body"),t.properties.delay){var a=Math.floor(t.properties.delay/60)+" min",s=this.createInfoSection(a,Kp.DELAY);o.appendChild(s)}if(t.properties.length){var l=new Intl.NumberFormat([e,"en-US"],{maximumFractionDigits:2}),u=void 0;if("en-US"===e){var c=jr(t.properties.length,"meters","miles");u=l.format(c)+" miles"}else{var p=jr(t.properties.length,"meters","kilometers");u=l.format(p)+" km"}var h=this.createInfoSection(u,Kp.LENGTH);o.appendChild(h)}if(t.properties.from){var d=this.createInfoSection(t.properties.from,Kp.FROM);o.appendChild(d)}if(t.properties.to){var f=this.createInfoSection(t.properties.to,Kp.TO);o.appendChild(f)}var m=document.createElement("div");return m.classList.add("incident-popup-content"),m.appendChild(n),m.appendChild(o),new ka({content:m,position:t.geometry.coordinates})},th.createInfoSection=function(t,e){var i=document.createElement("div");i.classList.add("incident-popup-info");var r=document.createElement("div");r.classList.add("icon"),r.classList.add(e);var n=document.createElement("span");return n.classList.add("message"),n.classList.add("font-segoeui"),n.setAttribute("aria-label","Incident "+e+" "+t),n.setAttribute("tabindex","0"),n.innerText=t,i.appendChild(r),i.appendChild(n),i},th);function th(){}var eh,ih=function(t){var e=this;this.incidentLayerName="incidents",this.popups=new mi,this.addToMap=function(){e.map.addPins([],{name:e.incidentLayerName,cluster:!1}),e.map.addEventListener("mouseenter",e.incidentLayerName,e.cursorToPointer),e.map.addEventListener("mouseleave",e.incidentLayerName,e.cursorToDefault),e.map.addEventListener("click",e.incidentLayerName,e.openIncidentPopup),e.map.events.add("moveend",e.updateIncidents),e.map.events.add("styledata",e.updateLanguage),e.updateIncidents()},this.removeFromMap=function(){e.map.removeLayers([e.incidentLayerName]),e.map.removeEventListener("click",e.incidentLayerName,e.openIncidentPopup),e.map.removeEventListener("mouseenter",e.incidentLayerName,e.cursorToPointer),e.map.removeEventListener("mouseleave",e.incidentLayerName,e.cursorToDefault),e.map.events.remove("moveend",e.updateIncidents),e.map.events.remove("styledata",e.updateLanguage),e.cleanUpPopups()},this.updateIncidents=function(){var t=Math.ceil(e.map.getCamera().zoom),i=e.map.getCamera().bounds;e.incidentLanguage=e.map.getStyle().language;var r=e.map._getLocalizedStrings(),n=e.incidentService.request({bbox:i,zoom:t,params:{expandCluster:!0,originalPosition:!0,language:e.incidentLanguage}}
2);Promise.all([n,r]).then((function(t){var r=t[0],n=t[1];if(e.map.getTraffic().incidents){var o=[];e.cleanUpPopups();for(var a=0,s=r.tm.poi||[];a<s.length;a++)for(var l=s[a],u=function(t){if(In.containsPosition(i,[t.op.x,t.op.y])){var r=new Jp(t,n);o.push(r);var a=$p.build(r,e.incidentLanguage);e.popups.set(r.properties.id,a),e.map.events.add("open",a,(function(){e.openPopupId=r.properties.id,e.popups.forEach((function(t,i){e.openPopupId!==i&&t.close()}))})),e.map.events.add("close",a,(function(){e.openPopupId===r.properties.id&&delete e.openPopupId})),e.openPopupId===r.properties.id?e.popups.get(r.properties.id).open(e.map):e.popups.get(r.properties.id).attach(e.map)}},c=0,p=l.cpoi||[l];c<p.length;c++)u(p[c]);e.map.addPins(o,{overwrite:!0,name:e.incidentLayerName})}}))},this.cursorToPointer=function(t){e.map.getCanvas().style.cursor="pointer"},this.cursorToDefault=function(t){e.map.getCanvas().style.cursor=""},this.openIncidentPopup=function(t){var i=t.features[0].properties.id;e.popups.has(i)&&e.popups.get(i).open(e.map)},this.cleanUpPopups=function(){e.popups.forEach((function(t){t.remove()})),e.popups.clear()},this.updateLanguage=function(){e.map.getStyle().language!==e.incidentLanguage&&e.updateIncidents()},this.map=t,this.incidentService=new Hp(this.map)},rh=(d(nh,eh=y),nh);function nh(){var t=null!==eh&&eh.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.wheelZoomRate=1/450,t}var oh=(ah.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},ah.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},ah);function ah(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var sh=(lh.prototype.enable=function(){this.map._getMap().on("touchstart",this._onTouchStart),this.map._getMap().on("touchmove",this._onTouchMove),this.map._getMap().on("touchend",this._onTouchEnd),this.map._getMap().on("touchcancel",this._onTouchCancel)},lh.prototype.disable=function(){this.map._getMap().off("touchstart",this._onTouchStart),this.map._getMap().off("touchmove",this._onTouchMove),this.map._getMap().off("touchend",this._onTouchEnd),this.map._getMap().off("touchcancel",this._onTouchCancel)},lh);function lh(t){var e=this;this.minDiffX=70,this.maxDiffY=100,this.minDiff=30,this.delay=160,this._onTouchStart=function(t){if(2===t.points.length){var i=t.points[0].y-t.points[1].y,r=t.points[0].x-t.points[1].x;Math.abs(r)>=e.minDiffX&&Math.abs(i)<=e.maxDiffY&&(t.originalEvent.preventDefault(),e.map._getMap().touchZoomRotate.disable(),e.map._getMap().dragPan.disable(),e.dpPoint=t.point,e.dpPitch=e.map._getMap().getPitch(),e.startTiming=Date.now(),e.startDistance=Math.hypot(r,i),e.startEventData=t)}},this._onTouchMove=function(t){if(void 0!==e.dpPoint&&void 0!==e.dpPitch){t.preventDefault(),t.originalEvent.preventDefault();var i=t.points[0].y-t.points[1].y,r=t.points[0].x-t.points[1].x,n=Math.hypot(r,i);if(Math.abs(n-e.startDistance)>=e.minDiff)return e.dpPoint&&(e.map._getMap().touchZoomRotate.enable(),e.map._getMap().dragPan.enable(),e.map._getMap().touchZoomRotate.onStart(Date.now()-e.startTiming>=e.delay?t.originalEvent:e.startEventData.originalEvent)),void(e.dpPoint=void 0);if(Date.now()-e.startTiming>=e.delay){var o=.5*(e.dpPoint.y-t.point.y);e.map._getMap().setPitch(e.dpPitch+o)}}},this._onTouchEnd=function(){e.dpPoint&&(e.map._getMap().touchZoomRotate.enable(),e.map._getMap().dragPan.enable()),e.dpPoint=void 0},this._onTouchCancel=function(){e.dpPoint&&(e.map._getMap().touchZoomRotate.enable(),e.map._getMap().dragPan.enable()),e.dpPoint=void 0},this.map=t}var uh=(ch.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},ch.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)},ch);function ch(t){var e=this;this._onGestureStart=function(t){e.hasTouch||(t.preventDefault(),e.initZoom=e.map.getCamera().zoom)},this._onGestureChange=function(t){e.hasTouch||(t.preventDefault(),e.map.setCamera({zoom:e.initZoom+t.scale-1}))},this._onTouchStart=function(t){e.hasTouch=!0},this._onTouchEnd=function(t){0===t.touches.length&&(e.hasTouch=!1)},this.map=t}var ph=(hh.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},hh.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},hh.prototype.setOptions=function(t){this.options=(new rh).merge(this.options,t),this.added&&this._setInteractions(this.options)},hh.prototype.getOptions=function(){return Object.assign({},this.options)},hh.prototype._setInteractions=function(t){t.interactive?(t.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),t.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),t.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),t.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),t.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),t.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(t.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),t.touchInteraction?(this.map._getMap().touchZoomRotate.enable(),this.mobilePitch.enable()):(this.map._getMap().touchZoomRotate.disable(),this.mobilePitch.disable()),this.pinchZoom.enable()):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.mobilePitch.disable(),this.pinchZoom.disable())},hh);function hh(t,e){this.added=!1,this.map=t,this.mobilePitch=new sh(t),this.focusShortcut=new oh(t),this.pinchZoom=new uh(t),this.options=(new rh).merge(e)}var dh=i((function(t){var e=(e=function(t){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},e.prototype._singletonInstance)return e.prototype._singletonInstance;if((e.prototype._singletonInstance=this).instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,t.displayCall&&"function"!=typeof t.displayCall)throw new Error("displayCall is not a function");if(!t.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(t),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(t){}}
2),e.prototype.login=function(){if(this._loginInProgress)this.info("Login in progress");else{this._loginInProgress=!0;var t=this._guid();this.config.state=t,this._idTokenNonce=this._guid();var e=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);e&&""!==e?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):e=window.location.href,this.verbose("Expected state: "+t+" startPage:"+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,t,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var i=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(i):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(t),this.registerCallback(t,this.config.clientId,this.callback),this._loginPopup(i)):this.promptUser(i)}},e.prototype._openPopup=function(t,e,i,r){try{var n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=a/2-i/2+n,u=s/2-r/2+o,c=window.open(t,e,"width="+i+", height="+r+", top="+u+", left="+l);return c.focus&&c.focus(),c}catch(t){return this.warn("Error opening popup, "+t.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},e.prototype._handlePopupError=function(t,e,i,r,n){this.warn(r),this._saveItem(this.CONSTANTS.STORAGE.ERROR,i),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,r),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,n),e&&this._activeRenewals[e]&&(this._activeRenewals[e]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,t&&t(r,null,i)},e.prototype._loginPopup=function(t,e,i){var r=this._openPopup(t,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),n=i||this.callback;if(null!=r){if(this._openedWindows.push(r),-1!=this.config.redirectUri.indexOf("#"))var o=this.config.redirectUri.split("#")[0];else o=this.config.redirectUri;var a=this,s=window.setInterval((function(){if(!r||r.closed||void 0===r.closed){var t="Popup Window closed",i="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return a.isAngular&&a._broadcast("adal:popUpClosed",i+a.CONSTANTS.RESOURCE_DELIMETER+t),a._handlePopupError(n,e,t,i,i),void window.clearInterval(s)}try{var l=r.location;if(-1!=encodeURI(l.href).indexOf(encodeURI(o)))return a.isAngular?a._broadcast("adal:popUpHashChanged",l.hash):a.handleWindowCallback(l.hash),window.clearInterval(s),a._loginInProgress=!1,a._acquireTokenInProgress=!1,a.info("Closing popup window"),a._openedWindows=[],void r.close()}catch(t){}}),1)}else{var l="Popup Window is null. This can happen if you are using IE";this._handlePopupError(n,e,"Error opening popup",l,l)}},e.prototype._broadcast=function(t,e){function i(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}"function"!=typeof window.CustomEvent&&(i.prototype=window.Event.prototype,window.CustomEvent=i);var r=new CustomEvent(t,{detail:e});window.dispatchEvent(r)},e.prototype.loginInProgress=function(){return this._loginInProgress},e.prototype._hasResource=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return e&&!this._isEmpty(e)&&-1<e.indexOf(t+this.CONSTANTS.RESOURCE_DELIMETER)},e.prototype.getCachedToken=function(t){if(!this._hasResource(t))return null;var e=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t),i=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t),r=this.config.expireOffsetSeconds||300;return i&&i>this._now()+r?e:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0),null)},e.prototype.getCachedUser=function(){if(this._user)return this._user;var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(t),this._user}
2,e.prototype.registerCallback=function(t,e,i){this._activeRenewals[e]=t,this._callBacksMappedToRenewStates[t]||(this._callBacksMappedToRenewStates[t]=[]);var r=this;this._callBacksMappedToRenewStates[t].push(i),this._callBackMappedToRenewStates[t]||(this._callBackMappedToRenewStates[t]=function(i,n,o,a){r._activeRenewals[e]=null;for(var s=0;s<r._callBacksMappedToRenewStates[t].length;++s)try{r._callBacksMappedToRenewStates[t][s](i,n,o,a)}catch(o){r.warn(o)}r._callBacksMappedToRenewStates[t]=null,r._callBackMappedToRenewStates[t]=null})},e.prototype._renewToken=function(t,e,i){this.info("renewToken is called for resource:"+t);var r=this._addAdalFrame("adalRenewFrame"+t),n=this._guid()+"|"+t;this.config.state=n,this._renewStates.push(n),this.verbose("Renew token Expected state: "+n),i=i||"token";var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl(i,t),"prompt");i===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),o+="&nonce="+encodeURIComponent(this._idTokenNonce)),o+="&prompt=none",o=this._addHintParameters(o),this.registerCallback(n,t,e),this.verbosePii("Navigate to:"+o),r.src="about:blank",this._loadFrameTimeout(o,"adalRenewFrame"+t,t)},e.prototype._renewIdToken=function(t,e){this.info("renewIdToken is called");var i=this._addAdalFrame("adalIdTokenFrame"),r=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=r,this._renewStates.push(r),this.verbose("Renew Idtoken Expected state: "+r);var n=null==e?null:this.config.clientId,o=(e=e||"id_token",this._urlRemoveQueryStringParameter(this._getNavigateUrl(e,n),"prompt"));o+="&prompt=none",o=this._addHintParameters(o),o+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(r,this.config.clientId,t),this.verbosePii("Navigate to:"+o),i.src="about:blank",this._loadFrameTimeout(o,"adalIdTokenFrame",this.config.clientId)},e.prototype._urlContainsQueryStringParameter=function(t,e){return new RegExp("[\\?&]"+t+"=").test(e)},e.prototype._urlRemoveQueryStringParameter=function(t,e){var i=new RegExp("(\\&"+e+"=)[^&]+");return t=t.replace(i,""),i=new RegExp("("+e+"=)[^&]+&"),t=t.replace(i,""),i=new RegExp("("+e+"=)[^&]+"),t.replace(i,"")},e.prototype._loadFrameTimeout=function(t,e,i){this.verbose("Set loading state to pending for: "+i),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(t,e);var r=this;setTimeout((function(){if(r._getItem(r.CONSTANTS.STORAGE.RENEW_STATUS+i)===r.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS){r.verbose("Loading frame has timed out after: "+r.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+i);var t=r._activeRenewals[i];t&&r._callBackMappedToRenewStates[t]&&r._callBackMappedToRenewStates[t]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),r._saveItem(r.CONSTANTS.STORAGE.RENEW_STATUS+i,r.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)}}),r.CONSTANTS.LOADFRAME_TIMEOUT)},e.prototype._loadFrame=function(t,e){var i=this;i.info("LoadFrame: "+e);var r=e;setTimeout((function(){var e=i._addAdalFrame(r);""!==e.src&&"about:blank"!==e.src||(e.src=t,i._loadFrame(t,r))}),500)},e.prototype.acquireToken=function(t,e){if(this._isEmpty(t))return this.warn("resource is required"),void e("resource is required",null,"resource is required");var i=this.getCachedToken(t);return i?(this.info("Token is already in cache for resource:"+t),void e(null,i,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[t]?this.registerCallback(this._activeRenewals[t],t,e):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,t===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(e)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(t,e)):(this.verbose("renewing idtoken and access_token"),this._renewToken(t,e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void e("User login is required",null,"login required"))}
2,e.prototype.acquireTokenPopup=function(t,e,i,r){if(this._isEmpty(t))return this.warn("resource is required"),void r("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void r("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var n=this._guid()+"|"+t;this.config.state=n,this._renewStates.push(n),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+n);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this.registerCallback(n,t,r),this._loginPopup(o,t,r)},e.prototype.acquireTokenRedirect=function(t,e,i){if(this._isEmpty(t))return this.warn("resource is required"),void r("resource is required",null,"resource is required");var r=this.callback;if(!this._user)return this.warn("User login is required"),void r("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var n=this._guid()+"|"+t;this.config.state=n,this.verbose("Renew token Expected state: "+n);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,n,!0),this.promptUser(o)},e.prototype.promptUser=function(t){t?(this.infoPii("Navigate to:"+t),window.location.replace(t)):this.info("Navigate url is empty")},e.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(t)){t=t.split(this.CONSTANTS.RESOURCE_DELIMETER);for(var e=0;e<t.length&&""!==t[e];e++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t[e],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t[e],0)}this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},e.prototype.clearCacheForResource=function(t){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(t)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0))},e.prototype.logOut=function(){var t;if(this.clearCache(),this._user=null,this.config.logOutUri)t=this.config.logOutUri;else{var e="common",i="";this.config.tenant&&(e=this.config.tenant),this.config.postLogoutRedirectUri&&(i="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),t=this.instance+e+"/oauth2/logout?"+i}this.infoPii("Logout navigate to: "+t),this.promptUser(t)},e.prototype._isEmpty=function(t){return void 0===t||!t||0===t.length},e.prototype.getUser=function(t){if("function"!=typeof t)throw new Error("callback is not a function");if(this._user)t(null,this._user);else{var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);this._isEmpty(e)?(this.warn("User information is not available"),t("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(e),t(null,this._user))}},e.prototype._addHintParameters=function(t){if(this._user&&this._user.profile)if(this._user.profile.sid&&-1!==t.indexOf("&prompt=none"))this._urlContainsQueryStringParameter("sid",t)||(t+="&sid="+encodeURIComponent(this._user.profile.sid));else if(this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",t)||(t+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",t)&&-1<this._user.profile.upn.indexOf("@"))){var e=this._user.profile.upn.split("@");t+="&domain_hint="+encodeURIComponent(e[e.length-1])}return t},e.prototype._createUser=function(t){var e=null,i=this._extractIdToken(t);return i&&i.hasOwnProperty("aud")&&(i.aud.toLowerCase()===this.config.clientId.toLowerCase()?(e={userName:"",profile:i},i.hasOwnProperty("upn")?e.userName=i.upn:i.hasOwnProperty("email")&&(e.userName=i.email)):this.warn("IdToken has
2invalid aud field")),e},e.prototype._getHash=function(t){return-1<t.indexOf("#/")?t=t.substring(t.indexOf("#/")+2):-1<t.indexOf("#")&&(t=t.substring(1)),t},e.prototype.isCallback=function(t){t=this._getHash(t);var e=this._deserialize(t);return e.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},e.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},e.prototype.getRequestInfo=function(t){t=this._getHash(t);var e=this._deserialize(t),i={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(e&&((i.parameters=e).hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){var r;if(i.valid=!0,!e.hasOwnProperty("state"))return this.warn("No state returned"),i;if(this.verbose("State: "+e.state),r=e.state,i.stateResponse=r,this._matchState(i))return i;if(!i.stateMatch&&window.parent){i.requestType=this._requestType;for(var n=this._renewStates,o=0;o<n.length;o++)if(n[o]===i.stateResponse){i.stateMatch=!0;break}}}return i},e.prototype._matchNonce=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);if(e){e=e.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<e.length;i++)if(e[i]===t.profile.nonce)return!0}return!1},e.prototype._matchState=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);if(e){e=e.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<e.length;i++)if(e[i]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.LOGIN,t.stateMatch=!0}var r=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);if(r)for(r=r.split(this.CONSTANTS.CACHE_DELIMETER),i=0;i<r.length;i++)if(r[i]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.RENEW_TOKEN,t.stateMatch=!0;return!1},e.prototype._getResourceFromState=function(t){if(t){var e=t.indexOf("|");if(-1<e&&e+1<t.length)return t.substring(e+1)}return""},e.prototype.saveTokenFromHash=function(t){this.info("State status:"+t.stateMatch+"; Request type:"+t.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var e,i=this._getResourceFromState(t.stateResponse);t.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)?(this.infoPii("Error :"+t.parameters.error+"; Error description:"+t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,t.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),t.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,t.parameters.error_description))):t.stateMatch?(this.info("State is right"),t.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,t.parameters[this.CONSTANTS.SESSION_STATE]),t.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(i)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+i+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+i,t.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+i,this._expiresIn(t.parameters[this.CONSTANTS.EXPIRES_IN]))),t.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(t.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,t.parameters[this.CONSTANTS.ID_TOKEN]),i=this.config.loginResource?this.config.loginResource:this.config.clientId,this._hasResource(i)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+i+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+i,t.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+i,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(t.parameters.error="invalid id_token",t.parameters.error_description="Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN])))):(t.parameters.error="Invalid_state",t.parameters.error_description="Invalid_state. state: "+t.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+t.stateResponse)),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},e.prototype.getResourceForEndpoint=function(t){if(this.config&&this.config.anonymousEndpoints)for(var e=0;e<this.config.anonymousEndpoints.length;e++)if(-1<t.indexOf(this.config.anonymousEndpoints[e]))return null;if(this.config&&this.config.endpoints)for(var i in this.config.endpoints)if(-1<t.indexOf(i))return this.config.endpoints[i];return(-1<t.indexOf("http://")||-1<t.indexOf("https://"))&&this._getHostFromUri(t)!==this._getHostFromUri(this.config.redirectUri)?null:this.config.loginResource},e.prototype._getHostFromUri=function(t){return String(t).replace(/^(https?:)\/\//,"").split("/")[0]},e.prototype.handleWindowCallback=function(t){if(null==t&&(t=window.location.hash),this.isCallback(t)){var e=null,i=!1;0<this._openedWindows.length&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(e=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,i=!0):window.parent&&window.parent._adalInstance&&(e=window.parent._adalInstance);var r,n,o=e.getRequestInfo(t),a=null;n=i||window.parent!==window?e._callBackMappedToRenewStates[o.stateResponse]:e.callback,e.info("Returned from redirect url"),e.saveTokenFromHash(o),o.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?e.verbose("Window is in iframe, acquiring token silently"):e.verbose("acquiring token interactive in progress"),r=o.parameters[e.CONSTANTS.ACCESS_TOKEN]||o.parameters[e.CONSTANTS.ID_TOKEN],a=e.CONSTANTS.ACCESS_TOKEN):o.requestType===this.REQUEST_TYPE.LOGIN&&(r=o.parameters[e.CONSTANTS.ID_TOKEN],a=e.CONSTANTS.ID_TOKEN);var s=o.parameters[e.CONSTANTS.ERROR_DESCRIPTION],l=o.parameters[e.CONSTANTS.ERROR];try{n&&n(s,r,l,a)}catch(t){e.error("Error occurred in user defined callback function: "+t)}window.parent!==window||i||(e.config.navigateToLoginRequestUrl?window.location.href=e._getItem(e.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},e.prototype._getNavigateUrl=function(t,e){var i="common";this.config.tenant&&(i=this.config.tenant);var r=this.instance+i+"/oauth2/authorize"+this._serialize(t,this.config,e)+this._addLibMetadata();return this.info("Navigate url:"+r),r},e.prototype._extractIdToken=function(t){var e=this._decodeJwt(t);if(!e)return null;try{var i=e.JWSPayload,r=this._base64DecodeStringUrlSafe(i);return r?JSON.parse(r):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(t){this.error("The returned id_token could not be decoded",t)}return null},e.prototype._base64DecodeStringUrlSafe=function(t){return t=t.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(t))):decodeURIComponent(escape(this._decode(t)))},e.prototype._decode=function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/=",i=(t=String(t).replace(/=+$/,"")).length;if(i%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var r,n,o,a,s,l,u,c,p="",h=0;h<i;h+=4){if(r=e.indexOf(t.charAt(h)),n=e.indexOf(t.charAt(h+1)),o=e.indexOf(t.charAt(h+2)),a=e.indexOf(t.charAt(h+3)),h+2===i-1){l=(s=r<<18|n<<12|o<<6)>>16&255,u=s>>8&255,p+=String.fromCharCode(l,u);break}if(h+1===i-1){l=(s=r<<18|n<<12)>>16&255,p+=String.fromCharCode(l);break}l=(s=r<<18|n<<12|o<<6|a)>>16&255,u=s>>8&255,c=255&s,p+=String.fromCharCode(l,u,c)}return p},e.prototype._decodeJwt=function(t){if(this._isEmpty(t))return null;var e=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);return!e||e.length<4?(this.warn("The returned id_token is not parseable."),null):{header:e[1],JWSPayload:e[2],JWSSig:e[3]}},e.prototype._convertUrlSafeToRegularBase64EncodedString=function(t){return t.replace("-","+").replace("_","/")},e.prototype._serialize=function(t,e,i){var r=[];if(null!==e){r.push("?response_type="+t),r.push("client_id="+encodeURIComponent(e.clientId)),i&&r.push("resource="+encodeURIComponent(i)),r.push("redirect_uri="+encodeURIComponent(e.redirectUri)),r.push("state="+encodeURIComponent(e.state)),e.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(e.slice)),e.hasOwnProperty("extraQueryParameter")&&r.push(e.extraQueryParameter);var n=e.correlationId?e.correlationId:this._guid();r.push("client-request-id="+encodeURIComponent(n))}return r.join("&")},e.prototype._deserialize=function(t){function e(t){return decodeURIComponent(t.replace(r," "))}var i,r=/\+/g,n=/([^&=]+)=([^&]*)/g,o={};for(i=n.exec(t);i;)o[e(i[1])]=e(i[2]),i=n.exec(t);return o},e.prototype._decimalToHex=function(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e},e.prototype._guid=function(){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues){var e=new Uint8Array(16);return t.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,this._decimalToHex(e[0])+this._decimalToHex(e[1])+this._decimalToHex(e[2])+this._decimalToHex(e[3])+"-"+this._decimalToHex(e[4])+this._decimalToHex(e[5])+"-"+this._decimalToHex(e[6])+this._decimalToHex(e[7])+"-"+this._decimalToHex(e[8])+this._decimalToHex(e[9])+"-"+this._decimalToHex(e[10])+this._decimalToHex(e[11])+this._decimalToHex(e[12])+this._decimalToHex(e[13])+this._decimalToHex(e[14])+this._decimalToHex(e[15])}for(var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",n=0,o="",a=0;a<36;a++)"-"!==i[a]&&"4"!==i[a]&&(n=16*Math.random()|0),"x"===i[a]?o+=r[n]:"y"===i[a]?(n&=3,o+=r[n|=8]):o+=i[a];return o},e.prototype._expiresIn=function(t){return t=t||3599,this._now()+parseInt(t,10)},e.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},e.prototype._addAdalFrame=function(t){if(void 0!==t){this.info("Add adal frame to document:"+t);var e=document.getElementById(t);if(!e){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var i=document.createElement("iframe");i.setAttribute("id",t),i.setAttribute("aria-hidden","true"),i.style.visibility="hidden",i.style.position="absolute",i.style.width=i.style.height=i.borderWidth="0px",e=document.getElementsByTagName("body")[0].appendChild(i)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+t+'" id="'+t+'" style="display:none"></iframe>');window.frames&&window.frames[t]&&(e=window.frames[t])}return e}},e.prototype._saveItem=function(t,e,i){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(i){var r=this._getItem(t)||"";localStorage.setItem(t,r+e+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(t,e);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(t,e),!0):(this.info("Session storage is not supported"),!1)},e.prototype._getItem=function(t){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(t):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(t):(this.info("Session storage is not supported"),null)},e.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(t){return!1}},e.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(t){return!1}},e.prototype._cloneConfig=function(t){if(null===t||"object"!=typeof t)return t;var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},e.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()}
2,e.prototype.log=function(t,e,i,r){if(t<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var n=(new Date).toUTCString(),o="";o=this.config.correlationId?n+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e:n+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e,i&&(o+="\nstack:\n"+i.stack),Logging.log(o)}},e.prototype.error=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e)},e.prototype.warn=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null)},e.prototype.info=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null)},e.prototype.verbose=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null)},e.prototype.errorPii=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e,!0)},e.prototype.warnPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null,!0)},e.prototype.infoPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null,!0)},e.prototype.verbosePii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null,!0)},e.prototype._libVersion=function(){return"1.0.17"},t.exports&&(t.exports=e,t.exports.inject=function(t){return new e(t)}),e)}));function fh(t){this.message=t}dh.inject,(fh.prototype=new Error).name="InvalidCharacterError";var mh="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new fh("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,n=0,o=0,a="";r=e.charAt(o++);~r&&(i=n%4?64*i+r:r,n++%4)&&(a+=String.fromCharCode(255&i>>(-2*n&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function gh(t){this.message=t}function yh(t,e){if("string"!=typeof t)throw new gh("Invalid token specified");var i=!0===(e=e||{}).header?0:1;try{return JSON.parse(function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(mh(e).replace(/(.)/g,(function(t,e){var i=e.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i})))}catch(t){return mh(e)}}(t.split(".")[i]))}catch(t){throw new gh("Invalid token specified: "+t.message)}}(gh.prototype=new Error).name="InvalidTokenError",yh.InvalidTokenError=gh;var vh=(_h.prototype.initialize=function(){var e=this;return this.initPromise||(this.initPromise=new Promise((function(i,r){if(e.options.authType===t.AuthenticationType.subscriptionKey)i();else if(e.options.authType===t.AuthenticationType.aad){if(e.options.authContext=e.options.authContext||_h.getDefaultAuthContext(e.options),e.options.authContext.handleWindowCallback(),e.options.authContext.getLoginError())return void r(new Error("Error logging in the AAD users: "+e.options.authContext.getLoginError()));if(e.options.authContext.isCallback(window.location.hash))return void e.map.dispose();setTimeout((function(){return e._loginAndAcquire(i,r)}))}else e.options.authType===t.AuthenticationType.anonymous?i(e._triggerTokenFetch()):r(new Error("An invalid authentication type was specified."))}))),this.initPromise},_h.getDefaultAuthContext=function(t){if(!t.aadAppId)throw new Error("No AAD app ID was specified.");if(!t.aadTenant)throw new Error("No AAD tenant was specified.");return this.defaultAuthContext||(this.defaultAuthContext=new dh({instance:t.aadInstance||"https://login.microsoftonline.com/",tenant:t.aadTenant,clientId:t.aadAppId,cacheLocation:this.constants.preferredCacheLocation})),this.defaultAuthContext},_h.prototype._loginAndAcquire=function(t,e){function i(){r.options.authContext.acquireToken(p,(function(i){if(i)e(new Error(i));else{var n={map:r.map,type:_h.constants.events.tokenAcquired};r.map.events.invoke(_h.constants.events.tokenAcquired,n),t()}}))}var r=this,n=this.options.authContext.getCachedToken(this.options.aadAppId),o=this.options.authContext.getCachedUser();if(n&&o)i();else{this.options.authContext.loginInProgress()||this.options.authContext.login();var a=setInterval((function(){r.options.authContext.loginInProgress()||(clearInterval(a),r.options.authContext.getCachedToken(r.options.aadAppId)?i():e(new Error(r.options.authContext.getLoginError()||"The AAD authentication context is not logged-in for the specified app ID: "+r.o
2ptions.aadAppId)))}),25)}},_h.prototype.getAuthType=function(){return this.options.authType},_h.prototype.getClientId=function(){return this.options.clientId},_h.prototype.getToken=function(){var e=this;if(this.options.authType===t.AuthenticationType.aad){var i=this.options.authContext.getCachedToken(p);return i||(this.options.authContext.getCachedUser()||this.options.authContext.login(),this.options.authContext.acquireToken(p,(function(t,r){if(!t){i=r;var n={map:e.map,type:_h.constants.events.tokenAcquired};e.map.events.invoke(_h.constants.events.tokenAcquired,n)}}))),i}if(this.options.authType===t.AuthenticationType.anonymous){var r=this._getItem(_h.constants.storage.accessTokenKey);if(r){var n=this._getTokenExpiry(r);if(n<300&&0<n)this._triggerTokenFetch();else if(n<=0)throw this._saveItem(_h.constants.storage.accessTokenKey,""),new Error(_h.constants.errors.tokenExpired)}else this._triggerTokenFetch();return r}if(this.options.authType===t.AuthenticationType.subscriptionKey)return this.options.subscriptionKey},_h.prototype._getTokenExpiry=function(t){var e=yh(t).exp,i=this._getCurrentTime();return 0<e-i?e-i:-1},_h.prototype._storeAccessToken=function(t){this._saveItem(_h.constants.storage.accessTokenKey,t);var e={map:this.map,type:_h.constants.events.tokenAcquired};this.map.events.invoke(_h.constants.events.tokenAcquired,e)},_h.prototype._saveItem=function(t,e){return this._supportsLocalStorage()?(localStorage.setItem(t,e),!0):!!this._supportsSessionStorage()&&(sessionStorage.setItem(t,e),!0)},_h.prototype._getItem=function(t){return this._supportsLocalStorage()?localStorage.getItem(t):this._supportsSessionStorage()?sessionStorage.getItem(t):null},_h.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem(_h.constants.storage.testStorageKey,"A"),"A"===window.localStorage.getItem(_h.constants.storage.testStorageKey)&&(window.localStorage.removeItem(_h.constants.storage.testStorageKey),!window.localStorage.getItem(_h.constants.storage.testStorageKey)))}catch(t){return!1}},_h.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem(_h.constants.storage.testStorageKey,"A"),"A"===window.sessionStorage.getItem(_h.constants.storage.testStorageKey)&&(window.sessionStorage.removeItem(_h.constants.storage.testStorageKey),!window.sessionStorage.getItem(_h.constants.storage.testStorageKey)))}catch(t){return!1}},_h.prototype._getCurrentTime=function(){return Math.round((new Date).getTime()/1e3)},_h.prototype.signRequest=function(e){e.headers=e.headers||{},e.headers["Session-Id"]=this.sessionId,e.headers["Ms-Am-Request-Origin"]="MapControl",e.headers["Map-Agent"]="MapControl/"+C+" (Web)";var i=this.getToken();switch(this.options.authType){case t.AuthenticationType.aad:case t.AuthenticationType.anonymous:e.headers["x-ms-client-id"]=this.options.clientId,e.headers.Authorization="Bearer "+i;break;case t.AuthenticationType.subscriptionKey:if("url"in e)-1!==e.url.indexOf("?")?e.url+="&subscription-key="+i:e.url+="?&subscription-key="+i;else{if(!("domain"in e))throw new Error("Could not determine if the provided object was UrlOptions or RequestParameters");e.queryParams=e.queryParams||{},e.queryParams["subscription-key"]=i}break;default:throw new Error("An invalid authentication type was specified")}return e},_h.constants={preferredCacheLocation:"localStorage",storage:{accessTokenKey:"access.token.key",testStorageKey:"testStorage"},events:{tokenAcquired:"tokenacquired"},tokenExpiresIn:3599,tokenRefreshClockSkew:300,errors:{tokenExpired:"Token Expired, Try again"}},_h);function _h(t){var e=this;this._triggerTokenFetch=function(){return new Promise((function(t,i){e.options.getToken((function(r){try{var n=e._getTokenExpiry(r)-_h.constants.tokenRefreshClockSkew;e._storeAccessToken(r),clearTimeout(e.tokenTimeOutHandle),e.tokenTimeOutHandle=setTimeout(e._triggerTokenFetch,1e3*n),t()}catch(r){i(new Error("Invalid token returned by getToken function"))}}),(function(t){i(t)}),e.map)}))};var i=t.getServiceOptions();this.options=i.authOptions,this.sessionId=i.sessionId,this.map=t}var xh=(bh.prototype.add=function(t,e){if(Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._add(n,e)}else this._add(t,e)},bh.prototype.getControls=function(){return Array.from(this.controls)},bh.prototype.remove=function(t){if(Array.isArray(t))for(var e=0,i=t;e<i.length;e++){var r=i[e];this._remove(r)}else this._remove(t)},bh.prototype._add=function(t,e){this.controls.add(t);var i=(new A).merge(e),r=t.onAdd(this.map,e),n=this.controlContainer.getElementsByClassName(i.position);if(!(0<n.length))throw new Error("Control position "+i.position+" does not exist.");n.item(0).appendChild(r)},bh.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},bh);function bh(e){for(var i in this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),t.ControlPosition)if(t.ControlPosition.hasOwnProperty(i)){var r=document.createElement("div");r.classList.add(t.ControlPosition[i]),r.classList.add("subcontrol-container"),this.controlContainer.appendChild(r)}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}
2var wh=(Sh.prototype.addCallback=function(t,e,i,r,n){var o,a,s=this;if(r)o=function(t){var e=t.lngLat?new hn(t.lngLat.lng,t.lngLat.lat):void 0,r=t.point?[t.point.x,t.point.y]:void 0,n=t.features?t.features.map((function(t){return new rr(t.geometry,t.properties,t.id)})):[],o={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:r,features:n};i(o)};else switch(t){case"data":case"sourcedata":case"styledata":o=function(r){var o=f(f({dataType:r.dataType},"source"===r.dataType&&f(f(f({isSourceLoaded:r.isSourceLoaded},r.sourceDataType&&{sourceDataType:r.sourceDataType}),{source:s.map.sources.getById(r.sourceId)}),r.tile&&{tile:{id:{x:r.tile.tileID.canonical.x,y:r.tile.tileID.canonical.y,z:r.tile.tileID.canonical.z},size:r.tile.tileSize,state:r.tile.state}})),{map:s.map,type:r.type});n&&s.map.events._removeListener(t,e,i),i(o)};break;case"error":o=function(r){var o={error:r.error,map:s.map,type:r.type};n&&s.map.events._removeListener(t,e,i),i(o)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":o=function(r){if(r.originalEvent){if(r.originalEvent===a)return;a=r.originalEvent}var o=r.point?new ar(r.point.x,r.point.y):void 0,l=r.points?r.points.map((function(t){return new ar(t.x,t.y)})):[],u=r.lngLat?new hn(r.lngLat.lng,r.lngLat.lat):void 0,c=r.lngLats?r.lngLats.map((function(t){return new hn(t.lng,t.lat)})):[],p=u?s.map.layers.getRenderedShapes(new lr(u),e?[e]:void 0):[],h={map:s.map,originalEvent:r.originalEvent,pixel:o,pixels:l,position:u,positions:c,shapes:p,layerId:e||void 0,preventDefault:function(){return r.preventDefault()},type:r.type};n&&s.map.events._removeListener(t,e,i),i(h)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":o=function(r){if(r.originalEvent){if(r.originalEvent===a)return;a=r.originalEvent}var o=r.lngLat?new hn(r.lngLat.lng,r.lngLat.lat):void 0,l=r.point?new ar(r.point.x,r.point.y):void 0,u=o?s.map.layers.getRenderedShapes(new lr(o),e?[e]:void 0):[],c={map:s.map,originalEvent:r.originalEvent,position:o,pixel:l,preventDefault:function(){return r.preventDefault()},shapes:u,layerId:e||void 0,type:r.type};n&&s.map.events._removeListener(t,e,i),i(c)};break;case"styleimagemissing":o=function(r){n&&s.map.events._removeListener(t,e,i),i(r.id)};break;case"wheel":o=function(r){if(r.originalEvent){if(r.originalEvent===a)return;a=r.originalEvent}var o={map:s.map,originalEvent:r.originalEvent,preventDefault:function(){return r.preventDefault()},type:r.type};n&&s.map.events._removeListener(t,e,i),i(o)};break;case"resize":o=function(r){var o={map:s.map,type:r.type};for(var a in r)"type"!==a&&"target"!==a&&(o[a]=r[a]);n&&s.map.events._removeListener(t,e,i),i(o)};break;default:o=function(r){var o={map:s.map,type:r.type};r.originalEvent&&(o.originalEvent=r.originalEvent),n&&s.map.events._removeListener(t,e,i),i(o)}}this.callbacks.has(e)||this.callbacks.set(e,new mi),this.callbacks.get(e).has(t)||this.callbacks.get(e).set(t,new mi),this.callbacks.get(e).get(t).set(i,[o,n])},Sh.prototype.removeCallback=function(t,e,i){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(i)&&this.callbacks.get(e).get(t).delete(i)},Sh.prototype.getModifiedCallback=function(t,e,i){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(i))return this.callbacks.get(e).get(t).get(i)[0]},Sh.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},Sh.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){var i=this.callbacks.get(e);if(i.has(t))return i.get(t)}},Sh);function Sh(t){this.callbacks=new mi,this.map=t}var Th=(Ch.prototype.add=function(t,e,i){if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else for(var r=0,n=e=Array.isArray(e)?e:[e];r<n.length;r++){var o=n[r];o instanceof oo&&oo._isMBoxEvent(t)?this._addLayerListener(t,o,i,!1,!1):o._addEventListener(t,i,!1)}},Ch.prototype.addOnce=function(t,e,i){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof oo&&oo._isMBoxEvent(t)?this._addLayerListener(t,e,i,!1,!0):e._addEventListener(t,i,!0)}
2,Ch.prototype._addLegacy=function(t,e,i){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,i,!0,!1)},Ch.prototype._addLayerListener=function(t,e,i,r,n){var o=e instanceof oo?e.getId():e,a=this.map.layers.getLayerById(o),s=this.mapCallbackHandler.getModifiedCallback(t,o,i);if(s&&a)for(var l=0,u=a._getLayerIds();l<u.length;l++){var c=u[l];this.map._getMap().off(t,c,s)}if(this.mapCallbackHandler.addCallback(t,o,i,r,n),a){s=this.mapCallbackHandler.getModifiedCallback(t,o,i);for(var p=0,h=a._getLayerIds();p<h.length;p++)c=h[p],this.map._getMap().on(t,c,s)}},Ch.prototype._addGlobalListener=function(t,e,i,r){var n=this.mapCallbackHandler.getModifiedCallback(t,"",e);if(n&&this.map._getMap().off(t,n),this.mapCallbackHandler.addCallback(t,"",e,i,r),n=this.mapCallbackHandler.getModifiedCallback(t,"",e),"load"===t&&this.map._isLoaded()){var o={type:"load",map:this.map};setTimeout((function(){return n(o)}))}else if("ready"===t){if(this.map._isReady()){var a={type:"ready",map:this.map};setTimeout((function(){return n(a)}))}}else this.map._getMap().on(t,n)},Ch.prototype.invoke=function(t,e,i){if(void 0===i)this._invokeListeners(t,"",e);else if(e instanceof oo&&oo._isMBoxEvent(t))this._invokeListeners(t,e.getId(),i);else{if(!(e instanceof gn))throw new Error("The invoke target is invalid.");e._invokeEvent(t,i)}},Ch.prototype._invokeListeners=function(t,e,i){var r=this,n=this.mapCallbackHandler.getEventCallbacks(t,e);n?n.forEach((function(n,o){n[0],n[1]&&r._removeListener(t,e,o),o(i)})):"error"===t&&console.error("error"in i?i.error:i)},Ch.prototype.remove=function(t,e,i){if("function"==typeof e)this._removeListener(t,"",e);else for(var r=0,n=e=Array.isArray(e)?e:[e];r<n.length;r++){var o=n[r];o instanceof oo&&oo._isMBoxEvent(t)?this._removeListener(t,o,i):o._removeEventListener(t,i)}},Ch.prototype._removeLegacy=function(t,e,i){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,i)},Ch.prototype._removeListener=function(t,e,i){var r=e instanceof oo?e.getId():e,n=this.mapCallbackHandler.getModifiedCallback(t,r,i);if(n)if(r){var o=this.map.layers.getLayerById(r);if(o)for(var a=0,s=o._getLayerIds();a<s.length;a++){var l=s[a];this.map._getMap().off(t,l,n)}}else this.map._getMap().off(t,n);this.mapCallbackHandler.removeCallback(t,r,i)},Ch.prototype._enableLayerEvents=function(t){var e=this,i=this.mapCallbackHandler.getLayerCallbacks(t.getId());i&&i.forEach((function(i,r){i.forEach((function(i){for(var n=i[0],o=0,a=t._getLayerIds();o<a.length;o++){var s=a[o];e.map._getMap().on(r,s,n)}}))}))},Ch.prototype._disableLayerEvents=function(t){var e=this,i=this.mapCallbackHandler.getLayerCallbacks(t.getId());i&&i.forEach((function(i,r){i.forEach((function(i){for(var n=i[0],o=0,a=t._getLayerIds();o<a.length;o++){var s=a[o];e.map._getMap().off(r,s,n)}}))}))},Ch);function Ch(t){this.map=t,this.mapCallbackHandler=new wh(this.map)}var Ih=(Eh.prototype.add=function(t,e){if(Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._addMarker(n,e)}else this._addMarker(t,e)},Eh.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},Eh.prototype.getMarkers=function(){return Array.from(this.markers)},Eh.prototype.remove=function(t){if(Array.isArray(t))for(var e=0,i=t;e<i.length;e++){var r=i[e];this._removeMarker(r)}else this._removeMarker(t)},Eh.prototype._removeMarker=function(t){var e=this;t instanceof Ra?(t._removeFromMap(),this.markers.delete(t)):this.markers.forEach((function(i){i._getId()===t&&(i._removeFromMap(),e.markers.delete(i))}))},Eh.prototype.clear=function(){var t=this;this.markers.forEach((function(e){e._removeFromMap(),t.markers.delete(e)}))},Eh);function Eh(t){this.markers=new Set,this.map=t}var Mh=(Ah.prototype.add=function(t,e){var i=this;return new Promise((function(r,n){if(i.userImages.has(t))r();else if(e instanceof HTMLImageElement||e instanceof ImageData)i.map._getMap().addImage(t,e),i.userImages.set(t,e),r();else if("string"==typeof e){var o,a;a=/<svg/i.test(e)&&!/^data:/i.test(e)?"data:image/svg+xml;base64,"+window.btoa(e):e;var s=!1;i.map._sendRequest(a,"Image").then((function(t){if(!s)return t.blob()})).then((function(e){if(!s){clearTimeout(o);var a=new Image;a.onload=function(){i.map._getMap().addImage(t,a),i.userImages.set(t,a),r()},a.onerror=a.onabort=function(){n("Failed to load image into HTML element.")},a.src=URL.createObjectURL(e)}})).catch((function(){s||(clearTimeout(o),n("Failed to load image into HTML element."))})),o=setTimeout((function(){s=!0,n("Failed to load image within specified timeout: "+i.imageLoadTimeout+" ms.")}),i.imageLoadTimeout)}}))},Ah.prototype.clear=function(){var t=this;
2this.userImages.forEach((function(e,i){t.map._getMap().removeImage(i)})),this.userImages.clear()},Ah.prototype.getImageIds=function(){var t=[];return this.userImages.forEach((function(e,i){t.push(i)})),t},Ah.prototype.createFromTemplate=function(t,e,i,r,n){i=i||"#1A73AA",r=r||"#fff";var o=Bs(e,n);return o=o.replace(/{color}/g,i).replace(/{secondaryColor}/g,r).replace(/{text}/g,""),this.add(t,o)},Ah.prototype.hasImage=function(t){return this.userImages.has(t)},Ah.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},Ah.prototype._restoreImages=function(){var t=this;this.userImages.forEach((function(e,i){t.map._getMap().hasImage(i)||t.map._getMap().addImage(i,e)}))},Ah);function Ah(t){this.userImages=new mi,this.imageLoadTimeout=5e3,this.map=t}var Lh=(kh.prototype.add=function(t,e,i){void 0===i&&(i=!0);var r=e instanceof oo?e.getId():e;if(Array.isArray(t))for(var n=0,o=t;n<o.length;n++){var a=o[n];this._addLayer(a,r,i)}else this._addLayer(t,r,i)},kh.prototype._addLayer=function(t,e,i){if(e!==t.getId()&&this.layersById.has(e))if(this.layersById.has(t.getId())){var r=this.layers.findIndex((function(e){return e.getId()===t.getId()})),n=this.layers[r];i&&(this._removeMapboxLayers(n),this._addMapboxLayers(t,e)),this.map.events._disableLayerEvents(n),this.map.events._enableLayerEvents(t),this.layersById.set(t.getId(),t),this.layers.splice(r,1);var o=this.layers.findIndex((function(t){return t.getId()===e}));this.layers.splice(o,0,t),n.onRemove(),t.onAdd(this.map)}else i&&this._addMapboxLayers(t,e),o=this.layers.findIndex((function(t){return t.getId()===e})),this.layers.splice(o,0,t),this.layersById.set(t.getId(),t),this.map.events._enableLayerEvents(t),t.onAdd(this.map);else this.layersById.has(t.getId())?(r=this.layers.findIndex((function(e){return e.getId()===t.getId()})),n=this.layers[r],i&&(this._removeMapboxLayers(n),this._addMapboxLayers(t,r+1)),this.map.events._disableLayerEvents(n),this.map.events._enableLayerEvents(t),this.layersById.set(t.getId(),t),this.layers[r]=t,n.onRemove()):(i&&this._addMapboxLayers(t),this.layersById.set(t.getId(),t),this.layers.push(t),this.map.events._enableLayerEvents(t)),t.onAdd(this.map)},kh.prototype._addMapboxLayers=function(t,e){if(!this.map._isReady())throw new Error("The layer '"+t.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");if(!(t instanceof ma)||t.getOptions().tileUrl){t instanceof Lo&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());for(var i=this._getMapboxBefore(e),r=0,n=t._buildLayers();r<n.length;r++){var o=n[r];this.map._getMap().addLayer(o,i)}}},kh.prototype._removeMapboxLayers=function(t){for(var e=0,i=t._getLayerIds();e<i.length;e++){var r=i[e];this.map._getMap().getLayer(r)&&this.map._getMap().removeLayer(r)}t instanceof Lo&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())},kh.prototype._getMapboxBefore=function(t){if("string"==typeof t){var e=this.layersById.get(t);if(!e)return;for(var i=0,r=e._getLayerIds();i<r.length;i++){var n=r[i];if(this.map._getMap().getLayer(n))return n}t=this.layers.findIndex((function(e){return e.getId()===t}))+1}for(var o=t;o<this.layers.length;o++)for(var a=0,s=this.layers[o]._getLayerIds();a<s.length;a++)if(n=s[a],this.map._getMap().getLayer(n))return n},kh.prototype.clear=function(){for(var t=this.layers.length-1;0<=t;t--){var e=this.layers[t];this._removeMapboxLayers(e),this.map.events._disableLayerEvents(e),this.layersById.delete(e.getId()),this.layers.splice(t,1),e.onRemove()}},kh.prototype.getLayerById=function(t){return this.layersById.get(t)},kh.prototype.getLayers=function(){return this.layers.slice(0)},kh.prototype._getSourceIds=function(){for(var t=new Set,e=0,i=this.layers;e<i.length;e++)i[e]._getSourceIds().forEach((function(e){return t.add(e)}));return t},kh.prototype.move=function(t,e){var i=t instanceof oo?t.getId():t,r=e instanceof oo?e.getId():e;if(!this.layersById.has(i))throw new Error("The layer '"+i+"' has not been added to the map and cannot be moved.");var n=this.layers.findIndex((function(t){return t.getId()===i}));if(this._moveMapboxLayers(this.layers[n],r),t=this.layers[n],this.layers.splice(n,1),this.layersById.has(r)){var o=this.layers.findIndex((function(t){return t.getId()===r}));this.layers.splice(o,0,t)}else this.layers.push(t)},kh.prototype._moveMapboxLayers=function(t,e){for(var i=this._getMapboxBefore(e),r=0,n=t._getLayerIds();r<n.length;r++){var o=n[r];this.map._getMap().moveLayer(o,i)}}
2,kh.prototype.getRenderedShapes=function(t,e,i){var r,n,o=this;if(t=t||[-180,-85.0511,180,85.0511],Array.isArray(t)?4===t.length||6===t.length?r=this.map.positionsToPixels([In.getSouthWest(t),In.getNorthEast(t)]):2!==t.length&&3!==t.length||(r=this.map.positionsToPixels([t])[0]):r=this.map.positionsToPixels([t.coordinates])[0],e){n=[];for(var a=0,s=e=Array.isArray(e)?e:[e];a<s.length;a++){var l=s[a],u=l instanceof oo?l.getId():l;if(!this.layersById.has(u))throw new Error("The layer '"+u+"' has not been added to the map and its rendered features cannot be retrieved.");n.push.apply(n,this.layersById.get(u)._getLayerIds().filter((function(t){return!!o.map._getMap().getLayer(t)})))}}var c=this.map._getMap().queryRenderedFeatures(r,{layers:n,filter:i});return this.map.sources._mapFeaturesToShapes(c)},kh.prototype.remove=function(t,e){if(void 0===e&&(e=!0),Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._removeLayer(n,e)}else this._removeLayer(t,e)},kh.prototype._removeLayer=function(t,e){var i=t instanceof oo?t.getId():t;if(!this.layersById.has(i))throw new Error("The layer '"+i+"' has not been added to the map and cannot be removed.");var r=this.layers.findIndex((function(t){return t.getId()===i})),n=this.layers[r];e&&this._removeMapboxLayers(n),this.layersById.delete(i),this.layers.splice(r,1),this.map.events._disableLayerEvents(n),n.onRemove()},kh);function kh(t){this.layersById=new mi,this.layers=[],this.map=t}var Ph=(Dh.prototype.add=function(t){for(var e=0,i=t=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];this.popups.has(r)||(this.popups.add(r),r.attach(this.map))}},Dh.prototype.clear=function(){var t=this;this.popups.forEach((function(e){t.popups.delete(e),e.remove()}))},Dh.prototype.remove=function(t){for(var e=0,i=t=Array.isArray(t)?t:[t];e<i.length;e++){var r=i[e];this.popups.has(r)&&(this.popups.delete(r),r.remove())}},Dh.prototype.getPopups=function(){return Array.from(this.popups)},Dh.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+Dh.Css.collection);return t||((t=document.createElement("div")).classList.add(Dh.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Dh.prototype._addDraggedPopup=function(t){0===this.draggedPopups.size&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp)),this.draggedPopups.add(t)},Dh.Css={collection:"popup-collection-container"},Dh);function Dh(t){var e=this;this._onDrag=function(t){var i,r;"mousemove"===t.type?(i=t.clientX,r=t.clientY):"touchmove"===t.type&&(i=t.touches[0].clientX,r=t.touches[0].clientY),e.draggedPopups.forEach((function(t){t._dragToPixel([i,r])}))},this._onUp=function(){e.map.getMapContainer().removeEventListener("mousemove",e._onDrag),e.map.getMapContainer().removeEventListener("touchmove",e._onDrag),e.map.getMapContainer().removeEventListener("mouseup",e._onUp),e.map.getMapContainer().removeEventListener("touchend",e._onUp),e.draggedPopups.forEach((function(t){e.draggedPopups.delete(t),t._onUp()}))},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var zh=(Oh.prototype.add=function(t,e){if(void 0===e&&(e=!0),Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._addSource(n,e)}else this._addSource(t,e)},Oh.prototype.getRenderedShapes=function(t,e,i){var r="string"==typeof t?t:t.getId(),n=this.map._getMap().querySourceFeatures(r,{sourceLayer:i,filter:e});return this.map.sources._mapFeaturesToShapes(n,!0,this.sources.get(r))},Oh.prototype._buildSources=function(){var t={};return this.sources.forEach((function(e){t[e.getId()]=e._buildSource()})),t},Oh.prototype.clear=function(){var t=this;this.sources.forEach((function(e){t.remove(e)}))},Oh.prototype.getById=function(t){return this.sources.get(t)},Oh.prototype.getSources=function(){return Array.from(this.sources.values())},Oh.prototype.isSourceLoaded=function(t){var e=t instanceof Hn?t.getId():t;return this.map._getMap().isSourceLoaded(e)},Oh.prototype.remove=function(t,e){if(void 0===e&&(e=!0),Array.isArray(t))for(var i=0,r=t;i<r.length;i++){var n=r[i];this._removeSource(n,e)}else this._removeSource(t,e)},Oh.prototype._removeSource=function(t,e){var i=t instanceof Hn?t.getId():t;if(this.sources.has(i)){if(this.map._getMap().getSource(i)&&e&&this.map._getMap().removeSource(i),this.map._getMap().getSource(i)&&e)throw new Error("One or more layers have a dependency on the source '"+i+"'");return this.sources.get(i)._setMap(null),void this.sources.delete(i)}throw new Error("'"+i+"' is not added to the map")},Oh.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'"+t.getId()+"' is already added to the map");this.sources.get(t.getId())._setMap(null),this.sources.delete(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '"+t.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(t.getId(),t._buildSource())}this.sources.set(t.getId(),t),t._setMap(this.map)}
2,Oh.prototype._mapFeaturesToShapes=function(t,e,i){for(var r=[],n=0,o=t;n<o.length;n++){var a=o[n];if((i||"string"==typeof a.source)&&"string"==typeof a.properties[Sn._shapeIdPropName]){var s=i||this.sources.get(a.source);if(s instanceof Kn){var l=s.getShapeById(a.properties[Sn._shapeIdPropName]);if(l instanceof Sn){r.push(l);continue}}}e||r.push(a)}return r},Oh);function Oh(t){this.map=t,this.sources=new mi}var Nh,Rh=(d(Bh,Nh=y),Bh);function Bh(){var t=null!==Nh&&Nh.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var jh,Fh=(d(Uh,jh=y),Uh);function Uh(){var t=null!==jh&&jh.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var Vh,qh=(d(Gh,Vh=y),Gh.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var n=r[i];n&&"number"==typeof n.padding&&(n.padding={top:n.padding,bottom:n.padding,left:n.padding,right:n.padding})}return Vh.prototype.merge.apply(this,t)},Gh);function Gh(){var t=null!==Vh&&Vh.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new ar(0,0),t.padding=new Fh,t}var Zh,Hh=(d(Wh,Zh=y),Wh);function Wh(){var t=null!==Zh&&Zh.apply(this,arguments)||this;return t.zoom=1,t.center=new hn(0,0),t.centerOffset=new ar(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var Yh,Kh=(d(Xh,Yh=y),Xh);function Xh(){var t=null!==Yh&&Yh.apply(this,arguments)||this;return t.name=void 0,t.before=void 0,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.defer=!1,t.opacity=1,t}var Jh,Qh=(d($h,Jh=Kh),$h);function $h(){var t=null!==Jh&&Jh.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}var td,ed=(d(id,td=Kh),id);function id(){var t=null!==td&&td.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var rd,nd=(d(od,rd=Kh),od);function od(){var t=null!==rd&&rd.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=void 0,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}var ad,sd=(d(ld,ad=Kh),ld);function ld(){var t=null!==ad&&ad.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var ud,cd=(d(pd,ud=Kh),pd);function pd(){var t=null!==ud&&ud.apply(this,arguments)||this;return t.name="default-raster",t}var hd,dd=(d(fd,hd=y),fd);function fd(){var t=null!==hd&&hd.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var md,gd=(d(yd,md=y),yd.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var n=r[i];n&&(n.hasOwnProperty("view")?n.userRegion=n.view:n.hasOwnProperty("userRegion")&&(n.view=n.userRegion),"string"==typeof n.language&&(n.language=rs.getCode(n.language)))}return md.prototype.merge.apply(this,t)},yd);function yd(){var t=null!==md&&md.apply(this,arguments)||this;return t.autoResize=!0,t.language=Is(),t.light=new dd,t.preserveDrawingBuffer=!1,t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.showTileBoundaries=!1,t.style="road",t.view=As(),t.userRegion=t.view,t}var vd,_d=(d(xd,vd=y),xd);function xd(){var t=null!==vd&&vd.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var bd,wd=(d(Sd,bd=y),Sd.prototype.merge=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var r=0,n=e;r<n.length;r++){var o=n[r];o&&(o.authOptions?"string"==typeof o.authOptions.subscriptionKey&&(o.subscriptionKey=o["subscription-key"]=o.authOptions.subscriptionKey):"string"==typeof o.subscriptionKey?(o["subscription-key"]=o.subscriptionKey,o.authOptions={authType:t.AuthenticationType.subscriptionKey,subscriptionKey:o.subscriptionKey}):"string"==typeof o["subscription-key"]&&(o.subscriptionKey=o["subscription-key"],o.authOptions={authType:t.AuthenticationType.subscriptionKey,subscriptionKey:o["subscription-key"]}),"string"==typeof o.sessionId?o["session-id"]=o.sessionId:"string"==typeof o["session-id"]&&(o.sessionId=o["session-id"]),"boolean"==typeof o.disableTelemetry?o["disable-telemetry"]=o.disableTelemetry:"boolean"==typeof o["disable-telemetry"]&&(o.disableTelemetry=o["disable-telemetry"]),"boolean"==typeof o.enableAccessibility?o["enable-accessibility"]=o.enableAccessibility:"boolean"==typeof o["enable-accessibility"]&&(o.enableAccessibility=o["enable-accessibility"]))}var a=bd.prototype.merge.apply(this,e);return a.authOptions.authType!==t.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),a},Sd._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Sd);function Sd(){var t=null!==bd&&bd.apply(this,arguments)||this;return t.authOptions=Ss(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=Ts(),t.styleDefinitionsPath=Cs(),t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.refreshExpiredTiles=!0,t.subscriptionKey=Ms(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Es(),t["session-id"]=t.sessionId,t.transformRequest=void 0,t}var Td=function(){this.version=8,this.sprite="",this.glyphs="",this.light={},this.sources={},this.layers=[]},Cd=(Id.prototype.build=function(t){var e=new Td;if(null!=this.glyphs&&(e.glyphs=this.glyphs),null!=this.sprite&&(e.sprite=this.sprite),null!=t.light&&Object.assign(e.light,t.light),null!=this.map.sources&&(e.sources=this.map.sources._buildSources()),null!=this.map.layers)for(var i=0,r=this.map.layers.getLayers();i<r.length;i++){var n=r[i];e.layers=e.layers.concat(n._buildLayers()),n instanceof Lo&&(e.sources[n._getSourceId()]=n._buildSource())}return e},Id.prototype.setGlyphs=function(t){this.glyphs=t},Id.prototype.setSprite=function(t){this.sprite=t},Id);function Id(t){this.sprite="",this.glyphs="{fontstack}/{range}",this.map=t}var Ed,Md=(d(Ad,Ed=oo),Ad.prototype._buildLayers=function(){return this.layers},Ad.prototype._getLayerIds=function(){return this.layers.map((function(t){return t.id}))},Ad.prototype._getSourceIds=function(){for(var t=new Set,e=0,i=this.layers;e<i.length;e++){var r=i[e];"string"==typeof r.source?t.add(r.source):r.source&&t.add(r.id)}return t},Ad);function Ad(t,e){var i=Ed.call(this,e)||this;return i.layers=t,i}var Ld,kd=(d(Pd,Ld=Hn),Pd.prototype._buildSource=function(){return this.source},Pd.prototype._modifySource=function(t,e){var i=t.tiles.map((function(t){return"string"==typeof t?t:new w({domain:c,path:t.path,queryParams:f(f({},e),t.queryParams)}).toString()}));return t.tiles=i,t},Pd);function Pd(t,e,i){var r=Ld.call(this,t)||this;return r.source=r._modifySource(e,i),r}var Dd=(zd.prototype.initialize=function(){var t=this;return this.initPromise||(this.initPromise=this.request(l,this._serviceOptions.styleDefinitionsPath).then((function(e){t.definitions=e})).catch((function(t){throw new Error("Failed to retrieve the style definitions: "+t)}))),this.initPromise},zd.prototype.getStyleComponents=function(t){return m(this,void 0,void 0,(function(){var e,i,r,n=this;return g(this,(function(o){return e=new Set,i=this.lookUp(t),r=i.layerGroups.map((function(i){return m(n,void 0,void 0,(function(){var r,n,o,a,s,l,u;return g(this,(function(c){switch(c.label){case 0:return r=i.layerPath,n=i.name,o={language:t.language},t.view&&(o.view=encodeURIComponent(t.view)),[4,this.buildComponent(n,r,o,e)];case 1:for(a=c.sent(),s=0,l=a.layer.layers;s<l.length;
2s++)"fill-extrusion"===(u=l[s]).type&&(u.layout=u.layout||{},u.layout.visibility=t.showBuildingModels?"visible":"none");return[2,a]}}))}))})),[2,Promise.all(r)]}))}))},zd.prototype.getFlowComponent=function(t,e){return m(this,void 0,void 0,(function(){var i;return g(this,(function(r){return i=this.getFlowPath(t,e),[2,this.buildComponent("flow",i)]}))}))},zd.prototype.getCopyrightCaption=function(t){var e=this.lookUp(t).copyright.join(" ");return t.showLogo||(e+=" ©2019 Microsoft"),e},zd.prototype.getSprite=function(t){var e=this.lookUp(t);return new w({domain:this.definitions.domain,path:e.spritePath}).toString()},zd.prototype.getGlyphs=function(t){var e=this.lookUp(t);return new w({domain:this.definitions.domain,path:e.glyphsPath}).toString()},zd.prototype.getFlowPath=function(t,e){return this.lookUp(t).flowPaths[e.flow]},zd.prototype.getTheme=function(t){return this.lookUp(t).theme.toLowerCase()||"light"},zd.prototype.getDef=function(){return this.definitions},zd.prototype.lookUp=function(t){for(var e,i=t.style||this.definitions.defaultStyle,r=0,n=this.definitions.styles;r<n.length;r++){var o=n[r];if(o.name===i)return o;o.name===this.definitions.defaultStyle&&(e=o)}return e},zd.prototype.request=function(t,e){return m(this,void 0,void 0,(function(){return g(this,(function(i){return[2,new w({domain:t,path:e}).get()]}))}))},zd.prototype.buildComponent=function(t,e,i,r){return m(this,void 0,void 0,(function(){return g(this,(function(n){return[2,this.request(this.definitions.domain,e).then((function(e){var n=new Md(e.layers,t),o=[],a=e.sources;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=l.name||s;if(r){if(r.has(u))continue;r.add(u)}o.push(new kd(u,l,i))}return{layer:n,sources:o}}))]}))}))},zd);function zd(t){this._serviceOptions=t}var Od=(Nd.prototype.getCanvas=function(){return this.map.getCanvas()},Nd.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},Nd.prototype.getMapContainer=function(){return this.map.getContainer()},Nd.prototype.getServiceOptions=function(){return Vn(this.serviceOptions,wd._cloneCustomizer)},Nd.prototype.setServiceOptions=function(t){this.serviceOptions=(new wd).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},Nd.prototype.setCamera=function(t,e){var i,r;if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var n=(new qh).merge({maxZoom:this.getCamera().maxZoom},t),o=this._generateSafeBounds(n.bounds);if(!(i=this.map.cameraForBounds(o,{padding:n.padding,offset:n.offset,maxZoom:n.maxZoom})))throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");this.map.setMaxZoom(n.maxZoom),r=this._generateSafeBounds(n.maxBounds)}else{var a=(new Hh).merge(this.getCamera(),t);if(a.centerOffset&&2<=a.centerOffset.length){var s=a.centerOffset,l=Jr([a.center],a.zoom);l[0][0]+=s[0],l[0][1]+=s[1],a.center=Xr(l,a.zoom)[0]}i={center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,around:void 0},this.map.setMinZoom(a.minZoom),this.map.setMaxZoom(a.maxZoom),r=this._generateSafeBounds(a.maxBounds)}r?this.map.setMaxBounds(r):this.map.setMaxBounds(null);var u=(new Rh).merge(t),c={duration:u.duration,easing:function(t){return t},offset:[0,0],animate:!0},p={fromControl:e};"jump"===u.type?this.map.jumpTo(i,p):"ease"===u.type?this.map.easeTo(f(f({},i),c),p):"fly"===u.type&&this.map.flyTo(f(f({},i),c),p)},Nd.prototype.setCameraBounds=function(t){this.setCamera(t)},Nd.prototype.getCamera=function(){var t=this.map.getBounds().getSouthWest
2().toArray(),e=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new In(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},Nd.prototype.setStyle=function(e){delete e.preserveDrawingBuffer;var i=(new gd).merge(this.styleOptions,e);i.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(i.autoResize),i.language!==this.styleOptions.language&&(this.localizedStringsPromise=rs.getStrings(i.language)),i.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(i.renderWorldCopies),i.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:i.showFeedbackLink}),i.showLogo&&!this.logoControl?(this.logoControl=new Cp,this.controls.add(this.logoControl,{position:t.ControlPosition.NonFixed})):!i.showLogo&&this.logoControl&&(this.controls.remove(this.logoControl),delete this.logoControl),i.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=i.showTileBoundaries),this._setStyleComponents(i),this.styleOptions=i},Nd.prototype.getStyle=function(){return fi(this.styleOptions)},Nd.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},Nd.prototype.addPins=function(t,e){var i,r=(new nd).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new ua(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,iconOptions:{anchor:"center",size:r.iconSize,image:["case",["has","icon"],["get","icon"],r.icon],ignorePlacement:!r.cluster,opacity:r.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],r.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[r.textFont]]],size:["case",["has","point_count"],20,r.fontSize],ignorePlacement:!r.cluster,opacity:r.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[r.textOffset[0]/16,r.textOffset[1]/16]]],color:r.fontColor}})),!(n instanceof ua))throw new Error("A layer with name '"+r.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Kn(i,{cluster:r.cluster})),!(a instanceof Kn))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Mn(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},Nd.prototype.addCircles=function(t,e){var i,r=(new Qh).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new mo(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,opacity:r.opacity,radius:["case",["has","radius"],["get","radius"],r.radius],color:["case",["has","color"],["get","color"],r.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],r.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],r.outlineWidth]})),!(n instanceof mo))throw new Error("A layer with name '"+r.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Kn(i)),!(a instanceof Kn))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Mn(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},Nd.prototype.addLinestrings=function(t,e){var i,r=(new ed).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new jo(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,lineCap:r.cap,lineJoin:r.join,strokeOpacity:r.opacity,strokeColor:["case",["has","color"],["get","color"],r.color],strokeWidth:["case",["has","width"],["get","width"],r.width]})),!(n instanceof jo))throw new Error("A layer with name '"+r.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");
2var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Kn(i)),!(a instanceof Kn))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Mn(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},Nd.prototype.addPolygons=function(t,e){var i,r=(new sd).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new Jo(r.name+"-source",r.name,{source:r.name+"-source",minZoom:r.minZoom,maxZoom:r.maxZoom,fillOpacity:r.opacity,fillColor:["case",["has","color"],["get","color"],r.color]})),!(n instanceof Jo))throw new Error("A layer with name '"+r.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var a=n.getSource();"string"==typeof a?(i=a,a=this.sources.getById(i)):i=a.getId();var s=!1;if(a||(s=!0,a=new Kn(i)),!(a instanceof Kn))throw new Error("The source with name '"+i+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");s&&this.sources.add(a),o&&this.layers.add(n,r.before);var l=new Mn(t);r.defer?(r.overwrite&&a._clearNoUpdate(),a._addNoUpdate(l)):r.overwrite?a.setShapes(l):a.add(l)},Nd.prototype.addRaster=function(t,e){var i,r=(new cd).merge(e),n=this.layers.getLayerById(r.name),o=!1;if(n||(o=!0,n=new ma({maxZoom:r.maxZoom,minZoom:r.minZoom,opacity:r.opacity,tileSize:256,tileUrl:"{subdomain}"},r.name)),!(n instanceof ma))throw new Error("A layer with name '"+r.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==n.getOptions().tileUrl)throw new Error("A TileLayer with name '"+r.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(i=!r.overwrite&&n.getOptions().subdomains||[]).push.apply(i,t),n._setOptionsNoUpdate({subdomains:i}),r.defer?o&&this.layers.add(n,r.before,!1):this.layers.add(n,r.before)},Nd.prototype.getLayers=function(){return this.layers.getLayers().map((function(t){return t.getId()}))},Nd.prototype.removeLayers=function(t){for(var e=0,i=t;e<i.length;e++){var r=i[e];if(this.layers.getLayerById(r)){this.layers.remove(r);var n=r+"-source";this.sources.getById(n)&&this.sources.remove(n)}}},Nd.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+ir());var i=new Ra({htmlContent:t});return this.markers.add(i,e),t.id},Nd.prototype.removeHtml=function(t){this.markers.remove(t)},Nd.prototype.addEventListener=function(t,e,i){this.events._addLegacy(t,e,i)},Nd.prototype.removeEventListener=function(t,e,i){this.events._removeLegacy(t,e,i)},Nd.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},Nd.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},Nd.prototype.addControl=function(t,e){this.controls.add(t,e)},Nd.prototype.removeControl=function(t){this.controls.remove(t)},Nd.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,i=this.trafficOptions.flow;if(this.trafficOptions=(new _d).merge(this.trafficOptions,t),this.trafficOptions.incidents?e||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap(),this.trafficOptions.flow&&"none"!==this.trafficOptions.flow)try{this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=i,t}else this.flowDelegate.removeFromMap()},Nd.prototype.getTraffic=function(){return fi(this.trafficOptions)},Nd.prototype.remove=function(){this.dispose()},Nd.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},Nd.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},Nd.prototype.resize=function(t,e,i){if("number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e)i=t;else{var r=t;this.getMapContainer().style.height="number"==typeof r?r+"px":r,this.getMapContainer().style.width="number"==typeof e?e+"px":e}var n=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(i),this.getMapContainer().style.overflow=n},Nd.prototype.pixelsToPositions=function(t){for(var e=[],i=0,r=t;i<r.length;i++){var n=r[i],o=this.map.unproject(n);e.push(new hn(o.lng,o.lat))}return e},Nd.prototype.positionsToPixels=function(t){for(var e=[],i=0,r=t;i<r.length;i++){var n=r[i],o=this.map.project(n);e.push(new ar(o.x,o.y))}return e},Nd.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},Nd.prototype.stop=function(){this.map.stop()},Nd.prototype._getMap=function(){return this.map},Nd.prototype._rebuildStyle=function(){this.map.setStyle(this.styleBuilder.build(this.styleOptions)),this.imageSprite._restoreImages()},Nd.prototype._isLoaded=function(){return this.loaded},Nd.prototype._isReady=function(){return this.ready},Nd.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise}
2,Nd.prototype._sendRequest=function(t,e,i){var r;return"function"==typeof this.serviceOptions.transformRequest&&(r=this.serviceOptions.transformRequest(t,e)),r?fetch(r.url||t,{credentials:r.credentials,headers:f(f({},i),r.headers),method:"GET",mode:"cors"}):fetch(t,{headers:i,method:"GET",mode:"cors"})},Nd.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},Nd.prototype._setStyleComponents=function(t){var e=this;this.styles.getStyleComponents(t).then((function(i){if(!e.removed){e.copyrightControl.setOptions({copyrightMessage:e.styles.getCopyrightCaption(t)}),e.styleBuilder.setGlyphs(e.styles.getGlyphs(t)),e.styleBuilder.setSprite(e.styles.getSprite(t));for(var r=new Set,n=new Set,o=0,a=i;o<a.length;o++){var s=a[o];r.add(s.layer.getId());for(var l=0,u=s.sources;l<u.length;l++){var c=u[l];n.add(c.getId())}}e.styleLayerIds.forEach((function(t){r.has(t)||(e.layers.getLayerById(t)&&e.layers.remove(t,!1),e.styleLayerIds.delete(t))}));for(var p=function(t){var r=i[t].layer;if(e.styleLayerIds.add(r.getId()),e.layers.getLayerById(r.getId()))e.layers.add(r,void 0,!1);else if(0===t)e.layers.add(r,e.layers.getLayers()[0],!1);else{var n=i[t-1].layer,o=e.layers.getLayers(),a=o.findIndex((function(t){return t.getId()===n.getId()}));e.layers.add(r,o[a+1],!1)}},h=0;h<i.length;h++)p(h);var d=e.layers._getSourceIds();e.styleSourceIds.forEach((function(t){d.has(t)||n.has(t)||(e.sources.getById(t)&&e.sources.remove(t,!1),e.styleSourceIds.delete(t))}));for(var f=0,m=i;f<m.length;f++){s=m[f],e.sources.add(s.sources,!1);for(var g=0,y=s.sources;g<y.length;g++)c=y[g],e.styleSourceIds.add(c.getId())}e._rebuildStyle()}}))},Nd.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!js()&&ks(t.authOptions),t.domain&&!Fs()&&Ps(t.domain),t.styleDefinitionsPath&&!Us()&&Ds(t.styleDefinitionsPath),!t.subscriptionKey&&!t["subscription-key"]||js()||Ns(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||qs()||Os(t.sessionId||t["session-id"]),t.language&&!Vs()&&zs(t.language),!t.userRegion&&!t.view||Gs()||Rs(t.userRegion||t.view))},Nd.prototype._generateSafeBounds=function(t){if(t){var e=In.getSouth(t),i=In.getWest(t),r=In.getNorth(t),n=In.getEast(t);if(isNaN(e)||isNaN(i)||isNaN(r)||isNaN(n))throw new Error("The bounds specified are invalid: ["+t+"]");for(;n<i;)n+=360;return new In([i,e,n,r])}return t},Nd.prototype._detectHighContrast=function(){var t,e;switch(Qs.getHighContrastMode()){case"invert":t=Nd.Css.hcLight,e="high_contrast_dark";break;case"light":t=Nd.Css.hcLight,e="grayscale_light";break;case"dark":t=Nd.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},Nd.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},Nd);function Nd(e,i){var n=this;this.styleLayerIds=new Set,this.styleSourceIds=new Set,this.removed=!1,this.loaded=!1,this.ready=!1,this._windowResizeCallback=function(){return n.resize()};var o=!0;this._updateGlobalDefaults(i),this.serviceOptions=(new wd).merge(i),this.styleOptions=(new gd).merge(i),this.trafficOptions=new _d,this.styles=new Dd(this.serviceOptions),this.insights=new Sp(this.serviceOptions),this.serviceOptions.authOptions.subscriptionKey&&(this.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(this.serviceOptions.authOptions.subscriptionKey));var a,s={attributionControl:!1,container:e,preserveDrawingBuffer:this.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:this.serviceOptions.refreshExpiredTiles,renderWorldCopies:this.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var i={url:t};if("Tile"===e&&t.includes(c)){if(n.insights&&n.insights.trackEvent({name:"TileLoad"}),w.protoRegEx.test(n.serviceOptions.domain)){var r=t.indexOf(c);i.url=n.serviceOptions.domain+t.substring(r+c.length)}else i.url=t.replace(c,n.serviceOptions.domain);n.authentication.signRequest(i)}return n.serviceOptions.transformRequest&&Qa(i,n.serviceOptions.transformRequest(i.url,e)),i}};a=this.serviceOptions.authOptions.clientId?this.serviceOptions.authOptions.clientId:this.serviceOptions.authOptions.subscriptionKey?this.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting",this.insights&&this.insights.setAuthenticatedUserContext(this.serviceOptions.sessionId,a);try{var l=new r.Map(s);this.map=l,this.authentication=new vh(this),this.controls=new xh(this),this.events=new Th(this),this.imageSprite=new Mh(this),this.layers=new Lh(this),this.markers=new Ih(this),this.sources=new zh(this),this.popups=new Ph(this),this.styleBuilder=new Cd(this),this.map.getContainer().classList.add(Nd.Css.
2container),this.map.getCanvasContainer().classList.add(Nd.Css.canvasContainer),this.map.getCanvas().classList.add(Nd.Css.canvas),this._detectHighContrast(),this.copyrightControl=new kp({showFeedbackLink:this.styleOptions.showFeedbackLink}),this.controls.add(this.copyrightControl,{position:t.ControlPosition.NonFixed}),this.styleOptions.showLogo&&(this.logoControl=new Cp,this.controls.add(this.logoControl,{position:t.ControlPosition.NonFixed}));var u=this.authentication.initialize();if(this.removed)return;var p=function(){n.loaded=!0,n.map.off("load",p)};this.map.on("load",p);var h=function(){n.ready=!0,n.map.off("styledata",h);var t={map:n,type:"ready"};n.events.invoke("ready",t)};this.map.on("styledata",h),this._setAutoResize(this.styleOptions.autoResize),this.map.showTileBoundaries=this.styleOptions.showTileBoundaries,this.localizedStringsPromise=rs.getStrings(this.styleOptions.language);var d=this.styles.initialize();Promise.all([u,d]).then((function(){if(!n.removed){if(!n.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");n.serviceOptions["enable-accessibility"]&&n.accessibleMapDelegate.addToMap(),n._setStyleComponents(n.styleOptions)}})).catch((function(t){var e=t instanceof Error?t:new Error(t);n.insights&&n.insights.trackException({error:e});var i={map:n,type:"error",error:e};n.events.invoke("error",i)})),this.setCamera(f(f({},i),{type:"jump",duration:0})),this.incidentDelegate=new ih(this),this.flowDelegate=new qp(this),this.accessibleMapDelegate=new Vp(this),this.userInteractionDelegate=new ph(this,i),this.userInteractionDelegate.addToMap()}catch(e){throw o=!1,this.insights&&this.insights.trackException({error:e instanceof Error?e:new Error(e)}),e}finally{this.insights&&(this.insights.trackEvent({name:"MapLoad"},{success:o,supported:Ls(!1),supportedWithPerformance:Ls(!0)}),this.insights.flush())}}var Rd=(Bd.applyTemplate=function(t,e){var i=this,r=document.createElement("div");if(r.classList.add(Bd.Css.template),t){"boolean"!=typeof(e=e||{}).singleDescription&&(e.singleDescription=!0),e.sandboxContent="boolean"!=typeof e.sandboxContent||e.sandboxContent,e.title&&"string"==typeof e.content&&(e.content.includes("{title}")||e.content.includes("{name}"))||(t.title?e.title="{title}":t.name&&(e.title="{name}")),"boolean"!=typeof e.detectHyperlinks&&(e.detectHyperlinks=!0),"boolean"!=typeof e.parsePropertyPaths&&(e.parsePropertyPaths=!0),e.textColor&&(r.style.color=e.textColor),e.fillColor&&(r.style.backgroundColor=e.fillColor),e.title&&((a=this._applyStringTemplate(t,e.title,e)).innerText=a.textContent||a.innerText||"",this._appendChild(r,a,Bd.Css.title));var n=document.createElement("div");if(n.classList.add(Bd.Css.content),Array.isArray(e.content))0<e.content.length&&e.content[0].propertyPath?this._appendChild(n,this._generateContent(t,e.content,e),Bd.Css.item):e.content.forEach((function(r){i._appendChild(n,i._generateContent(t,r,e),Bd.Css.item)}));else{var o=0;t.description&&Object.keys(t).forEach((function(e){i._ignoreProperty(e,t[e])||o++}));var a=void 0;1===o||e.singleDescription&&t.description||2===o&&t.Snippet?(a=document.createElement("div")).innerHTML=t.description:a=this._generateContent(t,e.content,e),this._appendChild(n,a,Bd.Css.item)}""!==n.innerHTML&&(e.sandboxContent?r.appendChild(Bd._createSandboxedIframe(n,e)):r.appendChild(n))}return r},Bd._createSandboxedIframe=function(t,e){var i=document.createElement("iframe");i.sandbox.add("allow-popups");var r,n=t.innerHTML,o=!1,a=100,s=550,l=10;document.body.scrollWidth<=340&&(s=300,a=50);var u=n.split(/<(tr|div|br|li|h[0-9]|p>)/);r=Math.max.apply(Math,u.map((function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})))-1;var c=Math.ceil(3.5*r);if(c<s&&(s=c,a=r),n.includes("<img")||n.includes("<video"))o=!0,i.width="550px";else{var p=-1<n.indexOf(Bd.Css.table)?25:20;l+=Math.max(.5*u.length*p,Math.ceil(n.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/a)*p)}i.width=s+"px",i.height=o||280<l?"280px":l+"px";var h=e.textColor?"color:"+e.textColor+";":"",d=e.fillColor?"background-color:"+e.fillColor+";":"",f='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+Bd._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+h+d+'}</style></head><body><div class="'+Bd.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+n+"</div></body></html>";return void 0===i.srcdoc?i.src="data:text/html;charset=utf-8,"+encodeURI(f):i.srcdoc=f,i}
2,Bd._appendChild=function(t,e,i){e&&(i&&(e.className=(e.className?e.className+" ":"")+i),t.appendChild(e))},Bd._generateContent=function(t,e,i){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,i):this._applyStringTemplate(t,e,i);var r=this._generateDynamicTableHtml(t,null,i);if(r){var n=document.createElement("div");return n.innerHTML=r,n}return null},Bd._applyStringTemplate=function(t,e,i){if(e){for(var r=e,n=this._placeholderRx.exec(e);n;){if(2<=n.length){var o=this._getPropertyValue(t,n[1],i);r=r.replace(n[0],o)}n=this._placeholderRx.exec(e)}if(r){(r=r.trim()).includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>"));var a=document.createElement("div");return a.innerHTML=r,a}}return null},Bd._getPropertyValue=function(t,e,i,r){var n=i.parsePropertyPaths?e.split("/"):[e],o=n.length;if(0<o&&t){var a=n[0],s=t[a];if(i.detectHyperlinks&&"link"===e&&(!r||r.hyperlinkFormat)){var l=[];if(Array.isArray(s)?s.forEach((function(t){t.href?l.push(t):"string"==typeof t&&l.push({href:t})})):s.href&&l.push(s),0<l.length){var u,c;r&&r.hyperlinkFormat?u=r.hyperlinkFormat:i&&i.hyperlinkFormat&&(u=i.hyperlinkFormat),c=u&&u.target?u.target:"_blank";var p=[];return l.forEach((function(t){t.title||u&&u.label||!t.rel||p.push(t.rel," - "),p.push('<a href="',t.href,'" target="',c,'">'),t.title?p.push(t.title):u&&u.label?p.push(u.label):p.push(t.href),p.push("</a>","<br/>")})),p.pop(),p.join("")}}if(null!=s){var h=void 0;for(h=1;h<o&&(s=s[n[h]],a=n[h],null!=s);h++);if(h===o&&null!=s){var d=void 0;if((d=void 0!==s.value?s.value:s)instanceof Date)return r&&r.dateFormat?d.toLocaleString(void 0,r.dateFormat):i.dateFormat?d.toLocaleString(void 0,i.dateFormat):d.toISOString();if("object"==typeof d)return(v=this._generateDynamicTableHtml(d,n.slice(1),i))||"";if("number"==typeof d){if(r){if(r.dateFormat)return new Date(d).toLocaleString(void 0,r.dateFormat);if(r.numberFormat)return d.toLocaleString(void 0,r.numberFormat)}else if(/(timestamp|date)/gi.test(a))return new Date(d).toISOString();return d.toLocaleString(void 0,i.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(i.detectHyperlinks||r&&r.hyperlinkFormat)){d=d.trim();var f=this._isUrlRx.test(d)||r&&r.hyperlinkFormat,m=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),g=this._emailRx.test(d);if(f||m||g){var y=void 0;r&&r.hyperlinkFormat?y=r.hyperlinkFormat:i&&i.hyperlinkFormat&&(y=i.hyperlinkFormat);var v=void 0;v=y&&y.target?' target="'+y.target+'"':' target="_blank"';var _=""+(y&&y.label?y.label:d);y&&y.scheme?d=y.scheme+d:g&&(d="mailto:"+d);var x=y&&y.label?' alt="'+y.label+'"':"";return(y&&y.isImage||m)&&(_='<img src="'+d+'" style="max-width:100%"'+x+'"/>'),'<a href="'+d+'"'+v+">"+_+"</a>"}}return d.toString()}}}return""},Bd._generatePropertyInfoTable=function(t,e,i){if(t&&e&&0<e.length){var r=[],n=this;r.push('<table class="'+n.Css.table+'">'),e.forEach((function(e){var o=n._getPropertyValue(t,e.propertyPath,i,e);if(e.hideLabel)r.push('<tr><td colspan="2">',o,"</td></tr>");else{var a=e.label||e.propertyPath.split("/")[0];
2r.push("<tr><th>",a,"</th><td>",o,"</td></tr>")}})),r.push("</table>");var o=document.createElement("div");return o.innerHTML=r.join(""),o}return null},Bd._generateDynamicTableHtml=function(t,e,i){var r=this;if(t){var n=[],o=this;n.push('<table class="'+o.Css.table+'">');var a=e&&0<e.length?e.join("/")+"/":"",s=0;return Object.keys(t).forEach((function(e){r._ignoreProperty(e,t[e])||(n.push("<tr><th>",e,"</th><td>",o._getPropertyValue(t,a+e,i),"</td></tr>"),s++)})),0===s?null:(n.push("</table>"),n.join(""))}return null},Bd._ignoreProperty=function(t,e){switch(t){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(0===t.indexOf("_")||null==e||""===e)return!0}return!1},Bd._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,Bd._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,Bd._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,Bd._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,Bd._cssUrl=new w({domain:l,path:"sdk/javascript/mapcontrol/"+I.getEndpointVersion()+"/atlas.min.css"}).toString(),Bd.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},Bd);function Bd(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}n(new w({domain:l,path:"sdk/javascript/mapcontrol/"+I.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"}).toString(),(function(t){t&&console.warn(t)}),!0),t.HtmlMarker=Ra,t.Map=Od,t.Pixel=ar,t.Popup=ka,t.PopupTemplate=Rd,t.Shape=Sn,t._getAssetDomain=function(){return s},t._getDomain=function(){return Ts()},t._hasSetAuthenticationOptions=js,t._hasSetDomain=Fs,t._hasSetLanguage=Vs,t._hasSetSessionId=qs,t._hasSetStyleDefinitionsPath=Us,t._hasSetView=Gs,t.addImageTemplate=function(t,e,i){!i&&Js[t.toLowerCase()]||(Js[t.toLowerCase()]=e)},t.control=Ni,t.data=Un,t.getAllImageTemplateNames=function(){return Object.keys(Js)},t.getAuthenticationOptions=Ss,t.getDomain=Ts,t.getImageTemplate=Bs,t.getLanguage=Is,t.getSessionId=Es,t.getStyleDefinitionsPath=Cs,t.getSubscriptionKey=Ms,t.getUserRegion=function(){return us},t.getVersion=function(){return I.getFullVersion()},t.getView=As,t.internal=vn,t.isSupported=Ls,t.layer=ya,t.math=wn,t.setAuthenticationOptions=ks,t.setDomain=Ps,t.setLanguage=zs,t.setSessionId=Os,t.setStyleDefinitionsPath=Ds,t.setSubscriptionKey=Ns,t.setUserRegion=Rs,t.setView=function(t){us=t,ys=!0},t.source=no,Object.defineProperty(t,"__esModule",{value:!0})}(s.exports),s.exports),u=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(l);const c=(0,r.createContext)({mapRef:null,isMapReady:!1,setMapRef:t=>{},removeMapRef:()=>{},setMapReady:()=>{}}),{Provider:p,Consumer:h}=c,d=({children:t})=>{const[e,i]=(0,r.useState)(null),[n,o]=(0,r.useState)(!1);return r.createElement(p,{value:{mapRef:e,setMapRef:i,isMapReady:n,setMapReady:o,removeMapRef:()=>i(null)}},t)},f=()=>(0,r.useContext)(c);function m(t,e,i){(0,r.useEffect)((()=>{if(t&&e)return i(t,e)}),[e])}function g(t,e,i){(0,r.useEffect)((()=>{if(t&&e)return i(t,e)}),[])}!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}(".mapboxgl-marker,.mapboxgl-popup{will-change:transform;top:0;left:0}.azure-maps-control-button,.popup-collection-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.incident-popup-subtitle,.incident-popup-title{text-transform:capitalize;text-overflow:ellipsis}.mapboxgl-map{font:12px/20px 'Helvetica Neue',Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:transparent}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-nav-compass{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-nav-compass:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan{-ms-touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan{-ms-touch-action:none;touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;-moz-box-shadow:0 0 2px rgba(0,0,0,.1);-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1);overflow:hidden;background:#fff}.mapboxgl-ctrl-group>button{width:30px;height:30px;display:block;padding:0;outline:0;border:none;border-bottom:1px solid #ddd;box-sizing:border-box;background-color:rgba(0,0,0,0);cursor:pointer}.mapboxgl-ctrl>button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl>button:last-child{border-bottom:0}.mapboxgl-ctrl>button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-icon,.mapboxgl-ctrl-icon>.mapboxgl-ctrl-compass-arrow{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mapboxgl-ctrl-icon{padding:5px}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out{background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23333333%3B%27%20d%3D%27m%207%2C9%20c%20-0.554%2C0%20-1%2C0.446%20-1%2C1%200%2C0.554%2
200.446%2C1%201%2C1%20l%206%2C0%20c%200.554%2C0%201%2C-0.446%201%2C-1%200%2C-0.554%20-0.446%2C-1%20-1%2C-1%20z%27%20%2F%3E%0A%3C%2Fsvg%3E%0A\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in{background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23333333%3B%27%20d%3D%27M%2010%206%20C%209.446%206%209%206.4459904%209%207%20L%209%209%20L%207%209%20C%206.446%209%206%209.446%206%2010%20C%206%2010.554%206.446%2011%207%2011%20L%209%2011%20L%209%2013%20C%209%2013.55401%209.446%2014%2010%2014%20C%2010.554%2014%2011%2013.55401%2011%2013%20L%2011%2011%20L%2013%2011%20C%2013.554%2011%2014%2010.554%2014%2010%20C%2014%209.446%2013.554%209%2013%209%20L%2011%209%20L%2011%207%20C%2011%206.4459904%2010.554%206%2010%206%20z%27%20%2F%3E%0A%3C%2Fsvg%3E%0A\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23333%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23aaa%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%2333b5e5%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23e58978%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%2333b5e5%3B%27%20d%3D%27M%2010%2C4%20C%209%2C4%209%2C5%209%2C5%20L%209%2C5.1%20C%207.0357113%2C5.5006048%205.5006048%2C7.0357113%205.1%2C9%20L%205%2C9%20c%200%2C0%20-1%2C0%20-1%2C1%200%2C1%201%2C1%201%2C1%20l%200.1%2C0%20c%200.4006048%2C1.964289%201.9357113%2C3.499395%203.9%2C3.9%20L%209%2C15%20c%200%2C0%200%2C1%201%2C1%201%2C0%201%2C-1%201%2C-1%20l%200%2C-0.1%20c%201.964289%2C-0.400605%203.499395%2C-1.935711%203.9%2C-3.9%20l%200.1%2C0%20c%200%2C0%201%2C0%201%2C-1%20C%2016%2C9%2015%2C9%2015%2C9%20L%2014.9%2C9%20C%2014.499395%2C7.0357113%2012.964289%2C5.5006048%2011%2C5.1%20L%2011%2C5%20c%200%2C0%200%2C-1%20-1%2C-1%20z%20m%200%2C2.5%20c%201.932997%2C0%203.5%2C1.5670034%203.5%2C3.5%200%2C1.932997%20-1.567003%2C3.5%20-3.5%2C3.5%20C%208.0670034%2C13.5%206.5%2C11.932997%206.5%2C10%206.5%2C8.0670034%208.0670034%2C6.5%2010%2C6.5%20Z%27%20%2F%3E%0A%3C%2Fsvg%3E\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23e54e33%3B%27%20d%3D%27M%2010%2C4%20C%209%2C4%209%2C5%209%2C5%20L%209%2C5.1%20C%207.0357113%2C5.5006048%205.5006048%2C7.0357113%205.1%2C9%20L%205%2C9%20c%200%2C0%20-1%2C0%20-1%2C1%200%2C1%201%2C1%201%2C1%20l%200.1%2C0%20c%200.4006048%2C1.964289%201.9357113%2C3.499395%203.9%2C3.9%20L%209%2C15%20c%200%2C0%200%2C1%201%2C1%201%2C0%201%2C-1%201%2C-1%20l%200%2C-0.1%20c%201.964289%2C-0.400605%203.499395%2C-1.935711%203.9%2C-3.9%20l%200.1%2C0%20c%200%2C0%201%2C0%201%2C-1%20C%2016%2C9%2015%2C9%2015%2C9%20L%2014.9%2C9%20C%2014.499395%2C7.0357113%2012.964289%2C5.5006048%2011%2C5.1%20L%2011%2C5%20c%200%2C0%200%2C-1%20-1%2C-1%20z%20m%200%2C2.5%20c%201.932997%2C0%203.5%2C1.5670034%203.5%2C3.5%200%2C1.932997%20-1.567003%2C3.5%20-3.5%2C3.5%20C%208.0670034%2C13.5%206.5%2C11.932997%206.5%2C10%206.5%2C8.0670034%208.0670034%2C6.5%2010%2C6.5%20Z%27%20%2F%3E%0A%3C%2Fsvg%3E\")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting{-webkit-animation:mapboxgl-spin 2s infinite linear;-moz-animation:mapboxgl-spin 2s infinite linear;-o-animation:mapboxgl-spin 2s infinite linear;-ms-animation:mapboxgl-spin 2s infinite linear;animation:mapboxgl-spin 2s infinite linear}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@-moz-keyframes mapboxgl-spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(360deg)}}@-o-keyframes mapboxgl-spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(360deg)}}@-ms-keyframes mapboxgl-spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(360deg)}}@keyframes mapboxgl-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mapboxgl-ctrl-icon.mapboxgl-ctrl-fullscreen{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4KCjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0iTGF5ZXJfMSIKICAgeD0iMHB4IgogICB5PSIwcHgiCiAgIHZpZXdCb3g9IjAgMCAyMCAyMCIKICAgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxIHIxMzcyNSIKICAgc29kaXBvZGk6ZG9jbmFtZT0iZnVsbHNjcmVlbi5zdmciPjxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQxODUiPjxyZGY6UkRGPjxjYzpXb3JrCiAgICAgICAgI
2HJkZjphYm91dD0iIj48ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD48ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxkZWZzCiAgICAgaWQ9ImRlZnM0MTgzIiAvPjxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiCiAgICAgYm9yZGVyb3BhY2l0eT0iMSIKICAgICBvYmplY3R0b2xlcmFuY2U9IjEwIgogICAgIGdyaWR0b2xlcmFuY2U9IjEwIgogICAgIGd1aWRldG9sZXJhbmNlPSIxMCIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTQ3MSIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSI2OTUiCiAgICAgaWQ9Im5hbWVkdmlldzQxODEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjExLjMxMzcwOCIKICAgICBpbmtzY2FwZTpjeD0iMTQuNjk4MjgiCiAgICAgaW5rc2NhcGU6Y3k9IjEwLjUyNjY4OSIKICAgICBpbmtzY2FwZTp3aW5kb3cteD0iNjk3IgogICAgIGlua3NjYXBlOndpbmRvdy15PSIyOTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMCIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJMYXllcl8xIgogICAgIGlua3NjYXBlOnNuYXAtYmJveD0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LXBhdGhzPSJ0cnVlIgogICAgIGlua3NjYXBlOm9iamVjdC1wYXRocz0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LW5vZGVzPSJ0cnVlIgogICAgIGlua3NjYXBlOm9iamVjdC1ub2Rlcz0idHJ1ZSI+PGlua3NjYXBlOmdyaWQKICAgICAgIHR5cGU9Inh5Z3JpZCIKICAgICAgIGlkPSJncmlkNjA3NiIgLz48L3NvZGlwb2RpOm5hbWVkdmlldz48cGF0aAogICAgIGQ9Ik0gNSA0IEMgNC41IDQgNCA0LjUgNCA1IEwgNCA2IEwgNCA5IEwgNC41IDkgTCA1Ljc3NzM0MzggNy4yOTY4NzUgQyA2Ljc3NzEzMTkgOC4wNjAyMTMxIDcuODM1NzY1IDguOTU2NTcyOCA4Ljg5MDYyNSAxMCBDIDcuODI1NzEyMSAxMS4wNjMzIDYuNzc2MTc5MSAxMS45NTE2NzUgNS43ODEyNSAxMi43MDcwMzEgTCA0LjUgMTEgTCA0IDExIEwgNCAxNSBDIDQgMTUuNSA0LjUgMTYgNSAxNiBMIDkgMTYgTCA5IDE1LjUgTCA3LjI3MzQzNzUgMTQuMjA1MDc4IEMgOC4wNDI4OTMxIDEzLjE4Nzg4NiA4LjkzOTU0NDEgMTIuMTMzNDgxIDkuOTYwOTM3NSAxMS4wNjgzNTkgQyAxMS4wNDIzNzEgMTIuMTQ2OTkgMTEuOTQyMDkzIDEzLjIxMTIgMTIuNzA3MDMxIDE0LjIxODc1IEwgMTEgMTUuNSBMIDExIDE2IEwgMTQgMTYgTCAxNSAxNiBDIDE1LjUgMTYgMTYgMTUuNSAxNiAxNSBMIDE2IDE0IEwgMTYgMTEgTCAxNS41IDExIEwgMTQuMjA1MDc4IDEyLjcyNjU2MiBDIDEzLjE3Nzk4NSAxMS45NDk2MTcgMTIuMTEyNzE4IDExLjA0MzU3NyAxMS4wMzcxMDkgMTAuMDA5NzY2IEMgMTIuMTUxODU2IDguOTgxMDYxIDEzLjIyNDM0NSA4LjA3OTg2MjQgMTQuMjI4NTE2IDcuMzA0Njg3NSBMIDE1LjUgOSBMIDE2IDkgTCAxNiA1IEMgMTYgNC41IDE1LjUgNCAxNSA0IEwgMTEgNCBMIDExIDQuNSBMIDEyLjcwMzEyNSA1Ljc3NzM0MzggQyAxMS45MzI2NDcgNi43ODY0ODM0IDExLjAyNjY5MyA3Ljg1NTQ3MTIgOS45NzA3MDMxIDguOTE5OTIxOSBDIDguOTU4NDczOSA3LjgyMDQ5NDMgOC4wNjk4NzY3IDYuNzYyNzE4OCA3LjMwNDY4NzUgNS43NzE0ODQ0IEwgOSA0LjUgTCA5IDQgTCA2IDQgTCA1IDQgeiAiCiAgICAgaWQ9InBhdGg0MTY5IiAvPjwvc3ZnPg==)}.mapboxgl-ctrl-icon.mapboxgl-ctrl-shrink{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4KCjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0iTGF5ZXJfMSIKICAgeD0iMHB4IgogICB5PSIwcHgiCiAgIHZpZXdCb3g9IjAgMCAyMCAyMCIKICAgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxIHIxMzcyNSIKICAgc29kaXBvZGk6ZG9jbmFtZT0ic2hyaW5rLnN2ZyI+PG1ldGFkYXRhCiAgICAgaWQ9Im1ldGFkYXRhMTkiPjxyZGY6UkRGPjxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj48ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD48ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxkZWZzCiAgICAgaWQ9ImRlZnMxNyIgLz48c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjIwMjEiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iOTA4IgogICAgIGlkPSJuYW1lZHZpZXcxNSIKICAgICBzaG93Z3JpZD0iZmFsc2UiCiAgICAgaW5rc2NhcGU6em9vbT0iMSIKICAgICBpbmtzY2FwZTpjeD0iNC45NTAxMDgyIgogICAgIGlua3NjYXBlOmN5PSIxMC44NTQ3NDciCiAgICAgaW5rc2NhcGU6d2luZG93LXg9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LXk9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMCIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJMYXllcl8xIgogICAgIGlua3NjYXBlOnNuYXAtYmJveD0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LXBhdGhzPSJ0cnVlIgogICAgIGlua3NjYXBlOnNuYXAtYmJveC1lZGdlLW1pZHBvaW50cz0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LW5vZGVzPSJ0cnVlIgogICAgIGlua3NjYXBlOnNuYXAtYmJveC1taWRwb2ludHM9InRydWUiCiAgICAgaW5rc2NhcGU6b2JqZWN0LXBhdGhzPSJ0cnVlIgogICAgIGlua3NjYXBlOm9iamVjdC1ub2Rlcz0idHJ1ZSI+PGlua3NjYXBlOmdyaWQKICAgICAgI
2HR5cGU9Inh5Z3JpZCIKICAgICAgIGlkPSJncmlkNDE0NyIgLz48L3NvZGlwb2RpOm5hbWVkdmlldz48cGF0aAogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDAiCiAgICAgZD0iTSA0LjI0MjE4NzUgMy40OTIxODc1IEEgMC43NTAwNzUgMC43NTAwNzUgMCAwIDAgMy43MTg3NSA0Ljc4MTI1IEwgNS45NjQ4NDM4IDcuMDI3MzQzOCBMIDQgOC41IEwgNCA5IEwgOCA5IEMgOC41MDAwMDEgOC45OTk5OTg4IDkgOC40OTk5OTkyIDkgOCBMIDkgNCBMIDguNSA0IEwgNy4wMTc1NzgxIDUuOTU1MDc4MSBMIDQuNzgxMjUgMy43MTg3NSBBIDAuNzUwMDc1IDAuNzUwMDc1IDAgMCAwIDQuMjQyMTg3NSAzLjQ5MjE4NzUgeiBNIDE1LjczNDM3NSAzLjQ5MjE4NzUgQSAwLjc1MDA3NSAwLjc1MDA3NSAwIDAgMCAxNS4yMTg3NSAzLjcxODc1IEwgMTIuOTg0Mzc1IDUuOTUzMTI1IEwgMTEuNSA0IEwgMTEgNCBMIDExIDggQyAxMSA4LjQ5OTk5OTIgMTEuNDk5OTk5IDguOTk5OTk4OCAxMiA5IEwgMTYgOSBMIDE2IDguNSBMIDE0LjAzNTE1NiA3LjAyNzM0MzggTCAxNi4yODEyNSA0Ljc4MTI1IEEgMC43NTAwNzUgMC43NTAwNzUgMCAwIDAgMTUuNzM0Mzc1IDMuNDkyMTg3NSB6IE0gNCAxMSBMIDQgMTEuNSBMIDUuOTY0ODQzOCAxMi45NzI2NTYgTCAzLjcxODc1IDE1LjIxODc1IEEgMC43NTEzMDA5NiAwLjc1MTMwMDk2IDAgMSAwIDQuNzgxMjUgMTYuMjgxMjUgTCA3LjAyNzM0MzggMTQuMDM1MTU2IEwgOC41IDE2IEwgOSAxNiBMIDkgMTIgQyA5IDExLjUwMDAwMSA4LjUwMDAwMSAxMS4wMDAwMDEgOCAxMSBMIDQgMTEgeiBNIDEyIDExIEMgMTEuNDk5OTk5IDExLjAwMDAwMSAxMSAxMS41MDAwMDEgMTEgMTIgTCAxMSAxNiBMIDExLjUgMTYgTCAxMi45NzI2NTYgMTQuMDM1MTU2IEwgMTUuMjE4NzUgMTYuMjgxMjUgQSAwLjc1MTMwMDk2IDAuNzUxMzAwOTYgMCAxIDAgMTYuMjgxMjUgMTUuMjE4NzUgTCAxNC4wMzUxNTYgMTIuOTcyNjU2IEwgMTYgMTEuNSBMIDE2IDExIEwgMTIgMTEgeiAiCiAgICAgaWQ9InBhdGg3IiAvPjwvc3ZnPg==)}.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass>.mapboxgl-ctrl-compass-arrow{width:20px;height:20px;margin:5px;background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%0A%09%3Cpolygon%20fill%3D%27%23333333%27%20points%3D%276%2C9%2010%2C1%2014%2C9%27%2F%3E%0A%09%3Cpolygon%20fill%3D%27%23CCCCCC%27%20points%3D%276%2C11%2010%2C19%2014%2C11%20%27%2F%3E%0A%3C%2Fsvg%3E\");background-repeat:no-repeat;display:inline-block}a.mapboxgl-ctrl-logo{width:85px;height:21px;margin:0 0 -3px -3px;display:block;background-repeat:no-repeat;cursor:pointer;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiAgIHZpZXdCb3g9IjAgMCA4NC40OSAyMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgODQuNDkgMjE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48Zz4gIDxwYXRoIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIGQ9Ik04My4yNSwxNC4yNmMwLDAuMTItMC4wOSwwLjIxLTAuMjEsMC4yMWgtMS42MWMtMC4xMywwLTAuMjQtMC4wNi0wLjMtMC4xN2wtMS40NC0yLjM5bC0xLjQ0LDIuMzkgICAgYy0wLjA2LDAuMTEtMC4xOCwwLjE3LTAuMywwLjE3aC0xLjYxYy0wLjA0LDAtMC4wOC0wLjAxLTAuMTItMC4wM2MtMC4wOS0wLjA2LTAuMTMtMC4xOS0wLjA2LTAuMjhsMCwwbDIuNDMtMy42OEw3Ni4yLDYuODQgICAgYy0wLjAyLTAuMDMtMC4wMy0wLjA3LTAuMDMtMC4xMmMwLTAuMTIsMC4wOS0wLjIxLDAuMjEtMC4yMWgxLjYxYzAuMTMsMCwwLjI0LDAuMDYsMC4zLDAuMTdsMS40MSwyLjM2bDEuNC0yLjM1ICAgIGMwLjA2LTAuMTEsMC4xOC0wLjE3LDAuMy0wLjE3SDgzYzAuMDQsMCwwLjA4LDAuMDEsMC4xMiwwLjAzYzAuMDksMC4wNiwwLjEzLDAuMTksMC4wNiwwLjI4bDAsMGwtMi4zNywzLjYzbDIuNDMsMy42NyAgICBDODMuMjQsMTQuMTgsODMuMjUsMTQuMjIsODMuMjUsMTQuMjZ6Ii8+ICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0ib3BhY2l0eTowLjk7IGZpbGw6ICNGRkZGRkY7IGVuYWJsZS1iYWNrZ3JvdW5kOiBuZXc7IiBkPSJNNjYuMjQsOS41OWMtMC4zOS0xLjg4LTEuOTYtMy4yOC0zLjg0LTMuMjhjLTEuMDMsMC0yLjAzLDAuNDItMi43MywxLjE4VjMuNTFjMC0wLjEzLTAuMS0wLjIzLTAuMjMtMC4yM2gtMS40ICAgIGMtMC4xMywwLTAuMjMsMC4xMS0wLjIzLDAuMjN2MTAuNzJjMCwwLjEzLDAuMSwwLjIzLDAuMjMsMC4yM2gxLjRjMC4xMywwLDAuMjMtMC4xMSwwLjIzLTAuMjNWMTMuNWMwLjcxLDAuNzUsMS43LDEuMTgsMi43MywxLjE4ICAgIGMxLjg4LDAsMy40NS0xLjQxLDMuODQtMy4yOUM2Ni4zNywxMC43OSw2Ni4zNywxMC4xOCw2Ni4yNCw5LjU5TDY2LjI0LDkuNTl6IE02Mi4wOCwxM2MtMS4zMiwwLTIuMzktMS4xMS0yLjQxLTIuNDh2LTAuMDYgICAgYzAuMDItMS4zOCwxLjA5LTIuNDgsMi40MS0yLjQ4czIuNDIsMS4xMiwyLjQyLDIuNTFTNjMuNDEsMTMsNjIuMDgsMTN6Ii8+ICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0ib3BhY2l0eTowLjk7IGZpbGw6ICNGRkZGRkY7IGVuYWJsZS1iYWNrZ3JvdW5kOiBuZXc7IiBkPSJNNzEuNjcsNi4zMmMtMS45OC0wLjAxLTMuNzIsMS4zNS00LjE2LDMuMjljLTAuMTMsMC41OS0wLjEzLDEuMTksMCwxLjc3YzAuNDQsMS45NCwyLjE3LDMuMzIsNC4xNywzLjMgICAgYzIuMzUsMCw0LjI2LTEuODcsNC4yNi00LjE5Uzc0LjA0LDYuMzIsNzEuNjcsNi4zMnogTTcxLjY1LDEzLjAxYy0xLjMzLDAtMi40Mi0xLjEyLTIuNDItMi41MXMxLjA4LTIuNTIsMi40Mi0yLjUyICAgIGMxLjMzLDAsMi40MiwxLjEyLDIuNDIsMi41MVM3Mi45OSwxMyw3MS42NSwxMy4wMUw3MS42NSwxMy4wMXoiLz4gIDxwYXRoIGNsYXNzPSJzdDEiIHN0eWxlPSJvcGFjaXR5OjAuMzU7IGVuYWJsZS1iYWNrZ3JvdW5kOm5ldzsiIGQ9Ik02Mi4wOCw3Ljk4Yy0xLjMyLDAtMi4zOSwxLjExLTIuNDEsMi40OHYwLjA2QzU5LjY4LDExLjksNjAuNzUsMTMsNjIuMDgsMTNzMi40Mi0xLjEyLDIuNDItMi41MSAgICBTNjMuNDEsNy45OCw2Mi4wOCw3Ljk4eiBNNjIuMDgsMTEuNzZjLTAuNjMsMC0xLjE0LTAuNTYtMS4xNy0xLjI1di0wLjA0YzAuMDEtMC42OSwwLjU0LTEuMjUsMS4xNy0xLjI1ICAgIGMwLjYzLDAsMS4xNywwLjU3LDEuMTcsMS4yN0M2My4yNCwxMS4yLDYyLjczLDExLjc2LDYyLjA4LDExLjc2eiIvPiAgPHBhdGggY2xhc3M9InN0MSIgc3R5bGU9Im9wYWNpdHk6MC4zNTsgZW5hYmxlLWJhY2tncm91bmQ6bmV3OyIgZD0iTTcxLjY1LDcuOThjLTEuMzMsMC0yLjQyLDEuMTItMi40MiwyLjUxUzcwLjMyLDEzLDcxLjY1LDEzczIuNDItMS4xMiwyLjQyLTIuNTFTNzIuOTksNy45OCw3MS42NSw3Ljk4eiAgICAgTTcxLjY1LDExLjc2Yy0wLjY0LDAtMS4xNy0wLjU3LTEuMTctMS4yN2MwLTAuNywwLjUzLTEuMjYsMS4xNy0xLjI2czEuMTcsMC41NywxLjE3LDEuMjdDNzIuODIsMTEuMjEsNzIuMjksMTEuNzYsNzEuNjUsMTEuNzZ6IiAgICAvPiAgPHBhdGggY2xhc3M9InN0MCIgc3R5bGU9Im9wYWNpdHk6MC45OyBmaWxsOiAjRkZGRkZGOyBlbmFibGUtYmFja2dyb3VuZDogbmV3OyIgZD0iTTQ1Ljc0LDYuNTNoLTEuNGMtMC4xMywwLTAuMjMsMC4xMS0wLjIzLDAuMjN2MC43M2MtMC43MS0wLjc1LTEuNy0xLjE4LTIuNzMtMS4xOCAgICBjLTIuMTcsMC0zLjk0LDEuODctMy45NCw0LjE5czEuNzcsNC4xOSwzLjk0LDQuMTljMS4wNCwwLDIuMDMtMC40MywyLjczLTEuMTl2MC43M2MwLDAuMTMsMC4xLDAuMjMsMC4yMywwLjIzaDEuNCAgICBjMC4xMywwLDAuMjMtMC4xMSwwLjIzLTAuMjNWNi43NGMwLTAuMTItMC4wOS0wLjIyLTAuMjItMC4yMkM0NS43NSw2LjUzLDQ1Ljc1LDYuNTMsNDUuNzQsNi41M3ogTTQ0LjEyLDEwLjUzICAgIEM0NC4xMSwxMS45LDQzLjAzLDEzLDQxLjcxLDEzcy0yLjQyLTEuMTItMi40Mi0yLjUxczEuMDgtMi41MiwyLjQtMi41MmMxLjMzLDAsMi4zOSwxLjExLDIuNDEsMi40OEw0NC4xMiwxMC41M3oiLz4gIDxwYXRoIGNsYXNzPSJzdDEiIHN0eWxlPSJvcGFjaXR5OjAuMzU7IGVuYWJsZS1iYWNrZ3JvdW5kOm5ldzsiIGQ9Ik00MS43MSw3Ljk4Yy0xLjMzLDAtMi40MiwxLjEyLTIuNDIsMi41MVM0MC4zNywxMyw0MS43MSwxM3MyLjM5LTEuMTEsMi40MS0yLjQ4di0wLjA2ICAgIEM0NC4xLDkuMDksNDMuMDMsNy45OCw0MS43MSw3Ljk4eiBNNDAuNTUsMTAuNDljMC0wLjcsMC41Mi0xLjI3LDEuMTctMS4yN2MwLjY0LDAsMS4xNCwwLjU2LDEuMTcsMS4yNXYwLjA0ICAgIGMtMC4wMSwwLjY4LTAuNTMsMS4yNC0xLjE3LDEuMjRDNDEuMDgsMTEuNzUsNDAuNTUsMTEuMTksNDAuNTUsMTAuNDl6Ii8+ICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0ib3BhY2l0eTowLjk7IGZpbGw6ICNGRkZGRkY7IGVuYWJsZS1iYWNrZ3JvdW5kOiBuZXc7IiBkPSJNNTIuNDEsNi4zMmMtMS4wMywwLTIuMDMsMC40Mi0yLjczLDEuMThWNi43NWMwLTAuMTMtMC4xLTAuMjMtMC4yMy0wLjIzaC0xLjRjLTAuMTMsMC0wLjIzLDAuMTEtMC4yMywwLjIzICAgIHYxMC43MmMwLDAuMTMsMC4xLDAuMjMsMC4yMywwLjIzaDEuNGMwLjEzLDAsMC4yMy0wLjEsMC4yMy0wLjIzVjEzLjVjMC43MSwwLjc1LDEuNywxLjE4LDIuNzQsMS4xOGMyLjE3LDAsMy45NC0xLjg3LDMuOTQtNC4xOSAgICBTNTQuNTgsNi4zMiw1Mi40MSw2LjMyeiBNNTIuMDgsMTMuMDFjLTEuMzIsMC0yLjM5LTEuMTEtMi40Mi0yLjQ4di0wLjA3YzAuMDItMS4zOCwxLjA5LTIuNDksMi40LTIuNDljMS4zMiwwLDIuNDEsMS4xMiwyLjQxLDIuNTEgICAgUzUzLjQsMTMsNTIuMDgsMTMuMDFMNTIuMDgsMTMuMDF6Ii8+ICA8cGF0aCBjbGFzcz0ic3QxIiBzdHlsZT0ib3BhY2l0eTowLjM1OyBlbmFibGUtYmFja2dyb3VuZDpuZXc7IiBkPSJNNTIuMDgsNy45OGMtMS4zMiwwLTIuMzksMS4xMS0yLjQyLDIuNDh2MC4wNmMwLjAzLDEuMzgsMS4xLDIuNDgsMi40MiwyLjQ4czIuNDEtMS4xMiwyLjQxLTIuNTEgICAgUzUzLjQsNy45OCw1Mi4wOCw3Ljk4eiBNNTIuMDgsMTEuNzZjLTAuNjMsMC0xLjE0LTAuNTYtMS4xNy0xLjI1di0wLjA0YzAuMDEtMC42OSwwLjU0LTEuMjUsMS4xNy0xLjI1YzAuNjMsMCwxLjE3LDAuNTgsMS4xNywxLjI3ICAgIFM1Mi43MiwxMS43Niw1Mi4wOCwxMS43NnoiLz4gIDxwYXRoIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIGQ9Ik0zNi4wOCwxNC4yNGMwLDAuMTMtMC4xLDAuMjMtMC4yMywwLjIzaC0xLjQxYy0wLjEzLDAtMC4yMy0wLjExLTAuMjMtMC4yM1Y5LjY4YzAtMC45OC0wLjc0LTEuNzEtMS42Mi0xLjcxICAgIGMtMC44LDAtMS4
20NiwwLjctMS41OSwxLjYybDAuMDEsNC42NmMwLDAuMTMtMC4xMSwwLjIzLTAuMjMsMC4yM2gtMS40MWMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjNWOS42OCAgICBjMC0wLjk4LTAuNzQtMS43MS0xLjYyLTEuNzFjLTAuODUsMC0xLjU0LDAuNzktMS42LDEuOHY0LjQ4YzAsMC4xMy0wLjEsMC4yMy0wLjIzLDAuMjNoLTEuNGMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjNWNi43NCAgICBjMC4wMS0wLjEzLDAuMS0wLjIyLDAuMjMtMC4yMmgxLjRjMC4xMywwLDAuMjIsMC4xMSwwLjIzLDAuMjJWNy40YzAuNS0wLjY4LDEuMy0xLjA5LDIuMTYtMS4xaDAuMDNjMS4wOSwwLDIuMDksMC42LDIuNiwxLjU1ICAgIGMwLjQ1LTAuOTUsMS40LTEuNTUsMi40NC0xLjU2YzEuNjIsMCwyLjkzLDEuMjUsMi45LDIuNzhMMzYuMDgsMTQuMjR6Ii8+ICA8cGF0aCBjbGFzcz0ic3QxIiBzdHlsZT0ib3BhY2l0eTowLjM1OyBlbmFibGUtYmFja2dyb3VuZDpuZXc7IiBkPSJNODQuMzQsMTMuNTlsLTAuMDctMC4xM2wtMS45Ni0yLjk5bDEuOTQtMi45NWMwLjQ0LTAuNjcsMC4yNi0xLjU2LTAuNDEtMi4wMmMtMC4wMiwwLTAuMDMsMC0wLjA0LTAuMDEgICAgYy0wLjIzLTAuMTUtMC41LTAuMjItMC43OC0wLjIyaC0xLjYxYy0wLjU2LDAtMS4wOCwwLjI5LTEuMzcsMC43OEw3OS43Miw2LjZsLTAuMzQtMC41NkM3OS4wOSw1LjU2LDc4LjU3LDUuMjcsNzgsNS4yN2gtMS42ICAgIGMtMC42LDAtMS4xMywwLjM3LTEuMzUsMC45MmMtMi4xOS0xLjY2LTUuMjgtMS40Ny03LjI2LDAuNDVjLTAuMzUsMC4zNC0wLjY1LDAuNzItMC44OSwxLjE0Yy0wLjktMS42Mi0yLjU4LTIuNzItNC41LTIuNzIgICAgYy0wLjUsMC0xLjAxLDAuMDctMS40OCwwLjIzVjMuNTFjMC0wLjgyLTAuNjYtMS40OC0xLjQ3LTEuNDhoLTEuNGMtMC44MSwwLTEuNDcsMC42Ni0xLjQ3LDEuNDd2My43NSAgICBjLTAuOTUtMS4zNi0yLjUtMi4xOC00LjE3LTIuMTljLTAuNzQsMC0xLjQ2LDAuMTYtMi4xMiwwLjQ3Yy0wLjI0LTAuMTctMC41NC0wLjI2LTAuODQtMC4yNmgtMS40Yy0wLjQ1LDAtMC44NywwLjIxLTEuMTUsMC41NiAgICBjLTAuMDItMC4wMy0wLjA0LTAuMDUtMC4wNy0wLjA4Yy0wLjI4LTAuMy0wLjY4LTAuNDctMS4wOS0wLjQ3aC0xLjM5Yy0wLjMsMC0wLjYsMC4wOS0wLjg0LDAuMjZjLTAuNjctMC4zLTEuMzktMC40Ni0yLjEyLTAuNDYgICAgYy0xLjgzLDAtMy40MywxLTQuMzcsMi41Yy0wLjItMC40Ni0wLjQ4LTAuODktMC44My0xLjI1Yy0wLjgtMC44MS0xLjg5LTEuMjUtMy4wMi0xLjI1aC0wLjAxYy0wLjg5LDAuMDEtMS43NSwwLjMzLTIuNDYsMC44OCAgICBjLTAuNzQtMC41Ny0xLjY0LTAuODgtMi41Ny0wLjg4SDI4LjFjLTAuMjksMC0wLjU4LDAuMDMtMC44NiwwLjExYy0wLjI4LDAuMDYtMC41NiwwLjE2LTAuODIsMC4yOGMtMC4yMS0wLjEyLTAuNDUtMC4xOC0wLjctMC4xOCAgICBoLTEuNGMtMC44MiwwLTEuNDcsMC42Ni0xLjQ3LDEuNDd2Ny41YzAsMC44MiwwLjY2LDEuNDcsMS40NywxLjQ3aDEuNGMwLjgyLDAsMS40OC0wLjY2LDEuNDgtMS40OGwwLDBWOS43OSAgICBjMC4wMy0wLjM2LDAuMjMtMC41OSwwLjM2LTAuNTljMC4xOCwwLDAuMzgsMC4xOCwwLjM4LDAuNDd2NC41N2MwLDAuODIsMC42NiwxLjQ3LDEuNDcsMS40N2gxLjQxYzAuODIsMCwxLjQ3LTAuNjYsMS40Ny0xLjQ3ICAgIGwtMC4wMS00LjU3YzAuMDYtMC4zMiwwLjI1LTAuNDcsMC4zNS0wLjQ3YzAuMTgsMCwwLjM4LDAuMTgsMC4zOCwwLjQ3djQuNTdjMCwwLjgyLDAuNjYsMS40NywxLjQ3LDEuNDdoMS40MSAgICBjMC44MiwwLDEuNDctMC42NiwxLjQ3LTEuNDd2LTAuMzhjMC45NiwxLjI5LDIuNDYsMi4wNiw0LjA2LDIuMDZjMC43NCwwLDEuNDYtMC4xNiwyLjEyLTAuNDdjMC4yNCwwLjE3LDAuNTQsMC4yNiwwLjg0LDAuMjZoMS4zOSAgICBjMC4zLDAsMC42LTAuMDksMC44NC0wLjI2djIuMDFjMCwwLjgyLDAuNjYsMS40NywxLjQ3LDEuNDdoMS40YzAuODIsMCwxLjQ3LTAuNjYsMS40Ny0xLjQ3di0xLjc3YzAuNDgsMC4xNSwwLjk5LDAuMjMsMS40OSwwLjIyICAgIGMxLjcsMCwzLjIyLTAuODcsNC4xNy0yLjJ2MC41MmMwLDAuODIsMC42NiwxLjQ3LDEuNDcsMS40N2gxLjRjMC4zLDAsMC42LTAuMDksMC44NC0wLjI2YzAuNjYsMC4zMSwxLjM5LDAuNDcsMi4xMiwwLjQ3ICAgIGMxLjkyLDAsMy42LTEuMSw0LjQ5LTIuNzNjMS41NCwyLjY1LDQuOTUsMy41Myw3LjU4LDEuOThjMC4xOC0wLjExLDAuMzYtMC4yMiwwLjUzLTAuMzZjMC4yMiwwLjU1LDAuNzYsMC45MSwxLjM1LDAuOUg3OCAgICBjMC41NiwwLDEuMDgtMC4yOSwxLjM3LTAuNzhsMC4zNy0wLjYxbDAuMzcsMC42MWMwLjI5LDAuNDgsMC44MSwwLjc4LDEuMzgsMC43OGgxLjZjMC44MSwwLDEuNDYtMC42NiwxLjQ1LTEuNDYgICAgQzg0LjQ5LDE0LjAyLDg0LjQ0LDEzLjgsODQuMzQsMTMuNTlMODQuMzQsMTMuNTl6IE0zNS44NiwxNC40N2gtMS40MWMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjNWOS42OCAgICBjMC0wLjk4LTAuNzQtMS43MS0xLjYyLTEuNzFjLTAuOCwwLTEuNDYsMC43LTEuNTksMS42MmwwLjAxLDQuNjZjMCwwLjEzLTAuMSwwLjIzLTAuMjMsMC4yM2gtMS40MWMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjMgICAgVjkuNjhjMC0wLjk4LTAuNzQtMS43MS0xLjYyLTEuNzFjLTAuODUsMC0xLjU0LDAuNzktMS42LDEuOHY0LjQ4YzAsMC4xMy0wLjEsMC4yMy0wLjIzLDAuMjNoLTEuNGMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjMgICAgVjYuNzRjMC4wMS0wLjEzLDAuMTEtMC4yMiwwLjIzLTAuMjJoMS40YzAuMTMsMCwwLjIyLDAuMTEsMC4yMywwLjIyVjcuNGMwLjUtMC42OCwxLjMtMS4wOSwyLjE2LTEuMWgwLjAzICAgIGMxLjA5LDAsMi4wOSwwLjYsMi42LDEuNTVjMC40NS0wLjk1LDEuNC0xLjU1LDIuNDQtMS41NmMxLjYyLDAsMi45MywxLjI1LDIuOSwyLjc4bDAuMDEsNS4xNkMzNi4wOSwxNC4zNiwzNS45OCwxNC40NiwzNS44NiwxNC40NyAgICBMMzUuODYsMTQuNDd6IE00NS45NywxNC4yNGMwLDAuMTMtMC4xLDAuMjMtMC4yMywwLjIzaC0xLjRjLTAuMTMsMC0wLjIzLTAuMTEtMC4yMy0wLjIzVjEzLjVjLTAuNywwLjc2LTEuNjksMS4xOC0yLjcyLDEuMTggICAgYy0yLjE3LDAtMy45NC0xLjg3LTMuOTQtNC4xOXMxLjc3LTQuMTksMy45NC00LjE5YzEuMDMsMCwyLjAyLDAuNDMsMi43MywxLjE4VjYuNzRjMC0wLjEzLDAuMS0wLjIzLDAuMjMtMC4yM2gxLjQgICAgYzAuMTItMC4wMSwwLjIyLDAuMDgsMC4yMywwLjIxYzAsMC4wMSwwLDAuMDEsMCwwLjAydjcuNTFoLTAuMDFWMTQuMjR6IE01Mi40MSwxNC42N2MtMS4wMywwLTIuMDItMC40My0yLjczLTEuMTh2My45NyAgICBjMCwwLjEzLTAuMSwwLjIzLTAuMjMsMC4yM2gtMS40Yy0wLjEzLDAtMC4yMy0wLjEtMC4yMy0wLjIzVjYuNzVjMC0wLjEzLDAuMS0wLjIyLDAuMjMtMC4yMmgxLjRjMC4xMywwLDAuMjMsMC4xMSwwLjIzLDAuMjN2MC43MyAgICBjMC43MS0wLjc2LDEuNy0xLjE4L
2DIuNzMtMS4xOGMyLjE3LDAsMy45NCwxLjg2LDMuOTQsNC4xOFM1NC41OCwxNC42Nyw1Mi40MSwxNC42N3ogTTY2LjI0LDExLjM5Yy0wLjM5LDEuODctMS45NiwzLjI5LTMuODQsMy4yOSAgICBjLTEuMDMsMC0yLjAyLTAuNDMtMi43My0xLjE4djAuNzNjMCwwLjEzLTAuMSwwLjIzLTAuMjMsMC4yM2gtMS40Yy0wLjEzLDAtMC4yMy0wLjExLTAuMjMtMC4yM1YzLjUxYzAtMC4xMywwLjEtMC4yMywwLjIzLTAuMjMgICAgaDEuNGMwLjEzLDAsMC4yMywwLjExLDAuMjMsMC4yM3YzLjk3YzAuNzEtMC43NSwxLjctMS4xOCwyLjczLTEuMTdjMS44OCwwLDMuNDUsMS40LDMuODQsMy4yOEM2Ni4zNywxMC4xOSw2Ni4zNywxMC44LDY2LjI0LDExLjM5ICAgIEw2Ni4yNCwxMS4zOUw2Ni4yNCwxMS4zOXogTTcxLjY3LDE0LjY4Yy0yLDAuMDEtMy43My0xLjM1LTQuMTctMy4zYy0wLjEzLTAuNTktMC4xMy0xLjE5LDAtMS43N2MwLjQ0LTEuOTQsMi4xNy0zLjMxLDQuMTctMy4zICAgIGMyLjM2LDAsNC4yNiwxLjg3LDQuMjYsNC4xOVM3NC4wMywxNC42OCw3MS42NywxNC42OEw3MS42NywxNC42OHogTTgzLjA0LDE0LjQ3aC0xLjYxYy0wLjEzLDAtMC4yNC0wLjA2LTAuMy0wLjE3bC0xLjQ0LTIuMzkgICAgbC0xLjQ0LDIuMzljLTAuMDYsMC4xMS0wLjE4LDAuMTctMC4zLDAuMTdoLTEuNjFjLTAuMDQsMC0wLjA4LTAuMDEtMC4xMi0wLjAzYy0wLjA5LTAuMDYtMC4xMy0wLjE5LTAuMDYtMC4yOGwwLDBsMi40My0zLjY4ICAgIEw3Ni4yLDYuODRjLTAuMDItMC4wMy0wLjAzLTAuMDctMC4wMy0wLjEyYzAtMC4xMiwwLjA5LTAuMjEsMC4yMS0wLjIxaDEuNjFjMC4xMywwLDAuMjQsMC4wNiwwLjMsMC4xN2wxLjQxLDIuMzZsMS40MS0yLjM2ICAgIGMwLjA2LTAuMTEsMC4xOC0wLjE3LDAuMy0wLjE3aDEuNjFjMC4wNCwwLDAuMDgsMC4wMSwwLjEyLDAuMDNjMC4wOSwwLjA2LDAuMTMsMC4xOSwwLjA2LDAuMjhsMCwwbC0yLjM4LDMuNjRsMi40MywzLjY3ICAgIGMwLjAyLDAuMDMsMC4wMywwLjA3LDAuMDMsMC4xMkM4My4yNSwxNC4zOCw4My4xNiwxNC40Nyw4My4wNCwxNC40N0w4My4wNCwxNC40N0w4My4wNCwxNC40N3oiLz4gIDxwYXRoIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIGQ9Ik0xMC41LDEuMjRjLTUuMTEsMC05LjI1LDQuMTUtOS4yNSw5LjI1czQuMTUsOS4yNSw5LjI1LDkuMjVzOS4yNS00LjE1LDkuMjUtOS4yNSAgICBDMTkuNzUsNS4zOCwxNS42MSwxLjI0LDEwLjUsMS4yNHogTTE0Ljg5LDEyLjc3Yy0xLjkzLDEuOTMtNC43OCwyLjMxLTYuNywyLjMxYy0wLjcsMC0xLjQxLTAuMDUtMi4xLTAuMTZjMCwwLTEuMDItNS42NCwyLjE0LTguODEgICAgYzAuODMtMC44MywxLjk1LTEuMjgsMy4xMy0xLjI4YzEuMjcsMCwyLjQ5LDAuNTEsMy4zOSwxLjQyQzE2LjU5LDguMDksMTYuNjQsMTEsMTQuODksMTIuNzd6Ii8+ICA8cGF0aCBjbGFzcz0ic3QxIiBzdHlsZT0ib3BhY2l0eTowLjM1OyBlbmFibGUtYmFja2dyb3VuZDpuZXc7IiBkPSJNMTAuNS0wLjAxQzQuNy0wLjAxLDAsNC43LDAsMTAuNDlzNC43LDEwLjUsMTAuNSwxMC41UzIxLDE2LjI5LDIxLDEwLjQ5QzIwLjk5LDQuNywxNi4zLTAuMDEsMTAuNS0wLjAxeiAgICAgTTEwLjUsMTkuNzRjLTUuMTEsMC05LjI1LTQuMTUtOS4yNS05LjI1czQuMTQtOS4yNiw5LjI1LTkuMjZzOS4yNSw0LjE1LDkuMjUsOS4yNUMxOS43NSwxNS42MSwxNS42MSwxOS43NCwxMC41LDE5Ljc0eiIvPiAgPHBhdGggY2xhc3M9InN0MSIgc3R5bGU9Im9wYWNpdHk6MC4zNTsgZW5hYmxlLWJhY2tncm91bmQ6bmV3OyIgZD0iTTE0Ljc0LDYuMjVDMTIuOSw0LjQxLDkuOTgsNC4zNSw4LjIzLDYuMWMtMy4xNiwzLjE3LTIuMTQsOC44MS0yLjE0LDguODFzNS42NCwxLjAyLDguODEtMi4xNCAgICBDMTYuNjQsMTEsMTYuNTksOC4wOSwxNC43NCw2LjI1eiBNMTIuNDcsMTAuMzRsLTAuOTEsMS44N2wtMC45LTEuODdMOC44LDkuNDNsMS44Ni0wLjlsMC45LTEuODdsMC45MSwxLjg3bDEuODYsMC45TDEyLjQ3LDEwLjM0eiIgICAgLz4gIDxwb2x5Z29uIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIHBvaW50cz0iMTQuMzMsOS40MyAxMi40NywxMC4zNCAxMS41NiwxMi4yMSAxMC42NiwxMC4zNCA4LjgsOS40MyAxMC42Niw4LjUzIDExLjU2LDYuNjYgMTIuNDcsOC41MyAgICIvPjwvZz48L3N2Zz4=)}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:rgba(255,255,255,.5);margin:0}.mapboxgl-ctrl-attrib.mapboxgl-compact{padding-top:2px;padding-bottom:2px;margin:0 10px 10px;position:relative;padding-right:24px;background-color:#fff;border-radius:3px 12px 12px 3px;visibility:hidden}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{visibility:visible}.mapboxgl-ctrl-attrib.mapboxgl-compact:after{content:'';cursor:pointer;position:absolute;bottom:0;right:0;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%09%3Cpath%20fill%3D%27%23333333%27%20fill-rule%3D%27evenodd%27%20d%3D%27M4%2C10a6%2C6%200%201%2C0%2012%2C0a6%2C6%200%201%2C0%20-12%2C0%20M9%2C7a1%2C1%200%201%2C0%202%2C0a1%2C1%200%201%2C0%20-2%2C0%20M9%2C10a1%2C1%200%201%2C1%202%2C0l0%2C3a1%2C1%200%201%2C1%20-2%2C0%27%20%2F%3E%0D%0A%3C%2Fsvg%3E\");background-color:rgba(255,255,255,.5);width:24px;height:24px;box-sizing:border-box;visibility:visible;border-radius:12px}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-ctrl-scale{background-color:rgba(255,255,255,.75);font-size:10px;border-width:medium 2px 2px;border-style:none solid solid;border-color:#333;padding:0 5px;color:#333}.mapboxgl-popup{position:absolute;display:-webkit-flex;display:flex;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:none;border-radius:0 3px 0 0;cursor:pointer;background-color:rgba(0,0,0,0)}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-marker{position:absolute}.mapboxgl-user-location-dot{background-color:#1DA1F2;width:16px;height:16px;border-radius:50%;box-shadow:0 0 2px rgba(0,0,0,.25);border:2px solid #fff}.mapboxgl-user-location-dot:after{content:'';display:block;box-shadow:#1DA1F2 0 0 0 2px;width:16px;height:16px;border-radius:50%;position:relative;z-index:-1;-webkit-animation:mapboxgl-user-location-dot-pulse 2s;-moz-animation:mapboxgl-user-location-dot-pulse 2s;-ms-animation:mapboxgl-user-location-dot-pulse 2s;animation:mapboxgl-user-location-dot-pulse 2s;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-box-shadow:0 0 0 0 rgba(29,161,242,.8)}70%{-webkit-box-shadow:0 0 0 15px rgba(29,161,242,0)}242%{-webkit-box-shadow:0 0 0 0 rgba(29,161,242,0)}}
2@-ms-keyframes mapboxgl-user-location-dot-pulse{0%{-ms-box-shadow:0 0 0 0 rgba(29,161,242,.8)}70%{-ms-box-shadow:0 0 0 15px rgba(29,161,242,0)}242%{-ms-box-shadow:0 0 0 0 rgba(29,161,242,0)}}@keyframes mapboxgl-user-location-dot-pulse{0%{-moz-box-shadow:0 0 0 0 rgba(29,161,242,.8);box-shadow:0 0 0 0 rgba(29,161,242,.4)}70%{-moz-box-shadow:0 0 0 15px rgba(29,161,242,0);box-shadow:0 0 0 15px rgba(29,161,242,0)}100%{-moz-box-shadow:0 0 0 0 rgba(29,161,242,0);box-shadow:0 0 0 0 rgba(29,161,242,0)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.azure-maps-control-container>.style-options.icons .azure-maps-control-button:active img,.azure-maps-control-container>.style-options.list button:active img{opacity:.6}@media print{.mapbox-improve-map{display:none}}@media (inverted-colors:inverted){.atlas-map-canvas,.azure-map-logo{filter:invert()}}.atlas-map-canvas-container{position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none;-ms-user-select:none}.atlas-map-canvas,.map-copyright>a{pointer-events:auto}.azure-map-logo{background-repeat:no-repeat;background-position:center;background-size:100px 25px;height:25px;width:100px;position:absolute;bottom:15px;right:10px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 73.8 17.6'%3E%3Cpath d='M26.2 10l-.4 1.3a5.638 5.638 0 0 0-.4-1.2L23 4h-2.3v9.6h1.5V5.8c.1.3.1.6.2.8l2.8 7h1L29 6.5a1.854 1.854 0 0 1 .2-.7c0 .7-.1 1.3-.1 1.7v6.1h1.6V4h-2.2zm6-3.3h1.5v6.9h-1.5zm.8-2.9a1.08 1.08 0 0 0-.7.3.853.853 0 0 0 0 1.3.908.908 0 0 0 .7.3 1.08 1.08 0 0 0 .7-.3.908.908 0 0 0 .3-.7.908.908 0 0 0-.3-.7 1.854 1.854 0 0 0-.7-.2m6.3 2.9a2.769 2.769 0 0 0-.9-.1 4.136 4.136 0 0 0-1.9.5 2.995 2.995 0 0 0-1.2 1.3 4.477 4.477 0 0 0-.4 2 3.922 3.922 0 0 0 .4 1.8 3.447 3.447 0 0 0 1.2 1.2 3.287 3.287 0 0 0 1.7.4 3.198 3.198 0 0 0 1.9-.5v-1.5l-.1.1a2.01 2.01 0 0 1-.8.4 1.702 1.702 0 0 1-.7.1 2.035 2.035 0 0 1-1.5-.6 1.941 1.941 0 0 1-.5-1.6 3.371 3.371 0 0 1 .5-1.7 2.035 2.035 0 0 1 1.5-.6 2.695 2.695 0 0 1 1.5.5V6.9a1.854 1.854 0 0 0-.7-.2m5.1-.1a1.16 1.16 0 0 0-1 .4 2.361 2.361 0 0 0-.6.9V6.7h-1.5v6.9h1.5v-3.5a2.822 2.822 0 0 1 .4-1.5 1.326 1.326 0 0 1 1-.6.901.901 0 0 1 .5.1.758.758 0 0 1 .4.2H45V6.7a1.268 1.268 0 0 0-.6-.1m4.2 0a3.188 3.188 0 0 0-2.6 1 3.699 3.699 0 0 0-.9 2.7 4.109 4.109 0 0 0 .9 2.6 3.47 3.47 0 0 0 4.9-.1 3.699 3.699 0 0 0 .9-2.7 3.607 3.607 0 0 0-.9-2.6 2.696 2.696 0 0 0-2.3-.9m1.2 5.3a1.708 1.708 0 0 1-2.6 0 3.32 3.32 0 0 1-.5-1.6 2.618 2.618 0 0 1 .5-1.7 1.708 1.708 0 0 1 2.6 0 3.371 3.371 0 0 1 .5 1.7 2.914 2.914 0 0 1-.5 1.6m5.5-2.3a2.622 2.622 0 0 1-.9-.5.725.725 0 0 1 0-1 1.445 1.445 0 0 1 .7-.2 2.202 2.202 0 0 1 .8.1c.2.1.5.2.7.3l.1.1V6.9a1.854 1.854 0 0 0-.7-.2c-.3 0-.5-.1-.8-.1a2.792 2.792 0 0 0-1.8.6 1.8 1.8 0 0 0-.7 1.5 1.077 1.077 0 0 0 .2.8 1.47 1.47 0 0 0 .5.6 8.794 8.794 0 0 0 1 .6l.8.4c.1.1.3.2.4.3s.1.2.1.4c0 .5-.3.7-1 .7a2.92 2.92 0 0 1-.9-.2 4.053 4.053 0 0 1-.9-.5l-.1-.1v1.6c.3.1.5.2.8.3a2.769 2.769 0 0 0 .9.1 3.077 3.077 0 0 0 1.9-.6 1.99 1.99 0 0 0 .7-1.6 1.922 1.922 0 0 0-.4-1.2c-.4-.2-.9-.5-1.4-.7m5.9-3a3.188 3.188 0 0 0-2.6 1 3.699 3.699 0 0 0-.9 2.7 4.109 4.109 0 0 0 .9 2.6 3.47 3.47 0 0 0 4.9-.1 3.699 3.699 0 0 0 .9-2.7 3.607 3.607 0 0 0-.9-2.6 2.696 2.696 0 0 0-2.3-.9m1.2 5.3a1.708 1.708 0 0 1-2.6 0 3.32 3.32 0 0 1-.5-1.6 2.618 2.618 0 0 1 .5-1.7 1.708 1.708 0 0 1 2.6 0 3.371 3.371 0 0 1 .5 1.7 2.518 2.518 0 0 1-.5 1.6M72.8 8.1V6.7h-1.6v-2l-1.5.5v1.5h-2.3v-.8a1.613 1.613 0 0 1 .3-.9 1.08 1.08 0 0 1 .7-.3 1.854 1.854 0 0 1 .7.2h.1V3.4a2.769 2.769 0 0 0-.9-.1 2.375 2.375 0 0 0-1.2.3 1.42 1.42 0 0 0-.8.9 2.768 2.768 0 0 0-.3 1.3v1h-1.1V8H66v5.6h1.6V8.1h2.3v3.5c0 1.5.7 2.2 2 2.2a1.952 1.952 0 0 0 .7-.1c.2 0 .3-.1.5-.2v-1.3l-.1.1a.367.367 0 0 1-.3.1.367.367 0 0 0-.3.1.908.908 0 0 1-.7-.3 1.486 1.486 0 0 1-.2-.9V8.1z' fill='%23ababab'/%3E%3Cpath d='M.8.8h7.3v7.6H.8z' fill='%23f25022'/%3E%3Cpath d='M8.9.8h7.3v7.6H8.9z' fill='%237fba00'/%3E%3Cpath d='M.8 9.2h7.3v7.6H.8z' fill='%2300a4ef'/%3E%3Cpath d='M8.9 9.2h7.3v7.6H8.9z' fill='%23ffb900'/%3E%3C/svg%3E\")}.map-copyright{display:flex;flex-direction:row;position:absolute;bottom:1px;right:5px}.map-copyright>*{font-size:11px;height:11px;line-height:11px;text-align:right}.marker-collection-container,.popup-collection-container{position:absolute;width:100%;height:100%;overflow:hidden;left:0;top:0}.map-copyright>:not(:last-child){margin-right:5px}.map-copyright>a{text-decoration:none;cursor:pointer}.map-copyright>a:hover{-webkit-text-fill-color:#0af;-moz-text-fill-color:#0af;text-decoration:underline;text-decoration-color:#0af;-moz-text-decoration-color:#0af}.atlas-map.high-contrast-light .map-copyright>*,.map-copyright.light>*{color:#000;-webkit-text-fill-color:#000;-moz-text-fill-color:#000}.atlas-map.high-contrast-dark .map-copyright>*,.map-copyright.dark>*{color:#CCC;-webkit-text-fill-color:#CCC;-moz-text-fill-color:#CCC}.marker-collection-container{pointer-events:none}.marker-container{pointer-events:auto}.popup-collection-container{pointer-events:none;user-select:none}.popup-container{display:flex;pointer-events:auto}.popup-container.bottom,.popup-container.bottom-left,.popup-container.bottom-right{flex-direction:column}.popup-container.left{flex-direction:row-reverse}.popup-container.right{flex-direction:row}.popup-container.top,.popup-container.top-left,.popup-container.top-right{flex-direction:column-reverse}.popup-content-container{display:block;box-shadow:-3px -3px 4px rgba(0,0,0,.32);min-width:30px;border-radius:4px;white-space:nowrap;position:relative}.popup-container.top-left>.popup-content-container{border-top-left-radius:0}.popup-container.top-right>.popup-content-container{border-top-right-radius:0}.popup-container.bottom-left>.popup-content-container{border-bottom-left-radius:0}.popup-container.bottom-right>.popup-content-container{border-bottom-right-radius:0}.popup-close{position:absolute;top:0;right:0;color:#444;font-size:20px;font-family:Arial,Helvetica,sans-serif;line-height:20px;height:20px;width:20px;text-align:center;cursor:pointer;background:0 0;border:0;padding:0}.popup-close:hover{color:#222}.popup-arrow{display:block;width:0;height:0;border:10px solid transparent;z-index:1}.popup-container.bottom>.popup-arrow{align-self:center;border-bottom:none;border-top-color:inherit}.popup-container.bottom-left>.popup-arrow{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:inherit}.popup-container.bottom-right>.popup-arrow{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:inherit}.popup-container.left>.popup-arrow{align-self:center;border-left:none;border-right-color:inherit}.popup-container.right>.popup-arrow{align-self:center;border-right:none;border-left-color:inherit}.popup-container.top>.popup-arrow{align-self:center;border-top:none;border-bottom-color:inherit}.popup-container.top-left>.popup-arrow{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:inherit}.popup-container.top-right>.popup-arrow{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:inherit}.azure-maps-control-popup-template{position:relative;padding:10px;max-width:550px;font:12px/20px 'Helvetica Neue',Arial,Helvetica,sans-serif}.azure-maps-control-popup-template h1,.azure-maps-control-popup-template h2,.azure-maps-control-popup-template h3{margin:0!important}.azure-maps-control-popup-template iframe{border:0}@media screen and (max-width:340px){.azure-maps-control-popup-template{max-width:300px}}.azure-maps-control-popup-template-title{width:100%;font-size:14px;font-weight:700;word-wrap:break-word;white-space:normal}.azure-maps-control-popup-template-content{width:100%;overflow-y:auto;max-height:280px}.azure-maps-control-popup-template-content-item{font:12px/20px 'Helvetica Neue',Arial,Helvetica,sans-serif;width:100%;padding-top:10px;word-wrap:break-word;white-space:normal}.hidden-accessible-element,.incident-popup-info>.message,.incident-popup-subtitle,.incident-popup-title{white-space:nowrap;overflow:hidden}.azure-maps-control-popup-template-table{font-size:12px;width:100%;padding-top:10px;border-collapse:collapse}.azure-maps-control-popup-template-table tr:nth-child(even){background-color:rgba(255,255,255,.5)}.azure-maps-control-popup-template-table tr:nth-child(odd){background-color:rgba(225,225,225,.5)}.azure-maps-control-popup-template-table th{border-right:1px solid rgba(150,150,150,.5)}.azure-maps-control-popup-template-table td,.azure-maps-control-popup-template-table th{padding:6px 8px;text-align:left;vertical-align:top;word-wrap:normal;font-size:12px;font-weight:400}.incident-popup-content{color:#231F20;min-width:140px;height:126px;padding:0;margin:0}.incident-popup-body,.incident-popup-header{padding:8px;margin:0;color:inherit}.incident-popup-header{height:23px;border-top-left-radius:4px;border-top-right-radius:4px}.incident-popup-title{color:inherit;font-size:12px;line-height:14px}.incident-popup-subtitle{color:inherit;font-size:8px;line-height:12px}.incident-popup-info>.message{display:inline-block;color:inherit;font-size:8pt;line-height:10pt;text-overflow:ellipsis;margin-left:5pt}.atlas-map.high-contrast-light .azure-maps-control-container .traffic-legend,.azure-maps-control-container.light .traffic-legend,.traffic-legend{color:#000;background-color:#fff;box-shadow:rgba(0,0,0,.16) 0 0 4px}.incident-popup-info>.icon{display:inline-block;background-repeat:no-repeat;background-position:center;background-size:10pt 10pt;height:10pt;width:10pt}.incident-popup-info>.delay{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNy4wMDE5IDM3Ij48dGl0bGU+aW5jaWRlbnQ8L3RpdGxlPjxwb2x5Z29uIHBvaW50cz0iMzAuNDQ5IDIwLjQ0OCAxNi44MzggMjAuNDQ4IDE2LjgzOCA2Ljg0MSAxOS41MDQgNi44NDEgMTkuNTA0IDE3Ljc4NiAzMC40NDkgMTcuNzg2IDMwLjQ0OSAyMC40NDgiIGZpbGw9IiM2NzY4NjciLz48cGF0aCBkPSJNMTguNTAxOSwzN2ExOC41LDE4LjUsMCwxLDEsMC0zN1YyLjY2MkExNS44MzgsMTUuODM4LDAsMSwwLDM0LjMzNjIsMTguNWgyLjY2NTdBMTguNTIxMSwxOC41MjExLDAsMCwxLDE4LjUwMTksMzdaIiBmaWxsPSIjNjc2ODY3Ii8+PHBhdGggZD0iTTE5LjczMDYsMi43MWMtLjQwNTItLjAzLS44MTQyLS4wNDgzLTEuMjI4Ny0uMDQ4M1YwYy40ODE1LDAsLjk2MTEuMDE4NiwxLjQzMzIuMDU1OFoiIGZpbGw9IiM2NzY4NjciLz48cGF0aCBkPSJNMzMuODk5MywxNC43Nzg0YTE1Ljg4NjUsMTUuODg2NSwwLDAsMC0uNzcxNS0yLjM1NzFsMi40NjEyLTEuMDI2MWExOC43ODcyLDE4Ljc4NzIsMCwwLDEsLjkwMTYsMi43NTQ5Wm0tMS45MDM1LTQuNTY5MmExNS44MiwxNS44MiwwLDAsMC0xLjQ2MTEtMi4wMDc2bDIuMDIyNS0xLjczMjVhMTguMzI4NiwxOC4zMjg2LDAsMCwxLDEuNzEsMi4zNDIyWk0yOC43NzgsNi40NDY3YTE2LjY4NjEsMTYuNjg2MSwwLDAsMC0yLjAxNjktMS40NjExTDI4LjE1OSwyLjcxNzdhMTguODE3MiwxOC44MTcyLDAsMCwxLDIuMzQ0MSwxLjY5OTFaTTI0LjU1NDUsMy44NjI4YTE1LjU1ODIsMT
2UuNTU4MiwwLDAsMC0yLjM2NjQtLjc2NTlMMjIuODA5LjUwMTlhMTkuNTM0LDE5LjUzNCwwLDAsMSwyLjc1NjguODkyM1oiIGZpbGw9IiM2NzY4NjciLz48cGF0aCBkPSJNMzcuMDAxOSwxOC41SDM0LjMzNjJjMC0uNDE2NC0uMDE0OS0uODI1NC0uMDQ2NS0xLjIzMDZsMi42NTgzLS4yMDA4QzM2Ljk4MzMsMTcuNTQwOCwzNy4wMDE5LDE4LjAxNjcsMzcuMDAxOSwxOC41WiIgZmlsbD0iIzY3Njg2NyIvPjwvc3ZnPg==)}.incident-popup-info>.length{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMSAyNiI+PHRpdGxlPmluY2lkZW50PC90aXRsZT48cGF0aCBkPSJNMCwyLjE2NjdWMEgzMVYyNkgwVjIzLjgzMzNIMi4yMTQzVjEzSDQuNDI4NlYyMy44MzMzSDguODU3MVYxOS41aDIuMjE0M3Y0LjMzMzNIMTUuNVYxM2gyLjIxNDNWMjMuODMzM2g0LjQyODZWMTkuNWgyLjIxNDN2NC4zMzMzaDQuNDI4NlYyLjE2NjdaIiBmaWxsPSIjNjc2ODY3Ii8+PC9zdmc+)}.incident-popup-info>.from{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNyAzNiI+PHRpdGxlPmluY2lkZW50PC90aXRsZT48cGF0aCBkPSJNMTMuNSwwYTEzLjM3LDEzLjM3LDAsMCwxLDMuNTg1OS40NzkyLDEzLjc4NjYsMTMuNzg2NiwwLDAsMSwzLjIyNzMsMS4zNDM4LDEzLjMzODYsMTMuMzM4NiwwLDAsMSw2LjIwMTYsNy45Njg3QTEyLjkwMDksMTIuOTAwOSwwLDAsMSwyNywxMy4zMzMzYTEwLjU2NjQsMTAuNTY2NCwwLDAsMS0uMzQ4LDIuNzQsMTMuNDA1MSwxMy40MDUxLDAsMCwxLTEuMDAyLDIuNTkzOEwxMy41LDM2LDEuMzUsMTguNjY2N0ExMy40MDUsMTMuNDA1LDAsMCwxLC4zNDgsMTYuMDcyOSwxMC41NjY0LDEwLjU2NjQsMCwwLDEsMCwxMy4zMzMzLDEyLjkwMDksMTIuOTAwOSwwLDAsMSwuNDg1Miw5Ljc5MTcsMTMuNDM0NiwxMy40MzQ2LDAsMCwxLDEuODQ1Nyw2LjYwNDJhMTMuNDUzLDEzLjQ1MywwLDAsMSw0Ljg0MS00Ljc4MTJBMTMuNzg2NSwxMy43ODY1LDAsMCwxLDkuOTE0MS40NzkyLDEzLjM3LDEzLjM3LDAsMCwxLDEzLjUsME0yMy41NDA2LDE3LjYyNXEwLS4wMjA4LjAxMDUtLjAyMDh0LjAxMDUtLjAyMDhhOC45OCw4Ljk4LDAsMCwwLC44MDE2LTIuMDYyNSw4Ljg4MTYsOC44ODE2LDAsMCwwLC4yNzQyLTIuMTg3NSwxMC41MzM3LDEwLjUzMzcsMCwwLDAtLjg3NTQtNC4yNzA4LDExLjE1NjEsMTEuMTU2MSwwLDAsMC0yLjM5NDEtMy41LDExLjMxLDExLjMxLDAsMCwwLTMuNTQzNy0yLjM2NDZBMTAuODk2MSwxMC44OTYxLDAsMCwwLDEzLjUsMi4zMzMzYTEwLjg5NjEsMTAuODk2MSwwLDAsMC00LjMyNDIuODY0NkExMS4zMSwxMS4zMSwwLDAsMCw1LjYzMiw1LjU2MjVhMTEuMTU2MSwxMS4xNTYxLDAsMCwwLTIuMzk0MSwzLjUsMTAuNTMzNywxMC41MzM3LDAsMCwwLS44NzU0LDQuMjcwOCw4Ljg4MTUsOC44ODE1LDAsMCwwLC4yNzQyLDIuMTg3NSw4Ljk4LDguOTgsMCwwLDAsLjgwMTYsMi4wNjI1cTAsLjAyMDguMDEwNS4wMjA4dC4wMTA1LjAyMDhMMTMuNSwzMC43OTE3LDIzLjU0MDYsMTcuNjI1TTEzLjUsNS41YTcuODEyMiw3LjgxMjIsMCwwLDEsMy4wOS42MTQ2LDguMDA5Myw4LjAwOTMsMCwwLDEsMi41MjA3LDEuNjc3MSw3LjksNy45LDAsMCwxLDEuNjk4LDIuNDksNy43OTYsNy43OTYsMCwwLDEsMCw2LjEwNDIsNy45LDcuOSwwLDAsMS0xLjY5OCwyLjQ5QTguMDA5Myw4LjAwOTMsMCwwLDEsMTYuNTksMjAuNTUyMWE4LjA3NjQsOC4wNzY0LDAsMCwxLTYuMTgsMEE4LjAwOTIsOC4wMDkyLDAsMCwxLDcuODg5MSwxOC44NzVhNy45LDcuOSwwLDAsMS0xLjY5OC0yLjQ5LDcuNzk2LDcuNzk2LDAsMCwxLDAtNi4xMDQyLDcuOSw3LjksMCwwLDEsMS42OTgtMi40OUE4LjAwOTIsOC4wMDkyLDAsMCwxLDEwLjQxLDYuMTE0Niw3LjgxMjMsNy44MTIzLDAsMCwxLDEzLjUsNS41bTAsMTMuMzMzM2E1LjU0MDcsNS41NDA3LDAsMCwwLDUuMTM2My0zLjM1NDIsNS41NCw1LjU0LDAsMCwwLDAtNC4yOTE3LDUuNTA1NCw1LjUwNTQsMCwwLDAtMS4xOTE4LTEuNzUsNS42Mjg5LDUuNjI4OSwwLDAsMC03Ljg4OTEsMCw1LjUwNTQsNS41MDU0LDAsMCwwLTEuMTkxOCwxLjc1LDUuNTQsNS41NCwwLDAsMCwwLDQuMjkxNyw1LjUwNTQsNS41MDU0LDAsMCwwLDEuMTkxOCwxLjc1QTUuNTY5NCw1LjU2OTQsMCwwLDAsMTMuNSwxOC44MzMzWiIgZmlsbD0iIzY3Njg2NyIvPjwvc3ZnPg==)}.incident-popup-info>.to{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNyAzNiI+PHRpdGxlPmluY2lkZW50PC90aXRsZT48cGF0aCBkPSJNMTMuNSwwYTEzLjM3LDEzLjM3LDAsMCwxLDMuNTg1OS40NzkyLDEzLjc4NjYsMTMuNzg2NiwwLDAsMSwzLjIyNzMsMS4zNDM4LDEzLjMzODYsMTMuMzM4NiwwLDAsMSw2LjIwMTYsNy45Njg3QTEyLjkwMDksMTIuOTAwOSwwLDAsMSwyNywxMy4zMzMzYTEwLjU2NjQsMTAuNTY2NCwwLDAsMS0uMzQ4LDIuNzQsMTMuNDA1MSwxMy40MDUxLDAsMCwxLTEuMDAyLDIuNTkzOEwxMy41LDM2LDEuMzUsMTguNjY2N0ExMy40MDUsMTMuNDA1LDAsMCwxLC4zNDgsMTYuMDcyOSwxMC41NjY0LDEwLjU2NjQsMCwwLDEsMCwxMy4zMzMzLDEyLjkwMDksMTIuOTAwOSwwLDAsMSwuNDg1Miw5Ljc5MTcsMTMuNDM0NiwxMy40MzQ2LDAsMCwxLDEuODQ1Nyw2LjYwNDJhMTMuNDUzLDEzLjQ1MywwLDAsMSw0Ljg0MS00Ljc4MTJBMTMuNzg2NSwxMy43ODY1LDAsMCwxLDkuOTE0MS40NzkyLDEzLjM3LDEzLjM3LDAsMCwxLDEzLjUsME0yMy41NDA2LDE3LjYyNXEwLS4wMjA4LjAxMDUtLjAyMDh0LjAxMDUtLjAyMDhhOC45OCw4Ljk4LDAsMCwwLC44MDE2LTIuMDYyNSw4Ljg4MTYsOC44ODE2LDAsMCwwLC4yNzQyLTIuMTg3NSwxMC41MzM3LDEwLjUzMzcsMCwwLDAtLjg3NTQtNC4yNzA4LDExLjE1NjEsMTEuMTU2MSwwLDAsMC0yLjM5NDEtMy41LDExLjMxLDExLjMxLDAsMCwwLTMuNTQzNy0yLjM2NDZBMTAuODk2MSwxMC44OTYxLDAsMCwwLDEzLjUsMi4zMzMzYTEwLjg5NjEsMTAuODk2MSwwLDAsMC00LjMyNDIuODY0NkExMS4zMSwxMS4zMSwwLDAsMCw1LjYzMiw1LjU2MjVhMTEuMTU2MSwxMS4xNTYxLDAsMCwwLTIuMzk0MSwzLjUsMTAuNTMzNywxMC41MzM3LDAsMCwwLS44NzU0LDQuMjcwOCw4Ljg4MTUsOC44ODE1LDAsMCwwLC4yNzQyLDIuMTg3NSw4Ljk4LDguOTgsMCwwLDAsLjgwMTYsMi4wNjI1cTAsLjAyMDguMDEwNS4wMjA4dC4wMTA1LjAyMDhMMTMuNSwzMC43OTE3LDIzLjU0MDYsMTcuNjI1TTEzLjUsNS41YTcuODEyMiw3LjgxMjIsMCwwLDEsMy4wOS42MTQ2LDguMDA5Myw4LjAwOTMsMCwwLDEsMi41MjA3LDEuNjc3MSw3LjksNy45LDAsMCwxLDEuNjk4LDIuNDksNy43OTYsNy43OTYsMCwwLDEsMCw2LjEwNDIsNy45LDcuOSwwLDAsMS0xLjY5OCwyLjQ5QTguMDA5Myw4LjAwOTMsMCwwLDEsMTYuNTksMjAuNTUyMWE4LjA3NjQsOC4wNzY0LDAsMCwxLTYuMTgsMEE4LjAwOTIsOC4wMDkyLDAsMCwxLDcuODg5MSwxOC44NzVhNy45LDcuOSwwLDAsMS0xLjY5OC0yLjQ5LDcuNzk2L
2DcuNzk2LDAsMCwxLDAtNi4xMDQyLDcuOSw3LjksMCwwLDEsMS42OTgtMi40OUE4LjAwOTIsOC4wMDkyLDAsMCwxLDEwLjQxLDYuMTE0Niw3LjgxMjMsNy44MTIzLDAsMCwxLDEzLjUsNS41IiBmaWxsPSIjNjc2ODY3Ii8+PC9zdmc+)}@font-face{font-family:segoeui;src:url(https://atlas.microsoft.com/styles/glyphs/segoeui.ttf)}.font-segoeui{font-family:segoeui}@font-face{font-family:segoeui-b;src:url(https://atlas.microsoft.com/styles/glyphs/segoeuib.ttf)}.font-segoeui-b{font-family:segoeui-b}@font-face{font-family:segoeui-i;src:url(https://atlas.microsoft.com/styles/glyphs/segoeuii.ttf)}.font-segoeui-i{font-family:segoeui-i}@font-face{font-family:segoeui-sl;src:url(https://atlas.microsoft.com/styles/glyphs/segoeuisl.ttf)}.font-segoeui-sl{font-family:segoeui-sl}@font-face{font-family:standard;src:url(https://atlas.microsoft.com/styles/glyphs/standardfont.ttf)}.font-standard{font-family:standard}@font-face{font-family:standard-b;src:url(https://atlas.microsoft.com/styles/glyphs/standardfontbold.ttf)}.font-standard-b{font-family:standard-b}.atlas-control-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.atlas-control-container .sub-container,.azure-maps-control-container>.style-options.icons{display:flex;flex-direction:row;position:relative}.top-left.subcontrol-container{position:absolute;top:0;left:0;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}.top-right.subcontrol-container{position:absolute;top:0;right:0;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-end}.bottom-left.subcontrol-container{position:absolute;bottom:0;left:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start}.bottom-right.subcontrol-container{position:absolute;bottom:40px;right:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.non-fixed.subcontrol-container{width:100%;height:100%}.hidden-accessible-element{clip:rect(1px,1px,1px,1px);height:1px;position:absolute;width:1px}.azure-maps-control-container{margin:10px;border-collapse:collapse;display:flex;flex-wrap:nowrap;pointer-events:auto;position:relative}.azure-maps-control-container:not(:first-child){margin-top:2px}.azure-maps-control-container:not(:last-child){margin-bottom:2px}.azure-maps-control-button,.azure-maps-control-button.traffic,.traffic-legend{margin:0;text-align:center;background-repeat:no-repeat;background-position:center center;padding:0;border-collapse:collapse}.azure-maps-control-button{user-select:none;border:none;width:32px;height:32px;cursor:pointer;line-height:32px;overflow:hidden;z-index:100}.atlas-map.high-contrast-light .azure-maps-control-container .azure-maps-control-button,.azure-maps-control-container.light .azure-maps-control-button{background-color:#fff;box-shadow:rgba(0,0,0,.16) 0 0 4px}.atlas-map.high-contrast-dark .azure-maps-control-container .azure-maps-control-button,.azure-maps-control-container.dark .azure-maps-control-button{background-color:#011c2c;box-shadow:rgba(0,0,0,.16) 0 0 4px}.atlas-map.high-contrast-light .azure-maps-control-container .azure-maps-control-button:active,.azure-maps-control-container.light .azure-maps-control-button:active{background-color:#f1f1f1}.atlas-map.high-contrast-dark .azure-maps-control-container .azure-maps-control-button:active,.azure-maps-control-container.dark .azure-maps-control-button:active{background-color:#43474c}.atlas-map.high-contrast-light .azure-maps-control-container .azure-maps-control-button,.atlas-map.high-contrast-light .azure-maps-control-container>.style-options.list button{border:3px solid #000}.atlas-map.high-contrast-dark .azure-maps-control-container .azure-maps-control-button,.atlas-map.high-contrast-dark .azure-maps-control-container>.style-options.list button{border:3px solid #fff}.azure-maps-control-button.zoom-in{background-size:12px 12px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 4.8V.2a.215.215 0 0 0-.2-.2H5.2a.215.215 0 0 0-.2.2v4.6a.215.215 0 0 1-.2.2H.2a.215.215 0 0 0-.2.2v1.6a.215.215 0 0 0 .2.2h4.6a.215.215 0 0 1 .2.2v4.6a.215.215 0 0 0 .2.2h1.6a.215.215 0 0 0 .2-.2V7.2a.215.215 0 0 1 .2-.2h4.6a.215.215 0 0 0 .2-.2V5.2a.215.215 0 0 0-.2-.2H7.2a.215.215 0 0 1-.2-.2z' fill='%2383888d'/%3E%3C/svg%3E\");position:relative}.atlas-map.high-contrast-dark .azure-maps-control-button.zoom-in{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 4.8V.2a.215.215 0 00-.2-.2H5.2a.215.215 0 00-.2.2v4.6a.215.215 0 01-.2.2H.2a.215.215 0 00-.2.2v1.6a.215.215 0 00.2.2h4.6a.215.215 0 01.2.2v4.6a.215.215 0 00.2.2h1.6a.215.215 0 00.2-.2V7.2a.215.215 0 01.2-.2h4.6a.215.215 0 00.2-.2V5.2a.215.215 0 00-.2-.2H7.2a.215.215 0 01-.2-.2z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.zoom-in{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 4.8V.2a.215.215 0 00-.2-.2H5.2a.215.215 0 00-.2.2v4.6a.215.215 0 01-.2.2H.2a.215.215 0 00-.2.2v1.6a.215.215 0 00.2.2h4.6a.215.215 0 01.2.2v4.6a.215.215 0 00.2.2h1.6a.215.215 0 00.2-.2V7.2a.215.215 0 01.2-.2h4.6a.215.215 0 00.2-.2V5.2a.215.215 0 00-.2-.2H7.2a.215.215 0 01-.2-.2z'/%3E%3C/svg%3E\")}.atlas-map:not(.high-contrast-light):not(.high-contrast-dark) .azure-maps-control-container.light .azure-maps-control-button.zoom-in:after{position:absolute;width:24px;left:4px;bottom:0;height:1px;border-bottom:.5px solid #bababa}.atlas-map:not(.high-contrast-light):not(.high-contrast-dark) .azure-maps-control-container.dark .azure-maps-control-button.zoom-in:after{position:absolute;width:24px;left:4px;bottom:0;height:1px;border-bottom:.5px solid #43474c}.azure-maps-control-button.zoom-in:active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 4.8V.2a.215.215 0 0 0-.2-.2H5.2a.215.215 0 0 0-.2.2v4.6a.215.215 0 0 1-.2.2H.2a.215.215 0 0 0-.2.2v1.6a.215.215 0 0 0 .2.2h4.6a.215.215 0 0 1 .2.2v4.6a.215.215 0 0 0 .2.2h1.6a.215.215 0 0 0 .2-.2V7.2a.215.215 0 0 1 .2-.2h4.6a.215.215 0 0 0 .2-.2V5.2a.215.215 0 0 0-.2-.2H7.2a.215.215 0 0 1-.2-.2z' fill='%2362666a'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.zoom-in:active,.atlas-map.high-contrast-light .azure-maps-control-button.zoom-in:active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 4.8V.2a.215.215 0 00-.2-.2H5.2a.215.215 0 00-.2.2v4.6a.215.215 0 01-.2.2H.2a.215.215 0 00-.2.2v1.6a.215.215 0 00.2.2h4.6a.215.215 0 01.2.2v4.6a.215.215 0 00.2.2h1.6a.215.215 0 00.2-.2V7.2a.215.215 0 01.2-.2h4.6a.215.215 0 00.2-.2V5.2a.215.215 0 00-.2-.2H7.2a.215.215 0 01-.2-.2z' fill='%237f7f7f'/%3E%3C/svg%3E\")}.azure-maps-control-button.zoom-out{background-size:12px 12px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 2'%3E%3Cpath d='M11.8 2H.2a.215.215 0 0 1-.2-.2V.2A.215.215 0 0 1 .2 0h11.6a.215.215 0 0 1 .2.2v1.6a.215.215 0 0 1-.2.2z' fill='%2383888d'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.zoom-out{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 2'%3E%3Cpath d='M11.8 2H.2a.215.215 0 01-.2-.2V.2A.215.215 0 01.2 0h11.6a.215.215 0 01.2.2v1.6a.215.215 0 01-.2.2z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.zoom-out{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 2'%3E%3Cpath d='M11.8 2H.2a.215.215 0 01-.2-.2V.2A.215.215 0 01.2 0h11.6a.215.215 0 01.2.2v1.6a.215.215 0 01-.2.2z'/%3E%3C/svg%3E\")}.azure-maps-control-button.zoom-out:active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 2'%3E%3Cpath d='M11.8 2H.2a.215.215 0 0 1-.2-.2V.2A.215.215 0 0 1 .2 0h11.6a.215.215 0 0 1 .2.2v1.6a.215.215 0 0 1-.2.2z' fill='%2362666a'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.zoom-out:active,.atlas-map.high-contrast-light .azure-maps-control-button.zoom-out:active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 2'%3E%3Cpath d='M11.8 2H.2a.215.215 0 01-.2-.2V.2A.215.215 0 01.2 0h11.6a.215.215 0 01.2.2v1.6a.215.215 0 01-.2.2z' fill='%237f7f7f'/%3E%3C/svg%3E\")}.azure-maps-control-button.traffic{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 1000 1000' xml:space='preserve'><g fill='Gray'><path d='M988.5,683l-8.9-26c-4.9-14.4-20.6-26-35-26h-30.3c-18.9-53.8-38.6-101.5-45.1-116.2c-11.9-27-49.9-32.8-70.9-38.7c0,
20-35-10.7-151.6-10.7c-116.6,0-151.6,10.7-151.6,10.7c-24.5,8.3-58.6,13.6-72.1,39.9c-5.4,10.5-25.4,59.6-44.6,115h-30c-14.4,0-30,11.6-35,26l-8.9,26c-4.9,14.4,2.7,31.1,17.1,31.1h30c-8,23.4-13.4,34.2-13.4,34.2c-2.2,3.8-3.8,21.4-3.8,26.2v194.8c0,14.4,11.6,26,26,26h72.3c14.4,0,26-11.6,26-26v-36.5h375.8v36.5c0,14.4,11.6,26,26,26H933c14.4,0,26-11.6,26-26V774.4c0-4.7-1.6-22.4-3.8-26.2c0,0-5.5-10.8-13.6-34.2h29.7C985.8,714.1,993.4,697.3,988.5,683z M493.2,839.1h-34.6c-30.9,0-61.8-4.5-61.8-26v-26c0-25.1,13.3-26,27.7-26c14,0,41.8,13,60.1,21.9c20,9.8,42.3,17.9,42.3,34.2C527,832.2,519.3,839.1,493.2,839.1z M421,658.7c18.3-72.5,38.1-99.7,42.5-111.1c3.5-8.3,6.9-33.9,183.3-33.9s180.5,29.3,181,29.6c5.4,15.5,27,48.6,44.3,115.4c0,0-74.5,24.2-225.2,24.2S421,658.7,421,658.7z M896.7,813.1c0,21.5-30.9,26-61.8,26h-34.6c-26,0-33.7-6.9-33.7-21.9c0-16.3,22.3-24.4,42.3-34.2c18.3-9,46.1-21.9,60.1-21.9c14.4,0,27.7,0.9,27.7,26V813.1L896.7,813.1z'/><path d='M611.3,346.4L611.3,346.4c-16-45.3-32.4-86.1-41.1-106.8C579,260.4,595.4,301.1,611.3,346.4z'/><path d='M348.5,589.1h0.5c15.4-42.4,30.8-80.3,36.9-92.3c19.3-37.5,58-49,83.6-56.6c4.3-1.3,8.4-2.5,12.3-3.8c8-2.5,48.1-13,165-13c1,0,1.7,0,2.6,0c-0.3-0.9-0.5-1.5-0.9-2.4h29.7c14.4,0,22-16.7,17.1-31.1l-8.9-26c-4.9-14.4-20.6-26-35-26h-30.3c-18.9-53.8-38.6-101.5-45.1-116.2c-11.9-27-49.9-32.8-70.9-38.7c0,0-35-10.7-151.6-10.7c-116.6,0-151.6,10.7-151.6,10.7c-24.5,8.3-58.5,13.6-72.1,39.9c-5.4,10.5-25.4,59.6-44.6,115H55.4c-14.4,0-30,11.6-35,26l-8.9,26C6.6,404.2,14.2,421,28.6,421h30c-8,23.4-13.4,34.2-13.4,34.2c-2.2,3.8-3.8,21.4-3.8,26.2v194.8c0,14.4,11.6,26,26,26h72.3c14.4,0,26-11.6,26-26v-36.5h110.1C287.8,610.3,317.4,589.1,348.5,589.1z M170.5,254.6c3.5-8.3,6.9-33.9,183.3-33.9c176.3,0,180.5,29.3,181,29.6c5.4,15.5,27,48.6,44.3,115.4c0,0-74.5,24.2-225.2,24.2C203,389.9,128,365.6,128,365.6C146.2,293.2,166.1,266,170.5,254.6z M200.2,546.1h-34.5c-30.9,0-61.8-4.5-61.8-26v-26c0-25.1,13.3-26,27.7-26c14,0,41.8,13,60.1,21.9c20,9.8,42.3,17.9,42.3,34.2C233.9,539.1,226.2,546.1,200.2,546.1z'/>
2<path d='M463.5,87.1c3.5-8.3,6.9-33.9,183.3-33.9c176.3,0,180.5,29.3,181,29.6c5.4,15.5,27,48.6,44.3,115.4c0,0-74.5,24.2-225.2,24.2c-8.9,0-16.7-0.3-25.1-0.5c7.1,17.1,17.5,43.1,28.9,74.1h0.9c32.4,0,63.8,22.9,74.5,54.3l8.9,26c5.7,16.5,4.7,34.2-2,49.6c51.4,3.2,72.8,8.7,77.6,10.1l7.8,2c26.5,6.7,70.7,17.9,89.2,59.9c2.7,6.2,8.2,19.4,15.2,36.8H933c14.4,0,26-11.6,26-26V313.9c0-4.7-1.6-22.4-3.8-26.2c0,0-5.5-10.8-13.6-34.2h29.7c14.4,0,22-16.7,17.1-31.1l-9-26c-4.9-14.4-20.6-26-35-26h-30.3c-18.9-53.8-38.6-101.5-45.1-116.2c-11.9-27-49.9-32.8-70.9-38.7c0,0-35-10.7-151.6-10.7c-116.6,0-151.6,10.7-151.6,10.7c-24.5,8.3-58.6,13.6-72.1,39.9c-4,7.9-16.3,37.6-30.4,75.4c19.2,0.4,35,1.2,49.2,2.1C452.3,107.2,460.9,94.1,463.5,87.1z M896.7,326.5v26c0,21.5-30.9,26-61.8,26h-34.6c-26,0-33.7-6.9-33.7-21.9c0-16.2,22.4-24.4,42.3-34.2c18.3-9,46.1-21.9,60.1-21.9C883.3,300.5,896.7,301.4,896.7,326.5z'/></g></svg>\");position:relative;border:none;width:32px;height:32px;cursor:pointer;line-height:32px;background-size:20px;z-index:200;box-shadow:0 0 4px rgba(0,0,0,.16)}.azure-maps-control-button.traffic:active,.azure-maps-control-container.in-use .azure-maps-control-button.traffic:not(:active){background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 1000 1000' xml:space='preserve'><g fill='DeepSkyBlue'><path d='M988.5,683l-8.9-26c-4.9-14.4-20.6-26-35-26h-30.3c-18.9-53.8-38.6-101.5-45.1-116.2c-11.9-27-49.9-32.8-70.9-38.7c0,0-35-10.7-151.6-10.7c-116.6,0-151.6,10.7-151.6,10.7c-24.5,8.3-58.6,13.6-72.1,39.9c-5.4,10.5-25.4,59.6-44.6,115h-30c-14.4,0-30,11.6-35,26l-8.9,26c-4.9,14.4,2.7,31.1,17.1,31.1h30c-8,23.4-13.4,34.2-13.4,34.2c-2.2,3.8-3.8,21.4-3.8,26.2v194.8c0,14.4,11.6,26,26,26h72.3c14.4,0,26-11.6,26-26v-36.5h375.8v36.5c0,14.4,11.6,26,26,26H933c14.4,0,26-11.6,26-26V774.4c0-4.7-1.6-22.4-3.8-26.2c0,0-5.5-10.8-13.6-34.2h29.7C985.8,714.1,993.4,697.3,988.5,683z M493.2,839.1h-34.6c-30.9,0-61.8-4.5-61.8-26v-26c0-25.1,13.3-26,27.7-26c14,0,41.8,13,60.1,21.9c20,9.8,42.3,17.9,42.3,34.2C527,832.2,519.3,839.1,493.2,839.1z M421,658.7c18.3-72.5,38.1-99.7,42.5-111.1c3.5-8.3,6.9-33.9,183.3-33.9s180.5,29.3,181,29.6c5.4,15.5,27,48.6,44.3,115.4c0,0-74.5,24.2-225.2,24.2S421,658.7,421,658.7z M896.7,813.1c0,21.5-30.9,26-61.8,26h-34.6c-26,0-33.7-6.9-33.7-21.9c0-16.3,22.3-24.4,42.3-34.2c18.3-9,46.1-21.9,60.1-21.9c14.4,0,27.7,0.9,27.7,26V813.1L896.7,813.1z'/><path d='M611.3,346.4L611.3,346.4c-16-45.3-32.4-86.1-41.1-106.8C579,260.4,595.4,301.1,611.3,346.4z'/><path d='M348.5,589.1h0.5c15.4-42.4,30.8-80.3,36.9-92.3c19.3-37.5,58-49,83.6-56.6c4.3-1.3,8.4-2.5,12.3-3.8c8-2.5,48.1-13,165-13c1,0,1.7,0,2.6,0c-0.3-0.9-0.5-1.5-0.9-2.4h29.7c14.4,0,22-16.7,17.1-31.1l-8.9-26c-4.9-14.4-20.6-26-35-26h-30.3c-18.9-53.8-38.6-101.5-45.1-116.2c-11.9-27-49.9-32.8-70.9-38.7c0,0-35-10.7-151.6-10.7c-116.6,0-151.6,10.7-151.6,10.7c-24.5,8.3-58.5,13.6-72.1,39.9c-5.4,10.5-25.4,59.6-44.6,115H55.4c-14.4,0-30,11.6-35,26l-8.9,26C6.6,404.2,14.2,421,28.6,421h30c-8,23.4-13.4,34.2-13.4,34.2c-2.2,3.8-3.8,21.4-3.8,26.2v194.8c0,14.4,11.6,26,26,26h72.3c14.4,0,26-11.6,26-26v-36.5h110.1C287.8,610.3,317.4,589.1,348.5,589.1z M170.5,254.6c3.5-8.3,6.9-33.9,183.3-33.9c176.3,0,180.5,29.3,181,29.6c5.4,15.5,27,48.6,44.3,115.4c0,0-74.5,24.2-225.2,24.2C203,389.9,128,365.6,128,365.6C146.2,293.2,166.1,266,170.5,254.6z M200.2,546.1h-34.5c-30.9,0-61.8-4.5-61.8-26v-26c0-25.1,13.3-26,27.7-26c14,0,41.8,13,60.1,21.9c20,9.8,42.3,17.9,42.3,34.2C233.9,539.1,226.2,546.1,200.2,546.1z'/>
2<path d='M463.5,87.1c3.5-8.3,6.9-33.9,183.3-33.9c176.3,0,180.5,29.3,181,29.6c5.4,15.5,27,48.6,44.3,115.4c0,0-74.5,24.2-225.2,24.2c-8.9,0-16.7-0.3-25.1-0.5c7.1,17.1,17.5,43.1,28.9,74.1h0.9c32.4,0,63.8,22.9,74.5,54.3l8.9,26c5.7,16.5,4.7,34.2-2,49.6c51.4,3.2,72.8,8.7,77.6,10.1l7.8,2c26.5,6.7,70.7,17.9,89.2,59.9c2.7,6.2,8.2,19.4,15.2,36.8H933c14.4,0,26-11.6,26-26V313.9c0-4.7-1.6-22.4-3.8-26.2c0,0-5.5-10.8-13.6-34.2h29.7c14.4,0,22-16.7,17.1-31.1l-9-26c-4.9-14.4-20.6-26-35-26h-30.3c-18.9-53.8-38.6-101.5-45.1-116.2c-11.9-27-49.9-32.8-70.9-38.7c0,0-35-10.7-151.6-10.7c-116.6,0-151.6,10.7-151.6,10.7c-24.5,8.3-58.6,13.6-72.1,39.9c-4,7.9-16.3,37.6-30.4,75.4c19.2,0.4,35,1.2,49.2,2.1C452.3,107.2,460.9,94.1,463.5,87.1z M896.7,326.5v26c0,21.5-30.9,26-61.8,26h-34.6c-26,0-33.7-6.9-33.7-21.9c0-16.2,22.4-24.4,42.3-34.2c18.3-9,46.1-21.9,60.1-21.9C883.3,300.5,896.7,301.4,896.7,326.5z'/></g></svg>\");filter:brightness(90%)}.traffic-legend{font-family:segoeui;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;width:150px;overflow:hidden;z-index:100}.hidden{visibility:hidden}.atlas-map.high-contrast-dark .azure-maps-control-container .traffic-legend,.azure-maps-control-container.dark .traffic-legend{background-color:#011c2c;box-shadow:rgba(0,0,0,.16) 0 0 4px;color:#fff}.traffic-legend table{border-collapse:collapse;padding:0;margin:4px;text-align:left;font-size:12px}.traffic-legend table div{width:20px;height:8px;margin-top:2px;float:left}.traffic-legend table td div.green{background-color:#6C9}.traffic-legend table td div.yellow{background-color:#FFAB66}.traffic-legend table td div.red{background-color:#EE2F53}.traffic-legend table td div.dark-red{background-color:#6B0512}.traffic-legend table td.traffic-legend-title{font-weight:700}.traffic-legend table td.traffic-legend-colors{width:84px}.traffic-legend table td.traffic-legend-text{width:25px}.azure-maps-control-button.pitch{background-size:10.8px 8.2px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2 0-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 0 1 .2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 0 1-.3.1z' fill='%2383888d'/%3E%3C/svg%3E\");z-index:200}.atlas-map.high-contrast-dark .azure-maps-control-button.pitch{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2 0-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 01.2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 01-.3.1z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.pitch{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2 0-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 01.2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 01-.3.1z'/%3E%3C/svg%3E\")}.azure-maps-control-container.in-use .azure-maps-control-button.pitch:not(:active){background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2 0-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 0 1 .2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 0 1-.3.1z' fill='%2331acce'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-container.in-use .azure-maps-control-button.pitch:not(:active),.atlas-map.high-contrast-light .azure-maps-control-container.in-use .azure-maps-control-button.pitch:not(:active){background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2 0-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 01.2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 01-.3.1z' fill='%23136bfb'/%3E%3C/svg%3E\")}.azure-maps-control-button.pitch:active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2 0-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 0 1 .2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 0 1-.3.1z' fill='%2362666a'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.pitch:active,.atlas-map.high-contrast-light .azure-maps-control-button.pitch:active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.8 8.2'%3E%3Cpath d='M10.5 8.2H.3c-.1 0-.2
20-.2-.1C0 8.1 0 8 0 7.9L2.5.2a.215.215 0 01.2-.2H8c.1 0 .2.1.3.2l2.5 7.7v.2a.367.367 0 01-.3.1z' fill='%237f7f7f'/%3E%3C/svg%3E\")}.azure-maps-control-button.pitch-up{background-size:5.2px 13px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5.2 13'%3E%3Cpath d='M2.7 0L0 6h1.6v6.8a.215.215 0 0 0 .2.2h1.6a.215.215 0 0 0 .2-.2V6h1.6z' fill='%2383888d'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.pitch-up{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5.2 13'%3E%3Cpath d='M2.7 0L0 6h1.6v6.8a.215.215 0 00.2.2h1.6a.215.215 0 00.2-.2V6h1.6z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.pitch-up{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5.2 13'%3E%3Cpath d='M2.7 0L0 6h1.6v6.8a.215.215 0 00.2.2h1.6a.215.215 0 00.2-.2V6h1.6z'/%3E%3C/svg%3E\")}.azure-maps-control-button.pitch-down{background-size:5.2px 13px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5.3 12.9'%3E%3Cpath d='M3.6 7V.2a.215.215 0 0 0-.2-.2H1.8a.215.215 0 0 0-.2.2V7L0 6.9l2.5 6h.1L5.3 7H3.6z' fill='%2383888d'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.pitch-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5.3 12.9'%3E%3Cpath d='M3.6 7V.2a.215.215 0 00-.2-.2H1.8a.215.215 0 00-.2.2V7L0 6.9l2.5 6h.1L5.3 7H3.6z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.pitch-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5.3 12.9'%3E%3Cpath d='M3.6 7V.2a.215.215 0 00-.2-.2H1.8a.215.215 0 00-.2.2V7L0 6.9l2.5 6h.1L5.3 7H3.6z'/%3E%3C/svg%3E\")}.azure-maps-control-button.rotation{overflow:hidden;z-index:200}.azure-maps-control-button.rotation div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z' fill='%2383888d'/%3E%3C/svg%3E\");background-position:center center;background-repeat:no-repeat;background-size:7.4px 14px;height:100%;width:100%}.atlas-map.high-contrast-dark .azure-maps-control-button.rotation div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.rotation div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z'/%3E%3C/svg%3E\")}.azure-maps-control-container.in-use .azure-maps-control-button.rotation:not(:active) div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z' fill='%2331acce'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-container.in-use .azure-maps-control-button.rotation:not(:active) div,.atlas-map.high-contrast-light .azure-maps-control-container.in-use .azure-maps-control-button.rotation:not(:active) div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z' fill='%23136bfb'/%3E%3C/svg%3E\")}.azure-maps-control-button.rotation:active div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z' fill='%2362666a'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.rotation:active div,.atlas-map.high-contrast-light .azure-maps-control-button.rotation:active div{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7.4 14'%3E%3Cpath d='M2.2 7h3.1L3.7 3.4z' fill='none'/%3E%3Cpath d='M4.7.6L4.4 0H3L.2 6.6 0 7l2.8 6.4.3.6h1.4l2.9-6.6V7zM2.2 7l1.5-3.5L5.3 7z' fill='%237f7f7f'/%3E%3C/svg%3E\")}.azure-maps-control-button.rotation-left{background-size:14px 14px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13.8 10'%3E%3Cpath d='M12.8 10a7.17 7.17 0 0 0-7.2-7.2' fill='none' stroke='%2383888d' stroke-miterlimit='10' stroke-width='2'/%3E%3Cpath d='M6 0L0 2.5v.1l6 2.7z' fill='%2383888d'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.rotation-left{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13.8 10'%3E%3Cpath d='M12.8 10a7.17 7.17 0 00-7.2-7.2' fill='none' stroke='%23fff' stroke-miterlimit='10' stroke-width='2'/%3E%3Cpath d='M6 0L0 2.5v.1l6 2.7z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.rotation-left{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13.8 10'%3E%3Cpath d='M12.8 10a7.17 7.17 0 00-7.2-7.2' fill='none' stroke='%23000' stroke-miterlimit='10' stroke-width='2'/%3E%3Cpath d='M6 0L0 2.5v.1l6 2.7z'/%3E%3C/svg%3E\")}.azure-maps-control-button.rotation-right{background-size:14px 14px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13.8 10'%3E%3Cpath d='M1 10a7.17 7.17 0 0 1 7.2-7.2' fill='none' stroke='%2383888d' stroke-miterlimit='10' stroke-width='2'/%3E%3Cpath d='M7.8 0l6 2.5v.1L7.9 5.3z' fill='%2383888d'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-button.rotation-right{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13.8 10'%3E%3Cpath d='M1 10a7.17 7.17 0 017.2-7.2' fill='none' stroke='%23fff' stroke-miterlimit='10' stroke-width='2'/%3E%3Cpath d='M7.8 0l6 2.5v.1L7.9 5.3z' fill='%23fff'/%3E%3C/svg%3E\")}.atlas-map.high-contrast-light .azure-maps-control-button.rotation-right{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13.8 10'%3E%3Cpath d='M1 10a7.17 7.17 0 017.2-7.2' fill='none' stroke='%23000' stroke-miterlimit='10' stroke-width='2'/%3E%3Cpath d='M7.8 0l6 2.5v.1L7.9 5.3z'/%3
2E%3C/svg%3E\")}.azure-maps-control-button.curr-style{position:relative}.azure-maps-control-button.curr-style>.icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11.6 11.6'%3E%3Cg transform='rotate(180 5.8 5.8)'%3E%3Ccircle cx='5.8' cy='5.8' r='5.8' fill='%2383888d'/%3E%3Cpath d='M6 9.5L3.5 5.9v-.2L6 2.4a.188.188 0 0 1 .3 0l1.3 1a.188.188 0 0 1 0 .3L6 5.7A.188.188 0 0 0 6 6l1.6 2.4c.1.1 0 .2-.1.3l-1.3.8c-.1.1-.2.1-.2 0z' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E\");background-size:11.6px 11.6px;background-repeat:no-repeat;background-position:center center;z-index:200;position:absolute;top:0;bottom:0;right:0;left:0}.atlas-map.high-contrast-dark .azure-maps-control-button.curr-style>.icon,.atlas-map.high-contrast-light .azure-maps-control-button.curr-style>.icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11.6 11.6'%3E%3Cg transform='rotate(180 5.8 5.8)'%3E%3Ccircle cx='5.8' cy='5.8' r='5.05' stroke='%23fff' stroke-width='1.5'/%3E%3Cpath d='M6 9.5L3.5 5.9v-.2L6 2.4a.188.188 0 01.3 0l1.3 1a.188.188 0 010 .3L6 5.7A.188.188 0 006 6l1.6 2.4c.1.1 0 .2-.1.3l-1.3.8c-.1.1-.2.1-.2 0z' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E\")}.azure-maps-control-container.in-use .azure-maps-control-button.curr-style>.icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11.6 11.6'%3E%3Cg transform='rotate(180 5.8 5.8)'%3E%3Ccircle cx='5.8' cy='5.8' r='5.8' fill='%2331acce'/%3E%3Cpath d='M6 9.5L3.5 5.9v-.2L6 2.4a.188.188 0 0 1 .3 0l1.3 1a.188.188 0 0 1 0 .3L6 5.7A.188.188 0 0 0 6 6l1.6 2.4c.1.1 0 .2-.1.3l-1.3.8c-.1.1-.2.1-.2 0z' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E\")}.atlas-map.high-contrast-dark .azure-maps-control-container.in-use .azure-maps-control-button.curr-style>.icon,.atlas-map.high-contrast-light .azure-maps-control-container.in-use .azure-maps-control-button.curr-style>.icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11.6 11.6'%3E%3Cg transform='rotate(180 5.8 5.8)'%3E%3Ccircle cx='5.8' cy='5.8' r='5.05' fill='%23136bfb' stroke='%23fff' stroke-width='1.5'/%3E%3Cpath d='M6 9.5L3.5 5.9v-.2L6 2.4a.188.188 0 01.3 0l1.3 1a.188.188 0 010 .3L6 5.7A.188.188 0 006 6l1.6 2.4c.1.1 0 .2-.1.3l-1.3.8c-.1.1-.2.1-.2 0z' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E\")}.bottom-right.subcontrol-container .azure-maps-control-button.curr-style:active>.icon,.bottom-right.subcontrol-container .azure-maps-control-button.curr-style>.icon,.top-right.subcontrol-container .azure-maps-control-button.curr-style:active>.icon,.top-right.subcontrol-container .azure-maps-control-button.curr-style>.icon{transform:scaleX(-1)}.azure-maps-control-container .azure-maps-control-button.curr-style img,.azure-maps-control-container>.style-options.icons img{width:28px;height:28px;margin:2px;padding:0;border-collapse:collapse}.atlas-map.high-contrast-dark .azure-maps-control-container .azure-maps-control-button.curr-style img,.atlas-map.high-contrast-dark .azure-maps-control-container>.style-options.icons img,.atlas-map.high-contrast-light .azure-maps-control-container .azure-maps-control-button.curr-style img,.atlas-map.high-contrast-light .azure-maps-control-container>.style-options.icons img{width:26px;height:26px;margin:0}.azure-maps-control-container>.style-options.list{display:grid;max-height:300px;
2min-width:200px;overflow:auto;position:absolute}.bottom-left .azure-maps-control-container>.style-options.list,.top-left .azure-maps-control-container>.style-options.list{left:100%;padding-left:1px}.bottom-right .azure-maps-control-container>.style-options.list,.top-right .azure-maps-control-container>.style-options.list{right:100%;padding-right:1px}.bottom-left .azure-maps-control-container>.style-options.list,.bottom-right .azure-maps-control-container>.style-options.list{bottom:0}.azure-maps-control-container>.style-options.list button{align-items:center;border:none;border-collapse:collapse;display:flex;font:inherit;margin:0;padding:5px 10px 5px 5px}.atlas-map.high-contrast-light .azure-maps-control-container>.style-options.list button,.azure-maps-control-container.light>.style-options.list button{background-color:#FFF;color:#000}.atlas-map.high-contrast-dark .azure-maps-control-container>.style-options.list button,.azure-maps-control-container.dark>.style-options.list button{background-color:#011C2C;color:#CCC}.azure-maps-control-container>.style-options.list button:focus,.azure-maps-control-container>.style-options.list button:hover{color:#31ACCE}.atlas-map.high-contrast-light .azure-maps-control-container>.style-options.list button:active,.azure-maps-control-container.light>.style-options.list button:active{background-color:#f1f1f1;color:#62666A}.atlas-map.high-contrast-dark .azure-maps-control-container>.style-options.list button:active,.azure-maps-control-container.dark>.style-options.list button:active{background-color:#43474c;color:#62666A}.azure-maps-control-container>.style-options.list img{width:28px;height:28px;margin:0 5px 0 0;padding:0;border-collapse:collapse}");const y=(0,r.memo)((({children:t,LoaderComponent:e=(()=>r.createElement("div",null,"Loading ...")),providedMapId:i,containerClassName:o,styles:a,options:s={},imageSprites:l,controls:p,customControls:h,events:d,cameraOptions:f,trafficOptions:g,userInteraction:y,styleOptions:v,serviceOptions:_})=>{const{setMapRef:x,removeMapRef:b,mapRef:w,setMapReady:S,isMapReady:T}=(0,r.useContext)(c),[C]=(0,r.useState)(i||n.i.create().toString());return(0,r.useEffect)((()=>{w&&w.setTraffic(g)}),[g]),(0,r.useEffect)((()=>{w&&w.setUserInteraction(y)}),[y]),(0,r.useEffect)((()=>{w&&w.setCamera(f)}),[f]),(0,r.useEffect)((()=>{w&&w.setStyle(v)}),[v]),(0,r.useEffect)((()=>{w&&_&&w.setServiceOptions(_)}),[_]),m(w,w,(t=>{t.events.add("ready",(()=>{l&&(async(t,e)=>{await Promise.all(e.map((async({id:e,templateName:i,color:r,secondaryColor:n,scale:o,icon:a})=>(a&&await t.imageSprite.add(e,a),t.imageSprite.createFromTemplate(e,i||"marker",r,n,o)))))})(t,l),p&&((t,e)=>{e.forEach((e=>{const{controlName:i,options:r,controlOptions:n}=e;t.controls.add(((t,e)=>{switch(t){case"CompassControl":return new u.control.CompassControl(e);case"PitchControl":return new u.control.PitchControl(e);case"StyleControl":return new u.control.StyleControl(e);case"ZoomControl":return new u.control.ZoomControl(e);case"TrafficControl":return new u.control.TrafficControl(e);case"TrafficLegendControl":return new u.control.TrafficLegendControl;default:console.warn("Check the type and passed props properties or try CustomControl")}})(i,n),r)}))})(t,p),h&&((t,e)=>{e.forEach((({control:e,controlOptions:i})=>{t.controls.add(e,i)}))})(t,h),g&&t.setTraffic(g),y&&t.setUserInteraction(y),f&&t.setCamera(f),v&&t.setStyle(v),_&&t.setServiceOptions(_),S(!0)}));for(const e in d)t.events.add(e,d[e])})),(0,r.useEffect)((()=>(x(new u.Map(C,s)),()=>{b()})),[]),r.createElement(r.Fragment,null,!T&&e&&r.createElement(e,null),r.createElement("div",{className:o,id:C,style:{...a,height:"100%"}},T&&t))})),v=((0,r.memo)((({markerContent:t,options:e,events:i,isPopupVisible:n})=>{const[a]=(0,r.useState)(new u.HtmlMarker({...e,htmlContent:t&&(0,o.uS)(t)})),{mapRef:s}=(0,r.useContext)(c);return g(s,!0,(t=>(t.markers.add(a),i&&i.forEach((({eventName:e,callback:i})=>{t.events.add(e,a,i)})),()=>{t.markers.remove(a)}))),(0,r.useEffect)((()=>{a&&s&&a.setOptions({...e,htmlContent:t&&(0,o.uS)(t)})}),[t,e]),(0,r.useEffect)((()=>{if(a&&a.getOptions().popup&&s){const t=a.getOptions().popup;n?(null==t||t.setOptions({position:a.getOptions().position}),null==t||t.open(s)):null==t||t.close()}}),[n,e,s]),null})),(0,r.createContext)({dataSourceRef:null})),{Provider:_,Consumer:x}=v,b=((0,r.memo)((t=>{const{properties:e,id:i,variant:n="feature"}=t,{dataSourceRef:o}=(0,r.useContext)(v),[a,s]=r.useState(null),[l,c]=r.useState(null);return(({setCoords:t,setProperties:e},i,n,o)=>{m(i,o,((t,e)=>{if(t instanceof u.source.DataSource)return t.add(e),()=>{t.remove(e)};i instanceof u.source.VectorTileSource&&console.error(`Unable to add Feature(${e.id}) to VectorTileSource(${i.getId()}): AzureMapFeature has to be a child of AzureMapDataSourceProvider`)})),m(i,n,((t,e)=>{if(t instanceof u.source.DataSource)return t.add(e),()=>{t.remove(e)};i instanceof u.source.VectorTileSource&&console.error(`Unable to add Shape(${e.getId()}) to VectorTileSource(${i.getId()}): AzureMapFeature has to be a child of AzureMapDataSourceProvider`)})),(0,r.useEffect)((()=>{n&&t&&n.setCoordinates(t)}),[t]),(0,r.useEffect)((()=>{n&&e&&n.setProperties(e)}),[e])})(t,o,l,a),(0,r.useEffect)((()=>{const r=(({type:t,coordinate:e,coordinates:i,multipleCoordinates:r,multipleDimensionCoordinates:n,bbox:o})=>{switch(t){case"Point":return e&&new u.data.Point(e);case"MultiPoint":return i&&new u.data.MultiPoint(i,o);case"LineString":return i&&new u.data.LineString(i,o);case"MultiLineString":return r&&new u.data.MultiLineString(r,o);case"Polygon":return i&&new u.data.Polygon(i,o);case"MultiPolygon":return n&&new u.data.MultiPolygon(n,o);default:console.warn("Check the type and passed props properties")}})(t);if((!a||!l)&&r)switch(n){case"shape":c(new u.Shape(r,i,e));break;
2case"feature":s(new u.data.Feature(r,e,i))}}),[]),null})),(0,r.createContext)({layerRef:null})),{Provider:w,Consumer:S}=b,T=(0,r.memo)((({isVisible:t,popupContent:e,options:i,events:n})=>{const{mapRef:a}=(0,r.useContext)(c),s=(({options:t,popupContent:e,isVisible:i})=>{const[n]=(0,r.useState)(new u.Popup({...t,content:(0,o.uS)(e)})),{mapRef:a}=(0,r.useContext)(c);return(0,r.useEffect)((()=>{n.setOptions({...t,content:(0,o.uS)(e)}),a&&i&&!n.isOpen()&&n.open(a)}),[t,e]),n})({options:i,popupContent:e,isVisible:t});return g(a,!0,(t=>(n&&n.forEach((({eventName:e,callback:i})=>{t.events.add(e,s,i)})),()=>{t.popups.remove(s)}))),(0,r.useEffect)((()=>{a&&(t&&!s.isOpen()?s.open(a):a.popups.getPopups().length&&!t&&s.isOpen()&&s.close())}),[t]),null}));var C=l.AuthenticationType},7774:function(t,e,i){"use strict";var r=i(7294);function n(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)e+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=Object.prototype.hasOwnProperty,a=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,s={},l={};function u(t){return!!o.call(l,t)||!o.call(s,t)&&(a.test(t)?l[t]=!0:(s[t]=!0,!1))}function c(t,e,i,r,n,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){p[t]=new c(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];p[e]=new c(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){p[t]=new c(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){p[t]=new c(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){p[t]=new c(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){p[t]=new c(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){p[t]=new c(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){p[t]=new c(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){p[t]=new c(t,5,!1,t.toLowerCase(),null,!1,!1)}));var h=/[\-:]([a-z])/g;function d(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
2-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(h,d);p[e]=new c(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(h,d);p[e]=new c(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(h,d);p[e]=new c(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){p[t]=new c(t,1,!1,t.toLowerCase(),null,!1,!1)})),p.xlinkHref=new c("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){p[t]=new c(t,1,!1,t.toLowerCase(),null,!0,!0)}));var f={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},m=["Webkit","ms","Moz","O"];Object.keys(f).forEach((function(t){m.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),f[e]=f[t]}))}));var g=/["'&<>]/;function y(t){if("boolean"==typeof t||"number"==typeof t)return""+t;t=""+t;var e=g.exec(t);if(e){var i,r="",n=0;for(i=e.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}n!==i&&(r+=t.substring(n,i)),n=i+1,r+=e}t=n!==i?r+t.substring(n,i):r}return t}var v=/([A-Z])/g,_=/^ms-/,x=Array.isArray;function b(t,e){return{insertionMode:t,selectedValue:e}}var w=new Map;function S(t,e,i){if("object"!=typeof i)throw Error(n(62));for(var r in e=!0,i)if(o.call(i,r)){var a=i[r];if(null!=a&&"boolean"!=typeof a&&""!==a){if(0===r.indexOf("--")){var s=y(r);a=y((""+a).trim())}else{s=r;var l=w.get(s);void 0!==l||(l=y(s.replace(v,"-$1").toLowerCase().replace(_,"-ms-")),w.set(s,l)),s=l,a="number"==typeof a?0===a||o.call(f,r)?""+a:a+"px":y((""+a).trim())}e?(e=!1,t.push(' style="',s,":",a)):t.push(";",s,":",a)}}e||t.push('"')}function T(t,e,i,r){switch(i){case"style":return void S(t,e,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<i.length)||"o"!==i[0]&&"O"!==i[0]||"n"!==i[1]&&"N"!==i[1])if(null!==(e=p.hasOwnProperty(i)?p[i]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!e.acceptsBooleans)return}switch(i=e.attributeName,e.type){case 3:r&&t.push(" ",i,'=""');break;case 4:!0===r?t.push(" ",i,'=""'):!1!==r&&t.push(" ",i,'="',y(r),'"');break;case 5:isNaN(r)||t.push(" ",i,'="',y(r),'"');break;case 6:!isNaN(r)&&1<=r&&t.push(" ",i,'="',y(r),'"');break;default:e.sanitizeURL&&(r=""+r),t.push(" ",i,'="',y(r),'"')}}else if(u(i)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(e=i.toLowerCase().slice(0,5))&&"aria-"!==e)return}t.push(" ",i,'="',y(r),'"')}}function C(t,e,i){if(null!=e){if(null!=i)throw Error(n(60));if("object"!=typeof e||!("__html"in e))throw Error(n(61));null!=(e=e.__html)&&t.push(""+e)}}function I(t,e,i,r){t.push(A(i));var n,a=i=null;for(n in e)if(o.call(e,n)){var s=e[n];if(null!=s)switch(n){case"children":i=s;break;case"dangerouslySetInnerHTML":a=s;break;default:T(t,r,n,s)}}return t.push(">"),C(t,a,i),"string"==typeof i?(t.push(y(i)),null):i}var E=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,M=new Map;function A(t){var e=M.get(t);if(void 0===e){if(!E.test(t))throw Error(n(65,t));e="<"+t,M.set(t,e)}return e}function L(t,e,i,a,s){switch(e){case"select":t.push(A("select"));var l=null,c=null;for(f in i)if(o.call(i,f)){var p=i[f];if(null!=p)switch(f){case"children":l=p;break;case"dangerouslySetInnerHTML":c=p;break;case"defaultValue":case"value":break;default:T(t,a,f,p)}}return t.push(">"),C(t,c,l),l;case"option":c=s.selectedValue,t.push(A("option"));var h=p=null,d=null,f=null;for(l in i)if(o.call(i,l)){var m=i[l];if(null!=m)switch(l){case"children":p=m;break;case"selected":d=m;break;case"dangerouslySetInnerHTML":f=m;break;case"value":h=m;default:T(t,a,l,m)}}if(null!=c)if(i=null!==h?""+h:function(t){var e="";
vendor: 9,661 bytes, line 2
2return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(p),x(c)){for(a=0;a<c.length;a++)if(""+c[a]===i){t.push(' selected=""');break}}else""+c===i&&t.push(' selected=""');else d&&t.push(' selected=""');return t.push(">"),C(t,f,p),p;case"textarea":for(p in t.push(A("textarea")),f=c=l=null,i)if(o.call(i,p)&&null!=(h=i[p]))switch(p){case"children":f=h;break;case"value":l=h;break;case"defaultValue":c=h;break;case"dangerouslySetInnerHTML":throw Error(n(91));default:T(t,a,p,h)}if(null===l&&null!==c&&(l=c),t.push(">"),null!=f){if(null!=l)throw Error(n(92));if(x(f)&&1<f.length)throw Error(n(93));l=""+f}return"string"==typeof l&&"\n"===l[0]&&t.push("\n"),null!==l&&t.push(y(""+l)),null;case"input":for(c in t.push(A("input")),h=f=p=l=null,i)if(o.call(i,c)&&null!=(d=i[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(n(399,"input"));case"defaultChecked":h=d;break;case"defaultValue":p=d;break;case"checked":f=d;break;case"value":l=d;break;default:T(t,a,c,d)}return null!==f?T(t,a,"checked",f):null!==h&&T(t,a,"checked",h),null!==l?T(t,a,"value",l):null!==p&&T(t,a,"value",p),t.push("/>"),null;case"menuitem":for(var g in t.push(A("menuitem")),i)if(o.call(i,g)&&null!=(l=i[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(n(400));default:T(t,a,g,l)}return t.push(">"),null;case"title":for(m in t.push(A("title")),l=null,i)if(o.call(i,m)&&null!=(c=i[m]))switch(m){case"children":l=c;break;case"dangerouslySetInnerHTML":throw Error(n(434));default:T(t,a,m,c)}return t.push(">"),l;case"listing":case"pre":for(h in t.push(A(e)),c=l=null,i)if(o.call(i,h)&&null!=(p=i[h]))switch(h){case"children":l=p;break;case"dangerouslySetInnerHTML":c=p;break;default:T(t,a,h,p)}if(t.push(">"),null!=c){if(null!=l)throw Error(n(60));if("object"!=typeof c||!("__html"in c))throw Error(n(61));null!=(i=c.__html)&&("string"==typeof i&&0<i.length&&"\n"===i[0]?t.push("\n",i):t.push(""+i))}return"string"==typeof l&&"\n"===l[0]&&t.push("\n"),l;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var v in t.push(A(e)),i)if(o.call(i,v)&&null!=(l=i[v]))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(n(399,e));default:T(t,a,v,l)}return t.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return I(t,i,e,a);case"html":return 0===s.insertionMode&&t.push("<!DOCTYPE html>"),I(t,i,e,a);default:if(-1===e.indexOf("-")&&"string"!=typeof i.is)return I(t,i,e,a);for(d in t.push(A(e)),c=l=null,i)if(o.call(i,d)&&null!=(p=i[d]))switch(d){case"children":l=p;break;case"dangerouslySetInnerHTML":c=p;break;case"style":S(t,a,p);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:u(d)&&"function"!=typeof p&&"symbol"!=typeof p&&t.push(" ",d,'="',y(p),'"')}return t.push(">"),C(t,c,l),l}}function k(t,e,i){if(t.push('\x3c!--$?--\x3e<template id="'),null===i)throw Error(n(395));return t.push(i),t.push('"></template>')}var P=/[<\u2028\u2029]/g;function D(t){return JSON.stringify(t).replace(P,(function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))}function z(t,e,i,r){return i.generateStaticMarkup?(t.push(y(e)),!1):(""===e?t=r:(r&&t.push("\x3c!-- --\x3e"),t.push(y(e)),t=!0),t)}var O=Object.assign,N=Symbol.for("react.element"),R=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),V=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),Y=Symbol.for("react.scope"),K=Symbol.for("react.debug_trace_mode"),X=Symbol.for("react.legacy_hidden"),J=Symbol.for("react.default_value"),Q=Symbol.iterator;function $(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case B:return"Fragment";case R:return"Portal";case F:return"Profiler";case j:return"StrictMode";case G:return"Suspense";case Z:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case V:return(t.displayName||"Context")+".Consumer";case U:return(t._context.displayName||"Context")+".Provider";case q:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case H:return null!==(e=t.displayName||null)?e:$(t.type)||"Memo";case W:e=t._payload,t=t._init;try{return $(t(e))}catch(t){}}return null}var tt={};function et(t,e){if(!(t=t.contextTypes))return tt;var i,r={};for(i in t)r[i]=e[i];return r}var it=null;function rt(t,e){if(t!==e){t.context._currentValue2=t.parentValue,t=t.parent;var i=e.parent;if(null===t){if(null!==i)throw Error(n(401))}else{if(null===i)throw Error(n(401));rt(t,i)}e.context._currentValue2=e.value}}function nt(t){t.context._currentValue2=t.parentValue,null!==(t=t.parent)&&nt(t)}function ot(t){var e=t.parent;null!==e&&ot(e),t.context._currentValue2=t.value}function at(t,e){if(t.context._currentValue2=t.parentValue,null===(t=t.parent))throw Error(n(402));t.depth===e.depth?rt(t,e):at(t,e)}function st(t,e){var i=e.parent;if(null===i)throw Error(n(402));t.depth===i.depth?rt(t,i):st(t,i),e.context._currentValue2=e.value}function lt(t){var e=it;e!==t&&(null===e?ot(t):null===t?nt(e):e.depth===t.depth?rt(e,t):e.depth>t.depth?at(e,t):st(e,t),it=t)}var ut={isMounted:function(){return!1},enqueueSetState:function(t,e){null!==(t=t._reactInternals).queue&&t.queue.push(e)},enqueueReplaceState:function(t,e){(t=t._reactInternals).replace=!0,t.queue=[e]},enqueueForceUpdate:function(){}};function ct(t,e,i,r){var n=void 0!==t.state?t.state:null;t.updater=ut,t.props=i,t.state=n;var o={queue:[],replace:!1};t._reactInternals=o;var a=e.contextType;if(t.context="object"==typeof a&&null!==a?a._currentValue2:r,"function"==typeof(a=e.getDerivedStateFromProps)&&(n=null==(a=a(i,n))?n:O({},n,a),t.state=n),"function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate&&("function"==typeof t.UNSAFE_componentWillMount||"function"==typeof t.componentWillMount))if(e=t.state,"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),e!==t.state&&ut.enqueueReplaceState(t,t.state,null),null!==o.queue&&0<o.queue.length)if(e=o.queue,a=o.replace,o.queue=null,o.replace=!1,a&&1===e.length)t.state=e[0];else{for(o=a?e[0]:t.state,n=!0,a=a?1:0;a<e.length;a++){var s=e[a];null!=(s="function"==typeof s?s.call(t,o,i,r):s)&&(n?(n=!1,o=O({},o,s)):O(o,s))}t.state=o}else o.queue=null}var pt={id:1,overflow:""};function ht(t,e,i){var r=t.id;t=t.overflow;var n=32-dt(r)-1;r&=~(1<<n),i+=1;var o=32-dt(e)+n;if(30<o){var a=n-n%5;return o=(r&(1<<a)-1).toString(32),r>>=a,n-=a,{id:1<<32-dt(e)+n|i<<n|r,overflow:o+t}}return{id:1<<o|i<<n|r,overflow:t}}var dt=Math.clz32?Math.clz32:function(t){return 0===(t>>>=0)?32:31-(ft(t)/mt|0)|0},ft=Math.log,mt=Math.LN2;var gt="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},yt=null,vt=null,_t=null,xt=null,bt=!1,wt=!1,St=0,Tt=null,Ct=0;function It(){if(null===yt)throw Error(n(321));return yt}function Et(){if(0<Ct)throw Error(n(312));return{memoizedState:null,queue:null,next:null}}function Mt(){return null===xt?null===_t?(bt=!1,_t=xt=Et()):(bt=!0,xt=_t):null===xt.next?(bt=!1,xt=xt.next=Et()):(bt=!0,xt=xt.next),xt}function At(){vt=yt=null,wt=!1,_t=null,Ct=0,xt=Tt=null}function Lt(t,e){return"function"==typeof e?e(t):e}function kt(t,e,i){if(yt=It(),xt=Mt(),bt){var r=xt.queue;if(e=r.dispatch,null!==Tt&&void 0!==(i=Tt.get(r))){Tt.delete(r),r=xt.memoizedState;do{r=t(r,i.action),i=i.next}while(null!==i);return xt.memoizedState=r,[r,e]}return[xt.memoizedState,e]}return t=t===Lt?"function"==typeof e?e():e:void 0!==i?i(e):e,xt.memoizedState=t,t=(t=xt.queue={last:null,dispatch:null}).dispatch=Dt.bind(null,yt,t),[xt.memoizedState,t]}function Pt(t,e){if(yt=It(),e=void 0===e?null:e,null!==(xt=Mt())){var i=xt.memoizedState;if(null!==i&&null!==e){var r=i[1];t:if(null===r)r=!1;else{for(var n=0;n<r.length&&n<e.length;n++)if(!gt(e[n],r[n])){r=!1;break t}r=!0}if(r)return i[0]}}return t=t(),xt.memoizedState=[t,e],t}function Dt(t,e,i){if(25<=Ct)throw Error(n(301));if(t===yt)if(wt=!0,t={action:i,next:null},null===Tt&&(Tt=new Map),void 0===(i=Tt.get(e)))Tt.set(e,t);else{for(e=i;null!==e.next;)e=e.next;e.next=t}}function zt(){throw Error(n(394))}function Ot(){}var Nt={readContext:function(t){return t._currentValue2},useContext:function(t){return It(),t._currentValue2},useMemo:Pt,useReducer:kt,useRef:function(t){yt=It();var e=(xt=Mt()).memoizedState;return null===e?(t={current:t},xt.memoizedState=t):e},useState:function(t){return kt(Lt,t)},useInsertionEffect:Ot,useLayoutEffect:function(){},useCallback:function(t,e){return Pt((function(){return t}),e)},useImperativeHandle:Ot,useEffect:Ot,useDebugValue:Ot,useDeferredValue:function(t){return It(),t},useTransition:function(){return It(),[!1,zt]},useId:function(){var t=vt.treeContext,e=t.overflow;t=((t=t.id)&~(1<<32-dt(t)-1)).toString(32)+e;var i=Rt;if(null===i)throw Error(n(404));return e=St++,t=":"+i.idPrefix+"R"+t,0<e&&(t+="H"+e.toString(32)),t+":"},useMutableSource:function(t,e){return It(),e(t._source)}
vendor: 4,529 bytes, line 2
2,useSyncExternalStore:function(t,e,i){if(void 0===i)throw Error(n(407));return i()}},Rt=null,Bt=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function jt(t){return console.error(t),null}function Ft(){}function Ut(t,e,i,r,n,o,a,s){t.allPendingTasks++,null===i?t.pendingRootTasks++:i.pendingTasks++;var l={node:e,ping:function(){var e=t.pingedTasks;e.push(l),1===e.length&&ie(t)},blockedBoundary:i,blockedSegment:r,abortSet:n,legacyContext:o,context:a,treeContext:s};return n.add(l),l}function Vt(t,e,i,r,n,o){return{status:0,id:-1,index:e,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:i,lastPushedText:n,textEmbedded:o}}function qt(t,e){if(null!=(t=t.onError(e))&&"string"!=typeof t)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof t+'" instead');return t}function Gt(t,e){var i=t.onShellError;i(e),(i=t.onFatalError)(e),null!==t.destination?(t.status=2,t.destination.destroy(e)):(t.status=1,t.fatalError=e)}function Zt(t,e,i,r,n){for(yt={},vt=e,St=0,t=i(r,n);wt;)wt=!1,St=0,Ct+=1,xt=null,t=i(r,n);return At(),t}function Ht(t,e,i,r){var o=i.render(),a=r.childContextTypes;if(null!=a){var s=e.legacyContext;if("function"!=typeof i.getChildContext)r=s;else{for(var l in i=i.getChildContext())if(!(l in a))throw Error(n(108,$(r)||"Unknown",l));r=O({},s,i)}e.legacyContext=r,Kt(t,e,o),e.legacyContext=s}else Kt(t,e,o)}function Wt(t,e){if(t&&t.defaultProps){for(var i in e=O({},e),t=t.defaultProps)void 0===e[i]&&(e[i]=t[i]);return e}return e}function Yt(t,e,i,r,o){if("function"==typeof i)if(i.prototype&&i.prototype.isReactComponent){o=et(i,e.legacyContext);var a=i.contextType;ct(a=new i(r,"object"==typeof a&&null!==a?a._currentValue2:o),i,r,o),Ht(t,e,a,i)}else{o=Zt(t,e,i,r,a=et(i,e.legacyContext));var s=0!==St;if("object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof)ct(o,i,r,a),Ht(t,e,o,i);else if(s){r=e.treeContext,e.treeContext=ht(r,1,0);try{Kt(t,e,o)}finally{e.treeContext=r}}else Kt(t,e,o)}else{if("string"!=typeof i){switch(i){case X:case K:case j:case F:case B:case Z:return void Kt(t,e,r.children);case Y:throw Error(n(343));case G:t:{i=e.blockedBoundary,o=e.blockedSegment,a=r.fallback,r=r.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:s=new Set,errorDigest:null},u=Vt(0,o.chunks.length,l,o.formatContext,!1,!1);o.children.push(u),o.lastPushedText=!1;var c=Vt(0,0,null,o.formatContext,!1,!1);c.parentFlushed=!0,e.blockedBoundary=l,e.blockedSegment=c;try{if(Jt(t,e,r),t.responseState.generateStaticMarkup||c.lastPushedText&&c.textEmbedded&&c.chunks.push("\x3c!-- --\x3e"),c.status=1,te(l,c),0===l.pendingTasks)break t}catch(e){c.status=4,l.forceClientRender=!0,l.errorDigest=qt(t,e)}finally{e.blockedBoundary=i,e.blockedSegment=o}e=Ut(t,a,i,u,s,e.legacyContext,e.context,e.treeContext),t.pingedTasks.push(e)}return}if("object"==typeof i&&null!==i)switch(i.$$typeof){case q:if(r=Zt(t,e,i.render,r,o),0!==St){i=e.treeContext,e.treeContext=ht(i,1,0);try{Kt(t,e,r)}finally{e.treeContext=i}}else Kt(t,e,r);return;case H:return void Yt(t,e,i=i.type,r=Wt(i,r),o);case U:if(o=r.children,i=i._context,r=r.value,a=i._currentValue2,i._currentValue2=r,it=r={parent:s=it,depth:null===s?0:s.depth+1,context:i,parentValue:a,value:r},e.context=r,Kt(t,e,o),null===(t=it))throw Error(n(403));return r=t.parentValue,t.context._currentValue2=r===J?t.context._defaultValue:r,t=it=t.parent,void(e.context=t);case V:return void Kt(t,e,r=(r=r.children)(i._currentValue2));case W:return void Yt(t,e,i=(o=i._init)(i._payload),r=Wt(i,r),void 0)}throw Error(n(130,null==i?i:typeof i,""))}switch(a=L((o=e.blockedSegment).chunks,i,r,t.responseState,o.formatContext),o.lastPushedText=!1,s=o.formatContext,o.formatContext=function(t,e,i){switch(e){case"select":return b(1,null!=i.value?i.value:i.defaultValue);case"svg":return b(2,null);case"math":return b(3,null);case"foreignObject":return b(1,null);case"table":return b(4,null);case"thead":case"tbody":case"tfoot":return b(5,null);case"colgroup":return b(7,null);case"tr":return b(6,null)}return 4<=t.insertionMode||0===t.insertionMode?b(1,null):t}(s,i,r),Jt(t,e,a),o.formatContext=s,i){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;
vendor: 4,254 bytes, line 2
2default:o.chunks.push("</",i,">")}o.lastPushedText=!1}}function Kt(t,e,i){if(e.node=i,"object"==typeof i&&null!==i){switch(i.$$typeof){case N:return void Yt(t,e,i.type,i.props,i.ref);case R:throw Error(n(257));case W:var r=i._init;return void Kt(t,e,i=r(i._payload))}if(x(i))return void Xt(t,e,i);if(null===i||"object"!=typeof i?r=null:r="function"==typeof(r=Q&&i[Q]||i["@@iterator"])?r:null,r&&(r=r.call(i))){if(!(i=r.next()).done){var o=[];do{o.push(i.value),i=r.next()}while(!i.done);Xt(t,e,o)}return}throw t=Object.prototype.toString.call(i),Error(n(31,"[object Object]"===t?"object with keys {"+Object.keys(i).join(", ")+"}":t))}"string"==typeof i?(r=e.blockedSegment).lastPushedText=z(e.blockedSegment.chunks,i,t.responseState,r.lastPushedText):"number"==typeof i&&((r=e.blockedSegment).lastPushedText=z(e.blockedSegment.chunks,""+i,t.responseState,r.lastPushedText))}function Xt(t,e,i){for(var r=i.length,n=0;n<r;n++){var o=e.treeContext;e.treeContext=ht(o,r,n);try{Jt(t,e,i[n])}finally{e.treeContext=o}}}function Jt(t,e,i){var r=e.blockedSegment.formatContext,n=e.legacyContext,o=e.context;try{return Kt(t,e,i)}catch(l){if(At(),"object"!=typeof l||null===l||"function"!=typeof l.then)throw e.blockedSegment.formatContext=r,e.legacyContext=n,e.context=o,lt(o),l;i=l;var a=e.blockedSegment,s=Vt(0,a.chunks.length,null,a.formatContext,a.lastPushedText,!0);a.children.push(s),a.lastPushedText=!1,t=Ut(t,e.node,e.blockedBoundary,s,e.abortSet,e.legacyContext,e.context,e.treeContext).ping,i.then(t,t),e.blockedSegment.formatContext=r,e.legacyContext=n,e.context=o,lt(o)}}function Qt(t){var e=t.blockedBoundary;(t=t.blockedSegment).status=3,ee(this,e,t)}function $t(t,e,i){var r=t.blockedBoundary;t.blockedSegment.status=3,null===r?(e.allPendingTasks--,2!==e.status&&(e.status=2,null!==e.destination&&e.destination.push(null))):(r.pendingTasks--,r.forceClientRender||(r.forceClientRender=!0,t=void 0===i?Error(n(432)):i,r.errorDigest=e.onError(t),r.parentFlushed&&e.clientRenderedBoundaries.push(r)),r.fallbackAbortableTasks.forEach((function(t){return $t(t,e,i)})),r.fallbackAbortableTasks.clear(),e.allPendingTasks--,0===e.allPendingTasks&&(r=e.onAllReady)())}function te(t,e){if(0===e.chunks.length&&1===e.children.length&&null===e.children[0].boundary){var i=e.children[0];i.id=e.id,i.parentFlushed=!0,1===i.status&&te(t,i)}else t.completedSegments.push(e)}function ee(t,e,i){if(null===e){if(i.parentFlushed){if(null!==t.completedRootSegment)throw Error(n(389));t.completedRootSegment=i}t.pendingRootTasks--,0===t.pendingRootTasks&&(t.onShellError=Ft,(e=t.onShellReady)())}else e.pendingTasks--,e.forceClientRender||(0===e.pendingTasks?(i.parentFlushed&&1===i.status&&te(e,i),e.parentFlushed&&t.completedBoundaries.push(e),e.fallbackAbortableTasks.forEach(Qt,t),e.fallbackAbortableTasks.clear()):i.parentFlushed&&1===i.status&&(te(e,i),1===e.completedSegments.length&&e.parentFlushed&&t.partialBoundaries.push(e)));t.allPendingTasks--,0===t.allPendingTasks&&(t=t.onAllReady)()}function ie(t){if(2!==t.status){var e=it,i=Bt.current;Bt.current=Nt;var r=Rt;Rt=t.responseState;try{var n,o=t.pingedTasks;for(n=0;n<o.length;n++){var a=o[n],s=t,l=a.blockedSegment;if(0===l.status){lt(a.context);try{Kt(s,a,a.node),s.responseState.generateStaticMarkup||l.lastPushedText&&l.textEmbedded&&l.chunks.push("\x3c!-- --\x3e"),a.abortSet.delete(a),l.status=1,ee(s,a.blockedBoundary,l)}catch(t){if(At(),"object"==typeof t&&null!==t&&"function"==typeof t.then){var u=a.ping;t.then(u,u)}else{a.abortSet.delete(a),l.status=4;var c=a.blockedBoundary,p=t,h=qt(s,p);if(null===c?Gt(s,p):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.errorDigest=h,c.parentFlushed&&s.clientRenderedBoundaries.push(c))),s.allPendingTasks--,0===s.allPendingTasks)(0,s.onAllReady)()}}}}o.splice(0,n),null!==t.destination&&le(t,t.destination)}catch(e){qt(t,e),Gt(t,e)}finally{Rt=r,Bt.current=i,i===Nt&<(e)}}}function re(t,e,i){switch(i.parentFlushed=!0,i.status){case 0:var r=i.id=t.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,t=t.responseState,e.push('<template id="'),e.push(t.placeholderPrefix),t=r.toString(16),e.push(t),e.push('"></template>');case 1:i.status=2;var o=!0;r=i.chunks;var a=0;i=i.children;for(var s=0;s<i.length;s++){for(o=i[s];a<o.index;
vendor: 5,588 bytes, line 2
2a++)e.push(r[a]);o=ne(t,e,o)}for(;a<r.length-1;a++)e.push(r[a]);return a<r.length&&(o=e.push(r[a])),o;default:throw Error(n(390))}}function ne(t,e,i){var r=i.boundary;if(null===r)return re(t,e,i);if(r.parentFlushed=!0,r.forceClientRender)return t.responseState.generateStaticMarkup||(r=r.errorDigest,e.push("\x3c!--$!--\x3e"),e.push("<template"),r&&(e.push(' data-dgst="'),r=y(r),e.push(r),e.push('"')),e.push("></template>")),re(t,e,i),t=!!t.responseState.generateStaticMarkup||e.push("\x3c!--/$--\x3e");if(0<r.pendingTasks){r.rootSegmentID=t.nextSegmentId++,0<r.completedSegments.length&&t.partialBoundaries.push(r);var o=t.responseState,a=o.nextSuspenseID++;return o=o.boundaryPrefix+a.toString(16),r=r.id=o,k(e,t.responseState,r),re(t,e,i),e.push("\x3c!--/$--\x3e")}if(r.byteSize>t.progressiveChunkSize)return r.rootSegmentID=t.nextSegmentId++,t.completedBoundaries.push(r),k(e,t.responseState,r.id),re(t,e,i),e.push("\x3c!--/$--\x3e");if(t.responseState.generateStaticMarkup||e.push("\x3c!--$--\x3e"),1!==(i=r.completedSegments).length)throw Error(n(391));return ne(t,e,i[0]),t=!!t.responseState.generateStaticMarkup||e.push("\x3c!--/$--\x3e")}function oe(t,e,i){return function(t,e,i,r){switch(i.insertionMode){case 0:case 1:return t.push('<div hidden id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');case 2:return t.push('<svg aria-hidden="true" style="display:none" id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');case 3:return t.push('<math aria-hidden="true" style="display:none" id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');case 4:return t.push('<table hidden id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');case 5:return t.push('<table hidden><tbody id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');case 6:return t.push('<table hidden><tr id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');case 7:return t.push('<table hidden><colgroup id="'),t.push(e.segmentPrefix),e=r.toString(16),t.push(e),t.push('">');default:throw Error(n(397))}}(e,t.responseState,i.formatContext,i.id),ne(t,e,i),function(t,e){switch(e.insertionMode){case 0:case 1:return t.push("</div>");case 2:return t.push("</svg>");case 3:return t.push("</math>");case 4:return t.push("</table>");case 5:return t.push("</tbody></table>");case 6:return t.push("</tr></table>");case 7:return t.push("</colgroup></table>");default:throw Error(n(397))}}(e,i.formatContext)}function ae(t,e,i){for(var r=i.completedSegments,o=0;o<r.length;o++)se(t,e,i,r[o]);if(r.length=0,t=t.responseState,r=i.id,i=i.rootSegmentID,e.push(t.startInlineScript),t.sentCompleteBoundaryFunction?e.push('$RC("'):(t.sentCompleteBoundaryFunction=!0,e.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===r)throw Error(n(395));return i=i.toString(16),e.push(r),e.push('","'),e.push(t.segmentPrefix),e.push(i),e.push('")<\/script>')}function se(t,e,i,r){if(2===r.status)return!0;var o=r.id;if(-1===o){if(-1===(r.id=i.rootSegmentID))throw Error(n(392));return oe(t,e,r)}return oe(t,e,r),t=t.responseState,e.push(t.startInlineScript),t.sentCompleteSegmentFunction?e.push('$RS("'):(t.sentCompleteSegmentFunction=!0,e.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),e.push(t.segmentPrefix),o=o.toString(16),e.push(o),e.push('","'),e.push(t.placeholderPrefix),e.push(o),e.push('")<\/script>')}function le(t,e){try{var i=t.completedRootSegment;if(null!==i&&0===t.pendingRootTasks){ne(t,e,i),t.completedRootSegment=null;var r=t.responseState.bootstrapChunks;for(i=0;i<r.length-1;i++)e.push(r[i]);i<r.length&&e.push(r[i])}var o,a=t.clientRenderedBoundaries;for(o=0;o<a.length;o++){var s=a[o];r=e;var l=t.responseState,u=s.id,c=s.errorDigest,p=s.errorMessage,h=s.errorComponentStack;if(r.push(l.startInlineScript),l.sentClientRenderFunction?r.push('$RX("'):(l.sentClientRenderFunction=!0,r.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),null===u)throw Error(n(395));if(r.push(u),r.push('"'),c||p||h){r.push(",");var d=D(c||"");r.push(d)}if(p||h){r.push(",");var f=D(p||"");r.push(f)}if(h){r.push(",");var m=D(h);r.push(m)}if(!r.push(")<\/script>"))return t.destination=null,o++,void a.splice(0,o)}a.splice(0,o);var g=t.completedBoundaries;for(o=0;o<g.length;o++)if(!ae(t,e,g[o]))return t.destination=null,o++,void g.splice(0,o);g.splice(0,o);var y=t.partialBoundaries;for(o=0;o<y.length;o++){var v=y[o];t:{a=t,s=e;var _=v.completedSegments;for(l=0;l<_.length;l++)if(!se(a,s,v,_[l])){l++,_.splice(0,l);var x=!1;break t}_.splice(0,l),x=!0}if(!x)return t.destination=null,o++,void y.splice(0,o)}y.splice(0,o);var b=t.completedBoundaries;for(o=0;o<b.length;o++)if(!ae(t,e,b[o]))return t.destination=null,o++,void b.splice(0,o);b.splice(0,o)}finally{0===t.allPendingTasks&&0===t.pingedTasks.length&&0===t.clientRenderedBoundaries.length&&0===t.completedBoundaries.length&&e.push(null)}}function ue(t,e){try{var i=t.abortableTasks;
vendor: 29,420 bytes, line 2
2i.forEach((function(i){return $t(i,t,e)})),i.clear(),null!==t.destination&&le(t,t.destination)}catch(e){qt(t,e),Gt(t,e)}}function ce(){}function pe(t,e,i,r){var o=!1,a=null,s="",l={push:function(t){return null!==t&&(s+=t),!0},destroy:function(t){o=!0,a=t}},u=!1;if(t=function(t,e,i,r,n,o,a,s,l){var u=[],c=new Set;return(i=Vt(e={destination:null,responseState:e,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===n?jt:n,onAllReady:void 0===o?Ft:o,onShellReady:void 0===a?Ft:a,onShellError:void 0===s?Ft:s,onFatalError:void 0===l?Ft:l},0,null,i,!1,!1)).parentFlushed=!0,t=Ut(e,t,null,i,c,tt,null,pt),u.push(t),e}(t,function(t,e){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(e=void 0===e?"":e)+"P:",segmentPrefix:e+"S:",boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:t}}(i,e?e.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ce,void 0,(function(){u=!0}),void 0,void 0),ie(t),ue(t,r),1===t.status)t.status=2,l.destroy(t.fatalError);else if(2!==t.status&&null===t.destination){t.destination=l;try{le(t,l)}catch(e){qt(t,e),Gt(t,e)}}if(o)throw a;if(!u)throw Error(n(426));return s}e.renderToNodeStream=function(){throw Error(n(207))},e.renderToStaticMarkup=function(t,e){return pe(t,e,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},e.renderToStaticNodeStream=function(){throw Error(n(208))},e.renderToString=function(t,e){return pe(t,e,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},e.version="18.2.0"},8698:function(t,e,i){"use strict";var r=i(7294);function n(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)e+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=null,a=0;function s(t,e){if(0!==e.length)if(512<e.length)0<a&&(t.enqueue(new Uint8Array(o.buffer,0,a)),o=new Uint8Array(512),a=0),t.enqueue(e);else{var i=o.length-a;i<e.length&&(0===i?t.enqueue(o):(o.set(e.subarray(0,i),a),t.enqueue(o),e=e.subarray(i)),o=new Uint8Array(512),a=0),o.set(e,a),a+=e.length}}function l(t,e){return s(t,e),!0}function u(t){o&&0<a&&(t.enqueue(new Uint8Array(o.buffer,0,a)),o=null,a=0)}var c=new TextEncoder;function p(t){return c.encode(t)}function h(t){return c.encode(t)}function d(t,e){"function"==typeof t.error?t.error(e):t.close()}var f=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function v(t){return!!f.call(y,t)||!f.call(g,t)&&(m.test(t)?y[t]=!0:(g[t]=!0,!1))}function _(t,e,i,r,n,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){x[t]=new _(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];x[e]=new _(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){x[t]=new _(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){x[t]=new _(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){x[t]=new _(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){x[t]=new _(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){x[t]=new _(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){x[t]=new _(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){x[t]=new _(t,5,!1,t.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function w(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(b,w);x[e]=new _(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(b,w);x[e]=new _(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(b,w);x[e]=new _(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){x[t]=new _(t,1,!1,t.toLowerCase(),null,!1,!1)})),x.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){x[t]=new _(t,1,!1,t.toLowerCase(),null,!0,!0)}));var S={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},T=["Webkit","ms","Moz","O"];Object.keys(S).forEach((function(t){T.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),S[e]=S[t]}))}));var C=/["'&<>]/;function I(t){if("boolean"==typeof t||"number"==typeof t)return""+t;t=""+t;var e=C.exec(t);if(e){var i,r="",n=0;for(i=e.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}n!==i&&(r+=t.substring(n,i)),n=i+1,r+=e}t=n!==i?r+t.substring(n,i):r}return t}var E=/([A-Z])/g,M=/^ms-/,A=Array.isArray,L=h("<script>"),k=h("<\/script>"),P=h('<script src="'),D=h('<script type="module" src="'),z=h('" async=""><\/script>'),O=/(<\/|<)(s)(cript)/gi;function N(t,e,i,r){return e+("s"===i?"\\u0073":"\\u0053")+r}function R(t,e){return{insertionMode:t,selectedValue:e}}var B=h("\x3c!-- --\x3e");function j(t,e,i,r){return""===e?r:(r&&t.push(B),t.push(p(I(e))),!0)}var F=new Map,U=h(' style="'),V=h(":"),q=h(";");function G(t,e,i){if("object"!=typeof i)throw Error(n(62));for(var r in e=!0,i)if(f.call(i,r)){var o=i[r];if(null!=o&&"boolean"!=typeof o&&""!==o){if(0===r.indexOf("--")){var a=p(I(r));o=p(I((""+o).trim()))}else{a=r;var s=F.get(a);void 0!==s||(s=h(I(a.replace(E,"-$1").toLowerCase().replace(M,"-ms-"))),F.set(a,s)),a=s,o="number"==typeof o?0===o||f.call(S,r)?p(""+o):p(o+"px"):p(I((""+o).trim()))}e?(e=!1,t.push(U,a,V,o)):t.push(q,a,V,o)}}e||t.push(W)}var Z=h(" "),H=h('="'),W=h('"'),Y=h('=""');function K(t,e,i,r){switch(i){case"style":return void G(t,e,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<i.length)||"o"!==i[0]&&"O"!==i[0]||"n"!==i[1]&&"N"!==i[1])if(null!==(e=x.hasOwnProperty(i)?x[i]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!e.acceptsBooleans)return}switch(i=p(e.attributeName),e.type){case 3:r&&t.push(Z,i,Y);break;case 4:!0===r?t.push(Z,i,Y):!1!==r&&t.push(Z,i,H,p(I(r)),W);break;case 5:isNaN(r)||t.push(Z,i,H,p(I(r)),W);break;case 6:!isNaN(r)&&1<=r&&t.push(Z,i,H,p(I(r)),W);break;default:e.sanitizeURL&&(r=""+r),t.push(Z,i,H,p(I(r)),W)}}else if(v(i)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(e=i.toLowerCase().slice(0,5))&&"aria-"!==e)return}t.push(Z,p(i),H,p(I(r)),W)}}var X=h(">"),J=h("/>");function Q(t,e,i){if(null!=e){if(null!=i)throw Error(n(60));if("object"!=typeof e||!("__html"in e))throw Error(n(61));null!=(e=e.__html)&&t.push(p(""+e))}}var $=h(' selected=""');function tt(t,e,i,r){t.push(nt(i));var n,o=i=null;for(n in e)if(f.call(e,n)){var a=e[n];if(null!=a)switch(n){case"children":i=a;break;case"dangerouslySetInnerHTML":o=a;break;default:K(t,r,n,a)}}return t.push(X),Q(t,o,i),"string"==typeof i?(t.push(p(I(i))),null):i}var et=h("\n"),it=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,rt=new Map;function nt(t){var e=rt.get(t);if(void 0===e){if(!it.test(t))throw Error(n(65,t));e=h("<"+t),rt.set(t,e)}return e}var ot=h("<!DOCTYPE html>");function at(t,e,i,o,a){switch(e){case"select":t.push(nt("select"));var s=null,l=null;for(d in i)if(f.call(i,d)){var u=i[d];if(null!=u)switch(d){case"children":s=u;break;case"dangerouslySetInnerHTML":l=u;break;case"defaultValue":case"value":break;default:K(t,o,d,u)}}return t.push(X),Q(t,l,s),s;case"option":l=a.selectedValue,t.push(nt("option"));var c=u=null,h=null,d=null;for(s in i)if(f.call(i,s)){var m=i[s];if(null!=m)switch(s){case"children":u=m;break;case"selected":h=m;break;case"dangerouslySetInnerHTML":d=m;break;case"value":c=m;default:K(t,o,s,m)}}if(null!=l)if(i=null!==c?""+c:function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(u),A(l)){for(o=0;o<l.length;o++)if(""+l[o]===i){t.push($);break}}else""+l===i&&t.push($);else h&&t.push($);return t.push(X),Q(t,d,u),u;case"textarea":for(u in t.push(nt("textarea")),d=l=s=null,i)if(f.call(i,u)&&null!=(c=i[u]))switch(u){case"children":d=c;break;case"value":s=c;break;case"defaultValue":l=c;break;case"dangerouslySetInnerHTML":throw Error(n(91));default:K(t,o,u,c)}if(null===s&&null!==l&&(s=l),t.push(X),null!=d){if(null!=s)throw Error(n(92));if(A(d)&&1<d.length)throw Error(n(93));s=""+d}return"string"==typeof s&&"\n"===s[0]&&t.push(et),null!==s&&t.push(p(I(""+s))),null;case"input":for(l in t.push(nt("input")),c=d=u=s=null,i)if(f.call(i,l)&&null!=(h=i[l]))switch(l){case"children":case"dangerouslySetInnerHTML":throw Error(n(399,"input"));case"defaultChecked":c=h;break;case"defaultValue":u=h;break;case"checked":d=h;break;case"value":s=h;break;default:K(t,o,l,h)}return null!==d?K(t,o,"checked",d):null!==c&&K(t,o,"checked",c),null!==s?K(t,o,"value",s):null!==u&&K(t,o,"value",u),t.push(J),null;case"menuitem":for(var g in t.push(nt("menuitem")),i)if(f.call(i,g)&&null!=(s=i[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(n(400));default:K(t,o,g,s)}return t.push(X),null;case"title":for(m in t.push(nt("title")),s=null,i)if(f.call(i,m)&&null!=(l=i[m]))switch(m){case"children":s=l;break;case"dangerouslySetInnerHTML":throw Error(n(434));default:K(t,o,m,l)}return t.push(X),s;case"listing":case"pre":for(c in t.push(nt(e)),l=s=null,i)if(f.call(i,c)&&null!=(u=i[c]))switch(c){case"children":s=u;break;case"dangerouslySetInnerHTML":l=u;break;default:K(t,o,c,u)}if(t.push(X),null!=l){if(null!=s)throw Error(n(60));if("object"!=typeof l||!("__html"in l))throw Error(n(61));null!=(i=l.__html)&&("string"==typeof i&&0<i.length&&"\n"===i[0]?t.push(et,p(i)):t.push(p(""+i)))}return"string"==typeof s&&"\n"===s[0]&&t.push(et),s;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var y in t.push(nt(e)),i)if(f.call(i,y)&&null!=(s=i[y]))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(n(399,e));default:K(t,o,y,s)}return t.push(J),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return tt(t,i,e,o);case"html":return 0===a.insertionMode&&t.push(ot),tt(t,i,e,o);default:if(-1===e.indexOf("-")&&"string"!=typeof i.is)return tt(t,i,e,o);for(h in t.push(nt(e)),l=s=null,i)if(f.call(i,h)&&null!=(u=i[h]))switch(h){case"children":s=u;break;case"dangerouslySetInnerHTML":l=u;break;case"style":G(t,o,u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:v(h)&&"function"!=typeof u&&"symbol"!=typeof u&&t.push(Z,p(h),H,p(I(u)),W)}return t.push(X),Q(t,l,s),s}}var st=h("</"),lt=h(">"),ut=h('<template id="'),ct=h('"></template>'),pt=h("\x3c!--$--\x3e"),ht=h('\x3c!--$?--\x3e<template id="'),dt=h('"></template>'),ft=h("\x3c!--$!--\x3e"),mt=h("\x3c!--/$--\x3e"),gt=h("<template"),yt=h('"'),vt=h(' data-dgst="');h(' data-msg="'),h(' data-stck="');var _t=h("></template>");function xt(t,e,i){if(s(t,ht),null===i)throw Error(n(395));return s(t,i),l(t,dt)}var bt=h('<div hidden id="'),wt=h('">'),St=h("</div>"),Tt=h('<svg aria-hidden="true" style="display:none" id="'),Ct=h('">'),It=h("</svg>"),Et=h('<math aria-hidden="true" style="display:none" id="'),Mt=h('">'),At=h("</math>"),Lt=h('<table hidden id="'),kt=h('">'),Pt=h("</table>"),Dt=h('<table hidden><tbody id="'),zt=h('">'),Ot=h("</tbody></table>"),Nt=h('<table hidden><tr id="'),Rt=h('">'),Bt=h("</tr></table>"),jt=h('<table hidden><colgroup id="'),Ft=h('">'),Ut=h("</colgroup></table>");var Vt=h('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),qt=h('$RS("'),Gt=h('","'),Zt=h('")<\/script>'),Ht=h('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Wt=h('$RC("'),Yt=h('","'),Kt=h('")<\/script>'),Xt=h('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Jt=h('$RX("'),Qt=h('"'),$t=h(")<\/script>"),te=h(","),ee=/[<\u2028\u2029]/g;function ie(t){return JSON.stringify(t).replace(ee,(function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))}var re=Object.assign,ne=Symbol.for("react.element"),oe=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),ue=Symbol.for("react.provider"),ce=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),ge=Symbol.for("react.scope"),ye=Symbol.for("react.debug_trace_mode"),ve=Symbol.for("react.legacy_hidden"),_e=Symbol.for("react.default_value"),xe=Symbol.iterator;function be(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case ae:return"Fragment";case oe:return"Portal";case le:return"Profiler";case se:return"StrictMode";case he:return"Suspense";case de:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case ce:return(t.displayName||"Context")+".Consumer";case ue:return(t._context.displayName||"Context")+".Provider";case pe:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case fe:return null!==(e=t.displayName||null)?e:be(t.type)||"Memo";case me:e=t._payload,t=t._init;try{return be(t(e))}catch(t){}}return null}var we={};function Se(t,e){if(!(t=t.contextTypes))return we;var i,r={};for(i in t)r[i]=e[i];return r}var Te=null;function Ce(t,e){if(t!==e){t.context._currentValue=t.parentValue,t=t.parent;var i=e.parent;if(null===t){if(null!==i)throw Error(n(401))}else{if(null===i)throw Error(n(401));Ce(t,i)}e.context._currentValue=e.value}}function Ie(t){t.context._currentValue=t.parentValue,null!==(t=t.parent)&&Ie(t)}function Ee(t){var e=t.parent;null!==e&&Ee(e),t.context._currentValue=t.value}function Me(t,e){if(t.context._currentValue=t.parentValue,null===(t=t.parent))throw Error(n(402));t.depth===e.depth?Ce(t,e):Me(t,e)}function Ae(t,e){var i=e.parent;if(null===i)throw Error(n(402));t.depth===i.depth?Ce(t,i):Ae(t,i),e.context._currentValue=e.value}function Le(t){var e=Te;e!==t&&(null===e?Ee(t):null===t?Ie(e):e.depth===t.depth?Ce(e,t):e.depth>t.depth?Me(e,t):Ae(e,t),Te=t)}var ke={isMounted:function(){return!1},enqueueSetState:function(t,e){null!==(t=t._reactInternals).queue&&t.queue.push(e)},enqueueReplaceState:function(t,e){(t=t._reactInternals).replace=!0,t.queue=[e]},enqueueForceUpdate:function(){}};function Pe(t,e,i,r){var n=void 0!==t.state?t.state:null;t.updater=ke,t.props=i,t.state=n;var o={queue:[],replace:!1};t._reactInternals=o;var a=e.contextType;if(t.context="object"==typeof a&&null!==a?a._currentValue:r,"function"==typeof(a=e.getDerivedStateFromProps)&&(n=null==(a=a(i,n))?n:re({},n,a),t.state=n),"function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate&&("function"==typeof t.UNSAFE_componentWillMount||"function"==typeof t.componentWillMount))if(e=t.state,"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),e!==t.state&&ke.enqueueReplaceState(t,t.state,null),null!==o.queue&&0<o.queue.length)if(e=o.queue,a=o.replace,o.queue=null,o.replace=!1,a&&1===e.length)t.state=e[0];else{for(o=a?e[0]:t.state,n=!0,a=a?1:0;a<e.length;a++){var s=e[a];null!=(s="function"==typeof s?s.call(t,o,i,r):s)&&(n?(n=!1,o=re({},o,s)):re(o,s))}t.state=o}else o.queue=null}var De={id:1,overflow:""};function ze(t,e,i){var r=t.id;t=t.overflow;var n=32-Oe(r)-1;r&=~(1<<n),i+=1;var o=32-Oe(e)+n;if(30<o){var a=n-n%5;return o=(r&(1<<a)-1).toString(32),r>>=a,n-=a,{id:1<<32-Oe(e)+n|i<<n|r,overflow:o+t}}return{id:1<<o|i<<n|r,overflow:t}}var Oe=Math.clz32?Math.clz32:function(t){return 0===(t>>>=0)?32:31-(Ne(t)/Re|0)|0},Ne=Math.log,Re=Math.LN2;var Be="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},je=null,Fe=null,Ue=null,Ve=null,qe=!1,Ge=!1,Ze=0,He=null,We=0;function Ye(){if(null===je)throw Error(n(321));return je}function Ke(){if(0<We)throw Error(n(312));return{memoizedState:null,queue:null,next:null}}function Xe(){return null===Ve?null===Ue?(qe=!1,Ue=Ve=Ke()):(qe=!0,Ve=Ue):null===Ve.next?(qe=!1,Ve=Ve.next=Ke()):(qe=!0,Ve=Ve.next),Ve}function Je(){Fe=je=null,Ge=!1,Ue=null,We=0,Ve=He=null}function Qe(t,e){return"function"==typeof e?e(t):e}function $e(t,e,i){if(je=Ye(),Ve=Xe(),qe){var r=Ve.queue;if(e=r.dispatch,null!==He&&void 0!==(i=He.get(r))){He.delete(r),r=Ve.memoizedState;do{r=t(r,i.action),i=i.next}while(null!==i);return Ve.memoizedState=r,[r,e]}return[Ve.memoizedState,e]}return t=t===Qe?"function"==typeof e?e():e:void 0!==i?i(e):e,Ve.memoizedState=t,t=(t=Ve.queue={last:null,dispatch:null}).dispatch=ei.bind(null,je,t),[Ve.memoizedState,t]}function ti(t,e){if(je=Ye(),e=void 0===e?null:e,null!==(Ve=Xe())){var i=Ve.memoizedState;if(null!==i&&null!==e){var r=i[1];t:if(null===r)r=!1;else{for(var n=0;n<r.length&&n<e.length;n++)if(!Be(e[n],r[n])){r=!1;break t}r=!0}if(r)return i[0]}}return t=t(),Ve.memoizedState=[t,e],t}function ei(t,e,i){if(25<=We)throw Error(n(301));if(t===je)if(Ge=!0,t={action:i,next:null},null===He&&(He=new Map),void 0===(i=He.get(e)))He.set(e,t);else{for(e=i;null!==e.next;)e=e.next;e.next=t}}function ii(){throw Error(n(394))}function ri(){}var ni={readContext:function(t){return t._currentValue},useContext:function(t){return Ye(),t._currentValue},useMemo:ti,useReducer:$e,useRef:function(t){je=Ye();var e=(Ve=Xe()).memoizedState;return null===e?(t={current:t},Ve.memoizedState=t):e},useState:function(t){return $e(Qe,t)},useInsertionEffect:ri,useLayoutEffect:function(){},useCallback:function(t,e){return ti((function(){return t}),e)},useImperativeHandle:ri,useEffect:ri,useDebugValue:ri,useDeferredValue:function(t){return Ye(),t},useTransition:function(){return Ye(),[!1,ii]},useId:function(){var t=Fe.treeContext,e=t.overflow;t=((t=t.id)&~(1<<32-Oe(t)-1)).toString(32)+e;var i=oi;if(null===i)throw Error(n(404));return e=Ze++,t=":"+i.idPrefix+"R"+t,0<e&&(t+="H"+e.toString(32)),t+":"},useMutableSource:function(t,e){return Ye(),e(t._source)},useSyncExternalStore:function(t,e,i){if(void 0===i)throw Error(n(407));return i()}},oi=null,ai=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function si(t){return console.error(t),null}function li(){}function ui(t,e,i,r,n,o,a,s){t.allPendingTasks++,null===i?t.pendingRootTasks++:i.pendingTasks++;var l={node:e,ping:function(){var e=t.pingedTasks;e.push(l),1===e.length&&Ti(t)},blockedBoundary:i,blockedSegment:r,abortSet:n,legacyContext:o,context:a,treeContext:s};return n.add(l),l}function ci(t,e,i,r,n,o){return{status:0,id:-1,index:e,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:i,lastPushedText:n,textEmbedded:o}}function pi(t,e){if(null!=(t=t.onError(e))&&"string"!=typeof t)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof t+'" instead');return t}function hi(t,e){var i=t.onShellError;i(e),(i=t.onFatalError)(e),null!==t.destination?(t.status=2,d(t.destination,e)):(t.status=1,t.fatalError=e)}function di(t,e,i,r,n){for(je={},Fe=e,Ze=0,t=i(r,n);Ge;)Ge=!1,Ze=0,We+=1,Ve=null,t=i(r,n);return Je(),t}function fi(t,e,i,r){var o=i.render(),a=r.childContextTypes;if(null!=a){var s=e.legacyContext;if("function"!=typeof i.getChildContext)r=s;else{for(var l in i=i.getChildContext())if(!(l in a))throw Error(n(108,be(r)||"Unknown",l));r=re({},s,i)}e.legacyContext=r,yi(t,e,o),e.legacyContext=s}else yi(t,e,o)}function mi(t,e){if(t&&t.defaultProps){for(var i in e=re({},e),t=t.defaultProps)void 0===e[i]&&(e[i]=t[i]);return e}return e}function gi(t,e,i,r,o){if("function"==typeof i)if(i.prototype&&i.prototype.isReactComponent){o=Se(i,e.legacyContext);var a=i.contextType;Pe(a=new i(r,"object"==typeof a&&null!==a?a._currentValue:o),i,r,o),fi(t,e,a,i)}else{o=di(t,e,i,r,a=Se(i,e.legacyContext));var s=0!==Ze;if("object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof)Pe(o,i,r,a),fi(t,e,o,i);else if(s){r=e.treeContext,e.treeContext=ze(r,1,0);try{yi(t,e,o)}finally{e.treeContext=r}}else yi(t,e,o)}else{if("string"!=typeof i){switch(i){case ve:case ye:case se:case le:case ae:case de:return void yi(t,e,r.children);case ge:throw Error(n(343));case he:t:{i=e.blockedBoundary,o=e.blockedSegment,a=r.fallback,r=r.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:s=new Set,errorDigest:null},u=ci(0,o.chunks.length,l,o.formatContext,!1,!1);o.children.push(u),o.lastPushedText=!1;var c=ci(0,0,null,o.formatContext,!1,!1);c.parentFlushed=!0,e.blockedBoundary=l,e.blockedSegment=c;try{if(_i(t,e,r),c.lastPushedText&&c.textEmbedded&&c.chunks.push(B),c.status=1,wi(l,c),0===l.pendingTasks)break t}catch(e){c.status=4,l.forceClientRender=!0,l.errorDigest=pi(t,e)}finally{e.blockedBoundary=i,e.blockedSegment=o}e=ui(t,a,i,u,s,e.legacyContext,e.context,e.treeContext),t.pingedTasks.push(e)}return}if("object"==typeof i&&null!==i)switch(i.$$typeof){case pe:if(r=di(t,e,i.render,r,o),0!==Ze){i=e.treeContext,e.treeContext=ze(i,1,0);try{yi(t,e,r)}finally{e.treeContext=i}}else yi(t,e,r);return;case fe:return void gi(t,e,i=i.type,r=mi(i,r),o);case ue:if(o=r.children,i=i._context,r=r.value,a=i._currentValue,i._currentValue=r,Te=r={parent:s=Te,depth:null===s?0:s.depth+1,context:i,parentValue:a,value:r},e.context=r,yi(t,e,o),null===(t=Te))throw Error(n(403));return r=t.parentValue,t.context._currentValue=r===_e?t.context._defaultValue:r,t=Te=t.parent,void(e.context=t);case ce:return void yi(t,e,r=(r=r.children)(i._currentValue));case me:return void gi(t,e,i=(o=i._init)(i._payload),r=mi(i,r),void 0)}throw Error(n(130,null==i?i:typeof i,""))}switch(a=at((o=e.blockedSegment).chunks,i,r,t.responseState,o.formatContext),o.lastPushedText=!1,s=o.formatContext,o.formatContext=function(t,e,i){switch(e){case"select":return R(1,null!=i.value?i.value:i.defaultValue);case"svg":return R(2,null);case"math":return R(3,null);case"foreignObject":return R(1,null);case"table":return R(4,null);case"thead":case"tbody":case"tfoot":return R(5,null);case"colgroup":return R(7,null);case"tr":return R(6,null)}return 4<=t.insertionMode||0===t.insertionMode?R(1,null):t}(s,i,r),_i(t,e,a),o.formatContext=s,i){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:o.chunks.push(st,p(i),lt)}o.lastPushedText=!1}}function yi(t,e,i){if(e.node=i,"object"==typeof i&&null!==i){switch(i.$$typeof){case ne:return void gi(t,e,i.type,i.props,i.ref);case oe:throw Error(n(257));case me:var r=i._init;return void yi(t,e,i=r(i._payload))}if(A(i))return void vi(t,e,i);if(null===i||"object"!=typeof i?r=null:r="function"==typeof(r=xe&&i[xe]||i["@@iterator"])?r:null,r&&(r=r.call(i))){if(!(i=r.next()).done){var o=[];do{o.push(i.value),i=r.next()}while(!i.done);vi(t,e,o)}return}throw t=Object.prototype.toString.call(i),Error(n(31,"[object Object]"===t?"object with keys {"+Object.keys(i).join(", ")+"}":t))}"string"==typeof i?(r=e.blockedSegment).lastPushedText=j(e.blockedSegment.chunks,i,t.responseState,r.lastPushedText):"number"==typeof i&&((r=e.blockedSegment).lastPushedText=j(e.blockedSegment.chunks,""+i,t.responseState,r.lastPushedText))}function vi(t,e,i){for(var r=i.length,n=0;n<r;n++){var o=e.treeContext;e.treeContext=ze(o,r,n);try{_i(t,e,i[n])}finally{e.treeContext=o}}}function _i(t,e,i){var r=e.blockedSegment.formatContext,n=e.legacyContext,o=e.context;try{return yi(t,e,i)}catch(l){if(Je(),"object"!=typeof l||null===l||"function"!=typeof l.then)throw e.blockedSegment.formatContext=r,e.legacyContext=n,e.context=o,Le(o),l;i=l;var a=e.blockedSegment,s=ci(0,a.chunks.length,null,a.formatContext,a.lastPushedText,!0);a.children.push(s),a.lastPushedText=!1,t=ui(t,e.node,e.blockedBoundary,s,e.abortSet,e.legacyContext,e.context,e.treeContext).ping,i.then(t,t),e.blockedSegment.formatContext=r,e.legacyContext=n,e.context=o,Le(o)}}function xi(t){var e=t.blockedBoundary;(t=t.blockedSegment).status=3,Si(this,e,t)}function bi(t,e,i){var r=t.blockedBoundary;t.blockedSegment.status=3,null===r?(e.allPendingTasks--,2!==e.status&&(e.status=2,null!==e.destination&&e.destination.close())):(r.pendingTasks--,r.forceClientRender||(r.forceClientRender=!0,t=void 0===i?Error(n(432)):i,r.errorDigest=e.onError(t),r.parentFlushed&&e.clientRenderedBoundaries.push(r)),r.fallbackAbortableTasks.forEach((function(t){return bi(t,e,i)})),r.fallbackAbortableTasks.clear(),e.allPendingTasks--,0===e.allPendingTasks&&(r=e.onAllReady)())}function wi(t,e){if(0===e.chunks.length&&1===e.children.length&&null===e.children[0].boundary){var i=e.children[0];i.id=e.id,i.parentFlushed=!0,1===i.status&&wi(t,i)}else t.completedSegments.push(e)}
vendor: 5,721 bytes, line 2
2function Si(t,e,i){if(null===e){if(i.parentFlushed){if(null!==t.completedRootSegment)throw Error(n(389));t.completedRootSegment=i}t.pendingRootTasks--,0===t.pendingRootTasks&&(t.onShellError=li,(e=t.onShellReady)())}else e.pendingTasks--,e.forceClientRender||(0===e.pendingTasks?(i.parentFlushed&&1===i.status&&wi(e,i),e.parentFlushed&&t.completedBoundaries.push(e),e.fallbackAbortableTasks.forEach(xi,t),e.fallbackAbortableTasks.clear()):i.parentFlushed&&1===i.status&&(wi(e,i),1===e.completedSegments.length&&e.parentFlushed&&t.partialBoundaries.push(e)));t.allPendingTasks--,0===t.allPendingTasks&&(t=t.onAllReady)()}function Ti(t){if(2!==t.status){var e=Te,i=ai.current;ai.current=ni;var r=oi;oi=t.responseState;try{var n,o=t.pingedTasks;for(n=0;n<o.length;n++){var a=o[n],s=t,l=a.blockedSegment;if(0===l.status){Le(a.context);try{yi(s,a,a.node),l.lastPushedText&&l.textEmbedded&&l.chunks.push(B),a.abortSet.delete(a),l.status=1,Si(s,a.blockedBoundary,l)}catch(t){if(Je(),"object"==typeof t&&null!==t&&"function"==typeof t.then){var u=a.ping;t.then(u,u)}else{a.abortSet.delete(a),l.status=4;var c=a.blockedBoundary,p=t,h=pi(s,p);if(null===c?hi(s,p):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.errorDigest=h,c.parentFlushed&&s.clientRenderedBoundaries.push(c))),s.allPendingTasks--,0===s.allPendingTasks)(0,s.onAllReady)()}}}}o.splice(0,n),null!==t.destination&&Li(t,t.destination)}catch(e){pi(t,e),hi(t,e)}finally{oi=r,ai.current=i,i===ni&&Le(e)}}}function Ci(t,e,i){switch(i.parentFlushed=!0,i.status){case 0:var r=i.id=t.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,t=t.responseState,s(e,ut),s(e,t.placeholderPrefix),s(e,t=p(r.toString(16))),l(e,ct);case 1:i.status=2;var o=!0;r=i.chunks;var a=0;i=i.children;for(var u=0;u<i.length;u++){for(o=i[u];a<o.index;a++)s(e,r[a]);o=Ii(t,e,o)}for(;a<r.length-1;a++)s(e,r[a]);return a<r.length&&(o=l(e,r[a])),o;default:throw Error(n(390))}}function Ii(t,e,i){var r=i.boundary;if(null===r)return Ci(t,e,i);if(r.parentFlushed=!0,r.forceClientRender)r=r.errorDigest,l(e,ft),s(e,gt),r&&(s(e,vt),s(e,p(I(r))),s(e,yt)),l(e,_t),Ci(t,e,i);else if(0<r.pendingTasks){r.rootSegmentID=t.nextSegmentId++,0<r.completedSegments.length&&t.partialBoundaries.push(r);var o=t.responseState,a=o.nextSuspenseID++;o=h(o.boundaryPrefix+a.toString(16)),r=r.id=o,xt(e,t.responseState,r),Ci(t,e,i)}else if(r.byteSize>t.progressiveChunkSize)r.rootSegmentID=t.nextSegmentId++,t.completedBoundaries.push(r),xt(e,t.responseState,r.id),Ci(t,e,i);else{if(l(e,pt),1!==(i=r.completedSegments).length)throw Error(n(391));Ii(t,e,i[0])}return l(e,mt)}function Ei(t,e,i){return function(t,e,i,r){switch(i.insertionMode){case 0:case 1:return s(t,bt),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,wt);case 2:return s(t,Tt),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,Ct);case 3:return s(t,Et),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,Mt);case 4:return s(t,Lt),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,kt);case 5:return s(t,Dt),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,zt);case 6:return s(t,Nt),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,Rt);case 7:return s(t,jt),s(t,e.segmentPrefix),s(t,p(r.toString(16))),l(t,Ft);default:throw Error(n(397))}}(e,t.responseState,i.formatContext,i.id),Ii(t,e,i),function(t,e){switch(e.insertionMode){case 0:case 1:return l(t,St);case 2:return l(t,It);case 3:return l(t,At);case 4:return l(t,Pt);case 5:return l(t,Ot);case 6:return l(t,Bt);case 7:return l(t,Ut);default:throw Error(n(397))}}(e,i.formatContext)}function Mi(t,e,i){for(var r=i.completedSegments,o=0;o<r.length;o++)Ai(t,e,i,r[o]);if(r.length=0,t=t.responseState,r=i.id,i=i.rootSegmentID,s(e,t.startInlineScript),t.sentCompleteBoundaryFunction?s(e,Wt):(t.sentCompleteBoundaryFunction=!0,s(e,Ht)),null===r)throw Error(n(395));return i=p(i.toString(16)),s(e,r),s(e,Yt),s(e,t.segmentPrefix),s(e,i),l(e,Kt)}function Ai(t,e,i,r){if(2===r.status)return!0;var o=r.id;if(-1===o){if(-1===(r.id=i.rootSegmentID))throw Error(n(392));return Ei(t,e,r)}return Ei(t,e,r),s(e,(t=t.responseState).startInlineScript),t.sentCompleteSegmentFunction?s(e,qt):(t.sentCompleteSegmentFunction=!0,s(e,Vt)),s(e,t.segmentPrefix),s(e,o=p(o.toString(16))),s(e,Gt),s(e,t.placeholderPrefix),s(e,o),l(e,Zt)}function Li(t,e){o=new Uint8Array(512),a=0;try{var i=t.completedRootSegment;if(null!==i&&0===t.pendingRootTasks){Ii(t,e,i),t.completedRootSegment=null;var r=t.responseState.bootstrapChunks;for(i=0;i<r.length-1;i++)s(e,r[i]);i<r.length&&l(e,r[i])}var c,h=t.clientRenderedBoundaries;for(c=0;c<h.length;c++){var d=h[c];r=e;var f=t.responseState,m=d.id,g=d.errorDigest,y=d.errorMessage,v=d.errorComponentStack;if(s(r,f.startInlineScript),f.sentClientRenderFunction?s(r,Jt):(f.sentClientRenderFunction=!0,s(r,Xt)),null===m)throw Error(n(395));if(s(r,m),s(r,Qt),(g||y||v)&&(s(r,te),s(r,p(ie(g||"")))),(y||v)&&(s(r,te),s(r,p(ie(y||"")))),v&&(s(r,te),s(r,p(ie(v)))),!l(r,$t))return t.destination=null,c++,void h.splice(0,c)}h.splice(0,c);var _=t.completedBoundaries;for(c=0;c<_.length;c++)if(!Mi(t,e,_[c]))return t.destination=null,c++,void _.splice(0,c);_.splice(0,c),u(e),o=new Uint8Array(512),a=0;var x=t.partialBoundaries;for(c=0;c<x.length;c++){var b=x[c];t:{h=t,d=e;var w=b.completedSegments;for(f=0;f<w.length;f++)if(!Ai(h,d,b,w[f])){f++,w.splice(0,f);var S=!1;break t}w.splice(0,f),S=!0}if(!S)return t.destination=null,c++,void x.splice(0,c)}x.splice(0,c);var T=t.completedBoundaries;for(c=0;c<T.length;c++)if(!Mi(t,e,T[c]))return t.destination=null,c++,void T.splice(0,c);T.splice(0,c)}finally{u(e),0===t.allPendingTasks&&0===t.pingedTasks.length&&0===t.clientRenderedBoundaries.length&&0===t.completedBoundaries.length&&e.close()}}function ki(t,e){try{var i=t.abortableTasks;
2i.forEach((function(i){return bi(i,t,e)})),i.clear(),null!==t.destination&&Li(t,t.destination)}catch(e){pi(t,e),hi(t,e)}}e.renderToReadableStream=function(t,e){return new Promise((function(i,r){var n,o,a=new Promise((function(t,e){o=t,n=e})),s=function(t,e,i,r,n,o,a,s,l){var u=[],c=new Set;return(i=ci(e={destination:null,responseState:e,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===n?si:n,onAllReady:void 0===o?li:o,onShellReady:void 0===a?li:a,onShellError:void 0===s?li:s,onFatalError:void 0===l?li:l},0,null,i,!1,!1)).parentFlushed=!0,t=ui(e,t,null,i,c,we,null,De),u.push(t),e}(t,function(t,e,i,r,n){t=void 0===t?"":t,e=void 0===e?L:h('<script nonce="'+I(e)+'">');var o=[];if(void 0!==i&&o.push(e,p((""+i).replace(O,N)),k),void 0!==r)for(i=0;i<r.length;i++)o.push(P,p(I(r[i])),z);if(void 0!==n)for(r=0;r<n.length;r++)o.push(D,p(I(n[r])),z);return{bootstrapChunks:o,startInlineScript:e,placeholderPrefix:h(t+"P:"),segmentPrefix:h(t+"S:"),boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(e?e.identifierPrefix:void 0,e?e.nonce:void 0,e?e.bootstrapScriptContent:void 0,e?e.bootstrapScripts:void 0,e?e.bootstrapModules:void 0),function(t){return R("http://www.w3.org/2000/svg"===t?2:"http://www.w3.org/1998/Math/MathML"===t?3:0,null)}(e?e.namespaceURI:void 0),e?e.progressiveChunkSize:void 0,e?e.onError:void 0,o,(function(){var t=new ReadableStream({type:"bytes",pull:function(t){if(1===s.status)s.status=2,d(t,s.fatalError);else if(2!==s.status&&null===s.destination){s.destination=t;try{Li(s,t)}catch(t){pi(s,t),hi(s,t)}}},cancel:function(){ki(s)}},{highWaterMark:0});t.allReady=a,i(t)}),(function(t){a.catch((function(){})),r(t)}),n);if(e&&e.signal){var l=e.signal,u=function(){ki(s,l.reason),l.removeEventListener("abort",u)};l.addEventListener("abort",u)}Ti(s)}))},e.version="18.2.0"},7762:function(t,e,i){"use strict";var r,n;r=i(7774),n=i(8698),r.version,r.renderToString,e.uS=r.renderToStaticMarkup,r.renderToNodeStream,r.renderToStaticNodeStream,n.renderToReadableStream}}]);
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.