UNPKG

bandsintown-gig-map

Version:

A vue3 component for integrating a map which is showing all your bandsintown gigs.

4 lines 156 kB
(function(dt,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(dt=typeof globalThis<"u"?globalThis:dt||self,f(dt.BandsinTownGigMap={},dt.Vue))})(this,function(dt,f){"use strict";var ne=function(){return ne=Object.assign||function(A){for(var u,Z=1,m=arguments.length;Z<m;Z++){u=arguments[Z];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(A[_]=u[_])}return A},ne.apply(this,arguments)};function bn(Y,A,u,Z){function m(_){return _ instanceof u?_:new u(function(x){x(_)})}return new(u||(u=Promise))(function(_,x){function it(F){try{b(Z.next(F))}catch(z){x(z)}}function v(F){try{b(Z.throw(F))}catch(z){x(z)}}function b(F){F.done?_(F.value):m(F.value).then(it,v)}b((Z=Z.apply(Y,A||[])).next())})}function Tn(Y,A){var u={label:0,sent:function(){if(_[0]&1)throw _[1];return _[1]},trys:[],ops:[]},Z,m,_,x=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return x.next=it(0),x.throw=it(1),x.return=it(2),typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function it(b){return function(F){return v([b,F])}}function v(b){if(Z)throw new TypeError("Generator is already executing.");for(;x&&(x=0,b[0]&&(u=0)),u;)try{if(Z=1,m&&(_=b[0]&2?m.return:b[0]?m.throw||((_=m.return)&&_.call(m),0):m.next)&&!(_=_.call(m,b[1])).done)return _;switch(m=0,_&&(b=[b[0]&2,_.value]),b[0]){case 0:case 1:_=b;break;case 4:return u.label++,{value:b[1],done:!1};case 5:u.label++,m=b[1],b=[0];continue;case 7:b=u.ops.pop(),u.trys.pop();continue;default:if(_=u.trys,!(_=_.length>0&&_[_.length-1])&&(b[0]===6||b[0]===2)){u=0;continue}if(b[0]===3&&(!_||b[1]>_[0]&&b[1]<_[3])){u.label=b[1];break}if(b[0]===6&&u.label<_[1]){u.label=_[1],_=b;break}if(_&&u.label<_[2]){u.label=_[2],u.ops.push(b);break}_[2]&&u.ops.pop(),u.trys.pop();continue}b=A.call(Y,u)}catch(F){b=[6,F],m=0}finally{Z=_=0}if(b[0]&5)throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var Rt={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */var Mn=Rt.exports,ai;function Sn(){return ai||(ai=1,function(Y,A){(function(u,Z){Z(A)})(Mn,function(u){var Z="1.9.4";function m(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o)t[e]=o[e]}return t}var _=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function x(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var it=0;function v(t){return"_leaflet_id"in t||(t._leaflet_id=++it),t._leaflet_id}function b(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)},s}function F(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function z(){return!1}function W(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function tt(t){return q(t).split(/\s+/)}function E(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?_(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function Ht(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var zt=/\{ *([\w_ -]+) *\}/g;function Ft(t,e){return t.replace(zt,function(i,n){var o=e[n];if(o===void 0)throw new Error("No value provided for variable "+i);return typeof o=="function"&&(o=o(e)),o})}var U=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var oe="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Te(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var ui=0;function li(t){var e=+new Date,i=Math.max(0,16-(e-ui));return ui=e+i,window.setTimeout(t,i)}var Me=window.requestAnimationFrame||Te("RequestAnimationFrame")||li,ci=window.cancelAnimationFrame||Te("CancelAnimationFrame")||Te("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function X(t,e,i){if(i&&Me===li)t.call(e);else return Me.call(window,x(t,e))}function nt(t){t&&ci.call(window,t)}var Nn={__proto__:null,extend:m,create:_,bind:x,get lastId(){return it},stamp:v,throttle:b,wrapNum:F,falseFn:z,formatNum:W,trim:q,splitWords:tt,setOptions:E,getParamString:Ht,template:Ft,isArray:U,indexOf:G,emptyImageUrl:oe,requestFn:Me,cancelFn:ci,requestAnimFrame:X,cancelAnimFrame:nt};function _t(){}_t.extend=function(t){var e=function(){E(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=_(i);n.constructor=e,e.prototype=n;for(var o in this)Object.prototype.hasOwnProperty.call(this,o)&&o!=="prototype"&&o!=="__super__"&&(e[o]=this[o]);return t.statics&&m(e,t.statics),t.includes&&(Dn(t.includes),m.apply(null,[n].concat(t.includes))),m(n,t),delete n.statics,delete n.includes,n.options&&(n.options=i.options?_(i.options):{},m(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var s=0,r=n._initHooks.length;s<r;s++)n._initHooks[s].call(this)}},e},_t.include=function(t){var e=this.prototype.options;return m(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},_t.mergeOptions=function(t){return m(this.prototype.options,t),this},_t.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function Dn(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=U(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var et={on:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e);else{t=tt(t);for(var o=0,s=t.length;o<s;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var n in t)this._off(n,t[n],e);else{t=tt(t);for(var o=arguments.length===1,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}return this},_on:function(t,e,i,n){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,i)===!1){i===this&&(i=void 0);var o={fn:e,ctx:i};n&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t],!!n)){if(arguments.length===1){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=z;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var r=this._listens(t,e,i);if(r!==!1){var a=n[r];this._firingCount&&(a.fn=z,this._events[t]=n=n.slice()),n.splice(r,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=m({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s],h=a.fn;a.once&&this.off(t,h,a.ctx),h.call(a.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e,i,n){typeof t!="string"&&console.warn('"string" type argument expected');var o=e;typeof e!="function"&&(n=!!e,o=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&this._listens(t,o,i)!==!1)return!0;if(n){for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,n))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var o=0,s=n.length;o<s;o++)if(n[o].fn===e&&n[o].ctx===i)return o;return!1},once:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e,!0);else{t=tt(t);for(var o=0,s=t.length;o<s;o++)this._on(t[o],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[v(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[v(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,m({layer:t.target,propagatedFrom:t.target},t),!0)}};et.addEventListener=et.on,et.removeEventListener=et.clearAllEventListeners=et.off,et.addOneTimeEventListener=et.once,et.fireEvent=et.fire,et.hasEventListeners=et.listens;var Wt=_t.extend(et);function y(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var fi=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};y.prototype={clone:function(){return new y(this.x,this.y)},add:function(t){return this.clone()._add(g(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(g(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new y(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new y(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=fi(this.x),this.y=fi(this.y),this},distanceTo:function(t){t=g(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=g(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=g(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+W(this.x)+", "+W(this.y)+")"}};function g(t,e,i){return t instanceof y?t:U(t)?new y(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new y(t.x,t.y):new y(t,e,i)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}B.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof y||typeof t[0]=="number"||"x"in t)e=i=g(t);else if(t=J(t),e=t.min,i=t.max,!e||!i)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=i.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)),this},getCenter:function(t){return g((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return g(this.min.x,this.max.y)},getTopRight:function(){return g(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return typeof t[0]=="number"||t instanceof y?t=g(t):t=J(t),t instanceof B?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=J(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=J(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.x<i.x,r=o.y>e.y&&n.y<i.y;return s&&r},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,o=Math.abs(e.y-i.y)*t;return J(g(e.x-n,e.y-o),g(i.x+n,i.y+o))},equals:function(t){return t?(t=J(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function J(t,e){return!t||t instanceof B?t:new B(t,e)}function $(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}$.prototype={extend:function(t){var e=this._southWest,i=this._northEast,n,o;if(t instanceof k)n=t,o=t;else if(t instanceof $){if(n=t._southWest,o=t._northEast,!n||!o)return this}else return t?this.extend(M(t)||D(t)):this;return!e&&!i?(this._southWest=new k(n.lat,n.lng),this._northEast=new k(o.lat,o.lng)):(e.lat=Math.min(n.lat,e.lat),e.lng=Math.min(n.lng,e.lng),i.lat=Math.max(o.lat,i.lat),i.lng=Math.max(o.lng,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new $(new k(e.lat-n,e.lng-o),new k(i.lat+n,i.lng+o))},getCenter:function(){return new k((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 k(this.getNorth(),this.getWest())},getSouthEast:function(){return new k(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof k||"lat"in t?t=M(t):t=D(t);var e=this._southWest,i=this._northEast,n,o;return t instanceof $?(n=t.getSouthWest(),o=t.getNorthEast()):n=o=t,n.lat>=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=D(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=D(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.lat<i.lat,r=o.lng>e.lng&&n.lng<i.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=D(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function D(t,e){return t instanceof $?t:new $(t,e)}function k(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,i!==void 0&&(this.alt=+i)}k.prototype={equals:function(t,e){if(!t)return!1;t=M(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+W(this.lat,t)+", "+W(this.lng,t)+")"},distanceTo:function(t){return wt.distance(this,M(t))},wrap:function(){return wt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return D([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new k(this.lat,this.lng,this.alt)}};function M(t,e,i){return t instanceof k?t:U(t)&&typeof t[0]!="object"?t.length===3?new k(t[0],t[1],t[2]):t.length===2?new k(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new k(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new k(t,e,i)}var mt={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),o=this.transformation.transform(e.max,i);return new B(n,o)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?F(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?F(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return new k(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(n===0&&o===0)return t;var s=t.getSouthWest(),r=t.getNorthEast(),a=new k(s.lat-n,s.lng-o),h=new k(r.lat-n,r.lng-o);return new $(a,h)}},wt=m({},mt,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),di=6378137,Se={R:di,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new y(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new k((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=di*Math.PI;return new B([-t,-t],[t,t])}()};function Ce(t,e,i,n){if(U(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=n}Ce.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new y((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function Ut(t,e,i,n){return new Ce(t,e,i,n)}var ze=m({},wt,{code:"EPSG:3857",projection:Se,transformation:function(){var t=.5/(Math.PI*Se.R);return Ut(t,.5,-t,.5)}()}),Rn=m({},ze,{code:"EPSG:900913"});function _i(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function mi(t,e){var i="",n,o,s,r,a,h;for(n=0,s=t.length;n<s;n++){for(a=t[n],o=0,r=a.length;o<r;o++)h=a[o],i+=(o?"L":"M")+h.x+" "+h.y;i+=e?d.svg?"z":"x":""}return i||"M0 0"}var ke=document.documentElement.style,se="ActiveXObject"in window,Hn=se&&!document.addEventListener,pi="msLaunchUri"in navigator&&!("documentMode"in document),Ee=ut("webkit"),gi=ut("android"),vi=ut("android 2")||ut("android 3"),Fn=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Wn=gi&&ut("Google")&&Fn<537&&!("AudioNode"in window),Ze=!!window.opera,yi=!pi&&ut("chrome"),wi=ut("gecko")&&!Ee&&!Ze&&!se,Un=!yi&&ut("safari"),xi=ut("phantom"),Pi="OTransition"in ke,Gn=navigator.platform.indexOf("Win")===0,Li=se&&"transition"in ke,Oe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!vi,bi="MozPerspective"in ke,Vn=!window.L_DISABLE_3D&&(Li||Oe||bi)&&!Pi&&!xi,Gt=typeof orientation<"u"||ut("mobile"),qn=Gt&&Ee,jn=Gt&&Oe,Ti=!window.PointerEvent&&window.MSPointerEvent,Mi=!!(window.PointerEvent||Ti),Si="ontouchstart"in window||!!window.TouchEvent,Kn=!window.L_NO_TOUCH&&(Si||Mi),Yn=Gt&&Ze,Xn=Gt&&wi,Jn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,$n=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",z,e),window.removeEventListener("testPassiveEventSupport",z,e)}catch{}return t}(),Qn=function(){return!!document.createElement("canvas").getContext}(),Be=!!(document.createElementNS&&_i("svg").createSVGRect),to=!!Be&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),eo=!Be&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),io=navigator.platform.indexOf("Mac")===0,no=navigator.platform.indexOf("Linux")===0;function ut(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var d={ie:se,ielt9:Hn,edge:pi,webkit:Ee,android:gi,android23:vi,androidStock:Wn,opera:Ze,chrome:yi,gecko:wi,safari:Un,phantom:xi,opera12:Pi,win:Gn,ie3d:Li,webkit3d:Oe,gecko3d:bi,any3d:Vn,mobile:Gt,mobileWebkit:qn,mobileWebkit3d:jn,msPointer:Ti,pointer:Mi,touch:Kn,touchNative:Si,mobileOpera:Yn,mobileGecko:Xn,retina:Jn,passiveEvents:$n,canvas:Qn,svg:Be,vml:eo,inlineSvg:to,mac:io,linux:no},Ci=d.msPointer?"MSPointerDown":"pointerdown",zi=d.msPointer?"MSPointerMove":"pointermove",ki=d.msPointer?"MSPointerUp":"pointerup",Ei=d.msPointer?"MSPointerCancel":"pointercancel",Ie={touchstart:Ci,touchmove:zi,touchend:ki,touchcancel:Ei},Zi={touchstart:uo,touchmove:re,touchend:re,touchcancel:re},kt={},Oi=!1;function oo(t,e,i){return e==="touchstart"&&ho(),Zi[e]?(i=Zi[e].bind(this,i),t.addEventListener(Ie[e],i,!1),i):(console.warn("wrong event specified:",e),z)}function so(t,e,i){if(!Ie[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Ie[e],i,!1)}function ro(t){kt[t.pointerId]=t}function ao(t){kt[t.pointerId]&&(kt[t.pointerId]=t)}function Bi(t){delete kt[t.pointerId]}function ho(){Oi||(document.addEventListener(Ci,ro,!0),document.addEventListener(zi,ao,!0),document.addEventListener(ki,Bi,!0),document.addEventListener(Ei,Bi,!0),Oi=!0)}function re(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in kt)e.touches.push(kt[i]);e.changedTouches=[e],t(e)}}function uo(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&j(e),re(t,e)}function lo(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var co=200;function fo(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Ri(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=co?(n++,n===2&&e(lo(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function _o(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ae=ue(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Vt=ue(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ii=Vt==="webkitTransition"||Vt==="OTransition"?Vt+"End":"transitionend";function Ai(t){return typeof t=="string"?document.getElementById(t):t}function qt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function C(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function I(t){var e=t.parentNode;e&&e.removeChild(t)}function ae(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Et(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Zt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Ne(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=he(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function P(t,e){if(t.classList!==void 0)for(var i=tt(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!Ne(t,e)){var s=he(t);De(t,(s?s+" ":"")+e)}}function N(t,e){t.classList!==void 0?t.classList.remove(e):De(t,q((" "+he(t)+" ").replace(" "+e+" "," ")))}function De(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function he(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function ot(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&mo(t,e)}function mo(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch{if(e===1)return}e=Math.round(e*100),i?(i.Enabled=e!==100,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function ue(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Lt(t,e,i){var n=e||new y(0,0);t.style[Ae]=(d.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function R(t,e){t._leaflet_pos=e,d.any3d?Lt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function bt(t){return t._leaflet_pos||new y(0,0)}var jt,Kt,Re;if("onselectstart"in document)jt=function(){w(window,"selectstart",j)},Kt=function(){O(window,"selectstart",j)};else{var Yt=ue(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);jt=function(){if(Yt){var t=document.documentElement.style;Re=t[Yt],t[Yt]="none"}},Kt=function(){Yt&&(document.documentElement.style[Yt]=Re,Re=void 0)}}function He(){w(window,"dragstart",j)}function Fe(){O(window,"dragstart",j)}var le,We;function Ue(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(ce(),le=t,We=t.style.outlineStyle,t.style.outlineStyle="none",w(window,"keydown",ce))}function ce(){le&&(le.style.outlineStyle=We,le=void 0,We=void 0,O(window,"keydown",ce))}function Ni(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Ge(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var po={__proto__:null,TRANSFORM:Ae,TRANSITION:Vt,TRANSITION_END:Ii,get:Ai,getStyle:qt,create:C,remove:I,empty:ae,toFront:Et,toBack:Zt,hasClass:Ne,addClass:P,removeClass:N,setClass:De,getClass:he,setOpacity:ot,testProp:ue,setTransform:Lt,setPosition:R,getPosition:bt,get disableTextSelection(){return jt},get enableTextSelection(){return Kt},disableImageDrag:He,enableImageDrag:Fe,preventOutline:Ue,restoreOutline:ce,getSizedParentNode:Ni,getScale:Ge};function w(t,e,i,n){if(e&&typeof e=="object")for(var o in e)qe(t,o,e[o],i);else{e=tt(e);for(var s=0,r=e.length;s<r;s++)qe(t,e[s],i,n)}return this}var lt="_leaflet_events";function O(t,e,i,n){if(arguments.length===1)Di(t),delete t[lt];else if(e&&typeof e=="object")for(var o in e)je(t,o,e[o],i);else if(e=tt(e),arguments.length===2)Di(t,function(a){return G(e,a)!==-1});else for(var s=0,r=e.length;s<r;s++)je(t,e[s],i,n);return this}function Di(t,e){for(var i in t[lt]){var n=i.split(/\d/)[0];(!e||e(n))&&je(t,n,null,null,i)}}var Ve={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function qe(t,e,i,n){var o=e+v(i)+(n?"_"+v(n):"");if(t[lt]&&t[lt][o])return this;var s=function(a){return i.call(n||t,a||window.event)},r=s;!d.touchNative&&d.pointer&&e.indexOf("touch")===0?s=oo(t,e,s):d.touch&&e==="dblclick"?s=fo(t,s):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Ve[e]||e,s,d.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(s=function(a){a=a||window.event,Ye(t,a)&&r(a)},t.addEventListener(Ve[e],s,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,s),t[lt]=t[lt]||{},t[lt][o]=s}function je(t,e,i,n,o){o=o||e+v(i)+(n?"_"+v(n):"");var s=t[lt]&&t[lt][o];if(!s)return this;!d.touchNative&&d.pointer&&e.indexOf("touch")===0?so(t,e,s):d.touch&&e==="dblclick"?_o(t,s):"removeEventListener"in t?t.removeEventListener(Ve[e]||e,s,!1):t.detachEvent("on"+e,s),t[lt][o]=null}function Tt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ke(t){return qe(t,"wheel",Tt),this}function Xt(t){return w(t,"mousedown touchstart dblclick contextmenu",Tt),t._leaflet_disable_click=!0,this}function j(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Mt(t){return j(t),Tt(t),this}function Ri(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Hi(t,e){if(!e)return new y(t.clientX,t.clientY);var i=Ge(e),n=i.boundingClientRect;return new y((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var go=d.linux&&d.chrome?window.devicePixelRatio:d.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Fi(t){return d.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/go:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ye(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var vo={__proto__:null,on:w,off:O,stopPropagation:Tt,disableScrollPropagation:Ke,disableClickPropagation:Xt,preventDefault:j,stop:Mt,getPropagationPath:Ri,getMousePosition:Hi,getWheelDelta:Fi,isExternalTarget:Ye,addListener:w,removeListener:O},Wi=Wt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=bt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=X(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),R(this._el,i),this.fire("step")},_complete:function(){nt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),S=Wt.extend({options:{crs:ze,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=E(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=x(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(M(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Vt&&d.any3d&&!d.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),w(this._proxy,Ii,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(M(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=m({animate:i.animate},i.zoom),i.pan=m({animate:i.animate,duration:i.duration},i.pan));var n=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(n)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,i.pan&&i.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(d.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(d.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=t instanceof y?t:this.latLngToContainerPoint(t),r=s.subtract(o).multiplyBy(1-1/n),a=this.containerPointToLatLng(o.add(r));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():D(t);var i=g(e.paddingTopLeft||e.padding||[0,0]),n=g(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if(o=typeof e.maxZoom=="number"?Math.min(e.maxZoom,o):o,o===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o),h=this.unproject(r.add(a).divideBy(2).add(s),o);return{center:h,zoom:o}},fitBounds:function(t,e){if(t=D(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=g(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Wi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){P(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(i=i||{},i.animate===!1||!d.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=M(t),e=e===void 0?r:e;var a=Math.max(s.x,s.y),h=a*this.getZoomScale(r,e),l=o.distanceTo(n)||1,c=1.42,p=c*c;function T(H){var Le=H?-1:1,rs=H?h:a,as=h*h-a*a+Le*p*p*l*l,hs=2*rs*p*l,ri=as/hs,Ln=Math.sqrt(ri*ri+1)-ri,us=Ln<1e-9?-18:Math.log(Ln);return us}function K(H){return(Math.exp(H)-Math.exp(-H))/2}function V(H){return(Math.exp(H)+Math.exp(-H))/2}function rt(H){return K(H)/V(H)}var Q=T(0);function Dt(H){return a*(V(Q)/V(Q+c*H))}function is(H){return a*(V(Q)*rt(Q+c*H)-K(Q))/p}function ns(H){return 1-Math.pow(1-H,1.5)}var os=Date.now(),xn=(T(1)-Q)/c,ss=i.duration?1e3*i.duration:1e3*xn*.8;function Pn(){var H=(Date.now()-os)/ss,Le=ns(H)*xn;H<=1?(this._flyToFrame=X(Pn,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(is(Le)/l)),r),this.getScaleZoom(a/Dt(Le),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),Pn.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=D(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,D(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=g(e.paddingTopLeft||e.padding||[0,0]),n=g(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=J([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var l=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(h);o.x+=l.x<0?-c.x:c.x,o.y+=l.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=m({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(x(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=m({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=x(this._handleGeolocationResponse,this),i=x(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new k(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),I(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(nt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)I(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=C("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new $(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=D(t),i=g(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),l=J(this.project(a,n),this.project(r,n)).getSize(),c=d.any3d?this.options.zoomSnap:1,p=h.x/l.x,T=h.y/l.y,K=e?Math.max(p,T):Math.min(p,T);return n=this.getScaleZoom(K,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new y(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new B(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(M(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(g(t),e)},layerPointToLatLng:function(t){var e=g(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(M(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(M(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(D(t))},distance:function(t,e){return this.options.crs.distance(M(t),M(e))},containerPointToLayerPoint:function(t){return g(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return g(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(g(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(M(t)))},mouseEventToContainerPoint:function(t){return Hi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ai(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");w(e,"scroll",this._onScroll,this),this._containerId=v(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&d.any3d,P(t,"leaflet-container"+(d.touch?" leaflet-touch":"")+(d.retina?" leaflet-retina":"")+(d.ielt9?" leaflet-oldie":"")+(d.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=qt(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),R(this._mapPane,new y(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(P(t.markerPane,"leaflet-zoom-hide"),P(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){R(this._mapPane,new y(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return nt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){R(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[v(this._container)]=this;var e=t?O:w;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),d.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){nt(this._resizeRequest),this._resizeRequest=X(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[v(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Ye(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Ue(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=m({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r<i.length;r++)i[r].listens(e,!0)&&s.push(i[r]);o=s.concat(o)}if(o.length){e==="contextmenu"&&j(t);var a=o[0],h={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var l=a.getLatLng&&(!a._radius||a._radius<=10);h.containerPoint=l?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=l?a.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(r=0;r<o.length;r++)if(o[r].fire(e,h,!0),h.originalEvent._stopped||o[r].options.bubblingMouseEvents===!1&&G(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return bt(this._mapPane)||new y(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return J([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new B(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,i,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new B(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=J(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),s=n.max.subtract(t.max),r=this._rebound(o.x,-s.x),a=this._rebound(o.y,-s.y);return new y(r,a)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=d.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){N(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=C("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Ae,n=this._proxy.style[i];Lt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){I(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Lt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(X(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,P(this._mapPane,"