(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(t,e,n){var i=n(2),r=n(19),o=n(12),a=n(13),s=n(20),l=function(t,e,n){var u,c,h,p,f=t&l.F,d=t&l.G,m=t&l.S,g=t&l.P,y=t&l.B,v=d?i:m?i[e]||(i[e]={}):(i[e]||{}).prototype,_=d?r:r[e]||(r[e]={}),x=_.prototype||(_.prototype={});for(u in d&&(n=e),n)h=((c=!f&&v&&void 0!==v[u])?v:n)[u],p=y&&c?s(h,i):g&&"function"==typeof h?s(Function.call,h):h,v&&a(v,u,h,t&l.U),_[u]!=h&&o(_,u,p),g&&x[u]!=h&&(x[u]=h)};i.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e,n){var i=n(4);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(49)("wks"),r=n(35),o=n(2).Symbol,a="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=a&&o[t]||(a?o:r)("Symbol."+t))}).store=i},function(t,e,n){var i=n(22),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){t.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var i=n(1),r=n(99),o=n(25),a=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(26);t.exports=function(t){return Object(i(t))}},function(t,e,n){ /* @preserve * Leaflet 1.6.0, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 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;n0?Math.floor(t):Math.ceil(t)};function D(t,e,n){return t instanceof I?t:y(t)?new I(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new I(t.x,t.y):new I(t,e,n)}function B(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i=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.xe.y&&i.y=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.late.lng&&i.lng1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t},kt=!!document.createElement("canvas").getContext,Ct=!(!document.createElementNS||!X("svg").createSVGRect),Pt=!Ct&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function zt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var It=(Object.freeze||Object)({ie:Q,ielt9:$,edge:tt,webkit:et,android:nt,android23:it,androidStock:ot,opera:at,chrome:st,gecko:lt,safari:ut,phantom:ct,opera12:ht,win:pt,ie3d:ft,webkit3d:dt,gecko3d:mt,any3d:gt,mobile:yt,mobileWebkit:vt,mobileWebkit3d:_t,msPointer:xt,pointer:bt,touch:wt,mobileOpera:Et,mobileGecko:St,retina:Tt,passiveEvents:At,canvas:kt,svg:Ct,vml:Pt}),Mt=xt?"MSPointerDown":"pointerdown",Lt=xt?"MSPointerMove":"pointermove",Dt=xt?"MSPointerUp":"pointerup",Bt=xt?"MSPointerCancel":"pointercancel",Rt=["INPUT","SELECT","OPTION"],Ot={},Ft=!1,Nt=0;function Ut(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(!(Rt.indexOf(t.target.tagName)<0))return;Oe(t)}qt(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Mt,i,!1),Ft||(document.documentElement.addEventListener(Mt,Vt,!0),document.documentElement.addEventListener(Lt,jt,!0),document.documentElement.addEventListener(Dt,Zt,!0),document.documentElement.addEventListener(Bt,Zt,!0),Ft=!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)&&qt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Lt,i,!1)}(t,n,i):"touchend"===e&&function(t,e,n){var i=function(t){qt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Dt,i,!1),t.addEventListener(Bt,i,!1)}(t,n,i),this}function Vt(t){Ot[t.pointerId]=t,Nt++}function jt(t){Ot[t.pointerId]&&(Ot[t.pointerId]=t)}function Zt(t){delete Ot[t.pointerId],Nt--}function qt(t,e){for(var n in t.touches=[],Ot)t.touches.push(Ot[n]);t.changedTouches=[t],e(t)}var Wt=xt?"MSPointerDown":bt?"pointerdown":"touchstart",Gt=xt?"MSPointerUp":bt?"pointerup":"touchend",Ht="_leaflet_";function Kt(t,e,n){var i,r,o=!1,a=250;function s(t){var e;if(bt){if(!tt||"mouse"===t.pointerType)return;e=Nt}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",r.button=0,e(r),i=null}}return t[Ht+Wt+n]=s,t[Ht+Gt+n]=l,t[Ht+"dblclick"+n]=e,t.addEventListener(Wt,s,!!At&&{passive:!1}),t.addEventListener(Gt,l,!!At&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Xt(t,e){var n=t[Ht+Wt+e],i=t[Ht+Gt+e],r=t[Ht+"dblclick"+e];return t.removeEventListener(Wt,n,!!At&&{passive:!1}),t.removeEventListener(Gt,i,!!At&&{passive:!1}),tt||t.removeEventListener("dblclick",r,!1),this}var Yt,Jt,Qt,$t,te,ee=ye(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ne=ye(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ie="webkitTransition"===ne||"OTransition"===ne?ne+"End":"transitionend";function re(t){return"string"==typeof t?document.getElementById(t):t}function oe(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 ae(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function se(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ue(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ce(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=me(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function pe(t,e){if(void 0!==t.classList)for(var n=p(e),i=0,r=n.length;i100&&i<500||t.target._simulatedClick&&!t._simulated?Fe(t):(je=n,e(t))}(t,s)}),t.addEventListener(e,o,!1)):"attachEvent"in t&&t.attachEvent("on"+e,o):Kt(t,o,r),t[ze]=t[ze]||{},t[ze][r]=o}function Le(t,e,n,i){var r=e+a(n)+(i?"_"+a(i):""),o=t[ze]&&t[ze][r];if(!o)return this;bt&&0===e.indexOf("touch")?function(t,e,n){var i=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Mt,i,!1):"touchmove"===e?t.removeEventListener(Lt,i,!1):"touchend"===e&&(t.removeEventListener(Dt,i,!1),t.removeEventListener(Bt,i,!1))}(t,e,r):!wt||"dblclick"!==e||!Xt||bt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,!!At&&{passive:!1}):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,o,!1):"detachEvent"in t&&t.detachEvent("on"+e,o):Xt(t,r),t[ze][r]=null}function De(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,We(t),this}function Be(t){return Me(t,"mousewheel",De),this}function Re(t){return Pe(t,"mousedown touchstart dblclick",De),Me(t,"click",qe),this}function Oe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Fe(t){return Oe(t),De(t),this}function Ne(t,e){if(!e)return new I(t.clientX,t.clientY);var n=ke(e),i=n.boundingClientRect;return new I((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ue=pt&&st?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Ve(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ue: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,Ze={};function qe(t){Ze[t.type]=!0}function We(t){var e=Ze[t.type];return Ze[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 He=(Object.freeze||Object)({on:Pe,off:Ie,stopPropagation:De,disableScrollPropagation:Be,disableClickPropagation:Re,preventDefault:Oe,stop:Fe,getMousePosition:Ne,getWheelDelta:Ve,fakeStop:qe,skipped:We,isExternalTarget:Ge,addListener:Pe,removeListener:Ie}),Ke=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=xe(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=T(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.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=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=D(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),h=D(a.x+c.x,a.y+c.y);(a.xu.max.x)&&(h.x=o.x-c.x,c.x>0?h.x+=l.x-n.x:h.x-=l.x-i.x),(a.yu.max.y)&&(h.y=o.y-c.y,c.y>0?h.y+=l.y-n.y:h.y-=l.y-i.y),this.panTo(this.unproject(h),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=new N(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(r,i.maxZoom):r)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var 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(),se(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(A(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)se(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ae("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new O(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=F(t),n=D(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=gt?this.options.zoomSnap:1,h=l.x/u.x,p=l.y/u.y,f=e?Math.max(h,p):Math.min(h,p);return 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 I(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 B(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(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(U(t))._round()._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 D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(t)))},mouseEventToContainerPoint:function(t){return Ne(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=re(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Pe(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&>,pe(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Tt?" leaflet-retina":"")+($?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oe(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),_e(this._mapPane,new I(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){_e(this._mapPane,new I(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 A(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){_e(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?Ie:Pe;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),gt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){A(this._resizeRequest),this._resizeRequest=T((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&&!We(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Se(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)&&Oe(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==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;l0?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=gt?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(){fe(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=ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ee,n=this._proxy.style[e];ve(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",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){se(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ve(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_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)||(T((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&&fe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),T((function(){this._moveEnd(!0)}),this))}}),Ye=C.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._map.on("unload",this.remove,this),this},remove:function(){return this._map?(se(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Je=function(t){return new Ye(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=ae("div",e+"control-container",this._container);function i(i,r){var o=e+i+" "+e+r;t[i+r]=ae("div",o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)se(this._controlCorners[t]);se(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Qe=Ye.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n1,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='",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_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),Pe(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("div");return n.appendChild(o),o.appendChild(e),o.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).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=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ie.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$e=Ye.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ae("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._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){var o=ae("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Re(o),Pe(o,"click",Fe),Pe(o,"click",r,this),Pe(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";fe(this._zoomInButton,e),fe(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 tn=Ye.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=ae("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=ae("div",e,n)),t.imperial&&(this._iScale=ae("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)}}),en=Ye.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ae("div","leaflet-control-attribution"),Re(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 en).addTo(this)})),Ye.Layers=Qe,Ye.Zoom=$e,Ye.Scale=tn,Ye.Attribution=en,Je.layers=function(t,e,n){return new Qe(t,e,n)},Je.zoom=function(t){return new $e(t)},Je.scale=function(t){return new tn(t)},Je.attribution=function(t){return new en(t)};var nn=C.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}});nn.addTo=function(t,e){return t.addHandler(e,this),this};var rn,on={Events:P},an=wt?"touchstart mousedown":"mousedown",sn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ln={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},un=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||(Pe(this._dragStartTarget,an,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(un._dragging===this&&this.finishDrag(),Ie(this._dragStartTarget,an,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")&&!(un._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(un._dragging=this,this._preventOutline&&Se(this._element),we(),Yt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ae(this._element);this._startPoint=new I(e.clientX,e.clientY),this._parentScale=ke(n),Pe(document,ln[t.type],this._onMove,this),Pe(document,sn[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 I(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)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;re&&(n.push(t[i]),r=i);var a,s,l,u;return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function mn(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 I(o,a)}function gn(t){return!y(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."),gn(t)}var vn=(Object.freeze||Object)({simplify:cn,pointToSegmentDistance:hn,closestPointOnSegment:function(t,e,n){return mn(t,e,n)},clipSegment:pn,_getEdgeIntersection:fn,_getBitCode:dn,_sqClosestPointOnSegment:mn,isFlat:gn,_flat:yn});function _n(t,e,n){var i,r,o,a,s,l,u,c,h,p=[1,4,2,8];for(r=0,u=t.length;r1e-7;l++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new N(s*n,t.x*n/i)}},En=(Object.freeze||Object)({LonLat:bn,Mercator:wn,SphericalMercator:q}),Sn=n({},Z,{code:"EPSG:3395",projection:wn,transformation:function(){var t=.5/(Math.PI*wn.R);return G(t,.5,-t,.5)}()}),Tn=n({},Z,{code:"EPSG:4326",projection:bn,transformation:G(1/180,1,-1/180,.5)}),An=n({},j,{projection:bn,transformation:G(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});j.Earth=Z,j.EPSG3395=Sn,j.EPSG3857=H,j.EPSG900913=K,j.EPSG4326=Tn,j.Simple=An;var kn=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){for(var e=0,n=(t=t?y(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()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 O,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return gn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=gn(t),i=0,r=t.length;i=2&&e[0]instanceof N&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){On.prototype._setLatLngs.call(this,t),gn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new I(e,e);if(t=new B(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;rt.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||On.prototype._containsPoint.call(this,t,!0)}}),Nn=Pn.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=y(t)?t:t.features;if(r){for(e=0,n=r.length;e0?i:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;ar?(e.height=r+"px",pe(t,"leaflet-popup-scrolled")):fe(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();_e(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(oe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,r=new I(this._containerLeft,-n-this._containerBottom);r._add(xe(this._container));var o=t.layerPointToContainerPoint(r),a=D(this.options.autoPanPadding),s=D(this.options.autoPanPaddingTopLeft||a),l=D(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=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&&(h=o.y+n-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),Fe(t)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Xe.mergeOptions({closePopupOnClick:!0}),Xe.include({openPopup:function(t,e,n){return t instanceof ei||(t=new ei(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}}),kn.include({bindPopup:function(t,e){return t instanceof ei?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new ei(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){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),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&&(Fe(t),e instanceof Dn?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 ni=ti.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ti.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){ti.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ti.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=ae("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=D(this.options.offset),u=this._getAnchor();"top"===o?t=t.add(D(-a/2+l.x,-s+l.y+u.y,!0)):"bottom"===o?t=t.subtract(D(a/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(D(a/2+l.x,s/2-u.y+l.y,!0)):"right"===o||"auto"===o&&r.xthis.options.maxZoom||ni&&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 I(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+1this.options.maxZoom||void 0!==this.options.minZoom&&r1)this._setView(t,n);else{for(var h=r.min.y;h<=r.max.y;h++)for(var p=r.min.x;p<=r.max.x;p++){var f=new I(p,h);if(f.z=this._tileZoom,this._isValidTile(f)){var d=this._tiles[this._tileCoordsToKey(f)];d?d.current=!0:a.push(f)}}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;pn.max.x)||!e.wrapLat&&(t.yn.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);return[e.unproject(i,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new O(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 I(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(se(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,$&&this.options.opacity<1&&ge(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&&T(r(this._tileReady,this,t,null,o)),_e(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?(ge(n.el,0),A(this._fadeFrame),this._fadeFrame=T(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"),$||!this._map._fadeAnimated?T(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 I(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 B(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}}),oi=ri.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&&Tt&&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 Pe(n,"load",r(this._tileOnLoad,this,e,n)),Pe(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:Tt?"@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 g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){$?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;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_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=_,se(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return ot||e.el.setAttribute("src",_),ri.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==_))return ri.prototype._tileReady.call(this,t,e,n)}});function ai(t,e){return new oi(t,e)}var si=oi.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&&Tt?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,oi.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=oi.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}});oi.WMS=si,ai.wms=function(t,e){return new si(t,e)};var li=kn.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=xe(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),s=r.multiplyBy(-n).add(i).add(r).subtract(a);gt?ve(this._container,s,n):_e(this._container,s)},_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 B(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ui=li.extend({getEvents:function(){var t=li.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){li.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Pe(t,"mousemove",this._onMouseMove,this),Pe(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pe(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){A(this._redrawRequest),delete this._ctx,se(this._container),Ie(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){li.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Tt?2:1;_e(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",Tt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){li.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')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),pi={_initContainer:function(){this._container=ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(li.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hi("shape");pe(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hi("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;se(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=hi("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=y(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=hi("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){ue(t._container)},_bringToBack:function(t){ce(t._container)}},fi=Pt?hi:X,di=li.extend({getEvents:function(){var t=li.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=fi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){se(this._container),Ie(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){li.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)),_e(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=fi("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){se(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="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ue(t._path)},_bringToBack:function(t){ce(t._path)}});function mi(t){return Ct||Pt?new di(t):null}Pt&&di.include(pi),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&&ci(t)||mi(t)}});var gi=Fn.extend({initialize:function(t,e){Fn.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()]}});di.create=fi,di.pointsToPath=Y,Nn.geometryToLayer=Un,Nn.coordsToLatLng=jn,Nn.coordsToLatLngs=Zn,Nn.latLngToCoords=qn,Nn.latLngsToCoords=Wn,Nn.getFeature=Gn,Nn.asFeature=Hn,Xe.mergeOptions({boxZoom:!0});var yi=nn.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(){Pe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ie(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){se(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(),Yt(),we(),this._startPoint=this._map.mouseEventToContainerPoint(t),Pe(document,{contextmenu:Fe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ae("div","leaflet-zoom-box",this._container),pe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),n=e.getSize();_e(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(se(this._box),fe(this._container,"leaflet-crosshair")),Jt(),Ee(),Ie(document,{contextmenu:Fe,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 O(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",yi),Xe.mergeOptions({doubleClickZoom:!0});var vi=nn.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",vi),Xe.mergeOptions({dragging:!0,inertia:!it,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var _i=nn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new un(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(){fe(this._map._container,"leaflet-grab"),fe(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.xe.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)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",bi),Xe.mergeOptions({tap:!0,tapTolerance:15});var wi=nn.extend({addHooks:function(){Pe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ie(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Oe(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 I(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),Pe(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ie(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()&&fe(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 I(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",wi),Xe.mergeOptions({touchZoom:wt&&!it,bounceAtZoomLimits:!0});var Ei=nn.extend({addHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),Pe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){fe(this._map._container,"leaflet-touch-zoom"),Ie(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(),Pe(document,"touchmove",this._onTouchMove,this),Pe(document,"touchend",this._onTouchEnd,this),Oe(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._zoome.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),A(this._animRequest);var s=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=T(s,this,!0),Oe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,A(this._animRequest),Ie(document,"touchmove",this._onTouchMove),Ie(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",Ei),Xe.BoxZoom=yi,Xe.DoubleClickZoom=vi,Xe.Drag=_i,Xe.Keyboard=xi,Xe.ScrollWheelZoom=bi,Xe.Tap=wi,Xe.TouchZoom=Ei,Object.freeze=e,t.version="1.6.0",t.Control=Ye,t.control=Je,t.Browser=It,t.Evented=z,t.Mixin=on,t.Util=k,t.Class=C,t.Handler=nn,t.extend=n,t.bind=r,t.stamp=a,t.setOptions=f,t.DomEvent=He,t.DomUtil=Ce,t.PosAnimation=Ke,t.Draggable=un,t.LineUtil=vn,t.PolyUtil=xn,t.Point=I,t.point=D,t.Bounds=B,t.bounds=R,t.Transformation=W,t.transformation=G,t.Projection=En,t.LatLng=N,t.latLng=U,t.LatLngBounds=O,t.latLngBounds=F,t.CRS=j,t.GeoJSON=Nn,t.geoJSON=Xn,t.geoJson=Yn,t.Layer=kn,t.LayerGroup=Cn,t.layerGroup=function(t,e){return new Cn(t,e)},t.FeatureGroup=Pn,t.featureGroup=function(t){return new Pn(t)},t.ImageOverlay=Jn,t.imageOverlay=function(t,e,n){return new Jn(t,e,n)},t.VideoOverlay=Qn,t.videoOverlay=function(t,e,n){return new Qn(t,e,n)},t.SVGOverlay=$n,t.svgOverlay=function(t,e,n){return new $n(t,e,n)},t.DivOverlay=ti,t.Popup=ei,t.popup=function(t,e){return new ei(t,e)},t.Tooltip=ni,t.tooltip=function(t,e){return new ni(t,e)},t.Icon=zn,t.icon=function(t){return new zn(t)},t.DivIcon=ii,t.divIcon=function(t){return new ii(t)},t.Marker=Ln,t.marker=function(t,e){return new Ln(t,e)},t.TileLayer=oi,t.tileLayer=ai,t.GridLayer=ri,t.gridLayer=function(t){return new ri(t)},t.SVG=di,t.svg=mi,t.Renderer=li,t.Canvas=ui,t.canvas=ci,t.Path=Dn,t.CircleMarker=Bn,t.circleMarker=function(t,e){return new Bn(t,e)},t.Circle=Rn,t.circle=function(t,e,n){return new Rn(t,e,n)},t.Polyline=On,t.polyline=function(t,e){return new On(t,e)},t.Polygon=Fn,t.polygon=function(t,e){return new Fn(t,e)},t.Rectangle=gi,t.rectangle=function(t,e){return new gi(t,e)},t.Map=Xe,t.map=function(t,e){return new Xe(t,e)};var Si=window.L;t.noConflict=function(){return window.L=Si,this},window.L=t}(e)},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(8),r=n(34);t.exports=n(7)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(2),r=n(12),o=n(15),a=n(35)("src"),s=n(144),l=(""+s).split("toString");n(19).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(o(n,"name")||r(n,"name",e)),t[e]!==n&&(u&&(o(n,a)||r(n,a,t[e]?""+t[e]:l.join(String(e)))),t===i?t[e]=n:s?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e,n){var i=n(0),r=n(3),o=n(26),a=/"/g,s=function(t,e,n,i){var r=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(i).replace(a,""")+'"'),s+">"+r+""};t.exports=function(t,e){var n={};n[t]=e(s),i(i.P+i.F*r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(50),r=n(26);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(51),r=n(34),o=n(16),a=n(25),s=n(15),l=n(99),u=Object.getOwnPropertyDescriptor;e.f=n(7)?u:function(t,e){if(t=o(t),e=a(e,!0),l)try{return u(t,e)}catch(t){}if(s(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e,n){var i=n(15),r=n(9),o=n(72)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(11);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){"use strict";var i=n(3);t.exports=function(t,e){return!!t&&i((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){"use strict";t.exports=n(343)},function(t,e,n){var i=n(4);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(0),r=n(19),o=n(3);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],a={};a[t]=e(n),i(i.S+i.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){var i=n(20),r=n(50),o=n(9),a=n(6),s=n(88);t.exports=function(t,e){var n=1==t,l=2==t,u=3==t,c=4==t,h=6==t,p=5==t||h,f=e||s;return function(e,s,d){for(var m,g,y=o(e),v=r(y),_=i(s,d,3),x=a(v.length),b=0,w=n?f(e,x):l?f(e,0):void 0;x>b;b++)if((p||b in v)&&(g=_(m=v[b],b,y),t))if(n)w[b]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return b;case 2:w.push(m)}else if(c)return!1;return h?-1:u||c?c:w}}},function(t,e,n){"use strict";if(n(7)){var i=n(31),r=n(2),o=n(3),a=n(0),s=n(66),l=n(96),u=n(20),c=n(41),h=n(34),p=n(12),f=n(43),d=n(22),m=n(6),g=n(127),y=n(37),v=n(25),_=n(15),x=n(46),b=n(4),w=n(9),E=n(85),S=n(38),T=n(18),A=n(39).f,k=n(87),C=n(35),P=n(5),z=n(28),I=n(56),M=n(53),L=n(90),D=n(48),B=n(61),R=n(40),O=n(89),F=n(116),N=n(8),U=n(17),V=N.f,j=U.f,Z=r.RangeError,q=r.TypeError,W=r.Uint8Array,G=Array.prototype,H=l.ArrayBuffer,K=l.DataView,X=z(0),Y=z(2),J=z(3),Q=z(4),$=z(5),tt=z(6),et=I(!0),nt=I(!1),it=L.values,rt=L.keys,ot=L.entries,at=G.lastIndexOf,st=G.reduce,lt=G.reduceRight,ut=G.join,ct=G.sort,ht=G.slice,pt=G.toString,ft=G.toLocaleString,dt=P("iterator"),mt=P("toStringTag"),gt=C("typed_constructor"),yt=C("def_constructor"),vt=s.CONSTR,_t=s.TYPED,xt=s.VIEW,bt=z(1,(function(t,e){return At(M(t,t[yt]),e)})),wt=o((function(){return 1===new W(new Uint16Array([1]).buffer)[0]})),Et=!!W&&!!W.prototype.set&&o((function(){new W(1).set({})})),St=function(t,e){var n=d(t);if(n<0||n%e)throw Z("Wrong offset!");return n},Tt=function(t){if(b(t)&&_t in t)return t;throw q(t+" is not a typed array!")},At=function(t,e){if(!(b(t)&> in t))throw q("It is not a typed array constructor!");return new t(e)},kt=function(t,e){return Ct(M(t,t[yt]),e)},Ct=function(t,e){for(var n=0,i=e.length,r=At(t,i);i>n;)r[n]=e[n++];return r},Pt=function(t,e,n){V(t,e,{get:function(){return this._d[n]}})},zt=function(t){var e,n,i,r,o,a,s=w(t),l=arguments.length,c=l>1?arguments[1]:void 0,h=void 0!==c,p=k(s);if(null!=p&&!E(p)){for(a=p.call(s),i=[],e=0;!(o=a.next()).done;e++)i.push(o.value);s=i}for(h&&l>2&&(c=u(c,arguments[2],2)),e=0,n=m(s.length),r=At(this,n);n>e;e++)r[e]=h?c(s[e],e):s[e];return r},It=function(){for(var t=0,e=arguments.length,n=At(this,e);e>t;)n[t]=arguments[t++];return n},Mt=!!W&&o((function(){ft.call(new W(1))})),Lt=function(){return ft.apply(Mt?ht.call(Tt(this)):Tt(this),arguments)},Dt={copyWithin:function(t,e){return F.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return O.apply(Tt(this),arguments)},filter:function(t){return kt(this,Y(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){X(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return bt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return lt.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),i=0;i1?arguments[1]:void 0)},sort:function(t){return ct.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),i=n.length,r=y(t,i);return new(M(n,n[yt]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,m((void 0===e?i:y(e,i))-r))}},Bt=function(t,e){return kt(this,ht.call(Tt(this),t,e))},Rt=function(t){Tt(this);var e=St(arguments[1],1),n=this.length,i=w(t),r=m(i.length),o=0;if(r+e>n)throw Z("Wrong length!");for(;o255?255:255&i),r.v[f](n*e+r.o,i,wt)}(this,n,t)},enumerable:!0})};_?(d=n((function(t,n,i,r){c(t,d,u,"_d");var o,a,s,l,h=0,f=0;if(b(n)){if(!(n instanceof H||"ArrayBuffer"==(l=x(n))||"SharedArrayBuffer"==l))return _t in n?Ct(d,n):zt.call(d,n);o=n,f=St(i,e);var y=n.byteLength;if(void 0===r){if(y%e)throw Z("Wrong length!");if((a=y-f)<0)throw Z("Wrong length!")}else if((a=m(r)*e)+f>y)throw Z("Wrong length!");s=a/e}else s=g(n),o=new H(a=s*e);for(p(t,"_d",{b:o,o:f,l:a,e:s,v:new K(o)});hdocument.F=Object<\/script>"),t.close(),l=t.F;i--;)delete l.prototype[o[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=i(t),n=new s,s.prototype=null,n[a]=t):n=l(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(101),r=n(73).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){"use strict";var i=n(2),r=n(8),o=n(7),a=n(5)("species");t.exports=function(t){var e=i[t];o&&e&&!e[a]&&r.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var i=n(20),r=n(114),o=n(85),a=n(1),s=n(6),l=n(87),u={},c={};(e=t.exports=function(t,e,n,h,p){var f,d,m,g,y=p?function(){return t}:l(t),v=i(n,h,e?2:1),_=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(f=s(t.length);f>_;_++)if((g=e?v(a(d=t[_])[0],d[1]):v(t[_]))===u||g===c)return g}else for(m=y.call(t);!(d=m.next()).done;)if((g=r(m,v,d.value,e))===u||g===c)return g}).BREAK=u,e.RETURN=c},function(t,e,n){var i=n(13);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){var i=n(4);t.exports=function(t,e){if(!i(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){var i=n(8).f,r=n(15),o=n(5)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(21),r=n(5)("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(a=i(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var i=n(0),r=n(26),o=n(3),a=n(76),s="["+a+"]",l=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),c=function(t,e,n){var r={},s=o((function(){return!!a[t]()||"​…"!="​…"[t]()})),l=r[t]=s?e(h):a[t];n&&(r[n]=l),i(i.P+i.F*s,"String",r)},h=c.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(u,"")),t};t.exports=c},function(t,e){t.exports={}},function(t,e,n){var i=n(19),r=n(2),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(31)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var i=n(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var i=n(1),r=n(11),o=n(5)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||null==(n=i(a)[o])?e:r(n)}},function(t,e,n){"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;nc;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(21);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(22),r=n(26);t.exports=function(t){return function(e,n){var o,a,s=String(r(e)),l=i(n),u=s.length;return l<0||l>=u?t?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){var i=n(4),r=n(21),o=n(5)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==r(t))}},function(t,e,n){var i=n(5)("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],a=o[i]();a.next=function(){return{done:n=!0}},o[i]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(46),r=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},function(t,e,n){"use strict";n(118);var i=n(13),r=n(12),o=n(3),a=n(26),s=n(5),l=n(91),u=s("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),h=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=s(t),f=!o((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=f?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e})):void 0;if(!f||!d||"replace"===t&&!c||"split"===t&&!h){var m=/./[p],g=n(a,p,""[t],(function(t,e,n,i,r){return e.exec===l?f&&!r?{done:!0,value:m.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}})),y=g[0],v=g[1];i(String.prototype,t,y),r(RegExp.prototype,p,2==e?function(t,e){return v.call(t,this,e)}:function(t){return v.call(t,this)})}}},function(t,e,n){var i=n(2).navigator;t.exports=i&&i.userAgent||""},function(t,e,n){"use strict";var i=n(2),r=n(0),o=n(13),a=n(43),s=n(32),l=n(42),u=n(41),c=n(4),h=n(3),p=n(61),f=n(45),d=n(77);t.exports=function(t,e,n,m,g,y){var v=i[t],_=v,x=g?"set":"add",b=_&&_.prototype,w={},E=function(t){var e=b[t];o(b,t,"delete"==t?function(t){return!(y&&!c(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!c(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!c(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof _&&(y||b.forEach&&!h((function(){(new _).entries().next()})))){var S=new _,T=S[x](y?{}:-0,1)!=S,A=h((function(){S.has(1)})),k=p((function(t){new _(t)})),C=!y&&h((function(){for(var t=new _,e=5;e--;)t[x](e,e);return!t.has(-0)}));k||((_=e((function(e,n){u(e,_,t);var i=d(new v,e,_);return null!=n&&l(n,g,i[x],i),i}))).prototype=b,b.constructor=_),(A||C)&&(E("delete"),E("has"),g&&E("get")),(C||T)&&E(x),y&&b.clear&&delete b.clear}else _=m.getConstructor(e,t,g,x),a(_.prototype,n),s.NEED=!0;return f(_,t),w[t]=_,r(r.G+r.W+r.F*(_!=v),w),y||m.setStrong(_,t,g),_}},function(t,e,n){for(var i,r=n(2),o=n(12),a=n(35),s=a("typed_array"),l=a("view"),u=!(!r.ArrayBuffer||!r.DataView),c=u,h=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(i=r[p[h++]])?(o(i.prototype,s,!0),o(i.prototype,l,!0)):c=!1;t.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(t,e,n){"use strict";t.exports=n(31)||!n(3)((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete n(2)[t]}))},function(t,e,n){"use strict";var i=n(0);t.exports=function(t){i(i.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var i=n(0),r=n(11),o=n(20),a=n(42);t.exports=function(t){i(i.S,t,{from:function(t){var e,n,i,s,l=arguments[1];return r(this),(e=void 0!==l)&&r(l),null==t?new this:(n=[],e?(i=0,s=o(l,arguments[2],2),a(t,!1,(function(t){n.push(s(t,i++))}))):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){var i=n(4),r=n(2).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(2),r=n(19),o=n(31),a=n(100),s=n(8).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var i=n(49)("keys"),r=n(35);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(2).document;t.exports=i&&i.documentElement},function(t,e,n){var i=n(4),r=n(1),o=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{(i=n(20)(Function.call,n(17).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var i=n(4),r=n(75).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&i(o)&&r&&r(t,o),t}},function(t,e,n){"use strict";var i=n(22),r=n(26);t.exports=function(t){var e=String(r(this)),n="",o=i(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var i=n(31),r=n(0),o=n(13),a=n(12),s=n(48),l=n(82),u=n(45),c=n(18),h=n(5)("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,n,d,m,g,y){l(n,e,d);var v,_,x,b=function(t){if(!p&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",E="values"==m,S=!1,T=t.prototype,A=T[h]||T["@@iterator"]||m&&T[m],k=A||b(m),C=m?E?b("entries"):k:void 0,P="Array"==e&&T.entries||A;if(P&&(x=c(P.call(new t)))!==Object.prototype&&x.next&&(u(x,w,!0),i||"function"==typeof x[h]||a(x,h,f)),E&&A&&"values"!==A.name&&(S=!0,k=function(){return A.call(this)}),i&&!y||!p&&!S&&T[h]||a(T,h,k),s[e]=k,s[w]=f,m)if(v={values:E?k:b("values"),keys:g?k:b("keys"),entries:C},y)for(_ in v)_ in T||o(T,_,v[_]);else r(r.P+r.F*(p||S),e,v);return v}},function(t,e,n){"use strict";var i=n(38),r=n(34),o=n(45),a={};n(12)(a,n(5)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=i(a,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(60),r=n(26);t.exports=function(t,e,n){if(i(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(t))}},function(t,e,n){var i=n(5)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var i=n(48),r=n(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},function(t,e,n){"use strict";var i=n(8),r=n(34);t.exports=function(t,e,n){e in t?i.f(t,e,r(0,n)):t[e]=n}},function(t,e,n){var i=n(46),r=n(5)("iterator"),o=n(48);t.exports=n(19).getIteratorMethod=function(t){if(null!=t)return t[r]||t["@@iterator"]||o[i(t)]}},function(t,e,n){var i=n(233);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){"use strict";var i=n(9),r=n(37),o=n(6);t.exports=function(t){for(var e=i(this),n=o(e.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,u=void 0===l?n:r(l,n);u>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var i=n(33),r=n(117),o=n(48),a=n(16);t.exports=n(81)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){"use strict";var i,r,o=n(52),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,u=(i=/a/,r=/b*/g,a.call(i,"a"),a.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),c=void 0!==/()??/.exec("")[1];(u||c)&&(l=function(t){var e,n,i,r,l=this;return c&&(n=new RegExp("^"+l.source+"$(?!\\s)",o.call(l))),u&&(e=l.lastIndex),i=a.call(l,t),u&&i&&(l.lastIndex=l.global?i.index+i[0].length:e),c&&i&&i.length>1&&s.call(i[0],n,(function(){for(r=1;rn;)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},i(g),g},f=function(t){delete y[t]},"process"==n(21)(h)?i=function(t){h.nextTick(a(v,t,1))}:m&&m.now?i=function(t){m.now(a(v,t,1))}:d?(o=(r=new d).port2,r.port1.onmessage=_,i=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(i=function(t){c.postMessage(t+"","*")},c.addEventListener("message",_,!1)):i="onreadystatechange"in u("script")?function(t){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),v.call(t)}}:function(t){setTimeout(a(v,t,1),0)}),t.exports={set:p,clear:f}},function(t,e,n){var i=n(2),r=n(93).set,o=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n(21)(a);t.exports=function(){var t,e,n,u=function(){var i,r;for(l&&(i=a.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(u)};else if(!o||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){r.call(i,u)};else{var h=!0,p=document.createTextNode("");new o(u).observe(p,{characterData:!0}),n=function(){p.data=h=!h}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},function(t,e,n){"use strict";var i=n(11);function r(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)}t.exports.f=function(t){return new r(t)}},function(t,e,n){"use strict";var i=n(2),r=n(7),o=n(31),a=n(66),s=n(12),l=n(43),u=n(3),c=n(41),h=n(22),p=n(6),f=n(127),d=n(39).f,m=n(8).f,g=n(89),y=n(45),v="prototype",_="Wrong index!",x=i.ArrayBuffer,b=i.DataView,w=i.Math,E=i.RangeError,S=i.Infinity,T=x,A=w.abs,k=w.pow,C=w.floor,P=w.log,z=w.LN2,I=r?"_b":"buffer",M=r?"_l":"byteLength",L=r?"_o":"byteOffset";function D(t,e,n){var i,r,o,a=new Array(n),s=8*n-e-1,l=(1<>1,c=23===e?k(2,-24)-k(2,-77):0,h=0,p=t<0||0===t&&1/t<0?1:0;for((t=A(t))!=t||t===S?(r=t!=t?1:0,i=l):(i=C(P(t)/z),t*(o=k(2,-i))<1&&(i--,o*=2),(t+=i+u>=1?c/o:c*k(2,1-u))*o>=2&&(i++,o/=2),i+u>=l?(r=0,i=l):i+u>=1?(r=(t*o-1)*k(2,e),i+=u):(r=t*k(2,u-1)*k(2,e),i=0));e>=8;a[h++]=255&r,r/=256,e-=8);for(i=i<0;a[h++]=255&i,i/=256,s-=8);return a[--h]|=128*p,a}function B(t,e,n){var i,r=8*n-e-1,o=(1<>1,s=r-7,l=n-1,u=t[l--],c=127&u;for(u>>=7;s>0;c=256*c+t[l],l--,s-=8);for(i=c&(1<<-s)-1,c>>=-s,s+=e;s>0;i=256*i+t[l],l--,s-=8);if(0===c)c=1-a;else{if(c===o)return i?NaN:u?-S:S;i+=k(2,e),c-=a}return(u?-1:1)*i*k(2,c-e)}function R(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function O(t){return[255&t]}function F(t){return[255&t,t>>8&255]}function N(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function U(t){return D(t,52,8)}function V(t){return D(t,23,4)}function j(t,e,n){m(t[v],e,{get:function(){return this[n]}})}function Z(t,e,n,i){var r=f(+n);if(r+e>t[M])throw E(_);var o=t[I]._b,a=r+t[L],s=o.slice(a,a+e);return i?s:s.reverse()}function q(t,e,n,i,r,o){var a=f(+n);if(a+e>t[M])throw E(_);for(var s=t[I]._b,l=a+t[L],u=i(+r),c=0;cK;)(W=H[K++])in x||s(x,W,T[W]);o||(G.constructor=x)}var X=new b(new x(2)),Y=b[v].setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||l(b[v],{setInt8:function(t,e){Y.call(this,t,e<<24>>24)},setUint8:function(t,e){Y.call(this,t,e<<24>>24)}},!0)}else x=function(t){c(this,x,"ArrayBuffer");var e=f(t);this._b=g.call(new Array(e),0),this[M]=e},b=function(t,e,n){c(this,b,"DataView"),c(t,x,"DataView");var i=t[M],r=h(e);if(r<0||r>i)throw E("Wrong offset!");if(r+(n=void 0===n?i-r:p(n))>i)throw E("Wrong length!");this[I]=t,this[L]=r,this[M]=n},r&&(j(x,"byteLength","_l"),j(b,"buffer","_b"),j(b,"byteLength","_l"),j(b,"byteOffset","_o")),l(b[v],{getInt8:function(t){return Z(this,1,t)[0]<<24>>24},getUint8:function(t){return Z(this,1,t)[0]},getInt16:function(t){var e=Z(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Z(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(Z(this,4,t,arguments[1]))},getUint32:function(t){return R(Z(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return B(Z(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return B(Z(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){q(this,1,t,O,e)},setUint8:function(t,e){q(this,1,t,O,e)},setInt16:function(t,e){q(this,2,t,F,e,arguments[2])},setUint16:function(t,e){q(this,2,t,F,e,arguments[2])},setInt32:function(t,e){q(this,4,t,N,e,arguments[2])},setUint32:function(t,e){q(this,4,t,N,e,arguments[2])},setFloat32:function(t,e){q(this,4,t,V,e,arguments[2])},setFloat64:function(t,e){q(this,8,t,U,e,arguments[2])}});y(x,"ArrayBuffer"),y(b,"DataView"),s(b[v],a.VIEW,!0),e.ArrayBuffer=x,e.DataView=b},function(t,e,n){"use strict";t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},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=!n(7)&&!n(3)((function(){return 7!=Object.defineProperty(n(70)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){e.f=n(5)},function(t,e,n){var i=n(15),r=n(16),o=n(56)(!1),a=n(72)("IE_PROTO");t.exports=function(t,e){var n,s=r(t),l=0,u=[];for(n in s)n!=a&&i(s,n)&&u.push(n);for(;e.length>l;)i(s,n=e[l++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var i=n(8),r=n(1),o=n(36);t.exports=n(7)?Object.defineProperties:function(t,e){r(t);for(var n,a=o(e),s=a.length,l=0;s>l;)i.f(t,n=a[l++],e[n]);return t}},function(t,e,n){var i=n(16),r=n(39).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return r(t)}catch(t){return a.slice()}}(t):r(i(t))}},function(t,e,n){"use strict";var i=n(7),r=n(36),o=n(57),a=n(51),s=n(9),l=n(50),u=Object.assign;t.exports=!u||n(3)((function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=i}))?function(t,e){for(var n=s(t),u=arguments.length,c=1,h=o.f,p=a.f;u>c;)for(var f,d=l(arguments[c++]),m=h?r(d).concat(h(d)):r(d),g=m.length,y=0;g>y;)f=m[y++],i&&!p.call(d,f)||(n[f]=d[f]);return n}:u},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var i=n(11),r=n(4),o=n(107),a=[].slice,s={},l=function(t,e,n){if(!(e in s)){for(var i=[],r=0;r>>0||(a.test(n)?16:10))}:i},function(t,e,n){var i=n(2).parseFloat,r=n(47).trim;t.exports=1/i(n(76)+"-0")!=-1/0?function(t){var e=r(String(t),3),n=i(e);return 0===n&&"-"==e.charAt(0)?-0:n}:i},function(t,e,n){var i=n(21);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=i(t))throw TypeError(e);return+t}},function(t,e,n){var i=n(4),r=Math.floor;t.exports=function(t){return!i(t)&&isFinite(t)&&r(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var i=n(79),r=Math.pow,o=r(2,-52),a=r(2,-23),s=r(2,127)*(2-a),l=r(2,-126);t.exports=Math.fround||function(t){var e,n,r=Math.abs(t),u=i(t);return rs||n!=n?u*(1/0):u*n}},function(t,e,n){var i=n(1);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(t,e,n){var i=n(11),r=n(9),o=n(50),a=n(6);t.exports=function(t,e,n,s,l){i(e);var u=r(t),c=o(u),h=a(u.length),p=l?h-1:0,f=l?-1:1;if(n<2)for(;;){if(p in c){s=c[p],p+=f;break}if(p+=f,l?p<0:h<=p)throw TypeError("Reduce of empty array with no initial value")}for(;l?p>=0:h>p;p+=f)p in c&&(s=e(s,c[p],p,u));return s}},function(t,e,n){"use strict";var i=n(9),r=n(37),o=n(6);t.exports=[].copyWithin||function(t,e){var n=i(this),a=o(n.length),s=r(t,a),l=r(e,a),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?a:r(u,a))-l,a-s),h=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=h,l+=h;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var i=n(91);n(0)({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(52)})},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(1),r=n(4),o=n(95);t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var i=n(123),r=n(44);t.exports=n(65)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=i.getEntry(r(this,"Map"),t);return e&&e.v},set:function(t,e){return i.def(r(this,"Map"),0===t?0:t,e)}},i,!0)},function(t,e,n){"use strict";var i=n(8).f,r=n(38),o=n(43),a=n(20),s=n(41),l=n(42),u=n(81),c=n(117),h=n(40),p=n(7),f=n(32).fastKey,d=n(44),m=p?"_s":"size",g=function(t,e){var n,i=f(e);if("F"!==i)return t._i[i];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var c=t((function(t,i){s(t,c,e,"_i"),t._t=e,t._i=r(null),t._f=void 0,t._l=void 0,t[m]=0,null!=i&&l(i,n,t[u],t)}));return o(c.prototype,{clear:function(){for(var t=d(this,e),n=t._i,i=t._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete n[i.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=d(this,e),i=g(n,t);if(i){var r=i.n,o=i.p;delete n._i[i.i],i.r=!0,o&&(o.n=r),r&&(r.p=o),n._f==i&&(n._f=r),n._l==i&&(n._l=o),n[m]--}return!!i},forEach:function(t){d(this,e);for(var n,i=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(i(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(d(this,e),t)}}),p&&i(c.prototype,"size",{get:function(){return d(this,e)[m]}}),c},def:function(t,e,n){var i,r,o=g(t,e);return o?o.v=n:(t._l=o={i:r=f(e,!0),k:e,v:n,p:i=t._l,n:void 0,r:!1},t._f||(t._f=o),i&&(i.n=o),t[m]++,"F"!==r&&(t._i[r]=o)),t},getEntry:g,setStrong:function(t,e,n){u(t,e,(function(t,n){this._t=d(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?c(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,c(1))}),n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){"use strict";var i=n(123),r=n(44);t.exports=n(65)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return i.def(r(this,"Set"),t=0===t?0:t,t)}},i)},function(t,e,n){"use strict";var i,r=n(2),o=n(28)(0),a=n(13),s=n(32),l=n(104),u=n(126),c=n(4),h=n(44),p=n(44),f=!r.ActiveXObject&&"ActiveXObject"in r,d=s.getWeak,m=Object.isExtensible,g=u.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(t){if(c(t)){var e=d(t);return!0===e?g(h(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(h(this,"WeakMap"),t,e)}},_=t.exports=n(65)("WeakMap",y,v,u,!0,!0);p&&f&&(l((i=u.getConstructor(y,"WeakMap")).prototype,v),s.NEED=!0,o(["delete","has","get","set"],(function(t){var e=_.prototype,n=e[t];a(e,t,(function(e,r){if(c(e)&&!m(e)){this._f||(this._f=new i);var o=this._f[t](e,r);return"set"==t?this:o}return n.call(this,e,r)}))})))},function(t,e,n){"use strict";var i=n(43),r=n(32).getWeak,o=n(1),a=n(4),s=n(41),l=n(42),u=n(28),c=n(15),h=n(44),p=u(5),f=u(6),d=0,m=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return p(t.a,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=f(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var u=t((function(t,i){s(t,u,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=i&&l(i,n,t[o],t)}));return i(u.prototype,{delete:function(t){if(!a(t))return!1;var n=r(t);return!0===n?m(h(this,e)).delete(t):n&&c(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=r(t);return!0===n?m(h(this,e)).has(t):n&&c(n,this._i)}}),u},def:function(t,e,n){var i=r(o(e),!0);return!0===i?m(t).set(e,n):i[t._i]=n,t},ufstore:m}},function(t,e,n){var i=n(22),r=n(6);t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var i=n(39),r=n(57),o=n(1),a=n(2).Reflect;t.exports=a&&a.ownKeys||function(t){var e=i.f(o(t)),n=r.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";var i=n(58),r=n(4),o=n(6),a=n(20),s=n(5)("isConcatSpreadable");t.exports=function t(e,n,l,u,c,h,p,f){for(var d,m,g=c,y=0,v=!!p&&a(p,f,3);y0)g=t(e,n,d,o(d.length),g,h-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=d}g++}y++}return g}},function(t,e,n){var i=n(6),r=n(78),o=n(26);t.exports=function(t,e,n,a){var s=String(o(t)),l=s.length,u=void 0===n?" ":String(n),c=i(e);if(c<=l||""==u)return s;var h=c-l,p=r.call(u,Math.ceil(h/u.length));return p.length>h&&(p=p.slice(0,h)),a?p+s:s+p}},function(t,e,n){var i=n(7),r=n(36),o=n(16),a=n(51).f;t.exports=function(t){return function(e){for(var n,s=o(e),l=r(s),u=l.length,c=0,h=[];u>c;)n=l[c++],i&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}}},function(t,e,n){var i=n(46),r=n(133);t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");return r(this)}}},function(t,e,n){var i=n(42);t.exports=function(t,e){var n=[];return i(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,i,r){return 0===arguments.length||t!=t||e!=e||n!=n||i!=i||r!=r?NaN:t===1/0||t===-1/0?t:(t-e)*(r-i)/(n-e)+i}},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;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}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,s,l=a(t),u=1;u-1};function o(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function c(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function h(t){var e=new FileReader,n=c(e);return e.readAsArrayBuffer(t),n}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:n.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():n.arrayBuffer&&n.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var t=u(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t,e,n,i=u(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=c(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i-1?i:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}})),e}function y(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},f.call(m.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var v=[301,302,303,307,308];y.redirect=function(t,e){if(-1===v.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function _(t,i){return new Promise((function(r,o){var a=new m(t,i);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();e.append(i,r)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new y(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}_.polyfill=!0,t.fetch||(t.fetch=_,t.Headers=l,t.Request=m,t.Response=y),e.Headers=l,e.Request=m,e.Response=y,e.fetch=_}({})}(n),delete n.fetch.polyfill,(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e},function(t,e,n){"use strict";var i=n(346);var r={bassackwards:!1,pointInLayer:function(t,e,n){"number"==typeof t.lat?t=[t.lng,t.lat]:r.bassackwards&&(t=t.concat().reverse());var o=[];return e.eachLayer((function(e){n&&o.length||function(t){return t.feature&&t.feature.geometry&&t.feature.geometry.type&&-1!==["Polygon","MultiPolygon"].indexOf(t.feature.geometry.type)}(e)&&i.pointInPolygon({type:"Point",coordinates:t},e.toGeoJSON().geometry)&&o.push(e)})),o}};t.exports=r},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}}(),t.exports=n(348)},,,function(t,e,n){"use strict";(function(t){if(n(142),n(339),n(340),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function i(t,n,i){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:i})}i(String.prototype,"padLeft","".padStart),i(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(t){[][t]&&i(Array,t,Function.call.bind([][t]))}))}).call(this,n(98))},function(t,e,n){n(143),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(223),n(224),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(90),n(247),n(118),n(248),n(119),n(249),n(250),n(251),n(252),n(253),n(122),n(124),n(125),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),t.exports=n(19)},function(t,e,n){"use strict";var i=n(2),r=n(15),o=n(7),a=n(0),s=n(13),l=n(32).KEY,u=n(3),c=n(49),h=n(45),p=n(35),f=n(5),d=n(100),m=n(71),g=n(145),y=n(58),v=n(1),_=n(4),x=n(9),b=n(16),w=n(25),E=n(34),S=n(38),T=n(103),A=n(17),k=n(57),C=n(8),P=n(36),z=A.f,I=C.f,M=T.f,L=i.Symbol,D=i.JSON,B=D&&D.stringify,R=f("_hidden"),O=f("toPrimitive"),F={}.propertyIsEnumerable,N=c("symbol-registry"),U=c("symbols"),V=c("op-symbols"),j=Object.prototype,Z="function"==typeof L&&!!k.f,q=i.QObject,W=!q||!q.prototype||!q.prototype.findChild,G=o&&u((function(){return 7!=S(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=z(j,e);i&&delete j[e],I(t,e,n),i&&t!==j&&I(j,e,i)}:I,H=function(t){var e=U[t]=S(L.prototype);return e._k=t,e},K=Z&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},X=function(t,e,n){return t===j&&X(V,e,n),v(t),e=w(e,!0),v(n),r(U,e)?(n.enumerable?(r(t,R)&&t[R][e]&&(t[R][e]=!1),n=S(n,{enumerable:E(0,!1)})):(r(t,R)||I(t,R,E(1,{})),t[R][e]=!0),G(t,e,n)):I(t,e,n)},Y=function(t,e){v(t);for(var n,i=g(e=b(e)),r=0,o=i.length;o>r;)X(t,n=i[r++],e[n]);return t},J=function(t){var e=F.call(this,t=w(t,!0));return!(this===j&&r(U,t)&&!r(V,t))&&(!(e||!r(this,t)||!r(U,t)||r(this,R)&&this[R][t])||e)},Q=function(t,e){if(t=b(t),e=w(e,!0),t!==j||!r(U,e)||r(V,e)){var n=z(t,e);return!n||!r(U,e)||r(t,R)&&t[R][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=M(b(t)),i=[],o=0;n.length>o;)r(U,e=n[o++])||e==R||e==l||i.push(e);return i},tt=function(t){for(var e,n=t===j,i=M(n?V:b(t)),o=[],a=0;i.length>a;)!r(U,e=i[a++])||n&&!r(j,e)||o.push(U[e]);return o};Z||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===j&&e.call(V,n),r(this,R)&&r(this[R],t)&&(this[R][t]=!1),G(this,t,E(1,n))};return o&&W&&G(j,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",(function(){return this._k})),A.f=Q,C.f=X,n(39).f=T.f=$,n(51).f=J,k.f=tt,o&&!n(31)&&s(j,"propertyIsEnumerable",J,!0),d.f=function(t){return H(f(t))}),a(a.G+a.W+a.F*!Z,{Symbol:L});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)f(et[nt++]);for(var it=P(f.store),rt=0;it.length>rt;)m(it[rt++]);a(a.S+a.F*!Z,"Symbol",{for:function(t){return r(N,t+="")?N[t]:N[t]=L(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!Z,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=u((function(){k.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return k.f(x(t))}}),D&&a(a.S+a.F*(!Z||u((function(){var t=L();return"[null]"!=B([t])||"{}"!=B({a:t})||"{}"!=B(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=e=i[1],(_(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),i[1]=e,B.apply(D,i)}}),L.prototype[O]||n(12)(L.prototype,O,L.prototype.valueOf),h(L,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,n){t.exports=n(49)("native-function-to-string",Function.toString)},function(t,e,n){var i=n(36),r=n(57),o=n(51);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var a,s=n(t),l=o.f,u=0;s.length>u;)l.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var i=n(0);i(i.S,"Object",{create:n(38)})},function(t,e,n){var i=n(0);i(i.S+i.F*!n(7),"Object",{defineProperty:n(8).f})},function(t,e,n){var i=n(0);i(i.S+i.F*!n(7),"Object",{defineProperties:n(102)})},function(t,e,n){var i=n(16),r=n(17).f;n(27)("getOwnPropertyDescriptor",(function(){return function(t,e){return r(i(t),e)}}))},function(t,e,n){var i=n(9),r=n(18);n(27)("getPrototypeOf",(function(){return function(t){return r(i(t))}}))},function(t,e,n){var i=n(9),r=n(36);n(27)("keys",(function(){return function(t){return r(i(t))}}))},function(t,e,n){n(27)("getOwnPropertyNames",(function(){return n(103).f}))},function(t,e,n){var i=n(4),r=n(32).onFreeze;n(27)("freeze",(function(t){return function(e){return t&&i(e)?t(r(e)):e}}))},function(t,e,n){var i=n(4),r=n(32).onFreeze;n(27)("seal",(function(t){return function(e){return t&&i(e)?t(r(e)):e}}))},function(t,e,n){var i=n(4),r=n(32).onFreeze;n(27)("preventExtensions",(function(t){return function(e){return t&&i(e)?t(r(e)):e}}))},function(t,e,n){var i=n(4);n(27)("isFrozen",(function(t){return function(e){return!i(e)||!!t&&t(e)}}))},function(t,e,n){var i=n(4);n(27)("isSealed",(function(t){return function(e){return!i(e)||!!t&&t(e)}}))},function(t,e,n){var i=n(4);n(27)("isExtensible",(function(t){return function(e){return!!i(e)&&(!t||t(e))}}))},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{assign:n(104)})},function(t,e,n){var i=n(0);i(i.S,"Object",{is:n(105)})},function(t,e,n){var i=n(0);i(i.S,"Object",{setPrototypeOf:n(75).set})},function(t,e,n){"use strict";var i=n(46),r={};r[n(5)("toStringTag")]="z",r+""!="[object z]"&&n(13)(Object.prototype,"toString",(function(){return"[object "+i(this)+"]"}),!0)},function(t,e,n){var i=n(0);i(i.P,"Function",{bind:n(106)})},function(t,e,n){var i=n(8).f,r=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in r||n(7)&&i(r,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var i=n(4),r=n(18),o=n(5)("hasInstance"),a=Function.prototype;o in a||n(8).f(a,o,{value:function(t){if("function"!=typeof this||!i(t))return!1;if(!i(this.prototype))return t instanceof this;for(;t=r(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var i=n(0),r=n(108);i(i.G+i.F*(parseInt!=r),{parseInt:r})},function(t,e,n){var i=n(0),r=n(109);i(i.G+i.F*(parseFloat!=r),{parseFloat:r})},function(t,e,n){"use strict";var i=n(2),r=n(15),o=n(21),a=n(77),s=n(25),l=n(3),u=n(39).f,c=n(17).f,h=n(8).f,p=n(47).trim,f=i.Number,d=f,m=f.prototype,g="Number"==o(n(38)(m)),y="trim"in String.prototype,v=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,o=(e=y?e.trim():p(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var a,l=e.slice(2),u=0,c=l.length;ur)return NaN;return parseInt(l,i)}}return+e};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof f&&(g?l((function(){m.valueOf.call(n)})):"Number"!=o(n))?a(new d(v(e)),n,f):v(e)};for(var _,x=n(7)?u(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),b=0;x.length>b;b++)r(d,_=x[b])&&!r(f,_)&&h(f,_,c(d,_));f.prototype=m,m.constructor=f,n(13)(i,"Number",f)}},function(t,e,n){"use strict";var i=n(0),r=n(22),o=n(110),a=n(78),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",h=function(t,e){for(var n=-1,i=e;++n<6;)i+=t*u[n],u[n]=i%1e7,i=l(i/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=l(n/t),n=n%t*1e7},f=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};i(i.P+i.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,i,s,l=o(this,c),u=r(t),m="",g="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(m="-",l=-l),l>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(l*d(2,69,1))-69)<0?l*d(2,-e,1):l/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(h(0,n),i=u;i>=7;)h(1e7,0),i-=7;for(h(d(10,i,1),0),i=e-1;i>=23;)p(1<<23),i-=23;p(1<0?m+((s=g.length)<=u?"0."+a.call("0",u-s)+g:g.slice(0,s-u)+"."+g.slice(s-u)):m+g}})},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(110),a=1..toPrecision;i(i.P+i.F*(r((function(){return"1"!==a.call(1,void 0)}))||!r((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var i=n(0);i(i.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var i=n(0),r=n(2).isFinite;i(i.S,"Number",{isFinite:function(t){return"number"==typeof t&&r(t)}})},function(t,e,n){var i=n(0);i(i.S,"Number",{isInteger:n(111)})},function(t,e,n){var i=n(0);i(i.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var i=n(0),r=n(111),o=Math.abs;i(i.S,"Number",{isSafeInteger:function(t){return r(t)&&o(t)<=9007199254740991}})},function(t,e,n){var i=n(0);i(i.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var i=n(0);i(i.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var i=n(0),r=n(109);i(i.S+i.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(t,e,n){var i=n(0),r=n(108);i(i.S+i.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(t,e,n){var i=n(0),r=n(112),o=Math.sqrt,a=Math.acosh;i(i.S+i.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:r(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var i=n(0),r=Math.asinh;i(i.S+i.F*!(r&&1/r(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var i=n(0),r=Math.atanh;i(i.S+i.F*!(r&&1/r(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var i=n(0),r=n(79);i(i.S,"Math",{cbrt:function(t){return r(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var i=n(0);i(i.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var i=n(0),r=Math.exp;i(i.S,"Math",{cosh:function(t){return(r(t=+t)+r(-t))/2}})},function(t,e,n){var i=n(0),r=n(80);i(i.S+i.F*(r!=Math.expm1),"Math",{expm1:r})},function(t,e,n){var i=n(0);i(i.S,"Math",{fround:n(113)})},function(t,e,n){var i=n(0),r=Math.abs;i(i.S,"Math",{hypot:function(t,e){for(var n,i,o=0,a=0,s=arguments.length,l=0;a0?(i=n/l)*i:n;return l===1/0?1/0:l*Math.sqrt(o)}})},function(t,e,n){var i=n(0),r=Math.imul;i(i.S+i.F*n(3)((function(){return-5!=r(4294967295,5)||2!=r.length})),"Math",{imul:function(t,e){var n=+t,i=+e,r=65535&n,o=65535&i;return 0|r*o+((65535&n>>>16)*o+r*(65535&i>>>16)<<16>>>0)}})},function(t,e,n){var i=n(0);i(i.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var i=n(0);i(i.S,"Math",{log1p:n(112)})},function(t,e,n){var i=n(0);i(i.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var i=n(0);i(i.S,"Math",{sign:n(79)})},function(t,e,n){var i=n(0),r=n(80),o=Math.exp;i(i.S+i.F*n(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(r(t)-r(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var i=n(0),r=n(80),o=Math.exp;i(i.S,"Math",{tanh:function(t){var e=r(t=+t),n=r(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var i=n(0);i(i.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var i=n(0),r=n(37),o=String.fromCharCode,a=String.fromCodePoint;i(i.S+i.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,a=0;i>a;){if(e=+arguments[a++],r(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var i=n(0),r=n(16),o=n(6);i(i.S,"String",{raw:function(t){for(var e=r(t.raw),n=o(e.length),i=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var i=n(0),r=n(59)(!1);i(i.P,"String",{codePointAt:function(t){return r(this,t)}})},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(83),a="".endsWith;i(i.P+i.F*n(84)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,i=r(e.length),s=void 0===n?i:Math.min(r(n),i),l=String(t);return a?a.call(e,l,s):e.slice(s-l.length,s)===l}})},function(t,e,n){"use strict";var i=n(0),r=n(83);i(i.P+i.F*n(84)("includes"),"String",{includes:function(t){return!!~r(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var i=n(0);i(i.P,"String",{repeat:n(78)})},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(83),a="".startsWith;i(i.P+i.F*n(84)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),i=String(t);return a?a.call(e,i,n):e.slice(n,n+i.length)===i}})},function(t,e,n){"use strict";n(14)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(14)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(14)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(14)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(14)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(14)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(14)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(14)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(14)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(14)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(14)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(14)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(14)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var i=n(0);i(i.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(25);i(i.P+i.F*n(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=r(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var i=n(0),r=n(222);i(i.P+i.F*(Date.prototype.toISOString!==r),"Date",{toISOString:r})},function(t,e,n){"use strict";var i=n(3),r=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!i((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),i=e<0?"-":e>9999?"+":"";return i+("00000"+Math.abs(e)).slice(i?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){var i=Date.prototype,r=i.toString,o=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(13)(i,"toString",(function(){var t=o.call(this);return t==t?r.call(this):"Invalid Date"}))},function(t,e,n){var i=n(5)("toPrimitive"),r=Date.prototype;i in r||n(12)(r,i,n(225))},function(t,e,n){"use strict";var i=n(1),r=n(25);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return r(i(this),"number"!=t)}},function(t,e,n){var i=n(0);i(i.S,"Array",{isArray:n(58)})},function(t,e,n){"use strict";var i=n(20),r=n(0),o=n(9),a=n(114),s=n(85),l=n(6),u=n(86),c=n(87);r(r.S+r.F*!n(61)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,r,h,p=o(t),f="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,g=void 0!==m,y=0,v=c(p);if(g&&(m=i(m,d>2?arguments[2]:void 0,2)),null==v||f==Array&&s(v))for(n=new f(e=l(p.length));e>y;y++)u(n,y,g?m(p[y],y):p[y]);else for(h=v.call(p),n=new f;!(r=h.next()).done;y++)u(n,y,g?a(h,m,[r.value,y],!0):r.value);return n.length=y,n}})},function(t,e,n){"use strict";var i=n(0),r=n(86);i(i.S+i.F*n(3)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)r(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(0),r=n(16),o=[].join;i(i.P+i.F*(n(50)!=Object||!n(23)(o)),"Array",{join:function(t){return o.call(r(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(0),r=n(74),o=n(21),a=n(37),s=n(6),l=[].slice;i(i.P+i.F*n(3)((function(){r&&l.call(r)})),"Array",{slice:function(t,e){var n=s(this.length),i=o(this);if(e=void 0===e?n:e,"Array"==i)return l.call(this,t,e);for(var r=a(t,n),u=a(e,n),c=s(u-r),h=new Array(c),p=0;p1&&(i=Math.min(i,o(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in e&&e[i]===t)return i||0;return-1}})},function(t,e,n){var i=n(0);i(i.P,"Array",{copyWithin:n(116)}),n(33)("copyWithin")},function(t,e,n){var i=n(0);i(i.P,"Array",{fill:n(89)}),n(33)("fill")},function(t,e,n){"use strict";var i=n(0),r=n(28)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),i(i.P+i.F*o,"Array",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(33)("find")},function(t,e,n){"use strict";var i=n(0),r=n(28)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),i(i.P+i.F*a,"Array",{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(33)(o)},function(t,e,n){n(40)("Array")},function(t,e,n){var i=n(2),r=n(77),o=n(8).f,a=n(39).f,s=n(60),l=n(52),u=i.RegExp,c=u,h=u.prototype,p=/a/g,f=/a/g,d=new u(p)!==p;if(n(7)&&(!d||n(3)((function(){return f[n(5)("match")]=!1,u(p)!=p||u(f)==f||"/a/i"!=u(p,"i")})))){u=function(t,e){var n=this instanceof u,i=s(t),o=void 0===e;return!n&&i&&t.constructor===u&&o?t:r(d?new c(i&&!o?t.source:t,e):c((i=t instanceof u)?t.source:t,i&&o?l.call(t):e),n?this:h,u)};for(var m=function(t){t in u||o(u,t,{configurable:!0,get:function(){return c[t]},set:function(e){c[t]=e}})},g=a(c),y=0;g.length>y;)m(g[y++]);h.constructor=u,u.prototype=h,n(13)(i,"RegExp",u)}n(40)("RegExp")},function(t,e,n){"use strict";n(119);var i=n(1),r=n(52),o=n(7),a=/./.toString,s=function(t){n(13)(RegExp.prototype,"toString",t,!0)};n(3)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?r.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";var i=n(1),r=n(6),o=n(92),a=n(62);n(63)("match",1,(function(t,e,n,s){return[function(n){var i=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i):new RegExp(n)[e](String(i))},function(t){var e=s(n,t,this);if(e.done)return e.value;var l=i(t),u=String(this);if(!l.global)return a(l,u);var c=l.unicode;l.lastIndex=0;for(var h,p=[],f=0;null!==(h=a(l,u));){var d=String(h[0]);p[f]=d,""===d&&(l.lastIndex=o(u,r(l.lastIndex),c)),f++}return 0===f?null:p}]}))},function(t,e,n){"use strict";var i=n(1),r=n(9),o=n(6),a=n(22),s=n(92),l=n(62),u=Math.max,c=Math.min,h=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,f=/\$([$&`']|\d\d?)/g;n(63)("replace",2,(function(t,e,n,d){return[function(i,r){var o=t(this),a=null==i?void 0:i[e];return void 0!==a?a.call(i,o,r):n.call(String(o),i,r)},function(t,e){var r=d(n,t,this,e);if(r.done)return r.value;var h=i(t),p=String(this),f="function"==typeof e;f||(e=String(e));var g=h.global;if(g){var y=h.unicode;h.lastIndex=0}for(var v=[];;){var _=l(h,p);if(null===_)break;if(v.push(_),!g)break;""===String(_[0])&&(h.lastIndex=s(p,o(h.lastIndex),y))}for(var x,b="",w=0,E=0;E=w&&(b+=p.slice(w,T)+z,w=T+S.length)}return b+p.slice(w)}];function m(t,e,i,o,a,s){var l=i+t.length,u=o.length,c=f;return void 0!==a&&(a=r(a),c=p),n.call(s,c,(function(n,r){var s;switch(r.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,i);case"'":return e.slice(l);case"<":s=a[r.slice(1,-1)];break;default:var c=+r;if(0===c)return n;if(c>u){var p=h(c/10);return 0===p?n:p<=u?void 0===o[p-1]?r.charAt(1):o[p-1]+r.charAt(1):n}s=o[c-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var i=n(1),r=n(105),o=n(62);n(63)("search",1,(function(t,e,n,a){return[function(n){var i=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i):new RegExp(n)[e](String(i))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=i(t),l=String(this),u=s.lastIndex;r(u,0)||(s.lastIndex=0);var c=o(s,l);return r(s.lastIndex,u)||(s.lastIndex=u),null===c?-1:c.index}]}))},function(t,e,n){"use strict";var i=n(60),r=n(1),o=n(53),a=n(92),s=n(6),l=n(62),u=n(91),c=n(3),h=Math.min,p=[].push,f=!c((function(){RegExp(4294967295,"y")}));n(63)("split",2,(function(t,e,n,c){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var r=String(this);if(void 0===t&&0===e)return[];if(!i(t))return n.call(r,t,e);for(var o,a,s,l=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,f=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,c+"g");(o=u.call(d,r))&&!((a=d.lastIndex)>h&&(l.push(r.slice(h,o.index)),o.length>1&&o.index=f));)d.lastIndex===o.index&&d.lastIndex++;return h===r.length?!s&&d.test("")||l.push(""):l.push(r.slice(h)),l.length>f?l.slice(0,f):l}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,i){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r,i):d.call(String(r),n,i)},function(t,e){var i=c(d,t,this,e,d!==n);if(i.done)return i.value;var u=r(t),p=String(this),m=o(u,RegExp),g=u.unicode,y=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(f?"y":"g"),v=new m(f?u:"^(?:"+u.source+")",y),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===p.length)return null===l(v,p)?[p]:[];for(var x=0,b=0,w=[];bo;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&D(t)}))}},D=function(t){y.call(l,(function(){var e,n,i,r=t._v,o=B(t);if(o&&(e=x((function(){C?S.emit("unhandledRejection",r,t):(n=l.onunhandledrejection)?n({promise:t,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)})),t._h=C||B(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},B=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){y.call(l,(function(){var e;C?S.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})}))},O=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw E("Promise can't be resolved itself");(e=M(t))?v((function(){var i={_w:n,_d:!1};try{e.call(t,u(F,i,1),u(O,i,1))}catch(t){O.call(i,t)}})):(n._v=t,n._s=1,L(n,!1))}catch(t){O.call({_w:n,_d:!1},t)}}};I||(k=function(t){d(this,k,"Promise","_h"),f(t),i.call(this);try{t(u(F,this,1),u(O,this,1))}catch(t){O.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(43)(k.prototype,{then:function(t,e){var n=z(g(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=C?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new i;this.promise=t,this.resolve=u(F,t,1),this.reject=u(O,t,1)},_.f=z=function(t){return t===k||t===a?new o(t):r(t)}),h(h.G+h.W+h.F*!I,{Promise:k}),n(45)(k,"Promise"),n(40)("Promise"),a=n(19).Promise,h(h.S+h.F*!I,"Promise",{reject:function(t){var e=z(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(s||!I),"Promise",{resolve:function(t){return w(s&&this===a?k:this,t)}}),h(h.S+h.F*!(I&&n(61)((function(t){k.all(t).catch(P)}))),"Promise",{all:function(t){var e=this,n=z(e),i=n.resolve,r=n.reject,o=x((function(){var n=[],o=0,a=1;m(t,!1,(function(t){var s=o++,l=!1;n.push(void 0),a++,e.resolve(t).then((function(t){l||(l=!0,n[s]=t,--a||i(n))}),r)})),--a||i(n)}));return o.e&&r(o.v),n.promise},race:function(t){var e=this,n=z(e),i=n.reject,r=x((function(){m(t,!1,(function(t){e.resolve(t).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},function(t,e,n){"use strict";var i=n(126),r=n(44);n(65)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return i.def(r(this,"WeakSet"),t,!0)}},i,!1,!0)},function(t,e,n){"use strict";var i=n(0),r=n(66),o=n(96),a=n(1),s=n(37),l=n(6),u=n(4),c=n(2).ArrayBuffer,h=n(53),p=o.ArrayBuffer,f=o.DataView,d=r.ABV&&c.isView,m=p.prototype.slice,g=r.VIEW;i(i.G+i.W+i.F*(c!==p),{ArrayBuffer:p}),i(i.S+i.F*!r.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||u(t)&&g in t}}),i(i.P+i.U+i.F*n(3)((function(){return!new p(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(a(this),t);for(var n=a(this).byteLength,i=s(t,n),r=s(void 0===e?n:e,n),o=new(h(this,p))(l(r-i)),u=new f(this),c=new f(o),d=0;i=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),i(i.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var i=n(17),r=n(18),o=n(15),a=n(0),s=n(4),l=n(1);a(a.S,"Reflect",{get:function t(e,n){var a,u,c=arguments.length<3?e:arguments[2];return l(e)===c?e[n]:(a=i.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(c):void 0:s(u=r(e))?t(u,n,c):void 0}})},function(t,e,n){var i=n(17),r=n(0),o=n(1);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return i.f(o(t),e)}})},function(t,e,n){var i=n(0),r=n(18),o=n(1);i(i.S,"Reflect",{getPrototypeOf:function(t){return r(o(t))}})},function(t,e,n){var i=n(0);i(i.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var i=n(0),r=n(1),o=Object.isExtensible;i(i.S,"Reflect",{isExtensible:function(t){return r(t),!o||o(t)}})},function(t,e,n){var i=n(0);i(i.S,"Reflect",{ownKeys:n(128)})},function(t,e,n){var i=n(0),r=n(1),o=Object.preventExtensions;i(i.S,"Reflect",{preventExtensions:function(t){r(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var i=n(8),r=n(17),o=n(18),a=n(15),s=n(0),l=n(34),u=n(1),c=n(4);s(s.S,"Reflect",{set:function t(e,n,s){var h,p,f=arguments.length<4?e:arguments[3],d=r.f(u(e),n);if(!d){if(c(p=o(e)))return t(p,n,s,f);d=l(0)}if(a(d,"value")){if(!1===d.writable||!c(f))return!1;if(h=r.f(f,n)){if(h.get||h.set||!1===h.writable)return!1;h.value=s,i.f(f,n,h)}else i.f(f,n,l(0,s));return!0}return void 0!==d.set&&(d.set.call(f,s),!0)}})},function(t,e,n){var i=n(0),r=n(75);r&&i(i.S,"Reflect",{setPrototypeOf:function(t,e){r.check(t,e);try{return r.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var i=n(0),r=n(56)(!0);i(i.P,"Array",{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(33)("includes")},function(t,e,n){"use strict";var i=n(0),r=n(129),o=n(9),a=n(6),s=n(11),l=n(88);i(i.P,"Array",{flatMap:function(t){var e,n,i=o(this);return s(t),e=a(i.length),n=l(i,0),r(n,i,i,e,0,1,t,arguments[1]),n}}),n(33)("flatMap")},function(t,e,n){"use strict";var i=n(0),r=n(129),o=n(9),a=n(6),s=n(22),l=n(88);i(i.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),i=l(e,0);return r(i,e,e,n,0,void 0===t?1:s(t)),i}}),n(33)("flatten")},function(t,e,n){"use strict";var i=n(0),r=n(59)(!0);i(i.P,"String",{at:function(t){return r(this,t)}})},function(t,e,n){"use strict";var i=n(0),r=n(130),o=n(64),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);i(i.P+i.F*a,"String",{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var i=n(0),r=n(130),o=n(64),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);i(i.P+i.F*a,"String",{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(47)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){"use strict";n(47)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){"use strict";var i=n(0),r=n(26),o=n(6),a=n(60),s=n(52),l=RegExp.prototype,u=function(t,e){this._r=t,this._s=e};n(82)(u,"RegExp String",(function(){var t=this._r.exec(this._s);return{value:t,done:null===t}})),i(i.P,"String",{matchAll:function(t){if(r(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in l?String(t.flags):s.call(t),i=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return i.lastIndex=o(t.lastIndex),new u(i,e)}})},function(t,e,n){n(71)("asyncIterator")},function(t,e,n){n(71)("observable")},function(t,e,n){var i=n(0),r=n(128),o=n(16),a=n(17),s=n(86);i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),l=a.f,u=r(i),c={},h=0;u.length>h;)void 0!==(n=l(i,e=u[h++]))&&s(c,e,n);return c}})},function(t,e,n){var i=n(0),r=n(131)(!1);i(i.S,"Object",{values:function(t){return r(t)}})},function(t,e,n){var i=n(0),r=n(131)(!0);i(i.S,"Object",{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(11),a=n(8);n(7)&&i(i.P+n(67),"Object",{__defineGetter__:function(t,e){a.f(r(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(11),a=n(8);n(7)&&i(i.P+n(67),"Object",{__defineSetter__:function(t,e){a.f(r(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(25),a=n(18),s=n(17).f;n(7)&&i(i.P+n(67),"Object",{__lookupGetter__:function(t){var e,n=r(this),i=o(t,!0);do{if(e=s(n,i))return e.get}while(n=a(n))}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(25),a=n(18),s=n(17).f;n(7)&&i(i.P+n(67),"Object",{__lookupSetter__:function(t){var e,n=r(this),i=o(t,!0);do{if(e=s(n,i))return e.set}while(n=a(n))}})},function(t,e,n){var i=n(0);i(i.P+i.R,"Map",{toJSON:n(132)("Map")})},function(t,e,n){var i=n(0);i(i.P+i.R,"Set",{toJSON:n(132)("Set")})},function(t,e,n){n(68)("Map")},function(t,e,n){n(68)("Set")},function(t,e,n){n(68)("WeakMap")},function(t,e,n){n(68)("WeakSet")},function(t,e,n){n(69)("Map")},function(t,e,n){n(69)("Set")},function(t,e,n){n(69)("WeakMap")},function(t,e,n){n(69)("WeakSet")},function(t,e,n){var i=n(0);i(i.G,{global:n(2)})},function(t,e,n){var i=n(0);i(i.S,"System",{global:n(2)})},function(t,e,n){var i=n(0),r=n(21);i(i.S,"Error",{isError:function(t){return"Error"===r(t)}})},function(t,e,n){var i=n(0);i(i.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var i=n(0);i(i.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var i=n(0),r=180/Math.PI;i(i.S,"Math",{degrees:function(t){return t*r}})},function(t,e,n){var i=n(0),r=n(134),o=n(113);i(i.S,"Math",{fscale:function(t,e,n,i,a){return o(r(t,e,n,i,a))}})},function(t,e,n){var i=n(0);i(i.S,"Math",{iaddh:function(t,e,n,i){var r=t>>>0,o=n>>>0;return(e>>>0)+(i>>>0)+((r&o|(r|o)&~(r+o>>>0))>>>31)|0}})},function(t,e,n){var i=n(0);i(i.S,"Math",{isubh:function(t,e,n,i){var r=t>>>0,o=n>>>0;return(e>>>0)-(i>>>0)-((~r&o|~(r^o)&r-o>>>0)>>>31)|0}})},function(t,e,n){var i=n(0);i(i.S,"Math",{imulh:function(t,e){var n=+t,i=+e,r=65535&n,o=65535&i,a=n>>16,s=i>>16,l=(a*o>>>0)+(r*o>>>16);return a*s+(l>>16)+((r*s>>>0)+(65535&l)>>16)}})},function(t,e,n){var i=n(0);i(i.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var i=n(0),r=Math.PI/180;i(i.S,"Math",{radians:function(t){return t*r}})},function(t,e,n){var i=n(0);i(i.S,"Math",{scale:n(134)})},function(t,e,n){var i=n(0);i(i.S,"Math",{umulh:function(t,e){var n=+t,i=+e,r=65535&n,o=65535&i,a=n>>>16,s=i>>>16,l=(a*o>>>0)+(r*o>>>16);return a*s+(l>>>16)+((r*s>>>0)+(65535&l)>>>16)}})},function(t,e,n){var i=n(0);i(i.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var i=n(0),r=n(19),o=n(2),a=n(53),s=n(121);i(i.P+i.R,"Promise",{finally:function(t){var e=a(this,r.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var i=n(0),r=n(95),o=n(120);i(i.S,"Promise",{try:function(t){var e=r.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var i=n(30),r=n(1),o=i.key,a=i.set;i.exp({defineMetadata:function(t,e,n,i){a(t,e,r(n),o(i))}})},function(t,e,n){var i=n(30),r=n(1),o=i.key,a=i.map,s=i.store;i.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),i=a(r(e),n,!1);if(void 0===i||!i.delete(t))return!1;if(i.size)return!0;var l=s.get(e);return l.delete(n),!!l.size||s.delete(e)}})},function(t,e,n){var i=n(30),r=n(1),o=n(18),a=i.has,s=i.get,l=i.key,u=function(t,e,n){if(a(t,e,n))return s(t,e,n);var i=o(e);return null!==i?u(t,i,n):void 0};i.exp({getMetadata:function(t,e){return u(t,r(e),arguments.length<3?void 0:l(arguments[2]))}})},function(t,e,n){var i=n(124),r=n(133),o=n(30),a=n(1),s=n(18),l=o.keys,u=o.key,c=function(t,e){var n=l(t,e),o=s(t);if(null===o)return n;var a=c(o,e);return a.length?n.length?r(new i(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return c(a(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,e,n){var i=n(30),r=n(1),o=i.get,a=i.key;i.exp({getOwnMetadata:function(t,e){return o(t,r(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var i=n(30),r=n(1),o=i.keys,a=i.key;i.exp({getOwnMetadataKeys:function(t){return o(r(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var i=n(30),r=n(1),o=n(18),a=i.has,s=i.key,l=function(t,e,n){if(a(t,e,n))return!0;var i=o(e);return null!==i&&l(t,i,n)};i.exp({hasMetadata:function(t,e){return l(t,r(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var i=n(30),r=n(1),o=i.has,a=i.key;i.exp({hasOwnMetadata:function(t,e){return o(t,r(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var i=n(30),r=n(1),o=n(11),a=i.key,s=i.set;i.exp({metadata:function(t,e){return function(n,i){s(t,e,(void 0!==i?r:o)(n),a(i))}}})},function(t,e,n){var i=n(0),r=n(94)(),o=n(2).process,a="process"==n(21)(o);i(i.G,{asap:function(t){var e=a&&o.domain;r(e?e.bind(t):t)}})},function(t,e,n){"use strict";var i=n(0),r=n(2),o=n(19),a=n(94)(),s=n(5)("observable"),l=n(11),u=n(1),c=n(41),h=n(43),p=n(12),f=n(42),d=f.RETURN,m=function(t){return null==t?void 0:l(t)},g=function(t){var e=t._c;e&&(t._c=void 0,e())},y=function(t){return void 0===t._o},v=function(t){y(t)||(t._o=void 0,g(t))},_=function(t,e){u(t),this._c=void 0,this._o=t,t=new x(this);try{var n=e(t),i=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){i.unsubscribe()}:l(n),this._c=n)}catch(e){return void t.error(e)}y(this)&&g(this)};_.prototype=h({},{unsubscribe:function(){v(this)}});var x=function(t){this._s=t};x.prototype=h({},{next:function(t){var e=this._s;if(!y(e)){var n=e._o;try{var i=m(n.next);if(i)return i.call(n,t)}catch(t){try{v(e)}finally{throw t}}}},error:function(t){var e=this._s;if(y(e))throw t;var n=e._o;e._o=void 0;try{var i=m(n.error);if(!i)throw t;t=i.call(n,t)}catch(t){try{g(e)}finally{throw t}}return g(e),t},complete:function(t){var e=this._s;if(!y(e)){var n=e._o;e._o=void 0;try{var i=m(n.complete);t=i?i.call(n,t):void 0}catch(t){try{g(e)}finally{throw t}}return g(e),t}}});var b=function(t){c(this,b,"Observable","_f")._f=l(t)};h(b.prototype,{subscribe:function(t){return new _(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||r.Promise)((function(n,i){l(t);var r=e.subscribe({next:function(e){try{return t(e)}catch(t){i(t),r.unsubscribe()}},error:i,complete:n})}))}}),h(b,{from:function(t){var e="function"==typeof this?this:b,n=m(u(t)[s]);if(n){var i=u(n.call(t));return i.constructor===e?i:new e((function(t){return i.subscribe(t)}))}return new e((function(e){var n=!1;return a((function(){if(!n){try{if(f(t,!1,(function(t){if(e.next(t),n)return d}))===d)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}})),function(){n=!0}}))},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t2,r=!!i&&a.call(arguments,2);return t(i?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,n)}};r(r.G+r.B+r.F*s,{setTimeout:l(i.setTimeout),setInterval:l(i.setInterval)})},function(t,e,n){var i=n(0),r=n(93);i(i.G+i.B,{setImmediate:r.set,clearImmediate:r.clear})},function(t,e,n){for(var i=n(90),r=n(36),o=n(13),a=n(2),s=n(12),l=n(48),u=n(5),c=u("iterator"),h=u("toStringTag"),p=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=r(f),m=0;m=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;P(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:I(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=n),m}}}function x(t,e,n,i){var r=e&&e.prototype instanceof w?e:w,o=Object.create(r.prototype),a=new z(i||[]);return o._invoke=function(t,e,n){var i=h;return function(r,o){if(i===f)throw new Error("Generator is already running");if(i===d){if("throw"===r)throw o;return M()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var l=b(t,e,n);if("normal"===l.type){if(i=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=d,n.method="throw",n.arg=l.arg)}}}(t,n,a),o}function b(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function E(){}function S(){}function T(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function A(t){function n(e,i,o,a){var s=b(t[e],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):Promise.resolve(u).then((function(t){l.value=t,o(l)}),a)}a(s.arg)}var i;"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n)),this._invoke=function(t,e){function r(){return new Promise((function(i,r){n(t,e,i,r)}))}return i=i?i.then(r,r):r()}}function k(t,e){var i=t.iterator[e.method];if(i===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=b(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,m;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function I(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function e(){for(;++iz.length&&z.push(t)}function L(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?"."+D(e,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(e))for(var u=0;u(i=1))return i;for(;no?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}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[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=n*this.x+e*this.y;return this.x=e*this.x-n*this.y,this.y=i,this},_rotateAround:function(t,e){var n=Math.cos(t),i=Math.sin(t),r=e.y+i*(this.x-e.x)+n*(this.y-e.y);return this.x=e.x+n*(this.x-e.x)-i*(this.y-e.y),this.y=r,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 a="undefined"!=typeof self?self:{};function s(t,e,i,r){var o=new n(t,e,i,r);return function(t){return o.solve(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 h(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,r=e;i>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,n){var i={};for(var r in t)i[r]=e.call(n||this,t[r],r,t);return i}function _(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?v(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 S(t){for(var e=0,n=0,i=t.length,r=i-1,o=void 0,a=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\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}var k=null;function C(t){if(null==k){var e=t.navigator?t.navigator.userAgent:null;k=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return k}function P(t){try{var e=a[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var z,I,M,L,D=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),B=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,R=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,O={now:D,frame:function(t){var e=B(t);return{cancel:function(){return R(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var n=a.document.createElement("canvas"),i=n.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return n.width=t.width,n.height=t.height,i.drawImage(t,0,0,t.width,t.height),i.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return z||(z=a.document.createElement("a")),z.href=t,z.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return!!a.matchMedia&&(null==I&&(I=a.matchMedia("(prefers-reduced-motion: reduce)")),I.matches)}},F={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},N={supported:!1,testSupport:function(t){!U&&L&&(V?j(t):M=t)}},U=!1,V=!1;function j(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,L),t.isContextLost())return;N.supported=!0}catch(t){}t.deleteTexture(e),U=!0}a.document&&((L=a.document.createElement("img")).onload=function(){M&&j(M),M=null,V=!0},L.onerror=function(){U=!0,M=null},L.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Z="01",q=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function W(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Z,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!W(t))return t;var n=X(t);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!W(t))return t;var n=X(t);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!W(t))return t;var n=X(t);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,n,i){var r=X(t);return W(t)?(r.path="/styles/v1"+r.path+"/sprite"+e+n,this._makeAPIURL(r,this._customAccessToken||i)):(r.path+=""+e+n,Y(r))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!W(t))return t;var n=X(t);n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,(O.devicePixelRatio>=2||512===e?"@2x":"")+(N.supported?".webp":"$1")),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path;var i=this._customAccessToken||function(t){for(var e=0,n=t;e=1&&a.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,n,i){var r=this;if(F.EVENTS_URL){var o=X(F.EVENTS_URL);o.params.push("access_token="+(i||F.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.11.0",skuId:Z,userId:this.anonId},s=e?h(a,e):a,l={url:Y(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=xt(l,(function(t){r.pendingRequest=null,n(t),r.saveEventData(),r.processRequests(i)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var $,tt,et=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(t,e,n,i){this.skuToken=n,(F.EVENTS_URL&&i||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return W(t)||H(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},i)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),i=n.id,r=n.timestamp;i&&this.success[i]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=d()),this.postEvent(r,{skuToken:this.skuToken},(function(t){t||i&&(e.success[i]=!0)}),t))}},e}(Q),nt=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return W(t)||H(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=J(F.ACCESS_TOKEN),i=n?n.u:F.ACCESS_TOKEN,r=i!==this.eventData.tokenU;m(this.anonId)||(this.anonId=d(),r=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;r=r||l>=1||l<-1||a.getDate()!==s.getDate()}else r=!0;if(!r)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=i)}),t)}},e}(Q)),it=nt.postTurnstileEvent.bind(nt),rt=new et,ot=rt.postMapLoadEvent.bind(rt),at=500,st=50;function lt(){a.caches&&!$&&($=a.caches.open("mapbox-tiles"))}function ut(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var ct,ht=1/0;function pt(){return null==ct&&(ct=a.OffscreenCanvas&&new a.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof a.createImageBitmap),ct}var ft={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ft);var dt,mt,gt=function(t){function e(e,n,i){401===n&&H(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)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),yt=T()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===a.location.protocol?a.parent:a).location.href},vt=function(t,e){if(!(/^file:/.test(n=t.url)||/^file:/.test(yt())&&!/^\w+:/.test(n))){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return function(t,e){var n,i=new a.AbortController,r=new a.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:yt(),signal:i.signal}),o=!1,s=!1,l=(n=r.url).indexOf("sku=")>0&&H(n);"json"===t.type&&r.headers.set("Accept","application/json");var u=function(n,i,o){if(!s){if(n&&"SecurityError"!==n.message&&w(n),i&&o)return c(i);var u=Date.now();a.fetch(r).then((function(n){if(n.ok){var i=l?n.clone():null;return c(n,i,u)}return e(new gt(n.statusText,n.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(n,i,l){("arrayBuffer"===t.type?n.arrayBuffer():"json"===t.type?n.json():n.text()).then((function(t){s||(i&&l&&function(t,e,n){if(lt(),$){var i={status:e.status,statusText:e.statusText,headers:new a.Headers};e.headers.forEach((function(t,e){return i.headers.set(e,t)}));var r=A(e.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&i.headers.set("Expires",new Date(n+1e3*r["max-age"]).toUTCString()),new Date(i.headers.get("Expires")).getTime()-n<42e4||function(t,e){if(void 0===tt)try{new Response(new ReadableStream),tt=!0}catch(t){tt=!1}tt?e(t.body):t.blob().then(e)}(e,(function(e){var n=new a.Response(e,i);lt(),$&&$.then((function(e){return e.put(ut(t.url),n)})).catch((function(t){return w(t.message)}))})))}}(r,i,l),o=!0,e(null,t,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((function(t){s||e(new Error(t.message))}))};return l?function(t,e){if(lt(),!$)return e(null);var n=ut(t.url);$.then((function(t){t.match(n).then((function(i){var r=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),n=A(t.headers.get("Cache-Control")||"");return e>Date.now()&&!n["no-cache"]}(i);t.delete(n),r&&t.put(n,i.clone()),e(null,i,r)})).catch(e)})).catch(e)}(r,u):u(null,null),{cancel:function(){s=!0,o||i.abort()}}}(t,e);if(T()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var n;return function(t,e){var n=new a.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.responseType="text",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 gt(n.statusText,n.status,t.url))},n.send(t.body),{cancel:function(){return n.abort()}}}(t,e)},_t=function(t,e){return vt(h(t,{type:"arrayBuffer"}),e)},xt=function(t,e){return vt(h(t,{method:"POST"}),e)};dt=[],mt=0;var bt=function(t,e){if(N.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),mt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return dt.push(n),n}mt++;var i=!1,r=function(){if(!i)for(i=!0,mt--;dt.length&&mt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},At.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var kt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{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"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Ct=function(t,e,n,i){this.message=(t?t+": ":"")+n,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.value;return e?[new Ct(t.key,e,"constants have been deprecated as of v8")]:[]}function zt(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,r=e;i":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Ht=[Bt,Rt,Ot,Ft,Nt,Zt,Ut,Wt(Vt),qt];function Kt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Kt(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=Ht;n255?255:t}function r(t){return i("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function a(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,s=t.replace(/ /g,"").toLowerCase();if(s in n)return n[s].slice();if("#"===s[0])return 4===s.length?(e=parseInt(s.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===s.length&&(e=parseInt(s.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),h=s.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=o(h.pop());case"rgb":return 3!==h.length?null:[r(h[0]),r(h[1]),r(h[2]),p];case"hsla":if(4!==h.length)return null;p=o(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),m=o(h[2]),g=m<=.5?m*(d+1):m+d-m*d,y=2*m-g;return[i(255*a(y,g,f+1/3)),i(255*a(y,g,f)),i(255*a(y,g,f-1/3)),p];default:return null}}return null}}catch(t){}})).parseCSSColor,Qt=function(t,e,n,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=n,this.a=i};Qt.parse=function(t){if(t){if(t instanceof Qt)return t;if("string"==typeof t){var e=Jt(t);if(e)return new Qt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Qt.prototype.toString=function(){var t=this.toArray(),e=t[1],n=t[2],i=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(n)+","+i+")"},Qt.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},Qt.black=new Qt(0,0,0,1),Qt.white=new Qt(1,1,1,1),Qt.transparent=new Qt(0,0,0,0),Qt.red=new Qt(1,0,0,1);var $t=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"})};$t.prototype.compare=function(t,e){return this.collator.compare(t,e)},$t.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var te=function(t,e,n,i,r){this.text=t,this.image=e,this.scale=n,this.fontStack=i,this.textColor=r},ee=function(t){this.sections=t};ee.fromString=function(t){return new ee([new te(t,null,null,null,null)])},ee.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ee.factory=function(t){return t instanceof ee?t:ee.fromString(t)},ee.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},ee.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e=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 re(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Qt)return!0;if(t instanceof $t)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(Array.isArray(t)){for(var e=0,n=t;e2){var s=t[1];if("string"!=typeof s||!(s in ue)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=ue[s],i++}else o=Vt;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=Wt(o,a)}else n=ue[r];for(var l=[];i1)&&e.push(i)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var he=function(t){this.type=Zt,this.sections=t};he.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return e.error("First argument must be an image or text section.");for(var i=[],r=!1,o=1;o<=t.length-1;++o){var a=t[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Rt)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,Wt(Ot))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Nt)))return null;var c=i[i.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=e.parse(t[o],1,Vt);if(!h)return null;var p=h.type.kind;if("string"!==p&&"value"!==p&&"null"!==p&&"resolvedImage"!==p)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,i.push({content:h,scale:null,font:null,textColor:null})}}return new he(i)},he.prototype.evaluate=function(t){return new ee(this.sections.map((function(e){var n=e.content.evaluate(t);return oe(n)===qt?new te("",n,null,null,null):new te(ae(n),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},he.prototype.eachChild=function(t){for(var e=0,n=this.sections;e-1),n},pe.prototype.eachChild=function(t){t(this.input)},pe.prototype.outputDefined=function(){return!1},pe.prototype.serialize=function(){return["image",this.input.serialize()]};var fe={"to-boolean":Ft,"to-color":Nt,"to-number":Rt,"to-string":Ot},de=function(t,e){this.type=t,this.args=e};de.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=fe[n],r=[],o=1;o4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ie(e[0],e[1],e[2],e[3])))return new Qt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new le(n||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=e[2]||t[1]<=e[1]||t[3]>=e[3])}function be(t,e){var n=(180+t[0])/360,i=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,r=Math.pow(2,e.z);return[Math.round(n*r*8192),Math.round(i*r*8192)]}function we(t,e,n){return e[1]>t[1]!=n[1]>t[1]&&t[0]<(n[0]-e[0])*(t[1]-e[1])/(n[1]-e[1])+e[0]}function Ee(t,e){for(var n,i,r,o,a,s,l,u=!1,c=0,h=e.length;c0&&s<0||a<0&&s>0}function Ae(t,e,n){for(var i=0,r=n;in[2]){var r=.5*i,o=t[0]-n[0]>r?-i:n[0]-t[0]>r?i:0;0===o&&(o=t[0]-n[2]>r?-i:n[2]-t[0]>r?i:0),t[0]+=o}_e(e,t)}function Me(t,e,n,i){for(var r=8192*Math.pow(2,i.z),o=[8192*i.x,8192*i.y],a=[],s=0,l=t;s=0)return!1;var n=!0;return t.eachChild((function(t){n&&!Oe(t,e)&&(n=!1)})),n}De.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(re(t[1])){var n=t[1];if("FeatureCollection"===n.type)for(var i=0;ie))throw new le("Input is not a number.");o=a-1}return 0}Ne.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)},Ne.prototype._parse=function(t,e){function n(t,e,n){return"assert"===n?new ce(e,[t]):"coerce"===n?new de(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&&"resolvedImage"!==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 se)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Fe)return t(e.boundExpression);if(e instanceof ye&&"error"===e.name)return!1;if(e instanceof ve)return!1;if(e instanceof De)return!1;var n=e instanceof de||e instanceof ce,i=!0;return e.eachChild((function(e){i=n?i&&t(e):i&&e instanceof se})),!!i&&Be(e)&&Oe(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new ge;try{o=new se(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 this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},Ne.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 Ne(this.registry,i,e||null,r,this.errors)},Ne.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 Lt(i,t))},Ne.prototype.checkSubtype=function(t,e){var n=Kt(t,e);return n&&this.error(n),n};var Ve=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,r=n;i=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,r);if(!c)return null;r=r||c.type,i.push([a,c])}return new Ve(r,n,i)},Ve.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[Ue(e,i)].evaluate(t)},Ve.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ze=Object.freeze({__proto__:null,number:je,color:function(t,e,n){return new Qt(je(t.r,e.r,n),je(t.g,e.g,n),je(t.b,e.b,n),je(t.a,e.a,n))},array:function(t,e,n){return t.map((function(t,i){return je(t,e[i],n)}))}}),qe=6/29*3*(6/29),We=Math.PI/180,Ge=180/Math.PI;function He(t){return t>.008856451679035631?Math.pow(t,1/3):t/qe+4/29}function Ke(t){return t>6/29?t*t*t:qe*(t-4/29)}function Xe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ye(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t){var e=Ye(t.r),n=Ye(t.g),i=Ye(t.b),r=He((.4124564*e+.3575761*n+.1804375*i)/.95047),o=He((.2126729*e+.7151522*n+.072175*i)/1);return{l:116*o-16,a:500*(r-o),b:200*(o-He((.0193339*e+.119192*n+.9503041*i)/1.08883)),alpha:t.a}}function Qe(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=1*Ke(e),n=.95047*Ke(n),i=1.08883*Ke(i),new Qt(Xe(3.2404542*n-1.5371385*e-.4985314*i),Xe(-.969266*n+1.8760108*e+.041556*i),Xe(.0556434*n-.2040259*e+1.0572252*i),t.alpha)}function $e(t,e,n){var i=e-t;return t+n*(i>180||i<-180?i-360*Math.round(i/360):i)}var tn={forward:Je,reverse:Qe,interpolate:function(t,e,n){return{l:je(t.l,e.l,n),a:je(t.a,e.a,n),b:je(t.b,e.b,n),alpha:je(t.alpha,e.alpha,n)}}},en={forward:function(t){var e=Je(t),n=e.l,i=e.a,r=e.b,o=Math.atan2(r,i)*Ge;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*We,n=t.c;return Qe({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:$e(t.h,e.h,n),c:je(t.c,e.c,n),l:je(t.l,e.l,n),alpha:je(t.alpha,e.alpha,n)}}},nn=Object.freeze({__proto__:null,lab:tn,hcl:en}),rn=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;o1})))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,Rt)))return null;var l=[],u=null;"interpolate-hcl"===n||"interpolate-lab"===n?u=Nt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(p,d,u);if(!m)return null;u=u||m.type,l.push([h,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new rn(u,n,i,r,l):e.error("Type "+Gt(u)+" is not interpolatable.")},rn.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=Ue(e,i),a=rn.interpolationFactor(this.interpolation,i,e[o],e[o+1]),s=n[o].evaluate(t),l=n[o+1].evaluate(t);return"interpolate"===this.operator?Ze[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?en.reverse(en.interpolate(en.forward(s),en.forward(l),a)):tn.reverse(tn.interpolate(tn.forward(s),tn.forward(l),a))},rn.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=n.length)throw new le("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new le("Array index must be an integer, but found "+e+" instead.");return n[e]},ln.prototype.eachChild=function(t){t(this.index),t(this.input)},ln.prototype.outputDefined=function(){return!1},ln.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var un=function(t,e){this.type=Ft,this.needle=t,this.haystack=e};un.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,Vt),i=e.parse(t[2],2,Vt);return n&&i?Xt(n.type,[Ft,Ot,Rt,Bt,Vt])?new un(n,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(n.type)+" instead"):null},un.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!Yt(e,["boolean","string","number","null"]))throw new le("Expected first argument to be of type boolean, string, number or null, but found "+Gt(oe(e))+" instead.");if(!Yt(n,["string","array"]))throw new le("Expected second argument to be of type array or string, but found "+Gt(oe(n))+" instead.");return n.indexOf(e)>=0},un.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},un.prototype.outputDefined=function(){return!0},un.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var cn=function(t,e,n){this.type=Rt,this.needle=t,this.haystack=e,this.fromIndex=n};cn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Vt);if(!n||!i)return null;if(!Xt(n.type,[Ft,Ot,Rt,Bt,Vt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(n.type)+" instead");if(4===t.length){var r=e.parse(t[3],3,Rt);return r?new cn(n,i,r):null}return new cn(n,i)},cn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Yt(e,["boolean","string","number","null"]))throw new le("Expected first argument to be of type boolean, string, number or null, but found "+Gt(oe(e))+" instead.");if(!Yt(n,["string","array"]))throw new le("Expected second argument to be of type array or string, but found "+Gt(oe(n))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(t);return n.indexOf(e,i)}return n.indexOf(e)},cn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var hn=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};hn.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;aNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,oe(p)))return null}else n=oe(p);if(void 0!==r[String(p)])return u.error("Branch labels must be unique.");r[String(p)]=o.length}var f=e.parse(l,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,Vt);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 hn(n,i,d,r,o,m):null},hn.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(oe(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},hn.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},hn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},hn.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],i={},r=0,o=Object.keys(this.cases).sort();r=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Rt);if(!n||!i)return null;if(!Xt(n.type,[Wt(Vt),Ot,Vt]))return e.error("Expected first argument to be of type array or string, but found "+Gt(n.type)+" instead");if(4===t.length){var r=e.parse(t[3],3,Rt);return r?new fn(n.type,n,i,r):null}return new fn(n.type,n,i)},fn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Yt(e,["string","array"]))throw new le("Expected first argument to be of type array or string, but found "+Gt(oe(e))+" instead.");if(this.endIndex){var i=this.endIndex.evaluate(t);return e.slice(n,i)}return e.slice(n)},fn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var yn=gn("==",(function(t,e,n){return e===n}),mn),vn=gn("!=",(function(t,e,n){return e!==n}),(function(t,e,n,i){return!mn(0,e,n,i)})),_n=gn("<",(function(t,e,n){return e",(function(t,e,n){return e>n}),(function(t,e,n,i){return i.compare(e,n)>0})),bn=gn("<=",(function(t,e,n){return e<=n}),(function(t,e,n,i){return i.compare(e,n)<=0})),wn=gn(">=",(function(t,e,n){return e>=n}),(function(t,e,n,i){return i.compare(e,n)>=0})),En=function(t,e,n,i,r){this.type=Ot,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=r};En.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var n=e.parse(t[1],1,Rt);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,Ot)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,Ot)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,Rt)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,Rt))?null:new En(n,r,o,a,s)},En.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))},En.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)},En.prototype.outputDefined=function(){return!1},En.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 Sn=function(t){this.type=Rt,this.input=t};Sn.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 "+Gt(n.type)+" instead."):new Sn(n):null},Sn.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 le("Expected value to be of type string or array, but found "+Gt(oe(e))+" instead.")},Sn.prototype.eachChild=function(t){t(this.input)},Sn.prototype.outputDefined=function(){return!1},Sn.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Tn={"==":yn,"!=":vn,">":xn,"<":_n,">=":wn,"<=":bn,array:ce,at:ln,boolean:ce,case:pn,coalesce:an,collator:ve,format:he,image:pe,in:un,"index-of":cn,interpolate:rn,"interpolate-hcl":rn,"interpolate-lab":rn,length:Sn,let:sn,literal:se,match:hn,number:ce,"number-format":En,object:ce,slice:fn,step:Ve,string:ce,"to-boolean":de,"to-color":de,"to-number":de,"to-string":de,var:Fe,within:De};function An(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=ie(n,i,r,a);if(s)throw new le(s);return new Qt(n/255*a,i/255*a,r/255*a,a)}function kn(t,e){return t in e}function Cn(t,e){var n=e[t];return void 0===n?null:n}function Pn(t){return{type:t}}function zn(t){return{result:"success",value:t}}function In(t){return{result:"error",value:t}}function Mn(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ln(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Dn(t){return!!t.expression&&t.expression.interpolated}function Bn(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Rn(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function On(t){return t}function Fn(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function Nn(t,e,n,i,r){return Fn(typeof n===r?i[n]:void 0,t.default,e.default)}function Un(t,e,n){if("number"!==Bn(n))return Fn(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=Ue(t.stops.map((function(t){return t[0]})),n);return t.stops[r][1]}function Vn(t,e,n){var i=void 0!==t.base?t.base:1;if("number"!==Bn(n))return Fn(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=Ue(t.stops.map((function(t){return t[0]})),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=Ze[e.type]||On;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=nn[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 jn(t,e,n){return"color"===e.type?n=Qt.parse(n):"formatted"===e.type?n=ee.fromString(n.toString()):"resolvedImage"===e.type?n=ne.fromString(n.toString()):Bn(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),Fn(n,t.default,e.default)}ye.register(Tn,{error:[{kind:"error"},[Ot],function(t,e){throw new le(e[0].evaluate(t))}],typeof:[Ot,[Vt],function(t,e){return Gt(oe(e[0].evaluate(t)))}],"to-rgba":[Wt(Rt,4),[Nt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Nt,[Rt,Rt,Rt],An],rgba:[Nt,[Rt,Rt,Rt,Rt],An],has:{type:Ft,overloads:[[[Ot],function(t,e){return kn(e[0].evaluate(t),t.properties())}],[[Ot,Ut],function(t,e){var n=e[1];return kn(e[0].evaluate(t),n.evaluate(t))}]]},get:{type:Vt,overloads:[[[Ot],function(t,e){return Cn(e[0].evaluate(t),t.properties())}],[[Ot,Ut],function(t,e){var n=e[1];return Cn(e[0].evaluate(t),n.evaluate(t))}]]},"feature-state":[Vt,[Ot],function(t,e){return Cn(e[0].evaluate(t),t.featureState||{})}],properties:[Ut,[],function(t){return t.properties()}],"geometry-type":[Ot,[],function(t){return t.geometryType()}],id:[Vt,[],function(t){return t.id()}],zoom:[Rt,[],function(t){return t.globals.zoom}],"heatmap-density":[Rt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Rt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Vt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Rt,Pn(Rt),function(t,e){for(var n=0,i=0,r=e;i":[Ft,[Ot,Vt],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->":[Ft,[Vt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i>r}],"filter-<=":[Ft,[Ot,Vt],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-<=":[Ft,[Vt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i<=r}],"filter->=":[Ft,[Ot,Vt],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->=":[Ft,[Vt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&i>=r}],"filter-has":[Ft,[Vt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ft,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ft,[Wt(Ot)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ft,[Wt(Vt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ft,[Ot,Wt(Vt)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[Ft,[Ot,Wt(Vt)],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:Ft,overloads:[[[Ft,Ft],function(t,e){var n=e[1];return e[0].evaluate(t)&&n.evaluate(t)}],[Pn(Ft),function(t,e){for(var n=0,i=e;n0&&"string"==typeof t[0]&&t[0]in Tn}function Wn(t,e){var n=new Ne(Tn,[],e?function(t){var e={color:Nt,string:Ot,number:Rt,enum:Ot,boolean:Ft,formatted:Zt,resolvedImage:qt};return"array"===t.type?Wt(e[t.value]||Vt,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?zn(new Zn(i,e)):In(n.errors)}Zn.prototype.evaluateWithoutErrorHandling=function(t,e,n,i,r,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=i,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Zn.prototype.evaluate=function(t,e,n,i,r,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new le("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Gn=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Re(e.expression)};Gn.prototype.evaluateWithoutErrorHandling=function(t,e,n,i,r,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,i,r,o)},Gn.prototype.evaluate=function(t,e,n,i,r,o){return this._styleExpression.evaluate(t,e,n,i,r,o)};var Hn=function(t,e,n,i){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Re(e.expression),this.interpolationType=i};function Kn(t,e){if("error"===(t=Wn(t,e)).result)return t;var n=t.value.expression,i=Be(n);if(!i&&!Mn(e))return In([new Lt("","data expressions not supported")]);var r=Oe(n,["zoom"]);if(!r&&!Ln(e))return In([new Lt("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof sn)n=t(e.result);else if(e instanceof an)for(var i=0,r=e.args;ii.maximum?[new Ct(e,n,n+" is greater than the maximum value "+i.maximum)]:[]}function $n(t){var e,n,i,r=t.valueSpec,o=It(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Bn(t.value.stops)&&"array"===Bn(t.value.stops[0])&&"object"===Bn(t.value.stops[0][0]),c=Yn({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 Ct(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;return e=e.concat(Jn({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===Bn(n)&&0===n.length&&e.push(new Ct(t.key,n,"array must have at least one stop")),e},default:function(t){return bi({key:t.key,value:t.value,valueSpec:r,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Ct(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Ct(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Dn(t.valueSpec)&&c.push(new Ct(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Mn(t.valueSpec)?c.push(new Ct(t.key,t.value,"property functions not supported")):s&&!Ln(t.valueSpec)&&c.push(new Ct(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new Ct(t.key,t.value,'"property" property is required')),c;function h(t){var e=[],o=t.value,s=t.key;if("array"!==Bn(o))return[new Ct(s,o,"array expected, "+Bn(o)+" found")];if(2!==o.length)return[new Ct(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Bn(o[0]))return[new Ct(s,o,"object expected, "+Bn(o[0])+" found")];if(void 0===o[0].zoom)return[new Ct(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Ct(s,o,"object stop key must have value")];if(i&&i>It(o[0].zoom))return[new Ct(s,o[0].zoom,"stop zoom values must appear in ascending order")];It(o[0].zoom)!==i&&(i=It(o[0].zoom),n=void 0,a={}),e=e.concat(Yn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Qn,value:p}}))}else e=e.concat(p({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return qn(Mt(o[1]))?e.concat([new Ct(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(bi({key:s+"[1]",value:o[1],valueSpec:r,style:t.style,styleSpec:t.styleSpec}))}function p(t,i){var s=Bn(t.value),l=It(t.value),u=null!==t.value?t.value:i;if(e){if(s!==e)return[new Ct(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 Ct(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 Mn(r)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ct(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function ai(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?si(t[1],t[2],"=="):"!="===n?ci(si(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?si(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(ai))):"all"===n?["all"].concat(t.slice(1).map(ai)):"none"===n?["all"].concat(t.slice(1).map(ai).map(ci)):"in"===n?li(t[1],t.slice(2)):"!in"===n?ci(li(t[1],t.slice(2))):"has"===n?ui(t[1]):"!has"===n?ci(ui(t[1])):"within"!==n||t}function si(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 li(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(oi)]]:["filter-in-small",t,["literal",e]]}}function ui(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function ci(t){return["!",t]}function hi(t){return ni(Mt(t.value))?ti(zt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value,i=e.key;if("array"!==Bn(n))return[new Ct(i,n,"array expected, "+Bn(n)+" found")];var r,o=e.styleSpec,a=[];if(n.length<1)return[new Ct(i,n,"filter array must have at least 1 element")];switch(a=a.concat(ei({key:i+"[0]",value:n[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),It(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===It(n[1])&&a.push(new Ct(i,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new Ct(i,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(r=Bn(n[1]))&&a.push(new Ct(i+"[1]",n[1],"string expected, "+r+" found"));for(var s=2;s=c[f+0]&&i>=c[f+1])?(a[p]=!0,o.push(u[p])):a[p]=!1}}},Mi.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),h=this._convertToCellCoord(i),p=l;p<=c;p++)for(var f=u;f<=h;f++){var d=this.d*f+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(f),this._convertFromCellCoord(p+1),this._convertFromCellCoord(f+1)))&&r.call(this,t,e,n,i,d,o,a,s))return}},Mi.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Mi.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Mi.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,n=0,i=0;i=0)){var c=t[u];l[u]=Bi[s].shallow.indexOf(u)>=0?c:Ui(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof t)}function Vi(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||Fi(t)||Ni(t)||ArrayBuffer.isView(t)||t instanceof Li)return t;if(Array.isArray(t))return t.map(Vi);if("object"==typeof t){var e=t.$name||"Object",n=Bi[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=0?s:Vi(s)}}return i}throw new Error("can't deserialize object of type "+typeof t)}var ji=function(){this.first=!0};ji.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=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 qi(t){for(var e=0,n=t;e=65097&&t<=65103)||Zi["CJK Compatibility Ideographs"](t)||Zi["CJK Compatibility"](t)||Zi["CJK Radicals Supplement"](t)||Zi["CJK Strokes"](t)||!(!Zi["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Zi["CJK Unified Ideographs Extension A"](t)||Zi["CJK Unified Ideographs"](t)||Zi["Enclosed CJK Letters and Months"](t)||Zi["Hangul Compatibility Jamo"](t)||Zi["Hangul Jamo Extended-A"](t)||Zi["Hangul Jamo Extended-B"](t)||Zi["Hangul Jamo"](t)||Zi["Hangul Syllables"](t)||Zi.Hiragana(t)||Zi["Ideographic Description Characters"](t)||Zi.Kanbun(t)||Zi["Kangxi Radicals"](t)||Zi["Katakana Phonetic Extensions"](t)||Zi.Katakana(t)&&12540!==t||!(!Zi["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)||!(!Zi["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Zi["Unified Canadian Aboriginal Syllabics"](t)||Zi["Unified Canadian Aboriginal Syllabics Extended"](t)||Zi["Vertical Forms"](t)||Zi["Yijing Hexagram Symbols"](t)||Zi["Yi Syllables"](t)||Zi["Yi Radicals"](t))))}function Gi(t){return!(Wi(t)||function(t){return!!(Zi["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Zi["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)||Zi["Letterlike Symbols"](t)||Zi["Number Forms"](t)||Zi["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)||Zi["Control Pictures"](t)&&9251!==t||Zi["Optical Character Recognition"](t)||Zi["Enclosed Alphanumerics"](t)||Zi["Geometric Shapes"](t)||Zi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Zi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Zi["CJK Symbols and Punctuation"](t)||Zi.Katakana(t)||Zi["Private Use Area"](t)||Zi["CJK Compatibility Forms"](t)||Zi["Small Form Variants"](t)||Zi["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 Hi(t){return t>=1424&&t<=2303||Zi["Arabic Presentation Forms-A"](t)||Zi["Arabic Presentation Forms-B"](t)}function Ki(t,e){return!(!e&&Hi(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Zi.Khmer(t))}function Xi(t){for(var e=0,n=t;e-1&&(Ji="error"),Yi&&Yi(t)};function tr(){er.fire(new St("pluginStateChange",{pluginStatus:Ji,pluginURL:Qi}))}var er=new At,nr=function(){return Ji},ir=function(){if("deferred"!==Ji||!Qi)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ji="loading",tr(),Qi&&_t({url:Qi},(function(t){t?$i(t):(Ji="loaded",tr())}))},rr={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Ji||null!=rr.applyArabicShaping},isLoading:function(){return"loading"===Ji},setState:function(t){Ji=t.pluginStatus,Qi=t.pluginURL},isParsed:function(){return null!=rr.applyArabicShaping&&null!=rr.processBidirectionalText&&null!=rr.processStyledBidirectionalText},getPluginURL:function(){return Qi}},or=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 ji,this.transition={})};or.prototype.isSupportedScript=function(t){return function(t,e){for(var n=0,i=t;nthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var ar=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Rn(t))return new Xn(t,e);if(qn(t)){var n=Kn(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=Qt.parse(t)),{kind:"constant",evaluate:function(){return i}}}(void 0===e?t.specification.default:e,t.specification)};ar.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ar.prototype.possiblyEvaluate=function(t,e,n){return this.property.possiblyEvaluate(this,t,e,n)};var sr=function(t){this.property=t,this.value=new ar(t,void 0)};sr.prototype.transitioned=function(t,e){return new ur(this.property,this.value,e,h({},t.transition,this.transition),t.now)},sr.prototype.untransitioned=function(){return new ur(this.property,this.value,null,{},0)};var lr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};lr.prototype.getValue=function(t){return x(this._values[t].value.value)},lr.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new sr(this._values[t].property)),this._values[t].value=new ar(this._values[t].property,null===e?void 0:x(e))},lr.prototype.getTransition=function(t){return x(this._values[t].transition)},lr.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new sr(this._values[t].property)),this._values[t].transition=x(e)||void 0},lr.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);ethis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(i=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}(a))}return r};var cr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};cr.prototype.possiblyEvaluate=function(t,e,n){for(var i=new fr(this._properties),r=0,o=Object.keys(this._values);ri.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},e.prototype.interpolate=function(t){return t},e}(mr),yr=function(t){this.specification=t};yr.prototype.possiblyEvaluate=function(t,e,n,i){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e,null,{},n,i);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new or(Math.floor(e.zoom-1),e)),t.expression.evaluate(new or(Math.floor(e.zoom),e)),t.expression.evaluate(new or(Math.floor(e.zoom+1),e)),e)}},yr.prototype._calculate=function(t,e,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},yr.prototype.interpolate=function(t){return t};var vr=function(t){this.specification=t};vr.prototype.possiblyEvaluate=function(t,e,n,i){return!!t.expression.evaluate(e,null,{},n,i)},vr.prototype.interpolate=function(){return!1};var _r=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var n=t[e];n.specification.overridable&&this.overridableProperties.push(e);var i=this.defaultPropertyValues[e]=new ar(n,void 0),r=this.defaultTransitionablePropertyValues[e]=new sr(n);this.defaultTransitioningPropertyValues[e]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};Ri("DataDrivenProperty",mr),Ri("DataConstantProperty",dr),Ri("CrossFadedDataDrivenProperty",gr),Ri("CrossFadedProperty",yr),Ri("ColorRampProperty",vr);var xr=function(t){function e(e,n){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=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 hr(n.layout)),n.paint)){for(var i in this._transitionablePaint=new lr(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(),this.paint=new fr(n.paint)}}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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){void 0===n&&(n={}),null!=e&&this._validate(Pi,"layers."+this.id+".layout."+t,t,e,n)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},e.prototype.getPaintProperty=function(t){return y(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&&this._validate(Ci,"layers."+this.id+".paint."+t,t,e,n))return!1;if(y(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],r="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),a=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(t,a,s)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,n){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),_(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,n,i,r){return void 0===r&&(r={}),(!r||!1!==r.validate)&&zi(this,t.call(Ai,{key:e,layerType:this.type,objectKey:n,value:i,styleSpec:kt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},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 pr&&Mn(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(At),br={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},wr=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},Er=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Sr(t,e){void 0===e&&(e=1);var n=0,i=0;return{members:t.map((function(t){var r=br[t.type].BYTES_PER_ELEMENT,o=n=Tr(n,Math.max(e,r)),a=t.components||1;return i=Math.max(i,r),n+=r*a,{name:t.name,type:t.type,components:a,offset:o}})),size:Tr(n,Math.max(i,e)),alignment:e}}function Tr(t,e){return Math.ceil(t/e)*e}Er.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Er.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},Er.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Er.prototype.clear=function(){this.length=0},Er.prototype.resize=function(t){this.reserve(t),this.length=t},Er.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)}},Er.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Ar=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Ar.prototype.bytesPerElement=4,Ri("StructArrayLayout2i4",Ar);var kr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);kr.prototype.bytesPerElement=8,Ri("StructArrayLayout4i8",kr);var Cr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Cr.prototype.bytesPerElement=12,Ri("StructArrayLayout2i4i12",Cr);var Pr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.uint8[l+4]=i,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,t},e}(Er);Pr.prototype.bytesPerElement=8,Ri("StructArrayLayout2i4ub8",Pr);var zr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,n,i,r,o,a,s,l,u)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c){var h=10*t;return this.uint16[h+0]=e,this.uint16[h+1]=n,this.uint16[h+2]=i,this.uint16[h+3]=r,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=u,this.uint16[h+9]=c,t},e}(Er);zr.prototype.bytesPerElement=20,Ri("StructArrayLayout10ui20",zr);var Ir=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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,l,u,c,h){var p=this.length;return this.resize(p+1),this.emplace(p,t,e,n,i,r,o,a,s,l,u,c,h)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c,h,p){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=n,this.int16[f+2]=i,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=p,t},e}(Er);Ir.prototype.bytesPerElement=24,Ri("StructArrayLayout4i4ui4i24",Ir);var Mr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Mr.prototype.bytesPerElement=12,Ri("StructArrayLayout3f12",Mr);var Lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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){return this.uint32[1*t+0]=e,t},e}(Er);Lr.prototype.bytesPerElement=4,Ri("StructArrayLayout1ul4",Lr);var Dr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,n,i,r,o,a,s,l)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u){var c=10*t,h=5*t;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=i,this.int16[c+3]=r,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[h+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(Er);Dr.prototype.bytesPerElement=20,Ri("StructArrayLayout6i1ul2ui20",Dr);var Br=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Br.prototype.bytesPerElement=12,Ri("StructArrayLayout2i2i2i12",Br);var Rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,i,r){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,i,r)},e.prototype.emplace=function(t,e,n,i,r,o){var a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=i,this.int16[s+6]=r,this.int16[s+7]=o,t},e}(Er);Rr.prototype.bytesPerElement=16,Ri("StructArrayLayout2f1f2i16",Rr);var Or=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=n,this.float32[a+1]=i,this.float32[a+2]=r,t},e}(Er);Or.prototype.bytesPerElement=12,Ri("StructArrayLayout2ub2f12",Or);var Fr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Fr.prototype.bytesPerElement=6,Ri("StructArrayLayout3ui6",Fr);var Nr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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,h,p,f,d,m,g){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m,g)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m,g,y){var v=24*t,_=12*t,x=48*t;return this.int16[v+0]=e,this.int16[v+1]=n,this.uint16[v+2]=i,this.uint16[v+3]=r,this.uint32[_+2]=o,this.uint32[_+3]=a,this.uint32[_+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=c,this.float32[_+7]=h,this.float32[_+8]=p,this.uint8[x+36]=f,this.uint8[x+37]=d,this.uint8[x+38]=m,this.uint32[_+10]=g,this.int16[v+22]=y,t},e}(Er);Nr.prototype.bytesPerElement=48,Ri("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nr);var Ur=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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,h,p,f,d,m,g,y,v,_,x,b,w,E,S,T,A,k){var C=this.length;return this.resize(C+1),this.emplace(C,t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m,g,y,v,_,x,b,w,E,S,T,A,k)},e.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m,g,y,v,_,x,b,w,E,S,T,A,k,C){var P=34*t,z=17*t;return this.int16[P+0]=e,this.int16[P+1]=n,this.int16[P+2]=i,this.int16[P+3]=r,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=h,this.uint16[P+11]=p,this.uint16[P+12]=f,this.uint16[P+13]=d,this.uint16[P+14]=m,this.uint16[P+15]=g,this.uint16[P+16]=y,this.uint16[P+17]=v,this.uint16[P+18]=_,this.uint16[P+19]=x,this.uint16[P+20]=b,this.uint16[P+21]=w,this.uint16[P+22]=E,this.uint32[z+12]=S,this.float32[z+13]=T,this.float32[z+14]=A,this.float32[z+15]=k,this.float32[z+16]=C,t},e}(Er);Ur.prototype.bytesPerElement=68,Ri("StructArrayLayout8i15ui1ul4f68",Ur);var Vr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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){return this.float32[1*t+0]=e,t},e}(Er);Vr.prototype.bytesPerElement=4,Ri("StructArrayLayout1f4",Vr);var jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);jr.prototype.bytesPerElement=6,Ri("StructArrayLayout3i6",jr);var Zr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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=4*t;return this.uint32[2*t+0]=e,this.uint16[r+2]=n,this.uint16[r+3]=i,t},e}(Er);Zr.prototype.bytesPerElement=8,Ri("StructArrayLayout1ul2ui8",Zr);var qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);qr.prototype.bytesPerElement=4,Ri("StructArrayLayout2ui4",qr);var Wr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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){return this.uint16[1*t+0]=e,t},e}(Er);Wr.prototype.bytesPerElement=2,Ri("StructArrayLayout1ui2",Wr);var Gr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Gr.prototype.bytesPerElement=8,Ri("StructArrayLayout2f8",Gr);var Hr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(Er);Hr.prototype.bytesPerElement=16,Ri("StructArrayLayout4f16",Hr);var Kr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(wr);Kr.prototype.size=20;var Xr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Kr(this,t)},e}(Dr);Ri("CollisionBoxArray",Xr);var Yr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,n),e}(wr);Yr.prototype.size=48;var Jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Yr(this,t)},e}(Nr);Ri("PlacedSymbolArray",Jr);var Qr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,n),e}(wr);Qr.prototype.size=68;var $r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Qr(this,t)},e}(Ur);Ri("SymbolInstanceArray",$r);var to=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(Vr);Ri("GlyphOffsetArray",to);var eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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}(jr);Ri("SymbolLineVertexArray",eo);var no=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,n),e}(wr);no.prototype.size=8;var io=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new no(this,t)},e}(Zr);Ri("FeatureIndexArray",io);var ro=Sr([{name:"a_pos",components:2,type:"Int16"}],4).members,oo=function(t){void 0===t&&(t=[]),this.segments=t};function ao(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}oo.prototype.prepareSegment=function(t,e,n,i){var r=this.segments[this.segments.length-1];return t>oo.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+oo.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!r||r.vertexLength+t>oo.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},oo.prototype.get=function(){return this.segments},oo.prototype.destroy=function(){for(var t=0,e=this.segments;t>>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}})),uo=e((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}})),co=lo,ho=uo;co.murmur3=lo,co.murmur2=ho;var po=function(){this.ids=[],this.positions=[],this.indexed=!1};po.prototype.add=function(t,e,n,i){this.ids.push(mo(t)),this.positions.push(e,n,i)},po.prototype.getPositions=function(t){for(var e=mo(t),n=0,i=this.ids.length-1;n>1;this.ids[r]>=e?i=r:n=r+1}for(var o=[];this.ids[n]===e;)o.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return o},po.serialize=function(t,e){var n=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,n,i,r){for(;i>1],a=i-1,s=r+1;;){do{a++}while(e[a]o);if(a>=s)break;go(e,a,s),go(n,3*a,3*s),go(n,3*a+1,3*s+1),go(n,3*a+2,3*s+2)}s-ia.x+1||la.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function No(t,e,n,i,r){t.emplaceBack(2*e+(i+1)/2,2*n+(r+1)/2)}var Uo=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 Ar,this.indexArray=new Fr,this.segments=new oo,this.programConfigurations=new Lo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Vo(t,e){for(var n=0;n1){if(Wo(t,e))return!0;for(var i=0;i1?n:n.sub(e)._mult(r)._add(e))}function Xo(t,e){for(var n,i,r,o=!1,a=0;ae.y!=(r=n[l]).y>e.y&&e.x<(r.x-i.x)*(e.y-i.y)/(r.y-i.y)+i.x&&(o=!o);return o}function Yo(t,e){for(var n=!1,i=0,r=t.length-1;ie.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 Jo(t,e,n){var i=n[0],r=n[2];if(t.xr.x&&e.x>r.x||t.yr.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 Qo(t,e,n){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:n.programConfigurations.get(e.id).getMaxValue(t)}function $o(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ta(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=8192||c<0||c>=8192)){var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),p=h.vertexLength;No(this.layoutVertexArray,u,c,-1,-1),No(this.layoutVertexArray,u,c,1,-1),No(this.layoutVertexArray,u,c,1,1),No(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{},i)},Ri("CircleBucket",Uo,{omit:["layers"]});var ea=new _r({"circle-sort-key":new mr(kt.layout_circle["circle-sort-key"])}),na={paint:new _r({"circle-radius":new mr(kt.paint_circle["circle-radius"]),"circle-color":new mr(kt.paint_circle["circle-color"]),"circle-blur":new mr(kt.paint_circle["circle-blur"]),"circle-opacity":new mr(kt.paint_circle["circle-opacity"]),"circle-translate":new dr(kt.paint_circle["circle-translate"]),"circle-translate-anchor":new dr(kt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new dr(kt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new dr(kt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new mr(kt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new mr(kt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new mr(kt.paint_circle["circle-stroke-opacity"])}),layout:ea},ia="undefined"!=typeof Float32Array?Float32Array:Array;function ra(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oa(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],h=e[8],p=e[9],f=e[10],d=e[11],m=e[12],g=e[13],y=e[14],v=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*i+x*s+b*h+w*m,t[1]=_*r+x*l+b*p+w*g,t[2]=_*o+x*u+b*f+w*y,t[3]=_*a+x*c+b*d+w*v,t[4]=(_=n[4])*i+(x=n[5])*s+(b=n[6])*h+(w=n[7])*m,t[5]=_*r+x*l+b*p+w*g,t[6]=_*o+x*u+b*f+w*y,t[7]=_*a+x*c+b*d+w*v,t[8]=(_=n[8])*i+(x=n[9])*s+(b=n[10])*h+(w=n[11])*m,t[9]=_*r+x*l+b*p+w*g,t[10]=_*o+x*u+b*f+w*y,t[11]=_*a+x*c+b*d+w*v,t[12]=(_=n[12])*i+(x=n[13])*s+(b=n[14])*h+(w=n[15])*m,t[13]=_*r+x*l+b*p+w*g,t[14]=_*o+x*u+b*f+w*y,t[15]=_*a+x*c+b*d+w*v,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,n=arguments.length;n--;)e+=t[n]*t[n];return Math.sqrt(e)});var aa,sa=oa;function la(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}aa=new ia(3),ia!=Float32Array&&(aa[0]=0,aa[1]=0,aa[2]=0),function(){var t=new ia(4);ia!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var ua=(function(){var t=new ia(2);ia!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,na)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new Uo(t)},e.prototype.queryRadius=function(t){var e=t;return Qo("circle-radius",this,e)+Qo("circle-stroke-width",this,e)+$o(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,r,o,a,s){for(var l=ta(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"),h=c?l:function(t,e){return t.map((function(t){return ca(t,e)}))}(l,s),p=c?u*a:u,f=0,d=i;ft.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;l80*n){i=o=t[0],r=a=t[1];for(var d=n;do&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-i,a-r))?1/u:0}return Ca(p,f,n,i,r,u),f}function Aa(t,e,n,i,r){var o,a;if(r===Ya(t,e,n,i)>0)for(o=e;o=e;o-=i)a=Ha(o,t[o],t[o+1],a);return a&&Va(a,a.next)&&(Ka(a),a=a.next),a}function ka(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!Va(i,i.next)&&0!==Ua(i.prev,i,i.next))i=i.next;else{if(Ka(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function Ca(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=Ra(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;e0||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?za(t,i,r,o):Pa(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),Ka(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Ca(t=Ia(ka(t),e,n),e,n,i,r,o,2):2===a&&Ma(t,e,n,i,r,o):Ca(ka(t),e,n,i,r,o,1);break}}}function Pa(t){var e=t.prev,n=t,i=t.next;if(Ua(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(Fa(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&Ua(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function za(t,e,n,i){var r=t.prev,o=t,a=t.next;if(Ua(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=Ra(r.x=u&&p&&p.z<=c;){if(h!==t.prev&&h!==t.next&&Fa(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Ua(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==t.prev&&p!==t.next&&Fa(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Ua(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=u;){if(h!==t.prev&&h!==t.next&&Fa(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Ua(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=c;){if(p!==t.prev&&p!==t.next&&Fa(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Ua(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Ia(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!Va(r,o)&&ja(r,i,i.next,o)&&Wa(r,o)&&Wa(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),Ka(i),Ka(i.next),i=t=o),i=i.next}while(i!==t);return ka(i)}function Ma(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Na(a,s)){var l=Ga(a,s);return a=ka(a,a.next),l=ka(l,l.next),Ca(a,e,n,i,r,o),void Ca(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function La(t,e){return t.x-e.x}function Da(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.x&&i.x>=c&&r!==i.x&&Fa(on.x||i.x===n.x&&Ba(n,i)))&&(n=i,p=l)),i=i.next}while(i!==u);return n}(t,e)){var n=Ga(e,t);ka(e,e.next),ka(n,n.next)}}function Ba(t,e){return Ua(t.prev,t,e.prev)<0&&Ua(e.next,t,t.next)<0}function Ra(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 Oa(t){var e=t,n=t;do{(e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function Na(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&&ja(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Wa(t,e)&&Wa(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)&&(Ua(t.prev,t,e.prev)||Ua(t,e.prev,e))||Va(t,e)&&Ua(t.prev,t,t.next)>0&&Ua(e.prev,e,e.next)>0)}function Ua(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Va(t,e){return t.x===e.x&&t.y===e.y}function ja(t,e,n,i){var r=qa(Ua(t,e,n)),o=qa(Ua(t,e,i)),a=qa(Ua(n,i,t)),s=qa(Ua(n,i,e));return r!==o&&a!==s||!(0!==r||!Za(t,n,e))||!(0!==o||!Za(t,i,e))||!(0!==a||!Za(n,t,i))||!(0!==s||!Za(n,e,i))}function Za(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function qa(t){return t>0?1:t<0?-1:0}function Wa(t,e){return Ua(t.prev,t,t.next)<0?Ua(t,e,t.next)>=0&&Ua(t,t.prev,e)>=0:Ua(t,e,t.prev)<0||Ua(t,t.next,e)<0}function Ga(t,e){var n=new Xa(t.i,t.x,t.y),i=new Xa(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 Ha(t,e,n,i){var r=new Xa(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 Ka(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 Xa(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 Ya(t,e,n,i){for(var r=0,o=e,a=n-i;oi;){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 h=e[n],p=i,f=r;for(Qa(e,i,n),o(e[r],h)>0&&Qa(e,i,r);p0;)f--}0===o(e[i],h)?Qa(e,i,f):Qa(e,++f,r),f<=n&&(i=f+1),n<=f&&(r=f-1)}}(t,e,n||0,i||t.length-1,r||$a)}function Qa(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function $a(t,e){return te?1:0}function ts(t,e){var n=t.length;if(n<=1)return[t];for(var i,r,o=[],a=0;a1)for(var l=0;l0&&n.holes.push(i+=t[r-1].length)}return n},Ea.default=Sa;var rs=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.patternFeatures=[],this.layoutVertexArray=new Ar,this.indexArray=new Fr,this.indexArray2=new qr,this.programConfigurations=new Lo(t.layers,t.zoom),this.segments=new oo,this.segments2=new oo,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};rs.prototype.populate=function(t,e,n){this.hasPattern=ns("fill",this.layers,e);for(var i=this.layers[0].layout.get("fill-sort-key"),r=[],o=0,a=t;o>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},cs.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>3}if(i--,1===n||2===n)(r+=t.readSVarint())s&&(s=r),(o+=t.readSVarint())u&&(u=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,u]},cs.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=cs.types[this.type];function c(t){for(var e=0;e>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 gs(t,e,n){if(3===t){var i=new fs(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}ds.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 us(this._pbf,e,this.extent,this._keys,this._values)};var ys={VectorTile:function(t,e){this.layers=t.readFields(gs,{},e)},VectorTileFeature:us,VectorTileLayer:fs},vs=ys.VectorTileFeature.types,_s=Math.pow(2,13);function xs(t,e,n,i,r,o,a,s){t.emplaceBack(e,n,2*Math.floor(i*_s)+a,r*_s*2,o*_s*2,Math.round(s))}var bs=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 Cr,this.indexArray=new Fr,this.programConfigurations=new Lo(t.layers,t.zoom),this.segments=new oo,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function ws(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}bs.prototype.populate=function(t,e,n){this.features=[],this.hasPattern=ns("fill-extrusion",this.layers,e);for(var i=0,r=t;i8192}))||M.every((function(t){return t.y<0}))||M.every((function(t){return t.y>8192}))))for(var m=0,g=0;g=1){var v=d[g-1];if(!ws(y,v)){h.vertexLength+4>oo.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=y.sub(v)._perp()._unit(),x=v.dist(y);m+x>32768&&(m=0),xs(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,0,m),xs(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,1,m),xs(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,m+=x),xs(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,m);var b=h.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),h.vertexLength+=4,h.primitiveLength+=2}}}}if(h.vertexLength+l>oo.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===vs[t.type]){for(var w=[],E=[],S=h.vertexLength,T=0,A=s;T=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u0;if(E&&y>u){var T=c.dist(f);if(T>2*h){var A=c.sub(c.sub(f)._mult(h/T)._round());this.updateDistance(f,A),this.addCurrentVertex(A,m,0,0,p),f=A}}var k=f&&d,C=k?n:s?"butt":i;if(k&&"round"===C&&(br&&(C="bevel"),"bevel"===C&&(b>2&&(C="flipbevel"),b100)v=g.mult(-1);else{var P=b*m.add(g).mag()/m.sub(g).mag();v._perp()._mult(P*(S?-1:1))}this.addCurrentVertex(c,v,0,0,p),this.addCurrentVertex(c,v.mult(-1),0,0,p)}else if("bevel"===C||"fakeround"===C){var z=-Math.sqrt(b*b-1),I=S?z:0,M=S?0:z;if(f&&this.addCurrentVertex(c,m,I,M,p),"fakeround"===C)for(var L=Math.round(180*w/Math.PI/20),D=1;D2*h){var U=c.add(d.sub(c)._mult(h/N)._round());this.updateDistance(c,U),this.addCurrentVertex(U,g,0,0,p),c=U}}}}},Is.prototype.addCurrentVertex=function(t,e,n,i,r,o){void 0===o&&(o=!1);var a=e.y*i-e.x,s=-e.y-e.x*i;this.addHalfVertex(t,e.x+e.y*n,e.y-e.x*n,o,!1,n,r),this.addHalfVertex(t,a,s,o,!0,-i,r),this.distance>zs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,n,i,r,o))},Is.prototype.addHalfVertex=function(t,e,n,i,r,o,a){var s=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((t.x<<1)+(i?1:0),(t.y<<1)+(r?1:0),Math.round(63*e)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6);var l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),r?this.e2=l:this.e1=l},Is.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(zs-1):this.distance},Is.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Ri("LineBucket",Is,{omit:["layers","patternFeatures"]});var Ms=new _r({"line-cap":new dr(kt.layout_line["line-cap"]),"line-join":new mr(kt.layout_line["line-join"]),"line-miter-limit":new dr(kt.layout_line["line-miter-limit"]),"line-round-limit":new dr(kt.layout_line["line-round-limit"]),"line-sort-key":new mr(kt.layout_line["line-sort-key"])}),Ls={paint:new _r({"line-opacity":new mr(kt.paint_line["line-opacity"]),"line-color":new mr(kt.paint_line["line-color"]),"line-translate":new dr(kt.paint_line["line-translate"]),"line-translate-anchor":new dr(kt.paint_line["line-translate-anchor"]),"line-width":new mr(kt.paint_line["line-width"]),"line-gap-width":new mr(kt.paint_line["line-gap-width"]),"line-offset":new mr(kt.paint_line["line-offset"]),"line-blur":new mr(kt.paint_line["line-blur"]),"line-dasharray":new yr(kt.paint_line["line-dasharray"]),"line-pattern":new gr(kt.paint_line["line-pattern"]),"line-gradient":new vr(kt.paint_line["line-gradient"])}),layout:Ms},Ds=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new or(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=h({},n,{zoom:Math.floor(n.zoom)}),t.prototype.evaluate.call(this,e,n,i,r)},e}(mr))(Ls.paint.properties["line-width"].specification);Ds.useIntegerZoom=!0;var Bs=function(t){function e(e){t.call(this,e,Ls)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){this.gradient=va(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,n){t.prototype.recalculate.call(this,e,n),this.paint._values["line-floorwidth"]=Ds.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Is(t)},e.prototype.queryRadius=function(t){var e=t,n=Rs(Qo("line-width",this,e),Qo("line-gap-width",this,e)),i=Qo("line-offset",this,e);return n/2+Math.abs(i)+$o(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,o,a,s){var l=ta(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*Rs(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=3)for(var o=0;o0?e+2*t:t}var Os=Sr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Fs=Sr([{name:"a_projected_pos",components:3,type:"Float32"}],4),Ns=(Sr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Sr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Us=(Sr([{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"}]),Sr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Vs=Sr([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function js(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()),rr.applyArabicShaping&&(t=rr.applyArabicShaping(t)),t}(t.text,e,n)})),t}Sr([{name:"triangle",components:3,type:"Uint16"}]),Sr([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Sr([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Sr([{type:"Float32",name:"offsetX"}]),Sr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Zs={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},qs=function(t,e,n,i,r){var o,a,s=8*r-i-1,l=(1<>1,c=-7,h=n?r-1:0,p=n?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},Ws=function(t,e,n,i,r,o){var a,s,l,u=8*o-r-1,c=(1<>1,p=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+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,r),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;t[n+f]=255&s,f+=d,s/=256,r-=8);for(a=a<0;t[n+f]=255&a,f+=d,a/=256,u-=8);t[n+f-d]|=128*m},Gs=Hs;function Hs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Hs.Varint=0,Hs.Fixed64=1,Hs.Bytes=2,Hs.Fixed32=5;var Ks="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Xs(t){return t.type===Hs.Bytes?t.readVarint()+t.pos:t.pos+1}function Ys(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Js(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 Qs(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function ul(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function cl(t,e,n){1===t&&n.readMessage(hl,e)}function hl(t,e,n){if(3===t){var i=n.readMessage(pl,{}),r=i.width,o=i.height,a=i.left,s=i.top,l=i.advance;e.push({id:i.id,bitmap:new ma({width:r+6,height:o+6},i.bitmap),metrics:{width:r,height:o,left:a,top:s,advance:l}})}}function pl(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())}function fl(t){for(var e=0,n=0,i=0,r=t;i=0;p--){var f=a[p];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var d=a.pop();p>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=sl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=ul(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=sl(this.buf,this.pos)+4294967296*sl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=sl(this.buf,this.pos)+4294967296*ul(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=qs(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=qs(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 Ys(t,i,e);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return Ys(t,i,e);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return Ys(t,i,e);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return Ys(t,i,e);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return Ys(t,i,e);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return Ys(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=this.pos;return this.pos=t,t-e>=12&&Ks?function(t,e,n){return Ks.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var i="",r=e;r239?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?(a=t[r+2],128==(192&(o=t[r+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[r+2],s=t[r+3],128==(192&(o=t[r+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Hs.Bytes)return t.push(this.readVarint(e));var n=Xs(this);for(t=t||[];this.pos127;);else if(e===Hs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Hs.Fixed32)this.pos+=4;else{if(e!==Hs.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;e268435455||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,n.buf[n.pos]=127&(t>>>=7)}(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;o55295&&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&&Js(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),Ws(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Ws(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=128&&Js(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,n){this.writeTag(t,Hs.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Qs,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,$s,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,nl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,tl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,el,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,rl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,al,e)},writeBytesField:function(t,e){this.writeTag(t,Hs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Hs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Hs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Hs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Hs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Hs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Hs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Hs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Hs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Hs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var dl=function(t,e){var n=e.pixelRatio,i=e.version,r=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=n,this.stretchX=r,this.stretchY=o,this.content=a,this.version=i},ml={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ml.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},ml.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},ml.tlbr.get=function(){return this.tl.concat(this.br)},ml.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(dl.prototype,ml);var gl=function(t,e){var n={},i={};this.haveRenderCallbacks=[];var r=[];this.addImages(t,n,r),this.addImages(e,i,r);var o=fl(r),a=new ga({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=n[s].paddedRect;ga.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var h=e[c],p=i[c].paddedRect,f=p.x+1,d=p.y+1,m=h.data.width,g=h.data.height;ga.copy(h.data,a,{x:0,y:0},{x:f,y:d},h.data),ga.copy(h.data,a,{x:0,y:g-1},{x:f,y:d-1},{width:m,height:1}),ga.copy(h.data,a,{x:0,y:0},{x:f,y:d+g},{width:m,height:1}),ga.copy(h.data,a,{x:m-1,y:0},{x:f-1,y:d},{width:1,height:g}),ga.copy(h.data,a,{x:0,y:0},{x:f+m,y:d},{width:1,height:g})}this.image=a,this.iconPositions=n,this.patternPositions=i};gl.prototype.addImages=function(t,e,n){for(var i in t){var r=t[i],o={x:0,y:0,w:r.data.width+2,h:r.data.height+2};n.push(o),e[i]=new dl(o,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(i)}},gl.prototype.patchUpdatedImages=function(t,e){for(var n in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[n],t.getImage(n),e),this.patchUpdatedImage(this.patternPositions[n],t.getImage(n),e)},gl.prototype.patchUpdatedImage=function(t,e,n){if(t&&e&&t.version!==e.version){t.version=e.version;var i=t.tl;n.update(e.data,void 0,{x:i[0],y:i[1]})}},Ri("ImagePosition",dl),Ri("ImageAtlas",gl);var yl={horizontal:1,vertical:2,horizontalOnly:3},vl=function(){this.scale=1,this.fontStack="",this.imageName=null};vl.forText=function(t,e){var n=new vl;return n.scale=t||1,n.fontStack=e,n},vl.forImage=function(t){var e=new vl;return e.imageName=t,e};var _l=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function xl(t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m){var g,y=_l.fromFeature(t,r);h===yl.vertical&&y.verticalizePunctuation();var v=rr.processBidirectionalText,_=rr.processStyledBidirectionalText;if(v&&1===y.sections.length){g=[];for(var x=0,b=v(y.toString(),kl(y,u,o,e,i,f,d));x0&&F>T&&(T=F)}else{var N=n[k.fontStack],U=N&&N[P];if(U&&U.rect)M=U.rect,I=U.metrics;else{var V=e[k.fontStack],j=V&&V[P];if(!j)continue;I=j.metrics}z=24*(b-k.scale)}B?(t.verticalizable=!0,S.push({glyph:P,imageName:L,x:p,y:f+z,vertical:B,scale:k.scale,fontStack:k.fontStack,sectionIndex:C,metrics:I,rect:M}),p+=D*k.scale+u):(S.push({glyph:P,imageName:L,x:p,y:f+z,vertical:B,scale:k.scale,fontStack:k.fontStack,sectionIndex:C,metrics:I,rect:M}),p+=I.advance*k.scale+u)}0!==S.length&&(d=Math.max(p-u,d),Pl(S,0,S.length-1,g,T)),p=0;var Z=o*b+T;E.lineOffset=Math.max(T,w),f+=Z,m=Math.max(Z,m),++y}else f+=o,++y}var q,W=f- -17,G=Cl(a),H=G.horizontalAlign,K=G.verticalAlign;(function(t,e,n,i,r,o,a,s,l){var u,c=(e-n)*r;u=o!==a?-s*i- -17:(-i*l+.5)*a;for(var h=0,p=t;h=0&&i>=t&&bl[this.text.charCodeAt(i)];i--)n--;this.text=this.text.substring(t,n),this.sectionIndex=this.sectionIndex.slice(t,n)},_l.prototype.substring=function(t,e){var n=new _l;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n},_l.prototype.toString=function(){return this.text},_l.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,n){return Math.max(e,t.sections[n].scale)}),0)},_l.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(vl.forText(t.scale,t.fontStack||e));for(var n=this.sections.length-1,i=0;i=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var bl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},wl={};function El(t,e,n,i,r,o){if(e.imageName){var a=i[e.imageName];return a?a.displaySize[0]*e.scale*24/o+r:0}var s=n[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+r:0}function Sl(t,e,n,i){var r=Math.pow(t-e,2);return i?t=0,h=0,p=0;p-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;si;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=c.dist(h)}return!0}function Ol(t){for(var e=0,n=0;nu){var d=(u-l)/f,m=je(h.x,p.x,d),g=je(h.y,p.y,d),y=new Il(m,g,p.angleTo(h),c);return y._round(),!a||Rl(t,y,s,a,e)?y:void 0}l+=f}}function Vl(t,e,n,i,r,o,a,s,l){var u=Fl(i,o,a),c=Nl(i,r),h=c*a,p=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&b=0&&w=0&&f+c<=h){var E=new Il(b,w,_,m);E._round(),r&&!Rl(e,E,a,r,o)||d.push(E)}}p+=v}return l||d.length||s||(d=t(e,p/2,i,r,o,a,s,!0,u)),d}(t,p?e/2*s%e:(c/2+2*o)*a*s%e,e,u,n,h,p,!1,l)}function jl(t,e,n,i,o){for(var a=[],s=0;s=i&&p.x>=i||(h.x>=i?h=new r(i,h.y+(i-h.x)/(p.x-h.x)*(p.y-h.y))._round():p.x>=i&&(p=new r(i,h.y+(i-h.x)/(p.x-h.x)*(p.y-h.y))._round()),h.y>=o&&p.y>=o||(h.y>=o?h=new r(h.x+(o-h.y)/(p.y-h.y)*(p.x-h.x),o)._round():p.y>=o&&(p=new r(h.x+(o-h.y)/(p.y-h.y)*(p.x-h.x),o)._round()),u&&h.equals(u[u.length-1])||a.push(u=[h]),u.push(p)))))}return a}function Zl(t,e,n,i){var o=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=t.right-t.left,h=t.bottom-t.top,p=a.stretchX||[[0,l]],f=a.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},m=p.reduce(d,0),g=f.reduce(d,0),y=l-m,v=u-g,_=0,x=m,b=0,w=g,E=0,S=y,T=0,A=v;if(a.content&&i){var k=a.content;_=ql(p,0,k[0]),b=ql(f,0,k[1]),x=ql(p,k[0],k[2]),w=ql(f,k[1],k[3]),E=k[0]-_,T=k[1]-b,S=k[2]-k[0]-x,A=k[3]-k[1]-w}var C=function(i,o,l,u){var p=Gl(i.stretch-_,x,c,t.left),f=Hl(i.fixed-E,S,i.stretch,m),d=Gl(o.stretch-b,w,h,t.top),y=Hl(o.fixed-T,A,o.stretch,g),v=Gl(l.stretch-_,x,c,t.left),k=Hl(l.fixed-E,S,l.stretch,m),C=Gl(u.stretch-b,w,h,t.top),P=Hl(u.fixed-T,A,u.stretch,g),z=new r(p,d),I=new r(v,d),M=new r(v,C),L=new r(p,C),D=new r(f/s,y/s),B=new r(k/s,P/s),R=e*Math.PI/180;if(R){var O=Math.sin(R),F=Math.cos(R),N=[F,-O,O,F];z._matMult(N),I._matMult(N),L._matMult(N),M._matMult(N)}var U=i.stretch+i.fixed,V=o.stretch+o.fixed;return{tl:z,tr:I,bl:L,br:M,tex:{x:a.paddedRect.x+1+U,y:a.paddedRect.y+1+V,w:l.stretch+l.fixed-U,h:u.stretch+u.fixed-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:B,minFontScaleX:S/s/c,minFontScaleY:A/s/h,isSDF:n}};if(i&&(a.stretchX||a.stretchY))for(var P=Wl(p,y,m),z=Wl(f,v,g),I=0;I0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=a.top*s-l,g=a.bottom*s+l,y=a.left*s-l,v=a.right*s+l,_=a.collisionPadding;if(_&&(y-=_[0]*s,m-=_[1]*s,v+=_[2]*s,g+=_[3]*s),c){var x=new r(y,m),b=new r(v,m),w=new r(y,g),E=new r(v,g),S=c*Math.PI/180;x._rotate(S),b._rotate(S),w._rotate(S),E._rotate(S),y=Math.min(x.x,b.x,w.x,E.x),v=Math.max(x.x,b.x,w.x,E.x),m=Math.min(x.y,b.y,w.y,E.y),g=Math.max(x.y,b.y,w.y,E.y)}t.emplaceBack(e.x,e.y,y,m,v,g,n,i,o)}this.boxEndIndex=t.length},Xl=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Yl),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 Yl(t,e){return te?1:0}function Jl(t,e,n){void 0===e&&(e=1),void 0===n&&(n=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;ua)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var h=Math.min(a-i,s-o),p=h/2,f=new Xl([],Ql);if(0===h)return new r(i,o);for(var d=i;dg.d||!g.d)&&(g=v,n&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,y)),v.max-g.d<=e||(f.push(new $l(v.p.x-(p=v.h/2),v.p.y-p,p,t)),f.push(new $l(v.p.x+p,v.p.y-p,p,t)),f.push(new $l(v.p.x-p,v.p.y+p,p,t)),f.push(new $l(v.p.x+p,v.p.y+p,p,t)),y+=4)}return n&&(console.log("num probes: "+y),console.log("best distance: "+g.d)),g.p}function Ql(t,e){return e.max-t.max}function $l(t,e,n,i){this.p=new r(t,e),this.h=n,this.d=function(t,e){for(var n=!1,i=1/0,r=0;rt.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(n=!n),i=Math.min(i,Ko(t,u,c))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}Xl.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Xl.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Xl.prototype.peek=function(){return this.data[0]},Xl.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},Xl.prototype._down=function(t){for(var e=this.data,n=this.compare,i=this.length>>1,r=e[t];t=0)break;e[t]=a,t=o}e[t]=r};var tu=Number.POSITIVE_INFINITY;function eu(t,e){return e[1]!==tu?function(t,e,n){var i=0,r=0;switch(e=Math.abs(e),n=Math.abs(n),t){case"top-right":case"top-left":case"top":r=n-7;break;case"bottom-right":case"bottom-left":case"bottom":r=7-n}switch(t){case"top-right":case"bottom-right":case"right":i=-e;break;case"top-left":case"bottom-left":case"left":i=e}return[i,r]}(t,e[0],e[1]):function(t,e){var n=0,i=0;e<0&&(e=0);var r=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":i=r-7;break;case"bottom-right":case"bottom-left":i=7-r;break;case"bottom":i=7-e;break;case"top":i=e-7}switch(t){case"top-right":case"bottom-right":n=-r;break;case"top-left":case"bottom-left":n=r;break;case"left":n=e;break;case"right":n=-e}return[n,i]}(t,e[0])}function nu(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function iu(t,e,n,i,o,a,s,l,u,c,h,p,f,d,m){var g=function(t,e,n,i,o,a,s,l){for(var u=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],h=0,p=e.positionedLines;h32640&&w(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===y.kind&&((v=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||v[1]>32640)&&w(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,g,v,l,a,s,c,e,u.lineStartIndex,u.lineLength,f,m);for(var _=0,x=h;_=0;a--)if(i.dist(o[a])0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=r.get("symbol-sort-key");if(this.features=[],l||u){for(var h=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new or(this.zoom),m=0,g=t;m=0;for(var L=0,D=S.sections;L=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;l0},fu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},fu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},fu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},fu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},fu.prototype.addIndicesForPlacedSymbol=function(t,e){for(var n=t.placedSymbolArray.get(e),i=n.vertexStartIndex+4*n.numGlyphs,r=n.vertexStartIndex;r1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,i=this.symbolInstanceIndexes;n=0&&i.indexOf(t)===n&&e.addIndicesForPlacedSymbol(e.text,t)})),r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Ri("SymbolBucket",fu,{omit:["layers","collisionBoxArray","features","compareText"]}),fu.MAX_GLYPHS=65535,fu.addDynamicAttributes=uu;var du=new _r({"symbol-placement":new dr(kt.layout_symbol["symbol-placement"]),"symbol-spacing":new dr(kt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new dr(kt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new mr(kt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new dr(kt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new dr(kt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new dr(kt.layout_symbol["icon-ignore-placement"]),"icon-optional":new dr(kt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new dr(kt.layout_symbol["icon-rotation-alignment"]),"icon-size":new mr(kt.layout_symbol["icon-size"]),"icon-text-fit":new dr(kt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new dr(kt.layout_symbol["icon-text-fit-padding"]),"icon-image":new mr(kt.layout_symbol["icon-image"]),"icon-rotate":new mr(kt.layout_symbol["icon-rotate"]),"icon-padding":new dr(kt.layout_symbol["icon-padding"]),"icon-keep-upright":new dr(kt.layout_symbol["icon-keep-upright"]),"icon-offset":new mr(kt.layout_symbol["icon-offset"]),"icon-anchor":new mr(kt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new dr(kt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new dr(kt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new dr(kt.layout_symbol["text-rotation-alignment"]),"text-field":new mr(kt.layout_symbol["text-field"]),"text-font":new mr(kt.layout_symbol["text-font"]),"text-size":new mr(kt.layout_symbol["text-size"]),"text-max-width":new mr(kt.layout_symbol["text-max-width"]),"text-line-height":new dr(kt.layout_symbol["text-line-height"]),"text-letter-spacing":new mr(kt.layout_symbol["text-letter-spacing"]),"text-justify":new mr(kt.layout_symbol["text-justify"]),"text-radial-offset":new mr(kt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new dr(kt.layout_symbol["text-variable-anchor"]),"text-anchor":new mr(kt.layout_symbol["text-anchor"]),"text-max-angle":new dr(kt.layout_symbol["text-max-angle"]),"text-writing-mode":new dr(kt.layout_symbol["text-writing-mode"]),"text-rotate":new mr(kt.layout_symbol["text-rotate"]),"text-padding":new dr(kt.layout_symbol["text-padding"]),"text-keep-upright":new dr(kt.layout_symbol["text-keep-upright"]),"text-transform":new mr(kt.layout_symbol["text-transform"]),"text-offset":new mr(kt.layout_symbol["text-offset"]),"text-allow-overlap":new dr(kt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new dr(kt.layout_symbol["text-ignore-placement"]),"text-optional":new dr(kt.layout_symbol["text-optional"])}),mu={paint:new _r({"icon-opacity":new mr(kt.paint_symbol["icon-opacity"]),"icon-color":new mr(kt.paint_symbol["icon-color"]),"icon-halo-color":new mr(kt.paint_symbol["icon-halo-color"]),"icon-halo-width":new mr(kt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new mr(kt.paint_symbol["icon-halo-blur"]),"icon-translate":new dr(kt.paint_symbol["icon-translate"]),"icon-translate-anchor":new dr(kt.paint_symbol["icon-translate-anchor"]),"text-opacity":new mr(kt.paint_symbol["text-opacity"]),"text-color":new mr(kt.paint_symbol["text-color"],{runtimeType:Nt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new mr(kt.paint_symbol["text-halo-color"]),"text-halo-width":new mr(kt.paint_symbol["text-halo-width"]),"text-halo-blur":new mr(kt.paint_symbol["text-halo-blur"]),"text-translate":new dr(kt.paint_symbol["text-translate"]),"text-translate-anchor":new dr(kt.paint_symbol["text-translate-anchor"])}),layout:du},gu=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Bt,this.defaultValue=t};gu.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},gu.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},gu.prototype.outputDefined=function(){return!1},gu.prototype.serialize=function(){return null},Ri("FormatSectionOverride",gu,{omit:["defaultValue"]});var yu=function(t){function e(e){t.call(this,e,mu)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,n){if(t.prototype.recalculate.call(this,e,n),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var i=this.layout.get("text-writing-mode");if(i){for(var r=[],o=0,a=i;o",targetMapId:i,sourceMapId:o.mapId})}}},Iu.prototype.receive=function(t){var e=t.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[n];var i=this.cancelCallbacks[n];delete this.cancelCallbacks[n],i&&i()}else T()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)},Iu.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Iu.prototype.processTask=function(t,e){var n=this;if(""===e.type){var i=this.callbacks[t];delete this.callbacks[t],i&&(e.error?i(Vi(e.error)):i(null,Vi(e.data)))}else{var r=!1,o=C(this.globalScope)?void 0:[],a=e.hasCallback?function(e,i){r=!0,delete n.cancelCallbacks[t],n.target.postMessage({id:t,type:"",sourceMapId:n.mapId,error:e?Ui(e):null,data:Ui(i,o)},o)}:function(t){r=!0},s=null,l=Vi(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!r&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Iu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Lu=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]))};Lu.prototype.setNorthEast=function(t){return this._ne=t instanceof Du?new Du(t.lng,t.lat):Du.convert(t),this},Lu.prototype.setSouthWest=function(t){return this._sw=t instanceof Du?new Du(t.lng,t.lat):Du.convert(t),this},Lu.prototype.extend=function(t){var e,n,i=this._sw,r=this._ne;if(t instanceof Du)e=t,n=t;else{if(!(t instanceof Lu))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Lu.convert(t)):this.extend(Du.convert(t)):this;if(n=t._ne,!(e=t._sw)||!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 Du(e.lng,e.lat),this._ne=new Du(n.lng,n.lat)),this},Lu.prototype.getCenter=function(){return new Du((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Lu.prototype.getSouthWest=function(){return this._sw},Lu.prototype.getNorthEast=function(){return this._ne},Lu.prototype.getNorthWest=function(){return new Du(this.getWest(),this.getNorth())},Lu.prototype.getSouthEast=function(){return new Du(this.getEast(),this.getSouth())},Lu.prototype.getWest=function(){return this._sw.lng},Lu.prototype.getSouth=function(){return this._sw.lat},Lu.prototype.getEast=function(){return this._ne.lng},Lu.prototype.getNorth=function(){return this._ne.lat},Lu.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Lu.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Lu.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Lu.prototype.contains=function(t){var e=Du.convert(t),n=e.lng,i=e.lat,r=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&r},Lu.convert=function(t){return!t||t instanceof Lu?t:new Lu(t)};var Du=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")};Du.prototype.wrap=function(){return new Du(c(this.lng,-180,180),this.lat)},Du.prototype.toArray=function(){return[this.lng,this.lat]},Du.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Du.prototype.distanceTo=function(t){var e=Math.PI/180,n=this.lat*e,i=t.lat*e,r=Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(r,1))},Du.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 Lu(new Du(this.lng-n,this.lat-e),new Du(this.lng+n,this.lat+e))},Du.convert=function(t){if(t instanceof Du)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Du(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Du(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Bu=2*Math.PI*6371008.8;function Ru(t){return Bu*Math.cos(t*Math.PI/180)}function Ou(t){return(180+t)/360}function Fu(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Nu(t,e){return t/Ru(e)}function Uu(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Vu=function(t,e,n){void 0===n&&(n=0),this.x=+t,this.y=+e,this.z=+n};Vu.fromLngLat=function(t,e){void 0===e&&(e=0);var n=Du.convert(t);return new Vu(Ou(n.lng),Fu(n.lat),Nu(e,n.lat))},Vu.prototype.toLngLat=function(){return new Du(360*this.x-180,Uu(this.y))},Vu.prototype.toAltitude=function(){return this.z*Ru(Uu(this.y))},Vu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Bu*(t=Uu(this.y),1/Math.cos(t*Math.PI/180));var t};var ju=function(t,e,n){this.z=t,this.x=e,this.y=n,this.key=Wu(0,t,t,e,n)};ju.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},ju.prototype.url=function(t,e){var n,i,r,o,a,s=(i=this.y,r=this.z,o=Mu(256*(n=this.x),256*(i=Math.pow(2,r)-i-1),r),a=Mu(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<this.canonical.z?new qu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new qu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},qu.prototype.calculateScaledKey=function(t,e){var n=this.canonical.z-t;return t>this.canonical.z?Wu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Wu(this.wrap*+e,t,t,this.canonical.x>>n,this.canonical.y>>n)},qu.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>e&&t.canonical.y===this.canonical.y>>e},qu.prototype.children=function(t){if(this.overscaledZ>=t)return[new qu(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 qu(e,this.wrap,e,n,i),new qu(e,this.wrap,e,n+1,i),new qu(e,this.wrap,e,n,i+1),new qu(e,this.wrap,e,n+1,i+1)]},qu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=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)},Gu.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},Gu.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},Gu.prototype.getPixels=function(){return new ga({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Gu.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=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},Ju.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ys.VectorTile(new Gs(this.rawTileData)).layers,this.sourceLayerCoder=new Hu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ju.prototype.query=function(t,e,n,i){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=ri(a.filter),u=t.queryGeometry,c=t.queryPadding*s,h=$u(u),p=this.grid.query(h.minX-c,h.minY-c,h.maxX+c,h.maxY+c),f=$u(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(e,n,i,o){return function(t,e,n,i,o){for(var a=0,s=t;a=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,h=u;c=0)return!0;return!1}(o,h)){var p=this.sourceLayerCoder.decode(n),f=this.vtLayers[p].feature(i);if(r.filter(new or(this.tileID.overscaledZ),f))for(var d=this.getId(f,p),m=0;mi)r=!1;else if(e)if(this.expirationTimest&&(t.getActor().send("enforceCacheSizeLimit",at),ht=0)},t.clamp=u,t.clearTileCache=function(t){var e=a.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=jl,t.clone=function(t){var e=new ia(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=x,t.clone$2=function(t){var e=new ia(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Vs,t.config=F,t.create=function(){var t=new ia(16);return ia!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new ia(9);return ia!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new ia(4);return ia!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wn,t.createLayout=Sr,t.createStyleLayer=function(t){return"custom"===t.type?new wu(t):new Eu[t.type](t)},t.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},t.deepEqual=function t(e,n){if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var i=0;i0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=je,t.offscreenCanvasSupported=pt,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.parseGlyphPBF=function(t){return new Gs(t).readFields(cl,[])},t.pbf=Gs,t.performSymbolLayout=function(t,e,n,i,r,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,h=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new or(c.minZoom),a),l["text-size"].possiblyEvaluate(new or(h),a)]}if("composite"===t.iconSizeData.kind){var p=t.iconSizeData,f=p.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new or(p.minZoom),a),l["icon-size"].possiblyEvaluate(new or(f),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new or(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new or(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new or(18));for(var d=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),g=s.get("text-keep-upright"),y=s.get("text-size"),v=function(){var o=x[_],l=s.get("text-font").evaluate(o,{},a).join(","),c=y.evaluate(o,{},a),h=u.layoutTextSize.evaluate(o,{},a),p=u.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},v=o.text,b=[0,0];if(v){var E=v.toString(),S=24*s.get("text-letter-spacing").evaluate(o,{},a),T=function(t){for(var e=0,n=t;e=8192||h.y<0||h.y>=8192||function(t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m,g,y,v,_,x,b,E,S,T){var A,k,C,P,z,I=t.addToLineVertexArray(e,n),M=0,L=0,D=0,B=0,R=-1,O=-1,F={},N=co(""),U=0,V=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(U=(A=s.layout.get("text-offset").evaluate(x,{},S).map((function(t){return 24*t})))[0],V=A[1]):(U=24*s.layout.get("text-radial-offset").evaluate(x,{},S),V=tu),t.allowVerticalPlacement&&i.vertical){var j=s.layout.get("text-rotate").evaluate(x,{},S)+90;P=new Kl(l,e,u,c,h,i.vertical,p,f,d,j),a&&(z=new Kl(l,e,u,c,h,a,g,y,d,j))}if(r){var Z=s.layout.get("icon-rotate").evaluate(x,{}),q="none"!==s.layout.get("icon-text-fit"),W=Zl(r,Z,E,q),G=a?Zl(a,Z,E,q):void 0;C=new Kl(l,e,u,c,h,r,g,y,!1,Z),M=4*W.length;var H=t.iconSizeData,K=null;"source"===H.kind?(K=[128*s.layout.get("icon-size").evaluate(x,{})])[0]>32640&&w(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===H.kind&&((K=[128*b.compositeIconSizes[0].evaluate(x,{},S),128*b.compositeIconSizes[1].evaluate(x,{},S)])[0]>32640||K[1]>32640)&&w(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,W,K,_,v,x,!1,e,I.lineStartIndex,I.lineLength,-1,S),R=t.icon.placedSymbolArray.length-1,G&&(L=4*G.length,t.addSymbols(t.icon,G,K,_,v,x,yl.vertical,e,I.lineStartIndex,I.lineLength,-1,S),O=t.icon.placedSymbolArray.length-1)}for(var X in i.horizontal){var Y=i.horizontal[X];if(!k){N=co(Y.text);var J=s.layout.get("text-rotate").evaluate(x,{},S);k=new Kl(l,e,u,c,h,Y,p,f,d,J)}var Q=1===Y.positionedLines.length;if(D+=iu(t,e,Y,o,s,d,x,m,I,i.vertical?yl.horizontal:yl.horizontalOnly,Q?Object.keys(i.horizontal):[X],F,R,b,S),Q)break}i.vertical&&(B+=iu(t,e,i.vertical,o,s,d,x,m,I,yl.vertical,["vertical"],F,O,b,S));var $=k?k.boxStartIndex:t.collisionBoxArray.length,tt=k?k.boxEndIndex:t.collisionBoxArray.length,et=P?P.boxStartIndex:t.collisionBoxArray.length,nt=P?P.boxEndIndex:t.collisionBoxArray.length,it=C?C.boxStartIndex:t.collisionBoxArray.length,rt=C?C.boxEndIndex:t.collisionBoxArray.length,ot=z?z.boxStartIndex:t.collisionBoxArray.length,at=z?z.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=lt(k,st),st=lt(P,st),st=lt(C,st);var ut=(st=lt(z,st))>-1?1:0;ut&&(st*=T/24),t.glyphOffsetArray.length>=fu.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,R,O,N,$,tt,et,nt,it,rt,ot,at,u,D,B,M,L,ut,0,p,U,V,st)}(t,h,s,n,i,r,p,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,y,b,T,l,_,E,A,d,e,o,u,c,a)};if("line"===k)for(var I=0,M=jl(e.geometry,0,0,8192,8192);I1){var U=Ul(N,S,n.vertical||m,i,24,v);U&&z(N,U)}}else if("Polygon"===e.type)for(var V=0,j=ts(e.geometry,0);V=C.maxzoom||"none"!==C.visibility&&(a(k,this.zoom,i),(m[C.id]=C.createBucket({index:c.bucketLayerIDs.length,layers:k,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g,this.tileID.canonical),c.bucketLayerIDs.push(k.map((function(t){return t.id}))))}}}var P=t.mapObject(g.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(P).length?o.send("getGlyphs",{uid:this.uid,stacks:P},(function(t,e){h||(h=t,p=e,M.call(l))})):p={};var z=Object.keys(g.iconDependencies);z.length?o.send("getImages",{icons:z,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){h||(h=t,f=e,M.call(l))})):f={};var I=Object.keys(g.patternDependencies);function M(){if(h)return s(h);if(p&&f&&d){var e=new r(p),n=new t.ImageAtlas(f,d);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,i),t.performSymbolLayout(l,p,e.positions,f,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,i),l.addFeatures(g,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?p:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}I.length?o.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){h||(h=t,d=e,M.call(l))})):d={},M.call(this)};var l=function(t,e,n,i){this.actor=t,this.layerIndex=e,this.availableImages=n,this.loadVectorData=i||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,n){var i=this,r=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[r]=new o(e);s.abort=this.loadVectorData(e,(function(e,o){if(delete i.loading[r],e||!o)return s.status="done",i.loaded[r]=s,n(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var h=a.finish();h&&(c.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,i.layerIndex,i.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var n=this,i=this.loaded,r=t.uid,o=this;if(i&&i[r]){var a=i[r];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,i){var r=a.reloadCallback;r&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,n.availableImages,o.actor,r)),e(t,i)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var n=this.loading,i=t.uid;n&&n[i]&&n[i].abort&&(n[i].abort(),delete n[i]),e()},l.prototype.removeTile=function(t,e){var n=this.loaded,i=t.uid;n&&n[i]&&delete n[i],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};function h(t,e){if(0!==t.length){p(t[0],e);for(var n=1;n=0!=!!e&&t.reverse()}c.prototype.loadTile=function(e,n){var i=e.uid,r=e.encoding,o=e.rawImageData,a=u&&o instanceof u?this.getImageData(o):o,s=new t.DEMData(i,a,r);this.loaded=this.loaded||{},this.loaded[i]=s,n(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:n.width,height:n.height},n.data)},c.prototype.removeTile=function(t){var e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=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))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,i=this._feature.geometry;n>31}function C(t,e){for(var n=t.loadGeometry(),i=t.type,r=0,o=0,a=n.length,s=0;s>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),h=.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+h)),Math.min(o,Math.floor(i+(s-l)*c/s+h)),a)}var p=n[2*i+a],f=r,d=o;for(z(e,n,r,i),n[2*o+a]>p&&z(e,n,r,o);fp;)d--}n[2*r+a]===p?z(e,n,r,d):z(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)};B.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 h=u.pop(),p=u.pop(),f=u.pop();if(p-f<=a)for(var d=f;d<=p;d++)l=e[2*d+1],(s=e[2*d])>=n&&s<=r&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+p)/2);l=e[2*m+1],(s=e[2*m])>=n&&s<=r&&l>=i&&l<=o&&c.push(t[m]);var g=(h+1)%2;(0===h?n<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(g)),(0===h?r>=s:o>=l)&&(u.push(m+1),u.push(p),u.push(g))}}return c}(this.ids,this.coords,t,e,n,i,this.nodeSize)},B.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(),h=a.pop();if(c-h<=o)for(var p=h;p<=c;p++)M(e[2*p],e[2*p+1],n,i)<=l&&s.push(t[p]);else{var f=Math.floor((h+c)/2),d=e[2*f],m=e[2*f+1];M(d,m,n,i)<=l&&s.push(t[f]);var g=(u+1)%2;(0===u?n-r<=d:i-r<=m)&&(a.push(h),a.push(f-1),a.push(g)),(0===u?n+r>=d:i+r>=m)&&(a.push(f+1),a.push(c),a.push(g))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)};var R={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},O=function(t){this.options=q(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)};function F(t,e,n,i,r){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:i,properties:r}}function N(t,e){var n=t.geometry.coordinates,i=n[1];return{x:j(n[0]),y:Z(i),zoom:1/0,index:e,parentId:-1}}function U(t){return{type:"Feature",id:t.id,properties:V(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 V(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return q(q({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function j(t){return t/360+.5}function Z(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 q(t,e){for(var n in e)t[n]=e[n];return t}function W(t){return t.x}function G(t){return t.y}function H(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 K(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)X(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var i=0;i0&&(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],h=e[i],p=e[i+1],f=n+3;fa)o=f,a=d;else if(d===a){var m=Math.abs(f-s);mr&&(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 $(t,e,n,i){for(var r=0;r1?1:n}function nt(t,e,n,i,r,o,a,s){if(i/=e,o>=(n/=e)&&a=i)return null;for(var l=[],u=0;u=n&&d=i)){var m=[];if("Point"===p||"MultiPoint"===p)it(h,m,n,i,r);else if("LineString"===p)rt(h,m,n,i,r,!1,s.lineMetrics);else if("MultiLineString"===p)at(h,m,n,i,r,!1);else if("Polygon"===p)at(h,m,n,i,r,!0);else if("MultiPolygon"===p)for(var g=0;g=n&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function rt(t,e,n,i,r,o,a){for(var s,l,u=ot(t),c=0===r?lt:ut,h=t.start,p=0;pn&&(l=c(u,f,d,g,y,n),a&&(u.start=h+s*l)):v>i?_=n&&(l=c(u,f,d,g,y,n),x=!0),_>i&&v<=i&&(l=c(u,f,d,g,y,i),x=!0),!o&&x&&(a&&(u.end=h+s*l),e.push(u),u=ot(t)),a&&(h+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(v=0===r?f:d)>=n&&v<=i&&st(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&st(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,n,i,r,o){for(var a=0;aa.maxX&&(a.maxX=c),h>a.maxY&&(a.maxY=h)}return a}function mt(t,e,n,i){var r=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&e.size<(r?a:i))n.numPoints+=e.length/3;else{for(var s=[],l=0;la)&&(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;i0===e)for(i=0,r=t.length;i24)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=i;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new B(s,W,G,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return n&&console.timeEnd("total time"),this},O.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,h=l.range(j(n),Z(o),j(r),Z(i));ce&&(p+=m.numPoints||1)}if(p>=o){for(var g=l.x*h,y=l.y*h,v=r&&h>1?this._map(l,!0):null,_=(s<<5)+(e+1)+this.points.length,x=0,b=c;x1)for(var S=0,T=c;S>5},O.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},O.prototype._map=function(t,e){if(t.numPoints)return e?q({},t.properties):t.properties;var n=this.points[t.index].properties,i=this.options.map(n);return e&&i===n?q({},i):i},yt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},yt.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<1&&console.time("creation"),p=this.tiles[h]=dt(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,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(p.source=t,r){if(e===l.maxZoom||e===r)continue;var d=1<1&&console.time("clipping");var m,g,y,v,_,x,b=.5*l.buffer/l.extent,w=.5-b,E=.5+b,S=1+b;m=g=y=v=null,_=nt(t,c,n-b,n+E,0,p.minX,p.maxX,l),x=nt(t,c,n+w,n+S,0,p.minX,p.maxX,l),t=null,_&&(m=nt(_,c,i-b,i+E,1,p.minY,p.maxY,l),g=nt(_,c,i+w,i+S,1,p.minY,p.maxY,l),_=null),x&&(y=nt(x,c,i-b,i+E,1,p.minY,p.maxY,l),v=nt(x,c,i+w,i+S,1,p.minY,p.maxY,l),x=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*i),s.push(g||[],e+1,2*n,2*i+1),s.push(y||[],e+1,2*n+1,2*i),s.push(v||[],e+1,2*n+1,2*i+1)}}},yt.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<1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var l,u=t,c=e,h=n;!l&&u>0;)u--,c=Math.floor(c/2),h=Math.floor(h/2),l=this.tiles[vt(u,c,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,h),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,h,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?pt(this.tiles[s],r):null):null};var xt=function(e){function n(t,n,i,r){e.call(this,t,n,i,_t),r&&(this.loadGeoJSON=r)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.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 t.RequestPerformance(i.request);this.loadGeoJSON(i,(function(o,a){if(o||!a)return n(o);if("object"!=typeof a)return n(new Error("Input data given to '"+i.source+"' is not a valid GeoJSON object."));!function t(e,n){var i,r=e&&e.type;if("FeatureCollection"===r)for(i=0;i=0?0:e.button},n.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p=function(e){function n(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,n=this.requestors;e=0?1.2:1))}function y(t,e,n,i,r,o,a){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:n,id:r,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],_.loadGlyphRange(n,s,i.url,i.requestManager,(function(t,e){if(e){for(var n in e)i._doesCharSupportLocalGlyph(+n)||(o.glyphs[+n]=e[+n]);o.ranges[s]=!0}for(var r=0,a=l;r1&&(s=t[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),h=Math.min(u,c),p=void 0,f=r/n*(i+1);if(s.isDash){var d=i-Math.abs(f);p=Math.sqrt(h*h+d*d)}else p=i-Math.sqrt(h*h+f*f);this.data[o+l]=Math.max(0,Math.min(255,p+128))}},E.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var n=t[e],i=t[e+1];n.zeroLength?t.splice(e,1):i&&i.isDash===n.isDash&&(i.left=n.left,t.splice(e,1))}var r=t[0],o=t[t.length-1];r.isDash===o.isDash&&(r.left=o.left-this.width,o.right=r.right+this.width);for(var a=this.width*this.nextRow,s=0,l=t[s],u=0;u1&&(l=t[++s]);var c=Math.abs(u-l.left),h=Math.abs(u-l.right),p=Math.min(c,h);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?p:-p)+128))}},E.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=i&&e.x=r&&e.y0&&(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+10&&(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.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},n.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},n.prototype.getClusterLeaves=function(t,e,n,i){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},i),this},n.prototype._updateWorkerData=function(e){var n=this;this._loaded=!1;var i=t.extend({},this.workerOptions),r=this._data;"string"==typeof r?(i.request=this.map._requestManager.transformRequest(t.browser.resolveURL(r),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(r),this.actor.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.actor.send(n.type+".coalesce",{source:i.source},null),e(t))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(e,n){var i=this,r=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(r,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?n(null):t?n(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===r),n(null))}))},n.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(t.Evented),I=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),M=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._loaded=!1,this.setEventedParent(r),this.options=n}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(e,n){var i=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(r,o){i._loaded=!0,r?i.fire(new t.ErrorEvent(r)):o&&(i.image=o,e&&(i.coordinates=e),n&&n(),i._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},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;an.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=e}},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,I.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}(M),D=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)).constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},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,I.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];tthis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var n in this.data)for(var i=0,r=this.data[n];i1||(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._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){if(t.key in this._loadedParentTiles){var n=this._loadedParentTiles[t.key];return n&&n.tileID.overscaledZ>=e?n:null}for(var i=t.overscaledZ-1;i>=e;i--){var r=t.scaledTo(i),o=this._getLoadedTile(r);if(o)return o}},n.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},n.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,n=Math.ceil(t.height/this._source.tileSize)+1,i=Math.floor(e*n*5),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(r)},n.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var n={};for(var i in this._tiles){var r=this._tiles[i];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+e),n[r.tileID.key]=r}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},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=e.coveringZoomLevel(this._source),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(r,o);if(Mt(this._source.type)){for(var u={},c={},h=0,p=Object.keys(l);hthis._source.maxzoom){var g=d.children(this._source.maxzoom)[0],y=this.getTile(g);if(y&&y.hasData()){i[g.key]=g;continue}}else{var v=d.children(this._source.maxzoom);if(i[v[0].key]&&i[v[1].key]&&i[v[2].key]&&i[v[3].key])continue}for(var _=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))&&_&&(m=this._addTile(b)),m&&(i[b.key]=b,_=m.wasRequested(),m.hasData()))break}}}return i},n.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],n=void 0,i=this._tiles[t].tileID;i.overscaledZ>0;){if(i.key in this._loadedParentTiles){n=this._loadedParentTiles[i.key];break}e.push(i.key);var r=i.scaledTo(i.overscaledZ-1);if(n=this._getLoadedTile(r))break;i=r}for(var o=0,a=e;o0||(e.hasData()&&"reloading"!==e.state?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(),h=1/0,p=1/0,f=-1/0,d=-1/0,m=0,g=u;m=0&&y[1].y+g>=0){var v=l.map((function(t){return s.getTilePoint(t)})),_=u.map((function(t){return s.getTilePoint(t)}));o.push({tile:i,tileID:s,queryGeometry:v,cameraQueryGeometry:_,scale:m})}}},_=0;_=t.browser.now())return!0}return!1},n.prototype.setFeatureState=function(t,e,n){this._state.updateState(t=t||"_geojsonTileLayer",e,n)},n.prototype.removeFeatureState=function(t,e,n){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,n)},n.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},n.prototype.setDependencies=function(t,e,n){var i=this._tiles[t];i&&i.setDependencies(e,n)},n.prototype.reloadTilesForDependencies=function(t,e){for(var n in this._tiles)this._tiles[n].hasDependency(t,e)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(t,e)}))},n}(t.Evented);function It(t,e){var n=Math.abs(2*t.wrap)-+(t.wrap<0),i=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||i-n||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Mt(t){return"raster"===t||"image"===t||"video"===t}function Lt(){return new t.window.Worker(Kr.workerUrl)}zt.maxOverzooming=10,zt.maxUnderzooming=3;var Dt="mapboxgl_preloaded_worker_pool",Bt=function(){this.active={}};Bt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(r-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))};var Yt=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=-e[0]&&n<=e[0]&&i>=-e[1]&&i<=e[1]}function ne(e,n,i,r,o,a,s,l){var u=r?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,i.transform.zoom),h=[256/i.width*2+1,256/i.height*2+1],p=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;p.clear();for(var f=e.lineVertexArray,d=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,g=!1,y=0;yMath.abs(i.x-n.x)*r?{useVertical:!0}:(e===t.WritingMode.vertical?n.yi.x)?{needsFlipping:!0}:null}function oe(e,n,i,r,o,a,s,l,u,c,h,p,f,d){var m,g=n/24,y=e.lineOffsetX*g,v=e.lineOffsetY*g;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=ie(g,l,y,v,i,h,p,e,u,a,f);if(!w)return{notEnoughRoom:!0};var E=$t(w.first.point,s).point,S=$t(w.last.point,s).point;if(r&&!i){var T=re(e.writingMode,E,S,d);if(T)return T}m=[w.first];for(var A=e.glyphStartIndex+1;A<_-1;A++)m.push(se(g*l.getoffsetX(A),y,v,i,h,p,e.segment,x,b,u,a,f));m.push(w.last)}else{if(r&&!i){var k=$t(p,o).point,C=e.lineStartIndex+e.segment+1,P=new t.Point(u.getx(C),u.gety(C)),z=$t(P,o),I=z.signedDistanceFromCamera>0?z.point:ae(p,P,k,1,o),M=re(e.writingMode,k,I,d);if(M)return M}var L=se(g*l.getoffsetX(e.glyphStartIndex),y,v,i,h,p,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f);if(!L)return{notEnoughRoom:!0};m=[L]}for(var D=0,B=m;D0?1:-1,m=0;r&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var g=d>0?l+s:l+s+1,y=o,v=o,_=0,x=0,b=Math.abs(f),w=[];_+x<=b;){if((g+=d)=u)return null;if(v=y,w.push(y),void 0===(y=p[g])){var E=new t.Point(c.getx(g),c.gety(g)),S=$t(E,h);if(S.signedDistanceFromCamera>0)y=p[g]=S.point;else{var T=g-d;y=ae(0===_?a:new t.Point(c.getx(T),c.gety(T)),E,v,b-_+1,h)}}_+=x,x=v.dist(y)}var A=(b-_)/x,k=y.sub(v),C=k.mult(A)._add(v);C._add(k._unit()._perp()._mult(i*d));var P=m+Math.atan2(y.y-v.y,y.x-v.x);return w.push(C),{point:C,angle:P,path:w}}Yt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Yt.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)},Yt.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)},Yt.prototype._insertBoxCell=function(t,e,n,i,r,o){this.boxCells[r].push(o)},Yt.prototype._insertCircleCell=function(t,e,n,i,r,o){this.circleCells[r].push(o)},Yt.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;s0:a},Yt.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=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:i,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}},r),i?u.length>0:u},Yt.prototype.query=function(t,e,n,i,r){return this._query(t,e,n,i,!1,r)},Yt.prototype.hitTest=function(t,e,n,i,r){return this._query(t,e,n,i,!0,r)},Yt.prototype.hitTestCircle=function(t,e,n,i){return this._queryCircle(t,e,n,!0,i)},Yt.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,h=0,p=u;h=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 g=this.circles,y=0,v=m;ya*a+s*s},Yt.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 h=l-s,p=c-u;return h*h+p*p<=n*n};var le=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var n=0;n=1;I--)z.push(C.path[I]);for(var M=1;M0){for(var R=z[0].clone(),O=z[0].clone(),F=1;F=T.x&&O.x<=A.x&&R.y>=T.y&&O.y<=A.y?[z]:O.xA.x||O.yA.y?[]:t.clipLine([z],T.x,T.y,A.x,A.y)}for(var N=0,U=B;N=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,n,i){return n>=0&&t=0&&e0?(this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(m=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:g,width:n,height:i,anchor:t,textBoxScale:r,prevAnchor:m},this.markUsedJustification(p,t,h,f),p.allowVerticalPlacement&&(this.markUsedOrientation(p,f,h),this.placedOrientations[h.crossTileID]=f),{shift:y,placedGlyphBoxes:v}):void 0},be.prototype.placeLayerBucketPart=function(e,n,i){var r=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,h=o.textPixelRatio,p=o.holdingForFade,f=o.collisionBoxArray,d=o.partiallyEvaluatedTextSize,m=o.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),v=s.get("text-allow-overlap"),_=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),E="viewport-y"===s.get("symbol-z-order"),S=v&&(_||!a.hasIconData()||y),T=_&&(v||!a.hasTextData()||g);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var A=function(e,o){if(!n[e.crossTileID])if(p)r.placements[e.crossTileID]=new me(!1,!1,!1);else{var f,E=!1,A=!1,k=!0,C=null,P={box:null,offscreen:null},z={box:null,offscreen:null},I=null,M=null,L=0,D=0,B=0;o.textFeatureIndex?L=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(L=e.featureIndex),o.verticalTextFeatureIndex&&(D=o.verticalTextFeatureIndex);var R=o.textBox;if(R){var O=function(n){var i=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!n&&r.prevPlacement){var o=r.prevPlacement.placedOrientations[e.crossTileID];o&&(r.placedOrientations[e.crossTileID]=o,r.markUsedOrientation(a,i=o,e))}return i},F=function(n,i){if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var r=0,s=a.writingModes;r0&&(N=N.filter((function(t){return t!==U.anchor}))).unshift(U.anchor)}var V=function(t,n,i){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!_?n:null,p={box:[],offscreen:!1},f=v?2*N.length:N.length,d=0;d=N.length,e,a,i,c);if(g&&(p=g.placedGlyphBoxes)&&p.box&&p.box.length){E=!0,C=g.shift;break}}return p};F((function(){return V(R,o.iconBox,t.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&!(P&&P.box&&P.box.length)&&e.numVerticalGlyphVertices>0&&n?V(n,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),P&&(E=P.box,k=P.offscreen);var j=O(P&&P.box);if(!E&&r.prevPlacement){var Z=r.prevPlacement.variableOffsets[e.crossTileID];Z&&(r.variableOffsets[e.crossTileID]=Z,r.markUsedJustification(a,Z.anchor,e,j))}}else{var q=function(t,n){var i=r.collisionIndex.placeCollisionBox(t,v,h,l,m.predicate);return i&&i.box&&i.box.length&&(r.markUsedOrientation(a,n,e),r.placedOrientations[e.crossTileID]=n),i};F((function(){return q(R,t.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?q(n,t.WritingMode.vertical):{box:null,offscreen:null}})),O(P&&P.box&&P.box.length)}}if(E=(f=P)&&f.box&&f.box.length>0,k=f&&f.offscreen,e.useRuntimeCollisionCircles){var W=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),G=t.evaluateSizeForFeature(a.textSizeData,d,W),H=s.get("text-padding");I=r.collisionIndex.placeCollisionCircles(v,W,a.lineVertexArray,a.glyphOffsetArray,G,l,u,c,i,b,m.predicate,e.collisionCircleDiameter,H),E=v||I.circles.length>0&&!I.collisionDetected,k=k&&I.offscreen}if(o.iconFeatureIndex&&(B=o.iconFeatureIndex),o.iconBox){var K=function(t){var e=w&&C?xe(t,C.x,C.y,x,b,r.transform.angle):t;return r.collisionIndex.placeCollisionBox(e,_,h,l,m.predicate)};A=z&&z.box&&z.box.length&&o.verticalIconBox?(M=K(o.verticalIconBox)).box.length>0:(M=K(o.iconBox)).box.length>0,k=k&&M.offscreen}var X=g||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,Y=y||0===e.numIconVertices;if(X||Y?Y?X||(A=A&&E):E=A&&E:A=E=A&&E,E&&f&&f.box&&r.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,z&&z.box&&D?D:L,m.ID),A&&M&&r.collisionIndex.insertCollisionBox(M.box,s.get("icon-ignore-placement"),a.bucketInstanceId,B,m.ID),I&&(E&&r.collisionIndex.insertCollisionCircles(I.circles,s.get("text-ignore-placement"),a.bucketInstanceId,L,m.ID),i)){var J=a.bucketInstanceId,Q=r.collisionCircleArrays[J];void 0===Q&&(Q=r.collisionCircleArrays[J]=new ge);for(var $=0;$=0;--C){var P=k[C];A(a.symbolInstances.get(P),a.collisionArrays[P])}else for(var z=e.symbolInstanceStart;z=0&&(e.text.placedSymbolArray.get(l).crossTileID=o>=0&&l!==o?0:i.crossTileID)}},be.prototype.markUsedOrientation=function(e,n,i){for(var r=n===t.WritingMode.horizontal||n===t.WritingMode.horizontalOnly?n:0,o=n===t.WritingMode.vertical?n:0,a=0,s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];a0,v=r.placedOrientations[o.crossTileID],_=v===t.WritingMode.vertical,x=v===t.WritingMode.horizontal||v===t.WritingMode.horizontalOnly;if(s>0||l>0){var b=ze(g.text);d(e.text,s,_?Ie:b),d(e.text,l,x?Ie:b);var w=g.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=w||_?1:0)})),o.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||x?1:0);var E=r.variableOffsets[o.crossTileID];E&&r.markUsedJustification(e,E.anchor,o,v);var S=r.placedOrientations[o.crossTileID];S&&(r.markUsedJustification(e,"left",o,S),r.markUsedOrientation(e,S,o))}if(y){var T=ze(g.icon),A=!(p&&o.verticalPlacedIconSymbolIndex&&_);o.placedIconSymbolIndex>=0&&(d(e.icon,o.numIconVertices,A?T:Ie),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=g.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,o.numVerticalIconVertices,A?Ie:T),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var k=e.collisionArrays[i];if(k){var C=new t.Point(0,0);if(k.textBox||k.verticalTextBox){var P=!0;if(u){var z=r.variableOffsets[m];z?(C=_e(z.anchor,z.width,z.height,z.textOffset,z.textBoxScale),c&&C._rotate(h?r.transform.angle:-r.transform.angle)):P=!1}k.textBox&&we(e.textCollisionBox.collisionVertexArray,g.text.placed,!P||_,C.x,C.y),k.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,g.text.placed,!P||x,C.x,C.y)}var I=Boolean(!x&&k.verticalIconBox);k.iconBox&&we(e.iconCollisionBox.collisionVertexArray,g.icon.placed,I,p?C.x:0,p?C.y:0),k.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,g.icon.placed,!I,p?C.x:0,p?C.y:0)}}},g=0;gt},be.prototype.setStale=function(){this.stale=!0};var Ee=Math.pow(2,25),Se=Math.pow(2,24),Te=Math.pow(2,17),Ae=Math.pow(2,16),ke=Math.pow(2,9),Ce=Math.pow(2,8),Pe=Math.pow(2,1);function ze(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*Ee+e*Se+n*Te+e*Ae+n*ke+e*Ce+n*Pe+e}var Ie=0,Me=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Me.prototype.continuePlacement=function(t,e,n,i,r){for(var o=this._bucketParts;this._currentTileIndex2};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 Me(s)),this._inProgressLayer.continuePlacement(i[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Le.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Be=function(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var i=0;it.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;c1?"@2x":"",l=t.getJSON(n.transformRequest(n.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,a||(a=t,r=e,c())})),u=t.getImage(n.transformRequest(n.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,h=l.x,p=l.y,f=l.sdf,d=l.pixelRatio,m=l.stretchX,g=l.stretchY,y=l.content,v=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,v,{x:h,y:p},{x:0,y:0},{width:u,height:c}),n[s]={data:v,pixelRatio:d,sdf:f,stretchX:m,stretchY:g,content:y}}i(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,(function(e,i){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(i)for(var r in i)n.imageManager.addImage(r,i[r]);n.imageManager.setLoaded(!0),n._availableImages=n.imageManager.listImages(),n.dispatcher.broadcast("setImages",n._availableImages),n.fire(new t.Event("data",{dataType:"style"}))}))},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;n0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},n.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,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 zt(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(Ne(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(r,e.source),e=t.clone$1(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}}),this._serializedLayers[o.id]=o.serialize()}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._serializedLayers[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.hasLayer=function(t){return t in this._layers},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.deepEqual(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$1(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$1(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.deepEqual(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.deepEqual(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];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&r?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||r?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(r,e.id,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;"vector"!==o||a?n&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):r.removeFeatureState(a,e.id,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.getFeatureState=function(e){this._checkLoaded();var n=e.source,i=e.sourceLayer,r=this.sourceCaches[n];if(void 0!==r){if("vector"!==r.getSource().type||i)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),r.getFeatureState(i,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+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]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,n=function(t){return"fill-extrusion"===e._layers[t].type},i={},r=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(n(a)){i[a]=o;for(var s=0,l=t;s=0;f--){var d=this._order[f];if(n(d))for(var m=r.length-1;m>=0;m--){var g=r[m].feature;if(i[g.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),$e=vn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),tn=vn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),en=vn("#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);}"),nn=vn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),rn=vn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),on=vn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),an=vn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),sn=vn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),ln=vn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),un=vn("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;}"),cn=vn("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),hn=vn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pn=vn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),fn=vn("uniform lowp float u_device_pixel_ratio;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/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),dn=vn("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;}"),mn=vn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),gn=vn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),yn=vn("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function vn(t,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=e.match(/attribute ([\w]+) ([\w]+)/g),r=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(r):r,s={};return{fragmentSource:t=t.replace(n,(function(t,e,n,i,r){return s[r]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+r+"\nvarying "+n+" "+i+" "+r+";\n#else\nuniform "+n+" "+i+" u_"+r+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+r+"\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n"})),vertexSource:e=e.replace(n,(function(t,e,n,i,r){var o="float"===i?"vec2":"vec4",a=r.match(/color/)?"color":o;return s[r]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+r+"\nuniform lowp float u_"+r+"_t;\nattribute "+n+" "+o+" a_"+r+";\nvarying "+n+" "+i+" "+r+";\n#else\nuniform "+n+" "+i+" u_"+r+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+r+" = a_"+r+";\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+r+" = unpack_mix_"+a+"(a_"+r+", u_"+r+"_t);\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+r+"\nuniform lowp float u_"+r+"_t;\nattribute "+n+" "+o+" a_"+r+";\n#else\nuniform "+n+" "+i+" u_"+r+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+n+" "+i+" "+r+" = a_"+r+";\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+n+" "+i+" "+r+" = unpack_mix_"+a+"(a_"+r+", u_"+r+"_t);\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n"})),staticAttributes:i,staticUniforms:a}}var _n=Object.freeze({__proto__:null,prelude:We,background:Ge,backgroundPattern:He,circle:Ke,clippingMask:Xe,heatmap:Ye,heatmapTexture:Je,collisionBox:Qe,collisionCircle:$e,debug:tn,fill:en,fillOutline:nn,fillOutlinePattern:rn,fillPattern:on,fillExtrusion:an,fillExtrusionPattern:sn,hillshadePrepare:ln,hillshade:un,line:cn,lineGradient:hn,linePattern:pn,lineSDF:fn,raster:dn,symbolIcon:mn,symbolSDF:gn,symbolTextAndIcon:yn}),xn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function bn(t){for(var e=[],n=0;n>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}wn.prototype.draw=function(t,e,n,i,r,o,a,s,l,u,c,h,p,f,d,m){var g,y=t.gl;if(!this.failedToCreate){for(var v in t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(i),t.setColorMode(r),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[v].set(a[v]);f&&f.setUniforms(t,this.binderUniforms,h,{zoom:p});for(var _=(g={},g[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[e],x=0,b=c.get();x0?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:Zn(r.paint.get("raster-hue-rotate"))};var o,a};function Zn(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 qn,Wn=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_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+i,u_texsize:u,u_texture:0}},Gn=function(e,n,i,r,o,a,s,l,u,c,h){var p=o.transform;return t.extend(Wn(e,n,i,r,o,a,s,l,u,c),{u_gamma_scale:r?Math.cos(p._pitch)*p.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+h})},Hn=function(e,n,i,r,o,a,s,l,u,c){return t.extend(Gn(e,n,i,r,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Kn=function(t,e,n){return{u_matrix:t,u_opacity:e,u_color:n}},Xn=function(e,n,i,r,o,a){return t.extend(function(t,e,n,i){var r=n.imageManager.getPattern(t.from.toString()),o=n.imageManager.getPattern(t.to.toString()),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,h=c*(i.tileID.canonical.x+i.tileID.wrap*u),p=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/pe(i,1,n.transform.tileZoom),u_pixel_coord_upper:[h>>16,p>>16],u_pixel_coord_lower:[65535&h,65535&p]}}(r,a,i,o),{u_matrix:e,u_opacity:n})},Yn={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),u_opacity:new t.Uniform1f(e,n.u_opacity)}},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.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade),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.Uniform3f(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.Uniform3f(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_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},collisionBox: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)}},collisionCircle:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,n.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,n.u_viewport_size)}},debug:function(e,n){return{u_color:new t.UniformColor(e,n.u_color),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_overlay:new t.Uniform1i(e,n.u_overlay),u_overlay_scale:new t.Uniform1f(e,n.u_overlay_scale)}},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),u_unpack:new t.Uniform4f(e,n.u_unpack)}},line:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_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_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_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_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_image:new t.Uniform1i(e,n.u_image),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_scale:new t.Uniform3f(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_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_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_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(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_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(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_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}},symbolTextAndIcon: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_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(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_texsize_icon:new t.Uniform2f(e,n.u_texsize_icon),u_texture:new t.Uniform1i(e,n.u_texture),u_texture_icon:new t.Uniform1i(e,n.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(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,i,r,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),h=[],p=0,f=0,d=0;d0){var b=t.create(),w=v;t.mul(b,y.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,y.placementViewportMatrix),h.push({circleArray:x,circleOffset:f,transform:w,invTransform:b}),f=p+=x.length/4}_&&c.draw(l,u.LINES,Tt.disabled,At.disabled,e.colorModeForRenderPass(),Ct.disabled,In(v,e.transform,g),i.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}if(s&&h.length){var E=e.useProgram("collisionCircle"),S=new t.StructArrayLayout2f1f2i16;S.resize(4*p),S._trim();for(var T=0,A=0,k=h;A=0&&(m[y.associatedIconIndex]={shiftedAnchor:S,angle:T})}else ue(y.numGlyphs,f)}if(h){d.clear();for(var k=e.icon.placedSymbolArray,C=0;C0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=n?(s-n.timeAdded)/a:-1,c=i.getSource(),h=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),p=!n||Math.abs(n.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),f=p&&e.refreshedUponExpiration?1:t.clamp(p?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var ui=new t.Color(1,0,0,1),ci=new t.Color(0,1,0,1),hi=new t.Color(0,0,1,1),pi=new t.Color(1,0,1,1),fi=new t.Color(0,1,1,1);function di(t,e,n,i){gi(t,0,e+n/2,t.transform.width,n,i)}function mi(t,e,n,i){gi(t,e-n/2,0,n,t.transform.height,i)}function gi(e,n,i,r,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,r*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function yi(e,n,i){var r=e.context,o=r.gl,a=i.posMatrix,s=e.useProgram("debug"),l=Tt.disabled,u=At.disabled,c=e.colorModeForRenderPass();r.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(r,o.LINE_STRIP,l,u,c,Ct.disabled,Ln(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var h=n.getTileByID(i.key).latestRawTileData,p=Math.floor((h&&h.byteLength||0)/1024),f=n.getTile(i).tileSize,d=512/Math.min(f,512)*(i.overscaledZ/e.transform.zoom)*.5,m=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(m+=" => "+i.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var n=t.debugOverlayCanvas,i=t.context.gl,r=t.debugOverlayCanvas.getContext("2d");r.clearRect(0,0,n.width,n.height),r.shadowColor="white",r.shadowBlur=2,r.lineWidth=1.5,r.strokeStyle="white",r.textBaseline="top",r.font="bold 36px Open Sans, sans-serif",r.fillText(e,5,5),r.strokeText(e,5,5),t.debugOverlayTexture.update(n),t.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}(e,m+" "+p+"kb"),s.draw(r,o.TRIANGLES,l,u,kt.alphaBlended,Ct.disabled,Ln(a,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var vi={symbol:function(e,n,i,r,o){if("translucent"===e.renderPass){var a=At.disabled,s=e.colorModeForRenderPass();i.layout.get("text-variable-anchor")&&function(e,n,i,r,o,a,s){for(var l=n.transform,u="map"===o,c="map"===a,h=0,p=e;h256&&this.clearStencil(),n.setColorMode(kt.disabled),n.setDepthMode(Tt.disabled);var r=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new At({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_i.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new At({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_i.prototype.stencilConfigForOverlap=function(t){var e,n=this.context.gl,i=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),r=i[i.length-1].overscaledZ,o=i[0].overscaledZ-r+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s=0;this.currentLayer--){var x=this.style._layers[r[this.currentLayer]],b=o[x.source],w=c[x.source];this._renderTileClippingMasks(x,w),this.renderLayer(this,b,x,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},_i.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),n=this.imageManager.getPattern(t.to.toString());return!e||!n},_i.prototype.useProgram=function(t,e){this.cache=this.cache||{};var n=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new wn(this.context,t,_n[t],e,Yn[t],this._showOverdrawInspector)),this.cache[n]},_i.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()},_i.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)},_i.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},_i.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var xi=function(t,e){this.points=t,this.planes=e};xi.fromInvProjectionMatrix=function(e,n,i){var r=Math.pow(2,i),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(n){return t.transformMat4([],n,e)})).map((function(e){return t.scale$1([],e,1/e[3]/n*r)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var n=t.sub([],o[e[0]],o[e[1]]),i=t.sub([],o[e[2]],o[e[1]]),r=t.normalize([],t.cross([],n,i)),a=-t.dot(r,o[e[1]]);return r.concat(a)}));return new xi(o,a)};var bi=function(e,n){this.min=e,this.max=n,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};bi.prototype.quadrant=function(e){for(var n=[e%2==0,e<2],i=t.clone$2(this.min),r=t.clone$2(this.max),o=0;o=0;if(0===a)return 0;a!==n.length&&(i=!1)}if(i)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;hthis.max[l]-this.min[l])return 0}return 1};var wi=function(t,e,n,i){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=n,this.right=i};wi.prototype.interpolate=function(e,n,i){return null!=n.top&&null!=e.top&&(this.top=t.number(e.top,n.top,i)),null!=n.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,n.bottom,i)),null!=n.left&&null!=e.left&&(this.left=t.number(e.left,n.left,i)),null!=n.right&&null!=e.right&&(this.right=t.number(e.right,n.right,i)),this},wi.prototype.getCenter=function(e,n){var i=t.clamp((this.left+e-this.right)/2,0,e),r=t.clamp((this.top+n-this.bottom)/2,0,n);return new t.Point(i,r)},wi.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},wi.prototype.clone=function(){return new wi(this.top,this.bottom,this.left,this.right)},wi.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Ei=function(e,n,i,r,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=null==i?0:i,this._maxPitch=null==r?60:r,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new wi,this._posMatrixCache={},this._alignedPosMatrixCache={}},Si={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Ei.prototype.clone=function(){var t=new Ei(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Si.minZoom.get=function(){return this._minZoom},Si.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Si.maxZoom.get=function(){return this._maxZoom},Si.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Si.minPitch.get=function(){return this._minPitch},Si.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Si.maxPitch.get=function(){return this._maxPitch},Si.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Si.renderWorldCopies.get=function(){return this._renderWorldCopies},Si.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Si.worldSize.get=function(){return this.tileSize*this.scale},Si.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Si.size.get=function(){return new t.Point(this.width,this.height)},Si.bearing.get=function(){return-this.angle/Math.PI*180},Si.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))},Si.pitch.get=function(){return this._pitch/Math.PI*180},Si.pitch.set=function(e){var n=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Si.fov.get=function(){return this._fov/Math.PI*180},Si.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())},Si.zoom.get=function(){return this._zoom},Si.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())},Si.center.get=function(){return this._center},Si.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.padding.get=function(){return this._edgeInsets.toJSON()},Si.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Si.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Ei.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Ei.prototype.interpolatePadding=function(t,e,n){this._unmodified=!1,this._edgeInsets.interpolate(t,e,n),this._constrain(),this._calcMatrices()},Ei.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Ei.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},Ei.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),i=n;if(void 0!==e.minzoom&&ne.maxzoom&&(n=e.maxzoom);var r=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,n),a=[o*r.x,o*r.y,0],s=xi.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=n);var u=function(t){return{aabb:new bi([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],h=[],p=n,f=e.reparseOverscaled?i:n;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var m=c.pop(),g=m.x,y=m.y,v=m.fullyVisible;if(!v){var _=m.aabb.intersects(s);if(0===_)continue;v=2===_}var x=m.aabb.distanceX(a),b=m.aabb.distanceY(a),w=Math.max(Math.abs(x),Math.abs(b));if(m.zoom===p||w>3+(1<=l)h.push({tileID:new t.OverscaledTileID(m.zoom===p?f:m.zoom,m.wrap,m.zoom,g,y),distanceSq:t.sqrLen([a[0]-.5-g,a[1]-.5-y])});else for(var E=0;E<4;E++){var S=(g<<1)+E%2,T=(y<<1)+(E>>1);c.push({aabb:m.aabb.quadrant(E),zoom:m.zoom+1,x:S,y:T,wrap:m.wrap,fullyVisible:v})}}return h.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Ei.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Si.unmodified.get=function(){return this._unmodified},Ei.prototype.zoomScale=function(t){return Math.pow(2,t)},Ei.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Ei.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)},Ei.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Si.point.get=function(){return this.project(this.center)},Ei.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())},Ei.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Ei.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Ei.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Ei.prototype.coordinateLocation=function(t){return t.toLngLat()},Ei.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[1]/r,s=i[1]/o,l=n[2]/r,u=i[2]/o,c=l===u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(n[0]/r,i[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},Ei.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])},Ei.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)))},Ei.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},Ei.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])},Ei.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]},Ei.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Ei.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 h=this.latRange;o=t.mercatorYfromLat(h[1])*this.worldSize,e=(a=t.mercatorYfromLat(h[0])*this.worldSize)-oa&&(r=a-g)}if(this.lngRange){var y=f.x,v=u.x/2;y-vl&&(i=l-v)}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}},Ei.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+e.y/this.height),r=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,f=Math.cos(this.angle),d=Math.sin(this.angle),m=a-Math.round(a)+f*h+d*p,g=s-Math.round(s)+f*p+d*h,y=new Float64Array(c);if(t.translate(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this.alignedProjMatrix=y,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Ei.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},Ei.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},Ei.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=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Ti.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var Ai={linearity:.3,easing:t.bezier(0,0,.3,1)},ki=t.extend({deceleration:2500,maxSpeed:1400},Ai),Ci=t.extend({deceleration:20,maxSpeed:1400},Ai),Pi=t.extend({deceleration:1e3,maxSpeed:360},Ai),zi=t.extend({deceleration:1e3,maxSpeed:90},Ai),Ii=function(t){this._map=t,this.clear()};function Mi(t,e){(!t.duration||t.duration0&&n-e[0].time>160;)e.shift()},Ii.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},i=0,r=this._inertiaBuffer;i=this._clickTolerance||this._map.fire(new Di(t.type,this._map,t))},Oi.prototype.dblclick=function(t){return this._firePreventable(new Di(t.type,this._map,t))},Oi.prototype.mouseover=function(t){this._map.fire(new Di(t.type,this._map,t))},Oi.prototype.mouseout=function(t){this._map.fire(new Di(t.type,this._map,t))},Oi.prototype.touchstart=function(t){return this._firePreventable(new Bi(t.type,this._map,t))},Oi.prototype.touchmove=function(t){this._map.fire(new Bi(t.type,this._map,t))},Oi.prototype.touchend=function(t){this._map.fire(new Bi(t.type,this._map,t))},Oi.prototype.touchcancel=function(t){this._map.fire(new Bi(t.type,this._map,t))},Oi.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Oi.prototype.isEnabled=function(){return!0},Oi.prototype.isActive=function(){return!1},Oi.prototype.enable=function(){},Oi.prototype.disable=function(){};var Fi=function(t){this._map=t};Fi.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Fi.prototype.mousemove=function(t){this._map.fire(new Di(t.type,this._map,t))},Fi.prototype.mousedown=function(){this._delayContextMenu=!0},Fi.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Di("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Fi.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Di(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Fi.prototype.isEnabled=function(){return!0},Fi.prototype.isActive=function(){return!1},Fi.prototype.enable=function(){},Fi.prototype.disable=function(){};var Ni=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Ui(t,e){for(var n={},i=0;ithis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=function(e){for(var n=new t.Point(0,0),i=0,r=e;i30)&&(this.aborted=!0)}}},Vi.prototype.touchend=function(t,e,n){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){var i=!this.aborted&&this.centroid;if(this.reset(),i)return i}};var ji=function(t){this.singleTap=new Vi(t),this.numTaps=t.numTaps,this.reset()};ji.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ji.prototype.touchstart=function(t,e,n){this.singleTap.touchstart(t,e,n)},ji.prototype.touchmove=function(t,e,n){this.singleTap.touchmove(t,e,n)},ji.prototype.touchend=function(t,e,n){var i=this.singleTap.touchend(t,e,n);if(i){var r=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(i)<30;if(r&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}};var Zi=function(){this._zoomIn=new ji({numTouches:1,numTaps:2}),this._zoomOut=new ji({numTouches:2,numTaps:1}),this.reset()};Zi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Zi.prototype.touchstart=function(t,e,n){this._zoomIn.touchstart(t,e,n),this._zoomOut.touchstart(t,e,n)},Zi.prototype.touchmove=function(t,e,n){this._zoomIn.touchmove(t,e,n),this._zoomOut.touchmove(t,e,n)},Zi.prototype.touchend=function(t,e,n){var i=this,r=this._zoomIn.touchend(t,e,n),o=this._zoomOut.touchend(t,e,n);return r?(this._active=!0,t.preventDefault(),setTimeout((function(){return i.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(r)},{originalEvent:t})}}):o?(this._active=!0,t.preventDefault(),setTimeout((function(){return i.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},Zi.prototype.touchcancel=function(){this.reset()},Zi.prototype.enable=function(){this._enabled=!0},Zi.prototype.disable=function(){this._enabled=!1,this.reset()},Zi.prototype.isEnabled=function(){return this._enabled},Zi.prototype.isActive=function(){return this._active};var qi={0:1,2:2},Wi=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Wi.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Wi.prototype._correctButton=function(t,e){return!1},Wi.prototype._move=function(t,e){return{}},Wi.prototype.mousedown=function(t,e){if(!this._lastPoint){var i=n.mouseButton(t);this._correctButton(t,i)&&(this._lastPoint=e,this._eventButton=i)}},Wi.prototype.mousemoveWindow=function(t,e){var n=this._lastPoint;if(n)if(t.preventDefault(),function(t,e){var n=qi[e];return void 0===t.buttons||(t.buttons&n)!==n}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(n)0&&(this._active=!0);var r=Ui(i,n),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var l in r){var u=r[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,r[l]=u)}if(this._touches=r,!(sMath.abs(t.x)}var ir=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,nr(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,n){var i=t[0].sub(this._lastPoints[0]),r=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,r,n.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+r.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,n){if(void 0!==this._valid)return this._valid;var i=t.mag()>=2,r=e.mag()>=2;if(i||r){if(!i||!r)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;var o=t.y>0==e.y>0;return nr(t)&&nr(e)&&o}},e}(Yi),rr={panStep:100,bearingStep:15,pitchStep:10},or=function(){var t=rr;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function ar(t){return t*(2-t)}or.prototype.reset=function(){this._active=!1},or.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var n=0,i=0,r=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?i=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?i=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?r=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?r=-1:(t.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ar,zoom:n?Math.round(l)+n*(t.shiftKey?2:1):l,bearing:s.getBearing()+i*e._bearingStep,pitch:s.getPitch()+r*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},or.prototype.enable=function(){this._enabled=!0},or.prototype.disable=function(){this._enabled=!1,this.reset()},or.prototype.isEnabled=function(){return this._enabled},or.prototype.isActive=function(){return this._active};var sr=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};sr.prototype.setZoomRate=function(t){this._defaultZoomRate=t},sr.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},sr.prototype.isEnabled=function(){return!!this._enabled},sr.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},sr.prototype.isZooming=function(){return!!this._zooming},sr.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},sr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},sr.prototype.wheel=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._active||this._start(e)),e.preventDefault()}},sr.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},sr.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var 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=!0,this._handler._triggerRenderFrame())}},sr.prototype.renderFrame=function(){return this._onScrollFrame()},sr.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,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,s="number"==typeof this._targetZoom?this._targetZoom:n.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var h=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),p=u(h);a=t.number(l,s,p),h<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},sr.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},sr.prototype.reset=function(){this._active=!1};var lr=function(t,e){this._clickZoom=t,this._tapZoom=e};lr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},lr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},lr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},lr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ur=function(){this.reset()};ur.prototype.reset=function(){this._active=!1},ur.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(t.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:t})}}},ur.prototype.enable=function(){this._enabled=!0},ur.prototype.disable=function(){this._enabled=!1,this.reset()},ur.prototype.isEnabled=function(){return this._enabled},ur.prototype.isActive=function(){return this._active};var cr=function(){this._tap=new ji({numTouches:1,numTaps:1}),this.reset()};cr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},cr.prototype.touchstart=function(t,e,n){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(t,e,n))},cr.prototype.touchmove=function(t,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var i=e[0],r=i.y-this._swipePoint.y;return this._swipePoint=i,t.preventDefault(),this._active=!0,{zoomDelta:r/128}}}else this._tap.touchmove(t,e,n)},cr.prototype.touchend=function(t,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(t,e,n)&&(this._tapTime=t.timeStamp)},cr.prototype.touchcancel=function(){this.reset()},cr.prototype.enable=function(){this._enabled=!0},cr.prototype.disable=function(){this._enabled=!1,this.reset()},cr.prototype.isEnabled=function(){return this._enabled},cr.prototype.isActive=function(){return this._active};var hr=function(t,e,n){this._el=t,this._mousePan=e,this._touchPan=n};hr.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},hr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},hr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pr=function(t,e,n){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n};pr.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pr.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pr.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pr.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var fr=function(t,e,n,i){this._el=t,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0};fr.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},fr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},fr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},fr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},fr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},fr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var dr=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(t.Event);function gr(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yr=function(e,i){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ii(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i),t.bindAll(["handleEvent","handleWindowEvent"],this);var r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;oo?Math.min(2,b):Math.max(.5,b),w=Math.pow(g,1-e),E=r.unproject(_.add(x.mult(e*w)).mult(m));r.setLocationAtPoint(r.renderWorldCopies?E.wrap():E,d)}i._fireMoveEvents(n)}),(function(t){i._afterEase(n,t)}),e),this},n.prototype._prepareEase=function(e,n,i){void 0===i&&(i={}),this._moving=!0,n||i.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!i.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,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var i=this._zooming,r=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new t.Event("zoomend",e)),r&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},n.prototype.flyTo=function(e,n){var i=this;if(!e.essential&&t.browser.prefersReducedMotion){var r=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(r,n)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,h="bearing"in e?this._normalizeBearing(e.bearing,s):s,p="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:o.padding,d=o.zoomScale(c-a),m=t.Point.convert(e.offset),g=o.centerPoint.add(m),y=o.pointLocation(g),v=t.LngLat.convert(e.center||y);this._normalizeCenter(v);var _=o.project(y),x=o.project(v).sub(_),b=e.curve,w=Math.max(o.width,o.height),E=w/d,S=x.mag();if("minZoom"in e){var T=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),A=w/o.zoomScale(T-a);b=Math.sqrt(A/S*2)}var k=b*b;function C(t){var e=(E*E-w*w+(t?-1:1)*k*k*S*S)/(2*(t?E:w)*k*S);return Math.log(Math.sqrt(e*e+1)-e)}function P(t){return(Math.exp(t)-Math.exp(-t))/2}function z(t){return(Math.exp(t)+Math.exp(-t))/2}var I=C(0),M=function(t){return z(I)/z(I+b*t)},L=function(t){return w*((z(I)*(P(e=I+b*t)/z(e))-P(I))/k)/S;var e},D=(C(1)-I)/b;if(Math.abs(S)<1e-6||!isFinite(D)){if(Math.abs(w-E)<1e-6)return this.easeTo(e,n);var B=Ee.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==h,this._pitching=p!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(n,!1),this._ease((function(e){var r=e*D,d=1/M(r);o.zoom=1===e?c:a+o.scaleZoom(d),i._rotating&&(o.bearing=t.number(s,h,e)),i._pitching&&(o.pitch=t.number(l,p,e)),i._padding&&(o.interpolatePadding(u,f,e),g=o.centerPoint.add(m));var y=1===e?v:o.unproject(_.add(x.mult(L(r))).mult(d));o.setLocationAtPoint(o.renderWorldCopies?y.wrap():y,g),i._fireMoveEvents(n)}),(function(){return i._afterEase(n)}),e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,e)}if(!t){var i=this.handlers;i&&i.stop()}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)180?-360:n<-180?360:0}},n}(t.Evented),_r=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};_r.prototype.getDefaultPosition=function(){return"bottom-right"},_r.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},_r.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,this._attribHTML=void 0},_r.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:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var i=n.reduce((function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i=0)return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},_r.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var xr=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};xr.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.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},xr.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},xr.prototype.getDefaultPosition=function(){return"bottom-left"},xr.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},xr.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}},xr.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 br=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};br.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},br.prototype.remove=function(t){for(var e=this._currentlyRunning,n=0,i=e?this._queue.concat(e):this._queue;ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var r=new Ei(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(i.call(this,r,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new br,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},wr,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Sr))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 n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new yr(this,e),this._hash=e.hash&&new Ti("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new _r({customAttribution:e.customAttribution})),this.addControl(new xr,e.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(e){n._update("style"===e.dataType),n.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){n.fire(new t.Event(e.dataType+"dataloading",e))}))}i&&(r.__proto__=i),(r.prototype=Object.create(i&&i.prototype)).constructor=r;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return 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];this._resizeCanvas(i,r),this.transform.resize(i,r),this.painter.resize(i,r);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},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?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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.getMaxZoom=function(){return this.transform.maxZoom},r.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},r.prototype.getMaxPitch=function(){return this.transform.maxPitch},r.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},r.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},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.handlers.isMoving()},r.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},r.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},r.prototype._createDelegatedListener=function(t,e,n){var i,r=this;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 Di(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 Di(t,r,i.originalEvent)))},mouseout:function(e){a&&(a=!1,n.call(r,new Di(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)}},r.prototype.on=function(t,e,n){if(void 0===n)return i.prototype.on.call(this,t,e);var r=this._createDelegatedListener(t,e,n);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(r),r.delegates)this.on(o,r.delegates[o]);return this},r.prototype.once=function(t,e,n){if(void 0===n)return i.prototype.once.call(this,t,e);var r=this._createDelegatedListener(t,e,n);for(var o in r.delegates)this.once(o,r.delegates[o]);return this},r.prototype.off=function(t,e,n){var r=this;return void 0===n?i.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(i){for(var o=i[t],a=0;a180;){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}Ir.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),n.disableDrag()},Ir.prototype.move=function(t,e){var n=this.map,i=this.mouseRotate.mousemoveWindow(t,e);if(i&&i.bearingDelta&&n.setBearing(n.getBearing()+i.bearingDelta),this.mousePitch){var r=this.mousePitch.mousemoveWindow(t,e);r&&r.pitchDelta&&n.setPitch(n.getPitch()+r.pitchDelta)}},Ir.prototype.off=function(){var t=this.element;n.removeEventListener(t,"mousedown",this.mousedown),n.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(t,"touchmove",this.touchmove),n.removeEventListener(t,"touchend",this.touchend),n.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Ir.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(t.window,"mousemove",this.mousemove),n.removeEventListener(t.window,"mouseup",this.mouseup)},Ir.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),n.mousePos(this.element,e)),n.addEventListener(t.window,"mousemove",this.mousemove),n.addEventListener(t.window,"mouseup",this.mouseup)},Ir.prototype.mousemove=function(t){this.move(t,n.mousePos(this.element,t))},Ir.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ir.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ir.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ir.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||n.latitudee.getNorth())},i.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},i.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},i.prototype._updateCamera=function(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,r=this._map.getBearing(),o=t.extend({bearing:r},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(i),o,{geolocateSource:!0})},i.prototype._updateMarker=function(e){if(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},i.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),n=this._map.unproject([1,t]),i=e.distanceTo(n),r=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=r+"px",this._circleElement.style.height=r+"px"},i.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},i.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Nr)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Rr(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Rr({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(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")))}))},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":Fr--,Nr=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fr>1?(e={maximumAge:6e5,timeout:0},Nr=!0):(e=this.options.positionOptions,Nr=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},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),Vr={maxWidth:100,unit:"metric"},jr=function(e){this.options=t.extend({},Vr,e),t.bindAll(["_onMove","setUnit"],this)};function Zr(t,e,n){var i=n&&n.maxWidth||100,r=t._container.clientHeight/2,o=t.unproject([0,r]),a=t.unproject([i,r]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){var l=3.2808*s;l>5280?qr(e,i,l/5280,t._getUIString("ScaleControl.Miles")):qr(e,i,l,t._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?qr(e,i,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?qr(e,i,s/1e3,t._getUIString("ScaleControl.Kilometers")):qr(e,i,s,t._getUIString("ScaleControl.Meters"))}function qr(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)));t.style.width=e*(s/n)+"px",t.innerHTML=s+" "+i}jr.prototype.getDefaultPosition=function(){return"bottom-left"},jr.prototype._onMove=function(){Zr(this._map,this._container,this.options)},jr.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},jr.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},jr.prototype.setUnit=function(t){this.options.unit=t,Zr(this._map,this._container,this.options)};var Wr=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")};Wr.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Wr.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Wr.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Wr.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Wr.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Wr.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Wr.prototype._isFullscreen=function(){return this._fullscreen},Wr.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Wr.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 Gr={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Hr=function(e){function i(n){e.call(this),this.options=t.extend(Object.create(Gr),n),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},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("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},i.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},i.prototype.getElement=function(){return this._container},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.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},i.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},i.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},i.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},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="×",this._closeButton.addEventListener("click",this._onClose))},i.prototype._onMouseUp=function(t){this._update(t.point)},i.prototype._onMouseMove=function(t){this._update(t.point)},i.prototype._onDrag=function(t){this._update(t.point)},i.prototype._update=function(e){var i=this;if(this._map&&(this._lngLat||this._trackPointer)&&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 i._container.classList.add(t)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Mr(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var r=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=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(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=r.y+a.bottom.ythis._map.transform.height-u?["bottom"]:[],r.xthis._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=r.add(a[o]).round();n.setTransform(this._container,Lr[o]+" translate("+c.x+"px,"+c.y+"px)"),Dr(this._container,o,"popup")}},i.prototype._onClose=function(){this.remove()},i}(t.Evented),Kr={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:kr,NavigationControl:zr,GeolocateControl:Ur,AttributionControl:_r,ScaleControl:jr,FullscreenControl:Wr,Popup:Hr,Marker:Rr,Style:Ze,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Ft().acquire(Dt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Dt),Rt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Bt.workerCount},set workerCount(t){Bt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return Kr})),n}()},function(t,e,n){!function(){var e=this.gju={};function n(t){for(var e=[],n=[],i=0;ie!=i[o][0]>e&&t<(i[o][1]-i[r][1])*(e-i[r][0])/(i[o][0]-i[r][0])+i[r][1]&&(a=!a);return a}t.exports&&(t.exports=e),e.lineStringsIntersect=function(t,e){for(var n=[],i=0;i<=t.coordinates.length-2;++i)for(var r=0;r<=e.coordinates.length-2;++r){var o={x:t.coordinates[i][1],y:t.coordinates[i][0]},a={x:t.coordinates[i+1][1],y:t.coordinates[i+1][0]},s={x:e.coordinates[r][1],y:e.coordinates[r][0]},l={x:e.coordinates[r+1][1],y:e.coordinates[r+1][0]},u=(l.y-s.y)*(a.x-o.x)-(l.x-s.x)*(a.y-o.y);if(0!=u){var c=((l.x-s.x)*(o.y-s.y)-(l.y-s.y)*(o.x-s.x))/u,h=((a.x-o.x)*(o.y-s.y)-(a.y-o.y)*(o.x-s.x))/u;0<=c&&c<=1&&0<=h&&h<=1&&n.push({type:"Point",coordinates:[o.x+c*(a.x-o.x),o.y+c*(a.y-o.y)]})}}return 0==n.length&&(n=!1),n},e.pointInBoundingBox=function(t,e){return!(t.coordinates[1]e[1][0]||t.coordinates[0]e[1][1])},e.pointInPolygon=function(t,r){for(var o="Polygon"==r.type?[r.coordinates]:r.coordinates,a=!1,s=0;si)return!1}return!0},e.area=function(t){for(var e=0,n=t.coordinates[0],i=n.length-1,r=0;r0;)if(o=w[i-1],a=E[i-1],i--,a-o>1){for(h=t[a].lng()-t[o].lng(),p=t[a].lat()-t[o].lat(),Math.abs(h)>180&&(h=360-Math.abs(h)),f=(h*=Math.cos(x*(t[a].lat()+t[o].lat())))*h+p*p,T=o+1,s=o,u=-1;T180&&(d=360-Math.abs(d)),g=(d*=Math.cos(x*(t[T].lat()+t[o].lat())))*d+m*m,y=t[T].lng()-t[a].lng(),v=t[T].lat()-t[a].lat(),Math.abs(y)>180&&(y=360-Math.abs(y)),(l=g>=f+(_=(y*=Math.cos(x*(t[T].lat()+t[a].lat())))*y+v*v)?_:_>=f+g?g:(d*p-m*h)*(d*p-m*h)/f)>u&&(s=T,u=l);u',w:r,h:r}},setStyle:function(e){t.Util.setOptions(this,e),this.createIcon()}}),o=r.extend({initialize:function(e,n,i){t.Util.setOptions(this,i),this._latlng=e,this._heading=n,this.createIcon()},setHeading:function(t){this._heading=t},_getIconSVG:function(t,e){var n=t.radius,i=t.width+t.weight,r=2*(n+t.depth+t.weight),o="M0,0 l"+t.width/2+","+t.depth+" l-"+i+",0 z";return{className:"leaflet-control-locate-heading",svg:'',w:i,h:r}}}),a=t.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds:function(t){return t.bounds},flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:r,compassClass:o,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"fa fa-map-marker",iconLoading:"fa fa-spinner fa-spin",iconElementTag:"span",circlePadding:[0,0],metric:!0,createButtonCallback:function(e,n){var i=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",e);return i.title=n.strings.title,i.role="button",i.href="#",{link:i,icon:t.DomUtil.create(n.iconElementTag,n.icon,i)}},onLocationError:function(t,e){alert(t.message)},onLocationOutsideMapBounds:function(t){t.stop(),alert(t.options.strings.outsideMapBoundsMsg)},showPopup:!0,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0,setView:!1}},initialize:function(e){for(var n in e)"object"==typeof this.options[n]?t.extend(this.options[n],e[n]):this.options[n]=e[n];this.options.followMarkerStyle=t.extend({},this.options.markerStyle,this.options.followMarkerStyle),this.options.followCircleStyle=t.extend({},this.options.circleStyle,this.options.followCircleStyle),this.options.followCompassStyle=t.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd:function(e){var n=t.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=n,this._map=e,this._layer=this.options.layer||new t.LayerGroup,this._layer.addTo(e),this._event=void 0,this._compassHeading=null,this._prevBounds=null;var i=this.options.createButtonCallback(n,this.options);return this._link=i.link,this._icon=i.icon,t.DomEvent.on(this._link,"click",t.DomEvent.stopPropagation).on(this._link,"click",t.DomEvent.preventDefault).on(this._link,"click",this._onClick,this).on(this._link,"dblclick",t.DomEvent.stopPropagation),this._resetVariables(),this._map.on("unload",this._unload,this),n},_onClick:function(){this._justClicked=!0;var t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active&&void 0!==this._event){var e=this.options.clickBehavior,n=e.outOfView;switch(this._map.getBounds().contains(this._event.latlng)&&(n=t?e.inView:e.inViewNotFollowing),e[n]&&(n=e[n]),n){case"setView":this.setView();break;case"stop":if(this.stop(),this.options.returnToPrevBounds)(this.options.flyTo?this._map.flyToBounds:this._map.fitBounds).bind(this._map)(this._prevBounds)}}else this.options.returnToPrevBounds&&(this._prevBounds=this._map.getBounds()),this.start();this._updateContainerStyle()},start:function(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()},stop:function(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing:function(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate:function(){if(!this._active&&(this._map.locate(this.options.locateOptions),this._active=!0,this._map.on("locationfound",this._onLocationFound,this),this._map.on("locationerror",this._onLocationError,this),this._map.on("dragstart",this._onDrag,this),this._map.on("zoomstart",this._onZoom,this),this._map.on("zoomend",this._onZoomEnd,this),this.options.showCompass)){var e="ondeviceorientationabsolute"in window;if(e||"ondeviceorientation"in window){var n=this,i=function(){t.DomEvent.on(window,e?"deviceorientationabsolute":"deviceorientation",n._onDeviceOrientation,n)};DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((function(t){"granted"===t&&i()})):i()}}},_deactivate:function(){this._map.stopLocate(),this._active=!1,this.options.cacheLocation||(this._event=void 0),this._map.off("locationfound",this._onLocationFound,this),this._map.off("locationerror",this._onLocationError,this),this._map.off("dragstart",this._onDrag,this),this._map.off("zoomstart",this._onZoom,this),this._map.off("zoomend",this._onZoomEnd,this),this.options.showCompass&&(this._compassHeading=null,"ondeviceorientationabsolute"in window?t.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this):"ondeviceorientation"in window&&t.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this))},setView:function(){if(this._drawMarker(),this._isOutsideMapBounds())this._event=void 0,this.options.onLocationOutsideMapBounds(this);else if(this._justClicked&&!1!==this.options.initialZoomLevel)(e=this.options.flyTo?this._map.flyTo:this._map.setView).bind(this._map)([this._event.latitude,this._event.longitude],this.options.initialZoomLevel);else if(this.options.keepCurrentZoomLevel){(e=this.options.flyTo?this._map.flyTo:this._map.panTo).bind(this._map)([this._event.latitude,this._event.longitude])}else{var e=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;this._ignoreEvent=!0,e.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.locateOptions.maxZoom}),t.Util.requestAnimFrame((function(){this._ignoreEvent=!1}),this)}},_drawCompass:function(){if(this._event){var t=this._event.latlng;if(this.options.showCompass&&t&&null!==this._compassHeading){var e=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;this._compass?(this._compass.setLatLng(t),this._compass.setHeading(this._compassHeading),this._compass.setStyle&&this._compass.setStyle(e)):this._compass=new this.options.compassClass(t,this._compassHeading,e).addTo(this._layer)}!this._compass||this.options.showCompass&&null!==this._compassHeading||(this._compass.removeFrom(this._layer),this._compass=null)}},_drawMarker:function(){void 0===this._event.accuracy&&(this._event.accuracy=0);var e,n,i=this._event.accuracy,r=this._event.latlng;if(this.options.drawCircle){var o=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle;this._circle?this._circle.setLatLng(r).setRadius(i).setStyle(o):this._circle=t.circle(r,i,o).addTo(this._layer)}if(this.options.metric?(e=i.toFixed(0),n=this.options.strings.metersUnit):(e=(3.2808399*i).toFixed(0),n=this.options.strings.feetUnit),this.options.drawMarker){var a=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle;this._marker?(this._marker.setLatLng(r),this._marker.setStyle&&this._marker.setStyle(a)):this._marker=new this.options.markerClass(r,a).addTo(this._layer)}this._drawCompass();var s=this.options.strings.popup;function l(){return"string"==typeof s?t.Util.template(s,{distance:e,unit:n}):"function"==typeof s?s({distance:e,unit:n}):s}this.options.showPopup&&s&&this._marker&&this._marker.bindPopup(l())._popup.setLatLng(r),this.options.showPopup&&s&&this._compass&&this._compass.bindPopup(l())._popup.setLatLng(r)},_removeMarker:function(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},_unload:function(){this.stop(),this._map.off("unload",this._unload,this)},_setCompassHeading:function(e){!isNaN(parseFloat(e))&&isFinite(e)?(e=Math.round(e),this._compassHeading=e,t.Util.requestAnimFrame(this._drawCompass,this)):this._compassHeading=null},_onCompassNeedsCalibration:function(){this._setCompassHeading()},_onDeviceOrientation:function(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError:function(t){3==t.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(t,this))},_onLocationFound:function(t){if((!this._event||this._event.latlng.lat!==t.latlng.lat||this._event.latlng.lng!==t.latlng.lng||this._event.accuracy!==t.accuracy)&&this._active){switch(this._event=t,this._drawMarker(),this._updateContainerStyle(),this.options.setView){case"once":this._justClicked&&this.setView();break;case"untilPan":this._userPanned||this.setView();break;case"untilPanOrZoom":this._userPanned||this._userZoomed||this.setView();break;case"always":this.setView()}this._justClicked=!1}},_onDrag:function(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom:function(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd:function(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing:function(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView?!this._userPanned&&!this._userZoomed:void 0))},_isOutsideMapBounds:function(){return void 0!==this._event&&(this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng))},_updateContainerStyle:function(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasses())},_setClasses:function(t){"requesting"==t?(i(this._container,"active following"),n(this._container,"requesting"),i(this._icon,this.options.icon),n(this._icon,this.options.iconLoading)):"active"==t?(i(this._container,"requesting following"),n(this._container,"active"),i(this._icon,this.options.iconLoading),n(this._icon,this.options.icon)):"following"==t&&(i(this._container,"requesting"),n(this._container,"active following"),i(this._icon,this.options.iconLoading),n(this._icon,this.options.icon))},_cleanClasses:function(){t.DomUtil.removeClass(this._container,"requesting"),t.DomUtil.removeClass(this._container,"active"),t.DomUtil.removeClass(this._container,"following"),i(this._icon,this.options.iconLoading),n(this._icon,this.options.icon)},_resetVariables:function(){this._active=!1,this._justClicked=!1,this._userPanned=!1,this._userZoomed=!1}});return t.control.locate=function(e){return new t.Control.Locate(e)},a}),window)},function(t,e,n){"use strict"; /** @license React v16.13.1 * 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(24),r=n(135),o=n(349);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n