/*! For license information please see peta.js.LICENSE.txt */ (()=>{var t={8898:t=>{t.exports=function(t,e){return!(t[0]>e[2]||t[2]e[3])}},9348:function(t,e){var n,i;n=function(t,e){"use strict";function n(t){try{delete window[t]}catch(e){window[t]=void 0}}function i(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e)}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=t,r=e.timeout||5e3,a=e.jsonpCallback||"callback",s=void 0;return new Promise((function(l,u){var c=e.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),h=a+"_"+c;window[c]=function(t){l({ok:!0,json:function(){return Promise.resolve(t)}}),s&&clearTimeout(s),i(h),n(c)},o+=-1===o.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+o+a+"="+c),e.charset&&d.setAttribute("charset",e.charset),e.nonce&&d.setAttribute("nonce",e.nonce),e.referrerPolicy&&d.setAttribute("referrerPolicy",e.referrerPolicy),e.crossorigin&&d.setAttribute("crossorigin","true"),d.id=h,document.getElementsByTagName("head")[0].appendChild(d),s=setTimeout((function(){u(new Error("JSONP request to "+t+" timed out")),n(c),i(h),window[c]=function(){n(c)}}),r),d.onerror=function(){u(new Error("JSONP request to "+t+" failed")),n(c),i(h),s&&clearTimeout(s)}}))}},void 0===(i=n.apply(e,[e,t]))||(t.exports=i)},251:(t,e)=>{e.read=function(t,e,n,i,o){var r,a,s=8*o-i-1,l=(1<>1,c=-7,h=n?o-1:0,d=n?-1:1,f=t[e+h];for(h+=d,r=f&(1<<-c)-1,f>>=-c,c+=s;c>0;r=256*r+t[e+h],h+=d,c-=8);for(a=r&(1<<-c)-1,r>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===r)r=1-u;else{if(r===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),r-=u}return(f?-1:1)*a*Math.pow(2,r-i)},e.write=function(t,e,n,i,o,r){var a,s,l,u=8*r-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:r-1,p=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?d/l:d*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,o),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+f]=255&s,f+=p,s/=256,o-=8);for(a=a<0;t[n+f]=255&a,f+=p,a/=256,u-=8);t[n+f-p]|=128*m}},891:(t,e,n)=>{var i=n(3481),o=n(9348),r=n(8898),a=["Aerial","AerialWithLabels","AerialWithLabelsOnDemand","Road","RoadOnDemand","CanvasLight","CanvasDark","CanvasGray","OrdnanceSurvey"],s=["AerialWithLabelsOnDemand","RoadOnDemand"];i.TileLayer.Bing=i.TileLayer.extend({options:{bingMapsKey:null,imagerySet:"Aerial",culture:"en-US",minZoom:1,minNativeZoom:1,maxNativeZoom:19},statics:{METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}?key={bingMapsKey}&include=ImageryProviders&uriScheme=https&c={culture}",POINT_METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}/{lat},{lng}?zl={z}&key={bingMapsKey}&uriScheme=https&c={culture}"},initialize:function(t){if("string"==typeof t&&(t={bingMapsKey:t}),t&&t.BingMapsKey&&(t.bingMapsKey=t.BingMapsKey,console.warn("use options.bingMapsKey instead of options.BingMapsKey")),!t||!t.bingMapsKey)throw new Error("Must supply options.BingMapsKey");if(t=i.setOptions(this,t),a.indexOf(t.imagerySet)<0)throw new Error("'"+t.imagerySet+"' is an invalid imagerySet, see https://github.com/digidem/leaflet-bing-layer#parameters");t&&t.style&&s.indexOf(t.imagerySet)<0&&console.warn("Dynamic styles will only work with these imagerySet choices: "+s.join(", "));var e=i.Util.template(i.TileLayer.Bing.METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,culture:this.options.culture});this._imageryProviders=[],this._attributions=[],this._fetch=o(e,{jsonpCallback:"jsonp"}).then((function(t){return t.json()})).then(this._metaDataOnLoad.bind(this)).catch(console.error.bind(console)),i.Browser.android||this.on("tileunload",this._onTileRemove)},createTile:function(t,e){var n=document.createElement("img");return i.DomEvent.on(n,"load",i.bind(this._tileOnLoad,this,e,n)),i.DomEvent.on(n,"error",i.bind(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",this._url?n.src=this.getTileUrl(t):this._fetch.then(function(){n.src=this.getTileUrl(t)}.bind(this)).catch((function(t){console.error(t),e(t)})),n},getTileUrl:function(t){var e=function(t,e,n){for(var i="",o=n;o>0;o--){var r=0,a=1<-1||t.attributionControl.addAttribution(e)})),o.filter((function(e){i.indexOf(e)>-1||t.attributionControl.removeAttribution(e)})),this._attributions=i}.bind(this))}},_getAttributions:function(t,e){return this._imageryProviders.reduce((function(n,i){for(var o=0;o=i.coverageAreas[o].zoomMin&&e<=i.coverageAreas[o].zoomMax)return n.push(i.attribution),n;return n}),[])}}),i.tileLayer.bing=function(t){return new i.TileLayer.Bing(t)},t.exports=i.TileLayer.Bing},245:(t,e,n)=>{var i,o,r,a,s;a=function(t){const e=(e,n,i)=>{(i=i.split(" ")).forEach((function(i){t.DomUtil[e].call(this,n,i)}))},n=(t,n)=>e("addClass",t,n),i=(t,n)=>e("removeClass",t,n),o=t.Marker.extend({initialize(e,n){t.Util.setOptions(this,n),this._latlng=e,this.createIcon()},createIcon(){const e=this.options;let n="";void 0!==e.color&&(n+=`stroke:${e.color};`),void 0!==e.weight&&(n+=`stroke-width:${e.weight};`),void 0!==e.fillColor&&(n+=`fill:${e.fillColor};`),void 0!==e.fillOpacity&&(n+=`fill-opacity:${e.fillOpacity};`),void 0!==e.opacity&&(n+=`opacity:${e.opacity};`);const i=this._getIconSVG(e,n);this._locationIcon=t.divIcon({className:i.className,html:i.svg,iconSize:[i.w,i.h]}),this.setIcon(this._locationIcon)},_getIconSVG(t,e){const n=t.radius,i=n+t.weight,o=2*i;return{className:"leaflet-control-locate-location",svg:`',w:o,h:o}},setStyle(e){t.Util.setOptions(this,e),this.createIcon()}}),r=o.extend({initialize(e,n,i){t.Util.setOptions(this,i),this._latlng=e,this._heading=n,this.createIcon()},setHeading(t){this._heading=t},_getIconSVG(t,e){const n=t.radius,i=t.width+t.weight,o=2*(n+t.depth+t.weight),r=`M0,0 l${t.width/2},${t.depth} l-${i},0 z`;return{className:"leaflet-control-locate-heading",svg:`',w:i,h:o}}}),a=t.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds:t=>t.bounds,flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:o,compassClass:r,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:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:!0,createButtonCallback(e,n){const i=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",e);i.title=n.strings.title,i.href="#",i.setAttribute("role","button");const o=t.DomUtil.create(n.iconElementTag,n.icon,i);return void 0!==n.strings.text&&(t.DomUtil.create(n.textElementTag,"leaflet-locate-text",i).textContent=n.strings.text,i.classList.add("leaflet-locate-text-active"),i.parentNode.style.display="flex",n.icon.length>0&&o.classList.add("leaflet-locate-icon")),{link:i,icon:o}},onLocationError(t,e){alert(t.message)},onLocationOutsideMapBounds(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(e){for(const 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(e){const 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;const i=this.options.createButtonCallback(n,this.options);return this._link=i.link,this._icon=i.icon,t.DomEvent.on(this._link,"click",(function(e){t.DomEvent.stopPropagation(e),t.DomEvent.preventDefault(e),this._onClick()}),this).on(this._link,"dblclick",t.DomEvent.stopPropagation),this._resetVariables(),this._map.on("unload",this._unload,this),n},_onClick(){this._justClicked=!0;const t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active){const e=this.options.clickBehavior;let 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":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(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()},stop(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate(){if(!this._active&&this._map&&(this._map.locate(this.options.locateOptions),this._map.fire("locateactivate",this),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)){const e="ondeviceorientationabsolute"in window;if(e||"ondeviceorientation"in window){const 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(){this._active&&this._map&&(this._map.stopLocate(),this._map.fire("locatedeactivate",this),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(){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.initialZoomLevel||this.options.locateOptions.maxZoom}),t.Util.requestAnimFrame((function(){this._ignoreEvent=!1}),this)}},_drawCompass(){if(!this._event)return;const t=this._event.latlng;if(this.options.showCompass&&t&&null!==this._compassHeading){const 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(){void 0===this._event.accuracy&&(this._event.accuracy=0);const e=this._event.accuracy,n=this._event.latlng;if(this.options.drawCircle){const i=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle;this._circle?this._circle.setLatLng(n).setRadius(e).setStyle(i):this._circle=t.circle(n,e,i).addTo(this._layer)}let i,o;if(this.options.metric?(i=e.toFixed(0),o=this.options.strings.metersUnit):(i=(3.2808399*e).toFixed(0),o=this.options.strings.feetUnit),this.options.drawMarker){const t=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle;this._marker?(this._marker.setLatLng(n),this._marker.setStyle&&this._marker.setStyle(t)):this._marker=new this.options.markerClass(n,t).addTo(this._layer)}this._drawCompass();const r=this.options.strings.popup;function a(){return"string"==typeof r?t.Util.template(r,{distance:i,unit:o}):"function"==typeof r?r({distance:i,unit:o}):r}this.options.showPopup&&r&&this._marker&&this._marker.bindPopup(a())._popup.setLatLng(n),this.options.showPopup&&r&&this._compass&&this._compass.bindPopup(a())._popup.setLatLng(n)},_removeMarker(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},_unload(){this.stop(),this._map&&this._map.off("unload",this._unload,this)},_setCompassHeading(e){!isNaN(parseFloat(e))&&isFinite(e)?(e=Math.round(e),this._compassHeading=e,t.Util.requestAnimFrame(this._drawCompass,this)):this._compassHeading=null},_onCompassNeedsCalibration(){this._setCompassHeading()},_onDeviceOrientation(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError(t){3==t.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(t,this))},_onLocationFound(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(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd(){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(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView?!this._userPanned&&!this._userZoomed:void 0))},_isOutsideMapBounds(){return void 0!==this._event&&this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng)},_updateContainerStyle(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasses())},_setClasses(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(){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(){this._active=!1,this._justClicked=!1,this._userPanned=!1,this._userZoomed=!1}});return t.control.locate=e=>new t.Control.Locate(e),a},s=window,o=[n(3481)],void 0===(r="function"==typeof(i=a)?i.apply(e,o):i)||(t.exports=r),void 0!==s&&s.L&&(s.L.Control.Locate=a(L))},4256:()=>{"use strict";function t(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function e(e){return e.type===t.Bytes?e.readVarint()+e.pos:e.pos+1}function n(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function i(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var o=n.pos-1;o>=t;o--)n.buf[o+i]=n.buf[o]}function o(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function m(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function _(t,e){this.x=t,this.y=e}function g(t,e,n,i,o){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=o,t.readFields(v,this,e)}function v(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){for(var n=t.readVarint()+t.pos;t.pos>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 x(t,e,n){if(3===t){var i=new F(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}!function(t){function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function i(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return p.iterable&&(e[Symbol.iterator]=function(){return e}),e}function o(t){this.map={},t instanceof o?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 r(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function a(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function l(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(p.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(p.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(p.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(p.arrayBuffer&&p.blob&&_(t))this._bodyArrayBuffer=l(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!g(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var t=r(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?r(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(o))}})),e}function d(t){var e=new o;return t.split(/\r?\n/).forEach((function(t){var n=t.split(":"),i=n.shift().trim();if(i){var o=n.join(":").trim();e.append(i,o)}})),e}function f(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var p={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(p.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(t){return t&&DataView.prototype.isPrototypeOf(t)},g=ArrayBuffer.isView||function(t){return t&&m.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,i){t=e(t),i=n(i);var o=this.map[t];this.map[t]=o?o+","+i:i},o.prototype.delete=function(t){delete this.map[e(t)]},o.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},o.prototype.set=function(t,i){this.map[e(t)]=n(i)},o.prototype.forEach=function(t,e){var n=this;for(var i in this.map)n.map.hasOwnProperty(i)&&t.call(e,n.map[i],i,n)},o.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),i(t)},o.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),i(t)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),i(t)},p.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this,{body:this._bodyInit})},u.call(c.prototype),u.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},f.error=function(){var t=new f(null,{status:0,statusText:""});return t.type="error",t};var y=[301,302,303,307,308];f.redirect=function(t,e){if(-1===y.indexOf(e))throw new RangeError("Invalid status code");return new f(null,{status:e,headers:{location:t}})},t.Headers=o,t.Request=c,t.Response=f,t.fetch=function(t,e){return new Promise((function(n,i){var o=new c(t,e),r=new XMLHttpRequest;r.onload=function(){var t={status:r.status,statusText:r.statusText,headers:d(r.getAllResponseHeaders()||"")};t.url="responseURL"in r?r.responseURL:t.headers.get("X-Request-URL");var e="response"in r?r.response:r.responseText;n(new f(e,t))},r.onerror=function(){i(new TypeError("Network request failed"))},r.ontimeout=function(){i(new TypeError("Network request failed"))},r.open(o.method,o.url,!0),"include"===o.credentials&&(r.withCredentials=!0),"responseType"in r&&p.blob&&(r.responseType="blob"),o.headers.forEach((function(t,e){r.setRequestHeader(e,t)})),r.send(void 0===o._bodyInit?null:o._bodyInit)}))},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:void 0);var k=t,S=function(t,e,n,i,o){var r,a,s=8*o-i-1,l=(1<>1,c=-7,h=n?o-1:0,d=n?-1:1,f=t[e+h];for(h+=d,r=f&(1<<-c)-1,f>>=-c,c+=s;c>0;r=256*r+t[e+h],h+=d,c-=8);for(a=r&(1<<-c)-1,r>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===r)r=1-u;else{if(r===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),r-=u}return(f?-1:1)*a*Math.pow(2,r-i)},P=function(t,e,n,i,o,r){var a,s,l,u=8*r-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:r-1,p=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?d/l:d*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,o),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+f]=255&s,f+=p,s/=256,o-=8);for(a=a<0;t[n+f]=255&a,f+=p,a/=256,u-=8);t[n+f-p]|=128*m};t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var T=4294967296,C=1/T;t.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){var i=this;for(n=n||this.length;this.pos>3,a=i.pos;i.type=7&o,t(r,e,i),i.pos===a&&i.skip(o)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=f(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=m(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=f(this.buf,this.pos)+f(this.buf,this.pos+4)*T;return this.pos+=8,t},readSFixed64:function(){var t=f(this.buf,this.pos)+m(this.buf,this.pos+4)*T;return this.pos+=8,t},readFloat:function(){var t=S(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=S(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,o=this.buf;return e=127&(i=o[this.pos++]),i<128?e:(e|=(127&(i=o[this.pos++]))<<7,i<128?e:(e|=(127&(i=o[this.pos++]))<<14,i<128?e:(e|=(127&(i=o[this.pos++]))<<21,i<128?e:function(t,e,i){var o,r,a=i.buf;if(o=(112&(r=a[i.pos++]))>>4,r<128)return n(t,o,e);if(o|=(127&(r=a[i.pos++]))<<3,r<128)return n(t,o,e);if(o|=(127&(r=a[i.pos++]))<<10,r<128)return n(t,o,e);if(o|=(127&(r=a[i.pos++]))<<17,r<128)return n(t,o,e);if(o|=(127&(r=a[i.pos++]))<<24,r<128)return n(t,o,e);if(o|=(1&(r=a[i.pos++]))<<31,r<128)return n(t,o,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=o[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,n){for(var i="",o=e;o239?4:l>223?3:l>191?2:1;if(o+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(r=t[o+1]))&&(u=(31&l)<<6|63&r)<=127&&(u=null):3===c?(r=t[o+1],a=t[o+2],128==(192&r)&&128==(192&a)&&((u=(15&l)<<12|(63&r)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(r=t[o+1],a=t[o+2],s=t[o+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&r)<<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),o+=c}return i}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,n){var i=e(this);for(t=t||[];this.pos127;);else if(n===t.Bytes)this.pos=this.readVarint()+this.pos;else if(n===t.Fixed32)this.pos+=4;else{if(n!==t.Fixed64)throw new Error("Unimplemented type: "+n);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,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,o,r=0;r55295&&i<57344){if(!o){i>56319||r+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):o=i;continue}if(i<56320){t[n++]=239,t[n++]=191,t[n++]=189,o=i;continue}i=o-55296<<10|i-56320|65536,o=null}else o&&(t[n++]=239,t[n++]=191,t[n++]=189,o=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&&i(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),P(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),P(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&&i(n,o,this),this.pos=n-1,this.writeVarint(o),this.pos+=o},writeMessage:function(e,n,i){this.writeTag(e,t.Bytes),this.writeRawMessage(n,i)},writePackedVarint:function(t,e){this.writeMessage(t,o,e)},writePackedSVarint:function(t,e){this.writeMessage(t,r,e)},writePackedBoolean:function(t,e){this.writeMessage(t,l,e)},writePackedFloat:function(t,e){this.writeMessage(t,a,e)},writePackedDouble:function(t,e){this.writeMessage(t,s,e)},writePackedFixed32:function(t,e){this.writeMessage(t,u,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,c,e)},writePackedFixed64:function(t,e){this.writeMessage(t,h,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,d,e)},writeBytesField:function(e,n){this.writeTag(e,t.Bytes),this.writeBytes(n)},writeFixed32Field:function(e,n){this.writeTag(e,t.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(e,n){this.writeTag(e,t.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(e,n){this.writeTag(e,t.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(e,n){this.writeTag(e,t.Fixed64),this.writeSFixed64(n)},writeVarintField:function(e,n){this.writeTag(e,t.Varint),this.writeVarint(n)},writeSVarintField:function(e,n){this.writeTag(e,t.Varint),this.writeSVarint(n)},writeStringField:function(e,n){this.writeTag(e,t.Bytes),this.writeString(n)},writeFloatField:function(e,n){this.writeTag(e,t.Fixed32),this.writeFloat(n)},writeDoubleField:function(e,n){this.writeTag(e,t.Fixed64),this.writeDouble(n)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var E=_;_.prototype={clone:function(){return new _(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(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)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=e*this.x-n*this.y,o=n*this.x+e*this.y;return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_.convert=function(t){return t instanceof _?t:Array.isArray(t)?new _(t[0],t[1]):t};var M=E,z=g;g.types=["Unknown","Point","LineString","Polygon"],g.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,i=1,o=0,r=0,a=0,s=[];t.pos>3}if(o--,1===i||2===i)r+=t.readSVarint(),a+=t.readSVarint(),1===i&&(e&&s.push(e),e=[]),e.push(new M(r,a));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&s.push(e),s},g.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,i=0,o=0,r=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(i--,1===n||2===n)(o+=t.readSVarint())s&&(s=o),(r+=t.readSVarint())u&&(u=r);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,u]},g.prototype.toGeoJSON=function(t,e,n){function i(t){for(var e=0;e=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 O(this._pbf,e,this.extent,this._keys,this._values)};var F=B,A=function(t,e){this.layers=t.readFields(x,{},e)};L.SVG.Tile=L.SVG.extend({initialize:function(t,e,n){L.SVG.prototype.initialize.call(this,n),this._tileCoord=t,this._size=e,this._initContainer(),this._container.setAttribute("width",this._size.x),this._container.setAttribute("height",this._size.y),this._container.setAttribute("viewBox",[0,0,this._size.x,this._size.y].join(" ")),this._layers={}},getCoord:function(){return this._tileCoord},getContainer:function(){return this._container},onAdd:L.Util.falseFn,addTo:function(t){if(this._map=t,this.options.interactive)for(var e in this._layers){var n=this._layers[e];n._path.style.pointerEvents="auto",this._map._targets[L.stamp(n._path)]=n}},removeFrom:function(t){if(this.options.interactive)for(var e in this._layers){var n=this._layers[e];delete this._map._targets[L.stamp(n._path)]}delete this._map},_initContainer:function(){L.SVG.prototype._initContainer.call(this),L.SVG.create("rect")},_addPath:function(t){this._rootGroup.appendChild(t._path),this._layers[L.stamp(t)]=t},_updateIcon:function(t){var e=t._path=L.SVG.create("image"),n=t.options.icon.options,i=L.point(n.iconSize),o=n.iconAnchor||i&&i.divideBy(2,!0),r=t._point.subtract(o);e.setAttribute("x",r.x),e.setAttribute("y",r.y),e.setAttribute("width",i.x+"px"),e.setAttribute("height",i.y+"px"),e.setAttribute("href",n.iconUrl)}}),L.svg.tile=function(t,e,n){return new L.SVG.Tile(t,e,n)};var N=L.Class.extend({render:function(t,e){this._renderer=t,this.options=e,t._initPath(this),t._updateStyle(this)},updateStyle:function(t,e){this.options=e,t._updateStyle(this)},_getPixelBounds:function(){for(var t=this._parts,e=L.bounds([]),n=0;nn&&(i=r,n=o);n>a?(e[i][2]=n,c.push(l),c.push(i),l=i):(u=c.pop(),l=c.pop())}}function getSqSegDist(e,t,r){var n=t[0],o=t[1],i=r[0],a=r[1],s=e[0],l=e[1],u=i-n,c=a-o;if(0!==u||0!==c){var f=((s-n)*u+(l-o)*c)/(u*u+c*c);f>1?(n=i,o=a):f>0&&(n+=u*f,o+=c*f)}return u=s-n,c=l-o,u*u+c*c}function convert$1(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n1?1:n,[r,n,0]}function calcSize(e){for(var t,r,n=0,o=0,i=0;i=r&&s<=n)return e;if(a>n||s=r&&f<=n)l.push(p);else if(!(c>n||f=t&&s<=r&&o.push(a)}return o}function clipGeometry(e,t,r,n,o,i){for(var a=[],s=0;sr?(x.push(o(l,h,t),o(l,h,r)),i||(x=newSlice(a,x,g,d,v))):p>=t&&x.push(o(l,h,t)):f>r?pr&&(x.push(o(l,h,r)),i||(x=newSlice(a,x,g,d,v))));l=m[y-1],f=l[n],f>=t&&f<=r&&x.push(l),c=x[x.length-1],i&&c&&(x[0][0]!==c[0]||x[0][1]!==c[1])&&x.push(x[0]),newSlice(a,x,g,d,v)}return a}function newSlice(e,t,r,n,o){return t.length&&(t.area=r,t.dist=n,void 0!==o&&(t.outer=o),e.push(t)),[]}function wrap$1(e,t,r){var n=e,o=clip$2(e,1,-1-t,t,0,r,-1,2),i=clip$2(e,1,1-t,2+t,0,r,-1,2);return(o||i)&&(n=clip$2(e,1,-t,1+t,0,r,-1,2),o&&(n=shiftFeatureCoords(o,1).concat(n)),i&&(n=n.concat(shiftFeatureCoords(i,-1)))),n}function shiftFeatureCoords(e,t){for(var r=[],n=0;na.max[0]&&(a.max[0]=u[0]),u[1]>a.max[1]&&(a.max[1]=u[1])}return a}function addFeature(e,t,r,n){var o,i,a,s,l=t.geometry,u=t.type,c=[],f=r*r;if(1===u)for(o=0;of)&&(p.push(s),e.numSimplified++),e.numPoints++;3===u&&rewind(p,a.outer),c.push(p)}else e.numPoints+=a.length;c.length&&e.features.push({geometry:c,type:u,tags:t.tags||null})}function rewind(e,t){signedArea(e)<0===t&&e.reverse()}function signedArea(e){for(var t,r,n=0,o=0,i=e.length,a=i-1;o1)return!1;var i=o.geometry[0].length;if(5!==i)return!1;for(var a=0;a1&&console.time("creation"),m=s.tiles[h]=createTile(e,p,r,n,g,t===u.maxZoom),s.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd("creation"));var d="z"+t;s.stats[d]=(s.stats[d]||0)+1,s.total++}if(m.source=e,o){if(t===u.maxZoom||t===o)continue;var v=1<1&&console.time("clipping");var y,x,b,M,P,S,w=.5*u.buffer/u.extent,$=.5-w,C=.5+w,F=1+w;y=x=b=M=null,P=clip(e,p,r-w,r+C,0,intersectX,m.min[0],m.max[0]),S=clip(e,p,r+$,r+F,0,intersectX,m.min[0],m.max[0]),P&&(y=clip(P,p,n-w,n+C,1,intersectY,m.min[1],m.max[1]),x=clip(P,p,n+$,n+F,1,intersectY,m.min[1],m.max[1])),S&&(b=clip(S,p,n-w,n+C,1,intersectY,m.min[1],m.max[1]),M=clip(S,p,n+$,n+F,1,intersectY,m.min[1],m.max[1])),c>1&&console.timeEnd("clipping"),y&&l.push(y,t+1,2*r,2*n),x&&l.push(x,t+1,2*r,2*n+1),b&&l.push(b,t+1,2*r+1,2*n),M&&l.push(M,t+1,2*r+1,2*n+1)}else o&&(f=t)}return f},GeoJSONVT.prototype.getTile=function(e,t,r){var n=this,o=this.options,i=o.extent,a=o.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var u,c=e,f=t,p=r;!u&&c>0;)c--,f=Math.floor(f/2),p=Math.floor(p/2),u=n.tiles[toID(c,f,p)];if(!u||!u.source)return null;if(a>1&&console.log("found parent tile z%d-%d-%d",c,f,p),isClippedSquare(u,i,o.buffer))return transform.tile(u,i);a>1&&console.time("drilling down");var h=this.splitTile(u.source,c,f,p,e,t,r);if(a>1&&console.timeEnd("drilling down"),null!==h){var m=1<c&&(c=s[0]),s[1]f&&(f=s[1])}function r(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(r);break;case"Point":t(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(t)}}var n=e.bbox;if(!n){var o,i,a=transform$3(e),s=new Array(2),l=1/0,u=l,c=-l,f=-l;e.arcs.forEach(function(e){for(var t=-1,r=e.length;++tc&&(c=s[0]),s[1]f&&(f=s[1])});for(i in e.objects)r(e.objects[i]);n=e.bbox=[l,u,c,f]}return n},reverse=function(e,t){for(var r,n=e.length,o=n-t;o<--n;)r=e[o],e[o++]=e[n],e[n]=r},feature=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return feature$1(e,t)})}:feature$1(e,t)},stitch=function(e,t){function r(t){var r,n=e.arcs[t<0?~t:t],o=n[0];return e.transform?(r=[0,0],n.forEach(function(e){r[0]+=e[0],r[1]+=e[1]})):r=n[n.length-1],t<0?[r,o]:[o,r]}function n(e,t){for(var r in e){var n=e[r];delete t[n.start],delete n.start,delete n.end,n.forEach(function(e){o[e<0?~e:e]=1}),s.push(n)}}var o={},i={},a={},s=[],l=-1;return t.forEach(function(r,n){var o,i=e.arcs[r<0?~r:r];i.length<3&&!i[1][0]&&!i[1][1]&&(o=t[++l],t[l]=r,t[n]=o)}),t.forEach(function(e){var t,n,o=r(e),s=o[0],l=o[1];if(t=a[s])if(delete a[t.end],t.push(e),t.end=l,n=i[l]){delete i[n.start];var u=n===t?t:t.concat(n);i[u.start=t.start]=a[u.end=n.end]=u}else i[t.start]=a[t.end]=t;else if(t=i[l])if(delete i[t.start],t.unshift(e),t.start=s,n=a[s]){delete a[n.end];var c=n===t?t:n.concat(t);i[c.start=n.start]=a[c.end=t.end]=c}else i[t.start]=a[t.end]=t;else t=[e],i[t.start=s]=a[t.end=l]=t}),n(a,i),n(i,a),t.forEach(function(e){o[e<0?~e:e]||s.push([e])}),s},bisect=function(e,t){for(var r=0,n=e.length;r>>1;e[o]0?Math.floor(t):Math.ceil(t)};function B(t,e,n){return t instanceof z?t:_(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,n)}function F(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=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=A(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,a=o.y>=e.y&&i.y<=n.y;return r&&a},overlaps:function(t){t=A(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=I(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,a=o.lng>=e.lng&&i.lng<=n.lng;return r&&a},overlaps:function(t){t=I(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.late.lng&&i.lng1,Ct=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(t){}return t}(),Et=!!document.createElement("canvas").getContext,Mt=!(!document.createElementNS||!K("svg").createSVGRect),zt=!!Mt&&((Y=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Y.firstChild&&Y.firstChild.namespaceURI)),Ot=!Mt&&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 Bt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ft={ie:J,ielt9:tt,edge:et,webkit:nt,android:it,android23:ot,androidStock:at,opera:st,chrome:lt,gecko:ut,safari:ct,phantom:ht,opera12:dt,win:ft,ie3d:pt,webkit3d:mt,gecko3d:_t,any3d:gt,mobile:vt,mobileWebkit:yt,mobileWebkit3d:bt,msPointer:wt,pointer:xt,touch:St,touchNative:kt,mobileOpera:Pt,mobileGecko:Lt,retina:Tt,passiveEvents:Ct,canvas:Et,svg:Mt,vml:Ot,inlineSvg:zt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},At=Ft.msPointer?"MSPointerDown":"pointerdown",Nt=Ft.msPointer?"MSPointerMove":"pointermove",It=Ft.msPointer?"MSPointerUp":"pointerup",Rt=Ft.msPointer?"MSPointerCancel":"pointercancel",Dt={touchstart:At,touchmove:Nt,touchend:It,touchcancel:Rt},Zt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ie(e),$t(t,e)},touchmove:$t,touchend:$t,touchcancel:$t},Vt={},jt=!1;function Ut(t){Vt[t.pointerId]=t}function Ht(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Wt(t){delete Vt[t.pointerId]}function $t(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Vt)e.touches.push(Vt[n]);e.changedTouches=[e],t(e)}}var Gt,qt,Kt,Qt,Yt,Xt=200,Jt=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),te=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ee="webkitTransition"===te||"OTransition"===te?te+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function oe(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function re(t){var e=t.parentNode;e&&e.removeChild(t)}function ae(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function se(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=fe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ce(t,e){if(void 0!==t.classList)for(var n=h(e),i=0,o=n.length;i0?2*window.devicePixelRatio:1;function je(t){return Ft.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Ue(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={__proto__:null,on:Te,off:Ee,stopPropagation:Fe,disableScrollPropagation:Ae,disableClickPropagation:Ne,preventDefault:Ie,stop:Re,getPropagationPath:De,getMousePosition:Ze,getWheelDelta:je,isExternalTarget:Ue,addListener:Te,removeListener:Ee},We=M.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=ve(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=S(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,I(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=B((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),a=this.getPixelBounds(),s=A([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(r)){this._enforcingBounds=!0;var u=r.subtract(s.getCenter()),c=s.extend(r).getSize().subtract(l);o.x+=u.x<0?-c.x:c.x,o.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=n.divideBy(2).round(),a=o.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),o=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,t):navigator.geolocation.getCurrentPosition(n,o,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){if(this._container._leaflet_id){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){if(this._container._leaflet_id){var e=new R(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(r[a]=t.coords[a]);this.fire("locationfound",r)}},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.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),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(),re(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)re(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=oe("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.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(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=I(t),n=B(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),u=A(this.project(s,i),this.project(a,i)).getSize(),c=Ft.any3d?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);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(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(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 F(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(D(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(D(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(D(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(I(t))},distance:function(t,e){return this.options.crs.distance(D(t),D(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(D(t)))},mouseEventToContainerPoint:function(t){return Ze(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=ne(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Te(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ft.any3d,ce(t,"leaflet-container"+(Ft.touch?" leaflet-touch":"")+(Ft.retina?" leaflet-retina":"")+(Ft.ielt9?" leaflet-oldie":"")+(Ft.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ie(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ge(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){ge(this._mapPane,new z(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ge(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Ee:Te;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),Ft.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=S((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((n=this._targets[r(a)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!Ue(a,t))break;if(i.push(n),o)break}if(a===this._container)break;a=a.parentNode}return i.length||s||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&xe(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){if("click"===t.type){var o=e({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var r=this._findEventTargets(t,n);if(i){for(var a=[],s=0;s0?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=Ft.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=Jt,n=this._proxy.style[e];_e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){re(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();_e(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),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(S((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&he(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),Ge=C.extend({options:{position:"topright"},initialize:function(t){d(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 ce(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?(re(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()}}),qe=function(t){return new Ge(t)};$e.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=oe("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=oe("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)re(this._controlCorners[t]);re(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ke=Ge.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(r(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_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Te(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var a=document.createElement("span");return n.appendChild(a),a.appendChild(e),a.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r=0;o--)t=n[o],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},_expandSafely:function(){var t=this._section;this._preventClick=!0,Te(t,"click",Ie),this.expand();var e=this;setTimeout((function(){Ee(t,"click",Ie),e._preventClick=!1}))}}),Qe=Ge.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=oe("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Ne(r),Te(r,"click",Re),Te(r,"click",o,this),Te(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ce(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ce(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});$e.mergeOptions({zoomControl:!0}),$e.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))}));var Ye=Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=oe("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_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>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Xe=Ge.extend({options:{position:"bottomright",prefix:''+(Ft.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),Ne(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},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(' ')}}});$e.mergeOptions({attributionControl:!0}),$e.addInitHook((function(){this.options.attributionControl&&(new Xe).addTo(this)})),Ge.Layers=Ke,Ge.Zoom=Qe,Ge.Scale=Ye,Ge.Attribution=Xe,qe.layers=function(t,e,n){return new Ke(t,e,n)},qe.zoom=function(t){return new Qe(t)},qe.scale=function(t){return new Ye(t)},qe.attribution=function(t){return new Xe(t)};var Je=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Je.addTo=function(t,e){return t.addHandler(e,this),this};var tn={Events:E},en=Ft.touch?"touchstart mousedown":"mousedown",nn=M.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){d(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Te(this._dragStartTarget,en,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(nn._dragging===this&&this.finishDrag(!0),Ee(this._dragStartTarget,en,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)nn._dragging===this&&this.finishDrag();else if(!(nn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(nn._dragging=this,this._preventOutline&&xe(this._element),be(),Gt(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Se(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=ve(this._element),this._parentScale=Pe(n);var i="mousedown"===t.type;Te(document,i?"mousemove":"touchmove",this._onMove,this),Te(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(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 z(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)e&&(n.push(t[i]),o=i);return ol&&(r=a,l=s);l>n&&(e[r]=1,hn(t,e,n,i,r),hn(t,e,n,r,o))}function dn(t,e,n,i,o){var r,a,s,l=i?sn:pn(t,n),u=pn(e,n);for(sn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;s=pn(a=fn(t,e,r=l||u,n,o),n),r===l?(t=a,l=s):(e=a,u=s)}}function fn(t,e,n,i,o){var r,a,s=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(r=t.x+s*(c.y-t.y)/l,a=c.y):4&n?(r=t.x+s*(u.y-t.y)/l,a=u.y):2&n?(r=c.x,a=t.y+l*(c.x-t.x)/s):1&n&&(r=u.x,a=t.y+l*(u.x-t.x)/s),new z(r,a,o)}function pn(t,e){var n=0;return t.xe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function mn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function _n(t,e,n,i){var o,r=e.x,a=e.y,s=n.x-r,l=n.y-a,u=s*s+l*l;return u>0&&((o=((t.x-r)*s+(t.y-a)*l)/u)>1?(r=n.x,a=n.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,i?s*s+l*l:new z(r,a)}function gn(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function vn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gn(t)}function yn(t,e){var n,i,o,r,a,s,l,u;if(!t||0===t.length)throw new Error("latlngs not passed");gn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=D([0,0]),h=I(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(c=an(t));var d=t.length,f=[];for(n=0;ni){l=(r-i)/o,u=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=e.unproject(B(u));return D([m.lat+c.lat,m.lng+c.lng])}var bn={__proto__:null,simplify:un,pointToSegmentDistance:cn,closestPointOnSegment:function(t,e,n){return _n(t,e,n)},clipSegment:dn,_getEdgeIntersection:fn,_getBitCode:pn,_sqClosestPointOnSegment:_n,isFlat:gn,_flat:vn,polylineCenter:yn},wn={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new F([-180,-90],[180,90])},xn={R:6378137,R_MINOR:6356752.314245179,bounds:new F([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=r*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),r/2);return i=-n*Math.log(Math.max(s,1e-10)),new z(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new R(s*n,t.x*n/i)}},kn={__proto__:null,LonLat:wn,Mercator:xn,SphericalMercator:H},Sn=e({},j,{code:"EPSG:3395",projection:xn,transformation:function(){var t=.5/(Math.PI*xn.R);return $(t,.5,-t,.5)}()}),Pn=e({},j,{code:"EPSG:4326",projection:wn,transformation:$(1/180,1,-1/180,.5)}),Ln=e({},V,{projection:wn,transformation:$(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});V.Earth=j,V.EPSG3395=Sn,V.EPSG3857=G,V.EPSG900913=q,V.EPSG4326=Pn,V.Simple=Ln;var Tn=M.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[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(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.fire("add"),e.fire("layeradd",{layer:this})}}});$e.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),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 r(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?_(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof R&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){In.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 z(e,e);if(t=new F(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,o=0,r=this._rings.length;ot.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||In.prototype._containsPoint.call(this,t,!0)}}),Dn=En.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=_(t)?t:t.features;if(o){for(e=0,n=o.length;e0&&o.push(o[0].slice()),o}function $n(t,n){return t.feature?e({},t.feature,{geometry:n}):Gn(n)}function Gn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var qn={toGeoJSON:function(t){return $n(this,{type:"Point",coordinates:Hn(this.getLatLng(),t)})}};function Kn(t,e){return new Dn(t,e)}Bn.include(qn),Nn.include(qn),An.include(qn),In.include({toGeoJSON:function(t){var e=!gn(this._latlngs);return $n(this,{type:(e?"Multi":"")+"LineString",coordinates:Wn(this._latlngs,e?1:0,!1,t)})}}),Rn.include({toGeoJSON:function(t){var e=!gn(this._latlngs),n=e&&!gn(this._latlngs[0]),i=Wn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),$n(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Cn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),$n(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=Gn(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?$n(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Qn=Kn,Yn=Tn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=I(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){re(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&se(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=I(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:oe("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_e(this._image,n,e)},_reset:function(){var t=this._image,e=new F(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ge(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Xn=Yn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),o=[],r=0;r0?o:[e.src]}else{_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;ao?(e.height=o+"px",ce(t,r)):he(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ge(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(ie(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new z(this._containerLeft,-n-this._containerBottom);o._add(ve(this._container));var r=t.layerPointToContainerPoint(o),a=B(this.options.autoPanPadding),s=B(this.options.autoPanPaddingTopLeft||a),l=B(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;r.x+i+l.x>u.x&&(c=r.x+i-u.x+l.x),r.x-c-s.x<0&&(c=r.x-s.x),r.y+n+l.y>u.y&&(h=r.y+n-u.y+l.y),r.y-h-s.y<0&&(h=r.y-s.y),(c||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,h]))}},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});$e.mergeOptions({closePopupOnClick:!0}),$e.include({openPopup:function(t,e,n){return this._initOverlay(ei,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Tn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ei,this._popup,t,e),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){return this._popup&&(this instanceof En||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),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){if(this._popup&&this._map){Re(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof Fn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(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,opacity:.9},onAdd:function(t){ti.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(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.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=ti.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),s=this.options.direction,l=o.offsetWidth,u=o.offsetHeight,c=B(this.options.offset),h=this._getAnchor();"top"===s?(e=l/2,n=u):"bottom"===s?(e=l/2,n=0):"center"===s?(e=l/2,n=u/2):"right"===s?(e=0,n=u/2):"left"===s?(e=l,n=u/2):a.xthis.options.maxZoom||ni&&this._retainParent(o,r,a,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new z(o,r);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&&o1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var f=new z(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;dn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return I(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),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new N(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 z(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(re(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Ft.ielt9&&this.options.opacity<1&&pe(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&S(i(this._tileReady,this,t,null,r)),ge(r,n),this._tiles[o]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(pe(n.el,0),P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ce(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ft.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?s(t.x,this._wrapX):t.x,this._wrapY?s(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new F(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}}),ri=oi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Ft.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),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 Te(n,"load",i(this._tileOnLoad,this,e,n)),Te(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var n={r:Ft.retina?"@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&&(n.y=i),n["-y"]=i}return m(this._url,e(n,this.options))},_tileOnLoad:function(t,e){Ft.ielt9?setTimeout(i(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)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,!e.complete)){e.src=v;var n=this._tiles[t].coords;re(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),oi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return oi.prototype._tileReady.call(this,t,e,n)}});function ai(t,e){return new ri(t,e)}var si=ri.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,n){this._url=t;var i=e({},this.defaultWmsParams);for(var o in n)o in this.options||(i[o]=n[o]);var r=(n=d(this,n)).detectRetina&&Ft.retina?2:1,a=this.getTileSize();i.width=a.x*r,i.height=a.y*r,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,ri.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=A(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,a=(this._wmsVersion>=1.3&&this._crs===Pn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=ri.prototype.getTileUrl.call(this,t);return s+f(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});ri.WMS=si,ai.wms=function(t,e){return new si(t,e)};var li=Tn.extend({options:{padding:.1},initialize:function(t){d(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ce(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=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Ft.any3d?_e(this._container,r,n):ge(this._container,r)},_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 F(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ui=li.extend({options:{tolerance:0},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");Te(t,"mousemove",this._onMouseMove,this),Te(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Te(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,re(this._container),Ee(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=Ft.retina?2:1;ge(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ft.retina&&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[r(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[r(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(/[, ]+/),o=[];for(n=0;n')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),di={_initContainer:function(){this._container=oe("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");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(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;re(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=hi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=_(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=hi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.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){se(t._container)},_bringToBack:function(t){le(t._container)}},fi=Ft.vml?hi:K,pi=li.extend({_initContainer:function(){this._container=fi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){re(this._container),Ee(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_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)),ge(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=fi("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){re(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(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,Q(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 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){se(t._path)},_bringToBack:function(t){le(t._path)}});function mi(t){return Ft.svg||Ft.vml?new pi(t):null}Ft.vml&&pi.include(di),$e.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 _i=Rn.extend({initialize:function(t,e){Rn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=I(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pi.create=fi,pi.pointsToPath=Q,Dn.geometryToLayer=Zn,Dn.coordsToLatLng=jn,Dn.coordsToLatLngs=Un,Dn.latLngToCoords=Hn,Dn.latLngsToCoords=Wn,Dn.getFeature=$n,Dn.asFeature=Gn,$e.mergeOptions({boxZoom:!0});var gi=Je.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(){Te(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ee(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){re(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(),Gt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Te(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new F(this._point,this._startPoint),n=e.getSize();ge(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(re(this._box),he(this._container,"leaflet-crosshair")),qt(),we(),Ee(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new N(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(),this._clearDeferredResetState(),this._resetState())}});$e.addInitHook("addHandler","boxZoom",gi),$e.mergeOptions({doubleClickZoom:!0});var vi=Je.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,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});$e.addInitHook("addHandler","doubleClickZoom",vi),$e.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yi=Je.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new nn(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))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){he(this._map._container,"leaflet-grab"),he(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=I(this._map.options.maxBounds);this._offsetLimit=A(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,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,a=Math.abs(o+n)0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});$e.addInitHook("addHandler","scrollWheelZoom",wi),$e.mergeOptions({tapHold:Ft.touchNative&&Ft.safari&&Ft.mobile,tapTolerance:15});var xi=Je.extend({addHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ee(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new z(e.clientX,e.clientY),this._holdTimeout=setTimeout(i((function(){this._cancel(),this._isTapValid()&&(Te(document,"touchend",Ie),Te(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),Te(document,"touchend touchcancel contextmenu",this._cancel,this),Te(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ee(document,"touchend",Ie),Ee(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ee(document,"touchend touchcancel contextmenu",this._cancel,this),Ee(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});$e.addInitHook("addHandler","tapHold",xi),$e.mergeOptions({touchZoom:Ft.touch,bounceAtZoomLimits:!0});var ki=Je.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),Ee(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(),Te(document,"touchmove",this._onTouchMove,this),Te(document,"touchend touchcancel",this._onTouchEnd,this),Ie(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var s=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=S(s,this,!0),Ie(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Ee(document,"touchmove",this._onTouchMove,this),Ee(document,"touchend touchcancel",this._onTouchEnd,this),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}});$e.addInitHook("addHandler","touchZoom",ki),$e.BoxZoom=gi,$e.DoubleClickZoom=vi,$e.Drag=yi,$e.Keyboard=bi,$e.ScrollWheelZoom=wi,$e.TapHold=xi,$e.TouchZoom=ki,t.Bounds=F,t.Browser=Ft,t.CRS=V,t.Canvas=ui,t.Circle=Nn,t.CircleMarker=An,t.Class=C,t.Control=Ge,t.DivIcon=ii,t.DivOverlay=ti,t.DomEvent=He,t.DomUtil=Le,t.Draggable=nn,t.Evented=M,t.FeatureGroup=En,t.GeoJSON=Dn,t.GridLayer=oi,t.Handler=Je,t.Icon=Mn,t.ImageOverlay=Yn,t.LatLng=R,t.LatLngBounds=N,t.Layer=Tn,t.LayerGroup=Cn,t.LineUtil=bn,t.Map=$e,t.Marker=Bn,t.Mixin=tn,t.Path=Fn,t.Point=z,t.PolyUtil=ln,t.Polygon=Rn,t.Polyline=In,t.Popup=ei,t.PosAnimation=We,t.Projection=kn,t.Rectangle=_i,t.Renderer=li,t.SVG=pi,t.SVGOverlay=Jn,t.TileLayer=ri,t.Tooltip=ni,t.Transformation=W,t.Util=T,t.VideoOverlay=Xn,t.bind=i,t.bounds=A,t.canvas=ci,t.circle=function(t,e,n){return new Nn(t,e,n)},t.circleMarker=function(t,e){return new An(t,e)},t.control=qe,t.divIcon=function(t){return new ii(t)},t.extend=e,t.featureGroup=function(t,e){return new En(t,e)},t.geoJSON=Kn,t.geoJson=Qn,t.gridLayer=function(t){return new oi(t)},t.icon=function(t){return new Mn(t)},t.imageOverlay=function(t,e,n){return new Yn(t,e,n)},t.latLng=D,t.latLngBounds=I,t.layerGroup=function(t,e){return new Cn(t,e)},t.map=function(t,e){return new $e(t,e)},t.marker=function(t,e){return new Bn(t,e)},t.point=B,t.polygon=function(t,e){return new Rn(t,e)},t.polyline=function(t,e){return new In(t,e)},t.popup=function(t,e){return new ei(t,e)},t.rectangle=function(t,e){return new _i(t,e)},t.setOptions=d,t.stamp=r,t.svg=mi,t.svgOverlay=function(t,e,n){return new Jn(t,e,n)},t.tileLayer=ai,t.tooltip=function(t,e){return new ni(t,e)},t.transformation=$,t.version="1.9.4",t.videoOverlay=function(t,e,n){return new Xn(t,e,n)};var Si=window.L;t.noConflict=function(){return window.L=Si,this},window.L=t}(e)},5335:(t,e,n)=>{"use strict";t.exports=o;var i=n(251);function o(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}o.Varint=0,o.Fixed64=1,o.Bytes=2,o.Fixed32=5;var r=4294967296,a=1/r,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function l(t){return t.type===o.Bytes?t.readVarint()+t.pos:t.pos+1}function u(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(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 o=n.pos-1;o>=t;o--)n.buf[o+i]=n.buf[o]}function h(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}o.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos>3,r=this.pos;this.type=7&i,t(o,e,this),this.pos===r&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=b(this.buf,this.pos)+b(this.buf,this.pos+4)*r;return this.pos+=8,t},readSFixed64:function(){var t=b(this.buf,this.pos)+x(this.buf,this.pos+4)*r;return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(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,o,r=n.buf;if(i=(112&(o=r[n.pos++]))>>4,o<128)return u(t,i,e);if(i|=(127&(o=r[n.pos++]))<<3,o<128)return u(t,i,e);if(i|=(127&(o=r[n.pos++]))<<10,o<128)return u(t,i,e);if(i|=(127&(o=r[n.pos++]))<<17,o<128)return u(t,i,e);if(i|=(127&(o=r[n.pos++]))<<24,o<128)return u(t,i,e);if(i|=(1&(o=r[n.pos++]))<<31,o<128)return u(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&&s?function(t,e,n){return s.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var i="",o=e;o239?4:l>223?3:l>191?2:1;if(o+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(r=t[o+1]))&&(u=(31&l)<<6|63&r)<=127&&(u=null):3===c?(r=t[o+1],a=t[o+2],128==(192&r)&&128==(192&a)&&((u=(15&l)<<12|(63&r)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(r=t[o+1],a=t[o+2],s=t[o+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&r)<<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),o+=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!==o.Bytes)return t.push(this.readVarint(e));var n=l(this);for(t=t||[];this.pos127;);else if(e===o.Bytes)this.pos=this.readVarint()+this.pos;else if(e===o.Fixed32)this.pos+=4;else{if(e!==o.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,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,o,r=0;r55295&&i<57344){if(!o){i>56319||r+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):o=i;continue}if(i<56320){t[n++]=239,t[n++]=191,t[n++]=189,o=i;continue}i=o-55296<<10|i-56320|65536,o=null}else o&&(t[n++]=239,t[n++]=191,t[n++]=189,o=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&&c(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(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&&c(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,n){this.writeTag(t,o.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,_,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writeBytesField:function(t,e){this.writeTag(t,o.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,o.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,o.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,o.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,o.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,o.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,o.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,o.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,o.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,o.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},9788:t=>{"use strict";function e(t,e){this.x=t,this.y=e}t.exports=e,e.prototype={clone:function(){return new e(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(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)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=e*this.x-n*this.y,o=n*this.x+e*this.y;return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(t){return t instanceof e?t:Array.isArray(t)?new e(t[0],t[1]):t}},2551:(t,e,n)=>{"use strict";var i=n(6540),o=n(9982);function r(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n