PageSourceSearch

https://bundles.niftyentries.com/bundles/leaflet/v/Q9rsJGHSV_nWBp21rwkHvYzXslPlVSo0tzoRQr2Yyyo1

js niftyentries.com collected 2026-10-03 23:34:59 UTC 150,788 bytes, 1 lines download raw bytes

1(function(n,t,i){function o(){var t=n.L;r.noConflict=function(){return n.L=t,this};n.L=r}var r={version:"1.0.2+4bbb16c"},u,f,e;typeof module=="object"&&typeof module.exports=="object"?module.exports=r:typeof define=="function"&&define.amd&&define(r);typeof n!="undefined"&&o();r.Util={extend:function(n){for(var i,r,t=1,u=arguments.length;t<u;t++){r=arguments[t];for(i in r)n[i]=r[i]}return n},create:Object.create||function(){function n(){}return function(t){return n.prototype=t,new n}}(),bind:function(n,t){var i=Array.prototype.slice,r;return n.bind?n.bind.apply(n,i.call(arguments,1)):(r=i.call(arguments,2),function(){return n.apply(t,r.length?r.concat(i.call(arguments)):arguments)})},stamp:function(n){return n._leaflet_id=n._leaflet_id||++r.Util.lastId,n._leaflet_id},lastId:0,throttle:function(n,t,i){var u,r,f,e;return e=function(){u=!1;r&&(f.apply(i,r),r=!1)},f=function(){u?r=arguments:(n.apply(i,arguments),setTimeout(e,t),u=!0)}},wrapNum:function(n,t,i){var f=t[1],r=t[0],u=f-r;return n===f&&i?n:((n-r)%u+u)%u+r},falseFn:function(){return!1},formatNum:function(n,t){var i=Math.pow(10,t||5);return Math.round(n*i)/i},trim:function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},splitWords:function(n){return r.Util.trim(n).split(/\s+/)},setOptions:function(n,t){n.hasOwnProperty("options")||(n.options=n.options?r.Util.create(n.options):{});for(var i in t)n.options[i]=t[i];return n.options},getParamString:function(n,t,i){var u=[],r;for(r in n)u.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(n[r]));return(!t||t.indexOf("?")===-1?"?":"&")+u.join("&")},template:function(n,t){return n.replace(r.Util.templateRe,function(n,r){var u=t[r];if(u===i)throw new Error("No value provided for variable "+n);else typeof u=="function"&&(u=u(t));return u})},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},indexOf:function(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){return n["webkit"+t]||n["moz"+t]||n["ms"+t]}function u(t){var r=+new Date,u=Math.max(0,16-(r-i));return i=r+u,n.setTimeout(t,u)}var i=0,f=n.requestAnimationFrame||t("RequestAnimationFrame")||u,e=n.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){n.clearTimeout(t)};r.Util.requestAnimFrame=function(t,i,e){if(e&&f===u)t.call(i);else return f.call(n,r.bind(t,i))};r.Util.cancelAnimFrame=function(t){t&&e.call(n,t)}}();r.extend=r.Util.extend;r.bind=r.Util.bind;r.stamp=r.Util.stamp;r.setOptions=r.Util.setOptions;r.Class=function(){};r.Class.extend=function(n){var i=function(){this.initialize&&this.initialize.apply(this,arguments);this.callInitHooks()},f=i.__super__=this.prototype,t=r.Util.create(f),u;t.constructor=i;i.prototype=t;for(u in this)this.hasOwnProperty(u)&&u!=="prototype"&&(i[u]=this[u]);return n.statics&&(r.extend(i,n.statics),delete n.statics),n.includes&&(r.Util.extend.apply(null,[t].concat(n.includes)),delete n.includes),t.options&&(n.options=r.Util.extend(r.Util.create(t.options),n.options)),r.extend(t,n),t._initHooks=[],t.callInitHooks=function(){if(!this._initHooksCalled){f.callInitHooks&&f.callInitHooks.call(this);this._initHooksCalled=!0;for(var n=0,i=t._initHooks.length;n<i;n++)t._initHooks[n].call(this)}},i};r.Class.include=function(n){return r.extend(this.prototype,n),this};r.Class.mergeOptions=function(n){return r.extend(this.prototype.options,n),this};r.Class.addInitHook=function(n){var t=Array.prototype.slice.call(arguments,1),i=typeof n=="function"?n:function(){this[n].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};r.Evented=r.Class.extend({on:function(n,t,i){var f,u,e;if(typeof n=="object")for(f in n)this._on(f,n[f],t);else for(n=r.Util.splitWords(n),u=0,e=n.length;u<e;u++)this._on(n[u],t,i);return this},off:function(n,t,i){var f,u,e;if(n)if(typeof n=="object")for(f in n)this._off(f,n[f],t);else for(n=r.Util.splitWords(n),u=0,e=n.length;u<e;u++)this._off(n[u],t,i);else delete this._events;return this},_on:function(n,t,r){var u,o,f,e,s;for(this._events=this._events||{},u=this._events[n],u||(u=[],this._events[n]=u),r===this&&(r=i),o={fn:t,ctx:r},f=u,e=0,s=f.length;e<s;e++)if(f[e].fn===t&&f[e].ctx===r)return;f.push(o);u.count++},_off:function(n,t,u){var f,e,o,s;if(this._events&&(f=this._events[n],f)){if(!t){for(e=0,o=f.length;e<o;e++)f[e].fn=r.Util.falseFn;delete this._events[n];return}if(u===this&&(u=i),f)for(e=0,o=f.length;e<o;e++)if((s=f[e],s.ctx===u)&&s.fn===t){s.fn=r.Util.falseFn;this._firingCount&&(this._events[n]=f=f.slice());f.splice(e,1);return}}},fire:function(n,t,i){var e,u,f,s,o;if(!this.listens(n,i))return this;if(e=r.Util.extend({},t,{type:n,target:this}),this._events&&(u=this._events[n],u)){for(this._firingCount=this._firingCount+1||1,f=0,s=u.length;f<s;f++)o=u[f],o.fn.call(o.ctx||this,e);this._firingCount--}return i&&this._propagateEvent(e),this},listens:function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return!0;
1if(t)for(r in this._eventParents)if(this._eventParents[r].listens(n,t))return!0;return!1},once:function(n,t,i){var u,f;if(typeof n=="object"){for(u in n)this.once(u,n[u],t);return this}f=r.bind(function(){this.off(n,t,i).off(n,f,i)},this);return this.on(n,t,i).on(n,f,i)},addEventParent:function(n){return this._eventParents=this._eventParents||{},this._eventParents[r.stamp(n)]=n,this},removeEventParent:function(n){return this._eventParents&&delete this._eventParents[r.stamp(n)],this},_propagateEvent:function(n){for(var t in this._eventParents)this._eventParents[t].fire(n.type,r.extend({layer:n.target},n),!0)}});u=r.Evented.prototype;u.addEventListener=u.on;u.removeEventListener=u.clearAllEventListeners=u.off;u.addOneTimeEventListener=u.once;u.fireEvent=u.fire;u.hasEventListeners=u.listens;r.Mixin={Events:u},function(){var i=navigator.userAgent.toLowerCase(),e=t.documentElement,f="ActiveXObject"in n,o=i.indexOf("webkit")!==-1,b=i.indexOf("phantom")!==-1,h=i.search("android [23]")!==-1,c=i.indexOf("chrome")!==-1,l=i.indexOf("gecko")!==-1&&!o&&!n.opera&&!f,k=navigator.platform.indexOf("Win")===0,u=typeof orientation!="undefined"||i.indexOf("mobile")!==-1,a=!n.PointerEvent&&n.MSPointerEvent,v=n.PointerEvent||a,y=f&&"transition"in e.style,s="WebKitCSSMatrix"in n&&"m11"in new n.WebKitCSSMatrix&&!h,p="MozPerspective"in e.style,w="OTransition"in e.style,d=!n.L_NO_TOUCH&&(v||"ontouchstart"in n||n.DocumentTouch&&t instanceof n.DocumentTouch);r.Browser={ie:f,ielt9:f&&!t.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in t),webkit:o,gecko:l,android:i.indexOf("android")!==-1,android23:h,chrome:c,safari:!c&&i.indexOf("safari")!==-1,win:k,ie3d:y,webkit3d:s,gecko3d:p,opera12:w,any3d:!n.L_DISABLE_3D&&(y||s||p)&&!w&&!b,mobile:u,mobileWebkit:u&&o,mobileWebkit3d:u&&s,mobileOpera:u&&n.opera,mobileGecko:u&&l,touch:!!d,msPointer:!!a,pointer:!!v,retina:(n.devicePixelRatio||n.screen.deviceXDPI/n.screen.logicalXDPI)>1}}();r.Point=function(n,t,i){this.x=i?Math.round(n):n;this.y=i?Math.round(t):t};r.Point.prototype={clone:function(){return new r.Point(this.x,this.y)},add:function(n){return this.clone()._add(r.point(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(r.point(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new r.Point(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new r.Point(this.x/n.x,this.y/n.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},distanceTo:function(n){n=r.point(n);var t=n.x-this.x,i=n.y-this.y;return Math.sqrt(t*t+i*i)},equals:function(n){return n=r.point(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=r.point(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+r.Util.formatNum(this.x)+", "+r.Util.formatNum(this.y)+")"}};r.point=function(n,t,u){return n instanceof r.Point?n:r.Util.isArray(n)?new r.Point(n[0],n[1]):n===i||n===null?n:typeof n=="object"&&"x"in n&&"y"in n?new r.Point(n.x,n.y):new r.Point(n,t,u)};r.Bounds=function(n,t){var r,i,u;if(n)for(r=t?[n,t]:n,i=0,u=r.length;i<u;i++)this.extend(r[i])};r.Bounds.prototype={extend:function(n){return n=r.point(n),this.min||this.max?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=n.clone(),this.max=n.clone()),this},getCenter:function(n){return new r.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,n)},getBottomLeft:function(){return new r.Point(this.min.x,this.max.y)},getTopRight:function(){return new r.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(n){var t,i;return n=typeof n[0]=="number"||n instanceof r.Point?r.point(n):r.boun
1ds(n),n instanceof r.Bounds?(t=n.min,i=n.max):t=i=n,t.x>=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(n){n=r.bounds(n);var t=this.min,i=this.max,u=n.min,f=n.max,e=f.x>=t.x&&u.x<=i.x,o=f.y>=t.y&&u.y<=i.y;return e&&o},overlaps:function(n){n=r.bounds(n);var t=this.min,i=this.max,u=n.min,f=n.max,e=f.x>t.x&&u.x<i.x,o=f.y>t.y&&u.y<i.y;return e&&o},isValid:function(){return!!(this.min&&this.max)}};r.bounds=function(n,t){return!n||n instanceof r.Bounds?n:new r.Bounds(n,t)};r.Transformation=function(n,t,i,r){this._a=n;this._b=t;this._c=i;this._d=r};r.Transformation.prototype={transform:function(n,t){return this._transform(n.clone(),t)},_transform:function(n,t){return t=t||1,n.x=t*(this._a*n.x+this._b),n.y=t*(this._c*n.y+this._d),n},untransform:function(n,t){return t=t||1,new r.Point((n.x/t-this._b)/this._a,(n.y/t-this._d)/this._c)}};r.DomUtil={get:function(n){return typeof n=="string"?t.getElementById(n):n},getStyle:function(n,i){var r=n.style[i]||n.currentStyle&&n.currentStyle[i],u;return(!r||r==="auto")&&t.defaultView&&(u=t.defaultView.getComputedStyle(n,null),r=u?u[i]:null),r==="auto"?null:r},create:function(n,i,r){var u=t.createElement(n);return u.className=i||"",r&&r.appendChild(u),u},remove:function(n){var t=n.parentNode;t&&t.removeChild(n)},empty:function(n){while(n.firstChild)n.removeChild(n.firstChild)},toFront:function(n){n.parentNode.appendChild(n)},toBack:function(n){var t=n.parentNode;t.insertBefore(n,t.firstChild)},hasClass:function(n,t){if(n.classList!==i)return n.classList.contains(t);var u=r.DomUtil.getClass(n);return u.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(u)},addClass:function(n,t){var f,u,o,e;if(n.classList!==i)for(f=r.Util.splitWords(t),u=0,o=f.length;u<o;u++)n.classList.add(f[u]);else r.DomUtil.hasClass(n,t)||(e=r.DomUtil.getClass(n),r.DomUtil.setClass(n,(e?e+" ":"")+t))},removeClass:function(n,t){n.classList!==i?n.classList.remove(t):r.DomUtil.setClass(n,r.Util.trim((" "+r.DomUtil.getClass(n)+" ").replace(" "+t+" "," ")))},setClass:function(n,t){n.className.baseVal===i?n.className=t:n.className.baseVal=t},getClass:function(n){return n.className.baseVal===i?n.className:n.className.baseVal},setOpacity:function(n,t){"opacity"in n.style?n.style.opacity=t:"filter"in n.style&&r.DomUtil._setOpacityIE(n,t)},_setOpacityIE:function(n,t){var i=!1,r="DXImageTransform.Microsoft.Alpha";try{i=n.filters.item(r)}catch(u){if(t===1)return}t=Math.round(t*100);i?(i.Enabled=t!==100,i.Opacity=t):n.style.filter+=" progid:"+r+"(opacity="+t+")"},testProp:function(n){for(var r=t.documentElement.style,i=0;i<n.length;i++)if(n[i]in r)return n[i];return!1},setTransform:function(n,t,i){var u=t||new r.Point(0,0);n.style[r.DomUtil.TRANSFORM]=(r.Browser.ie3d?"translate("+u.x+"px,"+u.y+"px)":"translate3d("+u.x+"px,"+u.y+"px,0)")+(i?" scale("+i+")":"")},setPosition:function(n,t){n._leaflet_pos=t;r.Browser.any3d?r.DomUtil.setTransform(n,t):(n.style.left=t.x+"px",n.style.top=t.y+"px")},getPosition:function(n){return n._leaflet_pos||new r.Point(0,0)}},function(){var u,i;r.DomUtil.TRANSFORM=r.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]);u=r.DomUtil.TRANSITION=r.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);r.DomUtil.TRANSITION_END=u==="webkitTransition"||u==="OTransition"?u+"End":"transitionend";"onselectstart"in t?(r.DomUtil.disableTextSelection=function(){r.DomEvent.on(n,"selectstart",r.DomEvent.preventDefault)},r.DomUtil.enableTextSelection=function(){r.DomEvent.off(n,"selectstart",r.DomEvent.preventDefault)}):(i=r.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),r.DomUtil.disableTextSelection=function(){if(i){var n=t.documentElement.style;this._userSelect=n[i];n[i]="none"}},r.DomUtil.enableTextSelection=function(){i&&(t.documentElement.style[i]=this._userSelect,delete this._userSelect)});r.DomUtil.disableImageDrag=function(){r.DomEvent.on(n,"dragstart",r.DomEvent.preventDefault)};r.DomUtil.enableImageDrag=function(){r.DomEvent.off(n,"dragstart",r.DomEvent.preventDefault)};r.DomUtil.preventOutline=function(t){while(t.tabIndex===-1)t=t.parentNode;if(t&&t.style){r.DomUtil.restoreOutline();this._outlineElement=t;this._outlineStyle=t.style.outline;t.style.outline="none";r.DomEvent.on(n,"keydown",r.DomUtil.restoreOutline,this)}};r.DomUtil.restoreOutline=function(){this._outlineElement&&(this._outlineElement.style.outline=this._outlineStyle,delete this._outlineElement,delete this._outlineStyle,r.DomEvent.off(n,"keydown",r.DomUtil.restoreOutline,this))}}();r.LatLng=function(n,t,r){if(isNaN(n)||isNaN(t))throw new Error("Invalid LatLng object: ("+n+", "+t+")");this.lat=+n;this.lng=+t;r!==i&&(this.alt=+r)};
1r.LatLng.prototype={equals:function(n,t){if(!n)return!1;n=r.latLng(n);var u=Math.max(Math.abs(this.lat-n.lat),Math.abs(this.lng-n.lng));return u<=(t===i?1e-9:t)},toString:function(n){return"LatLng("+r.Util.formatNum(this.lat,n)+", "+r.Util.formatNum(this.lng,n)+")"},distanceTo:function(n){return r.CRS.Earth.distance(this,r.latLng(n))},wrap:function(){return r.CRS.Earth.wrapLatLng(this)},toBounds:function(n){var t=180*n/40075017,i=t/Math.cos(Math.PI/180*this.lat);return r.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new r.LatLng(this.lat,this.lng,this.alt)}};r.latLng=function(n,t,u){return n instanceof r.LatLng?n:r.Util.isArray(n)&&typeof n[0]!="object"?n.length===3?new r.LatLng(n[0],n[1],n[2]):n.length===2?new r.LatLng(n[0],n[1]):null:n===i||n===null?n:typeof n=="object"&&"lat"in n?new r.LatLng(n.lat,"lng"in n?n.lng:n.lon,n.alt):t===i?null:new r.LatLng(n,t,u)};r.LatLngBounds=function(n,t){var r,i,u;if(n)for(r=t?[n,t]:n,i=0,u=r.length;i<u;i++)this.extend(r[i])};r.LatLngBounds.prototype={extend:function(n){var u=this._southWest,f=this._northEast,t,i;if(n instanceof r.LatLng)t=n,i=n;else if(n instanceof r.LatLngBounds){if(t=n._southWest,i=n._northEast,!t||!i)return this}else return n?this.extend(r.latLng(n)||r.latLngBounds(n)):this;return u||f?(u.lat=Math.min(t.lat,u.lat),u.lng=Math.min(t.lng,u.lng),f.lat=Math.max(i.lat,f.lat),f.lng=Math.max(i.lng,f.lng)):(this._southWest=new r.LatLng(t.lat,t.lng),this._northEast=new r.LatLng(i.lat,i.lng)),this},pad:function(n){var t=this._southWest,i=this._northEast,u=Math.abs(t.lat-i.lat)*n,f=Math.abs(t.lng-i.lng)*n;return new r.LatLngBounds(new r.LatLng(t.lat-u,t.lng-f),new r.LatLng(i.lat+u,i.lng+f))},getCenter:function(){return new r.LatLng((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 r.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new r.LatLng(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(n){n=typeof n[0]=="number"||n instanceof r.LatLng?r.latLng(n):r.latLngBounds(n);var u=this._southWest,f=this._northEast,t,i;
1return n instanceof r.LatLngBounds?(t=n.getSouthWest(),i=n.getNorthEast()):t=i=n,t.lat>=u.lat&&i.lat<=f.lat&&t.lng>=u.lng&&i.lng<=f.lng},intersects:function(n){n=r.latLngBounds(n);var t=this._southWest,i=this._northEast,u=n.getSouthWest(),f=n.getNorthEast(),e=f.lat>=t.lat&&u.lat<=i.lat,o=f.lng>=t.lng&&u.lng<=i.lng;return e&&o},overlaps:function(n){n=r.latLngBounds(n);var t=this._southWest,i=this._northEast,u=n.getSouthWest(),f=n.getNorthEast(),e=f.lat>t.lat&&u.lat<i.lat,o=f.lng>t.lng&&u.lng<i.lng;return e&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(n){return n?(n=r.latLngBounds(n),this._southWest.equals(n.getSouthWest())&&this._northEast.equals(n.getNorthEast())):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};r.latLngBounds=function(n,t){return n instanceof r.LatLngBounds?n:new r.LatLngBounds(n,t)};r.Projection={};r.Projection.LonLat={project:function(n){return new r.Point(n.lng,n.lat)},unproject:function(n){return new r.LatLng(n.y,n.x)},bounds:r.bounds([-180,-90],[180,90])};r.Projection.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(n){var t=Math.PI/180,i=this.MAX_LATITUDE,f=Math.max(Math.min(i,n.lat),-i),u=Math.sin(f*t);return new r.Point(this.R*n.lng*t,this.R*Math.log((1+u)/(1-u))/2)},unproject:function(n){var t=180/Math.PI;return new r.LatLng((2*Math.atan(Math.exp(n.y/this.R))-Math.PI/2)*t,n.x*t/this.R)},bounds:function(){var n=6378137*Math.PI;return r.bounds([-n,-n],[n,n])}()};r.CRS={latLngToPoint:function(n,t){var i=this.projection.project(n),r=this.scale(t);return this.transformation._transform(i,r)},pointToLatLng:function(n,t){var i=this.scale(t),r=this.transformation.untransform(n,i);return this.projection.unproject(r)},project:function(n){return this.projection.project(n)},unproject:function(n){return this.projection.unproject(n)},scale:function(n){return 256*Math.pow(2,n)},zoom:function(n){return Math.log(n/256)/Math.LN2},getProjectedBounds:function(n){if(this.infinite)return null;var t=this.projection.bounds,i=this.scale(n),u=this.transformation.transform(t.min,i),f=this.transformation.transform(t.max,i);return r.bounds(u,f)},infinite:!1,wrapLatLng:function(n){var t=this.wrapLng?r.Util.wrapNum(n.lng,this.wrapLng,!0):n.lng,i=this.wrapLat?r.Util.wrapNum(n.lat,this.wrapLat,!0):n.lat,u=n.alt;return r.latLng(i,t,u)}};r.CRS.Simple=r.extend({},r.CRS,{projection:r.Projection.LonLat,transformation:new r.Transformation(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,t){var i=t.lng-n.lng,r=t.lat-n.lat;return Math.sqrt(i*i+r*r)},infinite:!0});r.CRS.Earth=r.extend({},r.CRS,{wrapLng:[-180,180],R:6371e3,distance:function(n,t){var i=Math.PI/180,r=n.lat*i,u=t.lat*i,f=Math.sin(r)*Math.sin(u)+Math.cos(r)*Math.cos(u)*Math.cos((t.lng-n.lng)*i);return this.R*Math.acos(Math.min(f,1))}});r.CRS.EPSG3857=r.extend({},r.CRS.Earth,{code:"EPSG:3857",projection:r.Projection.SphericalMercator,transformation:function(){var n=.5/(Math.PI*r.Projection.SphericalMercator.R);return new r.Transformation(n,.5,-n,.5)}()});r.CRS.EPSG900913=r.extend({},r.CRS.EPSG3857,{code:"EPSG:900913"});r.CRS.EPSG4326=r.extend({},r.CRS.Earth,{code:"EPSG:4326",projection:r.Projection.LonLat,transformation:new r.Transformation(1/180,1,-1/180,.5)});r.Map=r.Evented.extend({options:{crs:r.CRS.EPSG3857,center:i,zoom:i,minZoom:i,maxZoom:i,layers:[],maxBounds:i,renderer:i,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(n,t){if(t=r.setOptions(this,t),this._initContainer(n),this._initLayout(),this._onResize=r.bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==i&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==i&&this.setView(r.latLng(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=r.DomUtil.TRANSITION&&r.Browser.any3d&&!r.Browser.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated){this._createAnimProxy();r.DomEvent.on(this._proxy,r.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)}
1,setView:function(n,t,u){if(t=t===i?this._zoom:this._limitZoom(t),n=this._limitCenter(r.latLng(n),t,this.options.maxBounds),u=u||{},this._stop(),this._loaded&&!u.reset&&u!==!0){u.animate!==i&&(u.zoom=r.extend({animate:u.animate},u.zoom),u.pan=r.extend({animate:u.animate,duration:u.duration},u.pan));var f=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(n,t,u.zoom):this._tryAnimatedPan(n,u.pan);if(f)return clearTimeout(this._sizeTimer),this}return this._resetView(n,t),this},setZoom:function(n,t){return this._loaded?this.setView(this.getCenter(),n,{zoom:t}):(this._zoom=n,this)},zoomIn:function(n,t){return n=n||(r.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+n,t)},zoomOut:function(n,t){return n=n||(r.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-n,t)},setZoomAround:function(n,t,i){var f=this.getZoomScale(t),u=this.getSize().divideBy(2),e=n instanceof r.Point?n:this.latLngToContainerPoint(n),o=e.subtract(u).multiplyBy(1-1/f),s=this.containerPointToLatLng(u.add(o));return this.setView(s,t,{zoom:i})},_getBoundsCenterZoom:function(n,t){t=t||{};n=n.getBounds?n.getBounds():r.latLngBounds(n);var u=r.point(t.paddingTopLeft||t.padding||[0,0]),f=r.point(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(n,!1,u.add(f));i=typeof t.maxZoom=="number"?Math.min(t.maxZoom,i):i;
1var e=f.subtract(u).divideBy(2),o=this.project(n.getSouthWest(),i),s=this.project(n.getNorthEast(),i),h=this.unproject(o.add(s).divideBy(2).add(e),i);return{center:h,zoom:i}},fitBounds:function(n,t){if(n=r.latLngBounds(n),!n.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(n,t);return this.setView(i.center,i.zoom,t)},fitWorld:function(n){return this.fitBounds([[-90,-180],[90,180]],n)},panTo:function(n,t){return this.setView(n,this._zoom,{pan:t})},panBy:function(n,t){if(n=r.point(n).round(),t=t||{},!n.x&&!n.y)return this.fire("moveend");if(t.animate!==!0&&!this.getSize().contains(n))return this._resetView(this.unproject(this.project(this.getCenter()).add(n)),this.getZoom()),this;if(!this._panAnim){this._panAnim=new r.PosAnimation;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(t.noMoveStart||this.fire("movestart"),t.animate!==!1){r.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(n).round();this._panAnim.run(this._mapPane,i,t.duration||.25,t.easeLinearity)}else this._rawPanBy(n),this.fire("move").fire("moveend");return this},flyTo:function(n,t,u){function w(n){var r=n?-1:1,u=n?v:f,e=v*v-f*f+r*c*c*h*h,o=2*u*c*h,t=e/o,i=Math.sqrt(t*t+1)-t;return i<1e-9?-18:Math.log(i)}function b(n){return(Math.exp(n)-Math.exp(-n))/2}function l(n){return(Math.exp(n)+Math.exp(-n))/2}function g(n){return b(n)/l(n)}function nt(n){return f*(l(e)/l(e+o*n))}function tt(n){return f*(l(e)*g(e+o*n)-b(e))/c}function it(n){return 1-Math.pow(1-n,1.5)}function d(){var i=(Date.now()-rt)/ut,u=it(i)*k;i<=1?(this._flyToFrame=r.Util.requestAnimFrame(d,this),this._move(this.unproject(a.add(y.subtract(a).multiplyBy(tt(u)/h)),s),this.getScaleZoom(f/nt(u),s),{flyTo:!0})):this._move(n,t)._moveEnd(!0)}var e;if(u=u||{},u.animate===!1||!r.Browser.any3d)return this.setView(n,t,u);this._stop();var a=this.project(this.getCenter()),y=this.project(n),p=this.getSize(),s=this._zoom;n=r.latLng(n);t=t===i?s:t;var f=Math.max(p.x,p.y),v=f*this.getZoomScale(s,t),h=y.distanceTo(a)||1,o=1.42,c=o*o;e=w(0);var rt=Date.now(),k=(w(1)-e)/o,ut=u.duration?1e3*u.duration:1e3*k*.8;return this._moveStart(!0),d.call(this),this},flyToBounds:function(n,t){var i=this._getBoundsCenterZoom(n,t);return this.flyTo(i.center,i.zoom,t)},setMaxBounds:function(n){if(n=r.latLngBounds(n),n.isValid())this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds);else return this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds);this.options.maxBounds=n;this._loaded&&this._panInsideMaxBounds();return this.on("moveend",this._panInsideMaxBounds)},setMinZoom:function(n){return(this.options.minZoom=n,this._loaded&&this.getZoom()<this.options.minZoom)?this.setZoom(n):this},setMaxZoom:function(n){return(this.options.maxZoom=n,this._loaded&&this.getZoom()>this.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,t){this._enforcingBounds=!0;var i=this.getCenter(),u=this._limitCenter(i,this._zoom,r.latLngBounds(n));return i.equals(u)||this.panTo(u,t),this._enforcingBounds=!1,this},invalidateSize:function(n){var i;if(!this._loaded)return this;n=r.extend({animate:!1,pan:!0},n===!0?{animate:!0}:n);i=this.getSize();this._sizeChanged=!0;this._lastCenter=null;var u=this.getSize(),f=i.divideBy(2).round(),e=u.divideBy(2).round(),t=f.subtract(e);return!t.x&&!t.y?this:(n.animate&&n.pan?this.panBy(t):(n.pan&&this._rawPanBy(t),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=r.extend({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=r.bind(this._handleGeolocationResponse,this),i=r.bind(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,n):navigator.geolocation.getCurrentPosition(t,i,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var t=n.code,i=n.message||(t===1?"permission denied":t===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld();this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(n){var s=n.coords.latitude,h=n.coords.longitude,i=new r.LatLng(s,h),o=i.toBounds(n.coords.accuracy),u=this._locateOptions,f,e,t;u.setView&&(f=this.getBoundsZoom(o),this.setView(i,u.maxZoom?Math.min(f,u.maxZoom):f));e={latlng:i,bounds:o,timestamp:n.timestamp};for(t in n.coords)typeof n.coords[t]=="number"&&(e[t]=n.coords[t]);this.fire("locationfound",e)},addHandler:function(n,t){if(!t)return this;var i=this[n]=new t(this);return this._handlers.push(i),this.options[n]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id;delete this._containerId}catch(t){this._container._leaflet_id=i;this._containerId=i}r.DomUtil.remove(this._mapPane);this._clearControlPos&&this._clearControlPos();this._clearHandlers();this._loaded&&this.fire("unload");for(var n in this._layers)this._layers[n].remove();return this},createPane:function(n,t){var u="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),i=r.DomUtil.create("div",u,t||this._mapPane);return n&&(this._panes[n]=i),i},getCenter:function(){return(this._checkIfLoaded(),this._lastCenter&&!this._moved())?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),t=this.unproject(n.getBottomLeft()),i=this.unproject(n.getTopRight());return new r.LatLngBounds(t,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZo
1om===i?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,t,i){n=r.latLngBounds(n);i=r.point(i||[0,0]);var u=this.getZoom()||0,s=this.getMinZoom(),h=this.getMaxZoom(),c=n.getNorthWest(),l=n.getSouthEast(),e=this.getSize().subtract(i),o=this.project(l,u).subtract(this.project(c,u)),f=r.Browser.any3d?this.options.zoomSnap:1,a=Math.min(e.x/o.x,e.y/o.y);return u=this.getScaleZoom(a,u),f&&(u=Math.round(u/(f/100))*(f/100),u=t?Math.ceil(u/f)*f:Math.floor(u/f)*f),Math.max(s,Math.min(h,u))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new r.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,t){var i=this._getTopLeftPoint(n,t);return new r.Bounds(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===i?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,t){var r=this.options.crs;return t=t===i?this._zoom:t,r.scale(n)/r.scale(t)},getScaleZoom:function(n,t){var u=this.options.crs,r;return t=t===i?this._zoom:t,r=u.zoom(n*u.scale(t)),isNaN(r)?Infinity:r},project:function(n,t){return t=t===i?this._zoom:t,this.options.crs.latLngToPoint(r.latLng(n),t)},unproject:function(n,t){return t=t===i?this._zoom:t,this.options.crs.pointToLatLng(r.point(n),t)},layerPointToLatLng:function(n){var t=r.point(n).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(n){var t=this.project(r.latLng(n))._round();return t._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(r.latLng(n))},distance:function(n,t){return this.options.crs.distance(r.latLng(n),r.latLng(t))},containerPointToLayerPoint:function(n){return r.point(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return r.point(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var t=this.containerPointToLayerPoint(r.point(n));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(r.latLng(n)))},mouseEventToContainerPoint:function(n){return r.DomEvent.getMousePosition(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var t=this._container=r.DomUtil.get(n);if(t){if(t._leaflet_id)throw new Error("Map container is already initialized.");}else throw new Error("Map container not found.");r.DomEvent.addListener(t,"scroll",this._onScroll,this);this._containerId=r.Util.stamp(t)},_initLayout:function(){var t=this._container,n;this._fadeAnimated=this.options.fadeAnimation&&r.Browser.any3d;r.DomUtil.addClass(t,"leaflet-container"+(r.Browser.touch?" leaflet-touch":"")+(r.Browser.retina?" leaflet-retina":"")+(r.Browser.ielt9?" leaflet-oldie":"")+(r.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));n=r.DomUtil.getStyle(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&(t.style.position="relative");this._initPanes();this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);r.DomUtil.setPosition(this._mapPane,new r.Point(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");this.options.markerZoomAnimation||(r.DomUtil.addClass(n.markerPane,"leaflet-zoom-hide"),r.DomUtil.addClass(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,t){var u,i;r.DomUtil.setPosition(this._mapPane,new r.Point(0,0));u=!this._loaded;this._loaded=!0;t=this._limitZoom(t);this.fire("viewprereset");i=this._zoom!==t;this._moveStart(i)._move(n,t)._moveEnd(i);this.fire("viewreset");u&&this.fire("load")},_moveStart:function(n){return n&&this.fire("zoomstart"),this.fire("movestart")},_move:function(n,t,r){t===i&&(t=this._zoom);var u=this._zoom!==t;return this._zoom=t,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(u||r&&r.pinch)&&this.fire("zoom",r),this.fire("move",r)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")}
1,_stop:function(){return r.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){r.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(n))},_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){if(r.DomEvent){this._targets={};this._targets[r.stamp(this._container)]=this;var i=t?"off":"on";r.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this);this.options.trackResize&&r.DomEvent[i](n,"resize",this._onResize,this);r.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){r.Util.cancelAnimFrame(this._resizeRequest);this._resizeRequest=r.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,t){for(var f=[],u,e=t==="mouseout"||t==="mouseover",i=n.target||n.srcElement,o=!1;i;){if(u=this._targets[r.stamp(i)],u&&(t==="click"||t==="preclick")&&!n._simulated&&this._draggableMoved(u)){o=!0;break}if(u&&u.listens(t,!0)){if(e&&!r.DomEvent._isExternalTarget(i,n))break;if(f.push(u),e)break}if(i===this._container)break;i=i.parentNode}return f.length||o||e||!r.DomEvent._isExternalTarget(i,n)||(f=[this]),f},_handleDOMEvent:function(n){if(this._loaded&&!r.DomEvent._skipped(n)){var t=n.type==="keypress"&&n.keyCode===13?"click":n.type;t==="mousedown"&&r.DomUtil.preventOutline(n.target||n.srcElement);this._fireDOMEvent(n,t)}},_fireDOMEvent:function(n,t,i){var o,e,u,s,f;if((n.type==="click"&&(o=r.Util.extend({},n),o.type="preclick",this._fireDOMEvent(o,o.type,i)),!n._stopped)&&(i=(i||[]).concat(this._findEventTargets(n,t)),i.length))for(e=i[0],t==="contextmenu"&&e.listens(t,!0)&&r.DomEvent.preventDefault(n),u={originalEvent:n},n.type!=="keypress"&&(s=e instanceof r.Marker,u.containerPoint=s?this.latLngToContainerPoint(e.getLatLng()):this.mouseEventToContainerPoint(n),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=s?e.getLatLng():this.layerPointToLatLng(u.layerPoint)),f=0;f<i.length;f++)if(i[f].fire(t,u,!0),u.originalEvent._stopped||i[f].options.nonBubblingEvents&&r.Util.indexOf(i[f].options.nonBubblingEvents,t)!==-1)return},_draggableMoved:function(n){return n=n.dragging&&n.dragging.enabled()?n:this,n.dragging&&n.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var n=0,t=this._handlers.length;n<t;n++)this._handlers[n].disable()},whenReady:function(n,t){if(this._loaded)n.call(t||this,{target:this});else this.on("load",n,t);return this},_getMapPanePos:function(){return r.DomUtil.getPosition(this._mapPane)||new r.Point(0,0)},_moved:function(){var n=this._getMapPanePos();return n&&!n.equals([0,0])},_getTopLeftPoint:function(n,t){var r=n&&t!==i?this._getNewPixelOrigin(n,t):this.getPixelOrigin();return r.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(n,t){var i=this.getSize()._divideBy(2);return this.project(n,t)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(n,t,i){var r=this._getNewPixelOrigin(i,t);return this.project(n,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(n,t,i){var u=this._getNewPixelOrigin(i,t);
1return r.bounds([this.project(n.getSouthWest(),t)._subtract(u),this.project(n.getNorthWest(),t)._subtract(u),this.project(n.getSouthEast(),t)._subtract(u),this.project(n.getNorthEast(),t)._subtract(u)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(n){return this.latLngToLayerPoint(n).subtract(this._getCenterLayerPoint())},_limitCenter:function(n,t,i){if(!i)return n;var u=this.project(n,t),f=this.getSize().divideBy(2),o=new r.Bounds(u.subtract(f),u.add(f)),e=this._getBoundsOffset(o,i,t);return e.round().equals([0,0])?n:this.unproject(u.add(e),t)},_limitOffset:function(n,t){if(!t)return n;var i=this.getPixelBounds(),u=new r.Bounds(i.min.add(n),i.max.add(n));return n.add(this._getBoundsOffset(u,t))},_getBoundsOffset:function(n,t,i){var u=r.bounds(this.project(t.getNorthEast(),i),this.project(t.getSouthWest(),i)),f=u.min.subtract(n.min),e=u.max.subtract(n.max),o=this._rebound(f.x,-e.x),s=this._rebound(f.y,-e.y);return new r.Point(o,s)},_rebound:function(n,t){return n+t>0?Math.round(n-t)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(t))},_limitZoom:function(n){var i=this.getMinZoom(),u=this.getMaxZoom(),t=r.Browser.any3d?this.options.zoomSnap:1;return t&&(n=Math.round(n/t)*t),Math.max(i,Math.min(u,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){r.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function(n,t){var i=this._getCenterOffset(n)._floor();return(t&&t.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,t),!0)},_createAnimProxy:function(){var n=this._proxy=r.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n);this.on("zoomanim",function(t){var i=r.DomUtil.TRANSFORM,u=n.style[i];r.DomUtil.setTransform(n,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1));u===n.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this);this.on("load moveend",function(){var i=this.getCenter(),t=this.getZoom();r.DomUtil.setTransform(n,this.project(i,t),this.getZoomScale(t,1))},this)},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var u=this.getZoomScale(t),f=this._getCenterOffset(n)._divideBy(1-1/u);return i.animate!==!0&&!this.getSize().contains(f)?!1:(r.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(n,t,!0)},this),!0)},_animateZoom:function(n,t,i,u){i&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=t,r.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"));this.fire("zoomanim",{center:n,zoom:t,noUpdate:u});setTimeout(r.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(r.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),r.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}});r.map=function(n,t){return new r.Map(n,t)};r.Layer=r.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[],attribution:null},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[r.stamp(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[r.stamp(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var t=n.target,i;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){i=this.getEvents();t.on(i,this);this.once("remove",function(){t.off(i,this)},this)}this.onAdd(t);this.getAttribution&&this._map.attributionControl&&this._map.attributionControl.addAttribution(this.getAttribution());this.fire("add");t.fire("layeradd",{layer:this})}}});r.Map.include({addLayer:function(n){var t=r.stamp(n);return this._layers[t]?this:(this._layers[t]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var t=r.stamp(n);if(!this._layers[t])return this;if(this._loaded)n.onRemove(this);return n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this},hasLayer:function(n){return!!n&&r.stamp(n)in this._layers},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},_addLayers:function(n){n=n?r.Util.isArray(n)?n:[n]:[];for(var t=0,i=n.length;t<i;t++)this.addLayer(n[t])}
1,_addZoomLimit:function(n){(isNaN(n.options.maxZoom)||!isNaN(n.options.minZoom))&&(this._zoomBoundLayers[r.stamp(n)]=n,this._updateZoomLevels())},_removeZoomLimit:function(n){var t=r.stamp(n);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var n=Infinity,t=-Infinity,f=this._getZoomSpan(),u,r;for(u in this._zoomBoundLayers)r=this._zoomBoundLayers[u].options,n=r.minZoom===i?n:Math.min(n,r.minZoom),t=r.maxZoom===i?t:Math.max(t,r.maxZoom);this._layersMaxZoom=t===-Infinity?i:t;this._layersMinZoom=n===Infinity?i:n;f!==this._getZoomSpan()&&this.fire("zoomlevelschange");this.options.maxZoom===i&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom);this.options.minZoom===i&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});f="_leaflet_events";r.DomEvent={on:function(n,t,i,u){var e,f,o;if(typeof t=="object")for(e in t)this._on(n,e,t[e],i);else for(t=r.Util.splitWords(t),f=0,o=t.length;f<o;f++)this._on(n,t[f],i,u);return this},off:function(n,t,i,u){var e,f,o;if(typeof t=="object")for(e in t)this._off(n,e,t[e],i);else for(t=r.Util.splitWords(t),f=0,o=t.length;f<o;f++)this._off(n,t[f],i,u);return this},_on:function(t,i,u,e){var s=i+r.stamp(u)+(e?"_"+r.stamp(e):""),o,h;return t[f]&&t[f][s]?this:(o=function(i){return u.call(e||t,i||n.event)},h=o,r.Browser.pointer&&i.indexOf("touch")===0?this.addPointerListener(t,i,o,s):r.Browser.touch&&i==="dblclick"&&this.addDoubleTapListener?this.addDoubleTapListener(t,o,s):"addEventListener"in t?i==="mousewheel"?t.addEventListener("onwheel"in t?"wheel":"mousewheel",o,!1):i==="mouseenter"||i==="mouseleave"?(o=function(i){i=i||n.event;r.DomEvent._isExternalTarget(t,i)&&h(i)},t.addEventListener(i==="mouseenter"?"mouseover":"mouseout",o,!1)):(i==="click"&&r.Browser.android&&(o=function(n){return r.DomEvent._filterClick(n,h)}),t.addEventListener(i,o,!1)):"attachEvent"in t&&t.attachEvent("on"+i,o),t[f]=t[f]||{},t[f][s]=o,this)},_off:function(n,t,i,u){var e=t+r.stamp(i)+(u?"_"+r.stamp(u):""),o=n[f]&&n[f][e];return o?(r.Browser.pointer&&t.indexOf("touch")===0?this.removePointerListener(n,t,e):r.Browser.touch&&t==="dblclick"&&this.removeDoubleTapListener?this.removeDoubleTapListener(n,e):"removeEventListener"in n?t==="mousewheel"?n.removeEventListener("onwheel"in n?"wheel":"mousewheel",o,!1):n.removeEventListener(t==="mouseenter"?"mouseover":t==="mouseleave"?"mouseout":t,o,!1):"detachEvent"in n&&n.detachEvent("on"+t,o),n[f][e]=null,this):this},stopPropagation:function(n){return n.stopPropagation?n.stopPropagation():n.originalEvent?n.originalEvent._stopped=!0:n.cancelBubble=!0,r.DomEvent._skipped(n),this},disableScrollPropagation:function(n){return r.DomEvent.on(n,"mousewheel",r.DomEvent.stopPropagation)},disableClickPropagation:function(n){var t=r.DomEvent.stopPropagation;r.DomEvent.on(n,r.Draggable.START.join(" "),t);return r.DomEvent.on(n,{click:r.DomEvent._fakeStop,dblclick:t})},preventDefault:function(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this},stop:function(n){return r.DomEvent.preventDefault(n).stopPropagation(n)},getMousePosition:function(n,t){if(!t)return new r.Point(n.clientX,n.clientY);var i=t.getBoundingClientRect();return new r.Point(n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop)},_wheelPxFactor:r.Browser.win&&r.Browser.chrome?2:r.Browser.gecko?n.devicePixelRatio:1,getWheelDelta:function(n){return r.Browser.edge?n.wheelDeltaY/2:n.deltaY&&n.deltaMode===0?-n.deltaY/r.DomEvent._wheelPxFactor:n.deltaY&&n.deltaMode===1?-n.deltaY*20:n.deltaY&&n.deltaMode===2?-n.deltaY*60:n.deltaX||n.deltaZ?0:n.wheelDelta?(n.wheelDeltaY||n.wheelDelta)/2:n.detail&&Math.abs(n.detail)<32765?-n.detail*20:n.detail?n.detail/-32765*60:0},_skipEvents:{},_fakeStop:function(n){r.DomEvent._skipEvents[n.type]=!0},_skipped:function(n){var t=this._skipEvents[n.type];return this._skipEvents[n.type]=!1,t},_isExternalTarget:function(n,t){var i=t.relatedTarget;if(!i)return!0;try{while(i&&i!==n)i=i.parentNode}catch(r){return!1}return i!==n},_filterClick:function(n,t){var u=n.timeStamp||n.originalEvent&&n.originalEvent.timeStamp,i=r.DomEvent._lastClick&&u-r.DomEvent._lastClick;if(i&&i>100&&i<500||n.target._simulatedClick&&!n._simulated){r.DomEvent.stop(n);return}r.DomEvent._lastClick=u;t(n)}};r.DomEvent.addListener=r.DomEvent.on;r.DomEvent.removeListener=r.DomEvent.off;r.PosAnimation=r.Evented.extend({run:function(n,t,i,u){this.stop();this._el=n;this._inProgress=!0;this._duration=i||.25;this._easeOutPower=1/Math.max(u||.5,.2);this._startPos=r.DomUtil.getPosition(n);this._offset=t.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())}
1,_animate:function(){this._animId=r.Util.requestAnimFrame(this._animate,this);this._step()},_step:function(n){var t=+new Date-this._startTime,i=this._duration*1e3;t<i?this._runFrame(this._easeOut(t/i),n):(this._runFrame(1),this._complete())},_runFrame:function(n,t){var i=this._startPos.add(this._offset.multiplyBy(n));t&&i._round();r.DomUtil.setPosition(this._el,i);this.fire("step")},_complete:function(){r.Util.cancelAnimFrame(this._animId);this._inProgress=!1;this.fire("end")},_easeOut:function(n){return 1-Math.pow(1-n,this._easeOutPower)}});r.Projection.Mercator={R:6378137,R_MINOR:6356752.3142451793,bounds:r.bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(n){var u=Math.PI/180,i=this.R,t=n.lat*u,f=this.R_MINOR/i,e=Math.sqrt(1-f*f),o=e*Math.sin(t),s=Math.tan(Math.PI/4-t/2)/Math.pow((1-o)/(1+o),e/2);return t=-i*Math.log(Math.max(s,1e-10)),new r.Point(n.lng*u*i,t)},unproject:function(n){for(var o=180/Math.PI,f=this.R,s=this.R_MINOR/f,h=Math.sqrt(1-s*s),c=Math.exp(-n.y/f),i=Math.PI/2-2*Math.atan(c),t,e=0,u=.1;e<15&&Math.abs(u)>1e-7;e++)t=h*Math.sin(i),t=Math.pow((1-t)/(1+t),h/2),u=Math.PI/2-2*Math.atan(c*t)-i,i+=u;return new r.LatLng(i*o,n.x*o/f)}};r.CRS.EPSG3395=r.extend({},r.CRS.Earth,{code:"EPSG:3395",projection:r.Projection.Mercator,transformation:function(){var n=.5/(Math.PI*r.Projection.Mercator.R);return new r.Transformation(n,.5,-n,.5)}()});r.GridLayer=r.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:r.Browser.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:i,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(n){r.setOptions(this,n)},onAdd:function(){this._initContainer();this._levels={};this._tiles={};this._resetView();this._update()},beforeAdd:function(n){n._addZoomLimit(this)},onRemove:function(n){this._removeAllTiles();r.DomUtil.remove(this._container);n._removeZoomLimit(this);this._container=null;this._tileZoom=null},bringToFront:function(){return this._map&&(r.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(r.DomUtil.toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(n){return this.options.opacity=n,this._updateOpacity(),this},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var n={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),n.move=this._onMove),this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},createTile:function(){return t.createElement("div")},getTileSize:function(){var n=this.options.tileSize;return n instanceof r.Point?n:new r.Point(n,n)},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(n){for(var r=this.getPane().children,i=-n(-Infinity,Infinity),u,t=0,f=r.length;t<f;t++)u=r[t].style.zIndex,r[t]!==this._container&&u&&(i=n(i,+u));isFinite(i)&&(this.options.zIndex=i+n(-1,1),this._updateZIndex())},_updateOpacity:function(){var f,n,t;if(this._map&&!r.Browser.ielt9){r.DomUtil.setOpacity(this._container,this.options.opacity);var e=+new Date,i=!1,u=!1;for(f in this._tiles)(n=this._tiles[f],n.current&&n.loaded)&&(t=Math.min(1,(e-n.loaded)/200),r.DomUtil.setOpacity(n.el,t),t<1?i=!0:(n.active&&(u=!0),n.active=!0));u&&!this._noPrune&&this._pruneTiles();i&&(r.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=r.Util.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=r.DomUtil.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,e=this.options.maxZoom,t,n,f;if(u===i)return i;for(t in this._levels)this._levels[t].el.children.length||t===u?this._levels[t].el.style.zIndex=e-Math.abs(u-t):(r.DomUtil.remove(this._levels[t].el),this._removeTilesAtZoom(t),delete this._levels[t]);return n=this._levels[u],f=this._map,n||(n=this._levels[u]={},n.el=r.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=f.project(f.unproject(f.getPixelOrigin()),u).round(),n.zoom=u,this._setZoomTransform(n,f.getCenter(),f.getZoom()),r.Util.falseFn(n.el.offsetWidth)),this._level=n,n},_pruneTiles:function(){var t,i,r,n;if(this._map){if(r=this._map.getZoom(),r>this.options.maxZoom||r<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)i=this._tiles[t],i.retain=i.current;for(t in this._tiles)i=this._tiles[t],i.current&&!i.active&&(n=i.coords,this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(n){for(var t in this._tiles)this._tiles[t].coords.z===n&&this._removeTile(t)},_removeAllTiles:function(){for(var n in this._tiles)this._removeTile(n)},_invalidateAll:function(){for(var n in this._levels)r.DomUtil.remove(this._levels[n].el),delete this._levels[n];this._removeAllTiles();this._tileZoom=null},_retainParent:function(n,t,i,u){var o=Math.floor(n/2),s=Math.floor(t/2),e=i-1,h=new r.Point(+o,+s),c,f;return(h.z=+e,c=this._tileCoordsToKey(h),f=this._tiles[c],f&&f.active)?(f.retain=!0,!0):(f&&f.loaded&&(f.retain=!0),e>u)?this._retainParent(o,s,e,u):!1},_retainChildren:function(n,t,i,u){for(var o,s,h,f,e=2*n;e<2*n+2;e++)for(o=2*t;o<2*t+2;o++){if(s=new r.Point(e,o),s.z=i+1,h=this._tileCoordsToKey(s),f=this._tiles[h],f&&f.active){f.retain=!0;continue}else f&&f.loaded&&(f.retain=!0);i+1<u&&this._retainChildren(e,o,i+1,u)}},_resetView:function(n){var t=n&&(n.pinch||n.flyTo);
1this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(n){this._setView(n.center,n.zoom,!0,n.noUpdate)},_setView:function(n,t,r,u){var f=Math.round(t),e;(this.options.maxZoom!==i&&f>this.options.maxZoom||this.options.minZoom!==i&&f<this.options.minZoom)&&(f=i);e=this.options.updateWhenZooming&&f!==this._tileZoom;(!u||e)&&(this._tileZoom=f,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),f!==i&&this._update(n),r||this._pruneTiles(),this._noPrune=!!r);this._setZoomTransforms(n,t)},_setZoomTransforms:function(n,t){for(var i in this._levels)this._setZoomTransform(this._levels[i],n,t)},_setZoomTransform:function(n,t,i){var u=this._map.getZoomScale(i,n.zoom),f=n.origin.multiplyBy(u).subtract(this._map._getNewPixelOrigin(t,i)).round();r.Browser.any3d?r.DomUtil.setTransform(n.el,f,u):r.DomUtil.setPosition(n.el,f)},_resetGrid:function(){var t=this._map,n=t.options.crs,i=this._tileSize=this.getTileSize(),r=this._tileZoom,u=this._map.getPixelWorldBounds(this._tileZoom);u&&(this._globalTileRange=this._pxBoundsToTileRange(u));this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],r).x/i.x),Math.ceil(t.project([0,n.wrapLng[1]],r).x/i.y)];this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],r).y/i.x),Math.ceil(t.project([n.wrapLat[1],0],r).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(n){var t=this._map,f=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),e=t.getZoomScale(f,this._tileZoom),i=t.project(n,this._tileZoom).floor(),u=t.getSize().divideBy(e*2);return new r.Bounds(i.subtract(u),i.add(u))},_update:function(n){var l=this._map,a,v,h,c,u,o,y,p;if(l&&(a=l.getZoom(),n===i&&(n=l.getCenter()),this._tileZoom!==i)){var b=this._getTiledPixelBounds(n),f=this._pxBoundsToTileRange(b),w=f.getCenter(),e=[],s=this.options.keepBuffer,k=new r.Bounds(f.getBottomLeft().subtract([s,-s]),f.getTopRight().add([s,-s]));for(v in this._tiles)h=this._tiles[v].coords,h.z===this._tileZoom&&k.contains(r.point(h.x,h.y))||(this._tiles[v].current=!1);if(Math.abs(a-this._tileZoom)>1){this._setView(n,a);return}for(c=f.min.y;c<=f.max.y;c++)for(u=f.min.x;u<=f.max.x;u++)(o=new r.Point(u,c),o.z=this._tileZoom,this._isValidTile(o))&&(y=this._tiles[this._tileCoordsToKey(o)],y?y.current=!0:e.push(o));if(e.sort(function(n,t){return n.distanceTo(w)-t.distanceTo(w)}),e.length!==0){for(this._loading||(this._loading=!0,this.fire("loading")),p=t.createDocumentFragment(),u=0;u<e.length;u++)this._addTile(e[u],p);this._level.el.appendChild(p)}}},_isValidTile:function(n){var i=this._map.options.crs,t,u;return!i.infinite&&(t=this._globalTileRange,!i.wrapLng&&(n.x<t.min.x||n.x>t.max.x)||!i.wrapLat&&(n.y<t.min.y||n.y>t.max.y))?!1:this.options.bounds?(u=this._tileCoordsToBounds(n),r.latLngBounds(this.options.bounds).overlaps(u)):!0},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToBounds:function(n){var t=this._map,f=this.getTileSize(),e=n.scaleBy(f),o=e.add(f),i=t.unproject(e,n.z),u=t.unproject(o,n.z);return this.options.noWrap||(i=t.wrapLatLng(i),u=t.wrapLatLng(u)),new r.LatLngBounds(i,u)},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var t=n.split(":"),i=new r.Point(+t[0],+t[1]);return i.z=+t[2],i},_removeTile:function(n){var t=this._tiles[n];t&&(r.DomUtil.remove(t.el),delete this._tiles[n],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){r.DomUtil.addClass(n,"leaflet-tile");var t=this.getTileSize();n.style.width=t.x+"px";n.style.height=t.y+"px";n.onselectstart=r.Util.falseFn;n.onmousemove=r.Util.falseFn;r.Browser.ielt9&&this.options.opacity<1&&r.DomUtil.setOpacity(n,this.options.opacity);r.Browser.android&&!r.Browser.android23&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,t){var u=this._getTilePos(n),f=this._tileCoordsToKey(n),i=this.createTile(this._wrapCoords(n),r.bind(this._tileReady,this,n));this._initTile(i);
1this.createTile.length<2&&r.Util.requestAnimFrame(r.bind(this._tileReady,this,n,null,i));r.DomUtil.setPosition(i,u);this._tiles[f]={el:i,coords:n,current:!0};t.appendChild(i);this.fire("tileloadstart",{tile:i,coords:n})},_tileReady:function(n,t,i){if(this._map){t&&this.fire("tileerror",{error:t,tile:i,coords:n});var u=this._tileCoordsToKey(n);(i=this._tiles[u],i)&&(i.loaded=+new Date,this._map._fadeAnimated?(r.DomUtil.setOpacity(i.el,0),r.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=r.Util.requestAnimFrame(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),t||(r.DomUtil.addClass(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),r.Browser.ielt9||!this._map._fadeAnimated?r.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(r.bind(this._pruneTiles,this),250)))}},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var t=new r.Point(this._wrapX?r.Util.wrapNum(n.x,this._wrapX):n.x,this._wrapY?r.Util.wrapNum(n.y,this._wrapY):n.y);return t.z=n.z,t},_pxBoundsToTileRange:function(n){var t=this.getTileSize();return new r.Bounds(n.min.unscaleBy(t).floor(),n.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});r.gridLayer=function(n){return new r.GridLayer(n)};r.TileLayer=r.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,t){if(this._url=n,t=r.setOptions(this,t),t.detectRetina&&r.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=Math.max(0,t.minZoom)),typeof t.subdomains=="string"&&(t.subdomains=t.subdomains.split("")),!r.Browser.android)this.on("tileunload",this._onTileRemove)},setUrl:function(n,t){return this._url=n,t||this.redraw(),this},createTile:function(n,i){var u=t.createElement("img");r.DomEvent.on(u,"load",r.bind(this._tileOnLoad,this,i,u));r.DomEvent.on(u,"error",r.bind(this._tileOnError,this,i,u));return this.options.crossOrigin&&(u.crossOrigin=""),u.alt="",u.setAttribute("role","presentation"),u.src=this.getTileUrl(n),u},getTileUrl:function(n){var t={r:r.Browser.retina?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()},i;return this._map&&!this._map.options.crs.infinite&&(i=this._globalTileRange.max.y-n.y,this.options.tms&&(t.y=i),t["-y"]=i),r.Util.template(this._url,r.extend(t,this.options))},_tileOnLoad:function(n,t){r.Browser.ielt9?setTimeout(r.bind(n,this,null,t),0):n(null,t)},_tileOnError:function(n,t,i){var r=this.options.errorTileUrl;r&&(t.src=r);n(i,t)},getTileSize:function(){var f=this._map,t=r.GridLayer.prototype.getTileSize.call(this),n=this._tileZoom+this.options.zoomOffset,i=this.options.minNativeZoom,u=this.options.maxNativeZoom;return i!==null&&n<i?t.divideBy(f.getZoomScale(i,n)).round():u!==null&&n>u?t.divideBy(f.getZoomScale(u,n)).round():t},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,r=this.options.maxZoom,u=this.options.zoomReverse,f=this.options.zoomOffset,t=this.options.minNativeZoom,i=this.options.maxNativeZoom;return(u&&(n=r-n),n+=f,t!==null&&n<t)?t:i!==null&&n>i?i:n},_getSubdomain:function(n){var t=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,n;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=r.Util.falseFn,n.onerror=r.Util.falseFn,n.complete||(n.src=r.Util.emptyImageUrl,r.DomUtil.remove(n)))}});r.tileLayer=function(n,t){return new r.TileLayer(n,t)};r.TileLayer.WMS=r.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,t){var i,u;this._url=n;i=r.extend({},this.defaultWmsParams);for(u in t)u in this.options||(i[u]=t[u]);t=r.setOptions(this,t);i.width=i.height=t.tileSize*(t.detectRetina&&r.Browser.retina?2:1);this.wmsParams=i},onAdd:function(n){this._crs=this.options.crs||n.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code;r.TileLayer.prototype.onAdd.call(this,n)},getTileUrl:function(n){var u=this._tileCoordsToBounds(n),t=this._crs.project(u.getNorthWest()),i=this._crs.project(u.getSouthEast()),e=(this._wmsVersion>=1.3&&this._crs===r.CRS.EPSG4326?[i.y,t.x,t.y,i.x]:[t.x,i.y,i.x,t.y]).join(","),f=r.TileLayer.prototype.getTileUrl.call(this,n);return f+r.Util.getParamString(this.wmsParams,f,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(n,t){return r.extend(this.wmsParams,n),t||this.redraw(),this}});r.tileLayer.wms=function(n,t){return new r.TileLayer.WMS(n,t)};r.ImageOverlay=r.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(n,t,i){this._url=n;this._bounds=r.latLngBounds(t);r.setOptions(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity());this.options.interactive&&(r.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image));this.getPane().appendChild(this._image);this._reset()},onRemove:function(){r.DomUtil.remove(this._image);this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(n){return this.options.opacity=n,this._image&&this._updateOpacity(),this},setStyle:function(n){return n.opacity&&this.setOpacity(n.opacity),this},bringToFront:function(){return this._map&&r.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&r.DomUtil.toBack(this._image),this},setUrl:function(n){return this._url=n,this._image&&(this._image.src=n),this},setBounds:function(n){return this._bounds=n,this._map&&this._reset(),this},getEvents:function(){var n={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var n=this._image=r.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));n.onselectstart=r.Util.falseFn;n.onmousemove=r.Util.falseFn;n.onload=r.bind(this.fire,this,"load");this.options.crossOrigin&&(n.crossOrigin="");n.src=this._url;n.alt=this.options.alt},_animateZoom:function(n){var t=this._map.getZoomScale(n.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,n.zoom,n.center).min;r.DomUtil.setTransform(this._image,i,t)},_reset:function(){var n=this._image,t=new r.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=t.getSize();r.DomUtil.setPosition(n,t.min);n.style.width=i.x+"px";n.style.height=i.y+"px"},_updateOpacity:function(){r.DomUtil.setOpacity(this._image,this.options.opacity)}});r.imageOverlay=function(n,t,i){return new r.ImageOverlay(n,t,i)};r.Icon=r.Class.extend({initialize:function(n){r.setOptions(this,n)},createIcon:function(n){return this._createIcon("icon",n)},createShadow:function(n){return this._createIcon("shadow",n)},_createIcon:function(n,t){var r=this._getIconUrl(n),i;if(!r){if(n==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=this._createImg(r,t&&t.tagName==="IMG"?t:null),this._setIconStyles(i,n),i},_setIconStyles:function(n,t){var f=this.options,u=f[t+"Size"],i,e;typeof u=="number"&&(u=[u,u]);i=r.point(u);e=r.point(t==="shadow"&&f.shadowAnchor||f.iconAnchor||i&&i.divideBy(2,!0));n.className="leaflet-marker-"+t+" "+(f.className||"");e&&(n.style.marginLeft=-e.x+"px",n.style.marginTop=-e.y+"px");i&&(n.style.width=i.x+"px",n.style.height=i.y+"px")},_createImg:function(n,i){return i=i||t.createElement("img"),i.src=n,i},_getIconUrl:function(n){return r.Browser.retina&&this.options[n+"RetinaUrl"]||this.options[n+"Url"]}});r.icon=function(n){return new r.Icon(n)};r.Icon.Default=r.Icon.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(n){return r.Icon.Default.imagePath||(r.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||r.Icon.Default.imagePath)+r.Icon.prototype._getIconUrl.call(this,n)},_detectIconPath:function(){var n=r.DomUtil.create("div","leaflet-default-icon-path",t.body),i=r.DomUtil.getStyle(n,"background-image")||r.DomUtil.getStyle(n,"backgroundImage");return t.body.removeChild(n),i.indexOf("url")===0?i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}});r.Marker=r.Layer.extend({options:{icon:new r.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(n,t){r.setOptions(this,t);this._latlng=r.latLng(n)},onAdd:function(n){if(this._zoomAnimated=this._zoomAnimated&&n.options.markerZoomAnimation,this._zoomAnimated)n.on("zoomanim",this._animateZoom,this);this._initIcon();this.update()},onRemove:function(n){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks());this._zoomAnimated&&n.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(n){var t=this._latlng;return this._latlng=r.latLng(n),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(n){return this.options.zIndexOffset=n,this.update()},setIcon:function(n){return this.options.icon=n,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var n=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(n)}return this},_initIcon:function(){var n=this.options,f="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),t=n.icon.createIcon(this._icon),e=!1,i,u;if(t!==this._icon&&(this._icon&&this._removeIcon(),e=!0,n.title&&(t.title=n.title),n.alt&&(t.alt=n.alt)),r.DomUtil.addClass(t,f),n.keyboard&&(t.tabIndex="0"),this._icon=t,n.riseOnHover)this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});i=n.icon.createShadow(this._shadow);u=!1;i!==this._shadow&&(this._removeShadow(),u=!0);i&&r.DomUtil.addClass(i,f);this._shadow=i;
1n.opacity<1&&this._updateOpacity();e&&this.getPane().appendChild(this._icon);this._initInteraction();i&&u&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex});r.DomUtil.remove(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function(){this._shadow&&r.DomUtil.remove(this._shadow);this._shadow=null},_setPos:function(n){r.DomUtil.setPosition(this._icon,n);this._shadow&&r.DomUtil.setPosition(this._shadow,n);this._zIndex=n.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function(n){this._icon.style.zIndex=this._zIndex+n},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(r.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),r.Handler.MarkerDrag)){var n=this.options.draggable;this.dragging&&(n=this.dragging.enabled(),this.dragging.disable());this.dragging=new r.Handler.MarkerDrag(this);n&&this.dragging.enable()}},setOpacity:function(n){return this.options.opacity=n,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var n=this.options.opacity;r.DomUtil.setOpacity(this._icon,n);this._shadow&&r.DomUtil.setOpacity(this._shadow,n)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}});r.marker=function(n,t){return new r.Marker(n,t)};r.DivIcon=r.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(n){var i=n&&n.tagName==="DIV"?n:t.createElement("div"),u=this.options,f;return i.innerHTML=u.html!==!1?u.html:"",u.bgPos&&(f=r.point(u.bgPos),i.style.backgroundPosition=-f.x+"px "+-f.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});r.divIcon=function(n){return new r.DivIcon(n)};r.DivOverlay=r.Layer.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(n,t){r.setOptions(this,n);this._source=t},onAdd:function(n){this._zoomAnimated=n._zoomAnimated;this._container||this._initLayout();n._fadeAnimated&&r.DomUtil.setOpacity(this._container,0);clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();n._fadeAnimated&&r.DomUtil.setOpacity(this._container,1);this.bringToFront()},onRemove:function(n){n._fadeAnimated?(r.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(r.bind(r.DomUtil.remove,r.DomUtil,this._container),200)):r.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(n){return this._latlng=r.latLng(n),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(n){return this._content=n,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 n={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&r.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&r.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var n=this._contentNode,t=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof t=="string")n.innerHTML=t;else{while(n.hasChildNodes())n.removeChild(n.firstChild);n.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){var u,f;if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),n=r.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?r.DomUtil.setPosition(this._container,t.add(i)):n=n.add(t).add(i);u=this._containerBottom=-n.y;f=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=u+"px";this._container.style.left=f+"px"}},_getAnchor:function(){return[0,0]}});r.Popup=r.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(n){return n.openPopup(this),this},onAdd:function(n){if(r.DivOverlay.prototype.onAdd.call(this,n),n.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),!(this._source instanceof r.Path)))this._source.on("preclick",r.DomEvent.stopPropagation)},onRemove:function(n){r.DivOverlay.prototype.onRemove.call(this,n);n.fire("popupclose",{popup:this});this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof r.Path||this._source.off("preclick",r.DomEvent.stopPropagation))},getEvents:function(){var n=r.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(n.preclick=this._close),this.options.keepInView&&
1(n.moveend=this._adjustPan),n},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var n="leaflet-popup",u=this._container=r.DomUtil.create("div",n+" "+(this.options.className||"")+" leaflet-zoom-animated"),t,i;if(this.options.closeButton){t=this._closeButton=r.DomUtil.create("a",n+"-close-button",u);t.href="#close";t.innerHTML="&#215;";r.DomEvent.on(t,"click",this._onCloseButtonClick,this)}i=this._wrapper=r.DomUtil.create("div",n+"-content-wrapper",u);this._contentNode=r.DomUtil.create("div",n+"-content",i);r.DomEvent.disableClickPropagation(i).disableScrollPropagation(this._contentNode).on(i,"contextmenu",r.DomEvent.stopPropagation);this._tipContainer=r.DomUtil.create("div",n+"-tip-container",u);this._tip=r.DomUtil.create("div",n+"-tip",this._tipContainer)},_updateLayout:function(){var i=this._contentNode,n=i.style,t;n.width="";n.whiteSpace="nowrap";t=i.offsetWidth;t=Math.min(t,this.options.maxWidth);t=Math.max(t,this.options.minWidth);n.width=t+1+"px";n.whiteSpace="";n.height="";var e=i.offsetHeight,u=this.options.maxHeight,f="leaflet-popup-scrolled";u&&e>u?(n.height=u+"px",r.DomUtil.addClass(i,f)):r.DomUtil.removeClass(i,f);this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),i=this._getAnchor();r.DomUtil.setPosition(this._container,t.add(i))},_adjustPan:function(){if(this.options.autoPan&&(!this._map._panAnim||!this._map._panAnim._inProgress)){var o=this._map,a=parseInt(r.DomUtil.getStyle(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+a,h=this._containerWidth,c=new r.Point(this._containerLeft,-s-this._containerBottom);c._add(r.DomUtil.getPosition(this._container));var n=o.layerPointToContainerPoint(c),l=r.point(this.options.autoPanPadding),u=r.point(this.options.autoPanPaddingTopLeft||l),f=r.point(this.options.autoPanPaddingBottomRight||l),e=o.getSize(),t=0,i=0;n.x+h+f.x>e.x&&(t=n.x+h-e.x+f.x);n.x-t-u.x<0&&(t=n.x-u.x);n.y+s+f.y>e.y&&(i=n.y+s-e.y+f.y);n.y-i-u.y<0&&(i=n.y-u.y);(t||i)&&o.fire("autopanstart").panBy([t,i])}},_onCloseButtonClick:function(n){this._close();r.DomEvent.stop(n)},_getAnchor:function(){return r.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});r.popup=function(n,t){return new r.Popup(n,t)};r.Map.mergeOptions({closePopupOnClick:!0});r.Map.include({openPopup:function(n,t,i){return(n instanceof r.Popup||(n=new r.Popup(i).setContent(n)),t&&n.setLatLng(t),this.hasLayer(n))?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return n&&n!==this._popup||(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}});r.Layer.include({bindPopup:function(n,t){if(n instanceof r.Popup?(r.setOptions(n,t),this._popup=n,n._source=this):((!this._popup||t)&&(this._popup=new r.Popup(t,this)),this._popup.setContent(n)),!this._popupHandlersAdded){this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=!0}return this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(n,t){if(n instanceof r.Layer||(t=n,n=this),n instanceof r.FeatureGroup)for(var i in this._layers){n=this._layers[i];break}return t||(t=n.getCenter?n.getCenter():n.getLatLng()),this._popup&&this._map&&(this._popup._source=n,this._popup.update(),this._map.openPopup(this._popup,t)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return this._popup.isOpen()},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var t=n.layer||n.target;if(this._popup&&this._map){if(r.DomEvent.stop(n),t instanceof r.Path){this.openPopup(n.layer||n.target,n.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===t?this.closePopup():this.openPopup(t,n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)}});r.Tooltip=r.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){r.DivOverlay.prototype.onAdd.call(this,n);this.setOpacity(this.options.opacity);n.fire("tooltipopen",{tooltip:this});this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){r.DivOverlay.prototype.onRemove.call(this,n);n.fire("tooltipclose",{tooltip:this});this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=r.DivOverlay.prototype.getEvents.call(this);return r.Browser.touch&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=r.DomUtil.create("div",n)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var s=this._map,i=this._container,h=s.latLngToContainerPoint(s.getCenter()),c=s.layerPointToContainerPoint(n),u=this.options.direction,e=i.offsetWidth,o=i.offsetHeight,t=r.point(this.options.offset),f=this._getAnchor();u==="top"?n=n.add(r.point(-e/2+t.x,-o+t.y+f.y,!0)):u==="bottom"?n=n.subtract(r.point(e/2-t.x,-t.y,!0)):u==="center"?n=n.subtract(r.point(e/2+t.x,o/2-f.y+t.y,!0)):u==="right"||u==="auto"&&c.x<h.x?(u="right",n=n.add(r.point(t.x+f.x,f.y-o/2+t.y,!0))):(u="left",n=n.subtract(r.point(e+f.x-t.x,o/2-f.y-t.y,!0)));r.DomUtil.removeClass(i,"leaflet-tooltip-right");r.DomUtil.removeClass(i,"leaflet-tooltip-left");r.DomUtil.removeClass(i,"leaflet-tooltip-top");r.DomUtil.removeClass(i,"leaflet-tooltip-bottom");r.DomUtil.addClass(i,"leaflet-tooltip-"+u);r.DomUtil.setPosition(i,n)},_updatePosition:function(){var n=this._map.latLngToLayerPoint(this._latlng);this._setPosition(n)},setOpacity:function(n){this.options.opacity=n;this._container&&r.DomUtil.setOpacity(this._container,n)},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center);this._setPosition(t)},_getAnchor:function(){return r.point(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});r.tooltip=function(n,t){return new r.Tooltip(n,t)};r.Map.include({openTooltip:function(n,t,i){return(n instanceof r.Tooltip||(n=new r.Tooltip(i).setContent(n)),t&&n.setLatLng(t),this.hasLayer(n))?this:this.addLayer(n)},closeTooltip:function(n){return n&&this.removeLayer(n),this}});r.Layer.include({bindTooltip:function(n,t){return n instanceof r.Tooltip?(r.setOptions(n,t),this._tooltip=n,n._source=this):((!this._tooltip||t)&&(this._tooltip=r.tooltip(t,this)),this._tooltip.setContent(n)),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(n){if(n||!this._tooltipHandlersAdded){var i=n?"off":"on",t={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?t.add=this._openTooltip:(t.mouseover=this._openTooltip,t.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(t.mousemove=this._moveTooltip),r.Browser.touch&&(t.click=this._openTooltip));this[i](t);this._tooltipHandlersAdded=!n}},openTooltip:function(n,t){if(n instanceof r.Layer||(t=n,n=this),n instanceof r.FeatureGroup)for(var i in this._layers){n=this._layers[i];break}return t||(t=n.getCenter?n.getCenter():n.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=n,this._tooltip.update(),this._map.openTooltip(this._tooltip,t),this._tooltip.options.interactive&&this._tooltip._container&&(r.DomUtil.addClass(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&&(r.DomUtil.removeClass(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(n){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(n)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(n){return this._tooltip&&this._tooltip.setContent(n),this},getTooltip:function(){return this._tooltip},_openTooltip:function(n){var t=n.layer||n.target;this._tooltip&&this._map&&this.openTooltip(t,this._tooltip.options.sticky?n.latlng:i)},_moveTooltip:function(n){var t=n.latlng,i,r;this._tooltip.options.sticky&&n.originalEvent&&(i=this._map.mouseEventToContainerPoint(n.originalEvent),r=this._map.containerPointToLayerPoint(i),t=this._map.layerPointToLatLng(r));this._tooltip.setLatLng(t)}});r.LayerGroup=r.Layer.extend({initialize:function(n){this._layers={};var t,i;if(n)for(t=0,i=n.length;t<i;t++)this.addLayer(n[t])},addLayer:function(n){var t=this.getLayerId(n);return this._layers[t]=n,this._map&&this._map.addLayer(n),this},removeLayer:function(n){var t=n in this._layers?n:this.getLayerId(n);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(n){return!!n&&(n in this._layers||this.getLayerId(n)in this._layers)},clearLayers:function(){for(var n in this._layers)this.removeLayer(this._layers[n]);return this},invoke:function(n){var r=Array.prototype.slice.call(arguments,1
1),i,t;for(i in this._layers)t=this._layers[i],t[n]&&t[n].apply(t,r);return this},onAdd:function(n){for(var t in this._layers)n.addLayer(this._layers[t])},onRemove:function(n){for(var t in this._layers)n.removeLayer(this._layers[t])},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},getLayer:function(n){return this._layers[n]},getLayers:function(){var n=[],t;for(t in this._layers)n.push(this._layers[t]);return n},setZIndex:function(n){return this.invoke("setZIndex",n)},getLayerId:function(n){return r.stamp(n)}});r.layerGroup=function(n){return new r.LayerGroup(n)};r.FeatureGroup=r.LayerGroup.extend({addLayer:function(n){return this.hasLayer(n)?this:(n.addEventParent(this),r.LayerGroup.prototype.addLayer.call(this,n),this.fire("layeradd",{layer:n}))},removeLayer:function(n){return this.hasLayer(n)?(n in this._layers&&(n=this._layers[n]),n.removeEventParent(this),r.LayerGroup.prototype.removeLayer.call(this,n),this.fire("layerremove",{layer:n})):this},setStyle:function(n){return this.invoke("setStyle",n)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new r.LatLngBounds,i,n;for(i in this._layers)n=this._layers[i],t.extend(n.getBounds?n.getBounds():n.getLatLng());return t}});r.featureGroup=function(n){return new r.FeatureGroup(n)};r.Renderer=r.Layer.extend({options:{padding:.1},initialize:function(n){r.setOptions(this,n);r.stamp(this);this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&r.DomUtil.addClass(this._container,"leaflet-zoom-animated"));this.getPane().appendChild(this._container);this._update();this.on("update",this._updatePaths,this)},onRemove:function(){r.DomUtil.remove(this._container);this.off("update",this._updatePaths,this)},getEvents:function(){var n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,t){var i=this._map.getZoomScale(t,this._zoom),e=r.DomUtil.getPosition(this._container),u=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,t),s=this._map.project(n,t),h=s.subtract(o),f=u.multiplyBy(-i).add(e).add(u).subtract(h);r.Browser.any3d?r.DomUtil.setTransform(this._container,f,i):r.DomUtil.setPosition(this._container,f)},_reset:function(){this._update();this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,t=this._map.getSize(),i=this._map.containerPointToLayerPoint(t.multiplyBy(-n)).round();this._bounds=new r.Bounds(i,i.add(t.multiplyBy(1+n*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}});r.Map.include({getRenderer:function(n){var t=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this.options.preferCanvas&&r.canvas()||r.svg()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(n){if(n==="overlayPane"||n===i)return!1;var t=this._paneRenderers[n];return t===i&&(t=r.SVG&&r.svg({pane:n})||r.Canvas&&r.canvas({pane:n}),this._paneRenderers[n]=t),t}});r.Path=r.Layer.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},beforeAdd:function(n){this._renderer=n.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(n){return r.setOptions(this,n),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project();this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(r.Browser.touch?10:0)}});r.LineUtil={simplify:function(n,t){if(!t||!n.length)return n.slice();var i=t*t;return n=this._reducePoints(n,i),this._simplifyDP(n,i)},pointToSegmentDistance:function(n,t,i){return Math.sqrt(this._sqClosestPointOnSegment(n,t,i,!0))},closestPointOnSegment:function(n,t,i){return this._sqClosestPointOnSegment(n,t,i)},_simplifyDP:function(n,t){var u=n.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,f=new o(u),r,e;for(f[0]=f[u-1]=1,this._simplifyDPStep(n,f,t,0,u-1),e=[],r=0;r<u;r++)f[r]&&e.push(n[r]);return e},_simplifyDPStep:function(n,t,i,r,u){for(var o=0,e,s,f=r+1;f<=u-1;
1f++)s=this._sqClosestPointOnSegment(n[f],n[r],n[u],!0),s>o&&(e=f,o=s);o>i&&(t[e]=1,this._simplifyDPStep(n,t,i,r,e),this._simplifyDPStep(n,t,i,e,u))},_reducePoints:function(n,t){for(var r=[n[0]],i=1,u=0,f=n.length;i<f;i++)this._sqDist(n[i],n[u])>t&&(r.push(n[i]),u=i);return u<f-1&&r.push(n[f-1]),r},clipSegment:function(n,t,i,r,u){var f=r?this._lastCode:this._getBitCode(n,i),e=this._getBitCode(t,i),s,o,h;for(this._lastCode=e;;){if(!(f|e))return[n,t];if(f&e)return!1;s=f||e;o=this._getEdgeIntersection(n,t,s,i,u);h=this._getBitCode(o,i);s===f?(n=o,f=h):(t=o,e=h)}},_getEdgeIntersection:function(n,t,i,u,f){var s=t.x-n.x,h=t.y-n.y,c=u.min,l=u.max,e,o;return i&8?(e=n.x+s*(l.y-n.y)/h,o=l.y):i&4?(e=n.x+s*(c.y-n.y)/h,o=c.y):i&2?(e=l.x,o=n.y+h*(l.x-n.x)/s):i&1&&(e=c.x,o=n.y+h*(c.x-n.x)/s),new r.Point(e,o,f)},_getBitCode:function(n,t){var i=0;return n.x<t.min.x?i|=1:n.x>t.max.x&&(i|=2),n.y<t.min.y?i|=4:n.y>t.max.y&&(i|=8),i},_sqDist:function(n,t){var i=t.x-n.x,r=t.y-n.y;return i*i+r*r},_sqClosestPointOnSegment:function(n,t,i,u){var o=t.x,s=t.y,f=i.x-o,e=i.y-s,c=f*f+e*e,h;return c>0&&(h=((n.x-o)*f+(n.y-s)*e)/c,h>1?(o=i.x,s=i.y):h>0&&(o+=f*h,s+=e*h)),f=n.x-o,e=n.y-s,u?f*f+e*e:new r.Point(o,s)}};r.Polyline=r.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(n,t){r.setOptions(this,t);this._setLatLngs(n)},getLatLngs:function(){return this._latlngs},setLatLngs:function(n){return this._setLatLngs(n),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(n){for(var e=Infinity,i=null,c=r.LineUtil._sqClosestPointOnSegment,o,s,f,t,a,h,u=0,l=this._parts.length;u<l;u++)for(f=this._parts[u],t=1,a=f.length;t<a;t++)o=f[t-1],s=f[t],h=c(n,o,s,!0),h<e&&(e=h,i=c(n,o,s));return i&&(i.distance=Math.sqrt(e)),i}
1,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var n,r,e,u,f,t,o,i=this._rings[0],s=i.length;if(!s)return null;for(n=0,r=0;n<s-1;n++)r+=i[n].distanceTo(i[n+1])/2;if(r===0)return this._map.layerPointToLatLng(i[0]);for(n=0,u=0;n<s-1;n++)if(f=i[n],t=i[n+1],e=f.distanceTo(t),u+=e,u>r)return o=(u-r)/e,this._map.layerPointToLatLng([t.x-o*(t.x-f.x),t.y-o*(t.y-f.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,t){return t=t||this._defaultShape(),n=r.latLng(n),t.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new r.LatLngBounds;this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return r.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var i=[],f=r.Polyline._flat(n),t=0,u=n.length;t<u;t++)f?(i[t]=r.latLng(n[t]),this._bounds.extend(i[t])):i[t]=this._convertLatLngs(n[t]);return i},_project:function(){var n=new r.Bounds,t,i;this._rings=[];this._projectLatlngs(this._latlngs,this._rings,n);t=this._clickTolerance();i=new r.Point(t,t);this._bounds.isValid()&&n.isValid()&&(n.min._subtract(i),n.max._add(i),this._pxBounds=n)},_projectLatlngs:function(n,t,i){var o=n[0]instanceof r.LatLng,e=n.length,u,f;if(o){for(f=[],u=0;u<e;u++)f[u]=this._map.latLngToLayerPoint(n[u]),i.extend(f[u]);t.push(f)}else for(u=0;u<e;u++)this._projectLatlngs(n[u],t,i)},_clipPoints:function(){var s=this._renderer._bounds,i,e,n,t,h,o,u,f;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(s)){if(this.options.noClip){this._parts=this._rings;return}for(i=this._parts,e=0,t=0,h=this._rings.length;e<h;e++)for(f=this._rings[e],n=0,o=f.length;n<o-1;n++)(u=r.LineUtil.clipSegment(f[n],f[n+1],s,n,!0),u)&&(i[t]=i[t]||[],i[t].push(u[0]),(u[1]!==f[n+1]||n===o-2)&&(i[t].push(u[1]),t++))}},_simplifyPoints:function(){for(var t=this._parts,u=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=r.LineUtil.simplify(t[n],u)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)}});r.polyline=function(n,t){return new r.Polyline(n,t)};r.Polyline._flat=function(n){return!r.Util.isArray(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]!="undefined"};r.PolyUtil={};r.PolyUtil.clipPolygon=function(n,t,i){for(var o,y=[1,4,2,8],v,a,s,h,e,f,l=r.LineUtil,u=0,c=n.length;u<c;u++)n[u]._code=l._getBitCode(n[u],t);for(a=0;a<4;a++){for(e=y[a],o=[],u=0,c=n.length,v=c-1;u<c;v=u++)s=n[u],h=n[v],s._code&e?h._code&e||(f=l._getEdgeIntersection(h,s,e,t,i),f._code=l._getBitCode(f,t),o.push(f)):(h._code&e&&(f=l._getEdgeIntersection(h,s,e,t,i),f._code=l._getBitCode(f,t),o.push(f)),o.push(s));n=o}return n};r.Polygon=r.Polyline.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
1,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var r,e,n,t,u,i,o,s,c,f=this._rings[0],h=f.length;if(!h)return null;for(i=o=s=0,r=0,e=h-1;r<h;e=r++)n=f[r],t=f[e],u=n.y*t.x-t.y*n.x,o+=(n.x+t.x)*u,s+=(n.y+t.y)*u,i+=u*3;return c=i===0?f[0]:[o/i,s/i],this._map.layerPointToLatLng(c)},_convertLatLngs:function(n){var t=r.Polyline.prototype._convertLatLngs.call(this,n),i=t.length;return i>=2&&t[0]instanceof r.LatLng&&t[0].equals(t[i-1])&&t.pop(),t},_setLatLngs:function(n){r.Polyline.prototype._setLatLngs.call(this,n);r.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return r.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,u=this.options.weight,f=new r.Point(u,u),t,e,i;if(n=new r.Bounds(n.min.subtract(f),n.max.add(f)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(n)){if(this.options.noClip){this._parts=this._rings;return}for(t=0,e=this._rings.length;t<e;t++)i=r.PolyUtil.clipPolygon(this._rings[t],n,!0),i.length&&this._parts.push(i)}},_updatePath:function(){this._renderer._updatePoly(this,!0)}});r.polygon=function(n,t){return new r.Polygon(n,t)};r.Rectangle=r.Polygon.extend({initialize:function(n,t){r.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(n),t)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=r.latLngBounds(n),[n.getSouthWest
1(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});r.rectangle=function(n,t){return new r.Rectangle(n,t)};r.CircleMarker=r.Path.extend({options:{fill:!0,radius:10},initialize:function(n,t){r.setOptions(this,t);this._latlng=r.latLng(n);this._radius=this.options.radius},setLatLng:function(n){return this._latlng=r.latLng(n),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(n){return this.options.radius=this._radius=n,this.redraw()},getRadius:function(){return this._radius},setStyle:function(n){var t=n&&n.radius||this._radius;return r.Path.prototype.setStyle.call(this,n),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng);this._updateBounds()},_updateBounds:function(){var n=this._radius,u=this._radiusY||n,t=this._clickTolerance(),i=[n+t,u+t];this._pxBounds=new r.Bounds(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)}});r.circleMarker=function(n,t){return new r.CircleMarker(n,t)};r.Circle=r.CircleMarker.extend({initialize:function(n,t,i){if(typeof t=="number"&&(t=r.extend({},i,{radius:t})),r.setOptions(this,t),this._latlng=r.latLng(n),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(n){return this._mRadius=n,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var n=[this._radius,this._radiusY||this._radius];return new r.LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(n)),this._map.layerPointToLatLng(this._point.add(n)))},setStyle:r.Path.prototype.setStyle,_project:function(){var o=this._latlng.lng,i=this._latlng.lat,n=this._map,s=n.options.crs,l;if(s.distance===r.CRS.Earth.distance){var t=Math.PI/180,f=this._mRadius/r.CRS.Earth.R/t,c=n.project([i+f,o]),a=n.project([i-f,o]),e=c.add(a).divideBy(2),h=n.unproject(e).lat,u=Math.acos((Math.cos(f*t)-Math.sin(i*t)*Math.sin(h*t))/(Math.cos(i*t)*Math.cos(h*t)))/t;(isNaN(u)||u===0)&&(u=f/Math.cos(Math.PI/180*i));this._point=e.subtract(n.getPixelOrigin());this._radius=isNaN(u)?0:Math.max(Math.round(e.x-n.project([h,o-u]).x),1);this._radiusY=Math.max(Math.round(e.y-c.y),1)}else l=s.unproject(s.project(this._latlng).subtract([this._mRadius,0])),this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(l).x;this._updateBounds()}});r.circle=function(n,t,i){return new r.Circle(n,t,i)};r.SVG=r.Renderer.extend({getEvents:function(){var n=r.Renderer.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=r.SVG.create("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=r.SVG.create("g");this._container.appendChild(this._rootGroup)},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){r.Renderer.prototype._update.call(this);var t=this._bounds,n=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(n)||(this._svgSize=n,i.setAttribute("width",n.x),i.setAttribute("height",n.y));r.DomUtil.setPosition(i,t.min);i.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" "));this.fire("update")}},_initPath:function(n){var t=n._path=r.SVG.create("path");n.options.className&&r.DomUtil.addClass(t,n.options.className);n.options.interactive&&r.DomUtil.addClass(t,"leaflet-interactive");this._updateStyle(n);this._layers[r.stamp(n)]=n},_addPath:function(n){this._rootGroup.appendChild(n._path);n.addInteractiveTarget(n._path)},_removePath:function(n){r.DomUtil.remove(n._path);n.removeInteractiveTarget(n._path);delete this._layers[r.stamp(n)]},_updatePath:function(n){n._project();n._update()},_updateStyle:function(n){var t=n._path,i=n.options;t&&(i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight),t.setAttribute("stroke-linecap",i.lineCap),t.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?t.setAttribute("stroke-dasharray",i.dashArray):t.removeAttribute("stroke-dasharray"),i.dashOffset?t.setAttribute("stroke-dashoffset",i.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity),t.setAttribute("fill-rule",i.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(n,t){this._setPath(n,r.SVG.pointsToPath(n._parts,t))},_updateCircle:function(n){var i=n._point,t=n._radius,u=n._radiusY||t,r="a"+t+","+u+" 0 1,0 ",f=n._empty()?"M0 0":"M"+(i.x-t)+","+i.y+r+t*2+",0 "+r+-t*2+",0 ";this._setPath(n,f)},_setPath:function(n,t){n._path.setAttribute("d",t)},_bringToFront:function(n){r.DomUtil.toFront(n._path)},_bringToBack:function(n){r.DomUtil.toBack(n._path)}});r.extend(r.SVG,{create:function(n){return t.createElementNS("http://www.w3.org/2000/svg",n)},pointsToPath:function(n,t){for(var f="",i,h,e,o,u=0,s=n.length;u<s;u++){for(e=n[u],i=0,h=e.length;i<h;i++)o=e[i],f+=(i?"L":"M")+o.x+" "+o.y;f+=t?r.Browser.svg?"z":"x":""}return f||"M0 0"}});r.Browser.svg=!!(t.createElementNS&&r.SVG.create("svg").createSVGRect);r.svg=function(n){return r.Browser.svg||r.Browser.vml?new r.SVG(n):null};r.Browser.vml=!r.Browser.svg&&function(){var i,n;try{return i=t.createElement("div"),i.innerHTML='<v:shape adj="1"/>',n=i.firstChild,n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch(r){return!1}}();r.SVG.include(r.Browser.vml?{_initContainer:function(){this._container=r.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(r.Renderer.prototype._update.call(this),this.fire("update"))}
1,_initPath:function(n){var t=n._container=r.SVG.create("shape");r.DomUtil.addClass(t,"leaflet-vml-shape "+(this.options.className||""));t.coordsize="1 1";n._path=r.SVG.create("path");t.appendChild(n._path);this._updateStyle(n)},_addPath:function(n){var t=n._container;this._container.appendChild(t);n.options.interactive&&n.addInteractiveTarget(t)},_removePath:function(n){var t=n._container;r.DomUtil.remove(t);n.removeInteractiveTarget(t)},_updateStyle:function(n){var i=n._stroke,u=n._fill,t=n.options,f=n._container;f.stroked=!!t.stroke;f.filled=!!t.fill;t.stroke?(i||(i=n._stroke=r.SVG.create("stroke")),f.appendChild(i),i.weight=t.weight+"px",i.color=t.color,i.opacity=t.opacity,i.dashStyle=t.dashArray?r.Util.isArray(t.dashArray)?t.dashArray.join(" "):t.dashArray.replace(/( *, *)/g," "):"",i.endcap=t.lineCap.replace("butt","flat"),i.joinstyle=t.lineJoin):i&&(f.removeChild(i),n._stroke=null);t.fill?(u||(u=n._fill=r.SVG.create("fill")),f.appendChild(u),u.color=t.fillColor||t.color,u.opacity=t.fillOpacity):u&&(f.removeChild(u),n._fill=null)},_updateCircle:function(n){var t=n._point.round(),i=Math.round(n._radius),r=Math.round(n._radiusY||i);this._setPath(n,n._empty()?"M0 0":"AL "+t.x+","+t.y+" "+i+","+r+" 0,23592600")},_setPath:function(n,t){n._path.v=t},_bringToFront:function(n){r.DomUtil.toFront(n._container)},_bringToBack:function(n){r.DomUtil.toBack(n._container)}}:{});r.Browser.vml&&(r.SVG.create=function(){try{return t.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(n){return t.createElement("<lvml:"+n+' class="lvml">')}}catch(n){return function(n){return t.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}());r.Canvas=r.Renderer.extend({onAdd:function(){r.Renderer.prototype.onAdd.call(this);this._draw()},_initContainer:function(){var n=this._container=t.createElement("canvas");r.DomEvent.on(n,"mousemove",r.Util.throttle(this._onMouseMove,32,this),this).on(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(n,"mouseout",this._handleMouseOut,this);this._ctx=n.getContext("2d")},_updatePaths:function(){var n,t;this._redrawBounds=null;for(t in this._layers)n=this._layers[t],n._update();this._redraw()},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={};r.Renderer.prototype._update.call(this);var t=this._bounds,n=this._container,i=t.getSize(),u=r.Browser.retina?2:1;r.DomUtil.setPosition(n,t.min);n.width=u*i.x;n.height=u*i.y;n.style.width=i.x+"px";n.style.height=i.y+"px";r.Browser.retina&&this._ctx.scale(2,2);this._ctx.translate(-t.min.x,-t.min.y);this.fire("update")}},_initPath:function(n){this._updateDashArray(n);this._layers[r.stamp(n)]=n;var t=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t);this._drawLast=t;this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var u=n._order,t=u.next,i=u.prev;t?t.prev=i:this._drawLast=i;i?i.next=t:this._drawFirst=t;delete n._order;delete this._layers[r.stamp(n)];this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n);n._project();n._update();this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n);this._requestRedraw(n)},_updateDashArray:function(n){if(n.options.dashArray){for(var i=n.options.dashArray.split(","),r=[],t=0;t<i.length;t++)r.push(Number(i[t]));n.options._dashArray=r}},_requestRedraw:function(n){this._map&&(this._extendRedrawBounds(n),this._redrawRequest=this._redrawRequest||r.Util.requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(n){var t=(n.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new r.Bounds;this._redrawBounds.extend(n._pxBounds.min.subtract([t,t]));this._redrawBounds.extend(n._pxBounds.max.add([t,t]))},_redraw:function(){this._redrawRequest=null;this._clear();this._draw();this._redrawBounds=null},_clear:function(){var n=this._redrawBounds,t;n?(t=n.getSize(),this._ctx.clearRect(n.min.x,n.min.y,t.x,t.y)):this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var i,n=this._redrawBounds,r,t;for(this._ctx.save(),n&&(r=n.getSize(),this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,r.x,r.y),this._ctx.clip()),this._drawing=!0,t=this._drawFirst;t;t=t.next)i=t.layer,(!n||i._pxBounds&&i._pxBounds.intersects(n))&&i._updatePath();this._drawing=!1;
1this._ctx.restore()},_updatePoly:function(n,t){if(this._drawing){var r,u,o,f,e=n._parts,s=e.length,i=this._ctx;if(s){for(this._drawnLayers[n._leaflet_id]=n,i.beginPath(),i.setLineDash&&i.setLineDash(n.options&&n.options._dashArray||[]),r=0;r<s;r++){for(u=0,o=e[r].length;u<o;u++)f=e[r][u],i[u?"lineTo":"moveTo"](f.x,f.y);t&&i.closePath()}this._fillStroke(i,n)}}},_updateCircle:function(n){if(this._drawing&&!n._empty()){var u=n._point,t=this._ctx,r=n._radius,i=(n._radiusY||r)/r;this._drawnLayers[n._leaflet_id]=n;i!==1&&(t.save(),t.scale(1,i));t.beginPath();t.arc(u.x,u.y/i,r,0,Math.PI*2,!1);i!==1&&t.restore();this._fillStroke(t,n)}},_fillStroke:function(n,t){var i=t.options;i.fill&&(n.globalAlpha=i.fillOpacity,n.fillStyle=i.fillColor||i.color,n.fill(i.fillRule||"evenodd"));i.stroke&&i.weight!==0&&(n.globalAlpha=i.opacity,n.lineWidth=i.weight,n.strokeStyle=i.color,n.lineCap=i.lineCap,n.lineJoin=i.lineJoin,n.stroke())},_onClick:function(n){for(var f=this._map.mouseEventToLayerPoint(n),t,u,i=this._drawFirst;i;i=i.next)t=i.layer,t.options.interactive&&t._containsPoint(f)&&!this._map._draggableMoved(t)&&(u=t);u&&(r.DomEvent._fakeStop(n),this._fireEvent([u],n))},_onMouseMove:function(n){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(n);this._handleMouseHover(n,t)}},_handleMouseOut:function(n){var t=this._hoveredLayer;t&&(r.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([t],n,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(n,t){for(var f,i,u=this._drawFirst;u;u=u.next)f=u.layer,f.options.interactive&&f._containsPoint(t)&&(i=f);i!==this._hoveredLayer&&(this._handleMouseOut(n),i&&(r.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([i],n,"mouseover"),this._hoveredLayer=i));this._hoveredLayer&&this._fireEvent([this._hoveredLayer],n)},_fireEvent:function(n,t,i){this._map._fireDOMEvent(t,i||t.type,n)},_bringToFront:function(n){var t=n._order,i=t.next,r=t.prev;if(i)i.prev=r;else return;r?r.next=i:i&&(this._drawFirst=i);t.prev=this._drawLast;this._drawLast.next=t;t.next=null;this._drawLast=t;this._requestRedraw(n)},_bringToBack:function(n){var t=n._order,r=t.next,i=t.prev;if(i)i.next=r;else return;r?r.prev=i:i&&(this._drawLast=i);t.prev=null;t.next=this._drawFirst;this._drawFirst.prev=t;this._drawFirst=t;this._requestRedraw(n)}});r.Browser.canvas=function(){return!!t.createElement("canvas").getContext}();r.canvas=function(n){return r.Browser.canvas?new r.Canvas(n):null};r.Polyline.prototype._containsPoint=function(n,t){var u,i,e,s,o,f,h=this._clickTolerance();if(!this._pxBounds.contains(n))return!1;for(u=0,s=this._parts.length;u<s;u++)for(f=this._parts[u],i=0,o=f.length,e=o-1;i<o;e=i++)if((t||i!==0)&&r.LineUtil.pointToSegmentDistance(n,f[e],f[i])<=h)return!0;return!1};r.Polygon.prototype._containsPoint=function(n){var o=!1,i,t,u,f,e,s,c,h;if(!this._pxBounds.contains(n))return!1;for(f=0,c=this._parts.length;f<c;f++)for(i=this._parts[f],e=0,h=i.length,s=h-1;e<h;s=e++)t=i[e],u=i[s],t.y>n.y!=u.y>n.y&&n.x<(u.x-t.x)*(n.y-t.y)/(u.y-t.y)+t.x&&(o=!o);return o||r.Polyline.prototype._containsPoint.call(this,n,!0)};r.CircleMarker.prototype._containsPoint=function(n){return n.distanceTo(this._point)<=this._radius+this._clickTolerance()};r.GeoJSON=r.FeatureGroup.extend({initialize:function(n,t){r.setOptions(this,t);this._layers={};n&&this.addData(n)},addData:function(n){var e=r.Util.isArray(n)?n:n.features,f,o,i,u,t;if(e){for(f=0,o=e.length;f<o;f++)i=e[f],(i.geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}if((u=this.options,u.filter&&!u.filter(n))||(t=r.GeoJSON.geometryToLayer(n,u),!t))return this;if(t.feature=r.GeoJSON.asFeature(n),t.defaultOptions=t.options,this.resetStyle(t),u.onEachFeature)u.onEachFeature(n,t);return this.addLayer(t)},resetStyle:function(n){return n.options=r.Util.extend({},n.defaultOptions),this._setLayerStyle(n,this.options.style),this},setStyle:function(n){return this.eachLayer(function(t){this._setLayerStyle(t,n)},this)},_setLayerStyle:function(n,t){typeof t=="function"&&(t=t(n.feature));n.setStyle&&n.setStyle(t)}});r.extend(r.GeoJSON,{geometryToLayer:function(n,t){var i=n.type==="Feature"?n.geometry:n,f=i?i.coordinates:null,o=[],s=t&&t.pointToLayer,h=t&&t.coordsToLatLng||this.coordsToLatLng,e,c,u,l,a;if(!f&&!i)return null;switch(i.type){case"Point":return e=h(f),s?s(n,e):new r.Marker(e);case"MultiPoint":for(u=0,l=f.length;u<l;u++)e=h(f[u]),o.push(s?s(n,e):new r.Marker(e));return new r.FeatureGroup(o);case"LineString":case"MultiLineString":return c=this.coordsToLatLngs(f,i.type==="LineString"?0:1,h),new r.Polyline(c,t);case"Polygon":case"MultiPolygon":return c=this.coordsToLatLngs(f,i.type==="Polygon"?1:2,h),new r.Polygon(c,t);case"GeometryCollection":for(u=0,l=i.geometries.length;u<l;u++)a=this.geometryToLayer({geometry:i.geometries[u],type:"Feature",properties:n.properties},t),a&&o.push(a);return new r.FeatureGroup(o);default:throw new Error("Invalid GeoJSON object.");}},coordsToLatLng:function(n){return new r.LatLng(n[1],n[0],n[2])},coordsToLatLngs:function(n,t,i){for(var u=[],e,r=0,f=n.length;r<f;r++)e=t?this.coordsToLatLngs(n[r],t-1,i):(i||this.coordsToLatLng)(n[r]),u.push(e);return u},latLngToCoords:function(n){return n.alt!==i?[n.lng,n.lat,n.alt]:[n.lng,n.lat]},latLngsToCoords:function(n,t,i){for(var f=[],u=0,e=n.length;u<e;u++)f.push(t?r.GeoJSON.latLngsToCoords(n[u],t-1,i):r.GeoJSON.latLngToCoords(n[u]));return!t&&i&&f.push(f[0]),f},getFeature:function(n,t){return n.feature?r.extend({},n.feature,{geometry:t}):r.GeoJSON.asFeature(t)},asFeature:function(n){return n.type==="Feature"||n.type==="FeatureCollection"?n:{type:"Feature",properties:{},geometry:n}}});e={toGeoJSON:function(){return r.GeoJSON.getFeature(this,{type:"Point",coordinates:r.GeoJSON.latLngToCoords(this.getLatLng())})}};r.Marker.include(e);r.Circle.include(e);r.CircleMarker.include(e);r.Polyline.prototype.toGeoJSON=function(){var n=!r.Polyline._flat(this._latlngs),t=r.GeoJSON.latLngsToCoords(this._latlngs,n?1:0);return r.GeoJSON.getFeature(this,{type:(n?"Multi":"")+"LineString",coordinates:t})};r.Polygon.prototype.toGeoJSON=function(){var n=!r.Polyline._flat(this._latlngs),i=n&&!r.Polyline._flat(this._latlngs[0]),t=r.GeoJSON.latLngsToCoords(this._latlngs,i?2:n?1:0,!0);return n||(t=[t]),r.GeoJSON.getFeature(this,{type:(i?"Multi":"")+"Polygon",coordinates:t})};r.LayerGroup.include({toMultiPoint:function(){var n=[];return this.eachLayer(function(t){n.push(t.toGeoJSON().geometry.coordinates)}),r.GeoJSON.getFeature(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type,t,n;return i==="MultiPoint"?this.toMultiPoint():(t=i==="GeometryCollection",n=[],this.eachLayer(function(i){if(i.toGeoJSON){var u=i.toGeoJSON();n.push(t?u.geometry:r.GeoJSON.asFeature(u))}}),t)?r.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});r.geoJSON=function(n,t){return new r.GeoJSON(n,t)};r.geoJson=r.geoJSON;r.Draggable=r.Evented.extend({options:{clickTolerance:3},statics:{START:r.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(n,t,i){this._element=n;this._dragStartTarget=t||n;this._preventOutline=i},enable:function(){if(!this._enabled){r.DomEvent.on(this._dragStartTarget,r.Draggable.START.j
1oin(" "),this._onDown,this);this._enabled=!0}},disable:function(){this._enabled&&(r.Draggable._dragging===this&&this.finishDrag(),r.DomEvent.off(this._dragStartTarget,r.Draggable.START.join(" "),this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!n._simulated&&this._enabled&&(this._moved=!1,!r.DomUtil.hasClass(this._element,"leaflet-zoom-anim"))&&!r.Draggable._dragging&&!n.shiftKey&&(n.which===1||n.button===1||n.touches)&&(r.Draggable._dragging=this,this._preventOutline&&r.DomUtil.preventOutline(this._element),r.DomUtil.disableImageDrag(),r.DomUtil.disableTextSelection(),!this._moving)){this.fire("down");var i=n.touches?n.touches[0]:n;this._startPoint=new r.Point(i.clientX,i.clientY);r.DomEvent.on(t,r.Draggable.MOVE[n.type],this._onMove,this).on(t,r.Draggable.END[n.type],this._onUp,this)}},_onMove:function(i){if(!i._simulated&&this._enabled){if(i.touches&&i.touches.length>1){this._moved=!0;return}var f=i.touches&&i.touches.length===1?i.touches[0]:i,e=new r.Point(f.clientX,f.clientY),u=e.subtract(this._startPoint);(u.x||u.y)&&(Math.abs(u.x)+Math.abs(u.y)<this.options.clickTolerance||(r.DomEvent.preventDefault(i),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=r.DomUtil.getPosition(this._element).subtract(u),r.DomUtil.addClass(t.body,"leaflet-dragging"),this._lastTarget=i.target||i.srcElement,n.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),r.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(u),this._moving=!0,r.Util.cancelAnimFrame(this._animRequest),this._lastEvent=i,this._animRequest=r.Util.requestAnimFrame(this._updatePosition,this,!0)))}},_updatePosition:function(){var n={originalEvent:this._lastEvent};this.fire("predrag",n);r.DomUtil.setPosition(this._element,this._newPos);this.fire("drag",n)},_onUp:function(n){!n._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){r.DomUtil.removeClass(t.body,"leaflet-dragging");this._lastTarget&&(r.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var n in r.Draggable.MOVE)r.DomEvent.off(t,r.Draggable.MOVE[n],this._onMove,this).off(t,r.Draggable.END[n],this._onUp,this);r.DomUtil.enableImageDrag();r.DomUtil.enableTextSelection();this._moved&&this._moving&&(r.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)}));this._moving=!1;r.Draggable._dragging=!1}});r.Handler=r.Class.extend({initialize:function(n){this._map=n},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});r.Map.mergeOptions({dragging:!0,inertia:!r.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});r.Map.Drag=r.Handler.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new r.Draggable(n._mapPane,n._container);this._draggable.on({down:this._onDown,dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);if(n.options.worldCopyJump){this._draggable.on("predrag",this._onPreDragWrap,this);n.on("zoomend",this._onZoomEnd,this);n.whenReady(this._onZoomEnd,this)}}r.DomUtil.addClass(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function(){r.DomUtil.removeClass(this._map._container,"leaflet-grab");r.DomUtil.removeClass(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},_onDown:function(){this._map._stop()},_onDragStart:function(){var t=this._map,n;this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(n=r.latLngBounds(this._map.options.maxBounds),this._offsetLimit=r.bounds(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null;t.fire("movestart").fire("dragstart");t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var t=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i);this._times.push(t);t-this._times[0]>50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",n).fire("drag",n)},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(n).x;this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,t){return n-(n-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var n=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;n.x<t.min.x&&(n.x=this._viscousLimit(n.x,t.min.x));n.y<t.min.y&&(n.y=this._viscousLimit(n.y,t.min.y));n.x>t.max.x&&(n.x=this._viscousLimit(n.x,t.max.x));n.y>t.max.y&&(n.y=this._viscousLimit(n.y,t.max.y));this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var i=this._worldWidth,t=Math.round(i/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-t+n)%i+t-n,f=(r+t+n)%i-t-n,e=Math.abs(u+n)<Math.abs(f+n)?u:f;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=e},_onDragEnd:function(n){var t=this._map,u=t.options,c=!u.inertia||this._times.length<2;if(t.fire("dragend",n),c)t.fire("moveend");else{var l=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,f=u.easeLinearity,e=l.multiplyBy(f/a),o=e.distanceTo([0,0]),s=Math.min(u.inertiaMaxSpeed,o),v=e.multiplyBy(s/o),h=s/(u.inertiaDeceleration*f),i=v.multiplyBy(-h
1/2).round();i.x||i.y?(i=t._limitOffset(i,t.options.maxBounds),r.Util.requestAnimFrame(function(){t.panBy(i,{duration:h,easeLinearity:f,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});r.Map.addInitHook("addHandler","dragging",r.Map.Drag);r.Map.mergeOptions({doubleClickZoom:!0});r.Map.DoubleClickZoom=r.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var t=this._map,i=t.getZoom(),r=t.options.zoomDelta,u=n.originalEvent.shiftKey?i-r:i+r;t.options.doubleClickZoom==="center"?t.setZoom(u):t.setZoomAround(n.containerPoint,u)}});r.Map.addInitHook("addHandler","doubleClickZoom",r.Map.DoubleClickZoom);r.Map.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});r.Map.ScrollWheelZoom=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function(){r.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(n){var i=r.DomEvent.getWheelDelta(n),u=this._map.options.wheelDebounceTime,t;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(n);this._startTime||(this._startTime=+new Date);t=Math.max(u-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(r.bind(this._performZoom,this),t);r.DomEvent.stop(n)},_performZoom:function(){var n=this._map,t=n.getZoom(),i=this._map.options.zoomSnap||0;n._stop();var e=this._delta/(this._map.options.wheelPxPerZoomLevel*4),u=4*Math.log(2/(1+Math.exp(-Math.abs(e))))/Math.LN2,f=i?Math.ceil(u/i)*i:u,r=n._limitZoom(t+(this._delta>0?f:-f))-t;(this._delta=0,this._startTime=null,r)&&(n.options.scrollWheelZoom==="center"?n.setZoom(t+r):n.setZoomAround(this._lastMousePos,t+r))}});r.Map.addInitHook("addHandler","scrollWheelZoom",r.Map.ScrollWheelZoom);r.extend(r.DomEvent,{_touchstart:r.Browser.msPointer?"MSPointerDown":r.Browser.pointer?"pointerdown":"touchstart",_touchend:r.Browser.msPointer?"MSPointerUp":r.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(n,t,i){function s(n){var e,t,i;(e=r.Browser.pointer?r.DomEvent._pointersCount:n.touches.length,e>1)||(t=Date.now(),i=t-(f||t),u=n.touches?n.touches[0]:n,o=i>0&&i<=a,f=t)}function h(){if(o&&!u.cancelBubble){if(r.Browser.pointer){var e={},n,i;for(i in u)n=u[i],e[i]=n&&n.bind?n.bind(u):n;u=e}u.type="dblclick";t(u);f=null}}var f,u,o=!1,a=250,e="_leaflet_",c=this._touchstart,l=this._touchend;return n[e+c+i]=s,n[e+l+i]=h,n[e+"dblclick"+i]=t,n.addEventListener(c,s,!1),n.addEventListener(l,h,!1),r.Browser.edge||n.addEventListener("dblclick",t,!1),this},removeDoubleTapListener:function(n,t){var i="_leaflet_",u=n[i+this._touchstart+t],f=n[i+this._touchend+t],e=n[i+"dblclick"+t];return n.removeEventListener(this._touchstart,u,!1),n.removeEventListener(this._touchend,f,!1),r.Browser.edge||n.removeEventListener("dblclick",e,!1),this}});r.extend(r.DomEvent,{POINTER_DOWN:r.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:r.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:r.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:r.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(n,t,i,r){return t==="touchstart"?this._addPointerStart(n,i,r):t==="touchmove"?this._addPointerMove(n,i,r):t==="touchend"&&this._addPointerEnd(n,i,r),this},removePointerListener:function(n,t,i){var r=n["_leaflet_"+t+i];return t==="touchstart"?n.removeEventListener(this.POINTER_DOWN,r,!1):t==="touchmove"?n.removeEventListener(this.POINTER_MOVE,r,!1):t==="touchend"&&(n.removeEventListener(this.POINTER_UP,r,!1),n.removeEventListener(this.POINTER_CANCEL,r,!1)),this},_addPointerStart:function(n,i,u){var e=r.bind(function(n){if(n.pointerType!=="mouse"&&n.pointerType!==n.MSPOINTER_TYPE_MOUSE)if(this.TAG_WHITE_LIST.indexOf(n.target.tagName)<0)r.DomEvent.preventDefault(n);else return;this._handlePointer(n,i)},this),f;n["_leaflet_touchstart"+u]=e;n.addEventListener(this.POINTER_DOWN,e,!1);this._pointerDocListener||(f=r.bind(this._globalPointerUp,this),t.documentElement.addEventListener(this.POINTER_DOWN,r.bind(this._globalPointerDown,this),!0),t.documentElement.addEventListener(this.POINTER_MO
1VE,r.bind(this._globalPointerMove,this),!0),t.documentElement.addEventListener(this.POINTER_UP,f,!0),t.documentElement.addEventListener(this.POINTER_CANCEL,f,!0),this._pointerDocListener=!0)},_globalPointerDown:function(n){this._pointers[n.pointerId]=n;this._pointersCount++},_globalPointerMove:function(n){this._pointers[n.pointerId]&&(this._pointers[n.pointerId]=n)},_globalPointerUp:function(n){delete this._pointers[n.pointerId];this._pointersCount--},_handlePointer:function(n,t){n.touches=[];for(var i in this._pointers)n.touches.push(this._pointers[i]);n.changedTouches=[n];t(n)},_addPointerMove:function(n,t,i){var u=r.bind(function(n){(n.pointerType!==n.MSPOINTER_TYPE_MOUSE&&n.pointerType!=="mouse"||n.buttons!==0)&&this._handlePointer(n,t)},this);n["_leaflet_touchmove"+i]=u;n.addEventListener(this.POINTER_MOVE,u,!1)},_addPointerEnd:function(n,t,i){var u=r.bind(function(n){this._handlePointer(n,t)},this);n["_leaflet_touchend"+i]=u;n.addEventListener(this.POINTER_UP,u,!1);n.addEventListener(this.POINTER_CANCEL,u,!1)}});r.Map.mergeOptions({touchZoom:r.Browser.touch&&!r.Browser.android23,bounceAtZoomLimits:!0});r.Map.TouchZoom=r.Handler.extend({addHooks:function(){r.DomUtil.addClass(this._map._container,"leaflet-touch-zoom");r.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){r.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom");r.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var i=this._map,u,f;if(n.touches&&n.touches.length===2&&!i._animatingZoom&&!this._zooming){u=i.mouseEventToContainerPoint(n.touches[0]);f=i.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=i.getSize()._divideBy(2);this._startLatLng=i.containerPointToLatLng(this._centerPoint);i.options.touchZoom!=="center"&&(this._pinchStartLatLng=i.containerPointToLatLng(u.add(f)._divideBy(2)));this._startDist=u.distanceTo(f);this._startZoom=i.getZoom();this._moved=!1;this._zooming=!0;i._stop();r.DomEvent.on(t,"touchmove",this._onTouchMove,this).on(t,"touchend",this._onTouchEnd,this);r.DomEvent.preventDefault(n)}},_onTouchMove:function(n){var u,o;if(n.touches&&n.touches.length===2&&this._zooming){var t=this._map,f=t.mouseEventToContainerPoint(n.touches[0]),e=t.mouseEventToContainerPoint(n.touches[1]),i=f.distanceTo(e)/this._startDist;if(this._zoom=t.getScaleZoom(i,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&i<1||this._zoom>t.getMaxZoom()&&i>1)&&(this._zoom=t._limitZoom(this._zoom)),t.options.touchZoom==="center"){if(this._center=this._startLatLng,i===1)return}else{if(u=f._add(e)._divideBy(2)._subtract(this._centerPoint),i===1&&u.x===0&&u.y===0)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(u),this._zoom)}this._moved||(t._moveStart(!0),this._moved=!0);r.Util.cancelAnimFrame(this._animRequest);o=r.bind(t._move,t,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=r.Util.requestAnimFrame(o,this,!0);r.DomEvent.preventDefault(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1;r.Util.cancelAnimFrame(this._animRequest);r.DomEvent.off(t,"touchmove",this._onTouchMove).off(t,"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))}});r.Map.addInitHook("addHandler","touchZoom",r.Map.TouchZoom);r.Map.mergeOptions({tap:!0,tapTolerance:15});r.Map.Tap=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){r.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(r.DomEvent.preventDefault(n),this._fireClick=!0,n.touches.length>1){this._fireClick=!1;clearTimeout(this._holdTimeout);return}var i=n.touches[0],u=i.target;this._startPos=this._newPos=new r.Point(i.clientX,i.clientY);u.tagName&&u.tagName.toLowerCase()==="a"&&r.DomUtil.addClass(u,"leaflet-active");this._holdTimeout=setTimeout(r.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3);this._simulateEvent("mousedown",i);r.DomEvent.on(t,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),r.DomEvent.off(t,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var u=n.changedTouches[0],i=u.target;i&&i.tagName&&i.tagName.toLowerCase()==="a"&&r.DomUtil.removeClass(i,"leaflet-active");this._simulateEvent("mouseup",u);this._isTapValid()&&this._simulateEvent("click",u)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var t=n.touches[0];this._newPos=new r.Point(t.clientX,t.clientY);this._simulateEvent("mousemove",t)},_simulateEvent:function(i,r){var u=t.createEvent("MouseEvents");u._simulated=!0;r.target._simulatedClick=!0;
1u.initMouseEvent(i,!0,!0,n,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null);r.target.dispatchEvent(u)}});r.Browser.touch&&!r.Browser.pointer&&r.Map.addInitHook("addHandler","tap",r.Map.Tap);r.Map.mergeOptions({boxZoom:!0});r.Map.BoxZoom=r.Handler.extend({initialize:function(n){this._map=n;this._container=n._container;this._pane=n._panes.overlayPane},addHooks:function(){r.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){r.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._resetState();r.DomUtil.disableTextSelection();r.DomUtil.disableImageDrag();this._startPoint=this._map.mouseEventToContainerPoint(n);r.DomEvent.on(t,{contextmenu:r.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=r.DomUtil.create("div","leaflet-zoom-box",this._container),r.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart"));this._point=this._map.mouseEventToContainerPoint(n);var t=new r.Bounds(this._point,this._startPoint),i=t.getSize();r.DomUtil.setPosition(this._box,t.min);this._box.style.width=i.x+"px";this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(r.DomUtil.remove(this._box),r.DomUtil.removeClass(this._container,"leaflet-crosshair"));r.DomUtil.enableTextSelection();r.DomUtil.enableImageDrag();r.DomEvent.off(t,{contextmenu:r.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if((n.which===1||n.button===1)&&(this._finish(),this._moved)){setTimeout(r.bind(this._resetState,this),0);var t=new r.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(n){n.keyCode===27&&this._finish()}});r.Map.addInitHook("addHandler","boxZoom",r.Map.BoxZoom);r.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80});r.Map.Keyboard=r.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(n){this._map=n;this._setPanDelta(n.options.keyboardPanDelta);this._setZoomDelta(n.options.zoomDelta)},addHooks:function(){var n=this._map._container;n.tabIndex<=0&&(n.tabIndex="0");r.DomEvent.on(n,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks();r.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=t.body,r=t.documentElement,u=i.scrollTop||r.scrollTop,f=i.scrollLeft||r.scrollLeft;this._map._container.focus();n.scrollTo(f,u)}},_onFocus:function(){this._focused=!0;this._map.fire("focus")},_onBlur:function(){this._focused=!1;this._map.fire("blur")},_setPanDelta:function(n){for(var u=this._panKeys={},i=this.keyCodes,t=0,r=i.left.length;t<r;t++)u[i.left[t]]=[-1*n,0];for(t=0,r=i.right.length;t<r;t++)u[i.right[t]]=[n,0];for(t=0,r=i.down.length;t<r;t++)u[i.down[t]]=[0,n];for(t=0,r=i.up.length;t<r;t++)u[i.up[t]]=[0,-1*n]},_setZoomDelta:function(n){for(var u=this._zoomKeys={},i=this.keyCodes,t=0,r=i.zoomIn.length;t<r;t++)u[i.zoomIn[t]]=n;for(t=0,r=i.zoomOut.length;t<r;t++)u[i.zoomOut[t]]=-n},_addHooks:function(){r.DomEvent.on(t,"keydown",this._onKeyDown,this)},_removeHooks:function(){r.DomEvent.off(t,"keydown",this._onKeyDown,this)},_onKeyDown:function(n){if(!n.altKey&&!n.ctrlKey&&!n.metaKey){var i=n.keyCode,t=this._map,u;if(i in this._panKeys){if(t._panAnim&&t._panAnim._inProgress)return;u=this._panKeys[i];
1n.shiftKey&&(u=r.point(u).multiplyBy(3));t.panBy(u);t.options.maxBounds&&t.panInsideBounds(t.options.maxBounds)}else if(i in this._zoomKeys)t.setZoom(t.getZoom()+(n.shiftKey?3:1)*this._zoomKeys[i]);else if(i===27)t.closePopup();else return;r.DomEvent.stop(n)}}});r.Map.addInitHook("addHandler","keyboard",r.Map.Keyboard);r.Handler.MarkerDrag=r.Handler.extend({initialize:function(n){this._marker=n},addHooks:function(){var n=this._marker._icon;this._draggable||(this._draggable=new r.Draggable(n,n,!0));this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable();r.DomUtil.addClass(n,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable();this._marker._icon&&r.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng();this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(n){var t=this._marker,i=t._shadow,u=r.DomUtil.getPosition(t._icon),f=t._map.layerPointToLatLng(u);i&&r.DomUtil.setPosition(i,u);t._latlng=f;n.latlng=f;n.oldLatLng=this._oldLatLng;t.fire("move",n).fire("drag",n)},_onDragEnd:function(n){delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",n)}});r.Control=r.Class.extend({options:{position:"topright"},initialize:function(n){r.setOptions(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var t=this._map;return t&&t.removeControl(this),this.options.position=n,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove();this._map=n;var t=this._container=this.onAdd(n),u=this.getPosition(),i=n._controlCorners[u];return r.DomUtil.addClass(t,"leaflet-control"),u.indexOf("bottom")!==-1?i.insertBefore(t,i.firstChild):i.appendChild(t),this},remove:function(){if(!this._map)return this;if(r.DomUtil.remove(this._container),this.onRemove)this.onRemove(this._map);return this._map=null,this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}});r.control=function(n){return new r.Control(n)};r.Map.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){function n(n,f){var e=t+n+" "+t+f;i[n+f]=r.DomUtil.create("div",e,u)}var i=this._controlCorners={},t="leaflet-",u=this._controlContainer=r.DomUtil.create("div",t+"control-container",this._container);n("top","left");n("top","right");n("bottom","left");n("bottom","right")},_clearControlPos:function(){r.DomUtil.remove(this._controlContainer)}});r.Control.Zoom=r.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(n){var i="leaflet-control-zoom",u=r.DomUtil.create("div",i+" leaflet-bar"),t=this.options;this._zoomInButton=this._createButton(t.zoomInText,t.zoomInTitle,i+"-in",u,this._zoomIn);this._zoomOutButton=this._createButton(t.zoomOutText,t.zoomOutTitle,i+"-out",u,this._zoomOut);this._updateDisabled();n.on("zoomend zoomlevelschange",this._updateDisabled,this);return u},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(n.shiftKey?3:1))},_zoomOut:function(n){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,t,i,u,f){var e=r.DomUtil.create("a",i,u);e.innerHTML=n;e.href="#";e.title=t;e.setAttribute("role","button");e.setAttribute("aria-label",t);r.DomEvent.on(e,"mousedown dblclick",r.DomEvent.stopPropagation).on(e,"click",r.DomEvent.stop).on(e,"click",f,this).on(e,"click",this._refocusOnMap,this);return e},_updateDisabled:function(){var n=this._map,t="leaflet-disabled";r.DomUtil.removeClass(this._zoomInButton,t);r.DomUtil.removeClass(this._zoomOutButton,t);(this._disabled||n._zoom===n.getMinZoom())&&r.DomUtil.addClass(this._zoomOutButton,t);(this._disabled||n._zoom===n.getMaxZoom())&&r.DomUtil.addClass(this._zoomInButton,t)}});r.Map.mergeOptions({zoomControl:!0});r.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new r.Control.Zoom,this.addControl(this.zoomControl))});r.control.zoom=function(n){return new r.Control.Zoom(n)};r.Control.Attribution=r.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet<\/a>'},initialize:function(n){r.setOptions(this,n);this._attributions={}}
1,onAdd:function(n){n.attributionControl=this;this._container=r.DomUtil.create("div","leaflet-control-attribution");r.DomEvent&&r.DomEvent.disableClickPropagation(this._container);for(var t in n._layers)n._layers[t].getAttribution&&this.addAttribution(n._layers[t].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){var n,i,t;if(this._map){n=[];for(i in this._attributions)this._attributions[i]&&n.push(i);t=[];this.options.prefix&&t.push(this.options.prefix);n.length&&t.push(n.join(", "));this._container.innerHTML=t.join(" | ")}}});r.Map.mergeOptions({attributionControl:!0});r.Map.addInitHook(function(){this.options.attributionControl&&(new r.Control.Attribution).addTo(this)});r.control.attribution=function(n){return new r.Control.Attribution(n)};r.Control.Scale=r.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var t="leaflet-control-scale",i=r.DomUtil.create("div",t),u=this.options;this._addScales(u,t+"-line",i);n.on(u.updateWhenIdle?"moveend":"move",this._update,this);return n.whenReady(this._update,this),i},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,t,i){n.metric&&(this._mScale=r.DomUtil.create("div",t,i));n.imperial&&(this._iScale=r.DomUtil.create("div",t,i))},_update:function(){var n=this._map,t=n.getSize().y/2,i=n.distance(n.containerPointToLatLng([0,t]),n.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(i)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n);this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var t=this._getRoundNum(n),i=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,i,t/n)},_updateImperial:function(n){var t=n*3.2808399,i,r,u;t>5280?(i=t/5280,r=this._getRoundNum(i),this._updateScale(this._iScale,r+" mi",r/i)):(u=this._getRoundNum(t),this._updateScale(this._iScale,u+" ft",u/t))},_updateScale:function(n,t,i){n.style.width=Math.round(this.options.maxWidth*i)+"px";n.innerHTML=t},_getRoundNum:function(n){var i=Math.pow(10,(Math.floor(n)+"").length-1),t=n/i;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:1,i*t}});r.control.scale=function(n){return new r.Control.Scale(n)};r.Control.Layers=r.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,t,i,r){return i<r?-1:r<i?1:0}},initialize:function(n,t,i){r.setOptions(this,i);this._layers=[];this._lastZIndex=0;this._handlingClick=!1;for(var u in n)this._addLayer(n[u],u);for(u in t)this._addLayer(t[u],u,!0)},onAdd:function(n){this._initLayout();this._update();this._map=n;n.on("zoomend",this._checkDisabledLayers,this);return this._container},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(n,t){return this._addLayer(n,t),this._map?this._update():this},addOverlay:function(n,t){return this._addLayer(n,t,!0),this._map?this._update():this},removeLayer:function(n){n.off("add remove",this._onLayerChange,this);var t=this._getLayer(r.stamp(n));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){r.DomUtil.addClass(this._container,"leaflet-control-layers-expanded");this._form.style.height=null;var n=this._map.getSize().y-(this._container.offsetTop+50);return n<this._form.clientHeight?(r.DomUtil.addClass(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=n+"px"):r.DomUtil.removeClass(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return r.DomUtil.removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var n="leaflet-control-layers",t=this._container=r.DomUtil.create("div",n),i,u;if(t.setAttribute("aria-haspopup",!0),r.DomEvent.disableClickPropagation(t),r.Browser.touch||r.DomEvent.disableScrollPropagation(t),i=this._form=r.DomUtil.create("form",n+"-list"),!r.Browser.android)r.DomEvent.on(t,{mouseenter:this.expand,mouseleave:this.collapse},this);if(u=this._layersLink=r.DomUtil.create("a",n+"-toggle",t),u.href="#",u.title="Layers",r.Browser.touch)r.DomEvent.on(u,"click",r.DomEvent.stop).on(u,"click",this.expand,this);else r.DomEvent.on(u,"focus",this.expand,this);r.DomEvent.on(i,"click",function(){setTimeout(r.bind(this._onInputClick,this),0)},this);this._map.on("click",this.collapse,this);this.options.collapsed||this.expand();this._baseLayersList=r.DomUtil.create("div",n+"-base",i);this._separator=r.DomUtil.create("div",n+"-separator",i);this._overlaysList=r.DomUtil.create("div",n+"-overlays",i);t.appendChild(i)},_getLayer:function(n){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&r.stamp(this._layers[t].layer)===n)return this._layers[t]},_addLayer:function(n,t,i){n.on("add remove",this._onLayerChange,this);this._layers.push({layer:n,name:t,overlay:i});this.options.sortLayers&&this._layers.sort(r.bind(function(n,t){return this.options.sortFunction(n.layer,t.layer,n.name,t.name)},this));
1this.options.autoZIndex&&n.setZIndex&&(this._lastZIndex++,n.setZIndex(this._lastZIndex))},_update:function(){if(!this._container)return this;r.DomUtil.empty(this._baseLayersList);r.DomUtil.empty(this._overlaysList);for(var n,u,t,f=0,i=0;i<this._layers.length;i++)t=this._layers[i],this._addItem(t),u=u||t.overlay,n=n||!t.overlay,f+=t.overlay?0:1;return this.options.hideSingleBase&&(n=n&&f>1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=u&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var t=this._getLayer(r.stamp(n.target)),i=t.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;i&&this._map.fire(i,t)},_createRadioElement:function(n,i){var u='<input type="radio" class="leaflet-control-layers-selector" name="'+n+'"'+(i?' checked="checked"':"")+"/>",r=t.createElement("div");return r.innerHTML=u,r.firstChild},_addItem:function(n){var f=t.createElement("label"),o=this._map.hasLayer(n.layer),i,e,u,s;n.overlay?(i=t.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o);i.layerId=r.stamp(n.layer);r.DomEvent.on(i,"click",this._onInputClick,this);return e=t.createElement("span"),e.innerHTML=" "+n.name,u=t.createElement("div"),f.appendChild(u),u.appendChild(i),u.appendChild(e),s=n.overlay?this._overlaysList:this._baseLayersList,s.appendChild(f),this._checkDisabledLayers(),f},_onInputClick:function(){var e=this._form.getElementsByTagName("input"),t,i,r,u=[],f=[],n;for(this._handlingClick=!0,n=e.length-1;n>=0;n--)t=e[n],i=this._getLayer(t.layerId).layer,r=this._map.hasLayer(i),t.checked&&!r?u.push(i):!t.checked&&r&&f.push(i);for(n=0;n<f.length;n++)this._map.removeLayer(f[n]);for(n=0;n<u.length;n++)this._map.addLayer(u[n]);this._handlingClick=!1;this._refocusOnMap()},_checkDisabledLayers:function(){for(var u=this._form.getElementsByTagName("input"),r,n,f=this._map.getZoom(),t=u.length-1;t>=0;t--)r=u[t],n=this._getLayer(r.layerId).layer,r.disabled=n.options.minZoom!==i&&f<n.options.minZoom||n.options.maxZoom!==i&&f>n.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}});r.control.layers=function(n,t,i){return new r.Control.Layers(n,t,i)}})(window,document),function(n){"use strict";function f(n){for(var i={},t=u.exec(n);t;)i[t[1]]=t[2],t=u.exec(n);return i}function e(n){var i="",t;for(t in n)i+=t+": "+n[t]+"; ";return i}function r(n,t,i,r){for(var s=Math.round(n+Math.cos(i)*r*2),h=Math.round(t+Math.sin(i)*r*2),u=Math.abs(s-n),a=n<s?1:-1,f=Math.abs(h-t),v=t<h?1:-1,e=(u>f?u:-f)/2,o,c=[],l=0;;){if(c.push([n,t]),l++,l===r)break;o=e;o>-u&&(e-=f,n+=a);o<f&&(e+=u,t+=v)}return c}function a(n,t,i){for(var u=[],r=i+1;r--;)u[r]=[n,t-r];return u}function v(n,t,i,u){if(u!=null)return r(n,t,u,i+1);for(var e=[],f=0;f<=i;f++)e[f]=[n,t];return e}function y(n,t,i){for(var u=[],r=i+1;r--;)u[r]=" matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,"+n+","+(t-r)+",0,1) ";return u}function p(n,t,i,u){var s=[],e=i+1,f,o;if(u!=null)f=r(n,t,u,i+1);else for(f=[],o=0;o<=i;o++)f[o]=[n,t];while(e--)s[e]=" matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,"+f[e][0]+","+f[e][1]+",0,1) ";return s}function o(n,t,i,r){for(var f=[],u=r+1;u--;)f[u]=" matrix3d(1,0,0,0,0,"+(i-u)/i+",0,0,0,0,1,0,"+n+","+(t+u)+",0,1) ";return f}function s(n,t){var f=t+n,u=[],r;if(i[f])return i[f];for(r=1;r<=n;)u.push(r++);for(r=n;r--;)u.push(r);return i[f]=u,u}function h(n,t,r){var e=r+n+"_"+t,f=[],o=[],s=0,h,u;if(i[e])return i[e];for(f[n]=t,f[0]=0,u=n;--u;)f[u]=Math.round(t/(n-u));for(u=n;u--;)f.push(f[u]);for(u=0,h=f.length;u<h;u++)s+=f[u],o.push(s);return i[e]=o,o}var u=/([\w-]+): ([^;]+);/g,t={transform:"transform",WebkitTransform:"-webkit-transform",OTransform:"-o-transform",MozTransform:"-moz-transform",msTransform:"-ms-transform"}[n.DomUtil.TRANSFORM],i={},c,l;n.Marker._bouncingMarkers=[];n.Marker.setBouncingOptions=function(t){n.extend(n.Marker.prototype._bouncingOptions,t)};n.Marker.getBouncingMarkers=function(){return n.Marker._bouncingMarkers};n.Marker.stopAllBouncingMarkers=function(){for(var t;t=n.Marker._bouncingMarkers.shift();)t._bouncingMotion.isBouncing=!1};n.Marker._addBouncingMarker=function(t,i){i||t._bouncingOptions.exclusive?n.Marker.stopAllBouncingMarkers():n.Marker._stopEclusiveMarkerBouncing();n.Marker._bouncingMarkers.push(t)};n.Marker._removeBouncingMarker=function(t){var i=n.Marker._bouncingMarkers.length;if(i)while(i--)if(n.Marker._bouncingMarkers[i]==t){n.Marker._bouncingMarkers.splice(i,1);break}};n.Marker._stopEclusiveMarkerBouncing=function(){var t=n.Marker._bouncingMarkers.length;if(t)while(t--)n.Marker._bouncingMarkers[t]._bouncingOptions.exclusive&&(n.Marker._bouncingMarkers[t]._bouncingMotion.isBouncing=!1,n.Marker._bouncingMarkers.splice(t,1)
1)};n.Marker.include({_bouncingOptions:{bounceHeight:15,contractHeight:12,bounceSpeed:52,contractSpeed:52,shadowAngle:-Math.PI/4,elastic:!0,exclusive:!1},setBouncingOptions:function(t){return this.hasOwnProperty("_bouncingOptions")||(this._bouncingOptions=n.extend({},n.Marker.prototype._bouncingOptions)),n.extend(this._bouncingOptions,t),this._calculateTimeline(),this._calculateTransforms(),this},isBouncing:function(){return this._bouncingMotion.isBouncing},bounce:function(){function tt(n){e.style.cssText=h+"z-index: "+u._zIndex+";"+t+": "+i.iconMoveTransforms[n];r&&(r.style.cssText=c+t+": "+i.shadowMoveTransforms[n])}function it(n){e.style.cssText=h+"z-index: "+u._zIndex+";";e.style.left=i.iconMovePoints[n][0]+"px";e.style.top=i.iconMovePoints[n][1]+"px";r&&(r.style.cssText=c,r.style.left=i.shadowMovePoints[n][0]+"px",r.style.top=i.shadowMovePoints[n][1]+"px")}function rt(n){e.style.cssText=h+"z-index: "+u._zIndex+";"+t+": "+i.iconResizeTransforms[n];r&&d!=null&&(r.style.cssText=c+t+": "+i.shadowResizeTransforms[n])}function a(){l!==null&&(--l||(i.isBouncing=!1));var n=p;if(b)while(n--)setTimeout(tt,s[n],o[n]);else while(n--)setTimeout(it,s[n],o[n]);setTimeout(function(){g&&b?ut():i.isBouncing&&setTimeout(a,k)},s[p-1])}function ut(){for(var n=w;n--;)setTimeout(rt,y[n],v[n]);setTimeout(function(){i.isBouncing&&a()},y[w-1])}var u=this,e=this._icon,r=this._shadow,f=u._bouncingOptions,i=u._bouncingMotion,ft=f.bounceHeight,et=f.contractHeight,k=f.bounceSpeed,ot=f.contractSpeed,d=f.shadowAngle,g=f.elastic,nt=f.exclusive,o=i.moveSteps,s=i.moveDelays,v=i.resizeSteps,y=i.resizeDelays,p=o.length,w=v.length,h=i.baseIconCssText,c=i.baseShadowCssText,b=n.Browser.any3d,l=null;return arguments.length==1&&(l=arguments[0]),n.Marker._addBouncingMarker(u,nt),i.isBouncing=!0,a(),u},stopBouncing:function(){return this._bouncingMotion.isBouncing=!1,n.Marker._removeBouncingMarker(this),this},toggleBouncing:function(){return this._bouncingMotion.isBouncing?this.stopBouncing():this.bounce(),this},_calculateTimeline:function(){this._bouncingMotion.moveSteps=s(this._bouncingOptions.bounceHeight,"moveSteps_");this._bouncingMotion.moveDelays=h(this._bouncingOptions.bounceHeight,this._bouncingOptions.bounceSpeed,"moveDelays_");this._bouncingOptions.elastic&&(this._bouncingMotion.resizeSteps=s(this._bouncingOptions.contractHeight,"resizeSteps_"),this._bouncingMotion.resizeDelays=h(this._bouncingOptions.contractHeight,this._bouncingOptions.contractSpeed,"resizeDelays_"))},_calculateTransforms:function(){var t;n.Browser.any3d?(t=this.options.icon.options.iconSize?this.options.icon.options.iconSize[1]:this._iconObj.options.iconSize[1],this._bouncingMotion.iconMoveTransforms=y(this._bouncingMotion.x,this._bouncingMotion.y,this._bouncingOptions.bounceHeight),this._bouncingMotion.iconResizeTransforms=o(this._bouncingMotion.x,this._bouncingMotion.y,t,this._bouncingOptions.contractHeight),this._shadow&&(this._bouncingMotion.shadowMoveTransforms=p(this._bouncingMotion.x,this._bouncingMotion.y,this._bouncingOptions.bounceHeight,this._bouncingOptions.shadowAngle),this._bouncingMotion.shadowResizeTransforms=o(this._bouncingMotion.x,this._bouncingMotion.y,this.options.icon.options.shadowSize[1],this._bouncingOptions.contractHeight))):(this._bouncingMotion.iconMovePoints=a(this._bouncingMotion.x,this._bouncingMotion.y,this._bouncingOptions.bounceHeight),this._bouncingMotion.shadowMovePoints=v(this._bouncingMotion.x,this._bouncingMotion.y,this._bouncingOptions.bounceHeight,this._bouncingOptions.shadowAngle))}});n.Marker.addInitHook(function(){this._bouncingMotion={isBouncing:!1};this._calculateTimeline()});c=n.Marker.prototype._setPos;l=n.Marker.prototype.onAdd;n.Marker.prototype._setPos=function(n){c.call(this,n);this._bouncingMotion.x=n.x;this._bouncingMotion.y=n.y;this._calculateTransforms()};n.Marker.prototype.onAdd=function(n){l.call(this,n);var i=f(this._icon.style.cssText);delete i[t];delete i["z-index"];i.opacity=this.options.opacityWhenUnclustered||this.options.opacity||1;this._bouncingMotion.baseIconCssText=e(i);this._shadow&&(i=f(this._shadow.style.cssText),delete i[t],delete i.opacity,this._bouncingMotion.baseShadowCssText=e(i));this._bouncingMotion.isBouncing&&this.bounce()}}(L)

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.