Skip to content

Instantly share code, notes, and snippets.

@adriano-silva
Created December 10, 2018 15:28
Show Gist options
  • Save adriano-silva/f0de1ced34b5426dbe6b4a12f839cfae to your computer and use it in GitHub Desktop.
Save adriano-silva/f0de1ced34b5426dbe6b4a12f839cfae to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports.tomtom=e():t.tomtom=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=100)}([function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(25)],void 0!==(r=function(t){function e(e){return t.isArray(e)}function i(e){return t.isObject(e)}function n(e){return t.isFinite(e)}function r(e){return t.isString(e)&&e.length>0}function a(e){return t.isNaN(e)}function s(t){return void 0!==t&&null!==t&&!a(t)}function l(t){return function(e){return e instanceof t}}function u(t,i){var n;for(n in t)t.hasOwnProperty(n)&&(e(t[n])?i[n]=t[n].slice(0):"object"===o(t[n])?(i[n]={},u(t[n],i[n])):i[n]=t[n])}function c(t){return void 0===t?{}:t}function h(t,e,i){var n;t[e]=c(t[e]);for(n in i[e])i[e].hasOwnProperty(n)&&(t[e][n]=i[e][n])}function p(t){var i;return t instanceof L.LatLng?i=t:e(t)?i=L.latLng(t):t&&t.lat&&t.lon?i=L.latLng([t.lat,t.lon]):t&&t.lat&&t.lng&&(i=L.latLng([t.lat,t.lng])),i}function f(t,e){var i;for(i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}return{isArray:e,isEqual:t.isEqual,isObject:i,isString:t.isString,isValidNumber:n,isValidValue:s,isNonEmptyString:r,createInstanceChecker:l,convertToLatLng:p,addFields:function(t,e){var i,n=e||this.defaultFields||{};for(i in t)t.hasOwnProperty(i)&&h(n,i,t);return n},clone:function(t){var e={};return u(t,e),e},encodeQuery:function(t){return encodeURIComponent(t)},encodeStringForRegex:function(t){return t.replace(/[-[\]\/{}()*+?.\\^$|]/g,"\\$&")},extend:f,addDeprecatedProperty:function(t,e,i){Object.defineProperty(t,e,{get:function(){return console.warn("Usage of "+e+" property is deprecated. Please use "+i+" property."),this[i]}})},pointRegex:/(-?\d+(?:\.\d+)?)(?:\s+|\s*,\s*)(-?\d+(?:\.\d+)?)/,circleRegex:/circle\((-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*,\s*(\d+)\)/,debounce:function(t,e,i){var n;return function(){var r=function(){n=null,e.apply(t,arguments)};clearTimeout(n),n=setTimeout(r,i)}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){/* @preserve
* Leaflet 1.3.0, a JS library for interactive maps. http://leafletjs.com
* (c) 2010-2017 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
!function(t,i){i(e)}(0,function(t){"use strict";function e(t){var e,i,n,r;for(i=1,n=arguments.length;i<n;i++){r=arguments[i];for(e in r)t[e]=r[e]}return t}function i(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}function n(t){return t._leaflet_id=t._leaflet_id||++te,t._leaflet_id}function r(t,e,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)}}function o(t,e,i){var n=e[1],r=e[0],o=n-r;return t===n&&i?t:((t-r)%o+o)%o+r}function a(){return!1}function s(t,e){var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return l(t).split(/\s+/)}function c(t,e){t.hasOwnProperty("options")||(t.options=t.options?$t(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function h(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function p(t,e){return t.replace(ee,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}function f(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}function d(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var e=+new Date,i=Math.max(0,16-(e-re));return re=e+i,window.setTimeout(t,i)}function _(t,e,n){if(!n||oe!==m)return oe.call(window,i(t,e));t.call(e)}function g(t){t&&ae.call(window,t)}function y(){}function v(t){if("undefined"!=typeof L&&L&&L.Mixin){t=ie(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function b(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}function x(t,e,i){return t instanceof b?t:ie(t)?new b(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new b(t.x,t.y):new b(t,e,i)}function w(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n<r;n++)this.extend(i[n])}function k(t,e){return!t||t instanceof w?t:new w(t,e)}function T(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n<r;n++)this.extend(i[n])}function E(t,e){return t instanceof T?t:new T(t,e)}function S(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function C(t,e,i){return t instanceof S?t:ie(t)&&"object"!=typeof t[0]?3===t.length?new S(t[0],t[1],t[2]):2===t.length?new S(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new S(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new S(t,e,i)}function A(t,e,i,n){if(ie(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function P(t,e,i,n){return new A(t,e,i,n)}function I(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t,e){var i,n,r,o,a,s,l="";for(i=0,r=t.length;i<r;i++){for(n=0,o=(a=t[i]).length;n<o;n++)s=a[n],l+=(n?"L":"M")+s.x+" "+s.y;l+=e?Xe?"z":"x":""}return l||"M0 0"}function z(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function R(t,e,i,n){return"touchstart"===e?O(t,i,n):"touchmove"===e?U(t,i,n):"touchend"===e&&V(t,i,n),this}function B(t,e,i){var n=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener($e,n,!1):"touchmove"===e?t.removeEventListener(ti,n,!1):"touchend"===e&&(t.removeEventListener(ei,n,!1),t.removeEventListener(ii,n,!1)),this}function O(t,e,n){var r=i(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(ni.indexOf(t.target.tagName)<0))return;Q(t)}j(t,e)});t["_leaflet_touchstart"+n]=r,t.addEventListener($e,r,!1),oi||(document.documentElement.addEventListener($e,D,!0),document.documentElement.addEventListener(ti,N,!0),document.documentElement.addEventListener(ei,F,!0),document.documentElement.addEventListener(ii,F,!0),oi=!0)}function D(t){ri[t.pointerId]=t,ai++}function N(t){ri[t.pointerId]&&(ri[t.pointerId]=t)}function F(t){delete ri[t.pointerId],ai--}function j(t,e){t.touches=[];for(var i in ri)t.touches.push(ri[i]);t.changedTouches=[t],e(t)}function U(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&j(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(ti,n,!1)}function V(t,e,i){var n=function(t){j(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(ei,n,!1),t.addEventListener(ii,n,!1)}function Z(t,e,i){function n(t){var e;if(qe){if(!ke||"mouse"===t.pointerType)return;e=ai}else e=t.touches.length;if(!(e>1)){var i=Date.now(),n=i-(o||i);a=t.touches?t.touches[0]:t,s=n>0&&n<=l,o=i}}function r(t){if(s&&!a.cancelBubble){if(qe){if(!ke||"mouse"===t.pointerType)return;var i,n,r={};for(n in a)i=a[n],r[n]=i&&i.bind?i.bind(a):i;a=r}a.type="dblclick",e(a),o=null}}var o,a,s=!1,l=250;return t[ui+si+i]=n,t[ui+li+i]=r,t[ui+"dblclick"+i]=e,t.addEventListener(si,n,!1),t.addEventListener(li,r,!1),t.addEventListener("dblclick",e,!1),this}function q(t,e){var i=t[ui+si+e],n=t[ui+li+e],r=t[ui+"dblclick"+e];return t.removeEventListener(si,i,!1),t.removeEventListener(li,n,!1),ke||t.removeEventListener("dblclick",r,!1),this}function G(t,e,i,n){if("object"==typeof e)for(var r in e)W(t,r,e[r],i);else for(var o=0,a=(e=u(e)).length;o<a;o++)W(t,e[o],i,n);return this}function H(t,e,i,n){if("object"==typeof e)for(var r in e)K(t,r,e[r],i);else if(e)for(var o=0,a=(e=u(e)).length;o<a;o++)K(t,e[o],i,n);else{for(var s in t[ci])K(t,s,t[ci][s]);delete t[ci]}return this}function W(t,e,i,r){var o=e+n(i)+(r?"_"+n(r):"");if(t[ci]&&t[ci][o])return this;var a=function(e){return i.call(r||t,e||window.event)},s=a;qe&&0===e.indexOf("touch")?R(t,e,a,o):!Ge||"dblclick"!==e||!Z||qe&&Pe?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,rt(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1)):("click"===e&&Ee&&(a=function(t){ot(t,s)}),t.addEventListener(e,a,!1)):"attachEvent"in t&&t.attachEvent("on"+e,a):Z(t,a,o),t[ci]=t[ci]||{},t[ci][o]=a}function K(t,e,i,r){var o=e+n(i)+(r?"_"+n(r):""),a=t[ci]&&t[ci][o];if(!a)return this;qe&&0===e.indexOf("touch")?B(t,e,o):!Ge||"dblclick"!==e||!q||qe&&Pe?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a):q(t,o),t[ci][o]=null}function J(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,nt(t),this}function X(t){return W(t,"mousewheel",J),this}function Y(t){return G(t,"mousedown touchstart dblclick",J),W(t,"click",it),this}function Q(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $(t){return Q(t),J(t),this}function tt(t,e){if(!e)return new b(t.clientX,t.clientY);var i=e.getBoundingClientRect(),n=i.width/e.offsetWidth||1,r=i.height/e.offsetHeight||1;return new b(t.clientX/n-i.left-e.clientLeft,t.clientY/r-i.top-e.clientTop)}function et(t){return ke?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/hi:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function it(t){pi[t.type]=!0}function nt(t){var e=pi[t.type];return pi[t.type]=!1,e}function rt(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}function ot(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=de&&i-de;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?$(t):(de=i,e(t))}function at(t){return"string"==typeof t?document.getElementById(t):t}function st(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function lt(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ut(t){var e=t.parentNode;e&&e.removeChild(t)}function ct(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ht(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function pt(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ft(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=gt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function dt(t,e){if(void 0!==t.classList)for(var i=u(e),n=0,r=i.length;n<r;n++)t.classList.add(i[n]);else if(!ft(t,e)){var o=gt(t);_t(t,(o?o+" ":"")+e)}}function mt(t,e){void 0!==t.classList?t.classList.remove(e):_t(t,l((" "+gt(t)+" ").replace(" "+e+" "," ")))}function _t(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function gt(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function yt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&vt(t,e)}function vt(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function bt(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function xt(t,e,i){var n=e||new b(0,0);t.style[di]=(Oe?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function wt(t,e){t._leaflet_pos=e,Fe?xt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function kt(t){return t._leaflet_pos||new b(0,0)}function Tt(){G(window,"dragstart",Q)}function Et(){H(window,"dragstart",Q)}function Lt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(St(),yi=t,vi=t.style.outline,t.style.outline="none",G(window,"keydown",St))}function St(){yi&&(yi.style.outline=vi,yi=void 0,vi=void 0,H(window,"keydown",St))}function Ct(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Mt(t,i),t=Pt(t,i)}function At(t,e,i){return Math.sqrt(Dt(t,e,i,!0))}function Pt(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,It(t,n,e,0,i-1);var r,o=[];for(r=0;r<i;r++)n[r]&&o.push(t[r]);return o}function It(t,e,i,n,r){var o,a,s,l=0;for(a=n+1;a<=r-1;a++)(s=Dt(t[a],t[n],t[r],!0))>l&&(o=a,l=s);l>i&&(e[o]=1,It(t,e,i,n,o),It(t,e,i,o,r))}function Mt(t,e){for(var i=[t[0]],n=1,r=0,o=t.length;n<o;n++)Ot(t[n],t[r])>e&&(i.push(t[n]),r=n);return r<o-1&&i.push(t[o-1]),i}function zt(t,e,i,n,r){var o,a,s,l=n?Pi:Bt(t,i),u=Bt(e,i);for(Pi=u;;){if(!(l|u))return[t,e];if(l&u)return!1;s=Bt(a=Rt(t,e,o=l||u,i,r),i),o===l?(t=a,l=s):(e=a,u=s)}}function Rt(t,e,i,n,r){var o,a,s=e.x-t.x,l=e.y-t.y,u=n.min,c=n.max;return 8&i?(o=t.x+s*(c.y-t.y)/l,a=c.y):4&i?(o=t.x+s*(u.y-t.y)/l,a=u.y):2&i?(o=c.x,a=t.y+l*(c.x-t.x)/s):1&i&&(o=u.x,a=t.y+l*(u.x-t.x)/s),new b(o,a,r)}function Bt(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Ot(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Dt(t,e,i,n){var r,o=e.x,a=e.y,s=i.x-o,l=i.y-a,u=s*s+l*l;return u>0&&((r=((t.x-o)*s+(t.y-a)*l)/u)>1?(o=i.x,a=i.y):r>0&&(o+=s*r,a+=l*r)),s=t.x-o,l=t.y-a,n?s*s+l*l:new b(o,a)}function Nt(t){return!ie(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ft(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Nt(t)}function jt(t,e,i){var n,r,o,a,s,l,u,c,h,p=[1,4,2,8];for(r=0,u=t.length;r<u;r++)t[r]._code=Bt(t[r],e);for(a=0;a<4;a++){for(c=p[a],n=[],r=0,o=(u=t.length)-1;r<u;o=r++)s=t[r],l=t[o],s._code&c?l._code&c||((h=Rt(l,s,c,e,i))._code=Bt(h,e),n.push(h)):(l._code&c&&((h=Rt(l,s,c,e,i))._code=Bt(h,e),n.push(h)),n.push(s));t=n}return t}function Ut(t,e){var i,n,r,o,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Vt;if(!s&&!a)return null;switch(a.type){case"Point":return i=c(s),u?u(t,i):new Xi(i);case"MultiPoint":for(r=0,o=s.length;r<o;r++)i=c(s[r]),l.push(u?u(t,i):new Xi(i));return new Hi(l);case"LineString":case"MultiLineString":return n=Zt(s,"LineString"===a.type?0:1,c),new tn(n,e);case"Polygon":case"MultiPolygon":return n=Zt(s,"Polygon"===a.type?1:2,c),new en(n,e);case"GeometryCollection":for(r=0,o=a.geometries.length;r<o;r++){var h=Ut({geometry:a.geometries[r],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Hi(l);default:throw new Error("Invalid GeoJSON object.")}}function Vt(t){return new S(t[1],t[0],t[2])}function Zt(t,e,i){for(var n,r=[],o=0,a=t.length;o<a;o++)n=e?Zt(t[o],e-1,i):(i||Vt)(t[o]),r.push(n);return r}function qt(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[s(t.lng,e),s(t.lat,e),s(t.alt,e)]:[s(t.lng,e),s(t.lat,e)]}function Gt(t,e,i,n){for(var r=[],o=0,a=t.length;o<a;o++)r.push(e?Gt(t[o],e-1,i,n):qt(t[o],n));return!e&&i&&r.push(r[0]),r}function Ht(t,i){return t.feature?e({},t.feature,{geometry:i}):Wt(i)}function Wt(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Kt(t,e){return new nn(t,e)}function Jt(t,e){return new fn(t,e)}function Xt(t){return Je?new _n(t):null}function Yt(t){return Xe||Ye?new bn(t):null}var Qt=Object.freeze;Object.freeze=function(t){return t};var $t=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),te=0,ee=/\{ *([\w_-]+) *\}/g,ie=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ne="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",re=0,oe=window.requestAnimationFrame||d("RequestAnimationFrame")||m,ae=window.cancelAnimationFrame||d("CancelAnimationFrame")||d("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},se=(Object.freeze||Object)({freeze:Qt,extend:e,create:$t,bind:i,lastId:te,stamp:n,throttle:r,wrapNum:o,falseFn:a,formatNum:s,trim:l,splitWords:u,setOptions:c,getParamString:h,template:p,isArray:ie,indexOf:f,emptyImageUrl:ne,requestFn:oe,cancelFn:ae,requestAnimFrame:_,cancelAnimFrame:g});y.extend=function(t){var i=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=i.__super__=this.prototype,r=$t(n);r.constructor=i,i.prototype=r;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&(e(i,t.statics),delete t.statics),t.includes&&(v(t.includes),e.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=e($t(r.options),t.options)),e(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},i},y.include=function(t){return e(this.prototype,t),this},y.mergeOptions=function(t){return e(this.prototype.options,t),this},y.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var le={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var r=0,o=(t=u(t)).length;r<o;r++)this._on(t[r],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var r=0,o=(t=u(t)).length;r<o;r++)this._off(t[r],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var r={fn:e,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===e&&o[a].ctx===i)return;o.push(r)},_off:function(t,e,i){var n,r,o;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var s=n[r];if(s.ctx===i&&s.fn===e)return s.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(r,1)}}else{for(r=0,o=n.length;r<o;r++)n[r].fn=a;delete this._events[t]}},fire:function(t,i,n){if(!this.listens(t,n))return this;var r=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,s=o.length;a<s;a++){var l=o[a];l.fn.call(l.ctx||this,r)}this._firingCount--}}return n&&this._propagateEvent(r),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],e);return this}var o=i(function(){this.off(t,e,n).off(t,o,n)},this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};le.addEventListener=le.on,le.removeEventListener=le.clearAllEventListeners=le.off,le.addOneTimeEventListener=le.once,le.fireEvent=le.fire,le.hasEventListeners=le.listens;var ue=y.extend(le),ce=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};b.prototype={clone:function(){return new b(this.x,this.y)},add:function(t){return this.clone()._add(x(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(x(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new b(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new b(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ce(this.x),this.y=ce(this.y),this},distanceTo:function(t){var e=(t=x(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=x(t)).x===this.x&&t.y===this.y},contains:function(t){return t=x(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+s(this.x)+", "+s(this.y)+")"}},w.prototype={extend:function(t){return t=x(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new b((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new b(this.min.x,this.max.y)},getTopRight:function(){return new b(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof b?x(t):k(t))instanceof w?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>=e.x&&n.x<=i.x,a=r.y>=e.y&&n.y<=i.y;return o&&a},overlaps:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>e.x&&n.x<i.x,a=r.y>e.y&&n.y<i.y;return o&&a},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(t){var e,i,n=this._southWest,r=this._northEast;if(t instanceof S)e=t,i=t;else{if(!(t instanceof T))return t?this.extend(C(t)||E(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||r?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),r.lat=Math.max(i.lat,r.lat),r.lng=Math.max(i.lng,r.lng)):(this._southWest=new S(e.lat,e.lng),this._northEast=new S(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,r=Math.abs(e.lng-i.lng)*t;return new T(new S(e.lat-n,e.lng-r),new S(i.lat+n,i.lng+r))},getCenter:function(){return new S((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new S(this.getNorth(),this.getWest())},getSouthEast:function(){return new S(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof S||"lat"in t?C(t):E(t);var e,i,n=this._southWest,r=this._northEast;return t instanceof T?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=r.lat&&e.lng>=n.lng&&i.lng<=r.lng},intersects:function(t){t=E(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&n.lat<=i.lat,a=r.lng>=e.lng&&n.lng<=i.lng;return o&&a},overlaps:function(t){t=E(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&n.lat<i.lat,a=r.lng>e.lng&&n.lng<i.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=E(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},S.prototype={equals:function(t,e){return!!t&&(t=C(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+s(this.lat,t)+", "+s(this.lng,t)+")"},distanceTo:function(t){return pe.distance(this,C(t))},wrap:function(){return pe.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return E([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new S(this.lat,this.lng,this.alt)}};var he={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new w(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?o(t.lng,this.wrapLng,!0):t.lng;return new S(this.wrapLat?o(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,r=e.lng-i.lng;if(0===n&&0===r)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new T(new S(o.lat-n,o.lng-r),new S(a.lat-n,a.lng-r))}},pe=e({},he,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),s=o*o+Math.cos(n)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),fe={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),r=Math.sin(n*e);return new b(this.R*t.lng*e,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var e=180/Math.PI;return new S((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new w([-t,-t],[t,t])}()};A.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new b((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var de,me,_e,ge,ye=e({},pe,{code:"EPSG:3857",projection:fe,transformation:function(){var t=.5/(Math.PI*fe.R);return P(t,.5,-t,.5)}()}),ve=e({},ye,{code:"EPSG:900913"}),be=document.documentElement.style,xe="ActiveXObject"in window,we=xe&&!document.addEventListener,ke="msLaunchUri"in navigator&&!("documentMode"in document),Te=z("webkit"),Ee=z("android"),Le=z("android 2")||z("android 3"),Se=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ce=Ee&&z("Google")&&Se<537&&!("AudioNode"in window),Ae=!!window.opera,Pe=z("chrome"),Ie=z("gecko")&&!Te&&!Ae&&!xe,Me=!Pe&&z("safari"),ze=z("phantom"),Re="OTransition"in be,Be=0===navigator.platform.indexOf("Win"),Oe=xe&&"transition"in be,De="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Le,Ne="MozPerspective"in be,Fe=!window.L_DISABLE_3D&&(Oe||De||Ne)&&!Re&&!ze,je="undefined"!=typeof orientation||z("mobile"),Ue=je&&Te,Ve=je&&De,Ze=!window.PointerEvent&&window.MSPointerEvent,qe=!(!window.PointerEvent&&!Ze),Ge=!window.L_NO_TOUCH&&(qe||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),He=je&&Ae,We=je&&Ie,Ke=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Je=!!document.createElement("canvas").getContext,Xe=!(!document.createElementNS||!I("svg").createSVGRect),Ye=!Xe&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),Qe=(Object.freeze||Object)({ie:xe,ielt9:we,edge:ke,webkit:Te,android:Ee,android23:Le,androidStock:Ce,opera:Ae,chrome:Pe,gecko:Ie,safari:Me,phantom:ze,opera12:Re,win:Be,ie3d:Oe,webkit3d:De,gecko3d:Ne,any3d:Fe,mobile:je,mobileWebkit:Ue,mobileWebkit3d:Ve,msPointer:Ze,pointer:qe,touch:Ge,mobileOpera:He,mobileGecko:We,retina:Ke,canvas:Je,svg:Xe,vml:Ye}),$e=Ze?"MSPointerDown":"pointerdown",ti=Ze?"MSPointerMove":"pointermove",ei=Ze?"MSPointerUp":"pointerup",ii=Ze?"MSPointerCancel":"pointercancel",ni=["INPUT","SELECT","OPTION"],ri={},oi=!1,ai=0,si=Ze?"MSPointerDown":qe?"pointerdown":"touchstart",li=Ze?"MSPointerUp":qe?"pointerup":"touchend",ui="_leaflet_",ci="_leaflet_events",hi=Be&&Pe?2*window.devicePixelRatio:Ie?window.devicePixelRatio:1,pi={},fi=(Object.freeze||Object)({on:G,off:H,stopPropagation:J,disableScrollPropagation:X,disableClickPropagation:Y,preventDefault:Q,stop:$,getMousePosition:tt,getWheelDelta:et,fakeStop:it,skipped:nt,isExternalTarget:rt,addListener:G,removeListener:H}),di=bt(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),mi=bt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_i="webkitTransition"===mi||"OTransition"===mi?mi+"End":"transitionend";if("onselectstart"in document)me=function(){G(window,"selectstart",Q)},_e=function(){H(window,"selectstart",Q)};else{var gi=bt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);me=function(){if(gi){var t=document.documentElement.style;ge=t[gi],t[gi]="none"}},_e=function(){gi&&(document.documentElement.style[gi]=ge,ge=void 0)}}var yi,vi,bi=(Object.freeze||Object)({TRANSFORM:di,TRANSITION:mi,TRANSITION_END:_i,get:at,getStyle:st,create:lt,remove:ut,empty:ct,toFront:ht,toBack:pt,hasClass:ft,addClass:dt,removeClass:mt,setClass:_t,getClass:gt,setOpacity:yt,testProp:bt,setTransform:xt,setPosition:wt,getPosition:kt,disableTextSelection:me,enableTextSelection:_e,disableImageDrag:Tt,enableImageDrag:Et,preventOutline:Lt,restoreOutline:St}),xi=ue.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=kt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=_(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),wt(this._el,i),this.fire("step")},_complete:function(){g(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),wi=ue.extend({options:{crs:ye,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=c(this,e),this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(C(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=mi&&Fe&&!He&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),G(this._proxy,_i,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,n){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(C(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Fe?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Fe?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=(t instanceof b?t:this.latLngToContainerPoint(t)).subtract(r).multiplyBy(1-1/n),a=this.containerPointToLatLng(r.add(o));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():E(t);var i=x(e.paddingTopLeft||e.padding||[0,0]),n=x(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,i.add(n));if((r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};var o=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),r),s=this.project(t.getNorthEast(),r);return{center:this.unproject(a.add(s).divideBy(2).add(o),r),zoom:r}},fitBounds:function(t,e){if(!(t=E(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=x(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new xi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){dt(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){function n(t){var e=(g*g-m*m+(t?-1:1)*b*b*y*y)/(2*(t?g:m)*b*y),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function r(t){return(Math.exp(t)-Math.exp(-t))/2}function o(t){return(Math.exp(t)+Math.exp(-t))/2}function a(t){return r(t)/o(t)}function s(t){return m*(o(x)/o(x+v*t))}function l(t){return m*(o(x)*a(x+v*t)-r(x))/b}function u(t){return 1-Math.pow(1-t,1.5)}function c(){var i=(Date.now()-w)/T,n=u(i)*k;i<=1?(this._flyToFrame=_(c,this),this._move(this.unproject(h.add(p.subtract(h).multiplyBy(l(n)/y)),d),this.getScaleZoom(m/s(n),d),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}if(!1===(i=i||{}).animate||!Fe)return this.setView(t,e,i);this._stop();var h=this.project(this.getCenter()),p=this.project(t),f=this.getSize(),d=this._zoom;t=C(t),e=void 0===e?d:e;var m=Math.max(f.x,f.y),g=m*this.getZoomScale(d,e),y=p.distanceTo(h)||1,v=1.42,b=v*v,x=n(0),w=Date.now(),k=(n(1)-x)/v,T=i.duration?1e3*i.duration:1e3*k*.8;return this._moveStart(!0,i.noMoveStart),c.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=E(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,E(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=n.divideBy(2).round(),a=r.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,r,t):navigator.geolocation.getCurrentPosition(n,r,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=new S(t.coords.latitude,t.coords.longitude),i=e.toBounds(t.coords.accuracy),n=this._locateOptions;if(n.setView){var r=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(r,n.maxZoom):r)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)ut(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=lt("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new T(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=E(t),i=x(i||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),u=k(this.project(s,n),this.project(a,n)).getSize(),c=Fe?this.options.zoomSnap:1,h=l.x/u.x,p=l.y/u.y,f=e?Math.max(h,p):Math.min(h,p);return n=this.getScaleZoom(f,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(r,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new b(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new w(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(C(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(x(t),e)},layerPointToLatLng:function(t){var e=x(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(C(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(C(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(E(t))},distance:function(t,e){return this.options.crs.distance(C(t),C(e))},containerPointToLayerPoint:function(t){return x(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return x(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(x(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(t)))},mouseEventToContainerPoint:function(t){return tt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=at(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");G(e,"scroll",this._onScroll,this),this._containerId=n(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Fe,dt(t,"leaflet-container"+(Ge?" leaflet-touch":"")+(Ke?" leaflet-retina":"")+(we?" leaflet-oldie":"")+(Me?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=st(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),wt(this._mapPane,new b(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(dt(t.markerPane,"leaflet-zoom-hide"),dt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){wt(this._mapPane,new b(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){wt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var e=t?H:G;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Fe&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=_(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,r=[],o="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((i=this._targets[n(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)){if(o&&!rt(a,t))break;if(r.push(i),o)break}if(a===this._container)break;a=a.parentNode}return r.length||s||o||!rt(a,t)||(r=[this]),r},_handleDOMEvent:function(t){if(this._loaded&&!nt(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||Lt(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var r=e({},t);r.type="preclick",this._fireDOMEvent(r,r.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,i))).length){var o=n[0];"contextmenu"===i&&o.listens(i,!0)&&Q(t);var a={originalEvent:t};if("keypress"!==t.type){var s=o.getLatLng&&(!o._radius||o._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(i,a,!0),a.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==f(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return kt(this._mapPane)||new b(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return k([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),r=this.getSize().divideBy(2),o=new w(n.subtract(r),n.add(r)),a=this._getBoundsOffset(o,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new w(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=k(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),o=n.max.subtract(t.max);return new b(this._rebound(r.x,-o.x),this._rebound(r.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Fe?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=lt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=di,i=this._proxy.style[e];xt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();xt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(r))&&(_(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,dt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),_(function(){this._moveEnd(!0)},this))}}),ki=y.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return dt(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},remove:function(){return this._map?(ut(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ti=function(t){return new ki(t)};wi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,r){var o=i+t+" "+i+r;e[t+r]=lt("div",o,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=lt("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ut(this._controlCorners[t]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ei=ki.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){c(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ki.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(n(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){dt(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(dt(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):mt(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return mt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=lt("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Y(e),X(e);var n=this._form=lt("form",t+"-list");i&&(this._map.on("click",this.collapse,this),Ee||G(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var r=this._layersLink=lt("a",t+"-toggle",e);r.href="#",r.title="Layers",Ge?(G(r,"click",$),G(r,"click",this.expand,this)):G(r,"focus",this.expand,this),i||this.expand(),this._baseLayersList=lt("div",t+"-base",n),this._separator=lt("div",t+"-separator",n),this._overlaysList=lt("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&n(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ct(this._baseLayersList),ct(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,r=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,r+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&r>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(n(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers",r),this._layerControlInputs.push(e),e.layerId=n(t.layer),G(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var a=document.createElement("div");return i.appendChild(a),a.appendChild(e),a.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||r.push(e);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])&&this._map.removeLayer(r[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),r=i.length-1;r>=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Li=ki.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=lt("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,r){var o=lt("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Y(o),G(o,"click",$),G(o,"click",r,this),G(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";mt(this._zoomInButton,e),mt(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&dt(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&dt(this._zoomInButton,e)}});wi.mergeOptions({zoomControl:!0}),wi.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Li,this.addControl(this.zoomControl))});var Si=ki.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=lt("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",e),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=lt("div",e,i)),t.imperial&&(this._iScale=lt("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,r=3.2808399*t;r>5280?(e=r/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(r),this._updateScale(this._iScale,n+" ft",n/r))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),Ci=ki.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=lt("div","leaflet-control-attribution"),Y(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});wi.mergeOptions({attributionControl:!0}),wi.addInitHook(function(){this.options.attributionControl&&(new Ci).addTo(this)}),ki.Layers=Ei,ki.Zoom=Li,ki.Scale=Si,ki.Attribution=Ci,Ti.layers=function(t,e,i){return new Ei(t,e,i)},Ti.zoom=function(t){return new Li(t)},Ti.scale=function(t){return new Si(t)},Ti.attribution=function(t){return new Ci(t)};var Ai=y.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ai.addTo=function(t,e){return t.addHandler(e,this),this};var Pi,Ii={Events:le},Mi=Ge?"touchstart mousedown":"mousedown",zi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Ri={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Bi=ue.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(G(this._dragStartTarget,Mi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Bi._dragging===this&&this.finishDrag(),H(this._dragStartTarget,Mi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ft(this._element,"leaflet-zoom-anim")&&!(Bi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Bi._dragging=this,this._preventOutline&&Lt(this._element),Tt(),me(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t;this._startPoint=new b(e.clientX,e.clientY),G(document,Ri[t.type],this._onMove,this),G(document,zi[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new b(e.clientX,e.clientY).subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(Q(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=kt(this._element).subtract(i),dt(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),dt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,g(this._animRequest),this._lastEvent=t,this._animRequest=_(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),wt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){mt(document.body,"leaflet-dragging"),this._lastTarget&&(mt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in Ri)H(document,Ri[t],this._onMove,this),H(document,zi[t],this._onUp,this);Et(),_e(),this._moved&&this._moving&&(g(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Bi._dragging=!1}}),Oi=(Object.freeze||Object)({simplify:Ct,pointToSegmentDistance:At,closestPointOnSegment:function(t,e,i){return Dt(t,e,i)},clipSegment:zt,_getEdgeIntersection:Rt,_getBitCode:Bt,_sqClosestPointOnSegment:Dt,isFlat:Nt,_flat:Ft}),Di=(Object.freeze||Object)({clipPolygon:jt}),Ni={project:function(t){return new b(t.lng,t.lat)},unproject:function(t){return new S(t.y,t.x)},bounds:new w([-180,-90],[180,90])},Fi={R:6378137,R_MINOR:6356752.314245179,bounds:new w([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=o*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);return n=-i*Math.log(Math.max(s,1e-10)),new b(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/n),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new S(s*i,t.x*i/n)}},ji=(Object.freeze||Object)({LonLat:Ni,Mercator:Fi,SphericalMercator:fe}),Ui=e({},pe,{code:"EPSG:3395",projection:Fi,transformation:function(){var t=.5/(Math.PI*Fi.R);return P(t,.5,-t,.5)}()}),Vi=e({},pe,{code:"EPSG:4326",projection:Ni,transformation:P(1/180,1,-1/180,.5)}),Zi=e({},he,{projection:Ni,transformation:P(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});he.Earth=pe,he.EPSG3395=Ui,he.EPSG3857=ye,he.EPSG900913=ve,he.EPSG4326=Vi,he.Simple=Zi;var qi=ue.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});wi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=n(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=n(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?ie(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=n(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var r=this._zoomBoundLayers[n].options;t=void 0===r.minZoom?t:Math.min(t,r.minZoom),e=void 0===r.maxZoom?e:Math.max(e,r.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Gi=qi.extend({initialize:function(t,e){c(this,e),this._layers={};var i,n;if(t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)}}),Hi=Gi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Gi.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Gi.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new T;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Wi=y.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var r=x(n),o=x("shadow"===e&&i.shadowAnchor||i.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return Ke&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ki=Wi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ki.imagePath||(Ki.imagePath=this._detectIconPath()),(this.options.imagePath||Ki.imagePath)+Wi.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=lt("div","leaflet-default-icon-path",document.body),e=st(t,"background-image")||st(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ji=Ai.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Bi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),dt(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&mt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=L.DomUtil.getPosition(e._icon),a=i.getPixelBounds(),s=i.getPixelOrigin(),l=k(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(o)){var u=x((Math.max(l.max.x,o.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),L.DomUtil.setPosition(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=_(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(g(this._panRequest),this._panRequest=_(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=kt(e._icon),r=e._map.layerPointToLatLng(n);i&&wt(i,n),e._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){g(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Xi=qi.extend({options:{icon:new Ki,interactive:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,e){c(this,e),this._latlng=C(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=C(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),dt(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var r=t.icon.createShadow(this._shadow),o=!1;r!==this._shadow&&(this._removeShadow(),o=!0),r&&(dt(r,e),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&o&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ut(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ut(this._shadow),this._shadow=null},_setPos:function(t){wt(this._icon,t),this._shadow&&wt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(dt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ji)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ji(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;yt(this._icon,t),this._shadow&&yt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Yi=qi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return c(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Qi=Yi.extend({options:{fill:!0,radius:10},initialize:function(t,e){c(this,e),this._latlng=C(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=C(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Yi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new w(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),$i=Qi.extend({initialize:function(t,i,n){if("number"==typeof i&&(i=e({},n,{radius:i})),c(this,i),this._latlng=C(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new T(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Yi.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===pe.distance){var r=Math.PI/180,o=this._mRadius/pe.R/r,a=i.project([e+o,t]),s=i.project([e-o,t]),l=a.add(s).divideBy(2),u=i.unproject(l).lat,c=Math.acos((Math.cos(o*r)-Math.sin(e*r)*Math.sin(u*r))/(Math.cos(e*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([u,t-c]).x,this._radiusY=l.y-a.y}else{var h=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(h).x}this._updateBounds()}}),tn=Yi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){c(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,r=null,o=Dt,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var h=o(t,e=l[u-1],i=l[u],!0);h<n&&(n=h,r=o(t,e,i))}return r&&(r.distance=Math.sqrt(n)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,o,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;t<l-1;t++)if(r=s[t],o=s[t+1],i=r.distanceTo(o),(n+=i)>e)return a=(n-e)/i,this._map.layerPointToLatLng([o.x-a*(o.x-r.x),o.y-a*(o.y-r.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=C(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Nt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Nt(t),n=0,r=t.length;n<r;n++)i?(e[n]=C(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new w;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new b(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,r,o=t[0]instanceof S,a=t.length;if(o){for(r=[],n=0;n<a;n++)r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n]);e.push(r)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,r,o,a,s,l=this._parts;for(e=0,n=0,r=this._rings.length;e<r;e++)for(i=0,o=(s=this._rings[e]).length;i<o-1;i++)(a=zt(s[i],s[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===s[i+1]&&i!==o-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=Ct(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,r,o,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,r=(a=(s=this._parts[i]).length)-1;n<a;r=n++)if((e||0!==n)&&At(t,s[r],s[n])<=l)return!0;return!1}});tn._flat=Ft;var en=tn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,o,a,s,l,u=this._rings[0],c=u.length;if(!c)return null;for(o=a=s=0,t=0,e=c-1;t<c;e=t++)i=u[t],n=u[e],r=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*r,s+=(i.y+n.y)*r,o+=3*r;return l=0===o?u[0]:[a/o,s/o],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=tn.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof S&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){tn.prototype._setLatLngs.call(this,t),Nt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Nt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new b(e,e);if(t=new w(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,r=0,o=this._rings.length;r<o;r++)(n=jt(this._rings[r],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,r,o,a,s,l,u=!1;if(!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;r<s;r++)for(o=0,a=(l=(e=this._parts[r]).length)-1;o<l;a=o++)i=e[o],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||tn.prototype._containsPoint.call(this,t,!0)}}),nn=Hi.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,r=ie(t)?t:t.features;if(r){for(e=0,i=r.length;e<i;e++)((n=r[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=Ut(t,o);return a?(a.feature=Wt(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),rn={toGeoJSON:function(t){return Ht(this,{type:"Point",coordinates:qt(this.getLatLng(),t)})}};Xi.include(rn),$i.include(rn),Qi.include(rn),tn.include({toGeoJSON:function(t){var e=!Nt(this._latlngs),i=Gt(this._latlngs,e?1:0,!1,t);return Ht(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),en.include({toGeoJSON:function(t){var e=!Nt(this._latlngs),i=e&&!Nt(this._latlngs[0]),n=Gt(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ht(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Gi.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ht(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(i)n.push(r.geometry);else{var o=Wt(r);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i?Ht(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var on=Kt,an=qi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=E(e),c(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(dt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ht(this._image),this},bringToBack:function(){return this._map&&pt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=E(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:lt("img");dt(e,"leaflet-image-layer"),this._zoomAnimated&&dt(e,"leaflet-zoom-animated"),this.options.className&&dt(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),this.options.crossOrigin&&(e.crossOrigin=""),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;xt(this._image,i,e)},_reset:function(){var t=this._image,e=new w(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();wt(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){yt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),sn=an.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:lt("video");if(dt(e,"leaflet-image-layer"),this._zoomAnimated&&dt(e,"leaflet-zoom-animated"),e.onselectstart=a,e.onmousemove=a,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),r=[],o=0;o<n.length;o++)r.push(n[o].src);this._url=n.length>0?r:[e.src]}else{ie(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var l=lt("source");l.src=this._url[s],e.appendChild(l)}}}}),ln=qi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){c(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&yt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&yt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(yt(this._container,0),this._removeTimeout=setTimeout(i(ut,void 0,this._container),200)):ut(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=C(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ht(this._container),this},bringToBack:function(){return this._map&&pt(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=x(this.options.offset),i=this._getAnchor();this._zoomAnimated?wt(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}}),un=ln.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){ln.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Yi||this._source.on("preclick",J))},onRemove:function(t){ln.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Yi||this._source.off("preclick",J))},getEvents:function(){var t=ln.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=lt("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=lt("div",t+"-content-wrapper",e);if(this._contentNode=lt("div",t+"-content",i),Y(i),X(this._contentNode),G(i,"contextmenu",J),this._tipContainer=lt("div",t+"-tip-container",e),this._tip=lt("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=lt("a",t+"-close-button",e);n.href="#close",n.innerHTML="&#215;",G(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,r=this.options.maxHeight;r&&n>r?(e.height=r+"px",dt(t,"leaflet-popup-scrolled")):mt(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();wt(this._container,e.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(st(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,r=new b(this._containerLeft,-i-this._containerBottom);r._add(kt(this._container));var o=t.layerPointToContainerPoint(r),a=x(this.options.autoPanPadding),s=x(this.options.autoPanPaddingTopLeft||a),l=x(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;o.x+n+l.x>u.x&&(c=o.x+n-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+i+l.y>u.y&&(h=o.y+i-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),$(t)},_getAnchor:function(){return x(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});wi.mergeOptions({closePopupOnClick:!0}),wi.include({openPopup:function(t,e,i){return t instanceof un||(t=new un(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),qi.include({bindPopup:function(t,e){return t instanceof un?(c(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new un(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof qi||(e=t,t=this),t instanceof Hi)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&($(t),e instanceof Yi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var cn=ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ln.prototype.getEvents.call(this);return Ge&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=lt("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),r=e.layerPointToContainerPoint(t),o=this.options.direction,a=i.offsetWidth,s=i.offsetHeight,l=x(this.options.offset),u=this._getAnchor();"top"===o?t=t.add(x(-a/2+l.x,-s+l.y+u.y,!0)):"bottom"===o?t=t.subtract(x(a/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(x(a/2+l.x,s/2-u.y+l.y,!0)):"right"===o||"auto"===o&&r.x<n.x?(o="right",t=t.add(x(l.x+u.x,u.y-s/2+l.y,!0))):(o="left",t=t.subtract(x(a+u.x-l.x,s/2-u.y-l.y,!0))),mt(i,"leaflet-tooltip-right"),mt(i,"leaflet-tooltip-left"),mt(i,"leaflet-tooltip-top"),mt(i,"leaflet-tooltip-bottom"),dt(i,"leaflet-tooltip-"+o),wt(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&yt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return x(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});wi.include({openTooltip:function(t,e,i){return t instanceof cn||(t=new cn(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),qi.include({bindTooltip:function(t,e){return t instanceof cn?(c(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new cn(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),Ge&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof qi||(e=t,t=this),t instanceof Hi)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(dt(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(mt(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var hn=Wi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=x(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Wi.Default=Ki;var pn=qi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:je,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){c(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ut(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ht(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(pt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof b?t:new b(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),r=0,o=i.length;r<o;r++)e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!we){yt(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var r=this._tiles[n];if(r.current&&r.loaded){var o=Math.min(1,(t-r.loaded)/200);yt(r.el,o),o<1?e=!0:(r.active?i=!0:this._onOpaqueTile(r),r.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(g(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=lt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ut(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],r=this._map;return n||((n=this._levels[t]={}).el=lt("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,r.getCenter(),r.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ut(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var r=Math.floor(t/2),o=Math.floor(e/2),a=i-1,s=new b(+r,+o);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>n&&this._retainParent(r,o,a,n))},_retainChildren:function(t,e,i,n){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new b(r,o);a.z=i+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(r,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var r=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom)&&(r=void 0);var o=this.options.updateWhenZooming&&r!==this._tileZoom;n&&!o||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),r=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Fe?xt(t.el,r,n):wt(t.el,r)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),r=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new w(r.subtract(o),r.add(o))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(n),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new w(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new b(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var h=r.min.y;h<=r.max.y;h++)for(var p=r.min.x;p<=r.max.x;p++){var f=new b(p,h);if(f.z=this._tileZoom,this._isValidTile(f)){var d=this._tiles[this._tileCoordsToKey(f)];d?d.current=!0:a.push(f)}}if(a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return E(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i);return[e.unproject(n,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new T(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new b(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(Ce||e.el.setAttribute("src",ne),ut(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){dt(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,we&&this.options.opacity<1&&yt(t,this.options.opacity),Ee&&!Le&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&_(i(this._tileReady,this,t,null,o)),wt(o,n),this._tiles[r]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){if(this._map){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(yt(n.el,0),g(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(dt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),we||!this._map._fadeAnimated?_(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new b(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new w(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),fn=pn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&Ke&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),Ee||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return G(n,"load",i(this._tileOnLoad,this,e,n)),G(n,"error",i(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var i={r:Ke?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:t.z?t.z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=n),i["-y"]=n}return p(this._url,e(i,this.options))},_tileOnLoad:function(t,e){we?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=ne,ut(e),delete this._tiles[t]))}}),dn=fn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var n=e({},this.defaultWmsParams);for(var r in i)r in this.options||(n[r]=i[r]);var o=(i=c(this,i)).detectRetina&&Ke?2:1,a=this.getTileSize();n.width=a.x*o,n.height=a.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,fn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=k(i.project(e[0]),i.project(e[1])),r=n.min,o=n.max,a=(this._wmsVersion>=1.3&&this._crs===Vi?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=L.TileLayer.prototype.getTileUrl.call(this,t);return s+h(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});fn.WMS=dn,Jt.wms=function(t,e){return new dn(t,e)};var mn=qi.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&dt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=kt(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),s=r.multiplyBy(-i).add(n).add(r).subtract(a);Fe?xt(this._container,s,i):wt(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new w(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),_n=mn.extend({getEvents:function(){var t=mn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){mn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");G(t,"mousemove",r(this._onMouseMove,32,this),this),G(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),G(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,ut(this._container),H(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t in this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},mn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Ke?2:1;wt(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Ke&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){mn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[L.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,i=t.options.dashArray.split(","),n=[];for(e=0;e<i.length;e++)n.push(Number(i[e]));t.options._dashArray=n}},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||_(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new w,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,r,o,a=t._parts,s=a.length,l=this._ctx;if(s){for(this._drawnLayers[t._leaflet_id]=t,l.beginPath(),i=0;i<s;i++){for(n=0,r=a[i].length;n<r;n++)o=a[i][n],l[n?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||n)/n;this._drawnLayers[t._leaflet_id]=t,1!==r&&(i.save(),i.scale(1,r)),i.beginPath(),i.arc(e.x,e.y/r,n,0,2*Math.PI,!1),1!==r&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),r=this._drawFirst;r;r=r.next)(e=r.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(it(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(mt(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(dt(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order,i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))},_bringToBack:function(t){var e=t._order,i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}),gn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),yn={_initContainer:function(){this._container=lt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(mn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=gn("shape");dt(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=gn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ut(e),t.removeInteractiveTarget(e),delete this._layers[n(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(e||(e=t._stroke=gn("stroke")),r.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=ie(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(r.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=gn("fill")),r.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ht(t._container)},_bringToBack:function(t){pt(t._container)}},vn=Ye?gn:I,bn=mn.extend({getEvents:function(){var t=mn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=vn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=vn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),H(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){mn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),wt(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=vn("path");t.options.className&&dt(e,t.options.className),t.options.interactive&&dt(e,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ut(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,M(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ht(t._path)},_bringToBack:function(t){pt(t._path)}});Ye&&bn.include(yn),wi.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&Xt()||Yt()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=bn&&Yt({pane:t})||_n&&Xt({pane:t}),this._paneRenderers[t]=e),e}});var xn=en.extend({initialize:function(t,e){en.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=E(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});bn.create=vn,bn.pointsToPath=M,nn.geometryToLayer=Ut,nn.coordsToLatLng=Vt,nn.coordsToLatLngs=Zt,nn.latLngToCoords=qt,nn.latLngsToCoords=Gt,nn.getFeature=Ht,nn.asFeature=Wt,wi.mergeOptions({boxZoom:!0});var wn=Ai.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){G(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){H(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),me(),Tt(),this._startPoint=this._map.mouseEventToContainerPoint(t),G(document,{contextmenu:$,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=lt("div","leaflet-zoom-box",this._container),dt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new w(this._point,this._startPoint),i=e.getSize();wt(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ut(this._box),mt(this._container,"leaflet-crosshair")),_e(),Et(),H(document,{contextmenu:$,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});wi.addInitHook("addHandler","boxZoom",wn),wi.mergeOptions({doubleClickZoom:!0});var kn=Ai.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,r=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});wi.addInitHook("addHandler","doubleClickZoom",kn),wi.mergeOptions({dragging:!0,inertia:!Le,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Tn=Ai.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Bi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}dt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){mt(this._map._container,"leaflet-grab"),mt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=E(this._map.options.maxBounds);this._offsetLimit=k(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,r=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,a=Math.abs(r+i)<Math.abs(o+i)?r:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,s=r.multiplyBy(a/o),l=s.distanceTo([0,0]),u=Math.min(i.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),h=u/(i.inertiaDeceleration*a),p=c.multiplyBy(-h/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),_(function(){e.panBy(p,{duration:h,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});wi.addInitHook("addHandler","dragging",Tn),wi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var En=Ai.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),G(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),H(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},r=this.keyCodes;for(e=0,i=r.left.length;e<i;e++)n[r.left[e]]=[-1*t,0];for(e=0,i=r.right.length;e<i;e++)n[r.right[e]]=[t,0];for(e=0,i=r.down.length;e<i;e++)n[r.down[e]]=[0,t];for(e=0,i=r.up.length;e<i;e++)n[r.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},r=this.keyCodes;for(e=0,i=r.zoomIn.length;e<i;e++)n[r.zoomIn[e]]=t;for(e=0,i=r.zoomOut.length;e<i;e++)n[r.zoomOut[e]]=-t},_addHooks:function(){G(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){H(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;e=this._panKeys[i],t.shiftKey&&(e=x(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}$(t)}}});wi.addInitHook("addHandler","keyboard",En),wi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ln=Ai.extend({addHooks:function(){G(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){H(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=et(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),$(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(r/i)*i:r,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});wi.addInitHook("addHandler","scrollWheelZoom",Ln),wi.mergeOptions({tap:!0,tapTolerance:15});var Sn=Ai.extend({addHooks:function(){G(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){H(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Q(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new b(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&dt(n,"leaflet-active"),this._holdTimeout=setTimeout(i(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),G(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),H(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&mt(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new b(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});Ge&&!qe&&wi.addInitHook("addHandler","tap",Sn),wi.mergeOptions({touchZoom:Ge&&!Le,bounceAtZoomLimits:!0});var Cn=Ai.extend({addHooks:function(){dt(this._map._container,"leaflet-touch-zoom"),G(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),H(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),G(document,"touchmove",this._onTouchMove,this),G(document,"touchend",this._onTouchEnd,this),Q(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),g(this._animRequest);var s=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=_(s,this,!0),Q(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),H(document,"touchmove",this._onTouchMove),H(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});wi.addInitHook("addHandler","touchZoom",Cn),wi.BoxZoom=wn,wi.DoubleClickZoom=kn,wi.Drag=Tn,wi.Keyboard=En,wi.ScrollWheelZoom=Ln,wi.Tap=Sn,wi.TouchZoom=Cn;var An=window.L;window.L=t,Object.freeze=Qt,t.version="1.3.0",t.noConflict=function(){return window.L=An,this},t.Control=ki,t.control=Ti,t.Browser=Qe,t.Evented=ue,t.Mixin=Ii,t.Util=se,t.Class=y,t.Handler=Ai,t.extend=e,t.bind=i,t.stamp=n,t.setOptions=c,t.DomEvent=fi,t.DomUtil=bi,t.PosAnimation=xi,t.Draggable=Bi,t.LineUtil=Oi,t.PolyUtil=Di,t.Point=b,t.point=x,t.Bounds=w,t.bounds=k,t.Transformation=A,t.transformation=P,t.Projection=ji,t.LatLng=S,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=E,t.CRS=he,t.GeoJSON=nn,t.geoJSON=Kt,t.geoJson=on,t.Layer=qi,t.LayerGroup=Gi,t.layerGroup=function(t,e){return new Gi(t,e)},t.FeatureGroup=Hi,t.featureGroup=function(t){return new Hi(t)},t.ImageOverlay=an,t.imageOverlay=function(t,e,i){return new an(t,e,i)},t.VideoOverlay=sn,t.videoOverlay=function(t,e,i){return new sn(t,e,i)},t.DivOverlay=ln,t.Popup=un,t.popup=function(t,e){return new un(t,e)},t.Tooltip=cn,t.tooltip=function(t,e){return new cn(t,e)},t.Icon=Wi,t.icon=function(t){return new Wi(t)},t.DivIcon=hn,t.divIcon=function(t){return new hn(t)},t.Marker=Xi,t.marker=function(t,e){return new Xi(t,e)},t.TileLayer=fn,t.tileLayer=Jt,t.GridLayer=pn,t.gridLayer=function(t){return new pn(t)},t.SVG=bn,t.svg=Yt,t.Renderer=mn,t.Canvas=_n,t.canvas=Xt,t.Path=Yi,t.CircleMarker=Qi,t.circleMarker=function(t,e){return new Qi(t,e)},t.Circle=$i,t.circle=function(t,e,i){return new $i(t,e,i)},t.Polyline=tn,t.polyline=function(t,e){return new tn(t,e)},t.Polygon=en,t.polygon=function(t,e){return new en(t,e)},t.Rectangle=xn,t.rectangle=function(t,e){return new xn(t,e)},t.Map=wi,t.map=function(t,e){return new wi(t,e)}})},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(57),i(33),i(0)],void 0!==(r=function(t,e,i){function n(t){return/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/.test(t.toString())}function r(t,e,i){if(-1===e.indexOf(t))throw new TypeError(i);return t}function a(t){return t.hasOwnProperty("minLon")&&t.hasOwnProperty("maxLon")&&t.hasOwnProperty("minLat")&&t.hasOwnProperty("maxLat")}function s(t){return parseFloat(t.maxLat)<=parseFloat(t.minLat)||parseFloat(t.maxLon)<=parseFloat(t.minLon)}function l(t){return!isFinite(t)||t%1!==0}function u(t,e,i){return l(t)||t<=e||t>i}function c(t,e,i){return!isFinite(t)||t<e||t>i}function h(t){return t.constructor.toString().indexOf("Array")<0}function p(t,e){if(t)throw new TypeError(e)}function f(t){if(!i.isString(t)||!i.pointRegex.test(t))throw new TypeError("A point is expected, but "+t+" ["+("undefined"===typeof value?"undefined":o(value))+"] given");return!0}function d(t){var e=parseFloat(t);if(c(e,-180,180))throw new TypeError("an longitude <-180,180> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e}function m(t){var e=parseFloat(t);if(c(e,-90,90))throw new TypeError("an latitude <-90,90> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e}function _(t){var e,i;if(Array.isArray(t)){if(2!==t.length||2!==t.filter(isFinite).length)throw new TypeError("Ivalid point array in route points");e=t[0],i=t[1]}else{if(!isFinite(t.lat)||!isFinite(t.lon)&&!isFinite(t.lng))throw new TypeError("Ivalid point object in route points");e=t.lat,i="undefined"!==typeof t.lon?t.lon:t.lng}if(!("number"===typeof e||e instanceof Number)||!("number"===typeof i||i instanceof Number))throw new TypeError("Lat and lon components of point should be finite numbers");d(i),m(e)}var g=["LimitedAccess","Arterial","Terminal","Ramp","Rotary","LocalStreet"],y=["ar","af-ZA","bg-BG","zh-TW","cs-CZ","da-DK","nl-NL","en-GB","en-US","fi-FI","fr-FR","de-DE","el-GR","hu-HU","id-ID","it-IT","ko-KR","lt-LT","ms-MY","nb-NO","pl-PL","pt-BR","pt-PT","ru-RU","sk-SK","sl-SI","es-ES","es-MX","sv-SE","th-TH","tr-TR"],v=["ca","cs","da","de","en","es","fi","fr","hu","it","nl","no","pl","pt","sk","sv","tr"],b=["af-ZA","ar","bg-BG","ca-ES","zh-CN","zh-TW","cs-CZ","da-DK","nl-BE","nl-NL","en-AU","en-NZ","en-GB","en-US","et-EE","fi-FI","fr-CA","fr-FR","de-DE","el-GR","hr-HR","hu-HU","it-IT","lv-LV","lt-LT","ms-MY","no-NO","pl-PL","pt-BR","pt-PT","ru-RU","sk-SK","sl-SI","es-ES","es-419","sv-SE","tr-TR","eu-ES","gl-ES","he-IL","id-ID","kk-KZ","ro-RO","sr-RS","th-TH","uk-UA","vi-VN"];return{bool:function(t){return"false"!==t&&Boolean(t)},number:function(t){var e=parseFloat(t);if(!isFinite(e))throw new TypeError("a number is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},naturalInteger:function(t){var e=parseFloat(t);if(l(e)||e<0)throw new TypeError("a natural integer (greater than or equal 0) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},positiveInteger:function(t){var e=parseFloat(t);if(l(e)||e<=0)throw new TypeError("a positive integer (greater than 0) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},integer:function(t){var e=parseFloat(t);if(l(e))throw new TypeError("an integer is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},longitude:d,latitude:m,boundingBox:function(t){return p(!a(t),"a bounding box is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),p(c(t.minLat,-90,90),"a bounding box minimal latitude is expected "+t.minLat+" ["+o(t.minLat)+"] given"),p(c(t.maxLat,-90,90),"a bounding box maximal latitude is expected "+t.maxLat+" ["+o(t.maxLat)+"] given"),p(c(t.minLon,-270,180),"a bounding box minimal longitude is expected "+t.minLon+" ["+o(t.minLon)+"] given"),p(c(t.maxLon,-180,270),"a bounding box maximal longitude is expected "+t.maxLon+" ["+o(t.maxLon)+"] given"),p(s(t),"a bounding box expected but max <= min"),t},numberInInterval:function(t,e){if(2!==arguments.length)throw new TypeError("Number in interval validator requires min and max value parameters");return function(i){var n=parseFloat(i);if(c(n,t,e))throw new TypeError("a number in interval <"+t+", "+e+"> is expected, but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given");return n}},integerInInterval:function(t,e){if(2!==arguments.length)throw new TypeError("Number in interval validator requires min and max value parameters");return function(i){var n=parseFloat(i);if(u(n,t,e))throw new TypeError("an integer in interval <"+(t+1)+", "+e+"> is expected, but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given");return n}},string:function(t){if(!i.isString(t))throw new TypeError("a string is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},geometriesZoom:function(t){var e=parseFloat(t);if(c(t,0,22))throw new TypeError("an geometies zoom <0, 22> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},zoomLevel:function(t){var e=parseFloat(t);if(c(e,0,18))throw new TypeError("an zoom level <0, 18> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},functionType:function(t){if("function"!==typeof t)throw new TypeError("a function is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},countryCode:function(t){if(!i.isString(t)||3!==t.length&&2!==t.length)throw new TypeError("a 2 or 3-characters long country name is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},languageCode:function(t){if(!i.isString(t)||b.indexOf(t)<0)throw new TypeError("One of pre-defined language codes was expected: "+b+", but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},countrySet:function(t){var e;return p(!i.isString(t)&&h(t),"An array of string country names or string (divided with commas) of country names (two or three-characters long) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e=i.isString(t)?t:t.join(),p(!e.match(/^([a-zA-z]{2,3},)*[a-zA-z]{2,3}$/),"An array of string country names or string (divided with commas) of country names (two or three-characters long) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e},countrySetAlpha3:function(t,e){var n;return p(!i.isString(e)&&h(e),"An array of string country names or string (divided with commas) of country names (three-characters long) is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given"),n=i.isString(e)?e:e.join(),t&&""===n?e:(p(!n.match(/^([a-zA-z]{3},)*[a-zA-z]{3}$/),"An array of string country names or string (divided with commas) of country names (three-characters long) is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given"),e)},point:function(t){return f(t),t},fuzzinessLevel:function(t){var e=parseFloat(t);if(u(e,0,4))throw new TypeError("Fuzziness level value (a positive integer lower than 5) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},limit:function(t){var e=parseFloat(t);if(u(e,0,100))throw new TypeError("Limit value (a positive integer lower than 100) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},offset:function(t){var e=parseFloat(t);if(u(e,-1,1900))throw new TypeError("Offset an integer value <0, 1900> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},plainObject:function(t){if("object"!==("undefined"===typeof t?"undefined":o(t))||t.constructor!==Object)throw new TypeError("an object is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},arrayType:function(t){if(h(t))throw new TypeError("an array is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},arrayOf:function(t){return function(e){return e.forEach(function(e){var i;for(i in t)if(t.hasOwnProperty(i)&&(e.hasOwnProperty(i)&&"function"===typeof t[i].validator&&(e[i]=t[i].validator(e[i])),!0===t[i].required&&!e.hasOwnProperty(i)))throw new Error("Missing required "+i)}),e}},objectOf:function(t){return function(e){var i;for(i in t)if(t.hasOwnProperty(i)&&(e.hasOwnProperty(i)&&"function"===typeof t[i].validator&&(e[i]=t[i].validator(e[i])),!0===t[i].required&&!e.hasOwnProperty(i)))throw new Error("Missing required "+i);return e}},roadUse:function(t){var e,n;for(p(!i.isString(t)||!t.match(/^\[("\w*",?)+\]$/),"Road use is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e=t.replace(/["[\]]/g,"").split(","),n=0;n<e.length;n+=1)p(g.indexOf(e[n])<0,"Road use ("+g+") is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},oneOfValue:function(t,e){return function(i){var n="Supported "+e+" is expected (one of: "+t+"), but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given";return r(i,t,n)}},arrayOfValues:function(t,e){return function(i){var n,a="Supported "+e+" type is expected (array with one of: "+t+"), but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given";if(h(i))throw new TypeError("an array is expected, but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given");for(n=0;n<i.length;n+=1)r(i[n],t,a);return i}},departAt:function(t){if("now"===t||n(t)&&Date.now()<Date.parse(t))return t;throw new TypeError("Supported departAt is now or rfc3339 format and no earlier than now(), but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given")},arriveAt:function(t){if(n(t)&&Date.now()<Date.parse(t))return t;throw new TypeError("Supported arriveAt is rfc3339 format, but and no earlier than now() "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given")},dateRfc3339:function(t){if(n(t))return t;throw new TypeError("Expecting date in RFC3339 format, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given")},routingGuidanceLanguage:function(t){var e="Supported routing guidance language is expected to be one of: "+y+"), but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given";return r(t,y,e)},trafficIncidentsLanguage:function(t){var e="Supported traffic incidents language is expected to be one of: "+v+"), but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given";return r(t,v,e)},routingLocations:function(t){var e,n=i.pointRegex,r=i.circleRegex;if(t.constructor.toString().indexOf("Array")>-1&&(t=t.join(":")),e=new RegExp("^"+n.source+":(?:(?:"+n.source+"|"+r.source+"):)*"+n.source+"$"),!t.match(e))throw new TypeError("Routing location is expected. But "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},circle:function(t){var e;return p(!i.isString(t),"Expecting circle but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e=t.match(/circle\(-?\d*(?:\.\d*)?\s*,\s*-?\d*(?:\.\d*)?\s*,\s*(\d+)\)/),p(!e||parseFloat(e[1])>2005e4,"Expecting circle but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),t},geometryList:function(t){var e,i;if(p(h(t),"An array of geometry objects is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),!(t.length>0))throw new TypeError("An array of geometry objects is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");for(e=0;e<t.length;e+=1)i=t[e],p(!i.hasOwnProperty("type")||!i.hasOwnProperty("vertices")&&(!i.hasOwnProperty("position")||!i.hasOwnProperty("radius")),"An array of geometry objects is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},locale:function(e){return function(i){return p(!t(i,e),'Provided language code "'+i+'" is not valid for a given service type: "'+e+'"'),i}},geopolView:function(t,i){if(!t)throw new Error("Please specify a service type.");return function(n){return p(-1===e.getSupportedViews(t,"all").map(function(t){return t.code}).indexOf(n),i+': Provided geopolitical view code "'+n+'" is not valid'),n}},route:function(t){var e;if("undefined"===typeof t.points)throw new TypeError("Invalid structure of the route object");if((e=t.points)&&!(Array.isArray(e)&&e.length>2))throw new TypeError("Provided route array "+e+" is not valid. It should be an array with at least 2 points.");return e.forEach(_),t},supportingPoints:function(t){if(!i.isArray(t))throw new TypeError("Invalid structure of the supporting points");if(!t.length||t.length<2)throw new TypeError("There should be at least two supporting points");return t}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(21),i(109),i(26),i(8),i(53),i(122),i(125),i(135),i(136),i(138),i(139),i(69),i(39),i(38),i(37),i(30),i(29),i(33),i(32),i(70),i(0),i(76),i(143)],void 0!==(r=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f,d,m,_,g,y,v,b,x,w){function k(t,e){"raster"===e&&t.setZoom(Math.floor(t.getZoom()))}function T(t){var e,i,n=/^(raster|vector)$/,r=t.length,o=[];for(i=0;i<r;i++)e=String(t[i]).toLowerCase(),n.test(t[i])&&o.push(e);return o}function E(t){var e=t.options.source||["raster"],i=["raster"];return x.isString(e)&&(e=[e]),e=T(e),e.length>0?e:i}function L(){return window.navigator.userAgent.indexOf("MSIE ")>-1}function S(t){t.options.traffic&&t.addLayer(s(t.options.traffic))}function C(t){t.options.trafficFlow&&t.addLayer(l(t.options.trafficFlow)),t.options.vectorTrafficFlow&&(t.options.vectorTrafficFlow.basePath||(t.options.vectorTrafficFlow.basePath=t.options.basePath),t.addLayer(u(t.options.vectorTrafficFlow)))}function A(e){var i,r,o=E(e);e._ttLabelsLayers={},-1===o.indexOf("raster")||e.options.noLabelsOnTop||L()||(i=c(e.options),i.registerEventHandlers(e),t.stamp(i),e._ttLabelsLayers.raster=i),-1!==o.indexOf("vector")&&!e.options.noLabelsOnTop&&n.isMapboxSet()&&(r=new h(e.options),r.registerEventHandlers(e),t.stamp(r),e._ttLabelsLayers.vector=r)}function P(t){"MacIntel"===navigator.platform&&t._handlers.filter(function(t){return"_performZoom"in t}).forEach(function(t){var e=t._performZoom;t._performZoom=function(){t._delta*=13.25,e.apply(t)}})}function I(e){var i=t.DomUtil.create("div","tomtom-webgl-error");i.appendChild(document.createTextNode("Unable to initialize vector layer - browser doesn't support WebGL!")),e._controlContainer&&e._controlContainer.appendChild(i)}function M(){var t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");return!!(e&&e instanceof WebGLRenderingContext)}function z(t){var e=/^(error|raster)$/,i=E(t),r=t.options.vector?String(t.options.vector.fallback).toLowerCase():"";if(r=e.test(r)?r:"error",!(-1===i.indexOf("vector")||n.isMapboxSupported()&&M()))switch(r){case"raster":t.options.source=["raster"];break;case"error":if(M())throw new Error("MapBox failed to load. Make sure you're using vector library.");throw I(t),new Error("Unable to initialize vector layer - browser doesn't support WebGL!");default:throw new Error("Something went wrong with vectorFallback!")}}function R(t,e){var i;return t.options.geopolView?(i=x.clone(t.options),i.geopolView=t._geopolViewService.getCurrentGeopolView().getValueFor("maps",e),i):t.options}function B(e){var i,n=this,r=n._ttBaseLayers?n._ttBaseLayers[e]:void 0;r&&(i="vector"===e?new f(R(n,"vector")):new t.TomTomLayer(R(n,"raster")),t.stamp(i),n._ttBaseLayers[e]=i,w.findLayersByName(e,n).length>0&&(n.addLayer(i),n.removeLayer(r)))}function O(t){this.options.language=t.getValueFor("maps"),B.call(this,"vector"),B.call(this,"raster")}function D(t){this.options.geopolView=t.getCode(),B.call(this,"vector"),B.call(this,"raster")}function N(e){var i,r=E(e),o=[];for(e._ttBaseLayers={},-1!==r.indexOf("raster")&&(e._ttBaseLayers.raster=p(R(e,"raster")),t.stamp(e._ttBaseLayers.raster)),n.tryToSetMapbox()&&-1!==r.indexOf("vector")&&(e._ttBaseLayers.vector=new f(R(e,"vector")),t.stamp(e._ttBaseLayers.vector)),i=0;i<e.options.layers.length;i++)e.options.layers[i].wmsParams&&o.push(t.tileLayer.wms(e.options.layers[i]._url,e.options.layers[i].wmsParams));if(!o.length)switch(r[0]){case"vector":if(void 0===e._ttBaseLayers.vector)throw new Error("Can not add vector layer. Mapbox-gl-js dependency not met.");o=[e._ttBaseLayers.vector];break;case"raster":o=[e._ttBaseLayers.raster];break;default:throw new Error("Something went wrong with sources!")}e.options.layers=o}function F(t){isFinite(t.options.zoomDelta)&&(t.options.zoomDelta=parseFloat(t.options.zoomDelta)),isFinite(t.options.zoomSnap)&&(t.options.zoomSnap=parseFloat(t.options.zoomSnap)),isFinite(t.options.wheelPxPerZoomLevel)&&(t.options.wheelPxPerZoomLevel=parseInt(t.options.wheelPxPerZoomLevel,10))}function j(t){t._routingContext=new b}function U(t){t._localeService.cleanEvents(),t._geopolViewService.cleanEvents()}function V(t){t._unitService=new d(m)}function Z(e){e._localeService=new _(g),e._localeService.on(t.LocaleService.Events.LOCALE_CHANGED,O.bind(e)),e.options.language=e._localeService.getCurrentLocale().getLanguageCode()}function q(e){e._geopolViewService=new y(v),e._geopolViewService.on(t.GeopolViewService.Events.GEOPOL_VIEW_CHANGED,D.bind(e)),e.options.geopolView&&e._geopolViewService.setCurrentGeopolView(e.options.geopolView)}function G(){var e,n=this,s="";t.Icon.Default.imagePath=i.get(this),V(n),Z(n),q(n);try{z(n),r.setKey(n.options.key),F(n),N(n),A(n),C(n),S(n),j(n),P(n),void 0===n.getZoom()&&n.setView([0,0],2),n.options.maxBounds||n.setMaxBounds(t.latLngBounds([[-90,-18e3],[90,18e3]])),o().go(function(i){n.attributionControl&&(e=n.attributionControl.addAttribution,n.attributionControl.addAttribution=function(){e.apply(this,arguments),a.updateEventHandler(n)},s+='<a class="tomtomAttribution">',s+=i,s+="</a>",n.attributionControl.addAttribution(s),n.fire(t.Map.Events.ATTRIBUTION_LOAD_END,{data:s}))})}catch(t){throw console.error(t),U(n),t}}var H={ATTRIBUTION_LOAD_END:"tomtom.attributionloadend"};return t.Map.Events=H,t.Map.mergeOptions({worldCopyJump:!0}),delete t.Map.prototype.options.minZoom,delete t.Map.prototype.options.maxZoom,t.Map.prototype.setMapSource=function(t){var e,i,n,r;if(i=this,e=i._ttBaseLayers,n=e[t]){for(r in e)e.hasOwnProperty(r)&&this.removeLayer(e[r]);k(i,t),i.addLayer(n)}},t.Map.prototype.getBaseLayers=function(){return this._ttBaseLayers},t.Map.prototype.getLocaleService=function(){return this._localeService},t.Map.prototype.getUnitService=function(){return this._unitService},t.Map.prototype.getGeopolViewService=function(){return this._geopolViewService},t.Control.Attribution.prototype.options={position:"bottomleft",prefix:""},t.Icon.Default=e,t.Icon.Default.imagePath=i.get(),t.Marker.mergeOptions({icon:new t.Icon.Default}),t.Map.addInitHook(G),t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(0),i(31)],void 0!==(r=function(t,e){function i(t){return"function"===typeof t}function n(t){return!!t&&t.constructor.toString().indexOf("Array")>-1}function r(t){return t.hasOwnProperty("lat")&&(t.hasOwnProperty("lon")||t.hasOwnProperty("lng"))}function a(t,e){return void 0===t?e:t}function s(t){return t<0?-1:1}function l(t,e){if(t)throw new TypeError(e)}function u(t){var e,i=parseFloat(t);if(!isFinite(i))throw new TypeError("an number is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return i<-90||i>90?(e=Math.ceil(Math.abs(i)/180),i-180*s(i)*e):i}function c(t){var e,i=parseFloat(t);if(!isFinite(i))throw new TypeError("an number is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return i<-180||i>180?(e=Math.ceil(Math.abs(i)/360),i-360*s(i)*e):i}function h(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")}function p(t){return t.hasOwnProperty("latitude")&&t.hasOwnProperty("longitude")}function f(t){return i(t.lat)&&i(t.lng)}function d(e){var i;if(n(e)&&2===e.length)return e;if(t.isString(e))return i=e.match(t.pointRegex),l(!i||!i[1]||!i[2],"A point is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given"),[i[1],i[2]];if(f(e))return[e.lat(),e.lng()];if(r(e))return[e.lat,a(e.lon,e.lng)];if(h(e))return[e.y,e.x];if(p(e))return[e.latitude,e.longitude];throw new TypeError("A point is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given")}function m(t){return t.hasOwnProperty("minLon")&&t.hasOwnProperty("minLat")&&t.hasOwnProperty("maxLon")&&t.hasOwnProperty("maxLat")}function _(t){return t.hasOwnProperty("left")&&t.hasOwnProperty("bottom")&&t.hasOwnProperty("right")&&t.hasOwnProperty("top")}function g(t){return i(t.getWest)&&i(t.getEast)&&i(t.getSouth)&&i(t.getNorth)}function y(e){var r,a;if(m(e))return e;if(_(e))return{minLon:e.left,minLat:e.bottom,maxLon:e.right,maxLat:e.top};if(g(e))return{minLon:e.getWest(),minLat:e.getSouth(),maxLon:e.getEast(),maxLat:e.getNorth()};if(i(e.getNorthEast)&&i(e.getSouthWest))return a=d(e.getNorthEast()),r=d(e.getSouthWest()),{minLon:r[1],minLat:r[0],maxLon:a[1],maxLat:a[0]};if(n(e)&&4===e.length)return{minLon:e[0],minLat:e[1],maxLon:e[2],maxLat:e[3]};if(n(e)&&2===e.length)return r=d(e[0]),a=d(e[1]),{minLon:r[1],minLat:r[0],maxLon:a[1],maxLat:a[0]};if(t.isString(e)&&(e=e.trim().split(/\s*,\s*/),4===e.length))return{minLon:parseFloat(e[0]),minLat:parseFloat(e[1]),maxLon:parseFloat(e[2]),maxLat:parseFloat(e[3])};throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to bounding box")}function v(t){var e,i,n=t.minLon,r=t.maxLon,o=t.minLat,a=t.maxLat;return r-n>360?(r=180,n=-180):(r>270&&(e=Math.ceil(n/360),r-=360*e,n-=360*e),n<-270&&(i=Math.ceil(-r/360),r+=360*i,n+=360*i)),o=o<-90?-90:o,a=a>90?90:a,{minLon:n,minLat:o,maxLon:r,maxLat:a}}function b(e){var i,n,r,a=e.match(t.circleRegex);return l(!a||!a[1]||!a[2]||!a[3],"Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to circle"),i=parseFloat(a[1]),n=parseFloat(a[2]),r=parseFloat(a[3]),l(!isFinite(i)||!isFinite(n),"Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to circle"),"circle("+i+","+n+","+r+")"}function x(t){var e=d(t);return u(e[0])+","+c(e[1])}function w(e){return t.isString(e)&&e.indexOf("circle")>-1?b(e):n(e)&&3===e.length?"circle("+u(e[0])+","+c(e[1])+","+e[2]+")":x(e)}function k(t){var e,i=[];for(e in t)t.hasOwnProperty(e)&&i.push(x(t[e]));return i}function T(t){var e;return"string"!==typeof t?t:(e=t.split(","),{latitude:e[0],longitude:e[1]})}function E(t){return t.map(T)}var L,S;return L={ca:["ca","cat","ca-fr","ca_fr","ca-es","ca_es","catalan"],cs:["cs","cze","cs-cz","cs_cz","czech"],da:["da","dan","da-dk","da_dk","danish"],de:["de","ger","de-de","de_de","german"],en:["en","eng","en-gb","en_gb","english","us","ame","en-us","en_us","english US","default"],es:["es","spa","es-es","es_es","spanish","mx","spm","es-mx","es_mx","spanish MX"],fi:["fi","fin","fi-fi","fi_fi","finnish"],fr:["fr","fre","fr-fr","fr_fr","french"],hu:["hu","hun","hu-hu","hu_hu","hungarian"],it:["it","ita","it-it","it_it","italian"],nl:["nl","dut","nl-nl","nl_nl","dutch"],no:["no","nor","no-no","no_no","norwegian"],pl:["pl","pol","pl-pl","pl_pl","polish"],pt:["br","por","pt-br","pt_br","portuguese","pt","pob","pt-pt","pt_pt","portuguese BR"],sk:["sk","slo","sk-sk","sk_sk","slovak"],sv:["sv","swe","sv-se","sv_se","swedish"],tr:["tr","tur","tr-tr","tr_tr","turkish"],defaultValue:"en"},S={ar:["ar","ara","ar-ar","ar_ar","arabic"],"af-ZA":["af","afr","af-za","af_za","afrikaans"],"bg-BG":["bg","bul","bg-bg","bg_bg","bulgarian"],"zh-TW":["zh","chi","zh-tw","zh_tw","chinese"],"cs-CZ":["cs","cz","cze","cs-cz","cs_cz","czech"],"da-DK":["da","dan","da-dk","da_dk","danish"],"nl-NL":["nl","dut","nl-nl","nl_nl","dutch"],"en-GB":["en","eng","en-gb","en_gb","english","default"],"en-US":["us","ame","en-us","en_us","english US"],"fi-FI":["fi","fin","fi-fi","fi_fi","finnish"],"fr-FR":["fr","fre","fr-fr","fr_fr","french"],"de-DE":["de","ger","de-de","de_de","german"],"el-GR":["el","gre","el-gr","el_gr","greek"],"hu-HU":["hu","hun","hu-hu","hu_hu","hungarian"],"id-ID":["id","ind","id-id","id_id","indonesian"],"it-IT":["it","ita","it-it","it_it","italian"],"ko-KR":["ko","kor","ko-kr","ko_kr","korean"],"lt-LT":["lt","lit","lt-lt","lt_lt","lithuanian"],"ms-MY":["ms","mal","ms-my","ms_my","malay"],"nb-NO":["nb","nor","nb-no","nb_no","norwegian"],"pl-PL":["pl","pol","pl-pl","pl_pl","polish"],"pt-BR":["br","por","pt-br","pt_br","portuguese"],"pt-PT":["pt","pob","pt-pt","pt_pt","portuguese BR"],"ru-RU":["ru","rus","ru-ru","ru_ru","russian"],"sk-SK":["sk","slo","sk-sk","sk_sk","slovak"],"sl-SI":["sl","slv","sl-si","sl_si","slovenian"],"es-ES":["es","spa","es-es","es_es","spanish"],"es-MX":["mx","spm","es-mx","es_mx","spanish MX"],"sv-SE":["sv","swe","sv-se","sv_se","swedish"],"th-TH":["th","tha","th-th","th_th","thai"],"tr-TR":["tr","tur","tr-tr","tr_tr","turkish"],defaultValue:"en-GB"},{boundingBox:function(t){return v(y(t))},longitude:function(t){return c(t)},latitude:function(t){return u(t)},point:function(t){return x(t)},dateTime:function(e){if(e&&e instanceof Date)return e.toISOString();if(!e||!t.isString(e))throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to datetime value.");return"now"!==e&&(e=e.replace(/([0-9]{2})-([0-9]{2})-([0-9]{2})/,"$1/$2/$3"),e=e.replace(/([0-9])T([0-9])/,"$1 $2"),e=new Date(e).toISOString()),e},geometryList:function(t){var e,i;l(!t||!n(t),"Unable to cast "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] to geometry list (array)");for(e in t)t.hasOwnProperty(e)&&(i=t[e],"POLYGON"===i.type?i.vertices=k(i.vertices):"CIRCLE"===i.type&&(i.position=x(i.position)));return t},language:function(t,i){var n;return i&&i.data&&i.data.__serviceType?(n=new e(t),n.getValueFor(i.data.__serviceType)):t},routingGuidanceLanguage:function(t){var e;t=t.toLowerCase();for(e in S)if(S.hasOwnProperty(e)&&S[e].indexOf(t)>-1)return e;return S.defaultValue},trafficIncidentsLanguage:function(t){var e;t=t.toLowerCase();for(e in L)if(L.hasOwnProperty(e)&&L[e].indexOf(t)>-1)return e;return L.defaultValue},routingLocations:function(e){var i,r=[];if(t.isString(e))return e;if(n(e)){for(l(e.length<2,"Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to routing locations string"),r.push(x(e[0])),i=1;i<e.length-1;i+=1)r.push(w(e[i]));return r.push(x(e[e.length-1])),r.join(":")}throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to routing locations string")},roadUse:function(e){var i;if(t.isString(e))return'["'+e.replace(/["']|^\s+|\s+$/g,"").split(/[\s,]+/).join('","')+'"]';if(n(e)){for(i=0;i<e.length;i+=1)e[i]=String(e[i]).replace(/["']|^\s+|\s+$/g,"");return'["'+e.join('","')+'"]'}throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to road use string")},arrayOf:function(t){return function(e){var i;for(i in t)t.hasOwnProperty(i)&&t[i].hasOwnProperty("defaultValue")&&e.forEach(function(t,e){return function(i){i.hasOwnProperty(t)||(i[t]=e)}}(i,t[i].defaultValue));return e.forEach(function(e){var i;for(i in e)e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&"function"===typeof t[i].converter&&(e[i]=t[i].converter(e[i]))}),e}},objectOf:function(t){return function(e){var i;for(i in e)e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&"function"===typeof t[i].converter&&(e[i]=t[i].converter(e[i]));return e}},arrayOfStrings:function(e){if(!e)return[];if(t.isString(e))return e=e.trim().replace(/\s*[,;]\s*/g,","),e.split(/[,;]+/);if(n(e))return e;throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to array of strings")},route:function(t){return{points:t.map(d).map(function(t){return{lat:t[0],lon:t[1]}})}},queryString:function(e){return t.encodeQuery(e)},integer:function(t){return Math.round(Number(t))},supportingPoints:function(e){var i,r=[];if(t.isString(e)&&(e=e.split(":")),n(e))for(i=0;i<e.length;i++)r.push(x(e[i]));else r.push(x(e));return E(r)},constantSpeedConsumption:function(t){if("string"===typeof t)return t;if(!n(t))throw new TypeError("An array is required");return t.join(":")},avoidAreas:function(t){if(!n(t))throw new TypeError("An array is required");return{rectangles:t.map(function(t){return{southWestCorner:T(x(t.southWestCorner)),northEastCorner:T(x(t.northEastCorner))}})}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n=i(17);t.exports={copyrightsWorld:n["endpoints.copyrightsWorld"],copyrightsBounds:n["endpoints.copyrightsBounds"],caption:n["endpoints.caption"],geocode:n["endpoints.geocode"],batchGeocodeQuery:n["endpoints.batchGeocodeQuery"],structuredGeocode:n["endpoints.structuredGeocode"],batchStructuredGeocodeQuery:n["endpoints.batchStructuredGeocodeQuery"],search:n["endpoints.search"],batchSearch:n["endpoints.batchSearch"],batchSyncSearch:n["endpoints.batchSyncSearch"],batchSearchQuery:n["endpoints.batchSearchQuery"],adp:n["endpoints.adp"],reverseGeocode:n["endpoints.reverseGeocode"],batchReverseGeocodeQuery:n["endpoints.batchReverseGeocodeQuery"],trafficIncidents:n["endpoints.trafficIncidents"],trafficViewport:n["endpoints.trafficViewport"],flowSegmentData:n["endpoints.flowSegmentData"],incidentRegions:n["endpoints.incidentRegions"],trafficLayer:n["endpoints.trafficLayer"],trafficFlowLayer:n["endpoints.trafficFlowLayer"],tileLayer:n["endpoints.tileLayer"],routing:n["endpoints.routing"],reachableRange:n["endpoints.reachableRange"],batchRoutingQuery:n["endpoints.batchRoutingQuery"],batchRouting:n["endpoints.batchRouting"],batchSyncRouting:n["endpoints.batchSyncRouting"],matrixRouting:n["endpoints.matrixRouting"],matrixSyncRouting:n["endpoints.matrixSyncRouting"],batchReachableRangeQuery:n["endpoints.batchReachableRangeQuery"],origin:n.origin}},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{POST:"POST",PATH:"PATH",QUERY:"QUERY",OTHER:"OTHER"}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(0),i(29),i(57),i(32),i(121),i(34),i(6)],void 0!==(r=function(t,e,i,n,r,a,s){function l(t){if("function"!==typeof t)throw new TypeError("a function is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t}function u(t){return void 0===t}function c(t){return"function"===typeof t}function h(t,e,i,n,r){var o={data:t,name:e};return u(i)?u(t[e])?null:t[e]:(c(r)&&(i=r.call(this,i,o)),c(n)&&(i=n.call(this,i,o)),t[e]=i,this)}function p(t,e){var i,n;for(i in t)if(t.hasOwnProperty(i)&&(n=t[i].name||i,!0===t[i].required&&!e.hasOwnProperty(n)))throw new Error("Missing required "+i)}function f(e,i){function n(t){t.call(o,i[r],i,r)}var r,o=this;for(r in e)e.hasOwnProperty(r)&&(t.isArray(e[r].postValidator)?e[r].postValidator.forEach(n):u(e[r].postValidator)||e[r].postValidator.call(this,i[r],i,r))}function d(t,e,i){return function(n){var r=e[t].name||t;return h.call(this,i,r,n,e[t].validator,e[t].converter)}}function m(t){var n,r=t.__serviceType;!r||t.language&&i(t.language,r)||(n=e.getCurrentLocale(),t.language=n.getValueFor(r))}function _(t){var e,i=t.__serviceType,o=a.getSupportedServices();!i||-1===o.indexOf(i)||t.view&&r(t.view,i)||(e=n.getCurrentGeopolView(),t.view=e.getValueFor(i))}return function(e,i,n){var r,o,a={},c=this;n=n||{},a.__serviceType=n.__serviceType,m(n),_(n),e.callback={validator:l},e.fail={validator:l,defaultValue:function(e){throw t.isObject(e)&&(e=JSON.stringify(e)),console.error(e||"Unknown Error"),new Error(e||"Unknown Error")},application:s.OTHER},r={go:function(n,r){var o;return n&&(a.callback=l(n)),r&&(a.fail=l(r)),p(e,a),f(e,a),a.callback?(o=a.callback,delete a.callback,void i.call(c,t.clone(a),o)):new Promise(function(e,n){a.fail=function(t){n(t)},i.call(c,t.clone(a),function(t){e(t)})})}};for(o in e)e.hasOwnProperty(o)&&(r[o]=d(o,e,a),u(e[o].defaultValue)||r[o].call(this,e[o].defaultValue),n&&n.hasOwnProperty(o)&&r[o].call(this,n[o]),!1===e[o].visible&&delete r[o]);return n&&n.fail&&(a.fail=n.fail),r}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){function e(e,i){if(!t.isString(e))throw new TypeError(i)}var i={};return{setKey:function(t,n){1===arguments.length&&(n=t,t="*"),n&&(e(t,"Module name needs to be of type string"),e(n,"API key needs to be of type string"),i[t]=n)},_clearKeys:function(){i={}},setKeyForName:function(t){return e(t,"Module name needs to be of type string"),function(n){e(n,"API key needs to be of type string"),i[t]=n}},getKey:function(t){return t&&e(t,"Module name needs to be of type string"),i[t]||i["*"]||null}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n;void 0!==(n=function(){var t={display:"services/display",vector:"services/display/vector",trafficFlow:"services/trafficFlow",traffic:"services/traffic",search:"services/search",routing:"services/routing"};return Object.freeze(t)}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[i(27),i(11),i(8),i(28),i(25),i(55)],void 0!==(r=function(t,e,i,n,r,o){return function(a,s){return function(l,u,c){var h,p,f=n(o.setField(l),o.setValue(u)),d=f.pathParams,m=f.queryParams,_=f.otherParams;m.key=t.or(u.key,i.getKey(s)),m.key=t.required(m.key),h={url:"{protocol}://"+a,pathParameters:d,queryParameters:m,callbackParam:"callback",callback:c,fail:_.fail},p=f.postParams,r.isEmpty(p)?e.get(h):(h.bodyParameters=p,e.post(h))}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(111),i(113)],void 0!==(r=function(t,e){var i=!1,n=!1;return{useJsonp:function(t){i=t},useHttp:function(t){n=t},protocol:function(){return n?"http":"https"},get:function(n){return n.protocol=n.protocol||this.protocol(),i?e.get(n):t.get(n)},post:function(e){return i&&console.warn("Jsonp is not supported, using json request."),e.protocol=e.protocol||this.protocol(),t.post(e)}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(17)],void 0!==(r=function(t){var e,i=t["analytics.header.sdkName"]+"/"+t["sdk.version"],n=t["analytics.header.name"];return{getHeaderName:function(){return n},getHeaderContent:function(){return i+(void 0!==e?" "+e:"")},setProductInfo:function(t,i){var n;if(!t)throw new Error("ProductId needs to be set");n=i||0===i?"/"+i:"",e=t+n},getProductInfo:function(){return e},addAnalyticsHeader:function(t){return t.header(n,this.getHeaderContent()),t},getAnalyticsHeader:function(){var t={};return t[n]=this.getHeaderContent(),t},customCreateTile:function(t,e,i){var n=document.createElement("img"),r=i.getTileUrl(t),o=i.options&&i.options.errorTileUrl,a=new XMLHttpRequest;return a.onreadystatechange=function(){a.readyState===XMLHttpRequest.DONE&&(200===a.status?n.src=URL.createObjectURL(a.response):o&&(n.src=o),e(null,n))},a.open("GET",r,!0),a.responseType="blob",a.setRequestHeader(this.getHeaderName(),this.getHeaderContent()),a.send(),i.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("original-src",r),n.setAttribute("role","presentation"),n}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){return void 0!==t&&t.constructor.toString().indexOf("Array")>-1}function e(t,e){var i;for(i=0;i<t.length;i+=1)n(t[i],e)}function i(t,e){var i,n="*"+e.trim().split(/\s*,\s*/).join("*")+"*";for(i in t)t.hasOwnProperty(i)&&n.indexOf("*"+i+"*")<0&&delete t[i]}function n(n,r){return r?(t(n)?e(n,r):i(n,r),n):n}function r(t,e){var i,n=[];for(i=0;i<t.length;i+=1)t[i][e]&&n.push(t[i][e]);return n}return function(e,i,o){var a,s=e,l=i.trim().split(".");for(a=0;a<l.length;a+=1){if(!s)return null;s=t(s)?r(s,l[a]):s[l[a]]}return n(s,o)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(37)],void 0!==(r=function(t,e){function i(t){return t<10?"0"+t:t}function n(t){return 1.0936133*t}function r(t){return.000621371192*t}function o(t){var e=n(t),i=r(t);return i<1?Math.round(e)+" yd":Math.round(10*i)/10+" mi"}function a(t){var e=Math.round(t);return e>=1e3?Math.round(e/100)/10+" km":e+" m"}return new(t.Evented.extend({convertYardsToMeters:function(t){return Math.round(t/1.0936133)},convertMetersToYards:n,formatTime:function(t){var e,n,r,o,a;if(void 0!==t)return e=parseInt(t,10),n=Math.floor(e/3600),r=Math.floor((e-3600*n)/60),e<60?e+" s":(e%=60,o=i(e),r%=60,a=i(r),n>0?n+":"+a+" h":r+":"+o+" min")},formatHourAndMinute:function(t){var e=new Date(t);return e.getHours()+":"+i(e.getMinutes())},formatDistance:function(t,e){if(void 0!==t)return e?o(t):a(t)},unitsScheme:function(t){return console.warn("Deprecated. Please use unitService class."),t?(e.setCurrentUnit(t),this.fire("change",{newScheme:t}),t):e.getCurrentUnit().getLabel()}}))}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{metric:"metric",imperial:"imperial"}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(92),i(91),i(7),i(2),i(4),i(22),i(0),i(158),i(45),i(159)],void 0!==(r=function(t,e,i,n,r,o,a,s,l,u){function c(t,e){return t.topLeft=[e.maxLat,e.minLon],t.btmRight=[e.minLat,e.maxLon],t}function h(t,e){return function(i){e(t?i[0]:i)}}function p(t){this.options=t,this.defaultFields=a.clone(_),this.fields={}}function f(e){var i=u.modifyFields(e);return function(e,n){return t.search(i,e,n)}}function d(t){return new p(t).construct()}var m={search:l.search,poi:l.poi,category:l.category,geometry:l.geometry,nearby:l.nearby,lowBandwidth:l.lowBandwidth},_=u.create();return p.prototype.TYPE=m,p.prototype.model=e,p.prototype.construct=function(){this.fields=a.addFields.call(this,this.fields);var t={batchItems:{validator:n.arrayOf(this.fields),converter:r.arrayOf(this.fields)}};return this.options=this.options||{},this.options.__serviceType="search",Array.isArray(this.options)?i.call(this,t,this.handleBatchChain,{batchItems:this.options}):i.call(this,this.fields,this.handleChain,this.options)},p.prototype.handleBatchChain=function(e,i){e.batchItems.forEach(u.modifyRequestOptions),t.batch(u.modifyFields(this.fields),e,function(t){i.call(this,s(t))})},p.prototype.handleChain=function(t,e){u.modifyRequestOptions(t),o(f(this.fields),this.model,t,h(Boolean(t.bestResult),e),c)},d.prototype.constructor=p,d}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n;void 0!==(n=function(){var t="api.tomtom.com";return{"mapboxgl.version":"0.50.0","sdk.version":"4.43.11","analytics.header.name":"TomTom-User-Agent","analytics.header.sdkName":"MapsWebSDK",origin:t,"endpoints.copyrightsWorld":t+"/map/1/copyrights.{contentType}","endpoints.copyrightsBounds":t+"/map/1/copyrights/{minLon}/{minLat}/{maxLon}/{maxLat}.{contentType}","endpoints.caption":t+"/map/1/copyrights/caption.{contentType}","endpoints.geocode":t+"/search/2/geocode/{query}.{contentType}","endpoints.batchGeocodeQuery":"/geocode/{query}.{contentType}","endpoints.structuredGeocode":t+"/search/2/structuredGeocode.{contentType}","endpoints.batchStructuredGeocodeQuery":"/structuredGeocode.{contentType}","endpoints.search":t+"/search/2/{type}/{query}.{contentType}","endpoints.batchSearch":t+"/search/2/batch.{contentType}","endpoints.batchSyncSearch":t+"/search/2/batch/sync.{contentType}","endpoints.batchSearchQuery":"/{type}/{query}.{contentType}","endpoints.adp":t+"/search/2/additionalData.{contentType}","endpoints.reverseGeocode":t+"/search/2/{type}/{position}.{contentType}","endpoints.batchReverseGeocodeQuery":"/{type}/{position}.{contentType}","endpoints.trafficIncidents":t+"/traffic/services/4/incidentDetails/{style}/{minLat},{minLon},{maxLat},{maxLon}/{zoom}/{trafficModelID}/{contentType}","endpoints.trafficViewport":t+"/traffic/services/4/incidentViewport/0,0,.1,.1/0/0,0,.1,.1/0/false/{contentType}","endpoints.flowSegmentData":t+"/traffic/services/4/flowSegmentData/{style}/{zoom}/{contentType}","endpoints.incidentRegions":t+"/traffic/services/4/incidentRegions/{contentType}","endpoints.trafficLayer":"{s}."+t+"/traffic/map/4/tile/incidents/{style}/{z}/{x}/{y}.png","endpoints.trafficFlowLayer":"{s}."+t+"/traffic/map/4/tile/flow/{style}/{z}/{x}/{y}.png","endpoints.tileLayer":"{s}."+t+"/map/1/tile/{layer}/{style}/{z}/{x}/{y}.png","endpoints.routing":t+"/routing/1/calculateRoute/{locations}/{contentType}","endpoints.reachableRange":t+"/routing/1/calculateReachableRange/{origin}/{contentType}","endpoints.batchRouting":t+"/routing/1/batch/{contentType}","endpoints.batchSyncRouting":t+"/routing/1/batch/sync/{contentType}","endpoints.batchRoutingQuery":"/calculateRoute/{locations}/{contentType}","endpoints.batchReachableRangeQuery":"/calculateReachableRange/{origin}/{contentType}","endpoints.matrixRouting":t+"/routing/1/matrix/{contentType}","endpoints.matrixSyncRouting":t+"/routing/1/matrix/sync/{contentType}","endpoints.staticMapImage":"https://"+t+"/map/1/staticimage","vector.glyphs":"https://"+t+"/maps-sdk-js/4.43.11/glyphs/{fontstack}/{range}.pbf","vector.sprites":"https://"+t+"/maps-sdk-js/4.43.11/sprites/sprite"}}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[i(27),i(11),i(8),i(51),i(28),i(25),i(55),i(74)],void 0!==(r=function(t,e,i,n,r,o,a,s){return function(l,u,c){return function(h,p,f){var d,m,_={},g={},y=f;_.key=t.required(i.getKey(c)),d=t.required(p.batchItems),h=a.setField(h),g.batchItems=d.map(function(t){var e,i=r(h,a.setValue(t)),s=i.pathParams,l=i.queryParams,c=i.postParams;return e={query:n(u.single,s,l)},o.isEmpty(c)||(e.post=c),e}),g.batchItems.length<=l?m=u.batchSync:(m=u.batch,_.redirectMode="manual",y=s(f,p)),e.post({url:"{protocol}://"+m,queryParameters:_,bodyParameters:g,callbackParam:"callback",callback:y,fail:p.fail,requestType:"batch"})}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){var t=function(){};return t.prototype.simplify=function(){return Object.assign({},this)},t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t,e){this._htmlElement=t,this._wrapFunction=e}return t.prototype.getHtmlElement=function(){return this._htmlElement},t.prototype.wrap=function(){this._wrapFunction(this._htmlElement)},t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(0)],void 0!==(r=function(t,e){function i(e,i){var n;e.iconAnchor&&(n=t.point(e.iconAnchor),i.style.marginLeft=-n.x+"px",i.style.marginTop=-n.y+"px")}function n(t,e){var i;for(i in t.style)t.style.hasOwnProperty(i)&&(e.style[i]=t.style[i])}function r(t,e){t.style.width=e.iconSize[0]+"px",t.style.height=e.iconSize[1]+"px",t.style.backgroundSize=e.iconSize[0]+"px "+e.iconSize[1]+"px",i(e,t),t.style.position="absolute",t.style.textAlign="center",t.style.verticalAlign="middle",t.style.lineHeight=e.iconSize[1]+"px",e.style&&n(e,t)}function o(t,e){var i,n,r;i=t.cloneNode(),i.style.display="none",document.body.appendChild(i),r=window.getComputedStyle(i).getPropertyValue("background-image"),document.body.removeChild(i),r&&(n=r.match(/(%3Csvg[^"']+%3C%2Fsvg%3E)/i))&&(r=decodeURIComponent(n[1]),t.innerHTML=r,t.firstChild.setAttribute("width",e.iconSize[0]+"px"),t.firstChild.setAttribute("height",e.iconSize[1]+"px"),t.firstChild.setAttribute("style","display: block; position: absolute;"),t.style.backgroundImage="none")}function a(t){return t.filter(function(t){return e.isNonEmptyString(t)}).join(" ")}function s(e,i,n){var s=a(["icon",e.icon||"content",n]),l=t.DomUtil.create("div",s,i);return r(l,e),e.icon&&!e.noPlainSVG&&o(l,e,e.icon),e.content&&(l.innerHTML=e.content),l}function l(e,i){var n=t.DomUtil.create("div","icon-image",i),o=t.DomUtil.create("img","icon-image-img",n);return o.style.width=e.iconSize[0]+"px",o.style.height=e.iconSize[1]+"px",/^http/i.test(e.icon)?o.src=e.icon:o.src=t.Icon.Default.imagePath+"/"+e.icon,r(n,e),n}function u(t){return/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(t)}function c(e,i,n){return t.Browser.svg&&!u(e.icon)?s(e,i,n):l(e,i)}function h(e,i,n){i.hasOwnProperty(n)&&(e[n]=i[n]?t.extend({},p[n],i[n]):null)}var p;return p={background:{iconSize:[30,36],iconAnchor:[15,36],icon:"icon-marker-black",noPlainSVG:!1},icon:{iconSize:[30,30],iconAnchor:[0,0],icon:"icon-flag-white",noPlainSVG:!1},popupAnchor:[0,-30],opacity:.8},t.SVGIcon=t.Icon.extend({initialize:function(e){this.options=t.Util.extend({},p,e),e&&(h(this.options,e,"background"),h(this.options,e,"icon"))},createIcon:function(){var e=this.options;return this.container=c(e.background||e.icon,null,"icon-marker"),e.background&&e.icon&&e.icon.icon&&c(e.icon,this.container,null),e.content&&(this.contentContainer=s(e.content,this.container,null)),t.DomUtil.setOpacity(this.container,e.opacity),this.container},setContent:function(t){this.contentContainer&&(this.contentContainer.innerHTML=t)},setOpacity:function(e){this.options.opacity=e,t.DomUtil.setOpacity(this.container,e)}}),t.svgIcon=function(e){return new t.SVGIcon(e)},t.SVGIcon}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){function e(t){return t.minLon<-180?[{minLon:-180,minLat:t.minLat,maxLon:t.maxLon,maxLat:t.maxLat},{minLon:360+t.minLon,minLat:t.minLat,maxLon:180,maxLat:t.maxLat}]:t.maxLon>180?[{minLon:t.minLon,minLat:t.minLat,maxLon:180,maxLat:t.maxLat},{minLon:-180,minLat:t.minLat,maxLon:t.maxLon-360,maxLat:t.maxLat}]:[t]}function i(t){return t?e(t):[]}function n(t,e,i,n){return function(r){e.push(r),e.length===t&&(e=1===e.length?e[0]:e,i(n(e)))}}function r(t){var e={topLeftPoint:L.latLng(t.topLeftPoint.lat,t.topLeftPoint.lon).wrap(),btmRightPoint:L.latLng(t.btmRightPoint.lat,t.btmRightPoint.lon).wrap()};return e.topLeftPoint.lng>0&&e.btmRightPoint.lng<0?{topLeftPoint:{lat:e.topLeftPoint.lat,lon:e.topLeftPoint.lng},btmRightPoint:{lat:e.btmRightPoint.lat,lon:e.btmRightPoint.lng+360}}:t}function o(t){return t.map(function(t){return t.boundingBox&&(t.boundingBox=r(t.boundingBox)),t.viewport&&(t.viewport=r(t.viewport)),t})}function a(t,e){return t.unwrapBbox?function(t){e(o(t))}:(delete t.unwrapBbox,e)}function s(e){return e.boundingBox?e.boundingBox:t.isValidValue(e.minLat)&&t.isValidValue(e.minLon)&&t.isValidValue(e.maxLat)&&t.isValidValue(e.maxLon)?{minLat:e.minLat,minLon:e.minLon,maxLat:e.maxLat,maxLon:e.maxLon}:null}return function(t,e,r,o,l){var u,c=i(s(r)),h=c.length||1,p=[];for(delete r.boundingBox,o=a(r,o),u=0;u<h;u+=1)r=c[u]?l(r,c[u]):r,t(r,n(h,p,o,e))}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(62),i(126),i(8)],void 0!==(r=function(t,e,i){return{add:function(e,i){var n=3e4;if(t.isNotNull(e)){if(e._noRefresher)return;if(e.noRefresh)return void i();n=e.refresh>=3e4&&isFinite(e.refresh)?e.refresh:3e4}return setInterval(i,n)},remove:function(t){t&&clearInterval(t)},addRefresherWithModelId:function(t,n,r){function o(){s.go().then(function(t){n.call(r,t)})}var a=t||r.options,s=e({key:i.getKey("services/traffic")});if(!a)throw new Error('"options" should be provided');return a._noRefresher?null:(o(),this.add(a,o))}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(83),i(85),i(44)],void 0!==(r=function(t,e,i){function n(t){r.call(this,t),this.fields=e(i.reverseGeocode)}var r=t.prototype.constructor;return n.prototype=new r,n.prototype.constructor=n,function(t){return new n(t).construct()}}.apply(e,n))&&(t.exports=r)},function(t,e,i){(function(t,n){var r;(function(){function o(t,e){return t.push.apply(t,e),t}function a(t,e,i,n){for(var r=t.length,o=i+(n?1:-1);n?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function s(t){return function(e){return null==e?Qt:e[t]}}function l(t,e,i,n,r){return r(t,function(t,r,o){i=n?(n=!1,t):e(i,t,r,o)}),i}function u(t,e){return A(e,function(e){return t[e]})}function c(t){return t instanceof h?t:new h(t)}function h(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e}function p(t,e,i){var n=t[e];Ae.call(t,e)&&wt(n,i)&&(i!==Qt||e in t)||f(t,e,i)}function f(t,e,i){t[e]=i}function d(t,e,i){if("function"!=typeof t)throw new TypeError($t);return setTimeout(function(){t.apply(Qt,i)},e)}function m(t,e){var i=!0;return Fe(t,function(t,n,r){return i=!!e(t,n,r)}),i}function _(t,e,i){for(var n=-1,r=t.length;++n<r;){var o=t[n],a=e(o);if(null!=a&&(s===Qt?a===a&&!0:i(a,s)))var s=a,l=o}return l}function g(t,e){var i=[];return Fe(t,function(t,n,r){e(t,n,r)&&i.push(t)}),i}function y(t,e,i,n,r){var a=-1,s=t.length;for(i||(i=G),r||(r=[]);++a<s;){var l=t[a];e>0&&i(l)?e>1?y(l,e-1,i,n,r):o(r,l):n||(r[r.length]=l)}return r}function v(t,e){return t&&je(t,e,ii)}function b(t,e){return g(e,function(e){return Ct(t[e])})}function x(t){return J(t)}function w(t,e){return t>e}function k(t){return It(t)&&x(t)==ue}function T(t,e,i,n,r){return t===e||(null==t||null==e||!It(t)&&!It(e)?t!==t&&e!==e:E(t,e,i,n,T,r))}function E(t,e,i,n,r,o){var a=Ke(t),s=Ke(e),l=a?ae:x(t),u=s?ae:x(e);l=l==oe?de:l,u=u==oe?de:u;var c=l==de,h=u==de,p=l==u;o||(o=[]);var f=Ze(o,function(e){return e[0]==t}),d=Ze(o,function(t){return t[0]==e});if(f&&d)return f[1]==e;if(o.push([t,e]),o.push([e,t]),p&&!c){var m=a?V(t,e,i,n,r,o):Z(t,e,l,i,n,r,o);return o.pop(),m}if(!(i&te)){var _=c&&Ae.call(t,"__wrapped__"),g=h&&Ae.call(e,"__wrapped__");if(_||g){var y=_?t.value():t,v=g?e.value():e,m=r(y,v,i,n,o);return o.pop(),m}}if(!p)return!1;var m=q(t,e,i,n,r,o);return o.pop(),m}function L(t){return It(t)&&x(t)==_e}function S(t){return"function"==typeof t?t:null==t?qt:("object"==typeof t?P:s)(t)}function C(t,e){return t<e}function A(t,e){var i=-1,n=kt(t)?Array(t.length):[];return Fe(t,function(t,r,o){n[++i]=e(t,r,o)}),n}function P(t){var e=Oe(t);return function(i){var n=e.length;if(null==i)return!n;for(i=Object(i);n--;){var r=e[n];if(!(r in i&&T(t[r],i[r],te|ee)))return!1}return!0}}function I(t,e){return t=Object(t),dt(e,function(e,i){return i in t&&(e[i]=t[i]),e},{})}function M(t,e){return Ve(X(t,e,qt),t+"")}function z(t,e,i){var n=-1,r=t.length;e<0&&(e=-e>r?0:r+e),i=i>r?r:i,i<0&&(i+=r),r=e>i?0:i-e>>>0,e>>>=0;for(var o=Array(r);++n<r;)o[n]=t[n+e];return o}function R(t){return z(t,0,t.length)}function B(t,e){var i;return Fe(t,function(t,n,r){return!(i=e(t,n,r))}),!!i}function O(t,e){var i=t;return dt(e,function(t,e){return e.func.apply(e.thisArg,o([t],e.args))},i)}function D(t,e){if(t!==e){var i=t!==Qt,n=null===t,r=t===t,o=e!==Qt,a=null===e,s=e===e;if(!a&&t>e||n&&o&&s||!i&&s||!r)return 1;if(!n&&t<e||a&&i&&r||!o&&r||!s)return-1}return 0}function N(t,e,i,n){var r=!i;i||(i={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=n?n(i[s],t[s],s,i,t):Qt;l===Qt&&(l=t[s]),r?f(i,s,l):p(i,s,l)}return i}function F(t){return M(function(e,i){var n=-1,r=i.length,o=r>1?i[r-1]:Qt;for(o=t.length>3&&"function"==typeof o?(r--,o):Qt,e=Object(e);++n<r;){var a=i[n];a&&t(e,a,n,o)}return e})}function j(t){return function(){var e=arguments,i=Ne(t.prototype),n=t.apply(i,e);return Pt(n)?n:i}}function U(t,e,i,n){function r(){for(var e=-1,s=arguments.length,l=-1,u=n.length,c=Array(u+s),h=this&&this!==Te&&this instanceof r?a:t;++l<u;)c[l]=n[l];for(;s--;)c[l++]=arguments[++e];return h.apply(o?i:this,c)}if("function"!=typeof t)throw new TypeError($t);var o=e&ie,a=j(t);return r}function V(t,e,i,n,r,o){var a=i&te,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;for(var u=-1,c=!0,h=i&ee?[]:Qt;++u<s;){var p=t[u],f=e[u];if(void 0!==Qt){c=!1;break}if(h){if(!B(e,function(t,e){if(!nt(h,e)&&(p===t||r(p,t,i,n,o)))return h.push(e)})){c=!1;break}}else if(p!==f&&!r(p,f,i,n,o)){c=!1;break}}return c}function Z(t,e,i,n,r,o,a){switch(i){case le:case ue:case fe:return wt(+t,+e);case ce:return t.name==e.name&&t.message==e.message;case _e:case ge:return t==e+""}return!1}function q(t,e,i,n,r,o){var a=i&te,s=ii(t),l=s.length;if(l!=ii(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Ae.call(e,c)))return!1}for(var h=!0,p=a;++u<l;){c=s[u];var f=t[c],d=e[c];if(!(void 0===Qt?f===d||r(f,d,i,n,o):void 0)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var m=t.constructor,_=e.constructor;m!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return h}function G(t){return Ke(t)||We(t)}function H(t,e){var i=typeof t;return!!(e=null==e?re:e)&&("number"==i||"symbol"!=i&&be.test(t))&&t>-1&&t%1==0&&t<e}function W(t,e,i){if(!Pt(i))return!1;var n=typeof e;return!!("number"==n?kt(i)&&H(e,i.length):"string"==n&&e in i)&&wt(i[e],t)}function K(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}function J(t){return Ie.call(t)}function X(t,e,i){return e=De(e===Qt?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=De(n.length-e,0),a=Array(o);++r<o;)a[r]=n[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=n[r];return s[e]=i(a),t.apply(this,s)}}function Y(t){return g(t,Boolean)}function Q(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),i=arguments[0],n=t;n--;)e[n-1]=arguments[n];return o(Ke(i)?R(i):[i],y(e,1))}function $(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var r=null==i?0:Ye(i);return r<0&&(r=De(n+r,0)),a(t,S(e,3),r)}function tt(t){return(null==t?0:t.length)?y(t,1):[]}function et(t){return(null==t?0:t.length)?y(t,ne):[]}function it(t){return t&&t.length?t[0]:Qt}function nt(t,e,i){var n=null==t?0:t.length;i="number"==typeof i?i<0?De(n+i,0):i:0;for(var r=(i||0)-1,o=e===e;++r<n;){var a=t[r];if(o?a===e:a!==a)return r}return-1}function rt(t){var e=null==t?0:t.length;return e?t[e-1]:Qt}function ot(t,e,i){var n=null==t?0:t.length;return e=null==e?0:+e,i=i===Qt?n:+i,n?z(t,e,i):[]}function at(t){var e=c(t);return e.__chain__=!0,e}function st(t,e){return e(t),t}function lt(t,e){return e(t)}function ut(){return O(this.__wrapped__,this.__actions__)}function ct(t,e,i){return e=i?Qt:e,m(t,S(e))}function ht(t,e){return g(t,S(e))}function pt(t,e){return Fe(t,S(e))}function ft(t,e){return A(t,S(e))}function dt(t,e,i){return l(t,S(e),i,arguments.length<3,Fe)}function mt(t){return null==t?0:(t=kt(t)?t:Oe(t),t.length)}function _t(t,e,i){return e=i?Qt:e,B(t,S(e))}function gt(t,e){var i=0;return e=S(e),A(A(t,function(t,n,r){return{value:t,index:i++,criteria:e(t,n,r)}}).sort(function(t,e){return D(t.criteria,e.criteria)||t.index-e.index}),s("value"))}function yt(t,e){var i;if("function"!=typeof e)throw new TypeError($t);return t=Ye(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=Qt),i}}function vt(t){if("function"!=typeof t)throw new TypeError($t);return function(){var e=arguments;return!t.apply(this,e)}}function bt(t){return yt(2,t)}function xt(t){return Pt(t)?Ke(t)?R(t):N(t,Oe(t)):t}function wt(t,e){return t===e||t!==t&&e!==e}function kt(t){return null!=t&&At(t.length)&&!Ct(t)}function Tt(t){return!0===t||!1===t||It(t)&&x(t)==le}function Et(t){return kt(t)&&(Ke(t)||Bt(t)||Ct(t.splice)||We(t))?!t.length:!Oe(t).length}function Lt(t,e){return T(t,e)}function St(t){return"number"==typeof t&&Be(t)}function Ct(t){if(!Pt(t))return!1;var e=x(t);return e==he||e==pe||e==se||e==me}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=re}function Pt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function It(t){return null!=t&&"object"==typeof t}function Mt(t){return Rt(t)&&t!=+t}function zt(t){return null===t}function Rt(t){return"number"==typeof t||It(t)&&x(t)==fe}function Bt(t){return"string"==typeof t||!Ke(t)&&It(t)&&x(t)==ge}function Ot(t){return t===Qt}function Dt(t){return kt(t)?t.length?R(t):[]:Vt(t)}function Nt(t){return"string"==typeof t?t:null==t?"":t+""}function Ft(t,e){var i=Ne(t);return null==e?i:$e(i,e)}function jt(t,e){return null!=t&&Ae.call(t,e)}function Ut(t,e,i){var n=null==t?Qt:t[e];return n===Qt&&(n=i),Ct(n)?n.call(t):n}function Vt(t){return null==t?[]:u(t,ii(t))}function Zt(t){return t=Nt(t),t&&ve.test(t)?t.replace(ye,Le):t}function qt(t){return t}function Gt(t){return P($e({},t))}function Ht(t,e,i){var n=ii(e),r=b(e,n);null!=i||Pt(e)&&(r.length||!n.length)||(i=e,e=t,t=this,r=b(e,ii(e)));var a=!(Pt(i)&&"chain"in i)||!!i.chain,s=Ct(t);return Fe(r,function(i){var n=e[i];t[i]=n,s&&(t.prototype[i]=function(){var e=this.__chain__;if(a||e){var i=t(this.__wrapped__);return(i.__actions__=R(this.__actions__)).push({func:n,args:arguments,thisArg:t}),i.__chain__=e,i}return n.apply(t,o([this.value()],arguments))})}),t}function Wt(){return Te._===this&&(Te._=Me),this}function Kt(){}function Jt(t){var e=++Pe;return Nt(t)+e}function Xt(t){return t&&t.length?_(t,qt,w):Qt}function Yt(t){return t&&t.length?_(t,qt,C):Qt}var Qt,$t="Expected a function",te=1,ee=2,ie=1,ne=1/0,re=9007199254740991,oe="[object Arguments]",ae="[object Array]",se="[object AsyncFunction]",le="[object Boolean]",ue="[object Date]",ce="[object Error]",he="[object Function]",pe="[object GeneratorFunction]",fe="[object Number]",de="[object Object]",me="[object Proxy]",_e="[object RegExp]",ge="[object String]",ye=/[&<>"']/g,ve=RegExp(ye.source),be=/^(?:0|[1-9]\d*)$/,xe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we="object"==typeof t&&t&&t.Object===Object&&t,ke="object"==typeof self&&self&&self.Object===Object&&self,Te=we||ke||Function("return this")(),Ee="object"==typeof e&&e&&!e.nodeType&&e,Le=(Ee&&"object"==typeof n&&n&&n.nodeType,function(t){return function(e){return null==t?Qt:t[e]}}(xe)),Se=Array.prototype,Ce=Object.prototype,Ae=Ce.hasOwnProperty,Pe=0,Ie=Ce.toString,Me=Te._,ze=Object.create,Re=Ce.propertyIsEnumerable,Be=Te.isFinite,Oe=function(t,e){return function(i){return t(e(i))}}(Object.keys,Object),De=Math.max,Ne=function(){function t(){}return function(e){if(!Pt(e))return{};if(ze)return ze(e);t.prototype=e;var i=new t;return t.prototype=Qt,i}}();h.prototype=Ne(c.prototype),h.prototype.constructor=h;var Fe=function(t,e){return function(i,n){if(null==i)return i;if(!kt(i))return t(i,n);for(var r=i.length,o=e?r:-1,a=Object(i);(e?o--:++o<r)&&!1!==n(a[o],o,a););return i}}(v),je=function(t){return function(e,i,n){for(var r=-1,o=Object(e),a=n(e),s=a.length;s--;){var l=a[t?s:++r];if(!1===i(o[l],l,o))break}return e}}(),Ue=Kt,Ve=qt,Ze=function(t){return function(e,i,n){var r=Object(e);if(!kt(e)){var o=S(i,3);e=ii(e),i=function(t){return o(r[t],t,r)}}var a=t(e,i,n);return a>-1?r[o?e[a]:a]:Qt}}($),qe=M(function(t,e,i){return U(t,32|ie,e,i)}),Ge=M(function(t,e){return d(t,1,e)}),He=M(function(t,e,i){return d(t,Qe(e)||0,i)}),We=Ue(function(){return arguments}())?Ue:function(t){return It(t)&&Ae.call(t,"callee")&&!Re.call(t,"callee")},Ke=Array.isArray,Je=k,Xe=L,Ye=Number,Qe=Number,$e=F(function(t,e){N(e,Oe(e),t)}),ti=F(function(t,e){N(e,K(e),t)}),ei=M(function(t,e){t=Object(t);var i=-1,n=e.length,r=n>2?e[2]:Qt;for(r&&W(e[0],e[1],r)&&(n=1);++i<n;)for(var o=e[i],a=ni(o),s=-1,l=a.length;++s<l;){var u=a[s],c=t[u];(c===Qt||wt(c,Ce[u])&&!Ae.call(t,u))&&(t[u]=o[u])}return t}),ii=Oe,ni=K,ri=function(t){return Ve(X(t,Qt,tt),t+"")}(function(t,e){return null==t?{}:I(t,e)}),oi=S;c.assignIn=ti,c.before=yt,c.bind=qe,c.chain=at,c.compact=Y,c.concat=Q,c.create=Ft,c.defaults=ei,c.defer=Ge,c.delay=He,c.filter=ht,c.flatten=tt,c.flattenDeep=et,c.iteratee=oi,c.keys=ii,c.map=ft,c.matches=Gt,c.mixin=Ht,c.negate=vt,c.once=bt,c.pick=ri,c.slice=ot,c.sortBy=gt,c.tap=st,c.thru=lt,c.toArray=Dt,c.values=Vt,c.extend=ti,Ht(c,c),c.clone=xt,c.escape=Zt,c.every=ct,c.find=Ze,c.forEach=pt,c.has=jt,c.head=it,c.identity=qt,c.indexOf=nt,c.isArguments=We,c.isArray=Ke,c.isBoolean=Tt,c.isDate=Je,c.isEmpty=Et,c.isEqual=Lt,c.isFinite=St,c.isFunction=Ct,c.isNaN=Mt,c.isNull=zt,c.isNumber=Rt,c.isObject=Pt,c.isRegExp=Xe,c.isString=Bt,c.isUndefined=Ot,c.last=rt,c.max=Xt,c.min=Yt,c.noConflict=Wt,c.noop=Kt,c.reduce=dt,c.result=Ut,c.size=mt,c.some=_t,c.uniqueId=Jt,c.each=pt,c.first=it,Ht(c,function(){var t={};return v(c,function(e,i){Ae.call(c.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),c.VERSION="4.17.5",Fe(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],function(t){var e=(/^(?:replace|split)$/.test(t)?String.prototype:Se)[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|join|replace|shift)$/.test(t);c.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var r=this.value();return e.apply(Ke(r)?r:[],t)}return this[i](function(i){return e.apply(Ke(i)?i:[],t)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=ut,Te._=c,(r=function(){return c}.call(e,i,e,n))!==Qt&&(n.exports=r)}).call(this)}).call(e,i(48),i(108)(t))},function(t,e,i){"use strict";var n;void 0!==(n=function(t){function e(){var t,e,n;try{return t=i(118),a||(e=i(119),n=window.URL.createObjectURL(new window.Blob([e],{type:"text/javascript"})),t.setRTLTextPlugin(n),a=!0),r.modifySetStyle(t),t}catch(t){return null}}var n,r=i(110),o=i(17),a=!1;return n=e(),{setMapbox:function(t){t&&t.version!==o["mapboxgl.version"]&&console.warn('TomTom Maps SDK for Web expects mapboxgl "'+o["mapboxgl.version"]+'" version.'),n=t,r.modifySetStyle(n)},tryToSetMapbox:function(){return this.isMapboxSet()||(n=e()),this.isMapboxSet()},getMapbox:function(){if(!this.isMapboxSet())throw new Error("You should provide Mapbox GL JS reference first.");return n},isMapboxSet:function(){return Boolean(n)},isMapboxSupported:function(){return this.tryToSetMapbox()&&n.supported()}}}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{or:function(t,e){return t||e},required:function(t,e){if(void 0===t||null===t)throw new TypeError(e);return t}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(6)],void 0!==(r=function(t){function e(e){var i=e[1];return!i.application||i.application===t.QUERY}function i(e){return e[1].application===t.PATH}function n(e){return e[1].application===t.POST}function r(e){return e[1].application===t.OTHER}function o(t){return t[0]}function a(t){return function(e){return[t[e]&&t[e].name||e,t[e]]}}function s(t,e){return Object.keys(t).map(a(t)).filter(e).map(o)}function l(t){return s(t,e)}function u(t){return s(t,i)}function c(t){return s(t,n)}function h(t){return s(t,r)}function p(t,e,i){var n={};return e(t).forEach(function(t){t in i&&(n[t]=i[t])}),n}function f(t,e){return p(t,u,e)}return function(t,e){return{pathParams:f(t,e),queryParams:p(t,l,e),postParams:p(t,c,e),otherParams:p(t,h,e)}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(30)],void 0!==(r=function(t){return new t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(31),i(1),i(56),i(0)],void 0!==(r=function(t,e,i,n){function r(e){var n,r,o=[];for(n in i)i.hasOwnProperty(n)&&(r=i[n],(!e&&-1===f.indexOf(n)||r[e]&&!0===r[e].isNative)&&o.push(new t(n)));return o.sort(function(t,e){return t.getLabel().localeCompare(e.getLabel())})}function o(t){this.setCurrentLocale(t.getLanguageCode())}var a,s,l,u,c,h,p,f=["NGT","NGT-Latn"];return a=r(null),s=r("traffic"),l=r("routing"),u=r("search"),c=r("maps"),p={LOCALE_CHANGED:"config.locale.changed"},h=e.Evented.extend({Events:p,initialize:function(e){e instanceof h?(this.currentLocale=new t(e.getCurrentLocale().getLanguageCode()),this.parent=e,e.on(p.LOCALE_CHANGED,o,this)):this.currentLocale=new t("en-GB")},setCurrentLocale:function(e){this.currentLocale=e instanceof t?e:new t(e),this.fire(p.LOCALE_CHANGED,this.currentLocale)},getCurrentLocale:function(){return this.currentLocale},cleanEvents:function(){this.parent.off(p.LOCALE_CHANGED,o,this),this.off()}}),h.Events=p,n.addDeprecatedProperty(h.prototype,"EVENTS","Events"),h.getLocalesFor=function(t){switch(t){case"traffic":return s;case"routing":return l;case"search":case"reverseGeocoder":return u;case"maps":return c;default:return a}},e.LocaleService=h,e.localeService=function(t){return new h(t)},e.localeService}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(56)],void 0!==(r=function(t){function e(t){return n.indexOf(t)>-1}function i(e){t.hasOwnProperty(e)||(console.warn("Incorrect language code passed to Locale constructor. Defaulting to en-GB"),e="en-GB"),this._languageCode=e}var n=["routing","search","traffic","maps","reverseGeocoder"];return i.prototype.getLabel=function(){return t[this._languageCode].label},i.prototype.getLanguageCode=function(){return this._languageCode},i.prototype.getValueFor=function(i){var r;return i?(e(i)||(console.warn("Unsupported type passed to getValueFor function in Locale.Expecting: "+n.join(", ")+". Defaulting to search"),i="search"),"reverseGeocoder"===i&&(i="search"),r=t[this._languageCode][i].fallback,void 0!==r?r:this._languageCode):this._languageCode},i}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(33)],void 0!==(r=function(t){return new t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(34),i(1),i(58),i(0)],void 0!==(r=function(t,e,i,n){function r(){return new t(a)}var o,a="Unified",s={GEOPOL_VIEW_CHANGED:"config.geopolView.changed"};return o=e.Evented.extend({Events:s,initialize:function(e){e instanceof o?(this.current=new t(e.getCurrentGeopolView().getCode()),this._enslaveTo(e)):this.current=r()},setCurrentGeopolView:function(e){n.isString(e)&&(e=new t(e)),this.current.getCode()!==e.getCode()&&(this.current=new t(e.getCode()),this.fire(s.GEOPOL_VIEW_CHANGED,this.current))},getCurrentGeopolView:function(){return this.current},cleanEvents:function(){this.parent&&(this.parent.off(s.GEOPOL_VIEW_CHANGED,this.setCurrentGeopolView,this),this.parent=void 0),this.off()},_enslaveTo:function(t){this.parent=t,t.on(s.GEOPOL_VIEW_CHANGED,this.setCurrentGeopolView,this)}}),o.getSupportedViews=function(e,n){var r=t.getSupportedServices(),o=[];return n=n||"all",0===arguments.length?Object.keys(i).map(function(e){return new t(e)}):-1===r.indexOf(e)?(console.warn(e+" is not supported. Supported services: "+r.join(", ")),[]):"maps"!==e&&"all"!==n||"maps"===e&&-1===["raster","vector","all"].indexOf(n)?(console.warn("Please specify a valid subType for this service. Expecting: raster, vector or all (for the full list). Returning undefined."),[]):(Object.keys(i).forEach(function(r){var a=i[r][e];a&&"all"!==n&&(a=a[n]),a&&a.fallback||o.push(new t(r))}),o)},o.Events=s,n.addDeprecatedProperty(o.prototype,"EVENTS","Events"),e.geopolViewService=function(t){return new o(t)},e.GeopolViewService=o,e.GeopolViewService}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(58)],void 0!==(r=function(t){function e(t){return n.indexOf(t)>-1}function i(e){t.hasOwnProperty(e)||(e="Unified",console.warn("Incorrect geopolitical view code passed to GeopolViewService.",'Defaulting to "'+e+'".')),this.code=e}var n=["search","maps","reverseGeocoder"];return i.prototype.getCode=function(){return this.code},i.prototype.getLabel=function(){return t[this.code].label},i.prototype.getValueFor=function(i,r){var o,a;return i?e(i)?"maps"!==i&&r||"maps"===i&&-1===["raster","vector"].indexOf(r)?void console.warn("Please specify a valid subType for this service. Expecting: raster or vector. Returning undefined."):(a=t[this.code][i],a&&r&&(a=a[r]),a&&a.fallback?(o=a.fallback,console.warn(this.code+' is not supported by the service "'+i+(r?" - "+r:"")+'". Falling back to '+o+"."),o):this.code):void console.warn("Unsupported service type passed to getValueFor function in geopolView. Expecting: "+n.join(", ")+". Returning undefined."):this.code},i.getSupportedServices=function(){return n},Object.defineProperty(i.prototype,"toString",{enumerable:!1,value:function(){return this.getCode()}}),i}.apply(e,n))&&(t.exports=r)},function(t,e,i){var n,r;/*
_ _
| | (_)
| |_ _ ___
| __| | / __|
| |_ _| \__ \
\__(_) |___/
_/ |
|__/
t.js
a micro-templating framework in ~400 bytes gzipped
@author Jason Mooberry <jasonmoo@me.com>
@license MIT
@version 0.1.0
*/
!function(){function i(t){this.t=t}function o(t){return new Option(t).text.replace(/"/g,"&quot;")}function a(t,e){for(var i=e.split(".");i.length;){if(!(i[0]in t))return!1;t=t[i.shift()]}return t}function s(t,e){return t.replace(l,function(t,i,n,r,o,l,u,c){var h,p=a(e,r),f="";if(!p)return"!"==n?s(o,e):u?s(c,e):"";if(!n)return s(l,e);if("@"==n){t=e._key,i=e._val;for(h in p)p.hasOwnProperty(h)&&(e._key=h,e._val=p[h],f+=s(o,e));return e._key=t,e._val=i,f}}).replace(u,function(t,i,n){var r=a(e,n);return r||0===r?"%"==i?o(r):r:""})}var l=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,u=/\{\{([=%])(.+?)\}\}/g;i.prototype.render=function(t){return s(this.t,t)},n=[],void 0!==(r=function(){return i}.apply(e,n))&&(t.exports=r)}()},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{fixTileScale:function(){this.on("tileloadstart",function(t){t.tile.style.transform+=" scale(1.002)"})}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(38)],void 0!==(r=function(t){return new t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(134),i(1),i(15),i(0)],void 0!==(r=function(t,e,i,n){var r,o,a={UNIT_CHANGED:"config.unit.changed"};return o=function(){return Object.keys(i).map(function(e){return new t(e)})}(),r=e.Evented.extend({Events:a,initialize:function(e){e instanceof r?(this.currentUnit=new t(e.getCurrentUnit().getLabel()),this.parent=e,e.on(a.UNIT_CHANGED,function(t){this.setCurrentUnit(t.getLabel())},this)):this.currentUnit=new t("metric")},setCurrentUnit:function(e){e instanceof t||(e=new t(e)),this.currentUnit=e,this.fire(a.UNIT_CHANGED,this.currentUnit)},getCurrentUnit:function(){return this.currentUnit}}),r.getSupportedUnits=function(){return o},e.unitService=function(t){return new r(t)},e.UnitService=r,r.Events=a,n.addDeprecatedProperty(r.prototype,"EVENTS","Events"),e.unitService}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(8),i(137),i(67),i(9),i(68),i(0),i(12)],void 0!==(r=function(t,e,i,n,r,o,a,s){function l(e){"style"===e.dataType&&this.fire(t.TomTomVectorLayer.Events.STYLE_LOAD_END)}function u(e){this.fire(t.TomTomVectorLayer.Events.MAP_ERROR,e)}function c(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function h(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}var p={STYLE_LOAD_END:"tomtom.styleloadend",MAP_ERROR:"tomtom.error"};return t.TomTomVectorLayer=i.extend({Events:p,statics:{Events:p},name:"vector",onAdd:function(t){i.prototype.onAdd.call(this,t),this.bringToBack(),this._glMap.on("data",this._mapboxStyleLoadedEventHandler),this._glMap.on("error",this._mapErrorHandler),o.updateMaxZoom(t,this.name)},onRemove:function(t){this._glMap.off("data",this._mapboxStyleLoadedEventHandler),this._glMap.off("error",this._mapErrorHandler),i.prototype.onRemove.call(this,t)},_updateZIndex:function(){this._glContainer&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._glContainer.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){var e,i,n,r=this.getPane().children,o=-t(-1/0,1/0);for(e=0,i=r.length,n;e<i;e++)n=r[e].style.zIndex,r[e]!==this._glContainer&&n&&(o=t(o,Number(n)));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},bringToBack:function(){return this._map&&this._glContainer&&(h(this._glContainer),this._setAutoZIndex(Math.min)),this},bringToFront:function(){return this._map&&this._glContainer&&(c(this._glContainer),this._setAutoZIndex(Math.max)),this},_validateUrl:function(t){var e=/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return Boolean(a.isString(t)&&e.test(t))},_getResourcesUrls:function(t){return{glyphs:this._validateUrl(t.glyphsUrl)?t.glyphsUrl:t.basePath+"/glyphs/{fontstack}/{range}.pbf",sprite:this._validateUrl(t.spriteUrl)?t.spriteUrl:t.basePath+"/sprites/sprite"}},getStyle:function(){return this._glMap.style.stylesheet},setStyle:function(t){this._glMap&&this._glMap.setStyle(t)},updateOptions:function(t){var e=n.getTheme([this.options,t],this.name);this.options.layer=e.layer,this.options.style=e.style,this.options.renderer.style.theme=e,this._glMap&&this._glMap.setStyle(this.options.renderer.style)},_initializeDefaultStyleOptions:function(e){var i;return e.basePath=void 0!==e.basePath?e.basePath:"/sdk",i={main:{basic:e.basePath+"/styles/basic_main.json",hybrid:e.basePath+"/styles/hybrid_main.json",labels:e.basePath+"/styles/labels_main.json"},night:{basic:e.basePath+"/styles/basic_night.json",hybrid:e.basePath+"/styles/hybrid_night.json",labels:e.basePath+"/styles/labels_night.json"}},e.styleUrlMapping=t.Util.extend(i,e.styleUrlMapping),e},initialize:function(o){var a,c,h,p;o=t.extend({},o),this._initializeDefaultStyleOptions(o),a=n.getTheme([o,o.vector],this.name),c=t.extend({},o.vector),c.renderer=c.renderer||{},e.setKey(r.vector,c.key),p=this._getResourcesUrls(o),h={accessToken:"no-token",style:{resourceUrls:p,styleUrlMapping:o.styleUrlMapping,theme:a,language:o.language,geopolView:o.geopolView,securityKeyName:o.securityKeyName||r.vector},transformRequest:function(t){var e={};return e[s.getHeaderName()]=s.getHeaderContent(),{url:t,headers:e}}},c.renderer=t.extend(h,c.renderer),c.minZoom=2,c.maxZoom=22,c.style=a.style,c.layer=a.layer,t.setOptions(this,c),this._mapboxStyleLoadedEventHandler=l.bind(this),this._mapErrorHandler=u.bind(this),i.prototype.initialize.call(this,c)}}),a.addDeprecatedProperty(t.TomTomVectorLayer,"EVENTS","Events"),t.tomTomVectorLayer=function(e){return new t.TomTomVectorLayer(e)},t.TomTomVectorLayer}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){return"_"+t+"Added"}function e(e,i){return e[t(i)]}function i(t,i){var n,r,o,a;return n=Boolean(e(t,i)),r=Boolean(e(t,"traffic")),o=Boolean(e(t,"trafficFlow")),a=Boolean(e(t,"vectorTrafficFlow")),n&&(r||o||a)}function n(t,e){return!i(t,e)}function r(t,e,n){t._attached||i(t,n)&&(e.addLayer(t),t._attached=!0)}function o(t,e,i){t._attached&&n(t,i)&&(e.removeLayer(t),t._attached=!1)}return function(e){return{registerEventHandlers:function(i){var n=this;i.on("layeradd",function(o){var a=o.layer.name;a&&(n[t(a)]=!0,r(n,i,e))}),i.on("layerremove",function(r){var a=r.layer.name;a&&(n[t(a)]=!1,o(n,i,e))})}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(42),i(75),i(142),i(7),i(2),i(4),i(72)],void 0!==(r=function(t,e,i,n,r,o,a){function s(i,n){t.calculateRoute(c,i,function(t){n.call(this,e(t))})}function l(e,n){t.batch(c,e,function(t){n.call(this,i(t))})}var u={AfrikaansSouthAfrica:"ar-ZA",Arabic:"ar",Bulgarian:"bg-BG",ChineseTaiwan:"zh-TW",Czech:"cs-CZ",Danish:"da-DK",Dutch:"nl-NL",EnglishGB:"en-GB",EnglishUS:"en-US",Finnish:"fi-FI",French:"fr-FR",German:"de-DE",Greek:"el-GR",Hungarian:"hu-HU",Indonesian:"id-ID",Italian:"it-IT",Korean:"ko-KR",Lithuanian:"lt-LT",Malay:"ms-MY",Norwegian:"nb-NO",Polish:"pl-PL",PortugueseBrazil:"pt-BR",PortuguesePortugal:"pt-PT",Russian:"ru-RU",Slovak:"sk-SK",Slovenian:"sl-SI",Spanish:"es-ES",SpanishMexico:"es-MX",Swedish:"sv-SE",Thai:"th-TH",Turkish:"tr-TR"},c=a(),h={batchItems:{validator:r.arrayOf(c),converter:o.arrayOf(c)}};return function(t){var e;return t=t||{},t.__serviceType="routing",e=t instanceof Array?n(h,l,{batchItems:t}):n(c,s,t),e.LANGUAGE=u,e}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(140),i(10),i(5),i(18),i(9)],void 0!==(r=function(t,e,i,n,r){var o=r.routing;return{calculateRoute:e(i.routing,o),calculateReachableRange:e(i.reachableRange,o),batch:n(100,{batchSync:i.batchSyncRouting,batch:i.batchRouting,single:i.batchRoutingQuery},o),batchReachableRange:n(100,{batchSync:i.batchSyncRouting,batch:i.batchRouting,single:i.batchReachableRangeQuery},o),matrix:t(100)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){function e(t){var e=Object.keys(t).sort(function(t,e){return parseFloat(t)>parseFloat(e)}),i=e.length;if(t[e[0]]>t[e[1]])throw new Error("Consumption for two lowest speeds should be increasing");if(t[e[i-2]]>t[e[i-1]])throw new Error("Consumption for two highest speeds should be increasing")}function i(t){if(isNaN(parseFloat(t))||!isFinite(t))throw new Error("Expecting float, got: "+t)}function n(t){var n={};t.forEach(function(t){var e=t.split(",");if(2!==e.length)throw new Error("Invalid number of parameters in the pair around "+t);if(i(e[0]),i(e[1]),n.hasOwnProperty(parseFloat(e[0])))throw new Error("Duplicate speed: "+e[0]);n[parseFloat(e[0])]=parseFloat(e[1])}),Object.keys(n).length>1&&e(n)}function r(t,e){if(t.vehicleEngineType&&t.vehicleEngineType!==e&&e!==h.any)throw new Error("Expecting vehicleEngineType set to "+e)}function o(e,i){if(!(t.isValidValue(e.accelerationEfficiency)&&t.isValidValue(e.decelerationEfficiency)&&t.isValidValue(e.uphillEfficiency)&&t.isValidValue(e.downhillEfficiency)))throw new Error("Efficiency parameters are required when using "+i)}function a(t){return t.accelerationEfficiency||t.decelerationEfficiency||t.uphillEfficiency||t.downhillEfficiency}function s(t,e,i){if(!t[e]||!t[i])throw new Error("Missing dependant parameter. Expecting both defined: "+e+", "+i)}function l(t,e,i){if(t[e]*t[i]>1)throw new Error("Product of "+e+" and "+i+" cannot exceed 1")}function u(t){if("bicycle"===t.travelMode||"pedestrian"===t.travelMode)throw new Error("Consumption model parameters cannot be set if travelMode is set to bicycle or pedestrian")}function c(t){if(!t.constantSpeedConsumptionInLitersPerHundredkm&&!t.constantSpeedConsumptionInkWhPerHundredkm)throw new Error("Consumption model cannot be used without setting constant speed consumption parameter")}var h={combustion:"combustion",electric:"electric",any:"any"};return{constantSpeedConsumption:function(t){return function(e,i){var o;if(void 0!==e&&null!==e){if(u(i),r(i,t),"string"!==typeof e)throw new TypeError('Expecting a String like "15.2,12.2:8.0,9.0"');if(o=e.split(":"),o.length<1||o.length>25)throw new Error("Incorrect amount of speed-consumption pairs provided. Expecting 1-25, but got "+e.length);n(o)}}},vehicleWeight:function(t,e){if(a(e)&&void 0===t)throw new Error("vehicleWeight parameter must be set if any efficiency parameters is present")},floatAndEngineType:function(t,e){return function(n,o){if(n&&(u(o),c(o),r(o,t),i(n),n<0))throw new Error(e+": Expecting positive value")}},fuelEnergyDensityInMJoulesPerLiter:function(t,e){t&&(u(e),i(t),c(e),r(e,"combustion"),o(e,"fuelEnergyDensityInMJoulesPerLiter"))},efficiencyParameter:function(t,e){return function(n,o){n&&(u(o),c(o),r(o,h.any),s(o,t,e),s(o,t,"vehicleWeight"),o.vehicleEngineType===h.combustion&&s(o,t,"fuelEnergyDensityInMJoulesPerLiter"),l(o,t,e),i(n))}},chargeParameter:function(t,e){return function(n,o){n&&(u(o),c(o),r(o,h.electric),s(o,t,e),i(n))}},budgetInRange:function(t,e){var i,n;if("electric"===e.vehicleEngineType){if(i=e.currentChargeInkWh,(n=e.energyBudgetInkWh)>i)throw new Error("Energy budget may not be greater than current energy.")}else if(i=e.currentFuelInLiters,(n=e.fuelBudgetInLiters)>i)throw new Error("Fuel budget may not be greater than current fuel.");if(n<0)throw new Error("Budget may not be negative.")},requiredBudget:function(t,e){if([e.fuelBudgetInLiters,e.energyBudgetInkWh,e.timeBudgetInSec].filter(function(t){return void 0!==t}).length>1)throw new Error("Exactly one of fuelBudgetInLiters and energyBudgetInkWh and timeBudgetInSec must be set.")},requiredWithSpecificEngineType:function(t,e,i){var n="constantSpeedConsumptionInLitersPerHundredkm"in e,r="constantSpeedConsumptionInkWhPerHundredkm"in e,o="electric"===e.vehicleEngineType;if("energyBudgetInkWh"===i&&t){if(!o)throw new Error('Engine type should be "electric" when energyBudgetInkWh is set');if(!r)throw new Error("Missing constant speed consumption for electric engine.")}else if("fuelBudgetInLiters"===i&&t){if(o)throw new Error('Engine type should be "combustion" or undefined when fuelBudgetInLiters is set');if(!n)throw new Error("Missing constant speed consumption for combustion engine.")}},notCommon:function(t,e,i){var n=["alreadyUsedRoads"],r=["bicycle","pedestrian"];if("arriveAt"in e||"avoid"in e&&n.indexOf(e.avoid)>=0||"travelMode"in e&&r.indexOf(e.travelMode)>=0)throw new Error(i+" parameter is not allowed in Calculate Reachable Route request")},firstParamCannotBeUsedWithSecond:function(e,i){return function(n,r){if(n&&r.hasOwnProperty(i)&&t.isValidValue(r[i]))throw new Error(e+" parameter cannot be used in conjunction with "+i)}},requiresDependantParameter:function(t,e){return function(i,n){if(i&&!n.hasOwnProperty(e))throw new Error(e+" must be specified when using with "+t)}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{reverseGeocode:"reverseGeocode",crossStreetLookup:"reverseGeocode/crossStreet"}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{search:"search",poi:"poiSearch",category:"categorySearch",geometry:"geometrySearch",nearby:"nearbySearch",lowBandwidth:"s",searchAlongRoute:"searchAlongRoute"}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(13)],void 0!==(r=function(t){return function(e){return t(e,"results","address, dist, position, score, entryPoints, type, addressRanges, boundingBox, viewport, id, info, dataSources, entityType")||{}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(3),i(0)],void 0!==(r=function(t,e){function i(i){var n=e.isString(i.className)?i.className:"",r=(n+" tomtom-foldable leaflet-popup-content-wrapper").trim();return t.DomUtil.create("div",r)}function n(e,i){var n;return i.close?(n=t.DomUtil.create("button","tomtom-foldable__close tomtom-foldable--clickable",e),i.close.text?n.innerHTML=i.close.text:i.close.image&&(n.style.cssText="background-image: url("+i.close.image+"); "),n):null}function r(e,i){var n;return i.show?(n=t.DomUtil.create("button","tomtom-foldable__show tomtom-foldable--clickable",e),i.show.text?n.innerHTML=i.show.text:i.show.image&&(n.style.cssText="background-image: url("+i.show.image+"); "),n):null}function o(i,n){var r=null;return r=t.DomUtil.create("h4","tomtom-foldable__title",i),e.isString(n.title)&&(r.innerHTML=n.title),r}function a(e,i){var n=t.DomUtil.create("div",p.footerBody,e);return i.footer instanceof HTMLElement&&n.appendChild(i.footer),n}function s(e,i){var n=t.DomUtil.create("div",p.contentBody,e);return i.content&&(n.innerHTML=i.content),n}function l(){return this.container=i(this.options),this._header=t.DomUtil.create("div","tomtom-foldable__header",this.container),o(this._header,this.options),this._close=n(this._header,this.options),this._show=r(this._header,this.options),this._content=t.DomUtil.create("div",p.contentContainer,this.container),this._contentHeader=t.DomUtil.create("div",p.contentHeader,this._content),this._contentBody=s(this._content,this.options),this.options.footer&&(this._footer=t.DomUtil.create("div",p.footerContainer,this.container),a(this._footer,this.options)),this.container}function u(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function c(t,e){var i;"undefined"!==typeof t&&(i=t instanceof HTMLElement?t:document.createTextNode(t),e.appendChild(i))}var h=1001,p={contentContainer:"tomtom-foldable__content",contentHeader:"tomtom-foldable__content-header",contentBody:"tomtom-foldable__content-body",collapsed:"tomtom-foldable--collapsed",footerContainer:"tomtom-foldable__footer",footerBody:"tomtom-foldable__footer-body"};return t.Foldable=t.Control.extend({options:{title:"",close:null,closeOnClick:!1,closeOnMapClick:!0,show:null,position:"topright",collapsed:!1,content:null,responsive:!1},initialize:function(e){t.setOptions(this,e)},onAdd:function(i){return this._map=i,this.options.closeOnMapClick&&this._map.on("preclick",this.fold,this),l.call(this),t.DomEvent.disableScrollPropagation(this.container),t.DomEvent.disableClickPropagation(this.container),t.DomEvent.on(this.container,"click",this._bringToFront,this),this.options.closeOnClick&&t.DomEvent.on(this._content,"click",this.fold,this),this._close&&t.DomEvent.on(this._close,"click",this.fold,this),this._show&&t.DomEvent.on(this._show,"click",this.unfold,this),this.options.collapsed?this.fold():this.unfold(),this.options.responsive&&(this._setContentBodyMaxHeightRef=e.debounce(this,this._setContentBodyMaxHeight,250),window.addEventListener("resize",this._setContentBodyMaxHeightRef)),this.container},onRemove:function(e){e.off("preclick",this.fold,this),this.options.closeOnClick&&t.DomEvent.off(this._content,"click",this.fold,this),this._close&&t.DomEvent.off(this._close,"click",this.fold,this),this._show&&t.DomEvent.off(this._show,"click",this.unfold,this),t.DomEvent.off(this.container,"click",this._bringToFront,this),this._timeout&&clearTimeout(this._timeout),this.options.responsive&&window.removeEventListener("resize",this._setContentBodyMaxHeightRef)},fold:function(){return this.container.classList.add(p.collapsed),this._content.style.maxHeight=0,this},_isCollapsed:function(){return this.container.classList.contains(p.collapsed)},_setContentBodyMaxHeight:function(){var t=this._map.getContainer().getBoundingClientRect(),e=t.height,i=this.container.offsetTop;this._footer&&(i=Math.abs(i+this._footer.getBoundingClientRect().height)),this._header&&(i=Math.abs(i+this._header.getBoundingClientRect().height)),this._content.style.maxHeight=Math.floor(e-i-60)+"px"},unfold:function(){return this.container.classList.remove(p.collapsed),this._setContentBodyMaxHeight(),this},clear:function(){return u(this._contentBody),u(this._contentHeader),this},addContent:function(t){return c(t,this._contentBody),this._isCollapsed()||this._setContentBodyMaxHeight(),this},addContentHeader:function(t){return c(t,this._contentHeader),this._isCollapsed()||this._setContentBodyMaxHeight(),this},setContent:function(t){return this.clear().addContent(t)},_bringToFront:function(){h+=1,this.container.parentElement.style.zIndex=h}}),function(e){return new t.Foldable(e)}}.apply(e,n))&&(t.exports=r)},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";var n,r;n=[i(50),i(8),i(3)],void 0!==(r=function(t,e,i){function n(t){var i={};return t.options.layer&&(i.layer=t.options.layer),t.options.style&&(i.style=t.options.style),i.key=e.getKey("services/display"),i.center=t.getCenter().wrap(),i.zoom=t.getZoom(),i.width=t.getSize().x,i.height=t.getSize().y,i.language=t.getLocaleService().getCurrentLocale().getLanguageCode(),i}function r(e){var i=n(e);return new t(i)}return i.Map.include({getStaticMapUrl:function(){var t=null;return r(this).go(function(e){t=e}),t}}),{createFromMapInstance:r,getConfigFromMapInstance:n}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(3),i(0),i(7),i(2),i(4),i(17)],void 0!==(r=function(t,e,i,n,r,o){function a(t){if(!g[t.layer]||-1===g[t.layer].indexOf(t.format))throw new Error("Unsupported layer. Please change to PNG or use basic layer.")}function s(t){if(t.bbox&&t.center)throw new Error("The bbox and center properties cannot be used together")}function l(t){if(!t.bbox&&!t.center)throw new Error("Either bbox or center property must be provided")}function u(t){if(t.bbox&&(e.isValidNumber(t.width)||e.isValidNumber(t.height)))throw new Error("The bbox, width and height properties cannot be used together")}function c(t){a(t),s(t),l(t),u(t)}function h(t){return t.minLon+","+t.minLat+","+t.maxLon+","+t.maxLat}function p(e,i){var n,r;if("bbox"===e)i=h(i);else{if("zoom"===e)return String(parseInt(i,10)-1);if("center"===e)return n=i.split(","),r=t.latLng(parseFloat(n[0]),n[1]),r.lng+","+r.lat}return i}function f(t){var e=Object.keys(y).reduce(function(e,i){var n=t[i];return void 0!==n&&(n=p(i,n),e.push(i+"="+encodeURI(n))),e},[]);return _+"?"+e.join("&")}function d(t,e){c(t),e&&e(f(t))}function m(t){return i.call(this,e.clone(y),d,t)}var _=o["endpoints.staticMapImage"],g={basic:["jpg","jpeg","png"],hybrid:["png"],labels:["png"]},y={layer:{validator:n.oneOfValue(["basic","hybrid","labels"],"layers"),defaultValue:"basic"},style:{validator:n.oneOfValue(["main","night"],"styles"),defaultValue:"main"},format:{validator:n.oneOfValue(["png","jpg","jpeg"],"formats"),defaultValue:"png"},key:{validator:n.string,required:!0},zoom:{validator:n.integerInInterval(-1,20),converter:r.integer},center:{converter:r.point,validator:n.point},width:{validator:n.integerInInterval(0,8192)},height:{validator:n.integerInInterval(0,8192)},bbox:{validator:n.boundingBox,converter:r.boundingBox},view:{validator:n.geopolView("maps","view")},language:{validator:n.locale("maps")}};return m}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(52)],void 0!==(r=function(t){function e(t,e){return encodeURIComponent(t)+"="+encodeURIComponent(e)}function i(t,i){var n=i[t];return Array.isArray(n)?n.map(function(i){return e(t,i)}).join("&"):e(t,i[t])}function n(t,e){var n;return e?(n=Object.keys(e).map(function(t){return i(t,e)}).join("&"),t+"?"+n):t}return function(e,i,r){return n(t(e,i),r)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){return void 0===t}function e(t){return"function"===typeof t}return function(i,n){return i.replace(/\{ *([\w_]+) *\}/g,function(i,r){var o=n[r];return t(o)?"{"+r+"}":e(o)?o(r):o})}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(54),i(120),i(7),i(2)],void 0!==(r=function(t,e,i,n){function r(i,n){t.caption(o,i,function(t){n.call(this,e(t))})}var o={key:{validator:n.string},protocol:{validator:n.oneOfValue(["http","https"],"protocol")}};return function(t){return i(o,r,t)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(5),i(10),i(9)],void 0!==(r=function(t,e,i){return{copyrightsWorld:e(t.copyrightsWorld,i.display),copyrightsBounds:e(t.copyrightsBounds,i.display),caption:e(t.caption,i.display)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(6)],void 0!==(r=function(t){return{setField:function(e){var i=Object.assign({},e);return i.contentType={application:t.PATH},i},setValue:function(t){return t.contentType="json",t}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{"af-ZA":{label:"Afrikaans",routing:{fallback:"af-ZA",isNative:!0},search:{fallback:"af-ZA",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},ar:{label:"Arabic",routing:{fallback:"ar",isNative:!0},search:{fallback:"ar",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"ar",isNative:!0}},"bg-BG":{label:"Bulgarian",routing:{fallback:"bg-BG",isNative:!0},search:{fallback:"bg-BG",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"bg-BG",isNative:!0}},"ca-ES":{label:"Spanish (Catalan)",routing:{fallback:"es-ES",isNative:!1},search:{fallback:"ca-ES",isNative:!0},traffic:{fallback:"ca",isNative:!0},maps:{fallback:"es-ES",isNative:!1}},"cs-CZ":{label:"Czech",routing:{fallback:"cs-CZ",isNative:!0},search:{fallback:"cs-CZ",isNative:!0},traffic:{fallback:"cs",isNative:!0},maps:{fallback:"cs-CZ",isNative:!0}},"da-DK":{label:"Danish",routing:{fallback:"da-DK",isNative:!0},search:{fallback:"da-DK",isNative:!0},traffic:{fallback:"da",isNative:!0},maps:{fallback:"da-DK",isNative:!0}},"nl-BE":{label:"Dutch (Belgium)",routing:{fallback:"nl-NL",isNative:!1},search:{fallback:"nl-BE",isNative:!0},traffic:{fallback:"nl",isNative:!1},maps:{fallback:"nl-NL",isNative:!1}},"nl-NL":{label:"Dutch",routing:{fallback:"nl-NL",isNative:!0},search:{fallback:"nl-NL",isNative:!0},traffic:{fallback:"nl",isNative:!0},maps:{fallback:"nl-NL",isNative:!0}},"en-AU":{label:"English (Australia)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"en-AU",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-AU",isNative:!0}},"en-NZ":{label:"English (New Zealand)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"en-NZ",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-NZ",isNative:!0}},"en-GB":{label:"English (Great Britain)",routing:{fallback:"en-GB",isNative:!0},search:{fallback:"en-GB",isNative:!0},traffic:{fallback:"en",isNative:!0},maps:{fallback:"en-GB",isNative:!0}},"en-US":{label:"English (USA)",routing:{fallback:"en-US",isNative:!0},search:{fallback:"en-US",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-US",isNative:!0}},"en-CA":{label:"English (Canada)",routing:{fallback:"en-US",isNative:!1},search:{fallback:"en-US",isNative:!1},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-CA",isNative:!0}},"et-EE":{label:"Estonian",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"et-EE",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"eu-ES":{label:"Basque (Spain)",routing:{fallback:"es-ES",isNative:!1},search:{fallback:"eu-ES",isNative:!0},traffic:{fallback:"es",isNative:!1},maps:{fallback:"es-ES",isNative:!1}},"fi-FI":{label:"Finnish",routing:{fallback:"fi-FI",isNative:!0},search:{fallback:"fi-FI",isNative:!0},traffic:{fallback:"fi",isNative:!0},maps:{fallback:"fi-FI",isNative:!0}},"fr-CA":{label:"French (Canada)",routing:{fallback:"fr-FR",isNative:!1},search:{fallback:"fr-CA",isNative:!0},traffic:{fallback:"fr",isNative:!1},maps:{fallback:"fr-FR",isNative:!1}},"fr-FR":{label:"French",routing:{fallback:"fr-FR",isNative:!0},search:{fallback:"fr-FR",isNative:!0},traffic:{fallback:"fr",isNative:!0},maps:{fallback:"fr-FR",isNative:!0}},"de-DE":{label:"German",routing:{fallback:"de-DE",isNative:!0},search:{fallback:"de-DE",isNative:!0},traffic:{fallback:"de",isNative:!0},maps:{fallback:"de-DE",isNative:!0}},"el-GR":{label:"Greek",routing:{fallback:"el-GR",isNative:!0},search:{fallback:"el-GR",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"el-GR",isNative:!0}},"gl-ES":{label:"Galician (Spain)",routing:{fallback:"es-ES",isNative:!1},search:{fallback:"gl-ES",isNative:!0},traffic:{fallback:"es",isNative:!1},maps:{fallback:"es-ES",isNative:!1}},"he-IL":{label:"Hebrew (Israel)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"he-IL",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"hr-HR":{label:"Croatian",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"hr-HR",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"hu-HU":{label:"Hungarian",routing:{fallback:"hu-HU",isNative:!0},search:{fallback:"hu-HU",isNative:!0},traffic:{fallback:"hu",isNative:!0},maps:{fallback:"hu-HU",isNative:!0}},"id-ID":{label:"Indonesian",routing:{fallback:"id-ID",isNative:!0},search:{fallback:"id-ID",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"id-ID",isNative:!0}},"it-IT":{label:"Italian",routing:{fallback:"it-IT",isNative:!0},search:{fallback:"it-IT",isNative:!0},traffic:{fallback:"it",isNative:!0},maps:{fallback:"it-IT",isNative:!0}},"kk-KZ":{label:"Kazakh (Kazakhstan)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"kk-KZ",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"ko-KR":{label:"Korean",routing:{fallback:"ko-KR",isNative:!0},search:{fallback:"en-GB",isNative:!1},traffic:{fallback:"en",isNative:!1},maps:{fallback:"ko-KR",isNative:!0}},"lv-LV":{label:"Latvian",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"lv-LV",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"lt-LT":{label:"Lithuanian",routing:{fallback:"lt-LT",isNative:!0},search:{fallback:"lt-LT",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"lt-LT",isNative:!0}},"ms-MY":{label:"Malay",routing:{fallback:"ms-MY",isNative:!0},search:{fallback:"ms-MY",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"ms-MY",isNative:!0}},NGT:{label:"Neutral Ground Truth",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"en-GB",isNative:!1},traffic:{fallback:"en",isNative:!1},maps:{fallback:"NGT",isNative:!0}},"NGT-Latn":{label:"Neutral Ground Truth (Latin)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"en-GB",isNative:!1},traffic:{fallback:"en",isNative:!1},maps:{fallback:"NGT-Latn",isNative:!0}},"no-NO":{label:"Norwegian",routing:{fallback:"nb-NO",isNative:!1},search:{fallback:"no-NO",isNative:!0},traffic:{fallback:"no",isNative:!0},maps:{fallback:"nb-NO",isNative:!1}},"nb-NO":{label:"Norwegian",routing:{fallback:"nb-NO",isNative:!0},search:{fallback:"no-NO",isNative:!1},traffic:{fallback:"no",isNative:!1},maps:{fallback:"nb-NO",isNative:!0}},"pl-PL":{label:"Polish",routing:{fallback:"pl-PL",isNative:!0},search:{fallback:"pl-PL",isNative:!0},traffic:{fallback:"pl",isNative:!0},maps:{fallback:"pl-PL",isNative:!0}},"pt-BR":{label:"Portuguese (Brazil)",routing:{fallback:"pt-BR",isNative:!0},search:{fallback:"pt-BR",isNative:!0},traffic:{fallback:"pt",isNative:!1},maps:{fallback:"pt-BR",isNative:!0}},"pt-PT":{label:"Portuguese (Portugal)",routing:{fallback:"pt-PT",isNative:!0},search:{fallback:"pt-PT",isNative:!0},traffic:{fallback:"pt",isNative:!0},maps:{fallback:"pt-PT",isNative:!0}},"ro-RO":{label:"Romanian (Romania)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"ro-RO",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"ru-Cyrl-RU":{label:"Russian (Cyrillic)",routing:{fallback:"ru-RU",isNative:!1},search:{fallback:"ru-RU",isNative:!1},traffic:{fallback:"en",isNative:!1},maps:{fallback:"ru-Cyrl-RU",isNative:!0}},"ru-Latn-RU":{label:"Russian (Latin)",routing:{fallback:"ru-RU",isNative:!1},search:{fallback:"ru-RU",isNative:!1},traffic:{fallback:"en",isNative:!1},maps:{fallback:"ru-Latn-RU",isNative:!0}},"ru-RU":{label:"Russian",routing:{fallback:"ru-RU",isNative:!0},search:{fallback:"ru-RU",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"ru-RU",isNative:!0}},"sk-SK":{label:"Slovak",routing:{fallback:"sk-SK",isNative:!0},search:{fallback:"sk-SK",isNative:!0},traffic:{fallback:"sk",isNative:!0},maps:{fallback:"sk-SK",isNative:!0}},"sl-SI":{label:"Slovenian",routing:{fallback:"sl-SI",isNative:!0},search:{fallback:"sl-SI",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"sl-SI",isNative:!0}},"sr-RS":{label:"Serbian",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"sr-RS",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"es-ES":{label:"Spanish (Castilian)",routing:{fallback:"es-ES",isNative:!0},search:{fallback:"es-ES",isNative:!0},traffic:{fallback:"es",isNative:!0},maps:{fallback:"es-ES",isNative:!0}},"es-419":{label:"Spanish (Latin American)",routing:{fallback:"es-ES",isNative:!1},search:{fallback:"es-419",isNative:!0},traffic:{fallback:"es",isNative:!1},maps:{fallback:"es-ES",isNative:!1}},"es-MX":{label:"Spanish (Mexico)",routing:{fallback:"es-MX",isNative:!0},search:{fallback:"es-ES",isNative:!1},traffic:{fallback:"es",isNative:!1},maps:{fallback:"es-MX",isNative:!0}},"sv-SE":{label:"Swedish",routing:{fallback:"sv-SE",isNative:!0},search:{fallback:"sv-SE",isNative:!0},traffic:{fallback:"sv",isNative:!0},maps:{fallback:"sv-SE",isNative:!0}},"th-TH":{label:"Thai",routing:{fallback:"th-TH",isNative:!0},search:{fallback:"th-TH",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"th-TH",isNative:!0}},"tr-TR":{label:"Turkish",routing:{fallback:"tr-TR",isNative:!0},search:{fallback:"tr-TR",isNative:!0},traffic:{fallback:"tr",isNative:!0},maps:{fallback:"tr-TR",isNative:!0}},"uk-UA":{label:"Ukrainian",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"uk-UA",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"vi-VN":{label:"Vietnamese (Viet Nam)",routing:{fallback:"en-GB",isNative:!1},search:{fallback:"vi-VN",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"en-GB",isNative:!1}},"zh-CN":{label:"Chinese (PRC)",routing:{fallback:"zh-TW",isNative:!1},search:{fallback:"zh-CN",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"zh-TW",isNative:!1}},"zh-TW":{label:"Chinese (Taiwan)",routing:{fallback:"zh-TW",isNative:!0},search:{fallback:"zh-TW",isNative:!0},traffic:{fallback:"en",isNative:!1},maps:{fallback:"zh-TW",isNative:!0}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(31)],void 0!==(r=function(t){return function(e,i){return new t(e).getValueFor(i)===e}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{Unified:{label:"Unified"},IN:{label:"India"},IL:{label:"Israel"},MA:{label:"Morocco"},PK:{label:"Pakistan"},AR:{label:"Argentina",search:{fallback:"Unified"}},Arabic:{label:"Arabic",search:{fallback:"Unified"},reverseGeocoder:{fallback:"Unified"}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(54),i(123),i(7),i(22),i(124)],void 0!==(r=function(t,e,i,n,r){function o(t,e){return t.minLon=e.minLon,t.maxLon=e.maxLon,t.minLat=e.minLat,t.maxLat=e.maxLat,t}function a(e){var i=r.modifyFields(e);return function(e,n){return void 0!==e.minLon&&void 0!==e.minLat&&void 0!==e.maxLon&&void 0!==e.maxLat?t.copyrightsBounds(i,e,n):t.copyrightsWorld(i,e,n)}}function s(t,i){r.modifyRequestOptions(t),n(a(l),e,t,i,o)}var l=r.create();return function(t){return i(l,s,t)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t,e){return t===e}return function(e,i,n){var r,o,a;for(n||(n=t),r=e.concat(i),o=0;o<e.length;o+=1)for(a=e.length;a<r.length;a+=1)n(r[o],r[a])&&(r.splice(a,1),a-=1);return r}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(0)],void 0!==(r=function(t,e){return t.MessageBox=t.Layer.extend({options:{closeable:!0,closeAfter:0},initialize:function(e){t.Util.setOptions(this,e)},onAdd:function(e){var i;return this._map=e,this._container=this.container=t.DomUtil.create("div","leaflet-messageBox tomtom-copyrights"),this.contentContainer=t.DomUtil.create("div","leaflet-messageBox-content",this.container),this.options.closeable&&(this.closeButton=t.DomUtil.create("div","leaflet-messageBox-close-button",this.container),this.closeButton.innerHTML="&#215;",t.DomEvent.on(this.closeButton,"click",this.onRemove,this)),i=this,this.options.closeAfter&&parseInt(this.options.closeAfter,10)===this.options.closeAfter&&setTimeout(function(){i.close()},this.options.closeAfter),t.DomEvent.disableClickPropagation(this.container),t.DomEvent.disableScrollPropagation(this.container),this.options.content&&this.setContent(this.options.content),e._container.appendChild(this.container),this.container},addTo:function(t){return t.addLayer(this),this},onRemove:function(){return this._map._container.contains(this.container)&&this._map._container.removeChild(this.container),this},setContent:function(t){if(!this.contentContainer)return this.options.content=t,this;if(e.isString(t))return this.contentContainer.innerHTML=t||"",this;for(;this.contentContainer.firstChild;)this.contentContainer.lastChild.remove();return this.contentContainer.appendChild(t),this},close:function(){return this.onRemove()},openOn:function(t){return this.addTo(t)}}),t.messageBox=function(e){return new t.MessageBox(e)},t.messageBox}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[],void 0!==(r=function(){return{hasProperty:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},isNotNull:function(t){return null!==t&&("function"===typeof t||"object"===("undefined"===typeof t?"undefined":o(t)))}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(131),i(132),i(7),i(2),i(4),i(22),i(6)],void 0!==(r=function(t,e,i,n,r,o,a){function s(t,e){return t.minLon=e.minLon,t.maxLon=e.maxLon,t.minLat=e.minLat,t.maxLat=e.maxLat,t}function l(t){var e={application:a.PATH},i=Object.assign({},t);return i.boundingBox&&(i.minLon=e,i.maxLon=e,i.minLat=e,i.maxLat=e,delete i.boundingBox),i}function u(e,i){return t.incidentsDetails(l(h),e,i)}function c(t){return function(i,n){o(u,e(t),i,n,s)}}var h={key:{validator:n.string},zoomLevel:{validator:n.zoomLevel,required:!0,application:a.PATH,name:"zoom"},boundingBox:{converter:r.boundingBox,validator:n.boundingBox,required:!0},style:{validator:n.oneOfValue(["s1","s2","s3","night"],"traffic style"),required:!0,application:a.PATH},language:{converter:r.trafficIncidentsLanguage,validator:n.trafficIncidentsLanguage},trafficModelID:{validator:n.integer,defaultValue:-1,application:a.PATH},geometries:{validator:n.oneOfValue(["shifted","original"],"traffic geometries")},expandCluster:{validator:n.bool,defaultValue:!1},preserveCluster:{validator:n.bool,defaultValue:!1},originalPosition:{validator:n.bool,defaultValue:!1},protocol:{validator:n.oneOfValue(["http","https"],"protocol")},projection:{defaultValue:"EPSG4326"}};return function(t){return t=t||{},t.__serviceType="traffic",i(h,c(t&&t.preserveCluster),t)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(35),i(14),i(0)],void 0!==(r=function(t,e,i,n){function r(t,e){return t.distance=i.formatDistance(t.lengthMeters,e),t.time=i.formatTime(t.delaySeconds),t.incidentSeverity=t.incidentSeverity||"unknown",t.icon=a[t.incidentCategory],s.render(t)}function o(t){return{popupAnchor:[0,-5],background:{iconSize:[20,20],iconAnchor:[10,10],icon:"icon-circle-"+(t.properties.incidentSeverity||"unknown")},icon:{iconSize:[20,20],iconAnchor:[0,0],icon:"icon-"+a[t.properties.incidentCategory]+"-white"},content:{content:null,iconSize:[20,20],iconAnchor:[0,0],style:{color:"#fff","font-weight":"bold","font-size":"11px"}}}}var a={Unknown:"danger",Accident:"accident",Fog:"danger","Dangerous Conditions":"danger",Rain:"danger",Ice:"ice",Jam:"incident","Lane Closed":"laneclosed","Road Closed":"roadclosed","Road Works":"roadwork",Wind:"danger",Flooding:"danger",Detour:"danger",Cluster:""},s=new e(' <div class="traffic-details"> <div class="traffic-icon"> <div class="icon-circle-{{=incidentSeverity}}"> <div class="icon-{{=icon}}-white"></div> </div> </div> {{roadNumber}} <div class="road-shield">{{=roadNumber}}</div> {{/roadNumber}} <div class="traffic-description"> <div class="incident-category">{{=incidentCategory}}</div> <div class="incident-delay-length" {{!delaySeconds}} {{!lengthMeters}} style="display:none;" {{/!lengthMeters}} {{/!delaySeconds}} > {{delaySeconds}} <div class="incident-delay">{{=time}}</div> {{/delaySeconds}} {{lengthMeters}} <div class="incident-length">{{=distance}}</div> {{/lengthMeters}} </div> </div></div>');return t.Marker.IncidentMarker=t.Marker.extend({options:{imperialUnits:!1},iconsMapping:a,initialize:function(e,i,n){t.Util.setOptions(this,n),t.Marker.prototype.initialize.call(this,i,n),this.setFeature(e)},setFeature:function(t){var e=this.feature||{};this.feature=t,this.setLatLng(this.feature.geometry.coordinates.reverse()),n.isEqual(this.feature.properties,e.properties)||(this._updateIcon(),this._updatePopup())},_updateIcon:function(){this.setIcon(t.svgIcon(o(this.feature)))},_updatePopup:function(){var t=r(this.feature.properties,this.options.imperialUnits);this.getPopup()?this.setPopupContent(t):this.bindPopup(t,{className:"incidents-popup"})}}),function(e,i,n){return e&&e.properties?new t.Marker.IncidentMarker(e,i,{imperialUnits:(n||{}).imperialUnits}):null}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1)],void 0!==(r=function(t){return{loadAnimationFactory:function(e){return function(){var i=e._bgBuffer;i.style[t.DomUtil.TRANSITION]="opacity 10",i.style.opacity=.1,e._tileContainer.style.opacity=e.options.opacity}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){return{fillInTiles512Options:function(t){512===t.tileSize&&(t.zoomOffset-=1,t.minZoom=t.minZoom>0?t.minZoom-1:0)},fillInSubdomainsOptions:function(e){t.isString(e.subdomains)&&(e.subdomains=e.subdomains.split(""))}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){switch(t){case"vectorTrafficFlow":return{style:["vectorTrafficFlow"],layer:["absolute","relative","relative-delay"]};case"vector":default:return{style:["main","night"],layer:["basic","hybrid","labels"]}}}function e(t,e,i){return!(!e||!e[i])&&-1!==t[i].indexOf(e[i])}function i(t,i,n,r){e(t,i,r)&&(n[r]=i[r])}return{getTheme:function(e,n){var r,o,a=t(n),s={style:a.style[0],layer:a.layer[0]},l=e?e.length:0;for(r=0;r<l;++r)o=e[r],i(a,o,s,"style"),i(a,o,s,"layer");return s}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{updateMaxZoom:function(t,e){var i;switch(e){case"raster":i=20;break;case"vector":i=22;break;default:return}"undefined"===typeof t.options.maxZoom?t._originalMaxZoom=1/0:t._originalMaxZoom!==1/0&&(t._originalMaxZoom=t.options.maxZoom),"number"===typeof t.options.maxZoom&&(i=Math.min(i,t._originalMaxZoom)),t.setMaxZoom(i)}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(8),i(11),i(5),i(67),i(65),i(66),i(68),i(12),i(36)],void 0!==(r=function(t,e,i,n,r,o,a,s,l,u){function c(e){return e.detectRetina&&t.Browser.retina?512:256}return t.TomTomLayer=t.TileLayer.extend({options:{attribution:"",minZoom:2,maxZoom:20,subdomains:"abcd",reuseTiles:!0,detectRetina:!0},name:"raster",initialize:function(o){var s,l,h;o=t.setOptions(this,o),o.bounds&&(o.bounds=t.latLngBounds(o.bounds)),e.setKey(o.key),s=e.getKey("services/display"),o.accessToken=s,h=(s?"key={accessToken}":"")+(o.geopolView?"&view={geopolView}":"")+(o.language?"&language={language}":"")+"&tileSize="+c(o),this._url=i.protocol()+"://"+n.tileLayer+(h?"?"+h:""),l=r.getTheme([o]),o.style=l.style,o.layer=l.layer,a.fillInSubdomainsOptions(o),u.fixTileScale.call(this)},onAdd:function(e){this._map=e,t.TileLayer.prototype.onAdd.call(this,e),this._animated&&this.on("load",o.loadAnimationFactory(this)),this._updateOpacity(),this.bringToBack(),s.updateMaxZoom(e,this.name)},updateOptions:function(t){var e=r.getTheme([this.options,t]);this.options.style=e.style,this.options.layer=e.layer,this.redraw()},createTile:function(t,e){return l.customCreateTile(t,e,this)}}),t.tomTomLayer=function(e){return new t.TomTomLayer(e)},t.tomTomLayer}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(0),i(41)],void 0!==(r=function(t,e,i){function n(t){return-1!==a.indexOf(t)}function r(t){this[t]=function(i){var r,o;return void 0!==i?(r=this["_"+t],o=n(t)?e.convertToLatLng(i):i,this["_"+t]=o,n(t)&&this._calculateRouteIfPossible(),this.fire(u.PROPERTY_VALUE_CHANGED,{name:t,currentValue:o,previousValue:r}),r):this["_"+t]}}var o,a=["startPoint","endPoint"],s=["jsonRoute"],l=a.concat(s),u={PROPERTY_VALUE_CHANGED:"tomtom.propertyvaluechange"};return o=t.Evented.extend({initialize:function(){l.forEach(r,this)},_calculateRouteIfPossible:function(){var t,e,n,r,o;t=this.startPoint(),e=this.endPoint(),t&&e&&(n=t.lat+","+t.lng,r=e.lat+","+e.lng,o=n+":"+r,i().locations(o).go().then(this.jsonRoute.bind(this)))}}),o.Events=u,o}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(4),i(2),i(72),i(0),i(6)],void 0!==(r=function(t,e,i,n,r){var o=i(["locations","maxAlternatives","instructionsType","language","computeBestOrder","routeRepresentation","vehicleHeading","report","callback","minDeviationTime","minDeviationDistance","alternativeType"]),a={validator:e.arrayOf({point:{validator:e.objectOf({latitude:{validator:e.latitude,required:!0},longitude:{validator:e.longitude,required:!0}})}}),converter:t.arrayOf({point:{converter:t.objectOf({latitude:{converter:t.latitude,required:!0},longitude:{converter:t.longitude,required:!0}})}}),required:!0,application:r.POST};return o.origins=a,o.destinations=a,function(t){var e=n.clone(o);return t instanceof Array&&t.forEach(function(t){delete e[t]}),e}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(73),i(0),i(2),i(43),i(4),i(6)],void 0!==(r=function(t,e,i,n,r,o){var a={locations:{validator:i.routingLocations,converter:r.routingLocations,required:!0,application:o.PATH},maxAlternatives:{validator:i.numberInInterval(0,5)},instructionsType:{validator:i.oneOfValue(["coded","text","tagged"],"instructions type")},language:{validator:i.routingGuidanceLanguage,converter:r.routingGuidanceLanguage},computeBestOrder:{validator:i.bool},routeRepresentation:{validator:i.oneOfValue(["polyline","none","summaryOnly"],"route representation")},computeTravelTimeFor:{validator:i.oneOfValue(["none","all"],"compute travel time for")},vehicleHeading:{validator:i.integerInInterval(-1,359)},minDeviationDistance:{validator:i.naturalInteger,postValidator:[n.firstParamCannotBeUsedWithSecond("minDeviationDistance","arriveAt"),n.requiresDependantParameter("minDeviationDistance","supportingPoints")]},minDeviationTime:{validator:i.naturalInteger,postValidator:[n.firstParamCannotBeUsedWithSecond("minDeviationTime","arriveAt"),n.requiresDependantParameter("minDeviationTime","supportingPoints")]},supportingPoints:{converter:r.supportingPoints,application:o.POST},sectionType:{validator:i.arrayOfValues(["carTrain","country","ferry","motorway","pedestrian","tollRoad","tollVignette","travelMode","tunnel","traffic"],"sectionType"),converter:r.arrayOfStrings},alternativeType:{validator:i.oneOfValue(["anyRoute","betterRoute"],"alternativeType"),postValidator:n.requiresDependantParameter("alternativeType","supportingPoints")}};return a=e.extend(a,t),function(t){var i=e.clone(a);return t instanceof Array&&t.forEach(function(t){delete i[t]}),i}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(2),i(4),i(43),i(6)],void 0!==(r=function(t,e,i,n){return{key:{validator:t.string},routeType:{validator:t.oneOfValue(["fastest","shortest","eco","thrilling"],"route type")},traffic:{validator:t.bool},avoid:{validator:t.arrayOfValues(["tollRoads","motorways","ferries","unpavedRoads","carpools","alreadyUsedRoads"],"avoid"),converter:e.arrayOfStrings},departAt:{validator:t.departAt,converter:e.dateTime},arriveAt:{validator:t.arriveAt,converter:e.dateTime},travelMode:{validator:t.oneOfValue(["car","truck","taxi","bus","van","motorcycle","bicycle","pedestrian"],"travel mode")},hilliness:{validator:t.oneOfValue(["low","normal","high"],"hilliness")},windingness:{validator:t.oneOfValue(["low","normal","high"],"windingness")},report:{validator:t.oneOfValue(["effectiveSettings"],"report")},vehicleEngineType:{validator:t.oneOfValue(["combustion","electric"],"vehicle engine type")},vehicleMaxSpeed:{validator:t.naturalInteger},vehicleWeight:{validator:t.naturalInteger,postValidator:i.vehicleWeight},vehicleAxleWeight:{validator:t.naturalInteger},vehicleLength:{validator:t.numberInInterval(0,Number.MAX_VALUE)},vehicleWidth:{validator:t.numberInInterval(0,Number.MAX_VALUE)},vehicleHeight:{validator:t.numberInInterval(0,Number.MAX_VALUE)},vehicleCommercial:{validator:t.bool},vehicleLoadType:{validator:t.arrayOfValues(["USHazmatClass1","USHazmatClass2","USHazmatClass3","USHazmatClass4","USHazmatClass5","USHazmatClass6","USHazmatClass7","USHazmatClass8","USHazmatClass9","otherHazmatExplosive","otherHazmatGeneral","otherHazmatHarmfulToWater"],"vehicle load type"),converter:e.arrayOfStrings},constantSpeedConsumptionInLitersPerHundredkm:{postValidator:i.constantSpeedConsumption("combustion"),converter:e.constantSpeedConsumption},currentFuelInLiters:{postValidators:i.floatAndEngineType("combustion","currentFuelInLiters")},auxiliaryPowerInLitersPerHour:{postValidators:i.floatAndEngineType("combustion","auxiliaryPowerInLitersPerHour")},fuelEnergyDensityInMJoulesPerLiter:{postValidator:i.fuelEnergyDensityInMJoulesPerLiter},accelerationEfficiency:{postValidator:i.efficiencyParameter("accelerationEfficiency","decelerationEfficiency")},decelerationEfficiency:{postValidator:i.efficiencyParameter("decelerationEfficiency","accelerationEfficiency")},uphillEfficiency:{postValidator:i.efficiencyParameter("uphillEfficiency","downhillEfficiency")},downhillEfficiency:{postValidator:i.efficiencyParameter("downhillEfficiency","uphillEfficiency")},constantSpeedConsumptionInkWhPerHundredkm:{postValidator:i.constantSpeedConsumption("electric"),converter:e.constantSpeedConsumption},currentChargeInkWh:{postValidator:i.chargeParameter("currentChargeInkWh","maxChargeInkWh")},maxChargeInkWh:{postValidator:i.chargeParameter("maxChargeInkWh","currentChargeInkWh")},auxiliaryPowerInkW:{postValidator:i.floatAndEngineType("electric","auxiliaryPowerInkW")},protocol:{validator:t.oneOfValue(["http","https"],"protocol")},avoidAreas:{converter:e.avoidAreas,application:n.POST},avoidVignette:{validator:t.countrySetAlpha3.bind(this,!1),postValidator:i.firstParamCannotBeUsedWithSecond("avoidVignette","allowVignette"),converter:e.arrayOfStrings,application:n.POST},allowVignette:{validator:t.countrySetAlpha3.bind(this,!0),postValidator:i.firstParamCannotBeUsedWithSecond("allowVignette","avoidVignette"),converter:e.arrayOfStrings,application:n.POST}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(11),i(5)],void 0!==(r=function(t,e){return function(i,n){return function(r){t.get({url:"{protocol}://"+e.origin+r,callbackParam:"callback",fail:n.fail,callback:i})}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0),i(141)],void 0!==(r=function(t,e){function i(){return{type:"FeatureCollection",features:[]}}return function(n){var r,o;if(t.isString(n))try{n=JSON.parse(n)}catch(t){return null}if(n.error)return{error:n.error};if(r=i(),r.optimizedWaypoints=n.optimizedWaypoints,!n||!n.routes)return r;for(o=0;o<n.routes.length;o+=1)r.features.push(e(n.routes[o]));return r}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1)],void 0!==(r=function(t){function e(t){try{return"string"===typeof t?document.querySelector(t).getBoundingClientRect():t.getBoundingClientRect()}catch(t){return null}}function i(t,e,i,n,r){"top"===i&&"left"===e&&"width"===n?t.paddingTopLeft.x+=r[n]:"top"===i&&"left"===e&&"height"===n?t.paddingTopLeft.y+=r[n]:"top"===i&&"left"===e&&"both"===n?(t.paddingTopLeft.x+=r.width,t.paddingTopLeft.y+=r.height):"top"===i&&"right"===e&&"width"===n?t.paddingBottomRight.x+=r[n]:"top"===i&&"right"===e&&"height"===n?t.paddingTopLeft.y+=r[n]:"top"===i&&"right"===e&&"both"===n?(t.paddingBottomRight.x+=r.width,t.paddingTopLeft.y+=r.height):"bottom"===i&&"left"===e&&"width"===n?t.paddingTopLeft.x+=r[n]:"bottom"===i&&"left"===e&&"height"===n?t.paddingBottomRight.y+=r[n]:"bottom"===i&&"left"===e&&"both"===n?(t.paddingTopLeft.x+=r.width,t.paddingBottomRight.y+=r.height):"bottom"===i&&"right"===e&&"width"===n?t.paddingBottomRight.x+=r[n]:"bottom"===i&&"right"===e&&"height"===n?t.paddingBottomRight.y+=r[n]:"bottom"===i&&"right"===e&&"both"===n&&(t.paddingBottomRight.x+=r.width,t.paddingBottomRight.y+=r.height)}function n(t,n,r){var o,a,s,l,u,c=r.split("-");c&&2===c.length&&(o=c[0],a=c[1],s=n[r],l=".leaflet-"+o+".leaflet-"+a,(u=e(l))&&i(t,a,o,s,u))}return t.MapUtils={findLayersByName:function(t,e){var i=[];return e.eachLayer(function(e){e.name===t&&i.push(e)}),i},getPaddingOptions:function(t){var i,r=t.controls,o=t.popup,a={paddingTopLeft:{x:0,y:0},paddingBottomRight:{x:0,y:0}};if(r)try{Object.getOwnPropertyNames(r).forEach(n.bind(null,a,r))}catch(t){}if(o)try{i=e(o),a.paddingTopLeft.x+=i.width/2,a.paddingBottomRight.x+=i.width/2,a.paddingTopLeft.y+=i.height}catch(t){}return a},setViewWithOffset:function(t,e,i,n,r){var o=t.project(e,i).subtract(r),a=t.unproject(o,i);t.setView(a,i,n)}},t.MapUtils}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{defaultIcons:{fallback:"flag",ACCESS_GATEWAY:"ic_map_poi_110",ADMINISTRATIVE_DIVISION:"ic_map_poi_133",ADVENTURE_SPORTS_VENUE:"ic_map_poi_122",AGRICULTURE:"ic_map_poi_107",AIRPORT:"ic_map_poi_007",AMUSEMENT_PARK:"ic_map_poi_051",AUTOMOTIVE_DEALER:"ic_map_poi_008",BANK:"ic_map_poi_077",BEACH:"ic_map_poi_043",BUILDING_POINT:"ic_map_poi_132",BUSINESS_PARK:"ic_map_poi_102",CAFE_PUB:"ic_map_poi_120",CAMPING_GROUND:"ic_map_poi_058",CAR_WASH:"ic_map_poi_067",CASH_DISPENSER:"ic_map_poi_042",CASINO:"ic_map_poi_009",CINEMA:"ic_map_poi_011",CITY_CENTER:"ic_map_poi_012",CLUB_ASSOCIATION:"ic_map_poi_131",COLLEGE_UNIVERSITY:"ic_map_poi_041",COMMERCIAL_BUILDING:"ic_map_poi_098",COMMUNITY_CENTER:"ic_map_poi_081",COMPANY:"ic_map_poi_013",COURTHOUSE:"ic_map_poi_015",CULTURAL_CENTER:"ic_map_poi_016",DENTIST:"ic_map_poi_048",DEPARTMENT_STORE:"ic_map_poi_104",DOCTOR:"ic_map_poi_047",ELECTRIC_VEHICLE_STATION:"ic_map_poi_073",EMBASSY:"ic_map_poi_040",EMERGENCY_MEDICAL_SERVICE:"ic_map_poi_115",ENTERTAINMENT:"ic_map_poi_035",EXCHANGE:"ic_map_poi_096",EXHIBITION_CONVENTION_CENTER:"ic_map_poi_017",FERRY_TERMINAL:"ic_map_poi_018",FIRE_STATION_BRIGADE:"ic_map_poi_068",FRONTIER_CROSSING:"ic_map_poi_019",FUEL_FACILITIES:"ic_map_poi_004",GEOGRAPHIC_FEATURE:"ic_map_poi_127",GOLF_COURSE:"ic_map_poi_020",GOVERNMENT_OFFICE:"ic_map_poi_000",HEALTH_CARE_SERVICE:"ic_map_poi_116",HELIPAD_HELICOPTER_LANDING:"ic_map_poi_123",HOLIDAY_RENTAL:"ic_map_poi_130",HOSPITAL_POLYCLINIC:"ic_map_poi_021",HOTEL_MOTEL:"ic_map_poi_022",ICE_SKATING_RINK:"ic_map_poi_044",IMPORTANT_TOURIST_ATTRACTION:"ic_map_poi_023",INDUSTRIAL_BUILDING:"ic_map_poi_095",LEISURE_CENTER:"ic_map_poi_061",LIBRARY:"ic_map_poi_052",MANUFACTURING_FACILITY:"ic_map_poi_099",MARINA:"ic_map_poi_062",MARKET:"ic_map_poi_118",MEDIA_FACILITY:"ic_map_poi_101",MILITARY_INSTALLATION:"ic_map_poi_106",MOTORING_ORGANIZATION_OFFICE:"ic_map_poi_076",MOUNTAIN_PASS:"ic_map_poi_024",MUSEUM:"ic_map_poi_025",NATIVE_RESERVATION:"ic_map_poi_125",NIGHTLIFE:"ic_map_poi_050",NON_GOVERNMENTAL_ORGANIZATION:"ic_map_poi_134",OPEN_PARKING_AREA:"ic_map_poi_002",OTHER:"flag",PARKING_GARAGE:"ic_map_poi_003",PARK_RECREATION_AREA:"ic_map_poi_059",PETROL_STATION:"ic_map_poi_004",PHARMACY:"ic_map_poi_054",PLACE_OF_WORSHIP:"ic_map_poi_027",POLICE_STATION:"ic_map_poi_039",PORT_WAREHOUSE_FACILITY:"ic_map_poi_105",POST_OFFICE:"ic_map_poi_028",PRIMARY_RESOURCE_UTILITY:"ic_map_poi_108",PRISON_CORRECTIONAL_FACILITY:"ic_map_poi_094",PUBLIC_AMENITY:"ic_map_poi_097",PUBLIC_TRANSPORT_STOP:"ic_map_poi_069",RAILWAY_STATION:"ic_map_poi_005",RENT_A_CAR_FACILITY:"ic_map_poi_029",RENT_A_CAR_PARKING:"ic_map_poi_030",REPAIR_FACILITY:"ic_map_poi_053",RESEARCH_FACILITY:"ic_map_poi_100",RESIDENTIAL_ACCOMMODATION:"ic_map_poi_075",RESTAURANT:"ic_map_poi_031",RESTAURANT_AREA:"ic_map_poi_031",REST_AREA:"ic_map_poi_006",SCENIC_PANORAMIC_VIEW:"ic_map_poi_055",SCHOOL:"ic_map_poi_070",SHOP:"ic_map_poi_032",SHOPPING_CENTER:"ic_map_poi_033",SPORTS_CENTER:"ic_map_poi_038",STADIUM:"ic_map_poi_034",SWIMMING_POOL:"ic_map_poi_046",TENNIS_COURT:"ic_map_poi_045",THEATER:"ic_map_poi_035",TOURIST_INFORMATION_OFFICE:"ic_map_poi_023",TRAFFIC_LIGHT:"ic_map_poi_129",TRAFFIC_SERVICE_CENTER:"ic_map_poi_126",TRAFFIC_SIGN:"ic_map_poi_128",TRAIL_SYSTEM:"ic_map_poi_124",TRANSPORT_AUTHORITY_VEHICLE_REGISTRATION:"ic_map_poi_113",TRUCK_STOP:"ic_map_poi_071",VETERINARIAN:"ic_map_poi_049",WATER_SPORT:"ic_map_poi_046",WEIGH_STATION:"ic_map_poi_111",WELFARE_ORGANIZATION:"ic_map_poi_117",WINERY:"ic_map_poi_057",ZOOS_ARBORETA_BOTANICAL_GARDEN:"ic_map_poi_037"},singleColorIcons:{OPEN_PARKING_AREA:"",PARKING_GARAGE:"",RENT_A_CAR_PARKING:"",TRUCK_STOP:""}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(146),i(151),i(152),i(153),i(154),i(155),i(20)],void 0!==(r=function(t,e,i,n,r,o,a,s){function l(e,a){switch(e){case c.ENTRYPOINT:return i(a.parent.poi,a.type);case c.NAME:return a.poi?n(a.poi):t.DomUtil.create("span");case c.ADDRESS:return r(a);case c.COORDINATES:return o(a.position);default:return t.DomUtil.create("span")}}var u,c={ENTRYPOINT:"entryPoint",NAME:"name",ADDRESS:"address",COORDINATES:"coordinates"},h=Object.keys(c).map(function(t){return c[t]}),p={name:!0,address:!0,coordinates:!0,entryPoint:!1},f={content:"tomtom-point-content",details:"tomtom-point-content__details"};return u=function(t){this.options=t||p},u.prototype.generate=function(i,n){var r,o=t.DomUtil.create("div",f.content),u=t.DomUtil.create("div",f.details),c=e(i,n);return h.reduce(function(t,e){return this.options[e]&&t.appendChild(l(e,c)),t}.bind(this),u),u.children.length&&o.appendChild(u),this.options.actions&&(r=a(c,this.options.actions),o.appendChild(r.getHtmlElement())),new s(o,function(){r&&r.wrap()})},function(t){var e=new u(t);return e.generate.bind(e)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(3),i(80),i(81),i(147),i(82),i(19),i(0)],void 0!==(r=function(t,e,i,n,r,a,s){function l(t){g.forEach(function(e){"undefined"!==typeof t[e]&&(this[e]=t[e])},this)}function u(t){"undefined"!==typeof t.address&&(this.address=new e(t.address))}function c(t){"undefined"!==typeof t.position&&(this.position=s.convertToLatLng(t.position))}function h(t){"undefined"!==typeof t.poi&&(this.poi=new i(t.poi))}function p(t){"undefined"!==typeof t.addressRanges&&(this.addressRanges=new n(t.addressRanges))}function f(e){"undefined"!==typeof e.boundingBox&&(this.boundingBox=t.latLngBounds(s.convertToLatLng(e.boundingBox.btmRightPoint),s.convertToLatLng(e.boundingBox.topLeftPoint)))}function d(e){"undefined"!==typeof e.viewport&&(this.viewport=t.latLngBounds(s.convertToLatLng(e.viewport.btmRightPoint),s.convertToLatLng(e.viewport.topLeftPoint)))}function m(t){"undefined"!==typeof t.entryPoints&&(this.entryPoints=t.entryPoints.map(function(t){return new r(t)}))}var _,g=["dist","score","type","entityType"];return _=function(t){return l.call(this,t),u.call(this,t),c.call(this,t),h.call(this,t),p.call(this,t),f.call(this,t),d.call(this,t),m.call(this,t),this},_.prototype=Object.create(a.prototype),_.prototype.constructor=_,_.prototype.simplify=function(){var e,i={},n=function(t){return t.simplify()};for(e in this)this.hasOwnProperty(e)&&(this[e]instanceof Array&&this[e].length>0&&this[e][0].simplify?i[e]=this[e].map(n):"object"===o(this[e])&&this[e].simplify?i[e]=this[e].simplify():this[e]instanceof t.LatLng?i[e]={lat:this[e].lat,lon:this[e].lng}:this[e]instanceof t.LatLngBounds?i[e]={topLeftPoint:{lat:this[e].getSouthWest().lat,lon:this[e].getSouthWest().lng},btmRightPoint:{lat:this[e].getNorthEast().lat,lon:this[e].getNorthEast().lng}}:i[e]=this[e]);return i},_}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(19)],void 0!==(r=function(t){var e=["country","countryCode","countryCodeISO3","countrySecondarySubdivision","countryTertiarySubdivision","countrySubdivision","countrySubdivisionName","freeformAddress","municipality","municipalitySubdivision","postalCode","extendedPostalCode","streetName","streetNumber"],i=function(t){return e.forEach(function(e){"undefined"!==typeof t[e]&&(this[e]=t[e])},this),this};return i.prototype=Object.create(t.prototype),i.prototype.constructor=i,i}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(19)],void 0!==(r=function(t){var e=["categories","classifications","name","phone","url"],i=function(t){return e.forEach(function(e){"undefined"!==typeof t[e]&&(this[e]=t[e])},this),this};return i.prototype=Object.create(t.prototype),i.prototype.constructor=i,i}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(19),i(24),i(0)],void 0!==(r=function(t,e,i){var n=function(t,e){return this.position=i.convertToLatLng(t.position),this.type=t.type,this.parent=e,this};return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.simplify=function(){return{position:{lat:this.position.lat,lon:this.position.lng},type:this.type}},n.prototype.getAddress=function(){return e().position({lat:this.position.lat,lon:this.position.lng}).go()},n}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(148),i(84),i(7),i(2),i(4),i(0),i(149)],void 0!==(r=function(t,e,i,n,r,o,a){function s(t){this.options=t||{},this.options.__serviceType="reverseGeocoder",this.fields={}}function l(t){return new s(t).construct()}var u={reverseGeocode:"reverseGeocode",crossStreetLookup:"reverseGeocode/crossStreet"};return s.prototype.TYPE=u,s.prototype.construct=function(){var t;return this.fields=o.addFields.call(this,this.fields),t={batchItems:{validator:n.arrayOf(this.fields),converter:r.arrayOf(this.fields)},type:{validator:n.string}},Array.isArray(this.options)?i.call(this,t,this.handleBatchChain,{batchItems:this.options,type:this.fields.type.defaultValue}):i.call(this,this.fields,this.handleChain,this.options)},s.prototype.handleBatchChain=function(e,i){t.batch(this.fields,e,function(t){i.call(this,a(t))})},s.prototype.handleChain=function(i,n){t.reverseGeocode(this.fields,i,function(t){n.call(this,e(t)[0])})},l.prototype.constructor=s,l}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(13)],void 0!==(r=function(t){return function(e){return t(e,"addresses")}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(2),i(4),i(44),i(6)],void 0!==(r=function(t,e,i,n){var r={key:{validator:t.string},position:{converter:e.point,validator:t.point,required:!0,application:n.PATH},spatialKeys:{validator:t.bool},heading:{validator:t.number},radius:{validator:t.naturalInteger},protocol:{validator:t.oneOfValue(["http","https"],"protocol")}},o={type:{defaultValue:i.reverseGeocode,visible:!1,application:n.PATH},allowFreeformNewline:{validator:t.bool},returnSpeedLimit:{validator:t.bool},number:{validator:t.string},returnRoadUse:{validator:t.bool},returnMatchType:{validator:t.bool},roadUse:{converter:e.roadUse,validator:t.roadUse},language:{validator:t.languageCode,converter:e.language},view:{validator:t.geopolView("reverseGeocoder","view")}},a={type:{defaultValue:i.crossStreetLookup,visible:!1,application:n.PATH},limit:{validator:t.limit},language:{validator:t.languageCode}};return function(t){if(t===i.reverseGeocode)return Object.assign({},r,o);if(t===i.crossStreetLookup)return Object.assign({},r,a);throw new Error("Unsupported geocode type: "+t)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(87),i(77)],void 0!==(r=function(t,e,i){function n(t){return t&&t[0]&&void 0!==i.singleColorIcons[t[0].code]}var r=i.defaultIcons;return function(i){var o,a=i.classifications&&i.classifications.length>0,s=a?r[i.classifications[0].code]:"flag",l=n(i.classifications),u=e("icon-"+s+(l?"":"-black"));return o=t.DomUtil.create("div","tomtom-point-content__icon"),o.appendChild(u),o}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(21)],void 0!==(r=function(t){return function(e){return new t({background:void 0,icon:{iconSize:[30,30],iconAnchor:[0,0],icon:e,noPlainSVG:!1}}).createIcon()}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1)],void 0!==(r=function(t){function e(t){return t||""}return function(i){var n=t.DomUtil.create("div"),r=t.DomUtil.create("div",null,n),o=t.DomUtil.create("div",null,n);return r.innerHTML=e(i.streetName)+" "+e(i.streetNumber),o.innerHTML=e(i.postalCode)+" "+e(i.municipality),n}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(87)],void 0!==(r=function(t,e){var i={action:"tomtom-point-content__action",icon:"tomtom-point-content__icon",text:"tomtom-point-content__text"};return function(n,r,o){var a=t.DomUtil.create("div",i.action),s=t.DomUtil.create("div",i.icon,a),l=t.DomUtil.create("span",i.text,a);return n&&s.appendChild(e(n)),l.innerHTML=r,o&&a.addEventListener("click",o),a}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(16),i(2)],void 0!==(r=function(t,e){function i(t){n.call(this,t),this.fields.type={defaultValue:this.TYPE.nearby,visible:!1},this.fields.query={required:!1,visible:!1,defaultValue:""},this.fields.center={required:!0},this.fields.radius={required:!0,validator:e.integerInInterval(0,5e4),defaultValue:1e4},this.fields.typeahead={visible:!1}}var n=t.prototype.constructor;return i.prototype=new n,i.prototype.constructor=i,function(t){return new i(t).construct()}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(13)],void 0!==(r=function(t){var e=["address","dist","entryPoints","position","score","poi","type","addressRanges","boundingBox","entityType","viewport","dataSources"].join(", ");return function(i){return t(i,"results",e)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(5),i(10),i(18),i(9)],void 0!==(r=function(t,e,i,n){var r=n.search;return{search:e(t.search,r),batch:i(100,{single:t.batchSearchQuery,batchSync:t.batchSyncSearch,batch:t.batchSearch},r)}}.apply(e,n))&&(t.exports=r)},function(t,e){!function(t,e,i){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,r=this._nonPointGroup,o=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,u=0,c=!0;if(this._map){var h=(new Date).getTime(),p=L.bind(function(){for(var f=(new Date).getTime();l>u;u++){if(o&&0===u%200){if((new Date).getTime()-f>a)break}if((i=t[u])instanceof L.LayerGroup)c&&(t=t.slice(),c=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var d=i.__parent.getAllChildMarkers(),m=d[0]===i?d[1]:d[0];n.removeLayer(m)}}else r.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(u,l,(new Date).getTime()-h),u===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var f=this._needsClustering;l>u;u++)i=t[u],i instanceof L.LayerGroup?(c&&(t=t.slice(),c=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||f.push(i):r.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,r=this._featureGroup,o=this._nonPointGroup,a=!0;if(!this._map){for(e=0;n>e;e++)i=t[e],i instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),o.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=n;for(e=0;l>e;e++)i=s[e],i instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;n>e;e++)i=t[e],i instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())):(o.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,r,o=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(o),n=o.length-1;n>=0;n--){for(i=!0,r=a.length-1;r>=0;r--)if(a[r].layer===o[n]){i=!1;break}i&&t.call(e,o[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){this._map=t;var e,i,n;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;i>e;e++)n=this._needsRemoving[e],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;i>e;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());e>=r&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){t.target.__dragStart&&this._moveChild(t.target,t.target.__dragStart,t.target._latlng),delete t.target.__dragStart},_removeLayer:function(t,e,i){var n=this._gridClusters,r=this._gridUnclustered,o=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,u=t.__parent,c=u._markers;for(this._arraySplice(c,t);u&&(u._childCount--,u._boundsNeedUpdate=!0,!(u._zoom<s));)e&&u._childCount<=1?(l=u._markers[0]===t?u._markers[1]:u._markers[0],n[u._zoom].removeObject(u,a.project(u._cLatLng,u._zoom)),r[u._zoom].addObject(l,a.project(l.getLatLng(),u._zoom)),this._arraySplice(u.__parent._childClusters,u),u.__parent._markers.push(l),l.__parent=u.__parent,u._icon&&(o.removeLayer(u),i||o.addLayer(l))):u._iconNeedsUpdate=!0,u=u.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var r=t;r>=e;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,r=this._gridClusters,o=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){i=this._map.project(t.getLatLng(),e);var s=r[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=o[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var u=new this._markerCluster(this,e,s,t);r[e].addObject(u,this._map.project(u._cLatLng,e)),s.__parent=u,t.__parent=u;var c=u;for(n=e-1;n>l._zoom;n--)c=new this._markerCluster(this,n,c),r[n].addObject(c,this._map.project(s.getLatLng(),n));return l._addChild(c),void this._removeFromGridUnclustered(s,e)}o[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return e!==i&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),r=0;for(e=e||[];r<n.length;r++)i=n[r],i instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}}),L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),r=this._featureGroup,o=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,o,function(o){var a,s=o._latlng,l=o._markers;for(n.contains(s)||(s=null),o._isSingleParent()&&t+1===e?(r.removeLayer(o),o._recursivelyAddChildrenToMap(null,e,n)):(o.clusterHide(),o._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;i>=0;i--)a=l[i],n.contains(a._latlng)||r.removeLayer(a)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),r.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,o,function(t){r.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,e+1,i);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,r,function(t){t._recursivelyRemoveChildrenFromMap(n,r,e+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(e.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)},L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),o=this._zoom+1,a=n.getZoom();i.length>0&&r>o;){o++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}r>o?this._group._map.setView(this._latlng,o):a>=r?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,r=this._markers,o=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<r.length;t++)i=r[t]._latlng,this._bounds.extend(i),a+=i.lat,s+=i.lng;for(t=0;t<o.length;t++)e=o[t],e._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){var i,n,r=t._markers;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,r=t._childClusters;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(r){r._recursivelyAnimateChildrenIn(t,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(t,e,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var o=n._markers[r];i.contains(o._latlng)&&(t&&(o._backupLatlng=o.getLatLng(),o.setLatLng(t),o.clusterHide&&o.clusterHide()),n._group._featureGroup.addLayer(o))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var r,o;this._recursively(t,e-1,i-1,function(t){for(o=t._markers.length-1;o>=0;o--)r=t._markers[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(t){for(o=t._childClusters.length-1;o>=0;o--)r=t._childClusters[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(t,e,i,n,r){var o,a,s=this._childClusters,l=this._zoom;if(l>=e&&(n&&n(this),r&&l===i&&r(this)),e>l||i>l)for(o=s.length-1;o>=0;o--)a=s[o],t.intersects(a._bounds)&&a._recursively(t,e,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var t=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,t}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,o=r[n]=r[n]||{},a=o[i]=o[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,r=this._getCoord(e.x),o=this._getCoord(e.y),a=this._grid,s=a[o]=a[o]||{},l=s[r]=s[r]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;n>i;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[r],!0},eachObject:function(t,e){var i,n,r,o,a,s,l=this._grid;for(i in l){a=l[i];for(n in a)for(s=a[n],r=0,o=s.length;o>r;r++)t.call(e,s[r])&&(r--,o--)}},getNearObject:function(t){var e,i,n,r,o,a,s,l,u=this._getCoord(t.x),c=this._getCoord(t.y),h=this._objectPoint,p=this._sqCellSize,f=null;for(e=c-1;c+1>=e;e++)if(r=this._grid[e])for(i=u-1;u+1>=i;i++)if(o=r[i])for(n=0,a=o.length;a>n;n++)s=o[n],l=this._sqDist(h[L.Util.stamp(s)],t),(p>l||p>=l&&null===f)&&(p=l,f=s);return f},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,r,o=0,a=null,s=[];for(i=e.length-1;i>=0;i--)n=e[i],(r=this.getDistant(n,t))>0&&(s.push(n),r>o&&(o=r,a=n));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints))):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,r=!1,o=!1,a=null,s=null,l=null,u=null,c=null,h=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===i||p.lat>i)&&(a=p,i=p.lat),(!1===n||p.lat<n)&&(s=p,n=p.lat),(!1===r||p.lng>r)&&(l=p,r=p.lng),(!1===o||p.lng<o)&&(u=p,o=p.lng)}return n!==i?(h=s,c=a):(h=u,c=l),[].concat(this.buildConvexHull([h,c],t),this.buildConvexHull([c,h],t))}}}(),L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group,n=i._map,r=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,r):(r.y+=10,t=this._generatePointsCircle(e.length,r)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),o=r/this._2PI,a=this._2PI/t,s=[];for(s.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*a,s[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return s},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,o=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,i=t-1;i>=0;i--)s+=o/r+5e-4*i,l[i]=new L.Point(e.x+r*Math.cos(s),e.y+r*Math.sin(s))._round(),r+=a/s;return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,r=i._featureGroup,o=this.getAllChildMarkers();for(i._ignoreMove=!0,this.setOpacity(1),e=o.length-1;e>=0;e--)t=o[e],r.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:o}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,r,o,a=this._group,s=a._map,l=a._featureGroup,u=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)o=s.layerPointToLatLng(e[i]),n=t[i],r=new L.Polyline([this._latlng,o],u),s.addLayer(r),n._spiderLeg=r,n._preSpiderfyLatlng=n._latlng,n.setLatLng(o),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var n,r,o,a,s,l,u=this,c=this._group,h=c._map,p=c._featureGroup,f=this._latlng,d=h.latLngToLayerPoint(f),m=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),g=_.opacity;for(g===i&&(g=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=g,c._ignoreMove=!0,n=0;n<t.length;n++)r=t[n],l=h.layerPointToLatLng(e[n]),o=new L.Polyline([f,l],_),h.addLayer(o),r._spiderLeg=o,m&&(a=o._path,s=a.getTotalLength()+.1,a.style.strokeDasharray=s,a.style.strokeDashoffset=s),r.setZIndexOffset&&r.setZIndexOffset(1e6),r.clusterHide&&r.clusterHide(),p.addLayer(r),r._setPos&&r._setPos(d);for(c._forceLayout(),c._animationStart(),n=t.length-1;n>=0;n--)l=h.layerPointToLatLng(e[n]),r=t[n],r._preSpiderfyLatlng=r._latlng,r.setLatLng(l),r.clusterShow&&r.clusterShow(),m&&(o=r._spiderLeg,a=o._path,a.style.strokeDashoffset=0,o.setStyle({opacity:g}));this.setOpacity(.3),c._ignoreMove=!1,setTimeout(function(){c._animationEnd(),c.fire("spiderfied",{cluster:u,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,r,o,a,s=this,l=this._group,u=l._map,c=l._featureGroup,h=t?u._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):u.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(),f=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=p.length-1;i>=0;i--)e=p[i],e._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(h),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&c.removeLayer(e),f&&(n=e._spiderLeg,r=n._path,o=r.getTotalLength()+.1,r.style.strokeDashoffset=o,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=p.length-1;i>=0;i--)e=p[i],e._spiderLeg&&t++;for(i=p.length-1;i>=0;i--)e=p[i],e._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&c.removeLayer(e),u.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}})}(window,document)},function(t,e,i){"use strict";var n,r;n=[i(46)],void 0!==(r=function(t){return function(e){return e.batchItems instanceof Array?e.batchItems.map(function(e){return e.response.error?{error:e.response.error}:t(e.response)}):null}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(16),i(2)],void 0!==(r=function(t,e){function i(t){n.call(this,t),this.fields.type={defaultValue:this.TYPE.search,visible:!1},this.fields.minFuzzyLevel={validator:e.fuzzinessLevel,defaultValue:1},this.fields.maxFuzzyLevel={validator:e.fuzzinessLevel,defaultValue:2},this.fields.idxSet={validator:e.string}}var n=t.prototype.constructor;return i.prototype=new n,i.prototype.constructor=i,function(t){return new i(t).construct()}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return function(t){var e=[];if(t.error)throw new Error(t.error);return t.reachableRange&&t.reachableRange.boundary&&Array.isArray(t.reachableRange.boundary)&&(e=t.reachableRange.boundary.map(function(t){return[t.longitude,t.latitude]})),{type:"Feature",geometry:{type:"Polygon",coordinates:[e]}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(3),i(95),i(24),i(98),i(0),i(14),i(15)],void 0!==(r=function(t,e,i,n,r,a,s){function l(t,e,i){return{element:t,data:e,text:i}}function u(e){t.DomUtil.create("div","leaflet-control-search-result",e.resultsContainer).innerHTML="No results found.",e.resultsContainer.style.height="auto",e.fire(e.Events.ResultCreated)}function c(t){return function(e){t.input.value="",t.input.focus(),t.clearResults(),u(t),t.fire(t.Events.LocationError,l(t.input,e,e.message)),console.error(e)}}function h(t){return t&&t.address?t.poi?t.poi.name+", "+t.address.freeformAddress:t.address.freeformAddress:t}function p(t){return function(e){var n=r.clone(t.options.serviceOptions);i(n).position(e.latlng).go(function(i){i.position=e.latlng.lng?{lat:e.latlng.lat,lon:e.latlng.lng}:e.latlng,t.clearResults(),t.input.value=h(i),t.input.focus(),t.fire(t.Events.ResultClicked,l(t.locationIcon,i,t.input.value))})}}function f(t){t.location=n({size:null}),t.locationIcon=t.location.onAdd(t._map),t.inputContainer.appendChild(t.locationIcon),t.location.on(t.location.Events.LocationFound,p(t)),t.location.on(t.location.Events.LocationError,c(t))}function d(t){return t.resultsContainer.hasChildNodes()}function m(){var t=this,e=t.options,i=!1;0!==t.lastSearchText.trim().length&&("open"===e.searchOnDragEnd&&d(t)?i=!0:-1!==["always",!0].indexOf(e.searchOnDragEnd)&&(i=!0),i&&t.search(t.input.value))}function _(t,e,i){var n,r={38:{edgeCase:"firstChild",nextSibling:"previousElementSibling",nextAfterEdgeCase:"lastChild"},40:{edgeCase:"lastChild",nextSibling:"nextElementSibling",nextAfterEdgeCase:"firstChild"}};e&&(e.className=e.className.replace("highlight","")),n=e&&e!==i[r[t].edgeCase]?e[r[t].nextSibling]:i[r[t].nextAfterEdgeCase],n.className+=" highlight"}function g(t){t&&(this.stopSearch=!0,this.input.value=h(t),this.clearResultsContainer(),this.input.blur(),this.fire(this.Events.ResultClicked,l(this.input,t,this.input.value)))}function y(t){var e,i=0,n="";return function(r){var o,a,s,l,u,c=r.keyCode||r.which,h=this.resultsContainer.getElementsByClassName("highlight")[0];c===R&&t.input.value&&(h?(o=[].indexOf.call(this.resultsContainer.children,h),g.call(this,this._searchResponses[o])):(e&&clearTimeout(e),a=(new Date).getTime(),s=t.input.value,l=t.options.throttleTimePrompt||1e3,u=l-(a-i),u<=0||n!==s?(i=a,n=s,t.search(s)):e=setTimeout(function(){i=(new Date).getTime(),n=t.input.value,t.search(t.input.value)},u))),this.resultsContainer.hasChildNodes()&&(c!==B&&c!==O||(this.stopSearch=!0,_.call(this,c,h,this.resultsContainer)))}}function v(t){var e=r.clone(t.options.serviceOptions);return e.query=t.input.value,t.options.viewportBoundingBox?e.boundingBox=t._map.getBounds():e.center=t._map.getCenter(),t.options.disablePOIs&&(e.idxSet="PAD,Str,Xstr,Geo,Addr"),"boolean"!==typeof e.typeahead&&(e.typeahead=!0),t.options.view&&(e.view=t.options.view),r.isString(e.language)||(e.language=t.options.language),e}function b(t){this.expand(),this._searchResponses=t,this._redrawResults(!0),this.fire(this.Events.ResultsFound,l(this.resultsContainer,t))}function x(t){function i(){0===t.input.value.length||t.lastSearchText===t.input.value||t.stopSearch||(t.lastSearchText=t.input.value,e(v(t)).go(function(e){t.stopSearch||b.call(t,e)}))}var n;return function(){this.fire(this.Events.SearchInputChanged,l(this.input,this.input.value,this.input.value)),t.stopSearch=!1,n&&clearTimeout(n),this.options.withPrompt&&this.input.value.length>=this.options.minNumberCharsPrompt&&(0===t.options.idleTimeKeyPress?i():n=setTimeout(i,t.options.idleTimeKeyPress))}}function w(t){return-1!==["always","open",!0].indexOf(t.options.searchOnDragEnd)}function k(){this.input.focus(),this.input.value="",this.lastSearchText="",this.clearResults(),this.fire(this.Events.ClearButtonClicked,l(this.clearButton))}function T(e,i){t.DomEvent.disableClickPropagation(i),t.DomEvent.disableScrollPropagation(i),t.DomEvent.on(i,"drag",t.DomEvent.stopPropagation),t.DomEvent.on(i,"keydown",y(e),e),t.DomEvent.on(i,"input",x(e),e),w(e)&&t.DomEvent.on(e._map,"dragend",m,e),t.DomEvent.on(e.clearButton,"click",k,e),e.options.collapsible&&(t.DomEvent.on(e.input,"focus",e.expand,e),t.DomEvent.on(e.input,"blur",e.collapse,e))}function E(e){var i,n="leaflet-control-search";return e.options.collapsible&&e.options.collapsed&&(n+=" collapsed"),i=t.DomUtil.create("div",n),e.inputContainer=t.DomUtil.create("div","leaflet-control-search-input-container",i),e.input=t.DomUtil.create("input",e.options.icon+" leaflet-control-search-input",e.inputContainer),e.input.required=!0,e.clearButton=t.DomUtil.create("div","leaflet-control-search-input-close-icon icon-close-gray",e.inputContainer),e.resultsContainer=t.DomUtil.create("div","leaflet-control-search-results-container",i),e.options.location&&f(e),e.options.id&&(e.input.id=e.options.id),T(e,i),e.input.setAttribute("placeholder",e.options.placeholder),i}function L(t){var e;for(t=t.split(/[- ,]+/)||[],e=0;e<t.length;e+=1)t[e]=r.encodeStringForRegex(t[e]);return t}function S(t,e){var i=L(t.input.value),n=new RegExp("("+i.join("|")+")","ig");return e.replace(n,'<span class="leaflet-control-search-result-highlight">$1</span>')}function C(e,i){var n,r,o,s,l=e._shouldUseImperialDistance(),u=t.DomUtil.create("div","geoResponse-result");return"undefined"!==typeof i.poi&&"undefined"!==typeof i.poi.name&&(n=t.DomUtil.create("div","geoResponse-result-name"),n.innerHTML=S(e,i.poi.name),u.appendChild(n)),"undefined"!==typeof i.address&&(r=t.DomUtil.create("div","geoResponse-result-address"),o=[],"undefined"!==typeof i.address.freeformAddress&&o.push(i.address.freeformAddress),"undefined"!==typeof i.address.countryCodeISO3&&o.push(i.address.countryCodeISO3),r.innerHTML=S(e,o.join(", ")),u.appendChild(r)),"undefined"!==typeof i.dist&&(s=t.DomUtil.create("div","geoResponse-result-distance"),s.innerHTML=a.formatDistance(i.dist,l),u.appendChild(s)),u}function A(e,i){var n=t.DomUtil.create("div","leaflet-control-search-result",e.resultsContainer);n.appendChild(C(e,i)),e.resultsContainer.style.height="auto",e.fire(e.Events.ResultCreated,l(n,i)),t.DomEvent.on(n,"click",function(){g.call(e,i)},e),t.DomEvent.on(n,"mouseover",function(){this.stopSearch=!0},e)}function P(t){this.options.imperialDistance="imperial"===t.unit,d(this)&&this._redrawResults(!0)}function I(t){this.definedLanguage||(this.language(t.getValueFor("search")),this.lastSearchText&&d(this)&&this.search(this.lastSearchText))}function M(){this.lastSearchText&&d(this)&&this.search(this.lastSearchText)}function z(t){this.definedGeopolView||(this.options.view=t.code,M.call(this))}var R=13,B=38,O=40,D={ResultCreated:"resultCreated",ResultClicked:"resultClicked",ClearButtonClicked:"clearButtonClicked",ResultsCleared:"resultsCleared",ResultsFound:"resultsFound",ResultsDrawn:"resultsDrawn",SearchInputChanged:"searchInputChanged",LocationError:"locationError"};return t.SearchBox=t.Control.extend({includes:t.Evented.prototype,options:{placeholder:"Search for a place...",id:!1,collapsible:!0,collapsed:!1,location:!1,icon:"icon-search",disablePOIs:!1,viewportBoundingBox:!1,minNumberCharsPrompt:3,throttleTimePrompt:1e3,idleTimeKeyPress:200,serviceOptions:{},position:"topleft",withPrompt:!0,imperialDistance:null,searchOnDragEnd:"always"},statics:{Events:D},resultsContainer:null,input:null,location:void 0,locationIcon:null,_searchResponses:[],lastSearchText:"",initialize:function(e){t.Util.setOptions(this,e),e&&(this.definedGeopolView=e.view,this.definedLanguage=e.language)},onAdd:function(e){return this.unitService=e.getUnitService(),this.unitService.on(t.UnitService.Events.UNIT_CHANGED,P,this),this.localeService=e.getLocaleService(),this.localeService.on(t.LocaleService.Events.LOCALE_CHANGED,I,this),this.geopolService=e.getGeopolViewService(),this.geopolService.on(t.GeopolViewService.Events.GEOPOL_VIEW_CHANGED,z,this),E(this)},onRemove:function(){this.unitService.off(t.UnitService.Events.UNIT_CHANGED,P,this),this.localeService.off(t.LocaleService.Events.LOCALE_CHANGED,I,this),this.geopolService.off(t.GeopolViewService.Events.GEOPOL_VIEW_CHANGED,z,this),w(this)&&t.DomEvent.off(this._map,"dragend",m,this)},_shouldUseImperialDistance:function(){return"boolean"===typeof this.options.imperialDistance?this.options.imperialDistance:this.unitService.getCurrentUnit().getLabel()===s.imperial},_redrawResults:function(t){var e,i=this._searchResponses;if(this.clearResultsContainer(),!i||0===i.length)return void(!0===t&&u(this));for(e=0;e<i.length;e+=1)A(this,i[e]);this.resultsContainer.style.height="auto",this.fire(this.Events.ResultsDrawn,l(this.resultsContainer,i))},clearResultsContainer:function(){this.resultsContainer.hasChildNodes()&&(this.resultsContainer.style.height="0px",this.resultsContainer.innerHTML="",this.fire(this.Events.ResultsCleared,l(this.resultsContainer)))},clearResults:function(){this.clearResultsContainer(),this._searchResponses=[]},setResultData:function(t){t&&(this.input.value=h(t),this.clearResults(),this.input.blur())},search:function(t){var i=this;"object"===("undefined"===typeof t?"undefined":o(t))&&t.hasOwnProperty("query")&&(t=t.query),r.isString(t)&&0!==t.length&&(this.input.focus(),this.input.value=t,this.lastSearchText=t,e(v(i)).go(function(t){b.call(i,t)}))},collapse:function(){this.input.value?this.expand():(this._container.className+=" collapsed",this.clearResultsContainer())},expand:function(){this._container.className=this._container.className.replace(/\b collapsed\b/,"")},getLocation:function(){return this.location},setIcon:function(t){r.isString(t)&&(this.input.className=this.input.className.replace(/(icon)((-)(\w+))*/,t))},addLocationIcon:function(){void 0===this.location&&(this.options.location=!0,f(this))},removeLocationIcon:function(){void 0!==this.location&&(this.options.location=!1,this.locationIcon.parentNode.removeChild(this.locationIcon),this.location.clearAllEventListeners(),this.location=void 0)},language:function(t){null===t||""===t?(delete this.options.language,delete this.definedLanguage):(this.options.language=t,this.definedLanguage=t)},view:function(t){null===t||""===t?(delete this.options.view,delete this.definedGeopolView):(this.options.view=t,this.definedGeopolView=t),M.call(this)},Events:D}),function(e){var i=new t.SearchBox(e);return r.addDeprecatedProperty(i,"Event","Events"),i}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(3),i(0)],void 0!==(r=function(t,e){function i(t){return t.className||t.imageSrc?t.className:"icon-locate_me_btn"}function n(t,e){e&&(t.width=e[0]+"px",t.height=e[1]+"px",t.backgroundSize=e[0]+"px "+e[1]+"px")}var r={LocationFound:"locationFound",LocationError:"locationError"};return t.Location=t.Control.extend({includes:t.Evented.prototype,options:{imageSrc:null,size:t.Browser.retina?[57,57]:[34,34],className:""},createContainer:function(){var e,r=i(this.options),o=t.DomUtil.create("div","leaflet-control-location "+r);return n(o.style,this.options.size),o.style.cursor="pointer",t.Browser.svg&&!this.options.imageSrc||(e=t.DomUtil.create("img","",o),e.src=this.options.imageSrc||t.Icon.Default.imagePath+"/locate_me_btn.png",e.style.cursor="pointer"),o},onAdd:function(e){var i=this.createContainer(),n=this;return t.DomEvent.addListener(i,"mousedown",e.locate,e),e.on("locationfound",function(t){n.fire(r.LocationFound,t)}),e.on("locationerror",function(t){n.fire(r.LocationError,t)}),i},Events:r,statics:{Events:r}}),function(i){var n=new t.Location(i);return e.addDeprecatedProperty(n,"Event","Events"),n}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(3),i(14)],void 0!==(r=function(t,e){return t.MeasurementRuler=t.LayerGroup.extend({options:{markerColor:"#000",lineColor:"#000",rulerClassname:"leaflet-distance-measurement__ruler",labelClassname:"leaflet-distance-measurement__ruler__label",dashArray:"5 5",distanceOffset:0,unitScheme:"metric",useArc:!1},latLngs:[],distance:0,initialize:function(e){this._layers={},this._markers=[],this._labels=[],this.latLngs=[],this.distance=0,t.Util.setOptions(this,e)},addLatLng:function(t){var e=this.getLast(),i=e?e.distanceTo(t):0;e&&e.equals(t)||(this.distance+=i,this.latLngs.push(t),this._redrawPolyline(),this._drawMarkerWithLabel(t,this.options.distanceOffset+this.distance))},setLatLngs:function(t){this.latLngs=t,this.distance=0,this._redrawRuler()},getLast:function(){return this.latLngs.length>0?this.latLngs[this.latLngs.length-1]:null},_buildMarker:function(e){return t.circleMarker(e,{color:this.options.markerColor,fillOpacity:1,opacity:1,fill:!0,radius:3,interactive:!1,renderer:this._getRenderer()})},_buildLabelText:function(e){return t.divIcon({className:this.options.labelClassname,html:"<span>"+e+"</span>"})},_buildLabel:function(e,i){return t.marker(e,{icon:this._buildLabelText(i),interactive:!1,title:i,alt:i})},_drawMarkerWithLabel:function(t,i){var n=e.formatDistance(i,"imperial"===this.options.unitScheme),r=this._buildMarker(t),o=this._buildLabel(t,n);this._markers.push(r.addTo(this)),i>0&&this._labels.push(o.addTo(this))},_clearAllMarkersAndLabels:function(){this._markers.forEach(function(t){t.remove()}),this._labels.forEach(function(t){t.remove()}),this._markers=[],this._labels=[]},_getRenderer:function(){return t.svg({padding:.8})},_buildPolyline:function(e,i){return t.polyline(e,{color:this.options.lineColor,weight:2,opacity:1,dashArray:i,className:this.options.rulerClassname,interactive:!1,renderer:this._getRenderer()})},_redrawPolyline:function(){var t=this.latLngs;return this.options.useArc&&(t=this._calculateGreatCircleArc(t)),this.rulerPolyline?this.rulerPolyline.setLatLngs(t):this.rulerPolyline=this._buildPolyline(t,this.options.dashArray).addTo(this),this.rulerPolyline},_calculateGreatCircleArc:function(t){var e=this;return t.reduce(function(t,i){var n;return 0===t.length?[i]:(n=e._polylineArc(t.pop(),i),t.concat(n))},[])},_redrawAllMarkersAndLabels:function(){this._clearAllMarkersAndLabels(),this.latLngs.forEach(function(t,e){var i=e>0?this.latLngs[e-1]:null,n=i?i.distanceTo(t):0;this.distance+=n,this._drawMarkerWithLabel(t,this.options.distanceOffset+this.distance)},this)},_redrawRuler:function(){this._redrawPolyline(),this._redrawAllMarkersAndLabels()},_polylineArc:function(e,i){function n(e){function i(t){return Math[t>0?"floor":"ceil"](t)}var n=Math.sin((1-e)*r)/Math.sin(r),o=Math.sin(e*r)/Math.sin(r),c=n*Math.cos(a)*Math.cos(s)+o*Math.cos(l)*Math.cos(u),h=n*Math.cos(a)*Math.sin(s)+o*Math.cos(l)*Math.sin(u),p=n*Math.sin(a)+o*Math.sin(l),f=180/Math.PI*Math.atan2(p,Math.sqrt(Math.pow(c,2)+Math.pow(h,2))),d=180/Math.PI*Math.atan2(h,c),m=d-180*s/Math.PI;return d-=m<0?360*i((m-180)/360):360*i((m+180)/360),t.latLng(f,d)}var r,o,a=e.lat,s=e.lng,l=i.lat,u=i.lng;return a=a*Math.PI/180,s=s*Math.PI/180,l=l*Math.PI/180,u=u*Math.PI/180,r=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))),o=100,function(t){var e,i,r,o=[],a=1/(t-1);for(e=0;e<t;e++)i=a*e,r=n(i),o.push(r);return o}(o)}}),t.MeasurementRuler}.apply(e,n))&&(t.exports=r)},function(t,e,i){i(101),t.exports=i(102)},function(t,e){!function(t){"use strict";function e(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function i(t){return"string"!==typeof t&&(t=String(t)),t}function n(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return g.iterable&&(e[Symbol.iterator]=function(){return e}),e}function r(t){this.map={},t instanceof r?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function a(t){return new Promise(function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}})}function s(t){var e=new FileReader,i=a(e);return e.readAsArrayBuffer(t),i}function l(t){var e=new FileReader,i=a(e);return e.readAsText(t),i}function u(t){for(var e=new Uint8Array(t),i=new Array(e.length),n=0;n<e.length;n++)i[n]=String.fromCharCode(e[n]);return i.join("")}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"===typeof t)this._bodyText=t;else if(g.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(g.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(g.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(g.arrayBuffer&&g.blob&&v(t))this._bodyArrayBuffer=c(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!g.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!b(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(t)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):g.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},g.blob&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(u(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},g.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(t){var e=t.toUpperCase();return x.indexOf(e)>-1?e:t}function f(t,e){e=e||{};var i=e.body;if(t instanceof f){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new r(t.headers)),this.method=t.method,this.mode=t.mode,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new r(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var i=t.split("="),n=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(r))}}),e}function m(t){var e=new r;return t.split(/\r?\n/).forEach(function(t){var i=t.split(":"),n=i.shift().trim();if(n){var r=i.join(":").trim();e.append(n,r)}}),e}function _(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new r(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var g={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(g.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&y.indexOf(Object.prototype.toString.call(t))>-1};r.prototype.append=function(t,n){t=e(t),n=i(n);var r=this.map[t];this.map[t]=r?r+","+n:n},r.prototype.delete=function(t){delete this.map[e(t)]},r.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.set=function(t,n){this.map[e(t)]=i(n)},r.prototype.forEach=function(t,e){for(var i in this.map)this.map.hasOwnProperty(i)&&t.call(e,this.map[i],i,this)},r.prototype.keys=function(){var t=[];return this.forEach(function(e,i){t.push(i)}),n(t)},r.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),n(t)},r.prototype.entries=function(){var t=[];return this.forEach(function(e,i){t.push([i,e])}),n(t)},g.iterable&&(r.prototype[Symbol.iterator]=r.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];_.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},t.Headers=r,t.Request=f,t.Response=_,t.fetch=function(t,e){return new Promise(function(i,n){var r=new f(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:m(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;i(new _(e,t))},o.onerror=function(){n(new TypeError("Network request failed"))},o.ontimeout=function(){n(new TypeError("Network request failed"))},o.open(r.method,r.url,!0),"include"===r.credentials&&(o.withCredentials=!0),"responseType"in o&&g.blob&&(o.responseType="blob"),r.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"===typeof r._bodyInit?null:r._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(t,e,i){"use strict";var n;void 0!==(n=function(t){var e,n,r,o,a,s;return i(103),i(104),i(49),e={},n=i(11),s=i(12),e.setProductInfo=s.setProductInfo,e.tomTomMarkersLayer=i(144),e.useJsonp=n.useJsonp,e.useHttp=n.useHttp,r=i(3),e.L=r,e.display=r,e.Map=r.Map,e.map=r.map,e.traffic=i(63),e.copyright=i(59),e.copyrightCaption=i(53),e.geocode=i(160),e.structuredGeocode=i(163),e.reverseGeocode=i(24),e.crossStreetLookup=i(166),e.fuzzySearch=i(95),e.poiSearch=i(167),e.categorySearch=i(168),e.geometrySearch=i(169),e.nearbySearch=i(90),e.lowBandwidthSearch=i(170),e.alongRouteSearch=i(172),e.trafficFlowSegmentData=i(173),e.additionalData=i(175),e.additionalDataProvider=e.additionalData,e.routing=i(41),e.reachableRange=i(177),e.matrixRouting=i(180),e.controlPanel=i(182),e.foldable=i(47),e.languageSelector=i(183),e.globalLocaleService=i(29),e.resultsList=i(184),e.searchBox=i(97),e.distanceMeasurement=i(185),e.location=i(98),e.routeInputs=i(187),e.routeInstructions=i(188),e.messageBox=i(61),e.unitFormatConverter=i(14),e.unitSelector=i(189),e.unitService=i(38),e.globalUnitService=i(37),e.globalGeopolViewService=i(32),e.geopolViewSelector=i(190),e.markersView=i(191),e.routeOnMap=i(192),e.routeSummary=i(193),e.miniMap=i(194),o=i(8),e.key=o.setKey,e.mapsKey=o.setKeyForName("services/display"),e.vectorMapsKey=o.setKeyForName("services/display/vector"),e.trafficKey=o.setKeyForName("services/traffic"),e.trafficFlowKey=o.setKeyForName("services/trafficFlow"),e.searchKey=o.setKeyForName("services/search"),e.routingKey=o.setKeyForName("services/routing"),e.localeService=i(30),a=i(26),e.setMapbox=a.setMapbox,e.staticMapImage=i(50),i(49),e}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n;void 0!==(n=function(){window.L_NO_TOUCH=!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[i(105)],void 0!==(r=function(t){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),[].indexOf||(Array.prototype.indexOf=function(t,e,i){for(i=this.length,e=(i+~~e)%i;e<i&&(!(e in this)||this[e]!==t);++e);return e^i?e:-1}),[].forEach||(Array.prototype.forEach=function(t,e,i,n){for(n=this.length,i=0;i<n;++i)i in this&&t.call(e,this[i],i,this)}),void 0===window.Promise&&(window.Promise=t),Number.isInteger=Number.isInteger||function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t},"function"!=typeof Object.assign&&(Object.assign=function(t,e){var i,n,r,o;if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(i=Object(t),n=1;n<arguments.length;n++)if(null!=(r=arguments[n]))for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o]);return i})}.apply(e,n))&&(t.exports=r)},function(t,e,i){(function(e,n){!function(e,i){t.exports=i()}(0,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function r(t){return"function"==typeof t}function o(t){G=t}function a(t){H=t}function s(){return"undefined"!=typeof q?function(){q(u)}:l()}function l(){var t=setTimeout;return function(){return t(u,1)}}function u(){for(var t=0;t<Z;t+=2){(0,Q[t])(Q[t+1]),Q[t]=void 0,Q[t+1]=void 0}Z=0}function c(t,e){var i=arguments,n=this,r=new this.constructor(p);void 0===r[tt]&&I(r);var o=n._state;return o?function(){var t=i[o-1];H(function(){return C(o,r,t,n._result)})}():T(n,r,t,e),r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var i=new e(p);return b(i,t),i}function p(){}function f(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function m(t){try{return t.then}catch(t){return rt.error=t,rt}}function _(t,e,i,n){try{t.call(e,i,n)}catch(t){return t}}function g(t,e,i){H(function(t){var n=!1,r=_(i,e,function(i){n||(n=!0,e!==i?b(t,i):w(t,i))},function(e){n||(n=!0,k(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&r&&(n=!0,k(t,r))},t)}function y(t,e){e._state===it?w(t,e._result):e._state===nt?k(t,e._result):T(e,void 0,function(e){return b(t,e)},function(e){return k(t,e)})}function v(t,e,i){e.constructor===t.constructor&&i===c&&e.constructor.resolve===h?y(t,e):i===rt?(k(t,rt.error),rt.error=null):void 0===i?w(t,e):r(i)?g(t,e,i):w(t,e)}function b(e,i){e===i?k(e,f()):t(i)?v(e,i,m(i)):w(e,i)}function x(t){t._onerror&&t._onerror(t._result),E(t)}function w(t,e){t._state===et&&(t._result=e,t._state=it,0!==t._subscribers.length&&H(E,t))}function k(t,e){t._state===et&&(t._state=nt,t._result=e,H(x,t))}function T(t,e,i,n){var r=t._subscribers,o=r.length;t._onerror=null,r[o]=e,r[o+it]=i,r[o+nt]=n,0===o&&t._state&&H(E,t)}function E(t){var e=t._subscribers,i=t._state;if(0!==e.length){for(var n=void 0,r=void 0,o=t._result,a=0;a<e.length;a+=3)n=e[a],r=e[a+i],n?C(i,n,r,o):r(o);t._subscribers.length=0}}function L(){this.error=null}function S(t,e){try{return t(e)}catch(t){return ot.error=t,ot}}function C(t,e,i,n){var o=r(i),a=void 0,s=void 0,l=void 0,u=void 0;if(o){if(a=S(i,n),a===ot?(u=!0,s=a.error,a.error=null):l=!0,e===a)return void k(e,d())}else a=n,l=!0;e._state!==et||(o&&l?b(e,a):u?k(e,s):t===it?w(e,a):t===nt&&k(e,a))}function A(t,e){try{e(function(e){b(t,e)},function(e){k(t,e)})}catch(e){k(t,e)}}function P(){return at++}function I(t){t[tt]=at++,t._state=void 0,t._result=void 0,t._subscribers=[]}function M(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[tt]||I(this.promise),V(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?w(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&w(this.promise,this._result))):k(this.promise,z())}function z(){return new Error("Array Methods must be provided an Array")}function R(t){return new M(this,t).promise}function B(t){var e=this;return new e(V(t)?function(i,n){for(var r=t.length,o=0;o<r;o++)e.resolve(t[o]).then(i,n)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function O(t){var e=this,i=new e(p);return k(i,t),i}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function F(t){this[tt]=P(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&D(),this instanceof F?A(this,t):N())}function j(){var t=void 0;if("undefined"!=typeof n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=F}var U=void 0;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var V=U,Z=0,q=void 0,G=void 0,H=function(t,e){Q[Z]=t,Q[Z+1]=e,2===(Z+=2)&&(G?G(u):$())},W="undefined"!=typeof window?window:void 0,K=W||{},J=K.MutationObserver||K.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof e&&"[object process]"==={}.toString.call(e),Y="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Q=new Array(1e3),$=void 0;$=X?function(){return function(){return e.nextTick(u)}}():J?function(){var t=0,e=new J(u),i=document.createTextNode("");return e.observe(i,{characterData:!0}),function(){i.data=t=++t%2}}():Y?function(){var t=new MessageChannel;return t.port1.onmessage=u,function(){return t.port2.postMessage(0)}}():void 0===W?function(){try{var t=i(107);return q=t.runOnLoop||t.runOnContext,s()}catch(t){return l()}}():l();var tt=Math.random().toString(36).substring(16),et=void 0,it=1,nt=2,rt=new L,ot=new L,at=0;return M.prototype._enumerate=function(t){for(var e=0;this._state===et&&e<t.length;e++)this._eachEntry(t[e],e)},M.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,n=i.resolve;if(n===h){var r=m(t);if(r===c&&t._state!==et)this._settledAt(t._state,e,t._result);else if("function"!=typeof r)this._remaining--,this._result[e]=t;else if(i===F){var o=new i(p);v(o,t,r),this._willSettleAt(o,e)}else this._willSettleAt(new i(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},M.prototype._settledAt=function(t,e,i){var n=this.promise;n._state===et&&(this._remaining--,t===nt?k(n,i):this._result[e]=i),0===this._remaining&&w(n,this._result)},M.prototype._willSettleAt=function(t,e){var i=this;T(t,void 0,function(t){return i._settledAt(it,e,t)},function(t){return i._settledAt(nt,e,t)})},F.all=R,F.race=B,F.resolve=h,F.reject=O,F._setScheduler=o,F._setAsap=a,F._asap=H,F.prototype={constructor:F,then:c,catch:function(t){return this.then(null,t)}},F.polyfill=j,F.Promise=F,F})}).call(e,i(106),i(48))},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(t){if(c===setTimeout)return setTimeout(t,0);if((c===i||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):_=-1,d.length&&s())}function s(){if(!m){var t=r(a);m=!0;for(var e=d.length;e;){for(f=d,d=[];++_<e;)f&&f[_].run();_=-1,e=d.length}f=null,m=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,h,p=t.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:i}catch(t){c=i}try{h="function"===typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,d=[],m=!1,_=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];d.push(new l(t,e)),1!==d.length||m||r(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e){},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(){var t,e,i=document.getElementsByTagName("script"),n=/(.*)tomtom.min.js/;for(t=0;t<i.length;t++)if(i[t].src&&(e=n.exec(i[t].src)))return e[1];return""}return{get:function(e){return(e&&e.options&&e.options.basePath?e.options.basePath+"/":t())+"images"}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(11),i(116),i(117),i(8),i(17),i(0)],void 0!==(r=function(t,e,i,n,r,a){function s(e,i){t.get({url:e,callback:i})}function l(o,a){var s,l,u,c;a=a||{},s=n.getKey(a.securityKeyName),l={apiKey:s,language:a?a.language:void 0,geopolView:a?a.geopolView:void 0,resourceUrls:a&&a.resourceUrls?{glyphs:i.convert(a.resourceUrls.glyphs),sprite:i.convert(a.resourceUrls.sprite)}:void 0},u=/https:\/\/api.tomtom.com\/maps-sdk-js\/\d*\.\d*\.\d*\/glyphs/g,c=function(){l.resourceUrls&&u.test(l.resourceUrls.glyphs)&&console.warn("You should host glyphs and sprites on your own.","\n","During map initialization pass glyphs and sprites urls","\n",'var map = tomtom.map("map", {',"\n",'key: "<your-tomtom-API-key>",',"\n",'source: "vector",',"\n","basePath: <your-tomtom-sdk-base-path>,","\n","glyphsUrl: <your-glyphs-URL>,","\n","spriteUrl: <your-sprite-URL>","\n","});","\n","If you set basePath correctly the SDK will try to load glyphs and sprites","from there and you will not need to set the URL explicitly."),f.call(this,e(o,l),a)},c=c.bind(this),l.resourceUrls&&l.resourceUrls.sprite?t.get({url:l.resourceUrls.sprite+".json",callback:c,fail:function(){l.resourceUrls={glyphs:r["vector.glyphs"],sprite:r["vector.sprites"]},c()}}):c()}function u(t,e){var i=this;s(t,function(t){l.call(i,t,e)})}function c(t){return"object"===("undefined"===typeof t?"undefined":o(t))&&null!==t&&t.styleUrlMapping}function h(t){var e=t.styleUrlMapping[t.theme.style][t.theme.layer];return i.convert(e)}function p(t,e){c(t)&&(e=e||{},e.resourceUrls=t.resourceUrls,e.language=t.language,e.geopolView=t.geopolView,e.securityKeyName=t.securityKeyName,t=h(t)),"object"===("undefined"===typeof t?"undefined":o(t))&&null!==t?l.call(this,t,e):a.isString(t)?u.call(this,t,e):f.call(this,t,e)}var f;return{modifySetStyle:function(t){var e;return t&&t.Map.prototype.setStyle!==p?(e=f,f=t.Map.prototype.setStyle,t.Map.prototype.setStyle=p,e):null}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(51),i(112),i(12),i(0)],void 0!==(r=function(t,e,i,n){function r(t){try{return JSON.stringify(t)}catch(t){return null}}function o(t,e,i){var n;t.headers||(t.headers={}),(n=t.headers[e]||t.headers[e.toLowerCase()])||(t.headers[e]=i)}function a(t,e){var i;if(t instanceof FormData||t instanceof Blob)i=t;else{if(!(i=r(t)))throw new Error("Unsupported request body type: "+t);o(e,"Content-Type","application/json")}return i}function s(t,e){var i,r=t.bodyParameters;r&&(n.isObject(r)?i=a(r,e):n.isString(r)&&(i=r),e.body=i)}function l(t,i,n){fetch(i,n).then(function(e){return e.ok?"batch"===t.requestType&&202===e.status?t.callback(e.headers.get("Location")):e.json().then(t.callback):Promise.reject(e)}).catch(function(i){e(t,i)})}return{get:function(e){var n,r,o;e.pathParameters=e.pathParameters||{},e.pathParameters.contentType="json",e.pathParameters.protocol=e.pathParameters.protocol||"https",n=t(e.url,e.pathParameters,e.queryParameters),o=i.getAnalyticsHeader(),o.Accept="application/json",r={method:"GET",headers:o,mode:"cors"},l(e,n,r)},post:function(e){var n,r,o;e.pathParameters=e.pathParameters||{},e.pathParameters.contentType="json",e.pathParameters.protocol=e.pathParameters.protocol||"https",n=t(e.url,e.pathParameters,e.queryParameters),o=i.getAnalyticsHeader(),o.Accept="application/json",r={method:"POST",headers:o,mode:"cors",redirect:"follow"},s(e,r),l(e,n,r)}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){var e=t.headers&&t.headers.get("content-type");t.json?/application\/json.*/.test(e)?t.json().then(this.fail).catch(this.fail):t.text().then(this.fail).catch(this.fail):this.fail(t)}return function(e,i){var n=t.bind(e);e.fail&&n(i)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(114),i(52),i(115),i(12)],void 0!==(r=function(t,e,i,n){function r(t,e){return function(i){if(!i.errorResponse)return void t(i);e&&e(i.errorResponse["@description"])}}function o(t){t.pathParameters=t.pathParameters||{},t.pathParameters.contentType="jsonp",t.pathParameters.protocol=t.pathParameters.protocol||"https",t.callbackParam=t.callbackParam||"jsonp"}function a(t,e){return t.queryParameters?e.data(t.queryParameters):e}return{get:function(s){var l,u;console.warn("The support for JSONP will be removed soon. Please consider using the JSON implementation."),o(s),l=e(s.url,s.pathParameters),u=t().url(l).type("jsonp").jsonPaddingName(s.callbackParam),u=n.addAnalyticsHeader(u),u=a(s,u),u=i(s,u),u.on("success",r(s.callback,s.fail)).go()}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){var n,r;!function(){"use strict";var i=["html","json","jsonp","script"],o=["connect","delete","get","head","options","patch","post","put","trace"],a=function t(){var e={},i={},n={url:function(t){return o.call(this,"url",t,s.string)},sync:function(t){return o.call(this,"sync",t,s.bool)},cache:function(t){return o.call(this,"cache",t,s.bool)},type:function(t){return o.call(this,"type",t,s.type)},header:function(t,i){return e.headers=e.headers||{},s.string(t),"undefined"!=typeof i?(s.string(i),e.headers[t]=i,this):e.headers[t]},auth:function(t,i){return s.string(t),s.string(i),e.auth={user:t,passwd:i},this},timeout:function(t){return o.call(this,"timeout",t,s.positiveInteger)},method:function(t){return o.call(this,"method",t,s.method)},queryString:function(t){return o.call(this,"queryString",t,s.queryString)},data:function(t){return o.call(this,"data",t,s.plainObject)},body:function(t){return o.call(this,"body",t,null,function(t){if("object"==typeof t){if(!(t instanceof FormData)){try{t=JSON.stringify(t)}catch(t){throw new TypeError("Unable to stringify body's content : "+t.name)}this.header("Content-Type","application/json")}}else t+="";return t})},into:function(t){return o.call(this,"into",t,s.selector,function(t){return"string"==typeof t?document.querySelectorAll(t):t instanceof HTMLElement?[t]:void 0})},jsonPaddingName:function(t){return o.call(this,"jsonPaddingName",t,s.string)},jsonPadding:function(t){return o.call(this,"jsonPadding",t,s.func)},on:function(t,e){return"function"==typeof e&&(i[t]=i[t]||[],i[t].push(e)),this},off:function(t){return i[t]=[],this},trigger:function(t,e){var n=this,r=function(t,e){i[t]instanceof Array&&i[t].forEach(function(t){t.call(n,e)})};if("undefined"!=typeof t){t+="";var o=/^([0-9])([0-9x])([0-9x])$/i,a=t.match(o);a&&a.length>3?Object.keys(i).forEach(function(t){var i=t.match(o);!(i&&i.length>3&&a[1]===i[1])||"x"!==i[2]&&a[2]!==i[2]||"x"!==i[3]&&a[3]!==i[3]||r(t,e)}):i[t]&&r(t,e)}return this},go:function(){var t=e.type||(e.into?"html":"json"),i=u();return"function"==typeof r[t]?r[t].call(this,i):void 0}},r={json:function(t){var e=this;r._xhr.call(this,t,function(t){if(t)try{t=JSON.parse(t)}catch(t){return e.trigger("error",t),null}return t})},html:function(t){r._xhr.call(this,t,function(t){return e.into&&e.into.length&&[].forEach.call(e.into,function(e){e.innerHTML=t}),t})},_xhr:function(t,i){var n,r,o,s,l,u=this,c=e.method||"get",h=!0!==e.sync,p=new XMLHttpRequest,f=e.data,d=e.body,m=(e.headers,this.header("Content-Type")),_=e.timeout;if(!m&&f&&a()&&(this.header("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),m=this.header("Content-Type")),f&&a())if("string"!=typeof d&&(d=""),m.indexOf("json")>-1)try{d=JSON.stringify(f)}catch(t){throw new TypeError("Unable to stringify body's content : "+t.name)}else{s=m&&m.indexOf("x-www-form-urlencoded")>1;for(n in f)d+=s?encodeURIComponent(n)+"="+encodeURIComponent(f[n])+"&":n+"="+f[n]+"\n\r"}l=[c,t,h],e.auth&&(l.push(e.auth.user),l.push(e.auth.passwd)),p.open.apply(p,l);for(r in e.headers)p.setRequestHeader(r,e.headers[r]);p.onprogress=function(t){t.lengthComputable&&u.trigger("progress",t.loaded/t.total)},p.onload=function(){var t=p.responseText;o&&clearTimeout(o),this.status>=200&&this.status<300&&("function"==typeof i&&(t=i(t)),u.trigger("success",t)),u.trigger(this.status,t),u.trigger("end",t)},p.onerror=function(t){o&&clearTimeout(o),u.trigger("error",t,arguments)},_&&(o=setTimeout(function(){u.trigger("timeout",{type:"timeout",expiredAfter:_},p,arguments),p.abort()},_)),p.send(d)},jsonp:function(i){var n,r=this,o=document.querySelector("head"),a=!0!==e.sync,s=e.jsonPaddingName||"callback",u=e.jsonPadding||"_padd"+(new Date).getTime()+Math.floor(1e4*Math.random()),c={};if(t[u])throw new Error("Padding "+u+" already exists. It must be unique.");/^ajajsonp_/.test(u)||(u="ajajsonp_"+u),window[u]=function(t){r.trigger("success",t),o.removeChild(n),window[u]=void 0},c[s]=u,i=l(i,c),n=document.createElement("script"),n.async=a,n.src=i,n.onerror=function(){r.trigger("error",arguments),o.removeChild(n),window[u]=void 0},o.appendChild(n)},script:function(t){var i,n=this,r=document.querySelector("head")||document.querySelector("body"),o=!0!==e.sync;if(!r)throw new Error("Ok, wait a second, you want to load a script, but you don't have at least a head or body tag...");i=document.createElement("script"),i.async=o,i.src=t,i.onerror=function(){n.trigger("error",arguments),r.removeChild(i)},i.onload=function(){n.trigger("success",arguments)},r.appendChild(i)}},o=function(t,i,n,r){if("undefined"!=typeof i){if("function"==typeof n)try{i=n.call(s,i)}catch(e){throw new TypeError("Failed to set "+t+" : "+e.message)}return e[t]="function"==typeof r?r.call(this,i):i,this}return"undefined"===e[t]?null:e[t]},a=function(){return["delete","patch","post","put"].indexOf(e.method)>-1},u=function(){var t=e.url,i="undefined"==typeof e.cache||!!e.cache,n=e.queryString||"",r=e.data;return!1===i&&(n+="&ajabuster="+(new Date).getTime()),t=l(t,n),r&&!a()&&(t=l(t,r)),t};return n},s={bool:function(t){return!!t},string:function(t){if("string"!=typeof t)throw new TypeError("a string is expected, but "+t+" ["+typeof t+"] given");return t},positiveInteger:function(t){if(parseInt(t)!==t||0>=t)throw new TypeError("an integer is expected, but "+t+" ["+typeof t+"] given");return t},plainObject:function(t){if("object"!=typeof t||t.constructor!==Object)throw new TypeError("an object is expected, but "+t+" ["+typeof t+"] given");return t},type:function(t){if(t=this.string(t),i.indexOf(t.toLowerCase())<0)throw new TypeError("a type in ["+i.join(", ")+"] is expected, but "+t+" given");return t.toLowerCase()},method:function(t){if(t=this.string(t),o.indexOf(t.toLowerCase())<0)throw new TypeError("a method in ["+o.join(", ")+"] is expected, but "+t+" given");return t.toLowerCase()},queryString:function(t){var e={};return"string"==typeof t?t.replace("?","").split("&").forEach(function(t){var i=t.split("=");2===i.length&&(e[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}):e=t,this.plainObject(e)},selector:function(t){if("string"!=typeof t&&!(t instanceof HTMLElement))throw new TypeError("a selector or an HTMLElement is expected, "+t+" ["+typeof t+"] given");return t},func:function(t){if(t=this.string(t),!/^([a-zA-Z_])([a-zA-Z0-9_\-])+$/.test(t))throw new TypeError("a valid function name is expected, "+t+" ["+typeof t+"] given");return t}},l=function(t,e){var i;if(t=t||"",e)if(-1===t.indexOf("?")&&(t+="?"),"string"==typeof e)t+=e;else if("object"==typeof e)for(i in e)t+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e[i]);return t};n=[],void 0!==(r=function(){return a}.apply(e,n))&&(t.exports=r)}()},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){if("[object String]"===Object.prototype.toString.call(t))try{t=JSON.parse(t),this.fail(t)}catch(e){this.fail(t)}this.fail(t)}return function(e,i){var n=t.bind(e);return e.fail&&i.on("error",n).on("4xx",n).on("5xx",n),i}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){function e(t,e,i){var n,r=new RegExp("("+e+"=)[^&]*");return r.test(t)?t=t.replace(r,"$1"+i):(n=/\?/.test(t)?"&":"?",t+=n+e+"="+i),t}function i(i,n,r){var o;return t.isString(n)&&t.isString(r)&&0!==r.trim().length?(o=new RegExp("{"+n+"}","g"),o.test(i)?i.replace(o,r):e(i,n,r)):i}function n(t,e){return t=i(t,"key",e.apiKey),e.language&&(t=i(t,"language",e.language)),e.geopolView&&(t=i(t,"view",e.geopolView)),t}function r(e,i){return t.isObject(e)?(e.hasOwnProperty("url")&&t.isString(e.url)&&(e.url=n(e.url,i)),e.hasOwnProperty("tiles")&&t.isArray(e.tiles)&&(e.tiles=e.tiles.map(function(t){return n(t,i)})),e):e}function o(t,e){var i,n={};for(i in t)t.hasOwnProperty(i)&&(n[i]=r(t[i],e));return n}function a(e,i){return t.isObject(e)?(t.isObject(e.sources)&&(e.sources=o(e.sources,i)),t.isObject(i.resourceUrls)&&(i.resourceUrls.glyphs&&(e.glyphs=i.resourceUrls.glyphs),i.resourceUrls.sprite&&(e.sprite=i.resourceUrls.sprite)),e):e}return a}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){return window.location.protocol+"//"+window.location.host+t}function e(e){return-1===e.indexOf("://")&&(e=t(e)),e}return{convert:e}}.apply(e,n))&&(t.exports=r)},function(t,e,i){!function(e,i){t.exports=i()}(0,function(){"use strict";function t(t,r){if(e)if(i){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+i+")(sharedChunk);",a={};e(a),n=r(a),n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else i=r;else e=r}var e,i,n;return t(["exports"],function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}function i(t,e,i,n){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*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}function n(t,e){this.x=t,this.y=e}function r(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!r(t[n],e[n]))return!1;return!0}return t===e}function o(t,e,i,n){var r=new Yi(t,e,i,n);return function(t){return r.solve(t)}}function a(t,e,i){return Math.min(i,Math.max(e,t))}function s(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];for(var n=0,r=e;n<r.length;n+=1){var o=r[n];for(var a in o)t[a]=o[a]}return t}function l(){return en++}function u(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function c(t,e){return-1!==t.indexOf(e,t.length-e.length)}function h(t,e,i){var n={};for(var r in t)n[r]=e.call(i||this,t[r],r,t);return n}function p(t,e,i){var n={};for(var r in t)e.call(i||this,t[r],r,t)&&(n[r]=t[r]);return n}function f(t){return Array.isArray(t)?t.map(f):"object"==typeof t&&t?h(t,f):t}function d(t){nn[t]||("undefined"!=typeof console&&console.warn(t),nn[t]=!0)}function m(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function _(t){for(var e=0,i=0,n=t.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=t[i],e+=((a=t[r]).x-o.x)*(o.y+a.y);return e}function g(t){var e=new self.XMLHttpRequest;for(var i in e.open(t.method||"GET",t.url,!0),t.headers)e.setRequestHeader(i,t.headers[i]);return e.withCredentials="include"===t.credentials,e}function y(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function v(t,e,i){if(i&&i[t]){var n=i[t].indexOf(e);-1!==n&&i[t].splice(n,1)}}function b(t){var e=t.key,i=t.value;return i?[new _n(e,i,"constants have been deprecated as of v8")]:[]}function x(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];for(var n=0,r=e;n<r.length;n+=1){var o=r[n];for(var a in o)t[a]=o[a]}return t}function w(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function k(t){return Array.isArray(t)?t.map(k):w(t)}function T(t,e){return{kind:"array",itemType:t,N:e}}function E(t){if("array"===t.kind){var e=E(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}function L(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!L(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,n=Cn;i<n.length;i+=1)if(!L(n[i],e))return null}return"Expected "+E(t)+" but found "+E(e)+" instead."}function S(t,e,i,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,i,n]:[t,e,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function C(t){if(null===t)return vn;if("string"==typeof t)return xn;if("boolean"==typeof t)return wn;if("number"==typeof t)return bn;if(t instanceof Pn)return kn;if(t instanceof In)return Ln;if(t instanceof zn)return Sn;if(Array.isArray(t)){for(var e,i=t.length,n=0,r=t;n<r.length;n+=1){var o=C(r[n]);if(e){if(e===o)continue;e=En;break}e=o}return T(e||En,i)}return Tn}function A(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Pn||t instanceof zn?t.toString():JSON.stringify(t)}function P(t){if(t instanceof Zn){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}var e=!0;return t.eachChild(function(t){e&&!P(t)&&(e=!1)}),e}function I(t){if(t instanceof Zn&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!I(t)&&(e=!1)}),e}function M(t,e){if(t instanceof Zn&&e.indexOf(t.name)>=0)return!1;var i=!0;return t.eachChild(function(t){i&&!M(t,e)&&(i=!1)}),i}function z(t,e){for(var i,n,r=0,o=t.length-1,a=0;r<=o;){if(i=t[a=Math.floor((r+o)/2)],n=t[a+1],e===i||e>i&&e<n)return a;if(i<e)r=a+1;else{if(!(i>e))throw new Bn("Input is not a number.");o=a-1}}return Math.max(a-1,0)}function R(t,e,i){return t*(1-i)+e*i}function B(t){return t>er?Math.pow(t,1/3):t/tr+Qn}function O(t){return t>$n?t*t*t:tr*(t-Qn)}function D(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function N(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function F(t){var e=N(t.r),i=N(t.g),n=N(t.b),r=B((.4124564*e+.3575761*i+.1804375*n)/Jn),o=B((.2126729*e+.7151522*i+.072175*n)/Xn);return{l:116*o-16,a:500*(r-o),b:200*(o-B((.0193339*e+.119192*i+.9503041*n)/Yn)),alpha:t.a}}function j(t){var e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Xn*O(e),i=Jn*O(i),n=Yn*O(n),new Pn(D(3.2404542*i-1.5371385*e-.4985314*n),D(-.969266*i+1.8760108*e+.041556*n),D(.0556434*i-.2040259*e+1.0572252*n),t.alpha)}function U(t,e,i,n){var r=n-i,o=t-i;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}function V(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 Z(t,e,i,n){return 0===n.compare(e,i)}function q(t,e,i){var n="=="!==t&&"!="!==t;return function(){function r(t,e,i){this.type=wn,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return r.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,En);if(!o)return null;if(!V(i,o.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+E(o.type)+"'.");var a=e.parse(t[2],2,En);if(!a)return null;if(!V(i,a.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+E(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+E(o.type)+"' and '"+E(a.type)+"'.");n&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Dn(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Dn(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,Ln)))return null}return new r(o,a,s)},r.prototype.evaluate=function(r){var o=this.lhs.evaluate(r),a=this.rhs.evaluate(r);if(n&&this.hasUntypedArgument){var s=C(o),l=C(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Bn('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var u=C(o),c=C(a);if("string"!==u.kind||"string"!==c.kind)return e(r,o,a)}return this.collator?i(r,o,a,this.collator.evaluate(r)):e(r,o,a)},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},r}()}function G(t,e){var i=e[0],n=e[1],r=e[2],o=e[3];i=i.evaluate(t),n=n.evaluate(t),r=r.evaluate(t);var a=o?o.evaluate(t):1,s=S(i,n,r,a);if(s)throw new Bn(s);return new Pn(i/255*a,n/255*a,r/255*a,a)}function H(t,e){return t in e}function W(t,e){var i=e[t];return void 0===i?null:i}function K(t){return{type:t}}function J(t){return{result:"success",value:t}}function X(t){return{result:"error",value:t}}function Y(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Q(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function $(t){return!!t.expression&&t.expression.interpolated}function tt(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function et(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function it(t){return t}function nt(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function rt(t,e,i,n,r){return nt(typeof i===r?n[i]:void 0,t.default,e.default)}function ot(t,e,i){if("number"!==tt(i))return nt(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 r=lt(t.stops,i);return t.stops[r][1]}function at(t,e,i){var n=void 0!==t.base?t.base:1;if("number"!==tt(i))return nt(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 o=lt(t.stops,i),a=function(t,e,i,n){var r=n-i,o=t-i;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}(i,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=Kn[e.type]||it;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=ar[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==n)return u(i,n,a)}}:u(s,l,a)}function st(t,e,i){return"color"===e.type?i=Pn.parse(i):"formatted"===e.type?i=zn.fromString(i.toString()):tt(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),nt(i,t.default,e.default)}function lt(t,e){for(var i,n,r=0,o=t.length-1,a=0;r<=o;){if(i=t[a=Math.floor((r+o)/2)][0],n=t[a+1][0],e===i||e>i&&e<n)return a;i<e?r=a+1:i>e&&(o=a-1)}return Math.max(a-1,0)}function ut(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in br}function ct(t,e){var i=new Hn(br,[],function(t){var e={color:kn,string:xn,number:bn,enum:xn,boolean:wn,formatted:Sn};return"array"===t.type?T(e[t.value]||En,t.length):e[t.type]}(e)),n=i.parse(t,void 0,void 0,void 0,"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?J(new xr(n,e)):X(i.errors)}function ht(t,e){if("error"===(t=ct(t,e)).result)return t;var i=t.value.expression,n=P(i);if(!n&&!Y(e))return X([new gn("","data expressions not supported")]);var r=M(i,["zoom"]);if(!r&&!Q(e))return X([new gn("","zoom expressions not supported")]);var o=function t(e){var i=null;if(e instanceof ur)i=t(e.result);else if(e instanceof lr)for(var n=0,r=e.args;n<r.length;n+=1){var o=r[n];if(i=t(o))break}else(e instanceof Wn||e instanceof sr)&&e.input instanceof Zn&&"zoom"===e.input.name&&(i=e);return i instanceof gn?i:(e.eachChild(function(e){var n=t(e);n instanceof gn?i=n:!i&&n?i=new gn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):i&&n&&i!==n&&(i=new gn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),i)}(i);return o||r?o instanceof gn?X([o]):o instanceof sr&&!$(e)?X([new gn("",'"interpolate" expressions cannot be used with this property')]):J(o?new kr(n?"camera":"composite",t.value,o):new wr(n?"constant":"source",t.value)):X([new gn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}function pt(t,e){if(et(t))return new Tr(t,e);if(ut(t)){var i=ht(t,e);if("error"===i.result)throw new Error(i.value.map(function(t){return t.key+": "+t.message}).join(", "));return i.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=Pn.parse(t)),{kind:"constant",evaluate:function(){return n}}}function ft(t){var e=t.key,i=t.value,n=t.valueSpec||{},r=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=tt(i);if("object"!==l)return[new _n(e,i,"object expected, "+l+" found")];for(var u in i){var c=u.split(".")[0],h=n[c]||n["*"],p=void 0;if(r[c])p=r[c];else if(n[c])p=Bt;else if(r["*"])p=r["*"];else{if(!n["*"]){s.push(new _n(e,i[u],'unknown property "'+u+'"'));continue}p=Bt}s=s.concat(p({key:(e?e+".":e)+u,value:i[u],valueSpec:h,style:o,styleSpec:a,object:i,objectKey:u},i))}for(var f in n)r[f]||n[f].required&&void 0===n[f].default&&void 0===i[f]&&s.push(new _n(e,i,'missing required property "'+f+'"'));return s}function dt(t){var e=t.value,i=t.valueSpec,n=t.style,r=t.styleSpec,o=t.key,a=t.arrayElementValidator||Bt;if("array"!==tt(e))return[new _n(o,e,"array expected, "+tt(e)+" found")];if(i.length&&e.length!==i.length)return[new _n(o,e,"array length "+i.length+" expected, length "+e.length+" found")];if(i["min-length"]&&e.length<i["min-length"])return[new _n(o,e,"array length at least "+i["min-length"]+" expected, length "+e.length+" found")];var s={type:i.value};r.$version<7&&(s.function=i.function),"object"===tt(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:n,styleSpec:r,key:o+"["+u+"]"}));return l}function mt(t){var e=t.key,i=t.value,n=t.valueSpec,r=tt(i);return"number"!==r?[new _n(e,i,"number expected, "+r+" found")]:"minimum"in n&&i<n.minimum?[new _n(e,i,i+" is less than the minimum value "+n.minimum)]:"maximum"in n&&i>n.maximum?[new _n(e,i,i+" is greater than the maximum value "+n.maximum)]:[]}function _t(t){function e(t){var e=[],n=t.value,s=t.key;if("array"!==tt(n))return[new _n(s,n,"array expected, "+tt(n)+" found")];if(2!==n.length)return[new _n(s,n,"array length 2 expected, length "+n.length+" found")];if(h){if("object"!==tt(n[0]))return[new _n(s,n,"object expected, "+tt(n[0])+" found")];if(void 0===n[0].zoom)return[new _n(s,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new _n(s,n,"object stop key must have value")];if(o&&o>w(n[0].zoom))return[new _n(s,n[0].zoom,"stop zoom values must appear in ascending order")];w(n[0].zoom)!==o&&(o=w(n[0].zoom),r=void 0,l={}),e=e.concat(ft({key:s+"[0]",value:n[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:mt,value:i}}))}else e=e.concat(i({key:s+"[0]",value:n[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},n));return e.concat(Bt({key:s+"[1]",value:n[1],valueSpec:a,style:t.style,styleSpec:t.styleSpec}))}function i(t,e){var i=tt(t.value),o=w(t.value),u=null!==t.value?t.value:e;if(n){if(i!==n)return[new _n(t.key,u,i+" stop domain type must match previous stop domain type "+n)]}else n=i;if("number"!==i&&"string"!==i&&"boolean"!==i)return[new _n(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==i&&"categorical"!==s){var c="number expected, "+i+" found";return Y(a)&&void 0===s&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _n(t.key,u,c)]}return"categorical"!==s||"number"!==i||isFinite(o)&&Math.floor(o)===o?"categorical"!==s&&"number"===i&&void 0!==r&&o<r?[new _n(t.key,u,"stop domain values must appear in ascending order")]:(r=o,"categorical"===s&&o in l?[new _n(t.key,u,"stop domain values must be unique")]:(l[o]=!0,[])):[new _n(t.key,u,"integer expected, found "+o)]}var n,r,o,a=t.valueSpec,s=w(t.value.type),l={},u="categorical"!==s&&void 0===t.value.property,c=!u,h="array"===tt(t.value.stops)&&"array"===tt(t.value.stops[0])&&"object"===tt(t.value.stops[0][0]),p=ft({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===s)return[new _n(t.key,t.value,'identity function may not have a "stops" property')];var i=[],n=t.value;return i=i.concat(dt({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:e})),"array"===tt(n)&&0===n.length&&i.push(new _n(t.key,n,"array must have at least one stop")),i},default:function(t){return Bt({key:t.key,value:t.value,valueSpec:a,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===s&&u&&p.push(new _n(t.key,t.value,'missing required property "property"')),"identity"===s||t.value.stops||p.push(new _n(t.key,t.value,'missing required property "stops"')),"exponential"===s&&t.valueSpec.expression&&!$(t.valueSpec)&&p.push(new _n(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(c&&!Y(t.valueSpec)?p.push(new _n(t.key,t.value,"property functions not supported")):u&&!Q(t.valueSpec)&&p.push(new _n(t.key,t.value,"zoom functions not supported"))),"categorical"!==s&&!h||void 0!==t.value.property||p.push(new _n(t.key,t.value,'"property" property is required')),p}function gt(t){var e=("property"===t.expressionContext?ht:ct)(k(t.value),t.valueSpec);return"error"===e.result?e.value.map(function(e){return new _n(""+t.key+e.key,t.value,e.message)}):"property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new _n(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')]:"property"!==t.expressionContext||"layout"!==t.propertyType||I(e.value._styleExpression.expression)?[]:[new _n(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')]}function yt(t){var e=t.key,i=t.value,n=t.valueSpec,r=[];return Array.isArray(n.values)?-1===n.values.indexOf(w(i))&&r.push(new _n(e,i,"expected one of ["+n.values.join(", ")+"], "+JSON.stringify(i)+" found")):-1===Object.keys(n.values).indexOf(w(i))&&r.push(new _n(e,i,"expected one of ["+Object.keys(n.values).join(", ")+"], "+JSON.stringify(i)+" found")),r}function vt(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;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 n=i[e];if(!vt(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}function bt(t){if(null===t||void 0===t)return function(){return!0};vt(t)||(t=wt(t));var e=ct(t,Er);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return function(t,i){return e.value.evaluate(t,i)}}function xt(t,e){return t<e?-1:t>e?1:0}function wt(t){if(!t)return!0;var e,i=t[0];return t.length<=1?"any"!==i:"=="===i?kt(t[1],t[2],"=="):"!="===i?Lt(kt(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?kt(t[1],t[2],i):"any"===i?(e=t.slice(1),["any"].concat(e.map(wt))):"all"===i?["all"].concat(t.slice(1).map(wt)):"none"===i?["all"].concat(t.slice(1).map(wt).map(Lt)):"in"===i?Tt(t[1],t.slice(2)):"!in"===i?Lt(Tt(t[1],t.slice(2))):"has"===i?Et(t[1]):"!has"!==i||Lt(Et(t[1]))}function kt(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 Tt(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 e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(xt)]]:["filter-in-small",t,["literal",e]]}}function Et(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Lt(t){return["!",t]}function St(t){return vt(k(t.value))?gt(x({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var i=e.value,n=e.key;if("array"!==tt(i))return[new _n(n,i,"array expected, "+tt(i)+" found")];var r,o=e.styleSpec,a=[];if(i.length<1)return[new _n(n,i,"filter array must have at least 1 element")];switch(a=a.concat(yt({key:n+"[0]",value:i[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),w(i[0])){case"<":case"<=":case">":case">=":i.length>=2&&"$type"===w(i[1])&&a.push(new _n(n,i,'"$type" cannot be use with operator "'+i[0]+'"'));case"==":case"!=":3!==i.length&&a.push(new _n(n,i,'filter array for operator "'+i[0]+'" must have 3 elements'));case"in":case"!in":i.length>=2&&"string"!==(r=tt(i[1]))&&a.push(new _n(n+"[1]",i[1],"string expected, "+r+" found"));for(var s=2;s<i.length;s++)r=tt(i[s]),"$type"===w(i[1])?a=a.concat(yt({key:n+"["+s+"]",value:i[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&a.push(new _n(n+"["+s+"]",i[s],"string, number, or boolean expected, "+r+" found"));break;case"any":case"all":case"none":for(var l=1;l<i.length;l++)a=a.concat(t({key:n+"["+l+"]",value:i[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":r=tt(i[1]),2!==i.length?a.push(new _n(n,i,'filter array for "'+i[0]+'" operator must have 2 elements')):"string"!==r&&a.push(new _n(n+"[1]",i[1],"string expected, "+r+" found"))}return a}(t)}function Ct(t,e){var i=t.key,n=t.style,r=t.styleSpec,o=t.value,a=t.objectKey,s=r[e+"_"+t.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return Bt({key:i,value:o,valueSpec:r.transition,style:n,styleSpec:r});var u,c=t.valueSpec||s[a];if(!c)return[new _n(i,o,'unknown property "'+a+'"')];if("string"===tt(o)&&Y(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new _n(i,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var h=[];return"symbol"===t.layerType&&("text-field"===a&&n&&!n.glyphs&&h.push(new _n(i,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&et(k(o))&&"identity"===w(o.type)&&h.push(new _n(i,o,'"text-font" does not support identity functions'))),h.concat(Bt({key:t.key,value:o,valueSpec:c,style:n,styleSpec:r,expressionContext:"property",propertyType:e,propertyKey:a}))}function At(t){return Ct(t,"paint")}function Pt(t){return Ct(t,"layout")}function It(t){var e=[],i=t.value,n=t.key,r=t.style,o=t.styleSpec;i.type||i.ref||e.push(new _n(n,i,'either "type" or "ref" is required'));var a,s=w(i.type),l=w(i.ref);if(i.id)for(var u=w(i.id),c=0;c<t.arrayIndex;c++){var h=r.layers[c];w(h.id)===u&&e.push(new _n(n,i.id,'duplicate layer id "'+i.id+'", previously used at line '+h.id.__line__))}if("ref"in i)["type","source","source-layer","filter","layout"].forEach(function(t){t in i&&e.push(new _n(n,i[t],'"'+t+'" is prohibited for ref layers'))}),r.layers.forEach(function(t){w(t.id)===l&&(a=t)}),a?a.ref?e.push(new _n(n,i.ref,"ref cannot reference another ref layer")):s=w(a.type):e.push(new _n(n,i.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(i.source){var p=r.sources&&r.sources[i.source],f=p&&w(p.type);p?"vector"===f&&"raster"===s?e.push(new _n(n,i.source,'layer "'+i.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new _n(n,i.source,'layer "'+i.id+'" requires a vector source')):"vector"!==f||i["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new _n(n,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!i.paint||!i.paint["line-gradient"]||"geojson"===f&&p.lineMetrics||e.push(new _n(n,i,'layer "'+i.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new _n(n,i,'layer "'+i.id+'" must specify a "source-layer"')):e.push(new _n(n,i.source,'source "'+i.source+'" not found'))}else e.push(new _n(n,i,'missing required property "source"'));return e=e.concat(ft({key:n,value:i,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Bt({key:n+".type",value:i.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:i,objectKey:"type"})},filter:St,layout:function(t){return ft({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Pt(x({layerType:s},t))}}})},paint:function(t){return ft({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return At(x({layerType:s},t))}}})}}}))}function Mt(t){var e=t.value,i=t.key,n=t.styleSpec,r=t.style;if(!e.type)return[new _n(i,e,'"type" is required')];var o=w(e.type),a=[];switch(o){case"vector":case"raster":case"raster-dem":if(a=a.concat(ft({key:i,value:e,valueSpec:n["source_"+o.replace("-","_")],style:t.style,styleSpec:n})),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&a.push(new _n(i+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return a;case"geojson":return ft({key:i,value:e,valueSpec:n.source_geojson,style:r,styleSpec:n});case"video":return ft({key:i,value:e,valueSpec:n.source_video,style:r,styleSpec:n});case"image":return ft({key:i,value:e,valueSpec:n.source_image,style:r,styleSpec:n});case"canvas":return a.push(new _n(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")),a;default:return yt({key:i+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:r,styleSpec:n})}}function zt(t){var e=t.value,i=t.styleSpec,n=i.light,r=t.style,o=[],a=tt(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new _n("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=l&&n[l[1]]&&n[l[1]].transition?o.concat(Bt({key:s,value:e[s],valueSpec:i.transition,style:r,styleSpec:i})):n[s]?o.concat(Bt({key:s,value:e[s],valueSpec:n[s],style:r,styleSpec:i})):o.concat([new _n(s,e[s],'unknown property "'+s+'"')])}return o}function Rt(t){var e=t.value,i=t.key,n=tt(e);return"string"!==n?[new _n(i,e,"string expected, "+n+" found")]:[]}function Bt(t){var e=t.value,i=t.valueSpec,n=t.styleSpec;return i.expression&&et(w(e))?_t(t):i.expression&&ut(k(e))?gt(t):i.type&&Lr[i.type]?Lr[i.type](t):ft(x({},t,{valueSpec:i.type?n[i.type]:i}))}function Ot(t){var e=t.value,i=t.key,n=Rt(t);return n.length?n:(-1===e.indexOf("{fontstack}")&&n.push(new _n(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&n.push(new _n(i,e,'"glyphs" url must include a "{range}" token')),n)}function Dt(t,e){e=e||mn;var i=[];return i=i.concat(Bt({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Ot,"*":function(){return[]}}})),t.constants&&(i=i.concat(b({key:"constants",value:t.constants,style:t,styleSpec:e}))),Nt(i)}function Nt(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Ft(t){return function(){return Nt(t.apply(this,arguments))}}function jt(t,e){var i=!1;if(e&&e.length)for(var n=0,r=e;n<r.length;n+=1){var o=r[n];t.fire(new fn(new Error(o.message))),i=!0}return i}function Ut(t,e,i){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var r=new Int32Array(this.arrayBuffer);t=r[0],e=r[1],i=r[2],this.d=e+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[Mr+o],s=r[Mr+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[Mr+n.length],u=r[Mr+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=i,this.scale=e/t,this.uid=0;var h=i/e*t;this.min=-h,this.max=t+h}function Vt(t,e,i){void 0===i&&(i={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Rr[t]={klass:e,omit:i.omit||[],shallow:i.shallow||[]}}function Zt(t,e){if(null===t||void 0===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(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var i=t;return e&&e.push(i.buffer),i}if(t instanceof zr)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],r=0,o=t;r<o.length;r+=1){var a=o[r];n.push(Zt(a,e))}return n}if("object"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var c in t)if(t.hasOwnProperty(c)&&!(Rr[l].omit.indexOf(c)>=0)){var h=t[c];u[c]=Rr[l].shallow.indexOf(c)>=0?h:Zt(h,e)}t instanceof Error&&(u.message=t.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof t)}function qt(t){if(null===t||void 0===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||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof zr)return t;if(Array.isArray(t))return t.map(qt);if("object"==typeof t){var e=t.$name||"Object",i=Rr[e].klass;if(!i)throw new Error("can't deserialize unregistered class "+e);if(i.deserialize)return i.deserialize(t);for(var n=Object.create(i.prototype),r=0,o=Object.keys(t);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=t[a];n[a]=Rr[e].shallow.indexOf(a)>=0?s:qt(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}function Gt(t){for(var e=0,i=t;e<i.length;e+=1)if(Wt(i[e].charCodeAt(0)))return!0;return!1}function Ht(t){return!Nr.Arabic(t)&&!Nr["Arabic Supplement"](t)&&!Nr["Arabic Extended-A"](t)&&!Nr["Arabic Presentation Forms-A"](t)&&!Nr["Arabic Presentation Forms-B"](t)}function Wt(t){return 746===t||747===t||!(t<4352)&&(!!Nr["Bopomofo Extended"](t)||!!Nr.Bopomofo(t)||!(!Nr["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||!!Nr["CJK Compatibility Ideographs"](t)||!!Nr["CJK Compatibility"](t)||!!Nr["CJK Radicals Supplement"](t)||!!Nr["CJK Strokes"](t)||!(!Nr["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||!!Nr["CJK Unified Ideographs Extension A"](t)||!!Nr["CJK Unified Ideographs"](t)||!!Nr["Enclosed CJK Letters and Months"](t)||!!Nr["Hangul Compatibility Jamo"](t)||!!Nr["Hangul Jamo Extended-A"](t)||!!Nr["Hangul Jamo Extended-B"](t)||!!Nr["Hangul Jamo"](t)||!!Nr["Hangul Syllables"](t)||!!Nr.Hiragana(t)||!!Nr["Ideographic Description Characters"](t)||!!Nr.Kanbun(t)||!!Nr["Kangxi Radicals"](t)||!!Nr["Katakana Phonetic Extensions"](t)||!(!Nr.Katakana(t)||12540===t)||!(!Nr["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Nr["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||!!Nr["Unified Canadian Aboriginal Syllabics"](t)||!!Nr["Unified Canadian Aboriginal Syllabics Extended"](t)||!!Nr["Vertical Forms"](t)||!!Nr["Yijing Hexagram Symbols"](t)||!!Nr["Yi Syllables"](t)||!!Nr["Yi Radicals"](t))}function Kt(t){return!(Wt(t)||function(t){return!!(Nr["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Nr["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Nr["Letterlike Symbols"](t)||Nr["Number Forms"](t)||Nr["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Nr["Control Pictures"](t)&&9251!==t||Nr["Optical Character Recognition"](t)||Nr["Enclosed Alphanumerics"](t)||Nr["Geometric Shapes"](t)||Nr["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Nr["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Nr["CJK Symbols and Punctuation"](t)||Nr.Katakana(t)||Nr["Private Use Area"](t)||Nr["CJK Compatibility Forms"](t)||Nr["Small Form Variants"](t)||Nr["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Jt(t,e){return!(!e&&(t>=1424&&t<=2303||Nr["Arabic Presentation Forms-A"](t)||Nr["Arabic Presentation Forms-B"](t)))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Nr.Khmer(t))}function Xt(t,e){void 0===e&&(e=1);var i=0,n=0;return{members:t.map(function(t){var r,o=(r=t.type,ao[r].BYTES_PER_ELEMENT),a=i=Yt(i,Math.max(e,o)),s=t.components||1;return n=Math.max(n,o),i+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:Yt(i,Math.max(n,e)),alignment:e}}function Yt(t,e){return Math.ceil(t/e)*e}function Qt(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function $t(t){return[Ho(255*t.r,255*t.g),Ho(255*t.b,255*t.a)]}function te(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function ee(t,e,i){var n={color:{source:Ao,composite:Po},number:{source:ko,composite:Ao}},r=function(t){return{"line-pattern":{source:fo,composite:fo},"fill-pattern":{source:fo,composite:fo},"fill-extrusion-pattern":{source:fo,composite:fo}}[t]}(t);return r&&r[i]||n[e][i]}function ie(t){for(var e=ha/t.extent,i=t.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<pa.min||a.x>pa.max||a.y<pa.min||a.y>pa.max)&&d("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return i}function ne(t,e,i,n,r){t.emplaceBack(2*e+(n+1)/2,2*i+(r+1)/2)}function re(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];if(fe(r,e))return!0;if(ce(e,r,i))return!0}return!1}function oe(t,e){if(1===t.length&&1===t[0].length)return pe(e,t[0][0]);for(var i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.length;r++)if(pe(t,n[r]))return!0;for(var o=0;o<t.length;o++){for(var a=t[o],s=0;s<a.length;s++)if(pe(e,a[s]))return!0;for(var l=0;l<e.length;l++)if(le(a,e[l]))return!0}return!1}function ae(t,e,i){for(var n=0;n<e.length;n++)for(var r=e[n],o=0;o<t.length;o++){var a=t[o];if(a.length>=3)for(var s=0;s<r.length;s++)if(fe(a,r[s]))return!0;if(se(a,r,i))return!0}return!1}function se(t,e,i){if(t.length>1){if(le(t,e))return!0;for(var n=0;n<e.length;n++)if(ce(e[n],t,i))return!0}for(var r=0;r<t.length;r++)if(ce(t[r],e,i))return!0;return!1}function le(t,e){if(0===t.length||0===e.length)return!1;for(var i=0;i<t.length-1;i++)for(var n=t[i],r=t[i+1],o=0;o<e.length-1;o++)if(ue(n,r,e[o],e[o+1]))return!0;return!1}function ue(t,e,i,n){return m(t,i,n)!==m(e,i,n)&&m(t,e,i)!==m(t,e,n)}function ce(t,e,i){var n=i*i;if(1===e.length)return t.distSqr(e[0])<n;for(var r=1;r<e.length;r++)if(he(t,e[r-1],e[r])<n)return!0;return!1}function he(t,e,i){var n=e.distSqr(i);if(0===n)return t.distSqr(e);var r=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/n;return r<0?t.distSqr(e):r>1?t.distSqr(i):t.distSqr(i.sub(e)._mult(r)._add(e))}function pe(t,e){for(var i,n,r,o=!1,a=0;a<t.length;a++)for(var s=0,l=(i=t[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>e.y!=r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function fe(t,e){for(var i=!1,n=0,r=t.length-1;n<t.length;r=n++){var o=t[n],a=t[r];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 de(t,e,i){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:i.programConfigurations.get(e.id).binders[t].maxValue}function me(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function _e(t,e,i,n,r){if(!e[0]&&!e[1])return t;var o=$i.convert(e);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<t.length;s++){for(var l=t[s],u=[],c=0;c<l.length;c++)u.push(l[c].sub(o._mult(r)));a.push(u)}return a}function ge(){var t=new ma(9);return ma!=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}function ye(){var t=new ma(3);return ma!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function ve(t){var e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function be(t,e,i){var n=new ma(3);return n[0]=t,n[1]=e,n[2]=i,n}function xe(t,e){var i=e[0],n=e[1],r=e[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function we(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ke(t,e,i){var n=e[0],r=e[1],o=e[2],a=i[0],s=i[1],l=i[2];return t[0]=r*l-o*s,t[1]=o*a-n*l,t[2]=n*s-r*a,t}function Te(){var t=new ma(4);return ma!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Ee(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],a=i*i+n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=i*a,t[1]=n*a,t[2]=r*a,t[3]=o*a),t}function Le(t,e,i){var n=e[0],r=e[1],o=e[2],a=e[3];return t[0]=i[0]*n+i[4]*r+i[8]*o+i[12]*a,t[1]=i[1]*n+i[5]*r+i[9]*o+i[13]*a,t[2]=i[2]*n+i[6]*r+i[10]*o+i[14]*a,t[3]=i[3]*n+i[7]*r+i[11]*o+i[15]*a,t}function Se(){var t=new ma(4);return ma!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Ce(t,e,i){var n=Le([],[t.x,t.y,0,1],e);return new $i((n[0]/n[3]+1)*i.width*.5,(n[1]/n[3]+1)*i.height*.5)}function Ae(t,e,i,n){var r=e.width,o=e.height;if(n){if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return t.width=r,t.height=o,t.data=n,t}function Pe(t,e,i){var n=e.width,r=e.height;if(n!==t.width||r!==t.height){var o=Ae({},{width:n,height:r},i);Ie(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,r)},i),t.width=n,t.height=r,t.data=o.data}}function Ie(t,e,i,n,r,o){if(0===r.width||0===r.height)return e;if(r.width>t.width||r.height>t.height||i.x>t.width-r.width||i.y>t.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>e.width||r.height>e.height||n.x>e.width-r.width||n.y>e.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<r.height;l++)for(var u=((i.y+l)*t.width+i.x)*o,c=((n.y+l)*e.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return e}function Me(t,e){for(var i=new Uint8Array(1024),n={},r=0,o=0;r<256;r++,o+=4){n[e]=r/255;var a=t.evaluate(n);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 ka({width:256,height:1},i)}function ze(t,e,i){i=i||2;var n,r,o,a,s,l,u,c=e&&e.length,h=c?e[0]*i:t.length,p=Re(t,0,h,i,!0),f=[];if(!p)return f;if(c&&(p=function(t,e,i,n){var r,o,a,s,l,u=[];for(r=0,o=e.length;r<o;r++)a=e[r]*n,s=r<o-1?e[r+1]*n:t.length,(l=Re(t,a,s,n,!1))===l.next&&(l.steiner=!0),u.push(qe(l));for(u.sort(Ue),r=0;r<u.length;r++)Ve(u[r],i),i=Be(i,i.next);return i}(t,e,p,i)),t.length>80*i){n=o=t[0],r=a=t[1];for(var d=i;d<h;d+=i)s=t[d],l=t[d+1],s<n&&(n=s),l<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return Oe(p,f,i,n,r,u),f}function Re(t,e,i,n,r){var o,a;if(r===ei(t,e,i,n)>0)for(o=e;o<i;o+=n)a=Qe(o,t[o],t[o+1],a);else for(o=i-n;o>=e;o-=n)a=Qe(o,t[o],t[o+1],a);return a&&Ke(a,a.next)&&($e(a),a=a.next),a}function Be(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!Ke(n,n.next)&&0!==We(n.prev,n,n.next))n=n.next;else{if($e(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function Oe(t,e,i,n,r,o,a){if(t){!a&&o&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=Ze(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,o,a,s,l,u=1;do{for(i=t,t=null,o=null,a=0;i;){for(a++,n=i,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1)}(r)}(t,n,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?Ne(t,n,r,o):De(t))e.push(s.i/i),e.push(t.i/i),e.push(l.i/i),$e(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Oe(t=Fe(t,e,i),e,i,n,r,o,2):2===a&&je(t,e,i,n,r,o):Oe(Be(t),e,i,n,r,o,1);break}}}function De(t){var e=t.prev,i=t,n=t.next;if(We(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(Ge(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&We(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Ne(t,e,i,n){var r=t.prev,o=t,a=t.next;if(We(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=Ze(s,l,e,i,n),p=Ze(u,c,e,i,n),f=t.prevZ,d=t.nextZ;f&&f.z>=h&&d&&d.z<=p;){if(f!==t.prev&&f!==t.next&&Ge(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&We(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&Ge(r.x,r.y,o.x,o.y,a.x,a.y,d.x,d.y)&&We(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=h;){if(f!==t.prev&&f!==t.next&&Ge(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&We(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Ge(r.x,r.y,o.x,o.y,a.x,a.y,d.x,d.y)&&We(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Fe(t,e,i){var n=t;do{var r=n.prev,o=n.next.next;!Ke(r,o)&&Je(r,n,n.next,o)&&Xe(r,o)&&Xe(o,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(o.i/i),$e(n),$e(n.next),n=t=o),n=n.next}while(n!==t);return n}function je(t,e,i,n,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&He(a,s)){var l=Ye(a,s);return a=Be(a,a.next),l=Be(l,l.next),Oe(a,e,i,n,r,o),void Oe(l,e,i,n,r,o)}s=s.next}a=a.next}while(a!==t)}function Ue(t,e){return t.x-e.x}function Ve(t,e){if(e=function(t,e){var i,n=e,r=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!i)return null;if(r===a)return i.prev;var l,u=i,c=i.x,h=i.y,p=1/0;for(n=i.next;n!==u;)r>=n.x&&n.x>=c&&r!==n.x&&Ge(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&((l=Math.abs(o-n.y)/(r-n.x))<p||l===p&&n.x>i.x)&&Xe(n,t)&&(i=n,p=l),n=n.next;return i}(t,e)){var i=Ye(e,t);Be(i,i.next)}}function Ze(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function qe(t){var e=t,i=t;do{e.x<i.x&&(i=e),e=e.next}while(e!==t);return i}function Ge(t,e,i,n,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(i-a)*(e-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function He(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&Je(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&Xe(t,e)&&Xe(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function We(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Ke(t,e){return t.x===e.x&&t.y===e.y}function Je(t,e,i,n){return!!(Ke(t,e)&&Ke(i,n)||Ke(t,n)&&Ke(i,e))||We(t,e,i)>0!=We(t,e,n)>0&&We(i,n,t)>0!=We(i,n,e)>0}function Xe(t,e){return We(t.prev,t,t.next)<0?We(t,e,t.next)>=0&&We(t,t.prev,e)>=0:We(t,e,t.prev)<0||We(t,t.next,e)<0}function Ye(t,e){var i=new ti(t.i,t.x,t.y),n=new ti(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function Qe(t,e,i,n){var r=new ti(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function $e(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 ti(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 ei(t,e,i,n){for(var r=0,o=e,a=i-n;o<i;o+=n)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}function ii(t,e){var i=t.length;if(i<=1)return[t];for(var n,r,o=[],a=0;a<i;a++){var s=_(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[t[a]]):n.push(t[a]))}if(n&&o.push(n),e>1)for(var l=0;l<o.length;l++)o[l].length<=e||(Ma(o[l],e,1,o[l].length-1,ni),o[l]=o[l].slice(0,e));return o}function ni(t,e){return e.area-t.area}function ri(t,e,i){for(var n=i.patternDependencies,r=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}function oi(t,e,i,n,r){for(var o=r.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:n-1},i,{}),h=u.evaluate({zoom:n},i,{}),p=u.evaluate({zoom:n+1},i,{});o[c]=!0,o[h]=!0,o[p]=!0,i.patterns[l.id]={min:c,mid:h,max:p}}}return i}function ai(t,e,i,n,r,o,a,s){t.emplaceBack(e,i,2*Math.floor(n*Na)+a,r*Na*2,o*Na*2,Math.round(s))}function si(t,e){return t.x===e.x&&(t.x<0||t.x>ha)||t.y===e.y&&(t.y<0||t.y>ha)}function li(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>ha})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>ha})}function ui(t,e,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=r,t.readFields(ci,this,e)}function ci(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 n=e._keys[t.readVarint()],r=e._values[t.readVarint()];e.properties[n]=r}}(i,e):3==t?e.type=i.readVarint():4==t&&(e._geometry=i.pos)}function hi(t){for(var e,i,n=0,r=0,o=t.length,a=o-1;r<o;a=r++)e=t[r],n+=((i=t[a]).x-e.x)*(e.y+i.y);return n}function pi(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(fi,this,e),this.length=this._features.length}function fi(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 n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(i))}function di(t,e,i){if(3===t){var n=new Ga(i,i.readVarint()+i.pos);n.length&&(e[n.name]=n)}}function mi(t,e,i,n,r,o,a){t.emplaceBack(e.x,e.y,n?1:0,r?1:-1,Math.round(Ka*i.x)+128,Math.round(Ka*i.y)+128,1+(0===o?0:o<0?-1:1)|(a*Xa&63)<<2,a*Xa>>6)}function _i(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(Ya-1)}function gi(t,e){return e>0?e+2*t:t}function yi(t,e,i){return t.sections.forEach(function(t){t.text=function(t,e,i){var n=e.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),Zr.applyArabicShaping&&(t=Zr.applyArabicShaping(t)),t}(t.text,e,i)}),t}function vi(t,e){var i=e.expression;if("constant"===i.kind)return{functionType:"constant",layoutSize:i.evaluate(new qr(t+1))};if("source"===i.kind)return{functionType:"source"};for(var n=i.zoomStops,r=0;r<n.length&&n[r]<=t;)r++;for(var o=r=Math.max(0,r-1);o<n.length&&n[o]<t+1;)o++;o=Math.min(n.length-1,o);var a={min:n[r],max:n[o]};return"composite"===i.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:i.evaluate(new qr(t+1)),zoomRange:a,sizeRange:{min:i.evaluate(new qr(a.min)),max:i.evaluate(new qr(a.max))},propertyValue:e.value}}function bi(t,e,i,n,r,o,a,s){t.emplaceBack(e,i,Math.round(32*n),Math.round(32*r),o,a,s?s[0]:0,s?s[1]:0)}function xi(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 wi(t){for(var e=0,i=0,n=0,r=t;n<r.length;n+=1){var o=r[n];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 h=c[u],p=a.length-1;p>=0;p--){var f=a[p];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var d=a.pop();p<a.length&&(a[p]=d)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}function ki(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function Ti(t){return t.type===ki.Bytes?t.readVarint()+t.pos:t.pos+1}function Ei(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Li(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function Si(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function Ci(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function Ai(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function Pi(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function Ii(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function Mi(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function zi(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function Ri(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function Bi(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function Oi(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Di(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function Ni(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Fi(t,e,i){1===t&&i.readMessage(ji,e)}function ji(t,e,i){if(3===t){var n=i.readMessage(Ui,{}),r=n.id,o=n.bitmap,a=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;e.push({id:r,bitmap:new wa({width:a+2*Bs,height:s+2*Bs},o),metrics:{width:a,height:s,left:l,top:u,advance:c}})}}function Ui(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 Vi(t,e,i){var n=2*Math.PI*6378137/256/Math.pow(2,i);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}function Zi(t,e,i,n){(t*=2)<0&&(t=-1*t-1);var r=1<<e;return 32*(r*r*t+r*n+i)+e}function qi(t,e){return e-t}function Gi(t,e,i,n){var r=Math.pow(t-e,2);return n?t<e?r/2:2*r:r+Math.abs(i)*i}function Hi(t,e){var i=0;return 10===t&&(i-=1e4),40!==t&&65288!==t||(i+=50),41!==e&&65289!==e||(i+=50),i}function Wi(t,e,i,n,r,o){for(var a=null,s=Gi(e,i,r,o),l=0,u=n;l<u.length;l+=1){var c=u[l],h=Gi(e-c.x,i,r,o)+c.badness;h<=s&&(a=c,s=h)}return{index:t,x:e,priorBreak:a,badness:s}}function Ki(t,e,i,n){if(!i)return[];if(!t)return[];for(var r,o=[],a=function(t,e,i,n){for(var r=0,o=0;o<t.length();o++){var a=t.getSection(o),s=n[a.fontStack],l=s&&s[t.getCharCode(o)];l&&(r+=l.metrics.advance*a.scale+e)}return r/Math.max(1,Math.ceil(r/i))}(t,e,i,n),s=0,l=0;l<t.length();l++){var u=t.getSection(l),c=t.getCharCode(l),h=n[u.fontStack],p=h&&h[c];p&&!Ys[c]&&(s+=p.metrics.advance*u.scale+e),l<t.length()-1&&(Qs[c]||!((r=c)<11904)&&(Nr["Bopomofo Extended"](r)||Nr.Bopomofo(r)||Nr["CJK Compatibility Forms"](r)||Nr["CJK Compatibility Ideographs"](r)||Nr["CJK Compatibility"](r)||Nr["CJK Radicals Supplement"](r)||Nr["CJK Strokes"](r)||Nr["CJK Symbols and Punctuation"](r)||Nr["CJK Unified Ideographs Extension A"](r)||Nr["CJK Unified Ideographs"](r)||Nr["Enclosed CJK Letters and Months"](r)||Nr["Halfwidth and Fullwidth Forms"](r)||Nr.Hiragana(r)||Nr["Ideographic Description Characters"](r)||Nr["Kangxi Radicals"](r)||Nr["Katakana Phonetic Extensions"](r)||Nr.Katakana(r)||Nr["Vertical Forms"](r)||Nr["Yi Radicals"](r)||Nr["Yi Syllables"](r)))&&o.push(Wi(l+1,s,a,o,Hi(c,t.getCharCode(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Wi(t.length(),s,a,o,0,!0))}function Ji(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 Xi(t,e,i,n,r){if(r){var o=t[n],a=e[o.fontStack],s=a&&a[o.glyph];if(s)for(var l=s.metrics.advance*o.scale,u=(t[n].x+l)*r,c=i;c<=n;c++)t[c].x-=u}}var Yi=i;i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var i,n,r,o,a;for(void 0===e&&(e=1e-6),r=t,a=0;a<8;a++){if(o=this.sampleCurveX(r)-t,Math.abs(o)<e)return r;var s=this.sampleCurveDerivativeX(r);if(Math.abs(s)<1e-6)break;r-=o/s}if(n=1,(r=t)<(i=0))return i;if(r>n)return n;for(;i<n;){if(o=this.sampleCurveX(r),Math.abs(o-t)<e)return r;t>o?i=r:n=r,r=.5*(n-i)+i}return r},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Qi=function(t,e,i){this.column=t,this.row=e,this.zoom=i};Qi.prototype.clone=function(){return new Qi(this.column,this.row,this.zoom)},Qi.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},Qi.prototype.sub=function(t){return this.clone()._sub(t)},Qi.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},Qi.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var $i=n;n.prototype={clone:function(){return new n(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[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=i,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),n=e*this.x-i*this.y,r=i*this.x+e*this.y;return this.x=n,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),n=Math.sin(t),r=e.x+i*(this.x-e.x)-n*(this.y-e.y),o=e.y+n*(this.x-e.x)+i*(this.y-e.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t};var tn=o(.25,.1,.25,1),en=1,nn={},rn=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),on=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,an=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,sn={now:rn,frame:function(t){var e=on(t);return{cancel:function(){return an(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0,t.width,t.height),i.getImageData(0,0,t.width,t.height)},resolveURL:function(t){var e=self.document.createElement("a");return e.href=t,e.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},supportsWebp:!1};if(self.document){var ln=self.document.createElement("img");ln.onload=function(){sn.supportsWebp=!0},ln.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="}var un={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(un);var cn=function(t){function e(e,i,n){t.call(this,e),this.status=i,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),hn=function(t,e){var i=g(t);return i.responseType="arraybuffer",i.onerror=function(){e(new Error(i.statusText))},i.onload=function(){var n=i.response;if(0===n.byteLength&&200===i.status)return e(new Error("http status 200 returned without content."));(i.status>=200&&i.status<300||0===i.status)&&i.response?e(null,{data:n,cacheControl:i.getResponseHeader("Cache-Control"),expires:i.getResponseHeader("Expires")}):e(new cn(i.statusText,i.status,t.url))},i.send(),{cancel:function(){return i.abort()}}},pn=function(t,e){void 0===e&&(e={}),s(this,e),this.type=t},fn=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,"error",s({error:e},i))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pn),dn=function(){};dn.prototype.on=function(t,e){return this._listeners=this._listeners||{},y(t,e,this._listeners),this},dn.prototype.off=function(t,e){return v(t,e,this._listeners),v(t,e,this._oneTimeListeners),this},dn.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},y(t,e,this._oneTimeListeners),this},dn.prototype.fire=function(t){"string"==typeof t&&(t=new pn(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var i=0,n=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];i<n.length;i+=1)n[i].call(this,t);for(var r=0,o=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];r<o.length;r+=1){var a=o[r];v(e,a,this._oneTimeListeners),a.call(this,t)}var l=this._eventedParent;l&&(s(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof fn&&console.error(t.error);return this},dn.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},dn.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var mn={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{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"},"*":{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"},"*":{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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},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:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{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_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"},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-z-order":{type:"enum",values:{"viewport-y":{},source:{}},default:"viewport-y",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:"string",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:{left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"],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-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"],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":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{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"},"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:"Heatmap"},"+":{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"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{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}},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:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},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:"string",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,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:"string",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"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},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}},"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:"string",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"}},"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"}}},_n=function(t,e,i,n){this.message=(t?t+": ":"")+i,n&&(this.identifier=n),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)},gn=function(t){function e(e,i){t.call(this,i),this.message=i,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),yn=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var i=0,n=e;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};yn.prototype.concat=function(t){return new yn(this,t)},yn.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.")},yn.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var vn={kind:"null"},bn={kind:"number"},xn={kind:"string"},wn={kind:"boolean"},kn={kind:"color"},Tn={kind:"object"},En={kind:"value"},Ln={kind:"collator"},Sn={kind:"formatted"},Cn=[vn,bn,xn,wn,kn,Sn,Tn,T(En)],An=e(function(t,e){function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function r(t){return i("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return n("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function a(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var s={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]};try{e.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in s)return s[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=n.indexOf("("),u=n.indexOf(")");if(-1!==l&&u+1===n.length){var c=n.substr(0,l),h=n.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=o(h.pop());case"rgb":return 3!==h.length?null:[r(h[0]),r(h[1]),r(h[2]),p];case"hsla":if(4!==h.length)return null;p=o(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),m=o(h[2]),_=m<=.5?m*(d+1):m+d-m*d,g=2*m-_;return[i(255*a(g,_,f+1/3)),i(255*a(g,_,f)),i(255*a(g,_,f-1/3)),p];default:return null}}return null}}catch(t){}}).parseCSSColor,Pn=function(t,e,i,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=i,this.a=n};Pn.parse=function(t){if(t){if(t instanceof Pn)return t;if("string"==typeof t){var e=An(t);if(e)return new Pn(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Pn.prototype.toString=function(){var t=this.toArray(),e=t[0],i=t[1],n=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(i)+","+Math.round(n)+","+r+")"},Pn.prototype.toArray=function(){var t=this.r,e=this.g,i=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*i/n,n]},Pn.black=new Pn(0,0,0,1),Pn.white=new Pn(1,1,1,1),Pn.transparent=new Pn(0,0,0,0),Pn.red=new Pn(1,0,0,1);var In=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"})};In.prototype.compare=function(t,e){return this.collator.compare(t,e)},In.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Mn=function(t,e,i){this.text=t,this.scale=e,this.fontStack=i},zn=function(t){this.sections=t};zn.fromString=function(t){return new zn([new Mn(t,null,null)])},zn.prototype.toString=function(){return this.sections.map(function(t){return t.text}).join("")},zn.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var n=i[e];t.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),t.push(r)}return t};var Rn=function(t,e){this.type=t,this.value=e};Rn.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Pn)return!0;if(e instanceof In)return!0;if(e instanceof zn)return!0;if(Array.isArray(e)){for(var i=0,n=e;i<n.length;i+=1)if(!t(n[i]))return!1;return!0}if("object"==typeof e){for(var r in e)if(!t(e[r]))return!1;return!0}return!1}(t[1]))return e.error("invalid value");var i=t[1],n=C(i),r=e.expectedType;return"array"!==n.kind||0!==n.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(n=r),new Rn(n,i)},Rn.prototype.evaluate=function(){return this.value},Rn.prototype.eachChild=function(){},Rn.prototype.possibleOutputs=function(){return[this.value]},Rn.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Pn?["rgba"].concat(this.value.toArray()):this.value instanceof zn?this.value.serialize():this.value};var Bn=function(t){this.name="ExpressionEvaluationError",this.message=t};Bn.prototype.toJSON=function(){return this.message};var On={string:xn,number:bn,boolean:wn,object:Tn},Dn=function(t,e){this.type=t,this.args=e};Dn.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i,n=1,r=t[0];if("array"===r){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in On)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=On[s],n++}else o=En;if(t.length>3){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],n++}i=T(o,a)}else i=On[r];for(var l=[];n<t.length;n++){var u=e.parse(t[n],n,En);if(!u)return null;l.push(u)}return new Dn(i,l)},Dn.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var i=this.args[e].evaluate(t);if(!L(this.type,C(i)))return i;if(e===this.args.length-1)throw new Bn("Expected value to be of type "+E(this.type)+", but found "+E(C(i))+" instead.")}return null},Dn.prototype.eachChild=function(t){this.args.forEach(t)},Dn.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},Dn.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 n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var Nn=function(t){this.type=Sn,this.sections=t};Nn.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var i=[],n=1;n<t.length-1;n+=2){var r=e.parse(t[n],1,En);if(!r)return null;var o=r.type.kind;if("string"!==o&&"value"!==o&&"null"!==o)return e.error("Formatted text type must be 'string', 'value', or 'null'.");var a=t[n+1];if("object"!=typeof a||Array.isArray(a))return e.error("Format options argument must be an object.");var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,bn)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,T(xn))))return null;i.push({text:r,scale:s,font:l})}return new Nn(i)},Nn.prototype.evaluate=function(t){return new zn(this.sections.map(function(e){return new Mn(A(e.text.evaluate(t)),e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null)}))},Nn.prototype.eachChild=function(t){for(var e=0,i=this.sections;e<i.length;e+=1){var n=i[e];t(n.text),n.scale&&t(n.scale),n.font&&t(n.font)}},Nn.prototype.possibleOutputs=function(){return[void 0]},Nn.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var n=i[e];t.push(n.text.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),t.push(r)}return t};var Fn={"to-boolean":wn,"to-color":kn,"to-number":bn,"to-string":xn},jn=function(t,e){this.type=t,this.args=e};jn.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 n=Fn[i],r=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,En);if(!a)return null;r.push(a)}return new jn(n,r)},jn.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,n=0,r=this.args;n<r.length;n+=1){if(i=null,(e=r[n].evaluate(t))instanceof Pn)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(i=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":S(e[0],e[1],e[2],e[3])))return new Pn(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Bn(i||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}if("number"===this.type.kind){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 Bn("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?zn.fromString(A(this.args[0].evaluate(t))):A(this.args[0].evaluate(t))},jn.prototype.eachChild=function(t){this.args.forEach(t)},jn.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},jn.prototype.serialize=function(){if("formatted"===this.type.kind)return new Nn([{text:this.args[0],scale:null,font:null}]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var Un=["Unknown","Point","LineString","Polygon"],Vn=function(){this.globals=null,this.feature=null,this.featureState=null,this._parseColorCache={}};Vn.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Vn.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Un[this.feature.type]:this.feature.type:null},Vn.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Vn.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Pn.parse(t)),e};var Zn=function(t,e,i,n){this.name=t,this.type=e,this._evaluate=i,this.args=n};Zn.prototype.evaluate=function(t){return this._evaluate(t,this.args)},Zn.prototype.eachChild=function(t){this.args.forEach(t)},Zn.prototype.possibleOutputs=function(){return[void 0]},Zn.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},Zn.parse=function(t,e){var i=t[0],n=Zn.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var r=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=o.filter(function(e){var i=e[0];return!Array.isArray(i)||i.length===t.length-1}),s=null,l=0,u=a;l<u.length;l+=1){var c=u[l],h=c[0],p=c[1];s=new Hn(e.registry,e.path,null,e.scope);for(var f=[],d=!1,m=1;m<t.length;m++){var _=t[m],g=Array.isArray(h)?h[m-1]:h.type,y=s.parse(_,1+f.length,g);if(!y){d=!0;break}f.push(y)}if(!d)if(Array.isArray(h)&&h.length!==f.length)s.error("Expected "+h.length+" arguments, but found "+f.length+" instead.");else{for(var v=0;v<f.length;v++){var b=Array.isArray(h)?h[v]:h.type,x=f[v];s.concat(v+1).checkSubtype(b,x.type)}if(0===s.errors.length)return new Zn(i,r,p,f)}}if(1===a.length)e.errors.push.apply(e.errors,s.errors);else{for(var w=(a.length?a:o).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(E).join(", ")+")":"("+E(e.type)+"...)"}).join(" | "),k=[],T=1;T<t.length;T++){var L=e.parse(t[T],1+k.length);if(!L)return null;k.push(E(L.type))}e.error("Expected arguments of type "+w+", but found ("+k.join(", ")+") instead.")}return null},Zn.register=function(t,e){for(var i in Zn.definitions=e,e)t[i]=Zn};var qn=function(t,e,i){this.type=Ln,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e};qn.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 n=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,wn);if(!n)return null;var r=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,wn);if(!r)return null;var o=null;return i.locale&&!(o=e.parse(i.locale,1,xn))?null:new qn(n,r,o)},qn.prototype.evaluate=function(t){return new In(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},qn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},qn.prototype.possibleOutputs=function(){return[void 0]},qn.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 Gn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Gn.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 Gn(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)},Gn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Gn.prototype.eachChild=function(){},Gn.prototype.possibleOutputs=function(){return[void 0]},Gn.prototype.serialize=function(){return["var",this.name]};var Hn=function(t,e,i,n,r){void 0===e&&(e=[]),void 0===n&&(n=new yn),void 0===r&&(r=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=n,this.errors=r,this.expectedType=i};Hn.prototype.parse=function(t,e,i,n,r){return void 0===r&&(r={}),e?this.concat(e,i,n)._parse(t,r):this._parse(t,r)},Hn.prototype._parse=function(t,e){function i(t,e,i){return"assert"===i?new Dn(e,[t]):"coerce"===i?new jn(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 n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.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||"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 Rn)&&function t(e){if(e instanceof Gn)return t(e.boundExpression);if(e instanceof Zn&&"error"===e.name)return!1;if(e instanceof qn)return!1;var i=e instanceof jn||e instanceof Dn,n=!0;return e.eachChild(function(e){n=i?n&&t(e):n&&e instanceof Rn}),!!n&&(P(e)&&M(e,["zoom","heatmap-density","line-progress","is-supported-script"]))}(o)){var l=new Vn;try{o=new Rn(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Hn.prototype.concat=function(t,e,i){var n="number"==typeof t?this.path.concat(t):this.path,r=i?this.scope.concat(i):this.scope;return new Hn(this.registry,n,e||null,r,this.errors)},Hn.prototype.error=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var n=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new gn(n,t))},Hn.prototype.checkSubtype=function(t,e){var i=L(t,e);return i&&this.error(i),i};var Wn=function(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Wn.parse=function(t,e){var i=t[1],n=t.slice(2);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(!(i=e.parse(i,1,bn)))return null;var r=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),n.unshift(-1/0);for(var a=0;a<n.length;a+=2){var s=n[a],l=n[a+1],u=a+1,c=a+2;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(r.length&&r[r.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var h=e.parse(l,c,o);if(!h)return null;o=o||h.type,r.push([s,h])}return new Wn(o,i,r)},Wn.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);var r=e.length;return n>=e[r-1]?i[r-1].evaluate(t):i[z(e,n)].evaluate(t)},Wn.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},Wn.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Wn.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Kn=Object.freeze({number:R,color:function(t,e,i){return new Pn(R(t.r,e.r,i),R(t.g,e.g,i),R(t.b,e.b,i),R(t.a,e.a,i))},array:function(t,e,i){return t.map(function(t,n){return R(t,e[n],i)})}}),Jn=.95047,Xn=1,Yn=1.08883,Qn=4/29,$n=6/29,tr=3*$n*$n,er=$n*$n*$n,ir=Math.PI/180,nr=180/Math.PI,rr={forward:F,reverse:j,interpolate:function(t,e,i){return{l:R(t.l,e.l,i),a:R(t.a,e.a,i),b:R(t.b,e.b,i),alpha:R(t.alpha,e.alpha,i)}}},or={forward:function(t){var e=F(t),i=e.l,n=e.a,r=e.b,o=Math.atan2(r,n)*nr;return{h:o<0?o+360:o,c:Math.sqrt(n*n+r*r),l:i,alpha:t.a}},reverse:function(t){var e=t.h*ir,i=t.c;return j({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:function(t,e,i){var n=e-t;return t+i*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,i),c:R(t.c,e.c,i),l:R(t.l,e.l,i),alpha:R(t.alpha,e.alpha,i)}}},ar=Object.freeze({lab:rr,hcl:or}),sr=function(t,e,i,n,r){this.type=t,this.operator=e,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}};sr.interpolationFactor=function(t,e,i,n){var r=0;if("exponential"===t.name)r=U(e,t.base,i,n);else if("linear"===t.name)r=U(e,1,i,n);else if("cubic-bezier"===t.name){var o=t.controlPoints;r=new Yi(o[0],o[1],o[2],o[3]).solve(U(e,1,i,n))}return r},sr.parse=function(t,e){var i=t[0],n=t[1],r=t[2],o=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={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(!(r=e.parse(r,2,bn)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=kn:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],p=o[c+1],f=c+3,d=c+4;if("number"!=typeof h)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(p,d,u);if(!m)return null;u=u||m.type,l.push([h,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new sr(u,i,n,r,l):e.error("Type "+E(u)+" is not interpolatable.")},sr.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);var r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);var o=z(e,n),a=e[o],s=e[o+1],l=sr.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(t),c=i[o+1].evaluate(t);return"interpolate"===this.operator?Kn[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?or.reverse(or.interpolate(or.forward(u),or.forward(c),l)):rr.reverse(rr.interpolate(rr.forward(u),rr.forward(c),l))},sr.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},sr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},sr.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 lr=function(t,e){this.type=t,this.args=e};lr.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var i=null,n=e.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],l=e.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some(function(t){return L(n,t.type)});return new lr(u?En:i,r)},lr.prototype.evaluate=function(t){for(var e=null,i=0,n=this.args;i<n.length&&null===(e=n[i].evaluate(t));i+=1);return e},lr.prototype.eachChild=function(t){this.args.forEach(t)},lr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},lr.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var ur=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};ur.prototype.evaluate=function(t){return this.result.evaluate(t)},ur.prototype.eachChild=function(t){for(var e=0,i=this.bindings;e<i.length;e+=1)t(i[e][1]);t(this.result)},ur.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=[],n=1;n<t.length-1;n+=2){var r=t[n];if("string"!=typeof r)return e.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=e.parse(t[n+1],n+1);if(!o)return null;i.push([r,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,i);return a?new ur(i,a):null},ur.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},ur.prototype.serialize=function(){for(var t=["let"],e=0,i=this.bindings;e<i.length;e+=1){var n=i[e],r=n[0],o=n[1];t.push(r,o.serialize())}return t.push(this.result.serialize()),t};var cr=function(t,e,i){this.type=t,this.index=e,this.input=i};cr.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,bn),n=e.parse(t[2],2,T(e.expectedType||En));if(!i||!n)return null;var r=n.type;return new cr(r.itemType,i,n)},cr.prototype.evaluate=function(t){var e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new Bn("Array index out of bounds: "+e+" < 0.");if(e>=i.length)throw new Bn("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new Bn("Array index must be an integer, but found "+e+" instead.");return i[e]},cr.prototype.eachChild=function(t){t(this.index),t(this.input)},cr.prototype.possibleOutputs=function(){return[void 0]},cr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var hr=function(t,e,i,n,r,o){this.inputType=t,this.type=e,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};hr.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,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var r={},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,h=s;c<h.length;c+=1){var p=h[c];if("number"!=typeof p&&"string"!=typeof p)return u.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,C(p)))return null}else i=C(p);if(void 0!==r[String(p)])return u.error("Branch labels must be unique.");r[String(p)]=o.length}var f=e.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,En);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,n);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(i,d.type)?null:new hr(i,n,d,r,o,m):null},hr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(C(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},hr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},hr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},hr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r],s=n[t.cases[a]];void 0===s?(n[t.cases[a]]=i.length,i.push([t.cases[a],[a]])):i[s][1].push(a)}for(var l=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,c=i;u<c.length;u+=1){var h=c[u],p=h[0],f=h[1];1===f.length?e.push(l(f[0])):e.push(f.map(l)),e.push(t.outputs[p].serialize())}return e.push(this.otherwise.serialize()),e};var pr=function(t,e,i){this.type=t,this.branches=e,this.otherwise=i};pr.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 n=[],r=1;r<t.length-1;r+=2){var o=e.parse(t[r],r,wn);if(!o)return null;var a=e.parse(t[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=e.parse(t[t.length-1],t.length-1,i);return s?new pr(i,n,s):null},pr.prototype.evaluate=function(t){for(var e=0,i=this.branches;e<i.length;e+=1){var n=i[e],r=n[0],o=n[1];if(r.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},pr.prototype.eachChild=function(t){for(var e=0,i=this.branches;e<i.length;e+=1){var n=i[e],r=n[0],o=n[1];t(r),t(o)}t(this.otherwise)},pr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},pr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var fr=q("==",function(t,e,i){return e===i},Z),dr=q("!=",function(t,e,i){return e!==i},function(t,e,i,n){return!Z(0,e,i,n)}),mr=q("<",function(t,e,i){return e<i},function(t,e,i,n){return n.compare(e,i)<0}),_r=q(">",function(t,e,i){return e>i},function(t,e,i,n){return n.compare(e,i)>0}),gr=q("<=",function(t,e,i){return e<=i},function(t,e,i,n){return n.compare(e,i)<=0}),yr=q(">=",function(t,e,i){return e>=i},function(t,e,i,n){return n.compare(e,i)>=0}),vr=function(t){this.type=bn,this.input=t};vr.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 "+E(i.type)+" instead."):new vr(i):null},vr.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 Bn("Expected value to be of type string or array, but found "+E(C(e))+" instead.")},vr.prototype.eachChild=function(t){t(this.input)},vr.prototype.possibleOutputs=function(){return[void 0]},vr.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var br={"==":fr,"!=":dr,">":_r,"<":mr,">=":yr,"<=":gr,array:Dn,at:cr,boolean:Dn,case:pr,coalesce:lr,collator:qn,format:Nn,interpolate:sr,"interpolate-hcl":sr,"interpolate-lab":sr,length:vr,let:ur,literal:Rn,match:hr,number:Dn,object:Dn,step:Wn,string:Dn,"to-boolean":jn,"to-color":jn,"to-number":jn,"to-string":jn,var:Gn};Zn.register(br,{error:[{kind:"error"},[xn],function(t,e){var i=e[0];throw new Bn(i.evaluate(t))}],typeof:[xn,[En],function(t,e){return E(C(e[0].evaluate(t)))}],"to-rgba":[T(bn,4),[kn],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[kn,[bn,bn,bn],G],rgba:[kn,[bn,bn,bn,bn],G],has:{type:wn,overloads:[[[xn],function(t,e){return H(e[0].evaluate(t),t.properties())}],[[xn,Tn],function(t,e){var i=e[0],n=e[1];return H(i.evaluate(t),n.evaluate(t))}]]},get:{type:En,overloads:[[[xn],function(t,e){return W(e[0].evaluate(t),t.properties())}],[[xn,Tn],function(t,e){var i=e[0],n=e[1];return W(i.evaluate(t),n.evaluate(t))}]]},"feature-state":[En,[xn],function(t,e){return W(e[0].evaluate(t),t.featureState||{})}],properties:[Tn,[],function(t){return t.properties()}],"geometry-type":[xn,[],function(t){return t.geometryType()}],id:[En,[],function(t){return t.id()}],zoom:[bn,[],function(t){return t.globals.zoom}],"heatmap-density":[bn,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[bn,[],function(t){return t.globals.lineProgress||0}],"+":[bn,K(bn),function(t,e){for(var i=0,n=0,r=e;n<r.length;n+=1)i+=r[n].evaluate(t);return i}],"*":[bn,K(bn),function(t,e){for(var i=1,n=0,r=e;n<r.length;n+=1)i*=r[n].evaluate(t);return i}],"-":{type:bn,overloads:[[[bn,bn],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)-n.evaluate(t)}],[[bn],function(t,e){return-e[0].evaluate(t)}]]},"/":[bn,[bn,bn],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)/n.evaluate(t)}],"%":[bn,[bn,bn],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)%n.evaluate(t)}],ln2:[bn,[],function(){return Math.LN2}],pi:[bn,[],function(){return Math.PI}],e:[bn,[],function(){return Math.E}],"^":[bn,[bn,bn],function(t,e){var i=e[0],n=e[1];return Math.pow(i.evaluate(t),n.evaluate(t))}],sqrt:[bn,[bn],function(t,e){var i=e[0];return Math.sqrt(i.evaluate(t))}],log10:[bn,[bn],function(t,e){var i=e[0];return Math.log(i.evaluate(t))/Math.LN10}],ln:[bn,[bn],function(t,e){var i=e[0];return Math.log(i.evaluate(t))}],log2:[bn,[bn],function(t,e){var i=e[0];return Math.log(i.evaluate(t))/Math.LN2}],sin:[bn,[bn],function(t,e){var i=e[0];return Math.sin(i.evaluate(t))}],cos:[bn,[bn],function(t,e){var i=e[0];return Math.cos(i.evaluate(t))}],tan:[bn,[bn],function(t,e){var i=e[0];return Math.tan(i.evaluate(t))}],asin:[bn,[bn],function(t,e){var i=e[0];return Math.asin(i.evaluate(t))}],acos:[bn,[bn],function(t,e){var i=e[0];return Math.acos(i.evaluate(t))}],atan:[bn,[bn],function(t,e){var i=e[0];return Math.atan(i.evaluate(t))}],min:[bn,K(bn),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[bn,K(bn),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[bn,[bn],function(t,e){var i=e[0];return Math.abs(i.evaluate(t))}],round:[bn,[bn],function(t,e){var i=e[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[bn,[bn],function(t,e){var i=e[0];return Math.floor(i.evaluate(t))}],ceil:[bn,[bn],function(t,e){var i=e[0];return Math.ceil(i.evaluate(t))}],"filter-==":[wn,[xn,En],function(t,e){var i=e[0],n=e[1];return t.properties()[i.value]===n.value}],"filter-id-==":[wn,[En],function(t,e){var i=e[0];return t.id()===i.value}],"filter-type-==":[wn,[xn],function(t,e){var i=e[0];return t.geometryType()===i.value}],"filter-<":[wn,[xn,En],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r<o}],"filter-id-<":[wn,[En],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[wn,[xn,En],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r>o}],"filter-id->":[wn,[En],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[wn,[xn,En],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[wn,[En],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[wn,[xn,En],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[wn,[En],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[wn,[En],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[wn,[],function(t){return null!==t.id()}],"filter-type-in":[wn,[T(xn)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[wn,[T(En)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[wn,[xn,T(En)],function(t,e){var i=e[0];return e[1].value.indexOf(t.properties()[i.value])>=0}],"filter-in-large":[wn,[xn,T(En)],function(t,e){var i=e[0],n=e[1];return function(t,e,i,n){for(;i<=n;){var r=i+n>>1;if(e[r]===t)return!0;e[r]>t?n=r-1:i=r+1}return!1}(t.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:wn,overloads:[[[wn,wn],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)&&n.evaluate(t)}],[K(wn),function(t,e){for(var i=0,n=e;i<n.length;i+=1)if(!n[i].evaluate(t))return!1;return!0}]]},any:{type:wn,overloads:[[[wn,wn],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)||n.evaluate(t)}],[K(wn),function(t,e){for(var i=0,n=e;i<n.length;i+=1)if(n[i].evaluate(t))return!0;return!1}]]},"!":[wn,[wn],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[wn,[xn],function(t,e){var i=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(i.evaluate(t))}],upcase:[xn,[xn],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[xn,[xn],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[xn,K(En),function(t,e){return e.map(function(e){return A(e.evaluate(t))}).join("")}],"resolved-locale":[xn,[Ln],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var xr=function(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new Vn,this._defaultValue="color"===(i=e).type&&et(i.default)?new Pn(0,0,0,0):"color"===i.type?Pn.parse(i.default)||null:void 0===i.default?null:i.default,this._enumValues="enum"===e.type?e.values:null};xr.prototype.evaluateWithoutErrorHandling=function(t,e,i){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this.expression.evaluate(this._evaluator)},xr.prototype.evaluate=function(t,e,i){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null;try{var n=this.expression.evaluate(this._evaluator);if(null===n||void 0===n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new Bn("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(n)+" instead.");return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var wr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!I(e.expression)};wr.prototype.evaluateWithoutErrorHandling=function(t,e,i){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i)},wr.prototype.evaluate=function(t,e,i){return this._styleExpression.evaluate(t,e,i)};var kr=function(t,e,i){this.kind=t,this.zoomStops=i.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!I(e.expression),i instanceof sr&&(this._interpolationType=i.interpolation)};kr.prototype.evaluateWithoutErrorHandling=function(t,e,i){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i)},kr.prototype.evaluate=function(t,e,i){return this._styleExpression.evaluate(t,e,i)},kr.prototype.interpolationFactor=function(t,e,i){return this._interpolationType?sr.interpolationFactor(this._interpolationType,t,e,i):0};var Tr=function(t,e){this._parameters=t,this._specification=e,x(this,function t(e,i){var n,r,o,a="color"===i.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||void 0!==e.property,u=s||!l,c=e.type||($(i)?"exponential":"interval");if(a&&((e=x({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Pn.parse(t[1])]})),e.default?e.default=Pn.parse(e.default):e.default=Pn.parse(i.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!ar[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)n=at;else if("interval"===c)n=ot;else if("categorical"===c){n=rt,r=Object.create(null);for(var h=0,p=e.stops;h<p.length;h+=1){var f=p[h];r[f[0]]=f[1]}o=typeof e.stops[0][0]}else{if("identity"!==c)throw new Error('Unknown function type "'+c+'"');n=st}if(s){for(var d={},m=[],_=0;_<e.stops.length;_++){var g=e.stops[_],y=g[0].zoom;void 0===d[y]&&(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},m.push(y)),d[y].stops.push([g[0].value,g[1]])}for(var v=[],b=0,w=m;b<w.length;b+=1){var k=w[b];v.push([d[k].zoom,t(d[k],i)])}return{kind:"composite",interpolationFactor:sr.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:v.map(function(t){return t[0]}),evaluate:function(t,n){var r=t.zoom;return at({stops:v,base:e.base},i,r).evaluate(r,n)}}}return u?{kind:"camera",interpolationFactor:"exponential"===c?sr.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var a=t.zoom;return n(e,i,a,r,o)}}:{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?nt(e.default,i.default):n(e,i,s,r,o)}}}(this._parameters,this._specification))};Tr.deserialize=function(t){return new Tr(t._parameters,t._specification)},Tr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var Er={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},Lr={"*":function(){return[]},array:dt,boolean:function(t){var e=t.value,i=t.key,n=tt(e);return"boolean"!==n?[new _n(i,e,"boolean expected, "+n+" found")]:[]},number:mt,color:function(t){var e=t.key,i=t.value,n=tt(i);return"string"!==n?[new _n(e,i,"color expected, "+n+" found")]:null===An(i)?[new _n(e,i,'color expected, "'+i+'" found')]:[]},constants:b,enum:yt,filter:St,function:_t,layer:It,object:ft,source:Mt,light:zt,string:Rt,formatted:function(t){return 0===Rt(t).length?[]:gt(t)}};Dt.source=Ft(Mt),Dt.light=Ft(zt),Dt.layer=Ft(It),Dt.filter=Ft(St),Dt.paintProperty=Ft(At),Dt.layoutProperty=Ft(Pt);var Sr=Dt,Cr=Dt.light,Ar=Dt.paintProperty,Pr=Dt.layoutProperty,Ir=Ut,Mr=3;Ut.prototype.insert=function(t,e,i,n,r){this._forEachCell(e,i,n,r,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},Ut.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Ut.prototype._insertCell=function(t,e,i,n,r,o){this.cells[r].push(o)},Ut.prototype.query=function(t,e,i,n){var r=this.min,o=this.max;if(t<=r&&e<=r&&o<=i&&o<=n)return Array.prototype.slice.call(this.keys);var a=[];return this._forEachCell(t,e,i,n,this._queryCell,a,{}),a},Ut.prototype._queryCell=function(t,e,i,n,r,o,a){var s=this.cells[r];if(null!==s)for(var l=this.keys,u=this.bboxes,c=0;c<s.length;c++){var h=s[c];if(void 0===a[h]){var p=4*h;t<=u[p+2]&&e<=u[p+3]&&i>=u[p+0]&&n>=u[p+1]?(a[h]=!0,o.push(l[h])):a[h]=!1}}},Ut.prototype._forEachCell=function(t,e,i,n,r,o,a){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(i),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var p=l;p<=c;p++){var f=this.d*p+h;if(r.call(this,t,e,i,n,f,o,a))return}},Ut.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Ut.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=Mr+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(e+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];r[Mr+a]=o,r.set(s,o),o+=s.length}return r[Mr+t.length]=o,r.set(this.keys,o),o+=this.keys.length,r[Mr+t.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer};var zr=self.ImageData,Rr={};for(var Br in Vt("Object",Object),Ir.serialize=function(t,e){var i=t.toArrayBuffer();return e&&e.push(i),{buffer:i}},Ir.deserialize=function(t){return new Ir(t.buffer)},Vt("Grid",Ir),Vt("Color",Pn),Vt("Error",Error),Vt("StylePropertyFunction",Tr),Vt("StyleExpression",xr,{omit:["_evaluator"]}),Vt("ZoomDependentExpression",kr),Vt("ZoomConstantExpression",wr),Vt("CompoundExpression",Zn,{omit:["_evaluate"]}),br)br[Br]._classRegistryKey||Vt("Expression_"+Br,br[Br]);var Or=function(){this.first=!0};Or.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 Dr,Nr={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}},Fr=!1,jr=null,Ur=!1,Vr=new dn,Zr={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ur||null!=Zr.applyArabicShaping}},qr=function(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 Or,this.transition={})};qr.prototype.isSupportedScript=function(t){return function(t,e){for(var i=0,n=t;i<n.length;i+=1)if(!Jt(n[i].charCodeAt(0),e))return!1;return!0}(t,Zr.isLoaded())},qr.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},qr.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}};var Gr=function(t,e){this.property=t,this.value=e,this.expression=pt(void 0===e?t.specification.default:e,t.specification)};Gr.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Gr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Hr=function(t){this.property=t,this.value=new Gr(t,void 0)};Hr.prototype.transitioned=function(t,e){return new Kr(this.property,this.value,e,s({},t.transition,this.transition),t.now)},Hr.prototype.untransitioned=function(){return new Kr(this.property,this.value,null,{},0)};var Wr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Wr.prototype.getValue=function(t){return f(this._values[t].value.value)},Wr.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Hr(this._values[t].property)),this._values[t].value=new Gr(this._values[t].property,null===e?void 0:f(e))},Wr.prototype.getTransition=function(t){return f(this._values[t].transition)},Wr.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Hr(this._values[t].property)),this._values[t].transition=f(e)||void 0},Wr.prototype.serialize=function(){for(var t={},e=0,i=Object.keys(this._values);e<i.length;e+=1){var n=i[e],r=this.getValue(n);void 0!==r&&(t[n]=r);var o=this.getTransition(n);void 0!==o&&(t[n+"-transition"]=o)}return t},Wr.prototype.transitioned=function(t,e){for(var i=new Jr(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(t,e._values[o])}return i},Wr.prototype.untransitioned=function(){for(var t=new Jr(this._properties),e=0,i=Object.keys(this._values);e<i.length;e+=1){var n=i[e];t._values[n]=this._values[n].untransitioned()}return t};var Kr=function(t,e,i,n,r){this.property=t,this.value=e,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};Kr.prototype.possiblyEvaluate=function(t){var e=t.now||0,i=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(e<this.begin)return n.possiblyEvaluate(t);var r=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),i,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}(r))}return i};var Jr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Jr.prototype.possiblyEvaluate=function(t){for(var e=new Qr(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var r=n[i];e._values[r]=this._values[r].possiblyEvaluate(t)}return e},Jr.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var i=e[t];if(this._values[i].prior)return!0}return!1};var Xr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Xr.prototype.getValue=function(t){return f(this._values[t].value)},Xr.prototype.setValue=function(t,e){this._values[t]=new Gr(this._values[t].property,null===e?void 0:f(e))},Xr.prototype.serialize=function(){for(var t={},e=0,i=Object.keys(this._values);e<i.length;e+=1){var n=i[e],r=this.getValue(n);void 0!==r&&(t[n]=r)}return t},Xr.prototype.possiblyEvaluate=function(t){for(var e=new Qr(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var r=n[i];e._values[r]=this._values[r].possiblyEvaluate(t)}return e};var Yr=function(t,e,i){this.property=t,this.value=e,this.parameters=i};Yr.prototype.isConstant=function(){return"constant"===this.value.kind},Yr.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},Yr.prototype.evaluate=function(t,e){return this.property.evaluate(this.value,this.parameters,t,e)};var Qr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Qr.prototype.get=function(t){return this._values[t]};var $r=function(t){this.specification=t};$r.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},$r.prototype.interpolate=function(t,e,i){var n=Kn[this.specification.type];return n?n(t,e,i):t};var to=function(t){this.specification=t};to.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Yr(this,{kind:"constant",value:t.expression.evaluate(e)},e):new Yr(this,t.expression,e)},to.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 Yr(this,{kind:"constant",value:void 0},t.parameters);var n=Kn[this.specification.type];return n?new Yr(this,{kind:"constant",value:n(t.value.value,e.value.value,i)},t.parameters):t},to.prototype.evaluate=function(t,e,i,n){return"constant"===t.kind?t.value:t.evaluate(e,i,n)};var eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(t,e){if(void 0===t.value)return new Yr(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var i=t.expression.evaluate(e),n=this._calculate(i,i,i,e);return new Yr(this,{kind:"constant",value:n},e)}if("camera"===t.expression.kind){var r=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new Yr(this,{kind:"constant",value:r},e)}return new Yr(this,t.expression,e)},e.prototype.evaluate=function(t,e,i,n){if("source"===t.kind){var r=t.evaluate(e,i,n);return this._calculate(r,r,r,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},i,n),t.evaluate({zoom:Math.floor(e.zoom)},i,n),t.evaluate({zoom:Math.floor(e.zoom)+1},i,n),e):t.value},e.prototype._calculate=function(t,e,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},e.prototype.interpolate=function(t){return t},e}(to),io=function(t){this.specification=t};io.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new qr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new qr(Math.floor(e.zoom),e)),t.expression.evaluate(new qr(Math.floor(e.zoom+1),e)),e)}},io.prototype._calculate=function(t,e,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}},io.prototype.interpolate=function(t){return t};var no=function(t){this.specification=t};no.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},no.prototype.interpolate=function(){return!1};var ro=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var i=t[e],n=this.defaultPropertyValues[e]=new Gr(i,void 0),r=this.defaultTransitionablePropertyValues[e]=new Hr(i);this.defaultTransitioningPropertyValues[e]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Vt("DataDrivenProperty",to),Vt("DataConstantProperty",$r),Vt("CrossFadedDataDrivenProperty",eo),Vt("CrossFadedProperty",io),Vt("ColorRampProperty",no);var oo=function(t){function e(e,i){if(t.call(this),this.id=e.id,this.type=e.type,this.visibility="visible",this._featureFilter=function(){return!0},"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),i.layout&&(this._unevaluatedLayout=new Xr(i.layout)),i.paint)){for(var n in this._transitionablePaint=new Wr(i.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var r in e.layout)this.setLayoutProperty(r,e.layout[r],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,i){if(null!==e&&void 0!==e){var n="layers."+this.id+".layout."+t;if(this._validate(Pr,n,t,e,i))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return c(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,i){if(null!==e&&void 0!==e){var n="layers."+this.id+".paint."+t;if(this._validate(Ar,n,t,e,i))return!1}if(c(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var r=this._transitionablePaint._values[t],o="cross-faded-data-driven"===r.property.specification["property-type"]&&!r.value.value&&e,a=this._transitionablePaint._values[t].value.isDataDriven();this._transitionablePaint.setValue(t,e);var s=this._transitionablePaint._values[t].value.isDataDriven();return this._handleSpecialPaintPropertyUpdate(t),s||a||o},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),p(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,i,n,r){return(!r||!1!==r.validate)&&jt(this,t.call(Sr,{key:e,layerType:this.type,objectKey:i,value:n,styleSpec:mn,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Yr&&Y(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(dn),ao={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},so=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},lo=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};lo.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},lo.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},lo.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},lo.prototype.clear=function(){this.length=0},lo.prototype.resize=function(t){this.reserve(t),this.length=t},lo.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)}},lo.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var uo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var i=this.length;this.resize(i+1);var n=2*i;return this.int16[n+0]=t,this.int16[n+1]=e,i},e.prototype.emplace=function(t,e,i){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=i,t},e}(lo);uo.prototype.bytesPerElement=4,Vt("StructArrayLayout2i4",uo);var co=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n){var r=this.length;this.resize(r+1);var o=4*r;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=i,this.int16[o+3]=n,r},e.prototype.emplace=function(t,e,i,n,r){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,t},e}(lo);co.prototype.bytesPerElement=8,Vt("StructArrayLayout4i8",co);var ho=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n,r,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=r,this.int16[s+5]=o,a},e.prototype.emplace=function(t,e,i,n,r,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(lo);ho.prototype.bytesPerElement=12,Vt("StructArrayLayout2i4i12",ho);var po=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n,r,o,a,s){var l=this.length;this.resize(l+1);var u=6*l,c=12*l;return this.int16[u+0]=t,this.int16[u+1]=e,this.int16[u+2]=i,this.int16[u+3]=n,this.uint8[c+8]=r,this.uint8[c+9]=o,this.uint8[c+10]=a,this.uint8[c+11]=s,l},e.prototype.emplace=function(t,e,i,n,r,o,a,s,l){var u=6*t,c=12*t;return this.int16[u+0]=e,this.int16[u+1]=i,this.int16[u+2]=n,this.int16[u+3]=r,this.uint8[c+8]=o,this.uint8[c+9]=a,this.uint8[c+10]=s,this.uint8[c+11]=l,t},e}(lo);po.prototype.bytesPerElement=12,Vt("StructArrayLayout4i4ub12",po);var fo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n,r,o,a,s){var l=this.length;this.resize(l+1);var u=8*l;return this.uint16[u+0]=t,this.uint16[u+1]=e,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=r,this.uint16[u+5]=o,this.uint16[u+6]=a,this.uint16[u+7]=s,l},e.prototype.emplace=function(t,e,i,n,r,o,a,s,l){var u=8*t;return this.uint16[u+0]=e,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,t},e}(lo);fo.prototype.bytesPerElement=16,Vt("StructArrayLayout8ui16",fo);var mo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n,r,o,a,s){var l=this.length;this.resize(l+1);var u=8*l;return this.int16[u+0]=t,this.int16[u+1]=e,this.int16[u+2]=i,this.int16[u+3]=n,this.uint16[u+4]=r,this.uint16[u+5]=o,this.uint16[u+6]=a,this.uint16[u+7]=s,l},e.prototype.emplace=function(t,e,i,n,r,o,a,s,l){var u=8*t;return this.int16[u+0]=e,this.int16[u+1]=i,this.int16[u+2]=n,this.int16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,t},e}(lo);mo.prototype.bytesPerElement=16,Vt("StructArrayLayout4i4ui16",mo);var _o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i){var n=this.length;this.resize(n+1);var r=3*n;return this.float32[r+0]=t,this.float32[r+1]=e,this.float32[r+2]=i,n},e.prototype.emplace=function(t,e,i,n){var r=3*t;return this.float32[r+0]=e,this.float32[r+1]=i,this.float32[r+2]=n,t},e}(lo);_o.prototype.bytesPerElement=12,Vt("StructArrayLayout3f12",_o);var go=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var i=1*e;return this.uint32[i+0]=t,e},e.prototype.emplace=function(t,e){var i=1*t;return this.uint32[i+0]=e,t},e}(lo);go.prototype.bytesPerElement=4,Vt("StructArrayLayout1ul4",go);var yo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,i,n,r,o,a,s,l,u,c){var h=this.length;this.resize(h+1);var p=12*h,f=6*h;return this.int16[p+0]=t,this.int16[p+1]=e,this.int16[p+2]=i,this.int16[p+3]=n,this.int16[p+4]=r,this.int16[p+5]=o,this.uint32[f+3]=a,this.uint16[p+8]=s,this.uint16[p+9]=l,this.int16[p+10]=u,this.int16[p+11]=c,h},e.prototype.emplace=function(t,e,i,n,r,o,a,s,l,u,c,h){var p=12*t,f=6*t;return this.int16[p+0]=e,this.int16[p+1]=i,this.int16[p+2]=n,this.int16[p+3]=r,this.int16[p+4]=o,this.int16[p+5]=a,this.uint32[f+3]=s,this.uint16[p+8]=l,this.uint16[p+9]=u,this.int16[p+10]=c,this.int16[p+11]=h,t},e}(lo);yo.prototype.bytesPerElement=24,Vt("StructArrayLayout6i1ul2ui2i24",yo);var vo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n,r,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=r,this.int16[s+5]=o,a},e.prototype.emplace=function(t,e,i,n,r,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(lo);vo.prototype.bytesPerElement=12,Vt("StructArrayLayout2i2i2i12",vo);var bo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var i=this.length;this.resize(i+1);var n=4*i;return this.uint8[n+0]=t,this.uint8[n+1]=e,i},e.prototype.emplace=function(t,e,i){var n=4*t;return this.uint8[n+0]=e,this.uint8[n+1]=i,t},e}(lo);bo.prototype.bytesPerElement=4,Vt("StructArrayLayout2ub4",bo);var xo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f){var d=this.length;this.resize(d+1);var m=20*d,_=10*d,g=40*d;return this.int16[m+0]=t,this.int16[m+1]=e,this.uint16[m+2]=i,this.uint16[m+3]=n,this.uint32[_+2]=r,this.uint32[_+3]=o,this.uint32[_+4]=a,this.uint16[m+10]=s,this.uint16[m+11]=l,this.uint16[m+12]=u,this.float32[_+7]=c,this.float32[_+8]=h,this.uint8[g+36]=p,this.uint8[g+37]=f,d},e.prototype.emplace=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f,d){var m=20*t,_=10*t,g=40*t;return this.int16[m+0]=e,this.int16[m+1]=i,this.uint16[m+2]=n,this.uint16[m+3]=r,this.uint32[_+2]=o,this.uint32[_+3]=a,this.uint32[_+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=u,this.uint16[m+12]=c,this.float32[_+7]=h,this.float32[_+8]=p,this.uint8[g+36]=f,this.uint8[g+37]=d,t},e}(lo);xo.prototype.bytesPerElement=40,Vt("StructArrayLayout2i2ui3ul3ui2f2ub40",xo);var wo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f){var d=this.length;this.resize(d+1);var m=16*d,_=8*d;return this.int16[m+0]=t,this.int16[m+1]=e,this.int16[m+2]=i,this.int16[m+3]=n,this.uint16[m+4]=r,this.uint16[m+5]=o,this.uint16[m+6]=a,this.uint16[m+7]=s,this.uint16[m+8]=l,this.uint16[m+9]=u,this.uint16[m+10]=c,this.uint16[m+11]=h,this.uint16[m+12]=p,this.uint32[_+7]=f,d},e.prototype.emplace=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f,d){var m=16*t,_=8*t;return this.int16[m+0]=e,this.int16[m+1]=i,this.int16[m+2]=n,this.int16[m+3]=r,this.uint16[m+4]=o,this.uint16[m+5]=a,this.uint16[m+6]=s,this.uint16[m+7]=l,this.uint16[m+8]=u,this.uint16[m+9]=c,this.uint16[m+10]=h,this.uint16[m+11]=p,this.uint16[m+12]=f,this.uint32[_+7]=d,t},e}(lo);wo.prototype.bytesPerElement=32,Vt("StructArrayLayout4i9ui1ul32",wo);var ko=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var i=1*e;return this.float32[i+0]=t,e},e.prototype.emplace=function(t,e){var i=1*t;return this.float32[i+0]=e,t},e}(lo);ko.prototype.bytesPerElement=4,Vt("StructArrayLayout1f4",ko);var To=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i){var n=this.length;this.resize(n+1);var r=3*n;return this.int16[r+0]=t,this.int16[r+1]=e,this.int16[r+2]=i,n},e.prototype.emplace=function(t,e,i,n){var r=3*t;return this.int16[r+0]=e,this.int16[r+1]=i,this.int16[r+2]=n,t},e}(lo);To.prototype.bytesPerElement=6,Vt("StructArrayLayout3i6",To);var Eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i){var n=this.length;this.resize(n+1);var r=2*n,o=4*n;return this.uint32[r+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=i,n},e.prototype.emplace=function(t,e,i,n){var r=2*t,o=4*t;return this.uint32[r+0]=e,this.uint16[o+2]=i,this.uint16[o+3]=n,t},e}(lo);Eo.prototype.bytesPerElement=8,Vt("StructArrayLayout1ul2ui8",Eo);var Lo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i){var n=this.length;this.resize(n+1);var r=3*n;return this.uint16[r+0]=t,this.uint16[r+1]=e,this.uint16[r+2]=i,n},e.prototype.emplace=function(t,e,i,n){var r=3*t;return this.uint16[r+0]=e,this.uint16[r+1]=i,this.uint16[r+2]=n,t},e}(lo);Lo.prototype.bytesPerElement=6,Vt("StructArrayLayout3ui6",Lo);var So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var i=this.length;this.resize(i+1);var n=2*i;return this.uint16[n+0]=t,this.uint16[n+1]=e,i},e.prototype.emplace=function(t,e,i){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=i,t},e}(lo);So.prototype.bytesPerElement=4,Vt("StructArrayLayout2ui4",So);var Co=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var i=1*e;return this.uint16[i+0]=t,e},e.prototype.emplace=function(t,e){var i=1*t;return this.uint16[i+0]=e,t},e}(lo);Co.prototype.bytesPerElement=2,Vt("StructArrayLayout1ui2",Co);var Ao=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var i=this.length;this.resize(i+1);var n=2*i;return this.float32[n+0]=t,this.float32[n+1]=e,i},e.prototype.emplace=function(t,e,i){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=i,t},e}(lo);Ao.prototype.bytesPerElement=8,Vt("StructArrayLayout2f8",Ao);var Po=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,i,n){var r=this.length;this.resize(r+1);var o=4*r;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=i,this.float32[o+3]=n,r},e.prototype.emplace=function(t,e,i,n,r){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,t},e}(lo);Po.prototype.bytesPerElement=16,Vt("StructArrayLayout4f16",Po);var Io=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.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},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},i.anchorPoint.get=function(){return new $i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,i),e}(so);Io.prototype.size=24;var Mo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Io(this,t)},e}(yo);Vt("CollisionBoxArray",Mo);var zo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.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},hidden:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},i.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},i.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,i),e}(so);zo.prototype.size=40;var Ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new zo(this,t)},e}(xo);Vt("PlacedSymbolArray",Ro);var Bo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},horizontalPlacedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},i.horizontalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.horizontalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},i.key.get=function(){return this._structArray.uint16[this._pos2+4]},i.key.set=function(t){this._structArray.uint16[this._pos2+4]=t},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+5]},i.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+5]=t},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+6]},i.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+6]=t},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},i.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.featureIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},i.numGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+10]},i.numGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+10]=t},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+11]},i.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+11]=t},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+12]},i.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+7]},i.crossTileID.set=function(t){this._structArray.uint32[this._pos4+7]=t},Object.defineProperties(e.prototype,i),e}(so);Bo.prototype.size=32;var Oo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Bo(this,t)},e}(wo);Vt("SymbolInstanceArray",Oo);var Do=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,i),e}(so);Do.prototype.size=4;var No=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new Do(this,t)},e}(ko);Vt("GlyphOffsetArray",No);var Fo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(t){this._structArray.int16[this._pos2+0]=t},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(t){this._structArray.int16[this._pos2+1]=t},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,i),e}(so);Fo.prototype.size=6;var jo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new Fo(this,t)},e}(To);Vt("SymbolLineVertexArray",jo);var Uo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.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.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,i),e}(so);Uo.prototype.size=8;var Vo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Uo(this,t)},e}(Eo);Vt("FeatureIndexArray",Vo);var Zo=Xt([{name:"a_pos",components:2,type:"Int16"}],4),qo=Zo.members,Go=(Zo.size,Zo.alignment,function(t){void 0===t&&(t=[]),this.segments=t});Go.prototype.prepareSegment=function(t,e,i){var n=this.segments[this.segments.length-1];return t>Go.MAX_VERTEX_ARRAY_LENGTH&&d("Max vertices per segment is "+Go.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>Go.MAX_VERTEX_ARRAY_LENGTH)&&(n={vertexOffset:e.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},this.segments.push(n)),n},Go.prototype.get=function(){return this.segments},Go.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var i=e[t];for(var n in i.vaos)i.vaos[n].destroy()}},Go.simpleSegment=function(t,e,i,n){return new Go([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:n,vaos:{}}])},Go.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Vt("SegmentVector",Go);var Ho=function(t,e){return 256*(t=a(Math.floor(t),0,255))+(e=a(Math.floor(e),0,255))},Wo=function(){this.ids=[],this.positions=[],this.indexed=!1};Wo.prototype.add=function(t,e,i,n){this.ids.push(t),this.positions.push(e,i,n)},Wo.prototype.getPositions=function(t){for(var e=0,i=this.ids.length-1;e<i;){var n=e+i>>1;this.ids[n]>=t?i=n:e=n+1}for(var r=[];this.ids[e]===t;){var o=this.positions[3*e],a=this.positions[3*e+1],s=this.positions[3*e+2];r.push({index:o,start:a,end:s}),e++}return r},Wo.serialize=function(t,e){var i=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,i,n,r){if(!(n>=r)){for(var o=e[n+r>>1],a=n-1,s=r+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;Qt(e,a,s),Qt(i,3*a,3*s),Qt(i,3*a+1,3*s+1),Qt(i,3*a+2,3*s+2)}t(e,i,n,s),t(e,i,s+1,r)}}(i,n,0,i.length-1),e.push(i.buffer,n.buffer),{ids:i,positions:n}},Wo.deserialize=function(t){var e=new Wo;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},Vt("FeaturePositionMap",Wo);var Ko=function(t,e){this.gl=t.gl,this.location=e},Jo=function(t){function e(e,i){t.call(this,e,i),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Ko),Xo=function(t){function e(e,i){t.call(this,e,i),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Ko),Yo=function(t){function e(e,i){t.call(this,e,i),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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]))},e}(Ko),Qo=function(t){function e(e,i){t.call(this,e,i),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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]))},e}(Ko),$o=function(t){function e(e,i){t.call(this,e,i),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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]))},e}(Ko),ta=function(t){function e(e,i){t.call(this,e,i),this.current=Pn.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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))},e}(Ko),ea=new Float32Array(16),ia=function(t){function e(e,i){t.call(this,e,i),this.current=ea}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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}},e}(Ko),na=function(t,e,i){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=i,this.maxValue=-1/0};na.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},na.prototype.setConstantPatternPositions=function(){},na.prototype.populatePaintArray=function(){},na.prototype.updatePaintArray=function(){},na.prototype.upload=function(){},na.prototype.destroy=function(){},na.prototype.setUniforms=function(t,e,i,n){e.set(n.constantOr(this.value))},na.prototype.getBinding=function(t,e){return"color"===this.type?new ta(t,e):new Xo(t,e)},na.serialize=function(t){var e=t.value,i=t.names,n=t.type;return{value:Zt(e),names:i,type:n}},na.deserialize=function(t){var e=t.value,i=t.names,n=t.type;return new na(qt(e),i,n)};var ra=function(t,e,i){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};ra.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},ra.prototype.populatePaintArray=function(){},ra.prototype.updatePaintArray=function(){},ra.prototype.upload=function(){},ra.prototype.destroy=function(){},ra.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},ra.prototype.setUniforms=function(t,e,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&e.set(o.patternTo),"u_pattern_from"===r&&o.patternFrom&&e.set(o.patternFrom)},ra.prototype.getBinding=function(t,e){return new $o(t,e)};var oa=function(t,e,i,n){this.expression=t,this.names=e,this.type=i,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===i?2:1,offset:0}}),this.paintVertexArray=new n};oa.prototype.defines=function(){return[]},oa.prototype.setConstantPatternPositions=function(){},oa.prototype.populatePaintArray=function(t,e){var i=this.paintVertexArray,n=i.length;i.reserve(t);var r=this.expression.evaluate(new qr(0),e,{});if("color"===this.type)for(var o=$t(r),a=n;a<t;a++)i.emplaceBack(o[0],o[1]);else{for(var s=n;s<t;s++)i.emplaceBack(r);this.maxValue=Math.max(this.maxValue,r)}},oa.prototype.updatePaintArray=function(t,e,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=$t(o),s=t;s<e;s++)r.emplace(s,a[0],a[1]);else{for(var l=t;l<e;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},oa.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},oa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},oa.prototype.setUniforms=function(t,e){e.set(0)},oa.prototype.getBinding=function(t,e){return new Xo(t,e)};var aa=function(t,e,i,n,r,o){this.expression=t,this.names=e,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===i?4:2,offset:0}}),this.paintVertexArray=new a};aa.prototype.defines=function(){return[]},aa.prototype.setConstantPatternPositions=function(){},aa.prototype.populatePaintArray=function(t,e){var i=this.paintVertexArray,n=i.length;i.reserve(t);var r=this.expression.evaluate(new qr(this.zoom),e,{}),o=this.expression.evaluate(new qr(this.zoom+1),e,{});if("color"===this.type)for(var a=$t(r),s=$t(o),l=n;l<t;l++)i.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var u=n;u<t;u++)i.emplaceBack(r,o);this.maxValue=Math.max(this.maxValue,r,o)}},aa.prototype.updatePaintArray=function(t,e,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=$t(o),l=$t(a),u=t;u<e;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=t;c<e;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},aa.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))},aa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},aa.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},aa.prototype.setUniforms=function(t,e,i){e.set(this.interpolationFactor(i.zoom))},aa.prototype.getBinding=function(t,e){return new Xo(t,e)};var sa=function(t,e,i,n,r,o,a){this.expression=t,this.names=e,this.type=i,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Uint16",components:4,offset:0}}),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};sa.prototype.defines=function(){return[]},sa.prototype.setConstantPatternPositions=function(){},sa.prototype.populatePaintArray=function(t,e,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(t),r.reserve(t),i&&e.patterns&&e.patterns[o]){var s=e.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],p=i[u],f=i[c];if(!h||!p||!f)return;for(var d=a;d<t;d++)n.emplaceBack(p.tl[0],p.tl[1],p.br[0],p.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(p.tl[0],p.tl[1],p.br[0],p.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},sa.prototype.updatePaintArray=function(t,e,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,p=r[u],f=r[c],d=r[h];if(!p||!f||!d)return;for(var m=t;m<e;m++)o.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1]),a.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1])}},sa.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},sa.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},sa.prototype.setUniforms=function(t,e){e.set(0)},sa.prototype.getBinding=function(t,e){return new Xo(t,e)};var la=function(){this.binders={},this.cacheKey="",this._buffers=[],this._featureMap=new Wo,this._bufferOffset=0};la.createDynamic=function(t,e,i){var n=new la,r=[];for(var o in t.paint._values)if(i(o)){var a=t.paint.get(o);if(a instanceof Yr&&Y(a.property.specification)){var s=te(o,t.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new ra(a.value.value,s,l),r.push("/u_"+o);else{var c=ee(o,l,"source");n.binders[o]=new sa(a.value,s,l,u,e,c,t.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new na(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){var h=ee(o,l,"source");n.binders[o]=new oa(a.value,s,l,h),r.push("/a_"+o)}else{var p=ee(o,l,"composite");n.binders[o]=new aa(a.value,s,l,u,e,p),r.push("/z_"+o)}}}return n.cacheKey=r.sort().join(""),n},la.prototype.populatePaintArrays=function(t,e,i,n){for(var r in this.binders)this.binders[r].populatePaintArray(t,e,n);void 0!==e.id&&this._featureMap.add(+e.id,i,this._bufferOffset,t),this._bufferOffset=t},la.prototype.setConstantPatternPositions=function(t,e){for(var i in this.binders)this.binders[i].setConstantPatternPositions(t,e)},la.prototype.updatePaintArrays=function(t,e,i,n){var r=!1;for(var o in t)for(var a=0,s=this._featureMap.getPositions(+o);a<s.length;a+=1){var l=s[a],u=e.feature(l.index);for(var c in this.binders){var h=this.binders[c];if(!(h instanceof na||h instanceof ra)&&!0===h.expression.isStateDependent){var p=i.paint.get(c);h.expression=p.value,h.updatePaintArray(l.start,l.end,u,t[o],n),r=!0}}}return r},la.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},la.prototype.getPaintVertexBuffers=function(){return this._buffers},la.prototype.getUniforms=function(t,e){var i={};for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];i[s]=r.getBinding(t,e[s])}return i},la.prototype.setUniforms=function(t,e,i,n){for(var r in this.binders)for(var o=this.binders[r],a=0,s=o.uniformNames;a<s.length;a+=1){var l=s[a];o.setUniforms(t,e[l],n,i.get(r),l)}},la.prototype.updatePatternPaintBuffers=function(t){var e=[];for(var i in this.binders){var n=this.binders[i];if(n instanceof sa){var r=2===t.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;r&&e.push(r)}else(n instanceof oa||n instanceof aa)&&n.paintVertexBuffer&&e.push(n.paintVertexBuffer)}this._buffers=e},la.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var i=[];for(var n in this.binders){var r=this.binders[n];(r instanceof oa||r instanceof aa)&&r.paintVertexBuffer&&i.push(r.paintVertexBuffer)}this._buffers=i},la.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var ua=function(t,e,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var r=0,o=e;r<o.length;r+=1){var a=o[r];this.programConfigurations[a.id]=la.createDynamic(a,i,n),this.programConfigurations[a.id].layoutAttributes=t}this.needsUpload=!1};ua.prototype.populatePaintArrays=function(t,e,i,n){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e,i,n);this.needsUpload=!0},ua.prototype.updatePaintArrays=function(t,e,i,n){for(var r=0,o=i;r<o.length;r+=1){var a=o[r];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,e,a,n)||this.needsUpload}},ua.prototype.get=function(t){return this.programConfigurations[t]},ua.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},ua.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Vt("ConstantBinder",na),Vt("CrossFadedConstantBinder",ra),Vt("SourceExpressionBinder",oa),Vt("CrossFadedCompositeBinder",sa),Vt("CompositeExpressionBinder",aa),Vt("ProgramConfiguration",la,{omit:["_buffers"]}),Vt("ProgramConfigurationSet",ua);var ca,ha=8192,pa=(ca=16,{min:-1*Math.pow(2,ca-1),max:Math.pow(2,ca-1)-1}),fa=function(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 uo,this.indexArray=new Lo,this.segments=new Go,this.programConfigurations=new ua(qo,t.layers,t.zoom)};fa.prototype.populate=function(t,e){for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new qr(this.zoom),o)){var l=ie(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},fa.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},fa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},fa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},fa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,qo),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},fa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},fa.prototype.addFeature=function(t,e,i){for(var n=0,r=e;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=ha||u<0||u>=ha)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=c.vertexLength;ne(this.layoutVertexArray,l,u,-1,-1),ne(this.layoutVertexArray,l,u,1,-1),ne(this.layoutVertexArray,l,u,1,1),ne(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{})},Vt("CircleBucket",fa,{omit:["layers"]});var da={paint:new ro({"circle-radius":new to(mn.paint_circle["circle-radius"]),"circle-color":new to(mn.paint_circle["circle-color"]),"circle-blur":new to(mn.paint_circle["circle-blur"]),"circle-opacity":new to(mn.paint_circle["circle-opacity"]),"circle-translate":new $r(mn.paint_circle["circle-translate"]),"circle-translate-anchor":new $r(mn.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new $r(mn.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new $r(mn.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new to(mn.paint_circle["circle-stroke-width"]),"circle-stroke-color":new to(mn.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new to(mn.paint_circle["circle-stroke-opacity"])})},ma="undefined"!=typeof Float32Array?Float32Array:Array;Math.PI;var _a,ga=ve,ya=(_a=ye(),function(t,e,i,n,r,o){var a=void 0,s=void 0;for(e||(e=3),i||(i=0),s=n?Math.min(n*e+i,t.length):t.length,a=i;a<s;a+=e)_a[0]=t[a],_a[1]=t[a+1],_a[2]=t[a+2],r(_a,_a,o),t[a]=_a[0],t[a+1]=_a[1],t[a+2]=_a[2];return t}),va=function(){var t=Te();return function(e,i,n,r,o,a){var s=void 0,l=void 0;for(i||(i=4),n||(n=0),l=r?Math.min(r*i+n,e.length):e.length,s=n;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();ye(),be(1,0,0),be(0,1,0),Se(),Se(),ge(),function(){var t;t=new ma(2),ma!=Float32Array&&(t[0]=0,t[1]=0)}();var ba=function(t){function e(e){t.call(this,e,da)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new fa(t)},e.prototype.queryRadius=function(t){var e=t;return de("circle-radius",this,e)+de("circle-stroke-width",this,e)+me(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,i,n,r,o,a,s){for(var l=_e(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"),h=c?l:function(t,e,i){return t.map(function(t){return t.map(function(t){return Ce(t,e,i)})})}(l,s,o),p=c?u*a:u,f=0,d=n;f<d.length;f+=1)for(var m=0,_=d[f];m<_.length;m+=1){var g=_[m],y=c?g:Ce(g,s,o),v=p,b=Le([],[g.x,g.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?v*=b[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(v*=o.cameraToCenterDistance/b[3]),re(h,y,v))return!0}return!1},e}(oo),xa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(fa);Vt("HeatmapBucket",xa,{omit:["layers"]});var wa=function(t,e){Ae(this,t,1,e)};wa.prototype.resize=function(t){Pe(this,t,1)},wa.prototype.clone=function(){return new wa({width:this.width,height:this.height},new Uint8Array(this.data))},wa.copy=function(t,e,i,n,r){Ie(t,e,i,n,r,1)};var ka=function(t,e){Ae(this,t,4,e)};ka.prototype.resize=function(t){Pe(this,t,4)},ka.prototype.clone=function(){return new ka({width:this.width,height:this.height},new Uint8Array(this.data))},ka.copy=function(t,e,i,n,r){Ie(t,e,i,n,r,4)},Vt("AlphaImage",wa),Vt("RGBAImage",ka);var Ta={paint:new ro({"heatmap-radius":new to(mn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new to(mn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new $r(mn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new no(mn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new $r(mn.paint_heatmap["heatmap-opacity"])})},Ea=function(t){function e(e){t.call(this,e,Ta),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new xa(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Me(t,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(oo),La={paint:new ro({"hillshade-illumination-direction":new $r(mn.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new $r(mn.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new $r(mn.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new $r(mn.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new $r(mn.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new $r(mn.paint_hillshade["hillshade-accent-color"])})},Sa=function(t){function e(e){t.call(this,e,La)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(oo),Ca=Xt([{name:"a_pos",components:2,type:"Int16"}],4),Aa=Ca.members,Pa=(Ca.size,Ca.alignment,ze),Ia=ze;ze.deviation=function(t,e,i,n){var r=e&&e.length,o=r?e[0]*i:t.length,a=Math.abs(ei(t,0,o,i));if(r)for(var s=0,l=e.length;s<l;s++){var u=e[s]*i,c=s<l-1?e[s+1]*i:t.length;a-=Math.abs(ei(t,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var p=n[s]*i,f=n[s+1]*i,d=n[s+2]*i;h+=Math.abs((t[p]-t[d])*(t[f+1]-t[p+1])-(t[p]-t[f])*(t[d+1]-t[p+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},ze.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)i.vertices.push(t[r][o][a]);r>0&&(n+=t[r-1].length,i.holes.push(n))}return i},Pa.default=Ia;var Ma=e(function(t,e){t.exports=function(){function t(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function e(t,e){return t<e?-1:t>e?1:0}return function(i,n,r,o,a){!function e(i,n,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,l=n-r+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(i,n,Math.max(r,Math.floor(n-l*c/s+h)),Math.min(o,Math.floor(n+(s-l)*c/s+h)),a)}var p=i[n],f=r,d=o;for(t(i,r,n),a(i[o],p)>0&&t(i,r,o);f<d;){for(t(i,f,d),f++,d--;a(i[f],p)<0;)f++;for(;a(i[d],p)>0;)d--}0===a(i[r],p)?t(i,r,d):t(i,++d,o),d<=n&&(r=d+1),n<=d&&(o=d-1)}}(i,n,r||0,o||i.length-1,a||e)}}()}),za=function(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 uo,this.indexArray=new Lo,this.indexArray2=new So,this.programConfigurations=new ua(Aa,t.layers,t.zoom),this.segments=new Go,this.segments2=new Go};za.prototype.populate=function(t,e){this.features=[],this.hasPattern=ri("fill",this.layers,e);for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new qr(this.zoom),o)){var l=ie(o),u={sourceLayerIndex:s,index:a,geometry:l,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(u.id=o.id),this.hasPattern?this.features.push(oi("fill",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},za.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},za.prototype.addFeatures=function(t,e){for(var i=0,n=this.features;i<n.length;i+=1){var r=n[i],o=r.geometry;this.addFeature(r,o,r.index,e)}},za.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},za.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},za.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Aa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},za.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},za.prototype.addFeature=function(t,e,i,n){for(var r=0,o=ii(e,500);r<o.length;r+=1){for(var a=o[r],s=0,l=0,u=a;l<u.length;l+=1)s+=u[l].length;for(var c=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray),h=c.vertexLength,p=[],f=[],d=0,m=a;d<m.length;d+=1){var _=m[d];if(0!==_.length){_!==a[0]&&f.push(p.length/2);var g=this.segments2.prepareSegment(_.length,this.layoutVertexArray,this.indexArray2),y=g.vertexLength;this.layoutVertexArray.emplaceBack(_[0].x,_[0].y),this.indexArray2.emplaceBack(y+_.length-1,y),p.push(_[0].x),p.push(_[0].y);for(var v=1;v<_.length;v++)this.layoutVertexArray.emplaceBack(_[v].x,_[v].y),this.indexArray2.emplaceBack(y+v-1,y+v),p.push(_[v].x),p.push(_[v].y);g.vertexLength+=_.length,g.primitiveLength+=_.length}}for(var b=Pa(p,f),x=0;x<b.length;x+=3)this.indexArray.emplaceBack(h+b[x],h+b[x+1],h+b[x+2]);c.vertexLength+=s,c.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n)},Vt("FillBucket",za,{omit:["layers","features"]});var Ra={paint:new ro({"fill-antialias":new $r(mn.paint_fill["fill-antialias"]),"fill-opacity":new to(mn.paint_fill["fill-opacity"]),"fill-color":new to(mn.paint_fill["fill-color"]),"fill-outline-color":new to(mn.paint_fill["fill-outline-color"]),"fill-translate":new $r(mn.paint_fill["fill-translate"]),"fill-translate-anchor":new $r(mn.paint_fill["fill-translate-anchor"]),"fill-pattern":new eo(mn.paint_fill["fill-pattern"])})},Ba=function(t){function e(e){t.call(this,e,Ra)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,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"])},e.prototype.createBucket=function(t){return new za(t)},e.prototype.queryRadius=function(){return me(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,i,n,r,o,a){return oe(_e(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),n)},e}(oo),Oa=Xt([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Da=Oa.members,Na=(Oa.size,Oa.alignment,Math.pow(2,13)),Fa=function(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 ho,this.indexArray=new Lo,this.programConfigurations=new ua(Da,t.layers,t.zoom),this.segments=new Go};Fa.prototype.populate=function(t,e){this.features=[],this.hasPattern=ri("fill-extrusion",this.layers,e);for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new qr(this.zoom),o)){var l=ie(o),u={sourceLayerIndex:s,index:a,geometry:l,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(u.id=o.id),this.hasPattern?this.features.push(oi("fill-extrusion",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},Fa.prototype.addFeatures=function(t,e){for(var i=0,n=this.features;i<n.length;i+=1){var r=n[i],o=r.geometry;this.addFeature(r,o,r.index,e)}},Fa.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},Fa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Fa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Fa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Da),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Fa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Fa.prototype.addFeature=function(t,e,i,n){for(var r=0,o=ii(e,500);r<o.length;r+=1){for(var a=o[r],s=0,l=0,u=a;l<u.length;l+=1)s+=u[l].length;for(var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=0,p=a;h<p.length;h+=1){var f=p[h];if(0!==f.length&&!li(f))for(var d=0,m=0;m<f.length;m++){var _=f[m];if(m>=1){var g=f[m-1];if(!si(_,g)){c.vertexLength+4>Go.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=_.sub(g)._perp()._unit(),v=g.dist(_);d+v>32768&&(d=0),ai(this.layoutVertexArray,_.x,_.y,y.x,y.y,0,0,d),ai(this.layoutVertexArray,_.x,_.y,y.x,y.y,0,1,d),d+=v,ai(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,0,d),ai(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,1,d);var b=c.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),c.vertexLength+=4,c.primitiveLength+=2}}}}c.vertexLength+s>Go.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray));for(var x=[],w=[],k=c.vertexLength,T=0,E=a;T<E.length;T+=1){var L=E[T];if(0!==L.length){L!==a[0]&&w.push(x.length/2);for(var S=0;S<L.length;S++){var C=L[S];ai(this.layoutVertexArray,C.x,C.y,0,0,1,1,0),x.push(C.x),x.push(C.y)}}}for(var A=Pa(x,w),P=0;P<A.length;P+=3)this.indexArray.emplaceBack(k+A[P],k+A[P+2],k+A[P+1]);c.primitiveLength+=A.length/3,c.vertexLength+=s}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n)},Vt("FillExtrusionBucket",Fa,{omit:["layers","features"]});var ja={paint:new ro({"fill-extrusion-opacity":new $r(mn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new to(mn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new $r(mn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new $r(mn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new eo(mn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new to(mn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new to(mn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new $r(mn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Ua=function(t){function e(e){t.call(this,e,ja)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Fa(t)},e.prototype.queryRadius=function(){return me(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,i,n,r,o,a){return oe(_e(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,a),n)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(oo),Va=Xt([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),Za=Va.members,qa=(Va.size,Va.alignment,ui);ui.types=["Unknown","Point","LineString","Polygon"],ui.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,i=t.readVarint()+t.pos,n=1,r=0,o=0,a=0,s=[];t.pos<i;){if(r<=0){var l=t.readVarint();n=7&l,r=l>>3}if(r--,1===n||2===n)o+=t.readSVarint(),a+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new $i(o,a));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},ui.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(n<=0){var c=t.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)r+=t.readSVarint(),o+=t.readSVarint(),r<a&&(a=r),r>s&&(s=r),o<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},ui.prototype.toGeoJSON=function(t,e,i){function n(t){for(var e=0;e<t.length;e++){var i=t[e],n=180-360*(i.y+l)/a;t[e]=[360*(i.x+s)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}var r,o,a=this.extent*Math.pow(2,i),s=this.extent*t,l=this.extent*e,u=this.loadGeometry(),c=ui.types[this.type];switch(this.type){case 1:var h=[];for(r=0;r<u.length;r++)h[r]=u[r][0];n(u=h);break;case 2:for(r=0;r<u.length;r++)n(u[r]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var i,n,r=[],o=0;o<e;o++){var a=hi(t[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[t[o]]):i.push(t[o]))}return i&&r.push(i),r}(u),r=0;r<u.length;r++)for(o=0;o<u[r].length;o++)n(u[r][o])}1===u.length?u=u[0]:c="Multi"+c;var p={type:"Feature",geometry:{type:c,coordinates:u},properties:this.properties};return"id"in this&&(p.id=this.id),p};var Ga=pi;pi.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 qa(this._pbf,e,this.extent,this._keys,this._values)};var Ha={VectorTile:function(t,e){this.layers=t.readFields(di,{},e)},VectorTileFeature:qa,VectorTileLayer:Ga},Wa=Ha.VectorTileFeature.types,Ka=63,Ja=Math.cos(Math.PI/180*37.5),Xa=.5,Ya=Math.pow(2,14)/Xa,Qa=function(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.features=[],this.hasPattern=!1,this.layoutVertexArray=new po,this.indexArray=new Lo,this.programConfigurations=new ua(Za,t.layers,t.zoom),this.segments=new Go};Qa.prototype.populate=function(t,e){this.features=[],this.hasPattern=ri("line",this.layers,e);for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new qr(this.zoom),o)){var l=ie(o),u={sourceLayerIndex:s,index:a,geometry:l,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(u.id=o.id),this.hasPattern?this.features.push(oi("line",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},Qa.prototype.update=function(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i)},Qa.prototype.addFeatures=function(t,e){for(var i=0,n=this.features;i<n.length;i+=1){var r=n[i],o=r.geometry;this.addFeature(r,o,r.index,e)}},Qa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Qa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Qa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Za),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Qa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Qa.prototype.addFeature=function(t,e,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(t,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=e;u<c.length;u+=1){var h=c[u];this.addLine(h,t,o,a,s,l,i,n)}},Qa.prototype.addLine=function(t,e,i,n,r,o,a,s){var l=null;e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")&&(l={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var u="Polygon"===Wa[e.type],c=t.length;c>=2&&t[c-1].equals(t[c-2]);)c--;for(var h=0;h<c-1&&t[h].equals(t[h+1]);)h++;if(!(c<(u?3:2))){l&&(l.tileTotal=function(t,e,i){for(var n,r,o=0,a=e;a<i-1;a++)n=t[a],r=t[a+1],o+=n.dist(r);return o}(t,h,c)),"bevel"===i&&(r=1.05);var p=ha/(512*this.overscaling)*15,f=t[h],d=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray);this.distance=0;var m,_,g,y=n,v=u?"butt":n,b=!0,x=void 0,w=void 0,k=void 0,T=void 0;this.e1=this.e2=this.e3=-1,u&&(m=t[c-2],T=f.sub(m)._unit()._perp());for(var E=h;E<c;E++)if(!(w=u&&E===c-1?t[h+1]:t[E+1])||!t[E].equals(w)){T&&(k=T),m&&(x=m),m=t[E],T=w?w.sub(m)._unit()._perp():k;var L=(k=k||T).add(T);0===L.x&&0===L.y||L._unit();var S=L.x*T.x+L.y*T.y,C=0!==S?1/S:1/0,A=S<Ja&&x&&w;if(A&&E>h){var P=m.dist(x);if(P>2*p){var I=m.sub(m.sub(x)._mult(p/P)._round());this.distance+=I.dist(x),this.addCurrentVertex(I,this.distance,k.mult(1),0,0,!1,d,l),x=I}}var M=x&&w,z=M?i:w?y:v;if(M&&"round"===z&&(C<o?z="miter":C<=2&&(z="fakeround")),"miter"===z&&C>r&&(z="bevel"),"bevel"===z&&(C>2&&(z="flipbevel"),C<r&&(z="miter")),x&&(this.distance+=m.dist(x)),"miter"===z)L._mult(C),this.addCurrentVertex(m,this.distance,L,0,0,!1,d,l);else if("flipbevel"===z){if(C>100)L=T.clone().mult(-1);else{var R=k.x*T.y-k.y*T.x>0?-1:1,B=C*k.add(T).mag()/k.sub(T).mag();L._perp()._mult(B*R)}this.addCurrentVertex(m,this.distance,L,0,0,!1,d,l),this.addCurrentVertex(m,this.distance,L.mult(-1),0,0,!1,d,l)}else if("bevel"===z||"fakeround"===z){var O=k.x*T.y-k.y*T.x>0,D=-Math.sqrt(C*C-1);if(O?(g=0,_=D):(_=0,g=D),b||this.addCurrentVertex(m,this.distance,k,_,g,!1,d,l),"fakeround"===z){for(var N=Math.floor(8*(.5-(S-.5))),F=void 0,j=0;j<N;j++)F=T.mult((j+1)/(N+1))._add(k)._unit(),this.addPieSliceVertex(m,this.distance,F,O,d,l);this.addPieSliceVertex(m,this.distance,L,O,d,l);for(var U=N-1;U>=0;U--)F=k.mult((U+1)/(N+1))._add(T)._unit(),this.addPieSliceVertex(m,this.distance,F,O,d,l)}w&&this.addCurrentVertex(m,this.distance,T,-_,-g,!1,d,l)}else"butt"===z?(b||this.addCurrentVertex(m,this.distance,k,0,0,!1,d,l),w&&this.addCurrentVertex(m,this.distance,T,0,0,!1,d,l)):"square"===z?(b||(this.addCurrentVertex(m,this.distance,k,1,1,!1,d,l),this.e1=this.e2=-1),w&&this.addCurrentVertex(m,this.distance,T,-1,-1,!1,d,l)):"round"===z&&(b||(this.addCurrentVertex(m,this.distance,k,0,0,!1,d,l),this.addCurrentVertex(m,this.distance,k,1,1,!0,d,l),this.e1=this.e2=-1),w&&(this.addCurrentVertex(m,this.distance,T,-1,-1,!0,d,l),this.addCurrentVertex(m,this.distance,T,0,0,!1,d,l)));if(A&&E<c-1){var V=m.dist(w);if(V>2*p){var Z=m.add(w.sub(m)._mult(p/V)._round());this.distance+=Z.dist(m),this.addCurrentVertex(Z,this.distance,T.mult(1),0,0,!1,d,l),m=Z}}b=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},Qa.prototype.addCurrentVertex=function(t,e,i,n,r,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;s&&(e=_i(e,s)),l=i.clone(),n&&l._sub(i.perp()._mult(n)),mi(u,t,l,o,!1,n,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=i.mult(-1),r&&l._sub(i.perp()._mult(r)),mi(u,t,l,o,!0,-r,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>Ya/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,i,n,r,o,a))},Qa.prototype.addPieSliceVertex=function(t,e,i,n,r,o){i=i.mult(n?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=_i(e,o)),mi(a,t,i,!1,n,0,e),this.e3=r.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),r.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},Vt("LineBucket",Qa,{omit:["layers","features"]});var $a=new ro({"line-cap":new $r(mn.layout_line["line-cap"]),"line-join":new to(mn.layout_line["line-join"]),"line-miter-limit":new $r(mn.layout_line["line-miter-limit"]),"line-round-limit":new $r(mn.layout_line["line-round-limit"])}),ts={paint:new ro({"line-opacity":new to(mn.paint_line["line-opacity"]),"line-color":new to(mn.paint_line["line-color"]),"line-translate":new $r(mn.paint_line["line-translate"]),"line-translate-anchor":new $r(mn.paint_line["line-translate-anchor"]),"line-width":new to(mn.paint_line["line-width"]),"line-gap-width":new to(mn.paint_line["line-gap-width"]),"line-offset":new to(mn.paint_line["line-offset"]),"line-blur":new to(mn.paint_line["line-blur"]),"line-dasharray":new io(mn.paint_line["line-dasharray"]),"line-pattern":new eo(mn.paint_line["line-pattern"]),"line-gradient":new no(mn.paint_line["line-gradient"])}),layout:$a},es=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,i){return i=new qr(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),t.prototype.possiblyEvaluate.call(this,e,i)},e.prototype.evaluate=function(e,i,n,r){return i=s({},i,{zoom:Math.floor(i.zoom)}),t.prototype.evaluate.call(this,e,i,n,r)},e}(to))(ts.paint.properties["line-width"].specification);es.useIntegerZoom=!0;var is=function(t){function e(e){t.call(this,e,ts)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Me(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=es.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Qa(t)},e.prototype.queryRadius=function(t){var e=t,i=gi(de("line-width",this,e),de("line-gap-width",this,e)),n=de("line-offset",this,e);return i/2+Math.abs(n)+me(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,i,n,r,o,a){var s=_e(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),l=a/2*gi(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),u=this.paint.get("line-offset").evaluate(e,i);return u&&(n=function(t,e){for(var i=[],n=new $i(0,0),r=0;r<t.length;r++){for(var o=t[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),p=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(p)._unit(),d=f.x*p.x+f.y*p.y;f._mult(1/d),a.push(f._mult(e)._add(u))}i.push(a)}return i}(n,u*a)),ae(s,n,l)},e}(oo),ns=Xt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),rs=Xt([{name:"a_projected_pos",components:3,type:"Float32"}],4),os=(Xt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Xt([{name:"a_placed",components:2,type:"Uint8"}],4)),as=(Xt([{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"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Xt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),ss=Xt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);Xt([{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:"hidden"}]),Xt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"horizontalPlacedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"}]),Xt([{type:"Float32",name:"offsetX"}]),Xt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var ls={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},us=function(t){function e(e,i,n,r){t.call(this,e,i),this.angle=n,void 0!==r&&(this.segment=r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}($i);Vt("Anchor",us);var cs=Ha.VectorTileFeature.types,hs=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}],ps=function(t){this.layoutVertexArray=new mo,this.indexArray=new Lo,this.programConfigurations=t,this.segments=new Go,this.dynamicLayoutVertexArray=new _o,this.opacityVertexArray=new go,this.placedSymbolArray=new Ro};ps.prototype.upload=function(t,e,i,n){i&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ns.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,rs.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,hs,!0),this.opacityVertexBuffer.itemSize=1),(i||n)&&this.programConfigurations.upload(t)},ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Vt("SymbolBuffers",ps);var fs=function(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new Go,this.collisionVertexArray=new bo};fs.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,os.members,!0)},fs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Vt("CollisionBuffers",fs);var ds=function(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;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=vi(this.zoom,e["text-size"]),this.iconSizeData=vi(this.zoom,e["icon-size"]);var i=this.layers[0].layout,n="viewport-y"===i.get("symbol-z-order");this.sortFeaturesByY=n&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),this.sourceID=t.sourceID};ds.prototype.createArrays=function(){this.text=new ps(new ua(ns.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new ps(new ua(ns.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new fs(vo,as.members,So),this.collisionCircle=new fs(vo,ss.members,Lo),this.glyphOffsetArray=new No,this.lineVertexArray=new jo,this.symbolInstances=new Oo},ds.prototype.calculateGlyphDependencies=function(t,e,i,n){for(var r=0;r<t.length;r++)if(e[t.charCodeAt(r)]=!0,i&&n){var o=ls[t.charAt(r)];o&&(e[o.charCodeAt(0)]=!0)}},ds.prototype.populate=function(t,e){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||l){for(var u=e.iconDependencies,c=e.glyphDependencies,h=new qr(this.zoom),p=0,f=t;p<f.length;p+=1){var d=f[p],m=d.feature,_=d.index,g=d.sourceLayerIndex;if(i._featureFilter(h,m)){var y=void 0;if(s){var v=i.getValueAndResolveTokens("text-field",m);y=yi(v instanceof zn?v:zn.fromString(v),i,m)}var b=void 0;if(l&&(b=i.getValueAndResolveTokens("icon-image",m)),y||b){var x={text:y,icon:b,index:_,sourceLayerIndex:g,geometry:ie(m),properties:m.properties,type:cs[m.type]};if(void 0!==m.id&&(x.id=m.id),this.features.push(x),b&&(u[b]=!0),y)for(var w=r.evaluate(m,{}).join(","),k="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement"),T=0,E=y.sections;T<E.length;T+=1){var L=E[T],S=Gt(y.toString()),C=L.fontStack||w,A=c[C]=c[C]||{};this.calculateGlyphDependencies(L.text,A,k,S)}}}}"line"===n.get("symbol-placement")&&(this.features=function(t){function e(e){s.push(t[e]),l++}function i(t,e,i){var n=a[t];return delete a[t],a[e]=n,s[n].geometry[0].pop(),s[n].geometry[0]=s[n].geometry[0].concat(i[0]),n}function n(t,e,i){var n=o[e];return delete o[e],o[t]=n,s[n].geometry[0].shift(),s[n].geometry[0]=i[0].concat(s[n].geometry[0]),n}function r(t,e,i){var n=i?e[0][e[0].length-1]:e[0][0];return t+":"+n.x+":"+n.y}for(var o={},a={},s=[],l=0,u=0;u<t.length;u++){var c=t[u],h=c.geometry,p=c.text?c.text.toString():null;if(p){var f=r(p,h),d=r(p,h,!0);if(f in a&&d in o&&a[f]!==o[d]){var m=n(f,d,h),_=i(f,d,s[m].geometry);delete o[f],delete a[d],a[r(p,s[_].geometry,!0)]=_,s[m].geometry=null}else f in a?i(f,d,h):d in o?n(f,d,h):(e(u),o[f]=l-1,a[d]=l-1)}else e(u)}return s.filter(function(t){return t.geometry})}(this.features))}},ds.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))},ds.prototype.isEmpty=function(){return 0===this.symbolInstances.length},ds.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},ds.prototype.upload=function(t){this.uploaded||(this.collisionBox.upload(t),this.collisionCircle.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},ds.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},ds.prototype.addToLineVertexArray=function(t,e){var i=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),r=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:n},a<e.length-1&&(n+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=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}},ds.prototype.addSymbols=function(t,e,i,n,r,o,a,s,l,u){for(var c=t.indexArray,h=t.layoutVertexArray,p=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,m=f.vertexLength,_=0,g=e;_<g.length;_+=1){var y=g[_],v=y.tl,b=y.tr,x=y.bl,w=y.br,k=y.tex,T=f.vertexLength,E=y.glyphOffset[1];bi(h,s.x,s.y,v.x,E+v.y,k.x,k.y,i),bi(h,s.x,s.y,b.x,E+b.y,k.x+k.w,k.y,i),bi(h,s.x,s.y,x.x,E+x.y,k.x,k.y+k.h,i),bi(h,s.x,s.y,w.x,E+w.y,k.x+k.w,k.y+k.h,i),xi(p,s,0),c.emplaceBack(T,T+1,T+2),c.emplaceBack(T+1,T+2,T+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(y.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{})},ds.prototype._addCollisionDebugVertex=function(t,e,i,n,r,o){return e.emplaceBack(0,0),t.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},ds.prototype.addCollisionDebugVertices=function(t,e,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,p=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,p,f,new $i(t,e)),this._addCollisionDebugVertex(c,h,o,p,f,new $i(i,e)),this._addCollisionDebugVertex(c,h,o,p,f,new $i(i,n)),this._addCollisionDebugVertex(c,h,o,p,f,new $i(t,n)),l.vertexLength+=4,s){var d=r.indexArray;d.emplaceBack(u,u+1,u+2),d.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var m=r.indexArray;m.emplaceBack(u,u+1),m.emplaceBack(u+1,u+2),m.emplaceBack(u+2,u+3),m.emplaceBack(u+3,u),l.primitiveLength+=4}},ds.prototype.addDebugCollisionBoxes=function(t,e,i){for(var n=t;n<e;n++){var r=this.collisionBoxArray.get(n),o=r.x1,a=r.y1,s=r.x2,l=r.y2,u=r.radius>0;this.addCollisionDebugVertices(o,a,s,l,u?this.collisionCircle:this.collisionBox,r.anchorPoint,i,u)}},ds.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e)}},ds.prototype._deserializeCollisionBoxesForSymbol=function(t,e,i,n,r){for(var o={},a=e;a<i;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex),o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=n;l<r;l++){var u=t.get(l);if(0===u.radius){o.iconBox={x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,anchorPointX:u.anchorPointX,anchorPointY:u.anchorPointY},o.iconFeatureIndex=u.featureIndex;break}}return o},ds.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.iconBoxStartIndex,i.iconBoxEndIndex))}},ds.prototype.hasTextData=function(){return this.text.segments.get().length>0},ds.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ds.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},ds.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},ds.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),i=e.vertexStartIndex+4*e.numGlyphs,n=e.vertexStartIndex;n<i;n+=4)this.text.indexArray.emplaceBack(n,n+1,n+2),this.text.indexArray.emplaceBack(n+1,n+2,n+3)},ds.prototype.sortFeatures=function(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var e=[],i=0;i<this.symbolInstances.length;i++)e.push(i);for(var n=Math.sin(t),r=Math.cos(t),o=[],a=[],s=0;s<this.symbolInstances.length;s++){var l=this.symbolInstances.get(s);o.push(0|Math.round(n*l.anchorX+r*l.anchorY)),a.push(l.featureIndex)}e.sort(function(t,e){return o[t]-o[e]||a[e]-a[t]}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var u=0,c=e;u<c.length;u+=1){var h=c[u],p=this.symbolInstances.get(h);this.featureSortOrder.push(p.featureIndex),p.horizontalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(p.horizontalPlacedTextSymbolIndex),p.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(p.verticalPlacedTextSymbolIndex);var f=this.icon.placedSymbolArray.get(h);if(f.numGlyphs){var d=f.vertexStartIndex;this.icon.indexArray.emplaceBack(d,d+1,d+2),this.icon.indexArray.emplaceBack(d+1,d+2,d+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Vt("SymbolBucket",ds,{omit:["layers","collisionBoxArray","features","compareText"]}),ds.MAX_GLYPHS=65535,ds.addDynamicAttributes=xi;var ms=new ro({"symbol-placement":new $r(mn.layout_symbol["symbol-placement"]),"symbol-spacing":new $r(mn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new $r(mn.layout_symbol["symbol-avoid-edges"]),"symbol-z-order":new $r(mn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new $r(mn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new $r(mn.layout_symbol["icon-ignore-placement"]),"icon-optional":new $r(mn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new $r(mn.layout_symbol["icon-rotation-alignment"]),"icon-size":new to(mn.layout_symbol["icon-size"]),"icon-text-fit":new $r(mn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new $r(mn.layout_symbol["icon-text-fit-padding"]),"icon-image":new to(mn.layout_symbol["icon-image"]),"icon-rotate":new to(mn.layout_symbol["icon-rotate"]),"icon-padding":new $r(mn.layout_symbol["icon-padding"]),"icon-keep-upright":new $r(mn.layout_symbol["icon-keep-upright"]),"icon-offset":new to(mn.layout_symbol["icon-offset"]),"icon-anchor":new to(mn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new $r(mn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new $r(mn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new $r(mn.layout_symbol["text-rotation-alignment"]),"text-field":new to(mn.layout_symbol["text-field"]),"text-font":new to(mn.layout_symbol["text-font"]),"text-size":new to(mn.layout_symbol["text-size"]),"text-max-width":new to(mn.layout_symbol["text-max-width"]),"text-line-height":new $r(mn.layout_symbol["text-line-height"]),"text-letter-spacing":new to(mn.layout_symbol["text-letter-spacing"]),"text-justify":new to(mn.layout_symbol["text-justify"]),"text-anchor":new to(mn.layout_symbol["text-anchor"]),"text-max-angle":new $r(mn.layout_symbol["text-max-angle"]),"text-rotate":new to(mn.layout_symbol["text-rotate"]),"text-padding":new $r(mn.layout_symbol["text-padding"]),"text-keep-upright":new $r(mn.layout_symbol["text-keep-upright"]),"text-transform":new to(mn.layout_symbol["text-transform"]),"text-offset":new to(mn.layout_symbol["text-offset"]),"text-allow-overlap":new $r(mn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new $r(mn.layout_symbol["text-ignore-placement"]),"text-optional":new $r(mn.layout_symbol["text-optional"])}),_s={paint:new ro({"icon-opacity":new to(mn.paint_symbol["icon-opacity"]),"icon-color":new to(mn.paint_symbol["icon-color"]),"icon-halo-color":new to(mn.paint_symbol["icon-halo-color"]),"icon-halo-width":new to(mn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new to(mn.paint_symbol["icon-halo-blur"]),"icon-translate":new $r(mn.paint_symbol["icon-translate"]),"icon-translate-anchor":new $r(mn.paint_symbol["icon-translate-anchor"]),"text-opacity":new to(mn.paint_symbol["text-opacity"]),"text-color":new to(mn.paint_symbol["text-color"]),"text-halo-color":new to(mn.paint_symbol["text-halo-color"]),"text-halo-width":new to(mn.paint_symbol["text-halo-width"]),"text-halo-blur":new to(mn.paint_symbol["text-halo-blur"]),"text-translate":new $r(mn.paint_symbol["text-translate"]),"text-translate-anchor":new $r(mn.paint_symbol["text-translate-anchor"])}),layout:ms},gs=function(t){function e(e){t.call(this,e,_s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="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"))},e.prototype.getValueAndResolveTokens=function(t,e){var i,n=this.layout.get(t).evaluate(e,{}),r=this._unevaluatedLayout._values[t];return r.isDataDriven()||ut(r.value)?n:(i=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in i?String(i[e]):""}))},e.prototype.createBucket=function(t){return new ds(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(oo),ys={paint:new ro({"background-color":new $r(mn.paint_background["background-color"]),"background-pattern":new io(mn.paint_background["background-pattern"]),"background-opacity":new $r(mn.paint_background["background-opacity"])})},vs=function(t){function e(e){t.call(this,e,ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(oo),bs={paint:new ro({"raster-opacity":new $r(mn.paint_raster["raster-opacity"]),"raster-hue-rotate":new $r(mn.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new $r(mn.paint_raster["raster-brightness-min"]),"raster-brightness-max":new $r(mn.paint_raster["raster-brightness-max"]),"raster-saturation":new $r(mn.paint_raster["raster-saturation"]),"raster-contrast":new $r(mn.paint_raster["raster-contrast"]),"raster-resampling":new $r(mn.paint_raster["raster-resampling"]),"raster-fade-duration":new $r(mn.paint_raster["raster-fade-duration"])})},xs=function(t){function e(e){t.call(this,e,bs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(oo),ws=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender||"3d"===this.implementation.renderingMode},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t)},e}(oo),ks={circle:ba,heatmap:Ea,hillshade:Sa,fill:Ba,"fill-extrusion":Ua,line:is,symbol:gs,background:vs,raster:xs},Ts=function(t,e){var i=e.pixelRatio;this.paddedRect=t,this.pixelRatio=i},Es={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Es.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Es.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Es.tlbr.get=function(){return this.tl.concat(this.br)},Es.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ts.prototype,Es);var Ls=function(t,e){var i={},n={},r=[];for(var o in t){var a=t[o],s={x:0,y:0,w:a.data.width+2,h:a.data.height+2};r.push(s),i[o]=new Ts(s,a)}for(var l in e){var u=e[l],c={x:0,y:0,w:u.data.width+2,h:u.data.height+2};r.push(c),n[l]=new Ts(c,u)}var h=wi(r),p=h.w,f=h.h,d=new ka({width:p||1,height:f||1});for(var m in t){var _=t[m],g=i[m].paddedRect;ka.copy(_.data,d,{x:0,y:0},{x:g.x+1,y:g.y+1},_.data)}for(var y in e){var v=e[y],b=n[y].paddedRect,x=b.x+1,w=b.y+1,k=v.data.width,T=v.data.height;ka.copy(v.data,d,{x:0,y:0},{x:x,y:w},v.data),ka.copy(v.data,d,{x:0,y:T-1},{x:x,y:w-1},{width:k,height:1}),ka.copy(v.data,d,{x:0,y:0},{x:x,y:w+T},{width:k,height:1}),ka.copy(v.data,d,{x:k-1,y:0},{x:x-1,y:w},{width:1,height:T}),ka.copy(v.data,d,{x:0,y:0},{x:x+k,y:w},{width:1,height:T})}this.image=d,this.iconPositions=i,this.patternPositions=n};Vt("ImagePosition",Ts),Vt("ImageAtlas",Ls);var Ss=self.HTMLImageElement,Cs=self.HTMLCanvasElement,As=self.HTMLVideoElement,Ps=self.ImageData,Is=function(t,e,i,n){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,n)};Is.prototype.update=function(t,e){var i=t.width,n=t.height,r=!this.size||this.size[0]!==i||this.size[1]!==n,o=this.context,a=o.gl;this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!e||!1!==e.premultiply)),r?(this.size=[i,n],t instanceof Ss||t instanceof Cs||t instanceof As||t instanceof Ps?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,i,n,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof Ss||t instanceof Cs||t instanceof As||t instanceof Ps?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,i,n,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},Is.prototype.bind=function(t,e,i){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),i!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,i||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},Is.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Is.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Ms=function(t,e,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,p=i?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},zs=function(t,e,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?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),(e+=a+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,r),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;t[i+f]=255&s,f+=d,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;t[i+f]=255&a,f+=d,a/=256,u-=8);t[i+f-d]|=128*m},Rs=ki;ki.Varint=0,ki.Fixed64=1,ki.Bytes=2,ki.Fixed32=5,ki.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,t(r,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Oi(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Ni(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Oi(this.buf,this.pos)+4294967296*Oi(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=Oi(this.buf,this.pos)+4294967296*Ni(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ms(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ms(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,o=i.buf;if(r=o[i.pos++],n=(112&r)>>4,r<128)return Ei(t,n,e);if(r=o[i.pos++],n|=(127&r)<<3,r<128)return Ei(t,n,e);if(r=o[i.pos++],n|=(127&r)<<10,r<128)return Ei(t,n,e);if(r=o[i.pos++],n|=(127&r)<<17,r<128)return Ei(t,n,e);if(r=o[i.pos++],n|=(127&r)<<24,r<128)return Ei(t,n,e);if(r=o[i.pos++],n|=(1&r)<<31,r<128)return Ei(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[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=this.readVarint()+this.pos,e=function(t,e,i){for(var n="",r=e;r<i;){var o,a,s,l=t[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)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?(o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var i=Ti(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=Ti(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===ki.Varint)for(;this.buf[this.pos++]>127;);else if(e===ki.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ki.Fixed32)this.pos+=4;else{if(e!==ki.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),Di(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Di(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Di(this.buf,-1&t,this.pos),Di(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Di(this.buf,-1&t,this.pos),Di(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,n;if(t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint: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 n,r,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&Li(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),zs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),zs(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 n=this.pos-i;n>=128&&Li(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,ki.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){this.writeMessage(t,Si,e)},writePackedSVarint:function(t,e){this.writeMessage(t,Ci,e)},writePackedBoolean:function(t,e){this.writeMessage(t,Ii,e)},writePackedFloat:function(t,e){this.writeMessage(t,Ai,e)},writePackedDouble:function(t,e){this.writeMessage(t,Pi,e)},writePackedFixed32:function(t,e){this.writeMessage(t,Mi,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,zi,e)},writePackedFixed64:function(t,e){this.writeMessage(t,Ri,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,Bi,e)},writeBytesField:function(t,e){this.writeTag(t,ki.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ki.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ki.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ki.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ki.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ki.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ki.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ki.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ki.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ki.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Bs=3,Os=Bs,Ds=function(t,e,i){this.target=t,this.parent=e,this.mapId=i,this.callbacks={},this.callbackID=0,u(["receive"],this),this.target.addEventListener("message",this.receive,!1)};Ds.prototype.send=function(t,e,i,n){var r=i?this.mapId+":"+this.callbackID++:null;i&&(this.callbacks[r]=i);var o=[];this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(r),data:Zt(e,o)},o)},Ds.prototype.receive=function(t){var e,i=this,n=t.data,r=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var o=function(t,e){var n=[];i.target.postMessage({sourceMapId:i.mapId,type:"<response>",id:String(r),error:t?Zt(t):null,data:Zt(e,n)},n)};if("<response>"===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(qt(n.error)):e&&e(null,qt(n.data));else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.sourceMapId,qt(n.data),o);else if(void 0!==n.id&&this.parent.getWorkerSource){var a=n.type.split("."),s=qt(n.data);this.parent.getWorkerSource(n.sourceMapId,a[0],s.source)[a[1]](s,o)}else this.parent[n.type](qt(n.data))}},Ds.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var Ns=function(t,e,i){this.z=t,this.x=e,this.y=i,this.key=Zi(0,t,e,i)};Ns.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Ns.prototype.url=function(t,e){var i,n,r,o,a,s=(i=this.x,n=this.y,r=this.z,o=Vi(256*i,256*(n=Math.pow(2,r)-n-1),r),a=Vi(256*(i+1),256*(n+1),r),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,i){for(var n,r="",o=t;o>0;o--)r+=(e&(n=1<<o-1)?1:0)+(i&n?2:0);return r}(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)};var Fs=function(t,e){this.wrap=t,this.canonical=e,this.key=Zi(t,e.z,e.x,e.y)},js=function(t,e,i,n,r){this.overscaledZ=t,this.wrap=e,this.canonical=new Ns(i,+n,+r),this.key=Zi(e,t,n,r)};js.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},js.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new js(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new js(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},js.prototype.isChildOf=function(t){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},js.prototype.children=function(t){if(this.overscaledZ>=t)return[new js(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,n=2*this.canonical.y;return[new js(e,this.wrap,e,i,n),new js(e,this.wrap,e,i+1,n),new js(e,this.wrap,e,i,n+1),new js(e,this.wrap,e,i+1,n+1)]},js.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))},js.prototype.wrapped=function(){return new js(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},js.prototype.unwrapTo=function(t){return new js(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},js.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},js.prototype.toUnwrapped=function(){return new Fs(this.wrap,this.canonical)},js.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},js.prototype.toCoordinate=function(){return new Qi(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},Vt("CanonicalTileID",Ns),Vt("OverscaledTileID",js,{omit:["posMatrix"]});var Us=function(t,e,i){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(i&&"mapbox"!==i&&"terrarium"!==i)return d('"'+i+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var n=this.dim=e.height;this.border=Math.max(Math.ceil(e.height/2),1),this.stride=this.dim+2*this.border,this.data=new Int32Array(this.stride*this.stride);for(var r=e.data,o="terrarium"===i?this._unpackTerrarium:this._unpackMapbox,a=0;a<n;a++)for(var s=0;s<n;s++){var l=4*(a*n+s);this.set(s,a,o(r[l],r[l+1],r[l+2]))}for(var u=0;u<n;u++)this.set(-1,u,this.get(0,u)),this.set(n,u,this.get(n-1,u)),this.set(u,-1,this.get(u,0)),this.set(u,n,this.get(u,n-1));this.set(-1,-1,this.get(0,0)),this.set(n,-1,this.get(n-1,0)),this.set(-1,n,this.get(0,n-1)),this.set(n,n,this.get(n-1,n-1))};Us.prototype.set=function(t,e,i){this.data[this._idx(t,e)]=i+65536},Us.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Us.prototype._idx=function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError("out of range source coordinates for DEM data");return(e+this.border)*this.stride+(t+this.border)},Us.prototype._unpackMapbox=function(t,e,i){return(256*t*256+256*e+i)/10-1e4},Us.prototype._unpackTerrarium=function(t,e,i){return 256*t+e+i/256-32768},Us.prototype.getPixels=function(){return new ka({width:this.dim+2*this.border,height:this.dim+2*this.border},new Uint8Array(this.data.buffer))},Us.prototype.backfillBorder=function(t,e,i){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,r=e*this.dim+this.dim,o=i*this.dim,s=i*this.dim+this.dim;switch(e){case-1:n=r-1;break;case 1:r=n+1}switch(i){case-1:o=s-1;break;case 1:s=o+1}for(var l=a(n,-this.border,this.dim+this.border),u=a(r,-this.border,this.dim+this.border),c=a(o,-this.border,this.dim+this.border),h=a(s,-this.border,this.dim+this.border),p=-e*this.dim,f=-i*this.dim,d=c;d<h;d++)for(var m=l;m<u;m++)this.set(m,d,t.get(m+p,d+f))},Vt("DEMData",Us);var Vs=Xt([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Zs=function(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}};Zs.prototype.encode=function(t){return this._stringToNumber[t]},Zs.prototype.decode=function(t){return this._numberToString[t]};var qs=function(t,e,i,n){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=i,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)},Gs={geometry:{configurable:!0}};Gs.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},Gs.geometry.set=function(t){this._geometry=t},qs.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(qs.prototype,Gs);var Hs=function(){this.state={},this.stateChanges={}};Hs.prototype.updateState=function(t,e,i){var n=String(e);this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][n]=this.stateChanges[t][n]||{},s(this.stateChanges[t][n],i)},Hs.prototype.getState=function(t,e){var i=String(e);return s({},(this.state[t]||{})[i],(this.stateChanges[t]||{})[i])},Hs.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Hs.prototype.coalesceChanges=function(t,e){var i={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var r={};for(var o in this.stateChanges[n])this.state[n][o]||(this.state[n][o]={}),s(this.state[n][o],this.stateChanges[n][o]),r[o]=this.state[n][o];i[n]=r}if(this.stateChanges={},0!==Object.keys(i).length)for(var a in t)t[a].setFeatureState(i,e)};var Ws=function(t,e,i){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new Ir(ha,16,0),this.featureIndexArray=i||new Vo};Ws.prototype.insert=function(t,e,i,n,r){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);for(var a=0;a<e.length;a++){for(var s=e[a],l=[1/0,1/0,-1/0,-1/0],u=0;u<s.length;u++){var c=s[u];l[0]=Math.min(l[0],c.x),l[1]=Math.min(l[1],c.y),l[2]=Math.max(l[2],c.x),l[3]=Math.max(l[3],c.y)}l[0]<ha&&l[1]<ha&&l[2]>=0&&l[3]>=0&&this.grid.insert(o,l[0],l[1],l[2],l[3])}},Ws.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ha.VectorTile(new Rs(this.rawTileData)).layers,this.sourceLayerCoder=new Zs(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ws.prototype.query=function(t,e,i){var n=this;this.loadVTLayers();for(var r=t.params||{},o=ha/t.tileSize/t.scale,a=bt(r.filter),s=t.queryGeometry,l=t.queryPadding*o,u=1/0,c=1/0,h=-1/0,p=-1/0,f=0;f<s.length;f++)for(var d=s[f],m=0;m<d.length;m++){var _=d[m];u=Math.min(u,_.x),c=Math.min(c,_.y),h=Math.max(h,_.x),p=Math.max(p,_.y)}var g=this.grid.query(u-l,c-l,h+l,p+l);g.sort(qi);for(var y,v={},b=0;b<g.length;b++)!function(l){var u=g[l];if(u!==y){y=u;var c=n.featureIndexArray.get(u),h=null;n.loadMatchingFeature(v,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,a,r.layers,e,function(e,r){h||(h=ie(e));var a={};return e.id&&(a=i.getState(r.sourceLayer||"_geojsonTileLayer",e.id)),r.queryIntersectsFeature(s,e,a,h,n.z,t.transform,o,t.posMatrix)})}}(b);return v},Ws.prototype.loadMatchingFeature=function(t,e,i,n,r,o,a,s){var l=this.bucketLayerIDs[e];if(!o||function(t,e){for(var i=0;i<t.length;i++)if(e.indexOf(t[i])>=0)return!0;return!1}(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new qr(this.tileID.overscaledZ),c))for(var h=0;h<l.length;h++){var p=l[h];if(!(o&&o.indexOf(p)<0)){var f=a[p];if(f&&(!s||s(c,f))){var d=new qs(c,this.z,this.x,this.y);d.layer=f.serialize();var m=t[p];void 0===m&&(m=t[p]=[]),m.push({featureIndex:n,feature:d})}}}}},Ws.prototype.lookupSymbolFeatures=function(t,e,i,n,r,o){var a={};this.loadVTLayers();for(var s=bt(n),l=0,u=t;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,e,i,c,s,r,o)}return a},Ws.prototype.hasLayer=function(t){for(var e=0,i=this.bucketLayerIDs;e<i.length;e+=1)for(var n=0,r=i[e];n<r.length;n+=1)if(t===r[n])return!0;return!1},Vt("FeatureIndex",Ws,{omit:["rawTileData","sourceLayerCoder"]});var Ks=function(t,e){this.tileID=t,this.uid=l(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.expiredRequestCount=0,this.state="loading"};Ks.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<sn.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Ks.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Ks.prototype.loadVectorData=function(t,e,i){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var n 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 n=0,r=t;n<r.length;n+=1){var o=r[n],a=o.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==a.length){o.layers=a,o.stateDependentLayers=a.filter(function(t){return t.isStateDependent()});for(var s=0,l=a;s<l.length;s+=1)i[l[s].id]=o}}return i}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var r=this.buckets[n];if(r instanceof ds){if(this.hasSymbolBuckets=!0,!i)break;r.justReloaded=!0}}for(var o in this.queryPadding=0,this.buckets){var a=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(o).queryRadius(a))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new Mo},Ks.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"},Ks.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},Ks.prototype.getBucket=function(t){return this.buckets[t.id]},Ks.prototype.upload=function(t){for(var e in this.buckets){var i=this.buckets[e];i.uploadPending()&&i.upload(t)}var n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Is(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Is(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},Ks.prototype.queryRenderedFeatures=function(t,e,i,n,r,o,a,s){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,scale:n,tileSize:this.tileSize,posMatrix:s,transform:o,params:r,queryPadding:this.queryPadding*a},t,e):{}},Ks.prototype.querySourceFeatures=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var i=this.latestFeatureIndex.loadVTLayers(),n=e?e.sourceLayer:"",r=i._geojsonTileLayer||i[n];if(r)for(var o=bt(e&&e.filter),a=this.tileID.canonical,s=a.z,l=a.x,u=a.y,c={z:s,x:l,y:u},h=0;h<r.length;h++){var p=r.feature(h);if(o(new qr(this.tileID.overscaledZ),p)){var f=new qs(p,s,l,u);f.tile=c,t.push(f)}}}},Ks.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},Ks.prototype.setMask=function(t,e){if(!r(this.mask,t)&&(this.mask=t,this.clearMask(),!r(t,{0:!0}))){var i=new co,n=new Lo;this.segments=new Go,this.segments.prepareSegment(0,i,n);for(var o=Object.keys(t),a=0;a<o.length;a++){var s=t[o[a]],l=ha>>s.z,u=new $i(s.x*l,s.y*l),c=new $i(u.x+l,u.y+l),h=this.segments.prepareSegment(4,i,n);i.emplaceBack(u.x,u.y,u.x,u.y),i.emplaceBack(c.x,u.y,c.x,u.y),i.emplaceBack(u.x,c.y,u.x,c.y),i.emplaceBack(c.x,c.y,c.x,c.y);var p=h.vertexLength;n.emplaceBack(p,p+1,p+2),n.emplaceBack(p+1,p+2,p+3),h.vertexLength+=4,h.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(i,Vs.members),this.maskedIndexBuffer=e.createIndexBuffer(n)}},Ks.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Ks.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Ks.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var i=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,i,n,r){var o=n||r;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}(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 n=Date.now(),r=!1;if(this.expirationTime>n)r=!1;else if(e)if(this.expirationTime<e)r=!0;else{var o=this.expirationTime-e;o?this.expirationTime=n+Math.max(o,3e4):r=!0}else r=!0;r?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Ks.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)},Ks.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var i=this.latestFeatureIndex.loadVTLayers();for(var n in this.buckets){var r=this.buckets[n],o=r.layers[0].sourceLayer||"_geojsonTileLayer",a=i[o],s=t[o];a&&s&&0!==Object.keys(s).length&&(r.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{}),e&&e.style&&(this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(n).queryRadius(r))))}}},Ks.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},Ks.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<sn.now()},Ks.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Ks.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=sn.now()+t};var Js={horizontal:1,vertical:2,horizontalOnly:3},Xs=function(){this.text="",this.sectionIndex=[],this.sections=[]};Xs.fromFeature=function(t,e){for(var i=new Xs,n=0;n<t.sections.length;n++){var r=t.sections[n];i.sections.push({scale:r.scale||1,fontStack:r.fontStack||e}),i.text+=r.text;for(var o=0;o<r.text.length;o++)i.sectionIndex.push(n)}return i},Xs.prototype.length=function(){return this.text.length},Xs.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},Xs.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},Xs.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",i=0;i<t.length;i++){var n=t.charCodeAt(i+1)||null,r=t.charCodeAt(i-1)||null;n&&Kt(n)&&!ls[t[i+1]]||r&&Kt(r)&&!ls[t[i-1]]||!ls[t[i]]?e+=t[i]:e+=ls[t[i]]}return e}(this.text)},Xs.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&Ys[this.text.charCodeAt(e)];e++)t++;for(var i=this.text.length,n=this.text.length-1;n>=0&&n>=t&&Ys[this.text.charCodeAt(n)];n--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)},Xs.prototype.substring=function(t,e){var i=new Xs;return i.text=this.text.substring(t,e),i.sectionIndex=this.sectionIndex.slice(t,e),i.sections=this.sections,i},Xs.prototype.toString=function(){return this.text},Xs.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,i){return Math.max(e,t.sections[i].scale)},0)};var Ys={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Qs={};Qs[10]=!0,Qs[32]=!0,Qs[38]=!0,Qs[40]=!0,Qs[41]=!0,Qs[43]=!0,Qs[45]=!0,Qs[47]=!0,Qs[173]=!0,Qs[183]=!0,Qs[8203]=!0,Qs[8208]=!0,Qs[8211]=!0,Qs[8231]=!0,t.createCommonjsModule=e,t.Point=$i,t.window=self,t.browser=sn,t.uuid=function(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()},t.validateUuid=function(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)},t.storageAvailable=function(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}},t.warnOnce=d,t.postData=function(t,e,i){var n=g(s(t,{method:"POST"}));return n.onerror=function(){i(new Error(n.statusText))},n.onload=function(){n.status>=200&&n.status<300?i(null,n.response):i(new cn(n.statusText,n.status,t.url))},n.send(e),{cancel:function(){return n.abort()}}},t.getJSON=function(t,e){var i=g(t);return i.setRequestHeader("Accept","application/json"),i.onerror=function(){e(new Error(i.statusText))},i.onload=function(){if((i.status>=200&&i.status<300||0===i.status)&&i.response){var n;try{n=JSON.parse(i.response)}catch(t){return e(t)}e(null,n)}else e(401===i.status&&t.url.match(/mapbox.com/)?new cn(i.statusText+": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens",i.status,t.url):new cn(i.statusText,i.status,t.url))},i.send(),{cancel:function(){return i.abort()}}},t.getImage=function(t,e){return hn(t,function(t,i){if(t)e(t);else if(i){var n=new self.Image,r=self.URL||self.webkitURL;n.onload=function(){e(null,n),r.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 o=new self.Blob([new Uint8Array(i.data)],{type:"image/png"});n.cacheControl=i.cacheControl,n.expires=i.expires,n.src=i.data.byteLength?r.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},t.ResourceType=un,t.RGBAImage=ka,t.potpack=wi,t.ImagePosition=Ts,t.Texture=Is,t.getArrayBuffer=hn,t.parseGlyphPBF=function(t){return new Rs(t).readFields(Fi,[])},t.isChar=Nr,t.asyncAll=function(t,e,i){if(!t.length)return i(null,[]);var n=t.length,r=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),r[a]=e,0==--n&&i(o,r)})})},t.AlphaImage=wa,t.styleSpec=mn,t.endsWith=c,t.extend=s,t.sphericalToCartesian=function(t){var e=t[0],i=t[1],n=t[2];return i+=90,i*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(i)*Math.sin(n),y:e*Math.sin(i)*Math.sin(n),z:e*Math.cos(n)}},t.Evented=dn,t.validateStyle=Sr,t.validateLight=Cr,t.emitValidationErrors=jt,t.Color=Pn,t.number=R,t.Properties=ro,t.Transitionable=Wr,t.Transitioning=Jr,t.PossiblyEvaluated=Qr,t.DataConstantProperty=$r,t.uniqueId=l,t.Actor=Ds,t.pick=function(t,e){for(var i={},n=0;n<e.length;n++){var r=e[n];r in t&&(i[r]=t[r])}return i},t.wrap=function(t,e,i){var n=i-e,r=((t-e)%n+n)%n+e;return r===e?i:r},t.clamp=a,t.Event=pn,t.ErrorEvent=fn,t.OverscaledTileID=js,t.EXTENT=ha,t.getCoordinatesCenter=function(t){for(var e=1/0,i=1/0,n=-1/0,r=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),i=Math.min(i,t[o].row),n=Math.max(n,t[o].column),r=Math.max(r,t[o].row);var a=n-e,s=r-i,l=Math.max(a,s),u=Math.max(0,Math.floor(-Math.log(l)/Math.LN2));return new Qi((e+n)/2,(i+r)/2,0).zoomTo(u)},t.CanonicalTileID=Ns,t.StructArrayLayout4i8=co,t.rasterBoundsAttributes=Vs,t.SegmentVector=Go,t.getVideo=function(t,e){var i,n,r=self.document.createElement("video");r.muted=!0,r.onloadstart=function(){e(null,r)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");i=t[o],n=void 0,(n=self.document.createElement("a")).href=i,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&&(r.crossOrigin="Anonymous"),a.src=t[o],r.appendChild(a)}return{cancel:function(){}}},t.ValidationError=_n,t.bindAll=u,t.isEqual=r,t.Tile=Ks,t.Coordinate=Qi,t.keysDifference=function(t,e){var i=[];for(var n in t)n in e||i.push(n);return i},t.SourceFeatureState=Hs,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.create=function(){var t=new ma(16);return ma!=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.identity=function(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},t.invert=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],m=e[13],_=e[14],g=e[15],y=i*s-n*a,v=i*l-r*a,b=i*u-o*a,x=n*l-r*s,w=n*u-o*s,k=r*u-o*l,T=c*m-h*d,E=c*_-p*d,L=c*g-f*d,S=h*_-p*m,C=h*g-f*m,A=p*g-f*_,P=y*A-v*C+b*S+x*L-w*E+k*T;return P?(P=1/P,t[0]=(s*A-l*C+u*S)*P,t[1]=(r*C-n*A-o*S)*P,t[2]=(m*k-_*w+g*x)*P,t[3]=(p*w-h*k-f*x)*P,t[4]=(l*L-a*A-u*E)*P,t[5]=(i*A-r*L+o*E)*P,t[6]=(_*b-d*k-g*v)*P,t[7]=(c*k-p*b+f*v)*P,t[8]=(a*C-s*L+u*T)*P,t[9]=(n*L-i*C-o*T)*P,t[10]=(d*w-m*b+g*y)*P,t[11]=(h*b-c*w-f*y)*P,t[12]=(s*E-a*S-l*T)*P,t[13]=(i*S-n*E+r*T)*P,t[14]=(m*v-d*x-_*y)*P,t[15]=(c*x-h*v+p*y)*P,t):null},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],m=e[12],_=e[13],g=e[14],y=e[15],v=i[0],b=i[1],x=i[2],w=i[3];return t[0]=v*n+b*s+x*h+w*m,t[1]=v*r+b*l+x*p+w*_,t[2]=v*o+b*u+x*f+w*g,t[3]=v*a+b*c+x*d+w*y,v=i[4],b=i[5],x=i[6],w=i[7],t[4]=v*n+b*s+x*h+w*m,t[5]=v*r+b*l+x*p+w*_,t[6]=v*o+b*u+x*f+w*g,t[7]=v*a+b*c+x*d+w*y,v=i[8],b=i[9],x=i[10],w=i[11],t[8]=v*n+b*s+x*h+w*m,t[9]=v*r+b*l+x*p+w*_,t[10]=v*o+b*u+x*f+w*g,t[11]=v*a+b*c+x*d+w*y,v=i[12],b=i[13],x=i[14],w=i[15],t[12]=v*n+b*s+x*h+w*m,t[13]=v*r+b*l+x*p+w*_,t[14]=v*o+b*u+x*f+w*g,t[15]=v*a+b*c+x*d+w*y,t},t.translate=function(t,e,i){var n=i[0],r=i[1],o=i[2],a=void 0,s=void 0,l=void 0,u=void 0,c=void 0,h=void 0,p=void 0,f=void 0,d=void 0,m=void 0,_=void 0,g=void 0;return e===t?(t[12]=e[0]*n+e[4]*r+e[8]*o+e[12],t[13]=e[1]*n+e[5]*r+e[9]*o+e[13],t[14]=e[2]*n+e[6]*r+e[10]*o+e[14],t[15]=e[3]*n+e[7]*r+e[11]*o+e[15]):(a=e[0],s=e[1],l=e[2],u=e[3],c=e[4],h=e[5],p=e[6],f=e[7],d=e[8],m=e[9],_=e[10],g=e[11],t[0]=a,t[1]=s,t[2]=l,t[3]=u,t[4]=c,t[5]=h,t[6]=p,t[7]=f,t[8]=d,t[9]=m,t[10]=_,t[11]=g,t[12]=a*n+c*r+d*o+e[12],t[13]=s*n+h*r+m*o+e[13],t[14]=l*n+p*r+_*o+e[14],t[15]=u*n+f*r+g*o+e[15]),t},t.scale=function(t,e,i){var n=i[0],r=i[1],o=i[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,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.rotateX=function(t,e,i){var n=Math.sin(i),r=Math.cos(i),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],p=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*r+u*n,t[5]=a*r+c*n,t[6]=s*r+h*n,t[7]=l*r+p*n,t[8]=u*r-o*n,t[9]=c*r-a*n,t[10]=h*r-s*n,t[11]=p*r-l*n,t},t.rotateZ=function(t,e,i){var n=Math.sin(i),r=Math.cos(i),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],p=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*r+u*n,t[1]=a*r+c*n,t[2]=s*r+h*n,t[3]=l*r+p*n,t[4]=u*r-o*n,t[5]=c*r-a*n,t[6]=h*r-s*n,t[7]=p*r-l*n,t},t.perspective=function(t,e,i,n,r){var o=1/Math.tan(e/2),a=void 0;return t[0]=o/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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!=r&&r!==1/0?(a=1/(n-r),t[10]=(r+n)*a,t[14]=2*r*n*a):(t[10]=-1,t[14]=-2*n),t},t.ortho=function(t,e,i,n,r,o,a){var s=1/(e-i),l=1/(n-r),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]=(r+n)*l,t[14]=(a+o)*u,t[15]=1,t},t.create$1=Te,t.normalize=Ee,t.transformMat4=Le,t.forEach=va,t.getSizeData=vi,t.evaluateSizeForFeature=function(t,e,i){var n=e;return"source"===t.functionType?i.lowerSize/256:"composite"===t.functionType?R(i.lowerSize/256,i.upperSize/256,n.uSizeT):n.uSize},t.evaluateSizeForZoom=function(t,e,i){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var n=t.propertyValue,r=t.zoomRange,o=t.sizeRange,s=a(pt(n,i.specification).interpolationFactor(e,r.min,r.max),0,1);return{uSizeT:0,uSize:o.min+s*(o.max-o.min)}}var l=t.propertyValue,u=t.zoomRange;return{uSizeT:a(pt(l,i.specification).interpolationFactor(e,u.min,u.max),0,1),uSize:0}},t.SIZE_PACK_FACTOR=256,t.addDynamicAttributes=xi,t.properties=_s,t.WritingMode=Js,t.multiPolygonIntersectsBufferedPoint=re,t.multiPolygonIntersectsMultiPolygon=oe,t.multiPolygonIntersectsBufferedMultiLine=ae,t.polygonIntersectsPolygon=function(t,e){for(var i=0;i<t.length;i++)if(fe(e,t[i]))return!0;for(var n=0;n<e.length;n++)if(fe(t,e[n]))return!0;return!!le(t,e)},t.distToSegmentSquared=he,t.SymbolInstanceArray=Oo,t.StyleLayer=oo,t.createStyleLayer=function(t){return"custom"===t.type?new ws(t):new ks[t.type](t)},t.clone=f,t.filterObject=p,t.mapObject=h,t.registerForPluginAvailability=function(t){return jr?t({pluginURL:jr,completionCallback:Dr}):Vr.once("pluginAvailable",t),t},t.evented=Vr,t.ZoomHistory=Or,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.createLayout=Xt,t.ProgramConfiguration=la,t.Uniform1i=Jo,t.Uniform1f=Xo,t.Uniform2f=Yo,t.Uniform4f=$o,t.Uniform3f=Qo,t.UniformMatrix4f=ia,t.create$2=ge,t.fromRotation=function(t,e){var i=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.create$3=ye,t.length=ve,t.fromValues=be,t.normalize$1=xe,t.dot=we,t.cross=ke,t.transformMat3=function(t,e,i){var n=e[0],r=e[1],o=e[2];return t[0]=n*i[0]+r*i[3]+o*i[6],t[1]=n*i[1]+r*i[4]+o*i[7],t[2]=n*i[2]+r*i[5]+o*i[8],t},t.len=ga,t.forEach$1=ya,t.UniformColor=ta,t.StructArrayLayout2i4=uo,t.StructArrayLayout2ui4=So,t.StructArrayLayout3ui6=Lo,t.StructArrayLayout1ui2=Co,t.UnwrappedTileID=Fs,t.create$4=function(){var t=new ma(4);return ma!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.rotate=function(t,e,i){var n=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l+o*s,t[1]=r*l+a*s,t[2]=n*-s+o*l,t[3]=r*-s+a*l,t},t.ease=tn,t.bezier=o,t.EvaluationParameters=qr,t.setRTLTextPlugin=function(t,e){if(Fr)throw new Error("setRTLTextPlugin cannot be called multiple times.");Fr=!0,jr=sn.resolveURL(t),Dr=function(t){t?(Fr=!1,jr=null,e&&e(t)):Ur=!0},Vr.fire(new pn("pluginAvailable",{pluginURL:jr,completionCallback:Dr}))},t.values=function(t){var e=[];for(var i in t)e.push(t[i]);return e},t.featureFilter=bt,t.Anchor=us,t.GLYPH_PBF_BORDER=Os,t.shapeText=function(t,e,i,n,r,o,a,s,l,u,c){var h=Xs.fromFeature(t,i);c===Js.vertical&&h.verticalizePunctuation();var p,f=[],d={positionedGlyphs:f,text:h,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:c},m=Zr.processBidirectionalText,_=Zr.processStyledBidirectionalText;if(m&&1===h.sections.length){p=[];for(var g=0,y=m(h.toString(),Ki(h,s,n,e));g<y.length;g+=1){var v=y[g],b=new Xs;b.text=v,b.sections=h.sections;for(var x=0;x<v.length;x++)b.sectionIndex.push(0);p.push(b)}}else if(_){p=[];for(var w=0,k=_(h.text,h.sectionIndex,Ki(h,s,n,e));w<k.length;w+=1){var T=k[w],E=new Xs;E.text=T[0],E.sectionIndex=T[1],E.sections=h.sections,p.push(E)}}else p=function(t,e){for(var i=[],n=t.text,r=0,o=0,a=e;o<a.length;o+=1){var s=a[o];i.push(t.substring(r,s)),r=s}return r<n.length&&i.push(t.substring(r,n.length)),i}(h,Ki(h,s,n,e));return function(t,e,i,n,r,o,a,s,l){for(var u=0,c=-17,h=0,p=t.positionedGlyphs,f="right"===o?1:"left"===o?0:.5,d=0,m=i;d<m.length;d+=1){var _=m[d];_.trim();var g=_.getMaxScale();if(_.length()){for(var y=p.length,v=0;v<_.length();v++){var b=_.getSection(v),x=_.getCharCode(v),w=24*(g-b.scale),k=e[b.fontStack],T=k&&k[x];T&&(Wt(x)&&a!==Js.horizontal?(p.push({glyph:x,x:u,y:w,vertical:!0,scale:b.scale,fontStack:b.fontStack}),u+=l*b.scale+s):(p.push({glyph:x,x:u,y:c+w,vertical:!1,scale:b.scale,fontStack:b.fontStack}),u+=T.metrics.advance*b.scale+s))}if(p.length!==y){var E=u-s;h=Math.max(E,h),Xi(p,e,y,p.length-1,f)}u=0,c+=n*g}else c+=n}var L=Ji(r),S=L.horizontalAlign,C=L.verticalAlign;!function(t,e,i,n,r,o,a){for(var s=(e-i)*r,l=(-n*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}(p,f,S,C,h,n,i.length);var A=c- -17;t.top+=-C*A,t.bottom=t.top+A,t.left+=-S*h,t.right=t.left+h}(d,e,p,r,o,a,c,s,u),!!f.length&&(d.text=d.text.toString(),d)},t.shapeIcon=function(t,e,i){var n=Ji(i),r=n.horizontalAlign,o=n.verticalAlign,a=e[0],s=e[1],l=a-t.displaySize[0]*r,u=l+t.displaySize[0],c=s-t.displaySize[1]*o;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}},t.allowsVerticalWritingMode=Gt,t.allowsLetterSpacing=function(t){for(var e=0,i=t;e<i.length;e+=1)if(!Ht(i[e].charCodeAt(0)))return!1;return!0},t.classifyRings=ii,t.SymbolBucket=ds,t.register=Vt,t.FeatureIndex=Ws,t.CollisionBoxArray=Mo,t.DictionaryCoder=Zs,t.LineBucket=Qa,t.FillBucket=za,t.FillExtrusionBucket=Fa,t.ImageAtlas=Ls,t.mvt=Ha,t.Protobuf=Rs,t.DEMData=Us,t.vectorTile=Ha,t.Point$1=$i,t.pbf=Rs,t.plugin=Zr}),t(["./shared.js"],function(t){function e(t){var i=typeof t;if("number"===i||"boolean"===i||"string"===i||void 0===t||null===t)return JSON.stringify(t);if(Array.isArray(t)){for(var n="[",r=0,o=t;r<o.length;r+=1)n+=e(o[r])+",";return n+"]"}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 n="",r=0,o=t.refProperties;r<o.length;r+=1)n+="/"+e(i[o[r]]);return n}function n(t,e,i,n,r){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-i/2;){if(--a<0)return!1;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-1],h=t[a],p=t[a+1];if(!p)return!1;var f=c.angleTo(h)-h.angleTo(p);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=h.dist(p)}return!0}function r(t){for(var e=0,i=0;i<t.length-1;i++)e+=t[i].dist(t[i+1]);return e}function o(t,e,i){return t?.6*e*i:0}function a(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function s(e,i,s,l,u,c){for(var h=o(s,u,c),p=a(s,l)*c,f=0,d=r(e)/2,m=0;m<e.length-1;m++){var _=e[m],g=e[m+1],y=_.dist(g);if(f+y>d){var v=(d-f)/y,b=t.number(_.x,g.x,v),x=t.number(_.y,g.y,v),w=new t.Anchor(b,x,g.angleTo(_),m);return w._round(),!h||n(e,w,p,h,i)?w:void 0}f+=y}}function l(e,i,s,l,u,c,h,p,f){var d=o(l,c,h),m=a(l,u),_=m*h,g=0===e[0].x||e[0].x===f||0===e[0].y||e[0].y===f;return i-_<i/4&&(i=_+i/4),function e(i,o,a,s,l,u,c,h,p){for(var f=u/2,d=r(i),m=0,_=o-a,g=[],y=0;y<i.length-1;y++){for(var v=i[y],b=i[y+1],x=v.dist(b),w=b.angleTo(v);_+a<m+x;){var k=((_+=a)-m)/x,T=t.number(v.x,b.x,k),E=t.number(v.y,b.y,k);if(T>=0&&T<p&&E>=0&&E<p&&_-f>=0&&_+f<=d){var L=new t.Anchor(T,E,w,y);L._round(),s&&!n(i,L,u,s,l)||g.push(L)}}m+=x}return h||g.length||c||(g=e(i,m/2,a,s,l,u,c,!0,p)),g}(e,g?i/2*p%i:(m/2+2*c)*h*p%i,i,d,s,_,g,!1,f)}function u(t,e){if(!(this instanceof u))return new u(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||c,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)}function c(t,e){return t<e?-1:t>e?1:0}function h(e,i,n){void 0===i&&(i=1),void 0===n&&(n=!1);for(var r=1/0,o=1/0,a=-1/0,s=-1/0,l=e[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 h=a-r,d=s-o,m=Math.min(h,d),_=m/2,g=new Ct(null,p);if(0===m)return new t.Point(r,o);for(var y=r;y<a;y+=m)for(var v=o;v<s;v+=m)g.push(new f(y+_,v+_,_,e));for(var b=function(t){for(var e=0,i=0,n=0,r=t[0],o=0,a=r.length,s=a-1;o<a;s=o++){var l=r[o],u=r[s],c=l.x*u.y-u.x*l.y;i+=(l.x+u.x)*c,n+=(l.y+u.y)*c,e+=3*c}return new f(i/e,n/e,0,t)}(e),x=g.length;g.length;){var w=g.pop();(w.d>b.d||!b.d)&&(b=w,n&&console.log("found best %d after %d probes",Math.round(1e4*w.d)/1e4,x)),w.max-b.d<=i||(_=w.h/2,g.push(new f(w.p.x-_,w.p.y-_,_,e)),g.push(new f(w.p.x+_,w.p.y-_,_,e)),g.push(new f(w.p.x-_,w.p.y+_,_,e)),g.push(new f(w.p.x+_,w.p.y+_,_,e)),x+=4)}return n&&(console.log("num probes: "+x),console.log("best distance: "+b.d)),b.p}function p(t,e){return e.max-t.max}function f(e,i,n,r){this.p=new t.Point(e,i),this.h=n,this.d=function(e,i){for(var n=!1,r=1/0,o=0;o<i.length;o++)for(var a=i[o],s=0,l=a.length,u=l-1;s<l;u=s++){var c=a[s],h=a[u];c.y>e.y!=h.y>e.y&&e.x<(h.x-c.x)*(e.y-c.y)/(h.y-c.y)+c.x&&(n=!n),r=Math.min(r,t.distToSegmentSquared(e,c,h))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}function d(e,i,n,r,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=t.EXTENT/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,u=e.layers[0]._unevaluatedLayout._values,c={};if("composite"===e.textSizeData.functionType){var h=e.textSizeData.zoomRange,p=h.min,f=h.max;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new t.EvaluationParameters(p)),u["text-size"].possiblyEvaluate(new t.EvaluationParameters(f))]}if("composite"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,_=d.min,g=d.max;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(_)),u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(g))]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),c.textMaxSize=u["text-size"].possiblyEvaluate(new t.EvaluationParameters(18));for(var y=24*l.get("text-line-height"),v="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),b=l.get("text-keep-upright"),x=0,w=e.features;x<w.length;x+=1){var k=w[x],T=l.get("text-font").evaluate(k,{}).join(","),E=n,L={},S=k.text;if(S){var C=S.toString(),A=l.get("text-offset").evaluate(k,{}).map(function(t){return 24*t}),P=24*l.get("text-letter-spacing").evaluate(k,{}),I=t.allowsLetterSpacing(C)?P:0,M=l.get("text-anchor").evaluate(k,{}),z=l.get("text-justify").evaluate(k,{}),R="point"===l.get("symbol-placement")?24*l.get("text-max-width").evaluate(k,{}):0;L.horizontal=t.shapeText(S,i,T,R,y,M,z,I,A,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(C)&&v&&b&&(L.vertical=t.shapeText(S,i,T,R,y,M,z,I,A,24,t.WritingMode.vertical))}var B=void 0;if(k.icon){var O=r[k.icon];O&&(B=t.shapeIcon(o[k.icon],l.get("icon-offset").evaluate(k,{}),l.get("icon-anchor").evaluate(k,{})),void 0===e.sdfIcons?e.sdfIcons=O.sdf:e.sdfIcons!==O.sdf&&t.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),O.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(L.horizontal||B)&&m(e,k,L,B,E,c)}a&&e.generateCollisionDebugBuffers()}function m(e,i,n,r,o,a){var u=a.layoutTextSize.evaluate(i,{}),c=a.layoutIconSize.evaluate(i,{}),p=a.textMaxSize.evaluate(i,{});void 0===p&&(p=u);var f=e.layers[0].layout,d=f.get("text-offset").evaluate(i,{}),m=f.get("icon-offset").evaluate(i,{}),y=u/24,v=e.tilePixelRatio*y,b=e.tilePixelRatio*p/24,x=e.tilePixelRatio*c,w=e.tilePixelRatio*f.get("symbol-spacing"),k=f.get("text-padding")*e.tilePixelRatio,T=f.get("icon-padding")*e.tilePixelRatio,E=f.get("text-max-angle")/180*Math.PI,L="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),S="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),C=f.get("symbol-placement"),A=w/2,P=function(s,l){l.x<0||l.x>=t.EXTENT||l.y<0||l.y>=t.EXTENT||function(e,i,n,r,o,a,s,l,u,c,h,p,f,d,m,g,y,v,b,x,w){var k,T,E=e.addToLineVertexArray(i,n),L=0,S=0,C=0,A=It(r.horizontal?r.horizontal.text:""),P=[];if(r.horizontal){var I=a.layout.get("text-rotate").evaluate(b,{});k=new St(s,n,i,l,u,c,r.horizontal,h,p,f,e.overscaling,I),S+=_(e,i,r.horizontal,a,f,b,d,E,r.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,P,x,w),r.vertical&&(C+=_(e,i,r.vertical,a,f,b,d,E,t.WritingMode.vertical,P,x,w))}var M=k?k.boxStartIndex:e.collisionBoxArray.length,z=k?k.boxEndIndex:e.collisionBoxArray.length;if(o){var R=function(e,i,n,r,o,a){var s,l,u,c,h=i.image,p=n.layout,f=i.top-1/h.pixelRatio,d=i.left-1/h.pixelRatio,m=i.bottom+1/h.pixelRatio,_=i.right+1/h.pixelRatio;if("none"!==p.get("icon-text-fit")&&o){var g=_-d,y=m-f,v=p.get("text-size").evaluate(a,{})/24,b=o.left*v,x=o.right*v,w=o.top*v,k=x-b,T=o.bottom*v-w,E=p.get("icon-text-fit-padding")[0],L=p.get("icon-text-fit-padding")[1],S=p.get("icon-text-fit-padding")[2],C=p.get("icon-text-fit-padding")[3],A="width"===p.get("icon-text-fit")?.5*(T-y):0,P="height"===p.get("icon-text-fit")?.5*(k-g):0,I="width"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?k:g,M="height"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?T:y;s=new t.Point(b+P-C,w+A-E),l=new t.Point(b+P+L+I,w+A-E),u=new t.Point(b+P+L+I,w+A+S+M),c=new t.Point(b+P-C,w+A+S+M)}else s=new t.Point(d,f),l=new t.Point(_,f),u=new t.Point(_,m),c=new t.Point(d,m);var z=n.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(z){var R=Math.sin(z),B=Math.cos(z),O=[B,-R,R,B];s._matMult(O),l._matMult(O),c._matMult(O),u._matMult(O)}return[{tl:s,tr:l,bl:c,br:u,tex:h.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,r.horizontal,b),B=a.layout.get("icon-rotate").evaluate(b,{});T=new St(s,n,i,l,u,c,o,m,g,!1,e.overscaling,B),L=4*R.length;var O=e.iconSizeData,D=null;"source"===O.functionType?(D=[t.SIZE_PACK_FACTOR*a.layout.get("icon-size").evaluate(b,{})])[0]>Rt&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===O.functionType&&((D=[t.SIZE_PACK_FACTOR*w.compositeIconSizes[0].evaluate(b,{}),t.SIZE_PACK_FACTOR*w.compositeIconSizes[1].evaluate(b,{})])[0]>Rt||D[1]>Rt)&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,R,D,v,y,b,!1,i,E.lineStartIndex,E.lineLength)}var N=T?T.boxStartIndex:e.collisionBoxArray.length,F=T?T.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=t.SymbolBucket.MAX_GLYPHS&&t.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(i.x,i.y,P.length>0?P[0]:-1,P.length>1?P[1]:-1,A,M,z,N,F,l,S,C,L,0)}(e,l,s,n,r,e.layers[0],e.collisionBoxArray,i.index,i.sourceLayerIndex,e.index,v,k,L,d,x,T,S,m,i,o,a)};if("line"===C)for(var I=0,M=function(e,i,n,r,o){for(var a=[],s=0;s<e.length;s++)for(var l=e[s],u=void 0,c=0;c<l.length-1;c++){var h=l[c],p=l[c+1];h.x<0&&p.x<0||(h.x<0?h=new t.Point(0,h.y+(p.y-h.y)*((0-h.x)/(p.x-h.x)))._round():p.x<0&&(p=new t.Point(0,h.y+(p.y-h.y)*((0-h.x)/(p.x-h.x)))._round()),h.y<0&&p.y<0||(h.y<0?h=new t.Point(h.x+(p.x-h.x)*((0-h.y)/(p.y-h.y)),0)._round():p.y<0&&(p=new t.Point(h.x+(p.x-h.x)*((0-h.y)/(p.y-h.y)),0)._round()),h.x>=r&&p.x>=r||(h.x>=r?h=new t.Point(r,h.y+(p.y-h.y)*((r-h.x)/(p.x-h.x)))._round():p.x>=r&&(p=new t.Point(r,h.y+(p.y-h.y)*((r-h.x)/(p.x-h.x)))._round()),h.y>=o&&p.y>=o||(h.y>=o?h=new t.Point(h.x+(p.x-h.x)*((o-h.y)/(p.y-h.y)),o)._round():p.y>=o&&(p=new t.Point(h.x+(p.x-h.x)*((o-h.y)/(p.y-h.y)),o)._round()),u&&h.equals(u[u.length-1])||(u=[h],a.push(u)),u.push(p)))))}return a}(i.geometry,0,0,t.EXTENT,t.EXTENT);I<M.length;I+=1)for(var z=M[I],R=0,B=l(z,w,E,n.vertical||n.horizontal,r,24,b,e.overscaling,t.EXTENT);R<B.length;R+=1){var O=B[R],D=n.horizontal;D&&g(e,D.text,A,O)||P(z,O)}else if("line-center"===C)for(var N=0,F=i.geometry;N<F.length;N+=1){var j=F[N];if(j.length>1){var U=s(j,E,n.vertical||n.horizontal,r,24,b);U&&P(j,U)}}else if("Polygon"===i.type)for(var V=0,Z=t.classifyRings(i.geometry,0);V<Z.length;V+=1){var q=Z[V],G=h(q,16);P(q[0],new t.Anchor(G.x,G.y,0))}else if("LineString"===i.type)for(var H=0,W=i.geometry;H<W.length;H+=1){var K=W[H];P(K,new t.Anchor(K[0].x,K[0].y,0))}else if("Point"===i.type)for(var J=0,X=i.geometry;J<X.length;J+=1)for(var Y=0,Q=X[J];Y<Q.length;Y+=1){var $=Q[Y];P([$],new t.Anchor($.x,$.y,0))}}function _(e,i,n,r,o,a,s,l,u,c,h,p){var f=function(e,i,n,r,o,a){for(var s=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,l=n.layout.get("text-offset").evaluate(o,{}).map(function(t){return 24*t}),u=i.positionedGlyphs,c=[],h=0;h<u.length;h++){var p=u[h],f=a[p.fontStack],d=f&&f[p.glyph];if(d){var m=d.rect;if(m){var _=t.GLYPH_PBF_BORDER+1,g=d.metrics.advance*p.scale/2,y=r?[p.x+g,p.y]:[0,0],v=r?[0,0]:[p.x+g+l[0],p.y+l[1]],b=(d.metrics.left-_)*p.scale-g+v[0],x=(-d.metrics.top-_)*p.scale+v[1],w=b+m.w*p.scale,k=x+m.h*p.scale,T=new t.Point(b,x),E=new t.Point(w,x),L=new t.Point(b,k),S=new t.Point(w,k);if(r&&p.vertical){var C=new t.Point(-g,g),A=-Math.PI/2,P=new t.Point(5,0);T._rotateAround(A,C)._add(P),E._rotateAround(A,C)._add(P),L._rotateAround(A,C)._add(P),S._rotateAround(A,C)._add(P)}if(s){var I=Math.sin(s),M=Math.cos(s),z=[M,-I,I,M];T._matMult(z),E._matMult(z),L._matMult(z),S._matMult(z)}c.push({tl:T,tr:E,bl:L,br:S,tex:m,writingMode:i.writingMode,glyphOffset:y})}}}return c}(0,n,r,o,a,h),d=e.textSizeData,m=null;return"source"===d.functionType?(m=[t.SIZE_PACK_FACTOR*r.layout.get("text-size").evaluate(a,{})])[0]>Rt&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===d.functionType&&((m=[t.SIZE_PACK_FACTOR*p.compositeTextSizes[0].evaluate(a,{}),t.SIZE_PACK_FACTOR*p.compositeTextSizes[1].evaluate(a,{})])[0]>Rt||m[1]>Rt)&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,f,m,s,o,a,u,i,l.lineStartIndex,l.lineLength),c.push(e.text.placedSymbolArray.length-1),4*f.length}function g(t,e,i,n){var r=t.compareText;if(e in r){for(var o=r[e],a=o.length-1;a>=0;a--)if(n.dist(o[a])<i)return!0}else r[e]=[];return r[e].push(n),!1}function y(e,i){for(var n=new t.EvaluationParameters(i),r=0,o=e;r<o.length;r+=1)o[r].recalculate(n)}function v(e,i){var n=t.getArrayBuffer(e.request,function(e,n){e?i(e):n&&i(null,{vectorTile:new t.mvt.VectorTile(new t.Protobuf(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.cancel(),i()}}function b(t){var e=0;if(t&&t.length>0){e+=Math.abs(x(t[0]));for(var i=1;i<t.length;i++)e-=Math.abs(x(t[i]))}return e}function x(t){var e,i,n,r,o,a,s=0,l=t.length;if(l>2){for(a=0;a<l;a++)a===l-2?(n=l-2,r=l-1,o=0):a===l-1?(n=l-1,r=0,o=1):(n=a,r=a+1,o=a+2),e=t[n],i=t[r],s+=(w(t[o][0])-w(e[0]))*Math.sin(w(i[1]));s=s*Vt.RADIUS*Vt.RADIUS/2}return s}function w(t){return t*Math.PI/180}function k(t,e){return function(i){return t(i,e)}}function T(t,e){e=!!e,t[0]=E(t[0],e);for(var i=1;i<t.length;i++)t[i]=E(t[i],!e);return t}function E(t,e){return function(t){return Zt.ring(t)>=0}(t)===e?t:t.reverse()}function L(t,e){this.options=e||{},this.features=t,this.length=t.length}function S(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}function C(e){var i=new t.pbf;return function(t,e){for(var i in t.layers)e.writeMessage(3,A,t.layers[i])}(e,i),i.finish()}function A(t,e){var i;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(i=0;i<t.length;i++)n.feature=t.feature(i),e.writeMessage(2,P,n);var r=n.keys;for(i=0;i<r.length;i++)e.writeStringField(3,r[i]);var o=n.values;for(i=0;i<o.length;i++)e.writeMessage(4,B,o[i])}function P(t,e){var i=t.feature;void 0!==i.id&&e.writeVarintField(1,i.id),e.writeMessage(2,I,t),e.writeVarintField(3,i.type),e.writeMessage(4,R,i)}function I(t,e){var i=t.feature,n=t.keys,r=t.values,o=t.keycache,a=t.valuecache;for(var s in i.properties){var l=o[s];void 0===l&&(n.push(s),l=n.length-1,o[s]=l),e.writeVarint(l);var u=i.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var h=c+":"+u,p=a[h];void 0===p&&(r.push(u),p=r.length-1,a[h]=p),e.writeVarint(p)}}function M(t,e){return(e<<3)+(7&t)}function z(t){return t<<1^t>>31}function R(t,e){for(var i=t.loadGeometry(),n=t.type,r=0,o=0,a=i.length,s=0;s<a;s++){var l=i[s],u=1;1===n&&(u=l.length),e.writeVarint(M(1,u));for(var c=3===n?l.length-1:l.length,h=0;h<c;h++){1===h&&1!==n&&e.writeVarint(M(2,c-1));var p=l[h].x-r,f=l[h].y-o;e.writeVarint(z(p)),e.writeVarint(z(f)),r+=p,o+=f}3===n&&e.writeVarint(M(7,1))}}function B(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 O(t,e,i,n,r,o){if(!(r-n<=i)){var a=Math.floor((n+r)/2);!function t(e,i,n,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,l=n-r+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,i,n,Math.max(r,Math.floor(n-l*c/s+h)),Math.min(o,Math.floor(n+(s-l)*c/s+h)),a)}var p=i[2*n+a],f=r,d=o;for(D(e,i,r,n),i[2*o+a]>p&&D(e,i,r,o);f<d;){for(D(e,i,f,d),f++,d--;i[2*f+a]<p;)f++;for(;i[2*d+a]>p;)d--}i[2*r+a]===p?D(e,i,r,d):D(e,i,++d,o),d<=n&&(r=d+1),n<=d&&(o=d-1)}}(t,e,a,n,r,o%2),O(t,e,i,n,a-1,o+1),O(t,e,i,a+1,r,o+1)}}function D(t,e,i,n){N(t,i,n),N(e,2*i,2*n),N(e,2*i+1,2*n+1)}function N(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function F(t,e,i,n){var r=t-i,o=e-n;return r*r+o*o}function j(t,e,i,n,r){return new U(t,e,i,n,r)}function U(t,e,i,n,r){e=e||V,i=i||Z,r=r||Array,this.nodeSize=n||64,this.points=t,this.ids=new r(t.length),this.coords=new r(2*t.length);for(var o=0;o<t.length;o++)this.ids[o]=o,this.coords[2*o]=e(t[o]),this.coords[2*o+1]=i(t[o]);O(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function V(t){return t[0]}function Z(t){return t[1]}function q(t){this.options=X(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function G(t,e,i,n,r){return{x:t,y:e,zoom:1/0,id:i,parentId:-1,numPoints:n,properties:r}}function H(t){return{type:"Feature",id:t.id,properties:W(t),geometry:{type:"Point",coordinates:[360*(t.x-.5),(e=t.y,i=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(i))/Math.PI-90)]}};var e,i}function W(t){var e=t.numPoints,i=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:i})}function K(t){return t/360+.5}function J(t){var e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function X(t,e){for(var i in e)t[i]=e[i];return t}function Y(t){return t.x}function Q(t){return t.y}function $(t,e,i,n,r,o){var a=r-i,s=o-n;if(0!==a||0!==s){var l=((t-i)*a+(e-n)*s)/(a*a+s*s);l>1?(i=r,n=o):l>0&&(i+=a*l,n+=s*l)}return(a=t-i)*a+(s=e-n)*s}function tt(t,e,i,n){var r={id:void 0===t?null:t,type:e,geometry:i,tags:n,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)et(t,e);else if("Polygon"===i||"MultiLineString"===i)for(var n=0;n<e.length;n++)et(t,e[n]);else if("MultiPolygon"===i)for(n=0;n<e.length;n++)for(var r=0;r<e[n].length;r++)et(t,e[n][r])}(r),r}function et(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 it(t,e,i,n){if(e.geometry){var r=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=n||0),"Point"===o)nt(r,s);else if("MultiPoint"===o)for(var u=0;u<r.length;u++)nt(r[u],s);else if("LineString"===o)rt(r,s,a,!1);else if("MultiLineString"===o){if(i.lineMetrics){for(u=0;u<r.length;u++)s=[],rt(r[u],s,a,!1),t.push(tt(l,"LineString",s,e.properties));return}ot(r,s,a,!1)}else if("Polygon"===o)ot(r,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(u=0;u<e.geometry.geometries.length;u++)it(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},i,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(u=0;u<r.length;u++){var c=[];ot(r[u],c,a,!0),s.push(c)}}t.push(tt(l,o,s,e.properties))}}function nt(t,e){e.push(at(t[0])),e.push(st(t[1])),e.push(0)}function rt(t,e,i,n){for(var r,o,a=0,s=0;s<t.length;s++){var l=at(t[s][0]),u=st(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(a+=n?(r*u-l*o)/2:Math.sqrt(Math.pow(l-r,2)+Math.pow(u-o,2))),r=l,o=u}var c=e.length-3;e[2]=1,function t(e,i,n,r){for(var o,a=r,s=n-i>>1,l=n-i,u=e[i],c=e[i+1],h=e[n],p=e[n+1],f=i+3;f<n;f+=3){var d=$(e[f],e[f+1],u,c,h,p);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<l&&(o=f,l=m)}}a>r&&(o-i>3&&t(e,i,o,r),e[o+2]=a,n-o>3&&t(e,o,n,r))}(e,0,c,i),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function ot(t,e,i,n){for(var r=0;r<t.length;r++){var o=[];rt(t[r],o,i,n),e.push(o)}}function at(t){return t/360+.5}function st(t){var e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function lt(t,e,i,n,r,o,a,s){if(n/=e,o>=(i/=e)&&a<n)return t;if(a<i||o>=n)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],h=c.geometry,p=c.type,f=0===r?c.minX:c.minY,d=0===r?c.maxX:c.maxY;if(f>=i&&d<n)l.push(c);else if(!(d<i||f>=n)){var m=[];if("Point"===p||"MultiPoint"===p)ut(h,m,i,n,r);else if("LineString"===p)ct(h,m,i,n,r,!1,s.lineMetrics);else if("MultiLineString"===p)pt(h,m,i,n,r,!1);else if("Polygon"===p)pt(h,m,i,n,r,!0);else if("MultiPolygon"===p)for(var _=0;_<h.length;_++){var g=[];pt(h[_],g,i,n,r,!0),g.length&&m.push(g)}if(m.length){if(s.lineMetrics&&"LineString"===p){for(_=0;_<m.length;_++)l.push(tt(c.id,p,m[_],c.tags));continue}"LineString"!==p&&"MultiLineString"!==p||(1===m.length?(p="LineString",m=m[0]):p="MultiLineString"),"Point"!==p&&"MultiPoint"!==p||(p=3===m.length?"Point":"MultiPoint"),l.push(tt(c.id,p,m,c.tags))}}}return l.length?l:null}function ut(t,e,i,n,r){for(var o=0;o<t.length;o+=3){var a=t[o+r];a>=i&&a<=n&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function ct(t,e,i,n,r,o,a){for(var s,l,u=ht(t),c=0===r?dt:mt,h=t.start,p=0;p<t.length-3;p+=3){var f=t[p],d=t[p+1],m=t[p+2],_=t[p+3],g=t[p+4],y=0===r?f:d,v=0===r?_:g,b=!1;a&&(s=Math.sqrt(Math.pow(f-_,2)+Math.pow(d-g,2))),y<i?v>=i&&(l=c(u,f,d,_,g,i),a&&(u.start=h+s*l)):y>=n?v<n&&(l=c(u,f,d,_,g,n),a&&(u.start=h+s*l)):ft(u,f,d,m),v<i&&y>=i&&(l=c(u,f,d,_,g,i),b=!0),v>n&&y<=n&&(l=c(u,f,d,_,g,n),b=!0),!o&&b&&(a&&(u.end=h+s*l),e.push(u),u=ht(t)),a&&(h+=s)}var x=t.length-3;f=t[x],d=t[x+1],m=t[x+2],(y=0===r?f:d)>=i&&y<=n&&ft(u,f,d,m),x=u.length-3,o&&x>=3&&(u[x]!==u[0]||u[x+1]!==u[1])&&ft(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ht(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function pt(t,e,i,n,r,o){for(var a=0;a<t.length;a++)ct(t[a],e,i,n,r,o,!1)}function ft(t,e,i,n){t.push(e),t.push(i),t.push(n)}function dt(t,e,i,n,r,o){var a=(o-e)/(n-e);return t.push(o),t.push(i+(r-i)*a),t.push(1),a}function mt(t,e,i,n,r,o){var a=(o-i)/(r-i);return t.push(e+(n-e)*a),t.push(o),t.push(1),a}function _t(t,e){for(var i=[],n=0;n<t.length;n++){var r,o=t[n],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)r=gt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){r=[];for(var s=0;s<o.geometry.length;s++)r.push(gt(o.geometry[s],e))}else if("MultiPolygon"===a)for(r=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(gt(o.geometry[s][u],e));r.push(l)}i.push(tt(o.id,a,r,o.tags))}return i}function gt(t,e){var i=[];i.size=t.size,void 0!==t.start&&(i.start=t.start,i.end=t.end);for(var n=0;n<t.length;n+=3)i.push(t[n]+e,t[n+1],t[n+2]);return i}function yt(t,e){if(t.transformed)return t;var i,n,r,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(n=0;n<u.length;n+=2)l.geometry.push(vt(u[n],u[n+1],e,o,a,s));else for(n=0;n<u.length;n++){var h=[];for(r=0;r<u[n].length;r+=2)h.push(vt(u[n][r],u[n][r+1],e,o,a,s));l.geometry.push(h)}}return t.transformed=!0,t}function vt(t,e,i,n,r,o){return[Math.round(i*(t*n-r)),Math.round(i*(e*n-o))]}function bt(t,e,i,n,r){for(var o=e===r.maxZoom?0:r.tolerance/((1<<e)*r.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:i,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,xt(a,t[s],o,r);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,h=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),h>a.maxY&&(a.maxY=h)}return a}function xt(t,e,i,n){var r=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<r.length;s+=3)a.push(r[s]),a.push(r[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)wt(a,r,t,i,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<r.length;s++)wt(a,r[s],t,i,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<r.length;l++){var u=r[l];for(s=0;s<u.length;s++)wt(a,u[s],t,i,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&n.lineMetrics){for(var h in c={},e.tags)c[h]=e.tags[h];c.mapbox_clip_start=r.start/r.size,c.mapbox_clip_end=r.end/r.size}var p={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(p.id=e.id),t.features.push(p)}}function wt(t,e,i,n,r,o){var a=n*n;if(n>0&&e.size<(r?a:n))i.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>a)&&(i.numSimplified++,s.push(e[l]),s.push(e[l+1])),i.numPoints++;r&&function(t,e){for(var i=0,n=0,r=t.length,o=r-2;n<r;o=n,n+=2)i+=(t[n]-t[o])*(t[n+1]+t[o+1]);if(i>0===e)for(n=0,r=t.length;n<r/2;n+=2){var a=t[n],s=t[n+1];t[n]=t[r-2-n],t[n+1]=t[r-1-n],t[r-2-n]=a,t[r-1-n]=s}}(s,o),t.push(s)}}function kt(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||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(t,e){var i=[];if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)it(i,t.features[n],e,n);else"Feature"===t.type?it(i,t,e):it(i,{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),(n=function(t,e){var i=e.buffer/e.extent,n=t,r=lt(t,1,-1-i,i,0,-1,2,e),o=lt(t,1,1-i,2+i,0,-1,2,e);return(r||o)&&(n=lt(t,1,-i,1+i,0,-1,2,e)||[],r&&(n=_t(r,1).concat(n)),o&&(n=n.concat(_t(o,-1)))),n}(n,e)).length&&this.splitTile(n,0,0,0),i&&(n.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 Tt(t,e,i){return 32*((1<<t)*i+e)+t}function Et(t,e){var i=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(i.z,i.x,i.y);if(!n)return e(null,null);var r=new Wt(n.features),o=Xt(r);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:r,rawData:o.buffer})}var Lt=function(t){t&&this.replace(t)};Lt.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},Lt.prototype.update=function(e,n){for(var r=this,o=0,a=e;o<a.length;o+=1){var s=a[o];r._layerConfigs[s.id]=s;var l=r._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter)}for(var u=0,c=n;u<c.length;u+=1){var h=c[u];delete r._layerConfigs[h],delete r._layers[h]}this.familiesBySource={};for(var p=0,f=function(t){for(var e={},n=0;n<t.length;n++){var r=i(t[n]),o=e[r];o||(o=e[r]=[]),o.push(t[n])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));p<f.length;p+=1){var d=f[p].map(function(t){return r._layers[t.id]}),m=d[0];if("none"!==m.visibility){var _=m.source||"",g=r.familiesBySource[_];g||(g=r.familiesBySource[_]={});var y=m.sourceLayer||"_geojsonTileLayer",v=g[y];v||(v=g[y]=[]),v.push(d)}}};var St=function(e,i,n,r,o,a,s,l,u,c,h,p){var f=s.top*l-u,d=s.bottom*l+u,m=s.left*l-u,_=s.right*l+u;if(this.boxStartIndex=e.length,c){var g=d-f,y=_-m;g>0&&(g=Math.max(10*l,g),this._addLineCollisionCircles(e,i,n,n.segment,y,g,r,o,a,h))}else{if(p){var v=new t.Point(m,f),b=new t.Point(_,f),x=new t.Point(m,d),w=new t.Point(_,d),k=p*Math.PI/180;v._rotate(k),b._rotate(k),x._rotate(k),w._rotate(k),m=Math.min(v.x,b.x,x.x,w.x),_=Math.max(v.x,b.x,x.x,w.x),f=Math.min(v.y,b.y,x.y,w.y),d=Math.max(v.y,b.y,x.y,w.y)}e.emplaceBack(n.x,n.y,m,f,_,d,r,o,a,0,0)}this.boxEndIndex=e.length};St.prototype._addLineCollisionCircles=function(t,e,i,n,r,o,a,s,l,u){var c=o/2,h=Math.floor(r/c)||1,p=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*p/2),d=-o/2,m=i,_=n+1,g=d,y=-r/2,v=y-r/4;do{if(--_<0){if(g>y)return;_=0;break}g-=e[_].dist(m),m=e[_]}while(g>v);for(var b=e[_].dist(e[_+1]),x=-f;x<h+f;x++){var w=x*c,k=y+w;if(w<0&&(k+=w),w>r&&(k+=w-r),!(k<g)){for(;g+b<k;){if(g+=b,++_+1>=e.length)return;b=e[_].dist(e[_+1])}var T=k-g,E=e[_],L=e[_+1].sub(E)._unit()._mult(T)._add(E)._round(),S=Math.abs(k-d)<c?0:.8*(k-d);t.emplaceBack(L.x,L.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,S)}}};var Ct=u,At=u;u.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,i=this.compare,n=e[t];t>0;){var r=t-1>>1,o=e[r];if(i(n,o)>=0)break;e[t]=o,t=r}e[t]=n},_down:function(t){for(var e=this.data,i=this.compare,n=this.length>>1,r=e[t];t<n;){var o=1+(t<<1),a=o+1,s=e[o];if(a<this.length&&i(e[a],s)<0&&(o=a,s=e[a]),i(s,r)>=0)break;e[t]=s,t=o}e[t]=r}},Ct.default=At;var Pt=t.createCommonjsModule(function(t){t.exports=function(t,e){var i,n,r,o,a,s,l,u;for(i=3&t.length,n=t.length-i,r=e,a=3432918353,s=461845907,u=0;u<n;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,r=27492+(65535&(o=5*(65535&(r=(r^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>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:r^=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 r^=t.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}}),It=Pt,Mt=Pt,zt=t.createCommonjsModule(function(t){t.exports=function(t,e){for(var i,n=t.length,r=e^n,o=0;n>=4;)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),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&t.charCodeAt(o+2))<<16;case 2:r^=(255&t.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0}});It.murmur3=Mt,It.murmur2=zt;var Rt=65535,Bt=function(e){var i={},n=[];for(var r in e){var o=e[r],a=i[r]={};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};n.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(n),h=c.w,p=c.h,f=new t.AlphaImage({width:h||1,height:p||1});for(var d in e){var m=e[d];for(var _ in m){var g=m[+_];if(g&&0!==g.bitmap.width&&0!==g.bitmap.height){var y=i[d][_].rect;t.AlphaImage.copy(g.bitmap,f,{x:0,y:0},{x:y.x+1,y:y.y+1},g.bitmap)}}}this.image=f,this.positions=i};t.register("GlyphAtlas",Bt);var Ot=function(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};Ot.prototype.parse=function(e,i,n,r){function o(){if(u)return r(u);if(c&&h&&p){var e=new Bt(c),i=new t.ImageAtlas(h,p);for(var n in f){var o=f[n];o instanceof t.SymbolBucket?(y(o.layers,this.zoom),d(o,c,e.positions,h,i.iconPositions,this.showCollisionBoxes)):o.hasPattern&&(o instanceof t.LineBucket||o instanceof t.FillBucket||o instanceof t.FillExtrusionBucket)&&(y(o.layers,this.zoom),o.addFeatures(m,i.patternPositions))}this.status="done",r(null,{buckets:t.values(f).filter(function(t){return!t.isEmpty()}),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:i})}}var a=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var s=new t.DictionaryCoder(Object.keys(e.layers).sort()),l=new t.FeatureIndex(this.tileID);l.bucketLayerIDs=[];var u,c,h,p,f={},m={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{}},_=i.familiesBySource[this.source];for(var g in _){var v=e.layers[g];if(v){1===v.version&&t.warnOnce('Vector tile source "'+a.source+'" layer "'+g+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var b=s.encode(g),x=[],w=0;w<v.length;w++){var k=v.feature(w);x.push({feature:k,index:w,sourceLayerIndex:b})}for(var T=0,E=_[g];T<E.length;T+=1){var L=E[T],S=L[0];S.minzoom&&a.zoom<Math.floor(S.minzoom)||S.maxzoom&&a.zoom>=S.maxzoom||"none"!==S.visibility&&(y(L,a.zoom),(f[S.id]=S.createBucket({index:l.bucketLayerIDs.length,layers:L,zoom:a.zoom,pixelRatio:a.pixelRatio,overscaling:a.overscaling,collisionBoxArray:a.collisionBoxArray,sourceLayerIndex:b,sourceID:a.source})).populate(x,m),l.bucketLayerIDs.push(L.map(function(t){return t.id})))}}}var C=t.mapObject(m.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(C).length?n.send("getGlyphs",{uid:this.uid,stacks:C},function(t,e){u||(u=t,c=e,o.call(a))}):c={};var A=Object.keys(m.iconDependencies);A.length?n.send("getImages",{icons:A},function(t,e){u||(u=t,h=e,o.call(a))}):h={};var P=Object.keys(m.patternDependencies);P.length?n.send("getImages",{icons:P},function(t,e){u||(u=t,p=e,o.call(a))}):p={},o.call(this)};var Dt="undefined"!=typeof performance,Nt={getEntriesByName:function(t){return!!(Dt&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(Dt&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,i){return!!(Dt&&performance&&performance.measure)&&performance.measure(t,e,i)},clearMarks:function(t){return!!(Dt&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(Dt&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},Ft=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},Nt.mark(this._marks.start)};Ft.prototype.finish=function(){Nt.mark(this._marks.end);var t=Nt.getEntriesByName(this._marks.measure);return 0===t.length&&(Nt.measure(this._marks.measure,this._marks.start,this._marks.end),t=Nt.getEntriesByName(this._marks.measure),Nt.clearMarks(this._marks.start),Nt.clearMarks(this._marks.end),Nt.clearMeasures(this._marks.measure)),t},Nt.Performance=Ft;var jt=function(t,e,i){this.actor=t,this.layerIndex=e,this.loadVectorData=i||v,this.loading={},this.loaded={}};jt.prototype.loadTile=function(e,i){var n=this,r=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new Nt.Performance(e.request),a=this.loading[r]=new Ot(e);a.abort=this.loadVectorData(e,function(e,s){if(delete n.loading[r],e||!s)return a.status="done",n.loaded[r]=a,i(e);var l=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl);var c={};if(o){var h=o.finish();h&&(c.resourceTiming=JSON.parse(JSON.stringify(h)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return i(e);i(null,t.extend({rawTileData:l.slice(0)},n,u,c))}),n.loaded=n.loaded||{},n.loaded[r]=a})},jt.prototype.reloadTile=function(t,e){var i=this.loaded,n=t.uid,r=this;if(i&&i[n]){var o=i[n];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,i){var n=o.reloadCallback;n&&(delete o.reloadCallback,o.parse(o.vectorTile,r.layerIndex,r.actor,n)),e(t,i)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.actor,a):a())}},jt.prototype.abortTile=function(t,e){var i=this.loading,n=t.uid;i&&i[n]&&i[n].abort&&(i[n].abort(),delete i[n]),e()},jt.prototype.removeTile=function(t,e){var i=this.loaded,n=t.uid;i&&i[n]&&delete i[n],e()};var Ut=function(){this.loaded={}};Ut.prototype.loadTile=function(e,i){var n=e.uid,r=e.encoding,o=e.rawImageData,a=new t.DEMData(n,o,r);this.loaded=this.loaded||{},this.loaded[n]=a,i(null,a)},Ut.prototype.removeTile=function(t){var e=this.loaded,i=t.uid;e&&e[i]&&delete e[i]};var Vt={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142},Zt={geometry:function t(e){var i,n=0;switch(e.type){case"Polygon":return b(e.coordinates);case"MultiPolygon":for(i=0;i<e.coordinates.length;i++)n+=b(e.coordinates[i]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(i=0;i<e.geometries.length;i++)n+=t(e.geometries[i]);return n}},ring:x},qt=function t(e,i){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(k(t,i)),e;case"Feature":return e.geometry=t(e.geometry,i),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=T(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(k(T,e))),t}(e,i);default:return e}},Gt=t.mvt.VectorTileFeature.prototype.toGeoJSON,Ht=function(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))};Ht.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],i=0,n=this._feature.geometry;i<n.length;i+=1){var r=n[i];e.push([new t.Point(r[0],r[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 h=c[u];l.push(new t.Point(h[0],h[1]))}o.push(l)}return o},Ht.prototype.toGeoJSON=function(t,e,i){return Gt.call(this,t,e,i)};var Wt=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};Wt.prototype.feature=function(t){return new Ht(this._features[t])};var Kt=t.vectorTile.VectorTileFeature,Jt=L;L.prototype.feature=function(t){return new S(this.features[t],this.options.extent)},S.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var i=0;i<e.length;i++){for(var n=e[i],r=[],o=0;o<n.length;o++)r.push(new t.Point$1(n[o][0],n[o][1]));this.geometry.push(r)}return this.geometry},S.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,i=-1/0,n=1/0,r=-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),n=Math.min(n,l.y),r=Math.max(r,l.y)}return[e,n,i,r]},S.prototype.toGeoJSON=Kt.prototype.toGeoJSON;var Xt=C,Yt=C,Qt=function(t,e){e=e||{};var i={};for(var n in t)i[n]=new Jt(t[n].features,e),i[n].name=n,i[n].version=e.version,i[n].extent=e.extent;return C({layers:i})},$t=Jt;Xt.fromVectorTileJs=Yt,Xt.fromGeojsonVt=Qt,Xt.GeoJSONWrapper=$t,U.prototype={range:function(t,e,i,n){return function(t,e,i,n,r,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var h=u.pop(),p=u.pop(),f=u.pop();if(p-f<=a)for(var d=f;d<=p;d++)s=e[2*d],l=e[2*d+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+p)/2);s=e[2*m],l=e[2*m+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(t[m]);var _=(h+1)%2;(0===h?i<=s:n<=l)&&(u.push(f),u.push(m-1),u.push(_)),(0===h?r>=s:o>=l)&&(u.push(m+1),u.push(p),u.push(_))}}return c}(this.ids,this.coords,t,e,i,n,this.nodeSize)},within:function(t,e,i){return function(t,e,i,n,r,o){for(var a=[0,t.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var p=h;p<=c;p++)F(e[2*p],e[2*p+1],i,n)<=l&&s.push(t[p]);else{var f=Math.floor((h+c)/2),d=e[2*f],m=e[2*f+1];F(d,m,i,n)<=l&&s.push(t[f]);var _=(u+1)%2;(0===u?i-r<=d:n-r<=m)&&(a.push(h),a.push(f-1),a.push(_)),(0===u?i+r>=d:n+r>=m)&&(a.push(f+1),a.push(c),a.push(_))}}return s}(this.ids,this.coords,t,e,i,this.nodeSize)}},q.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var i="prepare "+t.length+" points";e&&console.time(i),this.points=t;for(var n,r,o,a=[],s=0;s<t.length;s++)t[s].geometry&&a.push((n=t[s],r=s,{x:K((o=n.geometry.coordinates)[0]),y:J(o[1]),zoom:1/0,index:r,parentId:-1}));this.trees[this.options.maxZoom+1]=j(a,Y,Q,this.options.nodeSize,Float32Array),e&&console.timeEnd(i);for(var l=this.options.maxZoom;l>=this.options.minZoom;l--){var u=+Date.now();a=this._cluster(a,l),this.trees[l]=j(a,Y,Q,this.options.nodeSize,Float32Array),e&&console.log("z%d: %d clusters in %dms",l,a.length,+Date.now()-u)}return e&&console.timeEnd("total time"),this},getClusters:function(t,e){var i=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),r=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,r=180;else if(i>r){var a=this.getClusters([i,n,180,o],e),s=this.getClusters([-180,n,r,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=l.range(K(i),J(o),K(r),J(n)),c=[],h=0;h<u.length;h++){var p=l.points[u[h]];c.push(p.numPoints?H(p):this.points[p.index])}return c},getChildren:function(t){var e=t>>5,i=t%32,n="No cluster with the specified id.",r=this.trees[i];if(!r)throw new Error(n);var o=r.points[e];if(!o)throw new Error(n);for(var a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),s=r.within(o.x,o.y,a),l=[],u=0;u<s.length;u++){var c=r.points[s[u]];c.parentId===t&&l.push(c.numPoints?H(c):this.points[c.index])}if(0===l.length)throw new Error(n);return l},getLeaves:function(t,e,i){e=e||10,i=i||0;var n=[];return this._appendLeaves(n,t,e,i,0),n},getTile:function(t,e,i){var n=this.trees[this._limitZoom(t)],r=Math.pow(2,t),o=this.options.extent,a=this.options.radius/o,s=(i-a)/r,l=(i+1+a)/r,u={features:[]};return this._addTileFeatures(n.range((e-a)/r,s,(e+1+a)/r,l),n.points,e,i,r,u),0===e&&this._addTileFeatures(n.range(1-a/r,s,1,l),n.points,r,i,r,u),e===r-1&&this._addTileFeatures(n.range(0,s,a/r,l),n.points,-1,i,r,u),u.features.length?u:null},getClusterExpansionZoom:function(t){for(var e=t%32-1;e<this.options.maxZoom;){var i=this.getChildren(t);if(e++,1!==i.length)break;t=i[0].properties.cluster_id}return e},_appendLeaves:function(t,e,i,n,r){for(var o=this.getChildren(e),a=0;a<o.length;a++){var s=o[a].properties;if(s&&s.cluster?r+s.point_count<=n?r+=s.point_count:r=this._appendLeaves(t,s.cluster_id,i,n,r):r<n?r++:t.push(o[a]),t.length===i)break}return r},_addTileFeatures:function(t,e,i,n,r,o){for(var a=0;a<t.length;a++){var s=e[t[a]],l={type:1,geometry:[[Math.round(this.options.extent*(s.x*r-i)),Math.round(this.options.extent*(s.y*r-n))]],tags:s.numPoints?W(s):this.points[s.index].properties},u=s.numPoints?s.id:this.points[s.index].id;void 0!==u&&(l.id=u),o.features.push(l)}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var i=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),r=0;r<t.length;r++){var o=t[r];if(!(o.zoom<=e)){o.zoom=e;var a=this.trees[e+1],s=a.within(o.x,o.y,n),l=o.numPoints||1,u=o.x*l,c=o.y*l,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,o));for(var p=(r<<5)+(e+1),f=0;f<s.length;f++){var d=a.points[s[f]];if(!(d.zoom<=e)){d.zoom=e;var m=d.numPoints||1;u+=d.x*m,c+=d.y*m,l+=m,d.parentId=p,this.options.reduce&&this._accumulate(h,d)}}1===l?i.push(o):(o.parentId=p,i.push(G(u/l,c/l,p,l,h)))}}return i},_accumulate:function(t,e){var i=e.numPoints?e.properties:this.options.map(this.points[e.index].properties);this.options.reduce(t,i)}},kt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},kt.prototype.splitTile=function(t,e,i,n,r,o,a){for(var s=[t,e,i,n],l=this.options,u=l.debug;s.length;){n=s.pop(),i=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,h=Tt(e,i,n),p=this.tiles[h];if(!p&&(u>1&&console.time("creation"),p=this.tiles[h]=bt(t,e,i,n,l),this.tileCoords.push({z:e,x:i,y:n}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,i,n,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(p.source=t,r){if(e===l.maxZoom||e===r)continue;var d=1<<r-e;if(i!==Math.floor(o/d)||n!==Math.floor(a/d))continue}else if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue;if(p.source=null,0!==t.length){u>1&&console.time("clipping");var m,_,g,y,v,b,x=.5*l.buffer/l.extent,w=.5-x,k=.5+x,T=1+x;m=_=g=y=null,v=lt(t,c,i-x,i+k,0,p.minX,p.maxX,l),b=lt(t,c,i+w,i+T,0,p.minX,p.maxX,l),t=null,v&&(m=lt(v,c,n-x,n+k,1,p.minY,p.maxY,l),_=lt(v,c,n+w,n+T,1,p.minY,p.maxY,l),v=null),b&&(g=lt(b,c,n-x,n+k,1,p.minY,p.maxY,l),y=lt(b,c,n+w,n+T,1,p.minY,p.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*i,2*n),s.push(_||[],e+1,2*i,2*n+1),s.push(g||[],e+1,2*i+1,2*n),s.push(y||[],e+1,2*i+1,2*n+1)}}},kt.prototype.getTile=function(t,e,i){var n=this.options,r=n.extent,o=n.debug;if(t<0||t>24)return null;var a=1<<t,s=Tt(t,e=(e%a+a)%a,i);if(this.tiles[s])return yt(this.tiles[s],r);o>1&&console.log("drilling down to z%d-%d-%d",t,e,i);for(var l,u=t,c=e,h=i;!l&&u>0;)u--,c=Math.floor(c/2),h=Math.floor(h/2),l=this.tiles[Tt(u,c,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,h),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,h,t,e,i),o>1&&console.timeEnd("drilling down"),this.tiles[s]?yt(this.tiles[s],r):null):null};var te=function(e){function i(t,i,n){e.call(this,t,i,Et),n&&(this.loadGeoJSON=n)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.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())},i.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(i&&i.request&&i.request.collectResourceTiming)&&new Nt.Performance(i.request);this.loadGeoJSON(i,function(r,o){if(r||!o)return e(r);if("object"!=typeof o)return e(new Error("Input data is not a valid GeoJSON object."));qt(o,!0);try{t._geoJSONIndex=i.cluster?(a=i.superclusterOptions,new q(a)).load(o.features):function(t,e){return new kt(t,e)}(o,i.geojsonVtOptions)}catch(r){return e(r)}t.loaded={};var a,s={};if(n){var l=n.finish();l&&(s.resourceTiming={},s.resourceTiming[i.source]=JSON.parse(JSON.stringify(l)))}e(null,s)})}},i.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},i.prototype.reloadTile=function(t,i){var n=this.loaded,r=t.uid;return n&&n[r]?e.prototype.reloadTile.call(this,t,i):this.loadTile(t,i)},i.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 is not a valid GeoJSON object."));try{return i(null,JSON.parse(e.data))}catch(t){return i(new Error("Input data is not a valid GeoJSON object."))}}},i.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},i.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},i.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},i.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},i}(jt),ee=function(e){var i=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:jt,geojson:te},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.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return ee.prototype.setLayers=function(t,e,i){this.getLayerIndex(t).replace(e),i()},ee.prototype.updateLayers=function(t,e,i){this.getLayerIndex(t).update(e.layers,e.removedIds),i()},ee.prototype.loadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).loadTile(e,i)},ee.prototype.loadDEMTile=function(t,e,i){this.getDEMWorkerSource(t,e.source).loadTile(e,i)},ee.prototype.reloadTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).reloadTile(e,i)},ee.prototype.abortTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).abortTile(e,i)},ee.prototype.removeTile=function(t,e,i){this.getWorkerSource(t,e.type,e.source).removeTile(e,i)},ee.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},ee.prototype.removeSource=function(t,e,i){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,i):i()}},ee.prototype.loadWorkerSource=function(t,e,i){try{this.self.importScripts(e.url),i()}catch(t){i(t.toString())}},ee.prototype.loadRTLTextPlugin=function(e,i,n){try{t.plugin.isLoaded()||(this.self.importScripts(i),n(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+i)))}catch(t){n(t.toString())}},ee.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new Lt),e},ee.prototype.getWorkerSource=function(t,e,i){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][i]){var r={send:function(e,i,r){n.actor.send(e,i,r,t)}};this.workerSources[t][e][i]=new this.workerSourceTypes[e](r,this.getLayerIndex(t))}return this.workerSources[t][e][i]},ee.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new Ut),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&new ee(self),ee}),t(["./shared.js"],function(t){function e(t){if(!mt)return null;for(var e=0;e<t.length;e++)if(t[e]in mt)return t[e];return t[0]}function i(t,e){var i=r(xt.API_URL);if(t.protocol=i.protocol,t.authority=i.authority,"/"!==i.path&&(t.path=""+i.path+t.path),!xt.REQUIRE_ACCESS_TOKEN)return o(t);if(!(e=e||xt.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+wt);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+wt);return t.params.push("access_token="+e),o(t)}function n(t){return 0===t.indexOf("mapbox:")}function r(t){var e=t.match(Ct);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 o(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function a(t,e,i,n,r,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=r||"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*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function s(t,e,i,n,r,o,a){for(var s=0;s<e;s++){for(var u=0;u<i;u++)n[u]=t[u*e+s];for(l(n,r,o,a,i),u=0;u<i;u++)t[u*e+s]=r[u]}for(u=0;u<i;u++){for(s=0;s<e;s++)n[s]=t[u*e+s];for(l(n,r,o,a,e),s=0;s<e;s++)t[u*e+s]=Math.sqrt(r[s])}}function l(t,e,i,n,r){i[0]=0,n[0]=-Rt,n[1]=+Rt;for(var o=1,a=0;o<r;o++){for(var s=(t[o]+o*o-(t[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(t[o]+o*o-(t[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+Rt}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;e[o]=(o-i[a])*(o-i[a])+t[i[a]]}}function u(e,i,n){var r=function(e,i){if(e)return n(e);if(i){var r=t.pick(i,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);i.vector_layers&&(r.vectorLayers=i.vector_layers,r.vectorLayerIds=r.vectorLayers.map(function(t){return t.id})),n(null,r)}};return e.url?t.getJSON(i(Tt(e.url),t.ResourceType.Source),r):t.browser.frame(function(){return r(null,e)})}function c(t,e,i,n,r){var o=r.maxPitchScaleFactor(),a=t.tilesIn(i,o);a.sort(h);for(var s=[],l=0,u=a;l<u.length;l+=1){var c=u[l];s.push({wrappedTileID:c.tileID.wrapped().key,queryResults:c.tile.queryRenderedFeatures(e,t._state,c.queryGeometry,c.scale,n,r,o,t.transform.calculatePosMatrix(c.tileID.toUnwrapped()))})}var p=function(t){for(var e={},i={},n=0,r=t;n<r.length;n+=1){var o=r[n],a=o.queryResults,s=o.wrappedTileID,l=i[s]=i[s]||{};for(var u in a)for(var c=a[u],h=l[u]=l[u]||{},p=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];h[m.featureIndex]||(h[m.featureIndex]=!0,p.push(m.feature))}}return e}(s);for(var f in p)p[f].forEach(function(e){var i=t.getFeatureState(e.layer["source-layer"],e.id);e.source=e.layer.source,e.layer["source-layer"]&&(e.sourceLayer=e.layer["source-layer"]),e.state=i});return p}function h(t,e){var i=t.tileID,n=e.tileID;return i.overscaledZ-n.overscaledZ||i.canonical.y-n.canonical.y||i.wrap-n.wrap||i.canonical.x-n.canonical.x}function p(e,i){var n=i.zoomTo(e.canonical.z);return new t.Point((n.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.EXTENT,(n.row-e.canonical.y)*t.EXTENT)}function f(t,e){return t%32-e%32||e-t}function d(t){return"raster"===t||"image"===t||"video"===t}function m(){return new t.window.Worker(Vn.workerUrl)}function _(e,i){var n={};for(var r in e)"ref"!==r&&(n[r]=e[r]);return t.refProperties.forEach(function(t){t in i&&(n[t]=i[t])}),n}function g(t){t=t.slice();for(var e=Object.create(null),i=0;i<t.length;i++)e[t[i].id]=t[i];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=_(t[n],e[t[n].ref]));return t}function y(t,e,i){i.push({command:He.addSource,args:[t,e[t]]})}function v(t,e,i){e.push({command:He.removeSource,args:[t]}),i[t]=!0}function b(t,e,i,n){v(t,i,n),y(t,e,i)}function x(e,i,n){var r;for(r in e[n])if(e[n].hasOwnProperty(r)&&"data"!==r&&!t.isEqual(e[n][r],i[n][r]))return!1;for(r in i[n])if(i[n].hasOwnProperty(r)&&"data"!==r&&!t.isEqual(e[n][r],i[n][r]))return!1;return!0}function w(e,i,n,r,o,a){var s;for(s in e=e||{},i=i||{},e)e.hasOwnProperty(s)&&(t.isEqual(e[s],i[s])||n.push({command:a,args:[r,s,i[s],o]}));for(s in i)i.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.isEqual(e[s],i[s])||n.push({command:a,args:[r,s,i[s],o]}))}function k(t){return t.id}function T(t,e){return t[e.id]=e,t}function E(e,i){if(!e)return[{command:He.setStyle,args:[i]}];var n=[];try{if(!t.isEqual(e.version,i.version))return[{command:He.setStyle,args:[i]}];t.isEqual(e.center,i.center)||n.push({command:He.setCenter,args:[i.center]}),t.isEqual(e.zoom,i.zoom)||n.push({command:He.setZoom,args:[i.zoom]}),t.isEqual(e.bearing,i.bearing)||n.push({command:He.setBearing,args:[i.bearing]}),t.isEqual(e.pitch,i.pitch)||n.push({command:He.setPitch,args:[i.pitch]}),t.isEqual(e.sprite,i.sprite)||n.push({command:He.setSprite,args:[i.sprite]}),t.isEqual(e.glyphs,i.glyphs)||n.push({command:He.setGlyphs,args:[i.glyphs]}),t.isEqual(e.transition,i.transition)||n.push({command:He.setTransition,args:[i.transition]}),t.isEqual(e.light,i.light)||n.push({command:He.setLight,args:[i.light]});var r={},o=[];!function(e,i,n,r){var o;for(o in e=e||{},i=i||{},e)e.hasOwnProperty(o)&&(i.hasOwnProperty(o)||v(o,n,r));for(o in i)i.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.isEqual(e[o],i[o])||("geojson"===e[o].type&&"geojson"===i[o].type&&x(e,i,o)?n.push({command:He.setGeoJSONSourceData,args:[o,i[o].data]}):b(o,i,n,r)):y(o,i,n))}(e.sources,i.sources,o,r);var a=[];e.layers&&e.layers.forEach(function(t){r[t.source]?n.push({command:He.removeLayer,args:[t.id]}):a.push(t)}),n=n.concat(o),function(e,i,n){e=e||[],i=i||[];var r,o,a,s,l,u,c,h=e.map(k),p=i.map(k),f=e.reduce(T,{}),d=i.reduce(T,{}),m=h.slice(),_=Object.create(null);for(r=0,o=0;r<h.length;r++)a=h[r],d.hasOwnProperty(a)?o++:(n.push({command:He.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(r=0,o=0;r<p.length;r++)a=p[p.length-1-r],m[m.length-1-r]!==a&&(f.hasOwnProperty(a)?(n.push({command:He.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,u=m[m.length-r],n.push({command:He.addLayer,args:[d[a],u]}),m.splice(m.length-r,0,a),_[a]=!0);for(r=0;r<p.length;r++)if(s=f[a=p[r]],l=d[a],!_[a]&&!t.isEqual(s,l))if(t.isEqual(s.source,l.source)&&t.isEqual(s["source-layer"],l["source-layer"])&&t.isEqual(s.type,l.type)){for(c in w(s.layout,l.layout,n,a,null,He.setLayoutProperty),w(s.paint,l.paint,n,a,null,He.setPaintProperty),t.isEqual(s.filter,l.filter)||n.push({command:He.setFilter,args:[a,l.filter]}),t.isEqual(s.minzoom,l.minzoom)&&t.isEqual(s.maxzoom,l.maxzoom)||n.push({command:He.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.")?w(s[c],l[c],n,a,c.slice(6),He.setPaintProperty):t.isEqual(s[c],l[c])||n.push({command:He.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.")?w(s[c],l[c],n,a,c.slice(6),He.setPaintProperty):t.isEqual(s[c],l[c])||n.push({command:He.setLayerProperty,args:[a,c,l[c]]}))}else n.push({command:He.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],n.push({command:He.addLayer,args:[l,u]})}(a,i.layers,n)}catch(t){console.warn("Unable to compute style diff:",t),n=[{command:He.setStyle,args:[i]}]}return n}function L(e,i,n,r,o){var a=t.identity(new Float32Array(16));return i?(t.identity(a),t.scale(a,a,[1/o,1/o,1]),n||t.rotateZ(a,a,r.angle)):(t.scale(a,a,[r.width/2,-r.height/2,1]),t.translate(a,a,[1,-1,0]),t.multiply(a,a,e)),a}function S(e,i,n,r,o){var a=t.identity(new Float32Array(16));return i?(t.multiply(a,a,e),t.scale(a,a,[o,o,1]),n||t.rotateZ(a,a,-r.angle)):(t.scale(a,a,[1,-1,1]),t.translate(a,a,[-1,-1,0]),t.scale(a,a,[2/r.width,2/r.height,1])),a}function C(e,i){var n=[e.x,e.y,0,1];D(n,n,i);var r=n[3];return{point:new t.Point(n[0]/r,n[1]/r),signedDistanceFromCamera:r}}function A(t,e){var i=t[0]/t[3],n=t[1]/t[3];return i>=-e[0]&&i<=e[0]&&n>=-e[1]&&n<=e[1]}function P(e,i,n,r,o,a,s,l){var u=r?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,n.transform.zoom,Ke.properties[r?"text-size":"icon-size"]),h=[256/n.width*2+1,256/n.height*2+1],p=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;p.clear();for(var f=e.lineVertexArray,d=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=n.transform.width/n.transform.height,_=!1,g=0;g<d.length;g++){var y=d.get(g);if(y.hidden||y.writingMode===t.WritingMode.vertical&&!_)O(y.numGlyphs,p);else{_=!1;var v=[y.anchorX,y.anchorY,0,1];if(t.transformMat4(v,v,i),A(v,h)){var b=.5+v[3]/n.transform.cameraToCenterDistance*.5,x=t.evaluateSizeForFeature(u,c,y),w=s?x*b:x/b,k=new t.Point(y.anchorX,y.anchorY),T=C(k,o).point,E={},L=z(y,w,!1,l,i,o,a,e.glyphOffsetArray,f,p,T,k,E,m);_=L.useVertical,(L.notEnoughRoom||_||L.needsFlipping&&z(y,w,!0,l,i,o,a,e.glyphOffsetArray,f,p,T,k,E,m).notEnoughRoom)&&O(y.numGlyphs,p)}else O(y.numGlyphs,p)}}r?e.text.dynamicLayoutVertexBuffer.updateData(p):e.icon.dynamicLayoutVertexBuffer.updateData(p)}function I(t,e,i,n,r,o,a,s,l,u,c,h){var p=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),_=e.getoffsetX(p-1),g=B(t*m,i,n,r,o,a,s.segment,f,d,l,u,c,h);if(!g)return null;var y=B(t*_,i,n,r,o,a,s.segment,f,d,l,u,c,h);return y?{first:g,last:y}:null}function M(e,i,n,r){return e===t.WritingMode.horizontal&&Math.abs(n.y-i.y)>Math.abs(n.x-i.x)*r?{useVertical:!0}:(e===t.WritingMode.vertical?i.y<n.y:i.x>n.x)?{needsFlipping:!0}:null}function z(e,i,n,r,o,a,s,l,u,c,h,p,f,d){var m,_=i/24,g=e.lineOffsetX*i,y=e.lineOffsetY*i;if(e.numGlyphs>1){var v=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,x=e.lineStartIndex+e.lineLength,w=I(_,l,g,y,n,h,p,e,u,a,f,!1);if(!w)return{notEnoughRoom:!0};var k=C(w.first.point,s).point,T=C(w.last.point,s).point;if(r&&!n){var E=M(e.writingMode,k,T,d);if(E)return E}m=[w.first];for(var L=e.glyphStartIndex+1;L<v-1;L++)m.push(B(_*l.getoffsetX(L),g,y,n,h,p,e.segment,b,x,u,a,f,!1));m.push(w.last)}else{if(r&&!n){var S=C(p,o).point,A=e.lineStartIndex+e.segment+1,P=new t.Point(u.getx(A),u.gety(A)),z=C(P,o),O=z.signedDistanceFromCamera>0?z.point:R(p,P,S,1,o),D=M(e.writingMode,S,O,d);if(D)return D}var N=B(_*l.getoffsetX(e.glyphStartIndex),g,y,n,h,p,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f,!1);if(!N)return{notEnoughRoom:!0};m=[N]}for(var F=0,j=m;F<j.length;F+=1){var U=j[F];t.addDynamicAttributes(c,U.point,U.angle)}return{}}function R(t,e,i,n,r){var o=C(t.add(t.sub(e)._unit()),r).point,a=i.sub(o);return i.add(a._mult(n/a.mag()))}function B(e,i,n,r,o,a,s,l,u,c,h,p,f){var d=r?e-i:e+i,m=d>0?1:-1,_=0;r&&(m*=-1,_=Math.PI),m<0&&(_+=Math.PI);for(var g=m>0?l+s:l+s+1,y=g,v=o,b=o,x=0,w=0,k=Math.abs(d);x+w<=k;){if((g+=m)<l||g>=u)return null;if(b=v,void 0===(v=p[g])){var T=new t.Point(c.getx(g),c.gety(g)),E=C(T,h);if(E.signedDistanceFromCamera>0)v=p[g]=E.point;else{var L=g-m;v=R(0===x?a:new t.Point(c.getx(L),c.gety(L)),T,b,k-x+1,h)}}x+=w,w=b.dist(v)}var S=(k-x)/w,A=v.sub(b),P=A.mult(S)._add(b);return P._add(A._unit()._perp()._mult(n*m)),{point:P,angle:_+Math.atan2(v.y-b.y,v.x-b.x),tileDistance:f?{prevTileDistance:g-m===y?0:c.gettileUnitDistanceFromAnchor(g-m),lastSegmentViewportDistance:k-x}:null}}function O(t,e){for(var i=0;i<t;i++){var n=e.length;e.resize(n+4),e.float32.set(Je,3*n)}}function D(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t[3]=i[3]*n+i[7]*r+i[15],t}function N(t,e,i){t[e+4]=i?1:0}function F(e,i,n){return i*(t.EXTENT/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}function j(t,e,i){t.emplaceBack(e?1:0,i?1:0),t.emplaceBack(e?1:0,i?1:0),t.emplaceBack(e?1:0,i?1:0),t.emplaceBack(e?1:0,i?1:0)}function U(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*ii+e*ni+i*ri+e*oi+i*ai+e*si+i*li+e}function V(e,i,n){var r=1/F(n,1,i.transform.tileZoom),o=Math.pow(2,n.tileID.overscaledZ),a=n.tileSize*Math.pow(2,i.transform.tileZoom)/o,s=a*(n.tileID.canonical.x+n.tileID.wrap*o),l=a*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[t.browser.devicePixelRatio,r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}function Z(t,e){return 1/F(t,1,e.tileZoom)}function q(t,e,i){return t.translatePosMatrix(e.tileID.posMatrix,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}function G(e,i){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),r=0;r<n.length;r++){var o={},a=n[r],s=n.slice(r+1);H(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,i)}}function H(e,i,n,r,o){for(var a=0;a<n.length;a++){var s=n[a];if(r.isLessThan(s.tileID))break;if(i.key===s.tileID.key)return;if(s.tileID.isChildOf(i)){for(var l=i.children(1/0),u=0;u<l.length;u++)H(e,l[u],n.slice(a),r,o);return}}var c=i.overscaledZ-e.overscaledZ,h=new t.CanonicalTileID(c,i.canonical.x-(e.canonical.x<<c),i.canonical.y-(e.canonical.y<<c));o[h.key]=o[h.key]||h}function W(t,e,i,n,r){for(var o=t.context,a=o.gl,s=r?t.useProgram("collisionCircle"):t.useProgram("collisionBox"),l=0;l<n.length;l++){var u=n[l],c=e.getTile(u),h=c.getBucket(i);if(h){var p=r?h.collisionCircle:h.collisionBox;p&&s.draw(o,r?a.TRIANGLES:a.LINES,Ne.disabled,Fe.disabled,t.colorModeForRenderPass(),Ue.disabled,Oi(u.posMatrix,t.transform,c),i.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,null,t.transform.zoom,null,null,p.collisionVertexBuffer)}}}function K(e,i,n,r,o,a,s,l,u,c,h,p){for(var f,d,m=e.context,_=m.gl,g=e.transform,y="map"===l,v="map"===u,b=y&&"point"!==n.layout.get("symbol-placement"),x=y&&!v&&!b,w=v?e.depthModeForSublayer(0,Ne.ReadOnly):Ne.disabled,k=0,T=r;k<T.length;k+=1){var E=T[k],C=i.getTile(E),A=C.getBucket(n);if(A){var I=o?A.text:A.icon;if(I&&I.segments.get().length){var M=I.programConfigurations.get(n.id),z=o||A.sdfIcons,R=o?A.textSizeData:A.iconSizeData;f||(f=e.useProgram(z?"symbolSDF":"symbolIcon",M),d=t.evaluateSizeForZoom(R,g.zoom,tn.properties[o?"text-size":"icon-size"])),m.activeTexture.set(_.TEXTURE0);var B=void 0;if(o)C.glyphAtlasTexture.bind(_.LINEAR,_.CLAMP_TO_EDGE),B=C.glyphAtlasTexture.size;else{var O=1!==n.layout.get("icon-size").constantOr(0)||A.iconsNeedLinear,D=v||0!==g.pitch;C.imageAtlasTexture.bind(z||e.options.rotating||e.options.zooming||O||D?_.LINEAR:_.NEAREST,_.CLAMP_TO_EDGE),B=C.imageAtlasTexture.size}var N=F(C,1,e.transform.zoom),j=L(E.posMatrix,v,y,e.transform,N),U=S(E.posMatrix,v,y,e.transform,N);b&&P(A,E.posMatrix,e,o,j,U,v,c);var V=e.translatePosMatrix(E.posMatrix,C,a,s),Z=b?$i:j,q=e.translatePosMatrix(U,C,a,s,!0),G=void 0;if(z){var H=0!==n.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);G=Ji(R.functionType,d,x,v,e,V,Z,q,o,B,!0),H&&J(I,n,e,f,w,h,p,G),G.u_is_halo=0}else G=Ki(R.functionType,d,x,v,e,V,Z,q,o,B);J(I,n,e,f,w,h,p,G)}}}}function J(t,e,i,n,r,o,a,s){var l=i.context,u=l.gl;n.draw(l,u.TRIANGLES,r,o,a,Ue.disabled,s,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,e.paint,i.transform.zoom,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function X(t,e,i,n,r,o,a){var s,l,u,c,h,p=t.context.gl,f=i.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=i.getCrossfadeParameters();a?(l=d&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=p.LINES):(l=d?"fillPattern":"fill",s=p.TRIANGLES);for(var _=0,g=n;_<g.length;_+=1){var y=g[_],v=e.getTile(y);if(!d||v.patternsLoaded()){var b=v.getBucket(i);if(b){var x=b.programConfigurations.get(i.id),w=t.useProgram(l,x);d&&(t.context.activeTexture.set(p.TEXTURE0),v.imageAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),x.updatePatternPaintBuffers(m));var k=f.constantOr(null);if(k&&v.imageAtlas){var T=v.imageAtlas.patternPositions[k.to],E=v.imageAtlas.patternPositions[k.from];T&&E&&x.setConstantPatternPositions(T,E)}var L=t.translatePosMatrix(y.posMatrix,v,i.paint.get("fill-translate"),i.paint.get("fill-translate-anchor"));if(a){c=b.indexBuffer2,h=b.segments2;var S=[p.drawingBufferWidth,p.drawingBufferHeight];u="fillOutlinePattern"===l&&d?zi(L,t,m,v,S):Mi(L,S)}else c=b.indexBuffer,h=b.segments,u=d?Ii(L,t,m,v):Pi(L);w.draw(t.context,s,r,t.stencilModeForClipping(y),o,Ue.disabled,u,i.id,b.layoutVertexBuffer,c,h,i.paint,t.transform.zoom,x)}}}}function Y(e,i){var n=e.context,r=n.gl,o=i.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!o){var a=new t.Texture(n,{width:e.width,height:e.height,data:null},r.RGBA);a.bind(r.LINEAR,r.CLAMP_TO_EDGE),(o=i.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture)}n.bindFramebuffer.set(o.framebuffer),o.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.Color.transparent}),n.setStencilMode(Fe.disabled),n.setDepthMode(new Ne(r.LEQUAL,Ne.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass())}function Q(t,e,i){var n=e.viewportFrame;if(n){var r=t.context,o=r.gl;r.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,n.colorAttachment.get()),t.useProgram("extrusionTexture").draw(r,o.TRIANGLES,Ne.disabled,Fe.disabled,t.colorModeForRenderPass(),Ue.disabled,Ai(t,i,0),e.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,e.paint,t.transform.zoom)}}function $(t,e,i,n,r,o){var a=t.context,s=a.gl,l=e.fbo;if(l){var u=t.useProgram("hillshade");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,l.colorAttachment.get());var c=Ui(t,e,i);e.maskedBoundsBuffer&&e.maskedIndexBuffer&&e.segments?u.draw(a,s.TRIANGLES,n,r,o,Ue.disabled,c,i.id,e.maskedBoundsBuffer,e.maskedIndexBuffer,e.segments):u.draw(a,s.TRIANGLES,n,r,o,Ue.disabled,c,i.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function tt(e,i,n,r,o,a,s){var l=e.context,u=l.gl;if(i.dem&&i.dem.data){var c=i.dem.dim,h=i.dem.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||e.getTileTexture(i.tileSize),i.demTexture){var p=i.demTexture;p.update(h,{premultiply:!1}),p.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else i.demTexture=new t.Texture(l,h,u.RGBA,{premultiply:!1}),i.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);var f=i.fbo;if(!f){var d=new t.Texture(l,{width:c,height:c,data:null},u.RGBA);d.bind(u.LINEAR,u.CLAMP_TO_EDGE),(f=i.fbo=l.createFramebuffer(c,c)).colorAttachment.set(d.texture)}l.bindFramebuffer.set(f.framebuffer),l.viewport.set([0,0,c,c]),e.useProgram("hillshadePrepare").draw(l,u.TRIANGLES,o,a,s,Ue.disabled,Vi(i,r),n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function et(e,i,n,r,o){var a=r.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=i?(s-i.timeAdded)/a:-1,c=n.getSource(),h=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),p=!i||Math.abs(i.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),f=p&&e.refreshedUponExpiration?1:t.clamp(p?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),i?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function it(e,i,n){var r=e.context,o=r.gl,a=n.posMatrix,s=e.useProgram("debug"),l=Ne.disabled,u=Fe.disabled,c=e.colorModeForRenderPass(),h="$debug";s.draw(r,o.LINE_STRIP,l,u,c,Ue.disabled,Di(a,t.Color.red),h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var p=function(t,e,i,n){n=n||1;var r,o,a,s,l,u,c,h,p=[];for(r=0,o=t.length;r<o;r++)if(l=en[t[r]]){for(h=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?h=null:(u=e+l[1][a]*n,c=200-l[1][a+1]*n,h&&p.push(h.x,h.y,u,c),h={x:u,y:c});e+=l[0]*n}return p}(n.toString(),50,0,5),f=new t.StructArrayLayout2i4,d=new t.StructArrayLayout2ui4,m=0;m<p.length;m+=2)f.emplaceBack(p[m],p[m+1]),d.emplaceBack(m,m+1);for(var _=r.createVertexBuffer(f,bi.members),g=r.createIndexBuffer(d),y=t.SegmentVector.simpleSegment(0,0,f.length/2,f.length/2),v=i.getTile(n).tileSize,b=t.EXTENT/(Math.pow(2,e.transform.zoom-n.overscaledZ)*v),x=[[-1,-1],[-1,1],[1,-1],[1,1]],w=0;w<x.length;w++){var k=x[w];s.draw(r,o.LINES,l,u,c,Ue.disabled,Di(t.translate([],a,[b*k[0],b*k[1],0]),t.Color.white),h,_,g,y)}s.draw(r,o.LINES,l,u,c,Ue.disabled,Di(a,t.Color.black),h,_,g,y)}function nt(t,e){if(t.row>e.row){var i=t;t=e,e=i}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function rt(t,e,i,n,r){var o=Math.max(i,Math.floor(e.y0)),a=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,u=e.dx/e.dy,c=t.dx>0,h=e.dx<0,p=o;p<a;p++){var f=l*Math.max(0,Math.min(t.dy,p+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,p+h-e.y0))+e.x0;r(Math.floor(d),Math.ceil(f),p)}}function ot(t,e,i,n,r,o){var a,s=nt(t,e),l=nt(e,i),u=nt(i,t);s.dy>l.dy&&(a=s,s=l,l=a),s.dy>u.dy&&(a=s,s=u,u=a),l.dy>u.dy&&(a=l,l=u,u=a),s.dy&&rt(u,s,n,r,o),l.dy&&rt(u,l,n,r,o)}function at(t){return t*(2-t)}function st(t){t.parentNode&&t.parentNode.removeChild(t)}function lt(t,e,i){if(t=new Ut(t.lng,t.lat),e){var n=new Ut(t.lng-360,t.lat),r=new Ut(t.lng+360,t.lat),o=i.locationPoint(t).distSqr(e);i.locationPoint(n).distSqr(e)<o?t=n:i.locationPoint(r).distSqr(e)<o&&(t=r)}for(;Math.abs(t.lng-i.center.lng)>180;){var a=i.locationPoint(t);if(a.x>=0&&a.y>=0&&a.x<=i.width&&a.y<=i.height)break;t.lng>i.center.lng?t.lng-=360:t.lng+=360}return t}function ut(t,e,i){var n=t.classList;for(var r in zn)n.remove("mapboxgl-"+i+"-anchor-"+r);n.add("mapboxgl-"+i+"-anchor-"+e)}function ct(t,e,i){var n,r,o,a,s,l,u=i&&i.maxWidth||100,c=t._container.clientHeight/2,h=(n=t.unproject([0,c]),r=t.unproject([u,c]),o=Math.PI/180,a=n.lat*o,s=r.lat*o,l=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((r.lng-n.lng)*o),6371e3*Math.acos(Math.min(l,1)));if(i&&"imperial"===i.unit){var p=3.2808*h;p>5280?ht(e,u,p/5280,"mi"):ht(e,u,p,"ft")}else i&&"nautical"===i.unit?ht(e,u,h/1852,"nm"):ht(e,u,h,"m")}function ht(t,e,i,n){var r,o,a,s=(r=i,(o=Math.pow(10,(""+Math.floor(r)).length-1))*(a=(a=r/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:1)),l=s/i;"m"===n&&s>=1e3&&(s/=1e3,n="km"),t.style.width=e*l+"px",t.innerHTML=s+n}var pt,ft=t.createCommonjsModule(function(t){function e(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,i=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(i);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){return void 0===i[t]&&(i[t]=function(t){var i=document.createElement("canvas"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,i.probablySupportsContext?i.probablySupportsContext("webgl",n)||i.probablySupportsContext("experimental-webgl",n):i.supportsContext?i.supportsContext("webgl",n)||i.supportsContext("experimental-webgl",n):i.getContext("webgl",n)||i.getContext("experimental-webgl",n)}(t)),i[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var i={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),dt={create:function(e,i,n){var r=t.window.document.createElement(e);return i&&(r.className=i),n&&n.appendChild(r),r},createNS:function(e,i){return t.window.document.createElementNS(e,i)}},mt=t.window.document?t.window.document.documentElement.style:null,_t=e(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);dt.disableDrag=function(){mt&&_t&&(pt=mt[_t],mt[_t]="none")},dt.enableDrag=function(){mt&&_t&&(mt[_t]=pt)};var gt=e(["transform","WebkitTransform"]);dt.setTransform=function(t,e){t.style[gt]=e};var yt=!1;try{var vt=Object.defineProperty({},"passive",{get:function(){yt=!0}});t.window.addEventListener("test",vt,vt),t.window.removeEventListener("test",vt,vt)}catch(t){yt=!1}dt.addEventListener=function(t,e,i,n){void 0===n&&(n={}),"passive"in n&&yt?t.addEventListener(e,i,n):t.addEventListener(e,i,n.capture)},dt.removeEventListener=function(t,e,i,n){void 0===n&&(n={}),"passive"in n&&yt?t.removeEventListener(e,i,n):t.removeEventListener(e,i,n.capture)};var bt=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",bt,!0)};dt.suppressClick=function(){t.window.addEventListener("click",bt,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",bt,!0)},0)},dt.mousePos=function(e,i){var n=e.getBoundingClientRect();return i=i.touches?i.touches[0]:i,new t.Point(i.clientX-n.left-e.clientLeft,i.clientY-n.top-e.clientTop)},dt.touchPos=function(e,i){for(var n=e.getBoundingClientRect(),r=[],o="touchend"===i.type?i.changedTouches:i.touches,a=0;a<o.length;a++)r.push(new t.Point(o[a].clientX-n.left-e.clientLeft,o[a].clientY-n.top-e.clientTop));return r},dt.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},dt.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var xt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return 0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":"https://events.mapbox.com/events/v2"},REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},wt="See https://www.mapbox.com/api-documentation/#access-tokens",kt=function(t,e){if(!n(t))return t;var o=r(t);return o.path="/fonts/v1"+o.path,i(o,e)},Tt=function(t,e){if(!n(t))return t;var o=r(t);return o.path="/v4/"+o.authority+".json",o.params.push("secure"),i(o,e)},Et=function(t,e,a,s){var l=r(t);return n(t)?(l.path="/styles/v1"+l.path+"/sprite"+e+a,i(l,s)):(l.path+=""+e+a,o(l))},Lt=/(\.(png|jpg)\d*)(?=$)/,St=function(e,i,a){if(!i||!n(i))return e;var s=r(e),l=t.browser.devicePixelRatio>=2||512===a?"@2x":"",u=t.browser.supportsWebp?".webp":"$1";return s.path=s.path.replace(Lt,""+l+u),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token="+(xt.ACCESS_TOKEN||""))}(s.params),o(s)},Ct=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/,At=function(){this.eventData={anonId:null,lastSuccess:null,accessToken:xt.ACCESS_TOKEN},this.queue=[],this.pending=!1,this.pendingRequest=null};At.prototype.postTurnstileEvent=function(t){xt.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return/(mapbox\.c)(n|om)/i.test(t)})&&this.queueRequest(Date.now())},At.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()},At.prototype.processRequests=function(){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var i="mapbox.turnstileEventData:"+(xt.ACCESS_TOKEN||""),n=t.storageAvailable("localStorage"),a=!!this.eventData.accessToken&&this.eventData.accessToken!==xt.ACCESS_TOKEN;if(a&&(this.eventData.anonId=this.eventData.lastSuccess=null),(!this.eventData.anonId||!this.eventData.lastSuccess)&&n)try{var s=t.window.localStorage.getItem(i);s&&(this.eventData=JSON.parse(s))}catch(e){t.warnOnce("Unable to read from LocalStorage")}t.validateUuid(this.eventData.anonId)||(this.eventData.anonId=t.uuid(),a=!0);var l=this.queue.shift();if(this.eventData.lastSuccess){var u=new Date(this.eventData.lastSuccess),c=new Date(l),h=(l-this.eventData.lastSuccess)/864e5;a=a||h>=1||h<-1||u.getDate()!==c.getDate()}if(!a)return this.processRequests();var p=r(xt.EVENTS_URL);p.params.push("access_token="+(xt.ACCESS_TOKEN||""));var f={url:o(p),headers:{"Content-Type":"text/plain"}},d=JSON.stringify([{event:"appUserTurnstile",created:new Date(l).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"0.50.0","enabled.telemetry":!1,userId:this.eventData.anonId}]);this.pendingRequest=t.postData(f,d,function(r){if(e.pendingRequest=null,!r){if(e.eventData.lastSuccess=l,e.eventData.accessToken=xt.ACCESS_TOKEN,n)try{t.window.localStorage.setItem(i,JSON.stringify(e.eventData))}catch(e){t.warnOnce("Unable to write to LocalStorage")}e.processRequests()}})}};var Pt=new At,It=Pt.postTurnstileEvent.bind(Pt),Mt=function(){this.images={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0};Mt.prototype.isLoaded=function(){return this.loaded},Mt.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,i=this.requestors;e<i.length;e+=1){var n=i[e],r=n.ids,o=n.callback;this._notify(r,o)}this.requestors=[]}},Mt.prototype.getImage=function(t){return this.images[t]},Mt.prototype.addImage=function(t,e){this.images[t]=e},Mt.prototype.removeImage=function(t){delete this.images[t],delete this.patterns[t]},Mt.prototype.listImages=function(){return Object.keys(this.images)},Mt.prototype.getImages=function(t,e){var i=!0;if(!this.isLoaded())for(var n=0,r=t;n<r.length;n+=1){var o=r[n];this.images[o]||(i=!1)}this.isLoaded()||i?this._notify(t,e):this.requestors.push({ids:t,callback:e})},Mt.prototype._notify=function(t,e){for(var i={},n=0,r=t;n<r.length;n+=1){var o=r[n],a=this.images[o];a&&(i[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf})}e(null,i)},Mt.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},Mt.prototype.getPattern=function(e){var i=this.patterns[e];if(i)return i.position;var n=this.getImage(e);if(!n)return null;var r={w:n.data.width+2,h:n.data.height+2,x:0,y:0},o=new t.ImagePosition(r,n);return this.patterns[e]={bin:r,position:o},this._updatePatternAtlas(),o},Mt.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)},Mt.prototype._updatePatternAtlas=function(){var e=[];for(var i in this.patterns)e.push(this.patterns[i].bin);var n=t.potpack(e),r=n.w,o=n.h,a=this.atlasImage;for(var s in a.resize({width:r||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,h=this.images[s].data,p=h.width,f=h.height;t.RGBAImage.copy(h,a,{x:0,y:0},{x:u,y:c},{width:p,height:f}),t.RGBAImage.copy(h,a,{x:0,y:f-1},{x:u,y:c-1},{width:p,height:1}),t.RGBAImage.copy(h,a,{x:0,y:0},{x:u,y:c+f},{width:p,height:1}),t.RGBAImage.copy(h,a,{x:p-1,y:0},{x:u-1,y:c},{width:1,height:f}),t.RGBAImage.copy(h,a,{x:0,y:0},{x:u+p,y:c},{width:1,height:f})}this.dirty=!0};var zt=a,Rt=1e20;a.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),n=0;n<this.size*this.size;n++){var r=e.data[4*n+3]/255;this.gridOuter[n]=1===r?0:0===r?Rt:Math.pow(Math.max(0,.5-r),2),this.gridInner[n]=1===r?Rt:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(s(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),s(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return i};var Bt=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};Bt.prototype.setURL=function(t){this.url=t},Bt.prototype.getGlyphs=function(e,i){var n=this,r=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1){var l=s[a];r.push({stack:o,id:l})}t.asyncAll(r,function(t,e){var i=t.stack,r=t.id,o=n.entries[i];o||(o=n.entries[i]={glyphs:{},requests:{}});var a=o.glyphs[r];if(void 0===a)if(a=n._tinySDF(o,i,r))e(null,{stack:i,id:r,glyph:a});else{var s=Math.floor(r/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else{var l=o.requests[s];l||(l=o.requests[s]=[],Bt.loadGlyphRange(i,s,n.url,n.requestTransform,function(t,e){if(e)for(var i in e)o.glyphs[+i]=e[+i];for(var n=0,r=l;n<r.length;n+=1)(0,r[n])(t,e);delete o.requests[s]})),l.push(function(t,n){t?e(t):n&&e(null,{stack:i,id:r,glyph:n[r]||null})})}}else e(null,{stack:i,id:r,glyph:a})},function(t,e){if(t)i(t);else if(e){for(var n={},r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.stack,l=a.id,u=a.glyph;(n[s]||(n[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}i(null,n)}})},Bt.prototype._tinySDF=function(e,i,n){var r=this.localIdeographFontFamily;if(r&&(t.isChar["CJK Unified Ideographs"](n)||t.isChar["Hangul Syllables"](n))){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 Bt.TinySDF(24,3,8,.25,r,a)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},Bt.loadGlyphRange=function(e,i,n,r,o){var a=256*i,s=a+255,l=r(kt(n).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 n={},r=0,a=t.parseGlyphPBF(i.data);r<a.length;r+=1){var s=a[r];n[s.id]=s}o(null,n)}})},Bt.TinySDF=zt;var Ot=function(){this.specification=t.styleSpec.light.position};Ot.prototype.possiblyEvaluate=function(e,i){return t.sphericalToCartesian(e.expression.evaluate(i))},Ot.prototype.interpolate=function(e,i,n){return{x:t.number(e.x,i.x,n),y:t.number(e.y,i.y,n),z:t.number(e.z,i.z,n)}};var Dt=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new Ot,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),Nt=function(e){function i(i){e.call(this),this._transitionable=new t.Transitionable(Dt),this.setLight(i),this._transitioning=this._transitionable.untransitioned()}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.getLight=function(){return this._transitionable.serialize()},i.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var i in e){var n=e[i];t.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),n):this._transitionable.setValue(i,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){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:i,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},i}(t.Evented),Ft=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};Ft.prototype.getDash=function(t,e){var i=t.join(",")+String(e);return this.positions[i]||(this.positions[i]=this.addDash(t,e)),this.positions[i]},Ft.prototype.addDash=function(e,i){var n=i?7:0,r=2*n+1;if(this.nextRow+r>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];for(var s=this.width/o,l=s/2,u=e.length%2==1,c=-n;c<=n;c++)for(var h=this.nextRow+n+c,p=this.width*h,f=u?-e[e.length-1]:0,d=e[0],m=1,_=0;_<this.width;_++){for(;d<_/s;)f=d,d+=e[m],u&&m===e.length-1&&(d+=e[0]),m++;var g=Math.abs(_-f*s),y=Math.abs(_-d*s),v=Math.min(g,y),b=m%2==1,x=void 0;if(i){var w=n?c/n*(l+1):0;if(b){var k=l-Math.abs(w);x=Math.sqrt(v*v+k*k)}else x=l-Math.sqrt(v*v+w*w)}else x=(b?1:-1)*v;this.data[3+4*(p+_)]=Math.max(0,Math.min(255,x+128))}var T={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:o};return this.nextRow+=r,this.dirty=!0,T},Ft.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.RGBA,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.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var jt=function e(i,n){this.workerPool=i,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var r=this.workerPool.acquire(this.id),o=0;o<r.length;o++){var a=r[o],s=new e.Actor(a,n,this.id);s.name="Worker "+o,this.actors.push(s)}};jt.prototype.broadcast=function(e,i,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,i,n)},n)},jt.prototype.send=function(t,e,i,n){return("number"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,i),n},jt.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},jt.Actor=t.Actor;var Ut=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ut.prototype.wrap=function(){return new Ut(t.wrap(this.lng,-180,180),this.lat)},Ut.prototype.toArray=function(){return[this.lng,this.lat]},Ut.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ut.prototype.toBounds=function(t){var e=360*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new Vt(new Ut(this.lng-i,this.lat-e),new Ut(this.lng+i,this.lat+e))},Ut.convert=function(t){if(t instanceof Ut)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Ut(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Ut(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Vt=function(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]))};Vt.prototype.setNorthEast=function(t){return this._ne=t instanceof Ut?new Ut(t.lng,t.lat):Ut.convert(t),this},Vt.prototype.setSouthWest=function(t){return this._sw=t instanceof Ut?new Ut(t.lng,t.lat):Ut.convert(t),this},Vt.prototype.extend=function(t){var e,i,n=this._sw,r=this._ne;if(t instanceof Ut)e=t,i=t;else{if(!(t instanceof Vt))return Array.isArray(t)?t.every(Array.isArray)?this.extend(Vt.convert(t)):this.extend(Ut.convert(t)):this;if(e=t._sw,i=t._ne,!e||!i)return this}return n||r?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),r.lng=Math.max(i.lng,r.lng),r.lat=Math.max(i.lat,r.lat)):(this._sw=new Ut(e.lng,e.lat),this._ne=new Ut(i.lng,i.lat)),this},Vt.prototype.getCenter=function(){return new Ut((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Vt.prototype.getSouthWest=function(){return this._sw},Vt.prototype.getNorthEast=function(){return this._ne},Vt.prototype.getNorthWest=function(){return new Ut(this.getWest(),this.getNorth())},Vt.prototype.getSouthEast=function(){return new Ut(this.getEast(),this.getSouth())},Vt.prototype.getWest=function(){return this._sw.lng},Vt.prototype.getSouth=function(){return this._sw.lat},Vt.prototype.getEast=function(){return this._ne.lng},Vt.prototype.getNorth=function(){return this._ne.lat},Vt.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Vt.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Vt.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Vt.convert=function(t){return!t||t instanceof Vt?t:new Vt(t)};var Zt=function(t,e,i){this.bounds=Vt.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=i||24};Zt.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]},Zt.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),i=Math.floor(this.latY(this.bounds.getNorth(),t.z)),n=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),r=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<n&&t.y>=i&&t.y<r},Zt.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},Zt.prototype.latY=function(e,i){var n=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),r=Math.pow(2,i)/(2*Math.PI);return Math.pow(2,i-1)+.5*Math.log((1+n)/(1-n))*-r};var qt=function(e){function i(i,n,r,o){if(e.call(this),this.id=i,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=u(this._options,this.map._transformRequest,function(i,n){e._tileJSONRequest=null,i?e.fire(new t.ErrorEvent(i)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new Zt(n.bounds,e.minzoom,e.maxzoom)),It(n.tiles),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},i.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},i.prototype.onAdd=function(t){this.map=t,this.load()},i.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},i.prototype.serialize=function(){return t.extend({},this._options)},i.prototype.loadTile=function(e,i){function n(t,n){return e.aborted?i(null):t&&404!==t.status?i(t):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),i(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}var r=St(e.tileID.canonical.url(this.tiles,this.scheme),this.url),o={request:this.map._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};o.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",o,n.bind(this)):"loading"===e.state?e.reloadCallback=i:this.dispatcher.send("reloadTile",o,n.bind(this),e.workerID)},i.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},i.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},i.prototype.hasTransition=function(){return!1},i}(t.Evented),Gt=function(e){function i(i,n,r,o){e.call(this),this.id=i,this.dispatcher=r,this.setEventedParent(o),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({},n),t.extend(this,t.pick(n,["url","scheme","tileSize"]))}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=u(this._options,this.map._transformRequest,function(i,n){e._tileJSONRequest=null,i?e.fire(new t.ErrorEvent(i)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new Zt(n.bounds,e.minzoom,e.maxzoom)),It(n.tiles),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},i.prototype.onAdd=function(t){this.map=t,this.load()},i.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},i.prototype.serialize=function(){return t.extend({},this._options)},i.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},i.prototype.loadTile=function(e,i){var n=this,r=St(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(r,t.ResourceType.Tile),function(r,o){if(delete e.request,e.aborted)e.state="unloaded",i(null);else if(r)e.state="errored",i(r);else if(o){n.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=n.map.painter.context,s=a.gl;e.texture=n.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",i(null)}})},i.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},i.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},i.prototype.hasTransition=function(){return!1},i}(t.Evented),Ht=function(e){function i(i,n,r,o){e.call(this,i,n,r,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||"mapbox"}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},i.prototype.loadTile=function(e,i){var n=St(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(n,r){if(delete e.request,e.aborted)e.state="unloaded",i(null);else if(n)e.state="errored",i(n);else if(r){this.map._refreshExpiredTiles&&e.setExpiryData(r),delete r.cacheControl,delete r.expires;var o=t.browser.getImageData(r),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.workerID&&"expired"!==e.state||(e.workerID=this.dispatcher.send("loadDEMTile",a,function(t,n){t&&(e.state="errored",i(t)),n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state="loaded",i(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},i.prototype._getNeighboringTiles=function(e){var i=e.canonical,n=Math.pow(2,i.z),r=(i.x-1+n)%n,o=0===i.x?e.wrap-1:e.wrap,a=(i.x+1+n)%n,s=i.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,i.z,r,i.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y).key]={backfilled:!1},i.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,i.z,r,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<n&&(l[new t.OverscaledTileID(e.overscaledZ,o,i.z,r,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},i.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",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)},i}(Gt),Wt=function(e){function i(i,n,r,o){e.call(this),this.id=i,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=r,this.setEventedParent(o),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution);var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*a,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(n.clusterRadius||50)*a,log:!1}},n.workerOptions)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.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 n={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}})},i.prototype.onAdd=function(t){this.map=t,this.load()},i.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 n={dataType:"source",sourceDataType:"content"};i._collectResourceTiming&&i._resourceTiming&&i._resourceTiming.length>0&&(n.resourceTiming=i._resourceTiming,i._resourceTiming=[]),i.fire(new t.Event("data",n))}}),this},i.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},i.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},i.prototype.getClusterLeaves=function(t,e,i,n){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:i},n,this.workerID),this},i.prototype._updateWorkerData=function(e){var i=this,n=t.extend({},this.workerOptions),r=this._data;"string"==typeof r?(n.request=this.map._transformRequest(t.browser.resolveURL(r),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(r),this.workerID=this.dispatcher.send(this.type+".loadData",n,function(t,r){i._removed||r&&r.abandoned||(i._loaded=!0,r&&r.resourceTiming&&r.resourceTiming[i.id]&&(i._resourceTiming=r.resourceTiming[i.id].slice(0)),i.dispatcher.send(i.type+".coalesce",{source:n.source},null,i.workerID),e(t))},this.workerID)},i.prototype.loadTile=function(e,i){var n=this,r=void 0===e.workerID?"loadTile":"reloadTile",o={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};e.workerID=this.dispatcher.send(r,o,function(t,o){return e.unloadVectorData(),e.aborted?i(null):t?i(t):(e.loadVectorData(o,n.map.painter,"reloadTile"===r),i(null))},this.workerID)},i.prototype.abortTile=function(t){t.aborted=!0},i.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},i.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},i.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},i.prototype.hasTransition=function(){return!1},i}(t.Evented),Kt=function(e){function i(t,i,n,r){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=i.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(r),this.options=i}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(e,i){var n=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(r,o){r?n.fire(new t.ErrorEvent(r)):o&&(n.image=t.browser.getImageData(o),e&&(n.coordinates=e),i&&i(),n._finishLoading())})},i.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):this},i.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},i.prototype.onAdd=function(t){this.map=t,this.load()},i.prototype.setCoordinates=function(e){this.coordinates=e;var i=this.map,n=e.map(function(t){return i.transform.locationCoordinate(Ut.convert(t)).zoomTo(0)}),r=this.centerCoord=t.getCoordinatesCenter(n);r.column=Math.floor(r.column),r.row=Math.floor(r.row),this.tileID=new t.CanonicalTileID(r.zoom,r.column,r.row),this.minzoom=this.maxzoom=r.zoom;var o=n.map(function(e){var i=e.zoomTo(r.zoom);return new t.Point(Math.round((i.column-r.column)*t.EXTENT),Math.round((i.row-r.row)*t.EXTENT))});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(o[0].x,o[0].y,0,0),this._boundsArray.emplaceBack(o[1].x,o[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(o[3].x,o[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(o[2].x,o[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},i.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,i=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.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 r=this.tiles[n];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},i.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},i.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return!1},i}(t.Evented),Jt=function(e){function i(t,i,n,r){e.call(this,t,i,n,r),this.roundZoom=!0,this.type="video",this.options=i}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this,i=this.options;this.urls=[];for(var n=0,r=i.urls;n<r.length;n+=1){var o=r[n];e.urls.push(e.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,function(i,n){i?e.fire(new t.ErrorEvent(i)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},i.prototype.getVideo=function(){return this.video},i.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},i.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 n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.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 r=this.tiles[n];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},i.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this.video&&!this.video.paused},i}(Kt),Xt=function(e){function i(i,n,r,o){e.call(this,i,n,r,o),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.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."+i,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+i,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+i,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+i,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."+i,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){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=!1},this._finishLoading())},i.prototype.getCanvas=function(){return this.canvas},i.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},i.prototype.onRemove=function(){this.pause()},i.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,n=i.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.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,n.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[r];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},i.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this._playing},i.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},i}(Kt),Yt={vector:qt,raster:Gt,"raster-dem":Ht,geojson:Wt,video:Jt,image:Kt,canvas:Xt},Qt=function(e,i,n,r){var o=new Yt[i.type](e,i,n,r);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},$t=function(t,e){this.max=t,this.onRemove=e,this.reset()};$t.prototype.reset=function(){for(var t in this.data)for(var e=0,i=this.data[t];e<i.length;e+=1){var n=i[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},$t.prototype.add=function(t,e,i){var n=this,r=t.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);var o={value:e,timeout:void 0};if(void 0!==i&&(o.timeout=setTimeout(function(){n.remove(t,o)},i)),this.data[r].push(o),this.order.push(r),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},$t.prototype.has=function(t){return t.wrapped().key in this.data},$t.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},$t.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},$t.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},$t.prototype.remove=function(t,e){if(!this.has(t))return this;var i=t.wrapped().key,n=void 0===e?0:this.data[i].indexOf(e),r=this.data[i][n];return this.data[i].splice(n,1),r.timeout&&clearTimeout(r.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(r.value),this.order.splice(this.order.indexOf(i),1),this},$t.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};var te=function(t,e,i){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};te.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},te.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},te.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var ee={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},ie=function(t,e,i,n){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var r=t.gl;this.buffer=r.createBuffer(),t.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ie.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ie.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},ie.prototype.enableAttributes=function(t,e){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=e.attributes[n.name];void 0!==r&&t.enableVertexAttribArray(r)}},ie.prototype.setVertexAttribPointers=function(t,e,i){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],o=e.attributes[r.name];void 0!==o&&t.vertexAttribPointer(o,r.components,t[ee[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))}},ie.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var ne=function(e){this.context=e,this.default=t.Color.transparent,this.current=this.default,this.dirty=!1};ne.prototype.get=function(){return this.current},ne.prototype.setDefault=function(){this.set(this.default)},ne.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a&&!0!==this.dirty||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)};var re=function(t){this.context=t,this.default=1,this.current=this.default,this.dirty=!1};re.prototype.get=function(){return this.current},re.prototype.setDefault=function(){this.set(this.default)},re.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.clearDepth(t),this.current=t,this.dirty=!1)};var oe=function(t){this.context=t,this.default=0,this.current=this.default,this.dirty=!1};oe.prototype.get=function(){return this.current},oe.prototype.setDefault=function(){this.set(this.default)},oe.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.clearStencil(t),this.current=t,this.dirty=!1)};var ae=function(t){this.context=t,this.default=[!0,!0,!0,!0],this.current=this.default,this.dirty=!1};ae.prototype.get=function(){return this.current},ae.prototype.setDefault=function(){this.set(this.default)},ae.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&!0!==this.dirty||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)};var se=function(t){this.context=t,this.default=!0,this.current=this.default,this.dirty=!1};se.prototype.get=function(){return this.current},se.prototype.setDefault=function(){this.set(this.default)},se.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.depthMask(t),this.current=t,this.dirty=!1)};var le=function(t){this.context=t,this.default=255,this.current=this.default,this.dirty=!1};le.prototype.get=function(){return this.current},le.prototype.setDefault=function(){this.set(this.default)},le.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.stencilMask(t),this.current=t,this.dirty=!1)};var ue=function(t){this.context=t,this.default={func:t.gl.ALWAYS,ref:0,mask:255},this.current=this.default,this.dirty=!1};ue.prototype.get=function(){return this.current},ue.prototype.setDefault=function(){this.set(this.default)},ue.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask&&!0!==this.dirty||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)};var ce=function(t){this.context=t;var e=this.context.gl;this.default=[e.KEEP,e.KEEP,e.KEEP],this.current=this.default,this.dirty=!1};ce.prototype.get=function(){return this.current},ce.prototype.setDefault=function(){this.set(this.default)},ce.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&!0!==this.dirty||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)};var he=function(t){this.context=t,this.default=!1,this.current=this.default,this.dirty=!1};he.prototype.get=function(){return this.current},he.prototype.setDefault=function(){this.set(this.default)},he.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}};var pe=function(t){this.context=t,this.default=[0,1],this.current=this.default,this.dirty=!1};pe.prototype.get=function(){return this.current},pe.prototype.setDefault=function(){this.set(this.default)},pe.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&!0!==this.dirty||(this.context.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)};var fe=function(t){this.context=t,this.default=!1,this.current=this.default,this.dirty=!1};fe.prototype.get=function(){return this.current},fe.prototype.setDefault=function(){this.set(this.default)},fe.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}};var de=function(t){this.context=t,this.default=t.gl.LESS,this.current=this.default,this.dirty=!1};de.prototype.get=function(){return this.current},de.prototype.setDefault=function(){this.set(this.default)},de.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.depthFunc(t),this.current=t,this.dirty=!1)};var me=function(t){this.context=t,this.default=!1,this.current=this.default,this.dirty=!1};me.prototype.get=function(){return this.current},me.prototype.setDefault=function(){this.set(this.default)},me.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}};var _e=function(t){this.context=t;var e=this.context.gl;this.default=[e.ONE,e.ZERO],this.current=this.default,this.dirty=!1};_e.prototype.get=function(){return this.current},_e.prototype.setDefault=function(){this.set(this.default)},_e.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&!0!==this.dirty||(this.context.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)};var ge=function(e){this.context=e,this.default=t.Color.transparent,this.current=this.default,this.dirty=!1};ge.prototype.get=function(){return this.current},ge.prototype.setDefault=function(){this.set(this.default)},ge.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a&&!0!==this.dirty||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)};var ye=function(t){this.context=t,this.default=this.context.gl.FUNC_ADD,this.current=this.default,this.dirty=!1};ye.prototype.get=function(){return this.current},ye.prototype.setDefault=function(){this.set(this.default)},ye.prototype.set=function(t){t===this.current&&!0!==this.dirty||(this.context.gl.blendEquation(t),this.current=t,this.dirty=!1)};var ve=function(t){this.context=t,this.default=!1,this.current=this.default,this.dirty=!1};ve.prototype.get=function(){return this.current},ve.prototype.setDefault=function(){this.set(this.default)},ve.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}};var be=function(t){this.context=t;var e=this.context.gl;this.default=e.BACK,this.current=this.default,this.dirty=!1};be.prototype.get=function(){return this.current},be.prototype.setDefault=function(){this.set(this.default)},be.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.cullFace(t),this.current=t,this.dirty=!1)};var xe=function(t){this.context=t;var e=this.context.gl;this.default=e.CCW,this.current=this.default,this.dirty=!1};xe.prototype.get=function(){return this.current},xe.prototype.setDefault=function(){this.set(this.default)},xe.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.frontFace(t),this.current=t,this.dirty=!1)};var we=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};we.prototype.get=function(){return this.current},we.prototype.setDefault=function(){this.set(this.default)},we.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.useProgram(t),this.current=t,this.dirty=!1)};var ke=function(t){this.context=t,this.default=t.gl.TEXTURE0,this.current=this.default,this.dirty=!1};ke.prototype.get=function(){return this.current},ke.prototype.setDefault=function(){this.set(this.default)},ke.prototype.set=function(t){this.current===t&&!0!==this.dirty||(this.context.gl.activeTexture(t),this.current=t,this.dirty=!1)};var Te=function(t){this.context=t;var e=this.context.gl;this.default=[0,0,e.drawingBufferWidth,e.drawingBufferHeight],this.current=this.default,this.dirty=!1};Te.prototype.get=function(){return this.current},Te.prototype.setDefault=function(){this.set(this.default)},Te.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&!0!==this.dirty||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)};var Ee=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};Ee.prototype.get=function(){return this.current},Ee.prototype.setDefault=function(){this.set(this.default)},Ee.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}};var Le=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};Le.prototype.get=function(){return this.current},Le.prototype.setDefault=function(){this.set(this.default)},Le.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}};var Se=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};Se.prototype.get=function(){return this.current},Se.prototype.setDefault=function(){this.set(this.default)},Se.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}};var Ce=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};Ce.prototype.get=function(){return this.current},Ce.prototype.setDefault=function(){this.set(this.default)},Ce.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}};var Ae=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};Ae.prototype.get=function(){return this.current},Ae.prototype.setDefault=function(){this.set(this.default)},Ae.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1};var Pe=function(t){this.context=t,this.default=null,this.current=this.default,this.dirty=!1};Pe.prototype.get=function(){return this.current},Pe.prototype.setDefault=function(){this.set(this.default)},Pe.prototype.set=function(t){(this.current!==t&&this.context.extVertexArrayObject||!0===this.dirty)&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t,this.dirty=!1)};var Ie=function(t){this.context=t,this.default=4,this.current=this.default,this.dirty=!1};Ie.prototype.get=function(){return this.current},Ie.prototype.setDefault=function(){this.set(this.default)},Ie.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}};var Me=function(t){this.context=t,this.default=!1,this.current=this.default,this.dirty=!1};Me.prototype.get=function(){return this.current},Me.prototype.setDefault=function(){this.set(this.default)},Me.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}};var ze=function(t){this.context=t,this.default=!1,this.current=this.default,this.dirty=!1};ze.prototype.get=function(){return this.current},ze.prototype.setDefault=function(){this.set(this.default)},ze.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}};var Re=function(t,e){this.context=t,this.default=null,this.current=this.default,this.dirty=!1,this.parent=e};Re.prototype.get=function(){return this.current};var Be=function(t){function e(e,i){t.call(this,e,i),this.dirty=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDefault=function(){this.set(this.default)},e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(Re),Oe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDefault=function(){this.set(this.default)},e.prototype.set=function(t){if(this.current!==t||!0===this.dirty){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(Re),De=function(t,e,i){this.context=t,this.width=e,this.height=i;var n=t.gl,r=this.framebuffer=n.createFramebuffer();this.colorAttachment=new Be(t,r),this.depthAttachment=new Oe(t,r)};De.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var i=this.depthAttachment.get();i&&t.deleteRenderbuffer(i),t.deleteFramebuffer(this.framebuffer)};var Ne=function(t,e,i){this.func=t,this.mask=e,this.range=i};Ne.ReadOnly=!1,Ne.ReadWrite=!0,Ne.disabled=new Ne(519,Ne.ReadOnly,[0,1]);var Fe=function(t,e,i,n,r,o){this.test=t,this.ref=e,this.mask=i,this.fail=n,this.depthFail=r,this.pass=o};Fe.disabled=new Fe({func:519,mask:0},0,0,7680,7680,7680);var je=function(t,e,i){this.blendFunction=t,this.blendColor=e,this.mask=i};je.Replace=[1,0],je.disabled=new je(je.Replace,t.Color.transparent,[!1,!1,!1,!1]),je.unblended=new je(je.Replace,t.Color.transparent,[!0,!0,!0,!0]),je.alphaBlended=new je([1,771],t.Color.transparent,[!0,!0,!0,!0]);var Ue=function(t,e,i){this.enable=t,this.mode=e,this.frontFace=i};Ue.disabled=new Ue(!1,1029,2305),Ue.backCCW=new Ue(!0,1029,2305);var Ve=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new ne(this),this.clearDepth=new re(this),this.clearStencil=new oe(this),this.colorMask=new ae(this),this.depthMask=new se(this),this.stencilMask=new le(this),this.stencilFunc=new ue(this),this.stencilOp=new ce(this),this.stencilTest=new he(this),this.depthRange=new pe(this),this.depthTest=new fe(this),this.depthFunc=new de(this),this.blend=new me(this),this.blendFunc=new _e(this),this.blendColor=new ge(this),this.blendEquation=new ye(this),this.cullFace=new ve(this),this.cullFaceSide=new be(this),this.frontFace=new xe(this),this.program=new we(this),this.activeTexture=new ke(this),this.viewport=new Te(this),this.bindFramebuffer=new Ee(this),this.bindRenderbuffer=new Le(this),this.bindTexture=new Se(this),this.bindVertexBuffer=new Ce(this),this.bindElementBuffer=new Ae(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Pe(this),this.pixelStoreUnpack=new Ie(this),this.pixelStoreUnpackPremultiplyAlpha=new Me(this),this.pixelStoreUnpackFlipY=new ze(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")};Ve.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},Ve.prototype.createIndexBuffer=function(t,e){return new te(this,t,e)},Ve.prototype.createVertexBuffer=function(t,e,i){return new ie(this,t,e,i)},Ve.prototype.createRenderbuffer=function(t,e,i){var n=this.gl,r=n.createRenderbuffer();return this.bindRenderbuffer.set(r),n.renderbufferStorage(n.RENDERBUFFER,t,e,i),this.bindRenderbuffer.set(null),r},Ve.prototype.createFramebuffer=function(t,e){return new De(this,t,e)},Ve.prototype.clear=function(t){var e=t.color,i=t.depth,n=this.gl,r=0;e&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(r|=n.DEPTH_BUFFER_BIT,this.clearDepth.set(i),this.depthMask.set(!0)),n.clear(r)},Ve.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))},Ve.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)},Ve.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)},Ve.prototype.setColorMode=function(e){t.isEqual(e.blendFunction,je.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},Ve.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ze=function(e){function i(i,n,r){var o=this;e.call(this),this.id=i,this.dispatcher=r,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))}),this.on("error",function(){o._sourceErrored=!0}),this._source=Qt(i,n,r,this),this._tiles={},this._cache=new $t(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},i.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},i.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},i.prototype.getSource=function(){return this._source},i.prototype.pause=function(){this._paused=!0},i.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)}},i.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},i.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},i.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},i.prototype.serialize=function(){return this._source.serialize()},i.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)this._tiles[e].upload(t)},i.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(f)},i.prototype.getRenderableIds=function(e){var i=this,n=[];for(var r in i._tiles)i._isIdRenderable(+r,e)&&n.push(+r);return e?n.sort(function(e,n){var r=i._tiles[e].tileID,o=i._tiles[n].tileID,a=new t.Point(r.canonical.x,r.canonical.y)._rotate(i.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(i.transform.angle);return r.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}):n.sort(f)},i.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},i.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},i.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")},i.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)))},i.prototype._tileLoaded=function(e,i,n,r){if(r)return e.state="errored",void(404!==r.status?this._source.fire(new t.ErrorEvent(r,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===n&&(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}))},i.prototype._backfillDEM=function(t){function e(t,e){t.needsHillshadePrepare=!0;var i=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,r=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===i&&0===n||Math.abs(n)>1||(Math.abs(i)>1&&(1===Math.abs(i+r)?i+=r:1===Math.abs(i-r)&&(i-=r)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,i,n),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}for(var i=this.getRenderableIds(),n=0;n<i.length;n++){var r=i[n];if(t.neighboringTiles&&t.neighboringTiles[r]){var o=this.getTileByID(r);e(t,o),e(o,t)}}},i.prototype.getTile=function(t){return this.getTileByID(t.key)},i.prototype.getTileByID=function(t){return this._tiles[t]},i.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},i.prototype._retainLoadedChildren=function(t,e,i,n){for(var r in this._tiles){var o=this._tiles[r];if(!(n[r]||!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]){n[a.key]=a;break}}}},i.prototype.findLoadedParent=function(t,e){for(var i=t.overscaledZ-1;i>=e;i--){var n=t.scaledTo(i);if(!n)return;var r=String(n.key),o=this._tiles[r];if(o&&o.hasData())return o;if(this._cache.has(n))return this._cache.get(n)}},i.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),i=Math.floor(5*e),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(n)},i.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,i=Math.round(e);if(this._prevLng=t,i){var n={};for(var r in this._tiles){var o=this._tiles[r];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+i),n[o.tileID.key]=o}for(var a in this._tiles=n,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},i.prototype.update=function(e){var n=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 n._source.hasTile(t)}))):r=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),a=Math.max(o-i.maxOverzooming,this._source.minzoom),s=Math.max(o+i.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(r,o);if(d(this._source.type)){for(var u={},c={},h=0,p=Object.keys(l);h<p.length;h+=1){var f=p[h],m=l[f],_=n._tiles[f];if(_&&!(_.fadeEndTime&&_.fadeEndTime<=t.browser.now())){var g=n.findLoadedParent(m,a);g&&(n._addTile(g.tileID),u[g.tileID.key]=g.tileID),c[f]=m}}for(var y in this._retainLoadedChildren(c,o,s,l),u)l[y]||(n._coveredTiles[y]=!0,l[y]=u[y])}for(var v in l)n._tiles[v].clearFadeHold();for(var b=0,x=t.keysDifference(this._tiles,l);b<x.length;b+=1){var w=x[b],k=n._tiles[w];k.hasSymbolBuckets&&!k.holdingForFade()?k.setHoldDuration(n.map._fadeDuration):k.hasSymbolBuckets&&!k.symbolFadeFinished()||n._removeTile(w)}}},i.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},i.prototype._updateRetainedTiles=function(t,e){for(var n={},r={},o=Math.max(e-i.maxOverzooming,this._source.minzoom),a=Math.max(e+i.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],h=this._addTile(c);n[c.key]=c,h.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,a,n);for(var p=0,f=t;p<f.length;p+=1){var d=f[p],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var _=d.children(this._source.maxzoom)[0],g=this.getTile(_);if(g&&g.hasData()){n[_.key]=_;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var v=m.wasRequested(),b=d.overscaledZ-1;b>=o;--b){var x=d.scaledTo(b);if(r[x.key])break;if(r[x.key]=!0,!(m=this.getTile(x))&&v&&(m=this._addTile(x)),m&&(n[x.key]=x,v=m.wasRequested(),m.hasData()))break}}}return n},i.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 n=Boolean(i);return n||(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,n||this._source.fire(new t.Event("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i):null},i.prototype._setTileReloadTimer=function(t,e){var i=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){i._reloadTile(t,"expired"),delete i._timers[t]},n))},i.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]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},i.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},i.prototype.tilesIn=function(e,i){for(var n=[],r=this.getIds(),o=1/0,a=1/0,s=-1/0,l=-1/0,u=e[0].zoom,c=0;c<e.length;c++){var h=e[c];o=Math.min(o,h.column),a=Math.min(a,h.row),s=Math.max(s,h.column),l=Math.max(l,h.row)}for(var f=0;f<r.length;f++){var d=this._tiles[r[f]];if(!d.holdingForFade()){var m=d.tileID,_=Math.pow(2,this.transform.zoom-d.tileID.overscaledZ),g=i*d.queryPadding*t.EXTENT/d.tileSize/_,y=[p(m,new t.Coordinate(o,a,u)),p(m,new t.Coordinate(s,l,u))];if(y[0].x-g<t.EXTENT&&y[0].y-g<t.EXTENT&&y[1].x+g>=0&&y[1].y+g>=0){for(var v=[],b=0;b<e.length;b++)v.push(p(m,e[b]));n.push({tile:d,tileID:m,queryGeometry:[v],scale:_})}}}return n},i.prototype.getVisibleCoordinates=function(t){for(var e=this,i=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),n=0,r=i;n<r.length;n+=1){var o=r[n];o.posMatrix=e.transform.calculatePosMatrix(o.toUnwrapped())}return i},i.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(d(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},i.prototype.setFeatureState=function(t,e,i){t=t||"_geojsonTileLayer",this._state.updateState(t,e,i)},i.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},i}(t.Evented);Ze.maxOverzooming=10,Ze.maxUnderzooming=3;var qe,Ge=function(){this.active={}};Ge.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Ge.workerCount;)this.workers.push(new m);return this.active[t]=!0,this.workers.slice()},Ge.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},Ge.workerCount=Math.max(Math.floor(t.browser.hardwareConcurrency/2),1);var He={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"},We=function(t,e,i){var n=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(t/i),this.yCellCount=Math.ceil(e/i);for(var o=0;o<this.xCellCount*this.yCellCount;o++)n.push([]),r.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};We.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},We.prototype.insert=function(t,e,i,n,r){this._forEachCell(e,i,n,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},We.prototype.insertCircle=function(t,e,i,n){this._forEachCell(e-n,i-n,e+n,i+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(i),this.circles.push(n)},We.prototype._insertBoxCell=function(t,e,i,n,r,o){this.boxCells[r].push(o)},We.prototype._insertCircleCell=function(t,e,i,n,r,o){this.circleCells[r].push(o)},We.prototype._query=function(t,e,i,n,r,o){if(i<0||t>this.width||n<0||e>this.height)return!r&&[];var a=[];if(t<=0&&e<=0&&this.width<=i&&this.height<=n){if(r)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],h=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-h,y1:c-h,x2:u+h,y2:c+h})}return o?a.filter(o):a}var p={hitTest:r,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,i,n,this._queryCell,a,p,o),r?a.length>0:a},We.prototype._queryCircle=function(t,e,i,n,r){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!n&&[];var u=[],c={hitTest:n,circle:{x:t,y:e,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),n?u.length>0:u},We.prototype.query=function(t,e,i,n,r){return this._query(t,e,i,n,!1,r)},We.prototype.hitTest=function(t,e,i,n,r){return this._query(t,e,i,n,!0,r)},We.prototype.hitTestCircle=function(t,e,i,n){return this._queryCircle(t,e,i,!0,n)},We.prototype._queryCell=function(t,e,i,n,r,o,a,s){var l=a.seenUids,u=this.boxCells[r];if(null!==u)for(var c=this.bboxes,h=0,p=u;h<p.length;h+=1){var f=p[h];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&i>=c[d+0]&&n>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[r];if(null!==m)for(var _=this.circles,g=0,y=m;g<y.length;g+=1){var v=y[g];if(!l.circle[v]){l.circle[v]=!0;var b=3*v;if(this._circleAndRectCollide(_[b],_[b+1],_[b+2],t,e,i,n)&&(!s||s(this.circleKeys[v]))){if(a.hitTest)return o.push(!0),!0;var x=_[b],w=_[b+1],k=_[b+2];o.push({key:this.circleKeys[v],x1:x-k,y1:w-k,x2:x+k,y2:w+k})}}}},We.prototype._queryCellCircle=function(t,e,i,n,r,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c)for(var h=this.bboxes,p=0,f=c;p<f.length;p+=1){var d=f[p];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,h[m+0],h[m+1],h[m+2],h[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var _=this.circleCells[r];if(null!==_)for(var g=this.circles,y=0,v=_;y<v.length;y+=1){var b=v[y];if(!u.circle[b]){u.circle[b]=!0;var x=3*b;if(this._circlesCollide(g[x],g[x+1],g[x+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[b])))return o.push(!0),!0}}},We.prototype._forEachCell=function(t,e,i,n,r,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(n),p=l;p<=c;p++)for(var f=u;f<=h;f++){var d=this.xCellCount*f+p;if(r.call(this,t,e,i,n,d,o,a,s))return}},We.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},We.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},We.prototype._circlesCollide=function(t,e,i,n,r,o){var a=n-t,s=r-e,l=i+o;return l*l>a*a+s*s},We.prototype._circleAndRectCollide=function(t,e,i,n,r,o,a){var s=(o-n)/2,l=Math.abs(t-(n+s));if(l>s+i)return!1;var u=(a-r)/2,c=Math.abs(e-(r+u));if(c>u+i)return!1;if(l<=s||c<=u)return!0;var h=l-s,p=c-u;return h*h+p*p<=i*i};var Ke=t.properties.layout,Je=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]),Xe=function(t,e,i){void 0===e&&(e=new We(t.width+200,t.height+200,25)),void 0===i&&(i=new We(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};Xe.prototype.placeCollisionBox=function(t,e,i,n,r){var o=this.projectAndGetPerspectiveRatio(n,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,r)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},Xe.prototype.approximateTileDistance=function(t,e,i,n,r){var o=r?1:n/this.pitchfactor,a=t.lastSegmentViewportDistance*i;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},Xe.prototype.placeCollisionCircles=function(e,i,n,r,o,a,s,l,u,c,h,p,f){var d=[],m=this.projectAnchor(u,o.anchorX,o.anchorY),_=l/24,g=o.lineOffsetX*l,y=o.lineOffsetY*l,v=new t.Point(o.anchorX,o.anchorY),b=I(_,s,g,y,!1,C(v,c).point,v,o,a,c,{},!0),x=!1,w=!1,k=!0,T=m.perspectiveRatio*r,E=1/(r*n),L=0,S=0;b&&(L=this.approximateTileDistance(b.first.tileDistance,b.first.angle,E,m.cameraDistance,p),S=this.approximateTileDistance(b.last.tileDistance,b.last.angle,E,m.cameraDistance,p));for(var A=0;A<e.length;A+=5){var P=e[A],M=e[A+1],z=e[A+2],R=e[A+3];if(!b||R<-L||R>S)N(e,A,!1);else{var B=this.projectPoint(u,P,M),O=z*T;if(d.length>0){var D=B.x-d[d.length-4],F=B.y-d[d.length-3];if(O*O*2>D*D+F*F&&A+8<e.length){var j=e[A+8];if(j>-L&&j<S){N(e,A,!1);continue}}}var U=A/5;d.push(B.x,B.y,O,U),N(e,A,!0);var V=B.x-O,Z=B.y-O,q=B.x+O,G=B.y+O;if(k=k&&this.isOffscreen(V,Z,q,G),w=w||this.isInsideGrid(V,Z,q,G),!i&&this.grid.hitTestCircle(B.x,B.y,O,f)){if(!h)return{circles:[],offscreen:!1};x=!0}}}return{circles:x||!w?[]:d,offscreen:k}},Xe.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var i=[],n=1/0,r=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);n=Math.min(n,c.x),r=Math.min(r,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),i.push(c)}for(var h={},p={},f=0,d=this.grid.query(n,r,o,a).concat(this.ignoredGrid.query(n,r,o,a));f<d.length;f+=1){var m=d[f],_=m.key;if(void 0===h[_.bucketInstanceId]&&(h[_.bucketInstanceId]={}),!h[_.bucketInstanceId][_.featureIndex]){var g=[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,g)&&(h[_.bucketInstanceId][_.featureIndex]=!0,void 0===p[_.bucketInstanceId]&&(p[_.bucketInstanceId]=[]),p[_.bucketInstanceId].push(_.featureIndex))}}return p},Xe.prototype.insertCollisionBox=function(t,e,i,n,r){var o={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},Xe.prototype.insertCollisionCircles=function(t,e,i,n,r){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:i,featureIndex:n,collisionGroupID:r},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},Xe.prototype.projectAnchor=function(t,e,i){var n=[e,i,0,1];return D(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},Xe.prototype.projectPoint=function(e,i,n){var r=[i,n,0,1];return D(r,r,e),new t.Point((r[0]/r[3]+1)/2*this.transform.width+100,(-r[1]/r[3]+1)/2*this.transform.height+100)},Xe.prototype.projectAndGetPerspectiveRatio=function(e,i,n){var r=[i,n,0,1];return D(r,r,e),{point:new t.Point((r[0]/r[3]+1)/2*this.transform.width+100,(-r[1]/r[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/r[3]*.5}},Xe.prototype.isOffscreen=function(t,e,i,n){return i<100||t>=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},Xe.prototype.isInsideGrid=function(t,e,i,n){return i>=0&&t<this.gridRightBoundary&&n>=0&&e<this.gridBottomBoundary};var Ye=function(t,e,i,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&i?1:0,this.placed=i};Ye.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var Qe=function(t,e,i,n,r){this.text=new Ye(t?t.text:null,e,i,r),this.icon=new Ye(t?t.icon:null,e,n,r)};Qe.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var $e=function(t,e,i){this.text=t,this.icon=e,this.skipFade=i},ti=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};ti.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]};var ei=function(t,e,i){this.transform=t.clone(),this.collisionIndex=new Xe(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new ti(i)};ei.prototype.placeLayerTile=function(e,i,n,r){var o=i.getBucket(e),a=i.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=i.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),c=i.tileSize/t.EXTENT,h=this.transform.calculatePosMatrix(i.tileID.toUnwrapped()),p=L(h,"map"===l.get("text-pitch-alignment"),"map"===l.get("text-rotation-alignment"),this.transform,F(i,1,this.transform.zoom)),f=L(h,"map"===l.get("icon-pitch-alignment"),"map"===l.get("icon-rotation-alignment"),this.transform,F(i,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new function(t,e,i,n,r){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=i,this.bucketIndex=n,this.tileID=r}(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,i.tileID),this.placeLayerBucket(o,h,p,f,u,c,n,i.holdingForFade(),r,s)}},ei.prototype.placeLayerBucket=function(e,i,n,r,o,a,s,l,u,c){var h=e.layers[0].layout,p=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,t.properties.layout.properties["text-size"]),f=h.get("text-optional"),d=h.get("icon-optional"),m=h.get("text-allow-overlap"),_=h.get("icon-allow-overlap"),g=m&&(_||!e.hasIconData()||d),y=_&&(m||!e.hasTextData()||f),v=this.collisionGroups.get(e.sourceID);!e.collisionArrays&&c&&e.deserializeCollisionBoxes(c);for(var b=0;b<e.symbolInstances.length;b++){var x=e.symbolInstances.get(b);if(!u[x.crossTileID]){if(l){this.placements[x.crossTileID]=new $e(!1,!1,!1);continue}var w=!1,k=!1,T=!0,E=null,L=null,S=null,C=0,A=0,P=e.collisionArrays[b];P.textFeatureIndex&&(C=P.textFeatureIndex),P.textBox&&(w=(E=this.collisionIndex.placeCollisionBox(P.textBox,h.get("text-allow-overlap"),a,i,v.predicate)).box.length>0,T=T&&E.offscreen);var I=P.textCircles;if(I){var M=e.text.placedSymbolArray.get(x.horizontalPlacedTextSymbolIndex),z=t.evaluateSizeForFeature(e.textSizeData,p,M);L=this.collisionIndex.placeCollisionCircles(I,h.get("text-allow-overlap"),o,a,M,e.lineVertexArray,e.glyphOffsetArray,z,i,n,s,"map"===h.get("text-pitch-alignment"),v.predicate),w=h.get("text-allow-overlap")||L.circles.length>0,T=T&&L.offscreen}P.iconFeatureIndex&&(A=P.iconFeatureIndex),P.iconBox&&(k=(S=this.collisionIndex.placeCollisionBox(P.iconBox,h.get("icon-allow-overlap"),a,i,v.predicate)).box.length>0,T=T&&S.offscreen);var R=f||0===x.numGlyphVertices&&0===x.numVerticalGlyphVertices,B=d||0===x.numIconVertices;R||B?B?R||(k=k&&w):w=k&&w:k=w=k&&w,w&&E&&this.collisionIndex.insertCollisionBox(E.box,h.get("text-ignore-placement"),e.bucketInstanceId,C,v.ID),k&&S&&this.collisionIndex.insertCollisionBox(S.box,h.get("icon-ignore-placement"),e.bucketInstanceId,A,v.ID),w&&L&&this.collisionIndex.insertCollisionCircles(L.circles,h.get("text-ignore-placement"),e.bucketInstanceId,C,v.ID),this.placements[x.crossTileID]=new $e(w||g,k||y,T||e.justReloaded),u[x.crossTileID]=!0}}e.justReloaded=!1},ei.prototype.commit=function(t,e){this.commitTime=e;var i=!1,n=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,r=t?t.opacities:{};for(var o in this.placements){var a=this.placements[o],s=r[o];s?(this.opacities[o]=new Qe(s,n,a.text,a.icon),i=i||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new Qe(null,n,a.text,a.icon,a.skipFade),i=i||a.text||a.icon)}for(var l in r){var u=r[l];if(!this.opacities[l]){var c=new Qe(u,n,!1,!1);c.isHidden()||(this.opacities[l]=c,i=i||u.text.placed||u.icon.placed)}}i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},ei.prototype.updateLayerOpacities=function(t,e){for(var i={},n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,i,o.collisionBoxArray)}},ei.prototype.updateBucketOpacities=function(t,e,i){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();var n=t.layers[0].layout,r=new Qe(null,0,!1,!1,!0),o=n.get("text-allow-overlap"),a=n.get("icon-allow-overlap"),s=new Qe(null,0,o&&(a||!t.hasIconData()||n.get("icon-optional")),a&&(o||!t.hasTextData()||n.get("text-optional")),!0);!t.collisionArrays&&i&&(t.hasCollisionBoxData()||t.hasCollisionCircleData())&&t.deserializeCollisionBoxes(i);for(var l=0;l<t.symbolInstances.length;l++){var u=t.symbolInstances.get(l),c=e[u.crossTileID],h=this.opacities[u.crossTileID];c?h=r:h||(h=s,this.opacities[u.crossTileID]=h),e[u.crossTileID]=!0;var p=u.numGlyphVertices>0||u.numVerticalGlyphVertices>0,f=u.numIconVertices>0;if(p){for(var d=U(h.text),m=(u.numGlyphVertices+u.numVerticalGlyphVertices)/4,_=0;_<m;_++)t.text.opacityVertexArray.emplaceBack(d);t.text.placedSymbolArray.get(u.horizontalPlacedTextSymbolIndex).hidden=h.text.isHidden(),u.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(u.verticalPlacedTextSymbolIndex).hidden=h.text.isHidden())}if(f){for(var g=U(h.icon),y=0;y<u.numIconVertices/4;y++)t.icon.opacityVertexArray.emplaceBack(g);t.icon.placedSymbolArray.get(l).hidden=h.icon.isHidden()}if(t.hasCollisionBoxData()||t.hasCollisionCircleData()){var v=t.collisionArrays[l];if(v){v.textBox&&j(t.collisionBox.collisionVertexArray,h.text.placed,!1),v.iconBox&&j(t.collisionBox.collisionVertexArray,h.icon.placed,!1);var b=v.textCircles;if(b&&t.hasCollisionCircleData())for(var x=0;x<b.length;x+=5){var w=c||0===b[x+4];j(t.collisionCircle.collisionVertexArray,h.text.placed,w)}}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},ei.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},ei.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},ei.prototype.stillRecent=function(t){return"undefined"!==this.commitTime&&this.commitTime+this.fadeDuration>t},ei.prototype.setStale=function(){this.stale=!0};var ii=Math.pow(2,25),ni=Math.pow(2,24),ri=Math.pow(2,17),oi=Math.pow(2,16),ai=Math.pow(2,9),si=Math.pow(2,8),li=Math.pow(2,1),ui=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};ui.prototype.continuePlacement=function(t,e,i,n,r){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(n,o,i,this._seenCrossTileIDs),this._currentTileIndex++,r())return!0}};var ci=function(t,e,i,n,r,o){this.placement=new ei(t,r,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=n,this._done=!1};ci.prototype.isDone=function(){return this._done},ci.prototype.continuePlacement=function(e,i,n){for(var r=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!r._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=i[e[r._currentPlacementIndex]],l=r.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(r._inProgressLayer||(r._inProgressLayer=new ui),r._inProgressLayer.continuePlacement(n[s.source],r.placement,r._showCollisionBoxes,s,a))return;delete r._inProgressLayer}r._currentPlacementIndex--}this._done=!0},ci.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var hi=512/t.EXTENT/2,pi=function(t,e,i){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=i;for(var n=0;n<e.length;n++){var r=e.get(n),o=r.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:r.crossTileID,coord:this.getScaledCoordinates(r,t)})}};pi.prototype.getScaledCoordinates=function(e,i){var n=i.canonical.z-this.tileID.canonical.z,r=hi/Math.pow(2,n);return{x:Math.floor((i.canonical.x*t.EXTENT+e.anchorX)*r),y:Math.floor((i.canonical.y*t.EXTENT+e.anchorY)*r)}},pi.prototype.findMatches=function(t,e,i){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),r=0;r<t.length;r++){var o=t.get(r);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)<=n&&Math.abs(c.coord.y-s.y)<=n&&!i[c.crossTileID]){i[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};var fi=function(){this.maxCrossTileID=0};fi.prototype.generate=function(){return++this.maxCrossTileID};var di=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};di.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var i in this.indexes){var n=this.indexes[i],r={};for(var o in n){var a=n[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),r[a.tileID.key]=a}this.indexes[i]=r}this.lng=t},di.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 n=0;n<e.symbolInstances.length;n++)e.symbolInstances.get(n).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var r=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,r)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,r)}}for(var c=0;c<e.symbolInstances.length;c++){var h=e.symbolInstances.get(c);h.crossTileID||(h.crossTileID=i.generate(),r[h.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new pi(t,e.symbolInstances,e.bucketInstanceId),!0},di.prototype.removeBucketCrossTileIDs=function(t,e){for(var i in e.indexedSymbolInstances)for(var n=0,r=e.indexedSymbolInstances[i];n<r.length;n+=1){var o=r[n];delete this.usedCrossTileIDs[t][o.crossTileID]}},di.prototype.removeStaleBuckets=function(t){var e=!1;for(var i in this.indexes){var n=this.indexes[i];for(var r in n)t[n[r].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,n[r]),delete n[r],e=!0)}return e};var mi=function(){this.layerIndexes={},this.crossTileIDs=new fi,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};mi.prototype.addLayer=function(t,e,i){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new di);var r=!1,o={};n.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),n.addBucket(l.tileID,u,this.crossTileIDs)&&(r=!0),o[u.bucketInstanceId]=!0)}return n.removeStaleBuckets(o)&&(r=!0),r},mi.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 _i=function(e,i){return t.emitValidationErrors(e,i&&i.filter(function(t){return"source.canvas"!==t.identifier}))},gi=t.pick(He,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),yi=t.pick(He,["setCenter","setZoom","setBearing","setPitch"]),vi=function(e){function o(i,n){var r=this;void 0===n&&(n={}),e.call(this),this.map=i,this.dispatcher=new jt((qe||(qe=new Ge),qe),this),this.imageManager=new Mt,this.glyphManager=new Bt(i._transformRequest,n.localIdeographFontFamily),this.lineAtlas=new Ft(256,512),this.crossTileSymbolIndex=new mi,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._resetUpdates();var a=this;this._rtlTextPluginCallback=o.registerForPluginAvailability(function(t){for(var e in a.dispatcher.broadcast("loadRTLTextPlugin",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].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)}}}})}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.loadURL=function(e,o){var a=this;void 0===o&&(o={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var s="boolean"==typeof o.validate?o.validate:!n(e);e=function(t,e){if(!n(t))return t;var o=r(t);return o.path="/styles/v1"+o.path,i(o,e)}(e,o.accessToken);var l=this.map._transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(l,function(e,i){a._request=null,e?a.fire(new t.ErrorEvent(e)):i&&a._load(i,s)})},o.prototype.loadJSON=function(e,i){var n=this;void 0===i&&(i={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){n._request=null,n._load(e,!1!==i.validate)})},o.prototype._load=function(e,i){var n=this;if(!i||!_i(this,t.validateStyle(e))){for(var r in this._loaded=!0,this.stylesheet=e,e.sources)n.addSource(r,e.sources[r],{validate:!1});e.sprite?this._spriteRequest=function(e,i,n){function r(){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,h=l.x,p=l.y,f=l.sdf,d=l.pixelRatio,m=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,m,{x:h,y:p},{x:0,y:0},{width:u,height:c}),i[r]={data:m,pixelRatio:d,sdf:f}}n(null,i)}}var o,a,s,l=t.browser.devicePixelRatio>1?"@2x":"",u=t.getJSON(i(Et(e,l,".json"),t.ResourceType.SpriteJSON),function(t,e){u=null,s||(s=t,o=e,r())}),c=t.getImage(i(Et(e,l,".png"),t.ResourceType.SpriteImage),function(t,e){c=null,s||(s=t,a=e,r())});return{cancel:function(){u&&(u.cancel(),u=null),c&&(c.cancel(),c=null)}}}(e.sprite,this.map._transformRequest,function(e,i){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(i)for(var r in i)n.imageManager.addImage(r,i[r]);n.imageManager.setLoaded(!0),n.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=g(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var a=0,s=o;a<s.length;a+=1){var l=s[a];(l=t.createStyleLayer(l)).setEventedParent(n,{layer:{id:l.id}}),n._layers[l.id]=l}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new Nt(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},o.prototype._validateLayer=function(e){var i=this.sourceCaches[e.source];if(i){var n=e.sourceLayer;if(n){var r=i.getSource();("geojson"===r.type||r.vectorLayerIds&&-1===r.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+r.id+'" as specified by style layer "'+e.id+'"')))}}},o.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()},o.prototype._serializeLayers=function(t){for(var e=[],i=0,n=t;i<n.length;i+=1){var r=n[i],o=this._layers[r];"custom"!==o.type&&e.push(o.serialize())}return e},o.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},o.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},o.prototype.update=function(e){if(this._loaded){if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var r in(i.length||n.length)&&this._updateWorkerLayers(i,n),this._updatedSources){var o=this._updatedSources[r];"reload"===o?this._reloadSource(r):"clear"===o&&this._clearSource(r)}for(var a in this._updatedPaintProps)this._layers[a].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event("data",{dataType:"style"}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,u=this._order;l<u.length;l+=1){var c=u[l],h=this._layers[c];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},o.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},o.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},o.prototype.setState=function(e){var i=this;if(this._checkLoaded(),_i(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=g(e.layers);var n=E(this.serialize(),e).filter(function(t){return!(t.command in yi)});if(0===n.length)return!1;var r=n.filter(function(t){return!(t.command in gi)});if(r.length>0)throw new Error("Unimplemented: "+r.map(function(t){return t.command}).join(", ")+".");return n.forEach(function(t){"setTransition"!==t.command&&i[t.command].apply(i,t.args)}),this.stylesheet=e,!0},o.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.fire(new t.Event("data",{dataType:"style"}))},o.prototype.getImage=function(t){return this.imageManager.getImage(t)},o.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.fire(new t.Event("data",{dataType:"style"}))},o.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},o.prototype.addSource=function(e,i,n){var r=this;if(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(!(["vector","raster","geojson","video","image"].indexOf(i.type)>=0)||!this._validate(t.validateStyle.source,"sources."+e,i,null,n)){this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Ze(e,i,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:r.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},o.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 n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},o.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},o.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},o.prototype.addLayer=function(e,i,n){this._checkLoaded();var r=e.id;if(this.getLayer(r))this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" already exists on this map')));else{var o;if("custom"===e.type){if(_i(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(r,e.source),e=t.clone(e),e=t.extend(e,{source:r})),this._validate(t.validateStyle.layer,"layers."+r,e,{arrayIndex:-1},n))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:r}})}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,r),this._layerOrderChanged=!0,this._layers[r]=o,this._removedLayers[r]&&o.source&&"custom"!==o.type){var s=this._removedLayers[r];delete this._removedLayers[r],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)}}},o.prototype.moveLayer=function(e,i){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==i){var n=this._order.indexOf(e);this._order.splice(n,1);var r=i?this._order.indexOf(i):this._order.length;i&&-1===r?this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.'))):(this._order.splice(r,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.")))},o.prototype.removeLayer=function(e){this._checkLoaded();var i=this._layers[e];if(i){i.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[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.")))},o.prototype.getLayer=function(t){return this._layers[t]},o.prototype.setLayerZoomRange=function(e,i,n){this._checkLoaded();var r=this.getLayer(e);r?r.minzoom===i&&r.maxzoom===n||(null!=i&&(r.minzoom=i),null!=n&&(r.maxzoom=n),this._updateLayer(r)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},o.prototype.setFilter=function(e,i){this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.isEqual(n.filter,i))return null===i||void 0===i?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",i)||(n.filter=t.clone(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.")))},o.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},o.prototype.setLayoutProperty=function(e,i,n){this._checkLoaded();var r=this.getLayer(e);r?t.isEqual(r.getLayoutProperty(i),n)||(r.setLayoutProperty(i,n),this._updateLayer(r)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},o.prototype.setPaintProperty=function(e,i,n){this._checkLoaded();var r=this.getLayer(e);r?t.isEqual(r.getPaintProperty(i),n)||(r.setPaintProperty(i,n)&&this._updateLayer(r),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.")))},o.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},o.prototype.setFeatureState=function(e,i){this._checkLoaded();var n=e.source,r=e.sourceLayer,o=this.sourceCaches[n],a=parseInt(e.id,10);void 0!==o?"vector"!==o.getSource().type||r?isNaN(a)||a<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):o.setFeatureState(r,a,i):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types."))):this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},o.prototype.getFeatureState=function(e){this._checkLoaded();var i=e.source,n=e.sourceLayer,r=this.sourceCaches[i],o=parseInt(e.id,10);if(void 0!==r)if("vector"!==r.getSource().type||n){if(!(isNaN(o)||o<0))return r.getFeatureState(n,o);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else 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.")))},o.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},o.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})},o.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},o.prototype._flattenRenderedFeatures=function(t){for(var e=[],i=this._order.length-1;i>=0;i--)for(var n=this._order[i],r=0,o=t;r<o.length;r+=1){var a=o[r][n];if(a)for(var s=0,l=a;s<l.length;s+=1){var u=l[s];e.push(u)}}return e},o.prototype.queryRenderedFeatures=function(e,i,n){i&&i.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",i.filter);var r={};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."))),[];r[l.source]=!0}}var u=[],p=e.map(function(t){return n.pointCoordinate(t)});for(var f in this.sourceCaches)i.layers&&!r[f]||u.push(c(this.sourceCaches[f],this._layers,p,i,n));return this.placement&&u.push(function(t,e,i,n,r,o){for(var a={},s=r.queryRenderedSymbols(i),l=[],u=0,c=Object.keys(s).map(Number);u<c.length;u+=1){var p=c[u];l.push(o[p])}l.sort(h);for(var f=0,d=l;f<d.length;f+=1)!function(){var e=d[f],i=e.featureIndex.lookupSymbolFeatures(s[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,n.filter,n.layers,t);for(var r in i){var o=a[r]=a[r]||[],l=i[r];l.sort(function(t,i){var n=e.featureSortOrder;if(n){var r=n.indexOf(t.featureIndex);return n.indexOf(i.featureIndex)-r}return i.featureIndex-t.featureIndex});for(var u=0,c=l;u<c.length;u+=1){var h=c[u];o.push(h.feature)}}}();for(var m in a)!function(i){a[i].forEach(function(n){var r=t[i],o=e[r.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})}(m);return a}(this._layers,this.sourceCaches,e,i,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(u)},o.prototype.querySourceFeatures=function(e,i){i&&i.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",i.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var i=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],r={},o=0;o<i.length;o++){var a=i[o],s=a.tileID.canonical.key;r[s]||(r[s]=!0,a.querySourceFeatures(n,e))}return n}(n,i):[]},o.prototype.addSourceType=function(t,e,i){return o.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(o.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},o.prototype.getLight=function(){return this.light.getLight()},o.prototype.setLight=function(e){this._checkLoaded();var i=this.light.getLight(),n=!1;for(var r in e)if(!t.isEqual(e[r],i[r])){n=!0;break}if(n){var o={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},o.prototype._validate=function(e,i,n,r,o){return(!o||!1!==o.validate)&&_i(this,e.call(t.validateStyle,t.extend({key:i,style:this.serialize(),value:n,styleSpec:t.styleSpec},r)))},o.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("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},o.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},o.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},o.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},o.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},o.prototype._updatePlacement=function(e,i,n,r){for(var o=!1,a=!1,s={},l=0,u=this._order;l<u.length;l+=1){var c=u[l],h=this._layers[c];if("symbol"===h.type){if(!s[h.source]){var p=this.sourceCaches[h.source];s[h.source]=p.getRenderableIds(!0).map(function(t){return p.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var f=this.crossTileSymbolIndex.addLayer(h,s[h.source],e.center.lng);o=o||f}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now()))&&(this.pauseablePlacement=new ci(e,this._order,d,i,n,r),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,t.browser.now()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(var m=0,_=this._order;m<_.length;m+=1){var g=_[m],y=this._layers[g];"symbol"===y.type&&this.placement.updateLayerOpacities(y,s[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},o.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},o.prototype.getImages=function(t,e,i){this.imageManager.getImages(e.icons,i)},o.prototype.getGlyphs=function(t,e,i){this.glyphManager.getGlyphs(e.stacks,i)},o}(t.Evented);vi.getSourceType=function(t){return Yt[t]},vi.setSourceType=function(t,e){Yt[t]=e},vi.registerForPluginAvailability=t.registerForPluginAvailability;var bi=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),xi={prelude:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_color(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n"},background:{fragmentSource:"uniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},backgroundPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n 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);\n 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);\n}\n"},circle:{fragmentSource:"#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\n\nvarying vec3 v_data;\n\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\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius / (radius + stroke_width)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\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\n\nvarying vec3 v_data;\n\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\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n if (u_pitch_with_map) {\n vec2 corner_position = circle_center;\n if (u_scale_with_map) {\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n } else {\n // Pitching the circle with the map effectively scales it with the map\n // To counteract the effect for pitch-scale: viewport, we rescale the\n // whole circle based on the pitch scaling effect at its central point\n vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n }\n\n gl_Position = u_matrix * vec4(corner_position, 0, 1);\n } else {\n gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n if (u_scale_with_map) {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n } else {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n }\n }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n"},clippingMask:{fragmentSource:"void main() {\n gl_FragColor = vec4(1.0);\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},heatmap:{fragmentSource:"#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\nvarying vec2 v_extrude;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n #pragma mapbox: initialize highp float weight\n\n // Kernel density estimation with a Gaussian kernel of size 5x5\n float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n #pragma mapbox: initialize highp float weight\n #pragma mapbox: initialize mediump float radius\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use\n // it to produce the vertices of a square mesh framing the point feature\n // we're adding to the kernel density texture. We'll also pass it as\n // a varying, so that the fragment shader can determine the distance of\n // each fragment from the point feature.\n // Before we do so, we need to scale it up sufficiently so that the\n // kernel falls effectively to zero at the edge of the mesh.\n // That is, we want to know S such that\n // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n // Which solves to:\n // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n // Pass the varying in units of radius\n v_extrude = S * unscaled_extrude;\n\n // Scale by radius and the zoom-based scale factor to produce actual\n // mesh position\n vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n gl_Position = u_matrix * pos;\n}\n"},heatmapTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n float t = texture2D(u_image, v_pos).r;\n vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},collisionBox:{fragmentSource:"\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Red = collision, hide label\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n"},collisionCircle:{fragmentSource:"uniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n float alpha = 0.5;\n\n // Red = collision, hide label\n vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n color *= .2;\n }\n\n float extrude_scale_length = length(v_extrude_scale);\n float extrude_length = length(v_extrude) * extrude_scale_length;\n float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"\nuniform vec2 u_texsize;\nuniform sampler2D u_image;\nuniform float u_fade;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\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\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n gl_FragColor = mix(color1, color2, u_fade) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform vec4 u_scale;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\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\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, a_pos);\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\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\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_fade) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform vec4 u_scale;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\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\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileZoomRatio, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\nuniform float u_vertical_gradient;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize highp float base\n #pragma mapbox: initialize highp float height\n #pragma mapbox: initialize highp vec4 color\n\n vec3 normal = a_normal_ed.xyz;\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\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\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\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_fade);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_height_factor;\nuniform vec4 u_scale;\nuniform float u_vertical_gradient;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\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\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\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec3 normal = a_normal_ed.xyz;\n float edgedistance = a_normal_ed.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},hillshadePrepare:{fragmentSource:"#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture2D(u_image, coord) * 255.0;\n return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\n}\n\nvoid main() {\n vec2 epsilon = 1.0 / u_dimension;\n\n // queried pixels:\n // +-----------+\n // | | | |\n // | a | b | c |\n // | | | |\n // +-----------+\n // | | | |\n // | d | e | f |\n // | | | |\n // +-----------+\n // | | | |\n // | g | h | i |\n // | | | |\n // +-----------+\n\n float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n float e = getElevation(v_pos, 0.0);\n float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n // here we divide the x and y slopes by 8 * pixel size\n // where pixel size (aka meters/pixel) is:\n // circumference of the world / (pixels per tile * number of tiles)\n // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n // we want to vertically exaggerate the hillshading though, because otherwise\n // it is barely noticeable at low zooms. to do this, we multiply this by some\n // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n // Here we use a=0.3 which works out to the expression below. see \n // nickidlugash's awesome breakdown for more info\n // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n vec2 deriv = vec2(\n (c + f + f + i) - (a + d + d + g),\n (g + h + h + i) - (a + b + b + c)\n ) / pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n gl_FragColor = clamp(vec4(\n deriv.x / 2.0 + 0.5,\n deriv.y / 2.0 + 0.5,\n 1.0,\n 1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\n}\n"},hillshade:{fragmentSource:"uniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n vec4 pixel = texture2D(u_image, v_pos);\n\n vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n // to account for mercator projection distortion. see #4807 for details\n float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n // We also multiply the slope by an arbitrary z-factor of 1.25\n float slope = atan(1.25 * length(deriv) / scaleFactor);\n float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n float intensity = u_light.x;\n // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n float azimuth = u_light.y + PI;\n\n // We scale the slope exponentially based on intensity, using a calculation similar to\n // the exponential interpolation function in the style spec:\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n // so that higher intensity values create more opaque hillshading.\n float base = 1.875 - intensity * 1.75;\n float maxValue = 0.5 * PI;\n float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n // so that the accent color's rate of change eases in while the shade color's eases out.\n float accent = cos(scaledSlope);\n // We multiply both the accent and shade color by a clamped intensity value\n // so that intensities >= 0.5 do not additionally affect the color values\n // while intensity values < 0.5 make the overall color more transparent.\n vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = a_texture_pos / 8192.0;\n}\n"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_linesofar;\n\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\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\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n"},lineGradient:{fragmentSource:"\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\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\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\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform vec2 u_gl_units_to_pixels;\nuniform mediump float u_ratio;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\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 vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\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 mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n // float tileRatio = u_scale.y;\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\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\n\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\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\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\n\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\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp float segment_angle = -a_projected_pos[2];\n\n float size;\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 256.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 256.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n\n v_tex = a_tex / u_texsize;\n vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\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\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\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\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n lowp float dist = texture2D(u_texture, tex).a;\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\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\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\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\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 256.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 256.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n float gamma_scale = gl_Position.w;\n\n vec2 tex = a_tex / u_texsize;\n vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = vec2(tex.x, tex.y);\n v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n"}},wi=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g;for(var ki in xi)!function(t){var e=xi[t],i={};e.fragmentSource=e.fragmentSource.replace(wi,function(t,e,n,r,o){return i[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+n+" "+r+" "+o+";\n#else\nuniform "+n+" "+r+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+n+" "+r+" "+o+" = u_"+o+";\n#endif\n"}),e.vertexSource=e.vertexSource.replace(wi,function(t,e,n,r,o){var a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return i[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\nvarying "+n+" "+r+" "+o+";\n#else\nuniform "+n+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+n+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+n+" "+r+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\n#else\nuniform "+n+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+r+" "+o+" = a_"+o+";\n#else\n "+n+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+r+" "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+n+" "+r+" "+o+" = u_"+o+";\n#endif\n"})}(ki);var Ti=xi,Ei=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Ei.prototype.bind=function(t,e,i,n,r,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,u=0;!l&&u<n.length;u++)this.boundPaintVertexBuffers[u]!==n[u]&&(l=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==i||l||this.boundIndexBuffer!==r||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,i,n,r,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),r&&r.dynamicDraw&&r.bind(),s&&s.bind())},Ei.prototype.freshBind=function(t,e,i,n,r,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=n,this.boundVertexOffset=r,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var h=l;h<s;h++)c.disableVertexAttribArray(h)}e.enableAttributes(c,t);for(var p=0,f=i;p<f.length;p+=1)f[p].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,r);for(var d=0,m=i;d<m.length;d+=1){var _=m[d];_.bind(),_.setVertexAttribPointers(c,t,r)}o&&(o.bind(),o.setVertexAttribPointers(c,t,r)),n&&n.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,r)),u.currentNumAttributes=l},Ei.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Li=function(e,i,n,r,o){var a=e.gl;this.program=a.createProgram();var s=n.defines().concat("#define DEVICE_PIXEL_RATIO "+t.browser.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var l=s.concat(Ti.prelude.fragmentSource,i.fragmentSource).join("\n"),u=s.concat(Ti.prelude.vertexSource,i.vertexSource).join("\n"),c=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(c,l),a.compileShader(c),a.attachShader(this.program,c);var h=a.createShader(a.VERTEX_SHADER);a.shaderSource(h,u),a.compileShader(h),a.attachShader(this.program,h);for(var p=n.layoutAttributes||[],f=0;f<p.length;f++)a.bindAttribLocation(this.program,f,p[f].name);a.linkProgram(this.program),this.numAttributes=a.getProgramParameter(this.program,a.ACTIVE_ATTRIBUTES),this.attributes={};for(var d={},m=0;m<this.numAttributes;m++){var _=a.getActiveAttrib(this.program,m);_&&(this.attributes[_.name]=a.getAttribLocation(this.program,_.name))}for(var g=a.getProgramParameter(this.program,a.ACTIVE_UNIFORMS),y=0;y<g;y++){var v=a.getActiveUniform(this.program,y);v&&(d[v.name]=a.getUniformLocation(this.program,v.name))}this.fixedUniforms=r(e,d),this.binderUniforms=n.getUniforms(e,d)};Li.prototype.draw=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f,d,m){var _,g=t.gl;for(var y in t.program.set(this.program),t.setDepthMode(i),t.setStencilMode(n),t.setColorMode(r),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[y].set(a[y]);f&&f.setUniforms(t,this.binderUniforms,h,{zoom:p});for(var v=(_={},_[g.LINES]=2,_[g.TRIANGLES]=3,_[g.LINE_STRIP]=1,_)[e],b=0,x=c.get();b<x.length;b+=1){var w=x[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new Ei)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,w.vertexOffset,d,m),g.drawElements(e,w.primitiveLength*v,g.UNSIGNED_SHORT,w.primitiveOffset*v*2)}};var Si=function(e,i,n){var r=i.style.light,o=r.properties.get("position"),a=[o.x,o.y,o.z],s=t.create$2();"viewport"===r.properties.get("anchor")&&t.fromRotation(s,-i.transform.angle),t.transformMat3(a,a,s);var l=r.properties.get("color");return{u_matrix:e,u_lightpos:a,u_lightintensity:r.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+n}},Ci=function(e,i,n,r,o,a){return t.extend(Si(e,i,n),V(o,i,a),{u_height_factor:-Math.pow(2,r.overscaledZ)/a.tileSize/8})},Ai=function(e,i,n){var r=t.create();t.ortho(r,0,e.width,e.height,0,0,1);var o=e.context.gl;return{u_matrix:r,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_opacity:i}},Pi=function(t){return{u_matrix:t}},Ii=function(e,i,n,r){return t.extend(Pi(e),V(n,i,r))},Mi=function(t,e){return{u_matrix:t,u_world:e}},zi=function(e,i,n,r,o){return t.extend(Ii(e,i,n,r),{u_world:o})},Ri=function(t,e,i,n){var r,o,a=t.transform;if("map"===n.paint.get("circle-pitch-alignment")){var s=F(i,1,a.zoom);r=!0,o=[s,s]}else r=!1,o=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,i,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+r,u_extrude_scale:o}},Bi=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)}},Oi=function(t,e,i){var n=F(i,1,e.zoom),r=Math.pow(2,e.zoom-i.tileID.overscaledZ),o=i.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*r),e.pixelsToGLUnits[1]/(n*r)],u_overscale_factor:o}},Di=function(t,e){return{u_matrix:t,u_color:e}},Ni=function(t){return{u_matrix:t}},Fi=function(t,e,i,n){return{u_matrix:t,u_extrude_scale:F(e,1,i),u_intensity:n}},ji=function(e,i,n,r){var o=t.create();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:n,u_color_ramp:r,u_opacity:i.paint.get("heatmap-opacity")}},Ui=function(e,i,n){var r=n.paint.get("hillshade-shadow-color"),o=n.paint.get("hillshade-highlight-color"),a=n.paint.get("hillshade-accent-color"),s=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);return"viewport"===n.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle),{u_matrix:e.transform.calculatePosMatrix(i.tileID.toUnwrapped(),!0),u_image:0,u_latrange:function(e,i){var n=i.toCoordinate(),r=new t.Coordinate(n.column,n.row+1,n.zoom);return[e.transform.coordinateLocation(n).lat,e.transform.coordinateLocation(r).lat]}(e,i.tileID),u_light:[n.paint.get("hillshade-exaggeration"),s],u_shadow:r,u_highlight:o,u_accent:a}},Vi=function(e,i){var n=e.dem.dim,r=t.create();return t.ortho(r,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(r,r,[0,-t.EXTENT,0]),{u_matrix:r,u_image:1,u_dimension:[2*n,2*n],u_zoom:e.tileID.overscaledZ,u_maxzoom:i}},Zi=function(t,e,i){var n=t.transform;return{u_matrix:q(t,e,i),u_ratio:1/F(e,1,n.zoom),u_gl_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}},qi=function(e,i,n){return t.extend(Zi(e,i,n),{u_image:0})},Gi=function(e,i,n,r){var o=e.transform,a=Z(i,o);return{u_matrix:q(e,i,n),u_texsize:i.imageAtlasTexture.size,u_ratio:1/F(i,1,o.zoom),u_image:0,u_scale:[t.browser.devicePixelRatio,a,r.fromScale,r.toScale],u_fade:r.t,u_gl_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Hi=function(e,i,n,r,o){var a=e.transform,s=e.lineAtlas,l=Z(i,a),u="round"===n.layout.get("line-cap"),c=s.getDash(r.from,u),h=s.getDash(r.to,u),p=c.width*o.fromScale,f=h.width*o.toScale;return t.extend(Zi(e,i,n),{u_patternscale_a:[l/p,-c.height/2],u_patternscale_b:[l/f,-h.height/2],u_sdfgamma:s.width/(256*Math.min(p,f)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:h.y,u_mix:o.t})},Wi=function(t,e,i,n,r){return{u_matrix:t,u_tl_parent:e,u_scale_parent:i,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:r.paint.get("raster-brightness-min"),u_brightness_high:r.paint.get("raster-brightness-max"),u_saturation_factor:(a=r.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=r.paint.get("raster-contrast"),o>0?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]}(r.paint.get("raster-hue-rotate"))};var o,a},Ki=function(t,e,i,n,r,o,a,s,l,u){var c=r.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:r.options.fadeDuration?r.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_gl_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Ji=function(e,i,n,r,o,a,s,l,u,c,h){var p=o.transform;return t.extend(Ki(e,i,n,r,o,a,s,l,u,c),{u_gamma_scale:r?Math.cos(p._pitch)*p.cameraToCenterDistance:1,u_is_halo:+h})},Xi=function(t,e,i){return{u_matrix:t,u_opacity:e,u_color:i}},Yi=function(e,i,n,r,o,a){return t.extend(function(t,e,i,n){var r=i.imageManager.getPattern(t.from),o=i.imageManager.getPattern(t.to),a=i.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,i.transform.tileZoom)/u,h=c*(n.tileID.canonical.x+n.tileID.wrap*u),p=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:r.tl,u_pattern_br_a:r.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:r.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/F(n,1,i.transform.tileZoom),u_pixel_coord_upper:[h>>16,p>>16],u_pixel_coord_lower:[65535&h,65535&p]}}(r,a,n,o),{u_matrix:e,u_opacity:i})},Qi={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)}},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.Uniform4f(e,i.u_scale),u_fade:new t.Uniform1f(e,i.u_fade)}},extrusionTexture: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_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.Uniform4f(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.Uniform4f(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_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},collisionBox:Bi,collisionCircle:Bi,debug:function(e,i){return{u_color:new t.UniformColor(e,i.u_color),u_matrix:new t.UniformMatrix4f(e,i.u_matrix)}},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)}},line:function(e,i){return{u_matrix:new t.UniformMatrix4f(e,i.u_matrix),u_ratio:new t.Uniform1f(e,i.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,i.u_gl_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_gl_units_to_pixels:new t.Uniform2f(e,i.u_gl_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_image:new t.Uniform1i(e,i.u_image),u_gl_units_to_pixels:new t.Uniform2f(e,i.u_gl_units_to_pixels),u_scale:new t.Uniform4f(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_gl_units_to_pixels:new t.Uniform2f(e,i.u_gl_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),u_gl_coord_matrix:new t.UniformMatrix4f(e,i.u_gl_coord_matrix),u_is_text:new t.Uniform1f(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_gl_coord_matrix:new t.UniformMatrix4f(e,i.u_gl_coord_matrix),u_is_text:new t.Uniform1f(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_is_halo:new t.Uniform1f(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)}}},$i=t.identity(new Float32Array(16)),tn=t.properties.layout,en={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment