text: (window.webpackJsonpReactMapboxGlLeaflet=window.webpackJsonpReactMapboxGlLeaflet||[]).push([[1],[function(t,e,n){"use strict";t.exports=n(19)},function(t,e,n){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",function(){return i})},function(t,e,n){
  /* @preserve
   * Leaflet 1.4.0, a JS library for interactive maps. http://leafletjs.com
   * (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
   */
  !function(t){"use strict";var e=Object.freeze;function n(t){var e,n,i,r;for(n=1,i=arguments.length;n<i;n++)for(e in r=arguments[n])t[e]=r[e];return t}Object.freeze=function(t){return t};var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function r(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function a(t){return t._leaflet_id=t._leaflet_id||++o,t._leaflet_id}function s(t,e,n){var i,r,o,a;return a=function(){i=!1,r&&(o.apply(n,r),r=!1)},o=function(){i?r=arguments:(t.apply(n,arguments),setTimeout(a,e),i=!0)}}function l(t,e,n){var i=e[1],r=e[0],o=i-r;return t===i&&n?t:((t-r)%o+o)%o+r}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function p(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function h(t){return p(t).split(/\s+/)}function f(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function d(t,e,n){var i=[];for(var r in t)i.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_-]+) *\}/g;function y(t,e){return t.replace(m,function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}var _=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var b=0;function w(t){var e=+new Date,n=Math.max(0,16-(e-b));return b=e+n,window.setTimeout(t,n)}var E=window.requestAnimationFrame||x("RequestAnimationFrame")||w,T=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function S(t,e,n){if(!n||E!==w)return E.call(window,r(t,e));t.call(e)}function P(t){t&&T.call(window,t)}var C=(Object.freeze||Object)({freeze:e,extend:n,create:i,bind:r,lastId:o,stamp:a,throttle:s,wrapNum:l,falseFn:u,formatNum:c,trim:p,splitWords:h,setOptions:f,getParamString:d,template:y,isArray:_,indexOf:g,emptyImageUrl:v,requestFn:E,cancelFn:T,requestAnimFrame:S,cancelAnimFrame:P});function k(){}k.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=e.__super__=this.prototype,o=i(r);for(var a in o.constructor=e,e.prototype=o,this)this.hasOwnProperty(a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=_(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)}}(t.includes),n.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=n(i(o.options),t.options)),n(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},k.include=function(t){return n(this.prototype,t),this},k.mergeOptions=function(t){return n(this.prototype.options,t),this},k.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var A={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else{t=h(t);for(var r=0,o=t.length;r<o;r++)this._on(t[r],e,n)}return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=h(t);for(var r=0,o=t.length;r<o;r++)this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var r={fn:e,ctx:n},o=i,a=0,s=o.length;a<s;a++)if(o[a].fn===e&&o[a].ctx===n)return;o.push(r)},_off:function(t,e,n){var i,r,o;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(r=0,o=i.length;r<o;r++){var a=i[r];if(a.ctx===n&&a.fn===e)return a.fn=u,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(r,1)}}else{for(r=0,o=i.length;r<o;r++)i[r].fn=u;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var r=n({},e,{type:t,target:this,sourceTarget:e&&e.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 i&&this._propagateEvent(r),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var o=r(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[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var z=k.extend(A);function M(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var I=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,e,n){return t instanceof M?t:_(t)?new M(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new M(t.x,t.y):new M(t,e,n)}function D(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i<r;i++)this.extend(n[i])}function R(t,e){return!t||t instanceof D?t:new D(t,e)}function B(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i<r;i++)this.extend(n[i])}function F(t,e){return t instanceof B?t:new B(t,e)}function N(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function U(t,e,n){return t instanceof N?t:_(t)&&"object"!=typeof t[0]?3===t.length?new N(t[0],t[1],t[2]):2===t.length?new N(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new N(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new N(t,e,n)}M.prototype={clone:function(){return new M(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(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 M(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new M(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=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},D.prototype={extend:function(t){return t=O(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 M((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new M(this.min.x,this.max.y)},getTopRight:function(){return new M(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,n;return(t="number"==typeof t[0]||t instanceof M?O(t):R(t))instanceof D?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>=e.x&&i.x<=n.x,a=r.y>=e.y&&i.y<=n.y;return o&&a},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>e.x&&i.x<n.x,a=r.y>e.y&&i.y<n.y;return o&&a},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,n,i=this._southWest,r=this._northEast;if(t instanceof N)e=t,n=t;else{if(!(t instanceof B))return t?this.extend(U(t)||F(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||r?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new N(e.lat,e.lng),this._northEast=new N(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,r=Math.abs(e.lng-n.lng)*t;return new B(new N(e.lat-i,e.lng-r),new N(n.lat+i,n.lng+r))},getCenter:function(){return new N((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 N(this.getNorth(),this.getWest())},getSouthEast:function(){return new N(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 N||"lat"in t?U(t):F(t);var e,n,i=this._southWest,r=this._northEast;return t instanceof B?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=F(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&i.lat<=n.lat,a=r.lng>=e.lng&&i.lng<=n.lng;return o&&a},overlaps:function(t){t=F(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&i.lat<n.lat,a=r.lng>e.lng&&i.lng<n.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=F(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},N.prototype={equals:function(t,e){if(!t)return!1;t=U(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return n<=(void 0===e?1e-9:e)},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return Z.distance(this,U(t))},wrap:function(){return Z.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return F([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new N(this.lat,this.lng,this.alt)}};var j,V={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},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,n=this.scale(t),i=this.transformation.transform(e.min,n),r=this.transformation.transform(e.max,n);return new D(i,r)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng,n=this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,i=t.alt;return new N(n,e,i)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,r=e.lng-n.lng;if(0===i&&0===r)return t;var o=t.getSouthWest(),a=t.getNorthEast(),s=new N(o.lat-i,o.lng-r),l=new N(a.lat-i,a.lng-r);return new B(s,l)}},Z=n({},V,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,r=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),a=Math.sin((e.lng-t.lng)*n/2),s=o*o+Math.cos(i)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),q={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),r=Math.sin(i*e);return new M(this.R*t.lng*e,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var e=180/Math.PI;return new N((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(j=6378137*Math.PI,new D([-j,-j],[j,j]))};function G(t,e,n,i){if(_(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=n,this._d=i}function W(t,e,n,i){return new G(t,e,n,i)}G.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 M((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var H=n({},Z,{code:"EPSG:3857",projection:q,transformation:function(){var t=.5/(Math.PI*q.R);return W(t,.5,-t,.5)}()}),X=n({},H,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t,e){var n,i,r,o,a,s,l="";for(n=0,r=t.length;n<r;n++){for(a=t[n],i=0,o=a.length;i<o;i++)s=a[i],l+=(i?"L":"M")+s.x+" "+s.y;l+=e?Ct?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,$="ActiveXObject"in window,Q=$&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=At("webkit"),nt=At("android"),it=At("android 2")||At("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ot=nt&&At("Google")&&rt<537&&!("AudioNode"in window),at=!!window.opera,st=At("chrome"),lt=At("gecko")&&!et&&!at&&!$,ut=!st&&At("safari"),ct=At("phantom"),pt="OTransition"in J,ht=0===navigator.platform.indexOf("Win"),ft=$&&"transition"in J,dt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!it,mt="MozPerspective"in J,yt=!window.L_DISABLE_3D&&(ft||dt||mt)&&!pt&&!ct,_t="undefined"!=typeof orientation||At("mobile"),gt=_t&&et,vt=_t&&dt,xt=!window.PointerEvent&&window.MSPointerEvent,bt=!(!window.PointerEvent&&!xt),wt=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=_t&&at,Tt=_t&&lt,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Pt=!!document.createElement("canvas").getContext,Ct=!(!document.createElementNS||!K("svg").createSVGRect),kt=!Ct&&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}}();function At(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var zt=(Object.freeze||Object)({ie:$,ielt9:Q,edge:tt,webkit:et,android:nt,android23:it,androidStock:ot,opera:at,chrome:st,gecko:lt,safari:ut,phantom:ct,opera12:pt,win:ht,ie3d:ft,webkit3d:dt,gecko3d:mt,any3d:yt,mobile:_t,mobileWebkit:gt,mobileWebkit3d:vt,msPointer:xt,pointer:bt,touch:wt,mobileOpera:Et,mobileGecko:Tt,retina:St,canvas:Pt,svg:Ct,vml:kt}),Lt=xt?"MSPointerDown":"pointerdown",Mt=xt?"MSPointerMove":"pointermove",It=xt?"MSPointerUp":"pointerup",Ot=xt?"MSPointerCancel":"pointercancel",Dt=["INPUT","SELECT","OPTION"],Rt={},Bt=!1,Ft=0;function Nt(t,e,n,i){return"touchstart"===e?function(t,e,n){var i=r(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Dt.indexOf(t.target.tagName)<0))return;Re(t)}Zt(t,e)});t["_leaflet_touchstart"+n]=i,t.addEventListener(Lt,i,!1),Bt||(document.documentElement.addEventListener(Lt,Ut,!0),document.documentElement.addEventListener(Mt,jt,!0),document.documentElement.addEventListener(It,Vt,!0),document.documentElement.addEventListener(Ot,Vt,!0),Bt=!0)}(t,n,i):"touchmove"===e?function(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Zt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Mt,i,!1)}(t,n,i):"touchend"===e&&function(t,e,n){var i=function(t){Zt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(It,i,!1),t.addEventListener(Ot,i,!1)}(t,n,i),this}function Ut(t){Rt[t.pointerId]=t,Ft++}function jt(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Vt(t){delete Rt[t.pointerId],Ft--}function Zt(t,e){for(var n in t.touches=[],Rt)t.touches.push(Rt[n]);t.changedTouches=[t],e(t)}var qt=xt?"MSPointerDown":bt?"pointerdown":"touchstart",Gt=xt?"MSPointerUp":bt?"pointerup":"touchend",Wt="_leaflet_";function Ht(t,e,n){var i,r,o=!1,a=250;function s(t){var e;if(bt){if(!tt||"mouse"===t.pointerType)return;e=Ft}else e=t.touches.length;if(!(e>1)){var n=Date.now(),s=n-(i||n);r=t.touches?t.touches[0]:t,o=s>0&&s<=a,i=n}}function l(t){if(o&&!r.cancelBubble){if(bt){if(!tt||"mouse"===t.pointerType)return;var n,a,s={};for(a in r)n=r[a],s[a]=n&&n.bind?n.bind(r):n;r=s}r.type="dblclick",e(r),i=null}}return t[Wt+qt+n]=s,t[Wt+Gt+n]=l,t[Wt+"dblclick"+n]=e,t.addEventListener(qt,s,!1),t.addEventListener(Gt,l,!1),t.addEventListener("dblclick",e,!1),this}function Xt(t,e){var n=t[Wt+qt+e],i=t[Wt+Gt+e],r=t[Wt+"dblclick"+e];return t.removeEventListener(qt,n,!1),t.removeEventListener(Gt,i,!1),tt||t.removeEventListener("dblclick",r,!1),this}var Kt,Yt,Jt,$t,Qt,te=ye(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=ye(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function ie(t){return"string"==typeof t?document.getElementById(t):t}function re(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function oe(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ue(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ce(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=de(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function pe(t,e){if(void 0!==t.classList)for(var n=h(e),i=0,r=n.length;i<r;i++)t.classList.add(n[i]);else if(!ce(t,e)){var o=de(t);fe(t,(o?o+" ":"")+e)}}function he(t,e){void 0!==t.classList?t.classList.remove(e):fe(t,p((" "+de(t)+" ").replace(" "+e+" "," ")))}function fe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function de(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function me(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function ye(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function _e(t,e,n){var i=e||new M(0,0);t.style[te]=(ft?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function ge(t,e){t._leaflet_pos=e,yt?_e(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ve(t){return t._leaflet_pos||new M(0,0)}if("onselectstart"in document)Kt=function(){ke(window,"selectstart",Re)},Yt=function(){ze(window,"selectstart",Re)};else{var xe=ye(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Kt=function(){if(xe){var t=document.documentElement.style;Jt=t[xe],t[xe]="none"}},Yt=function(){xe&&(document.documentElement.style[xe]=Jt,Jt=void 0)}}function be(){ke(window,"dragstart",Re)}function we(){ze(window,"dragstart",Re)}function Ee(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Te(),$t=t,Qt=t.style.outline,t.style.outline="none",ke(window,"keydown",Te))}function Te(){$t&&($t.style.outline=Qt,$t=void 0,Qt=void 0,ze(window,"keydown",Te))}function Se(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Pe(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ce=(Object.freeze||Object)({TRANSFORM:te,TRANSITION:ee,TRANSITION_END:ne,get:ie,getStyle:re,create:oe,remove:ae,empty:se,toFront:le,toBack:ue,hasClass:ce,addClass:pe,removeClass:he,setClass:fe,getClass:de,setOpacity:me,testProp:ye,setTransform:_e,setPosition:ge,getPosition:ve,disableTextSelection:Kt,enableTextSelection:Yt,disableImageDrag:be,enableImageDrag:we,preventOutline:Ee,restoreOutline:Te,getSizedParentNode:Se,getScale:Pe});function ke(t,e,n,i){if("object"==typeof e)for(var r in e)Le(t,r,e[r],n);else{e=h(e);for(var o=0,a=e.length;o<a;o++)Le(t,e[o],n,i)}return this}var Ae="_leaflet_events";function ze(t,e,n,i){if("object"==typeof e)for(var r in e)Me(t,r,e[r],n);else if(e){e=h(e);for(var o=0,a=e.length;o<a;o++)Me(t,e[o],n,i)}else{for(var s in t[Ae])Me(t,s,t[Ae][s]);delete t[Ae]}return this}function Le(t,e,n,i){var r=e+a(n)+(i?"_"+a(i):"");if(t[Ae]&&t[Ae][r])return this;var o=function(e){return n.call(i||t,e||window.event)},s=o;bt&&0===e.indexOf("touch")?Nt(t,e,o,r):!wt||"dblclick"!==e||!Ht||bt&&st?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",o,!1):"mouseenter"===e||"mouseleave"===e?(o=function(e){e=e||window.event,Ge(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",o,!1)):("click"===e&&nt&&(o=function(t){!function(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=je&&n-je;i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?Be(t):(je=n,e(t))}(t,s)}),t.addEventListener(e,o,!1)):"attachEvent"in t&&t.attachEvent("on"+e,o):Ht(t,o,r),t[Ae]=t[Ae]||{},t[Ae][r]=o}function Me(t,e,n,i){var r=e+a(n)+(i?"_"+a(i):""),o=t[Ae]&&t[Ae][r];if(!o)return this;bt&&0===e.indexOf("touch")?function(t,e,n){var i=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Lt,i,!1):"touchmove"===e?t.removeEventListener(Mt,i,!1):"touchend"===e&&(t.removeEventListener(It,i,!1),t.removeEventListener(Ot,i,!1))}(t,e,r):!wt||"dblclick"!==e||!Xt||bt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,o,!1):"detachEvent"in t&&t.detachEvent("on"+e,o):Xt(t,r),t[Ae][r]=null}function Ie(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,qe(t),this}function Oe(t){return Le(t,"mousewheel",Ie),this}function De(t){return ke(t,"mousedown touchstart dblclick",Ie),Le(t,"click",Ze),this}function Re(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Be(t){return Re(t),Ie(t),this}function Fe(t,e){if(!e)return new M(t.clientX,t.clientY);var n=Pe(e),i=n.boundingClientRect;return new M((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ne=ht&&st?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Ue(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ne: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}var je,Ve={};function Ze(t){Ve[t.type]=!0}function qe(t){var e=Ve[t.type];return Ve[t.type]=!1,e}function Ge(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var We=(Object.freeze||Object)({on:ke,off:ze,stopPropagation:Ie,disableScrollPropagation:Oe,disableClickPropagation:De,preventDefault:Re,stop:Be,getMousePosition:Fe,getWheelDelta:Ue,fakeStop:Ze,skipped:qe,isExternalTarget:Ge,addListener:ke,removeListener:ze}),He=z.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=ve(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=S(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ge(this._el,n),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Xe=z.extend({options:{crs:H,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=f(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=r(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(U(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ee&&yt&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ke(this._proxy,ne,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(U(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i){void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan));var r=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),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||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),r=this.getSize().divideBy(2),o=t instanceof M?t:this.latLngToContainerPoint(t),a=o.subtract(r).multiplyBy(1-1/i),s=this.containerPointToLatLng(r.add(a));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():F(t);var n=O(e.paddingTopLeft||e.padding||[0,0]),i=O(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,n.add(i));if((r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};var o=i.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),r),s=this.project(t.getNorthEast(),r),l=this.unproject(a.add(s).divideBy(2).add(o),r);return{center:l,zoom:r}},fitBounds:function(t,e){if(!(t=F(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.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=O(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 He,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){pe(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!yt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),r=this.project(t),o=this.getSize(),a=this._zoom;t=U(t),e=void 0===e?a:e;var s=Math.max(o.x,o.y),l=s*this.getZoomScale(a,e),u=r.distanceTo(i)||1,c=1.42,p=c*c;function h(t){var e=t?-1:1,n=t?l:s,i=l*l-s*s+e*p*p*u*u,r=2*n*p*u,o=i/r,a=Math.sqrt(o*o+1)-o,c=a<1e-9?-18:Math.log(a);return c}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function d(t){return(Math.exp(t)+Math.exp(-t))/2}var m=h(0);function y(t){return s*(d(m)*(f(e=m+c*t)/d(e))-f(m))/p;var e}var _=Date.now(),g=(h(1)-m)/c,v=n.duration?1e3*n.duration:1e3*g*.8;return this._moveStart(!0,n.noMoveStart),function n(){var o=(Date.now()-_)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(o)*g;o<=1?(this._flyToFrame=S(n,this),this._move(this.unproject(i.add(r.subtract(i).multiplyBy(y(l)/u)),a),this.getScaleZoom(s/function(t){return s*(d(m)/d(m+c*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=F(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 n=this.getCenter(),i=this._limitCenter(n,this._zoom,F(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=O(e.paddingBottomRight||e.padding||[0,0]),r=this.getCenter(),o=this.project(r),a=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),u=R([s.min.add(n),s.max.subtract(i)]);if(!u.contains(a)){this._enforcingBounds=!0;var c=o.subtract(a),p=O(a.x+c.x,a.y+c.y);(a.x<u.min.x||a.x>u.max.x)&&(p.x=o.x-c.x,c.x>0?p.x+=l.x-n.x:p.x-=l.x-i.x),(a.y<u.min.y||a.y>u.max.y)&&(p.y=o.y-c.y,c.y>0?p.y+=l.y-n.y:p.y-=l.y-i.y),this.panTo(this.unproject(p),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),a=i.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(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):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=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,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,n=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: "+n+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,n=t.coords.longitude,i=new N(e,n),r=i.toBounds(2*t.coords.accuracy),o=this._locateOptions;if(o.setView){var a=this.getBoundsZoom(r);this.setView(i,o.maxZoom?Math.min(a,o.maxZoom):a)}var s={latlng:i,bounds:r,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(s[l]=t.coords[l]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.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}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i=oe("div",n,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(),e=this.unproject(t.getBottomLeft()),n=this.unproject(t.getTopRight());return new B(e,n)},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,n){t=F(t),n=O(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),u=R(this.project(s,i),this.project(a,i)).getSize(),c=yt?this.options.zoomSnap:1,p=l.x/u.x,h=l.y/u.y,f=e?Math.max(p,h):Math.min(p,h);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new D(n,n.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 n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(U(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){var e=O(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(U(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(U(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(F(t))},distance:function(t,e){return this.options.crs.distance(U(t),U(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(t)))},mouseEventToContainerPoint:function(t){return Fe(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=ie(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ke(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&yt,pe(t,"leaflet-container"+(wt?" leaflet-touch":"")+(St?" leaflet-retina":"")+(Q?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=re(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),ge(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pe(t.markerPane,"leaflet-zoom-hide"),pe(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ge(this._mapPane,new M(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ge(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[a(this._container)]=this;var e=t?ze:ke;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),yt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=S(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 n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!Ge(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!Ge(o,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!qe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||Ee(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var r=n({},t);r.type="preclick",this._fireDOMEvent(r,r.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var o=i[0];"contextmenu"===e&&o.listens(e,!0)&&Re(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<i.length;l++)if(i[l].fire(e,a,!0),a.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))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 ve(this._mapPane)||new M(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var n=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return R([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),r=this.getSize().divideBy(2),o=new D(i.subtract(r),i.add(r)),a=this._getBoundsOffset(o,n,e);return a.round().equals([0,0])?t:this.unproject(i.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new D(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=R(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),r=i.min.subtract(t.min),o=i.max.subtract(t.max),a=this._rebound(r.x,-o.x),s=this._rebound(r.y,-o.y);return new M(a,s)},_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(),n=this.getMaxZoom(),i=yt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=te,n=this._proxy.style[e];_e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();_e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(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,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(S(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,pe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&he(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),S(function(){this._moveEnd(!0)},this))}}),Ke=k.extend({options:{position:"topright"},initialize:function(t){f(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),n=this.getPosition(),i=t._controlCorners[n];return pe(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},remove:function(){return this._map?(ae(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()}}),Ye=function(t){return new Ke(t)};Xe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=oe("div",e+"control-container",this._container);function i(i,r){var o=e+i+" "+e+r;t[i+r]=oe("div",o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Je=Ke.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!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 Ke.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(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){pe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(pe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):he(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return he(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=oe("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),De(e),Oe(e);var i=this._section=oe("section",t+"-list");n&&(this._map.on("click",this.collapse,this),nt||ke(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var r=this._layersLink=oe("a",t+"-toggle",e);r.href="#",r.title="Layers",wt?(ke(r,"click",Be),ke(r,"click",this.expand,this)):ke(r,"focus",this.expand,this),n||this.expand(),this._baseLayersList=oe("div",t+"-base",i),this._separator=oe("div",t+"-separator",i),this._overlaysList=oe("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(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(r(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;se(this._baseLayersList),se(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,r=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,r+=i.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(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers",i),this._layerControlInputs.push(e),e.layerId=a(t.layer),ke(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("div");n.appendChild(o),o.appendChild(e),o.appendChild(r);var s=t.overlay?this._overlaysList:this._baseLayersList;return s.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.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<i.length;o++)this._map.hasLayer(i[o])||this._map.addLayer(i[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$e=Ke.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},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,n,i,r){var o=oe("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),De(o),ke(o,"click",Be),ke(o,"click",r,this),ke(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&pe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&pe(this._zoomInButton,e)}});Xe.mergeOptions({zoomControl:!0}),Xe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $e,this.addControl(this.zoomControl))});var Qe=Ke.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=oe("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.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,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_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),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,r=3.2808399*t;r>5280?(e=r/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),tn=Ke.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),De(this._container),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 n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Xe.mergeOptions({attributionControl:!0}),Xe.addInitHook(function(){this.options.attributionControl&&(new tn).addTo(this)}),Ke.Layers=Je,Ke.Zoom=$e,Ke.Scale=Qe,Ke.Attribution=tn,Ye.layers=function(t,e,n){return new Je(t,e,n)},Ye.zoom=function(t){return new $e(t)},Ye.scale=function(t){return new Qe(t)},Ye.attribution=function(t){return new tn(t)};var en=k.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}});en.addTo=function(t,e){return t.addHandler(e,this),this};var nn,rn={Events:A},on=wt?"touchstart mousedown":"mousedown",an={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},sn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ln=z.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ke(this._dragStartTarget,on,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ln._dragging===this&&this.finishDrag(),ze(this._dragStartTarget,on,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ce(this._element,"leaflet-zoom-anim")&&!(ln._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ln._dragging=this,this._preventOutline&&Ee(this._element),be(),Kt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Se(this._element);this._startPoint=new M(e.clientX,e.clientY),this._parentScale=Pe(n),ke(document,sn[t.type],this._onMove,this),ke(document,an[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,n=new M(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Re(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ve(this._element).subtract(n),pe(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),pe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,P(this._animRequest),this._lastEvent=t,this._animRequest=S(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ge(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in he(document.body,"leaflet-dragging"),this._lastTarget&&(he(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),sn)ze(document,sn[t],this._onMove,this),ze(document,an[t],this._onUp,this);we(),Yt(),this._moved&&this._moving&&(P(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ln._dragging=!1}});function un(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,function t(e,n,i,r,o){var a,s,l,u=0;for(s=r+1;s<=o-1;s++)(l=dn(e[s],e[r],e[o],!0))>u&&(a=s,u=l);u>i&&(n[a]=1,t(e,n,i,r,a),t(e,n,i,a,o))}(t,i,e,0,n-1);var r,o=[];for(r=0;r<n;r++)i[r]&&o.push(t[r]);return o}(t=function(t,e){for(var n=[t[0]],i=1,r=0,o=t.length;i<o;i++)a=t[i],s=t[r],l=void 0,u=void 0,l=s.x-a.x,u=s.y-a.y,l*l+u*u>e&&(n.push(t[i]),r=i);var a,s,l,u;return r<o-1&&n.push(t[o-1]),n}(t,n),n)}function cn(t,e,n){return Math.sqrt(dn(t,e,n,!0))}function pn(t,e,n,i,r){var o,a,s,l=i?nn:fn(t,n),u=fn(e,n);for(nn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;a=hn(t,e,o=l||u,n,r),s=fn(a,n),o===l?(t=a,l=s):(e=a,u=s)}}function hn(t,e,n,i,r){var o,a,s=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(o=t.x+s*(c.y-t.y)/l,a=c.y):4&n?(o=t.x+s*(u.y-t.y)/l,a=u.y):2&n?(o=c.x,a=t.y+l*(c.x-t.x)/s):1&n&&(o=u.x,a=t.y+l*(u.x-t.x)/s),new M(o,a,r)}function fn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function dn(t,e,n,i){var r,o=e.x,a=e.y,s=n.x-o,l=n.y-a,u=s*s+l*l;return u>0&&((r=((t.x-o)*s+(t.y-a)*l)/u)>1?(o=n.x,a=n.y):r>0&&(o+=s*r,a+=l*r)),s=t.x-o,l=t.y-a,i?s*s+l*l:new M(o,a)}function mn(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function yn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mn(t)}var _n=(Object.freeze||Object)({simplify:un,pointToSegmentDistance:cn,closestPointOnSegment:function(t,e,n){return dn(t,e,n)},clipSegment:pn,_getEdgeIntersection:hn,_getBitCode:fn,_sqClosestPointOnSegment:dn,isFlat:mn,_flat:yn});function gn(t,e,n){var i,r,o,a,s,l,u,c,p,h=[1,4,2,8];for(r=0,u=t.length;r<u;r++)t[r]._code=fn(t[r],e);for(a=0;a<4;a++){for(c=h[a],i=[],r=0,u=t.length,o=u-1;r<u;o=r++)s=t[r],l=t[o],s._code&c?l._code&c||((p=hn(l,s,c,e,n))._code=fn(p,e),i.push(p)):(l._code&c&&((p=hn(l,s,c,e,n))._code=fn(p,e),i.push(p)),i.push(s));t=i}return t}var vn=(Object.freeze||Object)({clipPolygon:gn}),xn={project:function(t){return new M(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new D([-180,-90],[180,90])},bn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=o*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2);return i=-n*Math.log(Math.max(s,1e-10)),new M(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/i),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),u=Math.PI/2-2*Math.atan(a*e)-s,s+=u;return new N(s*n,t.x*n/i)}},wn=(Object.freeze||Object)({LonLat:xn,Mercator:bn,SphericalMercator:q}),En=n({},Z,{code:"EPSG:3395",projection:bn,transformation:function(){var t=.5/(Math.PI*bn.R);return W(t,.5,-t,.5)}()}),Tn=n({},Z,{code:"EPSG:4326",projection:xn,transformation:W(1/180,1,-1/180,.5)}),Sn=n({},V,{projection:xn,transformation:W(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 n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});V.Earth=Z,V.EPSG3395=En,V.EPSG3857=H,V.EPSG900913=X,V.EPSG4326=Tn,V.Simple=Sn;var Pn=z.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[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(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 n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Xe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(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=a(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&&a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){t=t?_(t)?t:[t]:[];for(var e=0,n=t.length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var r=this._zoomBoundLayers[i].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,n!==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 Cn=Pn.extend({initialize:function(t,e){var n,i;if(f(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},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,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);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 a(t)}}),kn=Cn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Cn.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),Cn.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 B;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),An=k.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var r=O(i),o=O("shadow"===e&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.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")).src=t,e},_getIconUrl:function(t){return St&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),zn=An.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 zn.imagePath||(zn.imagePath=this._detectIconPath()),(this.options.imagePath||zn.imagePath)+An.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=oe("div","leaflet-default-icon-path",document.body),e=re(t,"background-image")||re(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ln=en.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ln(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),pe(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&&he(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=ve(e._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=R(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(o)){var u=O((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(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),ge(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=S(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&&(P(this._panRequest),this._panRequest=S(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=ve(e._icon),r=e._map.layerPointToLatLng(i);n&&ge(n,i),e._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Mn=Pn.extend({options:{icon:new zn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=U(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=U(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"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),pe(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,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&&(pe(r,e),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),i&&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}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){ge(this._icon,t),this._shadow&&ge(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&&(pe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ln)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ln(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;me(this._icon,t),this._shadow&&me(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}}),In=Pn.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 f(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}}),On=In.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=U(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=U(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 In.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,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new D(this._point.subtract(i),this._point.add(i))},_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()}}),Dn=On.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=U(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 B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:In.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===Z.distance){var r=Math.PI/180,o=this._mRadius/Z.R/r,a=n.project([e+o,t]),s=n.project([e-o,t]),l=a.add(s).divideBy(2),u=n.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(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-a.y}else{var p=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(p).x}this._updateBounds()}}),Rn=In.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(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,n,i=1/0,r=null,o=dn,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){e=l[u-1],n=l[u];var p=o(t,e,n,!0);p<i&&(i=p,r=o(t,e,n))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,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,i=0;t<l-1;t++)if(r=s[t],o=s[t+1],n=r.distanceTo(o),(i+=n)>e)return a=(i-e)/n,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=U(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=mn(t),i=0,r=t.length;i<r;i++)n?(e[i]=U(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),n=new M(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(n),t.max._add(n),this._pxBounds=t)},_projectLatlngs:function(t,e,n){var i,r,o=t[0]instanceof N,a=t.length;if(o){for(r=[],i=0;i<a;i++)r[i]=this._map.latLngToLayerPoint(t[i]),n.extend(r[i]);e.push(r)}else for(i=0;i<a;i++)this._projectLatlngs(t[i],e,n)},_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,n,i,r,o,a,s,l=this._parts;for(e=0,i=0,r=this._rings.length;e<r;e++)for(s=this._rings[e],n=0,o=s.length;n<o-1;n++)(a=pn(s[n],s[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(a[0]),a[1]===s[n+1]&&n!==o-2||(l[i].push(a[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=un(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,r,o,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(s=this._parts[n],i=0,a=s.length,r=a-1;i<a;r=i++)if((e||0!==i)&&cn(t,s[r],s[i])<=l)return!0;return!1}});Rn._flat=yn;var Bn=Rn.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,n,i,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++)n=u[t],i=u[e],r=n.y*i.x-i.y*n.x,a+=(n.x+i.x)*r,s+=(n.y+i.y)*r,o+=3*r;return l=0===o?u[0]:[a/o,s/o],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Rn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof N&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Rn.prototype._setLatLngs.call(this,t),mn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new M(e,e);if(t=new D(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,o=this._rings.length;r<o;r++)(i=gn(this._rings[r],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,r,o,a,s,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;r<s;r++)for(e=this._parts[r],o=0,l=e.length,a=l-1;o<l;a=o++)n=e[o],i=e[a],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||Rn.prototype._containsPoint.call(this,t,!0)}}),Fn=kn.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=_(t)?t:t.features;if(r){for(e=0,n=r.length;e<n;e++)((i=r[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=Nn(t,o);return a?(a.feature=Gn(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=n({},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)}});function Nn(t,e){var n,i,r,o,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Un;if(!s&&!a)return null;switch(a.type){case"Point":return n=c(s),u?u(t,n):new Mn(n);case"MultiPoint":for(r=0,o=s.length;r<o;r++)n=c(s[r]),l.push(u?u(t,n):new Mn(n));return new kn(l);case"LineString":case"MultiLineString":return i=jn(s,"LineString"===a.type?0:1,c),new Rn(i,e);case"Polygon":case"MultiPolygon":return i=jn(s,"Polygon"===a.type?1:2,c),new Bn(i,e);case"GeometryCollection":for(r=0,o=a.geometries.length;r<o;r++){var p=Nn({geometry:a.geometries[r],type:"Feature",properties:t.properties},e);p&&l.push(p)}return new kn(l);default:throw new Error("Invalid GeoJSON object.")}}function Un(t){return new N(t[1],t[0],t[2])}function jn(t,e,n){for(var i,r=[],o=0,a=t.length;o<a;o++)i=e?jn(t[o],e-1,n):(n||Un)(t[o]),r.push(i);return r}function Vn(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Zn(t,e,n,i){for(var r=[],o=0,a=t.length;o<a;o++)r.push(e?Zn(t[o],e-1,n,i):Vn(t[o],i));return!e&&n&&r.push(r[0]),r}function qn(t,e){return t.feature?n({},t.feature,{geometry:e}):Gn(e)}function Gn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Wn={toGeoJSON:function(t){return qn(this,{type:"Point",coordinates:Vn(this.getLatLng(),t)})}};function Hn(t,e){return new Fn(t,e)}Mn.include(Wn),Dn.include(Wn),On.include(Wn),Rn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=Zn(this._latlngs,e?1:0,!1,t);return qn(this,{type:(e?"Multi":"")+"LineString",coordinates:n})}}),Bn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=e&&!mn(this._latlngs[0]),i=Zn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),qn(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Cn.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),qn(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 n="GeometryCollection"===e,i=[];return this.eachLayer(function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(n)i.push(r.geometry);else{var o=Gn(r);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}}),n?qn(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Xn=Hn,Kn=Pn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=F(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(pe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(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&&le(this._image),this},bringToBack:function(){return this._map&&ue(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=F(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:oe("img");pe(e,"leaflet-image-layer"),this._zoomAnimated&&pe(e,"leaflet-zoom-animated"),this.options.className&&pe(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=r(this.fire,this,"load"),e.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.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),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_e(this._image,n,e)},_reset:function(){var t=this._image,e=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ge(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){me(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)}}),Yn=Kn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(pe(e,"leaflet-image-layer"),this._zoomAnimated&&pe(e,"leaflet-zoom-animated"),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=r(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{_(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var s=oe("source");s.src=this._url[a],e.appendChild(s)}}}}),Jn=Pn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&me(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&me(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(me(this._container,0),this._removeTimeout=setTimeout(r(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=U(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&&le(this._container),this},bringToBack:function(){return this._map&&ue(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=O(this.options.offset),n=this._getAnchor();this._zoomAnimated?ge(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}}),$n=Jn.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){Jn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof In||this._source.on("preclick",Ie))},onRemove:function(t){Jn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof In||this._source.off("preclick",Ie))},getEvents:function(){var t=Jn.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=oe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=oe("div",t+"-content-wrapper",e);if(this._contentNode=oe("div",t+"-content",n),De(n),Oe(this._contentNode),ke(n,"contextmenu",Ie),this._tipContainer=oe("div",t+"-tip-container",e),this._tip=oe("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=oe("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",ke(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,r=this.options.maxHeight;r&&i>r?(e.height=r+"px",pe(t,"leaflet-popup-scrolled")):he(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ge(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(re(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,r=new M(this._containerLeft,-n-this._containerBottom);r._add(ve(this._container));var o=t.layerPointToContainerPoint(r),a=O(this.options.autoPanPadding),s=O(this.options.autoPanPaddingTopLeft||a),l=O(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,p=0;o.x+i+l.x>u.x&&(c=o.x+i-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+n+l.y>u.y&&(p=o.y+n-u.y+l.y),o.y-p-s.y<0&&(p=o.y-s.y),(c||p)&&t.fire("autopanstart").panBy([c,p])}},_onCloseButtonClick:function(t){this._close(),Be(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Xe.mergeOptions({closePopupOnClick:!0}),Xe.include({openPopup:function(t,e,n){return t instanceof $n||(t=new $n(n).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}}),Pn.include({bindPopup:function(t,e){return t instanceof $n?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new $n(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 Pn||(e=t,t=this),t instanceof kn)for(var n in this._layers){t=this._layers[n];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&&(Be(t),e instanceof In?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 Qn=Jn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Jn.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){Jn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Jn.prototype.getEvents.call(this);return wt&&!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=oe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,i=e.latLngToContainerPoint(e.getCenter()),r=e.layerPointToContainerPoint(t),o=this.options.direction,a=n.offsetWidth,s=n.offsetHeight,l=O(this.options.offset),u=this._getAnchor();"top"===o?t=t.add(O(-a/2+l.x,-s+l.y+u.y,!0)):"bottom"===o?t=t.subtract(O(a/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(O(a/2+l.x,s/2-u.y+l.y,!0)):"right"===o||"auto"===o&&r.x<i.x?(o="right",t=t.add(O(l.x+u.x,u.y-s/2+l.y,!0))):(o="left",t=t.subtract(O(a+u.x-l.x,s/2-u.y-l.y,!0))),he(n,"leaflet-tooltip-right"),he(n,"leaflet-tooltip-left"),he(n,"leaflet-tooltip-top"),he(n,"leaflet-tooltip-bottom"),pe(n,"leaflet-tooltip-"+o),ge(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&me(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Xe.include({openTooltip:function(t,e,n){return t instanceof Qn||(t=new Qn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Pn.include({bindTooltip:function(t,e){return t instanceof Qn?(f(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Qn(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",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),wt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof Pn||(e=t,t=this),t instanceof kn)for(var n in this._layers){t=this._layers[n];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&&(pe(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&&(he(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,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var ti=An.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"),n=this.options;if(e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=O(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});An.Default=zn;var ei=Pn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_t,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){f(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(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ue(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=s(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 M?t:new M(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,n=this.getPane().children,i=-t(-1/0,1/0),r=0,o=n.length;r<o;r++)e=n[r].style.zIndex,n[r]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Q){me(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var r=this._tiles[i];if(r.current&&r.loaded){var o=Math.min(1,(t-r.loaded)/200);me(r.el,o),o<1?e=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=oe("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 n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ae(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],r=this._map;return i||((i=this._levels[t]={}).el=oe("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,r.getCenter(),r.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<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 i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.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)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var r=Math.floor(t/2),o=Math.floor(e/2),a=n-1,s=new M(+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>i&&this._retainParent(r,o,a,i))},_retainChildren:function(t,e,n,i){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new M(r,o);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(r,o,n+1,i))}},_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,n,i){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;i&&!o||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),r=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();yt?_e(t.el,r,i):ge(t.el,r)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=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]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),r=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*i);return new D(r.subtract(o),r.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(i),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new D(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 M(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var p=r.min.y;p<=r.max.y;p++)for(var h=r.min.x;h<=r.max.x;h++){var f=new M(h,p);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(h=0;h<a.length;h++)this._addTile(a[h],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),r=i.add(n),o=e.unproject(i,t.z),a=e.unproject(r,t.z);return[o,a]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new B(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new M(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){pe(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Q&&this.options.opacity<1&&me(t,this.options.opacity),nt&&!it&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&S(r(this._tileReady,this,t,null,o)),ge(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(me(n.el,0),P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(pe(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Q||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new M(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new D(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}}),ni=ei.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=f(this,e)).detectRetina&&St&&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("")),nt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ke(n,"load",r(this._tileOnLoad,this,e,n)),ke(n,"error",r(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:St?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return y(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Q?setTimeout(r(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,n=this.options.zoomReverse,i=this.options.zoomOffset;return n&&(t=e-t),t+i},_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=u,e.onerror=u,e.complete||(e.src=v,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return ot||e.el.setAttribute("src",v),ei.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ei.prototype._tileReady.call(this,t,e,n)}});function ii(t,e){return new ni(t,e)}var ri=ni.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,e){this._url=t;var i=n({},this.defaultWmsParams);for(var r in e)r in this.options||(i[r]=e[r]);var o=(e=f(this,e)).detectRetina&&St?2:1,a=this.getTileSize();i.width=a.x*o,i.height=a.y*o,this.wmsParams=i},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,ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=R(n.project(e[0]),n.project(e[1])),r=i.min,o=i.max,a=(this._wmsVersion>=1.3&&this._crs===Tn?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=ni.prototype.getTileUrl.call(this,t);return s+d(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});ni.WMS=ri,ii.wms=function(t,e){return new ri(t,e)};var oi=Pn.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&pe(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 n=this._map.getZoomScale(e,this._zoom),i=ve(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e),s=a.subtract(o),l=r.multiplyBy(-n).add(i).add(r).subtract(s);yt?_e(this._container,l,n):ge(this._container,l)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new D(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ai=oi.extend({getEvents:function(){var t=oi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){oi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ke(t,"mousemove",s(this._onMouseMove,32,this),this),ke(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ke(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ae(this._container),ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){oi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=St?2:1;ge(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",St&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){oi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(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,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[a(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("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;r.push(e)}t.options._dashArray=r}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||S(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,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 n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,r,o,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,r=a[n].length;i<r;i++)o=a[n][i],l[i?"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,n=this._ctx,i=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(e.x,e.y/r,i,0,2*Math.PI,!1),1!==r&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),r=this._drawFirst;r;r=r.next)(e=r.layer).options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(n=e);n&&(Ze(t),this._fireEvent([n],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&&(he(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(pe(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function si(t){return Pt?new ai(t):null}var li=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">')}}}(),ui={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(oi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=li("shape");pe(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=li("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(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;ae(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e||(e=t._stroke=li("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=_(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=li("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){le(t._container)},_bringToBack:function(t){ue(t._container)}},ci=kt?li:K,pi=oi.extend({getEvents:function(){var t=oi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=ci("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ci("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){oi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ge(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=ci("path");t.options.className&&pe(e,t.options.className),t.options.interactive&&pe(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Y(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i=Math.max(Math.round(t._radiusY),1)||n,r="a"+n+","+i+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){le(t._path)},_bringToBack:function(t){ue(t._path)}});function hi(t){return Ct||kt?new pi(t):null}kt&&pi.include(ui),Xe.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._createRenderer()),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=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&si(t)||hi(t)}});var fi=Bn.extend({initialize:function(t,e){Bn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=F(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pi.create=ci,pi.pointsToPath=Y,Fn.geometryToLayer=Nn,Fn.coordsToLatLng=Un,Fn.coordsToLatLngs=jn,Fn.latLngToCoords=Vn,Fn.latLngsToCoords=Zn,Fn.getFeature=qn,Fn.asFeature=Gn,Xe.mergeOptions({boxZoom:!0});var di=en.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(){ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(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(),Kt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),ke(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),pe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new D(this._point,this._startPoint),n=e.getSize();ge(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ae(this._box),he(this._container,"leaflet-crosshair")),Yt(),we(),ze(document,{contextmenu:Be,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(r(this._resetState,this),0);var e=new B(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()}});Xe.addInitHook("addHandler","boxZoom",di),Xe.mergeOptions({doubleClickZoom:!0});var mi=en.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,n=e.getZoom(),i=e.options.zoomDelta,r=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});Xe.addInitHook("addHandler","doubleClickZoom",mi),Xe.mergeOptions({dragging:!0,inertia:!it,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yi=en.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ln(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))}pe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){he(this._map._container,"leaflet-grab"),he(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=F(this._map.options.maxBounds);this._offsetLimit=R(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,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),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),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-e+n)%t+e-n,o=(i+e+n)%t-e-n,a=Math.abs(r+n)<Math.abs(o+n)?r:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=r.multiplyBy(a/o),l=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),p=u/(n.inertiaDeceleration*a),h=c.multiplyBy(-p/2).round();h.x||h.y?(h=e._limitOffset(h,e.options.maxBounds),S(function(){e.panBy(h,{duration:p,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Xe.addInitHook("addHandler","dragging",yi),Xe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var _i=en.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"),ke(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(),ze(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,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},r=this.keyCodes;for(e=0,n=r.left.length;e<n;e++)i[r.left[e]]=[-1*t,0];for(e=0,n=r.right.length;e<n;e++)i[r.right[e]]=[t,0];for(e=0,n=r.down.length;e<n;e++)i[r.down[e]]=[0,t];for(e=0,n=r.up.length;e<n;e++)i[r.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},r=this.keyCodes;for(e=0,n=r.zoomIn.length;e<n;e++)i[r.zoomIn[e]]=t;for(e=0,n=r.zoomOut.length;e<n;e++)i[r.zoomOut[e]]=-t},_addHooks:function(){ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=O(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Be(t)}}});Xe.addInitHook("addHandler","keyboard",_i),Xe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var gi=en.extend({addHooks:function(){ke(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){ze(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ue(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),Be(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,o=n?Math.ceil(r/n)*n: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))}});Xe.addInitHook("addHandler","scrollWheelZoom",gi),Xe.mergeOptions({tap:!0,tapTolerance:15});var vi=en.extend({addHooks:function(){ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Re(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 M(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&pe(n,"leaflet-active"),this._holdTimeout=setTimeout(r(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),ke(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),ze(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&he(n,"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 M(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});wt&&!bt&&Xe.addInitHook("addHandler","tap",vi),Xe.mergeOptions({touchZoom:wt&&!it,bounceAtZoomLimits:!0});var xi=en.extend({addHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),ze(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 n=e.mouseEventToContainerPoint(t.touches[0]),i=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(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ke(document,"touchmove",this._onTouchMove,this),ke(document,"touchend",this._onTouchEnd,this),Re(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/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(i)._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),P(this._animRequest);var s=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=S(s,this,!0),Re(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),ze(document,"touchmove",this._onTouchMove),ze(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}});Xe.addInitHook("addHandler","touchZoom",xi),Xe.BoxZoom=di,Xe.DoubleClickZoom=mi,Xe.Drag=yi,Xe.Keyboard=_i,Xe.ScrollWheelZoom=gi,Xe.Tap=vi,Xe.TouchZoom=xi,Object.freeze=e,t.version="1.4.0",t.Control=Ke,t.control=Ye,t.Browser=zt,t.Evented=z,t.Mixin=rn,t.Util=C,t.Class=k,t.Handler=en,t.extend=n,t.bind=r,t.stamp=a,t.setOptions=f,t.DomEvent=We,t.DomUtil=Ce,t.PosAnimation=He,t.Draggable=ln,t.LineUtil=_n,t.PolyUtil=vn,t.Point=M,t.point=O,t.Bounds=D,t.bounds=R,t.Transformation=G,t.transformation=W,t.Projection=wn,t.LatLng=N,t.latLng=U,t.LatLngBounds=B,t.latLngBounds=F,t.CRS=V,t.GeoJSON=Fn,t.geoJSON=Hn,t.geoJson=Xn,t.Layer=Pn,t.LayerGroup=Cn,t.layerGroup=function(t,e){return new Cn(t,e)},t.FeatureGroup=kn,t.featureGroup=function(t){return new kn(t)},t.ImageOverlay=Kn,t.imageOverlay=function(t,e,n){return new Kn(t,e,n)},t.VideoOverlay=Yn,t.videoOverlay=function(t,e,n){return new Yn(t,e,n)},t.DivOverlay=Jn,t.Popup=$n,t.popup=function(t,e){return new $n(t,e)},t.Tooltip=Qn,t.tooltip=function(t,e){return new Qn(t,e)},t.Icon=An,t.icon=function(t){return new An(t)},t.DivIcon=ti,t.divIcon=function(t){return new ti(t)},t.Marker=Mn,t.marker=function(t,e){return new Mn(t,e)},t.TileLayer=ni,t.tileLayer=ii,t.GridLayer=ei,t.gridLayer=function(t){return new ei(t)},t.SVG=pi,t.svg=hi,t.Renderer=oi,t.Canvas=ai,t.canvas=si,t.Path=In,t.CircleMarker=On,t.circleMarker=function(t,e){return new On(t,e)},t.Circle=Dn,t.circle=function(t,e,n){return new Dn(t,e,n)},t.Polyline=Rn,t.polyline=function(t,e){return new Rn(t,e)},t.Polygon=Bn,t.polygon=function(t,e){return new Bn(t,e)},t.Rectangle=fi,t.rectangle=function(t,e){return new fi(t,e)},t.Map=Xe,t.map=function(t,e){return new Xe(t,e)};var bi=window.L;t.noConflict=function(){return window.L=bi,this},window.L=t}(e)},function(t,e,n){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}n.d(e,"a",function(){return i})},function(t,e,n){t.exports=n(23)()},function(t,e,n){"use strict";n.d(e,"a",function(){return p}),n.d(e,"b",function(){return h});var i=n(5),r=n(16),o=n.n(r),a=n(0),s=n.n(a),l=Object(a.createContext)({}),u=l.Consumer,c=l.Provider,p=c,h=function(t){var e=function(e,n){return s.a.createElement(u,null,function(r){return s.a.createElement(t,Object(i.a)({},e,{leaflet:r,ref:n}))})},n=t.displayName||t.name||"Component";e.displayName="Leaflet("+n+")";var r=Object(a.forwardRef)(e);return o()(r,t),r}},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var i=n(5),r=n(1),o=n(4),a=n(2),s=n(0),l=/^on(.+)$/i,u=function(t){function e(e){var n;return n=t.call(this,e)||this,Object(a.a)(Object(r.a)(n),"_leafletEvents",void 0),Object(a.a)(Object(r.a)(n),"leafletElement",void 0),n._leafletEvents=n.extractLeafletEvents(e),n}Object(o.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.bindLeafletEvents(this._leafletEvents)},n.componentDidUpdate=function(t){this._leafletEvents=this.bindLeafletEvents(this.extractLeafletEvents(this.props),this._leafletEvents)},n.componentWillUnmount=function(){var t=this,e=this.leafletElement;e&&Object.keys(this._leafletEvents).forEach(function(n){e.off(n,t._leafletEvents[n])})},n.extractLeafletEvents=function(t){return Object.keys(t).reduce(function(e,n){l.test(n)&&(null!=t[n]&&(e[n.replace(l,function(t,e){return e.toLowerCase()})]=t[n]));return e},{})},n.bindLeafletEvents=function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=this.leafletElement;if(null==n||null==n.on)return{};var r=Object(i.a)({},e);return Object.keys(e).forEach(function(i){null!=t[i]&&e[i]===t[i]||(delete r[i],n.off(i,e[i]))}),Object.keys(t).forEach(function(i){null!=e[i]&&t[i]===e[i]||(r[i]=t[i],n.on(i,t[i]))}),r},n.fireLeafletEvent=function(t,e){var n=this.leafletElement;n&&n.fire(t,e)},e}(s.Component)},function(t,e,n){"use strict";
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))r.call(n,u)&&(s[u]=n[u]);if(i){a=i(n);for(var c=0;c<a.length;c++)o.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s}},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(20)},,function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){t.exports=function(){"use strict";var t,e,n;function i(i,r){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(n=r(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=r;else t=r}return i(0,function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=i;function i(t,e,n,i){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=n,this.p2y=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 n,i,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((r=t)<(n=0))return n;if(r>(i=1))return i;for(;n<i;){if(o=this.sampleCurveX(r),Math.abs(o-t)<e)return r;t>o?n=r:i=r,r=.5*(i-n)+n}return r},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var r=o;function o(t,e){this.x=t,this.y=e}function a(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!a(t[n],e[n]))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 i in t)if(!a(t[i],e[i]))return!1;return!0}return t===e}function s(t,e,i,r){var o=new n(t,e,i,r);return function(t){return o.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},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,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,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),n=Math.sin(t),i=e*this.x-n*this.y,r=n*this.x+e*this.y;return this.x=i,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),i=Math.sin(t),r=e.x+n*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+n*(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}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var l=s(.25,.1,.25,1);function u(t,e,n){return Math.min(n,Math.max(e,t))}function c(t,e,n){var i=n-e,r=((t-e)%i+i)%i+e;return r===e?n:r}function p(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,r=e;i<r.length;i+=1){var o=r[i];for(var a in o)t[a]=o[a]}return t}var h=1;function f(){return h++}function d(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function y(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function _(t,e){return-1!==t.indexOf(e,t.length-e.length)}function g(t,e,n){var i={};for(var r in t)i[r]=e.call(n||this,t[r],r,t);return i}function v(t,e,n){var i={};for(var r in t)e.call(n||this,t[r],r,t)&&(i[r]=t[r]);return i}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?g(t,x):t}var b={};function w(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function E(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function T(t){for(var e=0,n=0,i=t.length,r=i-1,o=void 0,a=void 0;n<i;r=n++)o=t[n],e+=((a=t[r]).x-o.x)*(o.y+a.y);return e}function S(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var P,C,k=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),A=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,z=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,L={now:k,frame:function(t){var e=A(t);return{cancel:function(){return z(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.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}},M={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"},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},I={supported:!1,testSupport:function(t){!O&&C&&(D?R(t):P=t)}},O=!1,D=!1;function R(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,C),t.isContextLost())return;I.supported=!0}catch(t){}t.deleteTexture(e),O=!0}self.document&&((C=self.document.createElement("img")).onload=function(){P&&R(P),P=null,D=!0},C.onerror=function(){O=!0,P=null},C.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var B="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes";function F(t,e){var n=W(M.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"/"!==n.path&&(t.path=""+n.path+t.path),!M.REQUIRE_ACCESS_TOKEN)return H(t);if(!(e=e||M.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+B);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+B);return t.params.push("access_token="+e),H(t)}function N(t){return 0===t.indexOf("mapbox:")}var U=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function j(t){return U.test(t)}var V=/(\.(png|jpg)\d*)(?=$)/,Z=/\.[\w]+$/,q=function(t){var e=W(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match(Z))return t;var n="mapbox://tiles/";n+=e.path.replace("/v4/","");var i=e.params.filter(function(t){return!t.match(/^access_token=/)});return i.length&&(n+="?"+i.join("&")),n},G=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function W(t){var e=t.match(G);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 H(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function X(t){if(!t)return null;var e,n=t.split(".");if(!n||3!==n.length)return null;try{return JSON.parse((e=n[1],decodeURIComponent(self.atob(e).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch(t){return null}}var K=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};K.prototype.getStorageKey=function(t){var e,n=X(M.ACCESS_TOKEN),i="";return n&&n.u?(e=n.u,i=self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))}))):i=M.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+i:"mapbox.eventData:"+i},K.prototype.fetchEventData=function(){var t=S("localStorage"),e=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{var i=self.localStorage.getItem(e);i&&(this.eventData=JSON.parse(i));var r=self.localStorage.getItem(n);r&&(this.anonId=r)}catch(t){w("Unable to read from LocalStorage")}},K.prototype.saveEventData=function(){var t=S("localStorage"),e=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{self.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},K.prototype.processRequests=function(){},K.prototype.postEvent=function(t,e,n){var i=this,r=W(M.EVENTS_URL);r.params.push("access_token="+(M.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"0.53.0",userId:this.anonId},a=e?p(o,e):o,s={url:H(r),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=ut(s,function(t){i.pendingRequest=null,n(t),i.saveEventData(),i.processRequests()})},K.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()};var Y=function(t){function e(){t.call(this,"map.load"),this.success={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e){M.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return N(t)||j(t)})&&this.queueRequest({id:e,timestamp:Date.now()})},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var e=this.queue.shift(),n=e.id,i=e.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=d()),this.postEvent(i,{},function(e){e||n&&(t.success[n]=!0)}))}},e}(K),J=new(function(t){function e(){t.call(this,"appUserTurnstile")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t){M.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return N(t)||j(t)})&&this.queueRequest(Date.now())},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var e=X(M.ACCESS_TOKEN),n=e?e.u:M.ACCESS_TOKEN,i=n!==this.eventData.tokenU;m(this.anonId)||(this.anonId=d(),i=!0);var r=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),a=new Date(r),s=(r-this.eventData.lastSuccess)/864e5;i=i||s>=1||s<-1||o.getDate()!==a.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(r,{"enabled.telemetry":!1},function(e){e||(t.eventData.lastSuccess=r,t.eventData.tokenU=n)})}},e}(K)),$=J.postTurnstileEvent.bind(J),Q=new Y,tt=Q.postMapLoadEvent.bind(Q),et={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(et);var nt=function(t){function e(e,n,i){401===n&&j(i)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=n,this.url=i,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);function it(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var rt,ot,at=it()?function(){return self.worker&&self.worker.referrer}:function(){var t=self.location.origin;if(t&&"null"!==t&&"file://"!==t)return t+self.location.pathname},st=function(t,e){if(!/^file:/.test(t.url)){if(self.fetch&&self.Request&&self.AbortController)return function(t,e){var n=new self.AbortController,i=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:at(),signal:n.signal});return"json"===t.type&&i.headers.set("Accept","application/json"),self.fetch(i).then(function(n){n.ok?n[t.type||"text"]().then(function(t){e(null,t,n.headers.get("Cache-Control"),n.headers.get("Expires"))}).catch(function(t){return e(new Error(t.message))}):e(new nt(n.statusText,n.status,t.url))}).catch(function(t){20!==t.code&&e(new Error(t.message))}),{cancel:function(){return n.abort()}}}(t,e);if(it()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}return function(t,e){var n=new self.XMLHttpRequest;for(var i in n.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(n.responseType="arraybuffer"),t.headers)n.setRequestHeader(i,t.headers[i]);return"json"===t.type&&n.setRequestHeader("Accept","application/json"),n.withCredentials="include"===t.credentials,n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var i=n.response;if("json"===t.type)try{i=JSON.parse(n.response)}catch(t){return e(t)}e(null,i,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else e(new nt(n.statusText,n.status,t.url))},n.send(t.body),{cancel:function(){return n.abort()}}}(t,e)},lt=function(t,e){return st(p(t,{type:"arrayBuffer"}),e)},ut=function(t,e){return st(p(t,{method:"POST"}),e)};rt=[],ot=0;var ct=function(t,e){if(ot>=M.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return rt.push(n),n}ot++;var i=!1,r=function(){if(!i)for(i=!0,ot--;rt.length&&ot<M.MAX_PARALLEL_IMAGE_REQUESTS;){var t=rt.shift(),e=t.requestParameters,n=t.callback;t.cancelled||(t.cancel=ct(e,n).cancel)}},o=lt(t,function(t,n,i,o){if(r(),t)e(t);else if(n){var a=new self.Image,s=self.URL||self.webkitURL;a.onload=function(){e(null,a),s.revokeObjectURL(a.src)},a.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 l=new self.Blob([new Uint8Array(n)],{type:"image/png"});a.cacheControl=i,a.expires=o,a.src=n.byteLength?s.createObjectURL(l):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}});return{cancel:function(){o.cancel(),r()}}};function pt(t,e,n){n[t]&&-1!==n[t].indexOf(e)||(n[t]=n[t]||[],n[t].push(e))}function ht(t,e,n){if(n&&n[t]){var i=n[t].indexOf(e);-1!==i&&n[t].splice(i,1)}}var ft=function(t,e){void 0===e&&(e={}),p(this,e),this.type=t},dt=function(t){function e(e,n){void 0===n&&(n={}),t.call(this,"error",p({error:e},n))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ft),mt=function(){};mt.prototype.on=function(t,e){return this._listeners=this._listeners||{},pt(t,e,this._listeners),this},mt.prototype.off=function(t,e){return ht(t,e,this._listeners),ht(t,e,this._oneTimeListeners),this},mt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},pt(t,e,this._oneTimeListeners),this},mt.prototype.fire=function(t,e){"string"==typeof t&&(t=new ft(t,e||{}));var n=t.type;if(this.listens(n)){t.target=this;for(var i=0,r=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];i<r.length;i+=1)r[i].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];o<a.length;o+=1){var s=a[o];ht(n,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(p(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof dt&&console.error(t.error);return this},mt.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)},mt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var yt={$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"},clusterProperties:{type:"*"},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_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"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:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum: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"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{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_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"}},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"}},"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"}}},_t=function(t,e,n,i){this.message=(t?t+": ":"")+n,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function gt(t){var e=t.key,n=t.value;return n?[new _t(e,n,"constants have been deprecated as of v8")]:[]}function vt(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,r=e;i<r.length;i+=1){var o=r[i];for(var a in o)t[a]=o[a]}return t}function xt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function bt(t){return Array.isArray(t)?t.map(bt):xt(t)}var wt=function(t){function e(e,n){t.call(this,n),this.message=n,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Et=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var n=0,i=e;n<i.length;n+=1){var r=i[n],o=r[0],a=r[1];this.bindings[o]=a}};Et.prototype.concat=function(t){return new Et(this,t)},Et.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.")},Et.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Tt={kind:"null"},St={kind:"number"},Pt={kind:"string"},Ct={kind:"boolean"},kt={kind:"color"},At={kind:"object"},zt={kind:"value"},Lt={kind:"collator"},Mt={kind:"formatted"};function It(t,e){return{kind:"array",itemType:t,N:e}}function Ot(t){if("array"===t.kind){var e=Ot(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Dt=[Tt,St,Pt,Ct,kt,Mt,At,It(zt)];function Rt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Rt(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 n=0,i=Dt;n<i.length;n+=1)if(!Rt(i[n],e))return null}return"Expected "+Ot(t)+" but found "+Ot(e)+" instead."}var Bt=e(function(t,e){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function r(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100*255):i(parseInt(t))}function a(t){return"%"===t[t.length-1]?r(parseFloat(t)/100):r(parseFloat(t))}function s(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in n)return n[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.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===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=r.indexOf("("),u=r.indexOf(")");if(-1!==l&&u+1===r.length){var c=r.substr(0,l),p=r.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),h];case"hsla":if(4!==p.length)return null;h=a(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=a(p[1]),m=a(p[2]),y=m<=.5?m*(d+1):m+d-m*d,_=2*m-y;return[i(255*s(_,y,f+1/3)),i(255*s(_,y,f)),i(255*s(_,y,f-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,Ft=function(t,e,n,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=n,this.a=i};Ft.parse=function(t){if(t){if(t instanceof Ft)return t;if("string"==typeof t){var e=Bt(t);if(e)return new Ft(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Ft.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],i=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(i)+","+r+")"},Ft.prototype.toArray=function(){var t=this.r,e=this.g,n=this.b,i=this.a;return 0===i?[0,0,0,0]:[255*t/i,255*e/i,255*n/i,i]},Ft.black=new Ft(0,0,0,1),Ft.white=new Ft(1,1,1,1),Ft.transparent=new Ft(0,0,0,0),Ft.red=new Ft(1,0,0,1);var Nt=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Nt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Nt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ut=function(t,e,n){this.text=t,this.scale=e,this.fontStack=n},jt=function(t){this.sections=t};function Vt(t,e,n,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,n,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,n,i]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Zt(t){if(null===t)return Tt;if("string"==typeof t)return Pt;if("boolean"==typeof t)return Ct;if("number"==typeof t)return St;if(t instanceof Ft)return kt;if(t instanceof Nt)return Lt;if(t instanceof jt)return Mt;if(Array.isArray(t)){for(var e,n=t.length,i=0,r=t;i<r.length;i+=1){var o=Zt(r[i]);if(e){if(e===o)continue;e=zt;break}e=o}return It(e||zt,n)}return At}function qt(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Ft||t instanceof jt?t.toString():JSON.stringify(t)}jt.fromString=function(t){return new jt([new Ut(t,null,null)])},jt.prototype.toString=function(){return this.sections.map(function(t){return t.text}).join("")},jt.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var i=n[e];t.push(i.text);var r={};i.fontStack&&(r["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(r["font-scale"]=i.scale),t.push(r)}return t};var Gt=function(t,e){this.type=t,this.value=e};Gt.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 Ft)return!0;if(e instanceof Nt)return!0;if(e instanceof jt)return!0;if(Array.isArray(e)){for(var n=0,i=e;n<i.length;n+=1)if(!t(i[n]))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 n=t[1],i=Zt(n),r=e.expectedType;return"array"!==i.kind||0!==i.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(i=r),new Gt(i,n)},Gt.prototype.evaluate=function(){return this.value},Gt.prototype.eachChild=function(){},Gt.prototype.possibleOutputs=function(){return[this.value]},Gt.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Ft?["rgba"].concat(this.value.toArray()):this.value instanceof jt?this.value.serialize():this.value};var Wt=function(t){this.name="ExpressionEvaluationError",this.message=t};Wt.prototype.toJSON=function(){return this.message};var Ht={string:Pt,number:St,boolean:Ct,object:At},Xt=function(t,e){this.type=t,this.args=e};Xt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n,i=1,r=t[0];if("array"===r){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in Ht)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=Ht[s],i++}else o=zt;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],i++}n=It(o,a)}else n=Ht[r];for(var l=[];i<t.length;i++){var u=e.parse(t[i],i,zt);if(!u)return null;l.push(u)}return new Xt(n,l)},Xt.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!Rt(this.type,Zt(n)))return n;if(e===this.args.length-1)throw new Wt("Expected value to be of type "+Ot(this.type)+", but found "+Ot(Zt(n))+" instead.")}return null},Xt.prototype.eachChild=function(t){this.args.forEach(t)},Xt.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Xt.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var n=t.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){e.push(n.kind);var i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var Kt=function(t){this.type=Mt,this.sections=t};Kt.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 n=[],i=1;i<t.length-1;i+=2){var r=e.parse(t[i],1,zt);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[i+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,St)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,It(Pt))))return null;n.push({text:r,scale:s,font:l})}return new Kt(n)},Kt.prototype.evaluate=function(t){return new jt(this.sections.map(function(e){return new Ut(qt(e.text.evaluate(t)),e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null)}))},Kt.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var i=n[e];t(i.text),i.scale&&t(i.scale),i.font&&t(i.font)}},Kt.prototype.possibleOutputs=function(){return[void 0]},Kt.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var i=n[e];t.push(i.text.serialize());var r={};i.scale&&(r["font-scale"]=i.scale.serialize()),i.font&&(r["text-font"]=i.font.serialize()),t.push(r)}return t};var Yt={"to-boolean":Ct,"to-color":kt,"to-number":St,"to-string":Pt},Jt=function(t,e){this.type=t,this.args=e};Jt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return e.error("Expected one argument.");for(var i=Yt[n],r=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,zt);if(!a)return null;r.push(a)}return new Jt(i,r)},Jt.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,n,i=0,r=this.args;i<r.length;i+=1){if(n=null,(e=r[i].evaluate(t))instanceof Ft)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":Vt(e[0],e[1],e[2],e[3])))return new Ft(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Wt(n||"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 Wt("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?jt.fromString(qt(this.args[0].evaluate(t))):qt(this.args[0].evaluate(t))},Jt.prototype.eachChild=function(t){this.args.forEach(t)},Jt.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Jt.prototype.serialize=function(){if("formatted"===this.type.kind)return new Kt([{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 $t=["Unknown","Point","LineString","Polygon"],Qt=function(){this.globals=null,this.feature=null,this.featureState=null,this._parseColorCache={}};Qt.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Qt.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?$t[this.feature.type]:this.feature.type:null},Qt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Qt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Ft.parse(t)),e};var te=function(t,e,n,i){this.name=t,this.type=e,this._evaluate=n,this.args=i};te.prototype.evaluate=function(t){return this._evaluate(t,this.args)},te.prototype.eachChild=function(t){this.args.forEach(t)},te.prototype.possibleOutputs=function(){return[void 0]},te.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},te.parse=function(t,e){var n,i=t[0],r=te.definitions[i];if(!r)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter(function(e){var n=e[0];return!Array.isArray(n)||n.length===t.length-1}),l=null,u=0,c=s;u<c.length;u+=1){var p=c[u],h=p[0],f=p[1];l=new ae(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var _=t[y],g=Array.isArray(h)?h[y-1]:h.type,v=l.parse(_,1+d.length,g);if(!v){m=!0;break}d.push(v)}if(!m)if(Array.isArray(h)&&h.length!==d.length)l.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new te(i,o,f,d)}}if(1===s.length)(n=e.errors).push.apply(n,l.errors);else{for(var E=(s.length?s:a).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Ot).join(", ")+")":"("+Ot(e.type)+"...)"}).join(" | "),T=[],S=1;S<t.length;S++){var P=e.parse(t[S],1+T.length);if(!P)return null;T.push(Ot(P.type))}e.error("Expected arguments of type "+E+", but found ("+T.join(", ")+") instead.")}return null},te.register=function(t,e){for(var n in te.definitions=e,e)t[n]=te};var ee=function(t,e,n){this.type=Lt,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};function ne(t){if(t instanceof te){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&&!ne(t)&&(e=!1)}),e}function ie(t){if(t instanceof te&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!ie(t)&&(e=!1)}),e}function re(t,e){if(t instanceof te&&e.indexOf(t.name)>=0)return!1;var n=!0;return t.eachChild(function(t){n&&!re(t,e)&&(n=!1)}),n}ee.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,Ct);if(!i)return null;var r=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Ct);if(!r)return null;var o=null;return n.locale&&!(o=e.parse(n.locale,1,Pt))?null:new ee(i,r,o)},ee.prototype.evaluate=function(t){return new Nt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ee.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ee.prototype.possibleOutputs=function(){return[void 0]},ee.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 oe=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};oe.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new oe(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},oe.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},oe.prototype.eachChild=function(){},oe.prototype.possibleOutputs=function(){return[void 0]},oe.prototype.serialize=function(){return["var",this.name]};var ae=function(t,e,n,i,r){void 0===e&&(e=[]),void 0===i&&(i=new Et),void 0===r&&(r=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=i,this.errors=r,this.expectedType=n};function se(t,e){for(var n,i,r=0,o=t.length-1,a=0;r<=o;){if(n=t[a=Math.floor((r+o)/2)],i=t[a+1],e===n||e>n&&e<i)return a;if(n<e)r=a+1;else{if(!(n>e))throw new Wt("Input is not a number.");o=a-1}}return Math.max(a-1,0)}ae.prototype.parse=function(t,e,n,i,r){return void 0===r&&(r={}),e?this.concat(e,n,i)._parse(t,r):this._parse(t,r)},ae.prototype._parse=function(t,e){function n(t,e,n){return"assert"===n?new Xt(e,[t]):"coerce"===n?new Jt(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 i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[i];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=n(o,a,e.typeAnnotation||"coerce");else o=n(o,a,e.typeAnnotation||"assert")}if(!(o instanceof Gt)&&function t(e){if(e instanceof oe)return t(e.boundExpression);if(e instanceof te&&"error"===e.name)return!1;if(e instanceof ee)return!1;var n=e instanceof Jt||e instanceof Xt,i=!0;return e.eachChild(function(e){i=n?i&&t(e):i&&e instanceof Gt}),!!i&&ne(e)&&re(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new Qt;try{o=new Gt(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+i+'". 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.")},ae.prototype.concat=function(t,e,n){var i="number"==typeof t?this.path.concat(t):this.path,r=n?this.scope.concat(n):this.scope;return new ae(this.registry,i,e||null,r,this.errors)},ae.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new wt(i,t))},ae.prototype.checkSubtype=function(t,e){var n=Rt(t,e);return n&&this.error(n),n};var le=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,r=n;i<r.length;i+=1){var o=r[i],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};function ue(t,e,n){return t*(1-n)+e*n}le.parse=function(t,e){var n=t[1],i=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(!(n=e.parse(n,1,St)))return null;var r=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),i.unshift(-1/0);for(var a=0;a<i.length;a+=2){var s=i[a],l=i[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 p=e.parse(l,c,o);if(!p)return null;o=o||p.type,r.push([s,p])}return new le(o,n,r)},le.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);var r=e.length;return i>=e[r-1]?n[r-1].evaluate(t):n[se(e,i)].evaluate(t)},le.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1)t(n[e])},le.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}))},le.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 ce=Object.freeze({number:ue,color:function(t,e,n){return new Ft(ue(t.r,e.r,n),ue(t.g,e.g,n),ue(t.b,e.b,n),ue(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,i){return ue(t,e[i],n)})}}),pe=.95047,he=1,fe=1.08883,de=4/29,me=6/29,ye=3*me*me,_e=me*me*me,ge=Math.PI/180,ve=180/Math.PI;function xe(t){return t>_e?Math.pow(t,1/3):t/ye+de}function be(t){return t>me?t*t*t:ye*(t-de)}function we(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ee(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Te(t){var e=Ee(t.r),n=Ee(t.g),i=Ee(t.b),r=xe((.4124564*e+.3575761*n+.1804375*i)/pe),o=xe((.2126729*e+.7151522*n+.072175*i)/he);return{l:116*o-16,a:500*(r-o),b:200*(o-xe((.0193339*e+.119192*n+.9503041*i)/fe)),alpha:t.a}}function Se(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=he*be(e),n=pe*be(n),i=fe*be(i),new Ft(we(3.2404542*n-1.5371385*e-.4985314*i),we(-.969266*n+1.8760108*e+.041556*i),we(.0556434*n-.2040259*e+1.0572252*i),t.alpha)}function Pe(t,e,n){var i=e-t;return t+n*(i>180||i<-180?i-360*Math.round(i/360):i)}var Ce={forward:Te,reverse:Se,interpolate:function(t,e,n){return{l:ue(t.l,e.l,n),a:ue(t.a,e.a,n),b:ue(t.b,e.b,n),alpha:ue(t.alpha,e.alpha,n)}}},ke={forward:function(t){var e=Te(t),n=e.l,i=e.a,r=e.b,o=Math.atan2(r,i)*ve;return{h:o<0?o+360:o,c:Math.sqrt(i*i+r*r),l:n,alpha:t.a}},reverse:function(t){var e=t.h*ge,n=t.c;return Se({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:Pe(t.h,e.h,n),c:ue(t.c,e.c,n),l:ue(t.l,e.l,n),alpha:ue(t.alpha,e.alpha,n)}}},Ae=Object.freeze({lab:Ce,hcl:ke}),ze=function(t,e,n,i,r){this.type=t,this.operator=e,this.interpolation=n,this.input=i,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)}};function Le(t,e,n,i){var r=i-n,o=t-n;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}ze.interpolationFactor=function(t,e,i,r){var o=0;if("exponential"===t.name)o=Le(e,t.base,i,r);else if("linear"===t.name)o=Le(e,1,i,r);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new n(a[0],a[1],a[2],a[3]).solve(Le(e,1,i,r))}return o},ze.parse=function(t,e){var n=t[0],i=t[1],r=t[2],o=t.slice(3);if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){var a=i[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:a}}else{if("cubic-bezier"!==i[0])return e.error("Unknown interpolation type "+String(i[0]),1,0);var s=i.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);i={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,St)))return null;var l=[],u=null;"interpolate-hcl"===n||"interpolate-lab"===n?u=kt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],f=c+3,d=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new ze(u,n,i,r,l):e.error("Type "+Ot(u)+" is not interpolatable.")},ze.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);var r=e.length;if(i>=e[r-1])return n[r-1].evaluate(t);var o=se(e,i),a=e[o],s=e[o+1],l=ze.interpolationFactor(this.interpolation,i,a,s),u=n[o].evaluate(t),c=n[o+1].evaluate(t);return"interpolate"===this.operator?ce[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?ke.reverse(ke.interpolate(ke.forward(u),ke.forward(c),l)):Ce.reverse(Ce.interpolate(Ce.forward(u),Ce.forward(c),l))},ze.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1)t(n[e])},ze.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}))},ze.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()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};var Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,i=e.expectedType;i&&"value"!==i.kind&&(n=i);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,n,void 0,{typeAnnotation:"omit"});if(!l)return null;n=n||l.type,r.push(l)}var u=i&&r.some(function(t){return Rt(i,t.type)});return new Me(u?zt:n,r)},Me.prototype.evaluate=function(t){for(var e=null,n=0,i=this.args;n<i.length&&null===(e=i[n].evaluate(t));n+=1);return e},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Me.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ie=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};Ie.prototype.evaluate=function(t){return this.result.evaluate(t)},Ie.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1)t(n[e][1]);t(this.result)},Ie.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],i=1;i<t.length-1;i+=2){var r=t[i];if("string"!=typeof r)return e.error("Expected string, but found "+typeof r+" instead.",i);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;n.push([r,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new Ie(n,a):null},Ie.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},Ie.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var i=n[e],r=i[0],o=i[1];t.push(r,o.serialize())}return t.push(this.result.serialize()),t};var Oe=function(t,e,n){this.type=t,this.index=e,this.input=n};Oe.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,St),i=e.parse(t[2],2,It(e.expectedType||zt));if(!n||!i)return null;var r=i.type;return new Oe(r.itemType,n,i)},Oe.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new Wt("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new Wt("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new Wt("Array index must be an integer, but found "+e+" instead.");return n[e]},Oe.prototype.eachChild=function(t){t(this.index),t(this.input)},Oe.prototype.possibleOutputs=function(){return[void 0]},Oe.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var De=function(t,e,n,i,r,o){this.inputType=t,this.type=e,this.input=n,this.cases=i,this.outputs=r,this.otherwise=o};De.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 n,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=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,p=s;c<p.length;c+=1){var h=p[c];if("number"!=typeof h&&"string"!=typeof h)return u.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,Zt(h)))return null}else n=Zt(h);if(void 0!==r[String(h)])return u.error("Branch labels must be unique.");r[String(h)]=o.length}var f=e.parse(l,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,zt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,i);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(n,d.type)?null:new De(n,i,d,r,o,m):null},De.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(Zt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},De.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},De.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},De.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],i={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(p=i[this.cases[a]])?(i[this.cases[a]]=n.length,n.push([this.cases[a],[a]])):n[p][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=n;l<u.length;l+=1){var c=u[l],p=c[0],h=c[1];1===h.length?e.push(s(h[0])):e.push(h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Re=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};function Be(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 Fe(t,e,n,i){return 0===i.compare(e,n)}function Ne(t,e,n){var i="=="!==t&&"!="!==t;return function(){function r(t,e,n){this.type=Ct,this.lhs=t,this.rhs=e,this.collator=n,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 n=t[0],o=e.parse(t[1],1,zt);if(!o)return null;if(!Be(n,o.type))return e.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Ot(o.type)+"'.");var a=e.parse(t[2],2,zt);if(!a)return null;if(!Be(n,a.type))return e.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Ot(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Ot(o.type)+"' and '"+Ot(a.type)+"'.");i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Xt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Xt(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,Lt)))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(i&&this.hasUntypedArgument){var s=Zt(o),l=Zt(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Wt('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var u=Zt(o),c=Zt(a);if("string"!==u.kind||"string"!==c.kind)return e(r,o,a)}return this.collator?n(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}()}Re.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 n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i=[],r=1;r<t.length-1;r+=2){var o=e.parse(t[r],r,Ct);if(!o)return null;var a=e.parse(t[r+1],r+1,n);if(!a)return null;i.push([o,a]),n=n||a.type}var s=e.parse(t[t.length-1],t.length-1,n);return s?new Re(n,i,s):null},Re.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var i=n[e],r=i[0],o=i[1];if(r.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},Re.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var i=n[e],r=i[0],o=i[1];t(r),t(o)}t(this.otherwise)},Re.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Re.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ue=Ne("==",function(t,e,n){return e===n},Fe),je=Ne("!=",function(t,e,n){return e!==n},function(t,e,n,i){return!Fe(0,e,n,i)}),Ve=Ne("<",function(t,e,n){return e<n},function(t,e,n,i){return i.compare(e,n)<0}),Ze=Ne(">",function(t,e,n){return e>n},function(t,e,n,i){return i.compare(e,n)>0}),qe=Ne("<=",function(t,e,n){return e<=n},function(t,e,n,i){return i.compare(e,n)<=0}),Ge=Ne(">=",function(t,e,n){return e>=n},function(t,e,n,i){return i.compare(e,n)>=0}),We=function(t,e,n,i,r){this.type=Pt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=r};We.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var n=e.parse(t[1],1,St);if(!n)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var r=null;if(i.locale&&!(r=e.parse(i.locale,1,Pt)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,Pt)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,St)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,St))?null:new We(n,r,o,a,s)},We.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},We.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},We.prototype.possibleOutputs=function(){return[void 0]},We.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var He=function(t){this.type=St,this.input=t};He.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+Ot(n.type)+" instead."):new He(n):null},He.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 Wt("Expected value to be of type string or array, but found "+Ot(Zt(e))+" instead.")},He.prototype.eachChild=function(t){t(this.input)},He.prototype.possibleOutputs=function(){return[void 0]},He.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Xe={"==":Ue,"!=":je,">":Ze,"<":Ve,">=":Ge,"<=":qe,array:Xt,at:Oe,boolean:Xt,case:Re,coalesce:Me,collator:ee,format:Kt,interpolate:ze,"interpolate-hcl":ze,"interpolate-lab":ze,length:He,let:Ie,literal:Gt,match:De,number:Xt,"number-format":We,object:Xt,step:le,string:Xt,"to-boolean":Jt,"to-color":Jt,"to-number":Jt,"to-string":Jt,var:oe};function Ke(t,e){var n=e[0],i=e[1],r=e[2],o=e[3];n=n.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);var a=o?o.evaluate(t):1,s=Vt(n,i,r,a);if(s)throw new Wt(s);return new Ft(n/255*a,i/255*a,r/255*a,a)}function Ye(t,e){return t in e}function Je(t,e){var n=e[t];return void 0===n?null:n}function $e(t){return{type:t}}function Qe(t){return{result:"success",value:t}}function tn(t){return{result:"error",value:t}}function en(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function nn(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function rn(t){return!!t.expression&&t.expression.interpolated}function on(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function an(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function sn(t){return t}function ln(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function un(t,e,n,i,r){return ln(typeof n===r?i[n]:void 0,t.default,e.default)}function cn(t,e,n){if("number"!==on(n))return ln(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var r=fn(t.stops,n);return t.stops[r][1]}function pn(t,e,n){var i=void 0!==t.base?t.base:1;if("number"!==on(n))return ln(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var o=fn(t.stops,n),a=function(t,e,n,i){var r=i-n,o=t-n;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}(n,i,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=ce[e.type]||sn;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=Ae[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 n=s.evaluate.apply(void 0,t),i=l.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==i)return u(n,i,a)}}:u(s,l,a)}function hn(t,e,n){return"color"===e.type?n=Ft.parse(n):"formatted"===e.type?n=jt.fromString(n.toString()):on(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),ln(n,t.default,e.default)}function fn(t,e){for(var n,i,r=0,o=t.length-1,a=0;r<=o;){if(n=t[a=Math.floor((r+o)/2)][0],i=t[a+1][0],e===n||e>n&&e<i)return a;n<e?r=a+1:n>e&&(o=a-1)}return Math.max(a-1,0)}te.register(Xe,{error:[{kind:"error"},[Pt],function(t,e){var n=e[0];throw new Wt(n.evaluate(t))}],typeof:[Pt,[zt],function(t,e){return Ot(Zt(e[0].evaluate(t)))}],"to-rgba":[It(St,4),[kt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[kt,[St,St,St],Ke],rgba:[kt,[St,St,St,St],Ke],has:{type:Ct,overloads:[[[Pt],function(t,e){return Ye(e[0].evaluate(t),t.properties())}],[[Pt,At],function(t,e){var n=e[0],i=e[1];return Ye(n.evaluate(t),i.evaluate(t))}]]},get:{type:zt,overloads:[[[Pt],function(t,e){return Je(e[0].evaluate(t),t.properties())}],[[Pt,At],function(t,e){var n=e[0],i=e[1];return Je(n.evaluate(t),i.evaluate(t))}]]},"feature-state":[zt,[Pt],function(t,e){return Je(e[0].evaluate(t),t.featureState||{})}],properties:[At,[],function(t){return t.properties()}],"geometry-type":[Pt,[],function(t){return t.geometryType()}],id:[zt,[],function(t){return t.id()}],zoom:[St,[],function(t){return t.globals.zoom}],"heatmap-density":[St,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[St,[],function(t){return t.globals.lineProgress||0}],accumulated:[zt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[St,$e(St),function(t,e){for(var n=0,i=0,r=e;i<r.length;i+=1)n+=r[i].evaluate(t);return n}],"*":[St,$e(St),function(t,e){for(var n=1,i=0,r=e;i<r.length;i+=1)n*=r[i].evaluate(t);return n}],"-":{type:St,overloads:[[[St,St],function(t,e){var n=e[0],i=e[1];return n.evaluate(t)-i.evaluate(t)}],[[St],function(t,e){return-e[0].evaluate(t)}]]},"/":[St,[St,St],function(t,e){var n=e[0],i=e[1];return n.evaluate(t)/i.evaluate(t)}],"%":[St,[St,St],function(t,e){var n=e[0],i=e[1];return n.evaluate(t)%i.evaluate(t)}],ln2:[St,[],function(){return Math.LN2}],pi:[St,[],function(){return Math.PI}],e:[St,[],function(){return Math.E}],"^":[St,[St,St],function(t,e){var n=e[0],i=e[1];return Math.pow(n.evaluate(t),i.evaluate(t))}],sqrt:[St,[St],function(t,e){var n=e[0];return Math.sqrt(n.evaluate(t))}],log10:[St,[St],function(t,e){var n=e[0];return Math.log(n.evaluate(t))/Math.LN10}],ln:[St,[St],function(t,e){var n=e[0];return Math.log(n.evaluate(t))}],log2:[St,[St],function(t,e){var n=e[0];return Math.log(n.evaluate(t))/Math.LN2}],sin:[St,[St],function(t,e){var n=e[0];return Math.sin(n.evaluate(t))}],cos:[St,[St],function(t,e){var n=e[0];return Math.cos(n.evaluate(t))}],tan:[St,[St],function(t,e){var n=e[0];return Math.tan(n.evaluate(t))}],asin:[St,[St],function(t,e){var n=e[0];return Math.asin(n.evaluate(t))}],acos:[St,[St],function(t,e){var n=e[0];return Math.acos(n.evaluate(t))}],atan:[St,[St],function(t,e){var n=e[0];return Math.atan(n.evaluate(t))}],min:[St,$e(St),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[St,$e(St),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[St,[St],function(t,e){var n=e[0];return Math.abs(n.evaluate(t))}],round:[St,[St],function(t,e){var n=e[0].evaluate(t);return n<0?-Math.round(-n):Math.round(n)}],floor:[St,[St],function(t,e){var n=e[0];return Math.floor(n.evaluate(t))}],ceil:[St,[St],function(t,e){var n=e[0];return Math.ceil(n.evaluate(t))}],"filter-==":[Ct,[Pt,zt],function(t,e){var n=e[0],i=e[1];return t.properties()[n.value]===i.value}],"filter-id-==":[Ct,[zt],function(t,e){var n=e[0];return t.id()===n.value}],"filter-type-==":[Ct,[Pt],function(t,e){var n=e[0];return t.geometryType()===n.value}],"filter-<":[Ct,[Pt,zt],function(t,e){var n=e[0],i=e[1],r=t.properties()[n.value],o=i.value;return typeof r==typeof o&&r<o}],"filter-id-<":[Ct,[zt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i<r}],"filter->":[Ct,[Pt,zt],function(t,e){var n=e[0],i=e[1],r=t.properties()[n.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[Ct,[zt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i>r}],"filter-<=":[Ct,[Pt,zt],function(t,e){var n=e[0],i=e[1],r=t.properties()[n.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[Ct,[zt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i<=r}],"filter->=":[Ct,[Pt,zt],function(t,e){var n=e[0],i=e[1],r=t.properties()[n.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[Ct,[zt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i>=r}],"filter-has":[Ct,[zt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ct,[],function(t){return null!==t.id()}],"filter-type-in":[Ct,[It(Pt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ct,[It(zt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ct,[Pt,It(zt)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[Ct,[Pt,It(zt)],function(t,e){var n=e[0],i=e[1];return function(t,e,n,i){for(;n<=i;){var r=n+i>>1;if(e[r]===t)return!0;e[r]>t?i=r-1:n=r+1}return!1}(t.properties()[n.value],i.value,0,i.value.length-1)}],all:{type:Ct,overloads:[[[Ct,Ct],function(t,e){var n=e[0],i=e[1];return n.evaluate(t)&&i.evaluate(t)}],[$e(Ct),function(t,e){for(var n=0,i=e;n<i.length;n+=1)if(!i[n].evaluate(t))return!1;return!0}]]},any:{type:Ct,overloads:[[[Ct,Ct],function(t,e){var n=e[0],i=e[1];return n.evaluate(t)||i.evaluate(t)}],[$e(Ct),function(t,e){for(var n=0,i=e;n<i.length;n+=1)if(i[n].evaluate(t))return!0;return!1}]]},"!":[Ct,[Ct],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Ct,[Pt],function(t,e){var n=e[0],i=t.globals&&t.globals.isSupportedScript;return!i||i(n.evaluate(t))}],upcase:[Pt,[Pt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Pt,[Pt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Pt,$e(zt),function(t,e){return e.map(function(e){return qt(e.evaluate(t))}).join("")}],"resolved-locale":[Pt,[Lt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var dn=function(t,e){var n;this.expression=t,this._warningHistory={},this._evaluator=new Qt,this._defaultValue=e?"color"===(n=e).type&&an(n.default)?new Ft(0,0,0,0):"color"===n.type?Ft.parse(n.default)||null:void 0===n.default?null:n.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function mn(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Xe}function yn(t,e){var n=new ae(Xe,[],e?function(t){var e={color:kt,string:Pt,number:St,enum:Pt,boolean:Ct,formatted:Mt};return"array"===t.type?It(e[t.value]||zt,t.length):e[t.type]}(e):void 0),i=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?Qe(new dn(i,e)):tn(n.errors)}dn.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this.expression.evaluate(this._evaluator)},dn.prototype.evaluate=function(t,e,n){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null;try{var i=this.expression.evaluate(this._evaluator);if(null==i)return this._defaultValue;if(this._enumValues&&!(i in this._enumValues))throw new Wt("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(i)+" instead.");return i}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var _n=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ie(e.expression)};_n.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n)},_n.prototype.evaluate=function(t,e,n){return this._styleExpression.evaluate(t,e,n)};var gn=function(t,e,n){this.kind=t,this.zoomStops=n.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ie(e.expression),n instanceof ze&&(this._interpolationType=n.interpolation)};function vn(t,e){if("error"===(t=yn(t,e)).result)return t;var n=t.value.expression,i=ne(n);if(!i&&!en(e))return tn([new wt("","data expressions not supported")]);var r=re(n,["zoom"]);if(!r&&!nn(e))return tn([new wt("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof Ie)n=t(e.result);else if(e instanceof Me)for(var i=0,r=e.args;i<r.length;i+=1){var o=r[i];if(n=t(o))break}else(e instanceof le||e instanceof ze)&&e.input instanceof te&&"zoom"===e.input.name&&(n=e);return n instanceof wt?n:(e.eachChild(function(e){var i=t(e);i instanceof wt?n=i:!n&&i?n=new wt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&i&&n!==i&&(n=new wt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),n)}(n);return o||r?o instanceof wt?tn([o]):o instanceof ze&&!rn(e)?tn([new wt("",'"interpolate" expressions cannot be used with this property')]):Qe(o?new gn(i?"camera":"composite",t.value,o):new _n(i?"constant":"source",t.value)):tn([new wt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}gn.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n)},gn.prototype.evaluate=function(t,e,n){return this._styleExpression.evaluate(t,e,n)},gn.prototype.interpolationFactor=function(t,e,n){return this._interpolationType?ze.interpolationFactor(this._interpolationType,t,e,n):0};var xn=function(t,e){this._parameters=t,this._specification=e,vt(this,function t(e,n){var i,r,o,a="color"===n.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||void 0!==e.property,u=s||!l,c=e.type||(rn(n)?"exponential":"interval");if(a&&((e=vt({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Ft.parse(t[1])]})),e.default?e.default=Ft.parse(e.default):e.default=Ft.parse(n.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Ae[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)i=pn;else if("interval"===c)i=cn;else if("categorical"===c){i=un,r=Object.create(null);for(var p=0,h=e.stops;p<h.length;p+=1){var f=h[p];r[f[0]]=f[1]}o=typeof e.stops[0][0]}else{if("identity"!==c)throw new Error('Unknown function type "'+c+'"');i=hn}if(s){for(var d={},m=[],y=0;y<e.stops.length;y++){var _=e.stops[y],g=_[0].zoom;void 0===d[g]&&(d[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},m.push(g)),d[g].stops.push([_[0].value,_[1]])}for(var v=[],x=0,b=m;x<b.length;x+=1){var w=b[x];v.push([d[w].zoom,t(d[w],n)])}return{kind:"composite",interpolationFactor:ze.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:v.map(function(t){return t[0]}),evaluate:function(t,i){var r=t.zoom;return pn({stops:v,base:e.base},n,r).evaluate(r,i)}}}return u?{kind:"camera",interpolationFactor:"exponential"===c?ze.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 i(e,n,a,r,o)}}:{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?ln(e.default,n.default):i(e,n,s,r,o)}}}(this._parameters,this._specification))};function bn(t,e){if(an(t))return new xn(t,e);if(mn(t)){var n=vn(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return t.key+": "+t.message}).join(", "));return n.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=Ft.parse(t)),{kind:"constant",evaluate:function(){return i}}}function wn(t){var e=t.key,n=t.value,i=t.valueSpec||{},r=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=on(n);if("object"!==l)return[new _t(e,n,"object expected, "+l+" found")];for(var u in n){var c=u.split(".")[0],p=i[c]||i["*"],h=void 0;if(r[c])h=r[c];else if(i[c])h=Wn;else if(r["*"])h=r["*"];else{if(!i["*"]){s.push(new _t(e,n[u],'unknown property "'+u+'"'));continue}h=Wn}s=s.concat(h({key:(e?e+".":e)+u,value:n[u],valueSpec:p,style:o,styleSpec:a,object:n,objectKey:u},n))}for(var f in i)r[f]||i[f].required&&void 0===i[f].default&&void 0===n[f]&&s.push(new _t(e,n,'missing required property "'+f+'"'));return s}function En(t){var e=t.value,n=t.valueSpec,i=t.style,r=t.styleSpec,o=t.key,a=t.arrayElementValidator||Wn;if("array"!==on(e))return[new _t(o,e,"array expected, "+on(e)+" found")];if(n.length&&e.length!==n.length)return[new _t(o,e,"array length "+n.length+" expected, length "+e.length+" found")];if(n["min-length"]&&e.length<n["min-length"])return[new _t(o,e,"array length at least "+n["min-length"]+" expected, length "+e.length+" found")];var s={type:n.value};r.$version<7&&(s.function=n.function),"object"===on(n.value)&&(s=n.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:i,styleSpec:r,key:o+"["+u+"]"}));return l}function Tn(t){var e=t.key,n=t.value,i=t.valueSpec,r=on(n);return"number"!==r?[new _t(e,n,"number expected, "+r+" found")]:"minimum"in i&&n<i.minimum?[new _t(e,n,n+" is less than the minimum value "+i.minimum)]:"maximum"in i&&n>i.maximum?[new _t(e,n,n+" is greater than the maximum value "+i.maximum)]:[]}function Sn(t){var e,n,i,r=t.valueSpec,o=xt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===on(t.value.stops)&&"array"===on(t.value.stops[0])&&"object"===on(t.value.stops[0][0]),c=wn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new _t(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;return e=e.concat(En({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===on(n)&&0===n.length&&e.push(new _t(t.key,n,"array must have at least one stop")),e},default:function(t){return Wn({key:t.key,value:t.value,valueSpec:r,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new _t(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new _t(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!rn(t.valueSpec)&&c.push(new _t(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!en(t.valueSpec)?c.push(new _t(t.key,t.value,"property functions not supported")):s&&!nn(t.valueSpec)&&c.push(new _t(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new _t(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==on(o))return[new _t(s,o,"array expected, "+on(o)+" found")];if(2!==o.length)return[new _t(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==on(o[0]))return[new _t(s,o,"object expected, "+on(o[0])+" found")];if(void 0===o[0].zoom)return[new _t(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new _t(s,o,"object stop key must have value")];if(i&&i>xt(o[0].zoom))return[new _t(s,o[0].zoom,"stop zoom values must appear in ascending order")];xt(o[0].zoom)!==i&&(i=xt(o[0].zoom),n=void 0,a={}),e=e.concat(wn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Tn,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return mn(bt(o[1]))?e.concat([new _t(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Wn({key:s+"[1]",value:o[1],valueSpec:r,style:t.style,styleSpec:t.styleSpec}))}function h(t,i){var s=on(t.value),l=xt(t.value),u=null!==t.value?t.value:i;if(e){if(s!==e)return[new _t(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new _t(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return en(r)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _t(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l<n?[new _t(t.key,u,"stop domain values must appear in ascending order")]:(n=l,"categorical"===o&&l in a?[new _t(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new _t(t.key,u,"integer expected, found "+l)]}}function Pn(t){var e=("property"===t.expressionContext?vn:yn)(bt(t.value),t.valueSpec);if("error"===e.result)return e.value.map(function(e){return new _t(""+t.key+e.key,t.value,e.message)});var n=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==n.possibleOutputs().indexOf(void 0))return[new _t(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!ie(n))return[new _t(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!ie(n))return[new _t(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!re(n,["zoom","feature-state"]))return[new _t(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!ne(n))return[new _t(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Cn(t){var e=t.key,n=t.value,i=t.valueSpec,r=[];return Array.isArray(i.values)?-1===i.values.indexOf(xt(n))&&r.push(new _t(e,n,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(n)+" found")):-1===Object.keys(i.values).indexOf(xt(n))&&r.push(new _t(e,n,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(n)+" found")),r}function kn(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,n=t.slice(1);e<n.length;e+=1){var i=n[e];if(!kn(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}xn.deserialize=function(t){return new xn(t._parameters,t._specification)},xn.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var An={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function zn(t){if(null==t)return function(){return!0};kn(t)||(t=Mn(t));var e=yn(t,An);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return function(t,n){return e.value.evaluate(t,n)}}function Ln(t,e){return t<e?-1:t>e?1:0}function Mn(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?In(t[1],t[2],"=="):"!="===n?Rn(In(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?In(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(Mn))):"all"===n?["all"].concat(t.slice(1).map(Mn)):"none"===n?["all"].concat(t.slice(1).map(Mn).map(Rn)):"in"===n?On(t[1],t.slice(2)):"!in"===n?Rn(On(t[1],t.slice(2))):"has"===n?Dn(t[1]):"!has"!==n||Rn(Dn(t[1]))}function In(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function On(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(Ln)]]:["filter-in-small",t,["literal",e]]}}function Dn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Rn(t){return["!",t]}function Bn(t){return kn(bt(t.value))?Pn(vt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value,i=e.key;if("array"!==on(n))return[new _t(i,n,"array expected, "+on(n)+" found")];var r,o=e.styleSpec,a=[];if(n.length<1)return[new _t(i,n,"filter array must have at least 1 element")];switch(a=a.concat(Cn({key:i+"[0]",value:n[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),xt(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===xt(n[1])&&a.push(new _t(i,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new _t(i,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(r=on(n[1]))&&a.push(new _t(i+"[1]",n[1],"string expected, "+r+" found"));for(var s=2;s<n.length;s++)r=on(n[s]),"$type"===xt(n[1])?a=a.concat(Cn({key:i+"["+s+"]",value:n[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&a.push(new _t(i+"["+s+"]",n[s],"string, number, or boolean expected, "+r+" found"));break;case"any":case"all":case"none":for(var l=1;l<n.length;l++)a=a.concat(t({key:i+"["+l+"]",value:n[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":r=on(n[1]),2!==n.length?a.push(new _t(i,n,'filter array for "'+n[0]+'" operator must have 2 elements')):"string"!==r&&a.push(new _t(i+"[1]",n[1],"string expected, "+r+" found"))}return a}(t)}function Fn(t,e){var n=t.key,i=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 Wn({key:n,value:o,valueSpec:r.transition,style:i,styleSpec:r});var u,c=t.valueSpec||s[a];if(!c)return[new _t(n,o,'unknown property "'+a+'"')];if("string"===on(o)&&en(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new _t(n,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&i&&!i.glyphs&&p.push(new _t(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&an(bt(o))&&"identity"===xt(o.type)&&p.push(new _t(n,o,'"text-font" does not support identity functions'))),p.concat(Wn({key:t.key,value:o,valueSpec:c,style:i,styleSpec:r,expressionContext:"property",propertyType:e,propertyKey:a}))}function Nn(t){return Fn(t,"paint")}function Un(t){return Fn(t,"layout")}function jn(t){var e=[],n=t.value,i=t.key,r=t.style,o=t.styleSpec;n.type||n.ref||e.push(new _t(i,n,'either "type" or "ref" is required'));var a,s=xt(n.type),l=xt(n.ref);if(n.id)for(var u=xt(n.id),c=0;c<t.arrayIndex;c++){var p=r.layers[c];xt(p.id)===u&&e.push(new _t(i,n.id,'duplicate layer id "'+n.id+'", previously used at line '+p.id.__line__))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach(function(t){t in n&&e.push(new _t(i,n[t],'"'+t+'" is prohibited for ref layers'))}),r.layers.forEach(function(t){xt(t.id)===l&&(a=t)}),a?a.ref?e.push(new _t(i,n.ref,"ref cannot reference another ref layer")):s=xt(a.type):e.push(new _t(i,n.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(n.source){var h=r.sources&&r.sources[n.source],f=h&&xt(h.type);h?"vector"===f&&"raster"===s?e.push(new _t(i,n.source,'layer "'+n.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new _t(i,n.source,'layer "'+n.id+'" requires a vector source')):"vector"!==f||n["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new _t(i,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!n.paint||!n.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new _t(i,n,'layer "'+n.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new _t(i,n,'layer "'+n.id+'" must specify a "source-layer"')):e.push(new _t(i,n.source,'source "'+n.source+'" not found'))}else e.push(new _t(i,n,'missing required property "source"'));return e=e.concat(wn({key:i,value:n,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Wn({key:i+".type",value:n.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:Bn,layout:function(t){return wn({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Un(vt({layerType:s},t))}}})},paint:function(t){return wn({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Nn(vt({layerType:s},t))}}})}}}))}function Vn(t){var e=t.value,n=t.key,i=t.styleSpec,r=t.style;if(!e.type)return[new _t(n,e,'"type" is required')];var o,a=xt(e.type);switch(a){case"vector":case"raster":case"raster-dem":if(o=wn({key:n,value:e,valueSpec:i["source_"+a.replace("-","_")],style:t.style,styleSpec:i}),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&o.push(new _t(n+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return o;case"geojson":if(o=wn({key:n,value:e,valueSpec:i.source_geojson,style:r,styleSpec:i}),e.cluster)for(var l in e.clusterProperties){var u=e.clusterProperties[l],c=u[0],p=u[1],h="string"==typeof c?[c,["accumulated"],["get",l]]:c;o.push.apply(o,Pn({key:n+"."+l+".map",value:p,expressionContext:"cluster-map"})),o.push.apply(o,Pn({key:n+"."+l+".reduce",value:h,expressionContext:"cluster-reduce"}))}return o;case"video":return wn({key:n,value:e,valueSpec:i.source_video,style:r,styleSpec:i});case"image":return wn({key:n,value:e,valueSpec:i.source_image,style:r,styleSpec:i});case"canvas":return[new _t(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Cn({key:n+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:r,styleSpec:i})}}function Zn(t){var e=t.value,n=t.styleSpec,i=n.light,r=t.style,o=[],a=on(e);if(void 0===e)return o;if("object"!==a)return o.concat([new _t("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(Wn({key:s,value:e[s],valueSpec:n.transition,style:r,styleSpec:n})):i[s]?o.concat(Wn({key:s,value:e[s],valueSpec:i[s],style:r,styleSpec:n})):o.concat([new _t(s,e[s],'unknown property "'+s+'"')])}return o}function qn(t){var e=t.value,n=t.key,i=on(e);return"string"!==i?[new _t(n,e,"string expected, "+i+" found")]:[]}var Gn={"*":function(){return[]},array:En,boolean:function(t){var e=t.value,n=t.key,i=on(e);return"boolean"!==i?[new _t(n,e,"boolean expected, "+i+" found")]:[]},number:Tn,color:function(t){var e=t.key,n=t.value,i=on(n);return"string"!==i?[new _t(e,n,"color expected, "+i+" found")]:null===Bt(n)?[new _t(e,n,'color expected, "'+n+'" found')]:[]},constants:gt,enum:Cn,filter:Bn,function:Sn,layer:jn,object:wn,source:Vn,light:Zn,string:qn,formatted:function(t){return 0===qn(t).length?[]:Pn(t)}};function Wn(t){var e=t.value,n=t.valueSpec,i=t.styleSpec;return n.expression&&an(xt(e))?Sn(t):n.expression&&mn(bt(e))?Pn(t):n.type&&Gn[n.type]?Gn[n.type](t):wn(vt({},t,{valueSpec:n.type?i[n.type]:n}))}function Hn(t){var e=t.value,n=t.key,i=qn(t);return i.length?i:(-1===e.indexOf("{fontstack}")&&i.push(new _t(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new _t(n,e,'"glyphs" url must include a "{range}" token')),i)}function Xn(t,e){e=e||yt;var n=[];return n=n.concat(Wn({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Hn,"*":function(){return[]}}})),t.constants&&(n=n.concat(gt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Kn(n)}function Kn(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Yn(t){return function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return Kn(t.apply(this,e))}}Xn.source=Yn(Vn),Xn.light=Yn(Zn),Xn.layer=Yn(jn),Xn.filter=Yn(Bn),Xn.paintProperty=Yn(Nn),Xn.layoutProperty=Yn(Un);var Jn=Xn,$n=Xn.light,Qn=Xn.paintProperty,ti=Xn.layoutProperty;function ei(t,e){var n=!1;if(e&&e.length)for(var i=0,r=e;i<r.length;i+=1){var o=r[i];t.fire(new dt(new Error(o.message))),n=!0}return n}var ni=ri,ii=3;function ri(t,e,n){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var r=new Int32Array(this.arrayBuffer);t=r[0],e=r[1],n=r[2],this.d=e+2*n;for(var o=0;o<this.d*this.d;o++){var a=r[ii+o],s=r[ii+o+1];i.push(a===s?null:r.subarray(a,s))}var l=r[ii+i.length],u=r[ii+i.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*n;for(var c=0;c<this.d*this.d;c++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;var p=n/e*t;this.min=-p,this.max=t+p}ri.prototype.insert=function(t,e,n,i,r){this._forEachCell(e,n,i,r,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(r)},ri.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ri.prototype._insertCell=function(t,e,n,i,r,o){this.cells[r].push(o)},ri.prototype.query=function(t,e,n,i,r){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=i&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,n,i,this._queryCell,s,{},r),s},ri.prototype._queryCell=function(t,e,n,i,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,p=0;p<l.length;p++){var h=l[p];if(void 0===a[h]){var f=4*h;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):t<=c[f+2]&&e<=c[f+3]&&n>=c[f+0]&&i>=c[f+1])?(a[h]=!0,o.push(u[h])):a[h]=!1}}},ri.prototype._forEachCell=function(t,e,n,i,r,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(n),p=this._convertToCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&r.call(this,t,e,n,i,d,o,a,s))return}},ri.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},ri.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ri.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ii+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var r=new Int32Array(e+n+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[ii+a]=o,r.set(s,o),o+=s.length}return r[ii+t.length]=o,r.set(this.keys,o),o+=this.keys.length,r[ii+t.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer};var oi=self.ImageData,ai={};function si(t,e,n){void 0===n&&(n={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),ai[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}for(var li in si("Object",Object),ni.serialize=function(t,e){var n=t.toArrayBuffer();return e&&e.push(n),{buffer:n}},ni.deserialize=function(t){return new ni(t.buffer)},si("Grid",ni),si("Color",Ft),si("Error",Error),si("StylePropertyFunction",xn),si("StyleExpression",dn,{omit:["_evaluator"]}),si("ZoomDependentExpression",gn),si("ZoomConstantExpression",_n),si("CompoundExpression",te,{omit:["_evaluate"]}),Xe)Xe[li]._classRegistryKey||si("Expression_"+li,Xe[li]);function ui(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var n=t;return e&&e.push(n.buffer),n}if(t instanceof oi)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var i=[],r=0,o=t;r<o.length;r+=1){var a=o[r];i.push(ui(a,e))}return i}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)&&!(ai[l].omit.indexOf(c)>=0)){var p=t[c];u[c]=ai[l].shallow.indexOf(c)>=0?p:ui(p,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 ci(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof oi)return t;if(Array.isArray(t))return t.map(ci);if("object"==typeof t){var e=t.$name||"Object",n=ai[e].klass;if(!n)throw new Error("can't deserialize unregistered class "+e);if(n.deserialize)return n.deserialize(t);for(var i=Object.create(n.prototype),r=0,o=Object.keys(t);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=t[a];i[a]=ai[e].shallow.indexOf(a)>=0?s:ci(s)}}return i}throw new Error("can't deserialize object of type "+typeof t)}var pi=function(){this.first=!0};pi.prototype.update=function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))};var hi={"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}};function fi(t){for(var e=0,n=t;e<n.length;e+=1)if(mi(n[e].charCodeAt(0)))return!0;return!1}function di(t){return!(hi.Arabic(t)||hi["Arabic Supplement"](t)||hi["Arabic Extended-A"](t)||hi["Arabic Presentation Forms-A"](t)||hi["Arabic Presentation Forms-B"](t))}function mi(t){return!(746!==t&&747!==t&&(t<4352||!(hi["Bopomofo Extended"](t)||hi.Bopomofo(t)||hi["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||hi["CJK Compatibility Ideographs"](t)||hi["CJK Compatibility"](t)||hi["CJK Radicals Supplement"](t)||hi["CJK Strokes"](t)||!(!hi["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||hi["CJK Unified Ideographs Extension A"](t)||hi["CJK Unified Ideographs"](t)||hi["Enclosed CJK Letters and Months"](t)||hi["Hangul Compatibility Jamo"](t)||hi["Hangul Jamo Extended-A"](t)||hi["Hangul Jamo Extended-B"](t)||hi["Hangul Jamo"](t)||hi["Hangul Syllables"](t)||hi.Hiragana(t)||hi["Ideographic Description Characters"](t)||hi.Kanbun(t)||hi["Kangxi Radicals"](t)||hi["Katakana Phonetic Extensions"](t)||hi.Katakana(t)&&12540!==t||!(!hi["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)||!(!hi["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||hi["Unified Canadian Aboriginal Syllabics"](t)||hi["Unified Canadian Aboriginal Syllabics Extended"](t)||hi["Vertical Forms"](t)||hi["Yijing Hexagram Symbols"](t)||hi["Yi Syllables"](t)||hi["Yi Radicals"](t))))}function yi(t){return!(mi(t)||function(t){return!!(hi["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||hi["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)||hi["Letterlike Symbols"](t)||hi["Number Forms"](t)||hi["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)||hi["Control Pictures"](t)&&9251!==t||hi["Optical Character Recognition"](t)||hi["Enclosed Alphanumerics"](t)||hi["Geometric Shapes"](t)||hi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||hi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||hi["CJK Symbols and Punctuation"](t)||hi.Katakana(t)||hi["Private Use Area"](t)||hi["CJK Compatibility Forms"](t)||hi["Small Form Variants"](t)||hi["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 _i(t,e){return!(!e&&(t>=1424&&t<=2303||hi["Arabic Presentation Forms-A"](t)||hi["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||hi.Khmer(t))}var gi,vi=!1,xi=null,bi=!1,wi=new mt,Ei={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return bi||null!=Ei.applyArabicShaping}},Ti=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 pi,this.transition={})};Ti.prototype.isSupportedScript=function(t){return function(t,e){for(var n=0,i=t;n<i.length;n+=1)if(!_i(i[n].charCodeAt(0),e))return!1;return!0}(t,Ei.isLoaded())},Ti.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ti.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),n=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var Si=function(t,e){this.property=t,this.value=e,this.expression=bn(void 0===e?t.specification.default:e,t.specification)};Si.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Si.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Pi=function(t){this.property=t,this.value=new Si(t,void 0)};Pi.prototype.transitioned=function(t,e){return new ki(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Pi.prototype.untransitioned=function(){return new ki(this.property,this.value,null,{},0)};var Ci=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Ci.prototype.getValue=function(t){return x(this._values[t].value.value)},Ci.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Pi(this._values[t].property)),this._values[t].value=new Si(this._values[t].property,null===e?void 0:x(e))},Ci.prototype.getTransition=function(t){return x(this._values[t].transition)},Ci.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Pi(this._values[t].property)),this._values[t].transition=x(e)||void 0},Ci.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e+=1){var i=n[e],r=this.getValue(i);void 0!==r&&(t[i]=r);var o=this.getTransition(i);void 0!==o&&(t[i+"-transition"]=o)}return t},Ci.prototype.transitioned=function(t,e){for(var n=new Ai(this._properties),i=0,r=Object.keys(this._values);i<r.length;i+=1){var o=r[i];n._values[o]=this._values[o].transitioned(t,e._values[o])}return n},Ci.prototype.untransitioned=function(){for(var t=new Ai(this._properties),e=0,n=Object.keys(this._values);e<n.length;e+=1){var i=n[e];t._values[i]=this._values[i].untransitioned()}return t};var ki=function(t,e,n,i,r){this.property=t,this.value=e,this.begin=r+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=n)};ki.prototype.possiblyEvaluate=function(t){var e=t.now||0,n=this.value.possiblyEvaluate(t),i=this.prior;if(i){if(e>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(e<this.begin)return i.possiblyEvaluate(t);var r=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(i.possiblyEvaluate(t),n,function(t){if(r<=0)return 0;if(r>=1)return 1;var e=r*r,n=e*r;return 4*(r<.5?n:3*(r-e)+n-.75)}())}return n};var Ai=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Ai.prototype.possiblyEvaluate=function(t){for(var e=new Mi(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var r=i[n];e._values[r]=this._values[r].possiblyEvaluate(t)}return e},Ai.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var n=e[t];if(this._values[n].prior)return!0}return!1};var zi=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};zi.prototype.getValue=function(t){return x(this._values[t].value)},zi.prototype.setValue=function(t,e){this._values[t]=new Si(this._values[t].property,null===e?void 0:x(e))},zi.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e+=1){var i=n[e],r=this.getValue(i);void 0!==r&&(t[i]=r)}return t},zi.prototype.possiblyEvaluate=function(t){for(var e=new Mi(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var r=i[n];e._values[r]=this._values[r].possiblyEvaluate(t)}return e};var Li=function(t,e,n){this.property=t,this.value=e,this.parameters=n};Li.prototype.isConstant=function(){return"constant"===this.value.kind},Li.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},Li.prototype.evaluate=function(t,e){return this.property.evaluate(this.value,this.parameters,t,e)};var Mi=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Mi.prototype.get=function(t){return this._values[t]};var Ii=function(t){this.specification=t};Ii.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Ii.prototype.interpolate=function(t,e,n){var i=ce[this.specification.type];return i?i(t,e,n):t};var Oi=function(t){this.specification=t};Oi.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Li(this,{kind:"constant",value:t.expression.evaluate(e)},e):new Li(this,t.expression,e)},Oi.prototype.interpolate=function(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Li(this,{kind:"constant",value:void 0},t.parameters);var i=ce[this.specification.type];return i?new Li(this,{kind:"constant",value:i(t.value.value,e.value.value,n)},t.parameters):t},Oi.prototype.evaluate=function(t,e,n,i){return"constant"===t.kind?t.value:t.evaluate(e,n,i)};var Di=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 Li(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var n=t.expression.evaluate(e),i=this._calculate(n,n,n,e);return new Li(this,{kind:"constant",value:i},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 Li(this,{kind:"constant",value:r},e)}return new Li(this,t.expression,e)},e.prototype.evaluate=function(t,e,n,i){if("source"===t.kind){var r=t.evaluate(e,n,i);return this._calculate(r,r,r,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},n,i),t.evaluate({zoom:Math.floor(e.zoom)},n,i),t.evaluate({zoom:Math.floor(e.zoom)+1},n,i),e):t.value},e.prototype._calculate=function(t,e,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},e.prototype.interpolate=function(t){return t},e}(Oi),Ri=function(t){this.specification=t};Ri.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new Ti(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ti(Math.floor(e.zoom),e)),t.expression.evaluate(new Ti(Math.floor(e.zoom+1),e)),e)}},Ri.prototype._calculate=function(t,e,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},Ri.prototype.interpolate=function(t){return t};var Bi=function(t){this.specification=t};Bi.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Bi.prototype.interpolate=function(){return!1};var Fi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var n=t[e],i=this.defaultPropertyValues[e]=new Si(n,void 0),r=this.defaultTransitionablePropertyValues[e]=new Pi(n);this.defaultTransitioningPropertyValues[e]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};si("DataDrivenProperty",Oi),si("DataConstantProperty",Ii),si("CrossFadedDataDrivenProperty",Di),si("CrossFadedProperty",Ri),si("ColorRampProperty",Bi);var Ni=function(t){function e(e,n){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),n.layout&&(this._unevaluatedLayout=new zi(n.layout)),n.paint)){for(var i in this._transitionablePaint=new Ci(n.paint),e.paint)this.setPaintProperty(i,e.paint[i],{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,n){if(void 0===n&&(n={}),null!=e){var i="layers."+this.id+".layout."+t;if(this._validate(ti,i,t,e,n))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return _(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,n){if(void 0===n&&(n={}),null!=e){var i="layers."+this.id+".paint."+t;if(this._validate(Qn,i,t,e,n))return!1}if(_(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"),v(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,n,i,r){return void 0===r&&(r={}),(!r||!1!==r.validate)&&ei(this,t.call(Jn,{key:e,layerType:this.type,objectKey:n,value:i,styleSpec:yt,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 Li&&en(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(mt),Ui={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ji=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},Vi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Zi(t,e){void 0===e&&(e=1);var n=0,i=0;return{members:t.map(function(t){var r,o=(r=t.type,Ui[r].BYTES_PER_ELEMENT),a=n=qi(n,Math.max(e,o)),s=t.components||1;return i=Math.max(i,o),n+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:qi(n,Math.max(i,e)),alignment:e}}function qi(t,e){return Math.ceil(t/e)*e}Vi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Vi.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},Vi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Vi.prototype.clear=function(){this.length=0},Vi.prototype.resize=function(t){this.reserve(t),this.length=t},Vi.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)}},Vi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Gi=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 n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var i=2*t;return this.int16[i+0]=e,this.int16[i+1]=n,t},e}(Vi);Gi.prototype.bytesPerElement=4,si("StructArrayLayout2i4",Gi);var Wi=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,n,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n,i)},e.prototype.emplace=function(t,e,n,i,r){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=n,this.int16[o+2]=i,this.int16[o+3]=r,t},e}(Vi);Wi.prototype.bytesPerElement=8,si("StructArrayLayout4i8",Wi);var Hi=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,n,i,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,i,r,o)},e.prototype.emplace=function(t,e,n,i,r,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=i,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Vi);Hi.prototype.bytesPerElement=12,si("StructArrayLayout2i4i12",Hi);var Xi=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,n,i,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,n,i,r,o,a,s)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l){var u=6*t,c=12*t;return this.int16[u+0]=e,this.int16[u+1]=n,this.int16[u+2]=i,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}(Vi);Xi.prototype.bytesPerElement=12,si("StructArrayLayout4i4ub12",Xi);var Ki=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,n,i,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,n,i,r,o,a,s)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l){var u=8*t;return this.uint16[u+0]=e,this.uint16[u+1]=n,this.uint16[u+2]=i,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}(Vi);Ki.prototype.bytesPerElement=16,si("StructArrayLayout8ui16",Ki);var Yi=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,n,i,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,n,i,r,o,a,s)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l){var u=8*t;return this.int16[u+0]=e,this.int16[u+1]=n,this.int16[u+2]=i,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}(Vi);Yi.prototype.bytesPerElement=16,si("StructArrayLayout4i4ui16",Yi);var Ji=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,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},e.prototype.emplace=function(t,e,n,i){var r=3*t;return this.float32[r+0]=e,this.float32[r+1]=n,this.float32[r+2]=i,t},e}(Vi);Ji.prototype.bytesPerElement=12,si("StructArrayLayout3f12",Ji);var $i=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var n=1*t;return this.uint32[n+0]=e,t},e}(Vi);$i.prototype.bytesPerElement=4,si("StructArrayLayout1ul4",$i);var Qi=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,n,i,r,o,a,s,l,u,c){var p=this.length;return this.resize(p+1),this.emplace(p,t,e,n,i,r,o,a,s,l,u,c)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c,p){var h=12*t,f=6*t;return this.int16[h+0]=e,this.int16[h+1]=n,this.int16[h+2]=i,this.int16[h+3]=r,this.int16[h+4]=o,this.int16[h+5]=a,this.uint32[f+3]=s,this.uint16[h+8]=l,this.uint16[h+9]=u,this.int16[h+10]=c,this.int16[h+11]=p,t},e}(Vi);Qi.prototype.bytesPerElement=24,si("StructArrayLayout6i1ul2ui2i24",Qi);var tr=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,n,i,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,i,r,o)},e.prototype.emplace=function(t,e,n,i,r,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=i,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Vi);tr.prototype.bytesPerElement=12,si("StructArrayLayout2i2i2i12",tr);var er=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 n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var i=4*t;return this.uint8[i+0]=e,this.uint8[i+1]=n,t},e}(Vi);er.prototype.bytesPerElement=4,si("StructArrayLayout2ub4",er);var nr=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,n,i,r,o,a,s,l,u,c,p,h,f){var d=this.length;return this.resize(d+1),this.emplace(d,t,e,n,i,r,o,a,s,l,u,c,p,h,f)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c,p,h,f,d){var m=20*t,y=10*t,_=40*t;return this.int16[m+0]=e,this.int16[m+1]=n,this.uint16[m+2]=i,this.uint16[m+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=u,this.uint16[m+12]=c,this.float32[y+7]=p,this.float32[y+8]=h,this.uint8[_+36]=f,this.uint8[_+37]=d,t},e}(Vi);nr.prototype.bytesPerElement=40,si("StructArrayLayout2i2ui3ul3ui2f2ub40",nr);var ir=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,n,i,r,o,a,s,l,u,c,p,h,f){var d=this.length;return this.resize(d+1),this.emplace(d,t,e,n,i,r,o,a,s,l,u,c,p,h,f)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c,p,h,f,d){var m=16*t,y=8*t;return this.int16[m+0]=e,this.int16[m+1]=n,this.int16[m+2]=i,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]=p,this.uint16[m+11]=h,this.uint16[m+12]=f,this.uint32[y+7]=d,t},e}(Vi);ir.prototype.bytesPerElement=32,si("StructArrayLayout4i9ui1ul32",ir);var rr=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var n=1*t;return this.float32[n+0]=e,t},e}(Vi);rr.prototype.bytesPerElement=4,si("StructArrayLayout1f4",rr);var or=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,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},e.prototype.emplace=function(t,e,n,i){var r=3*t;return this.int16[r+0]=e,this.int16[r+1]=n,this.int16[r+2]=i,t},e}(Vi);or.prototype.bytesPerElement=6,si("StructArrayLayout3i6",or);var ar=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,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},e.prototype.emplace=function(t,e,n,i){var r=2*t,o=4*t;return this.uint32[r+0]=e,this.uint16[o+2]=n,this.uint16[o+3]=i,t},e}(Vi);ar.prototype.bytesPerElement=8,si("StructArrayLayout1ul2ui8",ar);var sr=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,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},e.prototype.emplace=function(t,e,n,i){var r=3*t;return this.uint16[r+0]=e,this.uint16[r+1]=n,this.uint16[r+2]=i,t},e}(Vi);sr.prototype.bytesPerElement=6,si("StructArrayLayout3ui6",sr);var lr=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 n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var i=2*t;return this.uint16[i+0]=e,this.uint16[i+1]=n,t},e}(Vi);lr.prototype.bytesPerElement=4,si("StructArrayLayout2ui4",lr);var ur=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var n=1*t;return this.uint16[n+0]=e,t},e}(Vi);ur.prototype.bytesPerElement=2,si("StructArrayLayout1ui2",ur);var cr=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 n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var i=2*t;return this.float32[i+0]=e,this.float32[i+1]=n,t},e}(Vi);cr.prototype.bytesPerElement=8,si("StructArrayLayout2f8",cr);var pr=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,n,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n,i)},e.prototype.emplace=function(t,e,n,i,r){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=i,this.float32[o+3]=r,t},e}(Vi);pr.prototype.bytesPerElement=16,si("StructArrayLayout4f16",pr);var hr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={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 n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},n.radius.get=function(){return this._structArray.int16[this._pos2+10]},n.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},n.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},n.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},n.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(ji);hr.prototype.size=24;var fr=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 hr(this,t)},e}(Qi);si("CollisionBoxArray",fr);var dr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={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 n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,n),e}(ji);dr.prototype.size=40;var mr=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 dr(this,t)},e}(nr);si("PlacedSymbolArray",mr);var yr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={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 n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.horizontalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.horizontalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},n.key.get=function(){return this._structArray.uint16[this._pos2+4]},n.key.set=function(t){this._structArray.uint16[this._pos2+4]=t},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+5]},n.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+5]=t},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+6]},n.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+6]=t},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},n.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.featureIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},n.numGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+10]},n.numGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+10]=t},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+11]},n.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+11]=t},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+12]},n.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+7]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+7]=t},Object.defineProperties(e.prototype,n),e}(ji);yr.prototype.size=32;var _r=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 yr(this,t)},e}(ir);si("SymbolInstanceArray",_r);var gr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={offsetX:{configurable:!0}};return n.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},n.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,n),e}(ji);gr.prototype.size=4;var vr=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 gr(this,t)},e}(rr);si("GlyphOffsetArray",vr);var xr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return n.x.get=function(){return this._structArray.int16[this._pos2+0]},n.x.set=function(t){this._structArray.int16[this._pos2+0]=t},n.y.get=function(){return this._structArray.int16[this._pos2+1]},n.y.set=function(t){this._structArray.int16[this._pos2+1]=t},n.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},n.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,n),e}(ji);xr.prototype.size=6;var br=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 xr(this,t)},e}(or);si("SymbolLineVertexArray",br);var wr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},n.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,n),e}(ji);wr.prototype.size=8;var Er=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 wr(this,t)},e}(ar);si("FeatureIndexArray",Er);var Tr=Zi([{name:"a_pos",components:2,type:"Int16"}],4),Sr=Tr.members,Pr=(Tr.size,Tr.alignment,function(t){void 0===t&&(t=[]),this.segments=t});function Cr(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}Pr.prototype.prepareSegment=function(t,e,n,i){var r=this.segments[this.segments.length-1];return t>Pr.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Pr.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!r||r.vertexLength+t>Pr.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==i)&&(r={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==i&&(r.sortKey=i),this.segments.push(r)),r},Pr.prototype.get=function(){return this.segments},Pr.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var n=e[t];for(var i in n.vaos)n.vaos[i].destroy()}},Pr.simpleSegment=function(t,e,n,i){return new Pr([{vertexOffset:t,primitiveOffset:e,vertexLength:n,primitiveLength:i,vaos:{},sortKey:0}])},Pr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,si("SegmentVector",Pr);var kr=function(){this.ids=[],this.positions=[],this.indexed=!1};function Ar(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}kr.prototype.add=function(t,e,n,i){this.ids.push(t),this.positions.push(e,n,i)},kr.prototype.getPositions=function(t){for(var e=0,n=this.ids.length-1;e<n;){var i=e+n>>1;this.ids[i]>=t?n=i:e=i+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},kr.serialize=function(t,e){var n=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,n,i,r){if(!(i>=r)){for(var o=e[i+r>>1],a=i-1,s=r+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;Ar(e,a,s),Ar(n,3*a,3*s),Ar(n,3*a+1,3*s+1),Ar(n,3*a+2,3*s+2)}t(e,n,i,s),t(e,n,s+1,r)}}(n,i,0,n.length-1),e.push(n.buffer,i.buffer),{ids:n,positions:i}},kr.deserialize=function(t){var e=new kr;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},si("FeaturePositionMap",kr);var zr=function(t,e){this.gl=t.gl,this.location=e},Lr=function(t){function e(e,n){t.call(this,e,n),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}(zr),Mr=function(t){function e(e,n){t.call(this,e,n),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}(zr),Ir=function(t){function e(e,n){t.call(this,e,n),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}(zr),Or=function(t){function e(e,n){t.call(this,e,n),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}(zr),Dr=function(t){function e(e,n){t.call(this,e,n),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}(zr),Rr=function(t){function e(e,n){t.call(this,e,n),this.current=Ft.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}(zr),Br=new Float32Array(16),Fr=function(t){function e(e,n){t.call(this,e,n),this.current=Br}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}(zr);function Nr(t){return[Cr(255*t.r,255*t.g),Cr(255*t.b,255*t.a)]}var Ur=function(t,e,n){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=n,this.maxValue=-1/0};Ur.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ur.prototype.setConstantPatternPositions=function(){},Ur.prototype.populatePaintArray=function(){},Ur.prototype.updatePaintArray=function(){},Ur.prototype.upload=function(){},Ur.prototype.destroy=function(){},Ur.prototype.setUniforms=function(t,e,n,i){e.set(i.constantOr(this.value))},Ur.prototype.getBinding=function(t,e){return"color"===this.type?new Rr(t,e):new Mr(t,e)},Ur.serialize=function(t){var e=t.value,n=t.names,i=t.type;return{value:ui(e),names:n,type:i}},Ur.deserialize=function(t){var e=t.value,n=t.names,i=t.type;return new Ur(ci(e),n,i)};var jr=function(t,e,n){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=n,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};jr.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},jr.prototype.populatePaintArray=function(){},jr.prototype.updatePaintArray=function(){},jr.prototype.upload=function(){},jr.prototype.destroy=function(){},jr.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},jr.prototype.setUniforms=function(t,e,n,i,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)},jr.prototype.getBinding=function(t,e){return new Dr(t,e)};var Vr=function(t,e,n,i){this.expression=t,this.names=e,this.type=n,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"===n?2:1,offset:0}}),this.paintVertexArray=new i};Vr.prototype.defines=function(){return[]},Vr.prototype.setConstantPatternPositions=function(){},Vr.prototype.populatePaintArray=function(t,e){var n=this.paintVertexArray,i=n.length;n.reserve(t);var r=this.expression.evaluate(new Ti(0),e,{});if("color"===this.type)for(var o=Nr(r),a=i;a<t;a++)n.emplaceBack(o[0],o[1]);else{for(var s=i;s<t;s++)n.emplaceBack(r);this.maxValue=Math.max(this.maxValue,r)}},Vr.prototype.updatePaintArray=function(t,e,n,i){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},n,i);if("color"===this.type)for(var a=Nr(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)}},Vr.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))},Vr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Vr.prototype.setUniforms=function(t,e){e.set(0)},Vr.prototype.getBinding=function(t,e){return new Mr(t,e)};var Zr=function(t,e,n,i,r,o){this.expression=t,this.names=e,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.type=n,this.useIntegerZoom=i,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===n?4:2,offset:0}}),this.paintVertexArray=new a};Zr.prototype.defines=function(){return[]},Zr.prototype.setConstantPatternPositions=function(){},Zr.prototype.populatePaintArray=function(t,e){var n=this.paintVertexArray,i=n.length;n.reserve(t);var r=this.expression.evaluate(new Ti(this.zoom),e,{}),o=this.expression.evaluate(new Ti(this.zoom+1),e,{});if("color"===this.type)for(var a=Nr(r),s=Nr(o),l=i;l<t;l++)n.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var u=i;u<t;u++)n.emplaceBack(r,o);this.maxValue=Math.max(this.maxValue,r,o)}},Zr.prototype.updatePaintArray=function(t,e,n,i){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},n,i),a=this.expression.evaluate({zoom:this.zoom+1},n,i);if("color"===this.type)for(var s=Nr(o),l=Nr(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)}},Zr.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))},Zr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Zr.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)},Zr.prototype.setUniforms=function(t,e,n){e.set(this.interpolationFactor(n.zoom))},Zr.prototype.getBinding=function(t,e){return new Mr(t,e)};var qr=function(t,e,n,i,r,o,a){this.expression=t,this.names=e,this.type=n,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.useIntegerZoom=i,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};qr.prototype.defines=function(){return[]},qr.prototype.setConstantPatternPositions=function(){},qr.prototype.populatePaintArray=function(t,e,n){var i=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=i.length;if(i.reserve(t),r.reserve(t),n&&e.patterns&&e.patterns[o]){var s=e.patterns[o],l=s.min,u=s.mid,c=s.max,p=n[l],h=n[u],f=n[c];if(!p||!h||!f)return;for(var d=a;d<t;d++)i.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1]),r.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},qr.prototype.updatePaintArray=function(t,e,n,i,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&n.patterns&&n.patterns[s]){var l=n.patterns[s],u=l.min,c=l.mid,p=l.max,h=r[u],f=r[c],d=r[p];if(!h||!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],h.tl[0],h.tl[1],h.br[0],h.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])}},qr.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))},qr.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},qr.prototype.setUniforms=function(t,e){e.set(0)},qr.prototype.getBinding=function(t,e){return new Mr(t,e)};var Gr=function(){this.binders={},this.cacheKey="",this._buffers=[],this._featureMap=new kr,this._bufferOffset=0};Gr.createDynamic=function(t,e,n){var i=new Gr,r=[];for(var o in t.paint._values)if(n(o)){var a=t.paint.get(o);if(a instanceof Li&&en(a.property.specification)){var s=Hr(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)i.binders[o]=new jr(a.value.value,s,l),r.push("/u_"+o);else{var c=Xr(o,l,"source");i.binders[o]=new qr(a.value,s,l,u,e,c,t.id),r.push("/a_"+o)}else if("constant"===a.value.kind)i.binders[o]=new Ur(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){var p=Xr(o,l,"source");i.binders[o]=new Vr(a.value,s,l,p),r.push("/a_"+o)}else{var h=Xr(o,l,"composite");i.binders[o]=new Zr(a.value,s,l,u,e,h),r.push("/z_"+o)}}}return i.cacheKey=r.sort().join(""),i},Gr.prototype.populatePaintArrays=function(t,e,n,i){for(var r in this.binders)this.binders[r].populatePaintArray(t,e,i);void 0!==e.id&&this._featureMap.add(+e.id,n,this._bufferOffset,t),this._bufferOffset=t},Gr.prototype.setConstantPatternPositions=function(t,e){for(var n in this.binders)this.binders[n].setConstantPatternPositions(t,e)},Gr.prototype.updatePaintArrays=function(t,e,n,i){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 p=this.binders[c];if(!(p instanceof Ur||p instanceof jr)&&!0===p.expression.isStateDependent){var h=n.paint.get(c);p.expression=h.value,p.updatePaintArray(l.start,l.end,u,t[o],i),r=!0}}}return r},Gr.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Gr.prototype.getPaintVertexBuffers=function(){return this._buffers},Gr.prototype.getUniforms=function(t,e){var n={};for(var i in this.binders)for(var r=this.binders[i],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];n[s]=r.getBinding(t,e[s])}return n},Gr.prototype.setUniforms=function(t,e,n,i){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],i,n.get(r),l)}},Gr.prototype.updatePatternPaintBuffers=function(t){var e=[];for(var n in this.binders){var i=this.binders[n];if(i instanceof qr){var r=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;r&&e.push(r)}else(i instanceof Vr||i instanceof Zr)&&i.paintVertexBuffer&&e.push(i.paintVertexBuffer)}this._buffers=e},Gr.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var n=[];for(var i in this.binders){var r=this.binders[i];(r instanceof Vr||r instanceof Zr)&&r.paintVertexBuffer&&n.push(r.paintVertexBuffer)}this._buffers=n},Gr.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var Wr=function(t,e,n,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var r=0,o=e;r<o.length;r+=1){var a=o[r];this.programConfigurations[a.id]=Gr.createDynamic(a,n,i),this.programConfigurations[a.id].layoutAttributes=t}this.needsUpload=!1};function Hr(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 Xr(t,e,n){var i={color:{source:cr,composite:pr},number:{source:rr,composite:cr}},r=function(t){return{"line-pattern":{source:Ki,composite:Ki},"fill-pattern":{source:Ki,composite:Ki},"fill-extrusion-pattern":{source:Ki,composite:Ki}}[t]}(t);return r&&r[n]||i[e][n]}Wr.prototype.populatePaintArrays=function(t,e,n,i){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e,n,i);this.needsUpload=!0},Wr.prototype.updatePaintArrays=function(t,e,n,i){for(var r=0,o=n;r<o.length;r+=1){var a=o[r];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,e,a,i)||this.needsUpload}},Wr.prototype.get=function(t){return this.programConfigurations[t]},Wr.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Wr.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},si("ConstantBinder",Ur),si("CrossFadedConstantBinder",jr),si("SourceExpressionBinder",Vr),si("CrossFadedCompositeBinder",qr),si("CompositeExpressionBinder",Zr),si("ProgramConfiguration",Gr,{omit:["_buffers"]}),si("ProgramConfigurationSet",Wr);var Kr=8192,Yr={min:-1*Math.pow(2,15),max:Math.pow(2,15)-1};function Jr(t){for(var e=Kr/t.extent,n=t.loadGeometry(),i=0;i<n.length;i++)for(var r=n[i],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<Yr.min||a.x>Yr.max||a.y<Yr.min||a.y>Yr.max)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function $r(t,e,n,i,r){t.emplaceBack(2*e+(i+1)/2,2*n+(r+1)/2)}var Qr=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 Gi,this.indexArray=new sr,this.segments=new Pr,this.programConfigurations=new Wr(Sr,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function to(t,e){for(var n=0;n<t.length;n++)if(uo(e,t[n]))return!0;for(var i=0;i<e.length;i++)if(uo(t,e[i]))return!0;return!!ro(t,e)}function eo(t,e,n){return!!uo(t,e)||!!ao(e,t,n)}function no(t,e){if(1===t.length)return lo(e,t[0]);for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i.length;r++)if(uo(t,i[r]))return!0;for(var o=0;o<t.length;o++)if(lo(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(ro(t,e[a]))return!0;return!1}function io(t,e,n){if(t.length>1){if(ro(t,e))return!0;for(var i=0;i<e.length;i++)if(ao(e[i],t,n))return!0}for(var r=0;r<t.length;r++)if(ao(t[r],e,n))return!0;return!1}function ro(t,e){if(0===t.length||0===e.length)return!1;for(var n=0;n<t.length-1;n++)for(var i=t[n],r=t[n+1],o=0;o<e.length-1;o++)if(oo(i,r,e[o],e[o+1]))return!0;return!1}function oo(t,e,n,i){return E(t,n,i)!==E(e,n,i)&&E(t,e,n)!==E(t,e,i)}function ao(t,e,n){var i=n*n;if(1===e.length)return t.distSqr(e[0])<i;for(var r=1;r<e.length;r++)if(so(t,e[r-1],e[r])<i)return!0;return!1}function so(t,e,n){var i=e.distSqr(n);if(0===i)return t.distSqr(e);var r=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/i;return r<0?t.distSqr(e):r>1?t.distSqr(n):t.distSqr(n.sub(e)._mult(r)._add(e))}function lo(t,e){for(var n,i,r,o=!1,a=0;a<t.length;a++)for(var s=0,l=(n=t[a]).length-1;s<n.length;l=s++)i=n[s],r=n[l],i.y>e.y!=r.y>e.y&&e.x<(r.x-i.x)*(e.y-i.y)/(r.y-i.y)+i.x&&(o=!o);return o}function uo(t,e){for(var n=!1,i=0,r=t.length-1;i<t.length;r=i++){var o=t[i],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&&(n=!n)}return n}function co(t,e,n){var i=n[0],r=n[2];if(t.x<i.x&&e.x<i.x||t.x>r.x&&e.x>r.x||t.y<i.y&&e.y<i.y||t.y>r.y&&e.y>r.y)return!1;var o=E(t,e,n[0]);return o!==E(t,e,n[1])||o!==E(t,e,n[2])||o!==E(t,e,n[3])}function po(t,e,n){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:n.programConfigurations.get(e.id).binders[t].maxValue}function ho(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function fo(t,e,n,i,o){if(!e[0]&&!e[1])return t;var a=r.convert(e)._mult(o);"viewport"===n&&a._rotate(-i);for(var s=[],l=0;l<t.length;l++){var u=t[l];s.push(u.sub(a))}return s}Qr.prototype.populate=function(t,e){for(var n=0,i=t;n<i.length;n+=1){var r=i[n],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var l=Jr(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},Qr.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},Qr.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Qr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Qr.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Sr),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Qr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Qr.prototype.addFeature=function(t,e,n){for(var i=0,r=e;i<r.length;i+=1)for(var o=0,a=r[i];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=Kr||u<0||u>=Kr)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),p=c.vertexLength;$r(this.layoutVertexArray,l,u,-1,-1),$r(this.layoutVertexArray,l,u,1,-1),$r(this.layoutVertexArray,l,u,1,1),$r(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{})},si("CircleBucket",Qr,{omit:["layers"]});var mo={paint:new Fi({"circle-radius":new Oi(yt.paint_circle["circle-radius"]),"circle-color":new Oi(yt.paint_circle["circle-color"]),"circle-blur":new Oi(yt.paint_circle["circle-blur"]),"circle-opacity":new Oi(yt.paint_circle["circle-opacity"]),"circle-translate":new Ii(yt.paint_circle["circle-translate"]),"circle-translate-anchor":new Ii(yt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ii(yt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ii(yt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Oi(yt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Oi(yt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Oi(yt.paint_circle["circle-stroke-opacity"])})},yo="undefined"!=typeof Float32Array?Float32Array:Array;function _o(){var t=new yo(9);return yo!=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 go(){var t=new yo(3);return yo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function vo(t,e,n){var i=new yo(3);return i[0]=t,i[1]=e,i[2]=n,i}function xo(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t}function bo(){var t=new yo(4);return yo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}Math.PI,go(),function(){var t;t=new yo(4),yo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}(),go(),vo(1,0,0),vo(0,1,0),bo(),bo(),_o(),function(){var t;t=new yo(2),yo!=Float32Array&&(t[0]=0,t[1]=0)}();var wo=function(t){function e(e){t.call(this,e,mo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Qr(t)},e.prototype.queryRadius=function(t){var e=t;return po("circle-radius",this,e)+po("circle-stroke-width",this,e)+ho(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,r,o,a,s){for(var l=fo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t,e){return l.map(function(t){return Eo(t,e)})}(0,s),h=c?u*a:u,f=0,d=i;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var _=y[m],g=c?_:Eo(_,s),v=h,x=xo([],[_.x,_.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?v*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(v*=o.cameraToCenterDistance/x[3]),eo(p,g,v))return!0}return!1},e}(Ni);function Eo(t,e){var n=xo([],[t.x,t.y,0,1],e);return new r(n[0]/n[3],n[1]/n[3])}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}(Qr);function So(t,e,n,i){var r=e.width,o=e.height;if(i){if(i.length!==r*o*n)throw new RangeError("mismatched image size")}else i=new Uint8Array(r*o*n);return t.width=r,t.height=o,t.data=i,t}function Po(t,e,n){var i=e.width,r=e.height;if(i!==t.width||r!==t.height){var o=So({},{width:i,height:r},n);Co(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,r)},n),t.width=i,t.height=r,t.data=o.data}}function Co(t,e,n,i,r,o){if(0===r.width||0===r.height)return e;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.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||i.x>e.width-r.width||i.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=((n.y+l)*t.width+n.x)*o,c=((i.y+l)*e.width+i.x)*o,p=0;p<r.width*o;p++)s[c+p]=a[u+p];return e}si("HeatmapBucket",To,{omit:["layers"]});var ko=function(t,e){So(this,t,1,e)};ko.prototype.resize=function(t){Po(this,t,1)},ko.prototype.clone=function(){return new ko({width:this.width,height:this.height},new Uint8Array(this.data))},ko.copy=function(t,e,n,i,r){Co(t,e,n,i,r,1)};var Ao=function(t,e){So(this,t,4,e)};Ao.prototype.resize=function(t){Po(this,t,4)},Ao.prototype.clone=function(){return new Ao({width:this.width,height:this.height},new Uint8Array(this.data))},Ao.copy=function(t,e,n,i,r){Co(t,e,n,i,r,4)},si("AlphaImage",ko),si("RGBAImage",Ao);var zo={paint:new Fi({"heatmap-radius":new Oi(yt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Oi(yt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ii(yt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Bi(yt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ii(yt.paint_heatmap["heatmap-opacity"])})};function Lo(t,e){for(var n=new Uint8Array(1024),i={},r=0,o=0;r<256;r++,o+=4){i[e]=r/255;var a=t.evaluate(i);n[o+0]=Math.floor(255*a.r/a.a),n[o+1]=Math.floor(255*a.g/a.a),n[o+2]=Math.floor(255*a.b/a.a),n[o+3]=Math.floor(255*a.a)}return new Ao({width:256,height:1},n)}var Mo=function(t){function e(e){t.call(this,e,zo),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 To(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=Lo(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}(Ni),Io={paint:new Fi({"hillshade-illumination-direction":new Ii(yt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ii(yt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ii(yt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ii(yt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ii(yt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ii(yt.paint_hillshade["hillshade-accent-color"])})},Oo=function(t){function e(e){t.call(this,e,Io)}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}(Ni),Do=Zi([{name:"a_pos",components:2,type:"Int16"}],4),Ro=Do.members,Bo=(Do.size,Do.alignment,No),Fo=No;function No(t,e,n){n=n||2;var i,r,o,a,s,l,u,c=e&&e.length,p=c?e[0]*n:t.length,h=Uo(t,0,p,n,!0),f=[];if(!h||h.next===h.prev)return f;if(c&&(h=function(t,e,n,i){var r,o,a,s=[];for(r=0,o=e.length;r<o;r++)(a=Uo(t,e[r]*i,r<o-1?e[r+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),s.push(Yo(a));for(s.sort(Ho),r=0;r<s.length;r++)Xo(s[r],n),n=jo(n,n.next);return n}(t,e,h,n)),t.length>80*n){i=o=t[0],r=a=t[1];for(var d=n;d<p;d+=n)(s=t[d])<i&&(i=s),(l=t[d+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-i,a-r))?1/u:0}return Vo(h,f,n,i,r,u),f}function Uo(t,e,n,i,r){var o,a;if(r===sa(t,e,n,i)>0)for(o=e;o<n;o+=i)a=ra(o,t[o],t[o+1],a);else for(o=n-i;o>=e;o-=i)a=ra(o,t[o],t[o+1],a);return a&&ta(a,a.next)&&(oa(a),a=a.next),a}function jo(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!ta(i,i.next)&&0!==Qo(i.prev,i,i.next))i=i.next;else{if(oa(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function Vo(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=Ko(r.x,r.y,e,n,i)),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,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,i,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?qo(t,i,r,o):Zo(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),oa(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Vo(t=Go(t,e,n),e,n,i,r,o,2):2===a&&Wo(t,e,n,i,r,o):Vo(jo(t),e,n,i,r,o,1);break}}}function Zo(t){var e=t.prev,n=t,i=t.next;if(Qo(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(Jo(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&Qo(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function qo(t,e,n,i){var r=t.prev,o=t,a=t.next;if(Qo(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,p=Ko(s,l,e,n,i),h=Ko(u,c,e,n,i),f=t.prevZ,d=t.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==t.prev&&f!==t.next&&Jo(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&Jo(r.x,r.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&Jo(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(r.x,r.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Go(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!ta(r,o)&&ea(r,i,i.next,o)&&na(r,o)&&na(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),oa(i),oa(i.next),i=t=o),i=i.next}while(i!==t);return i}function Wo(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&$o(a,s)){var l=ia(a,s);return a=jo(a,a.next),l=jo(l,l.next),Vo(a,e,n,i,r,o),void Vo(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function Ho(t,e){return t.x-e.x}function Xo(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===a)return n.prev;var l,u=n,c=n.x,p=n.y,h=1/0;for(i=n.next;i!==u;)r>=i.x&&i.x>=c&&r!==i.x&&Jo(o<p?r:a,o,c,p,o<p?a:r,o,i.x,i.y)&&((l=Math.abs(o-i.y)/(r-i.x))<h||l===h&&i.x>n.x)&&na(i,t)&&(n=i,h=l),i=i.next;return n}(t,e)){var n=ia(e,t);jo(n,n.next)}}function Ko(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Yo(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function Jo(t,e,n,i,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function $o(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&ea(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&na(t,e)&&na(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)}function Qo(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function ta(t,e){return t.x===e.x&&t.y===e.y}function ea(t,e,n,i){return!!(ta(t,e)&&ta(n,i)||ta(t,i)&&ta(n,e))||Qo(t,e,n)>0!=Qo(t,e,i)>0&&Qo(n,i,t)>0!=Qo(n,i,e)>0}function na(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function ia(t,e){var n=new aa(t.i,t.x,t.y),i=new aa(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function ra(t,e,n,i){var r=new aa(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function oa(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 aa(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function sa(t,e,n,i){for(var r=0,o=e,a=n-i;o<n;o+=i)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}function la(t,e,n,i,r){!function t(e,n,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,s=n-i+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(i,Math.floor(n-s*u/a+c)),Math.min(r,Math.floor(n+(a-s)*u/a+c)),o)}var p=e[n],h=i,f=r;for(ua(e,i,n),o(e[r],p)>0&&ua(e,i,r);h<f;){for(ua(e,h,f),h++,f--;o(e[h],p)<0;)h++;for(;o(e[f],p)>0;)f--}0===o(e[i],p)?ua(e,i,f):ua(e,++f,r),f<=n&&(i=f+1),n<=f&&(r=f-1)}}(t,e,n||0,i||t.length-1,r||ca)}function ua(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function ca(t,e){return t<e?-1:t>e?1:0}function pa(t,e){var n=t.length;if(n<=1)return[t];for(var i,r,o=[],a=0;a<n;a++){var s=T(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(i&&o.push(i),i=[t[a]]):i.push(t[a]))}if(i&&o.push(i),e>1)for(var l=0;l<o.length;l++)o[l].length<=e||(la(o[l],e,1,o[l].length-1,ha),o[l]=o[l].slice(0,e));return o}function ha(t,e){return e.area-t.area}function fa(t,e,n){for(var i=n.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,i[l.to]=!0,i[l.from]=!0)}return r}function da(t,e,n,i,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:i-1},n,{}),p=u.evaluate({zoom:i},n,{}),h=u.evaluate({zoom:i+1},n,{});o[c]=!0,o[p]=!0,o[h]=!0,n.patterns[l.id]={min:c,mid:p,max:h}}}return n}No.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(sa(t,0,o,n));if(r)for(var s=0,l=e.length;s<l;s++){var u=e[s]*n,c=s<l-1?e[s+1]*n:t.length;a-=Math.abs(sa(t,u,c,n))}var p=0;for(s=0;s<i.length;s+=3){var h=i[s]*n,f=i[s+1]*n,d=i[s+2]*n;p+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},No.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[r][o][a]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n},Bo.default=Fo;var ma=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 Gi,this.indexArray=new sr,this.indexArray2=new lr,this.programConfigurations=new Wr(Ro,t.layers,t.zoom),this.segments=new Pr,this.segments2=new Pr,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};ma.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("fill",this.layers,e);for(var n=0,i=t;n<i.length;n+=1){var r=i[n],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var l=Jr(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(da("fill",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},ma.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},ma.prototype.addFeatures=function(t,e){for(var n=0,i=this.features;n<i.length;n+=1){var r=i[n],o=r.geometry;this.addFeature(r,o,r.index,e)}},ma.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ma.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ma.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ro),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},ma.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},ma.prototype.addFeature=function(t,e,n,i){for(var r=0,o=pa(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),p=c.vertexLength,h=[],f=[],d=0,m=a;d<m.length;d+=1){var y=m[d];if(0!==y.length){y!==a[0]&&f.push(h.length/2);var _=this.segments2.prepareSegment(y.length,this.layoutVertexArray,this.indexArray2),g=_.vertexLength;this.layoutVertexArray.emplaceBack(y[0].x,y[0].y),this.indexArray2.emplaceBack(g+y.length-1,g),h.push(y[0].x),h.push(y[0].y);for(var v=1;v<y.length;v++)this.layoutVertexArray.emplaceBack(y[v].x,y[v].y),this.indexArray2.emplaceBack(g+v-1,g+v),h.push(y[v].x),h.push(y[v].y);_.vertexLength+=y.length,_.primitiveLength+=y.length}}for(var x=Bo(h,f),b=0;b<x.length;b+=3)this.indexArray.emplaceBack(p+x[b],p+x[b+1],p+x[b+2]);c.vertexLength+=s,c.primitiveLength+=x.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i)},si("FillBucket",ma,{omit:["layers","features"]});var ya={paint:new Fi({"fill-antialias":new Ii(yt.paint_fill["fill-antialias"]),"fill-opacity":new Oi(yt.paint_fill["fill-opacity"]),"fill-color":new Oi(yt.paint_fill["fill-color"]),"fill-outline-color":new Oi(yt.paint_fill["fill-outline-color"]),"fill-translate":new Ii(yt.paint_fill["fill-translate"]),"fill-translate-anchor":new Ii(yt.paint_fill["fill-translate-anchor"]),"fill-pattern":new Di(yt.paint_fill["fill-pattern"])})},_a=function(t){function e(e){t.call(this,e,ya)}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 n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new ma(t)},e.prototype.queryRadius=function(){return ho(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,r,o,a){return no(fo(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),i)},e}(Ni),ga=Zi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),va=ga.members,xa=(ga.size,ga.alignment,Math.pow(2,13));function ba(t,e,n,i,r,o,a,s){t.emplaceBack(e,n,2*Math.floor(i*xa)+a,r*xa*2,o*xa*2,Math.round(s))}var wa=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 Hi,this.indexArray=new sr,this.programConfigurations=new Wr(va,t.layers,t.zoom),this.segments=new Pr,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Ea(t,e){return t.x===e.x&&(t.x<0||t.x>Kr)||t.y===e.y&&(t.y<0||t.y>Kr)}function Ta(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>Kr})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>Kr})}wa.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("fill-extrusion",this.layers,e);for(var n=0,i=t;n<i.length;n+=1){var r=i[n],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var l=Jr(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(da("fill-extrusion",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index,!0)}}},wa.prototype.addFeatures=function(t,e){for(var n=0,i=this.features;n<i.length;n+=1){var r=i[n],o=r.geometry;this.addFeature(r,o,r.index,e)}},wa.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},wa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,va),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},wa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wa.prototype.addFeature=function(t,e,n,i){for(var r=0,o=pa(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),p=0,h=a;p<h.length;p+=1){var f=h[p];if(0!==f.length&&!Ta(f))for(var d=0,m=0;m<f.length;m++){var y=f[m];if(m>=1){var _=f[m-1];if(!Ea(y,_)){c.vertexLength+4>Pr.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var g=y.sub(_)._perp()._unit(),v=_.dist(y);d+v>32768&&(d=0),ba(this.layoutVertexArray,y.x,y.y,g.x,g.y,0,0,d),ba(this.layoutVertexArray,y.x,y.y,g.x,g.y,0,1,d),d+=v,ba(this.layoutVertexArray,_.x,_.y,g.x,g.y,0,0,d),ba(this.layoutVertexArray,_.x,_.y,g.x,g.y,0,1,d);var x=c.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),c.vertexLength+=4,c.primitiveLength+=2}}}}c.vertexLength+s>Pr.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray));for(var b=[],w=[],E=c.vertexLength,T=0,S=a;T<S.length;T+=1){var P=S[T];if(0!==P.length){P!==a[0]&&w.push(b.length/2);for(var C=0;C<P.length;C++){var k=P[C];ba(this.layoutVertexArray,k.x,k.y,0,0,1,1,0),b.push(k.x),b.push(k.y)}}}for(var A=Bo(b,w),z=0;z<A.length;z+=3)this.indexArray.emplaceBack(E+A[z],E+A[z+2],E+A[z+1]);c.primitiveLength+=A.length/3,c.vertexLength+=s}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i)},si("FillExtrusionBucket",wa,{omit:["layers","features"]});var Sa={paint:new Fi({"fill-extrusion-opacity":new Ii(yt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Oi(yt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ii(yt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ii(yt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Di(yt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Oi(yt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Oi(yt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ii(yt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Pa=function(t){function e(e){t.call(this,e,Sa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(){return ho(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,o,a,s,l){var u=fo(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,n),p=this.paint.get("fill-extrusion-base").evaluate(e,n),h=function(t,e,n,i){for(var o=[],a=0,s=t;a<s.length;a+=1){var l=s[a],u=[l.x,l.y,0,1];xo(u,u,e),o.push(new r(u[0]/u[3],u[1]/u[3]))}return o}(u,l),f=function(t,e,n,i){for(var o=[],a=[],s=i[8]*e,l=i[9]*e,u=i[10]*e,c=i[11]*e,p=i[8]*n,h=i[9]*n,f=i[10]*n,d=i[11]*n,m=0,y=t;m<y.length;m+=1){for(var _=[],g=[],v=0,x=y[m];v<x.length;v+=1){var b=x[v],w=b.x,E=b.y,T=i[0]*w+i[4]*E+i[12],S=i[1]*w+i[5]*E+i[13],P=i[2]*w+i[6]*E+i[14],C=i[3]*w+i[7]*E+i[15],k=P+u,A=C+c,z=T+p,L=S+h,M=P+f,I=C+d,O=new r((T+s)/A,(S+l)/A);O.z=k/A,_.push(O);var D=new r(z/I,L/I);D.z=M/I,g.push(D)}o.push(_),a.push(g)}return[o,a]}(i,p,c,l);return function(t,e,n){var i=1/0;no(n,e)&&(i=ka(n,e[0]));for(var r=0;r<e.length;r++)for(var o=e[r],a=t[r],s=0;s<o.length-1;s++){var l=o[s],u=o[s+1],c=a[s],p=[l,u,a[s+1],c,l];to(n,p)&&(i=Math.min(i,ka(n,p)))}return i!==1/0&&i}(f[0],f[1],h)},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}(Ni);function Ca(t,e){return t.x*e.x+t.y*e.y}function ka(t,e){if(1===t.length){var n=e[0],i=e[1],r=e[3],o=t[0],a=i.sub(n),s=r.sub(n),l=o.sub(n),u=Ca(a,a),c=Ca(a,s),p=Ca(s,s),h=Ca(l,a),f=Ca(l,s),d=u*p-c*c,m=(p*h-c*f)/d,y=(u*f-c*h)/d,_=1-m-y;return n.z*_+i.z*m+r.z*y}for(var g=1/0,v=0,x=e;v<x.length;v+=1){var b=x[v];g=Math.min(g,b.z)}return g}var Aa=Zi([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),za=Aa.members,La=(Aa.size,Aa.alignment,Ma);function Ma(t,e,n,i,r){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=r,t.readFields(Ia,this,e)}function Ia(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){for(var n=t.readVarint()+t.pos;t.pos<n;){var i=e._keys[t.readVarint()],r=e._values[t.readVarint()];e.properties[i]=r}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function Oa(t){for(var e,n,i=0,r=0,o=t.length,a=o-1;r<o;a=r++)e=t[r],i+=((n=t[a]).x-e.x)*(e.y+n.y);return i}Ma.types=["Unknown","Point","LineString","Polygon"],Ma.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,l=[];t.pos<n;){if(o<=0){var u=t.readVarint();i=7&u,o=u>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&l.push(e),e=[]),e.push(new r(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Ma.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,i=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(i<=0){var c=t.readVarint();n=7&c,i=c>>3}if(i--,1===n||2===n)(r+=t.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=t.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,u]},Ma.prototype.toGeoJSON=function(t,e,n){var i,r,o=this.extent*Math.pow(2,n),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Ma.types[this.type];function c(t){for(var e=0;e<t.length;e++){var n=t[e],i=180-360*(n.y+s)/o;t[e]=[360*(n.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(i=0;i<l.length;i++)p[i]=l[i][0];c(l=p);break;case 2:for(i=0;i<l.length;i++)c(l[i]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var n,i,r=[],o=0;o<e;o++){var a=Oa(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(n&&r.push(n),n=[t[o]]):n.push(t[o]))}return n&&r.push(n),r}(l),i=0;i<l.length;i++)for(r=0;r<l[i].length;r++)c(l[i][r])}1===l.length?l=l[0]:u="Multi"+u;var h={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Da=Ra;function Ra(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(Ba,this,e),this.length=this._features.length}function Ba(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){for(var e=null,n=t.readVarint()+t.pos;t.pos<n;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(n))}function Fa(t,e,n){if(3===t){var i=new Da(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}Ra.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 La(this._pbf,e,this.extent,this._keys,this._values)};var Na={VectorTile:function(t,e){this.layers=t.readFields(Fa,{},e)},VectorTileFeature:La,VectorTileLayer:Da},Ua=Na.VectorTileFeature.types,ja=63,Va=Math.cos(Math.PI/180*37.5),Za=.5,qa=Math.pow(2,14)/Za;function Ga(t,e,n,i,r,o,a){t.emplaceBack(e.x,e.y,i?1:0,r?1:-1,Math.round(ja*n.x)+128,Math.round(ja*n.y)+128,1+(0===o?0:o<0?-1:1)|(a*Za&63)<<2,a*Za>>6)}var Wa=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 Xi,this.indexArray=new sr,this.programConfigurations=new Wr(za,t.layers,t.zoom),this.segments=new Pr,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Ha(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(qa-1)}Wa.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("line",this.layers,e);for(var n=0,i=t;n<i.length;n+=1){var r=i[n],o=r.feature,a=r.index,s=r.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var l=Jr(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(da("line",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},Wa.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},Wa.prototype.addFeatures=function(t,e){for(var n=0,i=this.features;n<i.length;n+=1){var r=i[n],o=r.geometry;this.addFeature(r,o,r.index,e)}},Wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Wa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Wa.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},Wa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Wa.prototype.addFeature=function(t,e,n,i){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 p=c[u];this.addLine(p,t,o,a,s,l,n,i)}},Wa.prototype.addLine=function(t,e,n,i,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"===Ua[e.type],c=t.length;c>=2&&t[c-1].equals(t[c-2]);)c--;for(var p=0;p<c-1&&t[p].equals(t[p+1]);)p++;if(!(c<(u?3:2))){l&&(l.tileTotal=function(t,e,n){for(var i,r,o=0,a=p;a<n-1;a++)i=t[a],r=t[a+1],o+=i.dist(r);return o}(t,0,c)),"bevel"===n&&(r=1.05);var h=Kr/(512*this.overscaling)*15,f=t[p],d=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray);this.distance=0;var m,y,_,g=i,v=u?"butt":i,x=!0,b=void 0,w=void 0,E=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 S=p;S<c;S++)if(!(w=u&&S===c-1?t[p+1]:t[S+1])||!t[S].equals(w)){T&&(E=T),m&&(b=m),m=t[S],T=w?w.sub(m)._unit()._perp():E;var P=(E=E||T).add(T);0===P.x&&0===P.y||P._unit();var C=P.x*T.x+P.y*T.y,k=0!==C?1/C:1/0,A=C<Va&&b&&w;if(A&&S>p){var z=m.dist(b);if(z>2*h){var L=m.sub(m.sub(b)._mult(h/z)._round());this.distance+=L.dist(b),this.addCurrentVertex(L,this.distance,E.mult(1),0,0,!1,d,l),b=L}}var M=b&&w,I=M?n:w?g:v;if(M&&"round"===I&&(k<o?I="miter":k<=2&&(I="fakeround")),"miter"===I&&k>r&&(I="bevel"),"bevel"===I&&(k>2&&(I="flipbevel"),k<r&&(I="miter")),b&&(this.distance+=m.dist(b)),"miter"===I)P._mult(k),this.addCurrentVertex(m,this.distance,P,0,0,!1,d,l);else if("flipbevel"===I){if(k>100)P=T.clone().mult(-1);else{var O=E.x*T.y-E.y*T.x>0?-1:1,D=k*E.add(T).mag()/E.sub(T).mag();P._perp()._mult(D*O)}this.addCurrentVertex(m,this.distance,P,0,0,!1,d,l),this.addCurrentVertex(m,this.distance,P.mult(-1),0,0,!1,d,l)}else if("bevel"===I||"fakeround"===I){var R=E.x*T.y-E.y*T.x>0,B=-Math.sqrt(k*k-1);if(R?(_=0,y=B):(y=0,_=B),x||this.addCurrentVertex(m,this.distance,E,y,_,!1,d,l),"fakeround"===I){for(var F=Math.floor(8*(.5-(C-.5))),N=void 0,U=0;U<F;U++)N=T.mult((U+1)/(F+1))._add(E)._unit(),this.addPieSliceVertex(m,this.distance,N,R,d,l);this.addPieSliceVertex(m,this.distance,P,R,d,l);for(var j=F-1;j>=0;j--)N=E.mult((j+1)/(F+1))._add(T)._unit(),this.addPieSliceVertex(m,this.distance,N,R,d,l)}w&&this.addCurrentVertex(m,this.distance,T,-y,-_,!1,d,l)}else"butt"===I?(x||this.addCurrentVertex(m,this.distance,E,0,0,!1,d,l),w&&this.addCurrentVertex(m,this.distance,T,0,0,!1,d,l)):"square"===I?(x||(this.addCurrentVertex(m,this.distance,E,1,1,!1,d,l),this.e1=this.e2=-1),w&&this.addCurrentVertex(m,this.distance,T,-1,-1,!1,d,l)):"round"===I&&(x||(this.addCurrentVertex(m,this.distance,E,0,0,!1,d,l),this.addCurrentVertex(m,this.distance,E,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&&S<c-1){var V=m.dist(w);if(V>2*h){var Z=m.add(w.sub(m)._mult(h/V)._round());this.distance+=Z.dist(m),this.addCurrentVertex(Z,this.distance,T.mult(1),0,0,!1,d,l),m=Z}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},Wa.prototype.addCurrentVertex=function(t,e,n,i,r,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;s&&(e=Ha(e,s)),l=n.clone(),i&&l._sub(n.perp()._mult(i)),Ga(u,t,l,o,!1,i,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=n.mult(-1),r&&l._sub(n.perp()._mult(r)),Ga(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>qa/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,n,i,r,o,a))},Wa.prototype.addPieSliceVertex=function(t,e,n,i,r,o){n=n.mult(i?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=Ha(e,o)),Ga(a,t,n,!1,i,0,e),this.e3=r.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),r.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},si("LineBucket",Wa,{omit:["layers","features"]});var Xa=new Fi({"line-cap":new Ii(yt.layout_line["line-cap"]),"line-join":new Oi(yt.layout_line["line-join"]),"line-miter-limit":new Ii(yt.layout_line["line-miter-limit"]),"line-round-limit":new Ii(yt.layout_line["line-round-limit"])}),Ka={paint:new Fi({"line-opacity":new Oi(yt.paint_line["line-opacity"]),"line-color":new Oi(yt.paint_line["line-color"]),"line-translate":new Ii(yt.paint_line["line-translate"]),"line-translate-anchor":new Ii(yt.paint_line["line-translate-anchor"]),"line-width":new Oi(yt.paint_line["line-width"]),"line-gap-width":new Oi(yt.paint_line["line-gap-width"]),"line-offset":new Oi(yt.paint_line["line-offset"]),"line-blur":new Oi(yt.paint_line["line-blur"]),"line-dasharray":new Ri(yt.paint_line["line-dasharray"]),"line-pattern":new Di(yt.paint_line["line-pattern"]),"line-gradient":new Bi(yt.paint_line["line-gradient"])}),layout:Xa},Ya=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,n){return n=new Ti(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),t.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,i,r){return n=p({},n,{zoom:Math.floor(n.zoom)}),t.prototype.evaluate.call(this,e,n,i,r)},e}(Oi))(Ka.paint.properties["line-width"].specification);Ya.useIntegerZoom=!0;var Ja=function(t){function e(e){t.call(this,e,Ka)}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=Lo(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=Ya.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Wa(t)},e.prototype.queryRadius=function(t){var e=t,n=$a(po("line-width",this,e),po("line-gap-width",this,e)),i=po("line-offset",this,e);return n/2+Math.abs(i)+ho(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,o,a,s){var l=fo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*$a(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),c=this.paint.get("line-offset").evaluate(e,n);return c&&(i=function(t,e){for(var n=[],i=new r(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],l=0;l<a.length;l++){var u=a[l-1],c=a[l],p=a[l+1],h=0===l?i:c.sub(u)._unit()._perp(),f=l===a.length-1?i:p.sub(c)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(c))}n.push(s)}return n}(i,c*s)),function(t,e,n){for(var i=0;i<e.length;i++){var r=e[i];if(t.length>=3)for(var o=0;o<r.length;o++)if(uo(t,r[o]))return!0;if(io(t,r,n))return!0}return!1}(l,i,u)},e}(Ni);function $a(t,e){return e>0?e+2*t:t}var Qa=Zi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),ts=Zi([{name:"a_projected_pos",components:3,type:"Float32"}],4),es=(Zi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Zi([{name:"a_placed",components:2,type:"Uint8"}],4)),ns=(Zi([{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"}]),Zi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),is=Zi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function rs(t,e,n){return t.sections.forEach(function(t){t.text=function(t,e,n){var i=e.layout.get("text-transform").evaluate(n,{});return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),Ei.applyArabicShaping&&(t=Ei.applyArabicShaping(t)),t}(t.text,e,n)}),t}Zi([{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"}]),Zi([{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"}]),Zi([{type:"Float32",name:"offsetX"}]),Zi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var os={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"},as=function(t){function e(e,n,i,r){t.call(this,e,n),this.angle=i,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}(r);function ss(t,e){var n=e.expression;if("constant"===n.kind)return{functionType:"constant",layoutSize:n.evaluate(new Ti(t+1))};if("source"===n.kind)return{functionType:"source"};for(var i=n.zoomStops,r=0;r<i.length&&i[r]<=t;)r++;for(var o=r=Math.max(0,r-1);o<i.length&&i[o]<t+1;)o++;o=Math.min(i.length-1,o);var a={min:i[r],max:i[o]};return"composite"===n.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:n.evaluate(new Ti(t+1)),zoomRange:a,sizeRange:{min:n.evaluate(new Ti(a.min)),max:n.evaluate(new Ti(a.max))},propertyValue:e.value}}si("Anchor",as);var ls=Na.VectorTileFeature.types,us=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function cs(t,e,n,i,r,o,a,s){t.emplaceBack(e,n,Math.round(32*i),Math.round(32*r),o,a,s?s[0]:0,s?s[1]:0)}function ps(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}var hs=function(t){this.layoutVertexArray=new Yi,this.indexArray=new sr,this.programConfigurations=t,this.segments=new Pr,this.dynamicLayoutVertexArray=new Ji,this.opacityVertexArray=new $i,this.placedSymbolArray=new mr};hs.prototype.upload=function(t,e,n,i){n&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Qa.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,ts.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,us,!0),this.opacityVertexBuffer.itemSize=1),(n||i)&&this.programConfigurations.upload(t)},hs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},si("SymbolBuffers",hs);var fs=function(t,e,n){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new n,this.segments=new Pr,this.collisionVertexArray=new er};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,es.members,!0)},fs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},si("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=ss(this.zoom,e["text-size"]),this.iconSizeData=ss(this.zoom,e["icon-size"]);var n=this.layers[0].layout,i=n.get("symbol-sort-key"),r=n.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==i.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(n.get("text-allow-overlap")||n.get("icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement")),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id}),this.sourceID=t.sourceID};ds.prototype.createArrays=function(){this.text=new hs(new Wr(Qa.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new hs(new Wr(Qa.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new fs(tr,ns.members,lr),this.collisionCircle=new fs(tr,is.members,sr),this.glyphOffsetArray=new vr,this.lineVertexArray=new br,this.symbolInstances=new _r},ds.prototype.calculateGlyphDependencies=function(t,e,n,i){for(var r=0;r<t.length;r++)if(e[t.charCodeAt(r)]=!0,n&&i){var o=os[t.charAt(r)];o&&(e[o.charCodeAt(0)]=!0)}},ds.prototype.populate=function(t,e){var n=this.layers[0],i=n.layout,r=i.get("text-font"),o=i.get("text-field"),a=i.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,u=i.get("symbol-sort-key");if(this.features=[],s||l){for(var c=e.iconDependencies,p=e.glyphDependencies,h=new Ti(this.zoom),f=0,d=t;f<d.length;f+=1){var m=d[f],y=m.feature,_=m.index,g=m.sourceLayerIndex;if(n._featureFilter(h,y)){var v=void 0;if(s){var x=n.getValueAndResolveTokens("text-field",y);v=rs(x instanceof jt?x:jt.fromString(x),n,y)}var b=void 0;if(l&&(b=n.getValueAndResolveTokens("icon-image",y)),v||b){var w=this.sortFeaturesByKey?u.evaluate(y,{}):void 0,E={text:v,icon:b,index:_,sourceLayerIndex:g,geometry:Jr(y),properties:y.properties,type:ls[y.type],sortKey:w};if(void 0!==y.id&&(E.id=y.id),this.features.push(E),b&&(c[b]=!0),v)for(var T=r.evaluate(y,{}).join(","),S="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement"),P=0,C=v.sections;P<C.length;P+=1){var k=C[P],A=fi(v.toString()),z=k.fontStack||T,L=p[z]=p[z]||{};this.calculateGlyphDependencies(k.text,L,S,A)}}}}"line"===i.get("symbol-placement")&&(this.features=function(t){var e={},n={},i=[],r=0;function o(e){i.push(t[e]),r++}function a(t,e,r){var o=n[t];return delete n[t],n[e]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(r[0]),o}function s(t,n,r){var o=e[n];return delete e[n],e[t]=o,i[o].geometry[0].shift(),i[o].geometry[0]=r[0].concat(i[o].geometry[0]),o}function l(t,e,n){var i=n?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text?c.text.toString():null;if(h){var f=l(h,p),d=l(h,p,!0);if(f in n&&d in e&&n[f]!==e[d]){var m=s(f,d,p),y=a(f,d,i[m].geometry);delete e[f],delete n[d],n[l(h,i[y].geometry,!0)]=y,i[m].geometry=null}else f in n?a(f,d,p):d in e?s(f,d,p):(o(u),e[f]=r-1,n[d]=r-1)}else o(u)}return i.filter(function(t){return t.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(t,e){return t.sortKey-e.sortKey})}},ds.prototype.update=function(t,e,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,n),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,n))},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 n=this.lineVertexArray.length;if(void 0!==t.segment){for(var i=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:i},a<e.length-1&&(i+=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:n,lineLength:this.lineVertexArray.length-n}},ds.prototype.addSymbols=function(t,e,n,i,r,o,a,s,l,u){for(var c=t.indexArray,p=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray,o.sortKey),d=this.glyphOffsetArray.length,m=f.vertexLength,y=0,_=e;y<_.length;y+=1){var g=_[y],v=g.tl,x=g.tr,b=g.bl,w=g.br,E=g.tex,T=f.vertexLength,S=g.glyphOffset[1];cs(p,s.x,s.y,v.x,S+v.y,E.x,E.y,n),cs(p,s.x,s.y,x.x,S+x.y,E.x+E.w,E.y,n),cs(p,s.x,s.y,b.x,S+b.y,E.x,E.y+E.h,n),cs(p,s.x,s.y,w.x,S+w.y,E.x+E.w,E.y+E.h,n),ps(h,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(g.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,l,u,s.segment,n?n[0]:0,n?n[1]:0,i[0],i[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{})},ds.prototype._addCollisionDebugVertex=function(t,e,n,i,r,o){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,i,r,Math.round(o.x),Math.round(o.y))},ds.prototype.addCollisionDebugVertices=function(t,e,n,i,o,a,s,l){var u=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),c=u.vertexLength,p=o.layoutVertexArray,h=o.collisionVertexArray,f=s.anchorX,d=s.anchorY;if(this._addCollisionDebugVertex(p,h,a,f,d,new r(t,e)),this._addCollisionDebugVertex(p,h,a,f,d,new r(n,e)),this._addCollisionDebugVertex(p,h,a,f,d,new r(n,i)),this._addCollisionDebugVertex(p,h,a,f,d,new r(t,i)),u.vertexLength+=4,l){var m=o.indexArray;m.emplaceBack(c,c+1,c+2),m.emplaceBack(c,c+2,c+3),u.primitiveLength+=2}else{var y=o.indexArray;y.emplaceBack(c,c+1),y.emplaceBack(c+1,c+2),y.emplaceBack(c+2,c+3),y.emplaceBack(c+3,c),u.primitiveLength+=4}},ds.prototype.addDebugCollisionBoxes=function(t,e,n){for(var i=t;i<e;i++){var r=this.collisionBoxArray.get(i),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,n,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,n,i,r){for(var o={},a=e;a<n;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=i;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 n=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,n.textBoxStartIndex,n.textBoxEndIndex,n.iconBoxStartIndex,n.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),n=e.vertexStartIndex+4*e.numGlyphs,i=e.vertexStartIndex;i<n;i+=4)this.text.indexArray.emplaceBack(i,i+1,i+2),this.text.indexArray.emplaceBack(i+1,i+2,i+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=[],n=0;n<this.symbolInstances.length;n++)e.push(n);for(var i=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(i*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 p=c[u],h=this.symbolInstances.get(p);this.featureSortOrder.push(h.featureIndex),h.horizontalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(h.horizontalPlacedTextSymbolIndex),h.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(h.verticalPlacedTextSymbolIndex);var f=this.icon.placedSymbolArray.get(p);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)}},si("SymbolBucket",ds,{omit:["layers","collisionBoxArray","features","compareText"]}),ds.MAX_GLYPHS=65535,ds.addDynamicAttributes=ps;var ms=new Fi({"symbol-placement":new Ii(yt.layout_symbol["symbol-placement"]),"symbol-spacing":new Ii(yt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ii(yt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Oi(yt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ii(yt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ii(yt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Ii(yt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ii(yt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ii(yt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Oi(yt.layout_symbol["icon-size"]),"icon-text-fit":new Ii(yt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ii(yt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Oi(yt.layout_symbol["icon-image"]),"icon-rotate":new Oi(yt.layout_symbol["icon-rotate"]),"icon-padding":new Ii(yt.layout_symbol["icon-padding"]),"icon-keep-upright":new Ii(yt.layout_symbol["icon-keep-upright"]),"icon-offset":new Oi(yt.layout_symbol["icon-offset"]),"icon-anchor":new Oi(yt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ii(yt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ii(yt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ii(yt.layout_symbol["text-rotation-alignment"]),"text-field":new Oi(yt.layout_symbol["text-field"]),"text-font":new Oi(yt.layout_symbol["text-font"]),"text-size":new Oi(yt.layout_symbol["text-size"]),"text-max-width":new Oi(yt.layout_symbol["text-max-width"]),"text-line-height":new Ii(yt.layout_symbol["text-line-height"]),"text-letter-spacing":new Oi(yt.layout_symbol["text-letter-spacing"]),"text-justify":new Oi(yt.layout_symbol["text-justify"]),"text-anchor":new Oi(yt.layout_symbol["text-anchor"]),"text-max-angle":new Ii(yt.layout_symbol["text-max-angle"]),"text-rotate":new Oi(yt.layout_symbol["text-rotate"]),"text-padding":new Ii(yt.layout_symbol["text-padding"]),"text-keep-upright":new Ii(yt.layout_symbol["text-keep-upright"]),"text-transform":new Oi(yt.layout_symbol["text-transform"]),"text-offset":new Oi(yt.layout_symbol["text-offset"]),"text-allow-overlap":new Ii(yt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Ii(yt.layout_symbol["text-ignore-placement"]),"text-optional":new Ii(yt.layout_symbol["text-optional"])}),ys={paint:new Fi({"icon-opacity":new Oi(yt.paint_symbol["icon-opacity"]),"icon-color":new Oi(yt.paint_symbol["icon-color"]),"icon-halo-color":new Oi(yt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Oi(yt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Oi(yt.paint_symbol["icon-halo-blur"]),"icon-translate":new Ii(yt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ii(yt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Oi(yt.paint_symbol["text-opacity"]),"text-color":new Oi(yt.paint_symbol["text-color"]),"text-halo-color":new Oi(yt.paint_symbol["text-halo-color"]),"text-halo-width":new Oi(yt.paint_symbol["text-halo-width"]),"text-halo-blur":new Oi(yt.paint_symbol["text-halo-blur"]),"text-translate":new Ii(yt.paint_symbol["text-translate"]),"text-translate-anchor":new Ii(yt.paint_symbol["text-translate-anchor"])}),layout:ms},_s=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.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 n,i=this.layout.get(t).evaluate(e,{}),r=this._unevaluatedLayout._values[t];return r.isDataDriven()||mn(r.value)?i:(n=e.properties,i.replace(/{([^{}]+)}/g,function(t,e){return e in n?String(n[e]):""}))},e.prototype.createBucket=function(t){return new ds(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Ni),gs={paint:new Fi({"background-color":new Ii(yt.paint_background["background-color"]),"background-pattern":new Ri(yt.paint_background["background-pattern"]),"background-opacity":new Ii(yt.paint_background["background-opacity"])})},vs=function(t){function e(e){t.call(this,e,gs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ni),xs={paint:new Fi({"raster-opacity":new Ii(yt.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ii(yt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ii(yt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ii(yt.paint_raster["raster-brightness-max"]),"raster-saturation":new Ii(yt.paint_raster["raster-saturation"]),"raster-contrast":new Ii(yt.paint_raster["raster-contrast"]),"raster-resampling":new Ii(yt.paint_raster["raster-resampling"]),"raster-fade-duration":new Ii(yt.paint_raster["raster-fade-duration"])})},bs=function(t){function e(e){t.call(this,e,xs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ni),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}(Ni),Es={circle:wo,heatmap:Mo,hillshade:Oo,fill:_a,"fill-extrusion":Pa,line:Ja,symbol:_s,background:vs,raster:bs};function Ts(t){for(var e=0,n=0,i=0,r=t;i<r.length;i+=1){var o=r[i];e+=o.w*o.h,n=Math.max(n,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)),n),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var p=c[u],h=a.length-1;h>=0;h--){var f=a[h];if(!(p.w>f.w||p.h>f.h)){if(p.x=f.x,p.y=f.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===f.w&&p.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else p.h===f.h?(f.x+=p.w,f.w-=p.w):p.w===f.w?(f.y+=p.h,f.h-=p.h):(a.push({x:f.x+p.w,y:f.y,w:f.w-p.w,h:p.h}),f.y+=p.h,f.h-=p.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}var Ss=function(t,e){var n=e.pixelRatio;this.paddedRect=t,this.pixelRatio=n},Ps={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Ps.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Ps.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Ps.tlbr.get=function(){return this.tl.concat(this.br)},Ps.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ss.prototype,Ps);var Cs=function(t,e){var n={},i={},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),n[o]=new Ss(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),i[l]=new Ss(c,u)}var p=Ts(r),h=p.w,f=p.h,d=new Ao({width:h||1,height:f||1});for(var m in t){var y=t[m],_=n[m].paddedRect;Ao.copy(y.data,d,{x:0,y:0},{x:_.x+1,y:_.y+1},y.data)}for(var g in e){var v=e[g],x=i[g].paddedRect,b=x.x+1,w=x.y+1,E=v.data.width,T=v.data.height;Ao.copy(v.data,d,{x:0,y:0},{x:b,y:w},v.data),Ao.copy(v.data,d,{x:0,y:T-1},{x:b,y:w-1},{width:E,height:1}),Ao.copy(v.data,d,{x:0,y:0},{x:b,y:w+T},{width:E,height:1}),Ao.copy(v.data,d,{x:E-1,y:0},{x:b-1,y:w},{width:1,height:T}),Ao.copy(v.data,d,{x:0,y:0},{x:b+E,y:w},{width:1,height:T})}this.image=d,this.iconPositions=n,this.patternPositions=i};si("ImagePosition",Ss),si("ImageAtlas",Cs);var ks=self.HTMLImageElement,As=self.HTMLCanvasElement,zs=self.HTMLVideoElement,Ls=self.ImageData,Ms=function(t,e,n,i){this.context=t,this.format=n,this.texture=t.gl.createTexture(),this.update(e,i)};Ms.prototype.update=function(t,e){var n=t.width,i=t.height,r=!this.size||this.size[0]!==n||this.size[1]!==i,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=[n,i],t instanceof ks||t instanceof As||t instanceof zs||t instanceof Ls?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,n,i,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof ks||t instanceof As||t instanceof zs||t instanceof Ls?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,n,i,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},Ms.prototype.bind=function(t,e,n){var i=this.context.gl;i.bindTexture(i.TEXTURE_2D,this.texture),n!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},Ms.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Ms.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Is=function(t,e,n,i,r){var o,a,s=8*r-i-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?r-1:0,h=n?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},Os=function(t,e,n,i,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,p=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?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+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,r),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,r),a=0));r>=8;t[n+f]=255&s,f+=d,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;t[n+f]=255&a,f+=d,a/=256,u-=8);t[n+f-d]|=128*m},Ds=Rs;function Rs(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 Bs(t){return t.type===Rs.Bytes?t.readVarint()+t.pos:t.pos+1}function Fs(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Ns(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;r>=t;r--)n.buf[r+i]=n.buf[r]}function Us(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function js(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function Vs(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function Zs(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function qs(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function Gs(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function Ws(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function Hs(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function Xs(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function Ks(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Ys(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function Js(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Rs.Varint=0,Rs.Fixed64=1,Rs.Bytes=2,Rs.Fixed32=5,Rs.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var i=this.readVarint(),r=i>>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Ks(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Js(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Ks(this.buf,this.pos)+4294967296*Ks(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=Ks(this.buf,this.pos)+4294967296*Js(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Is(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Is(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:function(t,e,n){var i,r,o=n.buf;if(i=(112&(r=o[n.pos++]))>>4,r<128)return Fs(t,i,e);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return Fs(t,i,e);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return Fs(t,i,e);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return Fs(t,i,e);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return Fs(t,i,e);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return Fs(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,n){for(var i="",r=e;r<n;){var o,a,s,l=t[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>n)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,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),r+=c}return i}(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 n=Bs(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=Bs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Rs.Varint)for(;this.buf[this.pos++]>127;);else if(e===Rs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Rs.Fixed32)this.pos+=4;else{if(e!==Rs.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 n=new Uint8Array(e);n.set(this.buf),this.buf=n,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),Ys(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Ys(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Ys(this.buf,-1&t,this.pos),Ys(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Ys(this.buf,-1&t,this.pos),Ys(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 n,i;if(t>=0?(n=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((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)))))}(i,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,n){for(var i,r,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){i>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):r=i;continue}if(i<56320){t[n++]=239,t[n++]=191,t[n++]=189,r=i;continue}i=r-55296<<10|i-56320|65536,r=null}else r&&(t[n++]=239,t[n++]=191,t[n++]=189,r=null);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&Ns(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),Os(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Os(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 n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var i=this.pos-n;i>=128&&Ns(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,n){this.writeTag(t,Rs.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){this.writeMessage(t,Us,e)},writePackedSVarint:function(t,e){this.writeMessage(t,js,e)},writePackedBoolean:function(t,e){this.writeMessage(t,qs,e)},writePackedFloat:function(t,e){this.writeMessage(t,Vs,e)},writePackedDouble:function(t,e){this.writeMessage(t,Zs,e)},writePackedFixed32:function(t,e){this.writeMessage(t,Gs,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,Ws,e)},writePackedFixed64:function(t,e){this.writeMessage(t,Hs,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,Xs,e)},writeBytesField:function(t,e){this.writeTag(t,Rs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Rs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Rs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Rs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Rs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Rs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Rs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Rs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Rs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Rs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var $s=3;function Qs(t,e,n){1===t&&n.readMessage(tl,e)}function tl(t,e,n){if(3===t){var i=n.readMessage(el,{}),r=i.id,o=i.bitmap,a=i.width,s=i.height,l=i.left,u=i.top,c=i.advance;e.push({id:r,bitmap:new ko({width:a+2*$s,height:s+2*$s},o),metrics:{width:a,height:s,left:l,top:u,advance:c}})}}function el(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}var nl=$s,il=function(t,e,n){this.target=t,this.parent=e,this.mapId=n,this.callbacks={},this.callbackID=0,y(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function rl(t,e,n){var i=2*Math.PI*6378137/256/Math.pow(2,n);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}il.prototype.send=function(t,e,n,i){var r=this,o=n?this.mapId+":"+this.callbackID++:null;n&&(this.callbacks[o]=n);var a=[];if(this.target.postMessage({targetMapId:i,sourceMapId:this.mapId,type:t,id:String(o),data:ui(e,a)},a),n)return{cancel:function(){return r.target.postMessage({targetMapId:i,sourceMapId:r.mapId,type:"<cancel>",id:String(o)})}}},il.prototype.receive=function(t){var e,n=this,i=t.data,r=i.id;if(!i.targetMapId||this.mapId===i.targetMapId){var o=function(t,e){delete n.callbacks[r];var i=[];n.target.postMessage({sourceMapId:n.mapId,type:"<response>",id:String(r),error:t?ui(t):null,data:ui(e,i)},i)};if("<response>"===i.type||"<cancel>"===i.type)e=this.callbacks[i.id],delete this.callbacks[i.id],e&&i.error?e(ci(i.error)):e&&e(null,ci(i.data));else if(void 0!==i.id&&this.parent[i.type]){this.callbacks[i.id]=null;var a=this.parent[i.type](i.sourceMapId,ci(i.data),o);a&&null===this.callbacks[i.id]&&(this.callbacks[i.id]=a)}else if(void 0!==i.id&&this.parent.getWorkerSource){var s=i.type.split("."),l=ci(i.data);this.parent.getWorkerSource(i.sourceMapId,s[0],l.source)[s[1]](l,o)}else this.parent[i.type](ci(i.data))}},il.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var ol=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]))};ol.prototype.setNorthEast=function(t){return this._ne=t instanceof al?new al(t.lng,t.lat):al.convert(t),this},ol.prototype.setSouthWest=function(t){return this._sw=t instanceof al?new al(t.lng,t.lat):al.convert(t),this},ol.prototype.extend=function(t){var e,n,i=this._sw,r=this._ne;if(t instanceof al)e=t,n=t;else{if(!(t instanceof ol))return Array.isArray(t)?t.every(Array.isArray)?this.extend(ol.convert(t)):this.extend(al.convert(t)):this;if(e=t._sw,n=t._ne,!e||!n)return this}return i||r?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),r.lng=Math.max(n.lng,r.lng),r.lat=Math.max(n.lat,r.lat)):(this._sw=new al(e.lng,e.lat),this._ne=new al(n.lng,n.lat)),this},ol.prototype.getCenter=function(){return new al((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ol.prototype.getSouthWest=function(){return this._sw},ol.prototype.getNorthEast=function(){return this._ne},ol.prototype.getNorthWest=function(){return new al(this.getWest(),this.getNorth())},ol.prototype.getSouthEast=function(){return new al(this.getEast(),this.getSouth())},ol.prototype.getWest=function(){return this._sw.lng},ol.prototype.getSouth=function(){return this._sw.lat},ol.prototype.getEast=function(){return this._ne.lng},ol.prototype.getNorth=function(){return this._ne.lat},ol.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ol.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ol.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ol.convert=function(t){return!t||t instanceof ol?t:new ol(t)};var al=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")};function sl(t){return 2*Math.PI*6378137*Math.cos(t*Math.PI/180)}function ll(t){return(180+t)/360}function ul(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function cl(t,e){return t/sl(e)}function pl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}al.prototype.wrap=function(){return new al(c(this.lng,-180,180),this.lat)},al.prototype.toArray=function(){return[this.lng,this.lat]},al.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},al.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new ol(new al(this.lng-n,this.lat-e),new al(this.lng+n,this.lat+e))},al.convert=function(t){if(t instanceof al)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new al(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new al(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var hl=function(t,e,n){void 0===n&&(n=0),this.x=+t,this.y=+e,this.z=+n};hl.fromLngLat=function(t,e){void 0===e&&(e=0);var n=al.convert(t);return new hl(ll(n.lng),ul(n.lat),cl(e,n.lat))},hl.prototype.toLngLat=function(){return new al(360*this.x-180,pl(this.y))},hl.prototype.toAltitude=function(){return this.z*sl(pl(this.y))};var fl=function(t,e,n){this.z=t,this.x=e,this.y=n,this.key=yl(0,t,e,n)};fl.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},fl.prototype.url=function(t,e){var n,i,r,o,a,s=(n=this.x,i=this.y,r=this.z,o=rl(256*n,256*(i=Math.pow(2,r)-i-1),r),a=rl(256*(n+1),256*(i+1),r),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,n){for(var i,r="",o=t;o>0;o--)r+=(e&(i=1<<o-1)?1:0)+(n&i?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)},fl.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new r((t.x*e-this.x)*Kr,(t.y*e-this.y)*Kr)};var dl=function(t,e){this.wrap=t,this.canonical=e,this.key=yl(t,e.z,e.x,e.y)},ml=function(t,e,n,i,r){this.overscaledZ=t,this.wrap=e,this.canonical=new fl(n,+i,+r),this.key=yl(e,t,i,r)};function yl(t,e,n,i){(t*=2)<0&&(t=-1*t-1);var r=1<<e;return 32*(r*r*t+r*i+n)+e}ml.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},ml.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new ml(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ml(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},ml.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},ml.prototype.children=function(t){if(this.overscaledZ>=t)return[new ml(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new ml(e,this.wrap,e,n,i),new ml(e,this.wrap,e,n+1,i),new ml(e,this.wrap,e,n,i+1),new ml(e,this.wrap,e,n+1,i+1)]},ml.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))},ml.prototype.wrapped=function(){return new ml(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},ml.prototype.unwrapTo=function(t){return new ml(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},ml.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},ml.prototype.toUnwrapped=function(){return new dl(this.wrap,this.canonical)},ml.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},ml.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new hl(t.x-this.wrap,t.y))},si("CanonicalTileID",fl),si("OverscaledTileID",ml,{omit:["posMatrix"]});var _l=function(t,e,n){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return w('"'+n+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var i=this.dim=e.height;this.stride=this.dim+2,this.data=new Int32Array(this.stride*this.stride);for(var r=e.data,o="terrarium"===n?this._unpackTerrarium:this._unpackMapbox,a=0;a<i;a++)for(var s=0;s<i;s++){var l=4*(a*i+s);this.set(s,a,o(r[l],r[l+1],r[l+2]))}for(var u=0;u<i;u++)this.set(-1,u,this.get(0,u)),this.set(i,u,this.get(i-1,u)),this.set(u,-1,this.get(u,0)),this.set(u,i,this.get(u,i-1));this.set(-1,-1,this.get(0,0)),this.set(i,-1,this.get(i-1,0)),this.set(-1,i,this.get(0,i-1)),this.set(i,i,this.get(i-1,i-1))};_l.prototype.set=function(t,e,n){this.data[this._idx(t,e)]=n+65536},_l.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},_l.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},_l.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},_l.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},_l.prototype.getPixels=function(){return new Ao({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},_l.prototype.backfillBorder=function(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,r=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:i=r-1;break;case 1:r=i+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-n*this.dim,u=o;u<a;u++)for(var c=i;c<r;c++)this.set(c,u,t.get(c+s,u+l))},si("DEMData",_l);var gl=Zi([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),vl=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var n=t[e];this._stringToNumber[n]=e,this._numberToString[e]=n}};vl.prototype.encode=function(t){return this._stringToNumber[t]},vl.prototype.decode=function(t){return this._numberToString[t]};var xl=function(t,e,n,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=n,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},bl={geometry:{configurable:!0}};bl.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},bl.geometry.set=function(t){this._geometry=t},xl.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(xl.prototype,bl);var wl=function(){this.state={},this.stateChanges={},this.deletedStates={}};wl.prototype.updateState=function(t,e,n){var i=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},p(this.stateChanges[t][i],n),null===this.deletedStates[t])for(var r in this.deletedStates[t]={},this.state[t])r!==i&&(this.deletedStates[t][r]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][i])for(var o in this.deletedStates[t][i]={},this.state[t][i])n[o]||(this.deletedStates[t][i][o]=null);else for(var a in n)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][a]&&delete this.deletedStates[t][i][a]},wl.prototype.removeFeatureState=function(t,e,n){if(null!==this.deletedStates[t]){var i=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},n&&e)null!==this.deletedStates[t][i]&&(this.deletedStates[t][i]=this.deletedStates[t][i]||{},this.deletedStates[t][i][n]=null);else if(e)if(this.stateChanges[t]&&this.stateChanges[t][i])for(n in this.deletedStates[t][i]={},this.stateChanges[t][i])this.deletedStates[t][i][n]=null;else this.deletedStates[t][i]=null;else this.deletedStates[t]=null}},wl.prototype.getState=function(t,e){var n=String(e),i=this.state[t]||{},r=this.stateChanges[t]||{},o=p({},i[n],r[n]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var a=this.deletedStates[t][e];if(null===a)return{};for(var s in a)delete o[s]}return o},wl.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},wl.prototype.coalesceChanges=function(t,e){var n={};for(var i in this.stateChanges){this.state[i]=this.state[i]||{};var r={};for(var o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),p(this.state[i][o],this.stateChanges[i][o]),r[o]=this.state[i][o];n[i]=r}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a]){for(var l in this.state[a])s[l]={};this.state[a]={}}else for(var u in this.deletedStates[a]){if(null===this.deletedStates[a][u])this.state[a][u]={};else for(var c=0,h=Object.keys(this.deletedStates[a][u]);c<h.length;c+=1){var f=h[c];delete this.state[a][u][f]}s[u]=this.state[a][u]}n[a]=n[a]||{},p(n[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(var d in t)t[d].setFeatureState(n,e)};var El=function(t,e,n){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new ni(Kr,16,0),this.grid3D=new ni(Kr,16,0),this.featureIndexArray=n||new Er};function Tl(t){for(var e=1/0,n=1/0,i=-1/0,r=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),n=Math.min(n,s.y),i=Math.max(i,s.x),r=Math.max(r,s.y)}return{minX:e,minY:n,maxX:i,maxY:r}}function Sl(t,e){return e-t}El.prototype.insert=function(t,e,n,i,r,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,i,r);for(var s=o?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],p=0;p<u.length;p++){var h=u[p];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<Kr&&c[1]<Kr&&c[2]>=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},El.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Na.VectorTile(new Ds(this.rawTileData)).layers,this.sourceLayerCoder=new vl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},El.prototype.query=function(t,e,n){var i=this;this.loadVTLayers();for(var o=t.params||{},a=Kr/t.tileSize/t.scale,s=zn(o.filter),l=t.queryGeometry,u=t.queryPadding*a,c=Tl(l),p=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),h=Tl(t.cameraQueryGeometry),f=0,d=this.grid3D.query(h.minX-u,h.minY-u,h.maxX+u,h.maxY+u,function(e,n,i,o){return function(t,e,n,i,o){for(var a=0,s=t;a<s.length;a+=1){var l=s[a];if(e<=l.x&&n<=l.y&&i>=l.x&&o>=l.y)return!0}var u=[new r(e,n),new r(e,o),new r(i,o),new r(i,n)];if(t.length>2)for(var c=0,p=u;c<p.length;c+=1)if(uo(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(co(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-u,n-u,i+u,o+u)});f<d.length;f+=1){var m=d[f];p.push(m)}p.sort(Sl);for(var y,_={},g=function(r){var u=p[r];if(u!==y){y=u;var c=i.featureIndexArray.get(u),h=null;i.loadMatchingFeature(_,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,s,o.layers,e,function(e,r){h||(h=Jr(e));var o={};return e.id&&(o=n.getState(r.sourceLayer||"_geojsonTileLayer",e.id)),r.queryIntersectsFeature(l,e,o,h,i.z,t.transform,a,t.pixelPosMatrix)})}},v=0;v<p.length;v++)g(v);return _},El.prototype.loadMatchingFeature=function(t,e,n,i,r,o,a,s){var l=this.bucketLayerIDs[e];if(!o||function(t,e){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1}(o,l)){var u=this.sourceLayerCoder.decode(n),c=this.vtLayers[u].feature(i);if(r(new Ti(this.tileID.overscaledZ),c))for(var p=0;p<l.length;p++){var h=l[p];if(!(o&&o.indexOf(h)<0)){var f=a[h];if(f){var d=!s||s(c,f);if(d){var m=new xl(c,this.z,this.x,this.y);m.layer=f.serialize();var y=t[h];void 0===y&&(y=t[h]=[]),y.push({featureIndex:i,feature:m,intersectionZ:d})}}}}}},El.prototype.lookupSymbolFeatures=function(t,e,n,i,r,o){var a={};this.loadVTLayers();for(var s=zn(i),l=0,u=t;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,e,n,c,s,r,o)}return a},El.prototype.hasLayer=function(t){for(var e=0,n=this.bucketLayerIDs;e<n.length;e+=1)for(var i=0,r=n[e];i<r.length;i+=1)if(t===r[i])return!0;return!1},si("FeatureIndex",El,{omit:["rawTileData","sourceLayerCoder"]});var Pl=function(t,e){this.tileID=t,this.uid=f(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.expiredRequestCount=0,this.state="loading"};Pl.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<L.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Pl.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Pl.prototype.loadVectorData=function(t,e,n){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var i 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 n={};if(!e)return n;for(var i=function(){var t=o[r],i=t.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==i.length){t.layers=i,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map(function(t){return i.filter(function(e){return e.id===t})[0]}));for(var a=0,s=i;a<s.length;a+=1){var l=s[a];n[l.id]=t}}},r=0,o=t;r<o.length;r+=1)i();return n}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var r=this.buckets[i];if(r instanceof ds){if(this.hasSymbolBuckets=!0,!n)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 fr},Pl.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"},Pl.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},Pl.prototype.getBucket=function(t){return this.buckets[t.id]},Pl.prototype.upload=function(t){for(var e in this.buckets){var n=this.buckets[e];n.uploadPending()&&n.upload(t)}var i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ms(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ms(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)},Pl.prototype.queryRenderedFeatures=function(t,e,n,i,r,o,a,s,l){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:n,cameraQueryGeometry:i,scale:r,tileSize:this.tileSize,pixelPosMatrix:l,transform:a,params:o,queryPadding:this.queryPadding*s},t,e):{}},Pl.prototype.querySourceFeatures=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var n=this.latestFeatureIndex.loadVTLayers(),i=e?e.sourceLayer:"",r=n._geojsonTileLayer||n[i];if(r)for(var o=zn(e&&e.filter),a=this.tileID.canonical,s=a.z,l=a.x,u=a.y,c={z:s,x:l,y:u},p=0;p<r.length;p++){var h=r.feature(p);if(o(new Ti(this.tileID.overscaledZ),h)){var f=new xl(h,s,l,u);f.tile=c,t.push(f)}}}},Pl.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)},Pl.prototype.setMask=function(t,e){if(!a(this.mask,t)&&(this.mask=t,this.clearMask(),!a(t,{0:!0}))){var n=new Wi,i=new sr;this.segments=new Pr,this.segments.prepareSegment(0,n,i);for(var o=Object.keys(t),s=0;s<o.length;s++){var l=t[o[s]],u=Kr>>l.z,c=new r(l.x*u,l.y*u),p=new r(c.x+u,c.y+u),h=this.segments.prepareSegment(4,n,i);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(p.x,c.y,p.x,c.y),n.emplaceBack(c.x,p.y,c.x,p.y),n.emplaceBack(p.x,p.y,p.x,p.y);var f=h.vertexLength;i.emplaceBack(f,f+1,f+2),i.emplaceBack(f+1,f+2,f+3),h.vertexLength+=4,h.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(n,gl.members),this.maskedIndexBuffer=e.createIndexBuffer(i)}},Pl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Pl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Pl.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var n=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,n,i,r){var o=i||r;return e[n]=!o||o.toLowerCase(),""}),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e}(t.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),r=!1;if(this.expirationTime>i)r=!1;else if(e)if(this.expirationTime<e)r=!0;else{var o=this.expirationTime-e;o?this.expirationTime=i+Math.max(o,3e4):r=!0}else r=!0;r?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Pl.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)},Pl.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var n=this.latestFeatureIndex.loadVTLayers();for(var i in this.buckets){var r=this.buckets[i],o=r.layers[0].sourceLayer||"_geojsonTileLayer",a=n[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(i).queryRadius(r))))}}},Pl.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},Pl.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<L.now()},Pl.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Pl.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=L.now()+t};var Cl={horizontal:1,vertical:2,horizontalOnly:3},kl=function(){this.text="",this.sectionIndex=[],this.sections=[]};kl.fromFeature=function(t,e){for(var n=new kl,i=0;i<t.sections.length;i++){var r=t.sections[i];n.sections.push({scale:r.scale||1,fontStack:r.fontStack||e}),n.text+=r.text;for(var o=0;o<r.text.length;o++)n.sectionIndex.push(i)}return n},kl.prototype.length=function(){return this.text.length},kl.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},kl.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},kl.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",n=0;n<t.length;n++){var i=t.charCodeAt(n+1)||null,r=t.charCodeAt(n-1)||null;i&&yi(i)&&!os[t[n+1]]||r&&yi(r)&&!os[t[n-1]]||!os[t[n]]?e+=t[n]:e+=os[t[n]]}return e}(this.text)},kl.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&Al[this.text.charCodeAt(e)];e++)t++;for(var n=this.text.length,i=this.text.length-1;i>=0&&i>=t&&Al[this.text.charCodeAt(i)];i--)n--;this.text=this.text.substring(t,n),this.sectionIndex=this.sectionIndex.slice(t,n)},kl.prototype.substring=function(t,e){var n=new kl;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n},kl.prototype.toString=function(){return this.text},kl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,n){return Math.max(e,t.sections[n].scale)},0)};var Al={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},zl={};function Ll(t,e,n,i){var r=Math.pow(t-e,2);return i?t<e?r/2:2*r:r+Math.abs(n)*n}function Ml(t,e){var n=0;return 10===t&&(n-=1e4),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function Il(t,e,n,i,r,o){for(var a=null,s=Ll(e,n,r,o),l=0,u=i;l<u.length;l+=1){var c=u[l],p=Ll(e-c.x,n,r,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function Ol(t,e,n,i){if(!n)return[];if(!t)return[];for(var r,o=[],a=function(t,e,n,i){for(var r=0,o=0;o<t.length();o++){var a=t.getSection(o),s=i[a.fontStack],l=s&&s[t.getCharCode(o)];l&&(r+=l.metrics.advance*a.scale+e)}return r/Math.max(1,Math.ceil(r/n))}(t,e,n,i),s=0,l=0;l<t.length();l++){var u=t.getSection(l),c=t.getCharCode(l),p=i[u.fontStack],h=p&&p[c];h&&!Al[c]&&(s+=h.metrics.advance*u.scale+e),l<t.length()-1&&(zl[c]||!((r=c)<11904)&&(hi["Bopomofo Extended"](r)||hi.Bopomofo(r)||hi["CJK Compatibility Forms"](r)||hi["CJK Compatibility Ideographs"](r)||hi["CJK Compatibility"](r)||hi["CJK Radicals Supplement"](r)||hi["CJK Strokes"](r)||hi["CJK Symbols and Punctuation"](r)||hi["CJK Unified Ideographs Extension A"](r)||hi["CJK Unified Ideographs"](r)||hi["Enclosed CJK Letters and Months"](r)||hi["Halfwidth and Fullwidth Forms"](r)||hi.Hiragana(r)||hi["Ideographic Description Characters"](r)||hi["Kangxi Radicals"](r)||hi["Katakana Phonetic Extensions"](r)||hi.Katakana(r)||hi["Vertical Forms"](r)||hi["Yi Radicals"](r)||hi["Yi Syllables"](r)))&&o.push(Il(l+1,s,a,o,Ml(c,t.getCharCode(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Il(t.length(),s,a,o,0,!0))}function Dl(t){var e=.5,n=.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":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function Rl(t,e,n,i,r){if(r){var o=t[i],a=e[o.fontStack],s=a&&a[o.glyph];if(s)for(var l=s.metrics.advance*o.scale,u=(t[i].x+l)*r,c=n;c<=i;c++)t[c].x-=u}}zl[10]=!0,zl[32]=!0,zl[38]=!0,zl[40]=!0,zl[41]=!0,zl[43]=!0,zl[45]=!0,zl[47]=!0,zl[173]=!0,zl[183]=!0,zl[8203]=!0,zl[8208]=!0,zl[8211]=!0,zl[8231]=!0,t.createCommonjsModule=e,t.window=self,t.Point=r,t.browser=L,t.getJSON=function(t,e){return st(p(t,{type:"json"}),e)},t.normalizeSpriteURL=function(t,e,n,i){var r=W(t);return N(t)?(r.path="/styles/v1"+r.path+"/sprite"+e+n,F(r,i)):(r.path+=""+e+n,H(r))},t.ResourceType=et,t.getImage=ct,t.RGBAImage=Ao,t.ImagePosition=Ss,t.Texture=Ms,t.potpack=Ts,t.normalizeGlyphsURL=function(t,e){if(!N(t))return t;var n=W(t);return n.path="/fonts/v1"+n.path,F(n,e)},t.getArrayBuffer=lt,t.parseGlyphPBF=function(t){return new Ds(t).readFields(Qs,[])},t.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);var i=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==--i&&n(o,r)})})},t.isChar=hi,t.AlphaImage=ko,t.Properties=Fi,t.DataConstantProperty=Ii,t.styleSpec=yt,t.validateLight=$n,t.endsWith=_,t.emitValidationErrors=ei,t.validateStyle=Jn,t.extend=p,t.Evented=mt,t.sphericalToCartesian=function(t){var e=t[0],n=t[1],i=t[2];return n+=90,n*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(n)*Math.sin(i),y:e*Math.sin(n)*Math.sin(i),z:e*Math.cos(i)}},t.number=ue,t.Transitionable=Ci,t.warnOnce=w,t.uniqueId=f,t.Actor=il,t.normalizeSourceURL=function(t,e){if(!N(t))return t;var n=W(t);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),F(n,e)},t.pick=function(t,e){for(var n={},i=0;i<e.length;i++){var r=e[i];r in t&&(n[r]=t[r])}return n},t.canonicalizeTileset=function(t,e){if(!N(e))return t.tiles||[];for(var n=[],i=0,r=t.tiles;i<r.length;i+=1){var o=r[i],a=q(o);n.push(a)}return n},t.LngLatBounds=ol,t.mercatorXfromLng=ll,t.mercatorYfromLat=ul,t.Event=ft,t.ErrorEvent=dt,t.postTurnstileEvent=$,t.postMapLoadEvent=tt,t.normalizeTileURL=function(t,e,n){if(!e||!N(e))return t;var i=W(t),r=L.devicePixelRatio>=2||512===n?"@2x":"",o=I.supported?".webp":"$1";return i.path=i.path.replace(V,""+r+o),i.path="/v4"+i.path,F(i)},t.OverscaledTileID=ml,t.EXTENT=Kr,t.MercatorCoordinate=hl,t.CanonicalTileID=fl,t.StructArrayLayout4i8=Wi,t.rasterBoundsAttributes=gl,t.SegmentVector=Pr,t.getVideo=function(t,e){var n,i,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");n=t[o],i=void 0,(i=self.document.createElement("a")).href=n,(i.protocol!==self.document.location.protocol||i.host!==self.document.location.host)&&(r.crossOrigin="Anonymous"),a.src=t[o],r.appendChild(a)}return{cancel:function(){}}},t.ValidationError=_t,t.bindAll=y,t.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],_=e[14],g=e[15],v=n[0],x=n[1],b=n[2],w=n[3];return t[0]=v*i+x*s+b*p+w*m,t[1]=v*r+x*l+b*h+w*y,t[2]=v*o+x*u+b*f+w*_,t[3]=v*a+x*c+b*d+w*g,v=n[4],x=n[5],b=n[6],w=n[7],t[4]=v*i+x*s+b*p+w*m,t[5]=v*r+x*l+b*h+w*y,t[6]=v*o+x*u+b*f+w*_,t[7]=v*a+x*c+b*d+w*g,v=n[8],x=n[9],b=n[10],w=n[11],t[8]=v*i+x*s+b*p+w*m,t[9]=v*r+x*l+b*h+w*y,t[10]=v*o+x*u+b*f+w*_,t[11]=v*a+x*c+b*d+w*g,v=n[12],x=n[13],b=n[14],w=n[15],t[12]=v*i+x*s+b*p+w*m,t[13]=v*r+x*l+b*h+w*y,t[14]=v*o+x*u+b*f+w*_,t[15]=v*a+x*c+b*d+w*g,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.translate=function(t,e,n){var i,r,o,a,s,l,u,c,p,h,f,d,m=n[0],y=n[1],_=n[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*_+e[12],t[13]=e[1]*m+e[5]*y+e[9]*_+e[13],t[14]=e[2]*m+e[6]*y+e[10]*_+e[14],t[15]=e[3]*m+e[7]*y+e[11]*_+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*y+p*_+e[12],t[13]=r*m+l*y+h*_+e[13],t[14]=o*m+u*y+f*_+e[14],t[15]=a*m+c*y+d*_+e[15]),t},t.scale=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,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.Color=Ft,t.isEqual=a,t.keysDifference=function(t,e){var n=[];for(var i in t)i in e||n.push(i);return n},t.Tile=Pl,t.SourceFeatureState=wl,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.rotateZ=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r+u*i,t[1]=a*r+c*i,t[2]=s*r+p*i,t[3]=l*r+h*i,t[4]=u*r-o*i,t[5]=c*r-a*i,t[6]=p*r-s*i,t[7]=h*r-l*i,t},t.evaluateSizeForZoom=function(t,e,n){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,r=t.zoomRange,o=t.sizeRange,a=u(bn(i,n.specification).interpolationFactor(e,r.min,r.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:u(bn(s,n.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},t.WritingMode=Cl,t.transformMat4=xo,t.evaluateSizeForFeature=function(t,e,n){var i=e;return"source"===t.functionType?n.lowerSize/256:"composite"===t.functionType?ue(n.lowerSize/256,n.upperSize/256,i.uSizeT):i.uSize},t.addDynamicAttributes=ps,t.properties=ys,t.polygonIntersectsPolygon=to,t.isMapboxURL=N,t.normalizeStyleURL=function(t,e){if(!N(t))return t;var n=W(t);return n.path="/styles/v1"+n.path,F(n,e)},t.createStyleLayer=function(t){return"custom"===t.type?new ws(t):new Es[t.type](t)},t.clone=x,t.validateCustomStyleLayer=function(t){var e=[],n=t.id;return void 0===n&&e.push({message:"layers."+n+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+n+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+n+': property "renderingMode" must be either "2d" or "3d"'}),e},t.filterObject=v,t.mapObject=g,t.evented=wi,t.makeRequest=st,t.registerForPluginAvailability=function(t){return xi?t({pluginURL:xi,completionCallback:gi}):wi.once("pluginAvailable",t),t},t.ZoomHistory=pi,t.getReferrer=at,t.createLayout=Zi,t.UniformMatrix4f=Fr,t.Uniform3f=Or,t.Uniform1f=Mr,t.Uniform1i=Lr,t.Uniform2f=Ir,t.Uniform4f=Dr,t.create=_o,t.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},t.create$1=function(){var t=new yo(16);return yo!=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.ortho=function(t,e,n,i,r,o,a){var s=1/(e-n),l=1/(i-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+n)*s,t[13]=(r+i)*l,t[14]=(a+o)*u,t[15]=1,t},t.UniformColor=Rr,t.clamp=u,t.StructArrayLayout2i4=Gi,t.StructArrayLayout2ui4=lr,t.ProgramConfiguration=Gr,t.StructArrayLayout1ui2=ur,t.StructArrayLayout3ui6=sr,t.wrap=c,t.create$2=function(){var t=new yo(4);return yo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+o*s,t[1]=r*l+a*s,t[2]=i*-s+o*l,t[3]=r*-s+a*l,t},t.LngLat=al,t.UnwrappedTileID=dl,t.perspective=function(t,e,n,i,r){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(o=1/(i-r),t[10]=(r+i)*o,t[14]=2*r*i*o):(t[10]=-1,t[14]=-2*i),t},t.rotateX=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*r+u*i,t[5]=a*r+c*i,t[6]=s*r+p*i,t[7]=l*r+h*i,t[8]=u*r-o*i,t[9]=c*r-a*i,t[10]=p*r-s*i,t[11]=h*r-l*i,t},t.mercatorZfromAltitude=cl,t.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],_=e[15],g=n*s-i*a,v=n*l-r*a,x=n*u-o*a,b=i*l-r*s,w=i*u-o*s,E=r*u-o*l,T=c*m-p*d,S=c*y-h*d,P=c*_-f*d,C=p*y-h*m,k=p*_-f*m,A=h*_-f*y,z=g*A-v*k+x*C+b*P-w*S+E*T;return z?(z=1/z,t[0]=(s*A-l*k+u*C)*z,t[1]=(r*k-i*A-o*C)*z,t[2]=(m*E-y*w+_*b)*z,t[3]=(h*w-p*E-f*b)*z,t[4]=(l*P-a*A-u*S)*z,t[5]=(n*A-r*P+o*S)*z,t[6]=(y*x-d*E-_*v)*z,t[7]=(c*E-h*x+f*v)*z,t[8]=(a*k-s*P+u*T)*z,t[9]=(i*P-n*k-o*T)*z,t[10]=(d*w-m*x+_*g)*z,t[11]=(p*x-c*w-f*g)*z,t[12]=(s*S-a*C-l*T)*z,t[13]=(n*C-i*S+r*T)*z,t[14]=(m*v-d*b-y*g)*z,t[15]=(c*b-p*v+h*g)*z,t):null},t.ease=l,t.bezier=s,t.config=M,t.webpSupported=I,t.EvaluationParameters=Ti,t.version="0.53.0",t.setRTLTextPlugin=function(t,e){if(vi)throw new Error("setRTLTextPlugin cannot be called multiple times.");vi=!0,xi=L.resolveURL(t),gi=function(t){t?(vi=!1,xi=null,e&&e(t)):bi=!0},wi.fire(new ft("pluginAvailable",{pluginURL:xi,completionCallback:gi}))},t.featureFilter=zn,t.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},t.Anchor=as,t.GLYPH_PBF_BORDER=nl,t.distToSegmentSquared=so,t.allowsLetterSpacing=function(t){for(var e=0,n=t;e<n.length;e+=1)if(!di(n[e].charCodeAt(0)))return!1;return!0},t.shapeText=function(t,e,n,i,r,o,a,s,l,u,c){var p=kl.fromFeature(t,n);c===Cl.vertical&&p.verticalizePunctuation();var h,f=[],d={positionedGlyphs:f,text:p,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:c},m=Ei.processBidirectionalText,y=Ei.processStyledBidirectionalText;if(m&&1===p.sections.length){h=[];for(var _=0,g=m(p.toString(),Ol(p,s,i,e));_<g.length;_+=1){var v=g[_],x=new kl;x.text=v,x.sections=p.sections;for(var b=0;b<v.length;b++)x.sectionIndex.push(0);h.push(x)}}else if(y){h=[];for(var w=0,E=y(p.text,p.sectionIndex,Ol(p,s,i,e));w<E.length;w+=1){var T=E[w],S=new kl;S.text=T[0],S.sectionIndex=T[1],S.sections=p.sections,h.push(S)}}else h=function(t,e){for(var n=[],i=t.text,r=0,o=0,a=e;o<a.length;o+=1){var s=a[o];n.push(t.substring(r,s)),r=s}return r<i.length&&n.push(t.substring(r,i.length)),n}(p,Ol(p,s,i,e));return function(t,e,n,i,r,o,a,s,l){for(var u=0,c=-17,p=0,h=t.positionedGlyphs,f="right"===o?1:"left"===o?0:.5,d=0,m=n;d<m.length;d+=1){var y=m[d];y.trim();var _=y.getMaxScale();if(y.length()){for(var g=h.length,v=0;v<y.length();v++){var x=y.getSection(v),b=y.getCharCode(v),w=24*(_-x.scale),E=e[x.fontStack],T=E&&E[b];T&&(mi(b)&&a!==Cl.horizontal?(h.push({glyph:b,x:u,y:w,vertical:!0,scale:x.scale,fontStack:x.fontStack}),u+=l*x.scale+s):(h.push({glyph:b,x:u,y:c+w,vertical:!1,scale:x.scale,fontStack:x.fontStack}),u+=T.metrics.advance*x.scale+s))}if(h.length!==g){var S=u-s;p=Math.max(S,p),Rl(h,e,g,h.length-1,f)}u=0,c+=i*_}else c+=i}var P=Dl(r),C=P.horizontalAlign,k=P.verticalAlign;!function(t,e,n,i,r,o,a){for(var s=(e-n)*r,l=(-i*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}(h,f,C,k,p,i,n.length);var A=c- -17;t.top+=-k*A,t.bottom=t.top+A,t.left+=-C*p,t.right=t.left+p}(d,e,h,r,o,a,c,s,u),!!f.length&&(d.text=d.text.toString(),d)},t.allowsVerticalWritingMode=fi,t.shapeIcon=function(t,e,n){var i=Dl(n),r=i.horizontalAlign,o=i.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.classifyRings=pa,t.SIZE_PACK_FACTOR=256,t.SymbolBucket=ds,t.register=si,t.CollisionBoxArray=fr,t.DictionaryCoder=vl,t.FeatureIndex=El,t.ImageAtlas=Cs,t.LineBucket=Wa,t.FillBucket=ma,t.FillExtrusionBucket=wa,t.mvt=Na,t.Protobuf=Ds,t.DEMData=_l,t.vectorTile=Na,t.Point$1=r,t.pbf=Ds,t.createExpression=yn,t.plugin=Ei}),i(0,function(t){function e(t){var n=typeof t;if("number"===n||"boolean"===n||"string"===n||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var i="[",r=0,o=t;r<o.length;r+=1)i+=e(o[r])+",";return i+"]"}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 n(n){for(var i="",r=0,o=t.refProperties;r<o.length;r+=1)i+="/"+e(n[o[r]]);return i}var i=function(t){t&&this.replace(t)};function r(t,e,n,i,r){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-n/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<n/2;){var c=t[a-1],p=t[a],h=t[a+1];if(!h)return!1;var f=c.angleTo(p)-p.angleTo(h);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>i;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=p.dist(h)}return!0}function o(t){for(var e=0,n=0;n<t.length-1;n++)e+=t[n].dist(t[n+1]);return e}function a(t,e,n){return t?.6*e*n:0}function s(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function l(e,n,i,l,u,c){for(var p=a(i,u,c),h=s(i,l)*c,f=0,d=o(e)/2,m=0;m<e.length-1;m++){var y=e[m],_=e[m+1],g=y.dist(_);if(f+g>d){var v=(d-f)/g,x=t.number(y.x,_.x,v),b=t.number(y.y,_.y,v),w=new t.Anchor(x,b,_.angleTo(y),m);return w._round(),!p||r(e,w,h,p,n)?w:void 0}f+=g}}function u(e,n,i,l,u,c,p,h,f){var d=a(l,c,p),m=s(l,u),y=m*p,_=0===e[0].x||e[0].x===f||0===e[0].y||e[0].y===f;return n-y<n/4&&(n=y+n/4),function e(n,i,a,s,l,u,c,p,h){for(var f=u/2,d=o(n),m=0,y=i-a,_=[],g=0;g<n.length-1;g++){for(var v=n[g],x=n[g+1],b=v.dist(x),w=x.angleTo(v);y+a<m+b;){var E=((y+=a)-m)/b,T=t.number(v.x,x.x,E),S=t.number(v.y,x.y,E);if(T>=0&&T<h&&S>=0&&S<h&&y-f>=0&&y+f<=d){var P=new t.Anchor(T,S,w,g);P._round(),s&&!r(n,P,u,s,l)||_.push(P)}}m+=b}return p||_.length||c||(_=e(n,m/2,a,s,l,u,c,!0,h)),_}(e,_?n/2*h%n:(m/2+2*c)*p*h%n,n,d,i,y,_,!1,f)}i.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},i.prototype.update=function(e,i){for(var r=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter)}for(var u=0,c=i;u<c.length;u+=1){var p=c[u];delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,f=function(t){for(var e={},i=0;i<t.length;i++){var r=n(t[i]),o=e[r];o||(o=e[r]=[]),o.push(t[i])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));h<f.length;h+=1){var d=f[h].map(function(t){return r._layers[t.id]}),m=d[0];if("none"!==m.visibility){var y=m.source||"",_=this.familiesBySource[y];_||(_=this.familiesBySource[y]={});var g=m.sourceLayer||"_geojsonTileLayer",v=_[g];v||(v=_[g]=[]),v.push(d)}}};var c=function(e,n,i,r,o,a,s,l,u,c,p,h){var f=s.top*l-u,d=s.bottom*l+u,m=s.left*l-u,y=s.right*l+u;if(this.boxStartIndex=e.length,c){var _=d-f,g=y-m;_>0&&(_=Math.max(10*l,_),this._addLineCollisionCircles(e,n,i,i.segment,g,_,r,o,a,p))}else{if(h){var v=new t.Point(m,f),x=new t.Point(y,f),b=new t.Point(m,d),w=new t.Point(y,d),E=h*Math.PI/180;v._rotate(E),x._rotate(E),b._rotate(E),w._rotate(E),m=Math.min(v.x,x.x,b.x,w.x),y=Math.max(v.x,x.x,b.x,w.x),f=Math.min(v.y,x.y,b.y,w.y),d=Math.max(v.y,x.y,b.y,w.y)}e.emplaceBack(i.x,i.y,m,f,y,d,r,o,a,0,0)}this.boxEndIndex=e.length};c.prototype._addLineCollisionCircles=function(t,e,n,i,r,o,a,s,l,u){var c=o/2,p=Math.floor(r/c)||1,h=1+.4*Math.log(u)/Math.LN2,f=Math.floor(p*h/2),d=-o/2,m=n,y=i+1,_=d,g=-r/2,v=g-r/4;do{if(--y<0){if(_>g)return;y=0;break}_-=e[y].dist(m),m=e[y]}while(_>v);for(var x=e[y].dist(e[y+1]),b=-f;b<p+f;b++){var w=b*c,E=g+w;if(w<0&&(E+=w),w>r&&(E+=w-r),!(E<_)){for(;_+x<E;){if(_+=x,++y+1>=e.length)return;x=e[y].dist(e[y+1])}var T=E-_,S=e[y],P=e[y+1].sub(S)._unit()._mult(T)._add(S)._round(),C=Math.abs(E-d)<c?0:.8*(E-d);t.emplaceBack(P.x,P.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,C)}}};var p=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=h),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function h(t,e){return t<e?-1:t>e?1:0}function f(e,n,i){void 0===n&&(n=1),void 0===i&&(i=!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,f=s-o,y=Math.min(h,f),_=y/2,g=new p([],d);if(0===y)return new t.Point(r,o);for(var v=r;v<a;v+=y)for(var x=o;x<s;x+=y)g.push(new m(v+_,x+_,_,e));for(var b=function(t){for(var e=0,n=0,i=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;n+=(l.x+u.x)*c,i+=(l.y+u.y)*c,e+=3*c}return new m(n/e,i/e,0,t)}(e),w=g.length;g.length;){var E=g.pop();(E.d>b.d||!b.d)&&(b=E,i&&console.log("found best %d after %d probes",Math.round(1e4*E.d)/1e4,w)),E.max-b.d<=n||(_=E.h/2,g.push(new m(E.p.x-_,E.p.y-_,_,e)),g.push(new m(E.p.x+_,E.p.y-_,_,e)),g.push(new m(E.p.x-_,E.p.y+_,_,e)),g.push(new m(E.p.x+_,E.p.y+_,_,e)),w+=4)}return i&&(console.log("num probes: "+w),console.log("best distance: "+b.d)),b.p}function d(t,e){return e.max-t.max}function m(e,n,i,r){this.p=new t.Point(e,n),this.h=i,this.d=function(e,n){for(var i=!1,r=1/0,o=0;o<n.length;o++)for(var a=n[o],s=0,l=a.length,u=l-1;s<l;u=s++){var c=a[s],p=a[u];c.y>e.y!=p.y>e.y&&e.x<(p.x-c.x)*(e.y-c.y)/(p.y-c.y)+c.x&&(i=!i),r=Math.min(r,t.distToSegmentSquared(e,c,p))}return(i?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}p.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},p.prototype.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}},p.prototype.peek=function(){return this.data[0]},p.prototype._up=function(t){for(var e=this.data,n=this.compare,i=e[t];t>0;){var r=t-1>>1,o=e[r];if(n(i,o)>=0)break;e[t]=o,t=r}e[t]=i},p.prototype._down=function(t){for(var e=this.data,n=this.compare,i=this.length>>1,r=e[t];t<i;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&n(e[s],a)<0&&(o=s,a=e[s]),n(a,r)>=0)break;e[t]=a,t=o}e[t]=r};var y=t.createCommonjsModule(function(t){t.exports=function(t,e){var n,i,r,o,a,s,l,u;for(n=3&t.length,i=t.length-n,r=e,a=3432918353,s=461845907,u=0;u<i;)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,n){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}}),_=t.createCommonjsModule(function(t){t.exports=function(t,e){for(var n,i=t.length,r=e^i,o=0;i>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),i-=4,++o;switch(i){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}}),g=y,v=y,x=_;function b(e,n,i,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 p=e.textSizeData.zoomRange,h=p.min,f=p.max;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new t.EvaluationParameters(h)),u["text-size"].possiblyEvaluate(new t.EvaluationParameters(f))]}if("composite"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,m=d.min,y=d.max;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(m)),u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(y))]}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 _=24*l.get("text-line-height"),g="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),v=l.get("text-keep-upright"),x=0,b=e.features;x<b.length;x+=1){var E=b[x],T=l.get("text-font").evaluate(E,{}).join(","),S=i,P={},C=E.text;if(C){var k=C.toString(),A=l.get("text-offset").evaluate(E,{}).map(function(t){return 24*t}),z=24*l.get("text-letter-spacing").evaluate(E,{}),L=t.allowsLetterSpacing(k)?z:0,M=l.get("text-anchor").evaluate(E,{}),I=l.get("text-justify").evaluate(E,{}),O="point"===l.get("symbol-placement")?24*l.get("text-max-width").evaluate(E,{}):0;P.horizontal=t.shapeText(C,n,T,O,_,M,I,L,A,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(k)&&g&&v&&(P.vertical=t.shapeText(C,n,T,O,_,M,I,L,A,24,t.WritingMode.vertical))}var D=void 0;if(E.icon){var R=r[E.icon];R&&(D=t.shapeIcon(o[E.icon],l.get("icon-offset").evaluate(E,{}),l.get("icon-anchor").evaluate(E,{})),void 0===e.sdfIcons?e.sdfIcons=R.sdf:e.sdfIcons!==R.sdf&&t.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),R.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(P.horizontal||D)&&w(e,E,P,D,S,c)}a&&e.generateCollisionDebugBuffers()}function w(e,n,i,r,o,a){var s=a.layoutTextSize.evaluate(n,{}),p=a.layoutIconSize.evaluate(n,{}),h=a.textMaxSize.evaluate(n,{});void 0===h&&(h=s);var d=e.layers[0].layout,m=d.get("text-offset").evaluate(n,{}),y=d.get("icon-offset").evaluate(n,{}),_=s/24,v=e.tilePixelRatio*_,x=e.tilePixelRatio*h/24,b=e.tilePixelRatio*p,w=e.tilePixelRatio*d.get("symbol-spacing"),P=d.get("text-padding")*e.tilePixelRatio,C=d.get("icon-padding")*e.tilePixelRatio,k=d.get("text-max-angle")/180*Math.PI,A="map"===d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),z="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),L=d.get("symbol-placement"),M=w/2,I=function(s,l){l.x<0||l.x>=t.EXTENT||l.y<0||l.y>=t.EXTENT||function(e,n,i,r,o,a,s,l,u,p,h,f,d,m,y,_,v,x,b,w,S){var P,C,k=e.addToLineVertexArray(n,i),A=0,z=0,L=0,M=g(r.horizontal?r.horizontal.text:""),I=[];if(r.horizontal){var O=a.layout.get("text-rotate").evaluate(b,{});P=new c(s,i,n,l,u,p,r.horizontal,h,f,d,e.overscaling,O),z+=T(e,n,r.horizontal,a,d,b,m,k,r.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,I,w,S),r.vertical&&(L+=T(e,n,r.vertical,a,d,b,m,k,t.WritingMode.vertical,I,w,S))}var D=P?P.boxStartIndex:e.collisionBoxArray.length,R=P?P.boxEndIndex:e.collisionBoxArray.length;if(o){var B=function(e,n,i,r,o,a){var s,l,u,c,p=n.image,h=i.layout,f=n.top-1/p.pixelRatio,d=n.left-1/p.pixelRatio,m=n.bottom+1/p.pixelRatio,y=n.right+1/p.pixelRatio;if("none"!==h.get("icon-text-fit")&&o){var _=y-d,g=m-f,v=h.get("text-size").evaluate(a,{})/24,x=o.left*v,b=o.right*v,w=o.top*v,E=b-x,T=o.bottom*v-w,S=h.get("icon-text-fit-padding")[0],P=h.get("icon-text-fit-padding")[1],C=h.get("icon-text-fit-padding")[2],k=h.get("icon-text-fit-padding")[3],A="width"===h.get("icon-text-fit")?.5*(T-g):0,z="height"===h.get("icon-text-fit")?.5*(E-_):0,L="width"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?E:_,M="height"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?T:g;s=new t.Point(x+z-k,w+A-S),l=new t.Point(x+z+P+L,w+A-S),u=new t.Point(x+z+P+L,w+A+C+M),c=new t.Point(x+z-k,w+A+C+M)}else s=new t.Point(d,f),l=new t.Point(y,f),u=new t.Point(y,m),c=new t.Point(d,m);var I=i.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(I){var O=Math.sin(I),D=Math.cos(I),R=[D,-O,O,D];s._matMult(R),l._matMult(R),c._matMult(R),u._matMult(R)}return[{tl:s,tr:l,bl:c,br:u,tex:p.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,r.horizontal,b),F=a.layout.get("icon-rotate").evaluate(b,{});C=new c(s,i,n,l,u,p,o,y,_,!1,e.overscaling,F),A=4*B.length;var N=e.iconSizeData,U=null;"source"===N.functionType?(U=[t.SIZE_PACK_FACTOR*a.layout.get("icon-size").evaluate(b,{})])[0]>E&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===N.functionType&&((U=[t.SIZE_PACK_FACTOR*S.compositeIconSizes[0].evaluate(b,{}),t.SIZE_PACK_FACTOR*S.compositeIconSizes[1].evaluate(b,{})])[0]>E||U[1]>E)&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,B,U,x,v,b,!1,n,k.lineStartIndex,k.lineLength)}var j=C?C.boxStartIndex:e.collisionBoxArray.length,V=C?C.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(n.x,n.y,I.length>0?I[0]:-1,I.length>1?I[1]:-1,M,D,R,j,V,l,z,L,A,0)}(e,l,s,i,r,e.layers[0],e.collisionBoxArray,n.index,n.sourceLayerIndex,e.index,v,P,A,m,b,C,z,y,n,o,a)};if("line"===L)for(var O=0,D=function(e,n,i,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 p=l[c],h=l[c+1];p.x<0&&h.x<0||(p.x<0?p=new t.Point(0,p.y+(h.y-p.y)*((0-p.x)/(h.x-p.x)))._round():h.x<0&&(h=new t.Point(0,p.y+(h.y-p.y)*((0-p.x)/(h.x-p.x)))._round()),p.y<0&&h.y<0||(p.y<0?p=new t.Point(p.x+(h.x-p.x)*((0-p.y)/(h.y-p.y)),0)._round():h.y<0&&(h=new t.Point(p.x+(h.x-p.x)*((0-p.y)/(h.y-p.y)),0)._round()),p.x>=r&&h.x>=r||(p.x>=r?p=new t.Point(r,p.y+(h.y-p.y)*((r-p.x)/(h.x-p.x)))._round():h.x>=r&&(h=new t.Point(r,p.y+(h.y-p.y)*((r-p.x)/(h.x-p.x)))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new t.Point(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round():h.y>=o&&(h=new t.Point(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round()),u&&p.equals(u[u.length-1])||(u=[p],a.push(u)),u.push(h)))))}return a}(n.geometry,0,0,t.EXTENT,t.EXTENT);O<D.length;O+=1)for(var R=D[O],B=0,F=u(R,w,k,i.vertical||i.horizontal,r,24,x,e.overscaling,t.EXTENT);B<F.length;B+=1){var N=F[B],U=i.horizontal;U&&S(e,U.text,M,N)||I(R,N)}else if("line-center"===L)for(var j=0,V=n.geometry;j<V.length;j+=1){var Z=V[j];if(Z.length>1){var q=l(Z,k,i.vertical||i.horizontal,r,24,x);q&&I(Z,q)}}else if("Polygon"===n.type)for(var G=0,W=t.classifyRings(n.geometry,0);G<W.length;G+=1){var H=W[G],X=f(H,16);I(H[0],new t.Anchor(X.x,X.y,0))}else if("LineString"===n.type)for(var K=0,Y=n.geometry;K<Y.length;K+=1){var J=Y[K];I(J,new t.Anchor(J[0].x,J[0].y,0))}else if("Point"===n.type)for(var $=0,Q=n.geometry;$<Q.length;$+=1)for(var tt=0,et=Q[$];tt<et.length;tt+=1){var nt=et[tt];I([nt],new t.Anchor(nt.x,nt.y,0))}}g.murmur3=v,g.murmur2=x;var E=65535;function T(e,n,i,r,o,a,s,l,u,c,p,h){var f=function(e,n,i,r,o,a){for(var s=i.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,l=i.layout.get("text-offset").evaluate(o,{}).map(function(t){return 24*t}),u=n.positionedGlyphs,c=[],p=0;p<u.length;p++){var h=u[p],f=a[h.fontStack],d=f&&f[h.glyph];if(d){var m=d.rect;if(m){var y=t.GLYPH_PBF_BORDER+1,_=d.metrics.advance*h.scale/2,g=r?[h.x+_,h.y]:[0,0],v=r?[0,0]:[h.x+_+l[0],h.y+l[1]],x=(d.metrics.left-y)*h.scale-_+v[0],b=(-d.metrics.top-y)*h.scale+v[1],w=x+m.w*h.scale,E=b+m.h*h.scale,T=new t.Point(x,b),S=new t.Point(w,b),P=new t.Point(x,E),C=new t.Point(w,E);if(r&&h.vertical){var k=new t.Point(-_,_),A=-Math.PI/2,z=new t.Point(5,0);T._rotateAround(A,k)._add(z),S._rotateAround(A,k)._add(z),P._rotateAround(A,k)._add(z),C._rotateAround(A,k)._add(z)}if(s){var L=Math.sin(s),M=Math.cos(s),I=[M,-L,L,M];T._matMult(I),S._matMult(I),P._matMult(I),C._matMult(I)}c.push({tl:T,tr:S,bl:P,br:C,tex:m,writingMode:n.writingMode,glyphOffset:g})}}}return c}(0,i,r,o,a,p),d=e.textSizeData,m=null;return"source"===d.functionType?(m=[t.SIZE_PACK_FACTOR*r.layout.get("text-size").evaluate(a,{})])[0]>E&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===d.functionType&&((m=[t.SIZE_PACK_FACTOR*h.compositeTextSizes[0].evaluate(a,{}),t.SIZE_PACK_FACTOR*h.compositeTextSizes[1].evaluate(a,{})])[0]>E||m[1]>E)&&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,n,l.lineStartIndex,l.lineLength),c.push(e.text.placedSymbolArray.length-1),4*f.length}function S(t,e,n,i){var r=t.compareText;if(e in r){for(var o=r[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<n)return!0}else r[e]=[];return r[e].push(i),!1}var P=function(e){var n={},i=[];for(var r in e){var o=e[r],a=n[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};i.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(i),p=c.w,h=c.h,f=new t.AlphaImage({width:p||1,height:h||1});for(var d in e){var m=e[d];for(var y in m){var _=m[+y];if(_&&0!==_.bitmap.width&&0!==_.bitmap.height){var g=n[d][y].rect;t.AlphaImage.copy(_.bitmap,f,{x:0,y:0},{x:g.x+1,y:g.y+1},_.bitmap)}}}this.image=f,this.positions=n};t.register("GlyphAtlas",P);var C=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,this.returnDependencies=!!e.returnDependencies};function k(e,n){for(var i=new t.EvaluationParameters(n),r=0,o=e;r<o.length;r+=1)o[r].recalculate(i)}C.prototype.parse=function(e,n,i,r){var o=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var a=new t.DictionaryCoder(Object.keys(e.layers).sort()),s=new t.FeatureIndex(this.tileID);s.bucketLayerIDs=[];var l,u,c,p,h={},f={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{}},d=n.familiesBySource[this.source];for(var m in d){var y=e.layers[m];if(y){1===y.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+m+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var _=a.encode(m),g=[],v=0;v<y.length;v++){var x=y.feature(v);g.push({feature:x,index:v,sourceLayerIndex:_})}for(var w=0,E=d[m];w<E.length;w+=1){var T=E[w],S=T[0];S.minzoom&&this.zoom<Math.floor(S.minzoom)||S.maxzoom&&this.zoom>=S.maxzoom||"none"!==S.visibility&&(k(T,this.zoom),(h[S.id]=S.createBucket({index:s.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(g,f),s.bucketLayerIDs.push(T.map(function(t){return t.id})))}}}var C=t.mapObject(f.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(C).length?i.send("getGlyphs",{uid:this.uid,stacks:C},function(t,e){l||(l=t,u=e,L.call(o))}):u={};var A=Object.keys(f.iconDependencies);A.length?i.send("getImages",{icons:A},function(t,e){l||(l=t,c=e,L.call(o))}):c={};var z=Object.keys(f.patternDependencies);function L(){if(l)return r(l);if(u&&c&&p){var e=new P(u),n=new t.ImageAtlas(c,p);for(var i in h){var o=h[i];o instanceof t.SymbolBucket?(k(o.layers,this.zoom),b(o,u,e.positions,c,n.iconPositions,this.showCollisionBoxes)):o.hasPattern&&(o instanceof t.LineBucket||o instanceof t.FillBucket||o instanceof t.FillExtrusionBucket)&&(k(o.layers,this.zoom),o.addFeatures(f,n.patternPositions))}this.status="done",r(null,{buckets:t.values(h).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?u:null,iconMap:this.returnDependencies?c:null,glyphPositions:this.returnDependencies?e.positions:null})}}z.length?i.send("getImages",{icons:z},function(t,e){l||(l=t,p=e,L.call(o))}):p={},L.call(this)};var A="undefined"!=typeof performance,z={getEntriesByName:function(t){return!!(A&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(A&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,n){return!!(A&&performance&&performance.measure)&&performance.measure(t,e,n)},clearMarks:function(t){return!!(A&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(A&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},L=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},z.mark(this._marks.start)};function M(e,n){var i=t.getArrayBuffer(e.request,function(e,i,r,o){e?n(e):i&&n(null,{vectorTile:new t.mvt.VectorTile(new t.Protobuf(i)),rawData:i,cacheControl:r,expires:o})});return function(){i.cancel(),n()}}L.prototype.finish=function(){z.mark(this._marks.end);var t=z.getEntriesByName(this._marks.measure);return 0===t.length&&(z.measure(this._marks.measure,this._marks.start,this._marks.end),t=z.getEntriesByName(this._marks.measure),z.clearMarks(this._marks.start),z.clearMarks(this._marks.end),z.clearMeasures(this._marks.measure)),t},z.Performance=L;var I=function(t,e,n){this.actor=t,this.layerIndex=e,this.loadVectorData=n||M,this.loading={},this.loaded={}};I.prototype.loadTile=function(e,n){var i=this,r=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new z.Performance(e.request),a=this.loading[r]=new C(e);a.abort=this.loadVectorData(e,function(e,s){if(delete i.loading[r],e||!s)return a.status="done",i.loaded[r]=a,n(e);var l=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl);var c={};if(o){var p=o.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,i.layerIndex,i.actor,function(e,i){if(e||!i)return n(e);n(null,t.extend({rawTileData:l.slice(0)},i,u,c))}),i.loaded=i.loaded||{},i.loaded[r]=a})},I.prototype.reloadTile=function(t,e){var n=this.loaded,i=t.uid,r=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,r.layerIndex,r.actor,i)),e(t,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.actor,a):a())}},I.prototype.abortTile=function(t,e){var n=this.loading,i=t.uid;n&&n[i]&&n[i].abort&&(n[i].abort(),delete n[i]),e()},I.prototype.removeTile=function(t,e){var n=this.loaded,i=t.uid;n&&n[i]&&delete n[i],e()};var O=function(){this.loaded={}};O.prototype.loadTile=function(e,n){var i=e.uid,r=e.encoding,o=e.rawImageData,a=new t.DEMData(i,o,r);this.loaded=this.loaded||{},this.loaded[i]=a,n(null,a)},O.prototype.removeTile=function(t){var e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]};var D={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function R(t){var e=0;if(t&&t.length>0){e+=Math.abs(B(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(B(t[n]))}return e}function B(t){var e,n,i,r,o,a,s=0,l=t.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,r=l-1,o=0):a===l-1?(i=l-1,r=0,o=1):(i=a,r=a+1,o=a+2),e=t[i],n=t[r],s+=(F(t[o][0])-F(e[0]))*Math.sin(F(n[1]));s=s*D.RADIUS*D.RADIUS/2}return s}function F(t){return t*Math.PI/180}var N={geometry:function t(e){var n,i=0;switch(e.type){case"Polygon":return R(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)i+=R(e.coordinates[n]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)i+=t(e.geometries[n]);return i}},ring:B};function U(t,e){return function(n){return t(n,e)}}function j(t,e){e=!!e,t[0]=V(t[0],e);for(var n=1;n<t.length;n++)t[n]=V(t[n],!e);return t}function V(t,e){return function(t){return N.ring(t)>=0}(t)===e?t:t.reverse()}var Z=t.mvt.VectorTileFeature.prototype.toGeoJSON,q=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))};q.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,i=this._feature.geometry;n<i.length;n+=1){var r=i[n];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 p=c[u];l.push(new t.Point(p[0],p[1]))}o.push(l)}return o},q.prototype.toGeoJSON=function(t,e,n){return Z.call(this,t,e,n)};var G=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};G.prototype.feature=function(t){return new q(this._features[t])};var W=t.vectorTile.VectorTileFeature,H=X;function X(t,e){this.options=e||{},this.features=t,this.length=t.length}function K(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}X.prototype.feature=function(t){return new K(this.features[t],this.options.extent)},K.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var n=0;n<e.length;n++){for(var i=e[n],r=[],o=0;o<i.length;o++)r.push(new t.Point$1(i[o][0],i[o][1]));this.geometry.push(r)}return this.geometry},K.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,n=-1/0,i=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),n=Math.max(n,l.x),i=Math.min(i,l.y),r=Math.max(r,l.y)}return[e,i,n,r]},K.prototype.toGeoJSON=W.prototype.toGeoJSON;var Y=Q,J=Q,$=H;function Q(e){var n=new t.pbf;return function(t,e){for(var n in t.layers)e.writeMessage(3,tt,t.layers[n])}(e,n),n.finish()}function tt(t,e){var n;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<t.length;n++)i.feature=t.feature(n),e.writeMessage(2,et,i);var r=i.keys;for(n=0;n<r.length;n++)e.writeStringField(3,r[n]);var o=i.values;for(n=0;n<o.length;n++)e.writeMessage(4,at,o[n])}function et(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,nt,t),e.writeVarintField(3,n.type),e.writeMessage(4,ot,n)}function nt(t,e){var n=t.feature,i=t.keys,r=t.values,o=t.keycache,a=t.valuecache;for(var s in n.properties){var l=o[s];void 0===l&&(i.push(s),l=i.length-1,o[s]=l),e.writeVarint(l);var u=n.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(r.push(u),h=r.length-1,a[p]=h),e.writeVarint(h)}}function it(t,e){return(e<<3)+(7&t)}function rt(t){return t<<1^t>>31}function ot(t,e){for(var n=t.loadGeometry(),i=t.type,r=0,o=0,a=n.length,s=0;s<a;s++){var l=n[s],u=1;1===i&&(u=l.length),e.writeVarint(it(1,u));for(var c=3===i?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==i&&e.writeVarint(it(2,c-1));var h=l[p].x-r,f=l[p].y-o;e.writeVarint(rt(h)),e.writeVarint(rt(f)),r+=h,o+=f}3===i&&e.writeVarint(it(7,1))}}function at(t,e){var n=typeof t;"string"===n?e.writeStringField(1,t):"boolean"===n?e.writeBooleanField(7,t):"number"===n&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function st(t,e,n,i){lt(t,n,i),lt(e,2*n,2*i),lt(e,2*n+1,2*i+1)}function lt(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function ut(t,e,n,i){var r=t-n,o=e-i;return r*r+o*o}Y.fromVectorTileJs=J,Y.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var i in t)n[i]=new H(t[i].features,e),n[i].name=i,n[i].version=e.version,n[i].extent=e.extent;return Q({layers:n})},Y.GeoJSONWrapper=$;var ct=function(t){return t[0]},pt=function(t){return t[1]},ht=function(t,e,n,i,r){void 0===e&&(e=ct),void 0===n&&(n=pt),void 0===i&&(i=64),void 0===r&&(r=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new r(2*t.length),l=0;l<t.length;l++)a[l]=l,s[2*l]=e(t[l]),s[2*l+1]=n(t[l]);!function t(e,n,i,r,o,a){if(!(o-r<=i)){var s=r+o>>1;!function t(e,n,i,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,l=i-r+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,n,i,Math.max(r,Math.floor(i-l*c/s+p)),Math.min(o,Math.floor(i+(s-l)*c/s+p)),a)}var h=n[2*i+a],f=r,d=o;for(st(e,n,r,i),n[2*o+a]>h&&st(e,n,r,o);f<d;){for(st(e,n,f,d),f++,d--;n[2*f+a]<h;)f++;for(;n[2*d+a]>h;)d--}n[2*r+a]===h?st(e,n,r,d):st(e,n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}(e,n,s,r,o,a%2),t(e,n,i,r,s-1,a+1),t(e,n,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)};ht.prototype.range=function(t,e,n,i){return function(t,e,n,i,r,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=n&&s<=r&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=n&&s<=r&&l>=i&&l<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?n<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===p?r>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(y))}}return c}(this.ids,this.coords,t,e,n,i,this.nodeSize)},ht.prototype.within=function(t,e,n){return function(t,e,n,i,r,o){for(var a=[0,t.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)ut(e[2*h],e[2*h+1],n,i)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];ut(d,m,n,i)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?n-r<=d:i-r<=m)&&(a.push(p),a.push(f-1),a.push(y)),(0===u?n+r>=d:i+r>=m)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)};var ft={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},dt=function(t){this.options=bt(Object.create(ft),t),this.trees=new Array(this.options.maxZoom+1)};function mt(t,e,n,i,r){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:i,properties:r}}function yt(t,e){var n=t.geometry.coordinates,i=n[0],r=n[1];return{x:vt(i),y:xt(r),zoom:1/0,index:e,parentId:-1}}function _t(t){return{type:"Feature",id:t.id,properties:gt(t),geometry:{type:"Point",coordinates:[(i=t.x,360*(i-.5)),(e=t.y,n=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var e,n,i}function gt(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return bt(bt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function vt(t){return t/360+.5}function xt(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function bt(t,e){for(var n in e)t[n]=e[n];return t}function wt(t){return t.x}function Et(t){return t.y}function Tt(t,e,n,i,r,o){var a=r-n,s=o-i;if(0!==a||0!==s){var l=((t-n)*a+(e-i)*s)/(a*a+s*s);l>1?(n=r,i=o):l>0&&(n+=a*l,i+=s*l)}return(a=t-n)*a+(s=e-i)*s}function St(t,e,n,i){var r={id:void 0===t?null:t,type:e,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)Pt(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var i=0;i<e.length;i++)Pt(t,e[i]);else if("MultiPolygon"===n)for(i=0;i<e.length;i++)for(var r=0;r<e[i].length;r++)Pt(t,e[i][r])}(r),r}function Pt(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function Ct(t,e,n,i){if(e.geometry){var r=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],l=e.id;if(n.promoteId?l=e.properties[n.promoteId]:n.generateId&&(l=i||0),"Point"===o)kt(r,s);else if("MultiPoint"===o)for(var u=0;u<r.length;u++)kt(r[u],s);else if("LineString"===o)At(r,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(u=0;u<r.length;u++)s=[],At(r[u],s,a,!1),t.push(St(l,"LineString",s,e.properties));return}zt(r,s,a,!1)}else if("Polygon"===o)zt(r,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(u=0;u<e.geometry.geometries.length;u++)Ct(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},n,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(u=0;u<r.length;u++){var c=[];zt(r[u],c,a,!0),s.push(c)}}t.push(St(l,o,s,e.properties))}}function kt(t,e){e.push(Lt(t[0])),e.push(Mt(t[1])),e.push(0)}function At(t,e,n,i){for(var r,o,a=0,s=0;s<t.length;s++){var l=Lt(t[s][0]),u=Mt(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(a+=i?(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,n,i,r){for(var o,a=r,s=i-n>>1,l=i-n,u=e[n],c=e[n+1],p=e[i],h=e[i+1],f=n+3;f<i;f+=3){var d=Tt(e[f],e[f+1],u,c,p,h);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-n>3&&t(e,n,o,r),e[o+2]=a,i-o>3&&t(e,o,i,r))}(e,0,c,n),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function zt(t,e,n,i){for(var r=0;r<t.length;r++){var o=[];At(t[r],o,n,i),e.push(o)}}function Lt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function It(t,e,n,i,r,o,a,s){if(i/=e,o>=(n/=e)&&a<i)return t;if(a<n||o>=i)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.type,f=0===r?c.minX:c.minY,d=0===r?c.maxX:c.maxY;if(f>=n&&d<i)l.push(c);else if(!(d<n||f>=i)){var m=[];if("Point"===h||"MultiPoint"===h)Ot(p,m,n,i,r);else if("LineString"===h)Dt(p,m,n,i,r,!1,s.lineMetrics);else if("MultiLineString"===h)Bt(p,m,n,i,r,!1);else if("Polygon"===h)Bt(p,m,n,i,r,!0);else if("MultiPolygon"===h)for(var y=0;y<p.length;y++){var _=[];Bt(p[y],_,n,i,r,!0),_.length&&m.push(_)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(y=0;y<m.length;y++)l.push(St(c.id,h,m[y],c.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),l.push(St(c.id,h,m,c.tags))}}}return l.length?l:null}function Ot(t,e,n,i,r){for(var o=0;o<t.length;o+=3){var a=t[o+r];a>=n&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function Dt(t,e,n,i,r,o,a){for(var s,l,u=Rt(t),c=0===r?Nt:Ut,p=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],_=t[h+4],g=0===r?f:d,v=0===r?y:_,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-_,2))),g<n?v>n&&(l=c(u,f,d,y,_,n),a&&(u.start=p+s*l)):g>i?v<i&&(l=c(u,f,d,y,_,i),a&&(u.start=p+s*l)):Ft(u,f,d,m),v<n&&g>=n&&(l=c(u,f,d,y,_,n),x=!0),v>i&&g<=i&&(l=c(u,f,d,y,_,i),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=Rt(t)),a&&(p+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(g=0===r?f:d)>=n&&g<=i&&Ft(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&Ft(u,u[0],u[1],u[2]),u.length&&e.push(u)}function Rt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Bt(t,e,n,i,r,o){for(var a=0;a<t.length;a++)Dt(t[a],e,n,i,r,o,!1)}function Ft(t,e,n,i){t.push(e),t.push(n),t.push(i)}function Nt(t,e,n,i,r,o){var a=(o-e)/(i-e);return t.push(o),t.push(n+(r-n)*a),t.push(1),a}function Ut(t,e,n,i,r,o){var a=(o-n)/(r-n);return t.push(e+(i-e)*a),t.push(o),t.push(1),a}function jt(t,e){for(var n=[],i=0;i<t.length;i++){var r,o=t[i],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)r=Vt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){r=[];for(var s=0;s<o.geometry.length;s++)r.push(Vt(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(Vt(o.geometry[s][u],e));r.push(l)}n.push(St(o.id,a,r,o.tags))}return n}function Vt(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var i=0;i<t.length;i+=3)n.push(t[i]+e,t[i+1],t[i+2]);return n}function Zt(t,e){if(t.transformed)return t;var n,i,r,o=1<<t.z,a=t.x,s=t.y;for(n=0;n<t.features.length;n++){var l=t.features[n],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(i=0;i<u.length;i+=2)l.geometry.push(qt(u[i],u[i+1],e,o,a,s));else for(i=0;i<u.length;i++){var p=[];for(r=0;r<u[i].length;r+=2)p.push(qt(u[i][r],u[i][r+1],e,o,a,s));l.geometry.push(p)}}return t.transformed=!0,t}function qt(t,e,n,i,r,o){return[Math.round(n*(t*i-r)),Math.round(n*(e*i-o))]}function Gt(t,e,n,i,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:n,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,Wt(a,t[s],o,r);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,p=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function Wt(t,e,n,i){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)Ht(a,r,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<r.length;s++)Ht(a,r[s],t,n,"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++)Ht(a,u[s],t,n,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=r.start/r.size,c.mapbox_clip_end=r.end/r.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Ht(t,e,n,i,r,o){var a=i*i;if(i>0&&e.size<(r?a:i))n.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===i||e[l+2]>a)&&(n.numSimplified++,s.push(e[l]),s.push(e[l+1])),n.numPoints++;r&&function(t,e){for(var n=0,i=0,r=t.length,o=r-2;i<r;o=i,i+=2)n+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(n>0===e)for(i=0,r=t.length;i<r/2;i+=2){var a=t[i],s=t[i+1];t[i]=t[r-2-i],t[i+1]=t[r-1-i],t[r-2-i]=a,t[r-1-i]=s}}(s,o),t.push(s)}}function Xt(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(this.options),e)).debug;if(n&&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 i=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)Ct(n,t.features[i],e,i);else"Feature"===t.type?Ct(n,t,e):Ct(n,{geometry:t},e);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var n=e.buffer/e.extent,i=t,r=It(t,1,-1-n,n,0,-1,2,e),o=It(t,1,1-n,2+n,0,-1,2,e);return(r||o)&&(i=It(t,1,-n,1+n,0,-1,2,e)||[],r&&(i=jt(r,1).concat(i)),o&&(i=i.concat(jt(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),n&&(i.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 Kt(t,e,n){return 32*((1<<t)*n+e)+t}function Yt(t,e){var n=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var i=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!i)return e(null,null);var r=new G(i.features),o=Y(r);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:r,rawData:o.buffer})}dt.prototype.load=function(t){var e=this.options,n=e.log,i=e.minZoom,r=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare "+t.length+" points";n&&console.time(a),this.points=t;for(var s=[],l=0;l<t.length;l++)t[l].geometry&&s.push(yt(t[l],l));this.trees[r+1]=new ht(s,wt,Et,o,Float32Array),n&&console.timeEnd(a);for(var u=r;u>=i;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new ht(s,wt,Et,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return n&&console.timeEnd("total time"),this},dt.prototype.getClusters=function(t,e){var n=((t[0]+180)%360+360)%360-180,i=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)n=-180,r=180;else if(n>r){var a=this.getClusters([n,i,180,o],e),s=this.getClusters([-180,i,r,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(vt(n),xt(o),vt(r),xt(i));c<p.length;c+=1){var h=p[c],f=l.points[h];u.push(f.numPoints?_t(f):this.points[f.index])}return u},dt.prototype.getChildren=function(t){var e=t>>5,n=t%32,i="No cluster with the specified id.",r=this.trees[n];if(!r)throw new Error(i);var o=r.points[e];if(!o)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],l=0,u=r.within(o.x,o.y,a);l<u.length;l+=1){var c=u[l],p=r.points[c];p.parentId===t&&s.push(p.numPoints?_t(p):this.points[p.index])}if(0===s.length)throw new Error(i);return s},dt.prototype.getLeaves=function(t,e,n){e=e||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,n,0),i},dt.prototype.getTile=function(t,e,n){var i=this.trees[this._limitZoom(t)],r=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,l=(n-s)/r,u=(n+1+s)/r,c={features:[]};return this._addTileFeatures(i.range((e-s)/r,l,(e+1+s)/r,u),i.points,e,n,r,c),0===e&&this._addTileFeatures(i.range(1-s/r,l,1,u),i.points,r,n,r,c),e===r-1&&this._addTileFeatures(i.range(0,l,s/r,u),i.points,-1,n,r,c),c.features.length?c:null},dt.prototype.getClusterExpansionZoom=function(t){for(var e=t%32-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e},dt.prototype._appendLeaves=function(t,e,n,i,r){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],l=s.properties;if(l&&l.cluster?r+l.point_count<=i?r+=l.point_count:r=this._appendLeaves(t,l.cluster_id,n,i,r):r<i?r++:t.push(s),t.length===n)break}return r},dt.prototype._addTileFeatures=function(t,e,n,i,r,o){for(var a=0,s=t;a<s.length;a+=1){var l=e[s[a]],u={type:1,geometry:[[Math.round(this.options.extent*(l.x*r-n)),Math.round(this.options.extent*(l.y*r-i))]],tags:l.numPoints?gt(l):this.points[l.index].properties},c=l.numPoints?l.id:this.points[l.index].id;void 0!==c&&(u.id=c),o.features.push(u)}},dt.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},dt.prototype._cluster=function(t,e){for(var n=[],i=this.options,r=i.radius,o=i.extent,a=i.reduce,s=r/(o*Math.pow(2,e)),l=0;l<t.length;l++){var u=t[l];if(!(u.zoom<=e)){u.zoom=e;for(var c=this.trees[e+1],p=c.within(u.x,u.y,s),h=u.numPoints||1,f=u.x*h,d=u.y*h,m=a?this._map(u,!0):null,y=(l<<5)+(e+1),_=0,g=p;_<g.length;_+=1){var v=g[_],x=c.points[v];if(!(x.zoom<=e)){x.zoom=e;var b=x.numPoints||1;f+=x.x*b,d+=x.y*b,h+=b,x.parentId=y,a&&a(m,this._map(x))}}1===h?n.push(u):(u.parentId=y,n.push(mt(f/h,d/h,y,h,m)))}}return n},dt.prototype._map=function(t,e){if(t.numPoints)return e?bt({},t.properties):t.properties;var n=this.points[t.index].properties,i=this.options.map(n);return e&&i===n?bt({},i):i},Xt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Xt.prototype.splitTile=function(t,e,n,i,r,o,a){for(var s=[t,e,n,i],l=this.options,u=l.debug;s.length;){i=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,p=Kt(e,n,i),h=this.tiles[p];if(!h&&(u>1&&console.time("creation"),h=this.tiles[p]=Gt(t,e,n,i,l),this.tileCoords.push({z:e,x:n,y:i}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,i,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,r){if(e===l.maxZoom||e===r)continue;var d=1<<r-e;if(n!==Math.floor(o/d)||i!==Math.floor(a/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){u>1&&console.time("clipping");var m,y,_,g,v,x,b=.5*l.buffer/l.extent,w=.5-b,E=.5+b,T=1+b;m=y=_=g=null,v=It(t,c,n-b,n+E,0,h.minX,h.maxX,l),x=It(t,c,n+w,n+T,0,h.minX,h.maxX,l),t=null,v&&(m=It(v,c,i-b,i+E,1,h.minY,h.maxY,l),y=It(v,c,i+w,i+T,1,h.minY,h.maxY,l),v=null),x&&(_=It(x,c,i-b,i+E,1,h.minY,h.maxY,l),g=It(x,c,i+w,i+T,1,h.minY,h.maxY,l),x=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*i),s.push(y||[],e+1,2*n,2*i+1),s.push(_||[],e+1,2*n+1,2*i),s.push(g||[],e+1,2*n+1,2*i+1)}}},Xt.prototype.getTile=function(t,e,n){var i=this.options,r=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=Kt(t,e=(e%a+a)%a,n);if(this.tiles[s])return Zt(this.tiles[s],r);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var l,u=t,c=e,p=n;!l&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[Kt(u,c,p)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,p),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,p,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?Zt(this.tiles[s],r):null):null};var Jt=function(e){function n(t,n,i){e.call(this,t,n,Yt),i&&(this.loadGeoJSON=i)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.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())},n.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var r=!!(i&&i.request&&i.request.collectResourceTiming)&&new z.Performance(i.request);this.loadGeoJSON(i,function(o,a){if(o||!a)return n(o);if("object"!=typeof a)return n(new Error("Input data is not a valid GeoJSON object."));!function t(e,n){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(U(t,n)),e;case"GeometryCollection":return e.geometries=e.geometries.map(U(t,n)),e;case"Feature":return e.geometry=t(e.geometry,n),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=j(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(U(j,e))),t}(e,n);default:return e}}(a,!0);try{e._geoJSONIndex=i.cluster?new dt(function(e){var n=e.superclusterOptions,i=e.clusterProperties;if(!i||!n)return n;for(var r={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(i),u=0,c=l;u<c.length;u+=1){var p=c[u],h=i[p],f=h[0],d=h[1],m=t.createExpression(d),y=t.createExpression("string"==typeof f?[f,["accumulated"],["get",p]]:f);r[p]=m.value,o[p]=y.value}return n.map=function(t){s.properties=t;for(var e={},n=0,i=l;n<i.length;n+=1){var o=i[n];e[o]=r[o].evaluate(a,s)}return e},n.reduce=function(t,e){s.properties=e;for(var n=0,i=l;n<i.length;n+=1){var r=i[n];a.accumulated=t[r],t[r]=o[r].evaluate(a,s)}},n}(i)).load(a.features):new Xt(a,i.geojsonVtOptions)}catch(o){return n(o)}e.loaded={};var s={};if(r){var l=r.finish();l&&(s.resourceTiming={},s.resourceTiming[i.source]=JSON.parse(JSON.stringify(l)))}n(null,s)})}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(t,n){var i=this.loaded,r=t.uid;return i&&i[r]?e.prototype.reloadTile.call(this,t,n):this.loadTile(t,n)},n.prototype.loadGeoJSON=function(e,n){if(e.request)t.getJSON(e.request,n);else{if("string"!=typeof e.data)return n(new Error("Input data is not a valid GeoJSON object."));try{return n(null,JSON.parse(e.data))}catch(t){return n(new Error("Input data is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},n.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},n.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},n.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},n}(I),$t=function(e){var n=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:I,geojson:Jt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(n.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');n.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 $t.prototype.setReferrer=function(t,e){this.referrer=e},$t.prototype.setLayers=function(t,e,n){this.getLayerIndex(t).replace(e),n()},$t.prototype.updateLayers=function(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()},$t.prototype.loadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).loadTile(e,n)},$t.prototype.loadDEMTile=function(t,e,n){this.getDEMWorkerSource(t,e.source).loadTile(e,n)},$t.prototype.reloadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).reloadTile(e,n)},$t.prototype.abortTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).abortTile(e,n)},$t.prototype.removeTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).removeTile(e,n)},$t.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},$t.prototype.removeSource=function(t,e,n){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var i=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==i.removeSource?i.removeSource(e,n):n()}},$t.prototype.loadWorkerSource=function(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t.toString())}},$t.prototype.loadRTLTextPlugin=function(e,n,i){try{t.plugin.isLoaded()||(this.self.importScripts(n),i(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+n)))}catch(t){i(t.toString())}},$t.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},$t.prototype.getWorkerSource=function(t,e,n){var i=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][n]){var r={send:function(e,n,r){i.actor.send(e,n,r,t)}};this.workerSources[t][e][n]=new this.workerSourceTypes[e](r,this.getLayerIndex(t))}return this.workerSources[t][e][n]},$t.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new O),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new $t(self)),$t}),i(0,function(t){var e=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,n=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(n);try{e=new Worker(i),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(i),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){return void 0===n[t]&&(n[t]=function(t){var n=document.createElement("canvas"),i=Object.create(e.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=t,n.probablySupportsContext?n.probablySupportsContext("webgl",i)||n.probablySupportsContext("experimental-webgl",i):n.supportsContext?n.supportsContext("webgl",i)||n.supportsContext("experimental-webgl",i):n.getContext("webgl",i)||n.getContext("experimental-webgl",i)}(t)),n[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var n={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),n={create:function(e,n,i){var r=t.window.document.createElement(e);return n&&(r.className=n),i&&i.appendChild(r),r},createNS:function(e,n){return t.window.document.createElementNS(e,n)}},i=t.window.document?t.window.document.documentElement.style:null;function r(t){if(!i)return null;for(var e=0;e<t.length;e++)if(t[e]in i)return t[e];return t[0]}var o,a=r(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);n.disableDrag=function(){i&&a&&(o=i[a],i[a]="none")},n.enableDrag=function(){i&&a&&(i[a]=o)};var s=r(["transform","WebkitTransform"]);n.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}n.addEventListener=function(t,e,n,i){void 0===i&&(i={}),"passive"in i&&l?t.addEventListener(e,n,i):t.addEventListener(e,n,i.capture)},n.removeEventListener=function(t,e,n,i){void 0===i&&(i={}),"passive"in i&&l?t.removeEventListener(e,n,i):t.removeEventListener(e,n,i.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};n.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",c,!0)},0)},n.mousePos=function(e,n){var i=e.getBoundingClientRect();return n=n.touches?n.touches[0]:n,new t.Point(n.clientX-i.left-e.clientLeft,n.clientY-i.top-e.clientTop)},n.touchPos=function(e,n){for(var i=e.getBoundingClientRect(),r=[],o="touchend"===n.type?n.changedTouches:n.touches,a=0;a<o.length;a++)r.push(new t.Point(o[a].clientX-i.left-e.clientLeft,o[a].clientY-i.top-e.clientTop));return r},n.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},n.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p=function(){this.images={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0};p.prototype.isLoaded=function(){return this.loaded},p.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,n=this.requestors;e<n.length;e+=1){var i=n[e],r=i.ids,o=i.callback;this._notify(r,o)}this.requestors=[]}},p.prototype.getImage=function(t){return this.images[t]},p.prototype.addImage=function(t,e){this.images[t]=e},p.prototype.removeImage=function(t){delete this.images[t],delete this.patterns[t]},p.prototype.listImages=function(){return Object.keys(this.images)},p.prototype.getImages=function(t,e){var n=!0;if(!this.isLoaded())for(var i=0,r=t;i<r.length;i+=1){var o=r[i];this.images[o]||(n=!1)}this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})},p.prototype._notify=function(t,e){for(var n={},i=0,r=t;i<r.length;i+=1){var o=r[i],a=this.images[o];a&&(n[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf})}e(null,n)},p.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},p.prototype.getPattern=function(e){var n=this.patterns[e];if(n)return n.position;var i=this.getImage(e);if(!i)return null;var r={w:i.data.width+2,h:i.data.height+2,x:0,y:0},o=new t.ImagePosition(r,i);return this.patterns[e]={bin:r,position:o},this._updatePatternAtlas(),o},p.prototype.bind=function(e){var n=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,n.RGBA),this.atlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)},p.prototype._updatePatternAtlas=function(){var e=[];for(var n in this.patterns)e.push(this.patterns[n].bin);var i=t.potpack(e),r=i.w,o=i.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,p=this.images[s].data,h=p.width,f=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c},{width:h,height:f}),t.RGBAImage.copy(p,a,{x:0,y:f-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c+f},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:f}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u+h,y:c},{width:1,height:f})}this.dirty=!0};var h=d,f=1e20;function d(t,e,n,i,r,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=n||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 m(t,e,n,i,r,o,a){for(var s=0;s<e;s++){for(var l=0;l<n;l++)i[l]=t[l*e+s];for(y(i,r,o,a,n),l=0;l<n;l++)t[l*e+s]=r[l]}for(l=0;l<n;l++){for(s=0;s<e;s++)i[s]=t[l*e+s];for(y(i,r,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(r[s])}}function y(t,e,n,i,r){n[0]=0,i[0]=-f,i[1]=+f;for(var o=1,a=0;o<r;o++){for(var s=(t[o]+o*o-(t[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);s<=i[a];)a--,s=(t[o]+o*o-(t[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);n[++a]=o,i[a]=s,i[a+1]=+f}for(o=0,a=0;o<r;o++){for(;i[a+1]<o;)a++;e[o]=(o-n[a])*(o-n[a])+t[n[a]]}}d.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),n=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var r=e.data[4*i+3]/255;this.gridOuter[i]=1===r?0:0===r?f:Math.pow(Math.max(0,.5-r),2),this.gridInner[i]=1===r?f:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(m(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),m(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var o=this.gridOuter[i]-this.gridInner[i];n[i]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return n};var _=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};_.prototype.setURL=function(t){this.url=t},_.prototype.getGlyphs=function(e,n){var i=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 n=t.stack,r=t.id,o=i.entries[n];o||(o=i.entries[n]={glyphs:{},requests:{}});var a=o.glyphs[r];if(void 0===a)if(a=i._tinySDF(o,n,r))e(null,{stack:n,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]=[],_.loadGlyphRange(n,s,i.url,i.requestTransform,function(t,e){if(e)for(var n in e)o.glyphs[+n]=e[+n];for(var i=0,r=l;i<r.length;i+=1)(0,r[i])(t,e);delete o.requests[s]})),l.push(function(t,i){t?e(t):i&&e(null,{stack:n,id:r,glyph:i[r]||null})})}}else e(null,{stack:n,id:r,glyph:a})},function(t,e){if(t)n(t);else if(e){for(var i={},r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.stack,l=a.id,u=a.glyph;(i[s]||(i[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}n(null,i)}})},_.prototype._tinySDF=function(e,n,i){var r=this.localIdeographFontFamily;if(r&&(t.isChar["CJK Unified Ideographs"](i)||t.isChar["Hangul Syllables"](i))){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(n)?a="900":/medium/i.test(n)?a="500":/light/i.test(n)&&(a="200"),o=e.tinySDF=new _.TinySDF(24,3,8,.25,r,a)}return{id:i,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},_.loadGlyphRange=function(e,n,i,r,o){var a=256*n,s=a+255,l=r(t.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,n){if(e)o(e);else if(n){for(var i={},r=0,a=t.parseGlyphPBF(n);r<a.length;r+=1){var s=a[r];i[s.id]=s}o(null,i)}})},_.TinySDF=h;var g=function(){this.specification=t.styleSpec.light.position};g.prototype.possiblyEvaluate=function(e,n){return t.sphericalToCartesian(e.expression.evaluate(n))},g.prototype.interpolate=function(e,n,i){return{x:t.number(e.x,n.x,i),y:t.number(e.y,n.y,i),z:t.number(e.z,n.z,i)}};var v=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new g,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),x=function(e){function n(n){e.call(this),this._transitionable=new t.Transitionable(v),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getLight=function(){return this._transitionable.serialize()},n.prototype.setLight=function(e,n){if(void 0===n&&(n={}),!this._validate(t.validateLight,e,n))for(var i in e){var r=e[i];t.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),r):this._transitionable.setValue(i,r)}},n.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},n.prototype.hasTransition=function(){return this._transitioning.hasTransition()},n.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},n.prototype._validate=function(e,n,i){return(!i||!1!==i.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},n}(t.Evented),b=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={}};b.prototype.getDash=function(t,e){var n=t.join(",")+String(e);return this.positions[n]||(this.positions[n]=this.addDash(t,e)),this.positions[n]},b.prototype.addDash=function(e,n){var i=n?7:0,r=2*i+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=-i;c<=i;c++)for(var p=this.nextRow+i+c,h=this.width*p,f=u?-e[e.length-1]:0,d=e[0],m=1,y=0;y<this.width;y++){for(;d<y/s;)f=d,d+=e[m],u&&m===e.length-1&&(d+=e[0]),m++;var _=Math.abs(y-f*s),g=Math.abs(y-d*s),v=Math.min(_,g),x=m%2==1,b=void 0;if(n){var w=i?c/i*(l+1):0;if(x){var E=l-Math.abs(w);b=Math.sqrt(v*v+E*E)}else b=l-Math.sqrt(v*v+w*w)}else b=(x?1:-1)*v;this.data[3+4*(h+y)]=Math.max(0,Math.min(255,b+128))}var T={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:o};return this.nextRow+=r,this.dirty=!0,T},b.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 w=function e(n,i){this.workerPool=n,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,i,this.id);s.name="Worker "+o,this.actors.push(s)}};function E(e,n,i){var r=function(n,r){if(n)return i(n);if(r){var o=t.pick(r,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);r.vector_layers&&(o.vectorLayers=r.vector_layers,o.vectorLayerIds=o.vectorLayers.map(function(t){return t.id})),e.url&&(o.tiles=t.canonicalizeTileset(o,e.url)),i(null,o)}};return e.url?t.getJSON(n(t.normalizeSourceURL(e.url),t.ResourceType.Source),r):t.browser.frame(function(){return r(null,e)})}w.prototype.broadcast=function(e,n,i){i=i||function(){},t.asyncAll(this.actors,function(t,i){t.send(e,n,i)},i)},w.prototype.send=function(t,e,n,i){return("number"!=typeof i||isNaN(i))&&(i=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[i].send(t,e,n),i},w.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},w.Actor=t.Actor;var T=function(e,n,i){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=n||0,this.maxzoom=i||24};T.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]},T.prototype.contains=function(e){var n=Math.pow(2,e.z),i=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*n),r=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*n),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*n);return e.x>=i&&e.x<o&&e.y>=r&&e.y<a};var S=function(e){function n(n,i,r,o){if(e.call(this),this.id=n,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(i,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._transformRequest,function(n,i){e._tileJSONRequest=null,n?e.fire(new t.ErrorEvent(n)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new T(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},n.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},n.prototype.serialize=function(){return t.extend({},this._options)},n.prototype.loadTile=function(e,n){var i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url),r={request:this.map._transformRequest(i,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};function o(t,i){return e.aborted?n(null):t&&404!==t.status?n(t):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),n(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}r.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",r,o.bind(this)):"loading"===e.state?e.reloadCallback=n:this.dispatcher.send("reloadTile",r,o.bind(this),e.workerID)},n.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},n.prototype.hasTransition=function(){return!1},n}(t.Evented),P=function(e){function n(n,i,r,o){e.call(this),this.id=n,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({},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._transformRequest,function(n,i){e._tileJSONRequest=null,n?e.fire(new t.ErrorEvent(n)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new T(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},n.prototype.serialize=function(){return t.extend({},this._options)},n.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},n.prototype.loadTile=function(e,n){var i=this,r=t.normalizeTileURL(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",n(null);else if(r)e.state="errored",n(r);else if(o){i.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=i.map.painter.context,s=a.gl;e.texture=i.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",n(null)}})},n.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},n.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},n.prototype.hasTransition=function(){return!1},n}(t.Evented),C=function(e){function n(n,i,r,o){e.call(this,n,i,r,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},i),this.encoding=i.encoding||"mapbox"}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},n.prototype.loadTile=function(e,n){var i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(i,r){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(i)e.state="errored",n(i);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,i){t&&(e.state="errored",n(t)),i&&(e.dem=i,e.needsHillshadePrepare=!0,e.state="loaded",n(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},n.prototype._getNeighboringTiles=function(e){var n=e.canonical,i=Math.pow(2,n.z),r=(n.x-1+i)%i,o=0===n.x?e.wrap-1:e.wrap,a=(n.x+1+i)%i,s=n.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,n.z,r,n.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,n.z,r,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<i&&(l[new t.OverscaledTileID(e.overscaledZ,o,n.z,r,n.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),l},n.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)},n}(P),k=function(e){function n(n,i,r,o){e.call(this),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=r,this.setEventedParent(o),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution);var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*a,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(i.clusterRadius||50)*a,log:!1},clusterProperties:i.clusterProperties},i.workerOptions)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(n){if(n)e.fire(new t.ErrorEvent(n));else{var i={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",i))}})},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)n.fire(new t.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(i.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new t.Event("data",i))}}),this},n.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},n.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},n.prototype.getClusterLeaves=function(t,e,n,i){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},i,this.workerID),this},n.prototype._updateWorkerData=function(e){var n=this,i=t.extend({},this.workerOptions),r=this._data;"string"==typeof r?(i.request=this.map._transformRequest(t.browser.resolveURL(r),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(r),this.workerID=this.dispatcher.send(this.type+".loadData",i,function(t,r){n._removed||r&&r.abandoned||(n._loaded=!0,r&&r.resourceTiming&&r.resourceTiming[n.id]&&(n._resourceTiming=r.resourceTiming[n.id].slice(0)),n.dispatcher.send(n.type+".coalesce",{source:i.source},null,n.workerID),e(t))},this.workerID)},n.prototype.loadTile=function(e,n){var i=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?n(null):t?n(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===r),n(null))},this.workerID)},n.prototype.abortTile=function(t){t.aborted=!0},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},n.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},n.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(t.Evented),A=function(e){function n(t,n,i,r){e.call(this),this.id=t,this.dispatcher=i,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(r),this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(e,n){var i=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?i.fire(new t.ErrorEvent(r)):o&&(i.image=o,e&&(i.coordinates=e),n&&n(),i._finishLoading())})},n.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},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setCoordinates=function(e){var n=this;this.coordinates=e;var i=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var n=1/0,i=1/0,r=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var l=s[a];n=Math.min(n,l.x),i=Math.min(i,l.y),r=Math.max(r,l.x),o=Math.max(o,l.y)}var u=r-n,c=o-i,p=Math.max(u,c),h=Math.max(0,Math.floor(-Math.log(p)/Math.LN2)),f=Math.pow(2,h);return new t.CanonicalTileID(h,Math.floor((n+r)/2*f),Math.floor((i+o)/2*f))}(i),this.minzoom=this.maxzoom=this.tileID.z;var r=i.map(function(t){return n.tileID.getTilePoint(t)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(r[0].x,r[0].y,0,0),this._boundsArray.emplaceBack(r[1].x,r[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(r[3].x,r[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(r[2].x,r[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},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,n=e.gl;for(var i 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,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[i];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},n.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))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(t.Evented),z={vector:S,raster:P,"raster-dem":C,geojson:k,video:function(e){function n(t,n,i,r){e.call(this,t,n,i,r),this.roundZoom=!0,this.type="video",this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this,n=this.options;this.urls=[];for(var i=0,r=n.urls;i<r.length;i+=1){var o=r[i];this.urls.push(this.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,function(n,i){n?e.fire(new t.ErrorEvent(n)):i&&(e.video=i,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,n=e.gl;for(var i 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(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[i];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(A),image:A,canvas:function(e){function n(n,i,r,o){e.call(this,n,i,r,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.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())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.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 n=this.map.painter.context,i=n.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=n.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(n,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[r];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var n=e[t];if(isNaN(n)||n<=0)return!0}return!1},n}(A)},L=function(e,n,i,r){var o=new z[n.type](e,n,i,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};function M(e,n){var i=t.identity([]);return t.translate(i,i,[1,1,0]),t.scale(i,i,[.5*e.width,.5*e.height,1]),t.multiply(i,i,e.calculatePosMatrix(n.toUnwrapped()))}function I(t,e,n,i,r){var o=function(t,e,n){if(t)for(var i=0,r=t;i<r.length;i+=1){var o=e[r[i]];if(o&&o.source===n&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===n&&"fill-extrusion"===s.type)return!0}return!1}(i&&i.layers,e,t.id),a=r.maxPitchScaleFactor(),s=t.tilesIn(n,a,o);s.sort(O);for(var l=[],u=0,c=s;u<c.length;u+=1){var p=c[u];l.push({wrappedTileID:p.tileID.wrapped().key,queryResults:p.tile.queryRenderedFeatures(e,t._state,p.queryGeometry,p.cameraQueryGeometry,p.scale,i,r,a,M(t.transform,p.tileID))})}var h=function(t){for(var e={},n={},i=0,r=t;i<r.length;i+=1){var o=r[i],a=o.queryResults,s=o.wrappedTileID,l=n[s]=n[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m))}}return e}(l);for(var f in h)h[f].forEach(function(e){var n=e.feature,i=t.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=i});return h}function O(t,e){var n=t.tileID,i=e.tileID;return n.overscaledZ-i.overscaledZ||n.canonical.y-i.canonical.y||n.wrap-i.wrap||n.canonical.x-i.canonical.x}var D=function(t,e){this.max=t,this.onRemove=e,this.reset()};D.prototype.reset=function(){for(var t in this.data)for(var e=0,n=this.data[t];e<n.length;e+=1){var i=n[e];i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value)}return this.data={},this.order=[],this},D.prototype.add=function(t,e,n){var i=this,r=t.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);var o={value:e,timeout:void 0};if(void 0!==n&&(o.timeout=setTimeout(function(){i.remove(t,o)},n)),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},D.prototype.has=function(t){return t.wrapped().key in this.data},D.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},D.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},D.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},D.prototype.remove=function(t,e){if(!this.has(t))return this;var n=t.wrapped().key,i=void 0===e?0:this.data[n].indexOf(e),r=this.data[n][i];return this.data[n].splice(i,1),r.timeout&&clearTimeout(r.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(r.value),this.order.splice(this.order.indexOf(n),1),this},D.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 R=function(t,e,n){this.context=t;var i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};R.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},R.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},R.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var B={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},F=function(t,e,n,i){this.length=e.length,this.attributes=n,this.itemSize=e.bytesPerElement,this.dynamicDraw=i,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};F.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},F.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},F.prototype.enableAttributes=function(t,e){for(var n=0;n<this.attributes.length;n++){var i=this.attributes[n],r=e.attributes[i.name];void 0!==r&&t.enableVertexAttribArray(r)}},F.prototype.setVertexAttribPointers=function(t,e,n){for(var i=0;i<this.attributes.length;i++){var r=this.attributes[i],o=e.attributes[r.name];void 0!==o&&t.vertexAttribPointer(o,r.components,t[B[r.type]],!1,this.itemSize,r.offset+this.itemSize*(n||0))}},F.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var N=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};N.prototype.get=function(){return this.current},N.prototype.set=function(t){},N.prototype.getDefault=function(){return this.default},N.prototype.setDefault=function(){this.set(this.default)};var U=function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return t.Color.transparent},n.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},n}(N),j=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.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(N),V=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.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(N),Z=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.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(N),q=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.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(N),G=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.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(N),W=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.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(N),H=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.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(N),X=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.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(N),K=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.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(N),Y=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.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(N),J=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.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(N),$=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.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(N),Q=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.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(N),tt=function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return t.Color.transparent},n.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},n}(N),et=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.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(N),nt=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.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(N),it=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.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(N),rt=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.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(N),ot=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.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(N),at=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.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(N),st=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.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(N),lt=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.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(N),ut=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.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(N),ct=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.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(N),pt=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.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(N),ht=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.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(N),ft=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(N),dt=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.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(N),mt=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.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(N),yt=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.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(N),_t=function(t){function e(e,n){t.call(this,e),this.context=e,this.parent=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(N),gt=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.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(_t),vt=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.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(_t),xt=function(t,e,n){this.context=t,this.width=e,this.height=n;var i=t.gl,r=this.framebuffer=i.createFramebuffer();this.colorAttachment=new gt(t,r),this.depthAttachment=new vt(t,r)};xt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var n=this.depthAttachment.get();n&&t.deleteRenderbuffer(n),t.deleteFramebuffer(this.framebuffer)};var bt=function(t,e,n){this.func=t,this.mask=e,this.range=n};bt.ReadOnly=!1,bt.ReadWrite=!0,bt.disabled=new bt(519,bt.ReadOnly,[0,1]);var wt=function(t,e,n,i,r,o){this.test=t,this.ref=e,this.mask=n,this.fail=i,this.depthFail=r,this.pass=o};wt.disabled=new wt({func:519,mask:0},0,0,7680,7680,7680);var Et=function(t,e,n){this.blendFunction=t,this.blendColor=e,this.mask=n};Et.disabled=new Et(Et.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),Et.unblended=new Et(Et.Replace,t.Color.transparent,[!0,!0,!0,!0]),Et.alphaBlended=new Et([1,771],t.Color.transparent,[!0,!0,!0,!0]);var Tt=function(t,e,n){this.enable=t,this.mode=e,this.frontFace=n};Tt.disabled=new Tt(!1,1029,2305),Tt.backCCW=new Tt(!0,1029,2305);var St=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new U(this),this.clearDepth=new j(this),this.clearStencil=new V(this),this.colorMask=new Z(this),this.depthMask=new q(this),this.stencilMask=new G(this),this.stencilFunc=new W(this),this.stencilOp=new H(this),this.stencilTest=new X(this),this.depthRange=new K(this),this.depthTest=new Y(this),this.depthFunc=new J(this),this.blend=new $(this),this.blendFunc=new Q(this),this.blendColor=new tt(this),this.blendEquation=new et(this),this.cullFace=new nt(this),this.cullFaceSide=new it(this),this.frontFace=new rt(this),this.program=new ot(this),this.activeTexture=new at(this),this.viewport=new st(this),this.bindFramebuffer=new lt(this),this.bindRenderbuffer=new ut(this),this.bindTexture=new ct(this),this.bindVertexBuffer=new pt(this),this.bindElementBuffer=new ht(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ft(this),this.pixelStoreUnpack=new dt(this),this.pixelStoreUnpackPremultiplyAlpha=new mt(this),this.pixelStoreUnpackFlipY=new yt(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")};St.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},St.prototype.createIndexBuffer=function(t,e){return new R(this,t,e)},St.prototype.createVertexBuffer=function(t,e,n){return new F(this,t,e,n)},St.prototype.createRenderbuffer=function(t,e,n){var i=this.gl,r=i.createRenderbuffer();return this.bindRenderbuffer.set(r),i.renderbufferStorage(i.RENDERBUFFER,t,e,n),this.bindRenderbuffer.set(null),r},St.prototype.createFramebuffer=function(t,e){return new xt(this,t,e)},St.prototype.clear=function(t){var e=t.color,n=t.depth,i=this.gl,r=0;e&&(r|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==n&&(r|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(n),this.depthMask.set(!0)),i.clear(r)},St.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))},St.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)},St.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)},St.prototype.setColorMode=function(e){t.isEqual(e.blendFunction,Et.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},St.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Pt=function(e){function n(n,i,r){var o=this;e.call(this),this.id=n,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=L(n,i,r,this),this._tiles={},this._cache=new D(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},n.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},n.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},n.prototype.getSource=function(){return this._source},n.prototype.pause=function(){this._paused=!0},n.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)}},n.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},n.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},n.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},n.prototype.serialize=function(){return this._source.serialize()},n.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)},n.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(Ct)},n.prototype.getRenderableIds=function(e){var n=this,i=[];for(var r in this._tiles)this._isIdRenderable(+r,e)&&i.push(+r);return e?i.sort(function(e,i){var r=n._tiles[e].tileID,o=n._tiles[i].tileID,a=new t.Point(r.canonical.x,r.canonical.y)._rotate(n.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(n.transform.angle);return r.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}):i.sort(Ct)},n.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},n.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},n.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")},n.prototype._reloadTile=function(t,e){var n=this._tiles[t];n&&("loading"!==n.state&&(n.state=e),this._loadTile(n,this._tileLoaded.bind(this,n,t,e)))},n.prototype._tileLoaded=function(e,n,i,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"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(n,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}))},n.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),n=0;n<e.length;n++){var i=e[n];if(t.neighboringTiles&&t.neighboringTiles[i]){var r=this.getTileByID(i);o(t,r),o(r,t)}}function o(t,e){t.needsHillshadePrepare=!0;var n=e.tileID.canonical.x-t.tileID.canonical.x,i=e.tileID.canonical.y-t.tileID.canonical.y,r=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===n&&0===i||Math.abs(i)>1||(Math.abs(n)>1&&(1===Math.abs(n+r)?n+=r:1===Math.abs(n-r)&&(n-=r)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,n,i),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},n.prototype.getTile=function(t){return this.getTileByID(t.key)},n.prototype.getTileByID=function(t){return this._tiles[t]},n.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},n.prototype._retainLoadedChildren=function(t,e,n,i){for(var r in this._tiles){var o=this._tiles[r];if(!(i[r]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>n)){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]){i[a.key]=a;break}}}},n.prototype.findLoadedParent=function(t,e){for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n);if(!i)return;var r=String(i.key),o=this._tiles[r];if(o&&o.hasData())return o;if(this._cache.has(i))return this._cache.get(i)}},n.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),n=Math.floor(5*e),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(i)},n.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,n=Math.round(e);if(this._prevLng=t,n){var i={};for(var r in this._tiles){var o=this._tiles[r];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+n),i[o.tileID.key]=o}for(var a in this._tiles=i,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)}}},n.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var r;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?r=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(r=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(r=r.filter(function(t){return i._source.hasTile(t)}))):r=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(r,o);if(kt(this._source.type)){for(var u={},c={},p=0,h=Object.keys(l);p<h.length;p+=1){var f=h[p],d=l[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,a);y&&(this._addTile(y.tileID),u[y.tileID.key]=y.tileID),c[f]=d}}for(var _ in this._retainLoadedChildren(c,o,s,l),u)l[_]||(this._coveredTiles[_]=!0,l[_]=u[_])}for(var g in l)this._tiles[g].clearFadeHold();for(var v=0,x=t.keysDifference(this._tiles,l);v<x.length;v+=1){var b=x[v],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}}},n.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},n.prototype._updateRetainedTiles=function(t,e){for(var i={},r={},o=Math.max(e-n.maxOverzooming,this._source.minzoom),a=Math.max(e+n.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],p=this._addTile(c);i[c.key]=c,p.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,a,i);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],_=this.getTile(y);if(_&&_.hasData()){i[y.key]=y;continue}}else{var g=d.children(this._source.maxzoom);if(i[g[0].key]&&i[g[1].key]&&i[g[2].key]&&i[g[3].key])continue}for(var v=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(r[b.key])break;if(r[b.key]=!0,!(m=this.getTile(b))&&v&&(m=this._addTile(b)),m&&(i[b.key]=b,v=m.wasRequested(),m.hasData()))break}}}return i},n.prototype._addTile=function(e){var n=this._tiles[e.key];if(n)return n;(n=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,n),n.tileID=e,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,n)));var i=Boolean(n);return i||(n=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,e.key,n.state))),n?(n.uses++,this._tiles[e.key]=n,i||this._source.fire(new t.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n):null},n.prototype._setTileReloadTimer=function(t,e){var n=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(function(){n._reloadTile(t,"expired"),delete n._timers[t]},i))},n.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))))},n.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},n.prototype.tilesIn=function(e,n,i){var r=this,o=[],a=this.transform;if(!a)return o;for(var s=i?a.getCameraQueryGeometry(e):e,l=e.map(function(t){return a.pointCoordinate(t)}),u=s.map(function(t){return a.pointCoordinate(t)}),c=this.getIds(),p=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=u;m<y.length;m+=1){var _=y[m];p=Math.min(p,_.x),h=Math.min(h,_.y),f=Math.max(f,_.x),d=Math.max(d,_.y)}for(var g=function(e){var i=r._tiles[c[e]];if(!i.holdingForFade()){var s=i.tileID,m=Math.pow(2,a.zoom-i.tileID.overscaledZ),y=n*i.queryPadding*t.EXTENT/i.tileSize/m,_=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(_[0].x-y<t.EXTENT&&_[0].y-y<t.EXTENT&&_[1].x+y>=0&&_[1].y+y>=0){var g=l.map(function(t){return s.getTilePoint(t)}),v=u.map(function(t){return s.getTilePoint(t)});o.push({tile:i,tileID:s,queryGeometry:g,cameraQueryGeometry:v,scale:m})}}},v=0;v<c.length;v++)g(v);return o},n.prototype.getVisibleCoordinates=function(t){for(var e=this,n=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),i=0,r=n;i<r.length;i+=1){var o=r[i];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return n},n.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(kt(this._source.type))for(var e in this._tiles){var n=this._tiles[e];if(void 0!==n.fadeEndTime&&n.fadeEndTime>=t.browser.now())return!0}return!1},n.prototype.setFeatureState=function(t,e,n){t=t||"_geojsonTileLayer",this._state.updateState(t,e,n)},n.prototype.removeFeatureState=function(t,e,n){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,n)},n.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},n}(t.Evented);function Ct(t,e){return t%32-e%32||e-t}function kt(t){return"raster"===t||"image"===t||"video"===t}function At(){return new t.window.Worker(Yi.workerUrl)}Pt.maxOverzooming=10,Pt.maxUnderzooming=3;var zt=function(){this.active={}};zt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<zt.workerCount;)this.workers.push(new At);return this.active[t]=!0,this.workers.slice()},zt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var Lt,Mt=Math.floor(t.browser.hardwareConcurrency/2);function It(e,n){var i={};for(var r in e)"ref"!==r&&(i[r]=e[r]);return t.refProperties.forEach(function(t){t in n&&(i[t]=n[t])}),i}function Ot(t){t=t.slice();for(var e=Object.create(null),n=0;n<t.length;n++)e[t[n].id]=t[n];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=It(t[i],e[t[i].ref]));return t}zt.workerCount=Math.max(Math.min(Mt,6),1);var Dt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Rt(t,e,n){n.push({command:Dt.addSource,args:[t,e[t]]})}function Bt(t,e,n){e.push({command:Dt.removeSource,args:[t]}),n[t]=!0}function Ft(t,e,n,i){Bt(t,n,i),Rt(t,e,n)}function Nt(e,n,i){var r;for(r in e[i])if(e[i].hasOwnProperty(r)&&"data"!==r&&!t.isEqual(e[i][r],n[i][r]))return!1;for(r in n[i])if(n[i].hasOwnProperty(r)&&"data"!==r&&!t.isEqual(e[i][r],n[i][r]))return!1;return!0}function Ut(e,n,i,r,o,a){var s;for(s in n=n||{},e=e||{})e.hasOwnProperty(s)&&(t.isEqual(e[s],n[s])||i.push({command:a,args:[r,s,n[s],o]}));for(s in n)n.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.isEqual(e[s],n[s])||i.push({command:a,args:[r,s,n[s],o]}))}function jt(t){return t.id}function Vt(t,e){return t[e.id]=e,t}var Zt=function(t,e,n){var i=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(e/n);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.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};Zt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Zt.prototype.insert=function(t,e,n,i,r){this._forEachCell(e,n,i,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(r)},Zt.prototype.insertCircle=function(t,e,n,i){this._forEachCell(e-i,n-i,e+i,n+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(n),this.circles.push(i)},Zt.prototype._insertBoxCell=function(t,e,n,i,r,o){this.boxCells[r].push(o)},Zt.prototype._insertCircleCell=function(t,e,n,i,r,o){this.circleCells[r].push(o)},Zt.prototype._query=function(t,e,n,i,r,o){if(n<0||t>this.width||i<0||e>this.height)return!r&&[];var a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=i){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],p=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-p,y1:c-p,x2:u+p,y2:c+p})}return o?a.filter(o):a}var h={hitTest:r,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,n,i,this._queryCell,a,h,o),r?a.length>0:a},Zt.prototype._queryCircle=function(t,e,n,i,r){var o=t-n,a=t+n,s=e-n,l=e+n;if(a<0||o>this.width||l<0||s>this.height)return!i&&[];var u=[],c={hitTest:i,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),i?u.length>0:u},Zt.prototype.query=function(t,e,n,i,r){return this._query(t,e,n,i,!1,r)},Zt.prototype.hitTest=function(t,e,n,i,r){return this._query(t,e,n,i,!0,r)},Zt.prototype.hitTestCircle=function(t,e,n,i){return this._queryCircle(t,e,n,!0,i)},Zt.prototype._queryCell=function(t,e,n,i,r,o,a,s){var l=a.seenUids,u=this.boxCells[r];if(null!==u)for(var c=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&n>=c[d+0]&&i>=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 y=this.circles,_=0,g=m;_<g.length;_+=1){var v=g[_];if(!l.circle[v]){l.circle[v]=!0;var x=3*v;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,n,i)&&(!s||s(this.circleKeys[v]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],E=y[x+2];o.push({key:this.circleKeys[v],x1:b-E,y1:w-E,x2:b+E,y2:w+E})}}}},Zt.prototype._queryCellCircle=function(t,e,n,i,r,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c)for(var p=this.bboxes,h=0,f=c;h<f.length;h+=1){var d=f[h];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,p[m+0],p[m+1],p[m+2],p[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[r];if(null!==y)for(var _=this.circles,g=0,v=y;g<v.length;g+=1){var x=v[g];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(_[b],_[b+1],_[b+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Zt.prototype._forEachCell=function(t,e,n,i,r,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(n),p=this._convertToYCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.xCellCount*f+h;if(r.call(this,t,e,n,i,d,o,a,s))return}},Zt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Zt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Zt.prototype._circlesCollide=function(t,e,n,i,r,o){var a=i-t,s=r-e,l=n+o;return l*l>a*a+s*s},Zt.prototype._circleAndRectCollide=function(t,e,n,i,r,o,a){var s=(o-i)/2,l=Math.abs(t-(i+s));if(l>s+n)return!1;var u=(a-r)/2,c=Math.abs(e-(r+u));if(c>u+n)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=n*n};var qt=t.properties.layout;function Gt(e,n,i,r,o){var a=t.identity(new Float32Array(16));return n?(t.identity(a),t.scale(a,a,[1/o,1/o,1]),i||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 Wt(e,n,i,r,o){var a=t.identity(new Float32Array(16));return n?(t.multiply(a,a,e),t.scale(a,a,[o,o,1]),i||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 Ht(e,n){var i=[e.x,e.y,0,1];ie(i,i,n);var r=i[3];return{point:new t.Point(i[0]/r,i[1]/r),signedDistanceFromCamera:r}}function Xt(t,e){var n=t[0]/t[3],i=t[1]/t[3];return n>=-e[0]&&n<=e[0]&&i>=-e[1]&&i<=e[1]}function Kt(e,n,i,r,o,a,s,l){var u=r?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,i.transform.zoom,qt.properties[r?"text-size":"icon-size"]),p=[256/i.width*2+1,256/i.height*2+1],h=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,y=!1,_=0;_<d.length;_++){var g=d.get(_);if(g.hidden||g.writingMode===t.WritingMode.vertical&&!y)ne(g.numGlyphs,h);else{y=!1;var v=[g.anchorX,g.anchorY,0,1];if(t.transformMat4(v,v,n),Xt(v,p)){var x=.5+v[3]/i.transform.cameraToCenterDistance*.5,b=t.evaluateSizeForFeature(u,c,g),w=s?b*x:b/x,E=new t.Point(g.anchorX,g.anchorY),T=Ht(E,o).point,S={},P=$t(g,w,!1,l,n,o,a,e.glyphOffsetArray,f,h,T,E,S,m);y=P.useVertical,(P.notEnoughRoom||y||P.needsFlipping&&$t(g,w,!0,l,n,o,a,e.glyphOffsetArray,f,h,T,E,S,m).notEnoughRoom)&&ne(g.numGlyphs,h)}else ne(g.numGlyphs,h)}}r?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function Yt(t,e,n,i,r,o,a,s,l,u,c,p){var h=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(h-1),_=te(t*m,n,i,r,o,a,s.segment,f,d,l,u,c,p);if(!_)return null;var g=te(t*y,n,i,r,o,a,s.segment,f,d,l,u,c,p);return g?{first:_,last:g}:null}function Jt(e,n,i,r){return e===t.WritingMode.horizontal&&Math.abs(i.y-n.y)>Math.abs(i.x-n.x)*r?{useVertical:!0}:(e===t.WritingMode.vertical?n.y<i.y:n.x>i.x)?{needsFlipping:!0}:null}function $t(e,n,i,r,o,a,s,l,u,c,p,h,f,d){var m,y=n/24,_=e.lineOffsetX*n,g=e.lineOffsetY*n;if(e.numGlyphs>1){var v=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Yt(y,l,_,g,i,p,h,e,u,a,f,!1);if(!w)return{notEnoughRoom:!0};var E=Ht(w.first.point,s).point,T=Ht(w.last.point,s).point;if(r&&!i){var S=Jt(e.writingMode,E,T,d);if(S)return S}m=[w.first];for(var P=e.glyphStartIndex+1;P<v-1;P++)m.push(te(y*l.getoffsetX(P),_,g,i,p,h,e.segment,x,b,u,a,f,!1));m.push(w.last)}else{if(r&&!i){var C=Ht(h,o).point,k=e.lineStartIndex+e.segment+1,A=new t.Point(u.getx(k),u.gety(k)),z=Ht(A,o),L=z.signedDistanceFromCamera>0?z.point:Qt(h,A,C,1,o),M=Jt(e.writingMode,C,L,d);if(M)return M}var I=te(y*l.getoffsetX(e.glyphStartIndex),_,g,i,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f,!1);if(!I)return{notEnoughRoom:!0};m=[I]}for(var O=0,D=m;O<D.length;O+=1){var R=D[O];t.addDynamicAttributes(c,R.point,R.angle)}return{}}function Qt(t,e,n,i,r){var o=Ht(t.add(t.sub(e)._unit()),r).point,a=n.sub(o);return n.add(a._mult(i/a.mag()))}function te(e,n,i,r,o,a,s,l,u,c,p,h,f){var d=r?e-n:e+n,m=d>0?1:-1,y=0;r&&(m*=-1,y=Math.PI),m<0&&(y+=Math.PI);for(var _=m>0?l+s:l+s+1,g=_,v=o,x=o,b=0,w=0,E=Math.abs(d);b+w<=E;){if((_+=m)<l||_>=u)return null;if(x=v,void 0===(v=h[_])){var T=new t.Point(c.getx(_),c.gety(_)),S=Ht(T,p);if(S.signedDistanceFromCamera>0)v=h[_]=S.point;else{var P=_-m;v=Qt(0===b?a:new t.Point(c.getx(P),c.gety(P)),T,x,E-b+1,p)}}b+=w,w=x.dist(v)}var C=(E-b)/w,k=v.sub(x),A=k.mult(C)._add(x);return A._add(k._unit()._perp()._mult(i*m)),{point:A,angle:y+Math.atan2(v.y-x.y,v.x-x.x),tileDistance:f?{prevTileDistance:_-m===g?0:c.gettileUnitDistanceFromAnchor(_-m),lastSegmentViewportDistance:E-b}:null}}var ee=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ne(t,e){for(var n=0;n<t;n++){var i=e.length;e.resize(i+4),e.float32.set(ee,3*i)}}function ie(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t[3]=n[3]*i+n[7]*r+n[15],t}var re=function(t,e,n){void 0===e&&(e=new Zt(t.width+200,t.height+200,25)),void 0===n&&(n=new Zt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=n,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function oe(t,e,n){t[e+4]=n?1:0}function ae(e,n,i){return n*(t.EXTENT/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}re.prototype.placeCollisionBox=function(t,e,n,i,r){var o=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),a=n*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)}},re.prototype.approximateTileDistance=function(t,e,n,i,r){var o=r?1:i/this.pitchfactor,a=t.lastSegmentViewportDistance*n;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},re.prototype.placeCollisionCircles=function(e,n,i,r,o,a,s,l,u,c,p,h,f){var d=[],m=this.projectAnchor(u,o.anchorX,o.anchorY),y=l/24,_=o.lineOffsetX*l,g=o.lineOffsetY*l,v=new t.Point(o.anchorX,o.anchorY),x=Yt(y,s,_,g,!1,Ht(v,c).point,v,o,a,c,{},!0),b=!1,w=!1,E=!0,T=m.perspectiveRatio*r,S=1/(r*i),P=0,C=0;x&&(P=this.approximateTileDistance(x.first.tileDistance,x.first.angle,S,m.cameraDistance,h),C=this.approximateTileDistance(x.last.tileDistance,x.last.angle,S,m.cameraDistance,h));for(var k=0;k<e.length;k+=5){var A=e[k],z=e[k+1],L=e[k+2],M=e[k+3];if(!x||M<-P||M>C)oe(e,k,!1);else{var I=this.projectPoint(u,A,z),O=L*T;if(d.length>0){var D=I.x-d[d.length-4],R=I.y-d[d.length-3];if(O*O*2>D*D+R*R&&k+8<e.length){var B=e[k+8];if(B>-P&&B<C){oe(e,k,!1);continue}}}var F=k/5;d.push(I.x,I.y,O,F),oe(e,k,!0);var N=I.x-O,U=I.y-O,j=I.x+O,V=I.y+O;if(E=E&&this.isOffscreen(N,U,j,V),w=w||this.isInsideGrid(N,U,j,V),!n&&this.grid.hitTestCircle(I.x,I.y,O,f)){if(!p)return{circles:[],offscreen:!1};b=!0}}}return{circles:b||!w?[]:d,offscreen:E}},re.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var n=[],i=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);i=Math.min(i,c.x),r=Math.min(r,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),n.push(c)}for(var p={},h={},f=0,d=this.grid.query(i,r,o,a).concat(this.ignoredGrid.query(i,r,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]={}),!p[y.bucketInstanceId][y.featureIndex]){var _=[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(n,_)&&(p[y.bucketInstanceId][y.featureIndex]=!0,void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]=[]),h[y.bucketInstanceId].push(y.featureIndex))}}return h},re.prototype.insertCollisionBox=function(t,e,n,i,r){var o={bucketInstanceId:n,featureIndex:i,collisionGroupID:r};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},re.prototype.insertCollisionCircles=function(t,e,n,i,r){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:n,featureIndex:i,collisionGroupID:r},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},re.prototype.projectAnchor=function(t,e,n){var i=[e,n,0,1];return ie(i,i,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5,cameraDistance:i[3]}},re.prototype.projectPoint=function(e,n,i){var r=[n,i,0,1];return ie(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)},re.prototype.projectAndGetPerspectiveRatio=function(e,n,i){var r=[n,i,0,1];return ie(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}},re.prototype.isOffscreen=function(t,e,n,i){return n<100||t>=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},re.prototype.isInsideGrid=function(t,e,n,i){return n>=0&&t<this.gridRightBoundary&&i>=0&&e<this.gridBottomBoundary};var se=function(t,e,n,i){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):i&&n?1:0,this.placed=n};se.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var le=function(t,e,n,i,r){this.text=new se(t?t.text:null,e,n,r),this.icon=new se(t?t.icon:null,e,i,r)};le.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var ue=function(t,e,n){this.text=t,this.icon=e,this.skipFade=n},ce=function(t,e,n,i,r){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=n,this.bucketIndex=i,this.tileID=r},pe=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};pe.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 he=function(t,e,n){this.transform=t.clone(),this.collisionIndex=new re(this.transform),this.placements={},this.opacities={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new pe(n)};function fe(t,e,n){t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0)}he.prototype.placeLayerTile=function(e,n,i,r){var o=n.getBucket(e),a=n.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=n.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),c=n.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(n.tileID.toUnwrapped()),h=Gt(p,"map"===l.get("text-pitch-alignment"),"map"===l.get("text-rotation-alignment"),this.transform,ae(n,1,this.transform.zoom)),f=Gt(p,"map"===l.get("icon-pitch-alignment"),"map"===l.get("icon-rotation-alignment"),this.transform,ae(n,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new ce(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,n.tileID),this.placeLayerBucket(o,p,h,f,u,c,i,n.holdingForFade(),r,s)}},he.prototype.placeLayerBucket=function(e,n,i,r,o,a,s,l,u,c){var p=e.layers[0].layout,h=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,t.properties.layout.properties["text-size"]),f=p.get("text-optional"),d=p.get("icon-optional"),m=p.get("text-allow-overlap"),y=p.get("icon-allow-overlap"),_=m&&(y||!e.hasIconData()||d),g=y&&(m||!e.hasTextData()||f),v=this.collisionGroups.get(e.sourceID);!e.collisionArrays&&c&&e.deserializeCollisionBoxes(c);for(var x=0;x<e.symbolInstances.length;x++){var b=e.symbolInstances.get(x);if(!u[b.crossTileID]){if(l){this.placements[b.crossTileID]=new ue(!1,!1,!1);continue}var w=!1,E=!1,T=!0,S=null,P=null,C=null,k=0,A=0,z=e.collisionArrays[x];z.textFeatureIndex&&(k=z.textFeatureIndex),z.textBox&&(w=(S=this.collisionIndex.placeCollisionBox(z.textBox,p.get("text-allow-overlap"),a,n,v.predicate)).box.length>0,T=T&&S.offscreen);var L=z.textCircles;if(L){var M=e.text.placedSymbolArray.get(b.horizontalPlacedTextSymbolIndex),I=t.evaluateSizeForFeature(e.textSizeData,h,M);P=this.collisionIndex.placeCollisionCircles(L,p.get("text-allow-overlap"),o,a,M,e.lineVertexArray,e.glyphOffsetArray,I,n,i,s,"map"===p.get("text-pitch-alignment"),v.predicate),w=p.get("text-allow-overlap")||P.circles.length>0,T=T&&P.offscreen}z.iconFeatureIndex&&(A=z.iconFeatureIndex),z.iconBox&&(E=(C=this.collisionIndex.placeCollisionBox(z.iconBox,p.get("icon-allow-overlap"),a,n,v.predicate)).box.length>0,T=T&&C.offscreen);var O=f||0===b.numGlyphVertices&&0===b.numVerticalGlyphVertices,D=d||0===b.numIconVertices;O||D?D?O||(E=E&&w):w=E&&w:E=w=E&&w,w&&S&&this.collisionIndex.insertCollisionBox(S.box,p.get("text-ignore-placement"),e.bucketInstanceId,k,v.ID),E&&C&&this.collisionIndex.insertCollisionBox(C.box,p.get("icon-ignore-placement"),e.bucketInstanceId,A,v.ID),w&&P&&this.collisionIndex.insertCollisionCircles(P.circles,p.get("text-ignore-placement"),e.bucketInstanceId,k,v.ID),this.placements[b.crossTileID]=new ue(w||_,E||g,T||e.justReloaded),u[b.crossTileID]=!0}}e.justReloaded=!1},he.prototype.commit=function(t,e){this.commitTime=e;var n=!1,i=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 le(s,i,a.text,a.icon),n=n||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new le(null,i,a.text,a.icon,a.skipFade),n=n||a.text||a.icon)}for(var l in r){var u=r[l];if(!this.opacities[l]){var c=new le(u,i,!1,!1);c.isHidden()||(this.opacities[l]=c,n=n||u.text.placed||u.icon.placed)}}n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},he.prototype.updateLayerOpacities=function(t,e){for(var n={},i=0,r=e;i<r.length;i+=1){var o=r[i],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,n,o.collisionBoxArray)}},he.prototype.updateBucketOpacities=function(t,e,n){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 i=t.layers[0].layout,r=new le(null,0,!1,!1,!0),o=i.get("text-allow-overlap"),a=i.get("icon-allow-overlap"),s=new le(null,0,o&&(a||!t.hasIconData()||i.get("icon-optional")),a&&(o||!t.hasTextData()||i.get("text-optional")),!0);!t.collisionArrays&&n&&(t.hasCollisionBoxData()||t.hasCollisionCircleData())&&t.deserializeCollisionBoxes(n);for(var l=0;l<t.symbolInstances.length;l++){var u=t.symbolInstances.get(l),c=e[u.crossTileID],p=this.opacities[u.crossTileID];c?p=r:p||(p=s,this.opacities[u.crossTileID]=p),e[u.crossTileID]=!0;var h=u.numGlyphVertices>0||u.numVerticalGlyphVertices>0,f=u.numIconVertices>0;if(h){for(var d=be(p.text),m=(u.numGlyphVertices+u.numVerticalGlyphVertices)/4,y=0;y<m;y++)t.text.opacityVertexArray.emplaceBack(d);t.text.placedSymbolArray.get(u.horizontalPlacedTextSymbolIndex).hidden=p.text.isHidden(),u.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(u.verticalPlacedTextSymbolIndex).hidden=p.text.isHidden())}if(f){for(var _=be(p.icon),g=0;g<u.numIconVertices/4;g++)t.icon.opacityVertexArray.emplaceBack(_);t.icon.placedSymbolArray.get(l).hidden=p.icon.isHidden()}if(t.hasCollisionBoxData()||t.hasCollisionCircleData()){var v=t.collisionArrays[l];if(v){v.textBox&&fe(t.collisionBox.collisionVertexArray,p.text.placed,!1),v.iconBox&&fe(t.collisionBox.collisionVertexArray,p.icon.placed,!1);var x=v.textCircles;if(x&&t.hasCollisionCircleData())for(var b=0;b<x.length;b+=5){var w=c||0===x[b+4];fe(t.collisionCircle.collisionVertexArray,p.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)},he.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},he.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},he.prototype.stillRecent=function(t){return this.commitTime+this.fadeDuration>t},he.prototype.setStale=function(){this.stale=!0};var de=Math.pow(2,25),me=Math.pow(2,24),ye=Math.pow(2,17),_e=Math.pow(2,16),ge=Math.pow(2,9),ve=Math.pow(2,8),xe=Math.pow(2,1);function be(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*de+e*me+n*ye+e*_e+n*ge+e*ve+n*xe+e}var we=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};we.prototype.continuePlacement=function(t,e,n,i,r){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(i,o,n,this._seenCrossTileIDs),this._currentTileIndex++,r())return!0}};var Ee=function(t,e,n,i,r,o){this.placement=new he(t,r,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=i,this._done=!1};Ee.prototype.isDone=function(){return this._done},Ee.prototype.continuePlacement=function(e,n,i){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=n[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new we),this._inProgressLayer.continuePlacement(i[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ee.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var Te=512/t.EXTENT/2,Se=function(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var i=0;i<e.length;i++){var r=e.get(i),o=r.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:r.crossTileID,coord:this.getScaledCoordinates(r,t)})}};Se.prototype.getScaledCoordinates=function(e,n){var i=n.canonical.z-this.tileID.canonical.z,r=Te/Math.pow(2,i);return{x:Math.floor((n.canonical.x*t.EXTENT+e.anchorX)*r),y:Math.floor((n.canonical.y*t.EXTENT+e.anchorY)*r)}},Se.prototype.findMatches=function(t,e,n){for(var i=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)<=i&&Math.abs(c.coord.y-s.y)<=i&&!n[c.crossTileID]){n[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};var Pe=function(){this.maxCrossTileID=0};Pe.prototype.generate=function(){return++this.maxCrossTileID};var Ce=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Ce.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var n in this.indexes){var i=this.indexes[n],r={};for(var o in i){var a=i[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),r[a.tileID.key]=a}this.indexes[n]=r}this.lng=t},Ce.prototype.addBucket=function(t,e,n){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 i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).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 p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=n.generate(),r[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Se(t,e.symbolInstances,e.bucketInstanceId),!0},Ce.prototype.removeBucketCrossTileIDs=function(t,e){for(var n in e.indexedSymbolInstances)for(var i=0,r=e.indexedSymbolInstances[n];i<r.length;i+=1){var o=r[i];delete this.usedCrossTileIDs[t][o.crossTileID]}},Ce.prototype.removeStaleBuckets=function(t){var e=!1;for(var n in this.indexes){var i=this.indexes[n];for(var r in i)t[i[r].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,i[r]),delete i[r],e=!0)}return e};var ke=function(){this.layerIndexes={},this.crossTileIDs=new Pe,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};ke.prototype.addLayer=function(t,e,n){var i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new Ce);var r=!1,o={};i.handleWrapJump(n);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),i.addBucket(l.tileID,u,this.crossTileIDs)&&(r=!0),o[u.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(r=!0),r},ke.prototype.pruneUnusedLayers=function(t){var e={};for(var n in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[n]||delete this.layerIndexes[n]};var Ae=function(e,n){return t.emitValidationErrors(e,n&&n.filter(function(t){return"source.canvas"!==t.identifier}))},ze=t.pick(Dt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Le=t.pick(Dt,["setCenter","setZoom","setBearing","setPitch"]),Me=function(e){function n(i,r){var o=this;void 0===r&&(r={}),e.call(this),this.map=i,this.dispatcher=new w((Lt||(Lt=new zt),Lt),this),this.imageManager=new p,this.glyphManager=new _(i._transformRequest,r.localIdeographFontFamily),this.lineAtlas=new b(256,512),this.crossTileSymbolIndex=new ke,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=n.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=o.sourceCaches[t.sourceId];if(e){var n=e.getSource();if(n&&n.vectorLayerIds)for(var i in o._layers){var r=o._layers[i];r.source===n.id&&o._validateLayer(r)}}}})}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.loadURL=function(e,n){var i=this;void 0===n&&(n={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var r="boolean"==typeof n.validate?n.validate:!t.isMapboxURL(e);e=t.normalizeStyleURL(e,n.accessToken);var o=this.map._transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,function(e,n){i._request=null,e?i.fire(new t.ErrorEvent(e)):n&&i._load(n,r)})},n.prototype.loadJSON=function(e,n){var i=this;void 0===n&&(n={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){i._request=null,i._load(e,!1!==n.validate)})},n.prototype._load=function(e,n){var i=this;if(!n||!Ae(this,t.validateStyle(e))){for(var r in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(r,e.sources[r],{validate:!1});e.sprite?this._spriteRequest=function(e,n,i){var r,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",l=t.getJSON(n(t.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),function(t,e){l=null,a||(a=t,r=e,c())}),u=t.getImage(n(t.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){u=null,a||(a=t,o=e,c())});function c(){if(a)i(a);else if(r&&o){var e=t.browser.getImageData(o),n={};for(var s in r){var l=r[s],u=l.width,c=l.height,p=l.x,h=l.y,f=l.sdf,d=l.pixelRatio,m=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,m,{x:p,y:h},{x:0,y:0},{width:u,height:c}),n[s]={data:m,pixelRatio:d,sdf:f}}i(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e.sprite,this.map._transformRequest,function(e,n){if(i._spriteRequest=null,e)i.fire(new t.ErrorEvent(e));else if(n)for(var r in n)i.imageManager.addImage(r,n[r]);i.imageManager.setLoaded(!0),i.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=Ot(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(this,{layer:{id:l.id}}),this._layers[l.id]=l}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new x(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},n.prototype._validateLayer=function(e){var n=this.sourceCaches[e.source];if(n){var i=e.sourceLayer;if(i){var r=n.getSource();("geojson"===r.type||r.vectorLayerIds&&-1===r.vectorLayerIds.indexOf(i))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+i+'" does not exist on source "'+r.id+'" as specified by style layer "'+e.id+'"')))}}},n.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()},n.prototype._serializeLayers=function(t){for(var e=[],n=0,i=t;n<i.length;n+=1){var r=i[n],o=this._layers[r];"custom"!==o.type&&e.push(o.serialize())}return e},n.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},n.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},n.prototype.update=function(e){if(this._loaded){var n=this._changed;if(this._changed){var i=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(var o in(i.length||r.length)&&this._updateWorkerLayers(i,r),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var p=c[u],h=this._layers[p];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,n&&this.fire(new t.Event("data",{dataType:"style"}))}},n.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},n.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},n.prototype.setState=function(e){var n=this;if(this._checkLoaded(),Ae(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=Ot(e.layers);var i=function(e,n){if(!e)return[{command:Dt.setStyle,args:[n]}];var i=[];try{if(!t.isEqual(e.version,n.version))return[{command:Dt.setStyle,args:[n]}];t.isEqual(e.center,n.center)||i.push({command:Dt.setCenter,args:[n.center]}),t.isEqual(e.zoom,n.zoom)||i.push({command:Dt.setZoom,args:[n.zoom]}),t.isEqual(e.bearing,n.bearing)||i.push({command:Dt.setBearing,args:[n.bearing]}),t.isEqual(e.pitch,n.pitch)||i.push({command:Dt.setPitch,args:[n.pitch]}),t.isEqual(e.sprite,n.sprite)||i.push({command:Dt.setSprite,args:[n.sprite]}),t.isEqual(e.glyphs,n.glyphs)||i.push({command:Dt.setGlyphs,args:[n.glyphs]}),t.isEqual(e.transition,n.transition)||i.push({command:Dt.setTransition,args:[n.transition]}),t.isEqual(e.light,n.light)||i.push({command:Dt.setLight,args:[n.light]});var r={},o=[];!function(e,n,i,r){var o;for(o in n=n||{},e=e||{})e.hasOwnProperty(o)&&(n.hasOwnProperty(o)||Bt(o,i,r));for(o in n)n.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.isEqual(e[o],n[o])||("geojson"===e[o].type&&"geojson"===n[o].type&&Nt(e,n,o)?i.push({command:Dt.setGeoJSONSourceData,args:[o,n[o].data]}):Ft(o,n,i,r)):Rt(o,n,i))}(e.sources,n.sources,o,r);var a=[];e.layers&&e.layers.forEach(function(t){r[t.source]?i.push({command:Dt.removeLayer,args:[t.id]}):a.push(t)}),i=i.concat(o),function(e,n,i){n=n||[];var r,o,a,s,l,u,c,p=(e=e||[]).map(jt),h=n.map(jt),f=e.reduce(Vt,{}),d=n.reduce(Vt,{}),m=p.slice(),y=Object.create(null);for(r=0,o=0;r<p.length;r++)a=p[r],d.hasOwnProperty(a)?o++:(i.push({command:Dt.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(r=0,o=0;r<h.length;r++)a=h[h.length-1-r],m[m.length-1-r]!==a&&(f.hasOwnProperty(a)?(i.push({command:Dt.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,u=m[m.length-r],i.push({command:Dt.addLayer,args:[d[a],u]}),m.splice(m.length-r,0,a),y[a]=!0);for(r=0;r<h.length;r++)if(s=f[a=h[r]],l=d[a],!y[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 Ut(s.layout,l.layout,i,a,null,Dt.setLayoutProperty),Ut(s.paint,l.paint,i,a,null,Dt.setPaintProperty),t.isEqual(s.filter,l.filter)||i.push({command:Dt.setFilter,args:[a,l.filter]}),t.isEqual(s.minzoom,l.minzoom)&&t.isEqual(s.maxzoom,l.maxzoom)||i.push({command:Dt.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.")?Ut(s[c],l[c],i,a,c.slice(6),Dt.setPaintProperty):t.isEqual(s[c],l[c])||i.push({command:Dt.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.")?Ut(s[c],l[c],i,a,c.slice(6),Dt.setPaintProperty):t.isEqual(s[c],l[c])||i.push({command:Dt.setLayerProperty,args:[a,c,l[c]]}))}else i.push({command:Dt.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],i.push({command:Dt.addLayer,args:[l,u]})}(a,n.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:Dt.setStyle,args:[n]}]}return i}(this.serialize(),e).filter(function(t){return!(t.command in Le)});if(0===i.length)return!1;var r=i.filter(function(t){return!(t.command in ze)});if(r.length>0)throw new Error("Unimplemented: "+r.map(function(t){return t.command}).join(", ")+".");return i.forEach(function(t){"setTransition"!==t.command&&n[t.command].apply(n,t.args)}),this.stylesheet=e,!0},n.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this.fire(new t.Event("data",{dataType:"style"}))},n.prototype.getImage=function(t){return this.imageManager.getImage(t)},n.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"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(e,n,i){var r=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,n,null,i))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Pt(e,n,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}},n.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},n.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},n.prototype.addLayer=function(e,n,i){void 0===i&&(i={}),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(Ae(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},i))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:r}})}var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" 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)}}},n.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var i=this._order.indexOf(e);this._order.splice(i,1);var r=n?this._order.indexOf(n):this._order.length;n&&-1===r?this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" 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.")))},n.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.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.")))},n.prototype.getLayer=function(t){return this._layers[t]},n.prototype.setLayerZoomRange=function(e,n,i){this._checkLoaded();var r=this.getLayer(e);r?r.minzoom===n&&r.maxzoom===i||(null!=n&&(r.minzoom=n),null!=i&&(r.maxzoom=i),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.")))},n.prototype.setFilter=function(e,n,i){void 0===i&&(i={}),this._checkLoaded();var r=this.getLayer(e);if(r){if(!t.isEqual(r.filter,n))return null==n?(r.filter=void 0,void this._updateLayer(r)):void(this._validate(t.validateStyle.filter,"layers."+r.id+".filter",n,null,i)||(r.filter=t.clone(n),this._updateLayer(r)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},n.prototype.setLayoutProperty=function(e,n,i,r){void 0===r&&(r={}),this._checkLoaded();var o=this.getLayer(e);o?t.isEqual(o.getLayoutProperty(n),i)||(o.setLayoutProperty(n,i,r),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(e,n){var i=this.getLayer(e);if(i)return i.getLayoutProperty(n);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(e,n,i,r){void 0===r&&(r={}),this._checkLoaded();var o=this.getLayer(e);o?t.isEqual(o.getPaintProperty(n),i)||(o.setPaintProperty(n,i,r)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},n.prototype.setFeatureState=function(e,n){this._checkLoaded();var i=e.source,r=e.sourceLayer,o=this.sourceCaches[i],a=parseInt(e.id,10);if(void 0!==o){var s=o.getSource().type;"geojson"===s&&r?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||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,n):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.")))},n.prototype.removeFeatureState=function(e,n){this._checkLoaded();var i=e.source,r=this.sourceCaches[i];if(void 0!==r){var o=r.getSource().type,a="vector"===o?e.sourceLayer:void 0,s=parseInt(e.id,10);"vector"!==o||a?e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):!n||e.id?r.removeFeatureState(a,s,n):this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):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.")))},n.prototype.getFeatureState=function(e){this._checkLoaded();var n=e.source,i=e.sourceLayer,r=this.sourceCaches[n],o=parseInt(e.id,10);if(void 0!==r)if("vector"!==r.getSource().type||i){if(!(isNaN(o)||o<0))return r.getFeatureState(i,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 '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.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})},n.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},n.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=[],n=[],i=this._order.length-1;i>=0;i--)for(var r=this._order[i],o=0,a=t;o<a.length;o+=1){var s=a[o][r];if(s)if("fill-extrusion"===this._layers[r].type)for(var l=0,u=s;l<u.length;l+=1){var c=u[l];n.push(c)}else for(var p=0,h=s;p<h.length;p+=1){var f=h[p];e.push(f.feature)}}n.sort(function(t,e){return t.intersectionZ-e.intersectionZ});for(var d=0,m=n;d<m.length;d+=1){var y=m[d];e.push(y.feature)}return e},n.prototype.queryRenderedFeatures=function(e,n,i){n&&n.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",n.filter);var r={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=n.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=[];for(var c in this.sourceCaches)n.layers&&!r[c]||u.push(I(this.sourceCaches[c],this._layers,e,n,i));return this.placement&&u.push(function(t,e,n,i,r,o){for(var a={},s=r.queryRenderedSymbols(n),l=[],u=0,c=Object.keys(s).map(Number);u<c.length;u+=1){var p=c[u];l.push(o[p])}l.sort(O);for(var h=function(){var e=d[f],n=e.featureIndex.lookupSymbolFeatures(s[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,i.filter,i.layers,t);for(var r in n){var o=a[r]=a[r]||[],l=n[r];l.sort(function(t,n){var i=e.featureSortOrder;if(i){var r=i.indexOf(t.featureIndex);return i.indexOf(n.featureIndex)-r}return n.featureIndex-t.featureIndex});for(var u=0,c=l;u<c.length;u+=1){var p=c[u];o.push(p)}}},f=0,d=l;f<d.length;f+=1)h();var m=function(n){a[n].forEach(function(i){var r=i.feature,o=t[n],a=e[o.source].getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=a})};for(var y in a)m(y);return a}(this._layers,this.sourceCaches,e,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},n.prototype.querySourceFeatures=function(e,n){n&&n.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",n.filter);var i=this.sourceCaches[e];return i?function(t,e){for(var n=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),i=[],r={},o=0;o<n.length;o++){var a=n[o],s=a.tileID.canonical.key;r[s]||(r[s]=!0,a.querySourceFeatures(i,e))}return i}(i,n):[]},n.prototype.addSourceType=function(t,e,i){return n.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(n.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},n.prototype.getLight=function(){return this.light.getLight()},n.prototype.setLight=function(e,n){void 0===n&&(n={}),this._checkLoaded();var i=this.light.getLight(),r=!1;for(var o in e)if(!t.isEqual(e[o],i[o])){r=!0;break}if(r){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,n),this.light.updateTransitions(a)}},n.prototype._validate=function(e,n,i,r,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&Ae(this,e.call(t.validateStyle,t.extend({key:n,style:this.serialize(),value:i,styleSpec:t.styleSpec},r)))},n.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()},n.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},n.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},n.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},n.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},n.prototype._updatePlacement=function(e,n,i,r){for(var o=!1,a=!1,s={},l=0,u=this._order;l<u.length;l+=1){var c=u[l],p=this._layers[c];if("symbol"===p.type){if(!s[p.source]){var h=this.sourceCaches[p.source];s[p.source]=h.getRenderableIds(!0).map(function(t){return h.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var f=this.crossTileSymbolIndex.addLayer(p,s[p.source],e.center.lng);o=o||f}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged||0===i;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now()))&&(this.pauseablePlacement=new Ee(e,this._order,d,n,i,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,y=this._order;m<y.length;m+=1){var _=y[m],g=this._layers[_];"symbol"===g.type&&this.placement.updateLayerOpacities(g,s[g.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},n.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},n.prototype.getImages=function(t,e,n){this.imageManager.getImages(e.icons,n)},n.prototype.getGlyphs=function(t,e,n){this.glyphManager.getGlyphs(e.stacks,n)},n.prototype.getResource=function(e,n,i){return t.makeRequest(n,i)},n}(t.Evented);Me.getSourceType=function(t){return z[t]},Me.setSourceType=function(t,e){z[t]=e},Me.registerForPluginAvailability=t.registerForPluginAvailability;var Ie=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Oe=sn("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),De=sn("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Re=sn("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Be=sn("#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\nvarying vec3 v_data;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\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\nvarying vec3 v_data;void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/DEVICE_PIXEL_RATIO/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Fe=sn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ne=sn("#pragma mapbox: define highp float weight\nuniform highp float u_intensity;varying vec2 v_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nuniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;const highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ue=sn("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),je=sn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=a_extrude*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Ve=sn("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),Ze=sn("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),qe=sn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),Ge=sn("#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_pos;void main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),We=sn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),He=sn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),Xe=sn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);}"),Ke=sn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\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\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\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\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));}"),Ye=sn("uniform sampler2D u_image;uniform float u_opacity;varying vec2 v_pos;void main() {gl_FragColor=texture2D(u_image,v_pos)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Je=sn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),$e=sn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Qe=sn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),tn=sn("#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nuniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;void main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),en=sn("uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\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\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);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);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);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_gl_units_to_pixels;uniform mediump float u_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\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\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\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),nn=sn("uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),rn=sn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),on=sn("uniform sampler2D u_texture;\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;\n#pragma mapbox: define lowp float opacity\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),an=sn("#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\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\nuniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;\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\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function sn(t,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i={};return{fragmentSource:t=t.replace(n,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"}),vertexSource:e=e.replace(n,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"})}}var ln=Object.freeze({prelude:Oe,background:De,backgroundPattern:Re,circle:Be,clippingMask:Fe,heatmap:Ne,heatmapTexture:Ue,collisionBox:je,collisionCircle:Ve,debug:Ze,fill:qe,fillOutline:Ge,fillOutlinePattern:We,fillPattern:He,fillExtrusion:Xe,fillExtrusionPattern:Ke,extrusionTexture:Ye,hillshadePrepare:Je,hillshade:$e,line:Qe,lineGradient:tn,linePattern:en,lineSDF:nn,raster:rn,symbolIcon:on,symbolSDF:an}),un=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};un.prototype.bind=function(t,e,n,i,r,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==i.length,u=0;!l&&u<i.length;u++)this.boundPaintVertexBuffers[u]!==i[u]&&(l=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==n||l||this.boundIndexBuffer!==r||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,n,i,r,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),r&&r.dynamicDraw&&r.bind(),s&&s.bind())},un.prototype.freshBind=function(t,e,n,i,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=n,this.boundIndexBuffer=i,this.boundVertexOffset=r,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var p=l;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var h=0,f=n;h<f.length;h+=1)f[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,r);for(var d=0,m=n;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,r)}o&&(o.bind(),o.setVertexAttribPointers(c,t,r)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,r)),u.currentNumAttributes=l},un.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var cn=function(e,n,i,r,o){var a=e.gl;this.program=a.createProgram();var s=i.defines().concat("#define DEVICE_PIXEL_RATIO "+t.browser.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var l=s.concat(Oe.fragmentSource,n.fragmentSource).join("\n"),u=s.concat(Oe.vertexSource,n.vertexSource).join("\n"),c=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(c,l),a.compileShader(c),a.attachShader(this.program,c);var p=a.createShader(a.VERTEX_SHADER);a.shaderSource(p,u),a.compileShader(p),a.attachShader(this.program,p);for(var h=i.layoutAttributes||[],f=0;f<h.length;f++)a.bindAttribLocation(this.program,f,h[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 y=a.getActiveAttrib(this.program,m);y&&(this.attributes[y.name]=a.getAttribLocation(this.program,y.name))}for(var _=a.getProgramParameter(this.program,a.ACTIVE_UNIFORMS),g=0;g<_;g++){var v=a.getActiveUniform(this.program,g);v&&(d[v.name]=a.getUniformLocation(this.program,v.name))}this.fixedUniforms=r(e,d),this.binderUniforms=i.getUniforms(e,d)};function pn(e,n,i){var r=1/ae(i,1,n.transform.tileZoom),o=Math.pow(2,i.tileID.overscaledZ),a=i.tileSize*Math.pow(2,n.transform.tileZoom)/o,s=a*(i.tileID.canonical.x+i.tileID.wrap*o),l=a*i.tileID.canonical.y;return{u_image:0,u_texsize:i.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]}}cn.prototype.draw=function(t,e,n,i,r,o,a,s,l,u,c,p,h,f,d,m){var y,_=t.gl;for(var g in t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(i),t.setColorMode(r),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[g].set(a[g]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var v=(y={},y[_.LINES]=2,y[_.TRIANGLES]=3,y[_.LINE_STRIP]=1,y)[e],x=0,b=c.get();x<b.length;x+=1){var w=b[x],E=w.vaos||(w.vaos={});(E[s]||(E[s]=new un)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,w.vertexOffset,d,m),_.drawElements(e,w.primitiveLength*v,_.UNSIGNED_SHORT,w.primitiveOffset*v*2)}};var hn=function(e,n,i){var r=n.style.light,o=r.properties.get("position"),a=[o.x,o.y,o.z],s=t.create();"viewport"===r.properties.get("anchor")&&t.fromRotation(s,-n.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:+i}},fn=function(e,n,i,r,o,a){return t.extend(hn(e,n,i),pn(o,n,a),{u_height_factor:-Math.pow(2,r.overscaledZ)/a.tileSize/8})},dn=function(e,n,i){var r=t.create$1();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:i,u_opacity:n}},mn=function(t){return{u_matrix:t}},yn=function(e,n,i,r){return t.extend(mn(e),pn(i,n,r))},_n=function(t,e){return{u_matrix:t,u_world:e}},gn=function(e,n,i,r,o){return t.extend(yn(e,n,i,r),{u_world:o})},vn=function(t,e,n,i){var r,o,a=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var s=ae(n,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"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+r,u_extrude_scale:o}},xn=function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,n.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,n.u_overscale_factor)}},bn=function(t,e,n){var i=ae(n,1,e.zoom),r=Math.pow(2,e.zoom-n.tileID.overscaledZ),o=n.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:i,u_extrude_scale:[e.pixelsToGLUnits[0]/(i*r),e.pixelsToGLUnits[1]/(i*r)],u_overscale_factor:o}},wn=function(t,e){return{u_matrix:t,u_color:e}},En=function(t){return{u_matrix:t}},Tn=function(t,e,n,i){return{u_matrix:t,u_extrude_scale:ae(e,1,n),u_intensity:i}},Sn=function(t,e,n){var i=n.paint.get("hillshade-shadow-color"),r=n.paint.get("hillshade-highlight-color"),o=n.paint.get("hillshade-accent-color"),a=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(a-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Cn(0,e.tileID),u_light:[n.paint.get("hillshade-exaggeration"),a],u_shadow:i,u_highlight:r,u_accent:o}},Pn=function(e,n){var i=e.dem.stride,r=t.create$1();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:[i,i],u_zoom:e.tileID.overscaledZ,u_maxzoom:n}};function Cn(e,n){var i=Math.pow(2,n.canonical.z),r=n.canonical.y;return[new t.MercatorCoordinate(0,r/i).toLngLat().lat,new t.MercatorCoordinate(0,(r+1)/i).toLngLat().lat]}var kn=function(t,e,n){var i=t.transform;return{u_matrix:In(t,e,n),u_ratio:1/ae(e,1,i.zoom),u_gl_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},An=function(e,n,i){return t.extend(kn(e,n,i),{u_image:0})},zn=function(e,n,i,r){var o=e.transform,a=Mn(n,o);return{u_matrix:In(e,n,i),u_texsize:n.imageAtlasTexture.size,u_ratio:1/ae(n,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]]}},Ln=function(e,n,i,r,o){var a=e.transform,s=e.lineAtlas,l=Mn(n,a),u="round"===i.layout.get("line-cap"),c=s.getDash(r.from,u),p=s.getDash(r.to,u),h=c.width*o.fromScale,f=p.width*o.toScale;return t.extend(kn(e,n,i),{u_patternscale_a:[l/h,-c.height/2],u_patternscale_b:[l/f,-p.height/2],u_sdfgamma:s.width/(256*Math.min(h,f)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:p.y,u_mix:o.t})};function Mn(t,e){return 1/ae(t,1,e.tileZoom)}function In(t,e,n){return t.translatePosMatrix(e.tileID.posMatrix,e,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var On=function(t,e,n,i,r){return{u_matrix:t,u_tl_parent:e,u_scale_parent:n,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.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:Dn(r.paint.get("raster-hue-rotate"))};var o,a};function Dn(t){t*=Math.PI/180;var e=Math.sin(t),n=Math.cos(t);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}var Rn=function(t,e,n,i,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:+n,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:+i,u_texsize:u,u_texture:0}},Bn=function(e,n,i,r,o,a,s,l,u,c,p){var h=o.transform;return t.extend(Rn(e,n,i,r,o,a,s,l,u,c),{u_gamma_scale:r?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_is_halo:+p})},Fn=function(t,e,n){return{u_matrix:t,u_opacity:e,u_color:n}},Nn=function(e,n,i,r,o,a){return t.extend(function(t,e,n,i){var r=n.imageManager.getPattern(t.from),o=n.imageManager.getPattern(t.to),a=n.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,i.tileID.overscaledZ),c=i.tileSize*Math.pow(2,n.transform.tileZoom)/u,p=c*(i.tileID.canonical.x+i.tileID.wrap*u),h=c*i.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/ae(i,1,n.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(r,a,i,o),{u_matrix:e,u_opacity:n})},Un={fillExtrusion:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient)}},fillExtrusionPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,n.u_height_factor),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},extrusionTexture:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_opacity:new t.Uniform1f(e,n.u_opacity)}},fill:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},fillPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},fillOutline:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world)}},fillOutlinePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},circle:function(e,n){return{u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},collisionBox:xn,collisionCircle:xn,debug:function(e,n){return{u_color:new t.UniformColor(e,n.u_color),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},clippingMask:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmap:function(e,n){return{u_extrude_scale:new t.Uniform1f(e,n.u_extrude_scale),u_intensity:new t.Uniform1f(e,n.u_intensity),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmapTexture:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_color_ramp:new t.Uniform1i(e,n.u_color_ramp),u_opacity:new t.Uniform1f(e,n.u_opacity)}},hillshade:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_latrange:new t.Uniform2f(e,n.u_latrange),u_light:new t.Uniform2f(e,n.u_light),u_shadow:new t.UniformColor(e,n.u_shadow),u_highlight:new t.UniformColor(e,n.u_highlight),u_accent:new t.UniformColor(e,n.u_accent)}},hillshadePrepare:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_dimension:new t.Uniform2f(e,n.u_dimension),u_zoom:new t.Uniform1f(e,n.u_zoom),u_maxzoom:new t.Uniform1f(e,n.u_maxzoom)}},line:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels)}},lineGradient:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels),u_image:new t.Uniform1i(e,n.u_image)}},linePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texsize:new t.Uniform2f(e,n.u_texsize),u_ratio:new t.Uniform1f(e,n.u_ratio),u_image:new t.Uniform1i(e,n.u_image),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},lineSDF:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,n.u_sdfgamma),u_image:new t.Uniform1i(e,n.u_image),u_tex_y_a:new t.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,n.u_tex_y_b),u_mix:new t.Uniform1f(e,n.u_mix)}},raster:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new t.Uniform2f(e,n.u_tl_parent),u_scale_parent:new t.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,n.u_buffer_scale),u_fade_t:new t.Uniform1f(e,n.u_fade_t),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image0:new t.Uniform1i(e,n.u_image0),u_image1:new t.Uniform1i(e,n.u_image1),u_brightness_low:new t.Uniform1f(e,n.u_brightness_low),u_brightness_high:new t.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,n.u_spin_weights)}},symbolIcon:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,n.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture)}},symbolSDF:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,n.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_is_halo:new t.Uniform1f(e,n.u_is_halo)}},background:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_color:new t.UniformColor(e,n.u_color)}},backgroundPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image:new t.Uniform1i(e,n.u_image),u_pattern_tl_a:new t.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,n.u_pattern_br_b),u_texsize:new t.Uniform2f(e,n.u_texsize),u_mix:new t.Uniform1f(e,n.u_mix),u_pattern_size_a:new t.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,n.u_scale_a),u_scale_b:new t.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,n.u_tile_units_to_pixels)}}};function jn(e,n){for(var i=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),r=0;r<i.length;r++){var o={},a=i[r],s=i.slice(r+1);Vn(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,n)}}function Vn(e,n,i,r,o){for(var a=0;a<i.length;a++){var s=i[a];if(r.isLessThan(s.tileID))break;if(n.key===s.tileID.key)return;if(s.tileID.isChildOf(n)){for(var l=n.children(1/0),u=0;u<l.length;u++)Vn(e,l[u],i.slice(a),r,o);return}}var c=n.overscaledZ-e.overscaledZ,p=new t.CanonicalTileID(c,n.canonical.x-(e.canonical.x<<c),n.canonical.y-(e.canonical.y<<c));o[p.key]=o[p.key]||p}function Zn(t,e,n,i,r){for(var o=t.context,a=o.gl,s=r?t.useProgram("collisionCircle"):t.useProgram("collisionBox"),l=0;l<i.length;l++){var u=i[l],c=e.getTile(u),p=c.getBucket(n);if(p){var h=r?p.collisionCircle:p.collisionBox;h&&s.draw(o,r?a.TRIANGLES:a.LINES,bt.disabled,wt.disabled,t.colorModeForRenderPass(),Tt.disabled,bn(u.posMatrix,t.transform,c),n.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,t.transform.zoom,null,null,h.collisionVertexBuffer)}}}var qn=t.identity(new Float32Array(16)),Gn=t.properties.layout;function Wn(e,n,i,r,o,a,s,l,u,c,p,h){for(var f,d,m=e.context,y=m.gl,_=e.transform,g="map"===l,v="map"===u,x=g&&"point"!==i.layout.get("symbol-placement"),b=g&&!v&&!x,w=void 0!==i.layout.get("symbol-sort-key").constantOr(1),E=e.depthModeForSublayer(0,bt.ReadOnly),T=[],S=0,P=r;S<P.length;S+=1){var C=P[S],k=n.getTile(C),A=k.getBucket(i);if(A){var z=o?A.text:A.icon;if(z&&z.segments.get().length){var L=z.programConfigurations.get(i.id),M=o||A.sdfIcons,I=o?A.textSizeData:A.iconSizeData;f||(f=e.useProgram(M?"symbolSDF":"symbolIcon",L),d=t.evaluateSizeForZoom(I,_.zoom,Gn.properties[o?"text-size":"icon-size"])),m.activeTexture.set(y.TEXTURE0);var O=void 0,D=void 0,R=void 0;if(o)D=k.glyphAtlasTexture,R=y.LINEAR,O=k.glyphAtlasTexture.size;else{var B=1!==i.layout.get("icon-size").constantOr(0)||A.iconsNeedLinear,F=v||0!==_.pitch;D=k.imageAtlasTexture,R=M||e.options.rotating||e.options.zooming||B||F?y.LINEAR:y.NEAREST,O=k.imageAtlasTexture.size}var N=ae(k,1,e.transform.zoom),U=Gt(C.posMatrix,v,g,e.transform,N),j=Wt(C.posMatrix,v,g,e.transform,N);x&&Kt(A,C.posMatrix,e,o,U,j,v,c);var V=e.translatePosMatrix(C.posMatrix,k,a,s),Z=x?qn:U,q=e.translatePosMatrix(j,k,a,s,!0),G=M&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),W={program:f,buffers:z,uniformValues:M?Bn(I.functionType,d,b,v,e,V,Z,q,o,O,!0):Rn(I.functionType,d,b,v,e,V,Z,q,o,O),atlasTexture:D,atlasInterpolation:R,isSDF:M,hasHalo:G};if(w)for(var H=0,X=z.segments.get();H<X.length;H+=1){var K=X[H];T.push({segments:new t.SegmentVector([K]),sortKey:K.sortKey,state:W})}else T.push({segments:z.segments,sortKey:0,state:W})}}}w&&T.sort(function(t,e){return t.sortKey-e.sortKey});for(var Y=0,J=T;Y<J.length;Y+=1){var $=J[Y],Q=$.state;if(Q.atlasTexture.bind(Q.atlasInterpolation,y.CLAMP_TO_EDGE),Q.isSDF){var tt=Q.uniformValues;Q.hasHalo&&(tt.u_is_halo=1,Hn(Q.buffers,$.segments,i,e,Q.program,E,p,h,tt)),tt.u_is_halo=0}Hn(Q.buffers,$.segments,i,e,Q.program,E,p,h,Q.uniformValues)}}function Hn(t,e,n,i,r,o,a,s,l){var u=i.context,c=u.gl;r.draw(u,c.TRIANGLES,o,a,s,Tt.disabled,l,n.id,t.layoutVertexBuffer,t.indexBuffer,e,n.paint,i.transform.zoom,t.programConfigurations.get(n.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function Xn(t,e,n,i,r,o,a){var s,l,u,c,p,h=t.context.gl,f=n.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=n.getCrossfadeParameters();a?(l=d&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(l=d?"fillPattern":"fill",s=h.TRIANGLES);for(var y=0,_=i;y<_.length;y+=1){var g=_[y],v=e.getTile(g);if(!d||v.patternsLoaded()){var x=v.getBucket(n);if(x){var b=x.programConfigurations.get(n.id),w=t.useProgram(l,b);d&&(t.context.activeTexture.set(h.TEXTURE0),v.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePatternPaintBuffers(m));var E=f.constantOr(null);if(E&&v.imageAtlas){var T=v.imageAtlas.patternPositions[E.to],S=v.imageAtlas.patternPositions[E.from];T&&S&&b.setConstantPatternPositions(T,S)}var P=t.translatePosMatrix(g.posMatrix,v,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(a){c=x.indexBuffer2,p=x.segments2;var C=[h.drawingBufferWidth,h.drawingBufferHeight];u="fillOutlinePattern"===l&&d?gn(P,t,m,v,C):_n(P,C)}else c=x.indexBuffer,p=x.segments,u=d?yn(P,t,m,v):mn(P);w.draw(t.context,s,r,t.stencilModeForClipping(g),o,Tt.disabled,u,n.id,x.layoutVertexBuffer,c,p,n.paint,t.transform.zoom,b)}}}}function Kn(e,n){var i=e.context,r=i.gl,o=n.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!o){var a=new t.Texture(i,{width:e.width,height:e.height,data:null},r.RGBA);a.bind(r.LINEAR,r.CLAMP_TO_EDGE),(o=n.viewportFrame=i.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture)}i.bindFramebuffer.set(o.framebuffer),o.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(i.clear({depth:1}),e.depthRboNeedsClear=!1),i.clear({color:t.Color.transparent}),i.setStencilMode(wt.disabled),i.setDepthMode(new bt(r.LEQUAL,bt.ReadWrite,[0,1])),i.setColorMode(e.colorModeForRenderPass())}function Yn(t,e,n){var i=e.viewportFrame;if(i){var r=t.context,o=r.gl;r.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,i.colorAttachment.get()),t.useProgram("extrusionTexture").draw(r,o.TRIANGLES,bt.disabled,wt.disabled,t.colorModeForRenderPass(),Tt.disabled,dn(t,n,0),e.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,e.paint,t.transform.zoom)}}function Jn(t,e,n,i,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=Sn(t,e,n);e.maskedBoundsBuffer&&e.maskedIndexBuffer&&e.segments?u.draw(a,s.TRIANGLES,i,r,o,Tt.disabled,c,n.id,e.maskedBoundsBuffer,e.maskedIndexBuffer,e.segments):u.draw(a,s.TRIANGLES,i,r,o,Tt.disabled,c,n.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function $n(e,n,i,r,o,a,s){var l=e.context,u=l.gl;if(n.dem&&n.dem.data){var c=n.dem.dim,p=n.dem.stride,h=n.dem.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||e.getTileTexture(p),n.demTexture){var f=n.demTexture;f.update(h,{premultiply:!1}),f.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else n.demTexture=new t.Texture(l,h,u.RGBA,{premultiply:!1}),n.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);var d=n.fbo;if(!d){var m=new t.Texture(l,{width:c,height:c,data:null},u.RGBA);m.bind(u.LINEAR,u.CLAMP_TO_EDGE),(d=n.fbo=l.createFramebuffer(c,c)).colorAttachment.set(m.texture)}l.bindFramebuffer.set(d.framebuffer),l.viewport.set([0,0,c,c]),e.useProgram("hillshadePrepare").draw(l,u.TRIANGLES,o,a,s,Tt.disabled,Pn(n,r),i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),n.needsHillshadePrepare=!1}}function Qn(e,n,i,r,o){var a=r.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=n?(s-n.timeAdded)/a:-1,c=i.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!n||Math.abs(n.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function ti(e,n,i){var r=e.context,o=r.gl,a=i.posMatrix,s=e.useProgram("debug"),l=bt.disabled,u=wt.disabled,c=e.colorModeForRenderPass(),p="$debug";s.draw(r,o.LINE_STRIP,l,u,c,Tt.disabled,wn(a,t.Color.red),p,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var h=function(t,e,n,i){i=i||1;var r,o,a,s,l,u,c,p,h=[];for(r=0,o=t.length;r<o;r++)if(l=ei[t[r]]){for(p=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?p=null:(u=e+l[1][a]*i,c=200-l[1][a+1]*i,p&&h.push(p.x,p.y,u,c),p={x:u,y:c});e+=l[0]*i}return h}(i.toString(),50,0,5),f=new t.StructArrayLayout2i4,d=new t.StructArrayLayout2ui4,m=0;m<h.length;m+=2)f.emplaceBack(h[m],h[m+1]),d.emplaceBack(m,m+1);for(var y=r.createVertexBuffer(f,Ie.members),_=r.createIndexBuffer(d),g=t.SegmentVector.simpleSegment(0,0,f.length/2,f.length/2),v=n.getTile(i).tileSize,x=t.EXTENT/(Math.pow(2,e.transform.zoom-i.overscaledZ)*v),b=[[-1,-1],[-1,1],[1,-1],[1,1]],w=0;w<b.length;w++){var E=b[w];s.draw(r,o.LINES,l,u,c,Tt.disabled,wn(t.translate([],a,[x*E[0],x*E[1],0]),t.Color.white),p,y,_,g)}s.draw(r,o.LINES,l,u,c,Tt.disabled,wn(a,t.Color.black),p,y,_,g)}var ei={" ":[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,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},ni={symbol:function(t,e,n,i){if("translucent"===t.renderPass){var r=wt.disabled,o=t.colorModeForRenderPass();0!==n.paint.get("icon-opacity").constantOr(1)&&Wn(t,e,n,i,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),r,o),0!==n.paint.get("text-opacity").constantOr(1)&&Wn(t,e,n,i,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),r,o),e.map.showCollisionBoxes&&function(t,e,n,i){Zn(t,e,n,i,!1),Zn(t,e,n,i,!0)}(t,e,n,i)}},circle:function(t,e,n,i){if("translucent"===t.renderPass){var r=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),a=n.paint.get("circle-stroke-opacity");if(0!==r.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1))for(var s=t.context,l=s.gl,u=t.depthModeForSublayer(0,bt.ReadOnly),c=wt.disabled,p=t.colorModeForRenderPass(),h=0;h<i.length;h++){var f=i[h],d=e.getTile(f),m=d.getBucket(n);if(m){var y=m.programConfigurations.get(n.id);t.useProgram("circle",y).draw(s,l.TRIANGLES,u,c,p,Tt.disabled,vn(t,f,d,n),n.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,n.paint,t.transform.zoom,y)}}}},heatmap:function(e,n,i,r){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=e.depthModeForSublayer(0,bt.ReadOnly),l=wt.disabled,u=new Et([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,n){var i=t.gl;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var r=n.heatmapFbo;if(r)i.bindTexture(i.TEXTURE_2D,r.colorAttachment.get()),t.bindFramebuffer.set(r.framebuffer);else{var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),r=n.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,n,i,r){var o=e.gl;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,n.width/4,n.height/4,0,o.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null),r.colorAttachment.set(i),e.extTextureHalfFloat&&o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,r.colorAttachment.setDirty(),t(e,n,i,r))}(t,e,o,r)}}(o,e,i),o.clear({color:t.Color.transparent});for(var c=0;c<r.length;c++){var p=r[c];if(!n.hasRenderableParent(p)){var h=n.getTile(p),f=h.getBucket(i);if(f){var d=f.programConfigurations.get(i.id),m=e.useProgram("heatmap",d),y=e.transform.zoom;m.draw(o,a.TRIANGLES,s,l,u,Tt.disabled,Tn(p.posMatrix,h,y,i.paint.get("heatmap-intensity")),i.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,i.paint,e.transform.zoom,d)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,n){var i=e.context,r=i.gl,o=n.heatmapFbo;if(o){i.activeTexture.set(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(r.TEXTURE1);var a=n.colorRampTexture;a||(a=n.colorRampTexture=new t.Texture(i,n.colorRamp,r.RGBA)),a.bind(r.LINEAR,r.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(i,r.TRIANGLES,bt.disabled,wt.disabled,e.colorModeForRenderPass(),Tt.disabled,function(e,n,i,r){var o=t.create$1();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:i,u_color_ramp:r,u_opacity:n.paint.get("heatmap-opacity")}}(e,n,0,1),n.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,n.paint,e.transform.zoom)}}(e,i))},line:function(e,n,i,r){if("translucent"===e.renderPass){var o=i.paint.get("line-opacity"),a=i.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,bt.ReadOnly),l=e.colorModeForRenderPass(),u=i.paint.get("line-dasharray"),c=i.paint.get("line-pattern"),p=c.constantOr(1),h=i.paint.get("line-gradient"),f=i.getCrossfadeParameters(),d=u?"lineSDF":p?"linePattern":h?"lineGradient":"line",m=e.context,y=m.gl,_=!0;if(h){m.activeTexture.set(y.TEXTURE0);var g=i.gradientTexture;if(!i.gradient)return;g||(g=i.gradientTexture=new t.Texture(m,i.gradient,y.RGBA)),g.bind(y.LINEAR,y.CLAMP_TO_EDGE)}for(var v=0,x=r;v<x.length;v+=1){var b=x[v],w=n.getTile(b);if(!p||w.patternsLoaded()){var E=w.getBucket(i);if(E){var T=E.programConfigurations.get(i.id),S=e.context.program.get(),P=e.useProgram(d,T),C=_||P.program!==S,k=c.constantOr(null);if(k&&w.imageAtlas){var A=w.imageAtlas.patternPositions[k.to],z=w.imageAtlas.patternPositions[k.from];A&&z&&T.setConstantPatternPositions(A,z)}var L=u?Ln(e,w,i,u,f):p?zn(e,w,i,f):h?An(e,w,i):kn(e,w,i);u&&(C||e.lineAtlas.dirty)?(m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m)):p&&(m.activeTexture.set(y.TEXTURE0),w.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),T.updatePatternPaintBuffers(f)),P.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(b),l,Tt.disabled,L,i.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,i.paint,e.transform.zoom,T),_=!1}}}}}},fill:function(e,n,i,r){var o=i.paint.get("fill-color"),a=i.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern").constantOr(1)||1!==o.constantOr(t.Color.transparent).a||1!==a.constantOr(0)?"translucent":"opaque";if(e.renderPass===l){var u=e.depthModeForSublayer(1,"opaque"===e.renderPass?bt.ReadWrite:bt.ReadOnly);Xn(e,n,i,r,u,s,!1)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var c=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,bt.ReadOnly);Xn(e,n,i,r,c,s,!0)}}},"fill-extrusion":function(t,e,n,i){if(0!==n.paint.get("fill-extrusion-opacity"))if("offscreen"===t.renderPass){Kn(t,n);var r=new bt(t.context.gl.LEQUAL,bt.ReadWrite,[0,1]),o=wt.disabled,a=t.colorModeForRenderPass();!function(t,e,n,i,r,o,a){for(var s=t.context,l=s.gl,u=n.paint.get("fill-extrusion-pattern"),c=u.constantOr(1),p=n.getCrossfadeParameters(),h=0,f=i;h<f.length;h+=1){var d=f[h],m=e.getTile(d),y=m.getBucket(n);if(y){var _=y.programConfigurations.get(n.id),g=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",_);c&&(t.context.activeTexture.set(l.TEXTURE0),m.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),_.updatePatternPaintBuffers(p));var v=u.constantOr(null);if(v&&m.imageAtlas){var x=m.imageAtlas.patternPositions[v.to],b=m.imageAtlas.patternPositions[v.from];x&&b&&_.setConstantPatternPositions(x,b)}var w=t.translatePosMatrix(d.posMatrix,m,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),E=n.paint.get("fill-extrusion-vertical-gradient"),T=c?fn(w,t,E,d,p,m):hn(w,t,E);g.draw(s,s.gl.TRIANGLES,r,o,a,Tt.backCCW,T,n.id,y.layoutVertexBuffer,y.indexBuffer,y.segments,n.paint,t.transform.zoom,_)}}}(t,e,n,i,r,o,a)}else"translucent"===t.renderPass&&Yn(t,n,n.paint.get("fill-extrusion-opacity"))},hillshade:function(t,e,n,i){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var r=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,bt.ReadOnly),s=wt.disabled,l=t.colorModeForRenderPass(),u=0,c=i;u<c.length;u+=1){var p=c[u],h=e.getTile(p);h.needsHillshadePrepare&&"offscreen"===t.renderPass?$n(t,h,n,o,a,s,l):"translucent"===t.renderPass&&Jn(t,h,n,a,s,l)}r.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,n,i){if("translucent"===t.renderPass&&0!==n.paint.get("raster-opacity"))for(var r=t.context,o=r.gl,a=e.getSource(),s=t.useProgram("raster"),l=wt.disabled,u=t.colorModeForRenderPass(),c=i.length&&i[0].overscaledZ,p=!t.options.moving,h=0,f=i;h<f.length;h+=1){var d=f[h],m=t.depthModeForSublayer(d.overscaledZ-c,1===n.paint.get("raster-opacity")?bt.ReadWrite:bt.ReadOnly,o.LESS),y=e.getTile(d),_=t.transform.calculatePosMatrix(d.toUnwrapped(),p);y.registerFadeDuration(n.paint.get("raster-fade-duration"));var g=e.findLoadedParent(d,0),v=Qn(y,g,e,n,t.transform),x=void 0,b=void 0,w="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;r.activeTexture.set(o.TEXTURE0),y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),r.activeTexture.set(o.TEXTURE1),g?(g.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,g.tileID.overscaledZ-y.tileID.overscaledZ),b=[y.tileID.canonical.x*x%1,y.tileID.canonical.y*x%1]):y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var E=On(_,b||[0,0],x||1,v,n);a instanceof A?s.draw(r,o.TRIANGLES,m,l,u,Tt.disabled,E,n.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):y.maskedBoundsBuffer&&y.maskedIndexBuffer&&y.segments?s.draw(r,o.TRIANGLES,m,l,u,Tt.disabled,E,n.id,y.maskedBoundsBuffer,y.maskedIndexBuffer,y.segments,n.paint,t.transform.zoom):s.draw(r,o.TRIANGLES,m,l,u,Tt.disabled,E,n.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,n){var i=n.paint.get("background-color"),r=n.paint.get("background-opacity");if(0!==r){var o=t.context,a=o.gl,s=t.transform,l=s.tileSize,u=n.paint.get("background-pattern");if(!t.isPatternMissing(u)){var c=u||1!==i.a||1!==r?"translucent":"opaque";if(t.renderPass===c){var p=wt.disabled,h=t.depthModeForSublayer(0,"opaque"===c?bt.ReadWrite:bt.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(u?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});u&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var y=n.getCrossfadeParameters(),_=0,g=m;_<g.length;_+=1){var v=g[_],x=t.transform.calculatePosMatrix(v.toUnwrapped()),b=u?Nn(x,r,t,u,{tileID:v,tileSize:l},y):Fn(x,r,i);d.draw(o,a.TRIANGLES,h,p,f,Tt.disabled,b,n.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,n){for(var i=0;i<n.length;i++)ti(t,e,n[i])},custom:function(t,e,n){var i=t.context,r=n.implementation;if("offscreen"===t.renderPass){var o=r.prerender;o&&(t.setCustomLayerDefaults(),o.call(r,i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState()),"3d"===r.renderingMode&&(t.setCustomLayerDefaults(),Kn(t,n),r.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass)if("3d"===r.renderingMode)Yn(t,n,1);else{t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),i.setStencilMode(wt.disabled);var a=t.depthModeForSublayer(0,bt.ReadOnly);i.setDepthMode(a),r.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState(),i.bindFramebuffer.set(null)}}},ii=function(e,n){this.context=new St(e),this.transform=n,this._tileTextures={},this.setup(),this.numSublayers=Pt.maxUnderzooming+Pt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.ProgramConfiguration,this.crossTileSymbolIndex=new ke};function ri(t,e){if(t.y>e.y){var n=t;t=e,e=n}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function oi(t,e,n,i,r){var o=Math.max(n,Math.floor(e.y0)),a=Math.min(i,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,p=e.dx<0,h=o;h<a;h++){var f=l*Math.max(0,Math.min(t.dy,h+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,h+p-e.y0))+e.x0;r(Math.floor(d),Math.ceil(f),h)}}function ai(t,e,n,i,r,o){var a,s=ri(t,e),l=ri(e,n),u=ri(n,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&&oi(u,s,i,r,o),l.dy&&oi(u,l,i,r,o)}ii.prototype.resize=function(e,n){var i=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=n*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,o=this.style._order;r<o.length;r+=1){var a=o[r];this.style._layers[a].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},ii.prototype.setup=function(){var e=this.context,n=new t.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(n,Ie.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(i,Ie.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var r=new t.StructArrayLayout4i8;r.emplaceBack(0,0,0,0),r.emplaceBack(t.EXTENT,0,t.EXTENT,0),r.emplaceBack(0,t.EXTENT,0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(r,t.rasterBoundsAttributes.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Ie.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);var l=this.context.gl;this.stencilClearMode=new wt({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},ii.prototype.clearStencil=function(){var e=this.context,n=e.gl,i=t.create$1();t.ortho(i,0,this.width,this.height,0,0,1),t.scale(i,i,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,n.TRIANGLES,bt.disabled,this.stencilClearMode,Et.disabled,Tt.disabled,En(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},ii.prototype._renderTileClippingMasks=function(t){var e=this.context,n=e.gl;e.setColorMode(Et.disabled),e.setDepthMode(bt.disabled);var i=this.useProgram("clippingMask"),r=1;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=r++;i.draw(e,n.TRIANGLES,bt.disabled,new wt({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),Et.disabled,Tt.disabled,En(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}},ii.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new wt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},ii.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Et([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Et.unblended:Et.alphaBlended},ii.prototype.depthModeForSublayer=function(t,e,n){var i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new bt(n||this.context.gl.LEQUAL,e,[i,i])},ii.prototype.render=function(e,n){this.style=e,this.options=n,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now());var i=this.style._order,r=this.style.sourceCaches;for(var o in r){var a=r[o];a.used&&a.prepare(this.context)}var s,l={},u={},c={};for(var p in r){var h=r[p];l[p]=h.getVisibleCoordinates(),u[p]=l[p].slice().reverse(),c[p]=h.getVisibleCoordinates(!0).reverse()}for(var f in r){var d=r[f],m=d.getSource();if("raster"===m.type||"raster-dem"===m.type){for(var y=[],_=0,g=l[f];_<g.length;_+=1){var v=g[_];y.push(d.getTile(v))}jn(y,this.context)}}this.renderPass="offscreen",this.depthRboNeedsClear=!0;for(var x=0,b=i;x<b.length;x+=1){var w=b[x],E=this.style._layers[w];if(E.hasOffscreenPass()&&!E.isHidden(this.transform.zoom)){var T=u[E.source];("custom"===E.type||T.length)&&this.renderLayer(this,r[E.source],E,T)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var S=this.style._layers[i[this.currentLayer]],P=r[S.source],C=l[S.source];S.source!==s&&P&&(this.clearStencil(),P.getSource().isTileClipped&&this._renderTileClippingMasks(C)),this.renderLayer(this,P,S,C),s=S.source}for(this.renderPass="translucent",this.currentLayer=0,s=null;this.currentLayer<i.length;this.currentLayer++){var k=this.style._layers[i[this.currentLayer]],A=r[k.source],z=("symbol"===k.type?c:u)[k.source];k.source!==s&&A&&(this.clearStencil(),A.getSource().isTileClipped&&this._renderTileClippingMasks(l[k.source])),this.renderLayer(this,A,k,z),s=k.source}if(this.options.showTileBoundaries)for(var L in r){ni.debug(this,r[L],l[L]);break}this.setCustomLayerDefaults()},ii.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},ii.prototype.renderLayer=function(t,e,n,i){n.isHidden(this.transform.zoom)||("background"===n.type||"custom"===n.type||i.length)&&(this.id=n.id,ni[n.type](t,e,n,i))},ii.prototype.translatePosMatrix=function(e,n,i,r,o){if(!i[0]&&!i[1])return e;var a=o?"map"===r?this.transform.angle:0:"viewport"===r?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);i=[i[0]*l-i[1]*s,i[0]*s+i[1]*l]}var u=[o?i[0]:ae(n,i[0],this.transform.zoom),o?i[1]:ae(n,i[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},ii.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},ii.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},ii.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),n=this.imageManager.getPattern(t.to);return!e||!n},ii.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new cn(this.context,ln[t],e,Un[t],this._showOverdrawInspector)),this.cache[n]},ii.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},ii.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)};var si=function(e,n,i){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===i||i,this._minZoom=e||0,this._maxZoom=n||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},li={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};si.prototype.clone=function(){var t=new si(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},li.minZoom.get=function(){return this._minZoom},li.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},li.maxZoom.get=function(){return this._maxZoom},li.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},li.renderWorldCopies.get=function(){return this._renderWorldCopies},li.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},li.worldSize.get=function(){return this.tileSize*this.scale},li.centerPoint.get=function(){return this.size._div(2)},li.size.get=function(){return new t.Point(this.width,this.height)},li.bearing.get=function(){return-this.angle/Math.PI*180},li.bearing.set=function(e){var n=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},li.pitch.get=function(){return this._pitch/Math.PI*180},li.pitch.set=function(e){var n=t.clamp(e,0,60)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},li.fov.get=function(){return this._fov/Math.PI*180},li.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},li.zoom.get=function(){return this._zoom},li.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},li.center.get=function(){return this._center},li.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},si.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},si.prototype.getVisibleUnwrappedCoordinates=function(e){var n=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new t.Point(0,0)),r=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(i.x,r.x,o.x,a.x)),l=Math.floor(Math.max(i.x,r.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&n.push(new t.UnwrappedTileID(u,e));return n},si.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),i=n;if(void 0!==e.minzoom&&n<e.minzoom)return[];void 0!==e.maxzoom&&n>e.maxzoom&&(n=e.maxzoom);var r=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,n),a=new t.Point(o*r.x-.5,o*r.y-.5);return function(e,n,i,r){void 0===r&&(r=!0);var o=1<<e,a={};function s(n,s,l){var u,c,p,h;if(l>=0&&l<=o)for(u=n;u<s;u++)c=Math.floor(u/o),p=(u%o+o)%o,0!==c&&!0!==r||(h=new t.OverscaledTileID(i,c,e,p,l),a[h.key]=h)}var l=n.map(function(e){return new t.Point(e.x,e.y)._mult(o)});return ai(l[0],l[1],l[2],0,o,s),ai(l[2],l[3],l[0],0,o,s),Object.keys(a).map(function(t){return a[t]})}(n,[this.pointCoordinate(new t.Point(0,0)),this.pointCoordinate(new t.Point(this.width,0)),this.pointCoordinate(new t.Point(this.width,this.height)),this.pointCoordinate(new t.Point(0,this.height))],e.reparseOverscaled?i:n,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},si.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},li.unmodified.get=function(){return this._unmodified},si.prototype.zoomScale=function(t){return Math.pow(2,t)},si.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},si.prototype.project=function(e){var n=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(n)*this.worldSize)},si.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},li.point.get=function(){return this.project(this.center)},si.prototype.setLocationAtPoint=function(e,n){var i=this.pointCoordinate(n),r=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(i.x-r.x),o.y-(i.y-r.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},si.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},si.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},si.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},si.prototype.coordinateLocation=function(t){return t.toLngLat()},si.prototype.pointCoordinate=function(e){var n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.transformMat4(n,n,this.pixelMatrixInverse),t.transformMat4(i,i,this.pixelMatrixInverse);var r=n[3],o=i[3],a=n[0]/r,s=i[0]/o,l=n[1]/r,u=i[1]/o,c=n[2]/r,p=i[2]/o,h=c===p?0:(0-c)/(p-c);return new t.MercatorCoordinate(t.number(a,s,h)/this.worldSize,t.number(l,u,h)/this.worldSize)},si.prototype.coordinatePoint=function(e){var n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix),new t.Point(n[0]/n[3],n[1]/n[3])},si.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},si.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},si.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},si.prototype.calculatePosMatrix=function(e,n){void 0===n&&(n=!1);var i=e.key,r=n?this._alignedPosMatrixCache:this._posMatrixCache;if(r[i])return r[i];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,n?this.alignedProjMatrix:this.projMatrix,l),r[i]=new Float32Array(l),r[i]},si.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},si.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,n,i,r,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,n=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var f=this.point,d=Math.max(n||0,e||0);if(d)return this.center=this.unproject(new t.Point(n?(l+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=f.y,y=u.y/2;m-y<o&&(r=o+y),m+y>a&&(r=a-y)}if(this.lngRange){var _=f.x,g=u.x/2;_-g<s&&(i=s+g),_+g>l&&(i=l-g)}void 0===i&&void 0===r||(this.center=this.unproject(new t.Point(void 0!==i?i:f.x,void 0!==r?r:f.y))),this._unmodified=c,this._constraining=!1}},si.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,n=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-n-e),r=this.point,o=r.x,a=r.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),l=new Float64Array(16);t.perspective(l,this._fov,this.width/this.height,1,s),t.scale(l,l,[1,-1,1]),t.translate(l,l,[0,0,-this.cameraToCenterDistance]),t.rotateX(l,l,this._pitch),t.rotateZ(l,l,this.angle),t.translate(l,l,[-o,-a,0]),this.mercatorMatrix=t.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),t.scale(l,l,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;var u=this.width%2/2,c=this.height%2/2,p=Math.cos(this.angle),h=Math.sin(this.angle),f=o-Math.round(o)+p*u+h*c,d=a-Math.round(a)+p*c+h*u,m=new Float64Array(l);if(t.translate(m,m,[f>.5?f-1:f,d>.5?d-1:d,0]),this.alignedProjMatrix=m,l=t.create$1(),t.scale(l,l,[this.width/2,-this.height/2,1]),t.translate(l,l,[1,-1,0]),this.pixelMatrix=t.multiply(new Float64Array(16),l,this.projMatrix),!(l=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}},si.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},si.prototype.getCameraPoint=function(){var e=this._pitch,n=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,n))},si.prototype.getCameraQueryGeometry=function(e){var n=this.getCameraPoint();if(1===e.length)return[e[0],n];for(var i=n.x,r=n.y,o=n.x,a=n.y,s=0,l=e;s<l.length;s+=1){var u=l[s];i=Math.min(i,u.x),r=Math.min(r,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}return[new t.Point(i,r),new t.Point(o,r),new t.Point(o,a),new t.Point(i,a),new t.Point(i,r)]},Object.defineProperties(si.prototype,li);var ui=function(){var e,n,i,r;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),n=!1,i=0,r=function(){i=0,n&&(e(),i=setTimeout(r,300),n=!1)},function(){return n=!0,i||r(),i})};ui.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},ui.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},ui.prototype.getHashString=function(t){var e=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,i=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),r=Math.pow(10,i),o=Math.round(e.lng*r)/r,a=Math.round(e.lat*r)/r,s=this._map.getBearing(),l=this._map.getPitch(),u="";return u+=t?"#/"+o+"/"+a+"/"+n:"#"+n+"/"+a+"/"+o,(s||l)&&(u+="/"+Math.round(10*s)/10),l&&(u+="/"+Math.round(l)),u},ui.prototype._onHashChange=function(){var e=t.window.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},ui.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var ci=function(e){function i(i,r,o,a){void 0===a&&(a={});var s=n.mousePos(r.getCanvasContainer(),o),l=r.unproject(s);e.call(this,i,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=r}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var r={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,r),i}(t.Event),pi=function(e){function i(i,r,o){var a=n.touchPos(r.getCanvasContainer(),o),s=a.map(function(t){return r.unproject(t)}),l=a.reduce(function(t,e,n,i){return t.add(e.div(i.length))},new t.Point(0,0)),u=r.unproject(l);e.call(this,i,{points:a,point:l,lngLats:s,lngLat:u,originalEvent:o}),this._defaultPrevented=!1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var r={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,r),i}(t.Event),hi=function(t){function e(e,n,i){t.call(this,e,{originalEvent:i}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,n),e}(t.Event),fi=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};fi.prototype.isEnabled=function(){return!!this._enabled},fi.prototype.isActive=function(){return!!this._active},fi.prototype.isZooming=function(){return!!this._zooming},fi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},fi.prototype.onWheel=function(e){if(this.isEnabled()){var n=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=t.browser.now(),r=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":r>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(r*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this.isActive()||this._start(e)),e.preventDefault()}},fi.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},fi.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var i=n.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},fi.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var n=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,r=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==r&&(r=1/r);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*r))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a="number"==typeof this._targetZoom?this._targetZoom:n.zoom,s=this._startZoom,l=this._easing,u=!1;if("wheel"===this._type&&s&&l){var c=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),p=l(c);n.zoom=t.number(s,a,p),c<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):u=!0}else n.zoom=a,u=!0;n.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),u&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},fi.prototype._smoothOutEasing=function(e){var n=t.ease;if(this._prevEase){var i=this._prevEase,r=(t.browser.now()-i.start)/i.duration,o=i.easing(r+.01)-i.easing(r),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:n},n};var di=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=n.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};di.prototype.isEnabled=function(){return!!this._enabled},di.prototype.isActive=function(){return!!this._active},di.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},di.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},di.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),n.disableDrag(),this._startPos=this._lastPos=n.mousePos(this._el,e),this._active=!0)},di.prototype._onMouseMove=function(t){var e=n.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=e,this._box||(this._box=n.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var r=Math.min(i.x,e.x),o=Math.max(i.x,e.x),a=Math.min(i.y,e.y),s=Math.max(i.y,e.y);n.setTransform(this._box,"translate("+r+"px,"+a+"px)"),this._box.style.width=o-r+"px",this._box.style.height=s-a+"px"}},di.prototype._onMouseUp=function(e){if(0===e.button){var i=this._startPos,r=n.mousePos(this._el,e);this._finish(),n.suppressClick(),i.x===r.x&&i.y===r.y?this._fireEvent("boxzoomcancel",e):this._map.fitScreenCoordinates(i,r,this._map.getBearing(),{linear:!0}).fire(new t.Event("boxzoomend",{originalEvent:e}))}},di.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},di.prototype._finish=function(){this._active=!1,t.window.document.removeEventListener("mousemove",this._onMouseMove,!1),t.window.document.removeEventListener("keydown",this._onKeyDown,!1),t.window.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos},di.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,{originalEvent:n}))};var mi=t.bezier(0,0,.25,1),yi=function(e,n){this._map=e,this._el=n.element||e.getCanvasContainer(),this._state="disabled",this._button=n.button||"right",this._bearingSnap=n.bearingSnap||0,this._pitchWithRotate=!1!==n.pitchWithRotate,t.bindAll(["onMouseDown","_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};yi.prototype.isEnabled=function(){return"disabled"!==this._state},yi.prototype.isActive=function(){return"active"===this._state},yi.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},yi.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},yi.prototype.onMouseDown=function(e){if("enabled"===this._state){if("right"===this._button){if(this._eventButton=n.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==n.mouseButton(e))return;this._eventButton=0}n.disableDrag(),t.window.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.addEventListener("mouseup",this._onMouseUp),t.window.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[t.browser.now(),this._map.getBearing()]],this._startPos=this._lastPos=n.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},yi.prototype._onMouseMove=function(t){var e=n.mousePos(this._el,t);this._lastPos.equals(e)||(this._lastMoveEvent=t,this._lastPos=e,"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},yi.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var n=this._map.transform,i=this._startPos,r=this._lastPos,o=.8*(i.x-r.x),a=-.5*(i.y-r.y),s=n.bearing-o,l=n.pitch-a,u=this._inertia,c=u[u.length-1];this._drainInertiaBuffer(),u.push([t.browser.now(),this._map._normalizeBearing(s,c[1])]),n.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",e),n.pitch=l),this._fireEvent("rotate",e),this._fireEvent("move",e),delete this._lastMoveEvent,this._startPos=this._lastPos}},yi.prototype._onMouseUp=function(t){if(n.mouseButton(t)===this._eventButton)switch(this._state){case"active":this._state="enabled",n.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case"pending":this._state="enabled",this._unbind()}},yi.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",t),this._pitchWithRotate&&this._fireEvent("pitchend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},yi.prototype._unbind=function(){t.window.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.removeEventListener("mouseup",this._onMouseUp),t.window.removeEventListener("blur",this._onBlur),n.enableDrag()},yi.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._lastPos},yi.prototype._inertialRotate=function(t){var e=this;this._fireEvent("rotateend",t),this._drainInertiaBuffer();var n=this._map,i=n.getBearing(),r=this._inertia,o=function(){Math.abs(i)<e._bearingSnap?n.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent("moveend",t),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(r.length<2)o();else{var a=r[0],s=r[r.length-1],l=r[r.length-2],u=n._normalizeBearing(i,l[1]),c=s[1]-a[1],p=c<0?-1:1,h=(s[0]-a[0])/1e3;if(0!==c&&0!==h){var f=Math.abs(c*(.25/h));f>180&&(f=180);var d=f/180;u+=p*f*(d/2),Math.abs(n._normalizeBearing(u,0))<this._bearingSnap&&(u=n._normalizeBearing(0,u)),n.rotateTo(u,{duration:1e3*d,easing:mi,noMoveStart:!0},{originalEvent:t})}else o()}},yi.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))},yi.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,n=t.browser.now();e.length>0&&n-e[0][0]>160;)e.shift()};var _i=t.bezier(0,0,.3,1),gi=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=n.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};gi.prototype.isEnabled=function(){return"disabled"!==this._state},gi.prototype.isActive=function(){return"active"===this._state},gi.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},gi.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},gi.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==n.mouseButton(e)||(n.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),n.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},gi.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(n.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),n.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},gi.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=n.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},gi.prototype._onMove=function(e){e.preventDefault();var i=n.mousePos(this._el,e);this._lastPos.equals(i)||"pending"===this._state&&i.dist(this._mouseDownPos)<this._clickTolerance||(this._lastMoveEvent=e,this._lastPos=i,this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),this._lastPos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",e),this._fireEvent("movestart",e)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},gi.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._startPos),this._lastPos),this._fireEvent("drag",t),this._fireEvent("move",t),this._startPos=this._lastPos,delete this._lastMoveEvent}},gi.prototype._onMouseUp=function(t){if(0===n.mouseButton(t))switch(this._state){case"active":this._state="enabled",n.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},gi.prototype._onTouchEnd=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},gi.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},gi.prototype._unbind=function(){n.removeEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),n.removeEventListener(t.window.document,"touchend",this._onTouchEnd),n.removeEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),n.removeEventListener(t.window.document,"mouseup",this._onMouseUp),n.removeEventListener(t.window,"blur",this._onBlur)},gi.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._mouseDownPos,delete this._lastPos},gi.prototype._inertialPan=function(t){this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent("moveend",t);else{var n=e[e.length-1],i=e[0],r=n[1].sub(i[1]),o=(n[0]-i[0])/1e3;if(0===o||n[1].equals(i[1]))this._fireEvent("moveend",t);else{var a=r.mult(.3/o),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var l=s/750,u=a.mult(-l/2);this._map.panBy(u,{duration:1e3*l,easing:_i,noMoveStart:!0},{originalEvent:t})}}},gi.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))},gi.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,n=t.browser.now();e.length>0&&n-e[0][0]>160;)e.shift()};var vi=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function xi(t){return t*(2-t)}vi.prototype.isEnabled=function(){return!!this._enabled},vi.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},vi.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},vi.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,n=0,i=0,r=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),r=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),r=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(o=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),l={duration:300,delayEndEvents:500,easing:xi,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*n,pitch:a.getPitch()+10*i,offset:[100*-r,100*-o],center:a.getCenter()};a.easeTo(l,{originalEvent:t})}};var bi=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};bi.prototype.isEnabled=function(){return!!this._enabled},bi.prototype.isActive=function(){return!!this._active},bi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},bi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},bi.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},bi.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},bi.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},bi.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var wi=t.bezier(0,0,.15,1),Ei=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};Ei.prototype.isEnabled=function(){return!!this._enabled},Ei.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},Ei.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},Ei.prototype.disableRotation=function(){this._rotationDisabled=!0},Ei.prototype.enableRotation=function(){this._rotationDisabled=!1},Ei.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var i=n.mousePos(this._el,e.touches[0]),r=n.mousePos(this._el,e.touches[1]),o=i.add(r).div(2);this._startVec=i.sub(r),this._startAround=this._map.transform.pointLocation(o),this._gestureIntent=void 0,this._inertia=[],n.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),n.addEventListener(t.window.document,"touchend",this._onEnd)}},Ei.prototype._getTouchEventData=function(t){var e=n.mousePos(this._el,t.touches[0]),i=n.mousePos(this._el,t.touches[1]),r=e.sub(i);return{vec:r,center:e.add(i).div(2),scale:r.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*r.angleWith(this._startVec)/Math.PI}},Ei.prototype._onMove=function(e){if(2===e.touches.length){var n=this._getTouchEventData(e),i=n.vec,r=n.scale,o=n.bearing;if(!this._gestureIntent){var a=this._rotationDisabled&&1!==r||Math.abs(1-r)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=i)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},Ei.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var n=this._map.transform;this._startScale||(this._startScale=n.scale,this._startBearing=n.bearing);var i=this._getTouchEventData(this._lastTouchEvent),r=i.center,o=i.bearing,a=i.scale,s=n.pointLocation(r),l=n.locationPoint(s);"rotate"===e&&(n.bearing=this._startBearing+o),n.zoom=n.scaleZoom(this._startScale*a),n.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),a,r])}},Ei.prototype._onEnd=function(e){n.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),n.removeEventListener(t.window.document,"touchend",this._onEnd);var i=this._gestureIntent,r=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,i){this._map.fire(new t.Event(i+"end",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,a=this._map;if(o.length<2)a.snapToNorth({},{originalEvent:e});else{var s=o[o.length-1],l=o[0],u=a.transform.scaleZoom(r*s[1]),c=a.transform.scaleZoom(r*l[1]),p=u-c,h=(s[0]-l[0])/1e3,f=s[2];if(0!==h&&u!==c){var d=.15*p/h;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var m=1e3*Math.abs(d/(12*.15)),y=u+d*m/2e3;y<0&&(y=0),a.easeTo({zoom:y,duration:m,easing:wi,around:this._aroundCenter?a.getCenter():a.unproject(f),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},Ei.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,n=t.browser.now();e.length>2&&n-e[0][0]>160;)e.shift()};var Ti={scrollZoom:fi,boxZoom:di,dragRotate:yi,dragPan:gi,keyboard:vi,doubleClickZoom:bi,touchZoomRotate:Ei},Si=function(e){function n(n,i){e.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getCenter=function(){return this.transform.center},n.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},n.prototype.panBy=function(e,n,i){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},n),i)},n.prototype.panTo=function(e,n,i){return this.easeTo(t.extend({center:e},n),i)},n.prototype.getZoom=function(){return this.transform.zoom},n.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},n.prototype.zoomTo=function(e,n,i){return this.easeTo(t.extend({zoom:e},n),i)},n.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},n.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},n.prototype.getBearing=function(){return this.transform.bearing},n.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},n.prototype.rotateTo=function(e,n,i){return this.easeTo(t.extend({bearing:e},n),i)},n.prototype.resetNorth=function(e,n){return this.rotateTo(0,t.extend({duration:1e3},e),n),this},n.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},n.prototype.getPitch=function(){return this.transform.pitch},n.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},n.prototype.cameraForBounds=function(e,n){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,n)},n.prototype._cameraForBoxAndBearing=function(e,n,i,r){if("number"==typeof(r=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var o=r.padding;r.padding={top:o,bottom:o,right:o,left:o}}if(t.isEqual(Object.keys(r.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"])){var a=this.transform,s=a.project(t.LngLat.convert(e)),l=a.project(t.LngLat.convert(n)),u=s.rotate(-i*Math.PI/180),c=l.rotate(-i*Math.PI/180),p=new t.Point(Math.max(u.x,c.x),Math.max(u.y,c.y)),h=new t.Point(Math.min(u.x,c.x),Math.min(u.y,c.y)),f=p.sub(h),d=(a.width-r.padding.left-r.padding.right)/f.x,m=(a.height-r.padding.top-r.padding.bottom)/f.y;if(!(m<0||d<0)){var y=Math.min(a.scaleZoom(a.scale*Math.min(d,m)),r.maxZoom),_=t.Point.convert(r.offset),g=(r.padding.left-r.padding.right)/2,v=(r.padding.top-r.padding.bottom)/2,x=new t.Point(_.x+g,_.y+v).mult(a.scale/a.zoomScale(y));return{center:a.unproject(s.add(l).div(2).sub(x)),zoom:y,bearing:i}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},n.prototype.fitBounds=function(t,e,n){return this._fitInternal(this.cameraForBounds(t,e),e,n)},n.prototype.fitScreenCoordinates=function(e,n,i,r,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(n)),i,r),r,o)},n.prototype._fitInternal=function(e,n,i){return e?(n=t.extend(e,n)).linear?this.easeTo(n,i):this.flyTo(n,i):this},n.prototype.jumpTo=function(e,n){this.stop();var i=this.transform,r=!1,o=!1,a=!1;return"zoom"in e&&i.zoom!==+e.zoom&&(r=!0,i.zoom=+e.zoom),void 0!==e.center&&(i.center=t.LngLat.convert(e.center)),"bearing"in e&&i.bearing!==+e.bearing&&(o=!0,i.bearing=+e.bearing),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.pitch=+e.pitch),this.fire(new t.Event("movestart",n)).fire(new t.Event("move",n)),r&&this.fire(new t.Event("zoomstart",n)).fire(new t.Event("zoom",n)).fire(new t.Event("zoomend",n)),o&&this.fire(new t.Event("rotatestart",n)).fire(new t.Event("rotate",n)).fire(new t.Event("rotateend",n)),a&&this.fire(new t.Event("pitchstart",n)).fire(new t.Event("pitch",n)).fire(new t.Event("pitchend",n)),this.fire(new t.Event("moveend",n))},n.prototype.easeTo=function(e,n){var i=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var r=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:o,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,p=r.centerPoint.add(t.Point.convert(e.offset)),h=r.pointLocation(p),f=t.LngLat.convert(e.center||h);this._normalizeCenter(f);var d,m,y=r.project(h),_=r.project(f).sub(y),g=r.zoomScale(l-o);return e.around&&(d=t.LngLat.convert(e.around),m=r.locationPoint(d)),this._zooming=l!==o,this._rotating=a!==u,this._pitching=c!==s,this._prepareEase(n,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(i._zooming&&(r.zoom=t.number(o,l,e)),i._rotating&&(r.bearing=t.number(a,u,e)),i._pitching&&(r.pitch=t.number(s,c,e)),d)r.setLocationAtPoint(d,m);else{var h=r.zoomScale(r.zoom-o),f=l>o?Math.min(2,g):Math.max(.5,g),v=Math.pow(f,1-e),x=r.unproject(y.add(_.mult(e*v)).mult(h));r.setLocationAtPoint(r.renderWorldCopies?x.wrap():x,p)}i._fireMoveEvents(n)},function(){e.delayEndEvents?i._easeEndTimeoutID=setTimeout(function(){return i._afterEase(n)},e.delayEndEvents):i._afterEase(n)},e),this},n.prototype._prepareEase=function(e,n){this._moving=!0,n||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},n.prototype._afterEase=function(e){var n=this._zooming,i=this._rotating,r=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,n&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),r&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},n.prototype.flyTo=function(e,n){var i=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var r=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?t.clamp(+e.zoom,r.minZoom,r.maxZoom):o,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,p=r.zoomScale(l-o),h=r.centerPoint.add(t.Point.convert(e.offset)),f=r.pointLocation(h),d=t.LngLat.convert(e.center||f);this._normalizeCenter(d);var m=r.project(f),y=r.project(d).sub(m),_=e.curve,g=Math.max(r.width,r.height),v=g/p,x=y.mag();if("minZoom"in e){var b=t.clamp(Math.min(e.minZoom,o,l),r.minZoom,r.maxZoom),w=g/r.zoomScale(b-o);_=Math.sqrt(w/x*2)}var E=_*_;function T(t){var e=(v*v-g*g+(t?-1:1)*E*E*x*x)/(2*(t?v:g)*E*x);return Math.log(Math.sqrt(e*e+1)-e)}function S(t){return(Math.exp(t)-Math.exp(-t))/2}function P(t){return(Math.exp(t)+Math.exp(-t))/2}var C=T(0),k=function(t){return P(C)/P(C+_*t)},A=function(t){return g*((P(C)*(S(e=C+_*t)/P(e))-S(C))/E)/x;var e},z=(T(1)-C)/_;if(Math.abs(x)<1e-6||!isFinite(z)){if(Math.abs(g-v)<1e-6)return this.easeTo(e,n);var L=v<g?-1:1;z=Math.abs(Math.log(v/g))/_,A=function(){return 0},k=function(t){return Math.exp(L*_*t)}}if("duration"in e)e.duration=+e.duration;else{var M="screenSpeed"in e?+e.screenSpeed/_:+e.speed;e.duration=1e3*z/M}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==u,this._pitching=c!==s,this._prepareEase(n,!1),this._ease(function(e){var p=e*z,f=1/k(p);r.zoom=1===e?l:o+r.scaleZoom(f),i._rotating&&(r.bearing=t.number(a,u,e)),i._pitching&&(r.pitch=t.number(s,c,e));var _=1===e?d:r.unproject(m.add(y.mult(A(p))).mult(f));r.setLocationAtPoint(r.renderWorldCopies?_.wrap():_,h),i._fireMoveEvents(n)},function(){return i._afterEase(n)},e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},n.prototype._ease=function(e,n,i){!1===i.animate||0===i.duration?(e(1),n()):(this._easeStart=t.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=t.wrap(e,-180,180);var i=Math.abs(e-n);return Math.abs(e-360-n)<i&&(e-=360),Math.abs(e+360-n)<i&&(e+=360),e},n.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var n=t.lng-e.center.lng;t.lng+=n>180?-360:n<-180?360:0}},n}(t.Evented),Pi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Pi.prototype.getDefaultPosition=function(){return"bottom-right"},Pi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Pi.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},Pi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:t.config.ACCESS_TOKEN}];if(e){var i=n.reduce(function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i<n.length-1?"&":"")),t},"?");e.href=t.config.FEEDBACK_URL+"/"+i+(this._map._hash?this._map._hash.getHashString(!0):"")}},Pi.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Pi.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(function(t){return"string"!=typeof t?"":t})):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var n=this._map.style.sourceCaches;for(var i in n){var r=n[i];if(r.used){var o=r.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,n){for(var i=n+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0})).length?(this._innerContainer.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},Pi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Ci=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Ci.prototype.onAdd=function(t){this._map=t,this._container=n.create("div","mapboxgl-ctrl");var e=n.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ci.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ci.prototype.getDefaultPosition=function(){return"bottom-left"},Ci.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Ci.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},Ci.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var ki=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};ki.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},ki.prototype.remove=function(t){for(var e=this._currentlyRunning,n=0,i=e?this._queue.concat(e):this._queue;n<i.length;n+=1){var r=i[n];if(r.id===t)return void(r.cancelled=!0)}},ki.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,n=t;e<n.length;e+=1){var i=n[e];if(!i.cancelled&&(i.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},ki.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Ai=t.window.HTMLImageElement,zi=t.window.HTMLElement,Li={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,clickTolerance:3,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},Mi=function(i){function r(e){var r=this;if(null!=(e=t.extend({},Li,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var o=new si(e.minZoom,e.maxZoom,e.renderWorldCopies);i.call(this,o,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new ki,this._controls=[],this._mapId=t.uniqueId();var a=e.transformRequest;if(this._transformRequest=a?function(t,e){return a(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof zi))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return r._update(!1)}),this.on("moveend",function(){return r._update(!1)}),this.on("zoom",function(){return r._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var i=t.getCanvasContainer(),r=null,o=!1,a=null;for(var s in Ti)t[s]=new Ti[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);n.addEventListener(i,"mouseout",function(e){t.fire(new ci("mouseout",t,e))}),n.addEventListener(i,"mousedown",function(r){o=!0,a=n.mousePos(i,r);var s=new ci("mousedown",t,r);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(r),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(r),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(r))}),n.addEventListener(i,"mouseup",function(e){var n=t.dragRotate.isActive();r&&!n&&t.fire(new ci("contextmenu",t,r)),r=null,o=!1,t.fire(new ci("mouseup",t,e))}),n.addEventListener(i,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var n=e.target;n&&n!==i;)n=n.parentNode;n===i&&t.fire(new ci("mousemove",t,e))}}),n.addEventListener(i,"mouseover",function(e){for(var n=e.target;n&&n!==i;)n=n.parentNode;n===i&&t.fire(new ci("mouseover",t,e))}),n.addEventListener(i,"touchstart",function(n){var i=new pi("touchstart",t,n);t.fire(i),i.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(n),t.touchZoomRotate.onStart(n),t.doubleClickZoom.onTouchStart(i))},{passive:!1}),n.addEventListener(i,"touchmove",function(e){t.fire(new pi("touchmove",t,e))},{passive:!1}),n.addEventListener(i,"touchend",function(e){t.fire(new pi("touchend",t,e))}),n.addEventListener(i,"touchcancel",function(e){t.fire(new pi("touchcancel",t,e))}),n.addEventListener(i,"click",function(r){var o=n.mousePos(i,r);(o.equals(a)||o.dist(a)<e.clickTolerance)&&t.fire(new ci("click",t,r))}),n.addEventListener(i,"dblclick",function(e){var n=new ci("dblclick",t,e);t.fire(n),n.defaultPrevented||t.doubleClickZoom.onDblClick(n)}),n.addEventListener(i,"contextmenu",function(e){var n=t.dragRotate.isActive();o||n?o&&(r=e):t.fire(new ci("contextmenu",t,e)),(t.dragRotate.isEnabled()||t.listens("contextmenu"))&&e.preventDefault()}),n.addEventListener(i,"wheel",function(n){e.interactive&&t.stop();var i=new hi("wheel",t,n);t.fire(i),i.defaultPrevented||t.scrollZoom.onWheel(n)},{passive:!1})}(this,e),this._hash=e.hash&&(new ui).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Pi({customAttribution:e.customAttribution})),this.addControl(new Ci,e.logoPosition),this.on("style.load",function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)}),this.on("data",function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))}),this.on("dataloading",function(e){r.fire(new t.Event(e.dataType+"dataloading",e))})}i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r;var o={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return r.prototype._getMapId=function(){return this._mapId},r.prototype.addControl=function(e,n){if(void 0===n&&e.getDefaultPosition&&(n=e.getDefaultPosition()),void 0===n&&(n="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var r=this._controlPositions[n];return-1!==n.indexOf("bottom")?r.insertBefore(i,r.firstChild):r.appendChild(i),this},r.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this},r.prototype.resize=function(e){var n=this._containerDimensions(),i=n[0],r=n[1];return this._resizeCanvas(i,r),this.transform.resize(i,r),this.painter.resize(i,r),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},r.prototype.getBounds=function(){return this.transform.getBounds()},r.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},r.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},r.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},r.prototype.getMinZoom=function(){return this.transform.minZoom},r.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},r.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},r.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},r.prototype.getMaxZoom=function(){return this.transform.maxZoom},r.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},r.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},r.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},r.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},r.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},r.prototype.on=function(t,e,n){var r=this;if(void 0===n)return i.prototype.on.call(this,t,e);var o=function(){var i;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){var a=r.getLayer(e)?r.queryRenderedFeatures(i.point,{layers:[e]}):[];a.length?o||(o=!0,n.call(r,new ci(t,r,i.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){(r.getLayer(e)?r.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,n.call(r,new ci(t,r,i.originalEvent)))},mouseout:function(e){a&&(a=!1,n.call(r,new ci(t,r,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(i={},i[t]=function(t){var i=r.getLayer(e)?r.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,n.call(r,t),delete t.features)},i)}}();for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)this.on(a,o.delegates[a]);return this},r.prototype.off=function(t,e,n){if(void 0===n)return i.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var r=this._delegatedListeners[t],o=0;o<r.length;o++){var a=r[o];if(a.layer===e&&a.listener===n){for(var s in a.delegates)this.off(s,a.delegates[s]);return r.splice(o,1),this}}return this},r.prototype.queryRenderedFeatures=function(e,n){if(!this.style)return[];var i;if(void 0!==n||void 0===e||e instanceof t.Point||Array.isArray(e)||(n=e,e=void 0),n=n||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])i=[t.Point.convert(e)];else{var r=t.Point.convert(e[0]),o=t.Point.convert(e[1]);i=[r,new t.Point(o.x,r.y),o,new t.Point(r.x,o.y),r]}return this.style.queryRenderedFeatures(i,n,this.transform)},r.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},r.prototype.setStyle=function(t,e){return(!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t?(this._diffStyle(t,e),this):this._updateStyle(t,e)},r.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new Me(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},r.prototype._diffStyle=function(e,n){var i=this;if("string"==typeof e){var r=t.normalizeStyleURL(e),o=this._transformRequest(r,t.ResourceType.Style);t.getJSON(o,function(e,r){e?i.fire(new t.ErrorEvent(e)):r&&i._updateDiff(r,n)})}else"object"==typeof e&&this._updateDiff(e,n)},r.prototype._updateDiff=function(e,n){try{this.style.setState(e)&&this._update(!0)}catch(i){t.warnOnce("Unable to perform style diff: "+(i.message||i.error||i)+".  Rebuilding the style from scratch."),this._updateStyle(e,n)}},r.prototype.getStyle=function(){if(this.style)return this.style.serialize()},r.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},r.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0)},r.prototype.isSourceLoaded=function(e){var n=this.style&&this.style.sourceCaches[e];if(void 0!==n)return n.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},r.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var n=t[e]._tiles;for(var i in n){var r=n[i];if("loaded"!==r.state&&"errored"!==r.state)return!1}}return!0},r.prototype.addSourceType=function(t,e,n){return this.style.addSourceType(t,e,n)},r.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},r.prototype.getSource=function(t){return this.style.getSource(t)},r.prototype.addImage=function(e,n,i){void 0===i&&(i={});var r=i.pixelRatio;void 0===r&&(r=1);var o=i.sdf;if(void 0===o&&(o=!1),n instanceof Ai){var a=t.browser.getImageData(n),s=a.width,l=a.height,u=a.data;this.style.addImage(e,{data:new t.RGBAImage({width:s,height:l},u),pixelRatio:r,sdf:o})}else{if(void 0===n.width||void 0===n.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=n.width,p=n.height,h=n.data;this.style.addImage(e,{data:new t.RGBAImage({width:c,height:p},new Uint8Array(h)),pixelRatio:r,sdf:o})}},r.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},r.prototype.removeImage=function(t){this.style.removeImage(t)},r.prototype.loadImage=function(e,n){t.getImage(this._transformRequest(e,t.ResourceType.Image),n)},r.prototype.listImages=function(){return this.style.listImages()},r.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0)},r.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},r.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},r.prototype.getLayer=function(t){return this.style.getLayer(t)},r.prototype.setFilter=function(t,e,n){return void 0===n&&(n={}),this.style.setFilter(t,e,n),this._update(!0)},r.prototype.setLayerZoomRange=function(t,e,n){return this.style.setLayerZoomRange(t,e,n),this._update(!0)},r.prototype.getFilter=function(t){return this.style.getFilter(t)},r.prototype.setPaintProperty=function(t,e,n,i){return void 0===i&&(i={}),this.style.setPaintProperty(t,e,n,i),this._update(!0)},r.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},r.prototype.setLayoutProperty=function(t,e,n,i){return void 0===i&&(i={}),this.style.setLayoutProperty(t,e,n,i),this._update(!0)},r.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},r.prototype.setLight=function(t,e){return void 0===e&&(e={}),this.style.setLight(t,e),this._update(!0)},r.prototype.getLight=function(){return this.style.getLight()},r.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},r.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},r.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},r.prototype.getContainer=function(){return this._container},r.prototype.getCanvasContainer=function(){return this._canvasContainer},r.prototype.getCanvas=function(){return this._canvas},r.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},r.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},r.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=n.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=n.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=n.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var r=this._controlContainer=n.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){o[t]=n.create("div","mapboxgl-ctrl-"+t,r)})},r.prototype._resizeCanvas=function(e,n){var i=t.window.devicePixelRatio||1;this._canvas.width=i*e,this._canvas.height=i*n,this._canvas.style.width=e+"px",this._canvas.style.height=n+"px"},r.prototype._setupPainter=function(){var n=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),i=this._canvas.getContext("webgl",n)||this._canvas.getContext("experimental-webgl",n);i?(this.painter=new ii(i,this.transform),t.webpSupported.testSupport(i)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},r.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},r.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},r.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},r.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},r.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},r.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},r.prototype._render=function(){this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var n=this.transform.zoom,i=t.browser.now();this.style.zoomHistory.update(n,i);var r=new t.EvaluationParameters(n,{now:i,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=r.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(r)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),this},r.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,n=this._controls;e<n.length;e+=1)n[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var i=this.painter.context.gl.getExtension("WEBGL_lose_context");i&&i.loseContext(),Ii(this._canvasContainer),Ii(this._controlContainer),Ii(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this.fire(new t.Event("remove"))},r.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(){e._frame=null,e._render()}))},r.prototype._onWindowOnline=function(){this._update()},r.prototype._onWindowResize=function(){this._trackResize&&this.resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},Object.defineProperties(r.prototype,o),r}(Si);function Ii(t){t.parentNode&&t.parentNode.removeChild(t)}var Oi={showCompass:!0,showZoom:!0},Di=function(e){var i=this;this.options=t.extend({},Oi,e),this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom in",function(){return i._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom out",function(){return i._map.zoomOut()})),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset bearing to north",function(){return i._map.resetNorth()}),this._compassArrow=n.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};function Ri(e,n,i){if(e=new t.LngLat(e.lng,e.lat),n){var r=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=i.locationPoint(e).distSqr(n);i.locationPoint(r).distSqr(n)<a?e=r:i.locationPoint(o).distSqr(n)<a&&(e=o)}for(;Math.abs(e.lng-i.center.lng)>180;){var s=i.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=i.width&&s.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}Di.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Di.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new yi(t,{button:"left",element:this._compass}),n.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Di.prototype.onRemove=function(){n.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),n.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Di.prototype._createButton=function(t,e,i){var r=n.create("button",t,this._container);return r.type="button",r.title=e,r.setAttribute("aria-label",e),r.addEventListener("click",i),r};var Bi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Fi(t,e,n){var i=t.classList;for(var r in Bi)i.remove("mapboxgl-"+n+"-anchor-"+r);i.add("mapboxgl-"+n+"-anchor-"+e)}var Ni,Ui=function(e){function i(i,r){if(e.call(this),(i instanceof t.window.HTMLElement||r)&&(i=t.extend({element:i},r)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._draggable=i&&i.draggable||!1,this._state="inactive",i&&i.element)this._element=i.element,this._offset=t.Point.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");var o=n.createNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"height","41px"),o.setAttributeNS(null,"width","27px"),o.setAttributeNS(null,"viewBox","0 0 27 41");var a=n.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");var s=n.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=n.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];u<c.length;u+=1){var p=c[u],h=n.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",p.rx),h.setAttributeNS(null,"ry",p.ry),l.appendChild(h)}var f=n.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"fill",this._color);var d=n.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),f.appendChild(d);var m=n.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var y=n.createNS("http://www.w3.org/2000/svg","path");y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(y);var _=n.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_.setAttributeNS(null,"fill","#FFFFFF");var g=n.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"transform","translate(8.0, 8.0)");var v=n.createNS("http://www.w3.org/2000/svg","circle");v.setAttributeNS(null,"fill","#000000"),v.setAttributeNS(null,"opacity","0.25"),v.setAttributeNS(null,"cx","5.5"),v.setAttributeNS(null,"cy","5.5"),v.setAttributeNS(null,"r","5.4999962");var x=n.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),g.appendChild(v),g.appendChild(x),s.appendChild(l),s.appendChild(f),s.appendChild(m),s.appendChild(_),s.appendChild(g),o.appendChild(s),this._element.appendChild(o),this._offset=t.Point.convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._popup=null}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},i.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},i.prototype.getElement=function(){return this._element},i.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},i.prototype._onMapClick=function(t){var e=t.originalEvent.target,n=this._element;this._popup&&(e===n||n.contains(e))&&this.togglePopup()},i.prototype.getPopup=function(){return this._popup},i.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},i.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=Ri(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),n.setTransform(this._element,Bi[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"),Fi(this._element,this._anchor,"marker"))},i.prototype.getOffset=function(){return this._offset},i.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},i.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},i.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},i.prototype.isDraggable=function(){return this._draggable},i}(t.Evented),ji={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},Vi=function(e){function i(n){e.call(this),this.options=t.extend({},ji,n),t.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i=this._setupUI,void 0!==Ni?i(Ni):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(function(t){Ni="denied"!==t.state,i(Ni)}):(Ni=!!t.window.navigator.geolocation,i(Ni)),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),n.remove(this._container),this._map=void 0},i.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()},i.prototype._updateCamera=function(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy;this._map.fitBounds(n.toBounds(i),this.options.fitBoundsOptions,{geolocateSource:!0})},i.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},i.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;!1!==e?(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=n.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ui(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new t.Event("trackuserlocationend")))})):t.warnOnce("Geolocation support is not available, the GeolocateControl will not be visible.")},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},i}(t.Evented),Zi={maxWidth:100,unit:"metric"},qi=function(e){this.options=t.extend({},Zi,e),t.bindAll(["_onMove","setUnit"],this)};function Gi(t,e,n){var i,r,o,a,s,l,u=n&&n.maxWidth||100,c=t._container.clientHeight/2,p=(i=t.unproject([0,c]),r=t.unproject([u,c]),o=Math.PI/180,a=i.lat*o,s=r.lat*o,l=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((r.lng-i.lng)*o),6371e3*Math.acos(Math.min(l,1)));if(n&&"imperial"===n.unit){var h=3.2808*p;h>5280?Wi(e,u,h/5280,"mi"):Wi(e,u,h,"ft")}else n&&"nautical"===n.unit?Wi(e,u,p/1852,"nm"):Wi(e,u,p,"m")}function Wi(t,e,n,i){var r,o,a,s=(r=n,(o=Math.pow(10,(""+Math.floor(r)).length-1))*(a=(a=r/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a))),l=s/n;"m"===i&&s>=1e3&&(s/=1e3,i="km"),t.style.width=e*l+"px",t.innerHTML=s+i}qi.prototype.getDefaultPosition=function(){return"bottom-left"},qi.prototype._onMove=function(){Gi(this._map,this._container,this.options)},qi.prototype.onAdd=function(t){return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},qi.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},qi.prototype.setUnit=function(t){this.options.unit=t,Gi(this._map,this._container,this.options)};var Hi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Hi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Hi.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Hi.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer);e.setAttribute("aria-label","Toggle fullscreen"),e.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hi.prototype._isFullscreen=function(){return this._fullscreen},Hi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},Hi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Xi={closeButton:!0,closeOnClick:!0,className:""},Ki=function(e){function i(n){e.call(this),this.options=t.extend(Object.create(Xi),n),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this.fire(new t.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._update(),this},i.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var n,i=t.window.document.createDocumentFragment(),r=t.window.document.createElement("body");for(r.innerHTML=e;n=r.firstChild;)i.appendChild(n);return this.setDOMContent(i)},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},i.prototype._update=function(){var e=this;if(this._map&&this._lngLat&&this._content){this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return e._container.classList.add(t)})),this._map.transform.renderWorldCopies&&(this._lngLat=Ri(this._lngLat,this._pos,this._map.transform));var i=this._pos=this._map.project(this._lngLat),r=this.options.anchor,o=function e(n){if(n){if("number"==typeof n){var i=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new t.Point(0,0),top:new t.Point(0,n),"top-left":new t.Point(i,i),"top-right":new t.Point(-i,i),bottom:new t.Point(0,-n),"bottom-left":new t.Point(i,-i),"bottom-right":new t.Point(-i,-i),left:new t.Point(n,0),right:new t.Point(-n,0)}}if(n instanceof t.Point||Array.isArray(n)){var r=t.Point.convert(n);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:t.Point.convert(n.center||[0,0]),top:t.Point.convert(n.top||[0,0]),"top-left":t.Point.convert(n["top-left"]||[0,0]),"top-right":t.Point.convert(n["top-right"]||[0,0]),bottom:t.Point.convert(n.bottom||[0,0]),"bottom-left":t.Point.convert(n["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(n["bottom-right"]||[0,0]),left:t.Point.convert(n.left||[0,0]),right:t.Point.convert(n.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!r){var a,s=this._container.offsetWidth,l=this._container.offsetHeight;a=i.y+o.bottom.y<l?["top"]:i.y>this._map.transform.height-l?["bottom"]:[],i.x<s/2?a.push("left"):i.x>this._map.transform.width-s/2&&a.push("right"),r=0===a.length?"bottom":a.join("-")}var u=i.add(o[r]).round();n.setTransform(this._container,Bi[r]+" translate("+u.x+"px,"+u.y+"px)"),Fi(this._container,r,"popup")}},i.prototype._onClickClose=function(){this.remove()},i}(t.Evented),Yi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:Mi,NavigationControl:Di,GeolocateControl:Vi,AttributionControl:Pi,ScaleControl:qi,FullscreenControl:Hi,Popup:Ki,Marker:Ui,Style:Me,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return zt.workerCount},set workerCount(t){zt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},workerUrl:""};return Yi}),n}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__RewireAPI__=e.__ResetDependency__=e.__set__=e.__Rewire__=e.__GetDependency__=e.__get__=e.RedBoxError=void 0;var i="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},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=m(n(6)),s=n(0),l=m(s),u=m(n(10)),c=m(n(25)),p=m(n(26)),h=m(n(9)),f=n(28),d=n(29);function m(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=e.RedBoxError=function(t){function e(t){y(this,e);var n=_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={error:null,mapped:!1},n.mapOnConstruction(t.error),n}return g(e,T("Component")),o(e,[{key:"componentDidMount",value:function(){this.state.mapped||this.mapError(this.props.error)}},{key:"mapOnConstruction",value:function(t){var e=t.stack.split("\n");if(e.length<2)this.state={error:t,mapped:!0};else if(-1!==e[1].search(/\(webpack:\/{3}/))this.state={error:t,mapped:!0};else if(-1!==e[1].search(/\(eval at/)){var n=[e.shift()],i=!0,o=!1,a=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=u.match(/(.+)\(eval at (.+) \(.+?\), .+(\:[0-9]+\:[0-9]+)\)/);if(c){var p=r(c,4),h=p[1],f=p[2],d=p[3];n.push(h+" ("+f+d+")")}else n.push(u)}}catch(t){o=!0,a=t}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}t.stack=n.join("\n"),this.state={error:t,mapped:!0}}else this.state={error:t,mapped:!1}}},{key:"mapError",value:function(t){var e=this;T("mapStackTrace")(t.stack,function(n){t.stack=n.join("\n"),e.setState({error:t,mapped:!0})})}},{key:"renderFrames",value:function(t){var e=this.props,n=e.filename,i=e.editorScheme,r=e.useLines,o=e.useColumns,a=T("assign")({},T("style"),this.props.style),s=a.frame,l=a.file,u=a.linkToFile;return t.map(function(t,e){var a=void 0,c=void 0;if(0===e&&n&&!T("isFilenameAbsolute")(t.fileName))c=T("makeUrl")(n,i),a=T("makeLinkText")(n);else{var p=r?t.lineNumber:null,h=o?t.columnNumber:null;c=T("makeUrl")(t.fileName,i,p,h),a=T("makeLinkText")(t.fileName,p,h)}return T("React").createElement("div",{style:s,key:e},T("React").createElement("div",null,t.functionName),T("React").createElement("div",{style:l},T("React").createElement("a",{href:c,style:u},a)))})}},{key:"render",value:function(){var t=this.state.error,e=this.props.className,n=T("assign")({},T("style"),this.props.style),i=n.redbox,r=n.message,o=n.stack,a=n.frame,s=void 0,l=void 0;try{s=T("ErrorStackParser").parse(t)}catch(t){l=new Error("Failed to parse stack trace. Stack trace information unavailable.")}return s=l?T("React").createElement("div",{style:a,key:0},T("React").createElement("div",null,l.message)):this.renderFrames(s),T("React").createElement("div",{style:i,className:e},T("React").createElement("div",{style:r},t.name,": ",t.message),T("React").createElement("div",{style:o},s))}}]),e}();v.propTypes={error:T("PropTypes").instanceOf(Error).isRequired,filename:T("PropTypes").string,editorScheme:T("PropTypes").string,useLines:T("PropTypes").bool,useColumns:T("PropTypes").bool,style:T("PropTypes").object,className:T("PropTypes").string},v.displayName="RedBoxError",v.defaultProps={useLines:!0,useColumns:!0};var x=function(t){function e(){return y(this,e),_(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return g(e,T("Component")),o(e,[{key:"componentDidMount",value:function(){this.el=document.createElement("div"),document.body.appendChild(this.el),this.renderRedBoxError()}},{key:"componentDidUpdate",value:function(){this.renderRedBoxError()}},{key:"componentWillUnmount",value:function(){T("ReactDOM").unmountComponentAtNode(this.el),document.body.removeChild(this.el),this.el=null}},{key:"renderRedBoxError",value:function(){T("ReactDOM").render(T("React").createElement(T("RedBoxError"),this.props),this.el)}},{key:"render",value:function(){return null}}]),e}();x.propTypes={error:T("PropTypes").instanceOf(Error).isRequired},x.displayName="RedBox",e.default=x;var b=Object.create(null),w="__INTENTIONAL_UNDEFINED__",E={};function T(t){if(void 0===b||void 0===b[t])return function(t){switch(t){case"PropTypes":return a.default;case"mapStackTrace":return d.mapStackTrace;case"assign":return h.default;case"style":return c.default;case"isFilenameAbsolute":return f.isFilenameAbsolute;case"makeUrl":return f.makeUrl;case"makeLinkText":return f.makeLinkText;case"ErrorStackParser":return p.default;case"Component":return s.Component;case"ReactDOM":return u.default;case"React":return l.default;case"RedBoxError":return v}return}(t);var e=b[t];return e===w?void 0:e}function S(t,e){if("object"!==(void 0===t?"undefined":i(t)))return b[t]=void 0===e?w:e,function(){P(t)};Object.keys(t).forEach(function(e){b[e]=t[e]})}function P(t){delete b[t]}function C(t){var e=Object.keys(t),n={};function i(){e.forEach(function(t){b[t]=n[t]})}return function(r){e.forEach(function(e){n[e]=b[e],b[e]=t[e]});var o=r();return o&&"function"==typeof o.then?o.then(i).catch(i):i(),o}}!function(){function t(t,e){Object.defineProperty(E,t,{value:e,enumerable:!1,configurable:!0})}t("__get__",T),t("__GetDependency__",T),t("__Rewire__",S),t("__set__",S),t("__reset__",P),t("__ResetDependency__",P),t("__with__",C)}();var k=void 0===x?"undefined":i(x);function A(t,e){Object.defineProperty(x,t,{value:e,enumerable:!1,configurable:!0})}"object"!==k&&"function"!==k||!Object.isExtensible(x)||(A("__get__",T),A("__GetDependency__",T),A("__Rewire__",S),A("__set__",S),A("__reset__",P),A("__ResetDependency__",P),A("__with__",C),A("__RewireAPI__",E)),e.__get__=T,e.__GetDependency__=T,e.__Rewire__=S,e.__set__=S,e.__ResetDependency__=P,e.__RewireAPI__=E},function(t,e,n){var i;
  /*!
    Copyright (c) 2017 Jed Watson.
    Licensed under the MIT License (MIT), see
    http://jedwatson.github.io/classnames
  */
  /*!
    Copyright (c) 2017 Jed Watson.
    Licensed under the MIT License (MIT), see
    http://jedwatson.github.io/classnames
  */
  !function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var i=arguments[e];if(i){var o=typeof i;if("string"===o||"number"===o)t.push(i);else if(Array.isArray(i)&&i.length){var a=r.apply(null,i);a&&t.push(a)}else if("object"===o)for(var s in i)n.call(i,s)&&i[s]&&t.push(s)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(i=function(){return r}.apply(e,[]))||(t.exports=i)}()},function(t,e,n){"use strict";var i=n(36),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(t){return i.isMemo(t)?a:s[t.$$typeof]||r}s[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,i){if("string"!=typeof n){if(d){var r=f(n);r&&r!==d&&t(e,r,i)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(e),m=l(n),y=0;y<a.length;++y){var _=a[y];if(!(o[_]||i&&i[_]||m&&m[_]||s&&s[_])){var g=h(n,_);try{u(e,_,g)}catch(t){}}}return e}return e}},function(t,e,n){"use strict";t.exports=n(38)},,function(t,e,n){"use strict";
  /** @license React v16.8.2
   * react.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */var i=n(9),r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,p=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,_="function"==typeof Symbol&&Symbol.iterator;function g(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);!function(t,e,n,i,r,o,a,s){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,o,a,s],u=0;(t=Error(e.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x={};function b(t,e,n){this.props=t,this.context=e,this.refs=x,this.updater=n||v}function w(){}function E(t,e,n){this.props=t,this.context=e,this.refs=x,this.updater=n||v}b.prototype.isReactComponent={},b.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&g("85"),this.updater.enqueueSetState(this,t,e,"setState")},b.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=b.prototype;var T=E.prototype=new w;T.constructor=E,i(T,b.prototype),T.isPureReactComponent=!0;var S={current:null},P={current:null},C=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function A(t,e,n){var i=void 0,r={},a=null,s=null;if(null!=e)for(i in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)C.call(e,i)&&!k.hasOwnProperty(i)&&(r[i]=e[i]);var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];r.children=u}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===r[i]&&(r[i]=l[i]);return{$$typeof:o,type:t,key:a,ref:s,props:r,_owner:P.current}}function z(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var L=/\/+/g,M=[];function I(t,e,n,i){if(M.length){var r=M.pop();return r.result=t,r.keyPrefix=e,r.func=n,r.context=i,r.count=0,r}return{result:t,keyPrefix:e,func:n,context:i,count:0}}function O(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>M.length&&M.push(t)}function D(t,e,n){return null==t?0:function t(e,n,i,r){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case a:l=!0}}if(l)return i(r,e,""===n?"."+R(e,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=n+R(s=e[u],u);l+=t(s,c,i,r)}else if(c=null===e||"object"!=typeof e?null:"function"==typeof(c=_&&e[_]||e["@@iterator"])?c:null,"function"==typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=t(s=s.value,c=n+R(s,u++),i,r);else"object"===s&&g("31","[object Object]"==(i=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":i,"");return l}(t,"",e,n)}function R(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function B(t,e){t.func.call(t.context,e,t.count++)}function F(t,e,n){var i=t.result,r=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?N(t,i,n,function(t){return t}):null!=t&&(z(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,r+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(L,"$&/")+"/")+n)),i.push(t))}function N(t,e,n,i,r){var o="";null!=n&&(o=(""+n).replace(L,"$&/")+"/"),D(t,F,e=I(e,o,i,r)),O(e)}function U(){var t=S.current;return null===t&&g("307"),t}var j={Children:{map:function(t,e,n){if(null==t)return t;var i=[];return N(t,i,null,e,n),i},forEach:function(t,e,n){if(null==t)return t;D(t,B,e=I(null,null,e,n)),O(e)},count:function(t){return D(t,function(){return null},null)},toArray:function(t){var e=[];return N(t,e,null,function(t){return t}),e},only:function(t){return z(t)||g("143"),t}},createRef:function(){return{current:null}},Component:b,PureComponent:E,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:p,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:f,render:t}},lazy:function(t){return{$$typeof:y,_ctor:t,_status:-1,_result:null}},memo:function(t,e){return{$$typeof:m,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return U().useCallback(t,e)},useContext:function(t,e){return U().useContext(t,e)},useEffect:function(t,e){return U().useEffect(t,e)},useImperativeHandle:function(t,e,n){return U().useImperativeHandle(t,e,n)},useDebugValue:function(){},useLayoutEffect:function(t,e){return U().useLayoutEffect(t,e)},useMemo:function(t,e){return U().useMemo(t,e)},useReducer:function(t,e,n){return U().useReducer(t,e,n)},useRef:function(t){return U().useRef(t)},useState:function(t){return U().useState(t)},Fragment:s,StrictMode:l,Suspense:d,createElement:A,cloneElement:function(t,e,n){null==t&&g("267",t);var r=void 0,a=i({},t.props),s=t.key,l=t.ref,u=t._owner;if(null!=e){void 0!==e.ref&&(l=e.ref,u=P.current),void 0!==e.key&&(s=""+e.key);var c=void 0;for(r in t.type&&t.type.defaultProps&&(c=t.type.defaultProps),e)C.call(e,r)&&!k.hasOwnProperty(r)&&(a[r]=void 0===e[r]&&void 0!==c?c[r]:e[r])}if(1===(r=arguments.length-2))a.children=n;else if(1<r){c=Array(r);for(var p=0;p<r;p++)c[p]=arguments[p+2];a.children=c}return{$$typeof:o,type:t.type,key:s,ref:l,props:a,_owner:u}},createFactory:function(t){var e=A.bind(null,t);return e.type=t,e},isValidElement:z,version:"16.8.2",unstable_ConcurrentMode:h,unstable_Profiler:u,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:S,ReactCurrentOwner:P,assign:i}},V={default:j},Z=V&&j||V;t.exports=Z.default||Z},function(t,e,n){"use strict";
  /** @license React v16.8.2
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */var i=n(0),r=n(9),o=n(21);function a(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);!function(t,e,n,i,r,o,a,s){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,o,a,s],u=0;(t=Error(e.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}i||a("227");var s=!1,l=null,u=!1,c=null,p={onError:function(t){s=!0,l=t}};function h(t,e,n,i,r,o,a,u,c){s=!1,l=null,function(t,e,n,i,r,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(t){this.onError(t)}}.apply(p,arguments)}var f=null,d={};function m(){if(f)for(var t in d){var e=d[t],n=f.indexOf(t);if(-1<n||a("96",t),!_[n])for(var i in e.extractEvents||a("97",t),_[n]=e,n=e.eventTypes){var r=void 0,o=n[i],s=e,l=i;g.hasOwnProperty(l)&&a("99",l),g[l]=o;var u=o.phasedRegistrationNames;if(u){for(r in u)u.hasOwnProperty(r)&&y(u[r],s,l);r=!0}else o.registrationName?(y(o.registrationName,s,l),r=!0):r=!1;r||a("98",i,t)}}}function y(t,e,n){v[t]&&a("100",t),v[t]=e,x[t]=e.eventTypes[n].dependencies}var _=[],g={},v={},x={},b=null,w=null,E=null;function T(t,e,n){var i=t.type||"unknown-event";t.currentTarget=E(n),function(t,e,n,i,r,o,p,f,d){if(h.apply(this,arguments),s){if(s){var m=l;s=!1,l=null}else a("198"),m=void 0;u||(u=!0,c=m)}}(i,e,void 0,t),t.currentTarget=null}function S(t,e){return null==e&&a("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function P(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var C=null;function k(t){if(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e))for(var i=0;i<e.length&&!t.isPropagationStopped();i++)T(t,e[i],n[i]);else e&&T(t,e,n);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}var A={injectEventPluginOrder:function(t){f&&a("101"),f=Array.prototype.slice.call(t),m()},injectEventPluginsByName:function(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var i=t[e];d.hasOwnProperty(e)&&d[e]===i||(d[e]&&a("102",e),d[e]=i,n=!0)}n&&m()}};function z(t,e){var n=t.stateNode;if(!n)return null;var i=b(n);if(!i)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(i=!i.disabled)||(i=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!i;break t;default:t=!1}return t?null:(n&&"function"!=typeof n&&a("231",e,typeof n),n)}function L(t){if(null!==t&&(C=S(C,t)),t=C,C=null,t&&(P(t,k),C&&a("95"),u))throw t=c,u=!1,c=null,t}var M=Math.random().toString(36).slice(2),I="__reactInternalInstance$"+M,O="__reactEventHandlers$"+M;function D(t){if(t[I])return t[I];for(;!t[I];){if(!t.parentNode)return null;t=t.parentNode}return 5===(t=t[I]).tag||6===t.tag?t:null}function R(t){return!(t=t[I])||5!==t.tag&&6!==t.tag?null:t}function B(t){if(5===t.tag||6===t.tag)return t.stateNode;a("33")}function F(t){return t[O]||null}function N(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function U(t,e,n){(e=z(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=S(n._dispatchListeners,e),n._dispatchInstances=S(n._dispatchInstances,t))}function j(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=N(e);for(e=n.length;0<e--;)U(n[e],"captured",t);for(e=0;e<n.length;e++)U(n[e],"bubbled",t)}}function V(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=z(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=S(n._dispatchListeners,e),n._dispatchInstances=S(n._dispatchInstances,t))}function Z(t){t&&t.dispatchConfig.registrationName&&V(t._targetInst,null,t)}function q(t){P(t,j)}var G=!("undefined"==typeof window||!window.document||!window.document.createElement);function W(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var H={animationend:W("Animation","AnimationEnd"),animationiteration:W("Animation","AnimationIteration"),animationstart:W("Animation","AnimationStart"),transitionend:W("Transition","TransitionEnd")},X={},K={};function Y(t){if(X[t])return X[t];if(!H[t])return t;var e,n=H[t];for(e in n)if(n.hasOwnProperty(e)&&e in K)return X[t]=n[e];return t}G&&(K=document.createElement("div").style,"AnimationEvent"in window||(delete H.animationend.animation,delete H.animationiteration.animation,delete H.animationstart.animation),"TransitionEvent"in window||delete H.transitionend.transition);var J=Y("animationend"),$=Y("animationiteration"),Q=Y("animationstart"),tt=Y("transitionend"),et="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nt=null,it=null,rt=null;function ot(){if(rt)return rt;var t,e,n=it,i=n.length,r="value"in nt?nt.value:nt.textContent,o=r.length;for(t=0;t<i&&n[t]===r[t];t++);var a=i-t;for(e=1;e<=a&&n[i-e]===r[o-e];e++);return rt=r.slice(t,1<e?1-e:void 0)}function at(){return!0}function st(){return!1}function lt(t,e,n,i){for(var r in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(r)&&((e=t[r])?this[r]=e(n):"target"===r?this.target=i:this[r]=n[r]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?at:st,this.isPropagationStopped=st,this}function ut(t,e,n,i){if(this.eventPool.length){var r=this.eventPool.pop();return this.call(r,t,e,n,i),r}return new this(t,e,n,i)}function ct(t){t instanceof this||a("279"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function pt(t){t.eventPool=[],t.getPooled=ut,t.release=ct}r(lt.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=at)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=at)},persist:function(){this.isPersistent=at},isPersistent:st,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=st,this._dispatchInstances=this._dispatchListeners=null}}),lt.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},lt.extend=function(t){function e(){}function n(){return i.apply(this,arguments)}var i=this;e.prototype=i.prototype;var o=new e;return r(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=r({},i.Interface,t),n.extend=i.extend,pt(n),n},pt(lt);var ht=lt.extend({data:null}),ft=lt.extend({data:null}),dt=[9,13,27,32],mt=G&&"CompositionEvent"in window,yt=null;G&&"documentMode"in document&&(yt=document.documentMode);var _t=G&&"TextEvent"in window&&!yt,gt=G&&(!mt||yt&&8<yt&&11>=yt),vt=String.fromCharCode(32),xt={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},bt=!1;function wt(t,e){switch(t){case"keyup":return-1!==dt.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Et(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var Tt=!1;var St={eventTypes:xt,extractEvents:function(t,e,n,i){var r=void 0,o=void 0;if(mt)t:{switch(t){case"compositionstart":r=xt.compositionStart;break t;case"compositionend":r=xt.compositionEnd;break t;case"compositionupdate":r=xt.compositionUpdate;break t}r=void 0}else Tt?wt(t,n)&&(r=xt.compositionEnd):"keydown"===t&&229===n.keyCode&&(r=xt.compositionStart);return r?(gt&&"ko"!==n.locale&&(Tt||r!==xt.compositionStart?r===xt.compositionEnd&&Tt&&(o=ot()):(it="value"in(nt=i)?nt.value:nt.textContent,Tt=!0)),r=ht.getPooled(r,e,n,i),o?r.data=o:null!==(o=Et(n))&&(r.data=o),q(r),o=r):o=null,(t=_t?function(t,e){switch(t){case"compositionend":return Et(e);case"keypress":return 32!==e.which?null:(bt=!0,vt);case"textInput":return(t=e.data)===vt&&bt?null:t;default:return null}}(t,n):function(t,e){if(Tt)return"compositionend"===t||!mt&&wt(t,e)?(t=ot(),rt=it=nt=null,Tt=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return gt&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))?((e=ft.getPooled(xt.beforeInput,e,n,i)).data=t,q(e)):e=null,null===o?e:null===e?o:[o,e]}},Pt=null,Ct=null,kt=null;function At(t){if(t=w(t)){"function"!=typeof Pt&&a("280");var e=b(t.stateNode);Pt(t.stateNode,t.type,e)}}function zt(t){Ct?kt?kt.push(t):kt=[t]:Ct=t}function Lt(){if(Ct){var t=Ct,e=kt;if(kt=Ct=null,At(t),e)for(t=0;t<e.length;t++)At(e[t])}}function Mt(t,e){return t(e)}function It(t,e,n){return t(e,n)}function Ot(){}var Dt=!1;function Rt(t,e){if(Dt)return t(e);Dt=!0;try{return Mt(t,e)}finally{Dt=!1,(null!==Ct||null!==kt)&&(Ot(),Lt())}}var Bt={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ft(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Bt[t.type]:"textarea"===e}function Nt(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function Ut(t){if(!G)return!1;var e=(t="on"+t)in document;return e||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"==typeof e[t]),e}function jt(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function Vt(t){t._valueTracker||(t._valueTracker=function(t){var e=jt(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var r=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(t){i=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(t){i=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function Zt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=jt(t)?t.checked?"true":"false":t.value),(t=i)!==n&&(e.setValue(t),!0)}var qt=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;qt.hasOwnProperty("ReactCurrentDispatcher")||(qt.ReactCurrentDispatcher={current:null});var Gt=/^(.*)[\\\/]/,Wt="function"==typeof Symbol&&Symbol.for,Ht=Wt?Symbol.for("react.element"):60103,Xt=Wt?Symbol.for("react.portal"):60106,Kt=Wt?Symbol.for("react.fragment"):60107,Yt=Wt?Symbol.for("react.strict_mode"):60108,Jt=Wt?Symbol.for("react.profiler"):60114,$t=Wt?Symbol.for("react.provider"):60109,Qt=Wt?Symbol.for("react.context"):60110,te=Wt?Symbol.for("react.concurrent_mode"):60111,ee=Wt?Symbol.for("react.forward_ref"):60112,ne=Wt?Symbol.for("react.suspense"):60113,ie=Wt?Symbol.for("react.memo"):60115,re=Wt?Symbol.for("react.lazy"):60116,oe="function"==typeof Symbol&&Symbol.iterator;function ae(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=oe&&t[oe]||t["@@iterator"])?t:null}function se(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case te:return"ConcurrentMode";case Kt:return"Fragment";case Xt:return"Portal";case Jt:return"Profiler";case Yt:return"StrictMode";case ne:return"Suspense"}if("object"==typeof t)switch(t.$$typeof){case Qt:return"Context.Consumer";case $t:return"Context.Provider";case ee:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case ie:return se(t.type);case re:if(t=1===t._status?t._result:null)return se(t)}return null}function le(t){var e="";do{t:switch(t.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break t;default:var i=t._debugOwner,r=t._debugSource,o=se(t.type);n=null,i&&(n=se(i.type)),i=o,o="",r?o=" (at "+r.fileName.replace(Gt,"")+":"+r.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(i||"Unknown")+o}e+=n,t=t.return}while(t);return e}var ue=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ce=Object.prototype.hasOwnProperty,pe={},he={};function fe(t,e,n,i,r){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){de[t]=new fe(t,0,!1,t,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];de[e]=new fe(e,1,!1,t[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){de[t]=new fe(t,2,!1,t.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){de[t]=new fe(t,2,!1,t,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){de[t]=new fe(t,3,!1,t.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(t){de[t]=new fe(t,3,!0,t,null)}),["capture","download"].forEach(function(t){de[t]=new fe(t,4,!1,t,null)}),["cols","rows","size","span"].forEach(function(t){de[t]=new fe(t,6,!1,t,null)}),["rowSpan","start"].forEach(function(t){de[t]=new fe(t,5,!1,t.toLowerCase(),null)});var me=/[\-:]([a-z])/g;function ye(t){return t[1].toUpperCase()}function _e(t,e,n,i){var r=de.hasOwnProperty(e)?de[e]:null;(null!==r?0===r.type:!i&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,i){if(null==e||function(t,e,n,i){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,r,i)&&(n=null),i||null===r?function(t){return!!ce.call(he,t)||!ce.call(pe,t)&&(ue.test(t)?he[t]=!0:(pe[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=null===n?3!==r.type&&"":n:(e=r.attributeName,i=r.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}function ge(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function ve(t,e){var n=e.checked;return r({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function xe(t,e){var n=null==e.defaultValue?"":e.defaultValue,i=null!=e.checked?e.checked:e.defaultChecked;n=ge(null!=e.value?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function be(t,e){null!=(e=e.checked)&&_e(t,"checked",e,!1)}function we(t,e){be(t,e);var n=ge(e.value),i=e.type;if(null!=n)"number"===i?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===i||"reset"===i)return void t.removeAttribute("value");e.hasOwnProperty("value")?Te(t,e.type,n):e.hasOwnProperty("defaultValue")&&Te(t,e.type,ge(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Ee(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!("submit"!==i&&"reset"!==i||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function Te(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(me,ye);de[e]=new fe(e,1,!1,t,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(me,ye);de[e]=new fe(e,1,!1,t,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(me,ye);de[e]=new fe(e,1,!1,t,"http://www.w3.org/XML/1998/namespace")}),["tabIndex","crossOrigin"].forEach(function(t){de[t]=new fe(t,1,!1,t.toLowerCase(),null)});var Se={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Pe(t,e,n){return(t=lt.getPooled(Se.change,t,e,n)).type="change",zt(n),q(t),t}var Ce=null,ke=null;function Ae(t){L(t)}function ze(t){if(Zt(B(t)))return t}function Le(t,e){if("change"===t)return e}var Me=!1;function Ie(){Ce&&(Ce.detachEvent("onpropertychange",Oe),ke=Ce=null)}function Oe(t){"value"===t.propertyName&&ze(ke)&&Rt(Ae,t=Pe(ke,t,Nt(t)))}function De(t,e,n){"focus"===t?(Ie(),ke=n,(Ce=e).attachEvent("onpropertychange",Oe)):"blur"===t&&Ie()}function Re(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return ze(ke)}function Be(t,e){if("click"===t)return ze(e)}function Fe(t,e){if("input"===t||"change"===t)return ze(e)}G&&(Me=Ut("input")&&(!document.documentMode||9<document.documentMode));var Ne={eventTypes:Se,_isInputEventSupported:Me,extractEvents:function(t,e,n,i){var r=e?B(e):window,o=void 0,a=void 0,s=r.nodeName&&r.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===r.type?o=Le:Ft(r)?Me?o=Fe:(o=Re,a=De):(s=r.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===r.type||"radio"===r.type)&&(o=Be),o&&(o=o(t,e)))return Pe(o,n,i);a&&a(t,r,e),"blur"===t&&(t=r._wrapperState)&&t.controlled&&"number"===r.type&&Te(r,"number",r.value)}},Ue=lt.extend({view:null,detail:null}),je={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ve(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=je[t])&&!!e[t]}function Ze(){return Ve}var qe=0,Ge=0,We=!1,He=!1,Xe=Ue.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Ze,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},movementX:function(t){if("movementX"in t)return t.movementX;var e=qe;return qe=t.screenX,We?"mousemove"===t.type?t.screenX-e:0:(We=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=Ge;return Ge=t.screenY,He?"mousemove"===t.type?t.screenY-e:0:(He=!0,0)}}),Ke=Xe.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Ye={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Je={eventTypes:Ye,extractEvents:function(t,e,n,i){var r="mouseover"===t||"pointerover"===t,o="mouseout"===t||"pointerout"===t;if(r&&(n.relatedTarget||n.fromElement)||!o&&!r)return null;if(r=i.window===i?i:(r=i.ownerDocument)?r.defaultView||r.parentWindow:window,o?(o=e,e=(e=n.relatedTarget||n.toElement)?D(e):null):o=null,o===e)return null;var a=void 0,s=void 0,l=void 0,u=void 0;"mouseout"===t||"mouseover"===t?(a=Xe,s=Ye.mouseLeave,l=Ye.mouseEnter,u="mouse"):"pointerout"!==t&&"pointerover"!==t||(a=Ke,s=Ye.pointerLeave,l=Ye.pointerEnter,u="pointer");var c=null==o?r:B(o);if(r=null==e?r:B(e),(t=a.getPooled(s,o,n,i)).type=u+"leave",t.target=c,t.relatedTarget=r,(n=a.getPooled(l,e,n,i)).type=u+"enter",n.target=r,n.relatedTarget=c,i=e,o&&i)t:{for(r=i,u=0,a=e=o;a;a=N(a))u++;for(a=0,l=r;l;l=N(l))a++;for(;0<u-a;)e=N(e),u--;for(;0<a-u;)r=N(r),a--;for(;u--;){if(e===r||e===r.alternate)break t;e=N(e),r=N(r)}e=null}else e=null;for(r=e,e=[];o&&o!==r&&(null===(u=o.alternate)||u!==r);)e.push(o),o=N(o);for(o=[];i&&i!==r&&(null===(u=i.alternate)||u!==r);)o.push(i),i=N(i);for(i=0;i<e.length;i++)V(e[i],"bubbled",t);for(i=o.length;0<i--;)V(o[i],"captured",n);return[t,n]}};function $e(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e}var Qe=Object.prototype.hasOwnProperty;function tn(t,e){if($e(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++)if(!Qe.call(e,n[i])||!$e(t[n[i]],e[n[i]]))return!1;return!0}function en(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if(0!=(2&e.effectTag))return 1;for(;e.return;)if(0!=(2&(e=e.return).effectTag))return 1}return 3===e.tag?2:3}function nn(t){2!==en(t)&&a("188")}function rn(t){if(!(t=function(t){var e=t.alternate;if(!e)return 3===(e=en(t))&&a("188"),1===e?null:t;for(var n=t,i=e;;){var r=n.return,o=r?r.alternate:null;if(!r||!o)break;if(r.child===o.child){for(var s=r.child;s;){if(s===n)return nn(r),t;if(s===i)return nn(r),e;s=s.sibling}a("188")}if(n.return!==i.return)n=r,i=o;else{s=!1;for(var l=r.child;l;){if(l===n){s=!0,n=r,i=o;break}if(l===i){s=!0,i=r,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,i=r;break}if(l===i){s=!0,i=o,n=r;break}l=l.sibling}s||a("189")}}n.alternate!==i&&a("190")}return 3!==n.tag&&a("188"),n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}var on=lt.extend({animationName:null,elapsedTime:null,pseudoElement:null}),an=lt.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),sn=Ue.extend({relatedTarget:null});function ln(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var un={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pn=Ue.extend({key:function(t){if(t.key){var e=un[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=ln(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?cn[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Ze,charCode:function(t){return"keypress"===t.type?ln(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?ln(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),hn=Xe.extend({dataTransfer:null}),fn=Ue.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Ze}),dn=lt.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),mn=Xe.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),yn=[["abort","abort"],[J,"animationEnd"],[$,"animationIteration"],[Q,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[tt,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],_n={},gn={};function vn(t,e){var n=t[0],i="on"+((t=t[1])[0].toUpperCase()+t.slice(1));e={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[n],isInteractive:e},_n[t]=e,gn[n]=e}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(t){vn(t,!0)}),yn.forEach(function(t){vn(t,!1)});var xn={eventTypes:_n,isInteractiveTopLevelEventType:function(t){return void 0!==(t=gn[t])&&!0===t.isInteractive},extractEvents:function(t,e,n,i){var r=gn[t];if(!r)return null;switch(t){case"keypress":if(0===ln(n))return null;case"keydown":case"keyup":t=pn;break;case"blur":case"focus":t=sn;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=Xe;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=hn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=fn;break;case J:case $:case Q:t=on;break;case tt:t=dn;break;case"scroll":t=Ue;break;case"wheel":t=mn;break;case"copy":case"cut":case"paste":t=an;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Ke;break;default:t=lt}return q(e=t.getPooled(r,e,n,i)),e}},bn=xn.isInteractiveTopLevelEventType,wn=[];function En(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var i;for(i=n;i.return;)i=i.return;if(!(i=3!==i.tag?null:i.stateNode.containerInfo))break;t.ancestors.push(n),n=D(i)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var r=Nt(t.nativeEvent);i=t.topLevelType;for(var o=t.nativeEvent,a=null,s=0;s<_.length;s++){var l=_[s];l&&(l=l.extractEvents(i,e,o,r))&&(a=S(a,l))}L(a)}}var Tn=!0;function Sn(t,e){if(!e)return null;var n=(bn(t)?Cn:kn).bind(null,t);e.addEventListener(t,n,!1)}function Pn(t,e){if(!e)return null;var n=(bn(t)?Cn:kn).bind(null,t);e.addEventListener(t,n,!0)}function Cn(t,e){It(kn,t,e)}function kn(t,e){if(Tn){var n=Nt(e);if(null===(n=D(n))||"number"!=typeof n.tag||2===en(n)||(n=null),wn.length){var i=wn.pop();i.topLevelType=t,i.nativeEvent=e,i.targetInst=n,t=i}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{Rt(En,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>wn.length&&wn.push(t)}}}var An={},zn=0,Ln="_reactListenersID"+(""+Math.random()).slice(2);function Mn(t){return Object.prototype.hasOwnProperty.call(t,Ln)||(t[Ln]=zn++,An[t[Ln]]={}),An[t[Ln]]}function In(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function On(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Dn(t,e){var n,i=On(t);for(t=0;i;){if(3===i.nodeType){if(n=t+i.textContent.length,t<=e&&n>=e)return{node:i,offset:e-t};t=n}t:{for(;i;){if(i.nextSibling){i=i.nextSibling;break t}i=i.parentNode}i=void 0}i=On(i)}}function Rn(){for(var t=window,e=In();e instanceof t.HTMLIFrameElement;){try{t=e.contentDocument.defaultView}catch(t){break}e=In(t.document)}return e}function Bn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function Fn(t){var e=Rn(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&function t(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==i&&Bn(n))if(e=i.start,void 0===(t=i.end)&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if((t=(e=n.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=void 0===i.end?o:Math.min(i.end,r),!t.extend&&o>i&&(r=i,i=o,o=r),r=Dn(n,o);var a=Dn(n,i);r&&a&&(1!==t.rangeCount||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&((e=e.createRange()).setStart(r.node,r.offset),t.removeAllRanges(),o>i?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<e.length;n++)(t=e[n]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Nn=G&&"documentMode"in document&&11>=document.documentMode,Un={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},jn=null,Vn=null,Zn=null,qn=!1;function Gn(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return qn||null==jn||jn!==In(n)?null:("selectionStart"in(n=jn)&&Bn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Zn&&tn(Zn,n)?null:(Zn=n,(t=lt.getPooled(Un.select,Vn,t,e)).type="select",t.target=jn,q(t),t))}var Wn={eventTypes:Un,extractEvents:function(t,e,n,i){var r,o=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;if(!(r=!o)){t:{o=Mn(o),r=x.onSelect;for(var a=0;a<r.length;a++){var s=r[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break t}}o=!0}r=!o}if(r)return null;switch(o=e?B(e):window,t){case"focus":(Ft(o)||"true"===o.contentEditable)&&(jn=o,Vn=e,Zn=null);break;case"blur":Zn=Vn=jn=null;break;case"mousedown":qn=!0;break;case"contextmenu":case"mouseup":case"dragend":return qn=!1,Gn(n,i);case"selectionchange":if(Nn)break;case"keydown":case"keyup":return Gn(n,i)}return null}};function Hn(t,e){return t=r({children:void 0},e),(e=function(t){var e="";return i.Children.forEach(t,function(t){null!=t&&(e+=t)}),e}(e.children))&&(t.children=e),t}function Xn(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+ge(n),e=null,r=0;r<t.length;r++){if(t[r].value===n)return t[r].selected=!0,void(i&&(t[r].defaultSelected=!0));null!==e||t[r].disabled||(e=t[r])}null!==e&&(e.selected=!0)}}function Kn(t,e){return null!=e.dangerouslySetInnerHTML&&a("91"),r({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Yn(t,e){var n=e.value;null==n&&(n=e.defaultValue,null!=(e=e.children)&&(null!=n&&a("92"),Array.isArray(e)&&(1>=e.length||a("93"),e=e[0]),n=e),null==n&&(n="")),t._wrapperState={initialValue:ge(n)}}function Jn(t,e){var n=ge(e.value),i=ge(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=i&&(t.defaultValue=""+i)}function $n(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)}A.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),b=F,w=R,E=B,A.injectEventPluginsByName({SimpleEventPlugin:xn,EnterLeaveEventPlugin:Je,ChangeEventPlugin:Ne,SelectEventPlugin:Wn,BeforeInputEventPlugin:St});var Qn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function ti(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ei(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?ti(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var ni,ii=void 0,ri=(ni=function(t,e){if(t.namespaceURI!==Qn.svg||"innerHTML"in t)t.innerHTML=e;else{for((ii=ii||document.createElement("div")).innerHTML="<svg>"+e+"</svg>",e=ii.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,i){MSApp.execUnsafeLocalFunction(function(){return ni(t,e)})}:ni);function oi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var ai={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},si=["Webkit","ms","Moz","O"];function li(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||ai.hasOwnProperty(t)&&ai[t]?(""+e).trim():e+"px"}function ui(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=li(n,e[n],i);"float"===n&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}Object.keys(ai).forEach(function(t){si.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ai[e]=ai[t]})});var ci=r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pi(t,e){e&&(ci[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&a("137",t,""),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&a("60"),"object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||a("61")),null!=e.style&&"object"!=typeof e.style&&a("62",""))}function hi(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function fi(t,e){var n=Mn(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=x[e];for(var i=0;i<e.length;i++){var r=e[i];if(!n.hasOwnProperty(r)||!n[r]){switch(r){case"scroll":Pn("scroll",t);break;case"focus":case"blur":Pn("focus",t),Pn("blur",t),n.blur=!0,n.focus=!0;break;case"cancel":case"close":Ut(r)&&Pn(r,t);break;case"invalid":case"submit":case"reset":break;default:-1===et.indexOf(r)&&Sn(r,t)}n[r]=!0}}}function di(){}var mi=null,yi=null;function _i(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function gi(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var vi="function"==typeof setTimeout?setTimeout:void 0,xi="function"==typeof clearTimeout?clearTimeout:void 0,bi=o.unstable_scheduleCallback,wi=o.unstable_cancelCallback;function Ei(t){for(t=t.nextSibling;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}function Ti(t){for(t=t.firstChild;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}new Set;var Si=[],Pi=-1;function Ci(t){0>Pi||(t.current=Si[Pi],Si[Pi]=null,Pi--)}function ki(t,e){Si[++Pi]=t.current,t.current=e}var Ai={},zi={current:Ai},Li={current:!1},Mi=Ai;function Ii(t,e){var n=t.type.contextTypes;if(!n)return Ai;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r,o={};for(r in n)o[r]=e[r];return i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Oi(t){return null!=(t=t.childContextTypes)}function Di(t){Ci(Li),Ci(zi)}function Ri(t){Ci(Li),Ci(zi)}function Bi(t,e,n){zi.current!==Ai&&a("168"),ki(zi,e),ki(Li,n)}function Fi(t,e,n){var i=t.stateNode;if(t=e.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())o in t||a("108",se(e)||"Unknown",o);return r({},n,i)}function Ni(t){var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||Ai,Mi=zi.current,ki(zi,e),ki(Li,Li.current),!0}function Ui(t,e,n){var i=t.stateNode;i||a("169"),n?(e=Fi(t,e,Mi),i.__reactInternalMemoizedMergedChildContext=e,Ci(Li),Ci(zi),ki(zi,e)):Ci(Li),ki(Li,n)}var ji=null,Vi=null;function Zi(t){return function(e){try{return t(e)}catch(t){}}}function qi(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Gi(t,e,n,i){return new qi(t,e,n,i)}function Wi(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Hi(t,e){var n=t.alternate;return null===n?((n=Gi(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=t.childExpirationTime,n.expirationTime=t.expirationTime,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,n.contextDependencies=t.contextDependencies,n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Xi(t,e,n,i,r,o){var s=2;if(i=t,"function"==typeof t)Wi(t)&&(s=1);else if("string"==typeof t)s=5;else t:switch(t){case Kt:return Ki(n.children,r,o,e);case te:return Yi(n,3|r,o,e);case Yt:return Yi(n,2|r,o,e);case Jt:return(t=Gi(12,n,e,4|r)).elementType=Jt,t.type=Jt,t.expirationTime=o,t;case ne:return(t=Gi(13,n,e,r)).elementType=ne,t.type=ne,t.expirationTime=o,t;default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case $t:s=10;break t;case Qt:s=9;break t;case ee:s=11;break t;case ie:s=14;break t;case re:s=16,i=null;break t}a("130",null==t?t:typeof t,"")}return(e=Gi(s,n,e,r)).elementType=t,e.type=i,e.expirationTime=o,e}function Ki(t,e,n,i){return(t=Gi(7,t,i,e)).expirationTime=n,t}function Yi(t,e,n,i){return t=Gi(8,t,i,e),e=0==(1&e)?Yt:te,t.elementType=e,t.type=e,t.expirationTime=n,t}function Ji(t,e,n){return(t=Gi(6,t,null,e)).expirationTime=n,t}function $i(t,e,n){return(e=Gi(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Qi(t,e){t.didError=!1;var n=t.earliestPendingTime;0===n?t.earliestPendingTime=t.latestPendingTime=e:n<e?t.earliestPendingTime=e:t.latestPendingTime>e&&(t.latestPendingTime=e),nr(e,t)}function tr(t,e){t.didError=!1,t.latestPingedTime>=e&&(t.latestPingedTime=0);var n=t.earliestPendingTime,i=t.latestPendingTime;n===e?t.earliestPendingTime=i===e?t.latestPendingTime=0:i:i===e&&(t.latestPendingTime=n),n=t.earliestSuspendedTime,i=t.latestSuspendedTime,0===n?t.earliestSuspendedTime=t.latestSuspendedTime=e:n<e?t.earliestSuspendedTime=e:i>e&&(t.latestSuspendedTime=e),nr(e,t)}function er(t,e){var n=t.earliestPendingTime;return n>e&&(e=n),(t=t.earliestSuspendedTime)>e&&(e=t),e}function nr(t,e){var n=e.earliestSuspendedTime,i=e.latestSuspendedTime,r=e.earliestPendingTime,o=e.latestPingedTime;0===(r=0!==r?r:o)&&(0===t||i<t)&&(r=i),0!==(t=r)&&n>t&&(t=n),e.nextExpirationTimeToWorkOn=r,e.expirationTime=t}function ir(t,e){if(t&&t.defaultProps)for(var n in e=r({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var rr=(new i.Component).refs;function or(t,e,n,i){n=null==(n=n(i,e=t.memoizedState))?e:r({},e,n),t.memoizedState=n,null!==(i=t.updateQueue)&&0===t.expirationTime&&(i.baseState=n)}var ar={isMounted:function(t){return!!(t=t._reactInternalFiber)&&2===en(t)},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var i=ws(),r=Yo(i=Ka(i,t));r.payload=e,null!=n&&(r.callback=n),Za(),$o(t,r),$a(t,i)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var i=ws(),r=Yo(i=Ka(i,t));r.tag=qo,r.payload=e,null!=n&&(r.callback=n),Za(),$o(t,r),$a(t,i)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=ws(),i=Yo(n=Ka(n,t));i.tag=Go,null!=e&&(i.callback=e),Za(),$o(t,i),$a(t,n)}};function sr(t,e,n,i,r,o,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(i,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!tn(n,i)||!tn(r,o))}function lr(t,e,n){var i=!1,r=Ai,o=e.contextType;return"object"==typeof o&&null!==o?o=Vo(o):(r=Oi(e)?Mi:zi.current,o=(i=null!=(i=e.contextTypes))?Ii(t,r):Ai),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=ar,t.stateNode=e,e._reactInternalFiber=t,i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=o),e}function ur(t,e,n,i){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,i),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&ar.enqueueReplaceState(e,e.state,null)}function cr(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs=rr;var o=e.contextType;"object"==typeof o&&null!==o?r.context=Vo(o):(o=Oi(e)?Mi:zi.current,r.context=Ii(t,o)),null!==(o=t.updateQueue)&&(na(t,o,n,r,i),r.state=t.memoizedState),"function"==typeof(o=e.getDerivedStateFromProps)&&(or(t,e,o,n),r.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(e=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),e!==r.state&&ar.enqueueReplaceState(r,r.state,null),null!==(o=t.updateQueue)&&(na(t,o,n,r,i),r.state=t.memoizedState)),"function"==typeof r.componentDidMount&&(t.effectTag|=4)}var pr=Array.isArray;function hr(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){n=n._owner;var i=void 0;n&&(1!==n.tag&&a("309"),i=n.stateNode),i||a("147",t);var r=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===r?e.ref:((e=function(t){var e=i.refs;e===rr&&(e=i.refs={}),null===t?delete e[r]:e[r]=t})._stringRef=r,e)}"string"!=typeof t&&a("284"),n._owner||a("290",t)}return t}function fr(t,e){"textarea"!==t.type&&a("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function dr(t){function e(e,n){if(t){var i=e.lastEffect;null!==i?(i.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,i){if(!t)return null;for(;null!==i;)e(n,i),i=i.sibling;return null}function i(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function r(t,e,n){return(t=Hi(t,e)).index=0,t.sibling=null,t}function o(e,n,i){return e.index=i,t?null!==(i=e.alternate)?(i=i.index)<n?(e.effectTag=2,n):i:(e.effectTag=2,n):n}function s(e){return t&&null===e.alternate&&(e.effectTag=2),e}function l(t,e,n,i){return null===e||6!==e.tag?((e=Ji(n,t.mode,i)).return=t,e):((e=r(e,n)).return=t,e)}function u(t,e,n,i){return null!==e&&e.elementType===n.type?((i=r(e,n.props)).ref=hr(t,e,n),i.return=t,i):((i=Xi(n.type,n.key,n.props,null,t.mode,i)).ref=hr(t,e,n),i.return=t,i)}function c(t,e,n,i){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=$i(n,t.mode,i)).return=t,e):((e=r(e,n.children||[])).return=t,e)}function p(t,e,n,i,o){return null===e||7!==e.tag?((e=Ki(n,t.mode,i,o)).return=t,e):((e=r(e,n)).return=t,e)}function h(t,e,n){if("string"==typeof e||"number"==typeof e)return(e=Ji(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case Ht:return(n=Xi(e.type,e.key,e.props,null,t.mode,n)).ref=hr(t,null,e),n.return=t,n;case Xt:return(e=$i(e,t.mode,n)).return=t,e}if(pr(e)||ae(e))return(e=Ki(e,t.mode,n,null)).return=t,e;fr(t,e)}return null}function f(t,e,n,i){var r=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==r?null:l(t,e,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ht:return n.key===r?n.type===Kt?p(t,e,n.props.children,i,r):u(t,e,n,i):null;case Xt:return n.key===r?c(t,e,n,i):null}if(pr(n)||ae(n))return null!==r?null:p(t,e,n,i,null);fr(t,n)}return null}function d(t,e,n,i,r){if("string"==typeof i||"number"==typeof i)return l(e,t=t.get(n)||null,""+i,r);if("object"==typeof i&&null!==i){switch(i.$$typeof){case Ht:return t=t.get(null===i.key?n:i.key)||null,i.type===Kt?p(e,t,i.props.children,r,i.key):u(e,t,i,r);case Xt:return c(e,t=t.get(null===i.key?n:i.key)||null,i,r)}if(pr(i)||ae(i))return p(e,t=t.get(n)||null,i,r,null);fr(e,i)}return null}function m(r,a,s,l){for(var u=null,c=null,p=a,m=a=0,y=null;null!==p&&m<s.length;m++){p.index>m?(y=p,p=null):y=p.sibling;var _=f(r,p,s[m],l);if(null===_){null===p&&(p=y);break}t&&p&&null===_.alternate&&e(r,p),a=o(_,a,m),null===c?u=_:c.sibling=_,c=_,p=y}if(m===s.length)return n(r,p),u;if(null===p){for(;m<s.length;m++)(p=h(r,s[m],l))&&(a=o(p,a,m),null===c?u=p:c.sibling=p,c=p);return u}for(p=i(r,p);m<s.length;m++)(y=d(p,r,m,s[m],l))&&(t&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===c?u=y:c.sibling=y,c=y);return t&&p.forEach(function(t){return e(r,t)}),u}function y(r,s,l,u){var c=ae(l);"function"!=typeof c&&a("150"),null==(l=c.call(l))&&a("151");for(var p=c=null,m=s,y=s=0,_=null,g=l.next();null!==m&&!g.done;y++,g=l.next()){m.index>y?(_=m,m=null):_=m.sibling;var v=f(r,m,g.value,u);if(null===v){m||(m=_);break}t&&m&&null===v.alternate&&e(r,m),s=o(v,s,y),null===p?c=v:p.sibling=v,p=v,m=_}if(g.done)return n(r,m),c;if(null===m){for(;!g.done;y++,g=l.next())null!==(g=h(r,g.value,u))&&(s=o(g,s,y),null===p?c=g:p.sibling=g,p=g);return c}for(m=i(r,m);!g.done;y++,g=l.next())null!==(g=d(m,r,y,g.value,u))&&(t&&null!==g.alternate&&m.delete(null===g.key?y:g.key),s=o(g,s,y),null===p?c=g:p.sibling=g,p=g);return t&&m.forEach(function(t){return e(r,t)}),c}return function(t,i,o,l){var u="object"==typeof o&&null!==o&&o.type===Kt&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case Ht:t:{for(c=o.key,u=i;null!==u;){if(u.key===c){if(7===u.tag?o.type===Kt:u.elementType===o.type){n(t,u.sibling),(i=r(u,o.type===Kt?o.props.children:o.props)).ref=hr(t,u,o),i.return=t,t=i;break t}n(t,u);break}e(t,u),u=u.sibling}o.type===Kt?((i=Ki(o.props.children,t.mode,l,o.key)).return=t,t=i):((l=Xi(o.type,o.key,o.props,null,t.mode,l)).ref=hr(t,i,o),l.return=t,t=l)}return s(t);case Xt:t:{for(u=o.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===o.containerInfo&&i.stateNode.implementation===o.implementation){n(t,i.sibling),(i=r(i,o.children||[])).return=t,t=i;break t}n(t,i);break}e(t,i),i=i.sibling}(i=$i(o,t.mode,l)).return=t,t=i}return s(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==i&&6===i.tag?(n(t,i.sibling),(i=r(i,o)).return=t,t=i):(n(t,i),(i=Ji(o,t.mode,l)).return=t,t=i),s(t);if(pr(o))return m(t,i,o,l);if(ae(o))return y(t,i,o,l);if(c&&fr(t,o),void 0===o&&!u)switch(t.tag){case 1:case 0:a("152",(l=t.type).displayName||l.name||"Component")}return n(t,i)}}var mr=dr(!0),yr=dr(!1),_r={},gr={current:_r},vr={current:_r},xr={current:_r};function br(t){return t===_r&&a("174"),t}function wr(t,e){ki(xr,e),ki(vr,t),ki(gr,_r);var n=e.nodeType;switch(n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ei(null,"");break;default:e=ei(e=(n=8===n?e.parentNode:e).namespaceURI||null,n=n.tagName)}Ci(gr),ki(gr,e)}function Er(t){Ci(gr),Ci(vr),Ci(xr)}function Tr(t){br(xr.current);var e=br(gr.current),n=ei(e,t.type);e!==n&&(ki(vr,t),ki(gr,n))}function Sr(t){vr.current===t&&(Ci(gr),Ci(vr))}var Pr=0,Cr=2,kr=4,Ar=8,zr=16,Lr=32,Mr=64,Ir=128,Or=qt.ReactCurrentDispatcher,Dr=0,Rr=null,Br=null,Fr=null,Nr=null,Ur=null,jr=null,Vr=0,Zr=null,qr=0,Gr=!1,Wr=null,Hr=0;function Xr(){a("307")}function Kr(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!$e(t[n],e[n]))return!1;return!0}function Yr(t,e,n,i,r,o){if(Dr=o,Rr=e,Fr=null!==t?t.memoizedState:null,Or.current=null===Fr?uo:co,e=n(i,r),Gr){do{Gr=!1,Hr+=1,Fr=null!==t?t.memoizedState:null,jr=Nr,Zr=Ur=Br=null,Or.current=co,e=n(i,r)}while(Gr);Wr=null,Hr=0}return Or.current=lo,(t=Rr).memoizedState=Nr,t.expirationTime=Vr,t.updateQueue=Zr,t.effectTag|=qr,t=null!==Br&&null!==Br.next,Dr=0,jr=Ur=Nr=Fr=Br=Rr=null,Vr=0,Zr=null,qr=0,t&&a("300"),e}function Jr(){Or.current=lo,Dr=0,jr=Ur=Nr=Fr=Br=Rr=null,Vr=0,Zr=null,qr=0,Gr=!1,Wr=null,Hr=0}function $r(){var t={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===Ur?Nr=Ur=t:Ur=Ur.next=t,Ur}function Qr(){if(null!==jr)jr=(Ur=jr).next,Fr=null!==(Br=Fr)?Br.next:null;else{null===Fr&&a("310");var t={memoizedState:(Br=Fr).memoizedState,baseState:Br.baseState,queue:Br.queue,baseUpdate:Br.baseUpdate,next:null};Ur=null===Ur?Nr=t:Ur.next=t,Fr=Br.next}return Ur}function to(t,e){return"function"==typeof e?e(t):e}function eo(t){var e=Qr(),n=e.queue;if(null===n&&a("311"),0<Hr){var i=n.dispatch;if(null!==Wr){var r=Wr.get(n);if(void 0!==r){Wr.delete(n);var o=e.memoizedState;do{o=t(o,r.action),r=r.next}while(null!==r);return $e(o,e.memoizedState)||(wo=!0),e.memoizedState=o,e.baseUpdate===n.last&&(e.baseState=o),[o,i]}}return[e.memoizedState,i]}i=n.last;var s=e.baseUpdate;if(o=e.baseState,null!==s?(null!==i&&(i.next=null),i=s.next):i=null!==i?i.next:null,null!==i){var l=r=null,u=i,c=!1;do{var p=u.expirationTime;p<Dr?(c||(c=!0,l=s,r=o),p>Vr&&(Vr=p)):o=u.eagerReducer===t?u.eagerState:t(o,u.action),s=u,u=u.next}while(null!==u&&u!==i);c||(l=s,r=o),$e(o,e.memoizedState)||(wo=!0),e.memoizedState=o,e.baseUpdate=l,e.baseState=r,n.eagerReducer=t,n.eagerState=o}return[e.memoizedState,n.dispatch]}function no(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},null===Zr?(Zr={lastEffect:null}).lastEffect=t.next=t:null===(e=Zr.lastEffect)?Zr.lastEffect=t.next=t:(n=e.next,e.next=t,t.next=n,Zr.lastEffect=t),t}function io(t,e,n,i){var r=$r();qr|=t,r.memoizedState=no(e,n,void 0,void 0===i?null:i)}function ro(t,e,n,i){var r=Qr();i=void 0===i?null:i;var o=void 0;if(null!==Br){var a=Br.memoizedState;if(o=a.destroy,null!==i&&Kr(i,a.deps))return void no(Pr,n,o,i)}qr|=t,r.memoizedState=no(e,n,o,i)}function oo(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function ao(){}function so(t,e,n){25>Hr||a("301");var i=t.alternate;if(t===Rr||null!==i&&i===Rr)if(Gr=!0,t={expirationTime:Dr,action:n,eagerReducer:null,eagerState:null,next:null},null===Wr&&(Wr=new Map),void 0===(n=Wr.get(e)))Wr.set(e,t);else{for(e=n;null!==e.next;)e=e.next;e.next=t}else{Za();var r=ws(),o={expirationTime:r=Ka(r,t),action:n,eagerReducer:null,eagerState:null,next:null},s=e.last;if(null===s)o.next=o;else{var l=s.next;null!==l&&(o.next=l),s.next=o}if(e.last=o,0===t.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=e.eagerReducer))try{var u=e.eagerState,c=i(u,n);if(o.eagerReducer=i,o.eagerState=c,$e(c,u))return}catch(t){}$a(t,r)}}var lo={readContext:Vo,useCallback:Xr,useContext:Xr,useEffect:Xr,useImperativeHandle:Xr,useLayoutEffect:Xr,useMemo:Xr,useReducer:Xr,useRef:Xr,useState:Xr,useDebugValue:Xr},uo={readContext:Vo,useCallback:function(t,e){return $r().memoizedState=[t,void 0===e?null:e],t},useContext:Vo,useEffect:function(t,e){return io(516,Ir|Mr,t,e)},useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,io(4,kr|Lr,oo.bind(null,e,t),n)},useLayoutEffect:function(t,e){return io(4,kr|Lr,t,e)},useMemo:function(t,e){var n=$r();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=$r();return e=void 0!==n?n(e):e,i.memoizedState=i.baseState=e,t=(t=i.queue={last:null,dispatch:null,eagerReducer:t,eagerState:e}).dispatch=so.bind(null,Rr,t),[i.memoizedState,t]},useRef:function(t){return t={current:t},$r().memoizedState=t},useState:function(t){var e=$r();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={last:null,dispatch:null,eagerReducer:to,eagerState:t}).dispatch=so.bind(null,Rr,t),[e.memoizedState,t]},useDebugValue:ao},co={readContext:Vo,useCallback:function(t,e){var n=Qr();e=void 0===e?null:e;var i=n.memoizedState;return null!==i&&null!==e&&Kr(e,i[1])?i[0]:(n.memoizedState=[t,e],t)},useContext:Vo,useEffect:function(t,e){return ro(516,Ir|Mr,t,e)},useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,ro(4,kr|Lr,oo.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ro(4,kr|Lr,t,e)},useMemo:function(t,e){var n=Qr();e=void 0===e?null:e;var i=n.memoizedState;return null!==i&&null!==e&&Kr(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)},useReducer:eo,useRef:function(){return Qr().memoizedState},useState:function(t){return eo(to)},useDebugValue:ao},po=null,ho=null,fo=!1;function mo(t,e){var n=Gi(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function yo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function _o(t){if(fo){var e=ho;if(e){var n=e;if(!yo(t,e)){if(!(e=Ei(n))||!yo(t,e))return t.effectTag|=2,fo=!1,void(po=t);mo(po,n)}po=t,ho=Ti(e)}else t.effectTag|=2,fo=!1,po=t}}function go(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&18!==t.tag;)t=t.return;po=t}function vo(t){if(t!==po)return!1;if(!fo)return go(t),fo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!gi(e,t.memoizedProps))for(e=ho;e;)mo(t,e),e=Ei(e);return go(t),ho=po?Ei(t.stateNode):null,!0}function xo(){ho=po=null,fo=!1}var bo=qt.ReactCurrentOwner,wo=!1;function Eo(t,e,n,i){e.child=null===t?yr(e,null,n,i):mr(e,t.child,n,i)}function To(t,e,n,i,r){n=n.render;var o=e.ref;return jo(e,r),i=Yr(t,e,n,i,o,r),null===t||wo?(e.effectTag|=1,Eo(t,e,i,r),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=r&&(t.expirationTime=0),Io(t,e,r))}function So(t,e,n,i,r,o){if(null===t){var a=n.type;return"function"!=typeof a||Wi(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Xi(n.type,null,i,null,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Po(t,e,a,i,r,o))}return a=t.child,r<o&&(r=a.memoizedProps,(n=null!==(n=n.compare)?n:tn)(r,i)&&t.ref===e.ref)?Io(t,e,o):(e.effectTag|=1,(t=Hi(a,i)).ref=e.ref,t.return=e,e.child=t)}function Po(t,e,n,i,r,o){return null!==t&&tn(t.memoizedProps,i)&&t.ref===e.ref&&(wo=!1,r<o)?Io(t,e,o):ko(t,e,n,i,o)}function Co(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function ko(t,e,n,i,r){var o=Oi(n)?Mi:zi.current;return o=Ii(e,o),jo(e,r),n=Yr(t,e,n,i,o,r),null===t||wo?(e.effectTag|=1,Eo(t,e,n,r),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=r&&(t.expirationTime=0),Io(t,e,r))}function Ao(t,e,n,i,r){if(Oi(n)){var o=!0;Ni(e)}else o=!1;if(jo(e,r),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),lr(e,n,i),cr(e,n,i,r),i=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=Vo(u):u=Ii(e,u=Oi(n)?Mi:zi.current);var c=n.getDerivedStateFromProps,p="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;p||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==i||l!==u)&&ur(e,a,i,u),Ho=!1;var h=e.memoizedState;l=a.state=h;var f=e.updateQueue;null!==f&&(na(e,f,i,a,r),l=e.memoizedState),s!==i||h!==l||Li.current||Ho?("function"==typeof c&&(or(e,n,c,i),l=e.memoizedState),(s=Ho||sr(e,n,s,i,h,l,u))?(p||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.effectTag|=4)):("function"==typeof a.componentDidMount&&(e.effectTag|=4),e.memoizedProps=i,e.memoizedState=l),a.props=i,a.state=l,a.context=u,i=s):("function"==typeof a.componentDidMount&&(e.effectTag|=4),i=!1)}else a=e.stateNode,s=e.memoizedProps,a.props=e.type===e.elementType?s:ir(e.type,s),l=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=Vo(u):u=Ii(e,u=Oi(n)?Mi:zi.current),(p="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==i||l!==u)&&ur(e,a,i,u),Ho=!1,l=e.memoizedState,h=a.state=l,null!==(f=e.updateQueue)&&(na(e,f,i,a,r),h=e.memoizedState),s!==i||l!==h||Li.current||Ho?("function"==typeof c&&(or(e,n,c,i),h=e.memoizedState),(c=Ho||sr(e,n,s,i,l,h,u))?(p||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(i,h,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,h,u)),"function"==typeof a.componentDidUpdate&&(e.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&l===t.memoizedState||(e.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&l===t.memoizedState||(e.effectTag|=256),e.memoizedProps=i,e.memoizedState=h),a.props=i,a.state=h,a.context=u,i=c):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&l===t.memoizedState||(e.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&l===t.memoizedState||(e.effectTag|=256),i=!1);return zo(t,e,n,i,o,r)}function zo(t,e,n,i,r,o){Co(t,e);var a=0!=(64&e.effectTag);if(!i&&!a)return r&&Ui(e,n,!1),Io(t,e,o);i=e.stateNode,bo.current=e;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:i.render();return e.effectTag|=1,null!==t&&a?(e.child=mr(e,t.child,null,o),e.child=mr(e,null,s,o)):Eo(t,e,s,o),e.memoizedState=i.state,r&&Ui(e,n,!0),e.child}function Lo(t){var e=t.stateNode;e.pendingContext?Bi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&Bi(0,e.context,!1),wr(t,e.containerInfo)}function Mo(t,e,n){var i=e.mode,r=e.pendingProps,o=e.memoizedState;if(0==(64&e.effectTag)){o=null;var a=!1}else o={timedOutAt:null!==o?o.timedOutAt:0},a=!0,e.effectTag&=-65;if(null===t)if(a){var s=r.fallback;t=Ki(null,i,0,null),0==(1&e.mode)&&(t.child=null!==e.memoizedState?e.child.child:e.child),i=Ki(s,i,n,null),t.sibling=i,(n=t).return=i.return=e}else n=i=yr(e,null,r.children,n);else null!==t.memoizedState?(s=(i=t.child).sibling,a?(n=r.fallback,r=Hi(i,i.pendingProps),0==(1&e.mode)&&((a=null!==e.memoizedState?e.child.child:e.child)!==i.child&&(r.child=a)),i=r.sibling=Hi(s,n,s.expirationTime),n=r,r.childExpirationTime=0,n.return=i.return=e):n=i=mr(e,i.child,r.children,n)):(s=t.child,a?(a=r.fallback,(r=Ki(null,i,0,null)).child=s,0==(1&e.mode)&&(r.child=null!==e.memoizedState?e.child.child:e.child),(i=r.sibling=Ki(a,i,n,null)).effectTag|=2,n=r,r.childExpirationTime=0,n.return=i.return=e):i=n=mr(e,s,r.children,n)),e.stateNode=t.stateNode;return e.memoizedState=o,e.child=n,i}function Io(t,e,n){if(null!==t&&(e.contextDependencies=t.contextDependencies),e.childExpirationTime<n)return null;if(null!==t&&e.child!==t.child&&a("153"),null!==e.child){for(n=Hi(t=e.child,t.pendingProps,t.expirationTime),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Hi(t,t.pendingProps,t.expirationTime)).return=e;n.sibling=null}return e.child}function Oo(t,e,n){var i=e.expirationTime;if(null!==t){if(t.memoizedProps!==e.pendingProps||Li.current)wo=!0;else if(i<n){switch(wo=!1,e.tag){case 3:Lo(e),xo();break;case 5:Tr(e);break;case 1:Oi(e.type)&&Ni(e);break;case 4:wr(e,e.stateNode.containerInfo);break;case 10:No(e,e.memoizedProps.value);break;case 13:if(null!==e.memoizedState)return 0!==(i=e.child.childExpirationTime)&&i>=n?Mo(t,e,n):null!==(e=Io(t,e,n))?e.sibling:null}return Io(t,e,n)}}else wo=!1;switch(e.expirationTime=0,e.tag){case 2:i=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps;var r=Ii(e,zi.current);if(jo(e,n),r=Yr(null,e,i,t,r,n),e.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof){if(e.tag=1,Jr(),Oi(i)){var o=!0;Ni(e)}else o=!1;e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null;var s=i.getDerivedStateFromProps;"function"==typeof s&&or(e,i,s,t),r.updater=ar,e.stateNode=r,r._reactInternalFiber=e,cr(e,i,t,n),e=zo(null,e,i,!0,o,n)}else e.tag=0,Eo(null,e,r,n),e=e.child;return e;case 16:switch(r=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),o=e.pendingProps,t=function(t){var e=t._result;switch(t._status){case 1:return e;case 2:case 0:throw e;default:switch(t._status=0,(e=(e=t._ctor)()).then(function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)},function(e){0===t._status&&(t._status=2,t._result=e)}),t._status){case 1:return t._result;case 2:throw t._result}throw t._result=e,e}}(r),e.type=t,r=e.tag=function(t){if("function"==typeof t)return Wi(t)?1:0;if(null!=t){if((t=t.$$typeof)===ee)return 11;if(t===ie)return 14}return 2}(t),o=ir(t,o),s=void 0,r){case 0:s=ko(null,e,t,o,n);break;case 1:s=Ao(null,e,t,o,n);break;case 11:s=To(null,e,t,o,n);break;case 14:s=So(null,e,t,ir(t.type,o),i,n);break;default:a("306",t,"")}return s;case 0:return i=e.type,r=e.pendingProps,ko(t,e,i,r=e.elementType===i?r:ir(i,r),n);case 1:return i=e.type,r=e.pendingProps,Ao(t,e,i,r=e.elementType===i?r:ir(i,r),n);case 3:return Lo(e),null===(i=e.updateQueue)&&a("282"),r=null!==(r=e.memoizedState)?r.element:null,na(e,i,e.pendingProps,null,n),(i=e.memoizedState.element)===r?(xo(),e=Io(t,e,n)):(r=e.stateNode,(r=(null===t||null===t.child)&&r.hydrate)&&(ho=Ti(e.stateNode.containerInfo),po=e,r=fo=!0),r?(e.effectTag|=2,e.child=yr(e,null,i,n)):(Eo(t,e,i,n),xo()),e=e.child),e;case 5:return Tr(e),null===t&&_o(e),i=e.type,r=e.pendingProps,o=null!==t?t.memoizedProps:null,s=r.children,gi(i,r)?s=null:null!==o&&gi(i,o)&&(e.effectTag|=16),Co(t,e),1!==n&&1&e.mode&&r.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Eo(t,e,s,n),e=e.child),e;case 6:return null===t&&_o(e),null;case 13:return Mo(t,e,n);case 4:return wr(e,e.stateNode.containerInfo),i=e.pendingProps,null===t?e.child=mr(e,null,i,n):Eo(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,To(t,e,i,r=e.elementType===i?r:ir(i,r),n);case 7:return Eo(t,e,e.pendingProps,n),e.child;case 8:case 12:return Eo(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,No(e,o=r.value),null!==s){var l=s.value;if(0===(o=$e(l,o)?0:0|("function"==typeof i._calculateChangedBits?i._calculateChangedBits(l,o):1073741823))){if(s.children===r.children&&!Li.current){e=Io(t,e,n);break t}}else for(null!==(l=e.child)&&(l.return=e);null!==l;){var u=l.contextDependencies;if(null!==u){s=l.child;for(var c=u.first;null!==c;){if(c.context===i&&0!=(c.observedBits&o)){1===l.tag&&((c=Yo(n)).tag=Go,$o(l,c)),l.expirationTime<n&&(l.expirationTime=n),null!==(c=l.alternate)&&c.expirationTime<n&&(c.expirationTime=n),c=n;for(var p=l.return;null!==p;){var h=p.alternate;if(p.childExpirationTime<c)p.childExpirationTime=c,null!==h&&h.childExpirationTime<c&&(h.childExpirationTime=c);else{if(!(null!==h&&h.childExpirationTime<c))break;h.childExpirationTime=c}p=p.return}u.expirationTime<n&&(u.expirationTime=n);break}c=c.next}}else s=10===l.tag&&l.type===e.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===e){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}}Eo(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=(o=e.pendingProps).children,jo(e,n),i=i(r=Vo(r,o.unstable_observedBits)),e.effectTag|=1,Eo(t,e,i,n),e.child;case 14:return o=ir(r=e.type,e.pendingProps),So(t,e,r,o=ir(r.type,o),i,n);case 15:return Po(t,e,e.type,e.pendingProps,i,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ir(i,r),null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),e.tag=1,Oi(i)?(t=!0,Ni(e)):t=!1,jo(e,n),lr(e,i,r),cr(e,i,r,n),zo(null,e,i,!0,t,n)}a("156")}var Do={current:null},Ro=null,Bo=null,Fo=null;function No(t,e){var n=t.type._context;ki(Do,n._currentValue),n._currentValue=e}function Uo(t){var e=Do.current;Ci(Do),t.type._context._currentValue=e}function jo(t,e){Ro=t,Fo=Bo=null;var n=t.contextDependencies;null!==n&&n.expirationTime>=e&&(wo=!0),t.contextDependencies=null}function Vo(t,e){return Fo!==t&&!1!==e&&0!==e&&("number"==typeof e&&1073741823!==e||(Fo=t,e=1073741823),e={context:t,observedBits:e,next:null},null===Bo?(null===Ro&&a("308"),Bo=e,Ro.contextDependencies={first:e,expirationTime:0}):Bo=Bo.next=e),t._currentValue}var Zo=0,qo=1,Go=2,Wo=3,Ho=!1;function Xo(t){return{baseState:t,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ko(t){return{baseState:t.baseState,firstUpdate:t.firstUpdate,lastUpdate:t.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yo(t){return{expirationTime:t,tag:Zo,payload:null,callback:null,next:null,nextEffect:null}}function Jo(t,e){null===t.lastUpdate?t.firstUpdate=t.lastUpdate=e:(t.lastUpdate.next=e,t.lastUpdate=e)}function $o(t,e){var n=t.alternate;if(null===n){var i=t.updateQueue,r=null;null===i&&(i=t.updateQueue=Xo(t.memoizedState))}else i=t.updateQueue,r=n.updateQueue,null===i?null===r?(i=t.updateQueue=Xo(t.memoizedState),r=n.updateQueue=Xo(n.memoizedState)):i=t.updateQueue=Ko(r):null===r&&(r=n.updateQueue=Ko(i));null===r||i===r?Jo(i,e):null===i.lastUpdate||null===r.lastUpdate?(Jo(i,e),Jo(r,e)):(Jo(i,e),r.lastUpdate=e)}function Qo(t,e){var n=t.updateQueue;null===(n=null===n?t.updateQueue=Xo(t.memoizedState):ta(t,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=e:(n.lastCapturedUpdate.next=e,n.lastCapturedUpdate=e)}function ta(t,e){var n=t.alternate;return null!==n&&e===n.updateQueue&&(e=t.updateQueue=Ko(e)),e}function ea(t,e,n,i,o,a){switch(n.tag){case qo:return"function"==typeof(t=n.payload)?t.call(a,i,o):t;case Wo:t.effectTag=-2049&t.effectTag|64;case Zo:if(null==(o="function"==typeof(t=n.payload)?t.call(a,i,o):t))break;return r({},i,o);case Go:Ho=!0}return i}function na(t,e,n,i,r){Ho=!1;for(var o=(e=ta(t,e)).baseState,a=null,s=0,l=e.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c<r?(null===a&&(a=l,o=u),s<c&&(s=c)):(u=ea(t,0,l,u,n,i),null!==l.callback&&(t.effectTag|=32,l.nextEffect=null,null===e.lastEffect?e.firstEffect=e.lastEffect=l:(e.lastEffect.nextEffect=l,e.lastEffect=l))),l=l.next}for(c=null,l=e.firstCapturedUpdate;null!==l;){var p=l.expirationTime;p<r?(null===c&&(c=l,null===a&&(o=u)),s<p&&(s=p)):(u=ea(t,0,l,u,n,i),null!==l.callback&&(t.effectTag|=32,l.nextEffect=null,null===e.lastCapturedEffect?e.firstCapturedEffect=e.lastCapturedEffect=l:(e.lastCapturedEffect.nextEffect=l,e.lastCapturedEffect=l))),l=l.next}null===a&&(e.lastUpdate=null),null===c?e.lastCapturedUpdate=null:t.effectTag|=32,null===a&&null===c&&(o=u),e.baseState=o,e.firstUpdate=a,e.firstCapturedUpdate=c,t.expirationTime=s,t.memoizedState=u}function ia(t,e,n){null!==e.firstCapturedUpdate&&(null!==e.lastUpdate&&(e.lastUpdate.next=e.firstCapturedUpdate,e.lastUpdate=e.lastCapturedUpdate),e.firstCapturedUpdate=e.lastCapturedUpdate=null),ra(e.firstEffect,n),e.firstEffect=e.lastEffect=null,ra(e.firstCapturedEffect,n),e.firstCapturedEffect=e.lastCapturedEffect=null}function ra(t,e){for(;null!==t;){var n=t.callback;if(null!==n){t.callback=null;var i=e;"function"!=typeof n&&a("191",n),n.call(i)}t=t.nextEffect}}function oa(t,e){return{value:t,source:e,stack:le(e)}}function aa(t){t.effectTag|=4}var sa=void 0,la=void 0,ua=void 0,ca=void 0;sa=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},la=function(){},ua=function(t,e,n,i,o){var a=t.memoizedProps;if(a!==i){var s=e.stateNode;switch(br(gr.current),t=null,n){case"input":a=ve(s,a),i=ve(s,i),t=[];break;case"option":a=Hn(s,a),i=Hn(s,i),t=[];break;case"select":a=r({},a,{value:void 0}),i=r({},i,{value:void 0}),t=[];break;case"textarea":a=Kn(s,a),i=Kn(s,i),t=[];break;default:"function"!=typeof a.onClick&&"function"==typeof i.onClick&&(s.onclick=di)}pi(n,i),s=n=void 0;var l=null;for(n in a)if(!i.hasOwnProperty(n)&&a.hasOwnProperty(n)&&null!=a[n])if("style"===n){var u=a[n];for(s in u)u.hasOwnProperty(s)&&(l||(l={}),l[s]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(v.hasOwnProperty(n)?t||(t=[]):(t=t||[]).push(n,null));for(n in i){var c=i[n];if(u=null!=a?a[n]:void 0,i.hasOwnProperty(n)&&c!==u&&(null!=c||null!=u))if("style"===n)if(u){for(s in u)!u.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(l||(l={}),l[s]="");for(s in c)c.hasOwnProperty(s)&&u[s]!==c[s]&&(l||(l={}),l[s]=c[s])}else l||(t||(t=[]),t.push(n,l)),l=c;else"dangerouslySetInnerHTML"===n?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(t=t||[]).push(n,""+c)):"children"===n?u===c||"string"!=typeof c&&"number"!=typeof c||(t=t||[]).push(n,""+c):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(v.hasOwnProperty(n)?(null!=c&&fi(o,n),t||u===c||(t=[])):(t=t||[]).push(n,c))}l&&(t=t||[]).push("style",l),o=t,(e.updateQueue=o)&&aa(e)}},ca=function(t,e,n,i){n!==i&&aa(e)};var pa="function"==typeof WeakSet?WeakSet:Set;function ha(t,e){var n=e.source,i=e.stack;null===i&&null!==n&&(i=le(n)),null!==n&&se(n.type),e=e.value,null!==t&&1===t.tag&&se(t.type);try{console.error(e)}catch(t){setTimeout(function(){throw t})}}function fa(t){var e=t.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){Xa(t,e)}else e.current=null}function da(t,e,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var i=n=n.next;do{if((i.tag&t)!==Pr){var r=i.destroy;i.destroy=void 0,void 0!==r&&r()}(i.tag&e)!==Pr&&(r=i.create,i.destroy=r()),i=i.next}while(i!==n)}}function ma(t){switch("function"==typeof Vi&&Vi(t),t.tag){case 0:case 11:case 14:case 15:var e=t.updateQueue;if(null!==e&&null!==(e=e.lastEffect)){var n=e=e.next;do{var i=n.destroy;if(void 0!==i){var r=t;try{i()}catch(t){Xa(r,t)}}n=n.next}while(n!==e)}break;case 1:if(fa(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Xa(t,e)}break;case 5:fa(t);break;case 4:ga(t)}}function ya(t){return 5===t.tag||3===t.tag||4===t.tag}function _a(t){t:{for(var e=t.return;null!==e;){if(ya(e)){var n=e;break t}e=e.return}a("160"),n=void 0}var i=e=void 0;switch(n.tag){case 5:e=n.stateNode,i=!1;break;case 3:case 4:e=n.stateNode.containerInfo,i=!0;break;default:a("161")}16&n.effectTag&&(oi(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||ya(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}for(var r=t;;){if(5===r.tag||6===r.tag)if(n)if(i){var o=e,s=r.stateNode,l=n;8===o.nodeType?o.parentNode.insertBefore(s,l):o.insertBefore(s,l)}else e.insertBefore(r.stateNode,n);else i?(s=e,l=r.stateNode,8===s.nodeType?(o=s.parentNode).insertBefore(l,s):(o=s).appendChild(l),null!=(s=s._reactRootContainer)||null!==o.onclick||(o.onclick=di)):e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function ga(t){for(var e=t,n=!1,i=void 0,r=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&a("160"),n.tag){case 5:i=n.stateNode,r=!1;break t;case 3:case 4:i=n.stateNode.containerInfo,r=!0;break t}n=n.return}n=!0}if(5===e.tag||6===e.tag){t:for(var o=e,s=o;;)if(ma(s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===o)break;for(;null===s.sibling;){if(null===s.return||s.return===o)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(o=i,s=e.stateNode,8===o.nodeType?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(e.stateNode)}else if(4===e.tag){if(null!==e.child){i=e.stateNode.containerInfo,r=!0,e.child.return=e,e=e.child;continue}}else if(ma(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;4===(e=e.return).tag&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}function va(t,e){switch(e.tag){case 0:case 11:case 14:case 15:da(kr,Ar,e);break;case 1:break;case 5:var n=e.stateNode;if(null!=n){var i=e.memoizedProps;t=null!==t?t.memoizedProps:i;var r=e.type,o=e.updateQueue;e.updateQueue=null,null!==o&&function(t,e,n,i,r){t[O]=r,"input"===n&&"radio"===r.type&&null!=r.name&&be(t,r),hi(n,i),i=hi(n,r);for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];"style"===a?ui(t,s):"dangerouslySetInnerHTML"===a?ri(t,s):"children"===a?oi(t,s):_e(t,a,s,i)}switch(n){case"input":we(t,r);break;case"textarea":Jn(t,r);break;case"select":e=t._wrapperState.wasMultiple,t._wrapperState.wasMultiple=!!r.multiple,null!=(n=r.value)?Xn(t,!!r.multiple,n,!1):e!==!!r.multiple&&(null!=r.defaultValue?Xn(t,!!r.multiple,r.defaultValue,!0):Xn(t,!!r.multiple,r.multiple?[]:"",!1))}}(n,o,r,t,i)}break;case 6:null===e.stateNode&&a("162"),e.stateNode.nodeValue=e.memoizedProps;break;case 3:case 12:break;case 13:if(n=e.memoizedState,i=void 0,t=e,null===n?i=!1:(i=!0,t=e.child,0===n.timedOutAt&&(n.timedOutAt=ws())),null!==t&&function(t,e){for(var n=t;;){if(5===n.tag){var i=n.stateNode;if(e)i.style.display="none";else{i=n.stateNode;var r=n.memoizedProps.style;r=null!=r&&r.hasOwnProperty("display")?r.display:null,i.style.display=li("display",r)}}else if(6===n.tag)n.stateNode.nodeValue=e?"":n.memoizedProps;else{if(13===n.tag&&null!==n.memoizedState){(i=n.child.sibling).return=n,n=i;continue}if(null!==n.child){n.child.return=n,n=n.child;continue}}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(t,i),null!==(n=e.updateQueue)){e.updateQueue=null;var s=e.stateNode;null===s&&(s=e.stateNode=new pa),n.forEach(function(t){var n=function(t,e){var n=t.stateNode;null!==n&&n.delete(e),e=Ka(e=ws(),t),null!==(t=Ja(t,e))&&(Qi(t,e),0!==(e=t.expirationTime)&&Es(t,e))}.bind(null,e,t);s.has(t)||(s.add(t),t.then(n,n))})}break;case 17:break;default:a("163")}}var xa="function"==typeof WeakMap?WeakMap:Map;function ba(t,e,n){(n=Yo(n)).tag=Wo,n.payload={element:null};var i=e.value;return n.callback=function(){Ms(i),ha(t,e)},n}function wa(t,e,n){(n=Yo(n)).tag=Wo;var i=t.type.getDerivedStateFromError;if("function"==typeof i){var r=e.value;n.payload=function(){return i(r)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof i&&(null===Fa?Fa=new Set([this]):Fa.add(this));var n=e.value,r=e.stack;ha(t,e),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Ea(t){switch(t.tag){case 1:Oi(t.type)&&Di();var e=t.effectTag;return 2048&e?(t.effectTag=-2049&e|64,t):null;case 3:return Er(),Ri(),0!=(64&(e=t.effectTag))&&a("285"),t.effectTag=-2049&e|64,t;case 5:return Sr(t),null;case 13:return 2048&(e=t.effectTag)?(t.effectTag=-2049&e|64,t):null;case 18:return null;case 4:return Er(),null;case 10:return Uo(t),null;default:return null}}var Ta=qt.ReactCurrentDispatcher,Sa=qt.ReactCurrentOwner,Pa=1073741822,Ca=!1,ka=null,Aa=null,za=0,La=-1,Ma=!1,Ia=null,Oa=!1,Da=null,Ra=null,Ba=null,Fa=null;function Na(){if(null!==ka)for(var t=ka.return;null!==t;){var e=t;switch(e.tag){case 1:var n=e.type.childContextTypes;null!=n&&Di();break;case 3:Er(),Ri();break;case 5:Sr(e);break;case 4:Er();break;case 10:Uo(e)}t=t.return}Aa=null,za=0,La=-1,Ma=!1,ka=null}function Ua(){for(;null!==Ia;){var t=Ia.effectTag;if(16&t&&oi(Ia.stateNode,""),128&t){var e=Ia.alternate;null!==e&&(null!==(e=e.ref)&&("function"==typeof e?e(null):e.current=null))}switch(14&t){case 2:_a(Ia),Ia.effectTag&=-3;break;case 6:_a(Ia),Ia.effectTag&=-3,va(Ia.alternate,Ia);break;case 4:va(Ia.alternate,Ia);break;case 8:ga(t=Ia),t.return=null,t.child=null,t.memoizedState=null,t.updateQueue=null,null!==(t=t.alternate)&&(t.return=null,t.child=null,t.memoizedState=null,t.updateQueue=null)}Ia=Ia.nextEffect}}function ja(){for(;null!==Ia;){if(256&Ia.effectTag)t:{var t=Ia.alternate,e=Ia;switch(e.tag){case 0:case 11:case 15:da(Cr,Pr,e);break t;case 1:if(256&e.effectTag&&null!==t){var n=t.memoizedProps,i=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:ir(e.type,n),i),t.__reactInternalSnapshotBeforeUpdate=e}break t;case 3:case 5:case 6:case 4:case 17:break t;default:a("163")}}Ia=Ia.nextEffect}}function Va(t,e){for(;null!==Ia;){var n=Ia.effectTag;if(36&n){var i=Ia.alternate,r=Ia,o=e;switch(r.tag){case 0:case 11:case 15:da(zr,Lr,r);break;case 1:var s=r.stateNode;if(4&r.effectTag)if(null===i)s.componentDidMount();else{var l=r.elementType===r.type?i.memoizedProps:ir(r.type,i.memoizedProps);s.componentDidUpdate(l,i.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}null!==(i=r.updateQueue)&&ia(0,i,s);break;case 3:if(null!==(i=r.updateQueue)){if(s=null,null!==r.child)switch(r.child.tag){case 5:s=r.child.stateNode;break;case 1:s=r.child.stateNode}ia(0,i,s)}break;case 5:o=r.stateNode,null===i&&4&r.effectTag&&_i(r.type,r.memoizedProps)&&o.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:a("163")}}128&n&&(null!==(r=Ia.ref)&&(o=Ia.stateNode,"function"==typeof r?r(o):r.current=o)),512&n&&(Da=t),Ia=Ia.nextEffect}}function Za(){null!==Ra&&wi(Ra),null!==Ba&&Ba()}function qa(t,e){Oa=Ca=!0,t.current===e&&a("177");var n=t.pendingCommitExpirationTime;0===n&&a("261"),t.pendingCommitExpirationTime=0;var i=e.expirationTime,r=e.childExpirationTime;for(function(t,e){if(t.didError=!1,0===e)t.earliestPendingTime=0,t.latestPendingTime=0,t.earliestSuspendedTime=0,t.latestSuspendedTime=0,t.latestPingedTime=0;else{e<t.latestPingedTime&&(t.latestPingedTime=0);var n=t.latestPendingTime;0!==n&&(n>e?t.earliestPendingTime=t.latestPendingTime=0:t.earliestPendingTime>e&&(t.earliestPendingTime=t.latestPendingTime)),0===(n=t.earliestSuspendedTime)?Qi(t,e):e<t.latestSuspendedTime?(t.earliestSuspendedTime=0,t.latestSuspendedTime=0,t.latestPingedTime=0,Qi(t,e)):e>n&&Qi(t,e)}nr(0,t)}(t,r>i?r:i),Sa.current=null,i=void 0,1<e.effectTag?null!==e.lastEffect?(e.lastEffect.nextEffect=e,i=e.firstEffect):i=e:i=e.firstEffect,mi=Tn,yi=function(){var t=Rn();if(Bn(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{var n=(e=(e=t.ownerDocument)&&e.defaultView||window).getSelection&&e.getSelection();if(n&&0!==n.rangeCount){e=n.anchorNode;var i=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{e.nodeType,r.nodeType}catch(t){e=null;break t}var o=0,a=-1,s=-1,l=0,u=0,c=t,p=null;e:for(;;){for(var h;c!==e||0!==i&&3!==c.nodeType||(a=o+i),c!==r||0!==n&&3!==c.nodeType||(s=o+n),3===c.nodeType&&(o+=c.nodeValue.length),null!==(h=c.firstChild);)p=c,c=h;for(;;){if(c===t)break e;if(p===e&&++l===i&&(a=o),p===r&&++u===n&&(s=o),null!==(h=c.nextSibling))break;p=(c=p).parentNode}c=h}e=-1===a||-1===s?null:{start:a,end:s}}else e=null}e=e||{start:0,end:0}}else e=null;return{focusedElem:t,selectionRange:e}}(),Tn=!1,Ia=i;null!==Ia;){r=!1;var s=void 0;try{ja()}catch(t){r=!0,s=t}r&&(null===Ia&&a("178"),Xa(Ia,s),null!==Ia&&(Ia=Ia.nextEffect))}for(Ia=i;null!==Ia;){r=!1,s=void 0;try{Ua()}catch(t){r=!0,s=t}r&&(null===Ia&&a("178"),Xa(Ia,s),null!==Ia&&(Ia=Ia.nextEffect))}for(Fn(yi),yi=null,Tn=!!mi,mi=null,t.current=e,Ia=i;null!==Ia;){r=!1,s=void 0;try{Va(t,n)}catch(t){r=!0,s=t}r&&(null===Ia&&a("178"),Xa(Ia,s),null!==Ia&&(Ia=Ia.nextEffect))}if(null!==i&&null!==Da){var l=function(t,e){Ba=Ra=Da=null;var n=rs;rs=!0;do{if(512&e.effectTag){var i=!1,r=void 0;try{var o=e;da(Ir,Pr,o),da(Pr,Mr,o)}catch(t){i=!0,r=t}i&&Xa(e,r)}e=e.nextEffect}while(null!==e);rs=n,0!==(n=t.expirationTime)&&Es(t,n),cs||rs||ks(1073741823,!1)}.bind(null,t,i);Ra=o.unstable_runWithPriority(o.unstable_NormalPriority,function(){return bi(l)}),Ba=l}Ca=Oa=!1,"function"==typeof ji&&ji(e.stateNode),n=e.expirationTime,0===(e=(e=e.childExpirationTime)>n?e:n)&&(Fa=null),function(t,e){t.expirationTime=e,t.finishedWork=null}(t,e)}function Ga(t){for(;;){var e=t.alternate,n=t.return,i=t.sibling;if(0==(1024&t.effectTag)){ka=t;t:{var o=e,s=za,l=(e=t).pendingProps;switch(e.tag){case 2:case 16:break;case 15:case 0:break;case 1:Oi(e.type)&&Di();break;case 3:Er(),Ri(),(l=e.stateNode).pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==o&&null!==o.child||(vo(e),e.effectTag&=-3),la(e);break;case 5:Sr(e);var u=br(xr.current);if(s=e.type,null!==o&&null!=e.stateNode)ua(o,e,s,l,u),o.ref!==e.ref&&(e.effectTag|=128);else if(l){var c=br(gr.current);if(vo(e)){o=(l=e).stateNode;var p=l.type,h=l.memoizedProps,f=u;switch(o[I]=l,o[O]=h,s=void 0,u=p){case"iframe":case"object":Sn("load",o);break;case"video":case"audio":for(p=0;p<et.length;p++)Sn(et[p],o);break;case"source":Sn("error",o);break;case"img":case"image":case"link":Sn("error",o),Sn("load",o);break;case"form":Sn("reset",o),Sn("submit",o);break;case"details":Sn("toggle",o);break;case"input":xe(o,h),Sn("invalid",o),fi(f,"onChange");break;case"select":o._wrapperState={wasMultiple:!!h.multiple},Sn("invalid",o),fi(f,"onChange");break;case"textarea":Yn(o,h),Sn("invalid",o),fi(f,"onChange")}for(s in pi(u,h),p=null,h)h.hasOwnProperty(s)&&(c=h[s],"children"===s?"string"==typeof c?o.textContent!==c&&(p=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(p=["children",""+c]):v.hasOwnProperty(s)&&null!=c&&fi(f,s));switch(u){case"input":Vt(o),Ee(o,h,!0);break;case"textarea":Vt(o),$n(o);break;case"select":case"option":break;default:"function"==typeof h.onClick&&(o.onclick=di)}s=p,l.updateQueue=s,(l=null!==s)&&aa(e)}else{h=e,o=s,f=l,p=9===u.nodeType?u:u.ownerDocument,c===Qn.html&&(c=ti(o)),c===Qn.html?"script"===o?((o=p.createElement("div")).innerHTML="<script><\/script>",p=o.removeChild(o.firstChild)):"string"==typeof f.is?p=p.createElement(o,{is:f.is}):(p=p.createElement(o),"select"===o&&f.multiple&&(p.multiple=!0)):p=p.createElementNS(c,o),(o=p)[I]=h,o[O]=l,sa(o,e,!1,!1),f=o;var d=u,m=hi(p=s,h=l);switch(p){case"iframe":case"object":Sn("load",f),u=h;break;case"video":case"audio":for(u=0;u<et.length;u++)Sn(et[u],f);u=h;break;case"source":Sn("error",f),u=h;break;case"img":case"image":case"link":Sn("error",f),Sn("load",f),u=h;break;case"form":Sn("reset",f),Sn("submit",f),u=h;break;case"details":Sn("toggle",f),u=h;break;case"input":xe(f,h),u=ve(f,h),Sn("invalid",f),fi(d,"onChange");break;case"option":u=Hn(f,h);break;case"select":f._wrapperState={wasMultiple:!!h.multiple},u=r({},h,{value:void 0}),Sn("invalid",f),fi(d,"onChange");break;case"textarea":Yn(f,h),u=Kn(f,h),Sn("invalid",f),fi(d,"onChange");break;default:u=h}pi(p,u),c=void 0;var y=p,_=f,g=u;for(c in g)if(g.hasOwnProperty(c)){var x=g[c];"style"===c?ui(_,x):"dangerouslySetInnerHTML"===c?null!=(x=x?x.__html:void 0)&&ri(_,x):"children"===c?"string"==typeof x?("textarea"!==y||""!==x)&&oi(_,x):"number"==typeof x&&oi(_,""+x):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(v.hasOwnProperty(c)?null!=x&&fi(d,c):null!=x&&_e(_,c,x,m))}switch(p){case"input":Vt(f),Ee(f,h,!1);break;case"textarea":Vt(f),$n(f);break;case"option":null!=h.value&&f.setAttribute("value",""+ge(h.value));break;case"select":(u=f).multiple=!!h.multiple,null!=(f=h.value)?Xn(u,!!h.multiple,f,!1):null!=h.defaultValue&&Xn(u,!!h.multiple,h.defaultValue,!0);break;default:"function"==typeof u.onClick&&(f.onclick=di)}(l=_i(s,l))&&aa(e),e.stateNode=o}null!==e.ref&&(e.effectTag|=128)}else null===e.stateNode&&a("166");break;case 6:o&&null!=e.stateNode?ca(o,e,o.memoizedProps,l):("string"!=typeof l&&(null===e.stateNode&&a("166")),o=br(xr.current),br(gr.current),vo(e)?(s=(l=e).stateNode,o=l.memoizedProps,s[I]=l,(l=s.nodeValue!==o)&&aa(e)):(s=e,(l=(9===o.nodeType?o:o.ownerDocument).createTextNode(l))[I]=e,s.stateNode=l));break;case 11:break;case 13:if(l=e.memoizedState,0!=(64&e.effectTag)){e.expirationTime=s,ka=e;break t}l=null!==l,s=null!==o&&null!==o.memoizedState,null!==o&&!l&&s&&(null!==(o=o.child.sibling)&&(null!==(u=e.firstEffect)?(e.firstEffect=o,o.nextEffect=u):(e.firstEffect=e.lastEffect=o,o.nextEffect=null),o.effectTag=8)),(l||s)&&(e.effectTag|=4);break;case 7:case 8:case 12:break;case 4:Er(),la(e);break;case 10:Uo(e);break;case 9:case 14:break;case 17:Oi(e.type)&&Di();break;case 18:break;default:a("156")}ka=null}if(e=t,1===za||1!==e.childExpirationTime){for(l=0,s=e.child;null!==s;)(o=s.expirationTime)>l&&(l=o),(u=s.childExpirationTime)>l&&(l=u),s=s.sibling;e.childExpirationTime=l}if(null!==ka)return ka;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t))}else{if(null!==(t=Ea(t)))return t.effectTag&=1023,t;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=1024)}if(null!==i)return i;if(null===n)break;t=n}return null}function Wa(t){var e=Oo(t.alternate,t,za);return t.memoizedProps=t.pendingProps,null===e&&(e=Ga(t)),Sa.current=null,e}function Ha(t,e){Ca&&a("243"),Za(),Ca=!0;var n=Ta.current;Ta.current=lo;var i=t.nextExpirationTimeToWorkOn;i===za&&t===Aa&&null!==ka||(Na(),za=i,ka=Hi((Aa=t).current,null),t.pendingCommitExpirationTime=0);for(var r=!1;;){try{if(e)for(;null!==ka&&!Ps();)ka=Wa(ka);else for(;null!==ka;)ka=Wa(ka)}catch(e){if(Fo=Bo=Ro=null,Jr(),null===ka)r=!0,Ms(e);else{null===ka&&a("271");var o=ka,s=o.return;if(null!==s){t:{var l=t,u=s,c=o,p=e;if(s=za,c.effectTag|=1024,c.firstEffect=c.lastEffect=null,null!==p&&"object"==typeof p&&"function"==typeof p.then){var h=p;p=u;var f=-1,d=-1;do{if(13===p.tag){var m=p.alternate;if(null!==m&&null!==(m=m.memoizedState)){d=10*(1073741822-m.timedOutAt);break}"number"==typeof(m=p.pendingProps.maxDuration)&&(0>=m?f=0:(-1===f||m<f)&&(f=m))}p=p.return}while(null!==p);p=u;do{if((m=13===p.tag)&&(m=void 0!==p.memoizedProps.fallback&&null===p.memoizedState),m){if(null===(u=p.updateQueue)?((u=new Set).add(h),p.updateQueue=u):u.add(h),0==(1&p.mode)){p.effectTag|=64,c.effectTag&=-1957,1===c.tag&&(null===c.alternate?c.tag=17:((s=Yo(1073741823)).tag=Go,$o(c,s))),c.expirationTime=1073741823;break t}u=s;var y=(c=l).pingCache;null===y?(y=c.pingCache=new xa,m=new Set,y.set(h,m)):void 0===(m=y.get(h))&&(m=new Set,y.set(h,m)),m.has(u)||(m.add(u),c=Ya.bind(null,c,h,u),h.then(c,c)),-1===f?l=1073741823:(-1===d&&(d=10*(1073741822-er(l,s))-5e3),l=d+f),0<=l&&La<l&&(La=l),p.effectTag|=2048,p.expirationTime=s;break t}p=p.return}while(null!==p);p=Error((se(c.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+le(c))}Ma=!0,p=oa(p,c),l=u;do{switch(l.tag){case 3:l.effectTag|=2048,l.expirationTime=s,Qo(l,s=ba(l,p,s));break t;case 1:if(f=p,d=l.type,c=l.stateNode,0==(64&l.effectTag)&&("function"==typeof d.getDerivedStateFromError||null!==c&&"function"==typeof c.componentDidCatch&&(null===Fa||!Fa.has(c)))){l.effectTag|=2048,l.expirationTime=s,Qo(l,s=wa(l,f,s));break t}}l=l.return}while(null!==l)}ka=Ga(o);continue}r=!0,Ms(e)}}break}if(Ca=!1,Ta.current=n,Fo=Bo=Ro=null,Jr(),r)Aa=null,t.finishedWork=null;else if(null!==ka)t.finishedWork=null;else{if(null===(n=t.current.alternate)&&a("281"),Aa=null,Ma){if(r=t.latestPendingTime,o=t.latestSuspendedTime,s=t.latestPingedTime,0!==r&&r<i||0!==o&&o<i||0!==s&&s<i)return tr(t,i),void bs(t,n,i,t.expirationTime,-1);if(!t.didError&&e)return t.didError=!0,i=t.nextExpirationTimeToWorkOn=i,e=t.expirationTime=1073741823,void bs(t,n,i,e,-1)}e&&-1!==La?(tr(t,i),(e=10*(1073741822-er(t,i)))<La&&(La=e),e=10*(1073741822-ws()),e=La-e,bs(t,n,i,t.expirationTime,0>e?0:e)):(t.pendingCommitExpirationTime=i,t.finishedWork=n)}}function Xa(t,e){for(var n=t.return;null!==n;){switch(n.tag){case 1:var i=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===Fa||!Fa.has(i)))return $o(n,t=wa(n,t=oa(e,t),1073741823)),void $a(n,1073741823);break;case 3:return $o(n,t=ba(n,t=oa(e,t),1073741823)),void $a(n,1073741823)}n=n.return}3===t.tag&&($o(t,n=ba(t,n=oa(e,t),1073741823)),$a(t,1073741823))}function Ka(t,e){var n=o.unstable_getCurrentPriorityLevel(),i=void 0;if(0==(1&e.mode))i=1073741823;else if(Ca&&!Oa)i=za;else{switch(n){case o.unstable_ImmediatePriority:i=1073741823;break;case o.unstable_UserBlockingPriority:i=1073741822-10*(1+((1073741822-t+15)/10|0));break;case o.unstable_NormalPriority:i=1073741822-25*(1+((1073741822-t+500)/25|0));break;case o.unstable_LowPriority:case o.unstable_IdlePriority:i=1;break;default:a("313")}null!==Aa&&i===za&&--i}return n===o.unstable_UserBlockingPriority&&(0===ss||i<ss)&&(ss=i),i}function Ya(t,e,n){var i=t.pingCache;null!==i&&i.delete(e),null!==Aa&&za===n?Aa=null:(e=t.earliestSuspendedTime,i=t.latestSuspendedTime,0!==e&&n<=e&&n>=i&&(t.didError=!1,(0===(e=t.latestPingedTime)||e>n)&&(t.latestPingedTime=n),nr(n,t),0!==(n=t.expirationTime)&&Es(t,n)))}function Ja(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e);var i=t.return,r=null;if(null===i&&3===t.tag)r=t.stateNode;else for(;null!==i;){if(n=i.alternate,i.childExpirationTime<e&&(i.childExpirationTime=e),null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e),null===i.return&&3===i.tag){r=i.stateNode;break}i=i.return}return r}function $a(t,e){null!==(t=Ja(t,e))&&(!Ca&&0!==za&&e>za&&Na(),Qi(t,e),Ca&&!Oa&&Aa===t||Es(t,t.expirationTime),_s>ys&&(_s=0,a("185")))}function Qa(t,e,n,i,r){return o.unstable_runWithPriority(o.unstable_ImmediatePriority,function(){return t(e,n,i,r)})}var ts=null,es=null,ns=0,is=void 0,rs=!1,os=null,as=0,ss=0,ls=!1,us=null,cs=!1,ps=!1,hs=null,fs=o.unstable_now(),ds=1073741822-(fs/10|0),ms=ds,ys=50,_s=0,gs=null;function vs(){ds=1073741822-((o.unstable_now()-fs)/10|0)}function xs(t,e){if(0!==ns){if(e<ns)return;null!==is&&o.unstable_cancelCallback(is)}ns=e,t=o.unstable_now()-fs,is=o.unstable_scheduleCallback(Cs,{timeout:10*(1073741822-e)-t})}function bs(t,e,n,i,r){t.expirationTime=i,0!==r||Ps()?0<r&&(t.timeoutHandle=vi(function(t,e,n){t.pendingCommitExpirationTime=n,t.finishedWork=e,vs(),ms=ds,As(t,n)}.bind(null,t,e,n),r)):(t.pendingCommitExpirationTime=n,t.finishedWork=e)}function ws(){return rs?ms:(Ts(),0!==as&&1!==as||(vs(),ms=ds),ms)}function Es(t,e){null===t.nextScheduledRoot?(t.expirationTime=e,null===es?(ts=es=t,t.nextScheduledRoot=t):(es=es.nextScheduledRoot=t).nextScheduledRoot=ts):e>t.expirationTime&&(t.expirationTime=e),rs||(cs?ps&&(os=t,as=1073741823,zs(t,1073741823,!1)):1073741823===e?ks(1073741823,!1):xs(t,e))}function Ts(){var t=0,e=null;if(null!==es)for(var n=es,i=ts;null!==i;){var r=i.expirationTime;if(0===r){if((null===n||null===es)&&a("244"),i===i.nextScheduledRoot){ts=es=i.nextScheduledRoot=null;break}if(i===ts)ts=r=i.nextScheduledRoot,es.nextScheduledRoot=r,i.nextScheduledRoot=null;else{if(i===es){(es=n).nextScheduledRoot=ts,i.nextScheduledRoot=null;break}n.nextScheduledRoot=i.nextScheduledRoot,i.nextScheduledRoot=null}i=n.nextScheduledRoot}else{if(r>t&&(t=r,e=i),i===es)break;if(1073741823===t)break;n=i,i=i.nextScheduledRoot}}os=e,as=t}var Ss=!1;function Ps(){return!!Ss||!!o.unstable_shouldYield()&&(Ss=!0)}function Cs(){try{if(!Ps()&&null!==ts){vs();var t=ts;do{var e=t.expirationTime;0!==e&&ds<=e&&(t.nextExpirationTimeToWorkOn=ds),t=t.nextScheduledRoot}while(t!==ts)}ks(0,!0)}finally{Ss=!1}}function ks(t,e){if(Ts(),e)for(vs(),ms=ds;null!==os&&0!==as&&t<=as&&!(Ss&&ds>as);)zs(os,as,ds>as),Ts(),vs(),ms=ds;else for(;null!==os&&0!==as&&t<=as;)zs(os,as,!1),Ts();if(e&&(ns=0,is=null),0!==as&&xs(os,as),_s=0,gs=null,null!==hs)for(t=hs,hs=null,e=0;e<t.length;e++){var n=t[e];try{n._onComplete()}catch(t){ls||(ls=!0,us=t)}}if(ls)throw t=us,us=null,ls=!1,t}function As(t,e){rs&&a("253"),os=t,as=e,zs(t,e,!1),ks(1073741823,!1)}function zs(t,e,n){if(rs&&a("245"),rs=!0,n){var i=t.finishedWork;null!==i?Ls(t,i,e):(t.finishedWork=null,-1!==(i=t.timeoutHandle)&&(t.timeoutHandle=-1,xi(i)),Ha(t,n),null!==(i=t.finishedWork)&&(Ps()?t.finishedWork=i:Ls(t,i,e)))}else null!==(i=t.finishedWork)?Ls(t,i,e):(t.finishedWork=null,-1!==(i=t.timeoutHandle)&&(t.timeoutHandle=-1,xi(i)),Ha(t,n),null!==(i=t.finishedWork)&&Ls(t,i,e));rs=!1}function Ls(t,e,n){var i=t.firstBatch;if(null!==i&&i._expirationTime>=n&&(null===hs?hs=[i]:hs.push(i),i._defer))return t.finishedWork=e,void(t.expirationTime=0);t.finishedWork=null,t===gs?_s++:(gs=t,_s=0),o.unstable_runWithPriority(o.unstable_ImmediatePriority,function(){qa(t,e)})}function Ms(t){null===os&&a("246"),os.expirationTime=0,ls||(ls=!0,us=t)}function Is(t,e){var n=cs;cs=!0;try{return t(e)}finally{(cs=n)||rs||ks(1073741823,!1)}}function Os(t,e){if(cs&&!ps){ps=!0;try{return t(e)}finally{ps=!1}}return t(e)}function Ds(t,e,n){cs||rs||0===ss||(ks(ss,!1),ss=0);var i=cs;cs=!0;try{return o.unstable_runWithPriority(o.unstable_UserBlockingPriority,function(){return t(e,n)})}finally{(cs=i)||rs||ks(1073741823,!1)}}function Rs(t,e,n,i,r){var o=e.current;t:if(n){e:{2===en(n=n._reactInternalFiber)&&1===n.tag||a("170");var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Oi(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(null!==s);a("171"),s=void 0}if(1===n.tag){var l=n.type;if(Oi(l)){n=Fi(n,l,s);break t}}n=s}else n=Ai;return null===e.context?e.context=n:e.pendingContext=n,e=r,(r=Yo(i)).payload={element:t},null!==(e=void 0===e?null:e)&&(r.callback=e),Za(),$o(o,r),$a(o,i),i}function Bs(t,e,n,i){var r=e.current;return Rs(t,e,n,r=Ka(ws(),r),i)}function Fs(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Ns(t){var e=1073741822-25*(1+((1073741822-ws()+500)/25|0));e>=Pa&&(e=Pa-1),this._expirationTime=Pa=e,this._root=t,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function Us(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function js(t,e,n){t={current:e=Gi(3,null,null,e?3:0),containerInfo:t,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=e.stateNode=t}function Vs(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Zs(t,e,n,i,r){var o=n._reactRootContainer;if(o){if("function"==typeof r){var a=r;r=function(){var t=Fs(o._internalRoot);a.call(t)}}null!=t?o.legacy_renderSubtreeIntoContainer(t,e,r):o.render(e,r)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new js(t,!1,e)}(n,i),"function"==typeof r){var s=r;r=function(){var t=Fs(o._internalRoot);s.call(t)}}Os(function(){null!=t?o.legacy_renderSubtreeIntoContainer(t,e,r):o.render(e,r)})}return Fs(o._internalRoot)}function qs(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return Vs(e)||a("200"),function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Xt,key:null==i?null:""+i,children:t,containerInfo:e,implementation:n}}(t,e,null,n)}Pt=function(t,e,n){switch(e){case"input":if(we(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=F(i);r||a("90"),Zt(i),we(i,r)}}}break;case"textarea":Jn(t,n);break;case"select":null!=(e=n.value)&&Xn(t,!!n.multiple,e,!1)}},Ns.prototype.render=function(t){this._defer||a("250"),this._hasChildren=!0,this._children=t;var e=this._root._internalRoot,n=this._expirationTime,i=new Us;return Rs(t,e,null,n,i._onCommit),i},Ns.prototype.then=function(t){if(this._didComplete)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},Ns.prototype.commit=function(){var t=this._root._internalRoot,e=t.firstBatch;if(this._defer&&null!==e||a("251"),this._hasChildren){var n=this._expirationTime;if(e!==this){this._hasChildren&&(n=this._expirationTime=e._expirationTime,this.render(this._children));for(var i=null,r=e;r!==this;)i=r,r=r._next;null===i&&a("251"),i._next=r._next,this._next=e,t.firstBatch=this}this._defer=!1,As(t,n),e=this._next,this._next=null,null!==(e=t.firstBatch=e)&&e._hasChildren&&e.render(e._children)}else this._next=null,this._defer=!1},Ns.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++)(0,t[e])()}},Us.prototype.then=function(t){if(this._didCommit)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},Us.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++){var n=t[e];"function"!=typeof n&&a("191",n),n()}}},js.prototype.render=function(t,e){var n=this._internalRoot,i=new Us;return null!==(e=void 0===e?null:e)&&i.then(e),Bs(t,n,null,i._onCommit),i},js.prototype.unmount=function(t){var e=this._internalRoot,n=new Us;return null!==(t=void 0===t?null:t)&&n.then(t),Bs(null,e,null,n._onCommit),n},js.prototype.legacy_renderSubtreeIntoContainer=function(t,e,n){var i=this._internalRoot,r=new Us;return null!==(n=void 0===n?null:n)&&r.then(n),Bs(e,i,t,r._onCommit),r},js.prototype.createBatch=function(){var t=new Ns(this),e=t._expirationTime,n=this._internalRoot,i=n.firstBatch;if(null===i)n.firstBatch=t,t._next=null;else{for(n=null;null!==i&&i._expirationTime>=e;)n=i,i=i._next;t._next=i,null!==n&&(n._next=t)}return t},Mt=Is,It=Ds,Ot=function(){rs||0===ss||(ks(ss,!1),ss=0)};var Gs={createPortal:qs,findDOMNode:function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternalFiber;return void 0===e&&("function"==typeof t.render?a("188"):a("268",Object.keys(t))),t=null===(t=rn(e))?null:t.stateNode},hydrate:function(t,e,n){return Vs(e)||a("200"),Zs(null,t,e,!0,n)},render:function(t,e,n){return Vs(e)||a("200"),Zs(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,i){return Vs(n)||a("200"),(null==t||void 0===t._reactInternalFiber)&&a("38"),Zs(t,e,n,!1,i)},unmountComponentAtNode:function(t){return Vs(t)||a("40"),!!t._reactRootContainer&&(Os(function(){Zs(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return qs.apply(void 0,arguments)},unstable_batchedUpdates:Is,unstable_interactiveUpdates:Ds,flushSync:function(t,e){rs&&a("187");var n=cs;cs=!0;try{return Qa(t,e)}finally{cs=n,ks(1073741823,!1)}},unstable_createRoot:function(t,e){return Vs(t)||a("299","unstable_createRoot"),new js(t,!0,null!=e&&!0===e.hydrate)},unstable_flushControlled:function(t){var e=cs;cs=!0;try{Qa(t)}finally{(cs=e)||rs||ks(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[R,B,F,A.injectEventPluginsByName,g,q,function(t){P(t,Z)},zt,Lt,kn,L]}};!function(t){var e=t.findFiberByHostInstance;(function(t){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);ji=Zi(function(t){return e.onCommitFiberRoot(n,t)}),Vi=Zi(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}})(r({},t,{overrideProps:null,currentDispatcherRef:qt.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=rn(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null}}))}({findFiberByHostInstance:D,bundleType:0,version:"16.8.2",rendererPackageName:"react-dom"});var Ws={default:Gs},Hs=Ws&&Gs||Ws;t.exports=Hs.default||Hs},function(t,e,n){"use strict";t.exports=n(22)},function(t,e,n){"use strict";(function(t){
  /** @license React v0.13.2
   * scheduler.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  Object.defineProperty(e,"__esModule",{value:!0});var n=null,i=!1,r=3,o=-1,a=-1,s=!1,l=!1;function u(){if(!s){var t=n.expirationTime;l?E():l=!0,w(h,t)}}function c(){var t=n,e=n.next;if(n===e)n=null;else{var i=n.previous;n=i.next=e,e.previous=i}t.next=t.previous=null,i=t.callback,e=t.expirationTime,t=t.priorityLevel;var o=r,s=a;r=t,a=e;try{var l=i()}finally{r=o,a=s}if("function"==typeof l)if(l={callback:l,priorityLevel:t,expirationTime:e,next:null,previous:null},null===n)n=l.next=l.previous=l;else{i=null,t=n;do{if(t.expirationTime>=e){i=t;break}t=t.next}while(t!==n);null===i?i=n:i===n&&(n=l,u()),(e=i.previous).next=i.previous=l,l.next=i,l.previous=e}}function p(){if(-1===o&&null!==n&&1===n.priorityLevel){s=!0;try{do{c()}while(null!==n&&1===n.priorityLevel)}finally{s=!1,null!==n?u():l=!1}}}function h(t){s=!0;var r=i;i=t;try{if(t)for(;null!==n;){var o=e.unstable_now();if(!(n.expirationTime<=o))break;do{c()}while(null!==n&&n.expirationTime<=o)}else if(null!==n)do{c()}while(null!==n&&!T())}finally{s=!1,i=r,null!==n?u():l=!1,p()}}var f,d,m=Date,y="function"==typeof setTimeout?setTimeout:void 0,_="function"==typeof clearTimeout?clearTimeout:void 0,g="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,v="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function x(t){f=g(function(e){_(d),t(e)}),d=y(function(){v(f),t(e.unstable_now())},100)}if("object"==typeof performance&&"function"==typeof performance.now){var b=performance;e.unstable_now=function(){return b.now()}}else e.unstable_now=function(){return m.now()};var w,E,T,S=null;if("undefined"!=typeof window?S=window:void 0!==t&&(S=t),S&&S._schedMock){var P=S._schedMock;w=P[0],E=P[1],T=P[2],e.unstable_now=P[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var C=null,k=function(t){if(null!==C)try{C(t)}finally{C=null}};w=function(t){null!==C?setTimeout(w,0,t):(C=t,setTimeout(k,0,!1))},E=function(){C=null},T=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var A=null,z=!1,L=-1,M=!1,I=!1,O=0,D=33,R=33;T=function(){return O<=e.unstable_now()};var B=new MessageChannel,F=B.port2;B.port1.onmessage=function(){z=!1;var t=A,n=L;A=null,L=-1;var i=e.unstable_now(),r=!1;if(0>=O-i){if(!(-1!==n&&n<=i))return M||(M=!0,x(N)),A=t,void(L=n);r=!0}if(null!==t){I=!0;try{t(r)}finally{I=!1}}};var N=function(t){if(null!==A){x(N);var e=t-O+R;e<R&&D<R?(8>e&&(e=8),R=e<D?D:e):D=e,O=t+R,z||(z=!0,F.postMessage(void 0))}else M=!1};w=function(t,e){A=t,L=e,I||0>e?F.postMessage(void 0):M||(M=!0,x(N))},E=function(){A=null,z=!1,L=-1}}e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,n){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var i=r,a=o;r=t,o=e.unstable_now();try{return n()}finally{r=i,o=a,p()}},e.unstable_next=function(t){switch(r){case 1:case 2:case 3:var n=3;break;default:n=r}var i=r,a=o;r=n,o=e.unstable_now();try{return t()}finally{r=i,o=a,p()}},e.unstable_scheduleCallback=function(t,i){var a=-1!==o?o:e.unstable_now();if("object"==typeof i&&null!==i&&"number"==typeof i.timeout)i=a+i.timeout;else switch(r){case 1:i=a+-1;break;case 2:i=a+250;break;case 5:i=a+1073741823;break;case 4:i=a+1e4;break;default:i=a+5e3}if(t={callback:t,priorityLevel:r,expirationTime:i,next:null,previous:null},null===n)n=t.next=t.previous=t,u();else{a=null;var s=n;do{if(s.expirationTime>i){a=s;break}s=s.next}while(s!==n);null===a?a=n:a===n&&(n=t,u()),(i=a.previous).next=a.previous=t,t.next=a,t.previous=i}return t},e.unstable_cancelCallback=function(t){var e=t.next;if(null!==e){if(e===t)n=null;else{t===n&&(n=e);var i=t.previous;i.next=e,e.previous=i}t.next=t.previous=null}},e.unstable_wrapCallback=function(t){var n=r;return function(){var i=r,a=o;r=n,o=e.unstable_now();try{return t.apply(this,arguments)}finally{r=i,o=a,p()}}},e.unstable_getCurrentPriorityLevel=function(){return r},e.unstable_shouldYield=function(){return!i&&(null!==n&&n.expirationTime<a||T())},e.unstable_continueExecution=function(){null!==n&&u()},e.unstable_pauseExecution=function(){},e.unstable_getFirstCallbackNode=function(){return n}}).call(this,n(12))},function(t,e,n){"use strict";var i=n(24);function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function t(t,e,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={redbox:{boxSizing:"border-box",fontFamily:"sans-serif",position:"fixed",padding:10,top:"0px",left:"0px",bottom:"0px",right:"0px",width:"100%",background:"rgb(204, 0, 0)",color:"white",zIndex:2147483647,textAlign:"left",fontSize:"16px",lineHeight:1.2,overflow:"auto"},message:{fontWeight:"bold"},stack:{fontFamily:"monospace",marginTop:"2em"},frame:{marginTop:"1em"},file:{fontSize:"0.8em",color:"rgba(255, 255, 255, 0.7)"},linkToFile:{textDecoration:"none",color:"rgba(255, 255, 255, 0.7)"}}},function(t,e,n){var i,r,o;!function(a,s){"use strict";r=[n(27)],void 0===(o="function"==typeof(i=function(t){var e=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,i=/^(eval@)?(\[native code\])?$/;function r(t,e,n){if("function"==typeof Array.prototype.map)return t.map(e,n);for(var i=new Array(t.length),r=0;r<t.length;r++)i[r]=e.call(n,t[r]);return i}function o(t,e,n){if("function"==typeof Array.prototype.filter)return t.filter(e,n);for(var i=[],r=0;r<t.length;r++)e.call(n,t[r])&&i.push(t[r]);return i}return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(t.replace(/[\(\)]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){var i=o(e.stack.split("\n"),function(t){return!!t.match(n)},this);return r(i,function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),i=this.extractLocation(n.pop()),r=n.join(" ")||void 0,o=function(t,e){if("function"==typeof Array.prototype.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}(["eval","<anonymous>"],i[0])>-1?void 0:i[0];return new t(r,void 0,o,i[1],i[2],e)},this)},parseFFOrSafari:function(e){var n=o(e.stack.split("\n"),function(t){return!t.match(i)},this);return r(n,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t(e);var n=e.split("@"),i=this.extractLocation(n.pop()),r=n.join("@")||void 0;return new t(r,void 0,i[0],i[1],i[2],e)},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,i=e.message.split("\n"),r=[],o=2,a=i.length;o<a;o+=2){var s=n.exec(i[o]);s&&r.push(new t(void 0,void 0,s[2],s[1],void 0,i[o]))}return r},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=e.stacktrace.split("\n"),r=[],o=0,a=i.length;o<a;o+=2){var s=n.exec(i[o]);s&&r.push(new t(s[3]||void 0,void 0,s[2],s[1],void 0,i[o]))}return r},parseOpera11:function(n){var i=o(n.stack.split("\n"),function(t){return!!t.match(e)&&!t.match(/^Error created at/)},this);return r(i,function(e){var n,i=e.split("@"),r=this.extractLocation(i.pop()),o=i.shift()||"",a=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;o.match(/\(([^\)]*)\)/)&&(n=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,r[0],r[1],r[2],e)},this)}}})?i.apply(e,r):i)||(t.exports=o)}()},function(t,e,n){var i,r,o;!function(n,a){"use strict";r=[],void 0===(o="function"==typeof(i=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,i,r,o){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==i&&this.setLineNumber(i),void 0!==r&&this.setColumnNumber(r),void 0!==o&&this.setSource(o)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(t(this.getLineNumber())?":"+this.getLineNumber():"")+(t(this.getColumnNumber())?":"+this.getColumnNumber():"")}},e})?i.apply(e,r):i)||(t.exports=o)}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="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},r=e.filenameWithoutLoaders=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.lastIndexOf("!");return e<0?t:t.substr(e+1)},o=(e.filenameHasLoaders=function(t){return u("filenameWithoutLoaders")(t)!==t},e.filenameHasSchema=function(t){return/^[\w]+\:/.test(t)}),a=(e.isFilenameAbsolute=function(t){return 0===u("filenameWithoutLoaders")(t).indexOf("/")},e.makeUrl=function(t,e,n,i){var r=u("filenameWithoutLoaders")(t);if(u("filenameHasSchema")(t))return r;var o="file://"+r;return"vscode"===e?(o=(o=e+"://file/"+o).replace(/file:\/\/\//,""),n&&r===t&&(o=o+":"+n,i&&(o=o+":"+i))):e&&(o=e+"://open?url="+o,n&&r===t&&(o=o+"&line="+n,i&&(o=o+"&column="+i))),o},e.makeLinkText=function(t,e,n){var i=u("filenameWithoutLoaders")(t);return e&&i===t&&(i=i+":"+e,n&&(i=i+":"+n)),i},Object.create(null)),s="__INTENTIONAL_UNDEFINED__",l={};function u(t){if(void 0===a||void 0===a[t])return function(t){switch(t){case"filenameWithoutLoaders":return r;case"filenameHasSchema":return o}return}(t);var e=a[t];return e===s?void 0:e}function c(t,e){if("object"!==(void 0===t?"undefined":i(t)))return a[t]=void 0===e?s:e,function(){p(t)};Object.keys(t).forEach(function(e){a[e]=t[e]})}function p(t){delete a[t]}function h(t){var e=Object.keys(t),n={};function i(){e.forEach(function(t){a[t]=n[t]})}return function(r){e.forEach(function(e){n[e]=a[e],a[e]=t[e]});var o=r();return o&&"function"==typeof o.then?o.then(i).catch(i):i(),o}}!function(){function t(t,e){Object.defineProperty(l,t,{value:e,enumerable:!1,configurable:!0})}t("__get__",u),t("__GetDependency__",u),t("__Rewire__",c),t("__set__",c),t("__reset__",p),t("__ResetDependency__",p),t("__with__",h)}(),e.__get__=u,e.__GetDependency__=u,e.__Rewire__=c,e.__set__=c,e.__ResetDependency__=p,e.__RewireAPI__=l,e.default=l},function(t,e,n){var i;i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){var i,r;i=[n(1)],void 0===(r=function(t){var e={},n=function(){return navigator.userAgent.toLowerCase().indexOf("chrome")>-1},i=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},r=function(){return navigator.userAgent.toLowerCase().indexOf("safari")>-1},o=function(){return document.documentMode&&document.documentMode>=11},a=function(){this.count=0,this.pending=[]};a.prototype.incr=function(){this.count++},a.prototype.decr=function(){this.count--,this.flush()},a.prototype.whenReady=function(t){this.pending.push(t),this.flush()},a.prototype.flush=function(){0===this.count&&(this.pending.forEach(function(t){t()}),this.pending=[])};var s=function(t){this.sem=new a,this.sync=t&&t.sync,this.mapForUri=t&&t.cacheGlobally?e:{}};s.prototype.ajax=function(t,e){var n=function(){for(var t=!1,e=0;e<h.length;e++){try{t=h[e]()}catch(t){continue}break}return t}(),i=this;n.onreadystatechange=function(){4==n.readyState&&e.call(i,n,t)},n.open("GET",t,!this.sync),n.send()},s.prototype.fetchScript=function(t){t in this.mapForUri||(this.sem.incr(),this.mapForUri[t]=null,this.ajax(t,this.onScriptLoad))};var l=new RegExp("^(?:[a-z]+:)?//","i");s.prototype.onScriptLoad=function(e,n){if(200===e.status||"file://"===n.slice(0,7)&&0===e.status){var i=e.responseText.match("//# [s]ourceMappingURL=(.*)[\\s]*$","m");if(i&&2===i.length){var r=i[1],o=r.match("data:application/json;(charset=[^;]+;)?base64,(.*)");if(o&&o[2])this.mapForUri[n]=new t.SourceMapConsumer(atob(o[2])),this.sem.decr();else{if(!l.test(r)){var a,s=n.lastIndexOf("/");-1!==s&&(a=n.slice(0,s+1),r=a+r)}this.ajax(r,function(e){(200===e.status||"file://"===r.slice(0,7)&&0===e.status)&&(this.mapForUri[n]=new t.SourceMapConsumer(e.responseText)),this.sem.decr()})}}else this.sem.decr()}else this.sem.decr()};var u=function(t,e,n){for(var i,r=[],o=0;o<t.length;o++){var a=e[o];if(a){var s=a[1],l=parseInt(a[2],10),u=parseInt(a[3],10);if(i=n[s]){var h=i.originalPositionFor({line:l,column:u});r.push(p(h.source,h.line,h.column,h.name||c(t[o])))}else r.push(p(s,l,u,c(t[o])))}else r.push(t[o])}return r};function c(t){var e=String(t).match(n()||o()?/ +at +([^ ]*).*/:/([^@]*)@.*/);return e&&e[1]}var p=function(t,e,n,i){return"    at "+(i||"(unknown)")+" ("+t+":"+e+":"+n+")"},h=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];return{mapStackTrace:function(t,e,a){var l,c,p,h,f,d,m,y={},_=new s(a);if(n()||o())d=/^ +at.+\((.*):([0-9]+):([0-9]+)/,f=4,m=1;else{if(!i()&&!r())throw new Error("unknown browser :(");d=/@(.*):([0-9]+):([0-9]+)/,f=4,m=0}l=t.split("\n").slice(m);for(var g=0;g<l.length;g++)c=l[g],a&&a.filter&&!a.filter(c)||(p=c.match(d))&&p.length===f&&(y[g]=p,(h=p[1]).match(/<anonymous>/)||_.fetchScript(h));_.sem.whenReady(function(){var t=u(l,y,_.mapForUri);e(t)})}}}.apply(e,i))||(t.exports=r)},function(t,e,n){var i=n(2),r=n(3),o=n(4).ArraySet,a=n(5),s=n(7).quickSort;function l(t){var e=t;return"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,""))),null!=e.sections?new p(e):new u(e)}function u(t){var e=t;"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,"")));var n=i.getArg(e,"version"),r=i.getArg(e,"sources"),a=i.getArg(e,"names",[]),s=i.getArg(e,"sourceRoot",null),l=i.getArg(e,"sourcesContent",null),u=i.getArg(e,"mappings"),c=i.getArg(e,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(String).map(i.normalize).map(function(t){return s&&i.isAbsolute(s)&&i.isAbsolute(t)?i.relative(s,t):t}),this._names=o.fromArray(a.map(String),!0),this._sources=o.fromArray(r,!0),this.sourceRoot=s,this.sourcesContent=l,this._mappings=u,this.file=c}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function p(t){var e=t;"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,"")));var n=i.getArg(e,"version"),r=i.getArg(e,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new o,this._names=new o;var a={line:-1,column:0};this._sections=r.map(function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var e=i.getArg(t,"offset"),n=i.getArg(e,"line"),r=i.getArg(e,"column");if(n<a.line||n===a.line&&r<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=e,{generatedOffset:{generatedLine:n+1,generatedColumn:r+1},consumer:new l(i.getArg(t,"map"))}})}l.fromSourceMap=function(t){return u.fromSourceMap(t)},l.prototype._version=3,l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),l.prototype._charIsMappingSeparator=function(t,e){var n=t.charAt(e);return";"===n||","===n},l.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.GREATEST_LOWER_BOUND=1,l.LEAST_UPPER_BOUND=2,l.prototype.eachMapping=function(t,e,n){var r,o=e||null;switch(n||l.GENERATED_ORDER){case l.GENERATED_ORDER:r=this._generatedMappings;break;case l.ORIGINAL_ORDER:r=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;r.map(function(t){var e=null===t.source?null:this._sources.at(t.source);return null!=e&&null!=a&&(e=i.join(a,e)),{source:e,generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}},this).forEach(t,o)},l.prototype.allGeneratedPositionsFor=function(t){var e=i.getArg(t,"line"),n={source:i.getArg(t,"source"),originalLine:e,originalColumn:i.getArg(t,"column",0)};if(null!=this.sourceRoot&&(n.source=i.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var o=[],a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,r.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===t.column)for(var l=s.originalLine;s&&s.originalLine===l;)o.push({line:i.getArg(s,"generatedLine",null),column:i.getArg(s,"generatedColumn",null),lastColumn:i.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var u=s.originalColumn;s&&s.originalLine===e&&s.originalColumn==u;)o.push({line:i.getArg(s,"generatedLine",null),column:i.getArg(s,"generatedColumn",null),lastColumn:i.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return o},e.SourceMapConsumer=l,u.prototype=Object.create(l.prototype),u.prototype.consumer=l,u.fromSourceMap=function(t){var e=Object.create(u.prototype),n=e._names=o.fromArray(t._names.toArray(),!0),r=e._sources=o.fromArray(t._sources.toArray(),!0);e.sourceRoot=t._sourceRoot,e.sourcesContent=t._generateSourcesContent(e._sources.toArray(),e.sourceRoot),e.file=t._file;for(var a=t._mappings.toArray().slice(),l=e.__generatedMappings=[],p=e.__originalMappings=[],h=0,f=a.length;h<f;h++){var d=a[h],m=new c;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=r.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=n.indexOf(d.name)),p.push(m)),l.push(m)}return s(e.__originalMappings,i.compareByOriginalPositions),e},u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._sources.toArray().map(function(t){return null!=this.sourceRoot?i.join(this.sourceRoot,t):t},this)}}),u.prototype._parseMappings=function(t,e){for(var n,r,o,l,u,p=1,h=0,f=0,d=0,m=0,y=0,_=t.length,g=0,v={},x={},b=[],w=[];g<_;)if(";"===t.charAt(g))p++,g++,h=0;else if(","===t.charAt(g))g++;else{for((n=new c).generatedLine=p,l=g;l<_&&!this._charIsMappingSeparator(t,l);l++);if(o=v[r=t.slice(g,l)])g+=r.length;else{for(o=[];g<l;)a.decode(t,g,x),u=x.value,g=x.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");v[r]=o}n.generatedColumn=h+o[0],h=n.generatedColumn,o.length>1&&(n.source=m+o[1],m+=o[1],n.originalLine=f+o[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+o[3],d=n.originalColumn,o.length>4&&(n.name=y+o[4],y+=o[4])),w.push(n),"number"==typeof n.originalLine&&b.push(n)}s(w,i.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,s(b,i.compareByOriginalPositions),this.__originalMappings=b},u.prototype._findMapping=function(t,e,n,i,o,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return r.search(t,e,o,a)},u.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(e.generatedLine===n.generatedLine){e.lastGeneratedColumn=n.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}},u.prototype.originalPositionFor=function(t){var e={generatedLine:i.getArg(t,"line"),generatedColumn:i.getArg(t,"column")},n=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositionsDeflated,i.getArg(t,"bias",l.GREATEST_LOWER_BOUND));if(n>=0){var r=this._generatedMappings[n];if(r.generatedLine===e.generatedLine){var o=i.getArg(r,"source",null);null!==o&&(o=this._sources.at(o),null!=this.sourceRoot&&(o=i.join(this.sourceRoot,o)));var a=i.getArg(r,"name",null);return null!==a&&(a=this._names.at(a)),{source:o,line:i.getArg(r,"originalLine",null),column:i.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t}))},u.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(t=i.relative(this.sourceRoot,t)),this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];var n;if(null!=this.sourceRoot&&(n=i.urlParse(this.sourceRoot))){var r=t.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(t){var e=i.getArg(t,"source");if(null!=this.sourceRoot&&(e=i.relative(this.sourceRoot,e)),!this._sources.has(e))return{line:null,column:null,lastColumn:null};var n={source:e=this._sources.indexOf(e),originalLine:i.getArg(t,"line"),originalColumn:i.getArg(t,"column")},r=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(t,"bias",l.GREATEST_LOWER_BOUND));if(r>=0){var o=this._originalMappings[r];if(o.source===n.source)return{line:i.getArg(o,"generatedLine",null),column:i.getArg(o,"generatedColumn",null),lastColumn:i.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=u,p.prototype=Object.create(l.prototype),p.prototype.constructor=l,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}}),p.prototype.originalPositionFor=function(t){var e={generatedLine:i.getArg(t,"line"),generatedColumn:i.getArg(t,"column")},n=r.search(e,this._sections,function(t,e){var n=t.generatedLine-e.generatedOffset.generatedLine;return n||t.generatedColumn-e.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:e.generatedLine-(o.generatedOffset.generatedLine-1),column:e.generatedColumn-(o.generatedOffset.generatedLine===e.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},p.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},p.prototype.sourceContentFor=function(t,e){for(var n=0;n<this._sections.length;n++){var i=this._sections[n].consumer.sourceContentFor(t,!0);if(i)return i}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},p.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var n=this._sections[e];if(-1!==n.consumer.sources.indexOf(i.getArg(t,"source"))){var r=n.consumer.generatedPositionFor(t);if(r)return{line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},p.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],o=r.consumer._generatedMappings,a=0;a<o.length;a++){var l=o[a],u=r.consumer._sources.at(l.source);null!==r.consumer.sourceRoot&&(u=i.join(r.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var c=r.consumer._names.at(l.name);this._names.add(c),c=this._names.indexOf(c);var p={source:u,generatedLine:l.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(r.generatedOffset.generatedLine===l.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:c};this.__generatedMappings.push(p),"number"==typeof p.originalLine&&this.__originalMappings.push(p)}s(this.__generatedMappings,i.compareByGeneratedPositionsDeflated),s(this.__originalMappings,i.compareByOriginalPositions)},e.IndexedSourceMapConsumer=p},function(t,e){e.getArg=function(t,e,n){if(e in t)return t[e];if(3===arguments.length)return n;throw new Error('"'+e+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,i=/^data:.+\,.+$/;function r(t){var e=t.match(n);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function o(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}function a(t){var n=t,i=r(t);if(i){if(!i.path)return t;n=i.path}for(var a,s=e.isAbsolute(n),l=n.split(/\/+/),u=0,c=l.length-1;c>=0;c--)"."===(a=l[c])?l.splice(c,1):".."===a?u++:u>0&&(""===a?(l.splice(c+1,u),u=0):(l.splice(c,2),u--));return""===(n=l.join("/"))&&(n=s?"/":"."),i?(i.path=n,o(i)):n}e.urlParse=r,e.urlGenerate=o,e.normalize=a,e.join=function(t,e){""===t&&(t="."),""===e&&(e=".");var n=r(e),s=r(t);if(s&&(t=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),o(n);if(n||e.match(i))return e;if(s&&!s.host&&!s.path)return s.host=e,o(s);var l="/"===e.charAt(0)?e:a(t.replace(/\/+$/,"")+"/"+e);return s?(s.path=l,o(s)):l},e.isAbsolute=function(t){return"/"===t.charAt(0)||!!t.match(n)},e.relative=function(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var n=0;0!==e.indexOf(t+"/");){var i=t.lastIndexOf("/");if(i<0)return e;if((t=t.slice(0,i)).match(/^([^\/]+:\/)?\/*$/))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)};var s=!("__proto__"in Object.create(null));function l(t){return t}function u(t){if(!t)return!1;var e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(var n=e-10;n>=0;n--)if(36!==t.charCodeAt(n))return!1;return!0}function c(t,e){return t===e?0:t>e?1:-1}e.toSetString=s?l:function(t){return u(t)?"$"+t:t},e.fromSetString=s?l:function(t){return u(t)?t.slice(1):t},e.compareByOriginalPositions=function(t,e,n){var i=t.source-e.source;return 0!==i?i:0!=(i=t.originalLine-e.originalLine)?i:0!=(i=t.originalColumn-e.originalColumn)||n?i:0!=(i=t.generatedColumn-e.generatedColumn)?i:0!=(i=t.generatedLine-e.generatedLine)?i:t.name-e.name},e.compareByGeneratedPositionsDeflated=function(t,e,n){var i=t.generatedLine-e.generatedLine;return 0!==i?i:0!=(i=t.generatedColumn-e.generatedColumn)||n?i:0!=(i=t.source-e.source)?i:0!=(i=t.originalLine-e.originalLine)?i:0!=(i=t.originalColumn-e.originalColumn)?i:t.name-e.name},e.compareByGeneratedPositionsInflated=function(t,e){var n=t.generatedLine-e.generatedLine;return 0!==n?n:0!=(n=t.generatedColumn-e.generatedColumn)?n:0!==(n=c(t.source,e.source))?n:0!=(n=t.originalLine-e.originalLine)?n:0!=(n=t.originalColumn-e.originalColumn)?n:c(t.name,e.name)}},function(t,e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,n,i,r){if(0===n.length)return-1;var o=function t(n,i,r,o,a,s){var l=Math.floor((i-n)/2)+n,u=a(r,o[l],!0);return 0===u?l:u>0?i-l>1?t(l,i,r,o,a,s):s==e.LEAST_UPPER_BOUND?i<o.length?i:-1:l:l-n>1?t(n,l,r,o,a,s):s==e.LEAST_UPPER_BOUND?l:n<0?-1:n}(-1,n.length,t,n,i,r||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(n[o],n[o-1],!0);)--o;return o}},function(t,e,n){var i=n(2),r=Object.prototype.hasOwnProperty;function o(){this._array=[],this._set=Object.create(null)}o.fromArray=function(t,e){for(var n=new o,i=0,r=t.length;i<r;i++)n.add(t[i],e);return n},o.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(t,e){var n=i.toSetString(t),o=r.call(this._set,n),a=this._array.length;o&&!e||this._array.push(t),o||(this._set[n]=a)},o.prototype.has=function(t){var e=i.toSetString(t);return r.call(this._set,e)},o.prototype.indexOf=function(t){var e=i.toSetString(t);if(r.call(this._set,e))return this._set[e];throw new Error('"'+t+'" is not in the set.')},o.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o},function(t,e,n){var i=n(6);e.encode=function(t){var e,n="",r=function(t){return t<0?1+(-t<<1):0+(t<<1)}(t);do{e=31&r,(r>>>=5)>0&&(e|=32),n+=i.encode(e)}while(r>0);return n},e.decode=function(t,e,n){var r,o,a,s,l=t.length,u=0,c=0;do{if(e>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=i.decode(t.charCodeAt(e++))))throw new Error("Invalid base64 digit: "+t.charAt(e-1));r=!!(32&o),u+=(o&=31)<<c,c+=5}while(r);n.value=(s=(a=u)>>1,1==(1&a)?-s:s),n.rest=e}},function(t,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(t){if(0<=t&&t<n.length)return n[t];throw new TypeError("Must be between 0 and 63: "+t)},e.decode=function(t){return 65<=t&&t<=90?t-65:97<=t&&t<=122?t-97+26:48<=t&&t<=57?t-48+52:43==t?62:47==t?63:-1}},function(t,e){function n(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function i(t,e,r,o){if(r<o){var a=r-1;n(t,(c=r,p=o,Math.round(c+Math.random()*(p-c))),o);for(var s=t[o],l=r;l<o;l++)e(t[l],s)<=0&&n(t,a+=1,l);n(t,a+1,l);var u=a+1;i(t,e,r,u-1),i(t,e,u+1,o)}var c,p}e.quickSort=function(t,e){i(t,e,0,t.length-1)}}])},t.exports=i()},function(t,e,n){n(31).polyfill()},function(t,e,n){(function(e){for(var i=n(32),r="undefined"==typeof window?e:window,o=["moz","webkit"],a="AnimationFrame",s=r["request"+a],l=r["cancel"+a]||r["cancelRequest"+a],u=0;!s&&u<o.length;u++)s=r[o[u]+"Request"+a],l=r[o[u]+"Cancel"+a]||r[o[u]+"CancelRequest"+a];if(!s||!l){var c=0,p=0,h=[];s=function(t){if(0===h.length){var e=i(),n=Math.max(0,1e3/60-(e-c));c=n+e,setTimeout(function(){var t=h.slice(0);h.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(c)}catch(t){setTimeout(function(){throw t},0)}},Math.round(n))}return h.push({handle:++p,callback:t,cancelled:!1}),p},l=function(t){for(var e=0;e<h.length;e++)h[e].handle===t&&(h[e].cancelled=!0)}}t.exports=function(t){return s.call(r,t)},t.exports.cancel=function(){l.apply(r,arguments)},t.exports.polyfill=function(t){t||(t=r),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}}).call(this,n(12))},function(t,e,n){(function(e){(function(){var n,i,r,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=e&&e.hrtime?(t.exports=function(){return(n()-a)/1e6},i=e.hrtime,o=(n=function(){var t;return 1e9*(t=i())[0]+t[1]})(),s=1e9*e.uptime(),a=o-s):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(this,n(33))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,u=[],c=!1,p=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):p=-1,u.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(l=u,u=[];++p<e;)l&&l[p].run();p=-1,e=u.length}l=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||c||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},,function(t,e,n){(function(t){L.MapboxGL=L.Layer.extend({options:{updateInterval:32},initialize:function(e){if(L.setOptions(this,e),!e.accessToken)throw new Error("You should provide a Mapbox GL access token as a token option.");t.accessToken=e.accessToken;var n,i,r,o,a,s,l;this._throttledUpdate=(n=L.Util.bind(this._update,this),i=this.options.updateInterval,l=function(){o=!1,a&&(s.apply(r,a),a=!1)},s=function(){o?a=arguments:(n.apply(r,arguments),setTimeout(l,i),o=!0)})},onAdd:function(t){this._glContainer||this._initContainer(),t._panes.tilePane.appendChild(this._glContainer),this._initGL(),this._offset=this._map.containerPointToLayerPoint([0,0]),t.options.zoomAnimation&&L.DomEvent.on(t._proxy,L.DomUtil.TRANSITION_END,this._transitionEnd,this)},onRemove:function(t){this._map.options.zoomAnimation&&L.DomEvent.off(this._map._proxy,L.DomUtil.TRANSITION_END,this._transitionEnd,this),t.getPanes().tilePane.removeChild(this._glContainer),this._glMap.remove(),this._glMap=null},getEvents:function(){return{move:this._throttledUpdate,zoomanim:this._animateZoom,zoom:this._pinchZoom,zoomstart:this._zoomStart,zoomend:this._zoomEnd}},_initContainer:function(){var t=this._glContainer=L.DomUtil.create("div","leaflet-gl-layer"),e=this._map.getSize();t.style.width=e.x+"px",t.style.height=e.y+"px"},_initGL:function(){var e=this._map.getCenter(),n=L.extend({},this.options,{container:this._glContainer,interactive:!1,center:[e.lng,e.lat],zoom:this._map.getZoom()-1,attributionControl:!1});this._glMap=new t.Map(n),this._glMap.transform.latRange=null,this._glMap._canvas.canvas?this._glMap._actualCanvas=this._glMap._canvas.canvas:this._glMap._actualCanvas=this._glMap._canvas,L.DomUtil.addClass(this._glMap._actualCanvas,"leaflet-image-layer"),L.DomUtil.addClass(this._glMap._actualCanvas,"leaflet-zoom-animated")},_update:function(e){if(this._offset=this._map.containerPointToLayerPoint([0,0]),!this._zooming){var n=this._map.getSize(),i=this._glContainer,r=this._glMap,o=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(i,o);var a=this._map.getCenter(),s=r.transform;s.center=t.LngLat.convert([a.lng,a.lat]),s.zoom=this._map.getZoom()-1,r.transform.width!==n.x||r.transform.height!==n.y?(i.style.width=n.x+"px",i.style.height=n.y+"px",null!==r._resize&&void 0!==r._resize?r._resize():r.resize()):null!==r._update&&void 0!==r._update?r._update():r.update()}},_pinchZoom:function(t){this._glMap.jumpTo({zoom:this._map.getZoom()-1,center:this._map.getCenter()})},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(),t.zoom,t.center);L.DomUtil.setTransform(this._glMap._actualCanvas,n.subtract(this._offset),e)},_zoomStart:function(t){this._zooming=!0},_zoomEnd:function(){var t=this._map.getZoomScale(this._map.getZoom()),e=this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(),this._map.getZoom(),this._map.getCenter());L.DomUtil.setTransform(this._glMap._actualCanvas,e.subtract(this._offset),t),this._zooming=!1},_transitionEnd:function(t){L.Util.requestAnimFrame(function(){var t=this._map.getZoom(),e=this._map.getCenter(),n=this._map.latLngToContainerPoint(this._map.getBounds().getNorthWest());L.DomUtil.setTransform(this._glMap._actualCanvas,n,1),this._glMap.once("moveend",L.Util.bind(function(){this._zoomEnd()},this)),this._glMap.jumpTo({center:e,zoom:t-1})},this)}}),L.mapboxGL=function(t){return new L.MapboxGL(t)}}).call(this,n(13))},function(t,e,n){"use strict";t.exports=n(37)},function(t,e,n){"use strict";
  /** @license React v16.8.2
   * react-is.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&Symbol.for,r=i?Symbol.for("react.element"):60103,o=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,s=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,c=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.concurrent_mode"):60111,f=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.memo"):60115,y=i?Symbol.for("react.lazy"):60116;function _(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case p:case h:case a:case l:case s:case d:return t;default:switch(t=t&&t.$$typeof){case c:case f:case u:return t;default:return e}}case y:case m:case o:return e}}}function g(t){return _(t)===h}e.typeOf=_,e.AsyncMode=p,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=u,e.Element=r,e.ForwardRef=f,e.Fragment=a,e.Lazy=y,e.Memo=m,e.Portal=o,e.Profiler=l,e.StrictMode=s,e.Suspense=d,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===h||t===l||t===s||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===m||t.$$typeof===u||t.$$typeof===c||t.$$typeof===f)},e.isAsyncMode=function(t){return g(t)||_(t)===p},e.isConcurrentMode=g,e.isContextConsumer=function(t){return _(t)===c},e.isContextProvider=function(t){return _(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return _(t)===f},e.isFragment=function(t){return _(t)===a},e.isLazy=function(t){return _(t)===y},e.isMemo=function(t){return _(t)===m},e.isPortal=function(t){return _(t)===o},e.isProfiler=function(t){return _(t)===l},e.isStrictMode=function(t){return _(t)===s},e.isSuspense=function(t){return _(t)===d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=(i=n(0))&&"object"==typeof i&&"default"in i?i.default:i;e.AppContainer=function(t){return r.Children.only(t.children)},e.hot=function(){return function(t){return t}},e.areComponentsEqual=function(t,e){return t===e},e.setConfig=function(){},e.cold=function(t){return t},e.configureComponent=function(){}},,function(t,e,n){"use strict";var i=n(1),r=n(4),o=n(2),a=n(3),s=n(0),l=n.n(s),u=n(7),c=n(8),p=function(t){return void 0===t&&(t=""),t.split(" ").filter(Boolean)},h=function(t,e,n){null!=t&&n!==e&&(null!=e&&e.length>0&&function(t,e){p(e).forEach(function(e){a.DomUtil.removeClass(t,e)})}(t,e),null!=n&&n.length>0&&function(t,e){p(e).forEach(function(e){a.DomUtil.addClass(t,e)})}(t,n))};n.d(e,"a",function(){return m});var f=["children","className","id","style","useFlyTo","whenReady"],d=function(t){return Array.isArray(t)?[t[0],t[1]]:[t.lat,t.lon?t.lon:t.lng]},m=function(t){function e(e){var n;return n=t.call(this,e)||this,Object(o.a)(Object(i.a)(n),"className",void 0),Object(o.a)(Object(i.a)(n),"contextValue",void 0),Object(o.a)(Object(i.a)(n),"container",void 0),Object(o.a)(Object(i.a)(n),"viewport",{center:void 0,zoom:void 0}),Object(o.a)(Object(i.a)(n),"_ready",!1),Object(o.a)(Object(i.a)(n),"_updating",!1),Object(o.a)(Object(i.a)(n),"onViewportChange",function(){var t=n.leafletElement.getCenter();n.viewport={center:t?[t.lat,t.lng]:void 0,zoom:n.leafletElement.getZoom()},n.props.onViewportChange&&!n._updating&&n.props.onViewportChange(n.viewport)}),Object(o.a)(Object(i.a)(n),"onViewportChanged",function(){n.props.onViewportChanged&&!n._updating&&n.props.onViewportChanged(n.viewport)}),Object(o.a)(Object(i.a)(n),"bindContainer",function(t){n.container=t}),n.className=e.className,n}Object(r.a)(e,t);var n=e.prototype;return n.createLeafletElement=function(t){var e=t.viewport,n=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,["viewport"]);return e&&(e.center&&(n.center=e.center),"number"==typeof e.zoom&&(n.zoom=e.zoom)),new a.Map(this.container,n)},n.updateLeafletElement=function(t,e){this._updating=!0;var n=e.animate,i=e.bounds,r=e.boundsOptions,o=e.boxZoom,a=e.center,s=e.className,l=e.doubleClickZoom,u=e.dragging,c=e.keyboard,p=e.maxBounds,f=e.scrollWheelZoom,d=e.tap,m=e.touchZoom,y=e.useFlyTo,_=e.viewport,g=e.zoom;if(h(this.container,t.className,s),_&&_!==t.viewport){var v=_.center?_.center:a,x=null==_.zoom?g:_.zoom;!0===y?this.leafletElement.flyTo(v,x,{animate:n}):this.leafletElement.setView(v,x,{animate:n})}else a&&this.shouldUpdateCenter(a,t.center)?!0===y?this.leafletElement.flyTo(a,g,{animate:n}):this.leafletElement.setView(a,g,{animate:n}):"number"==typeof g&&g!==t.zoom&&(null==t.zoom?this.leafletElement.setView(a,g):this.leafletElement.setZoom(g));p&&this.shouldUpdateBounds(p,t.maxBounds)&&this.leafletElement.setMaxBounds(p),i&&(this.shouldUpdateBounds(i,t.bounds)||r!==t.boundsOptions)&&(!0===y?this.leafletElement.flyToBounds(i,r):this.leafletElement.fitBounds(i,r)),o!==t.boxZoom&&(!0===o?this.leafletElement.boxZoom.enable():this.leafletElement.boxZoom.disable()),l!==t.doubleClickZoom&&(!0===l?this.leafletElement.doubleClickZoom.enable():this.leafletElement.doubleClickZoom.disable()),u!==t.dragging&&(!0===u?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable()),c!==t.keyboard&&(!0===c?this.leafletElement.keyboard.enable():this.leafletElement.keyboard.disable()),f!==t.scrollWheelZoom&&(!0===f||"string"==typeof f?(this.leafletElement.options.scrollWheelZoom=f,this.leafletElement.scrollWheelZoom.enable()):this.leafletElement.scrollWheelZoom.disable()),d!==t.tap&&(!0===d?this.leafletElement.tap.enable():this.leafletElement.tap.disable()),m!==t.touchZoom&&(!0===m||"string"==typeof m?(this.leafletElement.options.touchZoom=m,this.leafletElement.touchZoom.enable()):this.leafletElement.touchZoom.disable()),this._updating=!1},n.componentDidMount=function(){var e=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return Object.keys(t).reduce(function(e,i){return-1===n.indexOf(i)&&(e[i]=t[i]),e},{})}.apply(void 0,[this.props].concat(f));this.leafletElement=this.createLeafletElement(e),this.leafletElement.on("move",this.onViewportChange),this.leafletElement.on("moveend",this.onViewportChanged),null!=e.bounds&&this.leafletElement.fitBounds(e.bounds,e.boundsOptions),this.contextValue={layerContainer:this.leafletElement,map:this.leafletElement},t.prototype.componentDidMount.call(this),this.forceUpdate()},n.componentDidUpdate=function(e){!1===this._ready&&(this._ready=!0,this.props.whenReady&&this.leafletElement.whenReady(this.props.whenReady)),t.prototype.componentDidUpdate.call(this,e),this.updateLeafletElement(e,this.props)},n.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.leafletElement.off("move",this.onViewportChange),this.leafletElement.off("moveend",this.onViewportChanged),!0===this.props.preferCanvas?(this.leafletElement._initEvents(!0),this.leafletElement._stop()):this.leafletElement.remove()},n.shouldUpdateCenter=function(t,e){return!e||(t=d(t),e=d(e),t[0]!==e[0]||t[1]!==e[1])},n.shouldUpdateBounds=function(t,e){return!e||!Object(a.latLngBounds)(t).equals(Object(a.latLngBounds)(e))},n.render=function(){return l.a.createElement("div",{className:this.className,id:this.props.id,ref:this.bindContainer,style:this.props.style},this.contextValue?l.a.createElement(u.a,{value:this.contextValue},this.props.children):null)},e}(c.a)},function(t,e,n){"use strict";var i=n(5),r=n(4),o=n(3);function a(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var s=n(1),l=n(2),u=n(0),c=n.n(u),p=n(7),h=function(t){function e(e){var n;return n=t.call(this,e)||this,Object(l.a)(Object(s.a)(n),"contextValue",void 0),Object(l.a)(Object(s.a)(n),"leafletElement",void 0),n.leafletElement=n.createLeafletElement(e),n}Object(r.a)(e,t);var n,i,o,h=e.prototype;return h.createLeafletElement=function(t){throw new Error("createLeafletElement() must be implemented")},h.updateLeafletElement=function(t,e){},h.componentDidMount=function(){t.prototype.componentDidMount.call(this),this.layerContainer.addLayer(this.leafletElement)},h.componentDidUpdate=function(e){if(t.prototype.componentDidUpdate.call(this,e),this.props.attribution!==e.attribution){var n=this.props.leaflet.map;null!=n&&null!=n.attributionControl&&(n.attributionControl.removeAttribution(e.attribution),n.attributionControl.addAttribution(this.props.attribution))}this.updateLeafletElement(e,this.props)},h.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.layerContainer.removeLayer(this.leafletElement)},h.render=function(){var t=this.props.children;return null==t?null:null==this.contextValue?c.a.createElement(u.Fragment,null,t):c.a.createElement(p.a,{value:this.contextValue},t)},n=e,(i=[{key:"layerContainer",get:function(){return this.props.leaflet.layerContainer||this.props.leaflet.map}}])&&a(n.prototype,i),o&&a(n,o),e}(function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.getOptions=function(t){return null!=t.pane?t:null!=t.leaflet&&null!=t.leaflet.pane?Object(i.a)({},t,{pane:t.leaflet.pane}):t},e}(n(8).a));n.d(e,"a",function(){return f});var f=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.createLeafletElement=function(t){return new o.GridLayer(this.getOptions(t))},n.updateLeafletElement=function(t,e){var n=e.opacity,i=e.zIndex;n!==t.opacity&&this.leafletElement.setOpacity(n),i!==t.zIndex&&this.leafletElement.setZIndex(i)},n.getOptions=function(e){var n=t.prototype.getOptions.call(this,e);return null==e.leaflet.map?n:Object(i.a)({maxZoom:e.leaflet.map.options.maxZoom,minZoom:e.leaflet.map.options.minZoom},n)},n.render=function(){return null},e}(h)}]]);
  //# sourceMappingURL=vendor.js.map