@bmlt-enabled/croutonjs 3.22.4 → 3.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crouton-core.css +5 -18
- package/crouton-core.min.css +1 -1
- package/crouton-gmaps.js +386 -154
- package/crouton-gmaps.min.js +5 -5
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +77 -12
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.css +5 -18
- package/crouton.js +391 -142
- package/crouton.min.css +1 -1
- package/crouton.min.js +5 -5
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +314 -130
- package/crouton.nojquery.min.js +5 -5
- package/crouton.nojquery.min.js.map +1 -1
- package/package.json +1 -1
- package/templates/themes/florida-nights.css +3 -8
- package/templates/themes/frog.css +2 -8
- package/templates/themes/one-nine.css +2 -8
- package/templates/themes/seattle-rain.css +3 -8
- package/templates/themes/truth.css +2 -8
package/crouton-map.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function MapDelegate(n){var l,o,a=L.icon({iconUrl:n.BMLTPlugin_images+"/NAMarker.png",shadowUrl:n.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),h=L.icon({iconUrl:n.BMLTPlugin_images+"/NAMarkerG.png",shadowUrl:n.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),u=L.icon({iconUrl:n.BMLTPlugin_images+"/NAMarkerSel.png",shadowUrl:n.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),c=[],_=null;function s(t,e){if(!l)return 12;for(var i=l.getZoom(),n=l.getCenter(),o=l.getBounds(),s=!1;0==e(o).length&&6<i;){s=!0,--i;var r=L.latLng(2*o.getNorthEast().lat-n.lat,2*o.getNorthEast().lng-n.lng),a=L.latLng(2*o.getSouthWest().lat-n.lat,2*o.getSouthWest().lng-n.lng),o=L.latLngBounds(a,r)}if(!t&&!s&&i<12){for(var h=e(o).length;i<12&&0<h;){i+=1;r=L.latLng(.5*(o.getNorthEast().lat+n.lat),.5*(o.getNorthEast().lng+n.lng)),a=L.latLng(.5*(o.getSouthWest().lat+n.lat),.5*(o.getSouthWest().lng+n.lng)),h=e(o=L.latLngBounds(a,r)).length}0==h&&--i}return i}function d(t,e,i){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var e;if(200!==n.status&&304!==n.status)e="";else if("string"==typeof n.response)try{e=JSON.parse(n.response)}catch(t){e=n.response}else e=n.response;i(e)}},n.open("GET",t+function(t,e,i){var n,o=[];for(n in t){var s=encodeURIComponent(i?n.toUpperCase():n),r=t[n];if(L.Util.isArray(r))for(var a=0;a<r.length;a++)o.push(s+"="+encodeURIComponent(r[a]));else o.push(s+"="+encodeURIComponent(r))}return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}(e),!0),n.responseType="json",n.setRequestHeader("Accept","application/json"),n.setRequestHeader("Accept","*/*"),n.send(null)}this.createMap=function(t,e,i=!1){return e?i?(gDiv=t,gDiv.style.height="auto",gDiv.style.marginBottom="10px",l=null,gDiv):(myOptions={minZoom:n.minZoom,maxZoom:n.maxZoom,doubleClickZoom:!1,scrollWheelZoom:!1},myOptions=Object.assign(myOptions,{center:new L.latLng(e.latitude,e.longitude),zoom:e.zoom}),0==(i=t.offsetWidth)&&(i=t.parentNode.offsetWidth),e=t.offsetHeight,1.4*i<(e=0==e?i:e)&&(t.style.height=1.6*i+"px"),l=new L.Map(t,myOptions),o=L.tileLayer(n.tileUrl,n.tileOptions).addTo(l),l.zoomControl.setPosition("bottomright"),l.on("moveend",function(){o.redraw()}),l):null},this.addListener=function(t,e,i){if(l)return"dragend"==(t="dragstart"==(t="idle"==t?"moveend":t)?"movestart":t)&&(t="moveend"),i?l.once(t,e):l.on(t,e),{event:t,f:e}},this.removeListener=function(t){l&&l.off(t.event,t.f)},this.addControl=function(e,t,i){if(l){var n=L.Control.extend({onAdd:function(t){return e},onRemove:function(t){}});if(i){const o=new MutationObserver(function(t){t.forEach(t=>{t.addedNodes.forEach(t=>{t===e&&(o.disconnect(),i())})})});o.observe(document,{childList:!0,subtree:!0})}new n({position:t}).addTo(l)}else gDiv.appendChild(e)},this.setViewToPosition=function(t,e,i=null){l&&(t=L.latLng(t.latitude,t.longitude),l.flyTo(t),l.once("moveend",function(t){newZoom=s(!1,e),l.getZoom()!=newZoom?(l.setZoom(newZoom),l.once("zoomend",function(){l.invalidateSize(),i&&l.once("load moveend",i)})):i&&i()}))},this.clearAllMarkers=function(){l&&(c&&c.forEach(t=>{t.marker.closePopup(),l.removeLayer(t.marker)}),c=[])},this.fromLatLngToPoint=function(t,e){return l?l.latLngToLayerPoint(L.latLng(t,e)):null},this.callGeocoder=function(t,e,i=function(t,e){t&&t[0]&&t[0].bbox?(l.flyToBounds(t[0].bbox),l.on("moveend",function(t){l.off("moveend"),l.setZoom(s(!0,e)),l.once("moveend",function(){o.redraw()})})):alert(crouton.localization.getWord("address_lookup_fail"))}){geoCodeParams={},n.region&&""!==n.region.trim()&&(geoCodeParams.countrycodes=n.region),n.bounds&&n.bounds.north&&""!==n.bounds.north.trim()&&n.bounds.east&&""!==n.bounds.east.trim()&&n.bounds.south&&""!==n.bounds.south.trim()&&n.bounds.west&&""!==n.bounds.west.trim()&&(geoCodeParams.viewbox=n.bounds.south+","+n.bounds.west+","+n.bounds.north+","+n.bounds.east),function(t,e,s,r){d((n.nominatimUrl||"https://nominatim.openstreetmap.org/")+"search",L.extend({q:t,limit:5,format:"json",addressdetails:1},e),L.bind(function(t){var e=[];if(t&&t.length){for(var i=t.length-1;0<=i;i--){for(var n=t[i].boundingbox,o=0;o<4;o++)n[o]=parseFloat(n[o]);e[i]={icon:t[i].icon,name:t[i].display_name,bbox:L.latLngBounds([n[0],n[2]],[n[1],n[3]]),center:L.latLng(t[i].lat,t[i].lon),properties:t[i]}}r?s(e,r):s(e)}else alert(crouton.localization.getWord("address_lookup_fail"))},this))}(t,geoCodeParams,i,e)},this.setZoom=function(t,e=0){l&&(0<e?l.setZoom(e):l.setZoom(s(!1,t)))},this.getZoom=function(){return l?l.getZoom():null},this.createMarker=function(t,e,n,o,s){if(l){let i=function(t){t=t.id.split("-")[1];jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+t+" > td").addClass("rowHighlight"),"undefined"!=typeof crouton&&crouton.dayTabFromId(t)};var r=L.marker(t,{icon:e?h:a,title:o}).bindPopup(n);r.isMulti=e,_?_.addLayer(r):r.addTo(l),r.on("popupopen",function(t){r.setIcon(u),l.on("zoomstart",function(){r.closePopup()}),jQuery("input[type=radio][name=panel]:checked").each(function(t,e){i(e)}),jQuery("input[type=radio][name=panel]").change(function(){i(this)})}),r.on("popupclose",function(t){r.setIcon(r.isMulti?h:a),jQuery(".bmlt-data-row > td").removeClass("rowHighlight")}),c.push({ids:s,marker:r})}},this.contains=function(t,e,i){return!l||t.contains(L.latLng(e,i))},this.getBounds=function(){return l?l.getBounds():null},this.invalidateSize=function(){l&&l.invalidateSize()},this.zoomOut=function(t){l&&l.setZoom(s(!0,t))},this.fitBounds=function(t){l&&(t=t.reduce(function(t,e){return t.extend(e),t},L.latLngBounds()),l.fitBounds(t))},this.openMarker=function(e){l&&(marker=c.find(t=>t.ids.includes(e)),marker&&(marker.marker.openPopup(),jQuery("#panel-"+e).prop("checked",!0),"undefined"!=typeof crouton&&crouton.dayTabFromId(e)),jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+e+" > td").addClass("rowHighlight"))},this.isApiLoaded=function(){return!0},this.createClusterLayer=function(){l&&(_=L.markerClusterGroup())},this.addClusterLayer=function(){l&&_&&l.addLayer(_)},this.removeClusterLayer=function(){l&&(_&&l.removeLayer(_),_=null)},this.clickSearch=function(t,e){L.DomUtil.addClass(l._container,"crosshair-cursor-enabled"),l.once("click",function(t){l.once("click",function(t){L.DomUtil.removeClass(l._container,"crosshair-cursor-enabled"),e(t.latlng.lat,t.latlng.lng)})})},this.getGeocodeCenter=function(t){if(t&&t[0])return{lat:t[0].center.lat,lng:t[0].center.lng};alert(crouton.localization.getWord("address_lookup_fail"))},this.modalOn=function(){l&&l.dragging.disable()},this.modalOff=function(){l&&l.dragging.enable()},this.afterInit=function(t){t()},this.hasClickSearch=function(){return null!=l}}MapDelegate.prototype.createMap=null,MapDelegate.prototype.addListener=null,MapDelegate.prototype.removeListener=null,MapDelegate.prototype.addControl=null,MapDelegate.prototype.setViewToPosition=null,MapDelegate.prototype.clearAllMarkers=null,MapDelegate.prototype.fromLatLngToPoint=null,MapDelegate.prototype.callGeocoder=null,MapDelegate.prototype.setZoom=null,MapDelegate.prototype.getZoom=null,MapDelegate.prototype.createMarker=null,MapDelegate.prototype.contains=null,MapDelegate.prototype.getBounds=null,MapDelegate.prototype.invalidateSize=null,MapDelegate.prototype.zoomOut=null,MapDelegate.prototype.fitBounds=null,MapDelegate.prototype.openMarker=null,MapDelegate.prototype.isApiLoaded=null,MapDelegate.prototype.createClusterLayer=null,MapDelegate.prototype.addClusterLayer=null,MapDelegate.prototype.removeClusterLayer=null,MapDelegate.prototype.clickSearch=null,MapDelegate.prototype.getGeocodeCenter=null,MapDelegate.prototype.modalOn=null,MapDelegate.prototype.modalOff=null,MapDelegate.prototype.afterInit=null,MapDelegate.prototype.hasClickSearch=null,function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,function(t){"use strict";var e=Object.freeze;function h(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}Object.freeze=function(t){return t};var s=Object.create||function(t){return i.prototype=t,new i};function i(){}function _(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var n=0;function p(t){return t._leaflet_id=t._leaflet_id||++n,t._leaflet_id}function o(t,e,i){var n,o,s,r=function(){n=!1,o&&(s.apply(i,o),o=!1)};return s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}}function r(t,e,i){var n=e[1],o=e[0],e=n-o;return t===n&&i?t:((t-o)%e+e)%e+o}function a(){return!1}function l(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return u(t).split(/\s+/)}function d(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?s(t.options):{}),e)t.options[i]=e[i];return t.options}function m(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var f=/\{ *([\w_-]+) *\}/g;function g(t,i){return t.replace(f,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var P=0;function b(t){var e=+new Date,i=Math.max(0,16-(e-P));return P=e+i,window.setTimeout(t,i)}var C=window.requestAnimationFrame||w("RequestAnimationFrame")||b,M=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function T(t,e,i){if(!i||C!==b)return C.call(window,_(t,e));t.call(e)}function z(t){t&&M.call(window,t)}var k=(Object.freeze||Object)({freeze:e,extend:h,create:s,bind:_,lastId:n,stamp:p,throttle:o,wrapNum:r,falseFn:a,formatNum:l,trim:u,splitWords:c,setOptions:d,getParamString:m,template:g,isArray:v,indexOf:y,emptyImageUrl:x,requestFn:C,cancelFn:M,requestAnimFrame:T,cancelAnimFrame:z});function S(){}S.extend=function(t){function e(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=s(n);for(i in(o.constructor=e).prototype=o,this)this.hasOwnProperty(i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);return t.statics&&(h(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),h.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=h(s(o.options),t.options)),h(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},S.include=function(t){return h(this.prototype,t),this},S.mergeOptions=function(t){return h(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var Z={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=c(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var o=0,s=(t=c(t)).length;o<s;o++)this._off(t[o],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(this._events[t]=n=[]);for(var t={fn:e,ctx:i=i===this?void 0:i},o=n,s=0,r=o.length;s<r;s++)if(o[s].fn===e&&o[s].ctx===i)return;o.push(t)},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===i&&r.fn===e)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=a;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=h({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s];a.fn.call(a.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var o=_(function(){this.off(t,e,i).off(t,o,i)},this);return this.on(t,e,i).on(t,o,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};Z.addEventListener=Z.on,Z.removeEventListener=Z.clearAllEventListeners=Z.off,Z.addOneTimeEventListener=Z.once,Z.fireEvent=Z.fire,Z.hasEventListeners=Z.listens;var E=S.extend(Z);function A(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var B=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function O(t,e,i){return t instanceof A?t:v(t)?new A(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,e,i)}function I(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function D(t,e){return!t||t instanceof I?t:new I(t,e)}function N(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function R(t,e){return t instanceof N?t:new N(t,e)}function j(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function G(t,e,i){return t instanceof j?t:v(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,t=t.y-this.y;return Math.sqrt(e*e+t*t)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},I.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new A((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new A(this.min.x,this.max.y)},getTopRight:function(){return new A(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t=("number"==typeof t[0]||t instanceof A?O:D)(t))instanceof I?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=D(t);var e=this.min,i=this.max,n=t.min,o=t.max,t=o.x>=e.x&&n.x<=i.x,i=o.y>=e.y&&n.y<=i.y;return t&&i},overlaps:function(t){t=D(t);var e=this.min,i=this.max,n=t.min,o=t.max,t=o.x>e.x&&n.x<i.x,i=o.y>e.y&&n.y<i.y;return t&&i},isValid:function(){return!(!this.min||!this.max)}},N.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof j)i=e=t;else{if(!(t instanceof N))return t?this.extend(G(t)||R(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,t=Math.abs(e.lng-i.lng)*t;return new N(new j(e.lat-n,e.lng-t),new j(i.lat+n,i.lng+t))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof j||"lat"in t?G:R)(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=R(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),t=o.lat>=e.lat&&n.lat<=i.lat,i=o.lng>=e.lng&&n.lng<=i.lng;return t&&i},overlaps:function(t){t=R(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),t=o.lat>e.lat&&n.lat<i.lat,i=o.lng>e.lng&&n.lng<i.lng;return t&&i},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var H={latLngToPoint:function(t,e){t=this.projection.project(t),e=this.scale(e);return this.transformation._transform(t,e)},pointToLatLng:function(t,e){e=this.scale(e),e=this.transformation.untransform(t,e);return this.projection.unproject(e)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,t=this.scale(t);return new I(this.transformation.transform(e.min,t),this.transformation.transform(e.max,t))},infinite:!(j.prototype={equals:function(t,e){return!!t&&(t=G(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,G(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,t=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-t],[this.lat+e,this.lng+t])},clone:function(){return new j(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,e=e.lng-i.lng;if(0==n&&0==e)return t;i=t.getSouthWest(),t=t.getNorthEast();return new N(new j(i.lat-n,i.lng-e),new j(t.lat-n,t.lng-e))}},U=h({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),i=Math.sin((e.lng-t.lng)*i/2),i=s*s+Math.cos(n)*Math.cos(o)*i*i,i=2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i));return this.R*i}}),F={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,i=Math.max(Math.min(i,t.lat),-i),i=Math.sin(i*e);return new A(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new I([-(vt=6378137*Math.PI),-vt],[vt,vt])};function W(t,e,i,n){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function V(t,e,i,n){return new W(t,e,i,n)}W.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new A((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var q=h({},U,{code:"EPSG:3857",projection:F,transformation:V(yt=.5/(Math.PI*F.R),.5,-yt,.5)}),K=h({},q,{code:"EPSG:900913"});function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){for(var i,n,o,s,r="",a=0,h=t.length;a<h;a++){for(i=0,n=(o=t[a]).length;i<n;i++)r+=(i?"L":"M")+(s=o[i]).x+" "+s.y;r+=e?Ct?"z":"x":""}return r||"M0 0"}var J=document.documentElement.style,Q="ActiveXObject"in window,$=Q&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Tt("webkit"),it=Tt("android"),nt=Tt("android 2")||Tt("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=it&&Tt("Google")&&ot<537&&!("AudioNode"in window),rt=!!window.opera,at=Tt("chrome"),ht=Tt("gecko")&&!et&&!rt&&!Q,lt=!at&&Tt("safari"),ut=Tt("phantom"),ct="OTransition"in J,_t=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in J,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,mt="MozPerspective"in J,ft=!window.L_DISABLE_3D&&(dt||pt||mt)&&!ct&&!ut,gt="undefined"!=typeof orientation||Tt("mobile"),vt=gt&&et,yt=gt&&pt,ot=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!ot),xt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),wt=gt&&rt,J=gt&&ht,Pt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),bt=!!document.createElement("canvas").getContext,Ct=!(!document.createElementNS||!Y("svg").createSVGRect),Mt=!Ct&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Tt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var rt=(Object.freeze||Object)({ie:Q,ielt9:$,edge:tt,webkit:et,android:it,android23:nt,androidStock:st,opera:rt,chrome:at,gecko:ht,safari:lt,phantom:ut,opera12:ct,win:_t,ie3d:dt,webkit3d:pt,gecko3d:mt,any3d:ft,mobile:gt,mobileWebkit:vt,mobileWebkit3d:yt,msPointer:ot,pointer:Lt,touch:xt,mobileOpera:wt,mobileGecko:J,retina:Pt,canvas:bt,svg:Ct,vml:Mt}),zt=ot?"MSPointerDown":"pointerdown",kt=ot?"MSPointerMove":"pointermove",St=ot?"MSPointerUp":"pointerup",Zt=ot?"MSPointerCancel":"pointercancel",Et=["INPUT","SELECT","OPTION"],At={},Bt=!1,Ot=0;function It(t,e,i,n){return"touchstart"===e?(a=t,h=i,l=n,u=_(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Et.indexOf(t.target.tagName)<0))return;Se(t)}jt(t,h)}),a["_leaflet_touchstart"+l]=u,a.addEventListener(zt,u,!1),Bt||(document.documentElement.addEventListener(zt,Dt,!0),document.documentElement.addEventListener(kt,Nt,!0),document.documentElement.addEventListener(St,Rt,!0),document.documentElement.addEventListener(Zt,Rt,!0),Bt=!0)):"touchmove"===e?(r=i,(u=t)["_leaflet_touchmove"+n]=c,u.addEventListener(kt,c,!1)):"touchend"===e&&(s=i,(t=t)["_leaflet_touchend"+n]=o,t.addEventListener(St,o,!1),t.addEventListener(Zt,o,!1)),this;function o(t){jt(t,s)}var s,r,a,h,l,u;function c(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&jt(t,r)}}function Dt(t){At[t.pointerId]=t,Ot++}function Nt(t){At[t.pointerId]&&(At[t.pointerId]=t)}function Rt(t){delete At[t.pointerId],Ot--}function jt(t,e){for(var i in t.touches=[],At)t.touches.push(At[i]);t.changedTouches=[t],e(t)}var Gt=ot?"MSPointerDown":Lt?"pointerdown":"touchstart",Ht=ot?"MSPointerUp":Lt?"pointerup":"touchend",Ut="_leaflet_";var Ft,Wt,Vt,qt,Kt,Yt,Xt=_e(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=_e(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qt="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function $t(t){return"string"==typeof t?document.getElementById(t):t}function te(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=(!i||"auto"===i)&&document.defaultView?(t=document.defaultView.getComputedStyle(t,null))?t[e]:null:i)?null:i}function ee(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function ie(t){var e=t.parentNode;e&&e.removeChild(t)}function ne(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function oe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function se(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function re(t,e){if(void 0!==t.classList)return t.classList.contains(e);t=ue(t);return 0<t.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function ae(t,e){var i;if(void 0!==t.classList)for(var n=c(e),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else re(t,e)||le(t,((i=ue(t))?i+" ":"")+e)}function he(t,e){void 0!==t.classList?t.classList.remove(e):le(t,u((" "+ue(t)+" ").replace(" "+e+" "," ")))}function le(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ue(t){return void 0===(t=t.correspondingElement?t.correspondingElement:t).className.baseVal?t.className:t.className.baseVal}function ce(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function _e(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function de(t,e,i){e=e||new A(0,0);t.style[Xt]=(dt?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(i?" scale("+i+")":"")}function pe(t,e){t._leaflet_pos=e,ft?de(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function me(t){return t._leaflet_pos||new A(0,0)}function fe(){we(window,"dragstart",Se)}function ge(){be(window,"dragstart",Se)}function ve(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(ye(),Vt=(Wt=t).style.outline,t.style.outline="none",we(window,"keydown",ye))}function ye(){Wt&&(Wt.style.outline=Vt,Vt=Wt=void 0,be(window,"keydown",ye))}function Le(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function xe(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}Yt="onselectstart"in document?(Kt=function(){we(window,"selectstart",Se)},function(){be(window,"selectstart",Se)}):(qt=_e(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Kt=function(){var t;qt&&(t=document.documentElement.style,Ft=t[qt],t[qt]="none")},function(){qt&&(document.documentElement.style[qt]=Ft,Ft=void 0)});ut=(Object.freeze||Object)({TRANSFORM:Xt,TRANSITION:Jt,TRANSITION_END:Qt,get:$t,getStyle:te,create:ee,remove:ie,empty:ne,toFront:oe,toBack:se,hasClass:re,addClass:ae,removeClass:he,setClass:le,getClass:ue,setOpacity:ce,testProp:_e,setTransform:de,setPosition:pe,getPosition:me,disableTextSelection:Kt,enableTextSelection:Yt,disableImageDrag:fe,enableImageDrag:ge,preventOutline:ve,restoreOutline:ye,getSizedParentNode:Le,getScale:xe});function we(t,e,i,n){if("object"==typeof e)for(var o in e)Ce(t,o,e[o],i);else for(var s=0,r=(e=c(e)).length;s<r;s++)Ce(t,e[s],i,n);return this}var Pe="_leaflet_events";function be(t,e,i,n){if("object"==typeof e)for(var o in e)Me(t,o,e[o],i);else if(e)for(var s=0,r=(e=c(e)).length;s<r;s++)Me(t,e[s],i,n);else{for(var a in t[Pe])Me(t,a,t[Pe][a]);delete t[Pe]}return this}function Ce(e,t,i,n){var o=t+p(i)+(n?"_"+p(n):"");if(e[Pe]&&e[Pe][o])return this;var s,r,a,h,l,u=function(t){return i.call(n||e,t||window.event)},c=u;function _(t){var e,i;if(Lt){if(!tt||"mouse"===t.pointerType)return;i=Ot}else i=t.touches.length;1<i||(i=(e=Date.now())-(a||e),h=t.touches?t.touches[0]:t,l=0<i&&i<=250,a=e)}function d(t){if(l&&!h.cancelBubble){if(Lt){if(!tt||"mouse"===t.pointerType)return;var e,i,n={};for(i in h)e=h[i],n[i]=e&&e.bind?e.bind(h):e;h=n}h.type="dblclick",h.button=0,r(h),a=null}}Lt&&0===t.indexOf("touch")?It(e,t,u,o):!xt||"dblclick"!==t||Lt&&at?"addEventListener"in e?"mousewheel"===t?e.addEventListener("onwheel"in e?"wheel":"mousewheel",u,!1):"mouseenter"===t||"mouseleave"===t?(u=function(t){t=t||window.event,Re(e,t)&&c(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",u,!1)):("click"===t&&it&&(u=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Oe&&i-Oe;if(n&&100<n&&n<500||t.target._simulatedClick&&!t._simulated)return Ze(t);Oe=i,e(t)}(t,c)}),e.addEventListener(t,u,!1)):"attachEvent"in e&&e.attachEvent("on"+t,u):(r=u,l=!1,(s=e)[Ut+Gt+(t=o)]=_,s[Ut+Ht+t]=d,s[Ut+"dblclick"+t]=r,s.addEventListener(Gt,_,!1),s.addEventListener(Ht,d,!1),s.addEventListener("dblclick",r,!1)),e[Pe]=e[Pe]||{},e[Pe][o]=u}function Me(t,e,i,n){var o,s,r=e+p(i)+(n?"_"+p(n):""),i=t[Pe]&&t[Pe][r];if(!i)return this;Lt&&0===e.indexOf("touch")?(s=(o=t)["_leaflet_"+(n=e)+r],"touchstart"===n?o.removeEventListener(zt,s,!1):"touchmove"===n?o.removeEventListener(kt,s,!1):"touchend"===n&&(o.removeEventListener(St,s,!1),o.removeEventListener(Zt,s,!1))):!xt||"dblclick"!==e||Lt&&at?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,i,!1):"detachEvent"in t&&t.detachEvent("on"+e,i):(e=(o=t)[Ut+Gt+(s=r)],i=o[Ut+Ht+r],s=o[Ut+"dblclick"+r],o.removeEventListener(Gt,e,!1),o.removeEventListener(Ht,i,!1),tt||o.removeEventListener("dblclick",s,!1)),t[Pe][r]=null}function Te(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ne(t),this}function ze(t){return Ce(t,"mousewheel",Te),this}function ke(t){return we(t,"mousedown touchstart dblclick",Te),Ce(t,"click",De),this}function Se(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ze(t){return Se(t),Te(t),this}function Ee(t,e){if(!e)return new A(t.clientX,t.clientY);var i=xe(e),n=i.boundingClientRect;return new A((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Ae=_t&&at?2*window.devicePixelRatio:ht?window.devicePixelRatio:1;function Be(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ae:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Oe,Ie={};function De(t){Ie[t.type]=!0}function Ne(t){var e=Ie[t.type];return Ie[t.type]=!1,e}function Re(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var ct=(Object.freeze||Object)({on:we,off:be,stopPropagation:Te,disableScrollPropagation:ze,disableClickPropagation:ke,preventDefault:Se,stop:Ze,getMousePosition:Ee,getWheelDelta:Be,fakeStop:De,skipped:Ne,isExternalTarget:Re,addListener:we,removeListener:be}),je=E.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=me(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=T(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){t=this._startPos.add(this._offset.multiplyBy(t));e&&t._round(),pe(this._el,t),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ge=E.extend({options:{crs:q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=_(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(G(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Jt&&ft&&!wt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),we(this._proxy,Qt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(G(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=h({animate:i.animate},i.zoom),i.pan=h({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?clearTimeout(this._sizeTimer):this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(ft?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(ft?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),n=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),n=this.containerPointToLatLng(o.add(n));return this.setView(n,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var i=O(e.paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};n=n.subtract(i).divideBy(2),i=this.project(t.getSouthWest(),o),t=this.project(t.getNorthEast(),o);return{center:this.unproject(i.add(t).divideBy(2).add(n),o),zoom:o}},fitBounds:function(t,e){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");t=this._getBoundsCenterZoom(t,e);return this.setView(t.center,t.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){return e=e||{},(t=O(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new je,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(ae(this._mapPane,"leaflet-pan-anim"),i=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var i},flyTo:function(n,o,t){if(!1===(t=t||{}).animate||!ft)return this.setView(n,o,t);this._stop();var s=this.project(this.getCenter()),r=this.project(n),e=this.getSize(),a=this._zoom;n=G(n),o=void 0===o?a:o;var h=Math.max(e.x,e.y),i=h*this.getZoomScale(a,o),l=r.distanceTo(s)||1,u=1.42,c=u*u;function _(t){t=(i*i-h*h+(t?-1:1)*c*c*l*l)/(2*(t?i:h)*c*l),t=Math.sqrt(t*t+1)-t;return t<1e-9?-18:Math.log(t)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=_(0);var f=Date.now(),g=(_(1)-m)/u,v=t.duration?1e3*t.duration:1e3*g*.8;return this._moveStart(!0,t.noMoveStart),function t(){var e=(Date.now()-f)/v,i=(1-Math.pow(1-e,1.5))*g;e<=1?(this._flyToFrame=T(t,this),this._move(this.unproject(s.add(r.subtract(s).multiplyBy((e=i,h*(p(m)*(d(e=m+u*e)/p(e))-d(m))/c/l))),a),this.getScaleZoom(h/(i=i,h*(p(m)/p(m+u*i))),a),{flyTo:!0})):this._move(n,o)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){t=this._getBoundsCenterZoom(t,e);return this.flyTo(t.center,t.zoom,e)},setMaxBounds:function(t){return(t=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,R(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),h=a.getSize().divideBy(2),o=D([a.min.add(i),a.max.subtract(n)]);return o.contains(r)||(this._enforcingBounds=!0,t=s.subtract(r),a=O(r.x+t.x,r.y+t.y),(r.x<o.min.x||r.x>o.max.x)&&(a.x=s.x-t.x,0<t.x?a.x+=h.x-i.x:a.x-=h.x-n.x),(r.y<o.min.y||r.y>o.max.y)&&(a.y=s.y-t.y,0<t.y?a.y+=h.y-i.y:a.y-=h.y-n.y),this.panTo(this.unproject(a),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),o=n.subtract(o);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(_(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=h({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=_(this._handleGeolocationResponse,this),i=_(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,t=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: "+t+"."})},_handleGeolocationResponse:function(t){var e,i=new j(t.coords.latitude,t.coords.longitude),n=i.toBounds(2*t.coords.accuracy),o=this._locateOptions;o.setView&&(e=this.getBoundsZoom(n),this.setView(i,o.maxZoom?Math.min(e,o.maxZoom):e));var s,r={latlng:i,bounds:n,timestamp:t.timestamp};for(s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;e=this[t]=new e(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ie(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ie(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=ee("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new 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,i){t=R(t),i=O(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),t=this.getSize().subtract(i),i=D(this.project(a,n),this.project(r,n)).getSize(),a=ft?this.options.zoomSnap:1,r=t.x/i.x,i=t.y/i.y,i=e?Math.max(r,i):Math.min(r,i),n=this.getScaleZoom(i,n);return a&&(n=Math.round(n/(a/100))*(a/100),n=e?Math.ceil(n/a)*a:Math.floor(n/a)*a),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){e=this._getTopLeftPoint(t,e);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;e=i.zoom(t*i.scale(e));return isNaN(e)?1/0:e},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){t=O(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(G(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance(G(t),G(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},mouseEventToContainerPoint:function(t){return Ee(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=$t(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");we(t,"scroll",this._onScroll,this),this._containerId=p(t)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ft,ae(t,"leaflet-container"+(xt?" leaflet-touch":"")+(Pt?" leaflet-retina":"")+($?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=te(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),pe(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ae(t.markerPane,"leaflet-zoom-hide"),ae(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){pe(this._mapPane,new A(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){pe(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={};var e=t?be:we;e((this._targets[p(this._container)]=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&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[p(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!Re(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=!(n.length||r||o)&&Re(s,t)?[this]:n},_handleDOMEvent:function(t){var e;this._loaded&&!Ne(t)&&("mousedown"!==(e=t.type)&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||ve(t.target||t.srcElement),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type&&((o=h({},t)).type="preclick",this._fireDOMEvent(o,o.type,i)),!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var n=i[0];"contextmenu"===e&&n.listens(e,!0)&&Se(t);var o,s={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(o=n.getLatLng&&(!n._radius||n._radius<=10),s.containerPoint=o?this.latLngToContainerPoint(n.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=o?n.getLatLng():this.layerPointToLatLng(s.layerPoint));for(var r=0;r<i.length;r++)if(i[r].fire(e,s,!0),s.originalEvent._stopped||!1===i[r].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return me(this._mapPane)||new A(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){i=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,i){i=this._getNewPixelOrigin(i,e);return D([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),o=new I(n.subtract(o),n.add(o)),i=this._getBoundsOffset(o,i,e);return i.round().equals([0,0])?t:this.unproject(n.add(i),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),i=new I(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,i){e=D(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),i=e.min.subtract(t.min),t=e.max.subtract(t.max);return new A(this._rebound(i.x,-t.x),this._rebound(i.y,-t.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=ft?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){t=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(t)||(this.panBy(t,e),0))},_createAnimProxy:function(){var t=this._proxy=ee("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Xt,i=this._proxy.style[e];de(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();de(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ie(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(n)||(T(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ae(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(_(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),T(function(){this._moveEnd(!0)},this))}});function He(t){return new Ue(t)}var Ue=S.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),i=this.getPosition(),t=t._controlCorners[i];return ae(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ie(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Ge.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var i=this._controlCorners={},n="leaflet-",o=this._controlContainer=ee("div",n+"control-container",this._container);function t(t,e){i[t+e]=ee("div",n+t+" "+n+e,o)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ie(this._controlCorners[t]);ie(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Fe=Ue.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ue.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);t=this._getLayer(p(t));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){ae(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ae(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):he(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return he(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ee("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),ke(e),ze(e);var n=this._section=ee("section",t+"-list");i&&(this._map.on("click",this.collapse,this),it||we(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ee("a",t+"-toggle",e);o.href="#",o.title="Layers",xt?(we(o,"click",Ze),we(o,"click",this.expand,this)):we(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=ee("div",t+"-base",n),this._separator=ee("div",t+"-separator",n),this._overlaysList=ee("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(_(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ne(this._baseLayersList),ne(this._overlaysList),this._layerControlInputs=[];for(var t,e,i,n=0,o=0;o<this._layers.length;o++)i=this._layers[o],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,n+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<n)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(p(t.target)),t=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;t&&this._map.fire(t,e)},_createRadioElement:function(t,e){t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+p(this),n),this._layerControlInputs.push(e),e.layerId=p(t.layer),we(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;n=document.createElement("div");return i.appendChild(n),n.appendChild(e),n.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),We=Ue.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ee("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){n=ee("a",i,n);return n.innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),ke(n),we(n,"click",Ze),we(n,"click",o,this),we(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||ae(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||ae(this._zoomInButton,e)}});Ge.mergeOptions({zoomControl:!0}),Ge.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new We,this.addControl(this.zoomControl))});var Ve=Ue.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ee("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=ee("div",e,i)),t.imperial&&(this._iScale=ee("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(e)},_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);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i=3.2808399*t;5280<i?(t=this._getRoundNum(e=i/5280),this._updateScale(this._iScale,t+" mi",t/e)):(e=this._getRoundNum(i),this._updateScale(this._iScale,e+" ft",e/i))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),t=t/e;return e*(10<=t?10:5<=t?5:3<=t?3:2<=t?2:1)}}),qe=Ue.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ee("div","leaflet-control-attribution"),ke(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(" | ")}}});Ge.mergeOptions({attributionControl:!0}),Ge.addInitHook(function(){this.options.attributionControl&&(new qe).addTo(this)}),Ue.Layers=Fe,Ue.Zoom=We,Ue.Scale=Ve,Ue.Attribution=qe,He.layers=function(t,e,i){return new Fe(t,e,i)},He.zoom=function(t){return new We(t)},He.scale=function(t){return new Ve(t)},He.attribution=function(t){return new qe(t)};pt=S.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},enabled:function(){return!!this._enabled}});pt.addTo=function(t,e){return t.addHandler(e,this),this};var Ke,mt={Events:Z},Ye=xt?"touchstart mousedown":"mousedown",Xe={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Je={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Qe=E.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(we(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Qe._dragging===this&&this.finishDrag(),be(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;t._simulated||!this._enabled||(this._moved=!1,re(this._element,"leaflet-zoom-anim")||Qe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Qe._dragging=this)._preventOutline&&ve(this._element),fe(),Kt(),this._moving))||(this.fire("down"),e=t.touches?t.touches[0]:t,i=Le(this._element),this._startPoint=new A(e.clientX,e.clientY),this._parentScale=xe(i),we(document,Je[t.type],this._onMove,this),we(document,Xe[t.type],this._onUp,this))},_onMove:function(t){var e;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((e=new A((e=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,e.clientY)._subtract(this._startPoint)).x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Se(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=me(this._element).subtract(e),ae(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ae(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,z(this._animRequest),this._lastEvent=t,this._animRequest=T(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),pe(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in he(document.body,"leaflet-dragging"),this._lastTarget&&(he(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Je)be(document,Je[t],this._onMove,this),be(document,Xe[t],this._onUp,this);ge(),Yt(),this._moved&&this._moving&&(z(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Qe._dragging=!1}});function $e(t,e){if(!e||!t.length)return t.slice();e*=e;return function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,s){for(var r,a,h=0,l=o+1;l<=s-1;l++)h<(a=oi(e[l],e[o],e[s],!0))&&(r=l,h=a);n<h&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,s))}(t,n,e,0,i-1);for(var o=[],s=0;s<i;s++)n[s]&&o.push(t[s]);return o}(t=function(t,e){for(var i,n,o,s=[t[0]],r=1,a=0,h=t.length;r<h;r++)o=t[r],e<(n=(i=t[a]).x-o.x)*n+(o=i.y-o.y)*o&&(s.push(t[r]),a=r);return a<h-1&&s.push(t[h-1]),s}(t,e),e)}function ti(t,e,i){return Math.sqrt(oi(t,e,i,!0))}function ei(t,e,i,n,o){var s,r,a,h=n?Ke:ni(t,i),l=ni(e,i);for(Ke=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=ni(r=ii(t,e,s=h||l,i,o),i),s===h?(t=r,h=a):(e=r,l=a)}}function ii(t,e,i,n,o){var s,r,a=e.x-t.x,h=e.y-t.y,e=n.min,n=n.max;return 8&i?(s=t.x+a*(n.y-t.y)/h,r=n.y):4&i?(s=t.x+a*(e.y-t.y)/h,r=e.y):2&i?(s=n.x,r=t.y+h*(n.x-t.x)/a):1&i&&(s=e.x,r=t.y+h*(e.x-t.x)/a),new A(s,r,o)}function ni(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function oi(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,e=r*r+a*a;return 0<e&&(1<(e=((t.x-o)*r+(t.y-s)*a)/e)?(o=i.x,s=i.y):0<e&&(o+=r*e,s+=a*e)),r=t.x-o,a=t.y-s,n?r*r+a*a:new A(o,s)}function si(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ri(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),si(t)}vt=(Object.freeze||Object)({simplify:$e,pointToSegmentDistance:ti,closestPointOnSegment:function(t,e,i){return oi(t,e,i)},clipSegment:ei,_getEdgeIntersection:ii,_getBitCode:ni,_sqClosestPointOnSegment:oi,isFlat:si,_flat:ri});function ai(t,e,i){for(var n,o,s,r,a,h,l,u=[1,4,2,8],c=0,_=t.length;c<_;c++)t[c]._code=ni(t[c],e);for(s=0;s<4;s++){for(h=u[s],n=[],c=0,o=(_=t.length)-1;c<_;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((l=ii(a,r,h,e,i))._code=ni(l,e),n.push(l)):(a._code&h&&((l=ii(a,r,h,e,i))._code=ni(l,e),n.push(l)),n.push(r));t=n}return t}var yt=(Object.freeze||Object)({clipPolygon:ai}),J={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new I([-180,-90],[180,90])},ot={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),o=s*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-o)/(1+o),s/2),n=-i*Math.log(Math.max(s,1e-10));return new A(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,l=.1;h<15&&1e-7<Math.abs(l);h++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=l=Math.PI/2-2*Math.atan(r*e)-a;return new j(a*i,t.x*i/n)}},_t=(Object.freeze||Object)({LonLat:J,Mercator:ot,SphericalMercator:F}),Z=h({},U,{code:"EPSG:3395",projection:ot,transformation:V(ht=.5/(Math.PI*ot.R),.5,-ht,.5)}),hi=h({},U,{code:"EPSG:4326",projection:J,transformation:V(1/180,1,-1/180,.5)}),F=h({},H,{projection:J,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,t=e.lat-t.lat;return Math.sqrt(i*i+t*t)},infinite:!0});H.Earth=U,H.EPSG3395=Z,H.EPSG3857=q,H.EPSG900913=K,H.EPSG4326=hi,H.Simple=F;var li=E.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[p(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e,i=t.target;i.hasLayer(this)&&(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents&&(e=this.getEvents(),i.on(e,this),this.once("remove",function(){i.off(e,this)},this)),this.onAdd(i),this.getAttribution&&i.attributionControl&&i.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),i.fire("layeradd",{layer:this}))}});Ge.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=p(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=p(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&p(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?v(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=p(t);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,e=1/0,i=-1/0,n=this._getZoomSpan();for(t in this._zoomBoundLayers)var o=this._zoomBoundLayers[t].options,e=void 0===o.minZoom?e:Math.min(e,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom);this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ui=li.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){t=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:p}),ci=ui.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ui.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ui.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t,e=new N;for(t in this._layers){var i=this._layers[t];e.extend(i.getBounds?i.getBounds():i.getLatLng())}return e}}),_i=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}e=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(e,t),e},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"],o=O(n="number"==typeof n?[n,n]:n),n=O("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),n&&(t.style.marginLeft=-n.x+"px",t.style.marginTop=-n.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Pt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),di=_i.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return di.imagePath||(di.imagePath=this._detectIconPath()),(this.options.imagePath||di.imagePath)+_i.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ee("div","leaflet-default-icon-path",document.body),e=te(t,"background-image")||te(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),pi=pt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Qe(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ae(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&he(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=me(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),o=D(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));o.contains(s)||(n=O((Math.max(o.max.x,s.x)-o.max.x)/(r.max.x-o.max.x)-(Math.min(o.min.x,s.x)-o.min.x)/(r.min.x-o.min.x),(Math.max(o.max.y,s.y)-o.max.y)/(r.max.y-o.max.y)-(Math.min(o.min.y,s.y)-o.min.y)/(r.min.y-o.min.y)).multiplyBy(n),i.panBy(n,{animate:!1}),this._draggable._newPos._add(n),this._draggable._startPos._add(n),pe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=T(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=me(e._icon),o=e._map.layerPointToLatLng(n);i&&pe(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),mi=li.extend({options:{icon:new di,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=G(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=G(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ae(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),i=!1;o!==this._shadow&&(this._removeShadow(),i=!0),o&&(ae(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&i&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ie(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ie(this._shadow),this._shadow=null},_setPos:function(t){pe(this._icon,t),this._shadow&&pe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(ae(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pi)&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pi(this),t&&this.dragging.enable())},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&ce(this._icon,t),this._shadow&&ce(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),fi=li.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),gi=fi.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=G(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=G(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return fi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),i=[t+i,e+i];this._pxBounds=new I(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),vi=gi.extend({initialize:function(t,e,i){if(d(this,e="number"==typeof e?h({},i,{radius:e}):e),this._latlng=G(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:fi.prototype.setStyle,_project:function(){var t,e,i,n,o,s=this._latlng.lng,r=this._latlng.lat,a=this._map,h=a.options.crs;h.distance===U.distance?(o=Math.PI/180,t=this._mRadius/U.R/o,e=a.project([r+t,s]),n=a.project([r-t,s]),i=e.add(n).divideBy(2),n=a.unproject(i).lat,o=Math.acos((Math.cos(t*o)-Math.sin(r*o)*Math.sin(n*o))/(Math.cos(r*o)*Math.cos(n*o)))/o,!isNaN(o)&&0!==o||(o=t/Math.cos(Math.PI/180*r)),this._point=i.subtract(a.getPixelOrigin()),this._radius=isNaN(o)?0:i.x-a.project([n,s-o]).x,this._radiusY=i.y-e.y):(h=h.unproject(h.project(this._latlng).subtract([this._mRadius,0])),this._point=a.latLngToLayerPoint(this._latlng),this._radius=this._point.x-a.latLngToLayerPoint(h).x),this._updateBounds()}}),yi=fi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,s=oi,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],l=1,u=h.length;l<u;l++){var c=s(t,e=h[l-1],i=h[l],!0);c<n&&(n=c,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r=this._rings[0],a=r.length;if(!a)return null;for(e=t=0;t<a-1;t++)e+=r[t].distanceTo(r[t+1])/2;if(0===e)return this._map.layerPointToLatLng(r[0]);for(i=t=0;t<a-1;t++)if(n=r[t],o=r[t+1],e<(i+=s=n.distanceTo(o)))return this._map.layerPointToLatLng([o.x-(s=(i-e)/s)*(o.x-n.x),o.y-s*(o.y-n.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return si(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=si(t),n=0,o=t.length;n<o;n++)i?(e[n]=G(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),t=new A(t,t);this._pxBounds=new I([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)])},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof j,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,i,n,o,s,r=this._parts,a=e=0,h=this._rings.length;e<h;e++)for(i=0,n=(s=this._rings[e]).length;i<n-1;i++)(o=ei(s[i],s[i+1],t,i,!0))&&(r[a]=r[a]||[],r[a].push(o[0]),o[1]===s[i+1]&&i!==n-2||(r[a].push(o[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=$e(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&ti(t,a[o],a[n])<=h)return!0;return!1}});yi._flat=ri;var Li=yi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r,a,h,l=this._rings[0],u=l.length;if(!u)return null;for(t=s=r=a=0,e=u-1;t<u;e=t++)i=l[t],n=l[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,a+=(i.y+n.y)*o,s+=3*o;return h=0===s?l[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=yi.prototype._convertLatLngs.call(this,t),t=e.length;return 2<=t&&e[0]instanceof j&&e[0].equals(e[t-1])&&e.pop(),e},_setLatLngs:function(t){yi.prototype._setLatLngs.call(this,t),si(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(si(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,e=new A(e,e),t=new I(t.min.subtract(e),t.max.add(e));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,n=0,o=this._rings.length;n<o;n++)(i=ai(this._rings[n],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(e=this._parts[o]).length)-1;s<h;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}}),xi=ci.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=v(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=wi(t,s);return r?(r.feature=zi(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function wi(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],l=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Pi;if(!a&&!r)return null;switch(r.type){case"Point":return i=u(a),l?l(t,i):new mi(i);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=u(a[o]),h.push(l?l(t,i):new mi(i));return new ci(h);case"LineString":case"MultiLineString":return n=bi(a,"LineString"===r.type?0:1,u),new yi(n,e);case"Polygon":case"MultiPolygon":return n=bi(a,"Polygon"===r.type?1:2,u),new Li(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=wi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new ci(h);default:throw new Error("Invalid GeoJSON object.")}}function Pi(t){return new j(t[1],t[0],t[2])}function bi(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?bi(t[s],e-1,i):(i||Pi)(t[s]),o.push(n);return o}function Ci(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function Mi(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?Mi(t[s],e-1,i,n):Ci(t[s],n));return!e&&i&&o.push(o[0]),o}function Ti(t,e){return t.feature?h({},t.feature,{geometry:e}):zi(e)}function zi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}ot={toGeoJSON:function(t){return Ti(this,{type:"Point",coordinates:Ci(this.getLatLng(),t)})}};function ki(t,e){return new xi(t,e)}mi.include(ot),vi.include(ot),gi.include(ot),yi.include({toGeoJSON:function(t){var e=!si(this._latlngs);return Ti(this,{type:(e?"Multi":"")+"LineString",coordinates:Mi(this._latlngs,e?1:0,!1,t)})}}),Li.include({toGeoJSON:function(t){var e=!si(this._latlngs),i=e&&!si(this._latlngs[0]),t=Mi(this._latlngs,i?2:e?1:0,!0,t);return Ti(this,{type:(i?"Multi":"")+"Polygon",coordinates:t=!e?[t]:t})}}),ui.include({toMultiPoint:function(e){var i=[];return this.eachLayer(function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}),Ti(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var i="GeometryCollection"===t,n=[];return this.eachLayer(function(t){t.toGeoJSON&&(t=t.toGeoJSON(e),i?n.push(t.geometry):"FeatureCollection"===(t=zi(t)).type?n.push.apply(n,t.features):n.push(t))}),i?Ti(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var ht=ki,Si=li.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=R(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ae(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ie(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&&oe(this._image),this},bringToBack:function(){return this._map&&se(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(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:ee("img");ae(e,"leaflet-image-layer"),this._zoomAnimated&&ae(e,"leaflet-zoom-animated"),this.options.className&&ae(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onload=_(this.fire,this,"load"),e.onerror=_(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),t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;de(this._image,t,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();pe(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ce(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)}}),Zi=Si.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ee("video");if(ae(e,"leaflet-image-layer"),this._zoomAnimated&&ae(e,"leaflet-zoom-animated"),e.onselectstart=a,e.onmousemove=a,e.onloadeddata=_(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var r=ee("source");r.src=this._url[s],e.appendChild(r)}}}}),Ei=Si.extend({_initImage:function(){var t=this._image=this._url;ae(t,"leaflet-image-layer"),this._zoomAnimated&&ae(t,"leaflet-zoom-animated"),t.onselectstart=a,t.onmousemove=a}}),Ai=li.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ce(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ce(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(ce(this._container,0),this._removeTimeout=setTimeout(_(ie,void 0,this._container),200)):ie(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=G(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&oe(this._container),this},bringToBack:function(){return this._map&&se(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof li||(i=e,e=t),e instanceof ci)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){var t,e,i;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),i=O(this.options.offset),e=this._getAnchor(),this._zoomAnimated?pe(this._container,t.add(e)):i=i.add(t).add(e),e=this._containerBottom=-i.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+i.x,this._container.style.bottom=e+"px",this._container.style.left=i+"px")},_getAnchor:function(){return[0,0]}}),Bi=Ai.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ai.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof fi||this._source.on("preclick",Te))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof fi||this._source.off("preclick",Te))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ee("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ee("div",t+"-content-wrapper",e);this._contentNode=ee("div",t+"-content",i),ke(i),ze(this._contentNode),we(i,"contextmenu",Te),this._tipContainer=ee("div",t+"-tip-container",e),this._tip=ee("div",t+"-tip",this._tipContainer),this.options.closeButton&&((e=this._closeButton=ee("a",t+"-close-button",e)).href="#close",e.innerHTML="×",we(e,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth,i=Math.min(i,this.options.maxWidth);i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,i="leaflet-popup-scrolled";o&&o<n?(e.height=o+"px",ae(t,i)):he(t,i),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),t=this._getAnchor();pe(this._container,e.add(t))},_adjustPan:function(){var t,e,i,n,o,s,r,a;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,o=parseInt(te(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+o,a=this._containerWidth,(s=new A(this._containerLeft,-e-this._containerBottom))._add(me(this._container)),i=t.layerPointToContainerPoint(s),r=O(this.options.autoPanPadding),n=O(this.options.autoPanPaddingTopLeft||r),o=O(this.options.autoPanPaddingBottomRight||r),s=t.getSize(),r=0,i.x+a+o.x>s.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&t.fire("autopanstart").panBy([r,a]))},_onCloseButtonClick:function(t){this._close(),Ze(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ge.mergeOptions({closePopupOnClick:!0}),Ge.include({openPopup:function(t,e,i){return t instanceof Bi||(t=new Bi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),li.include({bindPopup:function(t,e){return t instanceof Bi?(d(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new Bi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Ze(t),e instanceof fi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Oi=Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return xt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ee("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),s=this.options.direction,r=i.offsetWidth,a=i.offsetHeight,h=O(this.options.offset),e=this._getAnchor();t="top"===s?t.add(O(-r/2+h.x,-a+h.y+e.y,!0)):"bottom"===s?t.subtract(O(r/2-h.x,-h.y,!0)):"center"===s?t.subtract(O(r/2+h.x,a/2-e.y+h.y,!0)):"right"===s||"auto"===s&&o.x<n.x?(s="right",t.add(O(h.x+e.x,e.y-a/2+h.y,!0))):(s="left",t.subtract(O(r+e.x-h.x,a/2-e.y-h.y,!0))),he(i,"leaflet-tooltip-right"),he(i,"leaflet-tooltip-left"),he(i,"leaflet-tooltip-top"),he(i,"leaflet-tooltip-bottom"),ae(i,"leaflet-tooltip-"+s),pe(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ce(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(t)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ge.include({openTooltip:function(t,e,i){return t instanceof Oi||(t=new Oi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),li.include({bindTooltip:function(t,e){return t instanceof Oi?(d(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new Oi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var e,i;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),xt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t)},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ae(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(he(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),e=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(e)}});var Ii=_i.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),t=this.options;return t.html instanceof Element?(ne(e),e.appendChild(t.html)):e.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=O(t.bgPos),e.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});_i.Default=di;var Di=li.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ie(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(oe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(se(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof A?t:new A(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!$){ce(this._container,this.options.opacity);var t,e=+new Date,i=!1,n=!1;for(t in this._tiles){var o,s=this._tiles[t];s.current&&s.loaded&&(o=Math.min(1,(e-s.loaded)/200),ce(s.el,o),o<1?i=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0))}n&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=ee("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ie(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=ee("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,e,i,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)(e=this._tiles[t]).current&&!e.active&&(i=e.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ie(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),t=Math.floor(e/2),e=i-1,i=new A(+o,+t);i.z=+e;i=this._tileCoordsToKey(i),i=this._tiles[i];return i&&i.active?i.retain=!0:(i&&i.loaded&&(i.retain=!0),n<e&&this._retainParent(o,t,e,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new A(o,s);r.z=i+1;r=this._tileCoordsToKey(r),r=this._tiles[r];r&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),i=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();ft?de(t.el,i,n):pe(t.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(i,this._tileZoom),t=e.project(t,this._tileZoom).floor(),i=e.getSize().divideBy(2*i);return new I(t.subtract(i),t.add(i))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n,e=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(e),s=o.getCenter(),r=[],e=this.options.keepBuffer,a=new I(o.getBottomLeft().subtract([e,-e]),o.getTopRight().add([e,-e]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(n in this._tiles){var h=this._tiles[n].coords;h.z===this._tileZoom&&a.contains(new A(h.x,h.y))||(this._tiles[n].current=!1)}if(1<Math.abs(i-this._tileZoom))this._setView(t,i);else{for(var l=o.min.y;l<=o.max.y;l++)for(var u=o.min.x;u<=o.max.x;u++){var c,_=new A(u,l);_.z=this._tileZoom,this._isValidTile(_)&&((c=this._tiles[this._tileCoordsToKey(_)])?c.current=!0:r.push(_))}if(r.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var d=document.createDocumentFragment(),u=0;u<r.length;u++)this._addTile(r[u],d);this._level.el.appendChild(d)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;t=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(t)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new N(t[0],t[1]);return t=!this.options.noWrap?this._map.wrapLatLngBounds(t):t},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),t=new A(+e[0],+e[1]);return t.z=+e[2],t},_removeTile:function(t){var e=this._tiles[t];e&&(ie(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ae(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,$&&this.options.opacity<1&&ce(t,this.options.opacity),it&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),_(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&T(_(this._tileReady,this,t,null,o)),pe(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ce(i.el,0),z(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ae(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),$||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(_(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new A(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ni=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Pt&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),it||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 i=document.createElement("img");return we(i,"load",_(this._tileOnLoad,this,e,i)),we(i,"error",_(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Pt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(e.y=t),e["-y"]=t),g(this._url,h(e,this.options))},_tileOnLoad:function(t,e){$?setTimeout(_(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return(t=this.options.zoomReverse?e-t:t)+this.options.zoomOffset},_getSubdomain:function(t){t=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=x,ie(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return st||e.el.setAttribute("src",x),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==x))return Di.prototype._tileReady.call(this,t,e,i)}});function Ri(t,e){return new Ni(t,e)}var ji=Ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i,n=h({},this.defaultWmsParams);for(i in e)i in this.options||(n[i]=e[i]);var o=(e=d(this,e)).detectRetina&&Pt?2:1,t=this.getTileSize();n.width=t.x*o,n.height=t.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,Ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,i=D(i.project(e[0]),i.project(e[1])),e=i.min,i=i.max,i=(1.3<=this._wmsVersion&&this._crs===hi?[e.y,e.x,i.y,i.x]:[e.x,e.y,i.x,i.y]).join(","),t=Ni.prototype.getTileUrl.call(this,t);return t+m(this.wmsParams,t,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+i},setParams:function(t,e){return h(this.wmsParams,t),e||this.redraw(),this}});Ni.WMS=ji,Ri.wms=function(t,e){return new ji(t,e)};var Gi=li.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ae(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=me(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),s=this._map.project(t,e).subtract(s),s=o.multiplyBy(-i).add(n).add(o).subtract(s);ft?de(this._container,s,i):pe(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hi=Gi.extend({getEvents:function(){var t=Gi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Gi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");we(t,"mousemove",o(this._onMouseMove,32,this),this),we(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),we(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,ie(this._container),be(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(){var t,e,i,n;this._map._animatingZoom&&this._bounds||(Gi.prototype._update.call(this),t=this._bounds,e=this._container,i=t.getSize(),n=Pt?2:1,pe(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Pt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Gi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);t=(this._layers[p(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,e=e.prev;i?i.prev=e:this._drawLast=e,e?e.next=i:this._drawFirst=i,delete t._order,delete this._layers[p(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){for(var e,i=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<i.length;o++){if(e=Number(i[o]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(t){var e;t._pxBounds&&(e=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e,i=this._redrawBounds;this._ctx.save(),i&&(e=i.getSize(),this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var e,i,n,o;this._drawing&&!t._empty()&&(e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t))},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(De(t),this._fireEvent([i],t))},_onMouseMove:function(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,e))},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(he(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ae(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e,i,n=t._order;n&&(e=n.next,i=n.prev,e&&((e.prev=i)?i.next=e:e&&(this._drawFirst=e),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var e,i,n=t._order;n&&(e=n.next,(i=n.prev)&&((i.next=e)?e.prev=i:i&&(this._drawLast=i),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function Ui(t){return bt?new Hi(t):null}var Fi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),J={_initContainer:function(){this._container=ee("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Gi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Fi("shape");ae(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Fi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(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;ie(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Fi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=v(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Fi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){oe(t._container)},_bringToBack:function(t){se(t._container)}},Wi=Mt?Fi:Y,Vi=Gi.extend({getEvents:function(){var t=Gi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ie(this._container),be(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Gi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),pe(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Wi("path");t.options.className&&ae(e,t.options.className),t.options.interactive&&ae(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ie(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){oe(t._path)},_bringToBack:function(t){se(t._path)}});function qi(t){return Ct||Mt?new Vi(t):null}Mt&&Vi.include(J),Ge.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_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&&Ui(t)||qi(t)}});var Ki=Li.extend({initialize:function(t,e){Li.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Vi.create=Wi,Vi.pointsToPath=X,xi.geometryToLayer=wi,xi.coordsToLatLng=Pi,xi.coordsToLatLngs=bi,xi.latLngToCoords=Ci,xi.latLngsToCoords=Mi,xi.getFeature=Ti,xi.asFeature=zi,Ge.mergeOptions({boxZoom:!0});Z=pt.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(){we(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){be(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ie(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Kt(),fe(),this._startPoint=this._map.mouseEventToContainerPoint(t),we(document,{contextmenu:Ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ee("div","leaflet-zoom-box",this._container),ae(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),t=e.getSize();pe(this._box,e.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(ie(this._box),he(this._container,"leaflet-crosshair")),Yt(),ge(),be(document,{contextmenu:Ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),!this._moved)||(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(_(this._resetState,this),0),t=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t}))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ge.addInitHook("addHandler","boxZoom",Z),Ge.mergeOptions({doubleClickZoom:!0});q=pt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});Ge.addInitHook("addHandler","doubleClickZoom",q),Ge.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});K=pt.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Qe(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))),ae(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,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=R(this._map.options.maxBounds),this._offsetLimit=D(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)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(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,e=(n+e+i)%t-e-i,e=Math.abs(o+i)<Math.abs(e+i)?o:e;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=e},_onDragEnd:function(t){var e,i,n,o,s=this._map,r=s.options,a=!r.inertia||this._times.length<2;s.fire("dragend",t),a?s.fire("moveend"):(this._prunePositions(+new Date),i=this._lastPos.subtract(this._positions[0]),t=(this._lastTime-this._times[0])/1e3,e=r.easeLinearity,i=(a=i.multiplyBy(e/t)).distanceTo([0,0]),t=Math.min(r.inertiaMaxSpeed,i),i=a.multiplyBy(t/i),n=t/(r.inertiaDeceleration*e),(o=i.multiplyBy(-n/2).round()).x||o.y?(o=s._limitOffset(o,s.options.maxBounds),T(function(){s.panBy(o,{duration:n,easeLinearity:e,noMoveStart:!0,animate:!0})})):s.fire("moveend"))}});Ge.addInitHook("addHandler","dragging",K),Ge.mergeOptions({keyboard:!0,keyboardPanDelta:80});F=pt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),we(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),be(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,e,i;this._focused||(t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,i=t.scrollLeft||i.scrollLeft,this._map._container.focus(),window.scrollTo(i,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var e=this._panKeys={},i=this.keyCodes,n=0,o=i.left.length;n<o;n++)e[i.left[n]]=[-1*t,0];for(n=0,o=i.right.length;n<o;n++)e[i.right[n]]=[t,0];for(n=0,o=i.down.length;n<o;n++)e[i.down[n]]=[0,t];for(n=0,o=i.up.length;n<o;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var e=this._zoomKeys={},i=this.keyCodes,n=0,o=i.zoomIn.length;n<o;n++)e[i.zoomIn[n]]=t;for(n=0,o=i.zoomOut.length;n<o;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){we(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){be(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=O(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ze(t)}}});Ge.addInitHook("addHandler","keyboard",F),Ge.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});ot=pt.extend({addHooks:function(){we(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){be(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Be(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);i=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(_(this._performZoom,this),i),Ze(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),n=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,n=i?Math.ceil(n/i)*i:n,n=t._limitZoom(e+(0<this._delta?n:-n))-e;this._delta=0,this._startTime=null,n&&("center"===t.options.scrollWheelZoom?t.setZoom(e+n):t.setZoomAround(this._lastMousePos,e+n))}});Ge.addInitHook("addHandler","scrollWheelZoom",ot),Ge.mergeOptions({tap:!0,tapTolerance:15});gt=pt.extend({addHooks:function(){we(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){be(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Se(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],t=e.target;this._startPos=this._newPos=new A(e.clientX,e.clientY),t.tagName&&"a"===t.tagName.toLowerCase()&&ae(t,"leaflet-active"),this._holdTimeout=setTimeout(_(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),we(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var e;clearTimeout(this._holdTimeout),be(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((t=(e=t.changedTouches[0]).target)&&t.tagName&&"a"===t.tagName.toLowerCase()&&he(t,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){t=t.touches[0];this._newPos=new A(t.clientX,t.clientY),this._simulateEvent("mousemove",t)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});xt&&!Lt&&Ge.addInitHook("addHandler","tap",gt),Ge.mergeOptions({touchZoom:xt&&!nt,bounceAtZoomLimits:!0});J=pt.extend({addHooks:function(){ae(this._map._container,"leaflet-touch-zoom"),we(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),be(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e,i,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(e=n.mouseEventToContainerPoint(t.touches[0]),i=n.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),we(document,"touchmove",this._onTouchMove,this),we(document,"touchend",this._onTouchEnd,this),Se(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{n=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===n.x&&0===n.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(n),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),z(this._animRequest);e=_(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=T(e,this,!0),Se(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),be(document,"touchmove",this._onTouchMove),be(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ge.addInitHook("addHandler","touchZoom",J),Ge.BoxZoom=Z,Ge.DoubleClickZoom=q,Ge.Drag=K,Ge.Keyboard=F,Ge.ScrollWheelZoom=ot,Ge.Tap=gt,Ge.TouchZoom=J,Object.freeze=e,t.version="1.5.1+HEAD.2e3e0ff",t.Control=Ue,t.control=He,t.Browser=rt,t.Evented=E,t.Mixin=mt,t.Util=k,t.Class=S,t.Handler=pt,t.extend=h,t.bind=_,t.stamp=p,t.setOptions=d,t.DomEvent=ct,t.DomUtil=ut,t.PosAnimation=je,t.Draggable=Qe,t.LineUtil=vt,t.PolyUtil=yt,t.Point=A,t.point=O,t.Bounds=I,t.bounds=D,t.Transformation=W,t.transformation=V,t.Projection=_t,t.LatLng=j,t.latLng=G,t.LatLngBounds=N,t.latLngBounds=R,t.CRS=H,t.GeoJSON=xi,t.geoJSON=ki,t.geoJson=ht,t.Layer=li,t.LayerGroup=ui,t.layerGroup=function(t,e){return new ui(t,e)},t.FeatureGroup=ci,t.featureGroup=function(t){return new ci(t)},t.ImageOverlay=Si,t.imageOverlay=function(t,e,i){return new Si(t,e,i)},t.VideoOverlay=Zi,t.videoOverlay=function(t,e,i){return new Zi(t,e,i)},t.SVGOverlay=Ei,t.svgOverlay=function(t,e,i){return new Ei(t,e,i)},t.DivOverlay=Ai,t.Popup=Bi,t.popup=function(t,e){return new Bi(t,e)},t.Tooltip=Oi,t.tooltip=function(t,e){return new Oi(t,e)},t.Icon=_i,t.icon=function(t){return new _i(t)},t.DivIcon=Ii,t.divIcon=function(t){return new Ii(t)},t.Marker=mi,t.marker=function(t,e){return new mi(t,e)},t.TileLayer=Ni,t.tileLayer=Ri,t.GridLayer=Di,t.gridLayer=function(t){return new Di(t)},t.SVG=Vi,t.svg=qi,t.Renderer=Gi,t.Canvas=Hi,t.canvas=Ui,t.Path=fi,t.CircleMarker=gi,t.circleMarker=function(t,e){return new gi(t,e)},t.Circle=vi,t.circle=function(t,e,i){return new vi(t,e,i)},t.Polyline=yi,t.polyline=function(t,e){return new yi(t,e)},t.Polygon=Li,t.polygon=function(t,e){return new Li(t,e)},t.Rectangle=Ki,t.rectangle=function(t,e){return new Ki(t,e)},t.Map=Ge,t.map=function(t,e){return new Ge(t,e)};var Yi=window.L;t.noConflict=function(){return window.L=Yi,this},window.L=t}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t.Leaflet=t.Leaflet||{},t.Leaflet.markercluster=t.Leaflet.markercluster||{}))}(this,function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(i,n){if(!L.Util.isArray(i))return this.addLayer(i);var o,s=this._featureGroup,r=this._nonPointGroup,a=this.options.chunkedLoading,h=this.options.chunkInterval,l=this.options.chunkProgress,u=i.length,c=0,_=!0;if(this._map){var d=(new Date).getTime(),p=L.bind(function(){for(var t=(new Date).getTime();c<u;c++){if(a&&0==c%200){var e=(new Date).getTime()-t;if(h<e)break}(o=i[c])instanceof L.LayerGroup?(_&&(i=i.slice(),_=!1),this._extractNonGroupLayers(o,i),u=i.length):o.getLatLng?!this.hasLayer(o)&&(this._addLayer(o,this._maxZoom),n||this.fire("layeradd",{layer:o}),o.__parent&&2===o.__parent.getChildCount())&&(e=(e=o.__parent.getAllChildMarkers())[0]===o?e[1]:e[0],s.removeLayer(e)):(r.addLayer(o),n||this.fire("layeradd",{layer:o}))}l&&l(c,u,(new Date).getTime()-d),c===u?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var t=this._needsClustering;c<u;c++)(o=i[c])instanceof L.LayerGroup?(_&&(i=i.slice(),_=!1),this._extractNonGroupLayers(o,i),u=i.length):o.getLatLng?this.hasLayer(o)||t.push(o):r.addLayer(o);return this},removeLayers:function(t){var e,i=t.length,n=this._featureGroup,o=this._nonPointGroup,s=!0;if(!this._map){for(h=0;h<i;h++)(e=t[h])instanceof L.LayerGroup?(s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(e,t),i=t.length):(this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e}));return this}if(this._unspiderfy){this._unspiderfy();for(var r=t.slice(),a=i,h=0;h<a;h++)(e=r[h])instanceof L.LayerGroup?(this._extractNonGroupLayers(e,r),a=r.length):this._unspiderfyLayer(e)}for(h=0;h<i;h++)(e=t[h])instanceof L.LayerGroup?(s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(e,t),i=t.length):e.__parent?(this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e}),n.hasLayer(e)&&(n.removeLayer(e),e.clusterShow&&e.clusterShow())):(o.removeLayer(e),this.fire("layerremove",{layer:e}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;0<=e;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,s=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;0<=n;n--){for(i=!0,o=r.length-1;0<=o;o--)if(r[o].layer===s[n]){i=!1;break}i&&t.call(e,s[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var i=null;return e=parseInt(e,10),this.eachLayer(function(t){L.stamp(t)===e&&(i=t)}),i},hasLayer:function(t){if(!t)return!1;for(var e=this._needsClustering,i=e.length-1;0<=i;i--)if(e[i]===t)return!0;for(i=(e=this._needsRemoving).length-1;0<=i;i--)if(e[i].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;0<=i;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=e&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){var e;this._ignoreMove||t.target.__dragStart||(e=t.target._popup&&t.target._popup.isOpen(),this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup())},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,s=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var h,l=t.__parent,u=l._markers;for(this._arraySplice(u,t);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)e&&l._childCount<=1?(h=l._markers[0]===t?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,r.project(l._cLatLng,l._zoom)),o[l._zoom].addObject(h,r.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),t=" marker-cluster-";return t+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+t,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),2<t.layer.getChildCount()&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){var t;this._inZoomAnimation||(t=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t)},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n="function"!=typeof i?function(){return i}:i;null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;e<=o;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i=this._gridClusters,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);o<=e;e--){var s=this._map.project(t.getLatLng(),e),r=i[e].getNearObject(s);if(r)return r._addChild(t),void(t.__parent=r);if(r=n[e].getNearObject(s)){var a=r.__parent;a&&this._removeLayer(r,!1);var h=new this._markerCluster(this,e,r,t);i[e].addObject(h,this._map.project(h._cLatLng,e)),r.__parent=h;for(var l=t.__parent=h,u=e-1;u>a._zoom;u--)l=new this._markerCluster(this,u,l),i[u].addObject(l,this._map.project(r.getLatLng(),u));return a._addChild(l),void this._removeFromGridUnclustered(r,e)}n[e].addObject(t,s)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){e===t?this._featureGroup.addLayer(t):2===e._childCount?(e._addToMap(),t=e.getAllChildMarkers(),this._featureGroup.removeLayer(t[0]),this._featureGroup.removeLayer(t[1])):e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(o,s){var r,a=this._getExpandedVisibleBounds(),h=this._featureGroup,t=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(a,o,t,function(t){var e,i=t._latlng,n=t._markers;for(a.contains(i)||(i=null),t._isSingleParent()&&o+1===s?(h.removeLayer(t),t._recursivelyAddChildrenToMap(null,s,a)):(t.clusterHide(),t._recursivelyAddChildrenToMap(i,s,a)),r=n.length-1;0<=r;r--)e=n[r],a.contains(e._latlng)||h.removeLayer(e)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(a,s),h.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(a,o,s,function(t){t._recursivelyRestoreChildPositions(s)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(a,o,t,function(t){h.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(2<e._childCount?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,i,n){var o=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(o,s,i+1,n);var r=this;this._forceLayout(),e._recursivelyBecomeVisible(o,n),this._enqueue(function(){var t;1===e._childCount?(t=e._markers[0],this._ignoreMove=!0,t.setLatLng(t.getLatLng()),this._ignoreMove=!1,t.clusterShow&&t.clusterShow()):e._recursively(o,n,s,function(t){t._recursivelyRemoveChildrenFromMap(o,s,i+1)}),r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;0<=n;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),o=this._zoom+1,i=i.getZoom();0<e.length&&o<n;){o++;for(var s=[],r=0;r<e.length;r++)s=s.concat(e[r]._childClusters);e=s}o<n?this._group._map.setView(this._latlng,o):n<=i?this._group._map.setView(this._latlng,i+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n=this._markers,o=this._childClusters,s=0,r=0,a=this._childCount;if(0!==a){for(this._resetBounds(),t=0;t<n.length;t++)e=n[t]._latlng,this._bounds.extend(e),s+=e.lat,r+=e.lng;for(t=0;t<o.length;t++)(i=o[t])._boundsNeedUpdate&&i._recalculateBounds(),this._bounds.extend(i._bounds),e=i._wLatLng,i=i._childCount,s+=e.lat*i,r+=e.lng*i;this._latlng=this._wLatLng=new L.LatLng(s/a,r/a),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,o,e){this._recursively(t,this._group._map.getMinZoom(),e-1,function(t){for(var e,i=t._markers,n=i.length-1;0<=n;n--)(e=i[n])._icon&&(e._setPos(o),e.clusterHide())},function(t){for(var e,i=t._childClusters,n=i.length-1;0<=n;n--)(e=i[n])._icon&&(e._setPos(o),e.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,i,n,o){this._recursively(e,o,i,function(t){t._recursivelyAnimateChildrenIn(e,t._group._map.latLngToLayerPoint(t.getLatLng()).round(),n),t._isSingleParent()&&n-1===o?(t.clusterShow(),t._recursivelyRemoveChildrenFromMap(e,i,n)):t.clusterHide(),t._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(n,o,s){this._recursively(s,this._group._map.getMinZoom()-1,o,function(t){if(o!==t._zoom)for(var e=t._markers.length-1;0<=e;e--){var i=t._markers[e];s.contains(i._latlng)&&(n&&(i._backupLatlng=i.getLatLng(),i.setLatLng(n),i.clusterHide&&i.clusterHide()),t._group._featureGroup.addLayer(i))}},function(t){t._addToMap(n)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;0<=e;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,s;this._recursively(t,e-1,i-1,function(t){for(s=t._markers.length-1;0<=s;s--)o=t._markers[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(t){for(s=t._childClusters.length-1;0<=s;s--)o=t._childClusters[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(t,e,i,n,o){var s,r,a=this._childClusters,h=this._zoom;if(e<=h&&(n&&n(this),o&&h===i&&o(this)),h<e||h<i)for(s=a.length-1;0<=s;s--)(r=a[s])._boundsNeedUpdate&&r._recalculateBounds(),t.intersects(r._bounds)&&r._recursively(t,e,i,n,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,n=o[n]=o[n]||{},n=n[i]=n[i]||[],i=L.Util.stamp(t);this._objectPoint[i]=e,n.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),s=this._getCoord(e.y),e=this._grid,r=e[s]=e[s]||{},a=r[o]=r[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=a.length;i<n;i++)if(a[i]===t)return a.splice(i,1),1===n&&delete r[o],!0},eachObject:function(t,e){var i,n,o,s,r,a,h,l=this._grid;for(i in l)for(n in r=l[i])for(a=r[n],o=0,s=a.length;o<s;o++)h=t.call(e,a[o]),h&&(o--,s--)},getNearObject:function(t){for(var e,i,n,o,s,r,a,h=this._getCoord(t.x),l=this._getCoord(t.y),u=this._objectPoint,c=this._sqCellSize,_=null,d=l-1;d<=l+1;d++)if(n=this._grid[d])for(e=h-1;e<=h+1;e++)if(o=n[e])for(i=0,s=o.length;i<s;i++)r=o[i],((a=this._sqDist(u[L.Util.stamp(r)],t))<c||a<=c&&null===_)&&(c=a,_=r);return _},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,t=e.y-t.y;return i*i+t*t}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){for(var i,n,o=0,s=null,r=[],a=e.length-1;0<=a;a--)i=e[a],0<(n=this.getDistant(i,t))&&(r.push(i),o<n&&(o=n,s=i));return{maxPoint:s,newPoints:r}},buildConvexHull:function(t,e){var i=[],e=this.findMostDistantPointFromBaseLine(t,e);return e.maxPoint?(i=i.concat(this.buildConvexHull([t[0],e.maxPoint],e.newPoints))).concat(this.buildConvexHull([e.maxPoint,t[1]],e.newPoints)):[t[0]]},getConvexHull:function(t){for(var e=!1,i=!1,n=!1,o=!1,s=null,r=null,a=null,h=null,l=null,u=null,c=t.length-1;0<=c;c--){var _=t[c];(!1===e||_.lat>e)&&(e=(s=_).lat),(!1===i||_.lat<i)&&(i=(r=_).lat),(!1===n||_.lng>n)&&(n=(a=_).lng),(!1===o||_.lng<o)&&(o=(h=_).lng)}l=i!==e?(u=r,s):(u=h,a);return[].concat(this.buildConvexHull([u,l],t),this.buildConvexHull([l,u],t))}},L.MarkerCluster.include({getConvexHull:function(){for(var t,e=this.getAllChildMarkers(),i=[],n=e.length-1;0<=n;n--)t=e[n].getLatLng(),i.push(t);return L.QuickHull.getConvexHull(i)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){var t,e;this._group._spiderfied===this||this._group._inZoomAnimation||(t=this.getAllChildMarkers(null,!0),e=this._group._map.latLngToLayerPoint(this._latlng),this._group._unspiderfy(),this._group._spiderfied=this,e=t.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(t.length,e):(e.y+=10,this._generatePointsCircle(t.length,e)),this._animationSpiderfy(t,e))},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,r=[],o=Math.max(o,35);for(r.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*s,r[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return r},_generatePointsSpiral:function(t,e){for(var i=this._group.options.spiderfyDistanceMultiplier,n=i*this._spiralLengthStart,o=i*this._spiralFootSeparation,s=i*this._spiralLengthFactor*this._2PI,r=0,a=[],h=a.length=t;0<=h;h--)h<t&&(a[h]=new L.Point(e.x+n*Math.cos(r),e.y+n*Math.sin(r))._round()),n+=s/(r+=o/n+5e-4*h);return a},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=s.length-1;0<=e;e--)t=s[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,s,r=this._group,a=r._map,h=r._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,i=0;i<t.length;i++)s=a.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,s],l),a.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,s,r,a,h=this,l=this._group,u=l._map,c=l._featureGroup,_=this._latlng,d=u.latLngToLayerPoint(_),p=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),f=m.opacity;for(void 0===f&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=f,l._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],a=u.layerPointToLatLng(e[i]),o=new L.Polyline([_,a],m),u.addLayer(o),n._spiderLeg=o,p&&(r=(s=o._path).getTotalLength()+.1,s.style.strokeDasharray=r,s.style.strokeDashoffset=r),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(d);for(l._forceLayout(),l._animationStart(),i=t.length-1;0<=i;i--)a=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&((s=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:f}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,o,s,r=this,a=this._group,h=a._map,l=a._featureGroup,u=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),_=L.Path.SVG;for(a._ignoreMove=!0,a._animationStart(),this.setOpacity(1),i=c.length-1;0<=i;i--)(e=c[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,s=!0,e._setPos&&(e._setPos(u),s=!1),e.clusterHide&&(e.clusterHide(),s=!1),s&&l.removeLayer(e),_&&(s=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=s,n.setStyle({opacity:0})));a._ignoreMove=!1,setTimeout(function(){var t=0;for(i=c.length-1;0<=i;i--)(e=c[i])._spiderLeg&&t++;for(i=c.length-1;0<=i;i--)(e=c[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),1<t&&l.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);a._animationEnd(),a.fire("unspiderfied",{cluster:r,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i});
|
|
1
|
+
function MapDelegate(l){var u,n,h=L.icon({iconUrl:l.BMLTPlugin_images+"/NAMarker.png",shadowUrl:l.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),c=L.icon({iconUrl:l.BMLTPlugin_images+"/NAMarkerG.png",shadowUrl:l.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),d=L.icon({iconUrl:l.BMLTPlugin_images+"/NAMarkerSel.png",shadowUrl:l.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),e=L.icon({iconUrl:l.BMLTPlugin_images+"/SearchPoint.png",shadowUrl:l.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),_=[],p=null,i=!1,m=!1;function o(t,e){if(!u)return 12;var i=u.getZoom();if(l.map_search&&l.filter_visible)return i;for(var n=u.getCenter(),o=u.getBounds(),s=!1;0==e(o,n).length&&6<i;){s=!0,--i;var r=L.latLng(2*o.getNorthEast().lat-n.lat,2*o.getNorthEast().lng-n.lng),a=L.latLng(2*o.getSouthWest().lat-n.lat,2*o.getSouthWest().lng-n.lng),o=L.latLngBounds(a,r)}if(!t&&!s&&i<12){for(var h=e(o).length;i<12&&0<h;){i+=1;r=L.latLng(.5*(o.getNorthEast().lat+n.lat),.5*(o.getNorthEast().lng+n.lng)),a=L.latLng(.5*(o.getSouthWest().lat+n.lat),.5*(o.getSouthWest().lng+n.lng)),h=e(o=L.latLngBounds(a,r)).length}0==h&&--i}return i}function a(t,e,i){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var e;if(200!==n.status&&304!==n.status)e="";else if("string"==typeof n.response)try{e=JSON.parse(n.response)}catch(t){e=n.response}else e=n.response;i(e)}},n.open("GET",t+function(t,e,i){var n,o=[];for(n in t){var s=encodeURIComponent(i?n.toUpperCase():n),r=t[n];if(L.Util.isArray(r))for(var a=0;a<r.length;a++)o.push(s+"="+encodeURIComponent(r[a]));else o.push(s+"="+encodeURIComponent(r))}return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}(e),!0),n.responseType="json",n.setRequestHeader("Accept","application/json"),n.setRequestHeader("Accept","*/*"),n.send(null)}function s(t){return"number"==typeof t||"string"==typeof t&&""!==t.trim()&&!isNaN(t)}this.createMap=function(t,e,i=!1){return e?i?(gDiv=t,gDiv.style.height="auto",gDiv.style.marginBottom="10px",u=null,gDiv):(myOptions={minZoom:l.minZoom,maxZoom:l.maxZoom,doubleClickZoom:!1,scrollWheelZoom:!1},myOptions=Object.assign(myOptions,{center:new L.latLng(e.latitude,e.longitude),zoom:e.zoom}),0==(i=t.offsetWidth)&&(i=t.parentNode.offsetWidth),e=t.offsetHeight,1.4*i<(e=0==e?i:e)&&(t.style.height=1.6*i+"px"),u=new L.Map(t,myOptions),n=L.tileLayer(l.tileUrl,l.tileOptions).addTo(u),u.zoomControl.setPosition("bottomright"),u.on("moveend",function(){n.redraw()}),u):null},this.addListener=function(t,e,i){if(u)return"dragend"==(t="dragstart"==(t="idle"==t?"moveend":t)?"movestart":t)&&(t="moveend"),i?u.once(t,e):u.on(t,e),{event:t,f:e}},this.removeListener=function(t){u&&u.off(t.event,t.f)},this.addControl=function(e,t,i){if(u){var n=L.Control.extend({onAdd:function(t){return e},onRemove:function(t){}});if(i){const o=new MutationObserver(function(t){t.forEach(t=>{t.addedNodes.forEach(t=>{t===e&&(o.disconnect(),i())})})});o.observe(document,{childList:!0,subtree:!0})}new n({position:t}).addTo(u)}else gDiv.appendChild(e)},this.setViewToPosition=function(t,e,i=null){u&&(t=L.latLng(t.latitude,t.longitude),u.flyTo(t),u.once("moveend",function(t){newZoom=o(!1,e),u.getZoom()!=newZoom?(u.setZoom(newZoom),u.once("zoomend",function(){u.invalidateSize(),i&&u.once("load moveend",i)})):i&&i()}))},this.clearAllMarkers=function(){u&&(_&&_.forEach(t=>{t.marker.closePopup(),u.removeLayer(t.marker)}),_=[])},this.fromLatLngToPoint=function(t,e){return u?u.latLngToLayerPoint(L.latLng(t,e)):null},this.callGeocoder=function(t,e,i=function(t,e){t&&t[0]&&t[0].bbox?(u.flyToBounds(t[0].bbox),u.on("moveend",function(t){u.off("moveend"),u.setZoom(o(!0,e)),u.once("moveend",function(){n.redraw()})})):alert(crouton.localization.getWord("address_lookup_fail"))}){geoCodeParams={},l.region&&""!==l.region.trim()&&(geoCodeParams.countrycodes=l.region),l.bounds&&s(l.bounds.north)&&s(l.bounds.east)&&s(l.bounds.south)&&s(l.bounds.west)&&(geoCodeParams.viewbox=l.bounds.south+","+l.bounds.west+","+l.bounds.north+","+l.bounds.east),function(t,e,s,r){a((l.nominatimUrl||"https://nominatim.openstreetmap.org/")+"search",L.extend({q:t,limit:5,format:"json",addressdetails:1},e),L.bind(function(t){var e=[];if(t&&t.length){for(var i=t.length-1;0<=i;i--){for(var n=t[i].boundingbox,o=0;o<4;o++)n[o]=parseFloat(n[o]);e[i]={icon:t[i].icon,name:t[i].display_name,bbox:L.latLngBounds([n[0],n[2]],[n[1],n[3]]),center:L.latLng(t[i].lat,t[i].lon),properties:t[i]}}r?s(e,r):s(e)}else alert(crouton.localization.getWord("address_lookup_fail"))},this))}(t,geoCodeParams,i,e)},this.setZoom=function(t,e=0){u&&(0<e?u.setZoom(e):u.setZoom(o(!1,t)))},this.getZoom=function(){return u?u.getZoom():null},this.createMarker=function(t,e,n,o,s,r){if(u){let i=function(t){t=t.id.split("-")[1];m=t,jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+t+" > td").addClass("rowHighlight"),"undefined"!=typeof crouton&&crouton.dayTabFromId(t)};var a=L.marker(t,{icon:e?c:h,title:o}).bindPopup(n);a.isMulti=e,p?p.addLayer(a):a.addTo(u),a.on("popupopen",function(t){r&&a.getPopup().getContent().includes("panel-"+r)&&jQuery("input[type=radio][name=panel]").filter(function(){return jQuery(this).attr("id")=="panel-"+r}).each(function(t,e){jQuery(this).prop("checked",!0)}),a.setIcon(d),u.on("zoomstart",function(){a.closePopup()}),jQuery("input[type=radio][name=panel]:checked").each(function(t,e){i(e)}),jQuery("input[type=radio][name=panel]").change(function(){i(this)})}),a.on("popupclose",function(t){m=!1,a.setIcon(a.isMulti?c:h),jQuery(".bmlt-data-row > td").removeClass("rowHighlight")}),r&&s.includes(parseInt(r))&&(a.openPopup(),a.once("add",function(){a.isPopupOpen()||a.openPopup()})),_.push({ids:s,marker:a})}},this.contains=function(t,e,i){return!u||t.contains(L.latLng(e,i))},this.getBounds=function(){return u?u.getBounds():null},this.invalidateSize=function(){u&&u.invalidateSize()},this.zoomOut=function(t){u&&u.setZoom(o(!0,t))},this.fitBounds=function(t){u&&(t=t.reduce(function(t,e){return t.extend(e),t},L.latLngBounds()),u.fitBounds(t))},this.openMarker=function(e){u&&(marker=_.find(t=>t.ids.includes(e)),marker&&(marker.marker.openPopup(),jQuery("#panel-"+e).prop("checked",!0),"undefined"!=typeof crouton&&crouton.dayTabFromId(e)),jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+e+" > td").addClass("rowHighlight"))},this.isApiLoaded=function(){return!0},this.createClusterLayer=function(){u&&(p=L.markerClusterGroup())},this.addClusterLayer=function(){u&&p&&u.addLayer(p)},this.removeClusterLayer=function(){u&&(p&&u.removeLayer(p),p=null)},this.clickSearch=function(t,e){L.DomUtil.addClass(u._container,"crosshair-cursor-enabled"),u.once("click",function(t){u.once("click",function(t){L.DomUtil.removeClass(u._container,"crosshair-cursor-enabled"),e(t.latlng.lat,t.latlng.lng)})})},this.getGeocodeCenter=function(t){if(t&&t[0])return{lat:t[0].center.lat,lng:t[0].center.lng};alert(crouton.localization.getWord("address_lookup_fail"))},this.modalOn=function(){u&&u.dragging.disable()},this.modalOff=function(){u&&u.dragging.enable()},this.afterInit=function(t){t()},this.isMapDefined=function(){return null!=u},this.getCorners=function(t=!1){return{ne:{lat:(t=t?t.reduce(function(t,e){return t.extend(e),t},L.latLngBounds()):u.getBounds()).getNorthEast().lat,lng:t.getNorthEast().lng},sw:{lat:t.getSouthWest().lat,lng:t.getSouthWest().lng}}},this.getCenter=function(){return{lat:u.getCenter().lat,lng:u.getCenter().lng}},this.markSearchPoint=function(t){u&&(i&&i.remove(),(i=L.marker(t,{icon:e})).addTo(u))},this.getOpenMarker=function(){return m}}MapDelegate.prototype.createMap=null,MapDelegate.prototype.addListener=null,MapDelegate.prototype.removeListener=null,MapDelegate.prototype.addControl=null,MapDelegate.prototype.setViewToPosition=null,MapDelegate.prototype.clearAllMarkers=null,MapDelegate.prototype.fromLatLngToPoint=null,MapDelegate.prototype.callGeocoder=null,MapDelegate.prototype.setZoom=null,MapDelegate.prototype.getZoom=null,MapDelegate.prototype.createMarker=null,MapDelegate.prototype.contains=null,MapDelegate.prototype.getBounds=null,MapDelegate.prototype.invalidateSize=null,MapDelegate.prototype.zoomOut=null,MapDelegate.prototype.fitBounds=null,MapDelegate.prototype.openMarker=null,MapDelegate.prototype.isApiLoaded=null,MapDelegate.prototype.createClusterLayer=null,MapDelegate.prototype.addClusterLayer=null,MapDelegate.prototype.removeClusterLayer=null,MapDelegate.prototype.clickSearch=null,MapDelegate.prototype.getGeocodeCenter=null,MapDelegate.prototype.modalOn=null,MapDelegate.prototype.modalOff=null,MapDelegate.prototype.afterInit=null,MapDelegate.prototype.isMapDefined=null,MapDelegate.prototype.getCorners=null,MapDelegate.prototype.getCenter=null,MapDelegate.prototype.markSearchPoint=null,MapDelegate.prototype.getOpenMarker=null,function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,function(t){"use strict";var e=Object.freeze;function h(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}Object.freeze=function(t){return t};var s=Object.create||function(t){return i.prototype=t,new i};function i(){}function d(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var n=0;function p(t){return t._leaflet_id=t._leaflet_id||++n,t._leaflet_id}function o(t,e,i){var n,o,s,r=function(){n=!1,o&&(s.apply(i,o),o=!1)};return s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}}function r(t,e,i){var n=e[1],o=e[0],e=n-o;return t===n&&i?t:((t-o)%e+e)%e+o}function a(){return!1}function l(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return u(t).split(/\s+/)}function _(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?s(t.options):{}),e)t.options[i]=e[i];return t.options}function m(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var f=/\{ *([\w_-]+) *\}/g;function g(t,i){return t.replace(f,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var P=0;function b(t){var e=+new Date,i=Math.max(0,16-(e-P));return P=e+i,window.setTimeout(t,i)}var M=window.requestAnimationFrame||w("RequestAnimationFrame")||b,C=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function T(t,e,i){if(!i||M!==b)return M.call(window,d(t,e));t.call(e)}function z(t){t&&C.call(window,t)}var k=(Object.freeze||Object)({freeze:e,extend:h,create:s,bind:d,lastId:n,stamp:p,throttle:o,wrapNum:r,falseFn:a,formatNum:l,trim:u,splitWords:c,setOptions:_,getParamString:m,template:g,isArray:v,indexOf:y,emptyImageUrl:x,requestFn:M,cancelFn:C,requestAnimFrame:T,cancelAnimFrame:z});function S(){}S.extend=function(t){function e(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=s(n);for(i in(o.constructor=e).prototype=o,this)this.hasOwnProperty(i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);return t.statics&&(h(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),h.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=h(s(o.options),t.options)),h(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},S.include=function(t){return h(this.prototype,t),this},S.mergeOptions=function(t){return h(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var Z={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=c(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var o=0,s=(t=c(t)).length;o<s;o++)this._off(t[o],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(this._events[t]=n=[]);for(var t={fn:e,ctx:i=i===this?void 0:i},o=n,s=0,r=o.length;s<r;s++)if(o[s].fn===e&&o[s].ctx===i)return;o.push(t)},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===i&&r.fn===e)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=a;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=h({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s];a.fn.call(a.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var o=d(function(){this.off(t,e,i).off(t,o,i)},this);return this.on(t,e,i).on(t,o,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};Z.addEventListener=Z.on,Z.removeEventListener=Z.clearAllEventListeners=Z.off,Z.addOneTimeEventListener=Z.once,Z.fireEvent=Z.fire,Z.hasEventListeners=Z.listens;var E=S.extend(Z);function A(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var B=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function O(t,e,i){return t instanceof A?t:v(t)?new A(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,e,i)}function I(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function D(t,e){return!t||t instanceof I?t:new I(t,e)}function N(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function R(t,e){return t instanceof N?t:new N(t,e)}function j(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function G(t,e,i){return t instanceof j?t:v(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,t=t.y-this.y;return Math.sqrt(e*e+t*t)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},I.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new A((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new A(this.min.x,this.max.y)},getTopRight:function(){return new A(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t=("number"==typeof t[0]||t instanceof A?O:D)(t))instanceof I?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=D(t);var e=this.min,i=this.max,n=t.min,o=t.max,t=o.x>=e.x&&n.x<=i.x,i=o.y>=e.y&&n.y<=i.y;return t&&i},overlaps:function(t){t=D(t);var e=this.min,i=this.max,n=t.min,o=t.max,t=o.x>e.x&&n.x<i.x,i=o.y>e.y&&n.y<i.y;return t&&i},isValid:function(){return!(!this.min||!this.max)}},N.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof j)i=e=t;else{if(!(t instanceof N))return t?this.extend(G(t)||R(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,t=Math.abs(e.lng-i.lng)*t;return new N(new j(e.lat-n,e.lng-t),new j(i.lat+n,i.lng+t))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof j||"lat"in t?G:R)(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=R(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),t=o.lat>=e.lat&&n.lat<=i.lat,i=o.lng>=e.lng&&n.lng<=i.lng;return t&&i},overlaps:function(t){t=R(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),t=o.lat>e.lat&&n.lat<i.lat,i=o.lng>e.lng&&n.lng<i.lng;return t&&i},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var H={latLngToPoint:function(t,e){t=this.projection.project(t),e=this.scale(e);return this.transformation._transform(t,e)},pointToLatLng:function(t,e){e=this.scale(e),e=this.transformation.untransform(t,e);return this.projection.unproject(e)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,t=this.scale(t);return new I(this.transformation.transform(e.min,t),this.transformation.transform(e.max,t))},infinite:!(j.prototype={equals:function(t,e){return!!t&&(t=G(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,G(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,t=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-t],[this.lat+e,this.lng+t])},clone:function(){return new j(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,e=e.lng-i.lng;if(0==n&&0==e)return t;i=t.getSouthWest(),t=t.getNorthEast();return new N(new j(i.lat-n,i.lng-e),new j(t.lat-n,t.lng-e))}},U=h({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),i=Math.sin((e.lng-t.lng)*i/2),i=s*s+Math.cos(n)*Math.cos(o)*i*i,i=2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i));return this.R*i}}),W={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,i=Math.max(Math.min(i,t.lat),-i),i=Math.sin(i*e);return new A(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new I([-(vt=6378137*Math.PI),-vt],[vt,vt])};function F(t,e,i,n){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function V(t,e,i,n){return new F(t,e,i,n)}F.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new A((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var q=h({},U,{code:"EPSG:3857",projection:W,transformation:V(yt=.5/(Math.PI*W.R),.5,-yt,.5)}),K=h({},q,{code:"EPSG:900913"});function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){for(var i,n,o,s,r="",a=0,h=t.length;a<h;a++){for(i=0,n=(o=t[a]).length;i<n;i++)r+=(i?"L":"M")+(s=o[i]).x+" "+s.y;r+=e?Mt?"z":"x":""}return r||"M0 0"}var J=document.documentElement.style,Q="ActiveXObject"in window,$=Q&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Tt("webkit"),it=Tt("android"),nt=Tt("android 2")||Tt("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=it&&Tt("Google")&&ot<537&&!("AudioNode"in window),rt=!!window.opera,at=Tt("chrome"),ht=Tt("gecko")&&!et&&!rt&&!Q,lt=!at&&Tt("safari"),ut=Tt("phantom"),ct="OTransition"in J,dt=0===navigator.platform.indexOf("Win"),_t=Q&&"transition"in J,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,mt="MozPerspective"in J,ft=!window.L_DISABLE_3D&&(_t||pt||mt)&&!ct&&!ut,gt="undefined"!=typeof orientation||Tt("mobile"),vt=gt&&et,yt=gt&&pt,ot=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!ot),xt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),wt=gt&&rt,J=gt&&ht,Pt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),bt=!!document.createElement("canvas").getContext,Mt=!(!document.createElementNS||!Y("svg").createSVGRect),Ct=!Mt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Tt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var rt=(Object.freeze||Object)({ie:Q,ielt9:$,edge:tt,webkit:et,android:it,android23:nt,androidStock:st,opera:rt,chrome:at,gecko:ht,safari:lt,phantom:ut,opera12:ct,win:dt,ie3d:_t,webkit3d:pt,gecko3d:mt,any3d:ft,mobile:gt,mobileWebkit:vt,mobileWebkit3d:yt,msPointer:ot,pointer:Lt,touch:xt,mobileOpera:wt,mobileGecko:J,retina:Pt,canvas:bt,svg:Mt,vml:Ct}),zt=ot?"MSPointerDown":"pointerdown",kt=ot?"MSPointerMove":"pointermove",St=ot?"MSPointerUp":"pointerup",Zt=ot?"MSPointerCancel":"pointercancel",Et=["INPUT","SELECT","OPTION"],At={},Bt=!1,Ot=0;function It(t,e,i,n){return"touchstart"===e?(a=t,h=i,l=n,u=d(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Et.indexOf(t.target.tagName)<0))return;Se(t)}jt(t,h)}),a["_leaflet_touchstart"+l]=u,a.addEventListener(zt,u,!1),Bt||(document.documentElement.addEventListener(zt,Dt,!0),document.documentElement.addEventListener(kt,Nt,!0),document.documentElement.addEventListener(St,Rt,!0),document.documentElement.addEventListener(Zt,Rt,!0),Bt=!0)):"touchmove"===e?(r=i,(u=t)["_leaflet_touchmove"+n]=c,u.addEventListener(kt,c,!1)):"touchend"===e&&(s=i,(t=t)["_leaflet_touchend"+n]=o,t.addEventListener(St,o,!1),t.addEventListener(Zt,o,!1)),this;function o(t){jt(t,s)}var s,r,a,h,l,u;function c(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&jt(t,r)}}function Dt(t){At[t.pointerId]=t,Ot++}function Nt(t){At[t.pointerId]&&(At[t.pointerId]=t)}function Rt(t){delete At[t.pointerId],Ot--}function jt(t,e){for(var i in t.touches=[],At)t.touches.push(At[i]);t.changedTouches=[t],e(t)}var Gt=ot?"MSPointerDown":Lt?"pointerdown":"touchstart",Ht=ot?"MSPointerUp":Lt?"pointerup":"touchend",Ut="_leaflet_";var Wt,Ft,Vt,qt,Kt,Yt,Xt=de(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=de(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qt="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function $t(t){return"string"==typeof t?document.getElementById(t):t}function te(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=(!i||"auto"===i)&&document.defaultView?(t=document.defaultView.getComputedStyle(t,null))?t[e]:null:i)?null:i}function ee(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function ie(t){var e=t.parentNode;e&&e.removeChild(t)}function ne(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function oe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function se(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function re(t,e){if(void 0!==t.classList)return t.classList.contains(e);t=ue(t);return 0<t.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function ae(t,e){var i;if(void 0!==t.classList)for(var n=c(e),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else re(t,e)||le(t,((i=ue(t))?i+" ":"")+e)}function he(t,e){void 0!==t.classList?t.classList.remove(e):le(t,u((" "+ue(t)+" ").replace(" "+e+" "," ")))}function le(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ue(t){return void 0===(t=t.correspondingElement?t.correspondingElement:t).className.baseVal?t.className:t.className.baseVal}function ce(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function de(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function _e(t,e,i){e=e||new A(0,0);t.style[Xt]=(_t?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(i?" scale("+i+")":"")}function pe(t,e){t._leaflet_pos=e,ft?_e(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function me(t){return t._leaflet_pos||new A(0,0)}function fe(){we(window,"dragstart",Se)}function ge(){be(window,"dragstart",Se)}function ve(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(ye(),Vt=(Ft=t).style.outline,t.style.outline="none",we(window,"keydown",ye))}function ye(){Ft&&(Ft.style.outline=Vt,Vt=Ft=void 0,be(window,"keydown",ye))}function Le(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function xe(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}Yt="onselectstart"in document?(Kt=function(){we(window,"selectstart",Se)},function(){be(window,"selectstart",Se)}):(qt=de(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Kt=function(){var t;qt&&(t=document.documentElement.style,Wt=t[qt],t[qt]="none")},function(){qt&&(document.documentElement.style[qt]=Wt,Wt=void 0)});ut=(Object.freeze||Object)({TRANSFORM:Xt,TRANSITION:Jt,TRANSITION_END:Qt,get:$t,getStyle:te,create:ee,remove:ie,empty:ne,toFront:oe,toBack:se,hasClass:re,addClass:ae,removeClass:he,setClass:le,getClass:ue,setOpacity:ce,testProp:de,setTransform:_e,setPosition:pe,getPosition:me,disableTextSelection:Kt,enableTextSelection:Yt,disableImageDrag:fe,enableImageDrag:ge,preventOutline:ve,restoreOutline:ye,getSizedParentNode:Le,getScale:xe});function we(t,e,i,n){if("object"==typeof e)for(var o in e)Me(t,o,e[o],i);else for(var s=0,r=(e=c(e)).length;s<r;s++)Me(t,e[s],i,n);return this}var Pe="_leaflet_events";function be(t,e,i,n){if("object"==typeof e)for(var o in e)Ce(t,o,e[o],i);else if(e)for(var s=0,r=(e=c(e)).length;s<r;s++)Ce(t,e[s],i,n);else{for(var a in t[Pe])Ce(t,a,t[Pe][a]);delete t[Pe]}return this}function Me(e,t,i,n){var o=t+p(i)+(n?"_"+p(n):"");if(e[Pe]&&e[Pe][o])return this;var s,r,a,h,l,u=function(t){return i.call(n||e,t||window.event)},c=u;function d(t){var e,i;if(Lt){if(!tt||"mouse"===t.pointerType)return;i=Ot}else i=t.touches.length;1<i||(i=(e=Date.now())-(a||e),h=t.touches?t.touches[0]:t,l=0<i&&i<=250,a=e)}function _(t){if(l&&!h.cancelBubble){if(Lt){if(!tt||"mouse"===t.pointerType)return;var e,i,n={};for(i in h)e=h[i],n[i]=e&&e.bind?e.bind(h):e;h=n}h.type="dblclick",h.button=0,r(h),a=null}}Lt&&0===t.indexOf("touch")?It(e,t,u,o):!xt||"dblclick"!==t||Lt&&at?"addEventListener"in e?"mousewheel"===t?e.addEventListener("onwheel"in e?"wheel":"mousewheel",u,!1):"mouseenter"===t||"mouseleave"===t?(u=function(t){t=t||window.event,Re(e,t)&&c(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",u,!1)):("click"===t&&it&&(u=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Oe&&i-Oe;if(n&&100<n&&n<500||t.target._simulatedClick&&!t._simulated)return Ze(t);Oe=i,e(t)}(t,c)}),e.addEventListener(t,u,!1)):"attachEvent"in e&&e.attachEvent("on"+t,u):(r=u,l=!1,(s=e)[Ut+Gt+(t=o)]=d,s[Ut+Ht+t]=_,s[Ut+"dblclick"+t]=r,s.addEventListener(Gt,d,!1),s.addEventListener(Ht,_,!1),s.addEventListener("dblclick",r,!1)),e[Pe]=e[Pe]||{},e[Pe][o]=u}function Ce(t,e,i,n){var o,s,r=e+p(i)+(n?"_"+p(n):""),i=t[Pe]&&t[Pe][r];if(!i)return this;Lt&&0===e.indexOf("touch")?(s=(o=t)["_leaflet_"+(n=e)+r],"touchstart"===n?o.removeEventListener(zt,s,!1):"touchmove"===n?o.removeEventListener(kt,s,!1):"touchend"===n&&(o.removeEventListener(St,s,!1),o.removeEventListener(Zt,s,!1))):!xt||"dblclick"!==e||Lt&&at?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,i,!1):"detachEvent"in t&&t.detachEvent("on"+e,i):(e=(o=t)[Ut+Gt+(s=r)],i=o[Ut+Ht+r],s=o[Ut+"dblclick"+r],o.removeEventListener(Gt,e,!1),o.removeEventListener(Ht,i,!1),tt||o.removeEventListener("dblclick",s,!1)),t[Pe][r]=null}function Te(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ne(t),this}function ze(t){return Me(t,"mousewheel",Te),this}function ke(t){return we(t,"mousedown touchstart dblclick",Te),Me(t,"click",De),this}function Se(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ze(t){return Se(t),Te(t),this}function Ee(t,e){if(!e)return new A(t.clientX,t.clientY);var i=xe(e),n=i.boundingClientRect;return new A((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Ae=dt&&at?2*window.devicePixelRatio:ht?window.devicePixelRatio:1;function Be(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ae:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Oe,Ie={};function De(t){Ie[t.type]=!0}function Ne(t){var e=Ie[t.type];return Ie[t.type]=!1,e}function Re(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var ct=(Object.freeze||Object)({on:we,off:be,stopPropagation:Te,disableScrollPropagation:ze,disableClickPropagation:ke,preventDefault:Se,stop:Ze,getMousePosition:Ee,getWheelDelta:Be,fakeStop:De,skipped:Ne,isExternalTarget:Re,addListener:we,removeListener:be}),je=E.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=me(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=T(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){t=this._startPos.add(this._offset.multiplyBy(t));e&&t._round(),pe(this._el,t),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ge=E.extend({options:{crs:q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=_(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=d(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(G(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Jt&&ft&&!wt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),we(this._proxy,Qt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(G(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=h({animate:i.animate},i.zoom),i.pan=h({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?clearTimeout(this._sizeTimer):this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(ft?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(ft?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),n=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),n=this.containerPointToLatLng(o.add(n));return this.setView(n,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var i=O(e.paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};n=n.subtract(i).divideBy(2),i=this.project(t.getSouthWest(),o),t=this.project(t.getNorthEast(),o);return{center:this.unproject(i.add(t).divideBy(2).add(n),o),zoom:o}},fitBounds:function(t,e){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");t=this._getBoundsCenterZoom(t,e);return this.setView(t.center,t.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){return e=e||{},(t=O(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new je,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(ae(this._mapPane,"leaflet-pan-anim"),i=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var i},flyTo:function(n,o,t){if(!1===(t=t||{}).animate||!ft)return this.setView(n,o,t);this._stop();var s=this.project(this.getCenter()),r=this.project(n),e=this.getSize(),a=this._zoom;n=G(n),o=void 0===o?a:o;var h=Math.max(e.x,e.y),i=h*this.getZoomScale(a,o),l=r.distanceTo(s)||1,u=1.42,c=u*u;function d(t){t=(i*i-h*h+(t?-1:1)*c*c*l*l)/(2*(t?i:h)*c*l),t=Math.sqrt(t*t+1)-t;return t<1e-9?-18:Math.log(t)}function _(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);var f=Date.now(),g=(d(1)-m)/u,v=t.duration?1e3*t.duration:1e3*g*.8;return this._moveStart(!0,t.noMoveStart),function t(){var e=(Date.now()-f)/v,i=(1-Math.pow(1-e,1.5))*g;e<=1?(this._flyToFrame=T(t,this),this._move(this.unproject(s.add(r.subtract(s).multiplyBy((e=i,h*(p(m)*(_(e=m+u*e)/p(e))-_(m))/c/l))),a),this.getScaleZoom(h/(i=i,h*(p(m)/p(m+u*i))),a),{flyTo:!0})):this._move(n,o)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){t=this._getBoundsCenterZoom(t,e);return this.flyTo(t.center,t.zoom,e)},setMaxBounds:function(t){return(t=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,R(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),h=a.getSize().divideBy(2),o=D([a.min.add(i),a.max.subtract(n)]);return o.contains(r)||(this._enforcingBounds=!0,t=s.subtract(r),a=O(r.x+t.x,r.y+t.y),(r.x<o.min.x||r.x>o.max.x)&&(a.x=s.x-t.x,0<t.x?a.x+=h.x-i.x:a.x-=h.x-n.x),(r.y<o.min.y||r.y>o.max.y)&&(a.y=s.y-t.y,0<t.y?a.y+=h.y-i.y:a.y-=h.y-n.y),this.panTo(this.unproject(a),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),o=n.subtract(o);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=h({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=d(this._handleGeolocationResponse,this),i=d(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,t=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: "+t+"."})},_handleGeolocationResponse:function(t){var e,i=new j(t.coords.latitude,t.coords.longitude),n=i.toBounds(2*t.coords.accuracy),o=this._locateOptions;o.setView&&(e=this.getBoundsZoom(n),this.setView(i,o.maxZoom?Math.min(e,o.maxZoom):e));var s,r={latlng:i,bounds:n,timestamp:t.timestamp};for(s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;e=this[t]=new e(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ie(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ie(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=ee("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new 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,i){t=R(t),i=O(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),t=this.getSize().subtract(i),i=D(this.project(a,n),this.project(r,n)).getSize(),a=ft?this.options.zoomSnap:1,r=t.x/i.x,i=t.y/i.y,i=e?Math.max(r,i):Math.min(r,i),n=this.getScaleZoom(i,n);return a&&(n=Math.round(n/(a/100))*(a/100),n=e?Math.ceil(n/a)*a:Math.floor(n/a)*a),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){e=this._getTopLeftPoint(t,e);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;e=i.zoom(t*i.scale(e));return isNaN(e)?1/0:e},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){t=O(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(G(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance(G(t),G(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},mouseEventToContainerPoint:function(t){return Ee(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=$t(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");we(t,"scroll",this._onScroll,this),this._containerId=p(t)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ft,ae(t,"leaflet-container"+(xt?" leaflet-touch":"")+(Pt?" leaflet-retina":"")+($?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=te(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),pe(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ae(t.markerPane,"leaflet-zoom-hide"),ae(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){pe(this._mapPane,new A(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){pe(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={};var e=t?be:we;e((this._targets[p(this._container)]=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&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[p(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!Re(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=!(n.length||r||o)&&Re(s,t)?[this]:n},_handleDOMEvent:function(t){var e;this._loaded&&!Ne(t)&&("mousedown"!==(e=t.type)&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||ve(t.target||t.srcElement),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type&&((o=h({},t)).type="preclick",this._fireDOMEvent(o,o.type,i)),!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var n=i[0];"contextmenu"===e&&n.listens(e,!0)&&Se(t);var o,s={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(o=n.getLatLng&&(!n._radius||n._radius<=10),s.containerPoint=o?this.latLngToContainerPoint(n.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=o?n.getLatLng():this.layerPointToLatLng(s.layerPoint));for(var r=0;r<i.length;r++)if(i[r].fire(e,s,!0),s.originalEvent._stopped||!1===i[r].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return me(this._mapPane)||new A(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){i=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,i){i=this._getNewPixelOrigin(i,e);return D([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),o=new I(n.subtract(o),n.add(o)),i=this._getBoundsOffset(o,i,e);return i.round().equals([0,0])?t:this.unproject(n.add(i),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),i=new I(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,i){e=D(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),i=e.min.subtract(t.min),t=e.max.subtract(t.max);return new A(this._rebound(i.x,-t.x),this._rebound(i.y,-t.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=ft?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){t=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(t)||(this.panBy(t,e),0))},_createAnimProxy:function(){var t=this._proxy=ee("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Xt,i=this._proxy.style[e];_e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();_e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ie(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(n)||(T(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ae(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(d(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),T(function(){this._moveEnd(!0)},this))}});function He(t){return new Ue(t)}var Ue=S.extend({options:{position:"topright"},initialize:function(t){_(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return ae(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ie(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Ge.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var i=this._controlCorners={},n="leaflet-",o=this._controlContainer=ee("div",n+"control-container",this._container);function t(t,e){i[t+e]=ee("div",n+t+" "+n+e,o)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ie(this._controlCorners[t]);ie(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var We=Ue.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in _(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ue.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);t=this._getLayer(p(t));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){ae(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ae(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):he(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return he(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ee("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),ke(e),ze(e);var n=this._section=ee("section",t+"-list");i&&(this._map.on("click",this.collapse,this),it||we(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ee("a",t+"-toggle",e);o.href="#",o.title="Layers",xt?(we(o,"click",Ze),we(o,"click",this.expand,this)):we(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=ee("div",t+"-base",n),this._separator=ee("div",t+"-separator",n),this._overlaysList=ee("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(d(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ne(this._baseLayersList),ne(this._overlaysList),this._layerControlInputs=[];for(var t,e,i,n=0,o=0;o<this._layers.length;o++)i=this._layers[o],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,n+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<n)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(p(t.target)),t=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;t&&this._map.fire(t,e)},_createRadioElement:function(t,e){t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+p(this),n),this._layerControlInputs.push(e),e.layerId=p(t.layer),we(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;n=document.createElement("div");return i.appendChild(n),n.appendChild(e),n.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Fe=Ue.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ee("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){n=ee("a",i,n);return n.innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),ke(n),we(n,"click",Ze),we(n,"click",o,this),we(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||ae(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||ae(this._zoomInButton,e)}});Ge.mergeOptions({zoomControl:!0}),Ge.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Fe,this.addControl(this.zoomControl))});var Ve=Ue.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ee("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=ee("div",e,i)),t.imperial&&(this._iScale=ee("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(e)},_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);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i=3.2808399*t;5280<i?(t=this._getRoundNum(e=i/5280),this._updateScale(this._iScale,t+" mi",t/e)):(e=this._getRoundNum(i),this._updateScale(this._iScale,e+" ft",e/i))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),t=t/e;return e*(10<=t?10:5<=t?5:3<=t?3:2<=t?2:1)}}),qe=Ue.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){_(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ee("div","leaflet-control-attribution"),ke(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(" | ")}}});Ge.mergeOptions({attributionControl:!0}),Ge.addInitHook(function(){this.options.attributionControl&&(new qe).addTo(this)}),Ue.Layers=We,Ue.Zoom=Fe,Ue.Scale=Ve,Ue.Attribution=qe,He.layers=function(t,e,i){return new We(t,e,i)},He.zoom=function(t){return new Fe(t)},He.scale=function(t){return new Ve(t)},He.attribution=function(t){return new qe(t)};pt=S.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},enabled:function(){return!!this._enabled}});pt.addTo=function(t,e){return t.addHandler(e,this),this};var Ke,mt={Events:Z},Ye=xt?"touchstart mousedown":"mousedown",Xe={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Je={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Qe=E.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){_(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(we(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Qe._dragging===this&&this.finishDrag(),be(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;t._simulated||!this._enabled||(this._moved=!1,re(this._element,"leaflet-zoom-anim")||Qe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Qe._dragging=this)._preventOutline&&ve(this._element),fe(),Kt(),this._moving))||(this.fire("down"),e=t.touches?t.touches[0]:t,i=Le(this._element),this._startPoint=new A(e.clientX,e.clientY),this._parentScale=xe(i),we(document,Je[t.type],this._onMove,this),we(document,Xe[t.type],this._onUp,this))},_onMove:function(t){var e;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((e=new A((e=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,e.clientY)._subtract(this._startPoint)).x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Se(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=me(this._element).subtract(e),ae(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ae(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,z(this._animRequest),this._lastEvent=t,this._animRequest=T(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),pe(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in he(document.body,"leaflet-dragging"),this._lastTarget&&(he(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Je)be(document,Je[t],this._onMove,this),be(document,Xe[t],this._onUp,this);ge(),Yt(),this._moved&&this._moving&&(z(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Qe._dragging=!1}});function $e(t,e){if(!e||!t.length)return t.slice();e*=e;return function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,s){for(var r,a,h=0,l=o+1;l<=s-1;l++)h<(a=oi(e[l],e[o],e[s],!0))&&(r=l,h=a);n<h&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,s))}(t,n,e,0,i-1);for(var o=[],s=0;s<i;s++)n[s]&&o.push(t[s]);return o}(t=function(t,e){for(var i,n,o,s=[t[0]],r=1,a=0,h=t.length;r<h;r++)o=t[r],e<(n=(i=t[a]).x-o.x)*n+(o=i.y-o.y)*o&&(s.push(t[r]),a=r);return a<h-1&&s.push(t[h-1]),s}(t,e),e)}function ti(t,e,i){return Math.sqrt(oi(t,e,i,!0))}function ei(t,e,i,n,o){var s,r,a,h=n?Ke:ni(t,i),l=ni(e,i);for(Ke=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=ni(r=ii(t,e,s=h||l,i,o),i),s===h?(t=r,h=a):(e=r,l=a)}}function ii(t,e,i,n,o){var s,r,a=e.x-t.x,h=e.y-t.y,e=n.min,n=n.max;return 8&i?(s=t.x+a*(n.y-t.y)/h,r=n.y):4&i?(s=t.x+a*(e.y-t.y)/h,r=e.y):2&i?(s=n.x,r=t.y+h*(n.x-t.x)/a):1&i&&(s=e.x,r=t.y+h*(e.x-t.x)/a),new A(s,r,o)}function ni(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function oi(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,e=r*r+a*a;return 0<e&&(1<(e=((t.x-o)*r+(t.y-s)*a)/e)?(o=i.x,s=i.y):0<e&&(o+=r*e,s+=a*e)),r=t.x-o,a=t.y-s,n?r*r+a*a:new A(o,s)}function si(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ri(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),si(t)}vt=(Object.freeze||Object)({simplify:$e,pointToSegmentDistance:ti,closestPointOnSegment:function(t,e,i){return oi(t,e,i)},clipSegment:ei,_getEdgeIntersection:ii,_getBitCode:ni,_sqClosestPointOnSegment:oi,isFlat:si,_flat:ri});function ai(t,e,i){for(var n,o,s,r,a,h,l,u=[1,4,2,8],c=0,d=t.length;c<d;c++)t[c]._code=ni(t[c],e);for(s=0;s<4;s++){for(h=u[s],n=[],c=0,o=(d=t.length)-1;c<d;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((l=ii(a,r,h,e,i))._code=ni(l,e),n.push(l)):(a._code&h&&((l=ii(a,r,h,e,i))._code=ni(l,e),n.push(l)),n.push(r));t=n}return t}var yt=(Object.freeze||Object)({clipPolygon:ai}),J={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new I([-180,-90],[180,90])},ot={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),o=s*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-o)/(1+o),s/2),n=-i*Math.log(Math.max(s,1e-10));return new A(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,l=.1;h<15&&1e-7<Math.abs(l);h++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=l=Math.PI/2-2*Math.atan(r*e)-a;return new j(a*i,t.x*i/n)}},dt=(Object.freeze||Object)({LonLat:J,Mercator:ot,SphericalMercator:W}),Z=h({},U,{code:"EPSG:3395",projection:ot,transformation:V(ht=.5/(Math.PI*ot.R),.5,-ht,.5)}),hi=h({},U,{code:"EPSG:4326",projection:J,transformation:V(1/180,1,-1/180,.5)}),W=h({},H,{projection:J,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,t=e.lat-t.lat;return Math.sqrt(i*i+t*t)},infinite:!0});H.Earth=U,H.EPSG3395=Z,H.EPSG3857=q,H.EPSG900913=K,H.EPSG4326=hi,H.Simple=W;var li=E.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[p(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e,i=t.target;i.hasLayer(this)&&(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents&&(e=this.getEvents(),i.on(e,this),this.once("remove",function(){i.off(e,this)},this)),this.onAdd(i),this.getAttribution&&i.attributionControl&&i.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),i.fire("layeradd",{layer:this}))}});Ge.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=p(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=p(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&p(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?v(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=p(t);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,e=1/0,i=-1/0,n=this._getZoomSpan();for(t in this._zoomBoundLayers)var o=this._zoomBoundLayers[t].options,e=void 0===o.minZoom?e:Math.min(e,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom);this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ui=li.extend({initialize:function(t,e){var i,n;if(_(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){t=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:p}),ci=ui.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ui.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ui.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t,e=new N;for(t in this._layers){var i=this._layers[t];e.extend(i.getBounds?i.getBounds():i.getLatLng())}return e}}),di=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){_(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}e=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(e,t),e},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"],o=O(n="number"==typeof n?[n,n]:n),n=O("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),n&&(t.style.marginLeft=-n.x+"px",t.style.marginTop=-n.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Pt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),_i=di.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return _i.imagePath||(_i.imagePath=this._detectIconPath()),(this.options.imagePath||_i.imagePath)+di.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ee("div","leaflet-default-icon-path",document.body),e=te(t,"background-image")||te(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),pi=pt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Qe(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ae(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&he(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=me(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),o=D(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));o.contains(s)||(n=O((Math.max(o.max.x,s.x)-o.max.x)/(r.max.x-o.max.x)-(Math.min(o.min.x,s.x)-o.min.x)/(r.min.x-o.min.x),(Math.max(o.max.y,s.y)-o.max.y)/(r.max.y-o.max.y)-(Math.min(o.min.y,s.y)-o.min.y)/(r.min.y-o.min.y)).multiplyBy(n),i.panBy(n,{animate:!1}),this._draggable._newPos._add(n),this._draggable._startPos._add(n),pe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=T(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=me(e._icon),o=e._map.layerPointToLatLng(n);i&&pe(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),mi=li.extend({options:{icon:new _i,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){_(this,e),this._latlng=G(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=G(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ae(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),i=!1;o!==this._shadow&&(this._removeShadow(),i=!0),o&&(ae(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&i&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ie(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ie(this._shadow),this._shadow=null},_setPos:function(t){pe(this._icon,t),this._shadow&&pe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(ae(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pi)&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pi(this),t&&this.dragging.enable())},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&ce(this._icon,t),this._shadow&&ce(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),fi=li.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return _(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),gi=fi.extend({options:{fill:!0,radius:10},initialize:function(t,e){_(this,e),this._latlng=G(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=G(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return fi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),i=[t+i,e+i];this._pxBounds=new I(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),vi=gi.extend({initialize:function(t,e,i){if(_(this,e="number"==typeof e?h({},i,{radius:e}):e),this._latlng=G(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:fi.prototype.setStyle,_project:function(){var t,e,i,n,o,s=this._latlng.lng,r=this._latlng.lat,a=this._map,h=a.options.crs;h.distance===U.distance?(o=Math.PI/180,t=this._mRadius/U.R/o,e=a.project([r+t,s]),n=a.project([r-t,s]),i=e.add(n).divideBy(2),n=a.unproject(i).lat,o=Math.acos((Math.cos(t*o)-Math.sin(r*o)*Math.sin(n*o))/(Math.cos(r*o)*Math.cos(n*o)))/o,!isNaN(o)&&0!==o||(o=t/Math.cos(Math.PI/180*r)),this._point=i.subtract(a.getPixelOrigin()),this._radius=isNaN(o)?0:i.x-a.project([n,s-o]).x,this._radiusY=i.y-e.y):(h=h.unproject(h.project(this._latlng).subtract([this._mRadius,0])),this._point=a.latLngToLayerPoint(this._latlng),this._radius=this._point.x-a.latLngToLayerPoint(h).x),this._updateBounds()}}),yi=fi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){_(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,s=oi,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],l=1,u=h.length;l<u;l++){var c=s(t,e=h[l-1],i=h[l],!0);c<n&&(n=c,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r=this._rings[0],a=r.length;if(!a)return null;for(e=t=0;t<a-1;t++)e+=r[t].distanceTo(r[t+1])/2;if(0===e)return this._map.layerPointToLatLng(r[0]);for(i=t=0;t<a-1;t++)if(n=r[t],o=r[t+1],e<(i+=s=n.distanceTo(o)))return this._map.layerPointToLatLng([o.x-(s=(i-e)/s)*(o.x-n.x),o.y-s*(o.y-n.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return si(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=si(t),n=0,o=t.length;n<o;n++)i?(e[n]=G(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),t=new A(t,t);this._pxBounds=new I([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)])},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof j,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,i,n,o,s,r=this._parts,a=e=0,h=this._rings.length;e<h;e++)for(i=0,n=(s=this._rings[e]).length;i<n-1;i++)(o=ei(s[i],s[i+1],t,i,!0))&&(r[a]=r[a]||[],r[a].push(o[0]),o[1]===s[i+1]&&i!==n-2||(r[a].push(o[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=$e(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&ti(t,a[o],a[n])<=h)return!0;return!1}});yi._flat=ri;var Li=yi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r,a,h,l=this._rings[0],u=l.length;if(!u)return null;for(t=s=r=a=0,e=u-1;t<u;e=t++)i=l[t],n=l[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,a+=(i.y+n.y)*o,s+=3*o;return h=0===s?l[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=yi.prototype._convertLatLngs.call(this,t),t=e.length;return 2<=t&&e[0]instanceof j&&e[0].equals(e[t-1])&&e.pop(),e},_setLatLngs:function(t){yi.prototype._setLatLngs.call(this,t),si(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(si(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,e=new A(e,e),t=new I(t.min.subtract(e),t.max.add(e));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,n=0,o=this._rings.length;n<o;n++)(i=ai(this._rings[n],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(e=this._parts[o]).length)-1;s<h;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}}),xi=ci.extend({initialize:function(t,e){_(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=v(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=wi(t,s);return r?(r.feature=zi(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function wi(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],l=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Pi;if(!a&&!r)return null;switch(r.type){case"Point":return i=u(a),l?l(t,i):new mi(i);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=u(a[o]),h.push(l?l(t,i):new mi(i));return new ci(h);case"LineString":case"MultiLineString":return n=bi(a,"LineString"===r.type?0:1,u),new yi(n,e);case"Polygon":case"MultiPolygon":return n=bi(a,"Polygon"===r.type?1:2,u),new Li(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=wi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new ci(h);default:throw new Error("Invalid GeoJSON object.")}}function Pi(t){return new j(t[1],t[0],t[2])}function bi(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?bi(t[s],e-1,i):(i||Pi)(t[s]),o.push(n);return o}function Mi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function Ci(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?Ci(t[s],e-1,i,n):Mi(t[s],n));return!e&&i&&o.push(o[0]),o}function Ti(t,e){return t.feature?h({},t.feature,{geometry:e}):zi(e)}function zi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}ot={toGeoJSON:function(t){return Ti(this,{type:"Point",coordinates:Mi(this.getLatLng(),t)})}};function ki(t,e){return new xi(t,e)}mi.include(ot),vi.include(ot),gi.include(ot),yi.include({toGeoJSON:function(t){var e=!si(this._latlngs);return Ti(this,{type:(e?"Multi":"")+"LineString",coordinates:Ci(this._latlngs,e?1:0,!1,t)})}}),Li.include({toGeoJSON:function(t){var e=!si(this._latlngs),i=e&&!si(this._latlngs[0]),t=Ci(this._latlngs,i?2:e?1:0,!0,t);return Ti(this,{type:(i?"Multi":"")+"Polygon",coordinates:t=!e?[t]:t})}}),ui.include({toMultiPoint:function(e){var i=[];return this.eachLayer(function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}),Ti(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var i="GeometryCollection"===t,n=[];return this.eachLayer(function(t){t.toGeoJSON&&(t=t.toGeoJSON(e),i?n.push(t.geometry):"FeatureCollection"===(t=zi(t)).type?n.push.apply(n,t.features):n.push(t))}),i?Ti(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var ht=ki,Si=li.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=R(e),_(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ae(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ie(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&&oe(this._image),this},bringToBack:function(){return this._map&&se(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(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:ee("img");ae(e,"leaflet-image-layer"),this._zoomAnimated&&ae(e,"leaflet-zoom-animated"),this.options.className&&ae(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onload=d(this.fire,this,"load"),e.onerror=d(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),t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_e(this._image,t,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();pe(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ce(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)}}),Zi=Si.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ee("video");if(ae(e,"leaflet-image-layer"),this._zoomAnimated&&ae(e,"leaflet-zoom-animated"),e.onselectstart=a,e.onmousemove=a,e.onloadeddata=d(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var r=ee("source");r.src=this._url[s],e.appendChild(r)}}}}),Ei=Si.extend({_initImage:function(){var t=this._image=this._url;ae(t,"leaflet-image-layer"),this._zoomAnimated&&ae(t,"leaflet-zoom-animated"),t.onselectstart=a,t.onmousemove=a}}),Ai=li.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){_(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ce(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ce(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(ce(this._container,0),this._removeTimeout=setTimeout(d(ie,void 0,this._container),200)):ie(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=G(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&oe(this._container),this},bringToBack:function(){return this._map&&se(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof li||(i=e,e=t),e instanceof ci)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){var t,e,i;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),i=O(this.options.offset),e=this._getAnchor(),this._zoomAnimated?pe(this._container,t.add(e)):i=i.add(t).add(e),e=this._containerBottom=-i.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+i.x,this._container.style.bottom=e+"px",this._container.style.left=i+"px")},_getAnchor:function(){return[0,0]}}),Bi=Ai.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ai.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof fi||this._source.on("preclick",Te))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof fi||this._source.off("preclick",Te))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ee("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ee("div",t+"-content-wrapper",e);this._contentNode=ee("div",t+"-content",i),ke(i),ze(this._contentNode),we(i,"contextmenu",Te),this._tipContainer=ee("div",t+"-tip-container",e),this._tip=ee("div",t+"-tip",this._tipContainer),this.options.closeButton&&((e=this._closeButton=ee("a",t+"-close-button",e)).href="#close",e.innerHTML="×",we(e,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth,i=Math.min(i,this.options.maxWidth);i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,i="leaflet-popup-scrolled";o&&o<n?(e.height=o+"px",ae(t,i)):he(t,i),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),t=this._getAnchor();pe(this._container,e.add(t))},_adjustPan:function(){var t,e,i,n,o,s,r,a;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,o=parseInt(te(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+o,a=this._containerWidth,(s=new A(this._containerLeft,-e-this._containerBottom))._add(me(this._container)),i=t.layerPointToContainerPoint(s),r=O(this.options.autoPanPadding),n=O(this.options.autoPanPaddingTopLeft||r),o=O(this.options.autoPanPaddingBottomRight||r),s=t.getSize(),r=0,i.x+a+o.x>s.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&t.fire("autopanstart").panBy([r,a]))},_onCloseButtonClick:function(t){this._close(),Ze(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ge.mergeOptions({closePopupOnClick:!0}),Ge.include({openPopup:function(t,e,i){return t instanceof Bi||(t=new Bi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),li.include({bindPopup:function(t,e){return t instanceof Bi?(_(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new Bi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Ze(t),e instanceof fi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Oi=Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return xt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ee("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),s=this.options.direction,r=i.offsetWidth,a=i.offsetHeight,h=O(this.options.offset),e=this._getAnchor();t="top"===s?t.add(O(-r/2+h.x,-a+h.y+e.y,!0)):"bottom"===s?t.subtract(O(r/2-h.x,-h.y,!0)):"center"===s?t.subtract(O(r/2+h.x,a/2-e.y+h.y,!0)):"right"===s||"auto"===s&&o.x<n.x?(s="right",t.add(O(h.x+e.x,e.y-a/2+h.y,!0))):(s="left",t.subtract(O(r+e.x-h.x,a/2-e.y-h.y,!0))),he(i,"leaflet-tooltip-right"),he(i,"leaflet-tooltip-left"),he(i,"leaflet-tooltip-top"),he(i,"leaflet-tooltip-bottom"),ae(i,"leaflet-tooltip-"+s),pe(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ce(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(t)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ge.include({openTooltip:function(t,e,i){return t instanceof Oi||(t=new Oi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),li.include({bindTooltip:function(t,e){return t instanceof Oi?(_(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new Oi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var e,i;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),xt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t)},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ae(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(he(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),e=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(e)}});var Ii=di.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),t=this.options;return t.html instanceof Element?(ne(e),e.appendChild(t.html)):e.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=O(t.bgPos),e.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});di.Default=_i;var Di=li.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){_(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ie(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(oe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(se(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof A?t:new A(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!$){ce(this._container,this.options.opacity);var t,e=+new Date,i=!1,n=!1;for(t in this._tiles){var o,s=this._tiles[t];s.current&&s.loaded&&(o=Math.min(1,(e-s.loaded)/200),ce(s.el,o),o<1?i=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0))}n&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=ee("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ie(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=ee("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,e,i,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)(e=this._tiles[t]).current&&!e.active&&(i=e.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ie(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),t=Math.floor(e/2),e=i-1,i=new A(+o,+t);i.z=+e;i=this._tileCoordsToKey(i),i=this._tiles[i];return i&&i.active?i.retain=!0:(i&&i.loaded&&(i.retain=!0),n<e&&this._retainParent(o,t,e,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new A(o,s);r.z=i+1;r=this._tileCoordsToKey(r),r=this._tiles[r];r&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),i=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();ft?_e(t.el,i,n):pe(t.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(i,this._tileZoom),t=e.project(t,this._tileZoom).floor(),i=e.getSize().divideBy(2*i);return new I(t.subtract(i),t.add(i))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n,e=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(e),s=o.getCenter(),r=[],e=this.options.keepBuffer,a=new I(o.getBottomLeft().subtract([e,-e]),o.getTopRight().add([e,-e]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(n in this._tiles){var h=this._tiles[n].coords;h.z===this._tileZoom&&a.contains(new A(h.x,h.y))||(this._tiles[n].current=!1)}if(1<Math.abs(i-this._tileZoom))this._setView(t,i);else{for(var l=o.min.y;l<=o.max.y;l++)for(var u=o.min.x;u<=o.max.x;u++){var c,d=new A(u,l);d.z=this._tileZoom,this._isValidTile(d)&&((c=this._tiles[this._tileCoordsToKey(d)])?c.current=!0:r.push(d))}if(r.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var _=document.createDocumentFragment(),u=0;u<r.length;u++)this._addTile(r[u],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;t=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(t)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new N(t[0],t[1]);return t=!this.options.noWrap?this._map.wrapLatLngBounds(t):t},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),t=new A(+e[0],+e[1]);return t.z=+e[2],t},_removeTile:function(t){var e=this._tiles[t];e&&(ie(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ae(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,$&&this.options.opacity<1&&ce(t,this.options.opacity),it&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),d(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&T(d(this._tileReady,this,t,null,o)),pe(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ce(i.el,0),z(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ae(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),$||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(d(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new A(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ni=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=_(this,e)).detectRetina&&Pt&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),it||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 i=document.createElement("img");return we(i,"load",d(this._tileOnLoad,this,e,i)),we(i,"error",d(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Pt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(e.y=t),e["-y"]=t),g(this._url,h(e,this.options))},_tileOnLoad:function(t,e){$?setTimeout(d(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return(t=this.options.zoomReverse?e-t:t)+this.options.zoomOffset},_getSubdomain:function(t){t=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=x,ie(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return st||e.el.setAttribute("src",x),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==x))return Di.prototype._tileReady.call(this,t,e,i)}});function Ri(t,e){return new Ni(t,e)}var ji=Ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i,n=h({},this.defaultWmsParams);for(i in e)i in this.options||(n[i]=e[i]);var o=(e=_(this,e)).detectRetina&&Pt?2:1,t=this.getTileSize();n.width=t.x*o,n.height=t.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,Ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,i=D(i.project(e[0]),i.project(e[1])),e=i.min,i=i.max,i=(1.3<=this._wmsVersion&&this._crs===hi?[e.y,e.x,i.y,i.x]:[e.x,e.y,i.x,i.y]).join(","),t=Ni.prototype.getTileUrl.call(this,t);return t+m(this.wmsParams,t,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+i},setParams:function(t,e){return h(this.wmsParams,t),e||this.redraw(),this}});Ni.WMS=ji,Ri.wms=function(t,e){return new ji(t,e)};var Gi=li.extend({options:{padding:.1,tolerance:0},initialize:function(t){_(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ae(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=me(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),s=this._map.project(t,e).subtract(s),s=o.multiplyBy(-i).add(n).add(o).subtract(s);ft?_e(this._container,s,i):pe(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hi=Gi.extend({getEvents:function(){var t=Gi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Gi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");we(t,"mousemove",o(this._onMouseMove,32,this),this),we(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),we(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,ie(this._container),be(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(){var t,e,i,n;this._map._animatingZoom&&this._bounds||(Gi.prototype._update.call(this),t=this._bounds,e=this._container,i=t.getSize(),n=Pt?2:1,pe(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Pt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Gi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);t=(this._layers[p(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,e=e.prev;i?i.prev=e:this._drawLast=e,e?e.next=i:this._drawFirst=i,delete t._order,delete this._layers[p(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){for(var e,i=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<i.length;o++){if(e=Number(i[o]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(t){var e;t._pxBounds&&(e=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e,i=this._redrawBounds;this._ctx.save(),i&&(e=i.getSize(),this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var e,i,n,o;this._drawing&&!t._empty()&&(e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t))},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(De(t),this._fireEvent([i],t))},_onMouseMove:function(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,e))},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(he(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ae(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e,i,n=t._order;n&&(e=n.next,i=n.prev,e&&((e.prev=i)?i.next=e:e&&(this._drawFirst=e),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var e,i,n=t._order;n&&(e=n.next,(i=n.prev)&&((i.next=e)?e.prev=i:i&&(this._drawLast=i),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function Ui(t){return bt?new Hi(t):null}var Wi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),J={_initContainer:function(){this._container=ee("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Gi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");ae(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(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;ie(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Wi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=v(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Wi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){oe(t._container)},_bringToBack:function(t){se(t._container)}},Fi=Ct?Wi:Y,Vi=Gi.extend({getEvents:function(){var t=Gi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Fi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Fi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ie(this._container),be(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Gi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),pe(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Fi("path");t.options.className&&ae(e,t.options.className),t.options.interactive&&ae(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ie(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){oe(t._path)},_bringToBack:function(t){se(t._path)}});function qi(t){return Mt||Ct?new Vi(t):null}Ct&&Vi.include(J),Ge.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_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&&Ui(t)||qi(t)}});var Ki=Li.extend({initialize:function(t,e){Li.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Vi.create=Fi,Vi.pointsToPath=X,xi.geometryToLayer=wi,xi.coordsToLatLng=Pi,xi.coordsToLatLngs=bi,xi.latLngToCoords=Mi,xi.latLngsToCoords=Ci,xi.getFeature=Ti,xi.asFeature=zi,Ge.mergeOptions({boxZoom:!0});Z=pt.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(){we(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){be(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ie(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Kt(),fe(),this._startPoint=this._map.mouseEventToContainerPoint(t),we(document,{contextmenu:Ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ee("div","leaflet-zoom-box",this._container),ae(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),t=e.getSize();pe(this._box,e.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(ie(this._box),he(this._container,"leaflet-crosshair")),Yt(),ge(),be(document,{contextmenu:Ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),!this._moved)||(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(d(this._resetState,this),0),t=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t}))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ge.addInitHook("addHandler","boxZoom",Z),Ge.mergeOptions({doubleClickZoom:!0});q=pt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});Ge.addInitHook("addHandler","doubleClickZoom",q),Ge.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});K=pt.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Qe(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))),ae(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,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=R(this._map.options.maxBounds),this._offsetLimit=D(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)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(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,e=(n+e+i)%t-e-i,e=Math.abs(o+i)<Math.abs(e+i)?o:e;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=e},_onDragEnd:function(t){var e,i,n,o,s=this._map,r=s.options,a=!r.inertia||this._times.length<2;s.fire("dragend",t),a?s.fire("moveend"):(this._prunePositions(+new Date),i=this._lastPos.subtract(this._positions[0]),t=(this._lastTime-this._times[0])/1e3,e=r.easeLinearity,i=(a=i.multiplyBy(e/t)).distanceTo([0,0]),t=Math.min(r.inertiaMaxSpeed,i),i=a.multiplyBy(t/i),n=t/(r.inertiaDeceleration*e),(o=i.multiplyBy(-n/2).round()).x||o.y?(o=s._limitOffset(o,s.options.maxBounds),T(function(){s.panBy(o,{duration:n,easeLinearity:e,noMoveStart:!0,animate:!0})})):s.fire("moveend"))}});Ge.addInitHook("addHandler","dragging",K),Ge.mergeOptions({keyboard:!0,keyboardPanDelta:80});W=pt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),we(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),be(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,e,i;this._focused||(t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,i=t.scrollLeft||i.scrollLeft,this._map._container.focus(),window.scrollTo(i,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var e=this._panKeys={},i=this.keyCodes,n=0,o=i.left.length;n<o;n++)e[i.left[n]]=[-1*t,0];for(n=0,o=i.right.length;n<o;n++)e[i.right[n]]=[t,0];for(n=0,o=i.down.length;n<o;n++)e[i.down[n]]=[0,t];for(n=0,o=i.up.length;n<o;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var e=this._zoomKeys={},i=this.keyCodes,n=0,o=i.zoomIn.length;n<o;n++)e[i.zoomIn[n]]=t;for(n=0,o=i.zoomOut.length;n<o;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){we(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){be(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=O(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ze(t)}}});Ge.addInitHook("addHandler","keyboard",W),Ge.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});ot=pt.extend({addHooks:function(){we(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){be(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Be(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);i=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(d(this._performZoom,this),i),Ze(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),n=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,n=i?Math.ceil(n/i)*i:n,n=t._limitZoom(e+(0<this._delta?n:-n))-e;this._delta=0,this._startTime=null,n&&("center"===t.options.scrollWheelZoom?t.setZoom(e+n):t.setZoomAround(this._lastMousePos,e+n))}});Ge.addInitHook("addHandler","scrollWheelZoom",ot),Ge.mergeOptions({tap:!0,tapTolerance:15});gt=pt.extend({addHooks:function(){we(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){be(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Se(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],t=e.target;this._startPos=this._newPos=new A(e.clientX,e.clientY),t.tagName&&"a"===t.tagName.toLowerCase()&&ae(t,"leaflet-active"),this._holdTimeout=setTimeout(d(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),we(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var e;clearTimeout(this._holdTimeout),be(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((t=(e=t.changedTouches[0]).target)&&t.tagName&&"a"===t.tagName.toLowerCase()&&he(t,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){t=t.touches[0];this._newPos=new A(t.clientX,t.clientY),this._simulateEvent("mousemove",t)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});xt&&!Lt&&Ge.addInitHook("addHandler","tap",gt),Ge.mergeOptions({touchZoom:xt&&!nt,bounceAtZoomLimits:!0});J=pt.extend({addHooks:function(){ae(this._map._container,"leaflet-touch-zoom"),we(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),be(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e,i,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(e=n.mouseEventToContainerPoint(t.touches[0]),i=n.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),we(document,"touchmove",this._onTouchMove,this),we(document,"touchend",this._onTouchEnd,this),Se(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{n=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===n.x&&0===n.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(n),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),z(this._animRequest);e=d(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=T(e,this,!0),Se(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),be(document,"touchmove",this._onTouchMove),be(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ge.addInitHook("addHandler","touchZoom",J),Ge.BoxZoom=Z,Ge.DoubleClickZoom=q,Ge.Drag=K,Ge.Keyboard=W,Ge.ScrollWheelZoom=ot,Ge.Tap=gt,Ge.TouchZoom=J,Object.freeze=e,t.version="1.5.1+HEAD.2e3e0ff",t.Control=Ue,t.control=He,t.Browser=rt,t.Evented=E,t.Mixin=mt,t.Util=k,t.Class=S,t.Handler=pt,t.extend=h,t.bind=d,t.stamp=p,t.setOptions=_,t.DomEvent=ct,t.DomUtil=ut,t.PosAnimation=je,t.Draggable=Qe,t.LineUtil=vt,t.PolyUtil=yt,t.Point=A,t.point=O,t.Bounds=I,t.bounds=D,t.Transformation=F,t.transformation=V,t.Projection=dt,t.LatLng=j,t.latLng=G,t.LatLngBounds=N,t.latLngBounds=R,t.CRS=H,t.GeoJSON=xi,t.geoJSON=ki,t.geoJson=ht,t.Layer=li,t.LayerGroup=ui,t.layerGroup=function(t,e){return new ui(t,e)},t.FeatureGroup=ci,t.featureGroup=function(t){return new ci(t)},t.ImageOverlay=Si,t.imageOverlay=function(t,e,i){return new Si(t,e,i)},t.VideoOverlay=Zi,t.videoOverlay=function(t,e,i){return new Zi(t,e,i)},t.SVGOverlay=Ei,t.svgOverlay=function(t,e,i){return new Ei(t,e,i)},t.DivOverlay=Ai,t.Popup=Bi,t.popup=function(t,e){return new Bi(t,e)},t.Tooltip=Oi,t.tooltip=function(t,e){return new Oi(t,e)},t.Icon=di,t.icon=function(t){return new di(t)},t.DivIcon=Ii,t.divIcon=function(t){return new Ii(t)},t.Marker=mi,t.marker=function(t,e){return new mi(t,e)},t.TileLayer=Ni,t.tileLayer=Ri,t.GridLayer=Di,t.gridLayer=function(t){return new Di(t)},t.SVG=Vi,t.svg=qi,t.Renderer=Gi,t.Canvas=Hi,t.canvas=Ui,t.Path=fi,t.CircleMarker=gi,t.circleMarker=function(t,e){return new gi(t,e)},t.Circle=vi,t.circle=function(t,e,i){return new vi(t,e,i)},t.Polyline=yi,t.polyline=function(t,e){return new yi(t,e)},t.Polygon=Li,t.polygon=function(t,e){return new Li(t,e)},t.Rectangle=Ki,t.rectangle=function(t,e){return new Ki(t,e)},t.Map=Ge,t.map=function(t,e){return new Ge(t,e)};var Yi=window.L;t.noConflict=function(){return window.L=Yi,this},window.L=t}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t.Leaflet=t.Leaflet||{},t.Leaflet.markercluster=t.Leaflet.markercluster||{}))}(this,function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(i,n){if(!L.Util.isArray(i))return this.addLayer(i);var o,s=this._featureGroup,r=this._nonPointGroup,a=this.options.chunkedLoading,h=this.options.chunkInterval,l=this.options.chunkProgress,u=i.length,c=0,d=!0;if(this._map){var _=(new Date).getTime(),p=L.bind(function(){for(var t=(new Date).getTime();c<u;c++){if(a&&0==c%200){var e=(new Date).getTime()-t;if(h<e)break}(o=i[c])instanceof L.LayerGroup?(d&&(i=i.slice(),d=!1),this._extractNonGroupLayers(o,i),u=i.length):o.getLatLng?!this.hasLayer(o)&&(this._addLayer(o,this._maxZoom),n||this.fire("layeradd",{layer:o}),o.__parent&&2===o.__parent.getChildCount())&&(e=(e=o.__parent.getAllChildMarkers())[0]===o?e[1]:e[0],s.removeLayer(e)):(r.addLayer(o),n||this.fire("layeradd",{layer:o}))}l&&l(c,u,(new Date).getTime()-_),c===u?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var t=this._needsClustering;c<u;c++)(o=i[c])instanceof L.LayerGroup?(d&&(i=i.slice(),d=!1),this._extractNonGroupLayers(o,i),u=i.length):o.getLatLng?this.hasLayer(o)||t.push(o):r.addLayer(o);return this},removeLayers:function(t){var e,i=t.length,n=this._featureGroup,o=this._nonPointGroup,s=!0;if(!this._map){for(h=0;h<i;h++)(e=t[h])instanceof L.LayerGroup?(s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(e,t),i=t.length):(this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e}));return this}if(this._unspiderfy){this._unspiderfy();for(var r=t.slice(),a=i,h=0;h<a;h++)(e=r[h])instanceof L.LayerGroup?(this._extractNonGroupLayers(e,r),a=r.length):this._unspiderfyLayer(e)}for(h=0;h<i;h++)(e=t[h])instanceof L.LayerGroup?(s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(e,t),i=t.length):e.__parent?(this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e}),n.hasLayer(e)&&(n.removeLayer(e),e.clusterShow&&e.clusterShow())):(o.removeLayer(e),this.fire("layerremove",{layer:e}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;0<=e;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,s=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;0<=n;n--){for(i=!0,o=r.length-1;0<=o;o--)if(r[o].layer===s[n]){i=!1;break}i&&t.call(e,s[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var i=null;return e=parseInt(e,10),this.eachLayer(function(t){L.stamp(t)===e&&(i=t)}),i},hasLayer:function(t){if(!t)return!1;for(var e=this._needsClustering,i=e.length-1;0<=i;i--)if(e[i]===t)return!0;for(i=(e=this._needsRemoving).length-1;0<=i;i--)if(e[i].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;0<=i;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=e&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){var e;this._ignoreMove||t.target.__dragStart||(e=t.target._popup&&t.target._popup.isOpen(),this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup())},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,s=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var h,l=t.__parent,u=l._markers;for(this._arraySplice(u,t);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)e&&l._childCount<=1?(h=l._markers[0]===t?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,r.project(l._cLatLng,l._zoom)),o[l._zoom].addObject(h,r.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),t=" marker-cluster-";return t+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+t,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),2<t.layer.getChildCount()&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){var t;this._inZoomAnimation||(t=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t)},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n="function"!=typeof i?function(){return i}:i;null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;e<=o;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i=this._gridClusters,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);o<=e;e--){var s=this._map.project(t.getLatLng(),e),r=i[e].getNearObject(s);if(r)return r._addChild(t),void(t.__parent=r);if(r=n[e].getNearObject(s)){var a=r.__parent;a&&this._removeLayer(r,!1);var h=new this._markerCluster(this,e,r,t);i[e].addObject(h,this._map.project(h._cLatLng,e)),r.__parent=h;for(var l=t.__parent=h,u=e-1;u>a._zoom;u--)l=new this._markerCluster(this,u,l),i[u].addObject(l,this._map.project(r.getLatLng(),u));return a._addChild(l),void this._removeFromGridUnclustered(r,e)}n[e].addObject(t,s)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){e===t?this._featureGroup.addLayer(t):2===e._childCount?(e._addToMap(),t=e.getAllChildMarkers(),this._featureGroup.removeLayer(t[0]),this._featureGroup.removeLayer(t[1])):e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(o,s){var r,a=this._getExpandedVisibleBounds(),h=this._featureGroup,t=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(a,o,t,function(t){var e,i=t._latlng,n=t._markers;for(a.contains(i)||(i=null),t._isSingleParent()&&o+1===s?(h.removeLayer(t),t._recursivelyAddChildrenToMap(null,s,a)):(t.clusterHide(),t._recursivelyAddChildrenToMap(i,s,a)),r=n.length-1;0<=r;r--)e=n[r],a.contains(e._latlng)||h.removeLayer(e)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(a,s),h.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(a,o,s,function(t){t._recursivelyRestoreChildPositions(s)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(a,o,t,function(t){h.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(2<e._childCount?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,i,n){var o=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(o,s,i+1,n);var r=this;this._forceLayout(),e._recursivelyBecomeVisible(o,n),this._enqueue(function(){var t;1===e._childCount?(t=e._markers[0],this._ignoreMove=!0,t.setLatLng(t.getLatLng()),this._ignoreMove=!1,t.clusterShow&&t.clusterShow()):e._recursively(o,n,s,function(t){t._recursivelyRemoveChildrenFromMap(o,s,i+1)}),r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;0<=n;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),o=this._zoom+1,i=i.getZoom();0<e.length&&o<n;){o++;for(var s=[],r=0;r<e.length;r++)s=s.concat(e[r]._childClusters);e=s}o<n?this._group._map.setView(this._latlng,o):n<=i?this._group._map.setView(this._latlng,i+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n=this._markers,o=this._childClusters,s=0,r=0,a=this._childCount;if(0!==a){for(this._resetBounds(),t=0;t<n.length;t++)e=n[t]._latlng,this._bounds.extend(e),s+=e.lat,r+=e.lng;for(t=0;t<o.length;t++)(i=o[t])._boundsNeedUpdate&&i._recalculateBounds(),this._bounds.extend(i._bounds),e=i._wLatLng,i=i._childCount,s+=e.lat*i,r+=e.lng*i;this._latlng=this._wLatLng=new L.LatLng(s/a,r/a),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,o,e){this._recursively(t,this._group._map.getMinZoom(),e-1,function(t){for(var e,i=t._markers,n=i.length-1;0<=n;n--)(e=i[n])._icon&&(e._setPos(o),e.clusterHide())},function(t){for(var e,i=t._childClusters,n=i.length-1;0<=n;n--)(e=i[n])._icon&&(e._setPos(o),e.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,i,n,o){this._recursively(e,o,i,function(t){t._recursivelyAnimateChildrenIn(e,t._group._map.latLngToLayerPoint(t.getLatLng()).round(),n),t._isSingleParent()&&n-1===o?(t.clusterShow(),t._recursivelyRemoveChildrenFromMap(e,i,n)):t.clusterHide(),t._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(n,o,s){this._recursively(s,this._group._map.getMinZoom()-1,o,function(t){if(o!==t._zoom)for(var e=t._markers.length-1;0<=e;e--){var i=t._markers[e];s.contains(i._latlng)&&(n&&(i._backupLatlng=i.getLatLng(),i.setLatLng(n),i.clusterHide&&i.clusterHide()),t._group._featureGroup.addLayer(i))}},function(t){t._addToMap(n)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;0<=e;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,s;this._recursively(t,e-1,i-1,function(t){for(s=t._markers.length-1;0<=s;s--)o=t._markers[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(t){for(s=t._childClusters.length-1;0<=s;s--)o=t._childClusters[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(t,e,i,n,o){var s,r,a=this._childClusters,h=this._zoom;if(e<=h&&(n&&n(this),o&&h===i&&o(this)),h<e||h<i)for(s=a.length-1;0<=s;s--)(r=a[s])._boundsNeedUpdate&&r._recalculateBounds(),t.intersects(r._bounds)&&r._recursively(t,e,i,n,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,n=o[n]=o[n]||{},n=n[i]=n[i]||[],i=L.Util.stamp(t);this._objectPoint[i]=e,n.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),s=this._getCoord(e.y),e=this._grid,r=e[s]=e[s]||{},a=r[o]=r[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=a.length;i<n;i++)if(a[i]===t)return a.splice(i,1),1===n&&delete r[o],!0},eachObject:function(t,e){var i,n,o,s,r,a,h,l=this._grid;for(i in l)for(n in r=l[i])for(a=r[n],o=0,s=a.length;o<s;o++)h=t.call(e,a[o]),h&&(o--,s--)},getNearObject:function(t){for(var e,i,n,o,s,r,a,h=this._getCoord(t.x),l=this._getCoord(t.y),u=this._objectPoint,c=this._sqCellSize,d=null,_=l-1;_<=l+1;_++)if(n=this._grid[_])for(e=h-1;e<=h+1;e++)if(o=n[e])for(i=0,s=o.length;i<s;i++)r=o[i],((a=this._sqDist(u[L.Util.stamp(r)],t))<c||a<=c&&null===d)&&(c=a,d=r);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,t=e.y-t.y;return i*i+t*t}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){for(var i,n,o=0,s=null,r=[],a=e.length-1;0<=a;a--)i=e[a],0<(n=this.getDistant(i,t))&&(r.push(i),o<n&&(o=n,s=i));return{maxPoint:s,newPoints:r}},buildConvexHull:function(t,e){var i=[],e=this.findMostDistantPointFromBaseLine(t,e);return e.maxPoint?(i=i.concat(this.buildConvexHull([t[0],e.maxPoint],e.newPoints))).concat(this.buildConvexHull([e.maxPoint,t[1]],e.newPoints)):[t[0]]},getConvexHull:function(t){for(var e=!1,i=!1,n=!1,o=!1,s=null,r=null,a=null,h=null,l=null,u=null,c=t.length-1;0<=c;c--){var d=t[c];(!1===e||d.lat>e)&&(e=(s=d).lat),(!1===i||d.lat<i)&&(i=(r=d).lat),(!1===n||d.lng>n)&&(n=(a=d).lng),(!1===o||d.lng<o)&&(o=(h=d).lng)}l=i!==e?(u=r,s):(u=h,a);return[].concat(this.buildConvexHull([u,l],t),this.buildConvexHull([l,u],t))}},L.MarkerCluster.include({getConvexHull:function(){for(var t,e=this.getAllChildMarkers(),i=[],n=e.length-1;0<=n;n--)t=e[n].getLatLng(),i.push(t);return L.QuickHull.getConvexHull(i)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){var t,e;this._group._spiderfied===this||this._group._inZoomAnimation||(t=this.getAllChildMarkers(null,!0),e=this._group._map.latLngToLayerPoint(this._latlng),this._group._unspiderfy(),this._group._spiderfied=this,e=t.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(t.length,e):(e.y+=10,this._generatePointsCircle(t.length,e)),this._animationSpiderfy(t,e))},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,r=[],o=Math.max(o,35);for(r.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*s,r[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return r},_generatePointsSpiral:function(t,e){for(var i=this._group.options.spiderfyDistanceMultiplier,n=i*this._spiralLengthStart,o=i*this._spiralFootSeparation,s=i*this._spiralLengthFactor*this._2PI,r=0,a=[],h=a.length=t;0<=h;h--)h<t&&(a[h]=new L.Point(e.x+n*Math.cos(r),e.y+n*Math.sin(r))._round()),n+=s/(r+=o/n+5e-4*h);return a},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=s.length-1;0<=e;e--)t=s[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,s,r=this._group,a=r._map,h=r._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,i=0;i<t.length;i++)s=a.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,s],l),a.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,s,r,a,h=this,l=this._group,u=l._map,c=l._featureGroup,d=this._latlng,_=u.latLngToLayerPoint(d),p=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),f=m.opacity;for(void 0===f&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=f,l._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],a=u.layerPointToLatLng(e[i]),o=new L.Polyline([d,a],m),u.addLayer(o),n._spiderLeg=o,p&&(r=(s=o._path).getTotalLength()+.1,s.style.strokeDasharray=r,s.style.strokeDashoffset=r),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(_);for(l._forceLayout(),l._animationStart(),i=t.length-1;0<=i;i--)a=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&((s=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:f}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,o,s,r=this,a=this._group,h=a._map,l=a._featureGroup,u=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(a._ignoreMove=!0,a._animationStart(),this.setOpacity(1),i=c.length-1;0<=i;i--)(e=c[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,s=!0,e._setPos&&(e._setPos(u),s=!1),e.clusterHide&&(e.clusterHide(),s=!1),s&&l.removeLayer(e),d&&(s=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=s,n.setStyle({opacity:0})));a._ignoreMove=!1,setTimeout(function(){var t=0;for(i=c.length-1;0<=i;i--)(e=c[i])._spiderLeg&&t++;for(i=c.length-1;0<=i;i--)(e=c[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),1<t&&l.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);a._animationEnd(),a.fire("unspiderfied",{cluster:r,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i});
|
|
2
2
|
//# sourceMappingURL=crouton-map.min.js.map
|